Explorar o código

修复搜索和抽屉效果

1
mo %!s(int64=3) %!d(string=hai) anos
pai
achega
26304bea9d

+ 68 - 31
src/views/smallStudentManager/components/index.vue

@@ -1,57 +1,73 @@
 <template>
-  <div class="Statistics">
-    <el-row class="rows" :gutter="20">
-      <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-        <sleep :data="statistic" />
-      </el-col>
-      <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-        <studyStudent :data="statistic" :groupType="groupType"/>
-      </el-col>
-      <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-        <remainder :data="statistic" />
-      </el-col>
-      <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-        <studentChange :groupType="groupType" />
-      </el-col>
-    </el-row>
+  <div class="statistics">
+    <el-collapse v-model="activeNames" class="statisticsCollapse">
+      <el-collapse-item name="1" >
+        <template slot="title">
+          <div class="titleWrap">  数据总览
+            <!-- <el-button type="primary">
+
+            </el-button> -->
+
+          </div>
+
+        </template>
+        <el-row class="rows" :gutter="20">
+          <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+            <sleep :data="statistic" />
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+            <studyStudent :data="statistic" :groupType="groupType" />
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+            <remainder :data="statistic" />
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+            <studentChange :groupType="groupType" />
+          </el-col>
+        </el-row>
+      </el-collapse-item>
+    </el-collapse>
   </div>
 </template>
 
 <script>
-import sleep from './sleep';
-import studyStudent from './studyStudent';
-import remainder from './remainder';
-import studentChange from './studentChange';
-import { studentSmallClassStatisticsSum } from '../api'
+import sleep from "./sleep";
+import studyStudent from "./studyStudent";
+import remainder from "./remainder";
+import studentChange from "./studentChange";
+import { studentSmallClassStatisticsSum } from "../api";
 export default {
-  name: 'Statistics',
-  props: ['groupType'],
+  name: "Statistics",
+  props: ["groupType"],
   components: {
     sleep,
     studyStudent,
     remainder,
-    studentChange
+    studentChange,
   },
   data() {
     return {
-      statistic: {}
-    }
+      statistic: {},
+      activeNames: "",
+    };
   },
   async mounted() {
     try {
-      let res = await studentSmallClassStatisticsSum({ groupType: this.groupType })
-      this.statistic = res.data || {}
+      let res = await studentSmallClassStatisticsSum({
+        groupType: this.groupType,
+      });
+      this.statistic = res.data || {};
     } catch {}
   },
-}
+};
 </script>
 
 <style lang="scss" scoped>
 .rows {
-    > div {
-      margin-bottom: 20px;
-    }
+  > div {
+    margin-bottom: 20px;
   }
+}
 /deep/ .el-card__body .statistic {
   margin-bottom: 15px;
   padding: 0;
@@ -63,5 +79,26 @@ export default {
       font-size: 14px !important;
     }
   }
+
 }
+  .statisticsCollapse {
+    margin-bottom: 20px;
+  }
+  /deep/.el-collapse-item__header {
+     background: rgb(237, 238, 240);
+    border-bottom:none!important;
+  }
+
+  // /deep/.el-collapse {
+  //   border-top:none!important;
+  //   border-bottom:none!important
+  // }
+
+  // /deep/.el-collapse-item__arrow {
+  //   display: none!important;
+  // }
+  .titleWrap {
+    padding-left: 20px;
+    font-weight: bold;
+  }
 </style>

+ 9 - 9
src/views/smallStudentManager/components/visiList.vue

@@ -165,7 +165,13 @@ export default {
     };
   },
   mounted() {
-
+         if (this.groupType == "PRACTICE") {
+      this.useVisitType = ["小课回访", "网管课回访"];
+    } else if (this.groupType == "THEORY") {
+      this.useVisitType = ["小课回访", "乐理课回访"];
+    } else {
+      this.useVisitType = ["小课回访", "VIP课回访"];
+    }
     this.searchForm.studentId = this.studentId;
 
     this.getList();
@@ -199,6 +205,8 @@ export default {
         page: this.rules.page,
         rows: this.rules.limit,
         ...getTimes(timer, ["startTime", "endTime"]),
+        purpose:this.useVisitType[1]?this.useVisitType[1]:null,
+        type:this.useVisitType[0]?this.useVisitType[0]:null
       };
       getVisitList(cleanDeep(params)).then((res) => {
         if (res.code == 200) {
@@ -216,14 +224,6 @@ export default {
         userId: this.studentId,
         userName: this.studentName,
       };
-     if (this.groupType == "PRACTICE") {
-      this.useVisitType = ["小课回访", "网管课回访"];
-    } else if (this.groupType == "THEORY") {
-      this.useVisitType = ["小课回访", "乐理课回访"];
-    } else {
-      this.useVisitType = ["小课回访", "VIP课回访"];
-    }
-    console.log(this.detail ,this.useVisitType)
       this.visitVisiable = true;
     },
   },