duy 3 сар өмнө
parent
commit
26491879cb

+ 16 - 1
src/views/tentative/detect/components/basicInfo.vue

@@ -406,6 +406,8 @@ const linksSampleModal = ref(false)
 
 const linkSample = () => {
     linksSampleModal.value = true
+    tableSampleCheckedKeys.value = []
+
 }
 
 
@@ -463,11 +465,24 @@ const linksSampleModalClose = () => {
 }
 const linksSampleModalSave = () => {
     linksSampleModal.value = false
+    console.log(tableSampleCheckedKeys.value, 'tableSampleCheckedKeys.value')
+    if (tableSampleCheckedKeys.value.length > 0) {
+      basicInfoData.value.trialSampleInfoList = tableSampleCheckedKeys.value[0]
+
+    }
+    
 }
 //多选
 const tableSampleCheckedKeys = ref([])
 const linksSampleTableSelection = (rows) => {
-    tableSampleCheckedKeys.value = rows
+   
+    if (rows.length > 1) {
+        window.$message.warning('只能选择一条数据')
+        return
+    }
+     tableSampleCheckedKeys.value = rows
+
+
 }
 //关联委托单
 const linkCommission = ()=>{