修改触发条件

This commit is contained in:
闫晓茹 2024-06-24 15:07:49 +08:00
parent 1cff6c4d5c
commit 18230c18a0
2 changed files with 48 additions and 50 deletions

View File

@ -169,7 +169,11 @@
>
<div class="top">
<div class="toptop">
<el-select v-model="item.routeNodeName" style="width: 100px" @change="changetoday">
<el-select
v-model="item.routeNodeName"
style="width: 100px"
@change="changetoday"
>
<el-option
v-for="item in parentDictCodelist"
:key="item.dictValue"
@ -600,6 +604,19 @@
placeholder="请输入触发条件"
maxlength="100"
></el-input>
<el-select
v-if="item.dictDataType == 'SELECT'"
v-model="item.triggerConditionValue"
style="width: 300px"
>
<el-option
v-for="item in ConditionValue"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
<el-date-picker
v-if="item.dictDataType == 'DATE'"
v-model="item.triggerConditionValue"
@ -728,6 +745,7 @@ export default {
name: "specialDiseaseNode",
data() {
return {
ConditionValue: [],
dictDataType: "",
openlist: {
suitRange: "",
@ -842,6 +860,7 @@ export default {
// this.taskinfo();
});
},
//
infolistMESSAGE() {
var dictType = "redial_times";
@ -869,9 +888,7 @@ export default {
loading.close();
triggerCondition(this.openlist).then((res) => {
if (res.code == 200) {
this.$notify({
type: "success",
title: "提示",
@ -1005,9 +1022,7 @@ export default {
this.parentDictCodelist = res.rows;
});
},
changetoday(e){
console.log(e,'eeeeeeeeeeeeeooooooooooooo')
},
//
info() {
const loading = this.$loading({
@ -1143,7 +1158,6 @@ export default {
var dictType = "trigger_condition_operator";
getList(dictType, this.dictDataType).then((res) => {
console.log(res, "res");
this.optionstriggerConditionOperator = res.data;
});
},
@ -1158,19 +1172,13 @@ export default {
).dictLabel;
this.openlist.triggerConditionList[index].triggerConditionValue = null;
},
// =s
// changetriggerLogics(e,index){
// console.log(e,index,'e,index')
// this.openlist.triggerConditionList[index].triggerConditionOperator =
// this.optionstriggerConditionOperator.find(
// (el) => el.dictValue == e
// ).dictLabel;
// this.openlist.triggerConditionList[index].triggerConditionValue = null;
// },
//
changetriggerConditionName(e, index) {
console.log(e, index, "e诊断, index");
// this.dictDataType = e;
var dictType = e;
getAgencytype(dictType).then((res) => {
this.ConditionValue = res.data;
});
this.openlist.triggerConditionList[index].triggerConditionName =
this.optionsname.find((el) => el.dictValue == e).dictLabel;
this.openlist.triggerConditionList[index].triggerConditionOperator = null;
@ -1180,15 +1188,11 @@ export default {
).dictDataType;
this.openlist.triggerConditionList[index].dictDataType =
this.optionsname.find((el) => el.dictValue == e).dictDataType;
console.log(
this.openlist.triggerConditionList[index].dictDataType,
"this.dictDataType"
);
this.handlelist();
},
//
changetriggerLogicsname(e, index) {
console.log(e,'qie')
this.openlist.triggerConditionList[index].triggerLogic = e;
this.openlist.triggerConditionList[index].triggerLogicName =
this.optionslistS.find((el) => el.dictValue == e).dictLabel;
@ -1206,20 +1210,7 @@ export default {
this.routeId = this.$route.query.id;
triggerConditionList(this.routeId).then((res) => {
this.openlist.triggerConditionList = res.data;
this.handlelist();
// this.openlist.triggerConditionList.forEach((o) => {
// // this.triggerConditionCode=o.triggerConditionCode
// this.handlelist();
// // o.dictDataType = this.optionstriggerConditionOperator.find(
// // (el) => el.dictValue == o.triggerConditionOperator
// // )?.dictDataType;
// });
// console.log(
// this.openlist.triggerConditionList,
// " this.openlist.triggerConditionList"
// );
this.handlelist();
if (res.data.length == 1) {
//
this.updata = res.data[0];
@ -1237,15 +1228,10 @@ export default {
} else {
//
this.updata = res.data[0];
// this.handlelist();
this.updata.triggerConditionOperatorName =
this.optionstriggerConditionOperator.find(
(el) => el.dictValue == this.updata.triggerConditionOperator
)?.dictLabel;
console.log(
this.updata.triggerConditionOperatorName,
"updata.triggerConditionOperatorName"
);
res.data.splice(0, 1);
this.updatalist = res.data;
this.updatalist.forEach((e) => {
@ -1275,13 +1261,8 @@ export default {
o.dictDataType = this.optionsname.find(
(el) => el.dictValue == o.triggerConditionCode
)?.dictDataType;
console.log(o.dictDataType, "dict");
// console.log(o.dictDataType, "dict");
});
console.log(
this.openlist.triggerConditionList,
" this.openlist.triggerConditionList11111111111"
);
this.$set(this.updata, "suitRange", this.openlist.suitRange);
});
},
@ -1289,7 +1270,6 @@ export default {
edit() {
this.open = true;
this.infolistname();
// this.infolist()
},
//wangeditor
onNodeContent(item) {

View File

@ -244,6 +244,19 @@
value-format="yyyy-MM-dd"
>
</el-date-picker>
<el-select
v-if="item.dictDataType == 'SELECT'"
v-model="item.triggerConditionValue"
style="width: 300px"
>
<el-option
v-for="item in ConditionValue"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
<!-- {{ item }} -->
<el-input
v-if="item.dictDataType == 'DECIMAL'"
@ -372,6 +385,7 @@ export default {
servicePackageId: [],
routePackageList: [],
},
ConditionValue: [],
open: false,
updata: {
triggerLogic: "",
@ -446,6 +460,10 @@ export default {
},
//
changetriggerConditionName(e, index) {
var dictType = e;
getAgencytype(dictType).then((res) => {
this.ConditionValue = res.data;
});
this.updata.triggerConditionList[index].triggerConditionName =
this.optionsname.find((el) => el.dictValue == e).dictLabel;
this.updata.triggerConditionList[index].triggerConditionOperator = null;
@ -567,7 +585,7 @@ export default {
};
if (this.updata.triggerConditionList.length == 3) {
this.$message.error("最多批量添加2条");
this.$message.error("至多仅支持两种属性");
} else {
this.updata.triggerConditionList.push(obj);
}