Преглед изворни кода

一个问题的不同答案选项期望可以关联同一个问题(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() {
   data() {
     return {
     return {
       rows: [...initRows],
       rows: [...initRows],
+      selectIndex: -1,
       checkedExc: false,
       checkedExc: false,
       checkedCon: false,
       checkedCon: false,
       focusOn: -1, //聚焦的行index
       focusOn: -1, //聚焦的行index
@@ -305,8 +306,10 @@ export default {
       this.searchTagList();
       this.searchTagList();
     },
     },
     focusOn(newVal) {
     focusOn(newVal) {
+      this.selectIndex = newVal
       this.checkedExc = this.rows[newVal].exclusion === 1;
       this.checkedExc = this.rows[newVal].exclusion === 1;
       this.checkedCon = this.rows[newVal].exclusionCon === 1;
       this.checkedCon = this.rows[newVal].exclusionCon === 1;
+      this.searchTagList()
     },
     },
     /*type() {
     /*type() {
         this.initData();
         this.initData();
@@ -376,7 +379,7 @@ export default {
     searchTagList() {
     searchTagList() {
       let ids = []
       let ids = []
       this.rows.map((it, x) => {
       this.rows.map((it, x) => {
-        if (it.subQuestion) {
+        if (it.subQuestion&&this.selectIndex===x) {
           ids=ids.concat(it.subQuestion.split(','))
           ids=ids.concat(it.subQuestion.split(','))
         }
         }
       });
       });