lsc 8 hónapja
szülő
commit
e9fa9bae63

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 581 - 172
src/components/pages/test/check/index.vue


+ 39 - 6
src/components/pages/testPerson/info/infoDialog/index.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog title="编辑个人信息" :visible.sync="dialogVisibleInfo" :append-to-body="true" width="500px"
-    :before-close="handleClose" class="dialog_diy">
+    :before-close="handleClose" class="dialog_diy" :show-close="isClosed">
     <div style="width:100%;height: 100%;">
       <div class="info_box">
         <div class="img" v-loading="imgLoading">
@@ -21,7 +21,7 @@
           </el-select>
         </div> -->
 
-        <div class="info_span" v-for="item in teaType" :key="item.id">
+        <div class="info_span" v-for="item in teaType" :key="item.id" :class="{ 'error-text': !item.value.length, 'error-border': !item.value.length }">
           <span>
             {{ item.name + ":" }}
           </span>
@@ -48,7 +48,7 @@
     </div>
     <span slot="footer" class="dialog-footer">
       <el-button type="primary" @click="confirm()">确 认</el-button>
-      <el-button @click="close()">关 闭</el-button>
+      <el-button @click="close()" v-if="isClosed">关 闭</el-button>
     </span>
   </el-dialog>
 </template>
@@ -105,12 +105,13 @@ export default {
       typeId2: "",
       formLabelWidth: "100px",
       oidArray: ["d67940a5-510c-40ea-9c9a-2631ab03013a"],
-      resultInfo: '' // 用于存储字符串
+      resultInfo: '', // 用于存储字符串
+      isClosed: true,
     };
   },
   mounted() {
     this.$nextTick();
-
+    this.getTypeInfo();
   },
   methods: {
     cha(rows) {
@@ -170,6 +171,10 @@ export default {
 
     },
     confirm() {
+      if(!this.panData()){
+        this.$message.error('请完善教研室分类信息');
+        return;
+      }
       if (!this.info.username) {
         this.$message.error("姓名不能为空!");
         return
@@ -215,20 +220,40 @@ export default {
           }
           this.info.teacherOffice = this.arrayToArray(this.info.cclassid.split(','), array)
           console.log(this.info.cclassid);
-          
+          let count = 0
           this.teaType.forEach(e =>{
             let array2 = []
             for (var i = 0; i < e.child.length; i++) {
               array2.push(e.child[i].id)
             }
             e.value = this.arrayToArray(this.info.cclassid.split(','), array2)
+            if(e.value.length){
+              count++
+            }
           })
+          if(count != this.teaType.length){
+            this.$emit("update:dialogVisibleInfo", true);
+          }
+          if(!this.panData()){
+            this.isClosed = false
+          }else {
+            this.isClosed = true
+          }
           this.$forceUpdate();
         })
         .catch((err) => {
           console.error(err);
         });
     },
+    panData(){
+      let count = 0
+      this.teaType.forEach(e =>{
+        if(e.value.length){
+          count++
+        }
+      })
+      return count == this.teaType.length
+    },
     arrayToArray(arrayo, arrayt) {
       let array1 = arrayo;
       let array2 = arrayt;
@@ -499,4 +524,12 @@ export default {
 .info_span>div {
     width: 250px;
 }
+
+.error-border >>> .el-input__inner {
+  border: 1px solid red; /* 红色边框 */
+}
+
+.error-text {
+  color: red; /* 红色文字 */
+}
 </style>

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott