| | |
| | | import store from "@/store"; |
| | | |
| | | export default { |
| | | name:'Verbalproblem', |
| | | name: "Verbalproblem", |
| | | components: { Regular }, |
| | | data() { |
| | | return { |
| | |
| | | testvalue: "", |
| | | testgovalue: "", |
| | | topicobj: {}, |
| | | indexform: {}, |
| | | indexform: { |
| | | ivrLibaScriptTargetoptionList:[], |
| | | ivrLibaScriptTagList:[] |
| | | }, |
| | | mode: [], |
| | | questionclass: [], |
| | | currentInputId: "", |
| | |
| | | // 获取详情数据 |
| | | getverbaltrick() { |
| | | let id = this.$route.query.id; |
| | | if (id) { |
| | | getverbaltrick({ id: id }).then((res) => { |
| | | this.indexform = res.data; |
| | | this.indexform.suitway = this.indexform.suitway.split(","); |
| | |
| | | }, |
| | | ]; |
| | | }); |
| | | } |
| | | // 树 |
| | | getbaltrickclassify({}).then((res) => { |
| | | this.questionclass = res.rows; |
| | |
| | | console.log(this.variablelist); |
| | | this.indexform.otherdata = JSON.stringify(this.variablelist); |
| | | this.indexform.suitway = this.indexform.suitway.join(","); |
| | | |
| | | if (this.indexform.id) { |
| | | this.indexform.ivrLibaScriptTargetoptionList = |
| | | this.indexform.ivrLibaScriptTargetoptionList.map((res) => { |
| | | if (res.isoperation!=1) { |
| | | res.isoperation = 2; |
| | | } |
| | | return res; |
| | | }); |
| | | this.indexform.isoperation = 2; |
| | | compileverbaltrick(this.indexform).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | }); |
| | | } else { |
| | | this.indexform.isoperation = 1; |
| | | |
| | | compileverbaltrick(this.indexform).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$modal.msgSuccess("新增成功"); |
| | |
| | | .confirm('是否添加"' + this.indexform.targetname + '"指标的选项?') |
| | | .then(() => { |
| | | this.indexform.isenable = res.rows[0].isenable; |
| | | console.log(res.rows[0].targetoptionList); |
| | | res.rows[0].targetoptionList.forEach((item) => { |
| | | item.isoperation = 1; |
| | | this.indexform.ivrLibaScriptTargetoptionList.push(item); |