Jelajahi Sumber

1.perf:班级学员增加“信息已推送”“信息待推送”统计及筛选功能

xiexaing 1 tahun lalu
induk
melakukan
cbb24e462f

TEMPAT SAMPAH
src/assets/images/push.png


TEMPAT SAMPAH
src/assets/images/waitPush.png


+ 8 - 0
src/newApi/classTab.js

@@ -384,5 +384,13 @@ export default {
             data
         })
     },
+    //班级学员获取信息推送数据
+    periodPlush(data) {
+        return request({
+            url: '/grade/grade/count/periodPlush',
+            method: 'get',
+            params: data
+        })
+    },
 
 }

+ 50 - 0
src/views/education/classManageMent/classList/trainee/index.vue

@@ -7,6 +7,12 @@
       @search="search"
       @init="init"
     />
+    <picture-list
+      ref="pictureList"
+      :info="info"
+      :list="showTabList"
+      @backFunc="pictureFunc"
+    ></picture-list>
     <table-list
       ref="tableList"
       :tableSets="tableSet"
@@ -155,6 +161,7 @@ import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 import tabClassDialog from "./tabClassDialog.vue";
 import changeClassDialog from "./changeClassDialog.vue";
+import pictureList from "@/components/Comon/pictureList.vue";
 export default {
   components: {
     ClassHour,
@@ -163,6 +170,7 @@ export default {
     pagination,
     tabClassDialog,
     changeClassDialog,
+    pictureList
   },
   props: {
     showStatus: {
@@ -194,6 +202,23 @@ export default {
         pageNum: 1,
         // classStatus: "",
       },
+      info: {},
+      showTabList: [
+        {
+          label: "信息已推送",
+          img: "push",
+          prop: "plush",
+          num: true,
+          color: "#333333",
+        },
+        {
+          label: "信息待推送",
+          img: "waitPush",
+          prop: "notPlush",
+          num: true,
+          color: "#ff7a38",
+        },
+      ],
       // 表单
       tableSet: [
         {
@@ -568,10 +593,35 @@ export default {
         .finally(() => {
           this.loading = false;
         });
+      this.$api.periodPlush({ gradeId: data.gradeId }).then((res) => {
+        const { plush, notPlush } = res.data
+        this.info = {
+          plush: plush,
+          notPlush: notPlush
+        }
+      });
     },
     init() {
       this.search(2);
     },
+    pictureFunc(item) {
+      if (item.prop == "plush") {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+          periodPlush: 1,
+        };
+        this.search();
+      }
+      if (item.prop == "notPlush") {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+          periodPlush: 0,
+        };
+        this.search();
+      }
+    },
     del(v) {
       this.$alert(
         "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",