diff --git a/src/config/getData.js b/src/config/getData.js index 9ce63eb..779c64a 100644 --- a/src/config/getData.js +++ b/src/config/getData.js @@ -13,6 +13,7 @@ export const stopMapping = () => post('teaching/stopMapping', {}) export const getLocalMaps = () => post('teaching/getLocalMaps', {}) export const oneClickDeployment = (map) => post('teaching/oneClickDeployment?mapName=' + map, {}) export const abandonMapping = () => post('teaching/abandonMapping', {}) +export const sendAutoBack = () => post('teaching/sendAutoBack', {}) // 操作 export const queryStation = () => post('api/operate/queryStation', {}) diff --git a/src/config/mork.js b/src/config/mork.js index 1792e8e..656a7c9 100644 --- a/src/config/mork.js +++ b/src/config/mork.js @@ -192,4 +192,11 @@ export const queryErrorDataByCode = (code) => { ] } return res +} +export const setStation = (sn, code) => { + let res = { + code: 200, + message: 'ok' + } + return res } \ No newline at end of file diff --git a/src/i18n/langs/en.js b/src/i18n/langs/en.js index feba33f..08124d3 100644 --- a/src/i18n/langs/en.js +++ b/src/i18n/langs/en.js @@ -113,5 +113,11 @@ module.exports = { Syncsuccessfully: 'Sync successfully', EnablePointCloud: 'Enable Point Cloud', DisablePointCloud: 'Disable Point Cloud', - CartPosition: 'Cart Position' + CartPosition: 'Cart Position', + Whetherdrivebackpoint: 'Whether to automatically drive back to the previous point?', + yes: 'Yes', + no: 'No', + Dispatchnotconnected: 'Dispatch is not connected', + Vehiclenotconnected: 'Vehicle body is not connected', + Dispatchvehiclenotconnected: 'Dispatch and the vehicle body are not connected.' } diff --git a/src/i18n/langs/zh.js b/src/i18n/langs/zh.js index faff3ef..e06bfec 100644 --- a/src/i18n/langs/zh.js +++ b/src/i18n/langs/zh.js @@ -113,5 +113,11 @@ module.exports = { Syncsuccessfully: '同步成功', EnablePointCloud: '开启点云', DisablePointCloud: '关闭点云', - CartPosition: '小车位置' + CartPosition: '小车位置', + Whetherdrivebackpoint: '是否自动开回上一个点?', + yes: '是', + no: '否', + Dispatchnotconnected: '调度未连接', + Vehiclenotconnected: '车辆本体未连接', + Dispatchvehiclenotconnected: '调度和车辆本体未连接' } diff --git a/src/pages/modules/building.vue b/src/pages/modules/building.vue index dd69bc2..f4dfaaa 100644 --- a/src/pages/modules/building.vue +++ b/src/pages/modules/building.vue @@ -14,7 +14,7 @@ - + @@ -56,11 +56,11 @@ @@ -476,6 +480,17 @@ export default { .button_control_s p font-size .27rem +.icon-delt + padding 0 + height: 0.3rem; + line-height: .3rem; + width: 0.3rem; + font-size: .16rem; + right: -0.1rem; + top: -0.1rem; + &:focus, &:hover + background-color: #c3390c; + border-color: #ed865c; .enClass .button_control p line-height .22rem diff --git a/src/pages/modules/gl-map-1 copy.vue b/src/pages/modules/gl-map-1 copy.vue deleted file mode 100644 index 9c5217f..0000000 --- a/src/pages/modules/gl-map-1 copy.vue +++ /dev/null @@ -1,576 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/pages/modules/gl-map-1.vue b/src/pages/modules/gl-map-1.vue deleted file mode 100644 index 985f7a1..0000000 --- a/src/pages/modules/gl-map-1.vue +++ /dev/null @@ -1,610 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/pages/modules/gl-map-2.vue b/src/pages/modules/gl-map-2.vue deleted file mode 100644 index ffe3b73..0000000 --- a/src/pages/modules/gl-map-2.vue +++ /dev/null @@ -1,576 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/pages/modules/gl-map.vue b/src/pages/modules/gl-map.vue index c083d74..bbbccc9 100644 --- a/src/pages/modules/gl-map.vue +++ b/src/pages/modules/gl-map.vue @@ -1,53 +1,77 @@ - - diff --git a/src/pages/shells/index.vue b/src/pages/shells/index.vue index 5feb9d9..07dda1c 100644 --- a/src/pages/shells/index.vue +++ b/src/pages/shells/index.vue @@ -30,7 +30,7 @@
{{$t('ErrorPrompt')}}:{{ exception }}
- +
@@ -107,7 +107,9 @@ export default { // "en_error_description": null, // "error_type": 1} // ], - // forkTipObstacles: '1' + // forkTipObstacles: '1', + // auto_loop_enable: '0', + // auto_back_enable: '' // }, taskSeq: [], currentStep: null, @@ -184,6 +186,11 @@ export default { }, // 初始化WebSocket连接 initWebSocket () { + this.loading = this.$loading({ + lock: true, + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.6)' + }) if (this.reconnectTimer) clearTimeout(this.reconnectTimer) const wsHost = this.serverUrl.replace(/^https?:\/\//, '') const lang = this.$i18n.locale.slice(0, 2) @@ -194,6 +201,16 @@ export default { this.websocket.onmessage = (event) => { try { const res = JSON.parse(event.data) + if (!res.data.rcsConnected && !res.data.vehicleConnected) { + this.$message.error(this.$t('Dispatchvehiclenotconnected')) + } else if (!res.data.rcsConnected && res.data.vehicleConnected) { + this.$message.error(this.$t('Dispatchnotconnected')) + } else if (!res.data.vehicleConnected && res.data.rcsConnected) { + this.$message.error(this.$t('Vehiclenotconnected')) + } + if (res.data.rcsConnected && res.data.vehicleConnected) { + this.loading.close() + } this.handleWebSocketMessage(res) } catch (error) { console.error('WebSocket消息解析失败:', error) @@ -203,6 +220,7 @@ export default { this.$message.error(this.$t('WebSocketerror') + ':', error) } this.websocket.onclose = () => { + this.loading.close() this.topInfo = {} this.taskSeq = [] this.currentStep = null @@ -233,7 +251,7 @@ export default { this.reconnectTimer = setTimeout(() => { this.$message.error(this.$t('AttreconnectWebSocket')) this.initWebSocket() - }, 5000) // 5秒后重连 + }, 3000) // 3秒后重连 } } } @@ -295,8 +313,8 @@ export default { top .48rem left 0 width 100% - height .3rem - line-height .3rem + height .4rem + line-height .4rem overflow hidden white-space nowrap background-color rgba(253, 246, 236, .4) @@ -310,7 +328,7 @@ export default { margin-right .05rem .error-tips-t display inline-block - font-size .16rem + font-size .24rem color #e6bb3c .task_wraper position fixed diff --git a/src/style/common.styl b/src/style/common.styl index fd62247..cfb1ae9 100644 --- a/src/style/common.styl +++ b/src/style/common.styl @@ -78,7 +78,7 @@ // element css .el-loading-spinner i - font-size .24rem + font-size .5rem color #fff .el-button font-size .2rem @@ -255,7 +255,7 @@ .driver-popover.driverjs-theme .driver-popover-description, .driver-popover.driverjs-theme .driver-popover-progress-text { color: #000; - font-size: 18px; + font-size: 22px; } .driver-popover.driverjs-theme button { @@ -265,7 +265,7 @@ color: #ffffff; border: 2px solid #000; text-shadow: none; - font-size: 14px; + font-size: 20px; padding: 5px 8px; border-radius: 6px; } @@ -346,7 +346,7 @@ .main-conatiner width 100% height calc(100% - .48rem) - padding .3rem 0 .6rem 0 + padding .4rem 0 .6rem 0 .page_container _wh(96%, 100%) padding .09rem diff --git a/src/vuex/modules/data.js b/src/vuex/modules/data.js index 8e9f5e1..e7d9940 100644 --- a/src/vuex/modules/data.js +++ b/src/vuex/modules/data.js @@ -4,14 +4,18 @@ const state = { carPosition: {x: '', y: '', angle: ''}, isTop: false, errorData: [], - backIoStatus: '0' + backIoStatus: '0', + autoLoopEnable: '0', + autoBackEnable: '' } const getters = { carPosition: state => state.carPosition, isTop: state => state.isTop, errorData: state => state.errorData, - backIoStatus: state => state.backIoStatus + backIoStatus: state => state.backIoStatus, + autoLoopEnable: state => state.autoLoopEnable, + autoBackEnable: state => state.autoBackEnable } const actions = { @@ -37,6 +41,12 @@ const mutations = { if (Object.prototype.hasOwnProperty.call(data, 'forkTipObstacles')) { state.backIoStatus = data.forkTipObstacles } + if (Object.prototype.hasOwnProperty.call(data, 'auto_loop_enable')) { + state.autoLoopEnable = data.auto_loop_enable + } + if (Object.prototype.hasOwnProperty.call(data, 'auto_back_enable')) { + state.autoBackEnable = data.auto_back_enable + } } }