WXL (wul)
17 小时以前 509e61f3b9a696b596d18fe6ca78125c5e21ae65
src/views/Satisfaction/configurationmyd/index.vue
@@ -612,7 +612,7 @@
      changedCount: 0,
      // 满意度分类ID
      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];