diff --git a/.env.production b/.env.production index 0081d3c..5399991 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,2 @@ NODE_ENV=production -# VUE_APP_API_BASE_URL=http://localhost:8011 -VUE_APP_API_BASE_URL=http://192.168.100.201:8011 \ No newline at end of file +VUE_APP_API_BASE_URL=http://localhost:8011 \ No newline at end of file diff --git a/package.json b/package.json index 9535589..4b2c4fe 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "hammerjs": "^2.0.8", "jsencrypt": "^3.3.2", "lodash": "^4.17.21", + "pixi.js": "^8.12.0", "simple-keyboard": "^3.8.72", "simple-keyboard-layouts": "^3.4.114", "three": "^0.179.1", diff --git a/src/config/getData.js b/src/config/getData.js index db8a17d..2dd3c0d 100644 --- a/src/config/getData.js +++ b/src/config/getData.js @@ -7,7 +7,8 @@ export const authlogin = (username, password) => post('auth/login', { }) // 建图 export const startMapping = (na) => post('teaching/startMapping?mapName=' + na, {}) -export const setStation = (sn) => post('teaching/setStation?stationName=' + sn, {}) +export const getMappingStatus = () => post('teaching/getMappingStatus', {}) +export const setStation = (sn, code) => post('teaching/setStation?stationName=' + sn + '&stationCode=' + code, {}) export const stopMapping = () => post('teaching/stopMapping', {}) export const getLocalMaps = () => post('teaching/getLocalMaps', {}) export const oneClickDeployment = (map) => post('teaching/oneClickDeployment?mapName=' + map, {}) diff --git a/src/config/http.js b/src/config/http.js index 13190ac..07d8d70 100644 --- a/src/config/http.js +++ b/src/config/http.js @@ -1,7 +1,8 @@ import axios from 'axios' import i18n from '../i18n/i18n' +import store from '../vuex/store' -const urlHost = process.env.VUE_APP_API_BASE_URL +const urlHost = store.getters.serverUrl axios.defaults.timeout = 50000 axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8' diff --git a/src/config/mork.js b/src/config/mork.js index b8709ba..d1c69f5 100644 --- a/src/config/mork.js +++ b/src/config/mork.js @@ -103,3 +103,19 @@ export const startMapping = () => { } return res } +export const stopMapping = () => { + let res = { + code: 200, + message: 'ok' + } + return res +} +export const getMappingStatus = () => { + let res = { + code: 200, + message: 'ok', + mapping_return: '2', + mapping_percent: '100' + } + return res +} diff --git a/src/main.js b/src/main.js index e7efd5a..92b1400 100644 --- a/src/main.js +++ b/src/main.js @@ -5,13 +5,12 @@ import store from './vuex/store' import './style/reset.css' import VueTouchKeyboard from 'vue-touch-keyboard' import 'vue-touch-keyboard/dist/vue-touch-keyboard.css' -import { Row, Col, Button, Icon, Dialog, Form, FormItem, Input, Select, Option, Table, TableColumn, Tabs, TabPane, Popover, Loading, MessageBox, Message, Steps, Step } from 'element-ui' +import { Row, Col, Button, Icon, Dialog, Form, FormItem, Input, Select, Option, Table, TableColumn, Tabs, TabPane, Popover, Loading, MessageBox, Message, Progress, Steps, Step } from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' import './style/common.styl' import i18n from './i18n/i18n' import './config/rem.js' import {post} from './config/http.js' -import JSEncrypt from 'jsencrypt' Vue.config.productionTip = false @@ -31,6 +30,7 @@ Vue.use(Tabs) Vue.use(TabPane) Vue.use(Popover) Vue.use(Loading) +Vue.use(Progress) Vue.use(Steps) Vue.use(Step) Vue.prototype.$confirm = MessageBox.confirm @@ -46,30 +46,14 @@ Vue.prototype.$langPre = { } } -const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD\n' + - '2iRe41HdTNF8RUhNnHit5NpMNtGL0NPTSSpPjjI1kJfVorRvaQerUgkCAwEAAQ==' - -const privateKey = 'MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8\n' + - 'mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9p\n' + - 'B6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue\n' + - '/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZ\n' + - 'UBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6\n' + - 'vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha\n' + - '4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3\n' + - 'tTbklZkD2A==' - -// 加密 -export function encrypt (txt) { - const encryptor = new JSEncrypt() - encryptor.setPublicKey(publicKey) // 设置公钥 - return encryptor.encrypt(txt) // 对需要加密的数据进行加密 +// 从本地存储中读取 serverUrl,userRole +const savedServerUrl = localStorage.getItem('serverUrl'); +const savedUserRole = localStorage.getItem('userRole'); +if (savedServerUrl) { + store.commit('SET_BASE_URL', savedServerUrl); } - -// 解密 -export function decrypt (txt) { - const encryptor = new JSEncrypt() - encryptor.setPrivateKey(privateKey) - return encryptor.decrypt(txt) +if (savedUserRole) { + store.commit('SET_USER_ROLE', parseInt(savedUserRole, 10)); } Vue.filter('findByValue', (array, value) => { diff --git a/src/pages/modules/building.vue b/src/pages/modules/building.vue index a64d5a5..797d82f 100644 --- a/src/pages/modules/building.vue +++ b/src/pages/modules/building.vue @@ -3,7 +3,7 @@ - + @@ -13,8 +13,8 @@ :visible.sync="dialogVisible" width="50%"> - - + + @@ -29,17 +29,30 @@

{{ message }}

+
+ +
+ +
+
- - diff --git a/src/pages/modules/gl-map的副本.vue b/src/pages/modules/gl-map的副本.vue deleted file mode 100644 index 8ac6ead..0000000 --- a/src/pages/modules/gl-map的副本.vue +++ /dev/null @@ -1,384 +0,0 @@ - - - - - diff --git a/src/pages/modules/map.vue b/src/pages/modules/map.vue index 5da1407..344e695 100644 --- a/src/pages/modules/map.vue +++ b/src/pages/modules/map.vue @@ -106,7 +106,7 @@ export default { } }, computed: { - ...mapGetters(['carPosition']) + ...mapGetters(['serverUrl', 'carPosition']) }, watch: { carPosition: { @@ -172,8 +172,7 @@ export default { } return new Promise((resolve, reject) => { const img = new Image() - const urlHost = process.env.VUE_APP_API_BASE_URL - img.src = `${urlHost}${this.mapData.mapImageAddress}` + img.src = `${this.serverUrl}${this.mapData.mapImageAddress}` // img.src = this.mapData.mapImageAddress img.onload = () => { this.cachedImages.map = img diff --git a/src/pages/modules/map1.vue b/src/pages/modules/map1.vue deleted file mode 100644 index 5c966fc..0000000 --- a/src/pages/modules/map1.vue +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - diff --git a/src/pages/modules/map2.vue b/src/pages/modules/map2.vue deleted file mode 100644 index fb2ec0e..0000000 --- a/src/pages/modules/map2.vue +++ /dev/null @@ -1,430 +0,0 @@ - - - - - - diff --git a/src/pages/modules/point-cloud-map.vue b/src/pages/modules/point-cloud-map.vue new file mode 100644 index 0000000..d2f9a01 --- /dev/null +++ b/src/pages/modules/point-cloud-map.vue @@ -0,0 +1,295 @@ + + + + + \ No newline at end of file diff --git a/src/pages/shells/config-modal.vue b/src/pages/shells/config-modal.vue index 10a5eb7..c4fdee3 100644 --- a/src/pages/shells/config-modal.vue +++ b/src/pages/shells/config-modal.vue @@ -17,6 +17,9 @@

{{$t('Parameterconfiguration')}}

+ + + @@ -33,16 +36,21 @@ + + diff --git a/src/pages/shells/login-modal.vue b/src/pages/shells/login-modal.vue index a58881a..1d6435d 100644 --- a/src/pages/shells/login-modal.vue +++ b/src/pages/shells/login-modal.vue @@ -4,7 +4,7 @@ :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> -

登录成功

+

登录成功

{{$t('Notloggedinyet')}}

@@ -14,7 +14,7 @@
- + @@ -23,6 +23,7 @@