diff --git a/src/api/jmap/map.js b/src/api/jmap/map.js index 3ce4c0795..b988690d8 100644 --- a/src/api/jmap/map.js +++ b/src/api/jmap/map.js @@ -229,13 +229,13 @@ export function publisMapCityList(data) { }); } -/** 新版地图根据仿真mapId获取仿真地图数据 */ -export function getNewMapDataByMapId(mapId) { - return request({ - url: `/api/map/${mapId}/mapData`, - method: 'get' - }); -} +// /** 新版地图根据仿真mapId获取仿真地图数据 */ +// export function getNewMapDataByMapId(mapId) { +// return request({ +// url: `/api/map/${mapId}/mapData`, +// method: 'get' +// }); +// } /** 发布地图根据id生成子系统及权限 */ export function generateAncillaryData(mapId) { return request({ diff --git a/src/i18n/langs/en/system.js b/src/i18n/langs/en/system.js index e5dcaf2c6..e467decf7 100644 --- a/src/i18n/langs/en/system.js +++ b/src/i18n/langs/en/system.js @@ -25,6 +25,7 @@ export default { mapName: 'Map Name', trainingName: 'Training Name', trainingUseTime: 'Training Time', + hour:'Hour', minute: 'Minute', second: 'Second', createSimulationTitle: 'Create Simulation Information', diff --git a/src/i18n/langs/zh/system.js b/src/i18n/langs/zh/system.js index 3c9e83713..d646e817e 100644 --- a/src/i18n/langs/zh/system.js +++ b/src/i18n/langs/zh/system.js @@ -25,6 +25,7 @@ export default { mapName: '地图名称', trainingName: '实训名称', trainingUseTime: '实训用时', + hour:'时', minute: '分', second: '秒', createSimulationTitle: '创建仿真信息', diff --git a/src/jlmap3d/jl3dsimulation/jlmap3d.js b/src/jlmap3d/jl3dsimulation/jlmap3d.js index 596e6f7d4..fa03569e0 100644 --- a/src/jlmap3d/jl3dsimulation/jlmap3d.js +++ b/src/jlmap3d/jl3dsimulation/jlmap3d.js @@ -247,7 +247,7 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) { linklist = loadlinklist; signallist = loadsignallist; stationstandlist = loadstationstandlist; - + trainlisttest = loadtrainlisttest; realsectionlist = loadrealsectionlist; rails = loadrails; diff --git a/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js b/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js index c06250299..cdfbf9ada 100644 --- a/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js +++ b/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js @@ -31,12 +31,13 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe const data = JSON.parse(Response.body); if(data.type == "PFV"){ - console.log(data); - console.log(trafficTrain.trainList); + // console.log(data); + // console.log(trafficTrain.trainList); for(let k in trafficTrain.trainList){ if(trafficTrain.trainList[k].code == data.body){ updateValue(data.body); trafficTrain.updateNowTrainCode(data.body); + trafficTrain.updateNowTrunk(0+''); break; } } @@ -55,8 +56,9 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe } } - if(data.type == "TRAIN_PFI_BL"){ + if(data.type == "TRAIN_PFI_BL"){ + // console.log(data); trafficTrain.updateTrainData(data.body); diff --git a/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js b/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js index 4ac6ca28a..7b1d10be7 100644 --- a/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js +++ b/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js @@ -244,7 +244,9 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) { window.onresize = function () { passerRender.reSize(scope.dom.offsetWidth,scope.dom.offsetHeight); } - + this.updateNowTrunk = function(newTrunkNum){ + passerHuman.nowTrunk = newTrunkNum; + }; this.switchcamera = function(trunkNum){ passerHuman.nowTrunk = trunkNum; @@ -316,10 +318,14 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) { this.updateTrainData = function(newData){ - if(scope.trainList.length > 0){ - for(let i=0;i 0){ + // for(let k in scope.trainList.length){ + let k = newData.code; + if(scope.trainList[k]){ + // console.log(newData); + // console.log(scope.trainList[k].num); + scope.trainList[k].num = scope.trainList[k].num + newData.in - newData.out; if(passerTrain.toptrain.nowcode == newData.code){ scope.humanWaitIn = getnum(newData.in,6); @@ -330,15 +336,15 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) { // console.log("------------------"); passerHuman.initTrainRail(humanlist,scope.humanWaitIn,scope.humanWaitOut,nowLeaveDoor); - let trainDataList = getnum(scope.trainList[i].num,6); + let trainDataList = getnum(scope.trainList[k].num,6); // nowTrunk.code = newCode; scope.nowTrunk.numList = trainDataList; updateTrainNum(trainDataList); } - i = scope.trainList.length; + // i = scope.trainList.length; } - } - } + // } + // } } this.updateNowTrainCode = function(newCode){ diff --git a/src/utils/date.js b/src/utils/date.js index a1a6a8786..2402fca25 100644 --- a/src/utils/date.js +++ b/src/utils/date.js @@ -82,3 +82,15 @@ export function computationTime(time) { } return hours + ':' + minutes + ':' + seconds; } + +export function computationSeconds(seconds, hourUnit, minuteUnit, secondUnit) { + if (seconds) { + const h = parseInt(seconds / 3600); + const m = parseInt((seconds - h * 3600) / 60); + const s = (seconds - h * 3600) % 60; + return h ? `${h} ${hourUnit} ${m} ${minuteUnit} ${s} ${secondUnit}` + : m ? `${m} ${minuteUnit} ${s} ${secondUnit}` + : `${s} ${secondUnit}`; + } + return null; +} diff --git a/src/utils/loaddata.js b/src/utils/loaddata.js index 2c4b550bc..ca7b282e8 100644 --- a/src/utils/loaddata.js +++ b/src/utils/loaddata.js @@ -1,5 +1,6 @@ import store from '@/store/index_APP_TARGET'; -import { getPublishMapVersionById, getPublishMapDetailById, getNewMapDataByMapId} from '@/api/jmap/map'; +import { getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map'; +// getNewMapDataByMapId // import { getNewMapDataByGroup } from '@/api/simulation'; // 获取地图版本数据,和store里面的map版本做比较,如果不同 @@ -48,7 +49,7 @@ export function loadMapDataById(mapId, type = 'mapPreview') { export function loadNewMapDataByMapId(mapId) { return new Promise((resolve, reject) => { - getNewMapDataByMapId(mapId).then(resp => { + getPublishMapDetailById(mapId).then(resp => { covertData(resp.data, 'mapId', resolve); }).catch(error => { reject(error); diff --git a/src/views/competitionManage/bankList/index.vue b/src/views/competitionManage/bankList/index.vue index d2f9d11c5..fe49fc781 100644 --- a/src/views/competitionManage/bankList/index.vue +++ b/src/views/competitionManage/bankList/index.vue @@ -20,6 +20,7 @@ export default { data() { return { companyList: [], + companyMap: {}, pagerConfig: { pageSize: 'pageSize', pageIndex: 'pageNum' @@ -78,11 +79,14 @@ export default { return ''; } }, - // { - // title: '创建人', - // prop: 'createUserName', - // width: '100' - // }, + { + title: '单位', + prop: 'companyId', + width: '100', + type: 'tag', + columnValue: (row) => { return this.getCompanyName(row.companyId); }, + tagType: (row) => { return ''; } + }, { type: 'button', title: '操 作', @@ -124,6 +128,7 @@ export default { getCompanyList().then(resp => { resp.data.forEach(item => { this.queryForm.queryObject.companyId.config.data.push({ value: item.id, label: item.name }); + this.companyMap[item.id] = item.name; }); }); }, @@ -131,7 +136,9 @@ export default { doCreate() { this.$router.push({path: `${UrlConfig.bank.questionCreate}`}); }, - + getCompanyName(companyId) { + return this.companyMap[companyId]; + }, edit(index, row) { this.$router.push({path: `${UrlConfig.bank.questionUpdate}/${row.id}`}); }, diff --git a/src/views/designPlatform/bigScreen.vue b/src/views/designPlatform/bigScreen.vue index b9afbb2eb..240894dc2 100644 --- a/src/views/designPlatform/bigScreen.vue +++ b/src/views/designPlatform/bigScreen.vue @@ -31,10 +31,6 @@ export default { }, data() { return { - // size: { - // width: document.documentElement.clientWidth - 400, - // height: document.documentElement.clientHeight - 80 - // }, maskOpen: false, maskWidth: 'calc(100% - 450px)', disPlay: false @@ -173,8 +169,6 @@ export default { this.clearSubscribe(); } this.$store.dispatch('training/over').then(() => { - EventBus.$emit('runPlanStop'); - EventBus.$emit('chatSubscribeStop'); history.go(-1); }); }, @@ -189,8 +183,7 @@ export default { this.clearSubscribe(); const header = { group: this.$route.query.group || '', 'X-Token': getToken() }; creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header); - - await this.$store.dispatch('training/setHasSubscribed'); + // await this.$store.dispatch('training/setHasSubscribed'); }, clearSubscribe() { clearSubscribe(`${displayTopic}\/${this.$route.query.group}`); diff --git a/src/views/designPlatform/bigSplitScreen.vue b/src/views/designPlatform/bigSplitScreen.vue index 83958d0ca..18c4579a2 100644 --- a/src/views/designPlatform/bigSplitScreen.vue +++ b/src/views/designPlatform/bigSplitScreen.vue @@ -180,8 +180,6 @@ export default { this.clearSubscribe(); } this.$store.dispatch('training/over').then(() => { - EventBus.$emit('runPlanStop'); - EventBus.$emit('chatSubscribeStop'); history.go(-1); }); }, @@ -196,8 +194,7 @@ export default { this.clearSubscribe(); const header = { group: this.$route.query.group || '', 'X-Token': getToken() }; creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header); - - await this.$store.dispatch('training/setHasSubscribed'); + // await this.$store.dispatch('training/setHasSubscribed'); }, clearSubscribe() { clearSubscribe(`${displayTopic}\/${this.$route.query.group}`); diff --git a/src/views/designPlatform/testRunplan.vue b/src/views/designPlatform/testRunplan.vue index 382ca440f..d37d294f7 100644 --- a/src/views/designPlatform/testRunplan.vue +++ b/src/views/designPlatform/testRunplan.vue @@ -133,8 +133,7 @@ export default { this.clearSubscribe(); const header = { group: this.group || '', 'X-Token': getToken() }; creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header); - - await this.$store.dispatch('training/setHasSubscribed'); + // await this.$store.dispatch('training/setHasSubscribed'); }, clearSubscribe() { clearSubscribe(`${displayTopic}\/${this.group}`); diff --git a/src/views/exam/detail/examDetail.vue b/src/views/exam/detail/examDetail.vue index f83cf5c09..d6e4c4c81 100644 --- a/src/views/exam/detail/examDetail.vue +++ b/src/views/exam/detail/examDetail.vue @@ -162,8 +162,6 @@ export default { this.examList = response.data.userExamQuestionsVOs; this.userExam = response.data; const list = response.data.userExamQuestionsVOs; - await this.$store.dispatch('exam/setUsedTime', this.userExam.usedTime); - await this.$store.dispatch('exam/setTotalTime', this.userExam.duration); await this.$store.dispatch('trainingList/setTrainingList', list); } catch (error) { // 判断是否有考试权限,如果没有权限则跳到购买页面,否则报错 diff --git a/src/views/ibp/ibpsystem/index.vue b/src/views/ibp/ibpsystem/index.vue index c8b33e309..3e8a775c5 100644 --- a/src/views/ibp/ibpsystem/index.vue +++ b/src/views/ibp/ibpsystem/index.vue @@ -281,8 +281,7 @@ export default { this.clearSubscribe(); const header = { group: this.$route.query.group || '', 'X-Token': getToken() }; creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header); - - await this.$store.dispatch('training/setHasSubscribed'); + // await this.$store.dispatch('training/setHasSubscribed'); }, clearSubscribe() { clearSubscribe(`${displayTopic}\/${this.$route.query.group}`); diff --git a/src/views/iscs/iscsSystem/groupNav.vue b/src/views/iscs/iscsSystem/groupNav.vue index dc0263c4c..cbd86420a 100644 --- a/src/views/iscs/iscsSystem/groupNav.vue +++ b/src/views/iscs/iscsSystem/groupNav.vue @@ -345,8 +345,7 @@ export default { this.clearSubscribe(); const header = { group: this.group || '', 'X-Token': getToken() }; creatSubscribe(`${displayTopic}\/${this.group}`, header); - - await this.$store.dispatch('training/setHasSubscribed'); + // await this.$store.dispatch('training/setHasSubscribed'); }, clearSubscribe() { clearSubscribe(`${displayTopic}\/${this.group}`); diff --git a/src/views/iscs/iscsSystem/stationNav.vue b/src/views/iscs/iscsSystem/stationNav.vue index 898f7d5be..1e31eb0b0 100644 --- a/src/views/iscs/iscsSystem/stationNav.vue +++ b/src/views/iscs/iscsSystem/stationNav.vue @@ -381,7 +381,7 @@ export default { this.clearSubscribe(); const header = { group: this.group || '', 'X-Token': getToken() }; creatSubscribe(`${displayTopic}\/${this.group}`, header); - await this.$store.dispatch('training/setHasSubscribed'); + // await this.$store.dispatch('training/setHasSubscribed'); }, clearSubscribe() { clearSubscribe(`${displayTopic}\/${this.group}`); diff --git a/src/views/messageBoard/index.vue b/src/views/messageBoard/index.vue index f2d56f4f0..0d3c400da 100644 --- a/src/views/messageBoard/index.vue +++ b/src/views/messageBoard/index.vue @@ -62,7 +62,7 @@ -
+
暂无留言
@@ -80,7 +80,7 @@ 清空 留言 - 我要留言 + 我要留言
@@ -100,7 +100,6 @@ export default { name: 'MessageBoard', data() { return { - // dialogVisible: false, content: '', postCommentList: [], pageSize: 10, @@ -201,7 +200,7 @@ export default { }, avatarUrl(val) { if (val && val.creatorAvatarPath) { - return 'https://joylink.club/oss/joylink' + val.creatorAvatarPath; + return process.env.VUE_APP_VOICE_API + val.creatorAvatarPath; } else { return 'https://joylink.club/oss/wxmicro_assistant/userhead/defaultuser.png'; } @@ -355,6 +354,14 @@ export default { display: flex; justify-content: center; } + .empty-text{ + text-align: center; + width: 100%; + height: 50px; + line-height: 50px; + font-size: 18px; + color: #ccc; + } .head_portrait{ width: 50px; height: 50px; diff --git a/src/views/newMap/displayNew/demon/planSchedule.vue b/src/views/newMap/displayNew/demon/planSchedule.vue index 8387c0eea..8ceacbbb1 100644 --- a/src/views/newMap/displayNew/demon/planSchedule.vue +++ b/src/views/newMap/displayNew/demon/planSchedule.vue @@ -170,7 +170,7 @@ export default { this.clearSubscribe(); const header = { group: this.$route.query.group || '', 'X-Token': getToken() }; creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header); - await this.$store.dispatch('training/setHasSubscribed'); + // await this.$store.dispatch('training/setHasSubscribed'); this.$store.dispatch('app/animationsClose'); }, clearSubscribe() { diff --git a/src/views/newMap/displayNew/exam/index.vue b/src/views/newMap/displayNew/exam/index.vue index 8a9f9c1b5..7659abc45 100644 --- a/src/views/newMap/displayNew/exam/index.vue +++ b/src/views/newMap/displayNew/exam/index.vue @@ -75,7 +75,7 @@ export default { }, watch: { '$store.state.map.mapViewLoadedCount': function() { - this.$store.dispatch('exam/countUsedTime'); + // this.$store.dispatch('exam/countUsedTime'); this.locateDeviceCode && this.$store.dispatch('exam/setCenter', this.locateDeviceCode); // 设置考题对象居中 }, $route() { @@ -90,7 +90,7 @@ export default { } }, // mounted() { - // this.initData(); + // this.initDate(); // }, methods: { tipInfo(opt) { diff --git a/src/views/newMap/displayNew/exam/tipExamList.vue b/src/views/newMap/displayNew/exam/tipExamList.vue index 3e08c5dda..acce84010 100644 --- a/src/views/newMap/displayNew/exam/tipExamList.vue +++ b/src/views/newMap/displayNew/exam/tipExamList.vue @@ -148,6 +148,7 @@ export default { } }, beforeDestroy() { + this.$store.dispatch('exam/stopCountTime'); this.clearScanCommit(); }, methods: { diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index 2e7444ad3..a827174ce 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -10,7 +10,7 @@ - +
@@ -82,9 +82,9 @@ export default { isScript() { return this.mode === 'script'; }, - isPlan() { - return this.mode === 'plan'; - }, + // isPlan() { + // return this.mode === 'plan'; + // }, mapId() { return this.$route.query.mapId; }, @@ -157,10 +157,6 @@ export default { await this.$refs.menuDispatherContest.back(); } }, - // 以某个设备居中显示 - setCenter(code) { - this.$jlmap.setCenter(code); - }, // 设置各个按钮的定位 setPosition() { this.$nextTick(() => { diff --git a/src/views/newMap/displayNew/menuTrainList.vue b/src/views/newMap/displayNew/menuTrainList.vue index b88f2e440..05dd922be 100644 --- a/src/views/newMap/displayNew/menuTrainList.vue +++ b/src/views/newMap/displayNew/menuTrainList.vue @@ -1,10 +1,6 @@ @@ -118,7 +117,7 @@ export default { }, handleAdd() { - this.$refs.create.show(); + this.$refs.edit.show(); }, handleBatchDelete() { diff --git a/src/views/system/systemGenerate/index.vue b/src/views/system/systemGenerate/index.vue index faeff046d..8e1b085d9 100644 --- a/src/views/system/systemGenerate/index.vue +++ b/src/views/system/systemGenerate/index.vue @@ -146,7 +146,6 @@ export default { // 获取地图 this.mapList = []; const res = await getPublishMapListOnline(); - this.allMapList = res.data; res.data.forEach(elem => { this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name }); this.mapList.push({ value: elem.id, label: elem.name }); diff --git a/src/views/system/userControl/edit.vue b/src/views/system/userControl/edit.vue index d7415f00d..8db7652b9 100644 --- a/src/views/system/userControl/edit.vue +++ b/src/views/system/userControl/edit.vue @@ -10,23 +10,26 @@