Browse Source

修改对话答题录入问题

gcj 2 years ago
parent
commit
d72eabaf1c

+ 2 - 2
src/components/Adult/inputModules/DialogueTem/components/SegbywordChs.vue

@@ -163,11 +163,11 @@ export default {
   },
   computed: {},
   watch: {
-    curQue: {
+    segList: {
       handler: function (newVal, oldVal) {
         let _this = this;
         _this.refresh = false;
-        if (newVal != oldVal) {
+        if (newVal) {
           this.getParaSegWordsResult();
           _this.$nextTick(() => {
             // 重新渲染组件

+ 1 - 0
src/components/Adult/inputModules/DialogueTem/index.vue

@@ -620,6 +620,7 @@ export default {
     initData() {
       console.log(this.curQue);
       if (this.curQue) {
+        this.segList = this.curQue.detail[this.paraIndex].segList;
         if (!this.curQue.number) {
           this.curQue.number = "";
         }

+ 18 - 20
src/components/Adult/inputModules/Neword.vue

@@ -169,18 +169,17 @@ export default {
       obj.index = this.curQue.option.push(obj);
     },
     deleteGroup(index, sIndex) {
-        this.$confirm("确定要删除吗?", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
-        })
-        .then(() => {
-            if (this.curQue.option[index].length == 1) {
-                this.$message.warning("至少剩余1个,不能全部删除");
-                return;
-            }
-            this.curQue.option[index].splice(sIndex, 1);
-        })
+      this.$confirm("确定要删除吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        if (this.curQue.option[index].length == 1) {
+          this.$message.warning("至少剩余1个,不能全部删除");
+          return;
+        }
+        this.curQue.option[index].splice(sIndex, 1);
+      });
     },
     saddoption(item) {
       let con = {
@@ -194,14 +193,13 @@ export default {
       item.push(con);
     },
     delsItem(index) {
-        this.$confirm("确定要删除吗?", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
-        })
-        .then(() => {
-            this.curQue.option.splice(index, 1);
-        })
+      this.$confirm("确定要删除吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        this.curQue.option.splice(index, 1);
+      });
     },
     changeMp3(fileList) {
       const articleImgList = JSON.parse(JSON.stringify(fileList));