浏览代码

关联取样修改

duy 3 月之前
父节点
当前提交
26491879cb
共有 1 个文件被更改,包括 16 次插入1 次删除
  1. 16 1
      src/views/tentative/detect/components/basicInfo.vue

+ 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 = ()=>{