| | |
| | | changedCount: 0, |
| | | |
| | | // 满意度分类ID |
| | | satisfactionCategoryIds: ["404", "405", "406"], |
| | | satisfactionCategoryIds: ["404", "405", "406", "10039", "10041", "10042"], |
| | | |
| | | // 表单验证规则 |
| | | configRules: { |
| | |
| | | |
| | | // 满意度题目数量 |
| | | 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; |
| | | } |
| | | }, |
| | | |
| | | // 筛选后的题目列表 |
| | |
| | | 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) { |
| | |
| | | questionCount: 0, |
| | | }; |
| | | } |
| | | // 加载模板详情数据 |
| | | // 加载模板详情数据 |
| | | this.templateLoading = true; |
| | | this.loading = true; |
| | | this.questionList = []; |
| | |
| | | /** 配置变更处理 */ |
| | | 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) { |
| | |
| | | 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]; |