From 394fa0ec18d3f49ad1de11c31a0ed66f9523b768 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 4 Aug 2020 10:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=B5=E5=AD=90=E6=B2=99?= =?UTF-8?q?=E7=9B=98=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project.js | 8 +++++++ src/scripts/ConstConfig.js | 3 ++- src/utils/baseUrl.js | 4 ++-- src/views/login/index.vue | 15 ++++++++++--- .../system/deviceManage/editConfigScreen.vue | 22 ++++++++++++++++++- src/views/system/deviceManage/index.vue | 2 +- 6 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/api/project.js b/src/api/project.js index d872bb7bc..d80bfdab0 100644 --- a/src/api/project.js +++ b/src/api/project.js @@ -175,3 +175,11 @@ export function setPlcConfig(id, data) { data: data }); } +/** 添加/修改SANDBOX配置 */ +export function setSandboxConfig(id, data) { + return request({ + url: `/api/device/${id}/config/sandbox`, + method: 'put', + data: data + }); +} diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index 4ccd76d3f..bcddccb54 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -232,7 +232,8 @@ export default { {label: '虚拟CCTV', value: 'CCTV'}, {label: 'PLC网关', value: 'PLC_GATEWAY'}, {label: '端头控制盒', value: 'PSL'}, - {label: 'PSC控制柜', value: 'PSC'} + {label: 'PSC控制柜', value: 'PSC'}, + {label: '虚拟电子沙盘', value: 'SANDBOX'} ] } }; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 778caeb7b..c59924e25 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,9 +2,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 - // BASE_API = 'http://192.168.3.6:9000'; // 旭强 + BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index a381b6e2d..9a05e54d0 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -218,19 +218,20 @@ export default { }, bgImg() { const bgImgAll = process.env.VUE_APP_PRO === 'local' || this.$route.query.project == 'heb' ? '' : bgImg; - const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD']; + const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD', 'SANDBOX']; const imgMap = { ISCS_LW: bgIscsImg, ISCS_CW: bgIscsImg, VR_IBP: bgIbpImg, CCTV: bgCctvImg, VR_PSD: bgPsdImg, - LSW: bgLswImg + LSW: bgLswImg, + SANDBOX: bgLswImg }; return synchronousLogin.includes(this.$route.query.type) ? imgMap[this.$route.query.type] : bgImgAll; }, syncLogin() { - const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD']; + const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD', 'SANDBOX']; return this.$route.query.type ? synchronousLogin.includes(this.$route.query.type) : false; }, loadingText() { @@ -469,6 +470,14 @@ export default { query.psdCode = JSON.parse(res.data.deviceVO.config).psdCode; } this.$router.push({ path: `/jointTrainingNew`, query: query }); + } else if (this.$route.query.type === 'SANDBOX') { + const sandboxQuery = { + mapid: query.mapId, + group: query.group, + project: getSessionStorage('project'), + token: getToken() + }; + this.$router.push({ path: `/jlmap3d/sandbox`, query: sandboxQuery }); } else { this.$router.push({ path: `/jointTrainingNew`, query: query }); } diff --git a/src/views/system/deviceManage/editConfigScreen.vue b/src/views/system/deviceManage/editConfigScreen.vue index e36b619bb..541d70cb9 100644 --- a/src/views/system/deviceManage/editConfigScreen.vue +++ b/src/views/system/deviceManage/editConfigScreen.vue @@ -9,7 +9,7 @@