Tang 3 年之前
父节点
当前提交
2476969e4b

+ 10 - 5
src/views/education/classManageMent/classHours/index.vue

@@ -40,11 +40,6 @@
             "
             style="font-weight: bold"
           ></i></el-button
-        ><el-button
-          :type="activeBtn === 0 ? 'primary' : ''"
-          :size="size"
-          @click="changeBTN(0)"
-          >不通过</el-button
         ><el-button
           :type="activeBtn === 3 ? 'primary' : ''"
           :size="size"
@@ -63,11 +58,21 @@
             "
             style="font-weight: bold"
           ></i></el-button
+        ><el-button
+          :type="activeBtn === 0 ? 'primary' : ''"
+          :size="size"
+          @click="changeBTN(0)"
+          >不通过</el-button
         ><el-button
           :type="activeBtn === 1 ? 'primary' : ''"
           :size="size"
           @click="changeBTN(1)"
           >已通过</el-button
+        ><el-button
+          :type="activeBtn === -1 ? 'primary' : ''"
+          :size="size"
+          @click="changeBTN(-1)"
+          >不可审核</el-button
         >
       </div>
       <div>

+ 103 - 2
src/views/education/classManageMent/listOfhoursToBeReviewed/index.vue

@@ -1,12 +1,66 @@
 <template>
   <div id="listOfhoursToBeReviewed">
+    <div style="margin-bottom:10px;">
+      <span style="font-size: 15px; color: #666">审核状态:</span
+      ><el-button
+        :type="formData.periodStatus === 2 ? 'primary' : ''"
+        :size="size"
+        @click="changeBTN(2)"
+        >待审核
+        <i
+          class="el-icon-warning-outline"
+          :style="
+            reviewListNums >= 200
+              ? 'color:red;'
+              : reviewListNums < 200 && reviewListNums > 99
+              ? 'color:green'
+              : reviewListNums < 100
+              ? 'color:block;'
+              : ''
+          "
+          style="font-weight: bold"
+        ></i></el-button
+      ><el-button
+        :type="formData.periodStatus === 3 ? 'primary' : ''"
+        :size="size"
+        @click="changeBTN(3)"
+        >审核中
+        <i
+          class="el-icon-warning-outline"
+          :style="
+            underReiviewNums >= 200
+              ? 'color:red;'
+              : underReiviewNums < 200 && underReiviewNums > 99
+              ? 'color:green'
+              : underReiviewNums < 100
+              ? 'color:block;'
+              : ''
+          "
+          style="font-weight: bold"
+        ></i></el-button
+      ><el-button
+        :type="formData.periodStatus === 0 ? 'primary' : ''"
+        :size="size"
+        @click="changeBTN(0)"
+        >不通过</el-button
+      ><el-button
+        :type="formData.periodStatus === 1 ? 'primary' : ''"
+        :size="size"
+        @click="changeBTN(1)"
+        >已通过</el-button
+      ><el-button
+        :type="formData.periodStatus === -1 ? 'primary' : ''"
+        :size="size"
+        @click="changeBTN(-1)"
+        >不可审核</el-button
+      >
+    </div>
     <search-box-new
       ref="searchBox"
       :formData="formData"
       :formList="formList"
       @search="search"
       @init="init"
-      :hoursType="hoursType"
     />
     <table-list
       :tableSets="tableSet"
@@ -39,7 +93,9 @@ export default {
   components: { searchBoxNew, tableList, pagination },
   data() {
     return {
-      hoursType: true,
+      size: "small",
+      reviewListNums: 0,
+      underReiviewNums: 0,
       loading: false, //当前表单加载是否加载动画
       navText: {
         title: "学时待审核列表",
@@ -236,11 +292,47 @@ export default {
   },
   mounted() {
     this.search();
+    this.getInitList();
+    this.getInitUnderList();
   },
   activated() {
     this.search();
+    this.getInitList();
+    this.getInitUnderList();
   },
   methods: {
+    changeBTN(int) {
+      this.formData.periodStatus = int;
+      this.search(6);
+    },
+    /**
+     * 待审核数量
+     */
+    getInitList() {
+      this.$api
+        .inquireGradegradelistUserPeriod({
+          periodStatus: 2,
+          status: 1,
+        })
+        .then((res) => {
+          console.log(res.rows.length);
+          this.reviewListNums = res.rows.length;
+        });
+    },
+    /**
+     * 审核中数量
+     */
+    getInitUnderList() {
+      this.$api
+        .inquireGradegradelistUserPeriod({
+          periodStatus: 3,
+          status: 1,
+        })
+        .then((res) => {
+          console.log(res.rows.length);
+          this.underReiviewNums = res.rows.length;
+        });
+    },
     jumpPage(v) {
       this.$api
         .inquireGradegradelockPeriodStatus({
@@ -279,6 +371,15 @@ export default {
           pageNum: 1,
         };
       }
+      if (int === 6) {
+        this.formData = {
+          profileStatus: "",
+          periodStatus: this.formData.periodStatus,
+          status: 1,
+          pageSize: 10,
+          pageNum: 1,
+        };
+      }
       var data = JSON.parse(JSON.stringify(this.formData));
       if (this.formData.classStartTime) {
         data.classStartTime = data.classStartTime / 1000;