Tang 3 سال پیش
والد
کامیت
187bdca7e3

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

@@ -244,6 +244,9 @@ export default {
         this.$set(this.formData, "businessId", this.$route.params.businessId);
         this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
       }
+      if (this.$route.params.userId) {
+        this.$set(this.formData, "userId", this.$route.params.userId);
+      }
       if (this.$route.params.classStatus >= 0) {
         this.$set(this.formData, "classStatus", this.$route.params.classStatus);
       }

+ 37 - 5
src/views/education/classManageMent/studentInfoChange/index.vue

@@ -135,12 +135,15 @@ export default {
         if (this.$route.params.educationId) {
           this.formData.educationId = this.$route.params.educationId || "";
         } else {
-          this.formData.educationId = val[0].id;
+          this.moRenBus();
+          // this.formData.educationId = val[0].id;
         }
       }
     },
     "formData.educationId"(val) {
-      this.formData.businessId = "";
+      if (!this.firstComeIn) {
+        this.formData.businessId = "";
+      }
       this.getBusinessList(val);
     },
   },
@@ -154,11 +157,41 @@ export default {
       if (this.$route.params.educationId) {
         this.formData.educationId = this.$route.params.educationId || "";
       } else {
-        this.formData.educationId = this.educationType[0].id;
+        this.moRenBus();
+        // this.formData.educationId = this.educationType[0].id;
       }
     }
   },
   methods: {
+    /**
+     * 默认选择继教二建业务层次
+     */
+    moRenBus() {
+      return new Promise((resolve, reject) => {
+        this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
+          for (let i = 0; i < res.rows.length; i++) {
+            if (res.rows[i].educationName === "继续教育") {
+              this.$api
+                .inquirebusinessList({ status: 1, educationId: res.rows[i].id })
+                .then((result) => {
+                  for (let j = 0; j < result.rows.length; j++) {
+                    if (
+                      result.rows[j].projectName === "建造师" &&
+                      result.rows[j].businessName === "二级"
+                    ) {
+                      this.$set(this.formData, "educationId", res.rows[i].id);
+                      this.$set(this.formData, "businessId", result.rows[j].id);
+                      resolve();
+                      break;
+                    }
+                  }
+                });
+              break;
+            }
+          }
+        });
+      });
+    },
     getBusinessList(v) {
       this.$api
         .inquirebusinessList({ status: 1, educationId: v })
@@ -168,8 +201,6 @@ export default {
             this.firstComeIn = false;
             if (this.$route.params.businessId) {
               this.formData.businessId = this.$route.params.businessId;
-            } else {
-              this.formData.businessId = res.rows[0].id;
             }
             this.search();
           }
@@ -182,6 +213,7 @@ export default {
           params: {
             educationId: this.formData.educationId,
             businessId: this.formData.businessId,
+            userId: row.userId,
           },
         });
       };

+ 44 - 16
src/views/education/classManageMent/studentPushData/index.vue

@@ -190,33 +190,62 @@ export default {
             this.$route.params.educationId
           );
         } else {
-          this.formData.educationId = val[0].id;
+          this.moRenBus();
+          // this.formData.educationId = val[0].id;
         }
       }
     },
     "formData.educationId"(val) {
-      this.formData.businessId = "";
+      if (!this.firstComeIn) {
+        this.formData.businessId = "";
+      }
       this.getBusinessList(val);
     },
   },
   computed: { ...mapGetters(["educationType"]) },
   mounted() {
     if (this.$route.params.educationId) {
-      this.$set(
-        this.formData,
-        "educationId",
-        this.$route.params.educationId
-      );
+      this.$set(this.formData, "educationId", this.$route.params.educationId);
     }
     if (
       !this.formData.educationId &&
       this.educationType &&
       this.educationType.length
     ) {
-      this.formData.educationId = this.educationType[0].id;
+      this.moRenBus();
+      // this.formData.educationId = this.educationType[0].id;
     }
   },
   methods: {
+    /**
+     * 默认选择继教二建业务层次
+     */
+    moRenBus() {
+      return new Promise((resolve, reject) => {
+        this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
+          for (let i = 0; i < res.rows.length; i++) {
+            if (res.rows[i].educationName === "继续教育") {
+              this.$api
+                .inquirebusinessList({ status: 1, educationId: res.rows[i].id })
+                .then((result) => {
+                  for (let j = 0; j < result.rows.length; j++) {
+                    if (
+                      result.rows[j].projectName === "建造师" &&
+                      result.rows[j].businessName === "二级"
+                    ) {
+                      this.$set(this.formData, "educationId", res.rows[i].id);
+                      this.$set(this.formData, "businessId", result.rows[j].id);
+                      resolve();
+                      break;
+                    }
+                  }
+                });
+              break;
+            }
+          }
+        });
+      });
+    },
     getBusinessList(v) {
       this.$api
         .inquirebusinessList({ status: 1, educationId: v })
@@ -230,32 +259,31 @@ export default {
                 "businessId",
                 this.$route.params.businessId
               );
-            } else {
-              this.formData.businessId = res.rows[0].id;
             }
             this.search();
           }
         });
     },
     jumpClass(row) {
+      // 学员管理
       const jump = () => {
         this.$router.push({
-          name: "ClassList",
-          params: {
-            educationId: this.formData.educationId,
-            businessId: this.formData.businessId,
+          path: "studentMenu",
+          query: {
+            id: row.gradeId,
+            goodsId: row.goodsList[0].goodsId,
           },
         });
       };
       const statusPage = this.$store.state.tagsView.visitedViews.some(
         (item) => {
-          return item.name == "ClassList";
+          return item.name == "StudentMenu";
         }
       );
       if (statusPage) {
         this.$store
           .dispatch("tagsView/delCachedView", {
-            name: "ClassList",
+            name: "StudentMenu",
           })
           .then((res) => {
             jump();

+ 1 - 1
src/views/education/examManagement/applicationData/byTrainee.vue

@@ -973,7 +973,7 @@ export default {
         });
         //便利table数组,找到符合本行数据,赋值
         this.tableData.forEach((item, index) => {
-          if (row.goodsId === item.goodsId) {
+          if (row.orderGoodsId === item.orderGoodsId) {
             item.children = result;
           }
         });

+ 24 - 23
src/views/education/examManagement/qianpeiArrange/index.vue

@@ -297,26 +297,17 @@
             <span>{{ $methodsTools.onlyForma(infoData.beforeEndTime) }}</span>
           </el-form-item>
           <el-button type="info" style="margin-bottom: 20px" size="mini"
-            >适用商品</el-button
+            >适用考试计划</el-button
           >
-          <el-form-item label="商品类型:">
-            <span v-for="(item, index) in $methodsTools.getGoodsType()" :key="index">{{
-              item.value === infoData.goodsType ? item.label : ""
-            }}</span>
-          </el-form-item>
-          <el-form-item label="业务层级:">
-            <span
-              >{{ infoData.educationName }}-{{ infoData.projectName }}-{{
-                infoData.businessName
-              }}</span
-            >
-          </el-form-item>
-          <el-form-item label="适用商品:">
-            <div v-for="(item, index) in infoData.examNumberGoods" :key="index">
-              {{ index + 1 }}.{{ item.code }}-{{ item.goodsName }}-<span
-                style="color: #f56c6c"
-                >¥{{ item.standPrice }}</span
-              >
+          <el-form-item label="考试计划:">
+            <div v-for="(item, index) in infoData.list" :key="index">
+              {{ index + 1 }}.{{ item.applyName }} (<span
+                v-if="item.applyStatus.includes('1')"
+                >非补考学员、</span
+              ><span v-if="item.applyStatus.includes('2')">补考学员、</span
+              >{{ $methodsTools.onlyForma(item.applyStartTime) }} - {{
+                $methodsTools.onlyForma(item.applyEndTime)
+              }})
             </div>
           </el-form-item>
         </el-form>
@@ -326,7 +317,10 @@
       </span>
     </el-dialog>
     <ass-exam-plan ref="assExamPlan" @backData="backData" />
-    <all-associated-exam-plans ref="allAssociatedExamPlans" @backData="backData" />
+    <all-associated-exam-plans
+      ref="allAssociatedExamPlans"
+      @backData="backData"
+    />
   </div>
 </template>
 
@@ -477,7 +471,9 @@ export default {
       listDataGoods: {},
       radioApi: [],
       dialoginfoWatch: false,
-      infoData: {},
+      infoData: {
+        list: [],
+      },
     };
   },
   mounted() {
@@ -658,8 +654,13 @@ export default {
     },
     watchs(v) {
       this.$api.obtainsystembefore(v.beforeId).then((res) => {
-        this.infoData = res.data;
-        this.dialoginfoWatch = true;
+        this.$api
+          .inquireexamapplyList({ beforeId: v.beforeId })
+          .then((result) => {
+            res.data.list = result.rows;
+            this.infoData = res.data;
+            this.dialoginfoWatch = true;
+          });
       });
     },
     del(v, int) {

+ 14 - 3
src/views/education/mockTestManagement/mockExamArrangement/addMockExam/index.vue

@@ -141,7 +141,11 @@
     </el-form>
     <div style="text-align: center; max-width: 500px">
       <el-button size="small" @click="backPage">取消</el-button>
-      <el-button size="small" type="primary" @click="validateForm('listData')"
+      <el-button
+        size="small"
+        type="primary"
+        @click="validateForm('listData')"
+        :loading="disabledBtn"
         >确定</el-button
       >
     </div>
@@ -156,6 +160,7 @@ export default {
   components: { infoPage },
   data() {
     return {
+      disabledBtn: false,
       maxWidth: 360,
       listData: {
         applyUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
@@ -235,6 +240,7 @@ export default {
      * 规则检验
      */
     valCheckFunc() {
+      this.disabledBtn = true;
       return new Promise((resolve, reject) => {
         if (this.$refs.infoPage.infoData.length <= 0) {
           reject("至少添加1个专业");
@@ -284,7 +290,7 @@ export default {
           data.mockMajorList = JSON.parse(
             JSON.stringify(this.$refs.infoPage.infoData)
           );
-          var array = []
+          var array = [];
           data.mockMajorList.forEach((item) => {
             item.mockMajorSubjectList.forEach((items) => {
               items.mockMajorSubjectTimeList.forEach((itemTime) => {
@@ -304,6 +310,7 @@ export default {
           });
           if (data.timeArray[1] >= array[0]) {
             this.$message.error("预约时间需要不得超过考试时间,请重新设置");
+            this.disabledBtn = false;
             return;
           }
           for (let i = 0; i < this.newCourTypeOptions.length; i++) {
@@ -330,12 +337,16 @@ export default {
                   this.$router.push({
                     path: "mockExamArrangement",
                   });
+                })
+                .catch(() => {
+                  this.disabledBtn = false;
                 });
             }, 300);
           });
         })
         .catch((err) => {
-          this.$message.error(err.toString().replace('Error:',''))
+          this.$message.error(err.toString().replace("Error:", ""));
+          this.disabledBtn = false;
         });
     },
     //返回

+ 16 - 5
src/views/education/mockTestManagement/mockExamArrangement/editMockExam/index.vue

@@ -141,7 +141,11 @@
     </el-form>
     <div style="text-align: center; max-width: 500px">
       <el-button size="small" @click="backPage">取消</el-button>
-      <el-button size="small" type="primary" @click="validateForm('listData')"
+      <el-button
+        size="small"
+        type="primary"
+        @click="validateForm('listData')"
+        :disabled="disabledBtn"
         >确定</el-button
       >
     </div>
@@ -156,6 +160,7 @@ export default {
   components: { infoPage },
   data() {
     return {
+      disabledBtn: false,
       maxWidth: 360,
       listData: {
         applyUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
@@ -273,6 +278,7 @@ export default {
      * 规则检验
      */
     valCheckFunc() {
+      this.disabledBtn = true;
       return new Promise((resolve, reject) => {
         if (this.$refs.infoPage.infoData.length <= 0) {
           reject("至少添加1个专业");
@@ -340,9 +346,10 @@ export default {
           array.sort((a, b) => {
             return a - b;
           });
-          if(data.timeArray[1] >= array[0]){
-            this.$message.error("预约时间需要不得超过考试时间,请重新设置")
-            return
+          if (data.timeArray[1] >= array[0]) {
+            this.$message.error("预约时间需要不得超过考试时间,请重新设置");
+            this.disabledBtn = false;
+            return;
           }
           for (let i = 0; i < this.newCourTypeOptions.length; i++) {
             if (data.businessId === this.newCourTypeOptions[i].id) {
@@ -368,12 +375,16 @@ export default {
                   this.$router.push({
                     path: "mockExamArrangement",
                   });
+                })
+                .catch(() => {
+                  this.disabledBtn = false;
                 });
             }, 300);
           });
         })
         .catch((err) => {
-          this.$message.error(err.toString().replace('Error:',''))
+          this.$message.error(err.toString().replace("Error:", ""));
+          this.disabledBtn = false;
         });
     },
     /**