Browse Source

更新处理 小课学员管理 bug处理

lex 2 years ago
parent
commit
eb3f7e71c9

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-6d27b2b5.2a49656d.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.a0c116c7.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6d27b2b5.8bf2d7d6.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-7a72a72c.6bf8c668.js


+ 62 - 56
src/views/smallStudentManager/components/studentChange.vue

@@ -32,29 +32,36 @@
         </statistic-item>
       </statistic>
     </el-card>
-     <div v-show='isSearchs'></div>
+    <div v-show="isSearchs"></div>
   </div>
 </template>
 <script>
 import countTo from "vue-count-to";
 import searchHeader from "./searchHeader";
-import { studentSmallClassStatisticsSumForDate } from '../api';
+import { studentSmallClassStatisticsSumForDate } from "../api";
 import { getTimes } from "@/utils";
+import dayjs from "dayjs";
 export default {
   props: ["groupType"],
-   inject: ["organId", "isSearch"],
+  inject: ["organId", "isSearch"],
   components: {
     "count-to": countTo,
     searchHeader
   },
   data() {
+    let startTime = dayjs(new Date())
+      .set("date", 1)
+      .format("YYYY-MM-DD");
+    let endTime = dayjs(new Date())
+      .subtract(1, "day")
+      .format("YYYY-MM-DD");
     return {
       active: "",
       loading: false,
-      mdate: [],
-      endDate: '',
+      mdate: [startTime, endTime],
+      endDate: "",
       data: {},
-      flag:null
+      flag: null
     };
   },
   computed: {
@@ -62,62 +69,57 @@ export default {
       return !this.chartData.rows.length;
     },
     items() {
-      let tempArr = [{
-        text: '回访流失人数',
-        value: 0,
-        id: 'lostNum'
-      }, {
-        text: '新增人数',
-        value: 0,
-        id: 'addNum'
-      }, {
-        text: '续费人数',
-        value: 0,
-        id: 'renewNum'
-      }, {
-        text: '回访人数',
-        value: 0,
-        id: 'visitNum'
-      }]
+      let tempArr = [
+        {
+          text: "回访流失人数",
+          value: 0,
+          id: "lostNum"
+        },
+        {
+          text: "新增人数",
+          value: 0,
+          id: "addNum"
+        },
+        {
+          text: "续费人数",
+          value: 0,
+          id: "renewNum"
+        },
+        {
+          text: "回访人数",
+          value: 0,
+          id: "visitNum"
+        }
+      ];
       tempArr.forEach(item => {
-        if(this.data[item.id]) {
-          item.value = this.data[item.id]
+        if (this.data[item.id]) {
+          item.value = this.data[item.id];
         }
-      })
-      return tempArr
+      });
+      return tempArr;
     },
-          organIds() {
+    organIds() {
       return this.organId();
     },
     isSearchs: {
       get() {
         let flag = this.isSearch();
-        if(this.flag != flag){
-           this.FetchDetail()
-             console.log('调用studentChange',flag)
+        if (this.flag != flag) {
+          this.FetchDetail();
+          console.log("调用studentChange", flag);
         }
-       this.flag = flag
+        this.flag = flag;
 
         return flag;
-      },
-    },
+      }
+    }
   },
   mounted() {
-    this.init()
+    this.init();
   },
   methods: {
     init() {
-      let startTime = this.$helpers
-          .dayjs(new Date())
-          .set("date", 1)
-          .format("YYYY-MM-DD");
-      let endTime = this.$helpers
-              .dayjs(new Date())
-              .subtract(1, "day")
-              .format("YYYY-MM-DD");
-      this.mdate = [startTime, endTime];
-      this.$refs.searchHeader.initStatue('month')
-      // this.FetchDetail();
+      this.$refs.searchHeader.initStatue("month");
     },
     getInitDate() {
       const end = this.$helpers.dayjs(new Date()).format("YYYY-MM-DD");
@@ -129,35 +131,40 @@ export default {
     },
     changeValue(date) {
       // 请求更改数据
+      console.log(date, "date");
       this.mdate = date;
       this.FetchDetail();
     },
     async FetchDetail() {
       this.loading = true;
       try {
+        console.log({
+          groupType: this.groupType,
+          ...getTimes(this.mdate, ["startDate", "endDate"]),
+          organId: this.organIds
+        });
         const res = await studentSmallClassStatisticsSumForDate({
           groupType: this.groupType,
           ...getTimes(this.mdate, ["startDate", "endDate"]),
-          organId:this.organIds
+          organId: this.organIds
         });
         this.data = res.data || {};
       } catch (error) {
         console.log(error);
       }
       this.loading = false;
-    },
-  },
-
+    }
+  }
 };
 </script>
 
 <style lang="scss" scoped>
-::v-deep  .el-card__body .statistic {
-    margin-bottom: 15px;
-    padding: 0;
-  }
+::v-deep .el-card__body .statistic {
+  margin-bottom: 15px;
+  padding: 0;
+}
 ::v-deep .el-card__header {
-    padding: 0 20px!important;
+  padding: 0 20px !important;
 }
 .box {
   display: flex;
@@ -173,4 +180,3 @@ export default {
   }
 }
 </style>
-

Some files were not shown because too many files changed in this diff