Przeglądaj źródła

关联工程用途及部位关闭弹窗限制

duy 2 lat temu
rodzic
commit
89d78682a2
1 zmienionych plików z 12 dodań i 7 usunięć
  1. 12 7
      src/views/tentative/detect/test-form.vue

+ 12 - 7
src/views/tentative/detect/test-form.vue

@@ -352,13 +352,18 @@ const searchTreeClick = async () => {
 }
 //确认关联
 const linksRelateModalSave = () => {
-    linksRelateModal.value = false
-    console.log(checkrelationId.value,'checkrelationId.valu');
-    let idarr=[]
-    checkrelationId.value.forEach((item)=>{
-        idarr.push(item.primaryKeyId)
-    })
-    checkrelationString.value=idarr.toString()
+    if(checkrelationId.value.length>0){
+        let idarr=[]
+        checkrelationId.value.forEach((item)=>{
+            idarr.push(item.primaryKeyId)
+        })
+        checkrelationString.value=idarr.toString()
+          linksRelateModal.value = false
+    }else{
+         window.$message?.warning('请选择你要关联的数据')
+    }
+  
+   
 }
 const linksRelateModalClose = () => {
     linksRelateModal.value = false