# Conflicts:
#	src/views/newMap/jointTrainingNew/menuDemon.vue
This commit is contained in:
zyy 2020-07-29 09:32:16 +08:00
commit ac7424785a
21 changed files with 279 additions and 103 deletions

View File

@ -110,6 +110,13 @@ export default {
return '';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && this.popClass === 'ningbo-01__systerm') {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

@ -103,6 +103,13 @@ export default {
return '查询进路状态';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && this.systemName === 'ningbo-01__systerm') {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

@ -146,6 +146,11 @@ export default {
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && this.systemName === 'ningbo-01__systerm' && !this.commitDisabled) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {

View File

@ -89,6 +89,13 @@ export default {
return '';
}
},
watch:{
'$store.state.map.keyboardEnterCount': function (val) {
if (this.dialogShow && this.popClass === 'ningbo-01__systerm') {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

@ -194,6 +194,17 @@ export default {
});
},
deep: true
},
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && this.popClass === 'ningbo-01__systerm') {
if (!this.cmdDisabled[0]) {
this.command();
} else if (!this.cmdDisabled[1]) {
this.confirm1();
} else if (!this.cmdDisabled[2]) {
this.confirm2();
}
}
}
},
mounted() {

View File

@ -64,6 +64,13 @@ export default {
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && this.popClass === 'ningbo-01__systerm') {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

@ -78,6 +78,13 @@ export default {
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && this.popClass === 'ningbo-01__systerm') {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

@ -11,10 +11,10 @@
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" @submit.native.prevent>
<div style="width: 96%;">
<el-form-item label="限速值:" label-width="95px" prop="speedLimit">
<el-input v-model="addModel.speedLimit" size="small" />
<el-input v-model="addModel.speedLimit" size="small" />
</el-form-item>
</div>
</el-form>
@ -50,14 +50,14 @@ export default {
},
data() {
return {
selected: {},
selected: {},
addModel: {
speedLimit: '' //
},
rules: {
speedLimit: [
{ required: true, message: '请输入限速值', trigger: 'blur' },
{ validator: this.validateLimit, trigger: 'blur' }
{ required: true, message: '请输入限速值', trigger: 'blur' },
{ validator: this.validateLimit, trigger: 'blur' }
]
},
dialogShow: false,
@ -65,8 +65,8 @@ export default {
};
},
computed: {
...mapGetters('training', [
'memberList'
...mapGetters('training', [
'memberList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -75,26 +75,33 @@ export default {
return '输入限速值';
}
},
watch:{
'$store.state.map.keyboardEnterCount': function (val) {
if (this.dialogShow && this.popClass === 'ningbo-01__systerm') {
this.commit();
}
}
},
mounted() {
},
methods: {
validateLimit(rule, value, callback) {
const num = Number(value);
if (num) {
if (num >= 25 && num <= 65) {
callback();
} else {
callback(new Error('限速值应该在25-65之间'));
}
} else {
callback(new Error('请输入数值类型'));
}
},
validateLimit(rule, value, callback) {
const num = Number(value);
if (num) {
if (num >= 25 && num <= 65) {
callback();
} else {
callback(new Error('限速值应该在25-65之间'));
}
} else {
callback(new Error('请输入数值类型'));
}
},
doShow(selected) {
this.selected = selected;
this.selected = selected;
this.addModel = {
speedLimit:''
};
};
this.dialogShow = true;
this.$nextTick(function () {
@ -111,19 +118,19 @@ export default {
this.$refs['form'].validate((valid) => {
if (valid) {
const group = this.$route.query.group;
const param = {
commandType: 'Set_Speed_Limit',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {
speedLimit: this.addModel.speedLimit
}
};
commitTrainSend(group, param).then(({valid, operate})=>{
this.doClose();
}).catch((error) => {
this.$refs.noticeInfo.doShow();
this.doClose();
});
const param = {
commandType: 'Set_Speed_Limit',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {
speedLimit: this.addModel.speedLimit
}
};
commitTrainSend(group, param).then(({valid, operate})=>{
this.doClose();
}).catch((error) => {
this.$refs.noticeInfo.doShow();
this.doClose();
});
} else {
return false;
}

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

@ -183,6 +183,15 @@ export default {
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
if (this.type !== 'password') {
this.commitOnce();
} else if (this.type !== 'text') {
this.commit();
}
}
}
},
mounted() {
this.$nextTick(() => {

View File

@ -90,6 +90,13 @@ export default {
return disabled;
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && !this.commitDisabled) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

@ -109,6 +109,18 @@ export default {
return '解除封锁';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
if (!this.disabledConfirm1) {
this.confirm1();
} else if (!this.disabledConfirm2) {
this.confirm2();
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

@ -70,6 +70,13 @@ export default {
return '';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

@ -265,6 +265,19 @@ export default {
},
'speed': function (val) {
if (val) this.cmdDisabled[0] = false;
},
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
if (this.$refs.confirmControlSpeed.show) {
this.$refs.confirmControlSpeed.commit();
} else if (!this.cmdDisabled[0]) {
this.command();
} else if (!this.cmdDisabled[1]) {
this.confirm1();
} else if (!this.cmdDisabled[2]) {
this.confirm2();
}
}
}
},
mounted() {

View File

@ -20,6 +20,7 @@
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="addModel.serviceNumber" size="mini" />
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip1 }}</div>
</el-col>
</el-row>
<el-row>
@ -28,6 +29,7 @@
<el-row>
<el-col :span="12">
<el-input :id="domIdTargetCodeChange" v-model="addModel.destinationCode" size="mini" />
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip2 }}</div>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
@ -63,6 +65,8 @@ export default {
destinationCode: '',
serviceNumber: ''
},
messageTip1:'',
messageTip2:'',
dialogShow: false,
trueValue: true,
loading: false
@ -88,6 +92,13 @@ export default {
return '设置头码车';
}
},
watch:{
'$store.state.map.keyboardEnterCount': function (val) {
if (this.dialogShow) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
@ -113,11 +124,22 @@ export default {
mouseCancelState(this.selected);
},
commit() {
if (!this.addModel.serviceNumber) {
this.messageTip1 = '请输入服务号';
return;
}
if (!this.addModel.destinationCode) {
this.messageTip1 = '';
this.messageTip2 = '请输入目的地号';
return;
}
const params = {
groupNumber: this.addModel.groupNumber,
destinationCode: this.addModel.destinationCode,
serviceNumber: this.addModel.serviceNumber
};
this.messageTip1 = '';
this.messageTip2 = '';
this.loading = true;
commitOperate(menuOperate.TrainWindow.destinationTrainId, params, 2).then(({valid})=>{
this.loading = false;

View File

@ -25,9 +25,11 @@
<el-row>
<el-col :span="11">
<el-input :id="domIdServerNoChange" v-model="addModel.serviceNumber" size="mini" />
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip1 }}</div>
</el-col>
<el-col :span="11" :offset="2">
<el-input :id="domIdTrainNoChange" v-model="addModel.tripNumber" size="mini" />
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip2 }}</div>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
@ -58,6 +60,8 @@ export default {
return {
trainNoList: [],
selected: null,
messageTip1:'',
messageTip2:'',
addModel: {
groupNumber: '',
tripNumber: '',
@ -90,6 +94,13 @@ export default {
return '设置计划车';
}
},
watch:{
'$store.state.map.keyboardEnterCount': function (val) {
if (this.dialogShow) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
@ -115,12 +126,22 @@ export default {
mouseCancelState(this.selected);
},
commit() {
if (!this.addModel.serviceNumber) {
this.messageTip1 = '请输入服务号';
return;
}
if (!this.addModel.tripNumber) {
this.messageTip1 = '';
this.messageTip2 = '请输入序列号';
return;
}
const params = {
groupNumber: this.addModel.groupNumber,
tripNumber: this.addModel.tripNumber,
serviceNumber: this.addModel.serviceNumber
};
this.messageTip1 = '';
this.messageTip2 = '';
this.loading = true;
commitOperate(menuOperate.TrainWindow.setPlanTrainId, params, 2).then(({valid})=>{
this.loading = false;

View File

@ -68,6 +68,13 @@ export default {
return '设置人工车';
}
},
watch:{
'$store.state.map.keyboardEnterCount': function (val) {
if (this.dialogShow) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

@ -12,7 +12,7 @@
<train-set-head ref="trainSetHead" />
<train-set-work ref="trainSetWork" />
<trainSetWorkATP ref="trainSetWorkATP" />
<SpeedLimit ref="speedLimit" pop-class="ningbo-01__systerm" />
<SpeedLimit ref="speedLimit" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
</div>
</template>
@ -28,7 +28,7 @@ import TrainSetPlan from './dialog/trainSetPlan';
import TrainSetHead from './dialog/trainSetHead';
import TrainSetWork from './dialog/trainSetWork';
import trainSetWorkATP from './dialog/trainSetWorkATP';
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -50,8 +50,8 @@ export default {
TrainSetHead,
TrainSetWork,
trainSetWorkATP,
SetFault,
SpeedLimit
SetFault,
SpeedLimit
},
props: {
selected: {
@ -219,20 +219,20 @@ export default {
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
{
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
},
{
},
{
label: '开/关门',
handler: this.handleOpenCloseDoor
}
@ -248,8 +248,8 @@ export default {
computed: {
...mapGetters('training', [
'mode',
'operatemode',
'memberList'
'operatemode',
'memberList'
]),
...mapGetters('menuOperation', [
'buttonOperation'
@ -313,8 +313,8 @@ export default {
// commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -329,8 +329,8 @@ export default {
// commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -340,9 +340,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -352,9 +352,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverEedLight() {
const group = this.$route.query.group;
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -364,13 +364,13 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected);
},
// /
handleOpenCloseDoor() {
const group = this.$route.query.group;
},
handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected);
},
// /
handleOpenCloseDoor() {
const group = this.$route.query.group;
const param = {
commandType: 'Open_Or_Close_Door',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -380,7 +380,7 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
},
//
limitSpeed() {
const operate = {

View File

@ -874,7 +874,7 @@ const map = {
};
},
setKeyboardEnter: (state) => {
state.keyboardEnterCount++;
state.keyboardEnterCount++;
}
},

View File

@ -15,6 +15,16 @@
<div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" />
</div>
<div v-if="!commonConversation" class="chat-setting" @click="goCommonConversation">
<el-tooltip effect="dark" content="公共会话" placement="top-start">
<i class="el-icon-chat-line-round" />
</el-tooltip>
</div>
<div v-if="conversitionId && commonConversation" class="chat-setting" @click="cancelCommonConversation">
<el-tooltip effect="dark" content="私有会话" placement="top-start">
<i class="el-icon-chat-round" />
</el-tooltip>
</div>
</div>
<div class="chat-box-content">
<el-tree
@ -36,7 +46,6 @@
</div>
<div class="chat-box-footer">
<div style="width: 400px;font-size: 14px;">{{ userString }}</div>
<el-button size="mini" type="primary" class="chat-box-footer-create" style="right: 80px;" @click="goCommonConversation">公共会话</el-button>
<el-button size="mini" type="primary" class="chat-box-footer-create" :loading="createLoading" @click="createCoversition()">创建群聊</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
@ -50,6 +59,21 @@
<div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" />
</div>
<div v-if="!conversitionId && userRole !== 'AUDIENCE'" class="chat-setting" @click="cancelCommonConversation">
<el-tooltip effect="dark" content="成员列表" placement="top-start">
<i class="el-icon-s-custom" />
</el-tooltip>
</div>
<div v-if="!commonConversation" class="chat-setting" @click="goCommonConversation">
<el-tooltip effect="dark" content="公共会话" placement="top-start">
<i class="el-icon-chat-line-round" />
</el-tooltip>
</div>
<div v-if="conversitionId && commonConversation" class="chat-setting" @click="cancelCommonConversation">
<el-tooltip effect="dark" content="私有会话" placement="top-start">
<i class="el-icon-chat-round" />
</el-tooltip>
</div>
</div>
<div class="chat-box-content">
<chat-content
@ -76,9 +100,6 @@
<div class="chat-box-footer">
<div class="chat-box-footer-tool" />
<el-button v-if="isConversitionCreator && isButtonShow && !commonConversation" size="mini" type="danger" class="chat-box-footer-quit" :loading="quitLoading" @click="quitConversition()">退出群聊</el-button>
<el-button v-if="!commonConversation" class="chat-box-footer-send" size="mini" type="primary" @click="goCommonConversation">公共会话</el-button>
<el-button v-if="!conversitionId && userRole !== 'AUDIENCE'" class="chat-box-footer-send" size="mini" type="primary" @click="cancelCommonConversation">成员列表</el-button>
<el-button v-if="conversitionId && commonConversation" class="chat-box-footer-send" size="mini" type="primary" @click="cancelCommonConversation">私有会话</el-button>
<el-button v-if="isButtonShow && !commonConversation" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
@ -205,7 +226,7 @@ export default {
});
},
'$store.state.socket.createConversition':function(val) {
const member = this.memberData[val.creatorId];
const member = this.memberData[val.creatorId];
if (member && member.userId == this.$store.state.user.id) {
const memberList = [];
val.memberIds.forEach(id=>{
@ -369,23 +390,23 @@ export default {
this.form = data;
},
createCoversition() {
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 = '群聊列表为空, 请选择人员';
}
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

@ -9,11 +9,11 @@
<el-button v-if="isAdmin" @click="memberManage">成员管理</el-button>
<el-button v-if="isAdmin && !noQrcodeList.includes(project)" type="primary" @click="generateQrCode">生成二维码</el-button>
<!-- cctv视图 -->
<!-- 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'">
@ -109,20 +109,19 @@ export default {
computed: {
lineCode() {
return this.$route.query.lineCode;
},
isShowScheduling() {
//
// console.log(this.$store.state.training.prdType, '=====')
return this.$store.state.training.prdType == '02' || this.$store.state.training.prdType == '';
},
isShowScheduling() {
//
return (this.$store.state.training.prdType == '02' || this.$store.state.training.prdType == '') && !this.$route.query.projectDevice;
},
isSpeaking() {
return this.userRole != 'DRIVER' && this.userRole != '';
},
isStationSupervisor() {
return this.userRole == 'STATION_SUPERVISOR';
return this.userRole == 'STATION_SUPERVISOR' && !this.$route.query.projectDevice;
},
isDriver() {
return this.userRole == 'DRIVER';
return this.userRole == 'DRIVER' && !this.$route.query.projectDevice;
},
project() {
return getSessionStorage('project');
@ -163,7 +162,7 @@ export default {
}
},
async mounted() {
this.change3dname();
this.change3dname();
},
beforeDestroy() {
this.$store.dispatch('training/setGroup', '');
@ -310,11 +309,11 @@ export default {
},
jlmap3dcctv() {
this.$emit('hidejl3dcctv');
},
jumpjl3dpassflow() {
},
jumpjl3dpassflow() {
this.$emit('passflow');
},
jumpjlmap3dmodel() {
},
jumpjlmap3dmodel() {
this.$emit('devicemodel');
},
startCompetition() {