This commit is contained in:
fan 2020-07-28 16:29:06 +08:00
commit 10918d1f06
6 changed files with 80 additions and 38 deletions

View File

@ -176,7 +176,7 @@ export default {
this.centralizedMap[ele] = item.code; this.centralizedMap[ele] = item.code;
}); });
} }
}); });
centralizedStationList.forEach((item, index) => { centralizedStationList.forEach((item, index) => {
if (index < centralizedStationList.length / 2) { if (index < centralizedStationList.length / 2) {
this.centralizedStationList1.push(item); this.centralizedStationList1.push(item);

View File

@ -8,10 +8,14 @@
</div> </div>
<div class="display-draft" :style="{bottom: offsetBottom + 'px'}"> <div class="display-draft" :style="{bottom: offsetBottom + 'px'}">
<el-button-group> <el-button-group>
<!-- 排班计划 -->
<el-button v-if="isShowScheduling && !dataError" type="primary" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button> <el-button v-if="isShowScheduling && !dataError" type="primary" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button>
<!-- cctv视图 -->
<el-button v-if="!isShowScheduling && !dataError" type="jl3dpassflow" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button> <el-button v-if="!isShowScheduling && !dataError" type="jl3dpassflow" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
<!-- <el-button v-if="!isShowScheduling && !dataError" type="jl3dstation" @click="jumpjl3dstation">{{ jl3dstation }}</el-button> --> <!-- <el-button v-if="!isShowScheduling && !dataError" type="jl3dstation" @click="jumpjl3dstation">{{ jl3dstation }}</el-button> -->
<!-- 三维视图 -->
<el-button v-if="!isShowScheduling && !dataError" type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button> <el-button v-if="!isShowScheduling && !dataError" type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
<!-- 设备视图 -->
<el-button v-if="isShow3dmodel && !isShowScheduling && !dataError" type="jumpjlmap3dmodel" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button> <el-button v-if="isShow3dmodel && !isShowScheduling && !dataError" type="jumpjlmap3dmodel" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
<template v-if="isShowQuest"> <template v-if="isShowQuest">
<!-- && !isDesignPlatform --> <!-- && !isDesignPlatform -->
@ -286,9 +290,9 @@ export default {
jumpjl3dpassflow() { jumpjl3dpassflow() {
this.$emit('passflow'); this.$emit('passflow');
}, },
jumpjl3dstation() { // jumpjl3dstation() {
this.$emit('jl3dstation'); // this.$emit('jl3dstation');
}, // },
jumpjlmap3d() { jumpjlmap3d() {
this.$emit('hidepanel'); this.$emit('hidepanel');
}, },
@ -309,10 +313,9 @@ export default {
}, },
change3dname() { change3dname() {
if (this.$route.query.prdType == '04') { if (this.$route.query.prdType == '04') {
this.jl3dname = this.$t('display.demon.driverPerspective'); this.jl3dname = this.$t('display.demon.driverPerspective'); //
} else { } else {
this.jl3dname = this.$t('display.demon.threeDimensionalView'); this.jl3dname = this.$t('display.demon.threeDimensionalView'); //
this.isShow3dmodel = true; this.isShow3dmodel = true;
} }
} }

View File

@ -205,8 +205,8 @@ export default {
}); });
}, },
'$store.state.socket.createConversition':function(val) { '$store.state.socket.createConversition':function(val) {
const member = this.memberData[val.creatorId]; const member = this.memberData[val.creatorId];
if (member.userId == this.$store.state.user.id) { if (member && member.userId == this.$store.state.user.id) {
const memberList = []; const memberList = [];
val.memberIds.forEach(id=>{ val.memberIds.forEach(id=>{
if (val.creatorId == id) { if (val.creatorId == id) {
@ -369,19 +369,23 @@ export default {
this.form = data; this.form = data;
}, },
createCoversition() { createCoversition() {
this.createLoading = true; if (this.memberIdList.length) {
startConversition(this.group, this.memberIdList).then(resp => { this.createLoading = true;
this.conversitionId = resp.data.id; startConversition(this.group, this.memberIdList).then(resp => {
this.messageList = []; this.conversitionId = resp.data.id;
this.privateMessageList = []; this.messageList = [];
this.userString = ''; this.privateMessageList = [];
this.isConversitionCreator = true; this.userString = '';
this.$message.success('创建会话成功!'); this.isConversitionCreator = true;
this.createLoading = false; this.$message.success('创建会话成功!');
}).catch((error) => { this.createLoading = false;
this.$message.error(error.code == '3005' ? '创建会话失败:仿真会话成员忙线中!' : '创建仿真失败!'); }).catch((error) => {
this.createLoading = false; this.$message.error(error.code == '3005' ? '创建会话失败:仿真会话成员忙线中!' : '创建仿真失败!');
}); this.createLoading = false;
});
} else {
this.userString = '群聊列表为空, 请选择人员';
}
}, },
// //
startRecording() { startRecording() {

View File

@ -17,8 +17,10 @@
:is-admin="isAdmin" :is-admin="isAdmin"
:device-code="deviceCode" :device-code="deviceCode"
:countdown-time="countdownTime" :countdown-time="countdownTime"
@passflow="passflow"
@getUserRole="getUserRole" @getUserRole="getUserRole"
@hidepanel="hidepanel" @hidepanel="hidepanel"
@devicemodel="devicemodel"
@startCounting="startCounting" @startCounting="startCounting"
@hidejl3dcctv="hidejl3dcctv" @hidejl3dcctv="hidejl3dcctv"
@handlerMemberManage="handlerMemberManage" @handlerMemberManage="handlerMemberManage"
@ -475,6 +477,18 @@ export default {
}, },
faultChooseShow() { // faultChooseShow() { //
this.$refs.faultChoose.doShow(); this.$refs.faultChoose.doShow();
},
passflow() {
const routeData = this.$router.resolve({
path:'/jlmap3d/passengerflow',
query:{
mapid:this.mapId,
group:this.group,
project: this.project,
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
}, },
showdriving() { showdriving() {
this.panelShow = true; this.panelShow = true;

View File

@ -6,8 +6,14 @@
<el-button v-if="isAdmin && isProject" @click="handleEquipment">设备管理</el-button> <el-button v-if="isAdmin && isProject" @click="handleEquipment">设备管理</el-button>
<el-button v-if="isAdmin" @click="memberManage">成员管理</el-button> <el-button v-if="isAdmin" @click="memberManage">成员管理</el-button>
<el-button v-if="isAdmin && !noQrcodeList.includes(project)" type="primary" @click="generateQrCode">生成二维码</el-button> <el-button v-if="isAdmin && !noQrcodeList.includes(project)" type="primary" @click="generateQrCode">生成二维码</el-button>
<el-button v-if="isDriver && !dataError" @click="jumpjlmap3d">{{ $t('joinTraining.driverPerspective') }}</el-button>
<el-button v-if="isStationSupervisor && !dataError" @click="jlmap3dcctv">cctv</el-button> <!-- cctv视图 -->
<el-button v-if="(isShowScheduling && !dataError) || (isStationSupervisor && !dataError)" @click="jumpjl3dpassflow">{{ $t('display.demon.passengerflow') }}</el-button>
<!-- 三维视图 / 司机视角 -->
<el-button v-if="(isShowScheduling && !dataError) || (isDriver && !dataError)" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
<!-- 设备视图 -->
<el-button v-if="isShow3dmodel && isShowScheduling && !dataError" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</el-button>
<template v-if="isAdmin && project != 'refereeJsxt'"> <template v-if="isAdmin && project != 'refereeJsxt'">
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button> <el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
<el-button type="danger" :disabled="dataError" @click="end">{{ $t('joinTraining.initialize') }}</el-button> <el-button type="danger" :disabled="dataError" @click="end">{{ $t('joinTraining.initialize') }}</el-button>
@ -92,12 +98,18 @@ export default {
chatShow: true, chatShow: true,
jsStart: true, jsStart: true,
isGoback: false, isGoback: false,
noQrcodeList: NoQrcodeList noQrcodeList: NoQrcodeList,
isShow3dmodel :false,
jl3dname: this.$t('display.demon.threeDimensionalView'),
}; };
}, },
computed: { computed: {
lineCode() { lineCode() {
return this.$route.query.lineCode; return this.$route.query.lineCode;
},
isShowScheduling() {
//
return this.$store.state.training.prdType == '02' || this.$store.state.training.prdType == '';
}, },
isSpeaking() { isSpeaking() {
return this.userRole != 'DRIVER' && this.userRole != ''; return this.userRole != 'DRIVER' && this.userRole != '';
@ -116,10 +128,10 @@ export default {
} }
}, },
watch: { watch: {
'$store.state.socket.roleList': function (val) { // '$store.state.socket.roleList': function (roleList) { //
if (val && val.length) { if (roleList && roleList.length) {
this.$nextTick(() => { this.$nextTick(() => {
this.addrolesList(val); this.addrolesList(roleList);
this.$store.dispatch('config/updateMenuBar'); this.$store.dispatch('config/updateMenuBar');
}); });
} }
@ -144,8 +156,7 @@ export default {
} }
}, },
async mounted() { async mounted() {
// this.backLoading = false; this.change3dname();
// this.isDisable = this.$store.state.map.runPlanStatus;
}, },
beforeDestroy() { beforeDestroy() {
this.$store.dispatch('training/setGroup', ''); this.$store.dispatch('training/setGroup', '');
@ -292,13 +303,13 @@ export default {
}, },
jlmap3dcctv() { jlmap3dcctv() {
this.$emit('hidejl3dcctv'); this.$emit('hidejl3dcctv');
},
jumpjl3dpassflow() {
this.$emit('passflow');
},
jumpjlmap3dmodel() {
this.$emit('devicemodel');
}, },
// formatTime(initTime) {
// const hh = prefixIntrger(initTime.getHours(), 2);
// const mm = prefixIntrger(initTime.getMinutes(), 2);
// const ss = prefixIntrger(initTime.getSeconds(), 2);
// return `${hh}:${mm}:${ss}`;
// },
startCompetition() { startCompetition() {
startPracticalCompetition(this.group, this.$route.query.raceId).then(resp => { startPracticalCompetition(this.group, this.$route.query.raceId).then(resp => {
this.$emit('startCounting'); this.$emit('startCounting');
@ -350,6 +361,14 @@ export default {
}).catch(() => { }).catch(() => {
this.$messageBox('仿真生成二维码失败!'); this.$messageBox('仿真生成二维码失败!');
}); });
},
change3dname() {
if (this.$route.query.prdType == '04') {
this.jl3dname = this.$t('display.demon.driverPerspective'); //
} else {
this.jl3dname = this.$t('display.demon.threeDimensionalView'); //
this.isShow3dmodel = true;
}
} }
} }
}; };

View File

@ -135,8 +135,10 @@ export default {
const point = { x: em.clientX, y: em.clientY }; const point = { x: em.clientX, y: em.clientY };
const lineCode = this.$store.getters['map/lineCode']; const lineCode = this.$store.getters['map/lineCode'];
if (em.subType === 'TrainWindow') { if (em.subType === 'TrainWindow') {
device = { _type: deviceType.TrainWindow, code: em.deviceCode }; if (lineCode != '06') {
this.$store.dispatch('map/setTrainWindowShow', true); device = { _type: deviceType.TrainWindow, code: em.deviceCode };
this.$store.dispatch('map/setTrainWindowShow', true);
}
} else if (em.subType == 'button' && em.deviceType == 'Station') { // 线 } else if (em.subType == 'button' && em.deviceType == 'Station') { // 线
const equipment = this.getDeviceByEm(em); const equipment = this.getDeviceByEm(em);
this.$store.dispatch('menuOperation/setSelected', {device:equipment, subType: em.subType}); this.$store.dispatch('menuOperation/setSelected', {device:equipment, subType: em.subType});