| | |
| | | if (res.code == 200) { |
| | | this.tableDatatop = res.data.ivrTaskTemplateScriptVOList; |
| | | this.tableDatatop.forEach((item) => { |
| | | item.scriptID = item.id; |
| | | item.id = null; |
| | | // 类型判断赋值 |
| | | if (item.ivrTaskScriptTargetoptionList) { |
| | | if (item.ivrTaskScriptTargetoptionList.length) { |
| | | item.targetvalue = 1; |
| | | item.questiontext = item.scriptContent; |
| | | |
| | | item.targetvalue = item.ivrTaskScriptTargetoptionList |
| | | .map((obj) => obj.targetvalue) |
| | | .join("&"); |
| | |
| | | }, |
| | | // 医护人员存储数据 |
| | | getdetail() { |
| | | console.log(1); |
| | | |
| | | let excep = ""; |
| | | const promises = []; |
| | | this.tableDatatop.forEach((item) => { |
| | |
| | | // promises.push(serviceSubtaskDetailadd(obj)); |
| | | // } |
| | | }); |
| | | console.log(2); |
| | | console.log(this.tableDatatop); |
| | | let obj = { |
| | | svyTaskTemplateScriptVOS: this.tableDatatop, // 提交处理后的副本 |
| | |
| | | }, 3000); |
| | | }, |
| | | yuyingetdetail() { |
| | | console.log("c", 1); |
| | | |
| | | const dataToSubmit = JSON.parse(JSON.stringify(this.tableDatatop)); |
| | | console.log(dataToSubmit, "dataToSubmit"); |
| | | // return; |
| | | console.log(dataToSubmit, 2); |
| | | |
| | | dataToSubmit.forEach((item, index) => { |
| | | |
| | | // 对拷贝的数据进行操作,不影响原始的 scriptResult 数组 |
| | | item.scriptResult = item.scriptResult.join("&"); |
| | | if (item.targetvalue) { |
| | | item.scriptResult = item.scriptResult.join("&"); |
| | | item.asrtext = item.matchedtext; |
| | | item.ivrtext = item.matchedtext; |
| | | } else { |
| | | item.asrtext = item.scriptResult; |
| | | item.ivrtext = item.scriptResult; |
| | | } |
| | | item.templatequestionnum = index + 1; |
| | | item.subId = this.id; |
| | | |
| | | item.taskid = this.taskid; |
| | | item.asrtext = item.matchedtext; |
| | | item.ivrtext = item.matchedtext; |
| | | if (!item.id) { |
| | | item.isoperation = 1; |
| | | } |
| | | item.patid = this.patid; |
| | | item.templateid = item.templateID; |
| | | }); |
| | | console.log("c", 3); |
| | | |
| | | let obj = { |
| | | ivrTaskTemplateScriptVOList: dataToSubmit, // 提交处理后的副本 |
| | |
| | | param6: this.id, |
| | | type: 1, |
| | | }; |
| | | console.log("c", 4); |
| | | const orgName = localStorage.getItem("orgname"); |
| | | console.log(orgName, "orgName"); |
| | | |
| | |
| | | this.form = res.rows[0].serviceSubtaskList.find( |
| | | (item) => item.id == this.id |
| | | ); |
| | | console.log(this.form, "serviceType"); |
| | | |
| | | this.logsheetlist = res.rows[0].serviceSubtaskList; |
| | | this.templateid = this.form.templateid; |