|
|
|
@ -6,6 +6,7 @@
|
|
|
|
|
:visible.sync="rulesDialogshow"
|
|
|
|
|
width="520px"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
@close="hide"
|
|
|
|
|
>
|
|
|
|
|
<el-form
|
|
|
|
|
label-position="left"
|
|
|
|
@ -31,7 +32,7 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="比较器:" prop="compareVal">
|
|
|
|
|
<el-select v-model="formInfo.compareVal" disabled>
|
|
|
|
|
<el-select v-model="formInfo.compareVal" @change="changecomVal">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in compareOptions"
|
|
|
|
|
:key="item.type"
|
|
|
|
@ -220,18 +221,25 @@ export default {
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
changecomVal() {
|
|
|
|
|
this.getOperator();
|
|
|
|
|
},
|
|
|
|
|
//获取比较符
|
|
|
|
|
getOperator() {
|
|
|
|
|
listOperatorApi({ name: this.formInfo.compareVal })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.operatorValOptions = Object.keys(res.data).map((key) => ({
|
|
|
|
|
value: key, // 值(键)
|
|
|
|
|
label: res.data[key], // 标签(显示的值)
|
|
|
|
|
}));
|
|
|
|
|
console.log(this.operatorValOptions);
|
|
|
|
|
if (this.formInfo.operatorVal == "") {
|
|
|
|
|
this.formInfo.operatorVal = this.operatorValOptions[0].value;
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.operatorValOptions = Object.keys(res.data).map((key) => ({
|
|
|
|
|
value: key, // 值(键)
|
|
|
|
|
label: res.data[key], // 标签(显示的值)
|
|
|
|
|
}));
|
|
|
|
|
console.log(this.operatorValOptions);
|
|
|
|
|
if (this.formInfo.operatorVal == "") {
|
|
|
|
|
this.formInfo.operatorVal = this.operatorValOptions[0].value;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.formInfo.operatorVal = "";
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|