Browse Source

添加分部

1
mo 3 năm trước cách đây
mục cha
commit
b7696adcba

+ 9 - 19
src/views/smallStudentManager/components/tableList.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="tableList">
+    {{organIds+'1111'}}
     <save-form
       :inline="true"
       class="searchForm"
@@ -16,24 +17,7 @@
           v-model.trim="searchForm.search"
         ></el-input>
       </el-form-item>
-      <el-form-item prop="organId">
-        <el-select
-          class="multiple"
-          filterable
-          v-model.trim="searchForm.organId"
-          multiple
-          collapse-tags
-          clearable
-          placeholder="请选择分部"
-        >
-          <el-option
-            v-for="(item, index) in selects.branchs"
-            :key="index"
-            :label="item.name"
-            :value="item.id"
-          ></el-option>
-        </el-select>
-      </el-form-item>
+
       <el-form-item prop="studentStatus">
         <el-select
           class="multiple"
@@ -435,6 +419,7 @@ import qs from "qs";
 export default {
   name: "tableList",
   props: ["groupType"],
+  jnject:["organId"],
   components: {
     pagination,
     visiList,
@@ -493,7 +478,7 @@ export default {
           ...getTimes(timer, ["firstCourseStartTime", "firstCourseEndTime"]),
           rows: this.pageInfo.limit,
           page: this.pageInfo.page,
-          organId: this.searchForm.organId.join(","),
+          organId: organIds,
         };
         let res = await queryPage({
           ...obj,
@@ -552,6 +537,11 @@ export default {
       );
     },
   },
+  computed:{
+    organIds(){
+      return this.organId
+    }
+  }
 };
 </script>
 

+ 79 - 52
src/views/smallStudentManager/vipClass.vue

@@ -1,52 +1,79 @@
-<template>
-  <div class="vipClass">
-    <Statistics :groupType='groupType' />
-
-    <TableList :groupType='groupType' />
-  </div>
-</template>
-
-<script>
-import Statistics from './components/index';
-import TableList from './components/tableList';
-export default {
-  name: "vipClass",
-  components: {
-    Statistics,
-    TableList
-  },
-  data() {
-    return {
-      groupType: 'VIP'
-    }
-  },
-  async mounted() {
-    
-  },
-  methods: {
-    __init() {
-
-    }
-  }
-};
-</script>
-
-<style lang="scss" scoped>
-.rows {
-    > div {
-      margin-bottom: 20px;
-    }
-  }
-/deep/ .el-card__body .statistic {
-  margin-bottom: 15px;
-  padding: 0;
-}
-.statistic {
-  .statistic-content > span {
-    font-size: 22px !important;
-    &:first-child {
-      font-size: 14px !important;
-    }
-  }
-}
-</style>
+<template>
+  <div class="vipClass">
+    <save-form
+      :inline="true"
+      class="searchForm"
+      ref="searchForm"
+      :model.sync="searchForm"
+    >
+      <el-form-item prop="organId">
+        <el-select
+          class="multiple"
+          filterable
+          v-model.trim="searchForm.organId"
+          multiple
+          collapse-tags
+          clearable
+          placeholder="请选择分部"
+        >
+          <el-option
+            v-for="(item, index) in selects.branchs"
+            :key="index"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+    </save-form>
+    <Statistics :groupType="groupType" />
+
+    <TableList :groupType="groupType" />
+  </div>
+</template>
+
+<script>
+import Statistics from "./components/index";
+import TableList from "./components/tableList";
+export default {
+  name: "vipClass",
+  components: {
+    Statistics,
+    TableList,
+  },
+  provide() {
+    return { organId: () => this.searchForm.organId };
+  },
+  data() {
+    return {
+      groupType: "VIP",
+      searchForm: {
+        organId: [],
+      },
+    };
+  },
+  async mounted() {},
+  methods: {
+    __init() {},
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.rows {
+  > div {
+    margin-bottom: 20px;
+  }
+}
+/deep/ .el-card__body .statistic {
+  margin-bottom: 15px;
+  padding: 0;
+}
+.statistic {
+  .statistic-content > span {
+    font-size: 22px !important;
+    &:first-child {
+      font-size: 14px !important;
+    }
+  }
+}
+</style>