大铁ctc调整
This commit is contained in:
parent
858f064a2e
commit
b82828afd3
@ -16,7 +16,11 @@
|
||||
:default-sort="{prop: 'startTime', order: 'descending'}"
|
||||
>
|
||||
<el-table-column type="index" width="30" label="序" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="tripNumber" label="车次" width="60" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="tripNumber" label="车次" width="60" label-class-name="bottom-table-label-header">
|
||||
<template slot-scope="scope">
|
||||
<div style="width: 100%;height: 22px;" @contextmenu="popMenuShow(scope.row, '' ,$event)">{{ scope.row.tripNumber }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="trackName" label="股道" width="50" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="autoTrigger" label="自触" width="50" label-class-name="bottom-table-label-header">
|
||||
<template slot-scope="scope">
|
||||
@ -31,7 +35,11 @@
|
||||
<span>{{ getRouteStatus(scope.row.status) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="description" label="进路描述" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="description" label="进路描述" label-class-name="bottom-table-label-header">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getRouteName(scope.row.routeCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
@ -111,24 +119,31 @@
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<pop-menu ref="popMenu" :menu="menu" style="background: #DFE3E6;" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { EventBus } from '@/scripts/event-bus'; // 996
|
||||
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
export default {
|
||||
name: 'BottomTable',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [{}],
|
||||
stationCode: '',
|
||||
sheetValue: '',
|
||||
routeParam: {},
|
||||
showTable: false,
|
||||
sheetList: [{ label: '历史进路', value: 'historyRoute' }],
|
||||
sequenceList: [],
|
||||
sequenceMap: {}
|
||||
sequenceMap: {},
|
||||
menu: [{label: '人工触发', handler: this.artificialTrigger, disabled: false}, {label: '删除', handler: this.artificialTrigger, disabled: true}]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -203,6 +218,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
getRouteName(code) {
|
||||
if (code) {
|
||||
const route = this.$store.state.map.routeData[code];
|
||||
return route ? route.name : '';
|
||||
} else { return ''; }
|
||||
},
|
||||
setTrigger(triggerParam, row) {
|
||||
commitOperate(menuOperate.CTC.autoTrigger, triggerParam, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
@ -214,6 +235,10 @@ export default {
|
||||
this.$message.error('设置自动触发失败!');
|
||||
});
|
||||
},
|
||||
popMenuShow(item, type, e) {
|
||||
this.routeParam = {routeCode: item.routeCode, tripNumber: item.tripNumber};
|
||||
this.$refs.popMenu.resetShowPosition({x: e.x, y:e.y});
|
||||
},
|
||||
cancelTrigger(triggerParam, row) {
|
||||
commitOperate(menuOperate.CTC.autoTrigger, triggerParam, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
@ -224,6 +249,16 @@ export default {
|
||||
row.autoTrigger = true;
|
||||
this.$message.error('取消自动触发失败!');
|
||||
});
|
||||
},
|
||||
artificialTrigger() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, this.routeParam, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$message.success('人工触发成功!');
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.error(e);
|
||||
this.$message.error('人工触发失败!');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user