Quellcode durchsuchen

fiex:前培账号标记修复

Tang vor 3 Jahren
Ursprung
Commit
456640368a

+ 25 - 42
src/views/education/examManagement/applicationData/formerAccount/index.vue

@@ -108,20 +108,6 @@
           </li>
           <div style="clear: both"></div>
         </ul>
-        <el-select
-          size="small"
-          v-model="plan"
-          placeholder="请选择前培计划"
-          style="margin-bottom: 12px"
-        >
-          <el-option
-            v-for="item in optionsList"
-            :key="item.beforeId"
-            :label="item.beforeName"
-            :value="item.beforeId"
-          >
-          </el-option>
-        </el-select>
         <p style="margin: 0px">所选学员的前培账号标记为【已开通】吗?</p>
         <div style="text-align: center; margin-top: 12px">
           <el-radio-group v-model="beforeStatus">
@@ -150,7 +136,6 @@ export default {
     return {
       dialogPLS: false,
       size: "small",
-      plan: "",
       beforeStatus: "",
       loading: false, //当前表单加载是否加载动画
       navText: {
@@ -172,15 +157,24 @@ export default {
       //搜索
       formList: [
         {
-          prop: "applyId",
-          placeholder: "考试标题",
-          scope: "examList",
+          prop: "beforeId",
+          placeholder: "前培计划",
+          scope: "beforeList",
         },
         {
-          prop: "applySiteAddress",
-          placeholder: "考试地点",
-          scope: "applySiteAddress",
-          getType: 1,
+          prop: "beforeStatus",
+          placeholder: "开通状态",
+          scope: "select",
+          options: [
+            {
+              label: "已开通",
+              value: 1,
+            },
+            {
+              label: "未开通",
+              value: 0,
+            },
+          ],
         },
         {
           prop: "searchKey",
@@ -193,10 +187,11 @@ export default {
         },
       ],
       formData: {
-        applyId: "",
+        beforeId: "",
         pageSize: 10,
         pageNum: 1,
         idCards: "",
+        beforeStatus: "",
         canBefore: 1,
       },
       // 表单
@@ -360,17 +355,14 @@ export default {
       dialogQP: false,
       listData: {},
       peopleList: [],
-      optionsList: [],
     };
   },
   async mounted() {
     await this.getFirstOptions();
     this.search();
-    this.getQP();
   },
   activated() {
     this.search();
-    this.getQP();
   },
   methods: {
     /**
@@ -426,11 +418,11 @@ export default {
     getFirstOptions() {
       return new Promise((resolve, reject) => {
         this.$api
-          .inquiresystemapplyList({ status: "0,1,2", pageSize: 1, pageNum: 1 })
+          .inquiresystembefore({ status: "0,1,2", pageSize: 1, pageNum: 1 })
           .then((res) => {
             if (res.rows.length) {
-              this.copyAppid = res.rows[0].applyId;
-              this.formData.applyId = res.rows[0].applyId;
+              this.copyAppid = res.rows[0].beforeId;
+              this.formData.beforeId = res.rows[0].beforeId;
             }
             resolve();
           });
@@ -453,16 +445,11 @@ export default {
         JSON.stringify(this.$refs.tableList.allCheckData)
       );
       this.listData = {};
-      this.plan = "";
-      this.beforeStatus = "";
+      this.beforeStatus = 1;
       this.dialogQP = true;
     },
     submitChecksQP() {
       var data = JSON.parse(JSON.stringify(this.listData));
-      if (!this.plan && this.beforeStatus === 1) {
-        this.$message.warning("请选择前培计划");
-        return;
-      }
       if (!this.beforeStatus) {
         this.$message.warning("请选择是或否");
         return;
@@ -474,7 +461,7 @@ export default {
       data.subscribeId = arrays;
       if (this.beforeStatus === 1) {
         data.beforeStatus = 1;
-        data.beforeId = this.plan;
+        data.beforeId = this.formData.beforeId;
       }
       if (this.beforeStatus === 2) {
         data.beforeStatus = 0;
@@ -499,7 +486,8 @@ export default {
           pageNum: 1,
           idCards: "",
           canBefore: 1,
-          applyId: this.copyAppid,
+          beforeId: this.copyAppid,
+          beforeStatus: "",
         };
       }
       var data = JSON.parse(JSON.stringify(this.formData));
@@ -517,11 +505,6 @@ export default {
           this.loading = false;
         });
     },
-    getQP() {
-      this.$api.inquiresystembefore({ status: "0,1,2" }).then((res) => {
-        this.optionsList = res.rows;
-      });
-    },
     init() {
       this.$refs.tableList.allCheckData = [];
       this.$refs.tableList.$refs.pagerset.clearSelection();