Преглед на файлове

关联取样信息多选框回显

duy преди 2 години
родител
ревизия
41affabaad
променени са 1 файла, в които са добавени 9 реда и са изтрити 1 реда
  1. 9 1
      src/views/tentative/detect/test-form.vue

+ 9 - 1
src/views/tentative/detect/test-form.vue

@@ -138,7 +138,7 @@
 </template>
 
 <script setup>
-import {ref, watch, onMounted} from "vue";
+import {ref, watch, onMounted,nextTick} from "vue";
 import {useAppStore} from "~src/store";
 import {useRouter, useRoute} from 'vue-router'
 import ListItem from "./components/ListItem.vue"
@@ -484,6 +484,14 @@ const getLinksSampleData = async () => {
     linksSampleTableLoading.value = false
     if (!error && code === 200) {
         linksSampleTableData.value = getArrValue(data)
+         linksSampleTableData.value.forEach((iten)=>{
+             if(iten.isRelation===1){
+                 nextTick(()=>{
+                    tableSampleRef.value?.toggleRowSelection(iten,true);
+                })
+                    
+             }
+         })
         //searchForm.value.total = data.total || 0
     } else {
         linksSampleTableData.value = []