ZaiZai 10 mēneši atpakaļ
vecāks
revīzija
69ad1742d6
3 mainītis faili ar 8 papildinājumiem un 4 dzēšanām
  1. 2 2
      src/config/index.json
  2. 1 1
      src/store/modules/user.js
  3. 5 1
      src/views/data-fill/wbs.vue

+ 2 - 2
src/config/index.json

@@ -1,7 +1,7 @@
 {
     "version": "20230607160059",
-    "target": "http://192.168.0.102:8090",
-    "target1": "http://39.108.216.210:8090",
+    "target1": "http://192.168.0.102:8090",
+    "target": "http://39.108.216.210:8090",
     "smsPhone": "",
     "vite": {
         "port": 5174,

+ 1 - 1
src/store/modules/user.js

@@ -101,7 +101,7 @@ export const initUserConfigInfo = async () => {
         store.setOrderServiceTipModal(opinionView ?? 1)
         store.setShotWebRtc(shotWebRtc)
         store.setShotWebRtc(fullScreen)
-        const treeStoreWidth = isNullES(treeWidth) ? 440 : treeWidth
+        const treeStoreWidth = (isNullES(treeWidth) || treeWidth <= 0 ) ? 440 : treeWidth
         store.setTreeWidth(treeStoreWidth)
         await userConfigSave({ treeWidth: treeStoreWidth })
         return Promise.resolve(true)

+ 5 - 1
src/views/data-fill/wbs.vue

@@ -570,6 +570,8 @@ const projectInfo = ref(useAppState.projectInfo)
 const contractInfo = ref(useAppState.contractInfo)
 const isCollapse = ref(useAppState.getCollapse)
 const userInfo = ref(useAppState.getUserInfo)
+const leftWidth = ref(440)
+
 //路由参数
 const routerQuery = useRoutes?.query
 // const typeName = routerQuery?.type || 'map'
@@ -634,6 +636,8 @@ watch(() => [
 onMounted(() => {
     console.log(projectInfo.value)
     treeLoading.value = typeName === 'tree'
+    const treeWidth = useAppState.getTreeWidth
+    leftWidth.value = (isNullES(treeWidth) || treeWidth <= 0 ) ? 440 : treeWidth
     setContractType(contractInfo.value?.contractType)
     getDictionaryApi()
 })
@@ -1934,7 +1938,6 @@ const copyPositionText = (val) => {
 }
 
 //左右拖动,改变树形结构宽度
-const leftWidth = ref(useAppState.getTreeWidth ?? 440)
 const isMouseTree = ref(false)
 const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
@@ -1958,6 +1961,7 @@ watch(() => leftWidth.value, (diffVal) => {
 })
 const setUserConfig = async (data) => {
     await useClick()
+    useAppState.setTreeWidth(data)
     await userConfigSave({ treeWidth: data })
 }