This commit is contained in:
2024-07-18 15:34:24 +08:00
parent aa72444e1c
commit 8001c651a2

View File

@ -426,7 +426,7 @@ export default {
},
],
listindex: 0,
optionstriggerConditionOperator: [], //
// optionstriggerConditionOperator: [], //
dictDataType: "",
};
},
@ -459,24 +459,24 @@ export default {
},
//
infolistoptionslistS() {
var dictType = "trigger_logic";
getAgencytype(dictType).then((res) => {
this.optionslistS = res.data;
});
// var dictType = "trigger_logic";
// getAgencytype(dictType).then((res) => {
// this.optionslistS = res.data;
// });
},
//
optiononditionOperators() {
var dictType = "trigger_condition_name";
getAgencytype(dictType).then((res) => {
this.optionsname = res.data;
});
// var dictType = "trigger_condition_name";
// getAgencytype(dictType).then((res) => {
// this.optionsname = res.data;
// });
},
//
optiononditionOperator() {
var dictType = "trigger_condition_operator";
getAgencytype(dictType).then((res) => {
this.updata.triggerConditionList.optionstriggerConditionOperator = res.data;
});
// var dictType = "trigger_condition_operator";
// getAgencytype(dictType).then((res) => {
// this.updata.triggerConditionList.optionstriggerConditionOperator = res.data;
// });
},
//
changetriggerLogic(e, index) {
@ -484,43 +484,43 @@ export default {
// this.openlist.triggerConditionList[index].optionstriggerConditionOperator.find(
// (el) => el.dictValue == e
// ).dictLabel;
this.updata.triggerConditionList[index].triggerConditionValue = null;
// this.updata.triggerConditionList[index].triggerConditionValue = null;
},
//
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].triggerConditionValue = null;
this.updata.triggerConditionList[index].triggerConditionOperator = null
this.dictDataType = this.optionsname.find((el) => el.dictValue == e).dictDataType;
this.handlelist(index)
this.updata.triggerConditionList[index].dictDataType =
this.optionsname.find((el) => el.dictValue == e).dictDataType;
// 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].triggerConditionValue = null;
// this.updata.triggerConditionList[index].triggerConditionOperator = null
// this.dictDataType = this.optionsname.find((el) => el.dictValue == e).dictDataType;
// this.handlelist(index)
// this.updata.triggerConditionList[index].dictDataType =
// this.optionsname.find((el) => el.dictValue == e).dictDataType;
},
//
handlelist(index) {
var dictType = "trigger_condition_operator";
// this.openlist.triggerConditionList[index].optionstriggerConditionOperator=[]
getList(dictType, this.dictDataType).then((res) => {
this.$set(this.updata.triggerConditionList[index], 'optionstriggerConditionOperator', res.data)
this.$forceUpdate();
});
// var dictType = "trigger_condition_operator";
// // this.openlist.triggerConditionList[index].optionstriggerConditionOperator=[]
// getList(dictType, this.dictDataType).then((res) => {
// this.$set(this.updata.triggerConditionList[index], 'optionstriggerConditionOperator', res.data)
// this.$forceUpdate();
// });
},
//
optiononditionOperator() {
var dictType = "trigger_condition_operator";
getAgencytype(dictType).then((res) => {
this.updata.triggerConditionList.optionstriggerConditionOperator = res.data;
});
// var dictType = "trigger_condition_operator";
// getAgencytype(dictType).then((res) => {
// this.updata.triggerConditionList.optionstriggerConditionOperator = res.data;
// });
},
//
changetriggerLogicsname(e, index) {
this.updata.triggerConditionList[index].triggerLogic = e;
this.updata.triggerConditionList[index].triggerLogicName = this.optionslistS.find((el) => el.dictValue == e).dictLabel;
// this.updata.triggerConditionList[index].triggerLogic = e;
// this.updata.triggerConditionList[index].triggerLogicName = this.optionslistS.find((el) => el.dictValue == e).dictLabel;
},
//
// submit() {
@ -585,31 +585,31 @@ export default {
},
//
delitemlistname(index, item) {
this.updata.triggerConditionList.splice(index, 1);
setTimeout(() => {
this.getMaxTableHeight()
}, 20);
// this.updata.triggerConditionList.splice(index, 1);
// setTimeout(() => {
// this.getMaxTableHeight()
// }, 20);
},
addtriggerCondition() {
var obj = {
routeId: "",
routeName: "",
triggerConditionName: "",
triggerConditionOperator: "",
triggerConditionValue: "",
triggerConditionOperatorName: "",
dictDataType: "STRING",
triggerLogic: "AND",
triggerLogicName: "",
};
if (this.updata.triggerConditionList.length == 3) {
this.$message.error("至多仅支持两种属性");
} else {
this.updata.triggerConditionList.push(obj);
}
setTimeout(() => {
this.getMaxTableHeight()
}, 20);
// var obj = {
// routeId: "",
// routeName: "",
// triggerConditionName: "",
// triggerConditionOperator: "",
// triggerConditionValue: "",
// triggerConditionOperatorName: "",
// dictDataType: "STRING",
// triggerLogic: "AND",
// triggerLogicName: "",
// };
// if (this.updata.triggerConditionList.length == 3) {
// this.$message.error("");
// } else {
// this.updata.triggerConditionList.push(obj);
// }
// setTimeout(() => {
// this.getMaxTableHeight()
// }, 20);
},
//
propagandaontemplate(item) {
@ -720,12 +720,12 @@ export default {
// el.templateType = "SCRIPT";
// }
// });
this.updata.triggerConditionList.forEach((e) => {
e.routeId = this.$route.query.id;
e.routeName = this.$route.query.routeName;
delete e.optionstriggerConditionOperator
});
delete this.updata.triggerConditionList.optionstriggerConditionOperator
// this.updata.triggerConditionList.forEach((e) => {
// e.routeId = this.$route.query.id;
// e.routeName = this.$route.query.routeName;
// delete e.optionstriggerConditionOperator
// });
// delete this.updata.triggerConditionList.optionstriggerConditionOperator
// return
signrouteadd(this.updata).then((res) => {
this.$notify({