汪钰 3 лет назад
Родитель
Сommit
b58f7b8060
2 измененных файлов с 20 добавлено и 12502 удалено
  1. 1 12500
      package-lock.json
  2. 19 2
      src/views/system/dictionary/components/dict-edit.vue

Разница между файлами не показана из-за своего большого размера
+ 1 - 12500
package-lock.json


+ 19 - 2
src/views/system/dictionary/components/dict-edit.vue

@@ -120,10 +120,13 @@
       style="width: 100%"
       style="width: 100%"
       @selection-change="handleSelectionChange"
       @selection-change="handleSelectionChange"
     >
     >
-      <el-table-column type="selection" align="center"> </el-table-column>
       <el-table-column prop="code" label="字典项编码">
       <el-table-column prop="code" label="字典项编码">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-input v-model="scope.row.code" placeholder=""></el-input>
+          <el-input
+            @blur="checkedValue(scope.row.code)"
+            v-model="scope.row.code"
+            placeholder=""
+          ></el-input>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column prop="name" label="字典项名称">
       <el-table-column prop="name" label="字典项名称">
@@ -337,6 +340,10 @@
         });
         });
         this.filterArr();
         this.filterArr();
       },
       },
+      //
+      checkedValue(val) {
+        console.log(val);
+      },
       removeArr(row) {
       removeArr(row) {
         console.log(row);
         console.log(row);
         let falg = this.form.dictStaticSubmitPOList[row.$index].deleted === 0;
         let falg = this.form.dictStaticSubmitPOList[row.$index].deleted === 0;
@@ -355,6 +362,16 @@
           if (!valid) {
           if (!valid) {
             return false;
             return false;
           }
           }
+          let falg = this.form.dictStaticSubmitPOList.some(
+            (item, index) => item.code.length === 0
+          );
+          if (falg) {
+            this.$message({
+              message: '字典项编码不能为空',
+              type: 'warning'
+            });
+            return;
+          }
           this.loading = true;
           this.loading = true;
           const saveOrUpdate = this.isUpdate ? updateDictionary : addDictionary;
           const saveOrUpdate = this.isUpdate ? updateDictionary : addDictionary;
           saveOrUpdate(this.form)
           saveOrUpdate(this.form)

Некоторые файлы не были показаны из-за большого количества измененных файлов