浏览代码

一个问题的不同答案选项期望可以关联同一个问题(3324)

zhangxc 5 年之前
父节点
当前提交
d28e99dff6
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/components/preTreat/PubSelect.vue

+ 4 - 1
src/components/preTreat/PubSelect.vue

@@ -259,6 +259,7 @@ export default {
   data() {
     return {
       rows: [...initRows],
+      selectIndex: -1,
       checkedExc: false,
       checkedCon: false,
       focusOn: -1, //聚焦的行index
@@ -305,8 +306,10 @@ export default {
       this.searchTagList();
     },
     focusOn(newVal) {
+      this.selectIndex = newVal
       this.checkedExc = this.rows[newVal].exclusion === 1;
       this.checkedCon = this.rows[newVal].exclusionCon === 1;
+      this.searchTagList()
     },
     /*type() {
         this.initData();
@@ -376,7 +379,7 @@ export default {
     searchTagList() {
       let ids = []
       this.rows.map((it, x) => {
-        if (it.subQuestion) {
+        if (it.subQuestion&&this.selectIndex===x) {
           ids=ids.concat(it.subQuestion.split(','))
         }
       });