调整数据模型过滤空置,调整成都3号线实操
This commit is contained in:
parent
621a077e86
commit
7873917d43
@ -101,6 +101,7 @@ export default {
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
},
|
||||
commitDisabled:true,
|
||||
controlTypeNameMap: {
|
||||
'01': '折返',
|
||||
'02': '直通'
|
||||
@ -119,18 +120,11 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理引导进路';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
},
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'mapConfig'
|
||||
@ -177,6 +171,7 @@ export default {
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.commitDisabled = true;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
@ -204,11 +199,12 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.computedCommitDisabled(row);
|
||||
this.commitDisabled = false;
|
||||
this.row = row;
|
||||
if (row) {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.guide.choose.operation
|
||||
operation: OperationEvent.Signal.guide.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -219,12 +215,11 @@ export default {
|
||||
},
|
||||
// 办理引导进路
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
if (this.row && this.row.code) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.guide.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
val: this.row.code,
|
||||
param: {
|
||||
routeCode: this.row.code
|
||||
}
|
||||
@ -234,7 +229,6 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
} else {
|
||||
this.doClose();
|
||||
@ -259,9 +253,6 @@ export default {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
computedCommitDisabled(row) {
|
||||
this.commitDisabled = !row.canSetting;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,12 +2,12 @@
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<route-selection ref="routeSelection" />
|
||||
<route-control ref="routeControl" :pop-class="'chengdou-03__systerm'" />
|
||||
<route-control ref="routeControl" pop-class="chengdou-03__systerm" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<route-guide ref="routeGuide" />
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="passwordBox" pop-class="'chengdou-03__systerm'" @checkOver="passWordCommit" />
|
||||
<password-box ref="passwordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
@ -277,7 +277,6 @@ export default {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.guide.menu.operation,
|
||||
operateNext: OperationEvent.Signal.guide.confirm.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
@ -291,7 +290,7 @@ export default {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$refs.passwordBox.doShow({step: step, selected: this.selected, routesList: routes});
|
||||
this.$refs.passwordBox.doShow({...step, ...{selected: this.selected}, ...{routesList: routes}});
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -325,7 +324,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$refs.passwordBox.doShow({step: step, selected: this.selected});
|
||||
this.$refs.passwordBox.doShow({...step, ...{selected: this.selected}});
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -452,11 +451,20 @@ export default {
|
||||
});
|
||||
},
|
||||
passWordCommit(data) {
|
||||
if (data.step.operation === OperationEvent.Signal.guide.menu.operation) {
|
||||
this.$refs.routeGuide.doShow(data.step.operation, data.selected, data.routesList);
|
||||
} else if (data.step.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
this.$refs.routeControl.doShow(data.step, data.selected);
|
||||
}
|
||||
const step = {
|
||||
operation: data.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (data.operation === OperationEvent.Signal.guide.menu.operation) {
|
||||
this.$refs.routeGuide.doShow(data, data.selected, data.routesList);
|
||||
} else if (data.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
this.$refs.routeControl.doShow(data, data.selected);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -44,8 +44,9 @@ export default {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3086', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, // 进路编号值不正确
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '308', tip: '鼠标左键点击【确认】按钮' }
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '308', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3086', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3082', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -93,10 +94,10 @@ export default {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3030', tip: '鼠标左键点击【{5}】按钮', val: '{6}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
{ // 不生成实训
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value, // 新增数据字典code
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '总人解({3})',
|
||||
trainingRemark: '总人解',
|
||||
@ -108,10 +109,10 @@ export default {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3051', tip: '输入密码123456,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
{ // 不生成实训
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value, // 新增数据字典code
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '总人解({3})',
|
||||
trainingRemark: '总人解',
|
||||
|
@ -78,6 +78,7 @@
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
@ -91,7 +92,7 @@ export default {
|
||||
return {
|
||||
correctPassword: '123', // 写死的初始密码
|
||||
dialogShow: false,
|
||||
operation: null,
|
||||
operation: '',
|
||||
checkHasInput: false,
|
||||
passwordCheck: '', // 输入值
|
||||
encryptionPassword: '', // 输入值替换为对应长度的星号
|
||||
@ -111,7 +112,7 @@ export default {
|
||||
}
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -123,6 +124,8 @@ export default {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.operation = operate.operation;
|
||||
console.log(this.operation, operate);
|
||||
this.checkHasInput = false;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -136,9 +139,9 @@ export default {
|
||||
},
|
||||
commit() { // 确定
|
||||
if (this.passwordCheck === this.correctPassword) {
|
||||
this.$emit('checkOver', this.operate);
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
this.$emit('checkOver', this.operate);
|
||||
} else {
|
||||
this.showMistake = true;
|
||||
}
|
||||
|
@ -172,6 +172,22 @@ function recover(state, models) {
|
||||
}
|
||||
}
|
||||
|
||||
function filtrationModel(models) {
|
||||
models.forEach(model => {
|
||||
for (const key in model) {
|
||||
if (typeof model[key] == 'string') {
|
||||
if (!model[key]) {
|
||||
delete model[key];
|
||||
}
|
||||
}
|
||||
if (model[key] == null || model[key] == undefined) {
|
||||
delete model[key];
|
||||
}
|
||||
}
|
||||
});
|
||||
return models;
|
||||
}
|
||||
|
||||
/**
|
||||
* 实训状态数据
|
||||
*/
|
||||
@ -927,10 +943,13 @@ const map = {
|
||||
if (!(models instanceof Array)) {
|
||||
models = [models];
|
||||
}
|
||||
// 过滤 空/null/undefined value 值
|
||||
const dictList = filtrationModel(models);
|
||||
console.log(dictList);
|
||||
|
||||
// 查找向上关联需要一起删除的设备
|
||||
const dict = {};
|
||||
models.forEach((model) => {
|
||||
dictList.forEach((model) => {
|
||||
if (model['_dispose']) {
|
||||
queryDeleteModels(state, model, dict);
|
||||
} else {
|
||||
|
@ -286,7 +286,7 @@ export default {
|
||||
switchType: '',
|
||||
stationStandType:'',
|
||||
psdType: '',
|
||||
controlType: '',
|
||||
controlType: '',
|
||||
ViewMode: ViewMode,
|
||||
enabledTab: 'Section',
|
||||
autoSaveTask: null,
|
||||
|
Loading…
Reference in New Issue
Block a user