| | |
| | | if (res.code == 200) { |
| | | this.tableDatatop = res.data.ivrTaskTemplateScriptVOList; |
| | | this.tableDatatop.forEach((item) => { |
| | | item.scriptID = item.id; |
| | | item.id = null; |
| | | // 类型判断赋值 |
| | | if (item.ivrTaskScriptTargetoptionList) { |
| | | item.targetvalue = 1; |
| | | item.questiontext = item.scriptContent; |
| | | |
| | | item.targetvalue = item.ivrTaskScriptTargetoptionList |
| | | .map((obj) => obj.targetvalue) |
| | | .join("&"); |
| | |
| | | }; |
| | | if (item.scriptType == 2 && item.scriptResult[0]) { |
| | | obj.asrtext = item.scriptResult.join("&"); |
| | | obj.ivrtext = item.scriptResult.join("&"); |
| | | } else if (item.scriptType != 2 && item.scriptResult) { |
| | | obj.asrtext = item.scriptResult; |
| | | obj.ivrtext = item.scriptResult; |
| | | } |
| | | |
| | | // if (item.isoption == 3) { |
| | |
| | | }, |
| | | yuyingetdetail() { |
| | | const dataToSubmit = JSON.parse(JSON.stringify(this.tableDatatop)); |
| | | console.log(dataToSubmit, "dataToSubmit"); |
| | | // return; |
| | | dataToSubmit.forEach((item, index) => { |
| | | // 对拷贝的数据进行操作,不影响原始的 scriptResult 数组 |
| | | item.scriptResult = item.scriptResult.join("&"); |
| | |
| | | item.subId = this.id; |
| | | item.taskid = this.taskid; |
| | | item.asrtext = item.matchedtext; |
| | | item.ivrtext = item.matchedtext; |
| | | if (!item.id) { |
| | | item.isoperation = 1; |
| | | } |
| | |
| | | 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; |