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;
});
}
});
});
centralizedStationList.forEach((item, index) => {
if (index < centralizedStationList.length / 2) {
this.centralizedStationList1.push(item);

View File

@ -8,10 +8,14 @@
</div>
<div class="display-draft" :style="{bottom: offsetBottom + 'px'}">
<el-button-group>
<!-- 排班计划 -->
<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="jl3dstation" @click="jumpjl3dstation">{{ jl3dstation }}</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>
<template v-if="isShowQuest">
<!-- && !isDesignPlatform -->
@ -286,9 +290,9 @@ export default {
jumpjl3dpassflow() {
this.$emit('passflow');
},
jumpjl3dstation() {
this.$emit('jl3dstation');
},
// jumpjl3dstation() {
// this.$emit('jl3dstation');
// },
jumpjlmap3d() {
this.$emit('hidepanel');
},
@ -309,10 +313,9 @@ export default {
},
change3dname() {
if (this.$route.query.prdType == '04') {
this.jl3dname = this.$t('display.demon.driverPerspective');
this.jl3dname = this.$t('display.demon.driverPerspective'); //
} else {
this.jl3dname = this.$t('display.demon.threeDimensionalView');
this.jl3dname = this.$t('display.demon.threeDimensionalView'); //
this.isShow3dmodel = true;
}
}

View File

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

View File

@ -17,8 +17,10 @@
:is-admin="isAdmin"
:device-code="deviceCode"
:countdown-time="countdownTime"
@passflow="passflow"
@getUserRole="getUserRole"
@hidepanel="hidepanel"
@devicemodel="devicemodel"
@startCounting="startCounting"
@hidejl3dcctv="hidejl3dcctv"
@handlerMemberManage="handlerMemberManage"
@ -475,6 +477,18 @@ export default {
},
faultChooseShow() { //
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() {
this.panelShow = true;

View File

@ -6,8 +6,14 @@
<el-button v-if="isAdmin && isProject" @click="handleEquipment">设备管理</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="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'">
<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>
@ -92,12 +98,18 @@ export default {
chatShow: true,
jsStart: true,
isGoback: false,
noQrcodeList: NoQrcodeList
noQrcodeList: NoQrcodeList,
isShow3dmodel :false,
jl3dname: this.$t('display.demon.threeDimensionalView'),
};
},
computed: {
lineCode() {
return this.$route.query.lineCode;
},
isShowScheduling() {
//
return this.$store.state.training.prdType == '02' || this.$store.state.training.prdType == '';
},
isSpeaking() {
return this.userRole != 'DRIVER' && this.userRole != '';
@ -116,10 +128,10 @@ export default {
}
},
watch: {
'$store.state.socket.roleList': function (val) { //
if (val && val.length) {
'$store.state.socket.roleList': function (roleList) { //
if (roleList && roleList.length) {
this.$nextTick(() => {
this.addrolesList(val);
this.addrolesList(roleList);
this.$store.dispatch('config/updateMenuBar');
});
}
@ -144,8 +156,7 @@ export default {
}
},
async mounted() {
// this.backLoading = false;
// this.isDisable = this.$store.state.map.runPlanStatus;
this.change3dname();
},
beforeDestroy() {
this.$store.dispatch('training/setGroup', '');
@ -292,13 +303,13 @@ export default {
},
jlmap3dcctv() {
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() {
startPracticalCompetition(this.group, this.$route.query.raceId).then(resp => {
this.$emit('startCounting');
@ -350,6 +361,14 @@ export default {
}).catch(() => {
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 lineCode = this.$store.getters['map/lineCode'];
if (em.subType === 'TrainWindow') {
device = { _type: deviceType.TrainWindow, code: em.deviceCode };
this.$store.dispatch('map/setTrainWindowShow', true);
if (lineCode != '06') {
device = { _type: deviceType.TrainWindow, code: em.deviceCode };
this.$store.dispatch('map/setTrainWindowShow', true);
}
} else if (em.subType == 'button' && em.deviceType == 'Station') { // 线
const equipment = this.getDeviceByEm(em);
this.$store.dispatch('menuOperation/setSelected', {device:equipment, subType: em.subType});