From bc8e3ab759761451339fa2f0ffa4626a80e5f71d Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 25 七月 2024 13:59:16 +0800
Subject: [PATCH] 测试完成
---
src/views/knowledge/questionnaire/compilequer/index.vue | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue
index 1f70109..d41b78a 100644
--- a/src/views/knowledge/questionnaire/compilequer/index.vue
+++ b/src/views/knowledge/questionnaire/compilequer/index.vue
@@ -101,14 +101,14 @@
<el-form-item label="鏍囩" prop="desc">
<div class="xinz-inf">
<el-tag
- :key="tag"
+ :key="tag.tagname"
type="success"
v-for="tag in dynamicTags"
closable
:disable-transitions="false"
@close="handleClosetag(tag)"
>
- {{ tag }}
+ {{ tag.tagname }}
</el-tag>
<el-select
v-model="inputValue"
@@ -743,7 +743,11 @@
topicobj: {},
// 鎬绘潯鏁�
total: 1,
- ruleForm: { svyTemplateLibScripts: [], tempDetpRelevances: [] },
+ ruleForm: {
+ svyTemplateLibScripts: [],
+ tempDetpRelevances: [],
+ svyLibTemplateTagList: [],
+ },
rules: {},
rulesa: {},
optionsclass: [], //鍒嗙被鍒楄〃
@@ -857,6 +861,9 @@
getIndexInArray(arr, obj) {
return arr.indexOf(obj);
},
+ processElement(element) {
+ return { ...element, isoperation: 1 };
+ },
// 閫掑綊鎵佸钩鍖�
flattenArray(arr) {
let result = [];
@@ -878,7 +885,9 @@
if (this.id) {
getQtemplatelist({ svyid: this.id }).then((res) => {
this.ruleForm = res.rows[0];
- this.dynamicTags = this.ruleForm.labelInfo.split(",");
+ this.dynamicTags = this.ruleForm.svyLibTemplateTagList.map(
+ this.processElement
+ );
this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
this.ruleForm.suitway = this.ruleForm.suitway.split(",");
console.log(this.tempDetpRelevanceslist);
@@ -905,7 +914,6 @@
submitForm(formName) {
this.$modal.loading("姝e湪涓婁紶鏁版嵁锛岃绋嶅��...");
- this.ruleForm.labelInfo = this.dynamicTags.join(",");
this.ruleForm.suitway = this.ruleForm.suitway.join(",");
if (this.id) {
@@ -1090,7 +1098,11 @@
handleClosetag(tag) {
console.log(tag);
console.log(this.dynamicTags.indexOf(tag));
+ const lindex = this.dynamicTags.indexOf(tag);
+
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+ this.ruleForm.svyLibTemplateTagList[lindex].delFlag = 1;
+
// this.ruleForm.ivrLibaTemplateTargetList[lindex].isoperation = 3;
},
handleInputConfirm() {
@@ -1112,9 +1124,9 @@
isoperation: 1,
};
}
- // this.ruleForm.ivrLibaTemplateTargetList.push(tagvalue);
+ this.ruleForm.svyLibTemplateTagList.push(tagvalue);
// this.dynamicTags.push(tagvalue);
- this.dynamicTags.push(tagvalue.tagname);
+ this.dynamicTags.push(tagvalue);
});
}
this.inputVisible = false;
--
Gitblit v1.9.3