Explorar o código

关联取样信息多选框回显

duy %!s(int64=2) %!d(string=hai) anos
pai
achega
41affabaad
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  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 = []