修改画像标签和触发条件

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

View File

@ -50,7 +50,7 @@ export default {
}, },
optionslist: [], optionslist: [],
// 包含 // 包含
optionstriggerConditionOperator: [], optionstriggerConditionOperator: [], // 将这部分选项的
optionslistS: [], optionslistS: [],
optionslistSname: [], optionslistSname: [],
// 诊断 // 诊断
@ -182,9 +182,12 @@ export default {
this.openlist.triggerConditionList.forEach((e) => { this.openlist.triggerConditionList.forEach((e) => {
e.routeId = this.$route.query.id; e.routeId = this.$route.query.id;
e.routeName = this.$route.query.routeName; e.routeName = this.$route.query.routeName;
}); delete e.optionstriggerConditionOperator
});
delete this.openlist.triggerConditionList.optionstriggerConditionOperator
loading.close(); loading.close();
console.log(this.openlist.triggerConditionList, 'this.openlist.triggerConditionList')
// return; // return;
triggerCondition(this.openlist).then((res) => { triggerCondition(this.openlist).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -452,7 +455,7 @@ export default {
var dictType = "trigger_condition_operator"; var dictType = "trigger_condition_operator";
getAgencytype(dictType).then((res) => { getAgencytype(dictType).then((res) => {
// console.log(res, 'redsssssssss') // console.log(res, 'redsssssssss')
this.optionstriggerConditionOperator = res.data; this.openlist.triggerConditionList.optionstriggerConditionOperator = res.data;
}); });
}, },
@ -461,7 +464,7 @@ export default {
// 包含 // 包含
changetriggerLogic(e, index) { changetriggerLogic(e, index) {
this.openlist.triggerConditionList[index].triggerConditionOperatorName = this.openlist.triggerConditionList[index].triggerConditionOperatorName =
this.optionstriggerConditionOperator.find( this.openlist.triggerConditionList[index].optionstriggerConditionOperator.find(
(el) => el.dictValue == e (el) => el.dictValue == e
).dictLabel; ).dictLabel;
this.openlist.triggerConditionList[index].triggerConditionValue = null; this.openlist.triggerConditionList[index].triggerConditionValue = null;
@ -475,27 +478,24 @@ export default {
}); });
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].triggerConditionValue = null; this.openlist.triggerConditionList[index].triggerConditionValue = null;
this.openlist.triggerConditionList[index].triggerConditionOperator = null
this.dictDataType = this.optionsname.find( this.dictDataType = this.optionsname.find(
(el) => el.dictValue == e (el) => el.dictValue == e
).dictDataType; ).dictDataType;
this.handlelist(); this.handlelist(index)
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;
}, },
// 包含或等号接口
handlelist() {
var dictType = "trigger_condition_operator";
// 包含或等号接口
handlelist(index) {
var dictType = "trigger_condition_operator";
// this.openlist.triggerConditionList[index].optionstriggerConditionOperator=[]
getList(dictType, this.dictDataType).then((res) => { getList(dictType, this.dictDataType).then((res) => {
console.log(res.data, 'res') this.$set(this.openlist.triggerConditionList[index], 'optionstriggerConditionOperator', res.data)
this.optionstriggerConditionOperator = res.data; console.log(this.openlist.triggerConditionList[index].optionstriggerConditionOperator, 'this.openlist')
// console.log( this.$forceUpdate();
// this.optionstriggerConditionOperator,
// " this.optionstriggerConditionOperator "
// );
}); });
}, },
// 且或 // 且或
@ -512,19 +512,6 @@ export default {
}); });
this.infolist(); 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() { infolist() {
this.routeId = this.$route.query.id; this.routeId = this.$route.query.id;
@ -535,29 +522,17 @@ export default {
p.dictDataType = this.optionsname.find( p.dictDataType = this.optionsname.find(
(el) => el.dictValue == p.triggerConditionCode (el) => el.dictValue == p.triggerConditionCode
)?.dictDataType; )?.dictDataType;
// var dictType = p.triggerConditionCode; var dictType = p.triggerConditionCode;
// getAgencytype(dictType).then((res) => { getAgencytype(dictType).then((res) => {
// this.ConditionValue = res.data; this.ConditionValue = res.data;
this.optiononditionOperator(); this.optiononditionOperator();
});
// });
// console.log(this.ConditionValue,'ConditionValueConditionValueConditionValueConditionValue')
// this.handlelist();
// var dictType = "trigger_condition_operator";
// getList(dictType, this.dictDataType).then((res) => {
// this.optionstriggerConditionOperator = res.data;
// });
}); });
if (res.data.length == 1) { if (res.data.length == 1) {
// 回显一条时 // 回显一条时
this.updata = res.data[0]; this.updata = res.data[0];
// console.log(this.updata, " this.updata");
this.updata.triggerConditionOperatorName = this.updata.triggerConditionOperatorName =
this.optionstriggerConditionOperator.find( this.openlistoptionstriggerConditionOperator.find(
(el) => el.dictValue == this.updata.triggerConditionOperator (el) => el.dictValue == this.updata.triggerConditionOperator
)?.dictLabel; )?.dictLabel;
this.updatalist = []; this.updatalist = [];
@ -568,11 +543,8 @@ export default {
this.optionstriggerConditionOperator.find( this.optionstriggerConditionOperator.find(
(el) => el.dictValue == this.updata.triggerConditionOperator (el) => el.dictValue == this.updata.triggerConditionOperator
)?.dictLabel; )?.dictLabel;
// console.log(this.updata, " this.updata");
res.data.splice(0, 1); res.data.splice(0, 1);
this.updatalist = res.data; this.updatalist = res.data;
// console.log(this.updatalist, " this.updatalist");
this.updatalist.forEach((e) => { this.updatalist.forEach((e) => {
e.triggerConditionOperatorName = e.triggerConditionOperatorName =
this.optionstriggerConditionOperator.find( this.optionstriggerConditionOperator.find(
@ -587,11 +559,9 @@ export default {
} }
}); });
}, },
// 编辑接口 // 编辑接口回显
infolistname() { infolistname() {
this.routeId = this.$route.query.id; this.routeId = this.$route.query.id;
this.optionstriggerConditionOperator = []
triggerConditionList(this.routeId).then((res) => { triggerConditionList(this.routeId).then((res) => {
this.openlist.triggerConditionList = res.data; this.openlist.triggerConditionList = res.data;
this.openlist.triggerConditionList.forEach((o) => { this.openlist.triggerConditionList.forEach((o) => {
@ -599,20 +569,12 @@ 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, 'dictDataTypedictDataTypedictDataTypedictDataType')
var dictType = "trigger_condition_operator"; var dictType = "trigger_condition_operator";
getList(dictType, o.dictDataType).then((res) => { getList(dictType, o.dictDataType).then((res) => {
this.optionstriggerConditionOperator = res.data; o.optionstriggerConditionOperator = res.data;
setTimeout(() => {
this.optionstriggerConditionOperator = []
}, 30);
}); });
var dictType = o.triggerConditionCode; var dictType = o.triggerConditionCode;
getAgencytype(dictType).then((res) => { getAgencytype(dictType).then((res) => {
// console.log(res, 'ressssssss')
this.ConditionValue = res.data; this.ConditionValue = res.data;
}); });
}); });
@ -742,7 +704,7 @@ export default {
// this.form.taskSubdivisiontemplateType != "PROPAGANDA" // this.form.taskSubdivisiontemplateType != "PROPAGANDA"
// ) { // ) {
// console.log() // console.log()
this.$refs.wangeditor.emit(); this.$refs.wangeditor.emit();
// } // }
setTimeout(() => { setTimeout(() => {
this.form = uitem; this.form = uitem;

View File

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

View File

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

View File

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