西安三 进路交Ats控 冲突检测代码调整
This commit is contained in:
parent
c9ce97534a
commit
ae28541ae1
@ -5,7 +5,7 @@
|
||||
:class="systemName+' route-hand-control'"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:width="systemName == 'xian-01__systerm'?'400px':'300px'"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
@ -48,6 +48,22 @@
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="systemName == 'xian-01__systerm'" prop="atsControl" label="控制状态" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.atsControl==0?'人工':'自动' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="systemName == 'xian-01__systerm'" prop="conflict" label="冲突检测" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox
|
||||
v-if="scope.row.atsControl==0"
|
||||
v-model="checkConflictList[scope.$index].value"
|
||||
style="text-align: center; display: block;"
|
||||
/>
|
||||
<!-- @change="changeCheckConflit(checkConflictMap[scope.row.code],scope.row.code)" -->
|
||||
<!-- :disabled="scope.row.disabled" -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row>
|
||||
@ -83,6 +99,7 @@ import NingBoConfirmTip from '../../../ningbo_01/menus/dialog/childDialog/confir
|
||||
// import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '../childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||
import { delimiter } from 'path';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
@ -108,6 +125,8 @@ export default {
|
||||
signalName: '',
|
||||
allSelect: false,
|
||||
changeList:[],
|
||||
checkConflictList:[],
|
||||
selectedCheckConflict:[],
|
||||
commitDisabled: true,
|
||||
disabledLength: 0
|
||||
};
|
||||
@ -143,7 +162,12 @@ export default {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return '进路交人工控';
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return '进路交自动控';
|
||||
if (this.systemName == 'xian-01__systerm') {
|
||||
return '进路交ATS自动控';
|
||||
} else {
|
||||
return '进路交自动控';
|
||||
}
|
||||
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
@ -162,6 +186,7 @@ export default {
|
||||
this.selected = selected;
|
||||
this.allSelect = false;
|
||||
this.changeList = [];
|
||||
this.checkConflictList.splice(0, this.checkConflictList.length - 1);
|
||||
this.commitDisabled = true;
|
||||
this.selection = [];
|
||||
this.disabledLength = 0;
|
||||
@ -178,18 +203,28 @@ export default {
|
||||
}
|
||||
|
||||
if (tempData && tempData.length > 0) {
|
||||
const that = this;
|
||||
tempData.forEach(elem => {
|
||||
this.changeList.push(false);
|
||||
that.changeList.push(false);
|
||||
|
||||
elem.disabled = false;
|
||||
// 设置禁用状态
|
||||
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
|
||||
(elem.atsControl == '0')) {
|
||||
elem.disabled = true;
|
||||
this.disabledLength++;
|
||||
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
|
||||
(elem.atsControl == '1')) {
|
||||
elem.disabled = true;
|
||||
this.disabledLength++;
|
||||
that.disabledLength++;
|
||||
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
if (elem.atsControl == '1') {
|
||||
elem.disabled = true;
|
||||
that.disabledLength++;
|
||||
} else {
|
||||
if (that.systemName == 'xian-01__systerm') {
|
||||
this.checkConflictList.push({code:elem.code, value:false});
|
||||
// that.$set('checkConflictMap', elem.code, );
|
||||
// that.checkConflictMap[elem.code] = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -215,6 +250,16 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
// mouseCancelState(this.selected);
|
||||
},
|
||||
changeCheckConflit(check, code) {
|
||||
// debugger;
|
||||
// this.checkConflictMap;
|
||||
// this.$set('checkConflictMap', code, check);
|
||||
// if (check) {
|
||||
// this.checkConflictMap[code] = false;
|
||||
// } else {
|
||||
// this.checkConflictMap[code] = true;
|
||||
// }
|
||||
},
|
||||
changeCheck(check, code) {
|
||||
if (check) {
|
||||
this.selection.push(code);
|
||||
@ -324,7 +369,7 @@ export default {
|
||||
operate.message = `命令:进路交人工控<br/>始端信号机:${this.stationName} ${this.signalName}` + msg;
|
||||
this.$refs.ningBoConfirmTip.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
@ -335,7 +380,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
@ -359,13 +404,22 @@ export default {
|
||||
operate.message = `命令:进路交自动控<br/>始端信号机:${this.stationName} ${this.signalName}` + msg;
|
||||
this.$refs.ningBoConfirmTip.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2, {val}).then(({valid})=>{
|
||||
const params = {routeCodeList:this.selection};
|
||||
if (this.systemName === 'xian-01__systerm') {
|
||||
const checkConflictList = [];
|
||||
this.selection.forEach(each=>{
|
||||
const checkConflict = this.checkConflictList.find(check=>{ return check.code == each; });
|
||||
if (checkConflict) { checkConflictList.push(checkConflict.value); }
|
||||
});
|
||||
params.checkConflictList = checkConflictList;
|
||||
}
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, params, 2, {val}).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
Loading…
Reference in New Issue
Block a user