|
@@ -315,7 +315,7 @@
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
subMaxOperator(scope, rule, value, callback);
|
|
subMaxOperator(scope, rule, value, callback);
|
|
},
|
|
},
|
|
- trigger: ['blur']
|
|
|
|
|
|
+ trigger: ['change']
|
|
}
|
|
}
|
|
]"
|
|
]"
|
|
>
|
|
>
|
|
@@ -323,6 +323,7 @@
|
|
v-model="scope.row.subMaxOperator"
|
|
v-model="scope.row.subMaxOperator"
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
clearable
|
|
clearable
|
|
|
|
+ @change="maxChange($event, scope.$index, 's')"
|
|
:ref="`klRuleByIdSub[${scope.$index}].subMaxOperator`"
|
|
:ref="`klRuleByIdSub[${scope.$index}].subMaxOperator`"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
@@ -343,12 +344,14 @@
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
subMaxValue(scope, rule, value, callback);
|
|
subMaxValue(scope, rule, value, callback);
|
|
},
|
|
},
|
|
- trigger: ['blur']
|
|
|
|
|
|
+ trigger: ['change']
|
|
}
|
|
}
|
|
]"
|
|
]"
|
|
>
|
|
>
|
|
<el-input
|
|
<el-input
|
|
type="text"
|
|
type="text"
|
|
|
|
+ @input="maxChange($event, scope.$index, 'i')"
|
|
|
|
+ :ref="`klRuleByIdSub[${scope.$index}].subMaxValue`"
|
|
v-model="scope.row.subMaxValue"
|
|
v-model="scope.row.subMaxValue"
|
|
placeholder="填写数值"
|
|
placeholder="填写数值"
|
|
/>
|
|
/>
|
|
@@ -384,7 +387,7 @@
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
subMinOperatorRule(scope, rule, value, callback);
|
|
subMinOperatorRule(scope, rule, value, callback);
|
|
},
|
|
},
|
|
- trigger: ['blur']
|
|
|
|
|
|
+ trigger: ['change']
|
|
}
|
|
}
|
|
]"
|
|
]"
|
|
>
|
|
>
|
|
@@ -393,6 +396,7 @@
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
clearable
|
|
clearable
|
|
:ref="`klRuleByIdSub[${scope.$index}].subMinOperator`"
|
|
:ref="`klRuleByIdSub[${scope.$index}].subMinOperator`"
|
|
|
|
+ @change="minChange($event, scope.$index, 's')"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in operMinList"
|
|
v-for="item in operMinList"
|
|
@@ -412,12 +416,14 @@
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
subMinValueRule(scope, rule, value, callback);
|
|
subMinValueRule(scope, rule, value, callback);
|
|
},
|
|
},
|
|
- trigger: ['blur']
|
|
|
|
|
|
+ trigger: ['change']
|
|
}
|
|
}
|
|
]"
|
|
]"
|
|
>
|
|
>
|
|
<el-input
|
|
<el-input
|
|
type="text"
|
|
type="text"
|
|
|
|
+ :ref="`klRuleByIdSub[${scope.$index}].subMinValue`"
|
|
|
|
+ @input="minChange($event, scope.$index, 'i')"
|
|
v-model="scope.row.subMinValue"
|
|
v-model="scope.row.subMinValue"
|
|
placeholder="填写数值"
|
|
placeholder="填写数值"
|
|
/>
|
|
/>
|
|
@@ -523,6 +529,52 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ maxChange(e, val, type) {
|
|
|
|
+ console.log(e);
|
|
|
|
+ // this.$refs[`klRuleByIdSub[0].subMinValue`].clearValidate()
|
|
|
|
+ if (
|
|
|
|
+ type === "i" &&
|
|
|
|
+ this.klRuleByIdSub[val].subMaxOperator &&
|
|
|
|
+ this.klRuleByIdSub[val].subMaxOperator != ""
|
|
|
|
+ ) {
|
|
|
|
+ this.$emit("clearValidate", [
|
|
|
|
+ `klRuleByIdSub[${val}].subMinValue`,
|
|
|
|
+ `klRuleByIdSub[${val}].subMinOperator`
|
|
|
|
+ ]);
|
|
|
|
+ } else if (
|
|
|
|
+ type === "s" &&
|
|
|
|
+ this.klRuleByIdSub[val].subMaxValue &&
|
|
|
|
+ this.klRuleByIdSub[val].subMaxValue != ""
|
|
|
|
+ ) {
|
|
|
|
+ this.$emit("clearValidate", [
|
|
|
|
+ `klRuleByIdSub[${val}].subMinValue`,
|
|
|
|
+ `klRuleByIdSub[${val}].subMinOperator`
|
|
|
|
+ ]);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ minChange(e, val, type) {
|
|
|
|
+ console.log(e);
|
|
|
|
+ // this.$refs[`klRuleByIdSub[0].subMinValue`].clearValidate()
|
|
|
|
+ if (
|
|
|
|
+ type === "i" &&
|
|
|
|
+ this.klRuleByIdSub[val].subMinOperator &&
|
|
|
|
+ this.klRuleByIdSub[val].subMinOperator != ""
|
|
|
|
+ ) {
|
|
|
|
+ this.$emit("clearValidate", [
|
|
|
|
+ `klRuleByIdSub[${val}].subMaxOperator`,
|
|
|
|
+ `klRuleByIdSub[${val}].subMaxValue`
|
|
|
|
+ ]);
|
|
|
|
+ } else if (
|
|
|
|
+ type === "s" &&
|
|
|
|
+ this.klRuleByIdSub[val].subMinValue &&
|
|
|
|
+ this.klRuleByIdSub[val].subMinValue != ""
|
|
|
|
+ ) {
|
|
|
|
+ this.$emit("clearValidate", [
|
|
|
|
+ `klRuleByIdSub[${val}].subMaxOperator`,
|
|
|
|
+ `klRuleByIdSub[${val}].subMaxValue`
|
|
|
|
+ ]);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
addGroup(scope) {
|
|
addGroup(scope) {
|
|
this.$emit("addGroup", null, { groupId: scope.row.groupId });
|
|
this.$emit("addGroup", null, { groupId: scope.row.groupId });
|
|
this.$refs.table.bodyWrapper.scrollLeft = 0;
|
|
this.$refs.table.bodyWrapper.scrollLeft = 0;
|
|
@@ -635,7 +687,6 @@ export default {
|
|
clearNumText(index) {
|
|
clearNumText(index) {
|
|
let obj = JSON.parse(JSON.stringify(this.klRuleByIdSub));
|
|
let obj = JSON.parse(JSON.stringify(this.klRuleByIdSub));
|
|
|
|
|
|
-
|
|
|
|
obj[index].subMaxOperator = "";
|
|
obj[index].subMaxOperator = "";
|
|
obj[index].subMaxValue = "";
|
|
obj[index].subMaxValue = "";
|
|
obj[index].subMaxUnit = "";
|
|
obj[index].subMaxUnit = "";
|
|
@@ -646,7 +697,7 @@ export default {
|
|
// this.$set(obj[index], "subEqValue", "");
|
|
// this.$set(obj[index], "subEqValue", "");
|
|
obj[index].subEqOperator = "";
|
|
obj[index].subEqOperator = "";
|
|
// this.klRuleByIdSub = obj;
|
|
// this.klRuleByIdSub = obj;
|
|
- this.$emit('editKlRuleByIdSub',obj)
|
|
|
|
|
|
+ this.$emit("editKlRuleByIdSub", obj);
|
|
},
|
|
},
|
|
//医学标准术语change
|
|
//医学标准术语change
|
|
subConceptIdfocus(index) {
|
|
subConceptIdfocus(index) {
|
|
@@ -675,7 +726,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
dataTypeChange(val, index) {
|
|
dataTypeChange(val, index) {
|
|
- console.log(val,index);
|
|
|
|
|
|
+ console.log(val, index);
|
|
this.klRuleByIdSub[index].subEqOperator = val === "2" ? "=" : "";
|
|
this.klRuleByIdSub[index].subEqOperator = val === "2" ? "=" : "";
|
|
this.clearNumText(index);
|
|
this.clearNumText(index);
|
|
// TODO 新增的内容追踪不到
|
|
// TODO 新增的内容追踪不到
|