Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
32d3983d70
Binary file not shown.
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 16 KiB |
@ -31,22 +31,22 @@ export default {
|
|||||||
{
|
{
|
||||||
name: 'global.designPlatformEntrance',
|
name: 'global.designPlatformEntrance',
|
||||||
handle: this.goToDesign,
|
handle: this.goToDesign,
|
||||||
hidden: getSessionStorage('design')
|
hidden: getSessionStorage('project') === 'design'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'global.trainingPlatformEntrance',
|
name: 'global.trainingPlatformEntrance',
|
||||||
handle: this.goToTraining,
|
handle: this.goToTraining,
|
||||||
hidden: !getSessionStorage('design')
|
hidden: getSessionStorage('project') !== 'design'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'global.scan',
|
name: 'global.scan',
|
||||||
handle: this.qcodeEntry,
|
handle: this.qcodeEntry,
|
||||||
hidden: process.env.NODE_ENV != 'development' || getSessionStorage('design')
|
hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project') === 'design'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'global.quickEntry',
|
name: 'global.quickEntry',
|
||||||
handle: this.quickEntry,
|
handle: this.quickEntry,
|
||||||
hidden: getSessionStorage('design')
|
hidden: getSessionStorage('project') === 'design'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: LangStorage.getLang('zh')==='zh'?'English':'中文',
|
name: LangStorage.getLang('zh')==='zh'?'English':'中文',
|
||||||
|
@ -104,7 +104,7 @@ export default {
|
|||||||
this.routes = this.$router.options.routes;
|
this.routes = this.$router.options.routes;
|
||||||
if (this.$route.fullPath.indexOf('design/userlist')>=0) {
|
if (this.$route.fullPath.indexOf('design/userlist')>=0) {
|
||||||
this.activePath='/design/userlist/home';
|
this.activePath='/design/userlist/home';
|
||||||
} else if (this.$route.fullPath.indexOf('design/lesson')>=0 || this.$route.fullPath.indexOf('design/script')>=0 || this.$route.fullPath.indexOf('design/runPlan')>=0) {
|
} else if (this.$route.fullPath.includes('design/lesson') || this.$route.fullPath.includes('design/script') || this.$route.fullPath.includes('design/runPlan') || this.$route.fullPath.includes('design/mapPreview')) {
|
||||||
this.activePath='/design/home';
|
this.activePath='/design/home';
|
||||||
} else {
|
} else {
|
||||||
this.activePath=this.$route.path;
|
this.activePath=this.$route.path;
|
||||||
|
@ -1,39 +1,30 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="avatar-container" style="margin-left:40px;">
|
<div class="avatar-container" style="margin-left:40px;">
|
||||||
<img class="logo" :src="logoImg" @click="goToMain"/>
|
<img class="logo" :src="logoImg" @click="goToMain">
|
||||||
<div class="titleInner" style="margin-left:60px;" @click="goToMain">{{systemTitle}}</div>
|
<div class="titleInner" style="margin-left:60px;" @click="goToMain">{{ systemTitle }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import logoImg from '@/assets/logo_changan.png';
|
import logoImg from '@/assets/logo_changan.png';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
import { UrlConfig } from '@/router/index';
|
|
||||||
import { loginTitle } from '@/scripts/ConstDic';
|
import { loginTitle } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
logoImg: logoImg,
|
logoImg: logoImg,
|
||||||
systemTitle:"城市轨道交通实训平台"
|
systemTitle: '城市轨道交通实训平台'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted() {
|
||||||
if (getSessionStorage('design')) {
|
this.systemTitle=loginTitle[getSessionStorage('project')];
|
||||||
this.systemTitle="城市轨道交通设计平台";
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
this.systemTitle=loginTitle[getSessionStorage('project')||'default'];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
goToMain(){
|
goToMain() {
|
||||||
// if (getSessionStorage('design')) {
|
|
||||||
// this.$router.push({ path: `${UrlConfig.design.prefix}/home`});
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.main-container .navbar .avatar-container {
|
.main-container .navbar .avatar-container {
|
||||||
|
@ -32,8 +32,7 @@ function getRouteInfo(to) {
|
|||||||
getTokenInfo = getDesignToken;
|
getTokenInfo = getDesignToken;
|
||||||
clientId = LoginParams.Design.clientId;
|
clientId = LoginParams.Design.clientId;
|
||||||
} else if (/^\/plan/.test(toRoutePath) || /^\/display\/plan/.test(toRoutePath)) {
|
} else if (/^\/plan/.test(toRoutePath) || /^\/display\/plan/.test(toRoutePath)) {
|
||||||
const flag = getSessionStorage('design');
|
if (getSessionStorage('project')==='design') {
|
||||||
if (flag == 'true') {
|
|
||||||
loginPath = loginDesignPage;
|
loginPath = loginDesignPage;
|
||||||
getTokenInfo = getDesignToken;
|
getTokenInfo = getDesignToken;
|
||||||
clientId = LoginParams.Design.clientId;
|
clientId = LoginParams.Design.clientId;
|
||||||
@ -56,9 +55,8 @@ function handleRoute(to, from, next, routeInfo) {
|
|||||||
// 拉取用户信息
|
// 拉取用户信息
|
||||||
store.dispatch('GetInfo', routeInfo.getTokenInfo).then(res => {
|
store.dispatch('GetInfo', routeInfo.getTokenInfo).then(res => {
|
||||||
// 根据roles权限生成可访问的路由表
|
// 根据roles权限生成可访问的路由表
|
||||||
// debugger;
|
|
||||||
const roles = res.roles;
|
const roles = res.roles;
|
||||||
if (getSessionStorage('design')) {
|
if (getSessionStorage('project')==='design') {
|
||||||
roles.push(userDesign);
|
roles.push(userDesign);
|
||||||
}
|
}
|
||||||
store.dispatch('GenerateRoutes', { roles, clientId: routeInfo.clientId }).then(() => {
|
store.dispatch('GenerateRoutes', { roles, clientId: routeInfo.clientId }).then(() => {
|
||||||
@ -82,7 +80,7 @@ function handleRoute(to, from, next, routeInfo) {
|
|||||||
// 除没有动态改变权限的需求可直接next() 删下方权限判断
|
// 除没有动态改变权限的需求可直接next() 删下方权限判断
|
||||||
if (hasPermission(store.getters.roles, to.meta.roles)) {
|
if (hasPermission(store.getters.roles, to.meta.roles)) {
|
||||||
if (to.path==='/404' && to.redirectedFrom==='/') {
|
if (to.path==='/404' && to.redirectedFrom==='/') {
|
||||||
if (getSessionStorage('design') === 'true') {
|
if (getSessionStorage('project') === 'design') {
|
||||||
next('/design/home');
|
next('/design/home');
|
||||||
} else {
|
} else {
|
||||||
next(localStore.get('trainingPlatformRoute'+store.getters.id) ||'/trainingPlatform');
|
next(localStore.get('trainingPlatformRoute'+store.getters.id) ||'/trainingPlatform');
|
||||||
|
@ -1065,7 +1065,7 @@ const router = createRouter();
|
|||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
const project = getSessionStorage('project');
|
const project = getSessionStorage('project');
|
||||||
document.title = loginTitle[project];
|
document.title = loginTitle[project||'login'];
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
title: '城市轨道交通实训平台',
|
title: '',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {boolean} true | false
|
* @type {boolean} true | false
|
||||||
|
@ -48,7 +48,7 @@ function hasPermission(roles, route, parentsRoles) {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// return roles.some(role => route.meta.roles.indexOf(role) >= 0);
|
// return roles.some(role => route.meta.roles.indexOf(role) >= 0);
|
||||||
if (getSessionStorage('design')) {
|
if (getSessionStorage('project')==='design') {
|
||||||
roles= roles.filter(function (role) {
|
roles= roles.filter(function (role) {
|
||||||
return route.meta.roles.indexOf(role) >= 0;
|
return route.meta.roles.indexOf(role) >= 0;
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
import { setSessionStorage } from '@/utils/auth';
|
||||||
import { login, logout, getInfo } from '@/api/login';
|
import { login, logout, getInfo } from '@/api/login';
|
||||||
import { getToken, setToken, removeToken, getDesignToken, setDesignToken, removeDesignToken, handleToken, handleRemoveToken } from '@/utils/auth';
|
import { getToken, setToken, removeToken, getDesignToken, setDesignToken, removeDesignToken, handleToken, handleRemoveToken } from '@/utils/auth';
|
||||||
import { getUserConfigInfo } from '@/api/management/user';
|
import { getUserConfigInfo } from '@/api/management/user';
|
||||||
@ -88,12 +88,6 @@ const user = {
|
|||||||
|
|
||||||
// 登录系统
|
// 登录系统
|
||||||
login(params).then(resp => {
|
login(params).then(resp => {
|
||||||
if (userInfo.type == 'design') {
|
|
||||||
removeSessionStorage('design');
|
|
||||||
setSessionStorage('design', true);
|
|
||||||
} else {
|
|
||||||
removeSessionStorage('design');
|
|
||||||
}
|
|
||||||
execFc(resp.data);
|
execFc(resp.data);
|
||||||
resolve();
|
resolve();
|
||||||
}).catch(error => { reject(error); });
|
}).catch(error => { reject(error); });
|
||||||
@ -104,7 +98,6 @@ const user = {
|
|||||||
QrLoginSetting({ dispatch, commit }, token) {
|
QrLoginSetting({ dispatch, commit }, token) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// 设置user域token值
|
// 设置user域token值
|
||||||
removeSessionStorage('design');
|
|
||||||
commit(token.key, token.value);
|
commit(token.key, token.value);
|
||||||
const header = { group: '', 'X-Token': token.value };
|
const header = { group: '', 'X-Token': token.value };
|
||||||
creatSubscribe(perpetualTopic, header);
|
creatSubscribe(perpetualTopic, header);
|
||||||
@ -173,7 +166,6 @@ const user = {
|
|||||||
commit('SET_TOKEN', '');
|
commit('SET_TOKEN', '');
|
||||||
commit('SET_ROLES', []);
|
commit('SET_ROLES', []);
|
||||||
commit('SET_ID', '');
|
commit('SET_ID', '');
|
||||||
removeSessionStorage('design');
|
|
||||||
Cookies.remove('UserDesignName');
|
Cookies.remove('UserDesignName');
|
||||||
Cookies.remove('UserDesignToken');
|
Cookies.remove('UserDesignToken');
|
||||||
Cookies.remove('UserName');
|
Cookies.remove('UserName');
|
||||||
|
@ -128,9 +128,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
listPublishMap().then(response=>{
|
listPublishMap().then(response=>{
|
||||||
response.data.forEach(elem => {
|
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
|
||||||
this.mapList.push({ value: elem.id, label: elem.name });
|
|
||||||
});
|
|
||||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -129,10 +129,8 @@
|
|||||||
// 获取地图
|
// 获取地图
|
||||||
this.skinList = [];
|
this.skinList = [];
|
||||||
const res = await getSkinCodeList();
|
const res = await getSkinCodeList();
|
||||||
res.data.forEach(elem => {
|
this.skinList = res.data.map(elem => { return { value: elem.code, label: elem.name } });
|
||||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.mapId.config.data=this.skinList;
|
||||||
this.skinList.push({ value: elem.code, label: elem.name });
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error, '获取发布地图');
|
console.error(error, '获取发布地图');
|
||||||
}
|
}
|
||||||
|
@ -131,10 +131,8 @@
|
|||||||
this.mapList = [];
|
this.mapList = [];
|
||||||
const res = await listPublishMap();
|
const res = await listPublishMap();
|
||||||
this.allMapList=res.data;
|
this.allMapList=res.data;
|
||||||
res.data.forEach(elem => {
|
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name } });
|
||||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
this.queryForm.queryObject.mapId.config.data=this.mapList;
|
||||||
this.mapList.push({ value: elem.id, label: elem.name });
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error, '获取发布地图');
|
console.error(error, '获取发布地图');
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ export default {
|
|||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
await putJointTrainingSimulationEntrance(this.group);
|
await putJointTrainingSimulationEntrance(this.group);
|
||||||
const rest = await getPublishMapInfo(this.mapId);
|
const rest = await getPublishMapInfo(this.mapId);
|
||||||
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group };
|
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group, subSystem: this.$route.query.subSystem };
|
||||||
this.$router.push({ path: `/jointTraining`, query: query });
|
this.$router.push({ path: `/jointTraining`, query: query });
|
||||||
} else if (this.state == '01') {
|
} else if (this.state == '01') {
|
||||||
const query = { group: this.group };
|
const query = { group: this.group };
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
import { getGoodsTryUse } from '@/api/management/goods';
|
import { getGoodsTryUse } from '@/api/management/goods';
|
||||||
import { PermissionType } from '@/scripts/ConstDic';
|
import { PermissionType } from '@/scripts/ConstDic';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { queryPermissionSimulation } from '@/api/management/author';
|
|
||||||
import { postCreateRoom, getjointTraining, checkRoomExist } from '@/api/chat';
|
import { postCreateRoom, getjointTraining, checkRoomExist } from '@/api/chat';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import { simulationNotify, schedulingNotify } from '@/api/simulation';
|
import { simulationNotify, schedulingNotify } from '@/api/simulation';
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
@node-click="clickEvent"
|
@node-click="clickEvent"
|
||||||
>
|
>
|
||||||
<!-- @node-contextmenu="showContextMenu" -->
|
<!-- @node-contextmenu="showContextMenu" -->
|
||||||
<span slot-scope="{ node:tnode, data }">
|
<span slot-scope="{ node:tnode, data }" >
|
||||||
<span
|
<span
|
||||||
class="el-icon-tickets"
|
class="el-icon-tickets"
|
||||||
:style="{color: data.valid ? 'green':''}"
|
:style="{color: data.valid ? 'green':''}"
|
||||||
@ -132,6 +132,7 @@ export default {
|
|||||||
this.treeData = this.treeList = [];
|
this.treeData = this.treeList = [];
|
||||||
try {
|
try {
|
||||||
const res = await listPublishMap({cityCode: filterSelect});
|
const res = await listPublishMap({cityCode: filterSelect});
|
||||||
|
|
||||||
res.data.forEach(elem=>{
|
res.data.forEach(elem=>{
|
||||||
// debugger;
|
// debugger;
|
||||||
// elem.children.find(n => { return n.name.includes("行调")})
|
// elem.children.find(n => { return n.name.includes("行调")})
|
||||||
@ -140,35 +141,28 @@ export default {
|
|||||||
id:'1',
|
id:'1',
|
||||||
name:'地图预览',
|
name:'地图预览',
|
||||||
type:'mapPreview',
|
type:'mapPreview',
|
||||||
mapId: elem.id,
|
mapId: elem.id
|
||||||
hidden:false
|
}
|
||||||
},
|
];
|
||||||
{
|
this.isAdministrator()?elem.children.push({id: '2',name: '课程设计',type: 'lessonDesign',mapId: elem.id,skinCode: elem.skinCode}):'';
|
||||||
id: '2',
|
elem.children.push(
|
||||||
name: '课程设计',
|
|
||||||
type: 'lessonDesign',
|
|
||||||
mapId: elem.id,
|
|
||||||
skinCode: elem.skinCode,
|
|
||||||
hidden:this.isAdministrator()
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: '3',
|
id: '3',
|
||||||
name: '剧本设计',
|
name: '剧本设计',
|
||||||
type: 'scriptDesign',
|
type: 'scriptDesign',
|
||||||
mapId: elem.id,
|
mapId: elem.id,
|
||||||
skinCode: elem.skinCode,
|
skinCode: elem.skinCode
|
||||||
hidden:false
|
|
||||||
// code:elem.children.find(n => { return n.name.includes("行调")})
|
// code:elem.children.find(n => { return n.name.includes("行调")})
|
||||||
},
|
});
|
||||||
|
elem.children.push(
|
||||||
{
|
{
|
||||||
id: '4',
|
id: '4',
|
||||||
name: '运行图设计',
|
name: '运行图设计',
|
||||||
type: 'runPlanDesign',
|
type: 'runPlanDesign',
|
||||||
mapId: elem.id,
|
mapId: elem.id,
|
||||||
skinCode: elem.skinCode,
|
skinCode: elem.skinCode
|
||||||
hidden:false
|
|
||||||
}
|
}
|
||||||
];
|
);
|
||||||
});
|
});
|
||||||
this.treeData = res.data;
|
this.treeData = res.data;
|
||||||
this.treeList = this.filterText
|
this.treeList = this.filterText
|
||||||
@ -191,7 +185,7 @@ export default {
|
|||||||
this.$store.dispatch('config/resize', { width: width, height: height });
|
this.$store.dispatch('config/resize', { width: width, height: height });
|
||||||
},
|
},
|
||||||
isAdministrator() {
|
isAdministrator() {
|
||||||
return this.$store.state.user.roles.indexOf(superAdmin) || this.$store.state.user.roles.indexOf(admin);
|
return this.$store.state.user.roles.includes(superAdmin) || this.$store.state.user.roles.includes(admin);
|
||||||
},
|
},
|
||||||
// createMap() {
|
// createMap() {
|
||||||
// this.$emit("createMap");
|
// this.$emit("createMap");
|
||||||
|
@ -77,6 +77,7 @@
|
|||||||
await loadMapDataById(mapId);
|
await loadMapDataById(mapId);
|
||||||
await this.$store.dispatch('training/setMapDefaultState');
|
await this.$store.dispatch('training/setMapDefaultState');
|
||||||
await this.$store.dispatch('map/setTrainWindowShow', false);
|
await this.$store.dispatch('map/setTrainWindowShow', false);
|
||||||
|
await this.$store.dispatch('map/clearJlmapTrainView');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$messageBox(`获取地图数据失败: ${error.message}`);
|
this.$messageBox(`获取地图数据失败: ${error.message}`);
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
|
@ -48,7 +48,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route(newVal) {
|
'$route.params.subSystem': function(newVal) {
|
||||||
this.loadInitPage();
|
this.loadInitPage();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -298,7 +298,7 @@ export default {
|
|||||||
back() {
|
back() {
|
||||||
this.$store.dispatch('training/over').then(() => {
|
this.$store.dispatch('training/over').then(() => {
|
||||||
putJointTrainingSimulationUser(this.group).then(() => {
|
putJointTrainingSimulationUser(this.group).then(() => {
|
||||||
this.$router.push({ path: `/trainroom`, query: { skinCode: this.$route.query.skinCode, group: this.group, subSystem: this.$route.query.subSystem } });
|
this.$router.replace({ path: `/trainroom`, query: { skinCode: this.$route.query.skinCode, group: this.group, subSystem: this.$route.query.subSystem } });
|
||||||
exitFullscreen();
|
exitFullscreen();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -173,7 +173,6 @@ export default {
|
|||||||
model.type = this.modelType;
|
model.type = this.modelType;
|
||||||
this.$store.dispatch('Login', model).then(() => {
|
this.$store.dispatch('Login', model).then(() => {
|
||||||
this.$store.dispatch('SetAccount', model.username);
|
this.$store.dispatch('SetAccount', model.username);
|
||||||
this.setProjectSession();
|
|
||||||
this.handleLoginSucessRoute();
|
this.handleLoginSucessRoute();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (error.code==='30001') {
|
if (error.code==='30001') {
|
||||||
@ -204,12 +203,6 @@ export default {
|
|||||||
removeDesignToken();
|
removeDesignToken();
|
||||||
setSessionStorage('project', this.project);
|
setSessionStorage('project', this.project);
|
||||||
},
|
},
|
||||||
setProjectSession() {
|
|
||||||
if (this.project === 'design') {
|
|
||||||
removeSessionStorage('design');
|
|
||||||
setSessionStorage('design', true);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
clearTimer(timer) {
|
clearTimer(timer) {
|
||||||
if (timer) {
|
if (timer) {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
@ -289,7 +282,6 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$store.dispatch('Login', model).then(() => {
|
this.$store.dispatch('Login', model).then(() => {
|
||||||
this.$store.dispatch('SetAccount', model.username);
|
this.$store.dispatch('SetAccount', model.username);
|
||||||
this.setProjectSession();
|
|
||||||
this.handleLoginSucessRoute();
|
this.handleLoginSucessRoute();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (error.code==='30001') {
|
if (error.code==='30001') {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<map-edit ref="edit" :basic-info="true" :map="editModel" :skin-code="skinCode" @refresh="refresh" />
|
<map-edit ref="edit" :basic-info="true" :map="editModel" :skin-code="skinCode" @refresh="refresh" />
|
||||||
<!-- <map-edit ref="axisEdit" :basic-info="false" :map="editModel" :skin-code="skinCode" @refresh="refresh" /> -->
|
<!-- <map-edit ref="axisEdit" :basic-info="false" :map="editModel" :skin-code="skinCode" @refresh="refresh" /> -->
|
||||||
<!-- <map-save-as ref="saveAs" :map="editModel" @refresh="refresh" /> -->
|
<map-save-as ref="saveAs" :map="editModel" @refresh="refresh" />
|
||||||
<map-publish ref="publish" :map="editModel" />
|
<map-publish ref="publish" :map="editModel" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -14,7 +14,7 @@ import { DeviceMenu } from '@/scripts/ConstDic';
|
|||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import MapEdit from './edit';
|
import MapEdit from './edit';
|
||||||
// import MapSaveAs from './saveAs';
|
import MapSaveAs from './saveAs';
|
||||||
import MapPublish from './publish';
|
import MapPublish from './publish';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
MapEdit,
|
MapEdit,
|
||||||
// MapSaveAs,
|
MapSaveAs,
|
||||||
MapPublish
|
MapPublish
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -51,10 +51,10 @@ export default {
|
|||||||
// label: this.$t('map.updateObjAxis'),
|
// label: this.$t('map.updateObjAxis'),
|
||||||
// handler: this.updateObjAxis
|
// handler: this.updateObjAxis
|
||||||
// },
|
// },
|
||||||
// {
|
{
|
||||||
// label: this.$t('map.saveAs'),
|
label: this.$t('map.saveAs'),
|
||||||
// handler: this.saveAs
|
handler: this.saveAs
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('map.deleteObj'),
|
label: this.$t('map.deleteObj'),
|
||||||
handler: this.deleteObj
|
handler: this.deleteObj
|
||||||
|
@ -106,7 +106,7 @@ export default {
|
|||||||
name: this.$t('scriptRecord.preview'),
|
name: this.$t('scriptRecord.preview'),
|
||||||
handleClick: this.previewScript,
|
handleClick: this.previewScript,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
showControl:(row) => { return row.status==1 },
|
// showControl:(row) => { return row.status==1},
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -289,8 +289,8 @@ export default {
|
|||||||
.scriptList{
|
.scriptList{
|
||||||
display:inline-block;padding:7px 0px
|
display:inline-block;padding:7px 0px
|
||||||
}
|
}
|
||||||
.el-button+.el-button {
|
/deep/.el-button+.el-button {
|
||||||
margin-left: 10px;
|
margin-left: 5px;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -48,7 +48,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route(newVal) {
|
'$route.params.subSystem': function(newVal) {
|
||||||
this.loadInitPage();
|
this.loadInitPage();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -462,7 +462,8 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (data.state == '03') { // 房间销毁
|
if (data.state == '03') { // 房间销毁
|
||||||
this.$router.push({ path: `/trainingPlatform/detail/${this.$route.query.subSystem}`, query: {mapId: this.mapId}});
|
// this.$router.push({ path: `/trainingPlatform/detail/${this.$route.query.subSystem}`, query: {mapId: this.mapId}});
|
||||||
|
this.$router.go(-1);
|
||||||
} else if (data.state == '01') { // 进入准备中
|
} else if (data.state == '01') { // 进入准备中
|
||||||
this.starting = false;
|
this.starting = false;
|
||||||
} else if (data.state == '02') {
|
} else if (data.state == '02') {
|
||||||
@ -470,7 +471,7 @@ export default {
|
|||||||
await putJointTrainingSimulationEntrance(param.group);
|
await putJointTrainingSimulationEntrance(param.group);
|
||||||
const rest = await getPublishMapInfo(param.mapId);
|
const rest = await getPublishMapInfo(param.mapId);
|
||||||
const query = { skinCode: rest.data.skinCode, mapId: param.mapId, group: param.group, subSystem: this.$route.query.subSystem };
|
const query = { skinCode: rest.data.skinCode, mapId: param.mapId, group: param.group, subSystem: this.$route.query.subSystem };
|
||||||
this.$router.push({ path: `/jointTraining`, query: query });
|
this.$router.replace({ path: `/jointTraining`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}
|
}
|
||||||
this.$store.dispatch('socket/setJointRoomInfo'); // 清空房间信息
|
this.$store.dispatch('socket/setJointRoomInfo'); // 清空房间信息
|
||||||
@ -492,7 +493,7 @@ export default {
|
|||||||
await putJointTrainingSimulationEntrance(this.$route.query.group);
|
await putJointTrainingSimulationEntrance(this.$route.query.group);
|
||||||
const rest = await getPublishMapInfo(this.mapId);
|
const rest = await getPublishMapInfo(this.mapId);
|
||||||
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.$route.query.group, subSystem: this.$route.query.subSystem };
|
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.$route.query.group, subSystem: this.$route.query.subSystem };
|
||||||
this.$router.push({ path: `/jointTraining`, query: query });
|
this.$router.replace({ path: `/jointTraining`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
},
|
},
|
||||||
// 判断观众席在线/不在线
|
// 判断观众席在线/不在线
|
||||||
|
@ -38,8 +38,9 @@
|
|||||||
name=""
|
name=""
|
||||||
rows=""
|
rows=""
|
||||||
cols=""
|
cols=""
|
||||||
|
@keyup="changeText"
|
||||||
/>
|
/>
|
||||||
<button class="sendBtn" @click="sendText()">{{$t('trainRoom.sendText')}}</button>
|
<button class="sendBtn" @click="sendText()" :disabled="disabled">{{$t('trainRoom.sendText')}}</button>
|
||||||
<div
|
<div
|
||||||
class="sendBtn yuyin_start zIndex1"
|
class="sendBtn yuyin_start zIndex1"
|
||||||
:style="{background: background}"
|
:style="{background: background}"
|
||||||
@ -75,7 +76,8 @@ export default {
|
|||||||
speak: this.$t('trainRoom.holdAndTalk'),
|
speak: this.$t('trainRoom.holdAndTalk'),
|
||||||
sending: false,
|
sending: false,
|
||||||
background: '',
|
background: '',
|
||||||
userId: ''
|
userId: '',
|
||||||
|
disabled:true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -93,16 +95,24 @@ export default {
|
|||||||
// 发送文字
|
// 发送文字
|
||||||
async sendText() {
|
async sendText() {
|
||||||
if (!this.text.trim()) {
|
if (!this.text.trim()) {
|
||||||
alert(this.$t('trainRoom.contentIsEmptyAndCannotBeSent'));
|
// alert(this.$t('trainRoom.contentIsEmptyAndCannotBeSent'));
|
||||||
this.text = '';
|
// this.text = '';
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
await chatWithText(this.text, this.groupRoom);
|
await chatWithText(this.text, this.groupRoom);
|
||||||
this.text = '';
|
this.text = '';
|
||||||
|
this.disabled=true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
changeText(){
|
||||||
|
if (!this.text.trim()){
|
||||||
|
this.disabled=true;
|
||||||
|
}else{
|
||||||
|
this.disabled=false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 语音录制开始
|
// 语音录制开始
|
||||||
startRecording() {
|
startRecording() {
|
||||||
@ -354,6 +364,10 @@ export default {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
&:disabled{
|
||||||
|
background: #6dbcff;
|
||||||
|
cursor: no-drop;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.yuyin_start {
|
.yuyin_start {
|
||||||
|
@ -142,8 +142,10 @@ export default {
|
|||||||
// this.$router.push({ path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}`, query: {skinCode: '02'} });
|
// this.$router.push({ path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}`, query: {skinCode: '02'} });
|
||||||
// break;
|
// break;
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
|
if (error.code === '40004') {
|
||||||
this.$messageBox(this.$t('systemGenerate.getSubSystemInfoFail'));
|
this.$messageBox(this.$t('systemGenerate.getSubSystemInfoFail'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user