gangyj 2 rokov pred
rodič
commit
86c9b9c14a
1 zmenil súbory, kde vykonal 22 pridanie a 23 odobranie
  1. 22 23
      src/views/manager/wbsinfo/edit.vue

+ 22 - 23
src/views/manager/wbsinfo/edit.vue

@@ -754,7 +754,6 @@
                 v-model="scope.row.eLength"
                 size="small"
                 placeholder="请输入内容"
-                :disabled="scope.row.eType == 4"
               ></el-input>
             </template>
           </el-table-column>
@@ -1018,7 +1017,6 @@
               v-model="scope.row.eLength"
               size="small"
               placeholder="请输入内容"
-              :disabled="scope.row.eType == 4"
             ></el-input>
           </template>
         </el-table-column>
@@ -1536,13 +1534,13 @@ export default {
 
       //数据类型的默认长度
       dataTypeDefaultMap: {
-        1: 255,//字符串
-        2: 20,//整数
-        3: 20,//小数
-        4: 0,//日期
-        5: 20,//数值
-        6: 255,//签名
-        7: 255,//文件
+        1: 250,//字符串
+        2: 50,//整数
+        3: 50,//小数
+        4: 50,//日期
+        5: 50,//数值
+        6: 50,//签名
+        7: 100,//文件
       },
 
       defaultExpandedKeys:[],
@@ -1830,7 +1828,7 @@ export default {
               });
               return;
             }
-            if (this.eleForm.elementList[i].eType != 4 && !this.eleForm.elementList[i].eLength) {
+            if ( !this.eleForm.elementList[i].eLength) {
               this.$message({
                 type: "warning",
                 message: "请填写第" + (i + 1) + "条长度"
@@ -1840,10 +1838,10 @@ export default {
           }
           this.eleForm.elementList.forEach((element) => {
             element.eAllowDeviation = (element.allow ? element.allow : '') + (element.deviation ? element.deviation : '');
-            if (element.eType == 4) {
-              this.$set(element, 'eLength', 0);
-              //element.eLength = 0;
-            }
+            // if (element.eType == 4) {
+            //   this.$set(element, 'eLength', 0);
+            //   //element.eLength = 0;
+            // }
           })
           saveFormAndElement(this.eleForm).then(() => {
             //console.log(res)
@@ -1946,10 +1944,11 @@ export default {
       row.eAllowDeviation = (row.allow ? row.allow : '') + (row.deviation ? row.deviation : '');
       row.fId = this.curEleTable.id;
       row.initTableName = this.curEleTable.initTableName;
-      if (row.eType == 4) {
-        this.$set(row, 'eLength', 0);
-        //row.eLength = 0;
-      } else if (!row.eLength) {
+      // if (row.eType == 4) {
+      //   this.$set(row, 'eLength', 0);
+      //   //row.eLength = 0;
+      // } else 
+      if (!row.eLength) {
         this.$message({
           type: "warning",
           message: "请填写长度"
@@ -2009,7 +2008,7 @@ export default {
           });
           return;
         }
-        if (this.editEleList[i].eType != 4 && !this.editEleList[i].eLength) {
+        if ( !this.editEleList[i].eLength) {
           this.$message({
             type: "warning",
             message: "请填写第" + (i + 1) + "条长度"
@@ -2020,10 +2019,10 @@ export default {
       if (this.editEleList.length > 0) {
         this.editEleList.forEach((element) => {
           element.eAllowDeviation = (element.allow ? element.allow : '') + (element.deviation ? element.deviation : '');
-          if (element.eType == 4) {
-            this.$set(element, 'eLength', 0);
-            //element.eLength = 0;
-          }
+          // if (element.eType == 4) {
+          //   this.$set(element, 'eLength', 0);
+          //   //element.eLength = 0;
+          // }
         })
         updateBatchElements(this.editEleList, this.curEleTable.initTableName).then(() => {
           this.editEleVisible = false;