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 |   34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/src/views/Satisfaction/configurationmyd/index.vue b/src/views/Satisfaction/configurationmyd/index.vue
index 7034876..13046c8 100644
--- a/src/views/Satisfaction/configurationmyd/index.vue
+++ b/src/views/Satisfaction/configurationmyd/index.vue
@@ -612,7 +612,7 @@
       changedCount: 0,
 
       // 婊℃剰搴﹀垎绫籌D
-      satisfactionCategoryIds: ["404", "405", "406"],
+      satisfactionCategoryIds: ["404", "405", "406", "10039", "10041", "10042"],
 
       // 琛ㄥ崟楠岃瘉瑙勫垯
       configRules: {
@@ -666,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;
+      }
     },
 
     // 绛涢�夊悗鐨勯鐩垪琛�
@@ -676,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) {
@@ -830,7 +842,7 @@
             questionCount: 0,
           };
         }
-// 鍔犺浇妯℃澘璇︽儏鏁版嵁
+        // 鍔犺浇妯℃澘璇︽儏鏁版嵁
         this.templateLoading = true;
         this.loading = true;
         this.questionList = [];
@@ -998,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) {
@@ -1051,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