From 08731839685fe0404be8fc1be17bb573ff431cd6 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 22 Jul 2025 16:04:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E7=AD=89=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 8 +- src/action/storageManage.js | 2 +- src/http/request.js | 3 +- src/http/robot_request.js | 10 +- src/router/index.js | 6 +- src/views/home/components/center-two.vue | 2 +- .../home/components/control-deck-new.vue | 1035 +++++++++++++++++ .../modal-content/add-or-edit-marker-form.vue | 33 +- .../components/modal-content/control-deck.vue | 18 +- src/views/home/components/right-one.vue | 20 +- src/views/home/components/right-two/index.vue | 16 +- .../home/components/right-two/taps-two.vue | 2 +- src/views/home/index.vue | 3 +- 13 files changed, 1110 insertions(+), 48 deletions(-) create mode 100644 src/views/home/components/control-deck-new.vue diff --git a/.env.production b/.env.production index 08c8d52..0259bbe 100644 --- a/.env.production +++ b/.env.production @@ -1,9 +1,9 @@ VITE_APP_name = 机器人 - 大屏 VITE_APP_content = 机器人 # 请求的base api -VITE_APP_baseApiURL = /sbdRobot -VITE_APP_robotBaseApiURL = http://sgwpdm.ah.sgcc.com.cn/iws/sbdRobot +VITE_APP_baseApiURL = /iws/sbdRobot +VITE_APP_robotBaseApiURL = http://112.31.70.193:1854/icvs2/ # 路由的base api -VITE_APP_routeBasePath = /bnsRobot -VITE_APP_biuldBase = /robot-screen-ui +VITE_APP_routeBasePath = /rebotWeb +VITE_APP_biuldBase = ./ VITE_APP_imgPreviewUrl = http://sgwpdm.ah.sgcc.com.cn/iws/minioFile/robot \ No newline at end of file diff --git a/src/action/storageManage.js b/src/action/storageManage.js index d5d882d..6d3108d 100644 --- a/src/action/storageManage.js +++ b/src/action/storageManage.js @@ -11,7 +11,7 @@ import StorageS from 'storages-js' const allStorage = {} function createS(key, value) { if (!allStorage[key]) { - allStorage[key] = new StorageS(key, value, { modelName: 'local' }) + allStorage[key] = new StorageS(key, value, { modelName: 'session' }) } return allStorage[key] } diff --git a/src/http/request.js b/src/http/request.js index 2751fe1..b44528b 100644 --- a/src/http/request.js +++ b/src/http/request.js @@ -27,7 +27,8 @@ service.interceptors.request.use( // config.headers['token'] = userData.userInfo.token if (userData?.userInfo?.token) { - config.headers['Authorization'] = 'Bearer ' + userData?.userInfo?.token + // config.headers['Authorization'] = 'Bearer ' + userData?.userInfo?.token + config.headers['Token'] = userData?.userInfo?.token } else { config.headers['Token'] = 'test' } diff --git a/src/http/robot_request.js b/src/http/robot_request.js index dbea7e1..921dd79 100644 --- a/src/http/robot_request.js +++ b/src/http/robot_request.js @@ -26,11 +26,11 @@ service.interceptors.request.use( config.headers = config.headers || {} // config.headers['token'] = userData.userInfo.token - if (userData?.userInfo?.token) { - config.headers['Authorization'] = 'Bearer ' + userData?.userInfo?.token - } else { - config.headers['Token'] = 'test' - } + // if (userData?.userInfo?.token) { + // config.headers['Authorization'] = 'Bearer ' + userData?.userInfo?.token + // } else { + // config.headers['Token'] = 'test' + // } return config }, () => { diff --git a/src/router/index.js b/src/router/index.js index a88276a..1906364 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,7 +2,7 @@ * 路由列表部分 * 所有路由必须先手动写好,然后由后端菜单接口来进行匹配并且指定是否显示 */ -import { createWebHistory, createRouter } from 'vue-router' +import { createWebHistory, createWebHashHistory, createRouter } from 'vue-router' /** * 为路由配置meta相当于为该路由配置了基本信息,配置的属性如下 * title 用作标签显示字样的字段 @@ -181,8 +181,8 @@ export const constantRoutes = [ ] const router = createRouter({ - history: createWebHistory(import.meta.env.VITE_APP_routeBasePath), - // history: createWebHistory(), + // history: createWebHistory(import.meta.env.VITE_APP_routeBasePath), + history: createWebHashHistory(), routes: constantRoutes, }) diff --git a/src/views/home/components/center-two.vue b/src/views/home/components/center-two.vue index 6e0d079..aded9b8 100644 --- a/src/views/home/components/center-two.vue +++ b/src/views/home/components/center-two.vue @@ -290,7 +290,7 @@ onMounted(() => { nextTick(() => { const container = marqueeContainer.value imgWidth.value = (container.clientWidth - 40) / 4 - imgHeight.value = `${container.clientHeight * 0.68}` + imgHeight.value = `${container.clientHeight * 0.78}` }) }) diff --git a/src/views/home/components/control-deck-new.vue b/src/views/home/components/control-deck-new.vue new file mode 100644 index 0000000..6bdf562 --- /dev/null +++ b/src/views/home/components/control-deck-new.vue @@ -0,0 +1,1035 @@ + + + + diff --git a/src/views/home/components/modal-content/add-or-edit-marker-form.vue b/src/views/home/components/modal-content/add-or-edit-marker-form.vue index f13be6b..8d971ff 100644 --- a/src/views/home/components/modal-content/add-or-edit-marker-form.vue +++ b/src/views/home/components/modal-content/add-or-edit-marker-form.vue @@ -2,10 +2,10 @@ -
+
- +
@@ -393,3 +393,28 @@ onBeforeUnmount(() => { } }) + + diff --git a/src/views/home/components/modal-content/control-deck.vue b/src/views/home/components/modal-content/control-deck.vue index c31190a..3054fc5 100644 --- a/src/views/home/components/modal-content/control-deck.vue +++ b/src/views/home/components/modal-content/control-deck.vue @@ -248,42 +248,42 @@ onMounted(async () => {}) } .row-3-item-1, .row-3-item-3 { - width: 100px; - height: 100px; - margin: 42px auto 0; + width: 68px; + height: 68px; + margin: 20px auto 0; position: relative; background: url('@/assets/home-imgs/control-2-round.png') no-repeat center center; background-size: 100% 100%; > img { - width: 24px; - height: 26px; + width: 18px; + height: 18px; cursor: pointer; object-fit: contain; } .arrow-top { position: absolute; - top: 6px; + top: 1px; left: 50%; transform: translateX(-50%) rotate(-90deg); } .arrow-right { position: absolute; top: 50%; - right: 8px; + right: 1px; transform: translateY(-50%); } .arrow-bottom { position: absolute; - bottom: 6px; + bottom: 1px; left: 50%; transform: translateX(-50%) rotate(90deg); } .arrow-left { position: absolute; top: 50%; - left: 8px; + left: 1px; transform: translateY(-50%) rotate(-180deg); } diff --git a/src/views/home/components/right-one.vue b/src/views/home/components/right-one.vue index 532fc99..635ca80 100644 --- a/src/views/home/components/right-one.vue +++ b/src/views/home/components/right-one.vue @@ -152,7 +152,7 @@ :scroll-x="10" flex-height :columns="tableColumns_1" - :style="{ height: `70%` }" + :style="{ height: `50%` }" v-if="activeIndex === 0" /> @@ -220,11 +220,11 @@ :scroll-x="10" :data="tableData_2" :columns="tableColumns_2" - :style="{ height: `70%` }" + :style="{ height: `50%` }" v-if="activeIndex === 1" /> -
+
-
+
{ message.success('下发成功') getProjectPersonList() } else { - message.error(res.message) + message.error(res.msg) } } const onHandlePartSend = async () => { @@ -1053,7 +1053,7 @@ onUpdated(() => { .more-panel-card { width: 80%; - height: 90vh; + height: 120vh; display: flex; flex-direction: column; background: url('@/assets/home-imgs/modal-bg.png') no-repeat center center; @@ -1107,15 +1107,15 @@ onUpdated(() => { .tabs-btns { display: flex; - margin: 8px 0; + margin: 6px 0; .tabs-btn { - width: 100px; - height: 42px; + width: 90px; + height: 32px; background-color: #1b4589; color: #fff; text-align: center; - line-height: 42px; + line-height: 32px; cursor: pointer; } diff --git a/src/views/home/components/right-two/index.vue b/src/views/home/components/right-two/index.vue index 5a0ed44..f51291b 100644 --- a/src/views/home/components/right-two/index.vue +++ b/src/views/home/components/right-two/index.vue @@ -89,10 +89,10 @@ const activeIndex = ref(0) const currentComponent = ref('comp-a') const compareList = ref([ - { title: '巡检次数', total: 58, amount: 26, unit: '次' }, - { title: '巡检照片', total: 100, amount: 100, unit: '张' }, - { title: '比对次数', total: 100, amount: 100, unit: '次' }, - { title: '异常数量', total: 100, amount: 100, unit: '项' }, + { title: '巡检次数', total: 0, amount: 0, unit: '次' }, + { title: '巡检照片', total: 0, amount: 0, unit: '张' }, + { title: '比对次数', total: 0, amount: 0, unit: '次' }, + { title: '异常数量', total: 0, amount: 0, unit: '项' }, ]) const componentMap = { 'comp-a': TapsOne, @@ -247,7 +247,7 @@ const onHandleTabs = (component, index) => { .more-panel-card { width: 80%; - height: 80vh; + height: 120vh; display: flex; flex-direction: column; background: url('@/assets/home-imgs/modal-bg.png') no-repeat center center; @@ -265,12 +265,12 @@ const onHandleTabs = (component, index) => { margin: 20px 0; .tabs-btn { - width: 100px; - height: 42px; + width: 90px; + height: 32px; background-color: #1b4589; color: #fff; text-align: center; - line-height: 42px; + line-height: 32px; cursor: pointer; } diff --git a/src/views/home/components/right-two/taps-two.vue b/src/views/home/components/right-two/taps-two.vue index 3117229..0368d99 100644 --- a/src/views/home/components/right-two/taps-two.vue +++ b/src/views/home/components/right-two/taps-two.vue @@ -68,7 +68,7 @@ const queryParams = ref({ onMounted(() => { const tableContainer = tableContainerRef.value if (tableContainer) { - imageHeight.value = ((tableContainer.clientHeight - 10) / 2) * 0.68 + imageHeight.value = ((tableContainer.clientHeight - 10) / 2) * 0.78 imageWidth.value = (tableContainer.clientWidth - 30) / 4 } }) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index f230aab..d55bbca 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -55,7 +55,7 @@
- +
@@ -89,6 +89,7 @@ import CenterTwo from './components/center-two.vue' // 中二 import RightOne from './components/right-one.vue' // 右一 import RightTwo from './components/right-two/index.vue' // 右二 import ControlDeck from './components/control-deck.vue' // 控制台 +import ControlDeckNew from './components/control-deck-new.vue' // 控制台 import { decrypt, encrypt } from '@/utils/encrypt' import { getRobotTokenFn, getRobotDeviceListFn } from '@/utils/getRobotInfo' // 获取机器人信息