加载倾斜模型
图层组件封装
路由相关调整
项目基础路径调整
15 files modified
10 files renamed
9 files copied
3 files added
1 files deleted
| | |
| | | VITE_APP_ENV = 'development' |
| | | |
| | | #接口地址 |
| | | VITE_APP_API=/api |
| | | VITE_APP_API=/zhyqapi |
| | | |
| | | #页面基础路径 |
| | | VITE_APP_BASE=/bigScreen |
| | | VITE_APP_BASE=/zhyq/ |
| | |
| | | ### |
| | | # @Author: shuishen 1109946754@qq.com |
| | | # @Date: 2024-10-25 11:21:30 |
| | | # @LastEditors: shuishen 1109946754@qq.com |
| | | # @LastEditTime: 2024-10-31 10:37:36 |
| | | # @FilePath: \bigScreen\.env.production |
| | | # @Description: |
| | | # |
| | | # Copyright (c) 2024 by shuishen, All Rights Reserved. |
| | | ### |
| | | #生产环境配置 |
| | | VITE_APP_ENV = 'production' |
| | | |
| | | #接口地址 |
| | | #填写前缀 [/api] 需要用nginx进行反向代理 |
| | | #填写地址 [https://api.bladex.cn] 只需要保证接口支持跨域即可, 无需再做代理 |
| | | VITE_APP_API=/api |
| | | VITE_APP_API=/zhyqapi |
| | | |
| | | #页面基础路径 |
| | | VITE_APP_BASE=/bigScreen |
| | | VITE_APP_BASE=/zhyq/ |
| | | |
| | | # 是否在打包时开启压缩,支持 gzip 和 brotli |
| | | VITE_BUILD_COMPRESS = gzip |
| | |
| | | lerna-debug.log* |
| | | |
| | | node_modules |
| | | zhyq |
| | | dist |
| | | dist-ssr |
| | | *.local |
| | |
| | | "@element-plus/icons-vue": "^2.3.1", |
| | | "@fortawesome/fontawesome-free": "^6.6.0", |
| | | "axios": "^1.7.7", |
| | | "crypto-js": "^4.1.1", |
| | | "element-plus": "^2.8.6", |
| | | "element-tree-line": "^0.2.1", |
| | | "js-base64": "^3.7.4", |
| | | "js-md5": "^0.7.3", |
| | | "nprogress": "^0.2.0", |
| | | "pinia": "^2.2.4", |
| | | "pinia-plugin-persist": "^1.0.0", |
| | | "vue": "^3.5.12", |
| | | "vue-router": "^4.4.5", |
| | | "crypto-js": "^4.1.1", |
| | | "js-base64": "^3.7.4", |
| | | "js-md5": "^0.7.3" |
| | | "vue-router": "^4.4.5" |
| | | }, |
| | | "devDependencies": { |
| | | "@vitejs/plugin-basic-ssl": "^1.1.0", |
| | |
| | | element-plus: |
| | | specifier: ^2.8.6 |
| | | version: 2.8.6(vue@3.5.12) |
| | | element-tree-line: |
| | | specifier: ^0.2.1 |
| | | version: 0.2.1(vue@3.5.12) |
| | | js-base64: |
| | | specifier: ^3.7.4 |
| | | version: 3.7.4 |
| | |
| | | - '@vue/composition-api' |
| | | dev: false |
| | | |
| | | /element-tree-line@0.2.1(vue@3.5.12): |
| | | resolution: {integrity: sha512-YWHftDSOFiBuw49drxJV7Yi7pCqPpwBBBeQmySjchcxU3uUOAu72FDLK5RyTGJ5qt4Ci+yoUg7zJqsFP5u7N5A==} |
| | | peerDependencies: |
| | | vue: ^2.6.11 || ^3.2.0 |
| | | dependencies: |
| | | vue: 3.5.12 |
| | | dev: false |
| | | |
| | | /encodeurl@1.0.2: |
| | | resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} |
| | | engines: {node: '>= 0.8'} |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-25 15:09:55 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-10-30 18:09:34 |
| | | * @LastEditTime: 2024-10-31 18:27:53 |
| | | * @FilePath: \bigScreen\src\hooks\initMap.js |
| | | * @Description: |
| | | * |
| | |
| | | |
| | | nextTick(() => { |
| | | DC.ready({ |
| | | baseUrl: `${VITE_APP_BASE}/libs/dc-sdk/resources/` |
| | | baseUrl: `${VITE_APP_BASE}libs/dc-sdk/resources/` |
| | | }).then(() => { |
| | | |
| | | viewer = new DC.Viewer('viewer-container') |
| | |
| | | global.$viewer = viewer |
| | | |
| | | store.setLoadMap(true) |
| | | |
| | | // let layer = new DC.HtmlLayer('layer') |
| | | // viewer.addLayer(layer) |
| | | // let divIcon = new DC.DivIcon( |
| | | // new DC.Position(125, 25), |
| | | // `<div class="public-map-popup"> |
| | | // <div class="marsBlueGradientPnl"> |
| | | // <div>指挥室</div> |
| | | // </div> |
| | | // </div>` |
| | | // ) |
| | | |
| | | // divIcon.setStyle({ |
| | | // }) |
| | | // layer.addOverlay(divIcon) |
| | | }) |
| | | }) |
| | | } |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-25 10:56:27 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-10-28 10:53:47 |
| | | * @LastEditTime: 2024-10-31 11:01:20 |
| | | * @FilePath: \bigScreen\src\main.js |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2024 by shuishen, All Rights Reserved. |
| | | */ |
| | | import { createApp } from 'vue' |
| | | import { createApp, h } from 'vue' |
| | | import { createPinia } from 'pinia' |
| | | import router from '@/router/index' |
| | | |
| | |
| | | // 全局组件自动注册 |
| | | import components from '@/components/index' |
| | | |
| | | import { getElementLabelLine } from 'element-tree-line'; |
| | | import 'element-tree-line/dist/style.css'; |
| | | |
| | | import * as DC from '@dvgis/dc-sdk' |
| | | import '@dvgis/dc-sdk/dist/dc.min.css' |
| | | window.DC = Object.create(DC) //Since the imported DC is read-only, it needs to be re-expanded |
| | |
| | | const pinia = createPinia() |
| | | |
| | | pinia.use(piniaPersistPlugin) |
| | | const ElementLabelLine = getElementLabelLine(h); |
| | | app.component(ElementLabelLine.name, ElementLabelLine); |
| | | |
| | | app.use(router) |
| | | app.use(ElementPlus) |
| | | app.use(pinia) |
| | |
| | | .input { |
| | | margin: 30px 0; |
| | | width: 300px; |
| | | padding: 10px 0px; |
| | | padding: 10px 10px 10px 40px; |
| | | background-color: rgba(0, 0, 0, 0); |
| | | color: #ffffff; |
| | | padding-left: 40px; |
| | | border-width: 0px; |
| | | font-size: 18px; |
| | | } |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-25 16:35:31 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-10-30 15:01:50 |
| | | * @LastEditTime: 2024-10-31 18:22:25 |
| | | * @FilePath: \bigScreen\src\router\index.js |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2024 by shuishen, All Rights Reserved. |
| | | */ |
| | | import { createRouter, createWebHistory } from 'vue-router' |
| | | import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router' |
| | | |
| | | const routes = [ |
| | | { |
| | |
| | | component: () => import('@/views/survey/index.vue') |
| | | }, |
| | | { |
| | | path: 'rs', |
| | | meta: { |
| | | title: '固定风险源' |
| | | }, |
| | | component: () => import('@/views/rs/index.vue') |
| | | }, |
| | | { |
| | | path: 'space', |
| | | meta: { |
| | | title: '应急空间' |
| | |
| | | component: () => import('@/views/supplies/index.vue') |
| | | }, |
| | | { |
| | | path: 'equipment', |
| | | meta: { |
| | | title: '应急设备' |
| | | }, |
| | | component: () => import('@/views/equipment/index.vue') |
| | | }, |
| | | { |
| | | path: 'pac', |
| | | meta: { |
| | | title: '三级防控' |
| | | }, |
| | | component: () => import('@/views/pac/index.vue') |
| | | }, |
| | | { |
| | | path: 'rt', |
| | | meta: { |
| | | title: '救援队伍' |
| | | }, |
| | | component: () => import('@/views/rt/index.vue') |
| | | } |
| | | ] |
| | | }, |
| | |
| | | const { VITE_APP_BASE } = import.meta.env |
| | | |
| | | const router = createRouter({ |
| | | history: createWebHistory(VITE_APP_BASE), |
| | | base: VITE_APP_BASE, |
| | | history: createWebHashHistory(VITE_APP_BASE), |
| | | routes |
| | | }) |
| | | |
| | |
| | | body { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | #app { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .cursor-p { |
| New file |
| | |
| | | .div-icon { |
| | | padding: 0 !important; |
| | | } |
| | | |
| | | .public-map-popup { |
| | | position: absolute; |
| | | bottom: 60px; |
| | | pointer-events: all; |
| | | display: block; |
| | | transform-origin: left bottom; |
| | | transform: translate(-50%, 0px); |
| | | z-index: auto; |
| | | |
| | | .marsBlueGradientPnl { |
| | | text-align: center; |
| | | padding: 5px 30px; |
| | | margin: 0; |
| | | color: #fff; |
| | | background: linear-gradient(rgb(7 10 203 / 75%), rgb(16 238 220)); |
| | | -webkit-border-radius: 5px; |
| | | -moz-border-radius: 5px; |
| | | border-radius: 5px; |
| | | max-height: 130px; |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | white-space: nowrap; |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | bottom: -60px; |
| | | left: calc(50% - 3px); |
| | | display: block; |
| | | width: 3px; |
| | | height: 60px; |
| | | border-right: 3px solid #2bcdbb; |
| | | } |
| | | } |
| | | } |
| | |
| | | @use './container.scss'as *; |
| | | |
| | | .public-map-popup { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | pointer-events: all; |
| | | display: block; |
| | | transform-origin: left bottom; |
| | | z-index: auto; |
| | | |
| | | .marsBlueGradientPnl { |
| | | text-align: center; |
| | | padding: 5px 30px; |
| | | margin: 0; |
| | | color: #fff; |
| | | background: linear-gradient(rgb(7 10 203 / 75%), rgb(16 238 220)); |
| | | -webkit-border-radius: 5px; |
| | | -moz-border-radius: 5px; |
| | | border-radius: 5px; |
| | | max-height: 130px; |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | white-space: nowrap; |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | bottom: -60px; |
| | | left: calc(50% - 3px); |
| | | display: block; |
| | | width: 3px; |
| | | height: 60px; |
| | | border-right: 3px solid #2bcdbb; |
| | | } |
| | | } |
| | | } |
| | | @use './dc-base.scss'as *; |
| | |
| | | path: '/layout/survey' |
| | | }, |
| | | { |
| | | menuName: '固定风险源', |
| | | path: '/layout/rs' |
| | | }, |
| | | { |
| | | menuName: '应急空间', |
| | | path: '/layout/space' |
| | | }, |
| | |
| | | path: '/layout/supplies' |
| | | }, |
| | | { |
| | | menuName: '应急设备', |
| | | path: '/layout/equipment' |
| | | }, |
| | | { |
| | | menuName: '三级防控', |
| | | path: '/layout/pac' |
| | | }, |
| | | { |
| | | menuName: '救援队伍', |
| | | path: '/layout/rt' |
| | | }, |
| | | ] |
| | | ) |
| | | |
| | |
| | | </el-button> |
| | | </div> |
| | | |
| | | <base-map v-show="showBaseMap" @close="closeBox"></base-map> |
| | | |
| | | <base-map v-show="currentComponent == 'map'" @close="closeBox"></base-map> |
| | | <layers-control v-show="currentComponent == 'layers'" @close="closeBox"></layers-control> |
| | | <tool-list :moreToolShow="moreToolShow" @close="closeBox"></tool-list> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import baseMap from './scomponents/baseMap.vue' |
| | | import layersControl from './scomponents/layersControl.vue' |
| | | import toolList from './scomponents/toolList.vue' |
| | | |
| | | let showBaseMap = ref(false) |
| | | const currentComponent = ref('') |
| | | let moreToolShow = ref(false) |
| | | |
| | | const btnGroup = [ |
| | |
| | | { |
| | | name: '图层', |
| | | icon: 'fa fa-tasks', |
| | | key: 'task' |
| | | key: 'layers', |
| | | }, |
| | | { |
| | | name: '工具', |
| | | icon: 'fa fa-cubes', |
| | | key: 'tool' |
| | | key: 'tool', |
| | | }, |
| | | ] |
| | | |
| | | const btnClick = (item) => { |
| | | |
| | | if (item.key == 'map') { |
| | | showBaseMap.value = !showBaseMap.value |
| | | |
| | | } |
| | | |
| | | if (item.key == 'tool') { |
| | | moreToolShow.value = !moreToolShow.value |
| | | } else { |
| | | currentComponent.value = item.key |
| | | } |
| | | } |
| | | |
| | | const closeBox = (type) => { |
| | | if (type == 'map') showBaseMap.value = false |
| | | |
| | | if (type == 'tool') moreToolShow.value = false |
| | | if (type == 'tool') { |
| | | moreToolShow.value = false |
| | | } else { |
| | | currentComponent.value = '' |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | global.$viewer.setTerrain() |
| | | } |
| | | } |
| | | |
| | | let layer = new DC.HtmlLayer('layer') |
| | | global.$viewer.addLayer(layer) |
| | | let divIcon = new DC.DivIcon( |
| | | new DC.Position(124, 24, 100), |
| | | `<div class="public-map-popup"> |
| | | <div class="marsBlueGradientPnl"> |
| | | <div>指挥室</div> |
| | | </div> |
| | | </div>` |
| | | ) |
| | | |
| | | divIcon.setStyle({ |
| | | }) |
| | | layer.addOverlay(divIcon) |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| New file |
| | |
| | | <!-- |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-31 10:47:29 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-10-31 18:16:33 |
| | | * @FilePath: \bigScreen\src\views\layout\components\scomponents\layersControl.vue |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2024 by shuishen, All Rights Reserved. |
| | | --> |
| | | <template> |
| | | <public-box> |
| | | <template #name> |
| | | <div class="name"><i class="fa fa-tasks"></i> 图层</div> |
| | | </template> |
| | | |
| | | <template #close> |
| | | <div class="close" @click="$emit('close', 'layers')"><i class="fa fa-close"></i></div> |
| | | </template> |
| | | |
| | | <template #content> |
| | | <div class="tree-content"> |
| | | <el-tree ref="tree" :data="data" draggable="" show-checkbox node-key="id" :default-expanded-keys="[2, 3]" |
| | | :default-checked-keys="[5]" :props="defaultProps" :indent="treeProps['indent']" @check="handleCheckChange"> |
| | | <template v-slot:default="{ node }"> |
| | | <element-tree-line :node="node" :showLabelLine="treeProps['showLabelLine']" :indent="treeProps['indent']"> |
| | | <!-- 自定义label的slot --> |
| | | <template v-slot:node-label> |
| | | <span style="font-size: 12px"> |
| | | {{ node.label }} |
| | | <i class="el-icon-eleme"></i></span> |
| | | </template> |
| | | <!-- 在右边追加内容的slot --> |
| | | <!-- <template v-slot:after-node-label> |
| | | <span style="padding-right: 10px"> |
| | | <el-button type="primary" size="mini" @click.stop="openDrawer(node)">新增子节点</el-button> |
| | | <el-button type="primary" size="mini" @click.stop="openDrawer(node)">修改</el-button> |
| | | <el-button type="danger" size="mini" @click.stop="openDialog">删除</el-button></span> |
| | | </template> --> |
| | | </element-tree-line> |
| | | </template> |
| | | </el-tree> |
| | | </div> |
| | | </template> |
| | | </public-box> |
| | | </template> |
| | | |
| | | <script setup> |
| | | const { VITE_APP_BASE } = import.meta.env |
| | | import { getViewer } from 'utils/getViewer' |
| | | const globalViewer = getViewer() |
| | | |
| | | const treeProps = { |
| | | indent: 16, |
| | | showLabelLine: true, |
| | | } |
| | | |
| | | const data = [ |
| | | { |
| | | id: 1, |
| | | label: '三维模型', |
| | | children: [ |
| | | { |
| | | id: 4, |
| | | label: '倾斜摄影', |
| | | children: [ |
| | | { |
| | | id: 9, |
| | | label: '化工园区', |
| | | type: 'layer', |
| | | subType: '3Dtile', |
| | | url: VITE_APP_BASE + 'mx/tileset.json' |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | ] |
| | | |
| | | const defaultProps = { |
| | | children: 'children', |
| | | label: 'label', |
| | | } |
| | | |
| | | const checkType = (value) => { |
| | | if (typeof value === 'object' && value !== null && !Array.isArray(value)) { |
| | | return 'obj' |
| | | } else if (Array.isArray(value)) { |
| | | return 'arr' |
| | | } |
| | | } |
| | | // 用于存储收集到的节点的数组 |
| | | const collectedNodes = reactive([]) |
| | | |
| | | // 递归函数,收集所有 flag 为 true 的子节点 |
| | | const collectNodesWithFlag = (nodes) => { |
| | | if (checkType(nodes) == 'obj') { |
| | | if (nodes.type == 'layer') { |
| | | collectedNodes.value.push(nodes) |
| | | } |
| | | if (nodes.children && nodes.children.length > 0) { |
| | | collectNodesWithFlag(nodes.children) |
| | | return |
| | | } |
| | | } |
| | | |
| | | if (checkType(nodes) == 'arr') { |
| | | nodes.forEach(item => { |
| | | if (item.type == 'layer') { |
| | | collectedNodes.value.push(item) |
| | | } |
| | | |
| | | if (item.children && item.children.length > 0) { |
| | | collectNodesWithFlag(item.children) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | let addTileLayers = {} |
| | | let tileLayers = new DC.TilesetLayer('tileLayers') |
| | | globalViewer.addLayer(tileLayers) |
| | | |
| | | const handleCheckChange = (data, options) => { |
| | | collectedNodes.value = [] |
| | | collectNodesWithFlag(data) |
| | | |
| | | collectedNodes.value.forEach(item => { |
| | | if (options.checkedKeys.some(i => i == item.id)) { |
| | | if (item.subType == '3Dtile') { |
| | | addTileLayers[item.layerName] = new DC.Tileset( |
| | | item.url |
| | | ) |
| | | tileLayers.addOverlay(addTileLayers[item.layerName]) |
| | | globalViewer.flyTo(addTileLayers[item.layerName]) |
| | | } |
| | | } else { |
| | | if (item.subType == '3Dtile') { |
| | | tileLayers.removeOverlay(addTileLayers[item.layerName]) |
| | | |
| | | delete addTileLayers[item.layerName] |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .tree-content { |
| | | min-width: 200px; |
| | | padding: 10px; |
| | | |
| | | ::v-deep(.el-tree) { |
| | | color: #fff; |
| | | background: transparent; |
| | | |
| | | /* 鼠标浮动过的背景颜色 */ |
| | | .el-tree-node__content:hover { |
| | | background: #0074b7; |
| | | } |
| | | |
| | | /* 鼠标点击时节点的背景颜色 */ |
| | | .el-tree-node:focus>.el-tree-node__content { |
| | | background-color: #0074b7 !important; |
| | | color: rgb(255, 255, 255); |
| | | } |
| | | |
| | | /* 鼠标失去焦点时节点背景的颜色 */ |
| | | .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content { |
| | | background: rgb(0, 129, 204); |
| | | } |
| | | } |
| | | } |
| | | </style> |
copy from src/views/equipment/components/box/dataContent.vue
copy to src/views/rs/components/box/dataContent.vue
copy from src/views/equipment/components/box/fireContent.vue
copy to src/views/rs/components/box/fireContent.vue
copy from src/views/equipment/components/box/fireSource.vue
copy to src/views/rs/components/box/fireSource.vue
copy from src/views/equipment/components/box/fireTrend.vue
copy to src/views/rs/components/box/fireTrend.vue
copy from src/views/equipment/components/box/occurStatistics.vue
copy to src/views/rs/components/box/occurStatistics.vue
copy from src/views/equipment/components/box/publicContent.vue
copy to src/views/rs/components/box/publicContent.vue
copy from src/views/equipment/components/box/unitContent.vue
copy to src/views/rs/components/box/unitContent.vue
copy from src/views/equipment/components/rightContainer.vue
copy to src/views/rs/components/rightContainer.vue
copy from src/views/equipment/index.vue
copy to src/views/rs/index.vue
| New file |
| | |
| | | <!-- |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-03-10 15:27:59 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-10-25 18:43:23 |
| | | * @FilePath: \bigScreen\src\views\statistics\components\leftContainer.vue |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. |
| | | --> |
| | | <script setup> |
| | | import dataContent from './box/dataContent.vue' |
| | | import unitContent from './box/unitContent.vue' |
| | | import fireContent from './box/fireContent.vue' |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="left-container"> |
| | | <div class="data box"> |
| | | <title-box> |
| | | <template #titleName> |
| | | 数据概览2 |
| | | </template> |
| | | </title-box> |
| | | <data-content></data-content> |
| | | </div> |
| | | |
| | | <div class="unit box"> |
| | | <title-box> |
| | | <template #titleName> |
| | | 入住单位统计 |
| | | </template> |
| | | </title-box> |
| | | <unit-content></unit-content> |
| | | </div> |
| | | |
| | | <div class="fire box"> |
| | | <title-box> |
| | | <template #titleName> |
| | | 实时火警事件 |
| | | </template> |
| | | </title-box> |
| | | <fire-content></fire-content> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-25 10:56:27 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-10-30 16:06:44 |
| | | * @LastEditTime: 2024-10-31 18:23:13 |
| | | * @FilePath: \bigScreen\vite.config.js |
| | | * @Description: |
| | | * |
| | |
| | | |
| | | // 根据是否生产环境,动态设置压缩配置 |
| | | const buildConfig = { |
| | | outDir: 'manage', |
| | | outDir: 'zhyq', |
| | | target: 'esnext', |
| | | minify: isProd ? 'terser' : 'esbuild', // 根据环境选择压缩工具 |
| | | } |
| | |
| | | https: true, |
| | | host: '0.0.0.0', |
| | | proxy: { |
| | | '/api': { |
| | | '/zhyqapi': { |
| | | // target: 'http://localhost', |
| | | target: 'https://wrj.shuixiongit.com/zhyqapi', |
| | | changeOrigin: true, |
| | | rewrite: path => path.replace(/^\/api/, ''), |
| | | rewrite: path => path.replace(/^\/zhyqapi/, ''), |
| | | }, |
| | | }, |
| | | }, |