This commit is contained in:
fan 2021-02-22 10:31:30 +08:00
commit e6814f4def
81 changed files with 265 additions and 121 deletions

View File

@ -255,7 +255,8 @@ class SkinCode extends defaultStyle {
redColor: 'red', // 控制模式红色 redColor: 'red', // 控制模式红色
yellowColor: 'yellow', // 控制模式黄色 yellowColor: 'yellow', // 控制模式黄色
stroke: '#FFFFFF', // 框的颜色 stroke: '#FFFFFF', // 框的颜色
fill: 'rgba(0,0,0,0)' // 填充色 fill: 'rgba(0,0,0,0)', // 填充色
textColorNoChange: true
}, },
emergencyControl: { // 紧急站控 emergencyControl: { // 紧急站控
show: true, show: true,

View File

@ -241,7 +241,8 @@ class SkinCode extends defaultStyle {
borderColor:'', // 字体边框颜色 borderColor:'', // 字体边框颜色
textBorderWidth:0, // 字体边框宽度 textBorderWidth:0, // 字体边框宽度
isSpecialType:true, // 特雷兹特殊类型 isSpecialType:true, // 特雷兹特殊类型
noneModeColor:'#ff0' // 无模式时字体颜色 noneModeColor:'#ff0', // 无模式时字体颜色
currentModeColor:'#0f0' // 当前被控制时字体颜色
}, },
kmPostShow: false, // 公里标显示 kmPostShow: false, // 公里标显示

View File

@ -143,7 +143,6 @@ class Jlmap {
this.$painter.updateScreen(options); this.$painter.updateScreen(options);
} else { } else {
this.$options.update(options); this.$options.update(options);
console.log(options, this.$options);
this.$painter.updateTransform(this.$options); this.$painter.updateTransform(this.$options);
} }
if (this.$options.disabled == true) { if (this.$options.disabled == true) {
@ -641,6 +640,10 @@ class Jlmap {
}); });
} }
clearEvent() {
this.$zr.curEvent = null;
}
clear() { clear() {
this.lineCode = ''; this.lineCode = '';
this.style = {}; this.style = {};

View File

@ -154,6 +154,7 @@ class EMouse extends Group {
} }
mouseout(e) { mouseout(e) {
if (!this.device.model.down) {
if (this.device.model.switchSection && this.device.model.relSwitchCode) { if (this.device.model.switchSection && this.device.model.relSwitchCode) {
const instance = this.getInstanceByCode(this.device.model.relSwitchCode); const instance = this.getInstanceByCode(this.device.model.relSwitchCode);
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) { if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
@ -168,6 +169,7 @@ class EMouse extends Group {
instance.mouseEvent.mouseLeave(e); instance.mouseEvent.mouseLeave(e);
} }
} }
}
mouseEnter(e) { mouseEnter(e) {
this.TextName && this.TextName.show(); this.TextName && this.TextName.show();

View File

@ -414,9 +414,7 @@ export default class Station extends Group {
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.stationText.isSpecialType) { if (!this.style.Station.stationText.isSpecialType) {
// simulationRoleList
} else {
this.stationText.setColor('#1fdc1f'); this.stationText.setColor('#1fdc1f');
} }
@ -445,9 +443,7 @@ export default class Station extends Group {
// this.subheadText && this.subheadText.setStyle('textFill', '#fff'); // this.subheadText && this.subheadText.setStyle('textFill', '#fff');
// } // }
// } // }
if (this.style.Station.stationText.isSpecialType) { if (!this.style.Station.stationText.isSpecialType) {
} else {
this.stationText.setColor('#fff'); this.stationText.setColor('#fff');
} }
} }
@ -465,9 +461,7 @@ export default class Station extends Group {
// this.subheadText && this.subheadText.setStyle('textFill', '#fff'); // this.subheadText && this.subheadText.setStyle('textFill', '#fff');
// } // }
// } // }
if (this.style.Station.stationText.isSpecialType) { if (!this.style.Station.stationText.isSpecialType) {
} else {
this.stationText.setColor('#fff'); this.stationText.setColor('#fff');
} }
} }
@ -490,9 +484,6 @@ export default class Station extends Group {
if (this.style.Station.stationText.noneModeFlash) { if (this.style.Station.stationText.noneModeFlash) {
this.stationText.setAnimateStyle(this.noneBeforeMode); this.stationText.setAnimateStyle(this.noneBeforeMode);
} }
if (this.style.Station.stationText.isSpecialType) {
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
}
} }
recover() { recover() {
@ -508,7 +499,8 @@ export default class Station extends Group {
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
if (this.style.Station.stationText.isSpecialType) { if (this.style.Station.stationText.isSpecialType) {
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
// sationEle.controller
} else { } else {
this.stationText && this.stationText.stopAnimate(); this.stationText && this.stationText.stopAnimate();
} }
@ -519,6 +511,8 @@ export default class Station extends Group {
if (!this.isShowShape) return; if (!this.isShowShape) return;
this.recover(); this.recover();
model.controlMode && this['handle' + model.controlMode](); model.controlMode && this['handle' + model.controlMode]();
model.controller && this.handleComplexControl(model.controller);
if (this.style.Station.syncCentralizeStation && model.controlMode && model.centralized) { if (this.style.Station.syncCentralizeStation && model.controlMode && model.centralized) {
model.chargeStationCodeList.forEach(item => { model.chargeStationCodeList.forEach(item => {
const device = store.getters['map/getDeviceByCode'](item); const device = store.getters['map/getDeviceByCode'](item);
@ -537,6 +531,16 @@ export default class Station extends Group {
} }
} }
handleComplexControl(controller) {
// debugger;
// store.state.user.id
// if (controller == ) {
// this.stationText.setColor(this.style.Station.stationText.currentModeColor);
// } else {
// debugger;
// }
}
// setState(model) { // setState(model) {
// if (!this.isShowShape) return; // if (!this.isShowShape) return;
// // // 新版地图使用新版状态变更方式 // // // 新版地图使用新版状态变更方式

View File

@ -71,7 +71,7 @@ class EMouse extends Group {
} }
mouseout(e) { mouseout(e) {
// if (!this.device.model.down) { if (!this.device.model.down) {
this.switchBorder && this.switchBorder.hide(); this.switchBorder && this.switchBorder.hide();
this.device.setTextStyle({ this.device.setTextStyle({
textFill: this.device.style.backgroundColor textFill: this.device.style.backgroundColor
@ -85,7 +85,7 @@ class EMouse extends Group {
if (instance && instance.mouseEvent && instance.mouseEvent.mouseLeave) { if (instance && instance.mouseEvent && instance.mouseEvent.mouseLeave) {
instance.mouseEvent.mouseLeave(e); instance.mouseEvent.mouseLeave(e);
} }
// } }
} }
mouseover(e) { mouseover(e) {

View File

@ -293,6 +293,7 @@ export default {
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -159,6 +159,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.restoreBeforeDevices(); this.restoreBeforeDevices();
this.$root.$emit('dialogClose', this.selected);
this.$refs.table.setCurrentRow(); this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);

View File

@ -177,6 +177,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -232,6 +232,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -225,6 +225,7 @@ export default {
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -75,6 +75,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -93,6 +93,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -109,6 +109,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);
@ -161,13 +162,12 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
margin: 10px margin: 10px
} }
.beijing-01__systerm .el-dialog .base-label { .beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;
top: -18px; top: -18px;

View File

@ -105,6 +105,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);

View File

@ -76,6 +76,7 @@ export default {
{ required: true, message: '请选择车站', trigger: 'change' } { required: true, message: '请选择车站', trigger: 'change' }
] ]
}, },
selected: null,
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
@ -101,6 +102,7 @@ export default {
doShow(operate, selected) { doShow(operate, selected) {
// //
this.dialogShow = true; this.dialogShow = true;
this.selected = selected;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
@ -108,6 +110,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
}, },

View File

@ -109,6 +109,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);
@ -161,13 +162,12 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
margin: 10px margin: 10px
} }
.beijing-01__systerm .el-dialog .base-label { .beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;
top: -18px; top: -18px;

View File

@ -101,6 +101,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);
@ -140,13 +141,12 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
margin: 10px margin: 10px
} }
.beijing-01__systerm .el-dialog .base-label { .beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;
top: -18px; top: -18px;

View File

@ -109,6 +109,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);
@ -161,13 +162,12 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
margin: 10px margin: 10px
} }
.beijing-01__systerm .el-dialog .base-label { .beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;
top: -18px; top: -18px;

View File

@ -84,6 +84,7 @@ export default {
{ required: true, message: '请选择车站', trigger: 'change' } { required: true, message: '请选择车站', trigger: 'change' }
] ]
}, },
selected: null,
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
@ -108,6 +109,7 @@ export default {
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
// //
this.selected = selected;
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -116,6 +118,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
}, },

View File

@ -109,6 +109,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);
@ -161,13 +162,12 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
margin: 10px margin: 10px
} }
.beijing-01__systerm .el-dialog .base-label { .beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;
top: -18px; top: -18px;

View File

@ -91,6 +91,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);
@ -143,13 +144,12 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
margin: 10px margin: 10px
} }
.beijing-01__systerm .el-dialog .base-label { .beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;
top: -18px; top: -18px;

View File

@ -93,6 +93,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);
@ -145,13 +146,12 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
margin: 10px margin: 10px
} }
.beijing-01__systerm .el-dialog .base-label { .beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;
top: -18px; top: -18px;

View File

@ -72,6 +72,25 @@ export default {
this.$store.dispatch('config/updateMenuBar'); this.$store.dispatch('config/updateMenuBar');
this.$refs['menuSignal'].setRouteSignal(); this.$refs['menuSignal'].setRouteSignal();
}); });
this.$root.$on('dialogOpen', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance) {
this.selected.instance.__over = true;
this.selected.instance.mouseEvent.mouseover();
}
})
this.$root.$on('dialogClose', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance) {
this.selected.instance.__over = false;
this.selected.instance.mouseEvent.mouseout();
this.$jlmap.clearEvent();
}
})
} }
}; };
</script> </script>

View File

@ -152,7 +152,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) { if (model) {
models.push(model); models.push(model);

View File

@ -152,7 +152,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) { if (model) {
models.push(model); models.push(model);

View File

@ -127,7 +127,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) { if (model) {
models.push(model); models.push(model);

View File

@ -180,6 +180,7 @@ export default {
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },

View File

@ -156,6 +156,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },

View File

@ -141,6 +141,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected); // mouseCancelState(this.selected);
}, },

View File

@ -209,6 +209,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$refs.tempTable.setCurrentRow(); this.$refs.tempTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected); // mouseCancelState(this.selected);

View File

@ -152,6 +152,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },

View File

@ -241,6 +241,7 @@ export default {
this.message = ''; this.message = '';
this.selectedCode = ''; this.selectedCode = '';
this.messageText2 = ''; this.messageText2 = '';
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
this.timer && clearInterval(this.timer); this.timer && clearInterval(this.timer);

View File

@ -110,6 +110,7 @@ export default {
}, },
groupNumber: '', groupNumber: '',
field: '', field: '',
selected: null,
rules: { rules: {
faultType: [ faultType: [
{ required: true, message: '请选择故障类型', trigger: 'change'} { required: true, message: '请选择故障类型', trigger: 'change'}
@ -171,6 +172,7 @@ export default {
this.field = field == this.field ? '' : field; this.field = field == this.field ? '' : field;
}, },
doShow(operate, selected, judge) { doShow(operate, selected, judge) {
this.selected = selected;
if (!this.dialogShow) { if (!this.dialogShow) {
this.switchName = ''; this.switchName = '';
this.stationName = ''; this.stationName = '';
@ -207,6 +209,7 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.form.faultType = ''; this.form.faultType = '';
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit() {

View File

@ -93,6 +93,7 @@ export default {
}, },
groupNumber: '', groupNumber: '',
field: '', field: '',
selected: null,
rules: { rules: {
groupNumber2: [ groupNumber2: [
{ required: true, message: '请选择被动车', trigger: 'change'} { required: true, message: '请选择被动车', trigger: 'change'}
@ -145,6 +146,7 @@ export default {
this.field = field == this.field ? '' : field; this.field = field == this.field ? '' : field;
}, },
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) { if (!this.dialogShow) {
this.operation = operate.operation; this.operation = operate.operation;
this.cmdType = operate.cmdType; this.cmdType = operate.cmdType;
@ -161,6 +163,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit() {

View File

@ -342,6 +342,7 @@ export default {
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -275,7 +275,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.operation = ''; this.operation = '';
this.$root.$emit('dialogClose'); this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },

View File

@ -216,7 +216,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose'); this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -246,7 +246,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose'); this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected); // mouseCancelState(this.selected);
}, },

View File

@ -292,7 +292,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose'); this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },

View File

@ -160,7 +160,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose'); this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected); // mouseCancelState(this.selected);
}, },

View File

@ -255,6 +255,7 @@ export default {
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
command() { command() {

View File

@ -47,7 +47,8 @@ export default {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
operation: null operation: null,
selected: null
}; };
}, },
computed: { computed: {
@ -72,8 +73,9 @@ export default {
} }
}, },
methods: { methods: {
doShow(operate) { doShow(operate, selected) {
if (!this.dialogShow) { if (!this.dialogShow) {
this.selected = selected;
this.loading = false; this.loading = false;
this.operation = operate.operation; this.operation = operate.operation;
} }
@ -86,6 +88,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit() {

View File

@ -104,6 +104,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit() {

View File

@ -197,6 +197,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -118,6 +118,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit() {

View File

@ -163,6 +163,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
// this.mouseCancelState(this.selected); // this.mouseCancelState(this.selected);

View File

@ -313,6 +313,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
}, },

View File

@ -111,6 +111,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
}, },

View File

@ -147,7 +147,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) { if (model) {
models.push(model); models.push(model);

View File

@ -327,7 +327,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); // var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
if (model) { if (model) {

View File

@ -209,7 +209,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); // var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
if (model) { if (model) {

View File

@ -217,7 +217,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
// var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle)); // var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
if (model) { if (model) {

View File

@ -255,6 +255,7 @@ export default {
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -65,8 +65,8 @@
import {commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default { export default {
name: 'ConfirmTip',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,

View File

@ -165,6 +165,7 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.row = null; this.row = null;
this.restoreBeforeDevices(); this.restoreBeforeDevices();
this.$root.$emit('dialogClose', this.selected);
this.$refs.table.setCurrentRow(); this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);

View File

@ -93,6 +93,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -53,7 +53,8 @@ export default {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
operation: '', operation: '',
sectionCode: '' sectionCode: '',
selected: null
}; };
}, },
computed: { computed: {
@ -91,8 +92,9 @@ export default {
} }
}, },
methods: { methods: {
doShow(operate) { doShow(operate, selected) {
if (!this.dialogShow) { if (!this.dialogShow) {
this.selected = selected;
this.sectionCode = ''; this.sectionCode = '';
this.operation = operate.operation || ''; this.operation = operate.operation || '';
} }
@ -104,6 +106,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
sectionSelectChange() { sectionSelectChange() {

View File

@ -162,7 +162,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.operation = ''; this.operation = '';
this.$root.$emit('dialogClose'); this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -146,6 +146,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$refs.table.setCurrentRow(); this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },

View File

@ -221,6 +221,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.restoreBeforeDevices(); this.restoreBeforeDevices();
this.$root.$emit('dialogClose', this.selected);
this.$refs.table.setCurrentRow(); this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('socket/shiftMsgQueue'); this.$store.dispatch('socket/shiftMsgQueue');

View File

@ -109,6 +109,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);
@ -161,13 +162,12 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
margin: 10px margin: 10px
} }
.ningbo-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;
top: -18px; top: -18px;

View File

@ -105,6 +105,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);

View File

@ -109,6 +109,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);

View File

@ -114,6 +114,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);

View File

@ -116,6 +116,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);

View File

@ -90,6 +90,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);

View File

@ -104,6 +104,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);

View File

@ -130,6 +130,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },

View File

@ -86,6 +86,25 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar'); this.$store.dispatch('config/updateMenuBar');
}); });
this.$root.$on('dialogOpen', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance) {
this.selected.instance.__over = true;
this.selected.instance.mouseEvent.mouseover();
}
})
this.$root.$on('dialogClose', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance) {
this.selected.instance.__over = false;
this.selected.instance.mouseEvent.mouseout();
this.$jlmap.clearEvent();
}
})
} }
}; };
</script> </script>

View File

@ -174,7 +174,7 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
// this.doClose(); this.doClose();
} }
}); });
} }

View File

@ -20,7 +20,7 @@ import OperateConfirm from './dialog/childDialog/operateConfirm';
import ButtonConfirm from './dialog/childDialog/buttonConfirm'; import ButtonConfirm from './dialog/childDialog/buttonConfirm';
export default { export default {
name: 'StationControlLight', name: 'StationStationLight',
components: { components: {
PopMenu, PopMenu,
PasswordInput, PasswordInput,

View File

@ -175,24 +175,6 @@ export default {
} }
} }
}, },
mounted() {
this.$root.$on('dialogOpen', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance) {
this.selected.instance.__over = true;
this.selected.instance.mouseEvent.mouseover();
}
})
this.$root.$on('dialogClose', e => {
if (this.selected &&
this.selected.instance) {
this.selected.instance.__over = false;
this.selected.instance.mouseEvent.mouseout();
}
})
},
methods: { methods: {
clickEvent() { clickEvent() {
const self = this; const self = this;

View File

@ -174,7 +174,9 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) { if (model) {
models.push(model); models.push(model);

View File

@ -1311,7 +1311,10 @@ export default {
]), ]),
...mapGetters('map', [ ...mapGetters('map', [
'stationList' 'stationList'
]) ]),
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
}
}, },
watch: { watch: {
tempClassA() { tempClassA() {
@ -1336,12 +1339,29 @@ export default {
}, },
'$store.state.training.prdType': function () { '$store.state.training.prdType': function () {
this.initMenu(); this.initMenu();
},
'$store.state.socket.simulationRoleList':function(list) {
if (list && list.length) {
this.checkRoleChange(list);
} }
}, },
'$store.state.training.simulationUserList':function(list) {
debugger;
}
},
mounted() { mounted() {
this.initMenu(); this.initMenu();
}, },
methods: { methods: {
checkRoleChange(list) {
list.forEach(item => {
if ((item.messageType === 'PLAY_CHANGE' || item.messageType == 'ONLINE') && item.userId == this.userId ) {
// this.switchShowStation(this.centralizedMap[item.deviceCode]);
}
});
},
handleShow(item) { handleShow(item) {
if (item.hide) { if (item.hide) {
return false; return false;

View File

@ -186,8 +186,13 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (isClose) { if (isClose) {
this.$store.dispatch('menuOperation/setSelected', {device: {}}); this.$store.dispatch('menuOperation/setSelected', {device: {}});
this.doClose();
} else {
if (this.activeName == 'second') {
// this.judgeStatus();
this.status = !this.status;
}
} }
isClose && this.doClose();
} }
}).catch(() => { }).catch(() => {
isClose && this.doClose(); isClose && this.doClose();

View File

@ -21,10 +21,10 @@
<div class="message" style="color:#ff0000;font-size:14px;margin-left:10px">{{ message }}</div> <div class="message" style="color:#ff0000;font-size:14px;margin-left:10px">{{ message }}</div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="status==''" @click="commit(true)">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="status" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdApply" :disabled="status==''" @click="commit(false)">应用(A)</el-button> <el-button :id="domIdApply" :disabled="status" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button> <el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -50,7 +50,7 @@ export default {
}, },
data() { data() {
return { return {
status: '', status: true,
operate: null, operate: null,
loading: false, loading: false,
dialogShow: false, dialogShow: false,
@ -107,16 +107,13 @@ export default {
'selected': function(val) { 'selected': function(val) {
if (val) { if (val) {
const sationEle = this.$store.getters['map/getDeviceByCode'](val.code); const sationEle = this.$store.getters['map/getDeviceByCode'](val.code);
if (this.prdType == '01' && sationEle && sationEle.controlMode == 'Center') { if (sationEle) {
this.status = 'Center'; if (sationEle.controller != this.$store.state.user.id) {
} else if (this.prdType == '02' && sationEle && sationEle.controlMode != 'Center') { this.status = false;
this.status = 'Local'; } else {
this.status = true;
}
} }
// if (this.prdType == '02') {
//
// } else {
// this.status = sationEle && sationEle.controlMode == 'Center';
// }
} }
} }
}, },
@ -165,20 +162,24 @@ export default {
}); });
}, },
commit(isClose = true) { commit(isClose = true) {
debugger;
const val = this.selected || {}; const val = this.selected || {};
const steps = { const steps = {
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation, operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
over: true, over: true,
param: {stationCodes:[val.code]} param: {stationCodes:[val.code]}
}; };
// CMD_STATION_CONTROL_TRANSFER
// CMD_STATION_CONTROL_DEVOLVE
// CMD_STATION_CONTROL_REVOKE
// steps.cmdType = this.status ? CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL : CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL; // steps.cmdType = this.status ? CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL : CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL;
steps.cmdType = this.status == 'Center' ? CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL : CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL; steps.cmdType = CMD.Station.CMD_STATION_CONTROL_APPLY;
this.$store.dispatch('training/nextNew', steps).then(({ valid }) => { this.$store.dispatch('training/nextNew', steps).then(({ valid }) => {
if (valid) { if (valid) {
isClose && this.doClose(); if (isClose) {
this.$store.dispatch('menuOperation/setSelected', {device: {}});
this.doClose();
}
this.$emit('commandSuccess', val.code); this.$emit('commandSuccess', val.code);
} }
}).catch(() => { }).catch(() => {

View File

@ -212,7 +212,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) { if (model) {
models.push(model); models.push(model);

View File

@ -149,7 +149,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) { if (model) {
models.push(model); models.push(model);

View File

@ -162,7 +162,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) { if (model) {
models.push(model); models.push(model);

View File

@ -216,7 +216,10 @@ export default {
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
if (train.backup) { if (train.backup) {
/** 创建一条完成的服务数据*/ /** 创建一条完成的服务数据*/
opt.name += j; // opt.name += j;
const length = opt.name.length;
const optName = parseInt(opt.name) + j;
opt.name = optName.toString().padStart(length, '0');
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) { if (model) {
models.push(model); models.push(model);