修改画像标签和触发条件

This commit is contained in:
闫晓茹 2024-06-28 11:49:57 +08:00
parent e2afa2135f
commit 5dd9053ac2
5 changed files with 56 additions and 85 deletions

View File

@ -30,7 +30,7 @@
@change="changetriggerLogic($event, index)"
>
<el-option
v-for="item in optionstriggerConditionOperator"
v-for="item in openlist.triggerConditionList.optionstriggerConditionOperator"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
@ -127,7 +127,7 @@
@change="changetriggerLogic($event, index)"
>
<el-option
v-for="item in optionstriggerConditionOperator"
v-for="item in openlist.triggerConditionList.optionstriggerConditionOperator"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
@ -648,7 +648,7 @@
</el-select>
</div>
</div>
<!-- 诊断 -->
<!-- 诊断 在这里-->
<el-select
v-model="item.triggerConditionCode"
style="width: 120px"
@ -663,22 +663,19 @@
</el-option>
</el-select>
<!-- 包含 -->
<!-- <div @change.native="changehos" style="background:red;width: 200px;height: 200px;display: inline-block;"> -->
<el-select
<el-select
v-model="item.triggerConditionOperator"
style="width: 100px"
@change="changetriggerLogic($event, index)"
>
<el-option
v-for="item in optionstriggerConditionOperator"
v-for="item in item.optionstriggerConditionOperator"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
<!-- </div> -->
<el-input
v-if="item.dictDataType == 'STRING'"

View File

@ -50,7 +50,7 @@ export default {
},
optionslist: [],
// 包含
optionstriggerConditionOperator: [],
optionstriggerConditionOperator: [], // 将这部分选项的
optionslistS: [],
optionslistSname: [],
// 诊断
@ -182,9 +182,12 @@ export default {
this.openlist.triggerConditionList.forEach((e) => {
e.routeId = this.$route.query.id;
e.routeName = this.$route.query.routeName;
});
delete e.optionstriggerConditionOperator
});
delete this.openlist.triggerConditionList.optionstriggerConditionOperator
loading.close();
console.log(this.openlist.triggerConditionList, 'this.openlist.triggerConditionList')
// return;
triggerCondition(this.openlist).then((res) => {
if (res.code == 200) {
@ -452,7 +455,7 @@ export default {
var dictType = "trigger_condition_operator";
getAgencytype(dictType).then((res) => {
// console.log(res, 'redsssssssss')
this.optionstriggerConditionOperator = res.data;
this.openlist.triggerConditionList.optionstriggerConditionOperator = res.data;
});
},
@ -461,7 +464,7 @@ export default {
// 包含
changetriggerLogic(e, index) {
this.openlist.triggerConditionList[index].triggerConditionOperatorName =
this.optionstriggerConditionOperator.find(
this.openlist.triggerConditionList[index].optionstriggerConditionOperator.find(
(el) => el.dictValue == e
).dictLabel;
this.openlist.triggerConditionList[index].triggerConditionValue = null;
@ -475,27 +478,24 @@ export default {
});
this.openlist.triggerConditionList[index].triggerConditionName =
this.optionsname.find((el) => el.dictValue == e).dictLabel;
this.openlist.triggerConditionList[index].triggerConditionOperator = null;
this.openlist.triggerConditionList[index].triggerConditionValue = null;
this.openlist.triggerConditionList[index].triggerConditionOperator = null
this.dictDataType = this.optionsname.find(
(el) => el.dictValue == e
).dictDataType;
this.handlelist();
this.handlelist(index)
this.openlist.triggerConditionList[index].dictDataType =
this.optionsname.find((el) => el.dictValue == e).dictDataType;
},
// 包含或等号接口
handlelist() {
var dictType = "trigger_condition_operator";
// 包含或等号接口
handlelist(index) {
var dictType = "trigger_condition_operator";
// this.openlist.triggerConditionList[index].optionstriggerConditionOperator=[]
getList(dictType, this.dictDataType).then((res) => {
console.log(res.data, 'res')
this.optionstriggerConditionOperator = res.data;
// console.log(
// this.optionstriggerConditionOperator,
// " this.optionstriggerConditionOperator "
// );
this.$set(this.openlist.triggerConditionList[index], 'optionstriggerConditionOperator', res.data)
console.log(this.openlist.triggerConditionList[index].optionstriggerConditionOperator, 'this.openlist')
this.$forceUpdate();
});
},
// 且或
@ -512,19 +512,6 @@ export default {
});
this.infolist();
},
changehos() {
// this.$message.error('1111111111')
// this.$message.error('应该选择${conf.accept}类型的文件')
this.$alert('这是一段内容', '标题名称', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'info',
message: `action: ${action}`
});
}
});
},
// 展示触发条件
infolist() {
this.routeId = this.$route.query.id;
@ -535,29 +522,17 @@ export default {
p.dictDataType = this.optionsname.find(
(el) => el.dictValue == p.triggerConditionCode
)?.dictDataType;
// var dictType = p.triggerConditionCode;
// getAgencytype(dictType).then((res) => {
// this.ConditionValue = res.data;
this.optiononditionOperator();
// });
// console.log(this.ConditionValue,'ConditionValueConditionValueConditionValueConditionValue')
// this.handlelist();
// var dictType = "trigger_condition_operator";
// getList(dictType, this.dictDataType).then((res) => {
// this.optionstriggerConditionOperator = res.data;
// });
var dictType = p.triggerConditionCode;
getAgencytype(dictType).then((res) => {
this.ConditionValue = res.data;
this.optiononditionOperator();
});
});
if (res.data.length == 1) {
// 回显一条时
this.updata = res.data[0];
// console.log(this.updata, " this.updata");
this.updata.triggerConditionOperatorName =
this.optionstriggerConditionOperator.find(
this.openlistoptionstriggerConditionOperator.find(
(el) => el.dictValue == this.updata.triggerConditionOperator
)?.dictLabel;
this.updatalist = [];
@ -568,11 +543,8 @@ export default {
this.optionstriggerConditionOperator.find(
(el) => el.dictValue == this.updata.triggerConditionOperator
)?.dictLabel;
// console.log(this.updata, " this.updata");
res.data.splice(0, 1);
this.updatalist = res.data;
// console.log(this.updatalist, " this.updatalist");
this.updatalist.forEach((e) => {
e.triggerConditionOperatorName =
this.optionstriggerConditionOperator.find(
@ -587,11 +559,9 @@ export default {
}
});
},
// 编辑接口
// 编辑接口回显
infolistname() {
this.routeId = this.$route.query.id;
this.optionstriggerConditionOperator = []
triggerConditionList(this.routeId).then((res) => {
this.openlist.triggerConditionList = res.data;
this.openlist.triggerConditionList.forEach((o) => {
@ -599,20 +569,12 @@ export default {
o.dictDataType = this.optionsname.find(
(el) => el.dictValue == o.triggerConditionCode
)?.dictDataType;
// console.log(o.dictDataType, 'dictDataTypedictDataTypedictDataTypedictDataType')
var dictType = "trigger_condition_operator";
getList(dictType, o.dictDataType).then((res) => {
this.optionstriggerConditionOperator = res.data;
setTimeout(() => {
this.optionstriggerConditionOperator = []
}, 30);
o.optionstriggerConditionOperator = res.data;
});
var dictType = o.triggerConditionCode;
getAgencytype(dictType).then((res) => {
// console.log(res, 'ressssssss')
this.ConditionValue = res.data;
});
});
@ -742,7 +704,7 @@ export default {
// this.form.taskSubdivisiontemplateType != "PROPAGANDA"
// ) {
// console.log()
this.$refs.wangeditor.emit();
this.$refs.wangeditor.emit();
// }
setTimeout(() => {
this.form = uitem;

View File

@ -583,8 +583,8 @@ export default {
//
questionontemplate(item) {
if (this.formInline.taskType == "ARTIFICIAL_FOLLOW_UP") {
this.formInline.questionInfoId = item.templateId;
this.formInline.questionnaireName = item.templateName;
this.formInline.followTemplateId = item.templateId;
this.formInline.followTemplateName = item.templateName;
} else {
this.formInline.questionInfoId = item.templateId;
this.formInline.questionnaireName = item.templateName;

View File

@ -232,8 +232,8 @@ export default {
el.children.forEach((ele) => {
if (e[1] == ele.value) {
console.log(e[1], "[1]");
// this.addlist.push(el.label + "-" + ele.label);
console.log(this.addlist, "this.addlist");
this.addlist.push(el.label + "-" + ele.label);
// console.log(this.addlist, "this.addlist");
}
});
});

View File

@ -93,7 +93,7 @@
v-for="(uitem, uindex) in list.childrenRouteList"
:key="uindex"
>
<!-- {{ uitem }} -->
<!-- {{ uitem }} -->
<div class="title">
<el-tag type="success">触发条件</el-tag>
<span>
@ -221,7 +221,7 @@
@change="changetriggerLogic($event, index)"
>
<el-option
v-for="itemr in optionstriggerConditionOperator"
v-for="itemr in item.optionstriggerConditionOperator"
:key="itemr.dictValue"
:label="itemr.dictLabel"
:value="itemr.dictValue"
@ -448,7 +448,8 @@ export default {
optiononditionOperator() {
var dictType = "trigger_condition_operator ";
getAgencytype(dictType).then((res) => {
this.optionstriggerConditionOperator = res.data;
this.updata.triggerConditionList.optionstriggerConditionOperator =
res.data;
});
},
//
@ -457,7 +458,9 @@ export default {
// this.$message('')
// } else {
this.updata.triggerConditionList[index].triggerConditionOperatorName =
this.optionstriggerConditionOperator.find(
this.updata.triggerConditionList[
index
].optionstriggerConditionOperator.find(
(el) => el.dictValue == e
).dictLabel;
this.updata.triggerConditionList[index].triggerConditionValue = null;
@ -482,14 +485,18 @@ export default {
// this.updata.triggerConditionList[index].dictDataType,
// "this.dictDataType"
// );
this.handlelist();
this.handlelist(index);
},
//
handlelist() {
handlelist(index) {
var dictType = "trigger_condition_operator";
getList(dictType, this.dictDataType).then((res) => {
console.log(res, "res");
this.optionstriggerConditionOperator = res.data;
this.$set(
this.updata.triggerConditionList[index],
"optionstriggerConditionOperator",
res.data
);
this.$forceUpdate();
});
},
changeoptions() {},
@ -628,6 +635,7 @@ export default {
triggerConditionValue: "",
triggerConditionName: "",
triggerConditionOperatorName: "",
dictDataType: "STRING",
triggerLogic: "",
triggerLogicName: "",
@ -646,9 +654,13 @@ export default {
this.updata.triggerConditionList.forEach((e) => {
e.routeId = this.$route.query.id;
e.routeName = this.$route.query.routeName;
delete e.optionstriggerConditionOperator;
});
loading.close();
delete this.updata.triggerConditionList.optionstriggerConditionOperator;
loading.close();
// console.log(this.updata.triggerConditionList, "this.updata");
// return
triggerConditionadd(this.updata).then((res) => {
if (res.code == 200) {
this.$notify({
@ -656,7 +668,7 @@ export default {
title: "提示",
message: "新增触发条件成功",
});
// this.info();
this.info();
this.openfalse();
}
});