diff --git a/package.json b/package.json index a7e8a90..7e29dfb 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "dependencies": { "axios": "^1.11.0", "core-js": "^3.8.3", - "driver.js": "^1.3.6", "element-ui": "^2.15.14", "jsencrypt": "^3.5.4", "lodash": "^4.17.21", diff --git a/src/config/getData.js b/src/config/getData.js index 65d40a2..c270d64 100644 --- a/src/config/getData.js +++ b/src/config/getData.js @@ -1,8 +1,8 @@ import {post, get} from './http.js' // 登录 -export const authlogin = (username, password) => post('auth/login', { - username: username, +export const authlogin = (username, password) => post('auth/login ', { + userName: username, password: password }) // 建图 diff --git a/src/config/mork.js b/src/config/mork.js index 609b3f6..bfe1e8e 100644 --- a/src/config/mork.js +++ b/src/config/mork.js @@ -1,4 +1,15 @@ /* eslint-disable */ +export const authlogin = (username, password) => { + let res = { + "code":200, + "msg":"ok", + "data":{ + user:{"user_id":"1","userName":"admin","password":"dlfjlfjl"}, + "token":"aaa" + } + } + return res +} export const queryStation = () => { let res = { message: 'ok', @@ -39,32 +50,292 @@ export const queryMapAllStation = () => { { "station_id": 1, "station_code": "A", - "station_name": "A", - "station_type": "STATION", + "station_name": "起点", + "station_type": "Station", "action_type": "Customize", - "x": 0.0, - "y": 0.0, - "angle": 0.014406 + "x": 1.20309, + "y": -0.238922, + "angle": -0.006407 }, { "station_id": 2, - "station_code": "B1", - "station_name": "B1", - "station_type": "Charge", - "action_type": "Customize", - "x": -3.30318, - "y": 0.123685, - "angle": 0.0959 + "station_code": "Goal_0_1", + "station_name": "Goal_0_1", + "station_type": "System", + "action_type": "Move", + "x": 4.01522, + "y": 0.062834, + "angle": -0.006407 }, { "station_id": 3, - "station_code": "C", - "station_name": "C", - "station_type": "STATION", + "station_code": "Goal_110", + "station_name": "Goal_110", + "station_type": "System", + "action_type": "Move", + "x": 7.99832, + "y": 0.134056, + "angle": -0.053431 + }, + { + "station_id": 4, + "station_code": "Goal_176", + "station_name": "Goal_176", + "station_type": "System", + "action_type": "Move", + "x": 5.10127, + "y": -3.07691, + "angle": 1.61271 + }, + { + "station_id": 5, + "station_code": "Goal_383", + "station_name": "Goal_383", + "station_type": "System", + "action_type": "Move", + "x": 14.5274, + "y": 0.03366, + "angle": 0.013351 + }, + { + "station_id": 6, + "station_code": "Goal_410", + "station_name": "Goal_410", + "station_type": "System", + "action_type": "Move", + "x": 12.6986, + "y": 0.770049, + "angle": -0.86102 + }, + { + "station_id": 7, + "station_code": "Goal_427", + "station_name": "Goal_427", + "station_type": "System", + "action_type": "Move", + "x": 12.2807, + "y": 1.59568, + "angle": -1.37231 + }, + { + "station_id": 8, + "station_code": "Goal_491", + "station_name": "Goal_491", + "station_type": "System", + "action_type": "Move", + "x": 15.4681, + "y": 0.438255, + "angle": -0.114802 + }, + { + "station_id": 9, + "station_code": "Goal_492", + "station_name": "Goal_492", + "station_type": "System", + "action_type": "Move", + "x": 16.7354, + "y": 0.366603, + "angle": 0.031423 + }, + { + "station_id": 10, + "station_code": "Goal_492_1", + "station_name": "Goal_492_1", + "station_type": "System", + "action_type": "Move", + "x": 20.2118, + "y": 0.675766, + "angle": 0.031423 + }, + { + "station_id": 11, + "station_code": "Goal_492_2", + "station_name": "Goal_492_2", + "station_type": "System", + "action_type": "Move", + "x": 23.6881, + "y": 0.98493, + "angle": 0.031423 + }, + { + "station_id": 12, + "station_code": "Goal_492_3", + "station_name": "Goal_492_3", + "station_type": "System", + "action_type": "Move", + "x": 27.1645, + "y": 1.29409, + "angle": 0.031423 + }, + { + "station_id": 13, + "station_code": "Goal_671", + "station_name": "Goal_671", + "station_type": "System", + "action_type": "Move", + "x": 30.6409, + "y": 1.60326, + "angle": 0.01186 + }, + { + "station_id": 14, + "station_code": "Goal_698", + "station_name": "Goal_698", + "station_type": "System", + "action_type": "Move", + "x": 28.635, + "y": 1.82256, + "angle": -0.262026 + }, + { + "station_id": 15, + "station_code": "Goal_732", + "station_name": "Goal_732", + "station_type": "System", + "action_type": "Move", + "x": 27.2028, + "y": 3.34653, + "angle": -1.65472 + }, + { + "station_id": 16, + "station_code": "B3autoexit", + "station_name": "11", + "station_type": "Station", "action_type": "Customize", - "x": -6.0227, - "y": 0.316379, - "angle": 0.136773 + "x": 27.3059, + "y": 4.42557, + "angle": -1.60744 + }, + { + "station_id": 17, + "station_code": "Goal_770", + "station_name": "Goal_770", + "station_type": "System", + "action_type": "Move", + "x": 27.1454, + "y": 2.76668, + "angle": -1.88084 + }, + { + "station_id": 18, + "station_code": "Goal_810", + "station_name": "Goal_810", + "station_type": "System", + "action_type": "Move", + "x": 24.5172, + "y": 1.17209, + "angle": -2.97125 + }, + { + "station_id": 19, + "station_code": "Goal_810_1", + "station_name": "Goal_810_1", + "station_type": "System", + "action_type": "Move", + "x": 21.2668, + "y": 0.891475, + "angle": -2.97125 + }, + { + "station_id": 20, + "station_code": "Goal_810_2", + "station_name": "Goal_810_2", + "station_type": "System", + "action_type": "Move", + "x": 18.0164, + "y": 0.610859, + "angle": -2.97125 + }, + { + "station_id": 21, + "station_code": "Goal_810_3", + "station_name": "Goal_810_3", + "station_type": "System", + "action_type": "Move", + "x": 14.7661, + "y": 0.330243, + "angle": -2.97125 + }, + { + "station_id": 22, + "station_code": "Goal_810_4", + "station_name": "Goal_810_4", + "station_type": "System", + "action_type": "Move", + "x": 11.5157, + "y": 0.049627, + "angle": -2.97125 + }, + { + "station_id": 23, + "station_code": "Goal_810_5", + "station_name": "Goal_810_5", + "station_type": "System", + "action_type": "Move", + "x": 8.26531, + "y": -0.23099, + "angle": -2.97125 + }, + { + "station_id": 24, + "station_code": "Goal_1025", + "station_name": "Goal_1025", + "station_type": "System", + "action_type": "Move", + "x": 5.01493, + "y": -0.511606, + "angle": 3.12921 + }, + { + "station_id": 25, + "station_code": "Goal_1060", + "station_name": "Goal_1060", + "station_type": "System", + "action_type": "Move", + "x": 3.96083, + "y": -0.313295, + "angle": 0.889684 + }, + { + "station_id": 26, + "station_code": "Goal_1096", + "station_name": "Goal_1096", + "station_type": "System", + "action_type": "Move", + "x": 4.00651, + "y": -0.279691, + "angle": 0.44301 + }, + { + "station_id": 27, + "station_code": "B1autoexit", + "station_name": "呃呃", + "station_type": "Station", + "action_type": "Customize", + "x": 5.19619, + "y": -4.90243, + "angle": 1.6751 + }, + { + "station_id": 28, + "station_code": "B2autoexit", + "station_name": "B2autoexit", + "station_type": "Station", + "action_type": "Customize", + "x": 12.2051, + "y": 2.63079, + "angle": -1.56037 + }, + { + "station_id": 29, + "station_code": "Goal_1097", + "station_name": "Goal_1097", + "station_type": "System", + "action_type": "Move", + "x": 2.33115, + "y": -0.196742, + "angle": 0.036939 } ] return res @@ -75,23 +346,375 @@ export const getRouteInfo = () => { "route_id": 1, "start_id": 1, "end_id": 2, - "start_x": 0.0, - "start_y": 0.0, - "end_x": -3.30318, - "end_y": 0.123685, - "navigation_mode": "1", + "start_x": 1.20309, + "start_y": -0.238922, + "end_x": 4.01522, + "end_y": 0.0628335, + "navigation_mode": "0", "route_type": "1" }, { "route_id": 2, "start_id": 2, "end_id": 3, - "start_x": -3.30318, - "start_y": 0.123685, - "end_x": -6.0227, - "end_y": 0.316379, + "start_x": 4.01522, + "start_y": 0.0628335, + "end_x": 7.99832, + "end_y": 0.134056, "navigation_mode": "0", "route_type": "1" + }, + { + "route_id": 3, + "start_id": 3, + "end_id": 4, + "start_x": 7.99832, + "start_y": 0.134056, + "end_x": 5.10127, + "end_y": -3.07691, + "navigation_mode": "1", + "route_type": "0" + }, + { + "route_id": 4, + "start_id": 4, + "end_id": 27, + "start_x": 5.10127, + "start_y": -3.07691, + "end_x": 5.19619, + "end_y": -4.90243, + "navigation_mode": "1", + "route_type": "1" + }, + { + "route_id": 5, + "start_id": 3, + "end_id": 5, + "start_x": 7.99832, + "start_y": 0.134056, + "end_x": 14.5274, + "end_y": 0.0336595, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 6, + "start_id": 5, + "end_id": 6, + "start_x": 14.5274, + "start_y": 0.0336595, + "end_x": 12.6986, + "end_y": 0.770049, + "navigation_mode": "1", + "route_type": "0" + }, + { + "route_id": 7, + "start_id": 6, + "end_id": 7, + "start_x": 12.6986, + "start_y": 0.770049, + "end_x": 12.2807, + "end_y": 1.59568, + "navigation_mode": "1", + "route_type": "0" + }, + { + "route_id": 8, + "start_id": 7, + "end_id": 28, + "start_x": 12.2807, + "start_y": 1.59568, + "end_x": 12.2051, + "end_y": 2.63079, + "navigation_mode": "1", + "route_type": "1" + }, + { + "route_id": 9, + "start_id": 5, + "end_id": 8, + "start_x": 14.5274, + "start_y": 0.0336595, + "end_x": 15.4681, + "end_y": 0.438255, + "navigation_mode": "0", + "route_type": "0" + }, + { + "route_id": 10, + "start_id": 8, + "end_id": 9, + "start_x": 15.4681, + "start_y": 0.438255, + "end_x": 16.7354, + "end_y": 0.366603, + "navigation_mode": "0", + "route_type": "0" + }, + { + "route_id": 11, + "start_id": 9, + "end_id": 10, + "start_x": 16.7354, + "start_y": 0.366603, + "end_x": 20.2118, + "end_y": 0.675766, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 12, + "start_id": 10, + "end_id": 11, + "start_x": 20.2118, + "start_y": 0.675766, + "end_x": 23.6881, + "end_y": 0.98493, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 13, + "start_id": 11, + "end_id": 12, + "start_x": 23.6881, + "start_y": 0.98493, + "end_x": 27.1645, + "end_y": 1.29409, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 14, + "start_id": 12, + "end_id": 13, + "start_x": 27.1645, + "start_y": 1.29409, + "end_x": 30.6409, + "end_y": 1.60326, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 15, + "start_id": 13, + "end_id": 14, + "start_x": 30.6409, + "start_y": 1.60326, + "end_x": 28.635, + "end_y": 1.82256, + "navigation_mode": "1", + "route_type": "1" + }, + { + "route_id": 16, + "start_id": 14, + "end_id": 15, + "start_x": 28.635, + "start_y": 1.82256, + "end_x": 27.2028, + "end_y": 3.34653, + "navigation_mode": "1", + "route_type": "0" + }, + { + "route_id": 17, + "start_id": 15, + "end_id": 16, + "start_x": 27.2028, + "start_y": 3.34653, + "end_x": 27.3059, + "end_y": 4.42557, + "navigation_mode": "1", + "route_type": "1" + }, + { + "route_id": 18, + "start_id": 16, + "end_id": 17, + "start_x": 27.3059, + "start_y": 4.42557, + "end_x": 27.1454, + "end_y": 2.76668, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 19, + "start_id": 17, + "end_id": 18, + "start_x": 27.1454, + "start_y": 2.76668, + "end_x": 24.5172, + "end_y": 1.17209, + "navigation_mode": "0", + "route_type": "0" + }, + { + "route_id": 20, + "start_id": 18, + "end_id": 19, + "start_x": 24.5172, + "start_y": 1.17209, + "end_x": 21.2668, + "end_y": 0.891475, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 21, + "start_id": 19, + "end_id": 20, + "start_x": 21.2668, + "start_y": 0.891475, + "end_x": 18.0164, + "end_y": 0.610859, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 22, + "start_id": 20, + "end_id": 21, + "start_x": 18.0164, + "start_y": 0.610859, + "end_x": 14.7661, + "end_y": 0.330243, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 23, + "start_id": 21, + "end_id": 22, + "start_x": 14.7661, + "start_y": 0.330243, + "end_x": 11.5157, + "end_y": 0.0496265, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 24, + "start_id": 22, + "end_id": 23, + "start_x": 11.5157, + "start_y": 0.0496265, + "end_x": 8.26531, + "end_y": -0.23099, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 25, + "start_id": 23, + "end_id": 24, + "start_x": 8.26531, + "start_y": -0.23099, + "end_x": 5.01493, + "end_y": -0.511606, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 26, + "start_id": 24, + "end_id": 25, + "start_x": 5.01493, + "start_y": -0.511606, + "end_x": 3.96083, + "end_y": -0.313295, + "navigation_mode": "0", + "route_type": "0" + }, + { + "route_id": 27, + "start_id": 25, + "end_id": 26, + "start_x": 3.96083, + "start_y": -0.313295, + "end_x": 4.00651, + "end_y": -0.279691, + "navigation_mode": "1", + "route_type": "1" + }, + { + "route_id": 28, + "start_id": 26, + "end_id": 29, + "start_x": 4.00651, + "start_y": -0.279691, + "end_x": 2.33115, + "end_y": -0.196742, + "navigation_mode": "1", + "route_type": "0" + }, + { + "route_id": 29, + "start_id": 4, + "end_id": 3, + "start_x": 5.10127, + "start_y": -3.07691, + "end_x": 7.99832, + "end_y": 0.134056, + "navigation_mode": "0", + "route_type": "0" + }, + { + "route_id": 30, + "start_id": 27, + "end_id": 4, + "start_x": 5.19619, + "start_y": -4.90243, + "end_x": 5.10127, + "end_y": -3.07691, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 31, + "start_id": 6, + "end_id": 5, + "start_x": 12.6986, + "start_y": 0.770049, + "end_x": 14.5274, + "end_y": 0.0336595, + "navigation_mode": "0", + "route_type": "0" + }, + { + "route_id": 32, + "start_id": 7, + "end_id": 6, + "start_x": 12.2807, + "start_y": 1.59568, + "end_x": 12.6986, + "end_y": 0.770049, + "navigation_mode": "0", + "route_type": "0" + }, + { + "route_id": 33, + "start_id": 28, + "end_id": 7, + "start_x": 12.2051, + "start_y": 2.63079, + "end_x": 12.2807, + "end_y": 1.59568, + "navigation_mode": "0", + "route_type": "1" + }, + { + "route_id": 34, + "start_id": 29, + "end_id": 1, + "start_x": 2.33115, + "start_y": -0.196742, + "end_x": 1.20309, + "end_y": -0.238922, + "navigation_mode": "1", + "route_type": "1" } ] return res @@ -99,16 +722,16 @@ export const getRouteInfo = () => { export const imageUrl = require('../images/new/apt_map.png') export const getMapInfoByCode = () => { let res = { - "mapCode": "apt_map_1752651599720.png", - "mapName": "apt_map_1752651599720.png", + "mapCode": "apt_map_20250902005122", + "mapName": "apt_map_20250902005122", "mapImageAddress": imageUrl, - "width": 359.0, - "height": 287.0, + "width": 1159.0, + "height": 363.0, "resolution": 0.05, - "x": -13.7, - "y": -7.1, + "x": -5.04466, + "y": -9.11043, "angle": 0.0 - } +} return res } export const startMapping = () => { diff --git a/src/hubRouter/index.js b/src/hubRouter/index.js deleted file mode 100644 index 3501061..0000000 --- a/src/hubRouter/index.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue' -import VueRouter from 'vue-router' - -const Login = r => require.ensure([], () => r(require('../pages/modules/login/index.vue')), 'login') -const Hub = r => require.ensure([], () => r(require('../pages/modules/hub/index.vue')), 'Hub') -Vue.use(VueRouter) - -const router = new VueRouter({ - routes: [ - { - path: '/', - redirect: '/login' - }, - { - path: '/login', - component: Login - }, - { - path: '/hub', - component: Hub - } - ] -}) - -export default router diff --git a/src/i18n/langs/en.js b/src/i18n/langs/en.js index 5cbf9c6..22806a3 100644 --- a/src/i18n/langs/en.js +++ b/src/i18n/langs/en.js @@ -123,5 +123,6 @@ module.exports = { Vehiclereturnpoint: 'Vehicle return point', autobackfailedmanually:'The automatic fallback has failed. Please take over manually.', vehicleautobacknotmanwaitcompleted: 'The vehicle is in the process of automatic fallback. Do not manually move the vehicle. Please wait until the automatic fallback is completed.', - yousurereposition: 'Are you sure you want to reposition?' + yousurereposition: 'Are you sure you want to reposition?', + systemcalculatingnotmovevehicle: 'The system is calculating whether an automatic fallback is possible. Do not move the vehicle.' } diff --git a/src/i18n/langs/zh.js b/src/i18n/langs/zh.js index f42c9b2..7a3e580 100644 --- a/src/i18n/langs/zh.js +++ b/src/i18n/langs/zh.js @@ -123,5 +123,6 @@ module.exports = { Vehiclereturnpoint: '车辆返回点', autobackfailedmanually:'自动回退失败,请手动接管。', vehicleautobacknotmanwaitcompleted: '车子正在自动回退中,请勿手动移动车辆,等待车辆自动回退完成。', - yousurereposition: '是否确定重定位?' + yousurereposition: '是否确定重定位?', + systemcalculatingnotmovevehicle: '正在计算是否可以自动回退,请勿移动车辆' } diff --git a/src/images/new/apt_map.png b/src/images/new/apt_map.png index c8c180d..bbc79aa 100644 Binary files a/src/images/new/apt_map.png and b/src/images/new/apt_map.png differ diff --git a/src/images/new/car.png b/src/images/new/car.png deleted file mode 100644 index 1806599..0000000 Binary files a/src/images/new/car.png and /dev/null differ diff --git a/src/images/new/step_1.jpg b/src/images/new/step_1.jpg new file mode 100644 index 0000000..0a09612 Binary files /dev/null and b/src/images/new/step_1.jpg differ diff --git a/src/images/new/step_2.jpg b/src/images/new/step_2.jpg new file mode 100644 index 0000000..50e5f68 Binary files /dev/null and b/src/images/new/step_2.jpg differ diff --git a/src/images/new/step_3.jpg b/src/images/new/step_3.jpg new file mode 100644 index 0000000..4b31576 Binary files /dev/null and b/src/images/new/step_3.jpg differ diff --git a/src/main.js b/src/main.js index 1580c90..c58778e 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,6 @@ import Vue from 'vue' import App from './App.vue' import router from './router' -// import router from './hubRouter' import store from './vuex/store' import './style/reset.css' import { Row, Col, Button, Icon, Dialog, Form, FormItem, Input, Select, Option, Table, TableColumn, Tabs, TabPane, Popover, Loading, MessageBox, Message, Progress, Upload } from 'element-ui' diff --git a/src/pages/modules/build/driver-modal.vue b/src/pages/modules/build/driver-modal.vue new file mode 100644 index 0000000..beec127 --- /dev/null +++ b/src/pages/modules/build/driver-modal.vue @@ -0,0 +1,65 @@ + + + + + + 1.车辆将自动扫描周边环境,拖动车辆即可开始记录行走路线; + + + + 2.当车辆移动到目标工位点时,点击「打点」按钮,即可保存当前位置为工位点; + + + + 3.路线与工位点记录完成后,点击「结束建图」,等待系统自动生成地图即可。 + + + 我知道了 + + + + + + diff --git a/src/pages/modules/build/gl-map.vue b/src/pages/modules/build/gl-map.vue index bc178e1..ed4b48d 100644 --- a/src/pages/modules/build/gl-map.vue +++ b/src/pages/modules/build/gl-map.vue @@ -13,9 +13,9 @@ /* eslint-disable */ import * as THREE from 'three' import { mapGetters } from 'vuex' -// import { points } from '../../config/point.js' -// import { points1 } from '../../config/point1.js' -// import { points2 } from '../../config/point2.js' +// import { points } from '@/config/point.js' +// import { points1 } from '@/config/point1.js' +// import { points2 } from '@/config/point2.js' export default { name: 'PointCloudMap', data() { diff --git a/src/pages/modules/build/index copy.vue b/src/pages/modules/build/index copy.vue new file mode 100644 index 0000000..d7bae0e --- /dev/null +++ b/src/pages/modules/build/index copy.vue @@ -0,0 +1,615 @@ + + + + + + + + + {{$t('MarkPoint')}} + {{cloudOff ? $t('EnablePointCloud') : $t('DisablePointCloud')}} + {{$t('CartPosition')}}: {{ carPosition.x }}, {{carPosition.y}} + + + {{ autoBackEnable }}, {{autoBackFinish}} + + + {{$t('AbandonMapbuild')}} + {{$t('FinishMapbuild')}} + + + + + + + + + + + {{$t('Cancel')}} + {{$t('Save')}} + + + + + + {{ message }} + + + + + + {{warnTip ? $t('Mapdeployed') : $t('Mapgenerated')}} + + + + + + {{autoBackFinish === '2' ? $t('autobackfailedmanually') : $t('vehicleautobacknotmanwaitcompleted')}} + {{$t('Confirm')}} + + + + + + + + diff --git a/src/pages/modules/build/index.vue b/src/pages/modules/build/index.vue index 37feada..cdf738f 100644 --- a/src/pages/modules/build/index.vue +++ b/src/pages/modules/build/index.vue @@ -4,14 +4,13 @@ - + {{$t('MarkPoint')}} {{cloudOff ? $t('EnablePointCloud') : $t('DisablePointCloud')}} {{$t('CartPosition')}}: {{ carPosition.x }}, {{carPosition.y}} - {{ autoBackEnable }}, {{autoBackFinish}} {{$t('AbandonMapbuild')}} @@ -59,18 +58,19 @@ {{$t('Confirm')}} +
1.车辆将自动扫描周边环境,拖动车辆即可开始记录行走路线;
2.当车辆移动到目标工位点时,点击「打点」按钮,即可保存当前位置为工位点;
3.路线与工位点记录完成后,点击「结束建图」,等待系统自动生成地图即可。
我知道了
{{$t('MarkPoint')}}
{{cloudOff ? $t('EnablePointCloud') : $t('DisablePointCloud')}}
{{$t('AbandonMapbuild')}}
{{$t('FinishMapbuild')}}
{{$t('Cancel')}}
{{$t('Save')}}
{{ message }}
{{$t('Confirm')}}