diff --git a/.env.development b/.env.development index e1394ff..ebb6d1b 100644 --- a/.env.development +++ b/.env.development @@ -2,10 +2,10 @@ NODE_ENV = 'development' # 本地环境接口地址(/api/index.ts文件中使用) -VITE_API_URL = 'http://192.168.34.155:6688' +# VITE_API_URL = 'http://192.168.34.155:6688' # VITE_API_URL = 'http://2xliv7gs.shenzhuo.vip:55296' VITE_WPAPI_URL = "http://182.90.224.147:8081" -# VITE_API_URL = "http://182.90.224.147:9013" +VITE_API_URL = "http://182.90.224.147:9013" # 上传 # VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url=' diff --git a/src/stores/index.ts b/src/stores/index.ts index 47fee2b..2df4efd 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -30,6 +30,8 @@ export const GlobalStore = defineStore({ // language language: "", path: null, + // 进度计划默认选中 + leftMenuIndex: 0, // themeConfig themeConfig: { // 当前页面是否全屏 diff --git a/src/stores/interface/index.ts b/src/stores/interface/index.ts index a966d46..80bdbe3 100644 --- a/src/stores/interface/index.ts +++ b/src/stores/interface/index.ts @@ -16,6 +16,7 @@ export interface GlobalState { openDropdown: boolean | null; path: string | null; isManager: string | null; + leftMenuIndex: number; } /* themeConfigProp */ diff --git a/src/views/goverment/huizhou/progressManagement/GanttchartChart/index.vue b/src/views/goverment/huizhou/progressManagement/GanttchartChart/index.vue index 5fd62b8..5873283 100644 --- a/src/views/goverment/huizhou/progressManagement/GanttchartChart/index.vue +++ b/src/views/goverment/huizhou/progressManagement/GanttchartChart/index.vue @@ -129,6 +129,8 @@ import { bigItemGovermentAll } from "@/api/modules/huizhou"; import LeftMenu from "@/components/LeftMenu/LeftMenu.vue"; import { getDustprojectPage, getDustengineeringPage } from "@/api/modules/goverment"; import { sendIframeMessage } from "@/utils/util"; +import { GlobalStore } from "@/stores"; +const store = GlobalStore(); const modelActive = ref(null); const route = useRoute(); const headerList = reactive([ @@ -342,8 +344,8 @@ const getEngPage = async () => { }; onMounted(async () => { await getEngPage(); - if (route.query.menuIndex) { - modelActive.value = route.query.menuIndex; + if (store.leftMenuIndex) { + modelActive.value = store.leftMenuIndex; onSearch(records.value[modelActive.value]); searchSn.value = (records.value as any[])[modelActive.value].projectSn; searchName.value = (records.value as any[])[modelActive.value].projectName; diff --git a/src/views/goverment/huizhou/projectMonitoring/progressManagement/index.vue b/src/views/goverment/huizhou/projectMonitoring/progressManagement/index.vue index 142b96e..52a8747 100644 --- a/src/views/goverment/huizhou/projectMonitoring/progressManagement/index.vue +++ b/src/views/goverment/huizhou/projectMonitoring/progressManagement/index.vue @@ -256,7 +256,8 @@ const proTable = ref(); const searchSn = ref(""); // 跳转至甘特图 const seeGantt = () => { - router.push("/goverment/huizhou/progressManagement/GanttchartChart/index?menuIndex=" + leftMenuIndex.value); + store.leftMenuIndex = leftMenuIndex.value; + router.push("/goverment/huizhou/progressManagement/GanttchartChart/index"); }; // 添加数据按钮 const handleAddItem = () => {