修改触发条件

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

View File

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