فهرست منبع

update:学时审核超过20分钟标红背景

En route 1 سال پیش
والد
کامیت
87092125d0

+ 7 - 0
src/views/education/classManageMent/classHoursReview/component/ChapterTable.vue

@@ -16,6 +16,7 @@
       <el-table-column :label="label" type="expand" width="70px">
         <template slot-scope="scope">
           <Lesson-table
+          :erJianErZao="erJianErZao"
             :tabledata="scope.row.classPeriodSectionList || []"
           ></Lesson-table>
         </template>
@@ -70,6 +71,12 @@ export default {
       type: String,
       default: "章",
     },
+    erJianErZao:{
+      type:Boolean,
+      default:()=>{
+        return false
+      }
+    }
   },
   data() {
     return {};

+ 51 - 11
src/views/education/classManageMent/classHoursReview/component/LessonTable.vue

@@ -13,7 +13,10 @@
     >
       <el-table-column label="节/卷" type="expand" width="70px">
         <template slot-scope="scope">
-          <div class="dis_flexs">
+          <div
+            class="dis_flexs"
+            :class="{ exceedStyle: exceed(scope.row.userStudyRecordPhotoList) }"
+          >
             <ul
               style="flex: 1"
               v-if="
@@ -29,10 +32,21 @@
                 <el-image
                   style="width: 100%; height: 100%"
                   :src="$methodsTools.splitImgHost(its.photo)"
-                  :preview-src-list="returnImgUrl(scope.row.userStudyRecordPhotoList)"
+                  :preview-src-list="
+                    returnImgUrl(scope.row.userStudyRecordPhotoList)
+                  "
                 >
                 </el-image>
-                <div class="abos" @click="imgChange(scope.row.userStudyRecordPhotoList[inds],'photo',its.photo)">
+                <div
+                  class="abos"
+                  @click="
+                    imgChange(
+                      scope.row.userStudyRecordPhotoList[inds],
+                      'photo',
+                      its.photo
+                    )
+                  "
+                >
                   {{ $methodsTools.onlyForma(its.createTime) }}
                 </div>
               </li>
@@ -266,6 +280,12 @@ export default {
         return [];
       },
     },
+    erJianErZao:{
+      type:Boolean,
+      default:()=>{
+        return false
+      }
+    }
   },
   inject: ["getPeriodStatus", "getUserInfo", "getAllIds"],
   data() {
@@ -369,15 +389,29 @@ export default {
     };
   },
   methods: {
-    imgChange(list,name,url) {
-      return
+    exceed(list) {
+      if (list && list.length > 1 && this.erJianErZao) {
+        let status = false;
+        for (let i = 0; i < list.length - 1; i++) {
+          if (list[i + 1].createTime - list[i].createTime > 1200) {
+            status = true;
+            break;
+          }
+        }
+        return status;
+      } else {
+        return false;
+      }
+    },
+    imgChange(list, name, url) {
+      return;
       this.$api
         .imgChange({
           imageUrl: url,
         })
         .then((res) => {
           if (res.code == 200) {
-            this.$set(list,name,url + `?v=${Math.random()}`)
+            this.$set(list, name, url + `?v=${Math.random()}`);
             this.$message.success("操作成功");
           }
         });
@@ -453,11 +487,14 @@ export default {
     allIds() {
       return this.getAllIds();
     },
-    returnImgUrl: function() {
-      return function(ary) {
-        return ary && ary.map(i => this.$methodsTools.splitImgHost(i.photo)) || []
-      }
-    }
+    returnImgUrl: function () {
+      return function (ary) {
+        return (
+          (ary && ary.map((i) => this.$methodsTools.splitImgHost(i.photo))) ||
+          []
+        );
+      };
+    },
   },
   components: {
     CheatDialog,
@@ -466,6 +503,9 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.exceedStyle {
+  background-color: rgb(255, 224, 224);
+}
 .liImgs {
   float: left;
   width: 210px;

+ 11 - 3
src/views/education/classManageMent/classHoursReview/component/ModulTable.vue

@@ -18,11 +18,13 @@
           <Chapter-table
             v-if="scope.row.classPeriods.length"
             :tabledata="scope.row.classPeriods"
+            :erJianErZao="erJianErZao"
           ></Chapter-table>
           <Chapter-table
             v-if="scope.row.arr"
             label="卷"
             :tabledata="scope.row.arr"
+            :erJianErZao="erJianErZao"
           ></Chapter-table>
         </template>
       </el-table-column>
@@ -31,9 +33,9 @@
       <el-table-column align="center" prop="typeName" label="模块标题">
         <template slot-scope="scope">
           <span>{{ scope.row.typeName }}</span
-          ><span v-if="scope.row.commonGradeName" style="color:red;">(公共班级:{{
-            scope.row.commonGradeName
-          }})</span>
+          ><span v-if="scope.row.commonGradeName" style="color: red"
+            >(公共班级:{{ scope.row.commonGradeName }})</span
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -50,6 +52,12 @@ export default {
         return [];
       },
     },
+    erJianErZao: {
+      type: Boolean,
+      default: () => {
+        return false;
+      },
+    },
   },
   data() {
     return {};

+ 45 - 22
src/views/education/classManageMent/classHoursReview/component/StudyTables.vue

@@ -81,13 +81,14 @@
               >确认审核通过结果</el-button
             >
           </template>
-          <!-- <el-button
-          v-if="periodStatus === 1"
-          style="margin-left: 10px"
-          size="mini"
-          @click="backToAudit"
-          >打回待审核状态</el-button
-        > -->
+          <el-button
+            v-if="periodStatus === 3"
+            style="margin-left: 10px"
+            size="mini"
+            type="danger"
+            @click="backToAudit"
+            >全部打回重审</el-button
+          >
         </div>
       </div>
     </div>
@@ -100,6 +101,7 @@
         :tabledata="tablesData[key]"
         :label="key == 5 ? '卷' : '章'"
         :setData="setData"
+        :erJianErZao="erJianErZao"
       ></component>
     </el-checkbox-group>
 
@@ -209,6 +211,12 @@ export default {
       type: Function,
       default: () => {},
     },
+    erJianErZao:{
+      type:Boolean,
+      default:()=>{
+        return false
+      }
+    }
   },
   provide() {
     return {
@@ -438,25 +446,40 @@ export default {
         });
     },
     backToAudit() {
-      this.$confirm("此操作将打回审核状态, 是否继续?", "提示", {
+      this.$prompt("是否全部打回重审", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        inputPattern: /^.+$/,
+        inputErrorMessage: "请输入审核不通过原因",
+        beforeClose: (action, instance, done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+              instance.confirmButtonText = '执行中...';
+            rollBackPeriod({
+                orderGoodsId: this.userData.orderGoodsId,
+                allReStudyReason: instance.inputValue,
+                allReStudy: 1,
+              })
+              .then((res) => {
+                done();
+              })
+              .catch(() => {
+                this.$message.error("接口提交失败");
+                return;
+              }).finally(()=>{
+                instance.confirmButtonText = '确定';
+                instance.confirmButtonLoading = false;
+              })
+          } else {
+            done();
+          }
+        },
       })
-        .then(() => {
-          rollBackPeriod({ orderGoodsId: this.userData.orderGoodsId }).then(
-            (res) => {
-              this.getUserInfo(true);
-              this.$message.success("已打回待审核状态");
-            }
-          );
+        .then(({ value }) => {
+          this.getUserInfo(true);
+          this.$message.success("已打回待审核状态");
         })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "已取消删除",
-          });
-        });
+        .catch(() => {});
     },
     goReview() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 5 - 1
src/views/education/classManageMent/classHoursReview/studyTimes.vue

@@ -13,6 +13,7 @@
       :userData="userData"
       :setData="setData"
       :getUserInfo="getUserInfo"
+      :erJianErZao="erJianErZao"
     ></Study-tables>
   </div>
 </template>
@@ -30,6 +31,7 @@ export default {
       totalTime: [],
       numTotal: 0,
       tablesData: undefined,
+      erJianErZao:false
     };
   },
   created() {
@@ -223,13 +225,15 @@ export default {
       return obj;
     },
     //获取学时审核数据
-    search() {
+    async search() {
       let data = {
         gradeId: this.setData.id,
         userId: this.setData.userId,
         goodsId: this.setData.goodsId,
         orderGoodsId: this.setData.orderGoodsId,
       };
+      const { data: datas } = await this.$api.obtainGoods(this.setData.goodsId);
+      this.erJianErZao = datas.erJianErZao || false
       this.loading = true;
       this.$api
         .inquireGradegradelistPeriodAudit(data)

+ 1 - 1
src/views/education/classManageMent/classList/trainee/tabClassDialog.vue

@@ -63,7 +63,7 @@ export default {
         },
         {
           label: "班级人数",
-          prop1: "studentNum",
+          prop1: "studentNumAll",
           prop2: "studentUpper",
           hidden: true,
           scope: "peopleNums",

+ 1 - 1
src/views/education/classManageMent/studentMenu/tabClassDialog.vue

@@ -70,7 +70,7 @@ export default {
         },
         {
           label: "班级人数",
-          prop1: "studentNum",
+          prop1: "studentNumAll",
           prop2: "studentUpper",
           hidden: true,
           scope: "peopleNums",