| | |
| | | return new Promise((resolve) => { |
| | | getQtemplatelist({ pageSize: 1000 }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | console.log(res.rows, "res.rows"); |
| | | if (res.code == 200) { |
| | | console.log(res.rows, 2); |
| | | this.questionnaireTemplates = (res.rows || []).map((item) => ({ |
| | | id: item.svyid, |
| | | templateName: item.svyname, |
| | | isavailable: item.isavailable, |
| | | })); |
| | | console.log(this.followupTemplates, 3); |
| | | |
| | | } else { |
| | | this.$message.error(res.msg || "加载问卷模板失败"); |
| | | } |
| | |
| | | return new Promise((resolve) => { |
| | | getFollowuplist({ pageSize: 1000 }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | console.log(res.rows, "res.rows"); |
| | | if (res.code == 200) { |
| | | console.log(res.rows, 2); |
| | | |
| | | this.followupTemplates = (res.rows || []).map((item) => ({ |
| | | id: item.id, |
| | | templateName: item.templateName, |
| | | isavailable: item.isavailable, |
| | | })); |
| | | console.log(this.followupTemplates, 3); |
| | | } else { |
| | | this.$message.error(res.msg || "加载语音模板失败"); |
| | | } |
| | |
| | | /** 配置变更处理 */ |
| | | handleConfigChange(question) { |
| | | this.$nextTick(() => { |
| | | const index = this.filteredQuestionList.findIndex((q) => q.id === question.id); |
| | | console.log(index,'index'); |
| | | const index = this.filteredQuestionList.findIndex( |
| | | (q) => q.id === question.id |
| | | ); |
| | | console.log(index, "index"); |
| | | |
| | | if (index !== -1) { |
| | | const formRef = this.$refs.configForm && this.$refs.configForm[index]; |