This commit is contained in:
joylink_cuiweidong 2020-07-28 18:30:10 +08:00
commit c0e3df14bc
22 changed files with 275 additions and 97 deletions

View File

@ -349,6 +349,7 @@ class SkinCode extends defaultStyle {
lampSpace: 60 // 灯间距 lampSpace: 60 // 灯间距
}, },
StationControl: { StationControl: {
disPlayNone: true, // 不显示
text: { text: {
distance: 2, // 灯和文字之间的距离 distance: 2, // 灯和文字之间的距离
fontSize: 11, // 字体大小 fontSize: 11, // 字体大小

View File

@ -171,20 +171,22 @@ export default class Station extends Group {
} }
// 创建控制模式 // 创建控制模式
createControlMode() { createControlMode() {
const model = this.model; const model = this.model;
if (model.visible && model.createControlMode) { if (!this.style.Station.StationControl.disPlayNone) {
// 紧急站控 if (model.visible && model.createControlMode) {
this.createEmergencyControl(); // 紧急站控
this.createEmergencyControl();
// 中控按钮 // 中控按钮
this.createCenterControl(); this.createCenterControl();
// 站控按钮 // 站控按钮
this.createSubstationControl(); this.createSubstationControl();
// 联锁控 // 联锁控
this.createInterconnectedControl(); this.createInterconnectedControl();
} }
}
this.setState(model); this.setState(model);
} }
@ -290,7 +292,7 @@ export default class Station extends Group {
} }
}); });
this.add(this.arcBorder); this.add(this.arcBorder);
} }
} }
createSubstationControl() { // 站控按钮 createSubstationControl() { // 站控按钮
@ -328,7 +330,7 @@ export default class Station extends Group {
}); });
this.add(this.substationArrowsControl); this.add(this.substationArrowsControl);
} }
} }
} }
createInterconnectedControl() { // 联锁控 createInterconnectedControl() { // 联锁控
@ -354,7 +356,13 @@ export default class Station extends Group {
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor);
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.greenColor); // 文字颜色 this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.greenColor); // 文字颜色
if (this.style.Station.StationControl.disPlayNone) {
this.stationText && this.stationText.setStyle('textFill', '#1fdc1f');
if (this.model.subheadDisplay) { // 副标题
this.subheadText && this.subheadText.setStyle('textFill', '#1fdc1f');
}
}
} }
handleLocal() { // 站控 handleLocal() { // 站控
@ -362,7 +370,13 @@ export default class Station extends Group {
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor);
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色 this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
if (this.style.Station.StationControl.disPlayNone) {
this.stationText && this.stationText.setStyle('textFill', '#fff');
if (this.model.subheadDisplay) { // 副标题
this.subheadText && this.subheadText.setStyle('textFill', '#fff');
}
}
} }
handleEmergency() { // 紧急站控 handleEmergency() { // 紧急站控
@ -370,7 +384,22 @@ export default class Station extends Group {
this.emergencyControl && this.emergencyControl.setTextColor(this.style.Station.StationControl.lamp.redColor); // 紧急 颜色 this.emergencyControl && this.emergencyControl.setTextColor(this.style.Station.StationControl.lamp.redColor); // 紧急 颜色
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
if (this.style.Station.StationControl.disPlayNone) {
this.stationText && this.stationText.setStyle('textFill', '#fff');
if (this.model.subheadDisplay) { // 副标题
this.subheadText && this.subheadText.setStyle('textFill', '#fff');
}
}
}
handleNone() { // 空
if (this.style.Station.StationControl.disPlayNone) { // 没有控制时显示 黄色
this.stationText && this.stationText.setStyle('textFill', '#FFFF00');
if (this.model.subheadDisplay) { // 副标题
this.subheadText && this.subheadText.setStyle('textFill', '#FFFF00');
}
}
} }
recover() { recover() {
@ -388,7 +417,8 @@ export default class Station extends Group {
// 设置状态 // 设置状态
setState(model) { setState(model) {
if (!this.isShowShape) return; if (!this.isShowShape) return;
this.recover(); this.recover();
// console.log(model.controlMode, model);
model.controlMode && this['handle' + model.controlMode](); model.controlMode && this['handle' + model.controlMode]();
if (model.tbStrategyId) { if (model.tbStrategyId) {
store.state.map.map.tbStrategyList.forEach(item => { store.state.map.map.tbStrategyList.forEach(item => {
@ -398,7 +428,6 @@ export default class Station extends Group {
} }
}); });
} }
} }
getShapeTipPoint(opts) { getShapeTipPoint(opts) {

View File

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

View File

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

View File

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

View File

@ -194,6 +194,17 @@ export default {
}); });
}, },
deep: true 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() { mounted() {

View File

@ -64,6 +64,13 @@ export default {
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : ''; 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() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');

View File

@ -78,6 +78,13 @@ export default {
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : ''; 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() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');

View File

@ -118,7 +118,7 @@ export default {
const step = { const step = {
operation: 'click', operation: 'click',
code: this.selectedObj.code code: this.selectedObj.code
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -332,23 +332,29 @@ export default {
handleStationMenu() { handleStationMenu() {
this.centralizedStationList = new Array(15).fill({}); this.centralizedStationList = new Array(15).fill({});
this.stationParamList.forEach((station, index) => { this.stationParamList.forEach((station, index) => {
this.centralizedStationList[index] = station; this.centralizedStationList[index] = station;
if (station.disabledName) {
station.disabled = this.selectedObj[station.disabledName] == station.mode;
}
}); });
this.tempData = []; this.tempData = [];
this.tempData.push(this.selectedObj); this.tempData.push(this.selectedObj);
this.param = {
if (this.selectedObj.centralized) { stationCode: this.selectedObj.code,
this.param = { stationCodes: [this.selectedObj.code]
stationCode: this.selectedObj.code, };
stationCodes: [this.selectedObj.code] // if (this.selectedObj.centralized) {
}; // this.param = {
} else { // stationCode: this.selectedObj.code,
this.stationList.forEach(station => { // stationCodes: [this.selectedObj.code]
if (station.centralized && station.chargeStationCodeList.includes(this.selectedObj.code)) { // };
this.param = { stationCode: station.code, stationCodes: [station.code] }; // } else {
} // this.stationList.forEach(station => {
}); // if (station.centralized && station.chargeStationCodeList.includes(this.selectedObj.code)) {
} // this.param = { stationCode: station.code, stationCodes: [station.code, ...station.chargeStationCodeList] };
// }
// });
// }
}, },
handleParam() { handleParam() {
if (this.operate == OperationEvent.Signal.cancelTrainRoute.menu.operation || this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) { if (this.operate == OperationEvent.Signal.cancelTrainRoute.menu.operation || this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) {
@ -399,8 +405,8 @@ export default {
}, },
initMenus() { initMenus() {
this.basicParamList = this.$store.state.training.prdType === '01' ? [ this.basicParamList = this.$store.state.training.prdType === '01' ? [
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false }, { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false }, { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true }, { name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true },
// { name: '', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false, securityCommand: true }, // { name: '', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false, securityCommand: true },
{ name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false }, { name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false },
@ -456,10 +462,12 @@ export default {
{ name: '关单信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menu, show: false } { name: '关单信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menu, show: false }
]; ];
this.stationParamList = this.$store.state.training.prdType === '01' ? [ this.stationParamList = this.$store.state.training.prdType === '01' ? [
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false } { name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false },
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' }
] : [ ] : [
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false }, { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false }, { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
{ name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false }, { name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false },
{ name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false }, { name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false },
{ name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false }, { name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },

View File

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

View File

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

View File

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

View File

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

View File

@ -265,6 +265,19 @@ export default {
}, },
'speed': function (val) { 'speed': function (val) {
if (val) this.cmdDisabled[0] = false; 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() { mounted() {

View File

@ -59,7 +59,9 @@ export default {
/** 回复站控请求(同意/拒绝) */ /** 回复站控请求(同意/拒绝) */
CMD_CM_REPLY_STATION_CONTROL: {value:'CM_Reply_Station_Control', label: '回复站控请求'}, CMD_CM_REPLY_STATION_CONTROL: {value:'CM_Reply_Station_Control', label: '回复站控请求'},
/** 回复中控请求(同意/拒绝) */ /** 回复中控请求(同意/拒绝) */
CMD_CM_REPLY_CENTER_CONTROL: {value:'CM_Reply_Center_Control', label: '回复中控请求'} CMD_CM_REPLY_CENTER_CONTROL: {value:'CM_Reply_Center_Control', label: '回复中控请求'},
CMD_CM_RECEIVE_CONTROL: {value:'CM_Receive_Control', label: '接收控制'},
CMD_CM_SURRENDER_CONTROL: {value:'CM_Surrender_Control', label: '交出控制'},
}, },
// 司机操作 // 司机操作

View File

@ -68,8 +68,10 @@ class MenuContextHandler {
if (control) { if (control) {
if (this.getPrdType() != '' && this.getPrdType() != null) { if (this.getPrdType() != '' && this.getPrdType() != null) {
const type = State2SimulationMap[this.getPrdType()]; const type = State2SimulationMap[this.getPrdType()];
const status = State2ControlMap[control.controlMode]; // 判断当前模式 const status = State2ControlMap[control.controlMode]; // 判断当前模式
menu = [...menuList[type]]; if (type) {
menu = [...menuList[type]];
}
// 特殊处理站台的右键操作( 因为小站台不允许有操作 ) // 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand') { if (selected._type == 'StationStand') {
if (selected.small) { if (selected.small) {

View File

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

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -220,7 +220,8 @@ export default {
this.setMode(); this.setMode();
}, },
'$store.state.app.windowSizeCount': function() { '$store.state.app.windowSizeCount': function() {
this.setWindowSize(); this.setWindowSize();
this.setPosition();
}, },
$route() { $route() {
this.initLoadData(); this.initLoadData();
@ -506,8 +507,8 @@ export default {
if (menuTool) { if (menuTool) {
this.offset = (menuTool.offsetHeight || 0) + 15; this.offset = (menuTool.offsetHeight || 0) + 15;
} }
const buttonWidth = this.width - 1200; const buttonWidth = this.width - 1200; // B box widht
if (menuBottom && buttonWidth < 550) { if (menuBottom && buttonWidth < 780) {
this.offsetBottom = (menuBottom.offsetHeight || 0) + 15; this.offsetBottom = (menuBottom.offsetHeight || 0) + 15;
} }
if (menuButtonsBox) { if (menuButtonsBox) {

View File

@ -15,6 +15,16 @@
<div class="chat-setting" @click="handleSetting()"> <div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" /> <i class="el-icon-s-tools" />
</div> </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>
<div class="chat-box-content"> <div class="chat-box-content">
<el-tree <el-tree
@ -36,7 +46,6 @@
</div> </div>
<div class="chat-box-footer"> <div class="chat-box-footer">
<div style="width: 400px;font-size: 14px;">{{ userString }}</div> <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> <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 v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div> </div>
@ -50,6 +59,21 @@
<div class="chat-setting" @click="handleSetting()"> <div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" /> <i class="el-icon-s-tools" />
</div> </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>
<div class="chat-box-content"> <div class="chat-box-content">
<chat-content <chat-content
@ -76,9 +100,6 @@
<div class="chat-box-footer"> <div class="chat-box-footer">
<div class="chat-box-footer-tool" /> <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="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> <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 v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div> </div>
@ -205,7 +226,7 @@ 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 && 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=>{
@ -369,23 +390,23 @@ export default {
this.form = data; this.form = data;
}, },
createCoversition() { createCoversition() {
if (this.memberIdList.length) { if (this.memberIdList.length) {
this.createLoading = true; this.createLoading = true;
startConversition(this.group, this.memberIdList).then(resp => { startConversition(this.group, this.memberIdList).then(resp => {
this.conversitionId = resp.data.id; this.conversitionId = resp.data.id;
this.messageList = []; this.messageList = [];
this.privateMessageList = []; this.privateMessageList = [];
this.userString = ''; this.userString = '';
this.isConversitionCreator = true; this.isConversitionCreator = true;
this.$message.success('创建会话成功!'); this.$message.success('创建会话成功!');
this.createLoading = false; this.createLoading = false;
}).catch((error) => { }).catch((error) => {
this.$message.error(error.code == '3005' ? '创建会话失败:仿真会话成员忙线中!' : '创建仿真失败!'); this.$message.error(error.code == '3005' ? '创建会话失败:仿真会话成员忙线中!' : '创建仿真失败!');
this.createLoading = false; this.createLoading = false;
}); });
} else { } else {
this.userString = '群聊列表为空, 请选择人员'; this.userString = '群聊列表为空, 请选择人员';
} }
}, },
// //
startRecording() { startRecording() {

View File

@ -83,6 +83,7 @@ import { EventBus } from '@/scripts/event-bus';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { Message } from 'element-ui'; import { Message } from 'element-ui';
import localStore from 'storejs'; import localStore from 'storejs';
import { getToken } from '@/utils/auth';
import MembersManage from './memberManage/membersManage'; import MembersManage from './memberManage/membersManage';
import AddMember from './memberManage/addMember'; import AddMember from './memberManage/addMember';
import { computationTime } from '@/utils/date'; import { computationTime } from '@/utils/date';
@ -209,7 +210,8 @@ export default {
}); });
}, },
'$store.state.app.windowSizeCount': function() { // '$store.state.app.windowSizeCount': function() { //
this.setWindowSize(); this.setWindowSize();
this.setPosition();
}, },
$route() { $route() {
this.initLoadData(); this.initLoadData();
@ -261,7 +263,7 @@ export default {
this.offset = (menuTool.offsetHeight || 0) + 15; this.offset = (menuTool.offsetHeight || 0) + 15;
} }
const buttonWidth = this.width - 1200; const buttonWidth = this.width - 1200;
if (menuBottom && buttonWidth < 550) { if (menuBottom && buttonWidth < 780) {
this.offsetBottom = (menuBottom.offsetHeight || 0) + 15; this.offsetBottom = (menuBottom.offsetHeight || 0) + 15;
} }
}); });
@ -422,7 +424,7 @@ export default {
this.hideIbp(); this.hideIbp();
break; break;
case 'DRIVER': case 'DRIVER':
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setPrdType', '04');
this.$store.dispatch('training/setRoles', 'DRIVER'); this.$store.dispatch('training/setRoles', 'DRIVER');
this.jl3dmaintainershow = false; this.jl3dmaintainershow = false;
break; break;
@ -514,10 +516,27 @@ export default {
window.open(routeData.href, '_blank', 'noopener noreferrer'); window.open(routeData.href, '_blank', 'noopener noreferrer');
}, },
hidepanel() { // hidepanel() { //
this.panelShow = false; // this.panelShow = false;
this.drivingShow = true; // this.drivingShow = true;
this.ibpShow = false; // this.ibpShow = false;
this.$refs.Jl3dDrive.show(this.mapId, this.group); // this.$refs.Jl3dDrive.show(this.mapId, this.group);
if (this.$store.state.training.prdType == '04') {
this.panelShow = false;
this.drivingShow = true;
this.$refs.Jl3dDrive.show(this.mapId, this.group);
} else {
const routeData = this.$router.resolve({
path:'/jlmap3d/sandbox',
query:{
mapid: this.mapId,
group: this.group,
token: getToken(),
project: this.project,
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
}
}, },
hideIbp() { hideIbp() {

View File

@ -7,11 +7,11 @@
<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>
<!-- cctv视图 --> <!-- cctv视图 -->
<el-button v-if="(isShowScheduling && !dataError) || (isStationSupervisor && !dataError)" @click="jumpjl3dpassflow">{{ $t('display.demon.passengerflow') }}</el-button> <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="(isShowScheduling && !dataError) || (isDriver && !dataError)" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
<!-- 设备视图 --> <!-- 设备视图 -->
<el-button v-if="isShow3dmodel && isShowScheduling && !dataError" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</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'">
@ -98,27 +98,27 @@ export default {
chatShow: true, chatShow: true,
jsStart: true, jsStart: true,
isGoback: false, isGoback: false,
noQrcodeList: NoQrcodeList, noQrcodeList: NoQrcodeList,
isShow3dmodel :false, isShow3dmodel :false,
jl3dname: this.$t('display.demon.threeDimensionalView'), jl3dname: this.$t('display.demon.threeDimensionalView')
}; };
}, },
computed: { computed: {
lineCode() { lineCode() {
return this.$route.query.lineCode; return this.$route.query.lineCode;
}, },
isShowScheduling() { isShowScheduling() {
// //
return this.$store.state.training.prdType == '02' || this.$store.state.training.prdType == ''; return (this.$store.state.training.prdType == '02' || this.$store.state.training.prdType == '') && !this.$route.query.projectDevice;
}, },
isSpeaking() { isSpeaking() {
return this.userRole != 'DRIVER' && this.userRole != ''; return this.userRole != 'DRIVER' && this.userRole != '';
}, },
isStationSupervisor() { isStationSupervisor() {
return this.userRole == 'STATION_SUPERVISOR'; return this.userRole == 'STATION_SUPERVISOR' && !this.$route.query.projectDevice;
}, },
isDriver() { isDriver() {
return this.userRole == 'DRIVER'; return this.userRole == 'DRIVER' && !this.$route.query.projectDevice;
}, },
project() { project() {
return getSessionStorage('project'); return getSessionStorage('project');
@ -153,10 +153,13 @@ export default {
this.back(); this.back();
} }
} }
} },
'$store.state.training.prdType': function(prdType) {
this.change3dname();
}
}, },
async mounted() { async mounted() {
this.change3dname(); this.change3dname();
}, },
beforeDestroy() { beforeDestroy() {
this.$store.dispatch('training/setGroup', ''); this.$store.dispatch('training/setGroup', '');
@ -192,7 +195,7 @@ export default {
this.$emit('getUserRole'); this.$emit('getUserRole');
break; break;
case 'DRIVER': case 'DRIVER':
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER'); this.$store.dispatch('training/setPrdType', '04'); this.$store.dispatch('training/setRoles', 'DRIVER');
this.$emit('getUserRole'); this.$emit('getUserRole');
break; break;
case 'MAINTAINER': case 'MAINTAINER':
@ -303,11 +306,11 @@ export default {
}, },
jlmap3dcctv() { jlmap3dcctv() {
this.$emit('hidejl3dcctv'); this.$emit('hidejl3dcctv');
}, },
jumpjl3dpassflow() { jumpjl3dpassflow() {
this.$emit('passflow'); this.$emit('passflow');
}, },
jumpjlmap3dmodel() { jumpjlmap3dmodel() {
this.$emit('devicemodel'); this.$emit('devicemodel');
}, },
startCompetition() { startCompetition() {
@ -363,7 +366,7 @@ export default {
}); });
}, },
change3dname() { change3dname() {
if (this.$route.query.prdType == '04') { if (this.$store.state.training.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'); //