Ver Fonte

改变面板宽度

duy há 1 semana atrás
pai
commit
c558de7e6e
3 ficheiros alterados com 23 adições e 7 exclusões
  1. 1 1
      package.json
  2. 18 2
      src/views/data-fill/wbs.vue
  3. 4 4
      yarn.lock

+ 1 - 1
package.json

@@ -25,7 +25,7 @@
         "dayjs": "^1.11.13",
         "echarts": "^5.5.1",
         "element-plus": "^2.8.7",
-        "hc-vue3-ui": "^4.8.5",
+        "hc-vue3-ui": "^4.8.6",
         "js-base64": "^3.7.7",
         "js-fast-way": "^0.5.7",
         "js-md5": "^0.8.3",

+ 18 - 2
src/views/data-fill/wbs.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="h-full">
-        <hc-page-split v-if="wbsTypeTabKey === 'tree'">
+        <hc-page-split v-if="wbsTypeTabKey === 'tree'" ref="pageSplitRef">
             <template #left>
                 <div class="left-box-container bg-white">
                     <div class="hc-project-box">
@@ -1505,17 +1505,32 @@ watch(
         }
     },
 )
+const pageSplitRef = ref(null)
+
+watch(() => pageSplitRef.value?.leftPanelWidth, (newWidth) => {
+  
+        // pageSplitRef.value?.setLeftWidth(newWidth)
+         setUserConfig(newWidth)
+   
+})
 //渲染完成
 onMounted(() => {
     console.log(projectInfo.value)
     treeLoading.value = typeName === 'tree'
     const treeWidth = useAppState.getTreeWidth
     leftWidth.value = isNullES(treeWidth) || treeWidth <= 0 ? 440 : treeWidth
-    console.log(contractInfo.value, 'contractInfo.value')
     setContractType(contractInfo.value?.contractType)
     getDictionaryApi()
     getStandardTypeOptions()
     getMajorDataTypeOptions()
+
+    setUserConfig( leftWidth.value)
+
+    nextTick(() => {
+        pageSplitRef.value?.setLeftWidth( leftWidth.value)
+    })
+     
+    
 })
 
 //身份按钮切换数据
@@ -3255,6 +3270,7 @@ const setUserConfig = async (data) => {
     await useClick()
     useAppState.setTreeWidth(data)
     await userConfigSave({ treeWidth: data })
+
 }
 
 //同步质检资料

+ 4 - 4
yarn.lock

@@ -2109,10 +2109,10 @@ has-flag@^4.0.0:
   resolved "http://219.151.181.73:9000/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
   integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
 
-hc-vue3-ui@^4.8.5:
-  version "4.8.5"
-  resolved "http://219.151.181.73:9000/hc-vue3-ui/-/hc-vue3-ui-4.8.5.tgz#3c2a159f5337b37b93d6b8ae466a395dc122ba3b"
-  integrity sha512-awTXjNeBkDpTsqsCCT4MAI2d3XFFR2a/wdIH5BeF+FDJwa/LDeEISv6g3JQrIF3NKZxaB8qEpQcpcHr9dlvQvA==
+hc-vue3-ui@^4.8.6:
+  version "4.8.6"
+  resolved "http://219.151.181.73:9000/hc-vue3-ui/-/hc-vue3-ui-4.8.6.tgz#f234633109d7feb46fb08a99d433995d8ed5b910"
+  integrity sha512-TuB/Tris0GfvYI59k8EiSRDl/5WWqkI+bURI6TxZgR2kCLlJmhHfLc4rD0RoMT0tePoPb2L3ja7aSrSrMCTY6w==
   dependencies:
     axios "^1.7.7"
     dayjs "^1.11.13"