Browse Source

取消限制只能配置一个默认信息

duy 1 year ago
parent
commit
e356779d6f

+ 13 - 13
src/views/manager/projectinfo/treeTemplate/template/editDefault.vue

@@ -98,16 +98,16 @@ export default {
         return;
       }
       //一个字段只能配置一个默认信息
-let isCan=true
-this.setsignaTable.forEach(element => {
-    if (isCan) {
-        // 如果满足条件,执行相应的操作,并将条件修改为 false
-        if (element.colKey===this.htmlData1.keyname) {  // 这里 someConditionMet 是你的条件判断函数
-            isCan = false;
-        }
-    }
-});
-if(isCan){
+// let isCan=true
+// this.setsignaTable.forEach(element => {
+//     if (isCan) {
+//         // 如果满足条件,执行相应的操作,并将条件修改为 false
+//         if (element.colKey===this.htmlData1.keyname) {  // 这里 someConditionMet 是你的条件判断函数
+//             isCan = false;
+//         }
+//     }
+// });
+// if(isCan){
     const {data: res} = await saveDdefual({
         trIndex: this.htmlData1.tr,
         tdIndex: this.htmlData1.td,
@@ -123,9 +123,9 @@ if(isCan){
         });
         this.$parent.copss();
       }
-}else{
-  this.$message.warning('一个字段只能配置一个默认信息')
-}
+// }else{
+//   this.$message.warning('一个字段只能配置一个默认信息')
+// }
     
     },
     async deleteTableSig (ids) {//删除数据

+ 15 - 13
src/views/manager/projectinfo/treeTemplate/template/promptSettings.vue

@@ -103,16 +103,17 @@ export default {
       }
 
 
-      let isCan=true
-      this.setsignaTable.forEach(element => {
-          if (isCan) {
-              // 如果满足条件,执行相应的操作,并将条件修改为 false
-              if (element.colKey===this.htmlData1.keyname) {  // 这里 someConditionMet 是你的条件判断函数
-                  isCan = false;
-              }
-          }
-      });
-      if(isCan){
+      // let isCan=true
+      // this.setsignaTable.forEach(element => {
+      //     if (isCan) {
+      //         // 如果满足条件,执行相应的操作,并将条件修改为 false
+      //         if (element.colKey===this.htmlData1.keyname) {  // 这里 someConditionMet 是你的条件判断函数
+      //             isCan = false;
+      //         }
+      //     }
+      // });
+      // if(isCan){
+
         const {data: res} = await saveDdefual({
           trIndex: this.htmlData1.tr,
           tdIndex: this.htmlData1.td,
@@ -128,9 +129,10 @@ export default {
           });
           this.$parent.getExcelHtml(this.pkeyId1);
         }
-      }else{
-        this.$message.warning('一个字段只能配置一个提示信息')
-      }
+      // }
+      // else{
+      //   this.$message.warning('一个字段只能配置一个提示信息')
+      // }
  
     },
     async deleteTableSig(ids) {//删除数据