浏览代码

提交修改

xiezhiming 3 年之前
父节点
当前提交
65cb7157eb
共有 2 个文件被更改,包括 21 次插入5 次删除
  1. 13 4
      src/components/knowledgeExtra/AddNewRule.vue
  2. 8 1
      src/components/knowledgeExtra/AddNewRuleTable.vue

+ 13 - 4
src/components/knowledgeExtra/AddNewRule.vue

@@ -402,9 +402,9 @@ export default {
 			  let itemCopy={}
 			  let itemCopy={}
 			  this.form.klRuleByIdGroup.forEach((item,index)=>{
 			  this.form.klRuleByIdGroup.forEach((item,index)=>{
 					if(Array.isArray(item.klRuleStaticSub)){
 					if(Array.isArray(item.klRuleStaticSub)){
+						this.$set(this.form.klRuleByIdSub[index],'ruleStatic',[])
+						this.$set(this.form.klRuleByIdSub[index],'ruleStaticList',[])
 						item.klRuleStaticSub.forEach((items,ind)=>{
 						item.klRuleStaticSub.forEach((items,ind)=>{
-							this.$set(this.form.klRuleByIdSub[index],'ruleStatic',[])
-							this.$set(this.form.klRuleByIdSub[index],'ruleStaticList',[])
 							let obj={
 							let obj={
 								id:items.conceptId,
 								id:items.conceptId,
 								name:items.name
 								name:items.name
@@ -708,7 +708,6 @@ export default {
 									this.isRedMsg.push(false)
 									this.isRedMsg.push(false)
 								}else{
 								}else{
 									this.isRedMsg.push(true)
 									this.isRedMsg.push(true)
-									return
 								}
 								}
 							}
 							}
 						})
 						})
@@ -716,7 +715,17 @@ export default {
 				})
 				})
 			}
 			}
 		}
 		}
-        this.saveRule(paramsCopy);
+		if(this.isStatic&&this.isRedMsg.length>0){
+			this.isRedMsg.forEach(item=>{
+				if(item){
+					return
+				}else{
+					this.saveRule(paramsCopy);
+				}
+			})
+		}else{
+			this.saveRule(paramsCopy);
+		}
         } else {
         } else {
           return false;
           return false;
         }
         }

+ 8 - 1
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -11,6 +11,13 @@
 	  font-size: 12px;
 	  font-size: 12px;
 	  margin-bottom: 10px;
 	  margin-bottom: 10px;
   }
   }
+  .inp_gl{
+  	  /deep/.el-select__tags-text {
+  	      overflow: hidden;
+  	      text-overflow: ellipsis;
+  	      max-width: 82px !important;
+  	  }
+  }
   .searchStatic{
   .searchStatic{
 	  /deep/.el-select__tags{
 	  /deep/.el-select__tags{
 		   max-width: 210px !important;
 		   max-width: 210px !important;
@@ -217,7 +224,7 @@
 	    </template>
 	    </template>
 	    <template slot-scope="scope">
 	    <template slot-scope="scope">
 	     <el-form-item
 	     <el-form-item
-	        class="inp_box"
+	        class="inp_box inp_gl"
 	        :prop="`klRuleByIdSub[${scope.$index}].ruleStatic`"
 	        :prop="`klRuleByIdSub[${scope.$index}].ruleStatic`"
 			:class="(!isRedMsg[scope.$index])?'':'redMsg'"
 			:class="(!isRedMsg[scope.$index])?'':'redMsg'"
 	      >
 	      >