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

View File

@ -13,11 +13,12 @@ import {SignalListN} from '@/jlmap3d/main/newmodel/SignalListN';
import {StationStandListN} from '@/jlmap3d/main/newmodel/StationStandListN';
import {SwitchListN} from '@/jlmap3d/main/newmodel/SwitchListN';
import {RailListN} from '@/jlmap3d/main/newmodel/RailListN.js';
import store from '@/store/index_APP_TARGET';
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';
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 loadingInstance = Loading.service({ fullscreen: true });
// let loadingInstance = Loading.service({ fullscreen: true });
let isSection = false;
let isNewdata = false;
if(netdata.assets){
initnew3d(data,netdata);
}else{
loadingInstance.close();
store.dispatch('app/animationsClose');
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.webwork.postMessage("on");
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 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 delta;
@ -403,7 +404,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
this.anime = null;
this.modelmanager = new ModelManager();
let loadingInstance = Loading.service({ fullscreen: true });
// let loadingInstance = Loading.service({ fullscreen: true });
this.nowstation = null;
let stationlist = [];
@ -434,7 +435,8 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
});
loadingInstance.close();
// loadingInstance.close();
store.dispatch('app/animationsClose');
animate();
})
});

View File

@ -16,8 +16,8 @@ import {RailListN} from '@/jlmap3d/main/newmodel/RailListN.js';
import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';
import { Loading } from 'element-ui';
import store from '@/store/index_APP_TARGET';
// import { Loading } from 'element-ui';
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
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 loadingInstance = Loading.service({ fullscreen: true });
// let loadingInstance = Loading.service({ fullscreen: true });
let isSection = false;
let isNewdata = false;
if(netdata.assets){
initnew3d(data,netdata);
}else{
loadingInstance.close();
// loadingInstance.close();
store.dispatch('app/animationsClose');
alert("没有三维数据");
}
@ -168,7 +169,8 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
scope.webwork.postMessage("on");
scope.jsonwebworknew.postMessage("connect");
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) => {
const project = getSessionStorage('project');
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();
const loginPath = getRouteInfo(to);
if (getToken()) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -90,7 +90,7 @@ export default {
deviceShow:true,
msgshow:false,
controlmsg:'',
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
};
},
@ -111,6 +111,9 @@ export default {
}
},
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];
},
mounted() {

View File

@ -51,6 +51,7 @@ export default {
stationlist:[],
value:"",
isCctv:true,
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
};
},
computed: {
@ -62,6 +63,9 @@ export default {
},
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];
},
mounted() {

View File

@ -77,7 +77,8 @@ export default {
selectmodel: null,
mapid:null,
group:null,
token:null
token:null,
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
};
},
watch: {
@ -97,6 +98,9 @@ export default {
}
},
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];
},
mounted() {

View File

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

View File

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

View File

@ -39,6 +39,7 @@ import { UrlConfig } from '@/scripts/ConstDic';
import { removeSessionStorage } from '@/utils/auth';
import MapOperateMenu from './mapmanage/operateMenu';
import MapImport from './mapmanage/mapImport';
import { getSessionStorage } from '@/utils/auth';
export default {
name: 'UserMapList',
@ -63,9 +64,15 @@ export default {
y: 0
},
editModel: {},
lineCode: ''
lineCode: '',
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
};
},
computed: {
project() {
return getSessionStorage('project');
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
@ -117,6 +124,9 @@ export default {
clickEvent(obj, data, ele) {
switch (obj.type) {
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 } });
break;
}

View File

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

View File

@ -79,7 +79,8 @@ export default {
},
lineCode: '', // 线
expandList: [],
drawWay: false
drawWay: false,
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
};
},
computed: {
@ -95,6 +96,9 @@ export default {
}
}
return isShow;
},
project() {
return getSessionStorage('project');
}
},
watch: {
@ -152,6 +156,9 @@ export default {
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
};
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
if (this.$route.query.noPreLogout) {
this.$router.replace({ path: `${UrlConfig.displayNew}/teach`, query: query });
} else {