| | |
| | | </div> |
| | | |
| | | <!-- 搜索区域(题目筛选) --> |
| | | <div v-if="questionList.length > 0" class="search-section"> |
| | | <div v-show="questionList.length > 0" class="search-section"> |
| | | <el-card shadow="never" class="search-container"> |
| | | <el-form :model="queryParams" :inline="true" size="medium"> |
| | | <el-form :model="queryParams" size="medium"> |
| | | <el-form-item label="问题主题"> |
| | | <el-input |
| | | v-model="queryParams.scriptTopic" |
| | | placeholder="请输入问题主题" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | v-model="queryParams.scriptContent" |
| | | placeholder="请输入问题内容" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | |
| | | |
| | | // 查询参数 |
| | | queryParams: { |
| | | scriptTopic: "", |
| | | scriptContent: "", |
| | | scriptTopic: null, |
| | | scriptContent: null, |
| | | }, |
| | | |
| | | // 数据列表 |
| | |
| | | // 筛选后的题目列表 |
| | | filteredQuestionList() { |
| | | let filtered = this.questionList; |
| | | |
| | | console.log("queryParams:", this.queryParams); |
| | | console.log("questionList:", this.questionList); |
| | | // 筛选满意度题目 |
| | | if (this.templateForm.templateType === 1) { |
| | | filtered = filtered.filter((q) => |
| | |
| | | if (this.queryParams.scriptTopic) { |
| | | const keyword = this.queryParams.scriptTopic.toLowerCase(); |
| | | filtered = filtered.filter( |
| | | (q) => q.scriptTopic && q.criptTopic.toLowerCase().includes(keyword) |
| | | (q) => q.scriptTopic && q.scriptTopic.toLowerCase().includes(keyword) |
| | | ); |
| | | } |
| | | |
| | |
| | | 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]; |