运行图 转换函数代码调整

宁波三号线 控制权转移 请求区域控制代码调整
This commit is contained in:
joylink_cuiweidong 2021-02-22 10:13:14 +08:00
parent f38c4fcb91
commit 1d41095b46
15 changed files with 72 additions and 30 deletions

View File

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

View File

@ -152,7 +152,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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));
if (model) {
models.push(model);

View File

@ -152,7 +152,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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));
if (model) {
models.push(model);

View File

@ -127,7 +127,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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));
if (model) {
models.push(model);

View File

@ -147,7 +147,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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));
if (model) {
models.push(model);

View File

@ -327,7 +327,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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: '#000' }, lineStyle));
if (model) {

View File

@ -209,7 +209,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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: '#000' }, lineStyle));
if (model) {

View File

@ -217,7 +217,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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: '#000' }, lineStyle));
if (model) {

View File

@ -174,7 +174,9 @@ export default {
/** 如果是备用车,按车次添加线*/
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));
if (model) {
models.push(model);

View File

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

View File

@ -21,10 +21,10 @@
<div class="message" style="color:#ff0000;font-size:14px;margin-left:10px">{{ message }}</div>
<el-row justify="center" class="button-group">
<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 :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 :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -50,7 +50,7 @@ export default {
},
data() {
return {
status: '',
status: true,
operate: null,
loading: false,
dialogShow: false,
@ -107,16 +107,13 @@ export default {
'selected': function(val) {
if (val) {
const sationEle = this.$store.getters['map/getDeviceByCode'](val.code);
if (this.prdType == '01' && sationEle && sationEle.controlMode == 'Center') {
this.status = 'Center';
} else if (this.prdType == '02' && sationEle && sationEle.controlMode != 'Center') {
this.status = 'Local';
if (sationEle) {
if (sationEle.controller != this.$store.state.user.id) {
this.status = false;
} else {
this.status = true;
}
}
// if (this.prdType == '02') {
//
// } else {
// this.status = sationEle && sationEle.controlMode == 'Center';
// }
}
}
},
@ -165,20 +162,24 @@ export default {
});
},
commit(isClose = true) {
debugger;
const val = this.selected || {};
const steps = {
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
over: true,
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 == '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 }) => {
if (valid) {
isClose && this.doClose();
if (isClose) {
this.$store.dispatch('menuOperation/setSelected', {device: {}});
this.doClose();
}
this.$emit('commandSuccess', val.code);
}
}).catch(() => {

View File

@ -212,7 +212,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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));
if (model) {
models.push(model);

View File

@ -149,7 +149,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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));
if (model) {
models.push(model);

View File

@ -162,7 +162,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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));
if (model) {
models.push(model);

View File

@ -216,7 +216,10 @@ export default {
/** 如果是备用车,按车次添加线*/
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));
if (model) {
models.push(model);