This commit is contained in:
zyy 2020-09-09 11:25:43 +08:00
commit 3986185b1b
20 changed files with 115 additions and 47 deletions

View File

@ -25,8 +25,7 @@ export default {
data() { data() {
return { return {
loadingImg: LoadingImg, loadingImg: LoadingImg,
loading: false, loading: false
loadingStartTime: 0
}; };
}, },
computed: { computed: {
@ -58,23 +57,10 @@ export default {
}); });
}, },
'$store.state.app.transitionAnimationsCount': function(val) { '$store.state.app.transitionAnimationsCount': function(val) {
const time = +new Date();
if ((time - this.loadingStartTime) > 3000) {
this.loading = true; this.loading = true;
this.loadingStartTime = +new Date();
}
}, },
'$route' () { '$store.state.app.animationsCloseCount': function(val) {
this.$nextTick(function() {
const distance = +new Date() - this.loadingStartTime;
if (distance > 100 && distance < 300 ) {
setTimeout(() => {
this.loading = false; this.loading = false;
}, 500);
} else {
this.loading = false;
}
});
} }
}, },
created() { created() {

View File

@ -13,11 +13,12 @@ import {SignalListN} from '@/jlmap3d/main/newmodel/SignalListN';
import {StationStandListN} from '@/jlmap3d/main/newmodel/StationStandListN'; import {StationStandListN} from '@/jlmap3d/main/newmodel/StationStandListN';
import {SwitchListN} from '@/jlmap3d/main/newmodel/SwitchListN'; import {SwitchListN} from '@/jlmap3d/main/newmodel/SwitchListN';
import {RailListN} from '@/jlmap3d/main/newmodel/RailListN.js'; import {RailListN} from '@/jlmap3d/main/newmodel/RailListN.js';
import store from '@/store/index_APP_TARGET';
import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js'; import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';
import { Loading } from 'element-ui'; // import { Loading } from 'element-ui';
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js'; // import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene){ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene){
@ -35,14 +36,14 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
let linklist,sectionlist,signallist,stationstandlist,trainlisttest,switchlist,realsectionlist,rails; let linklist,sectionlist,signallist,stationstandlist,trainlisttest,switchlist,realsectionlist,rails;
let loadingInstance = Loading.service({ fullscreen: true }); // let loadingInstance = Loading.service({ fullscreen: true });
let isSection = false; let isSection = false;
let isNewdata = false; let isNewdata = false;
if(netdata.assets){ if(netdata.assets){
initnew3d(data,netdata); initnew3d(data,netdata);
}else{ }else{
loadingInstance.close(); store.dispatch('app/animationsClose');
alert("没有三维数据"); alert("没有三维数据");
} }
@ -156,7 +157,7 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
scope.Subscribe.updatamap(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails,scope.materiallist,scope.actions,scope.sceneload); scope.Subscribe.updatamap(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails,scope.materiallist,scope.actions,scope.sceneload);
scope.webwork.postMessage("on"); scope.webwork.postMessage("on");
scope.jsonwebworknew.postMessage("connect"); scope.jsonwebworknew.postMessage("connect");
loadingInstance.close(); store.dispatch('app/animationsClose');
}); });
} }

View File

@ -17,7 +17,8 @@ import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '
import { PassflowConnect } from '@/jlmap3d/jl3dpassflow/connect/passflowconnect.js'; import { PassflowConnect } from '@/jlmap3d/jl3dpassflow/connect/passflowconnect.js';
import StompClient from '@/utils/sock'; import StompClient from '@/utils/sock';
import { Loading } from 'element-ui'; import store from '@/store/index_APP_TARGET';
// import { Loading } from 'element-ui';
let clock = new THREE.Clock(); let clock = new THREE.Clock();
let delta; let delta;
@ -403,7 +404,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
this.anime = null; this.anime = null;
this.modelmanager = new ModelManager(); this.modelmanager = new ModelManager();
let loadingInstance = Loading.service({ fullscreen: true }); // let loadingInstance = Loading.service({ fullscreen: true });
this.nowstation = null; this.nowstation = null;
let stationlist = []; let stationlist = [];
@ -434,7 +435,8 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
}); });
loadingInstance.close(); // loadingInstance.close();
store.dispatch('app/animationsClose');
animate(); animate();
}) })
}); });

View File

@ -16,8 +16,8 @@ import {RailListN} from '@/jlmap3d/main/newmodel/RailListN.js';
import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js'; import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';
import store from '@/store/index_APP_TARGET';
import { Loading } from 'element-ui'; // import { Loading } from 'element-ui';
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js'; // import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,scene){ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,scene){
@ -34,14 +34,15 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
let linklist,sectionlist,signallist,stationstandlist,trainlisttest,switchlist,realsectionlist,rails; let linklist,sectionlist,signallist,stationstandlist,trainlisttest,switchlist,realsectionlist,rails;
let loadingInstance = Loading.service({ fullscreen: true }); // let loadingInstance = Loading.service({ fullscreen: true });
let isSection = false; let isSection = false;
let isNewdata = false; let isNewdata = false;
if(netdata.assets){ if(netdata.assets){
initnew3d(data,netdata); initnew3d(data,netdata);
}else{ }else{
loadingInstance.close(); // loadingInstance.close();
store.dispatch('app/animationsClose');
alert("没有三维数据"); alert("没有三维数据");
} }
@ -168,7 +169,8 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
scope.webwork.postMessage("on"); scope.webwork.postMessage("on");
scope.jsonwebworknew.postMessage("connect"); scope.jsonwebworknew.postMessage("connect");
updatemenulist(stationstandlist.list,trainlisttest.list); updatemenulist(stationstandlist.list,trainlisttest.list);
loadingInstance.close(); // loadingInstance.close();
store.dispatch('app/animationsClose');
}); });
} }

View File

@ -85,10 +85,6 @@ function handleRoute(to, next, loginPath) {
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
const project = getSessionStorage('project'); const project = getSessionStorage('project');
document.title = loginInfo[project || 'login'].browserTitle || loginInfo[project || 'login'].title; document.title = loginInfo[project || 'login'].browserTitle || loginInfo[project || 'login'].title;
const paramsList = ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts'];
if (paramsList.includes(project)) {
store.dispatch('app/transitionAnimations');
}
NProgress.start(); NProgress.start();
const loginPath = getRouteInfo(to); const loginPath = getRouteInfo(to);
if (getToken()) { if (getToken()) {

View File

@ -10,7 +10,8 @@ const state = {
height: document.documentElement.clientHeight, height: document.documentElement.clientHeight,
windowSizeCount: 0, windowSizeCount: 0,
dialogMessage:'', dialogMessage:'',
transitionAnimationsCount: 0 transitionAnimationsCount: 0,
animationsCloseCount: 0
}; };
const mutations = { const mutations = {
@ -42,6 +43,9 @@ const mutations = {
}, },
SET_TRANSITION_ANIMATIONS:(state) => { SET_TRANSITION_ANIMATIONS:(state) => {
state.transitionAnimationsCount++; state.transitionAnimationsCount++;
},
SET_ANIMATIONS_CLOSE: (state) => {
state.animationsCloseCount++;
} }
}; };
@ -67,8 +71,11 @@ const actions = {
SET_DIALOG_MESSAGE({ commit }, dialogMessage) { SET_DIALOG_MESSAGE({ commit }, dialogMessage) {
commit('SET_DIALOG_MESSAGE', dialogMessage); commit('SET_DIALOG_MESSAGE', dialogMessage);
}, },
transitionAnimations({ commit }, dialogMessage) { transitionAnimations({ commit }) {
commit('SET_TRANSITION_ANIMATIONS'); commit('SET_TRANSITION_ANIMATIONS');
},
animationsClose({ commit }) {
commit('SET_ANIMATIONS_CLOSE');
} }
}; };

View File

@ -109,12 +109,14 @@ export default {
this.percentage = 100; this.percentage = 100;
setTimeout(() => { setTimeout(() => {
this.show = false; this.show = false;
this.$store.dispatch('app/animationsClose');
}, 1000 / this.fps); }, 1000 / this.fps);
}, },
failed() { failed() {
this.status = 'exception'; this.status = 'exception';
setTimeout(() => { setTimeout(() => {
this.show = false; this.show = false;
this.$store.dispatch('app/animationsClose');
}, 1000 / this.fps); }, 1000 / this.fps);
} }
} }

View File

@ -63,7 +63,8 @@ export default {
jointShow: false, jointShow: false,
jointGroup: '', jointGroup: '',
lineCode:'', lineCode:'',
drawWay: false // drawWay: false, //
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
}; };
}, },
computed: { computed: {
@ -232,6 +233,9 @@ export default {
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType }; const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
createSimulationNew(data).then(resp => { createSimulationNew(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, mapId: this.courseModel.mapId, drawWay: true }; const query = { lineCode: this.courseModel.lineCode, group: resp.data, mapId: this.courseModel.mapId, drawWay: true };
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({ path: `/jointTrainingNew`, query: query }); this.$router.push({ path: `/jointTrainingNew`, query: query });
launchFullscreen(); launchFullscreen();
}).catch(error => { }).catch(error => {
@ -261,6 +265,9 @@ export default {
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType }; const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
createSimulationNew(data).then(resp => { createSimulationNew(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser }; const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser };
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({ path: `/displayBigScreen/${this.courseModel.mapId}`, query: query }); this.$router.push({ path: `/displayBigScreen/${this.courseModel.mapId}`, query: query });
}).catch(error => { }).catch(error => {
this.$messageBox(this.$t('error.createSimulationFailed') + error.message); this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
@ -289,6 +296,9 @@ export default {
if (this.drawWay) { if (this.drawWay) {
createSimulationNew(data).then(resp => { createSimulationNew(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser }; const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser };
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query }); this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
launchFullscreen(); launchFullscreen();
}); });
@ -322,6 +332,9 @@ export default {
createSimulationNew(data).then(resp => { createSimulationNew(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project }; const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project };
this.$store.dispatch('training/setPrdType', this.currentPrdType); // prdType this.$store.dispatch('training/setPrdType', this.currentPrdType); // prdType
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query }); this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
launchFullscreen(); launchFullscreen();
}).catch(error => { }).catch(error => {

View File

@ -124,8 +124,8 @@ export default {
setWindowSize() { setWindowSize() {
this.$nextTick(() => { this.$nextTick(() => {
if (this.widthLeft) { if (this.widthLeft) {
const width = this.$store.state.app.width - (this.widthLeft || 450) - 2; const width = this.$store.state.app.width - (this.widthLeft) - 2;
this.maskWidth = `calc(100% - ${this.widthLeft || 450}px)`; this.maskWidth = `calc(100% - ${this.widthLeft}px)`;
const height = this.height; const height = this.height;
this.$store.dispatch('config/resize', { width, height }); this.$store.dispatch('config/resize', { width, height });
} else { } else {

View File

@ -46,7 +46,8 @@ export default {
}, },
node: { node: {
}, },
localParamName: 'publish_cityCode' localParamName: 'publish_cityCode',
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
}; };
}, },
computed: { computed: {
@ -128,6 +129,9 @@ export default {
break; break;
} }
case 'bigSplitScreen': { case 'bigSplitScreen': {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({ path: `/bigSplitScreen/${obj.mapId}` }); this.$router.push({ path: `/bigSplitScreen/${obj.mapId}` });
break; break;
} }

View File

@ -49,7 +49,7 @@ export default {
setSessionStorage('againEnter', true); setSessionStorage('againEnter', true);
} }
this.resize(); this.resize();
this.widthLeft = Number(localStore.get('LeftWidth')); this.widthLeft = Number(localStore.get('LeftWidth')) || 450;
}, },
methods: { methods: {
drapWidth(width) { drapWidth(width) {

View File

@ -63,6 +63,7 @@ import LangStorage from '@/utils/lang';
import { getPublishMapInfo } from '@/api/jmap/map'; import { getPublishMapInfo } from '@/api/jmap/map';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
import { getTrainingOperateTypeMap } from '@/scripts/ConstDic'; import { getTrainingOperateTypeMap } from '@/scripts/ConstDic';
import { getSessionStorage } from '@/utils/auth';
export default { export default {
name: 'ExamDetailView', name: 'ExamDetailView',
@ -85,13 +86,17 @@ export default {
examList: [], examList: [],
trainingOperateTypeMap: {}, trainingOperateTypeMap: {},
drawWay: false, drawWay: false,
lineCode: '' // 线 lineCode: '', // 线
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
}; };
}, },
computed: { computed: {
...mapGetters('trainingList', [ ...mapGetters('trainingList', [
'trainingList' 'trainingList'
]) ]),
project() {
return getSessionStorage('project');
}
}, },
watch: { watch: {
'$route.params.examId': function (val) { '$route.params.examId': function (val) {
@ -273,6 +278,9 @@ export default {
lineCode: this.lineCode, lineCode: this.lineCode,
noPreLogout: this.$route.query.noPreLogout noPreLogout: this.$route.query.noPreLogout
}; };
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
if (this.$route.query.subSystem) { if (this.$route.query.subSystem) {
this.$router.push({ path: `${UrlConfig.displayNew}/exam`, query: query }); this.$router.push({ path: `${UrlConfig.displayNew}/exam`, query: query });
} else { } else {

View File

@ -90,7 +90,7 @@ export default {
deviceShow:true, deviceShow:true,
msgshow:false, msgshow:false,
controlmsg:'', controlmsg:'',
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
}; };
}, },
@ -111,6 +111,9 @@ export default {
} }
}, },
created() { created() {
if (this.loadingProjectList.includes(this.$route.query.project)) {
this.$store.dispatch('app/transitionAnimations');
}
// document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project]; // document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
}, },
mounted() { mounted() {

View File

@ -51,6 +51,7 @@ export default {
stationlist:[], stationlist:[],
value:"", value:"",
isCctv:true, isCctv:true,
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
}; };
}, },
computed: { computed: {
@ -62,6 +63,9 @@ export default {
}, },
created() { created() {
if (this.loadingProjectList.includes(this.$route.query.project)) {
this.$store.dispatch('app/transitionAnimations');
}
document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project]; document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
}, },
mounted() { mounted() {

View File

@ -77,7 +77,8 @@ export default {
selectmodel: null, selectmodel: null,
mapid:null, mapid:null,
group:null, group:null,
token:null token:null,
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
}; };
}, },
watch: { watch: {
@ -97,6 +98,9 @@ export default {
} }
}, },
created() { created() {
if (this.loadingProjectList.includes(this.$route.query.project)) {
this.$store.dispatch('app/transitionAnimations');
}
document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project]; document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
}, },
mounted() { mounted() {

View File

@ -19,6 +19,7 @@ import { getPublishMapListOnline } from '@/api/jmap/map';
import { getCmdList } from '@/api/management/dictionary'; import { getCmdList } from '@/api/management/dictionary';
import { UrlConfig, getTrainingOperateTypeMap } from '@/scripts/ConstDic'; import { UrlConfig, getTrainingOperateTypeMap } from '@/scripts/ConstDic';
import localStore from 'storejs'; import localStore from 'storejs';
import { getSessionStorage } from '@/utils/auth';
export default { export default {
name: 'TrainingGeneration', name: 'TrainingGeneration',
@ -38,6 +39,7 @@ export default {
LimitControl: [], LimitControl: [],
TrainWindow: [] TrainWindow: []
}, },
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts'],
isLeaving:false, isLeaving:false,
trainingTypeMap: {}, trainingTypeMap: {},
pagerConfig: { pagerConfig: {
@ -148,6 +150,9 @@ export default {
}, },
drawWay() { drawWay() {
return this.$route.query.drawWay + ''; return this.$route.query.drawWay + '';
},
project() {
return getSessionStorage('project');
} }
}, },
async created() { async created() {
@ -302,6 +307,9 @@ export default {
if (this.drawWay === 'true') { if (this.drawWay === 'true') {
trainingNotifyNew({ trainingId: node.id }).then(resp => { trainingNotifyNew({ trainingId: node.id }).then(resp => {
/** 区分演示和正式需要在演示时设置lessonId为0*/ /** 区分演示和正式需要在演示时设置lessonId为0*/
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
const query = { group: resp.data, trainingId: node.id, lessonId: 0, mapId: this.$route.query.mapId, lineCode: this.$route.query.lineCode }; const query = { group: resp.data, trainingId: node.id, lessonId: 0, mapId: this.$route.query.mapId, lineCode: this.$route.query.lineCode };
this.$router.push({ path: `${UrlConfig.displayNew}/manage`, query: query }); this.$router.push({ path: `${UrlConfig.displayNew}/manage`, query: query });
launchFullscreen(); launchFullscreen();

View File

@ -547,6 +547,7 @@ export default {
} else if (this.project === 'drts') { } else if (this.project === 'drts') {
getLoginInfo(getToken()).then(res => { getLoginInfo(getToken()).then(res => {
getSimulationInfoNew(res.data.group).then(resp => { getSimulationInfoNew(res.data.group).then(resp => {
this.$store.dispatch('app/transitionAnimations');
this.$router.push({ path: `/displayNew/demon`, query: { this.$router.push({ path: `/displayNew/demon`, query: {
lineCode: resp.data.map.lineCode, lineCode: resp.data.map.lineCode,
group: res.data.group, group: res.data.group,

View File

@ -39,6 +39,7 @@ import { UrlConfig } from '@/scripts/ConstDic';
import { removeSessionStorage } from '@/utils/auth'; import { removeSessionStorage } from '@/utils/auth';
import MapOperateMenu from './mapmanage/operateMenu'; import MapOperateMenu from './mapmanage/operateMenu';
import MapImport from './mapmanage/mapImport'; import MapImport from './mapmanage/mapImport';
import { getSessionStorage } from '@/utils/auth';
export default { export default {
name: 'UserMapList', name: 'UserMapList',
@ -63,9 +64,15 @@ export default {
y: 0 y: 0
}, },
editModel: {}, editModel: {},
lineCode: '' lineCode: '',
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
}; };
}, },
computed: {
project() {
return getSessionStorage('project');
}
},
watch: { watch: {
filterText(val) { filterText(val) {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
@ -117,6 +124,9 @@ export default {
clickEvent(obj, data, ele) { clickEvent(obj, data, ele) {
switch (obj.type) { switch (obj.type) {
case 'mapDesign': { case 'mapDesign': {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({ path: `${UrlConfig.newDesignuser.mapDraw}/${obj.mapId}/draft`, query: { name: obj.mapName } }); this.$router.push({ path: `${UrlConfig.newDesignuser.mapDraw}/${obj.mapId}/draft`, query: { name: obj.mapName } });
break; break;
} }

View File

@ -21,6 +21,7 @@ import { launchFullscreen } from '@/utils/screen';
import { scriptDraftRecordNotify, scriptDraftRecordNotifyNew, scriptRecordNotify, scriptRecordNotifyNew } from '@/api/simulation'; import { scriptDraftRecordNotify, scriptDraftRecordNotifyNew, scriptRecordNotify, scriptRecordNotifyNew } from '@/api/simulation';
import CreateScript from './create'; import CreateScript from './create';
import ScriptPublish from './publish'; import ScriptPublish from './publish';
import { getSessionStorage } from '@/utils/auth';
export default { export default {
name: 'ScriptDraft', name: 'ScriptDraft',
@ -39,6 +40,7 @@ export default {
reset: true, reset: true,
show:false show:false
}, },
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts'],
queryList: { queryList: {
query: this.queryFunction, query: this.queryFunction,
selectCheckShow: false, selectCheckShow: false,
@ -110,6 +112,11 @@ export default {
} }
}; };
}, },
computed:{
project() {
return getSessionStorage('project');
}
},
watch: { watch: {
'$route' () { '$route' () {
this.reloadTable(); this.reloadTable();
@ -267,6 +274,9 @@ export default {
const drawWay = this.$route.query.drawWay; const drawWay = this.$route.query.drawWay;
if (drawWay && JSON.parse(drawWay)) { if (drawWay && JSON.parse(drawWay)) {
scriptDraftRecordNotifyNew(row.id).then(resp => { scriptDraftRecordNotifyNew(row.id).then(resp => {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode, drawWay:true}; const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode, drawWay:true};
this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query }); this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query });
launchFullscreen(); launchFullscreen();

View File

@ -79,7 +79,8 @@ export default {
}, },
lineCode: '', // 线 lineCode: '', // 线
expandList: [], expandList: [],
drawWay: false drawWay: false,
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
}; };
}, },
computed: { computed: {
@ -95,6 +96,9 @@ export default {
} }
} }
return isShow; return isShow;
},
project() {
return getSessionStorage('project');
} }
}, },
watch: { watch: {
@ -152,6 +156,9 @@ export default {
const query = { const query = {
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.courseModel.mapId, lineCode: this.lineCode, noPreLogout: this.$route.query.noPreLogout group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.courseModel.mapId, lineCode: this.lineCode, noPreLogout: this.$route.query.noPreLogout
}; };
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
if (this.$route.query.noPreLogout) { if (this.$route.query.noPreLogout) {
this.$router.replace({ path: `${UrlConfig.displayNew}/teach`, query: query }); this.$router.replace({ path: `${UrlConfig.displayNew}/teach`, query: query });
} else { } else {