From 509e61f3b9a696b596d18fe6ca78125c5e21ae65 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期四, 02 四月 2026 16:58:15 +0800
Subject: [PATCH] 测试完成
---
src/views/Satisfaction/configurationmyd/index.vue | 46 +++++++++++++++++++++++++++++++++-------------
1 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/src/views/Satisfaction/configurationmyd/index.vue b/src/views/Satisfaction/configurationmyd/index.vue
index b35f056..13046c8 100644
--- a/src/views/Satisfaction/configurationmyd/index.vue
+++ b/src/views/Satisfaction/configurationmyd/index.vue
@@ -62,9 +62,6 @@
placeholder="璇烽�夋嫨妯℃澘"
clearable
filterable
- :disabled="
- !templateForm.templateType || templateOptionsLoading
- "
@change="handleTemplateChange"
style="width: 100%"
>
@@ -315,7 +312,6 @@
filterable
clearable
multiple
- collapse-tags
style="width: 100%"
@change="handleConfigChange(question)"
>
@@ -616,7 +612,7 @@
changedCount: 0,
// 婊℃剰搴﹀垎绫籌D
- satisfactionCategoryIds: ["404", "405", "406"],
+ satisfactionCategoryIds: ["404", "405", "406", "10039", "10041", "10042"],
// 琛ㄥ崟楠岃瘉瑙勫垯
configRules: {
@@ -670,9 +666,15 @@
// 婊℃剰搴﹂鐩暟閲�
satisfactionQuestionsCount() {
- return this.questionList.filter((q) =>
- this.satisfactionCategoryIds.includes(q.categoryid?.toString())
- ).length;
+ if (this.templateForm.templateType === 1) {
+ return this.questionList.filter((q) =>
+ this.satisfactionCategoryIds.includes(q.categoryid?.toString())
+ ).length;
+ } else if (this.templateForm.templateType === 2) {
+ return this.questionList.filter((q) =>
+ this.satisfactionCategoryIds.includes(q.scriptAssortid?.toString())
+ ).length;
+ }
},
// 绛涢�夊悗鐨勯鐩垪琛�
@@ -680,9 +682,15 @@
let filtered = this.questionList;
// 绛涢�夋弧鎰忓害棰樼洰
- filtered = filtered.filter((q) =>
- this.satisfactionCategoryIds.includes(q.categoryid?.toString())
- );
+ if (this.templateForm.templateType === 1) {
+ filtered = filtered.filter((q) =>
+ this.satisfactionCategoryIds.includes(q.categoryid?.toString())
+ );
+ } else if (this.templateForm.templateType === 2) {
+ filtered = filtered.filter((q) =>
+ this.satisfactionCategoryIds.includes(q.scriptAssortid?.toString())
+ );
+ }
// 搴旂敤鎼滅储鏉′欢
if (this.queryParams.scriptTopic) {
@@ -833,6 +841,16 @@
templateStatus: selectedTemplate.isavailable,
questionCount: 0,
};
+ }
+ // 鍔犺浇妯℃澘璇︽儏鏁版嵁
+ this.templateLoading = true;
+ this.loading = true;
+ this.questionList = [];
+
+ if (this.templateForm.templateType === 1) {
+ this.loadQuestionnaireTemplateDetail();
+ } else if (this.templateForm.templateType === 2) {
+ this.loadFollowupTemplateDetail();
}
} else {
this.currentTemplateInfo = null;
@@ -992,7 +1010,7 @@
/** 閰嶇疆鍙樻洿澶勭悊 */
handleConfigChange(question) {
this.$nextTick(() => {
- const index = this.questionList.findIndex((q) => q.id === question.id);
+ const index = this.filteredQuestionList.findIndex((q) => q.id === question.id);
if (index !== -1) {
const formRef = this.$refs.configForm && this.$refs.configForm[index];
if (formRef) {
@@ -1045,7 +1063,9 @@
async saveSingleConfig(question) {
if (!question.hasChanges) return;
- const index = this.questionList.findIndex((q) => q.id === question.id);
+ const index = this.filteredQuestionList.findIndex((q) => q.id === question.id);
+ console.log(index,'filteredQuestionList');
+
if (index === -1) return;
const formRef = this.$refs.configForm && this.$refs.configForm[index];
--
Gitblit v1.9.3