Browse Source

关联工程及用途部位选中父节点同时选中子节点

duy 2 years ago
parent
commit
5200486181
1 changed files with 7 additions and 14 deletions
  1. 7 14
      src/views/tentative/detect/test-form.vue

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

@@ -106,12 +106,13 @@
                             </template>
                             
                                <DivisionTree 
+                               ref="divisionTree"
                                v-show="!isSearchTree"
                                :datas="unmatchedTreeData" 
                                @nodeTap="divisionTreeClick"
                                 @nodeCheck="divisionTreeCheck"
                                  :defaultCheckarr="defaultCheckarrIds"  
-                                :check-strictly="true"  
+                               
                                 :divisionLoading="isdivisionLoading"
                                 :linksRelateSearchTreeVal="linksRelateSearchTreeVal"
                                 />
@@ -186,6 +187,7 @@ const projectId = ref(useAppState.getProjectId);
 const contractId = ref(useAppState.getContractId);
 const projectInfo = ref(useAppState.getProjectInfo);
 const contractInfo = ref(useAppState.getContractInfo);
+const divisionTree=ref(null)
 //获取模板标签数据
 const isTableForm = ref(false)
 //路由参数
@@ -453,6 +455,7 @@ const checkrelationString=ref([])
 
 const divisionTreeCheck = (data) => {
    checkrelationId.value=data
+   console.log(data,'data');
 }
 const seaElTreeProps = ref({
     label: 'title',
@@ -533,19 +536,9 @@ const linksRelateModalSave =async () => {
             idarr.push(item.primaryKeyId)
         })
         checkrelationString.value=idarr.toString()
-        // listItemBaseData.value.projectPosition=checkrelationString.value
-         linksRelateModal.value = false
-        //  const { error, code, data } = await dataApi.projectpositionSubmit({
-        //     id: dataId,
-        //     projectPosition:checkrelationString.value,
-        // })
-        // if (!error && code === 200) {
-        //     window.$message?.success('操作成功')
-        //    linksRelateModal.value = false
-        // }else {
-        //     window.$message?.warning(error)
-        //      linksRelateModal.value = false 
-        // }   
+      window.$message?.success('操作成功')
+     linksRelateModal.value = false
+   
           
 }
 const linksRelateModalClose = () => {