From 412ecc2c412a03c909c0dc2ef41f08d02eb7d913 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 08 四月 2024 09:52:15 +0800
Subject: [PATCH] 测试完成
---
src/views/repositoryai/verbaltrick/particulars/index.vue | 71 +++++++++++++++++++++--------------
src/views/repositoryai/intention/index.vue | 6 +++
2 files changed, 49 insertions(+), 28 deletions(-)
diff --git a/src/views/repositoryai/intention/index.vue b/src/views/repositoryai/intention/index.vue
index 9b83381..79481fc 100644
--- a/src/views/repositoryai/intention/index.vue
+++ b/src/views/repositoryai/intention/index.vue
@@ -1189,6 +1189,12 @@
/** 鏇存柊/淇敼鎻愪氦鎸夐挳 */
submitForm: function () {
// this.indexform.targetoptionList=[]
+ this.indexform.targetoptionList = this.indexform.targetoptionList.map(
+ (res) => {
+ res.isoperation = 2;
+ return res;
+ }
+ );
this.$refs["indexform"].validate((valid) => {
this.indexform.targetoptionList = this.testuserList.concat(
this.targetoptionList
diff --git a/src/views/repositoryai/verbaltrick/particulars/index.vue b/src/views/repositoryai/verbaltrick/particulars/index.vue
index 3d5189e..af6b4ff 100644
--- a/src/views/repositoryai/verbaltrick/particulars/index.vue
+++ b/src/views/repositoryai/verbaltrick/particulars/index.vue
@@ -533,14 +533,14 @@
</el-table>
</el-card> -->
<el-card class="box-card" style="margin-bottom: 20px">
- <Regular
- :TargetoptionList="indexform.ivrLibaScriptTargetoptionList"
- @addoption="addoption"
- @deloption="deloption"
- @syioption="syioption"
- @xiayioption="xiayioption"
- />
- </el-card>
+ <Regular
+ :TargetoptionList="indexform.ivrLibaScriptTargetoptionList"
+ @addoption="addoption"
+ @deloption="deloption"
+ @syioption="syioption"
+ @xiayioption="xiayioption"
+ />
+ </el-card>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="娴嬭瘯杈撳叆" prop="targetvalue">
@@ -589,8 +589,8 @@
import store from "@/store";
export default {
- name:'Verbalproblem',
- components: { Regular },
+ name: "Verbalproblem",
+ components: { Regular },
data() {
return {
Editprogress: 1, //缂栬緫杩涘害
@@ -604,7 +604,10 @@
testvalue: "",
testgovalue: "",
topicobj: {},
- indexform: {},
+ indexform: {
+ ivrLibaScriptTargetoptionList:[],
+ ivrLibaScriptTagList:[]
+ },
mode: [],
questionclass: [],
currentInputId: "",
@@ -665,23 +668,25 @@
// 鑾峰彇璇︽儏鏁版嵁
getverbaltrick() {
let id = this.$route.query.id;
- getverbaltrick({ id: id }).then((res) => {
- this.indexform = res.data;
- this.indexform.suitway = this.indexform.suitway.split(",");
- this.indexform.assortid = parseInt(this.indexform.assortid);
- this.variablelist = JSON.parse(this.indexform.otherdata).length
- ? JSON.parse(this.indexform.otherdata)
- : this.variablelist;
- this.dynamicTags = this.indexform.ivrLibaScriptTagList.map(
- this.processElement
- );
- this.targetlist = [
- {
- id: this.indexform.targetid,
- targetname: this.indexform.targetname,
- },
- ];
- });
+ if (id) {
+ getverbaltrick({ id: id }).then((res) => {
+ this.indexform = res.data;
+ this.indexform.suitway = this.indexform.suitway.split(",");
+ this.indexform.assortid = parseInt(this.indexform.assortid);
+ this.variablelist = JSON.parse(this.indexform.otherdata).length
+ ? JSON.parse(this.indexform.otherdata)
+ : this.variablelist;
+ this.dynamicTags = this.indexform.ivrLibaScriptTagList.map(
+ this.processElement
+ );
+ this.targetlist = [
+ {
+ id: this.indexform.targetid,
+ targetname: this.indexform.targetname,
+ },
+ ];
+ });
+ }
// 鏍�
getbaltrickclassify({}).then((res) => {
this.questionclass = res.rows;
@@ -694,7 +699,15 @@
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) {
@@ -709,6 +722,7 @@
});
} else {
this.indexform.isoperation = 1;
+
compileverbaltrick(this.indexform).then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("鏂板鎴愬姛");
@@ -743,6 +757,7 @@
.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);
--
Gitblit v1.9.3