Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
afd3c54df2
37
src/jmapNew/theme/datie_tky/menus/index.vue
Normal file
37
src/jmapNew/theme/datie_tky/menus/index.vue
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
|
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||||
|
<menu-signal ref="menuSignal" :selected="selected" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import MenuSignal from './menuSignal';
|
||||||
|
import MenuSwitch from './menuSwitch';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Menus',
|
||||||
|
components: {
|
||||||
|
MenuSignal,
|
||||||
|
MenuSwitch
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('config', [
|
||||||
|
'width'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -1,15 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
|
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
|
// OperateMode
|
||||||
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu
|
PopMenu,
|
||||||
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -71,6 +76,15 @@ export default {
|
|||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
@ -106,6 +120,11 @@ export default {
|
|||||||
// 加封
|
// 加封
|
||||||
seal() {
|
seal() {
|
||||||
|
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
|
this.$refs.popMenu.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
170
src/jmapNew/theme/datie_tky/menus/menuSwitch.vue
Normal file
170
src/jmapNew/theme/datie_tky/menus/menuSwitch.vue
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
|
<switch-control ref="switchControl" pop-class="chengdou-03__systerm" />
|
||||||
|
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import PopMenu from '@/components/PopMenu';
|
||||||
|
// OperateMode
|
||||||
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SwitchMenu',
|
||||||
|
components: {
|
||||||
|
PopMenu,
|
||||||
|
SwitchControl,
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
menu: [],
|
||||||
|
menuNormal: {
|
||||||
|
Local: [
|
||||||
|
{
|
||||||
|
label: '总定',
|
||||||
|
handler: this.locate,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '总反',
|
||||||
|
handler: this.reverse,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'separator'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '单锁',
|
||||||
|
handler: this.lock,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '单解',
|
||||||
|
handler: this.unlock,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'separator'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '封闭',
|
||||||
|
handler: this.block,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '解封',
|
||||||
|
handler: this.unblock,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
Center: [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
// 道岔总定
|
||||||
|
locate() {
|
||||||
|
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
// 道岔总反
|
||||||
|
reverse() {
|
||||||
|
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 道岔单锁
|
||||||
|
lock() {
|
||||||
|
commitOperate(menuOperate.Switch.lock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 道岔解锁
|
||||||
|
unlock() {
|
||||||
|
commitOperate(menuOperate.Switch.unlock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 道岔封锁
|
||||||
|
block() {
|
||||||
|
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 道岔解封
|
||||||
|
unblock() {
|
||||||
|
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doShow(point) {
|
||||||
|
this.initMenu();
|
||||||
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
|
this.$refs.popMenu.close();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initMenu() {
|
||||||
|
// 编辑模式菜单列表
|
||||||
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
|
this.menu = this.menuNormal.Local;
|
||||||
|
// 故障模式菜单列表
|
||||||
|
// if (this.operatemode === OperateMode.FAULT) {
|
||||||
|
// if (!this.$store.state.scriptRecord.bgSet) {
|
||||||
|
// const menuHook = [{
|
||||||
|
// label: '道岔钩锁',
|
||||||
|
// handler: this.hookLock
|
||||||
|
// }];
|
||||||
|
// this.menu = [...this.menuForce, ...menuHook];
|
||||||
|
// } else {
|
||||||
|
// this.menu = this.menuForce;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -116,7 +116,8 @@ export default {
|
|||||||
callback('字母+数字,最后一位数字');
|
callback('字母+数字,最后一位数字');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
callback('请输入车次');
|
// callback('请输入车次');
|
||||||
|
callback();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
@ -137,42 +138,42 @@ export default {
|
|||||||
departStationCode:'' // 出发车站
|
departStationCode:'' // 出发车站
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
trackSectionCode: [
|
// trackSectionCode: [
|
||||||
{ required: true, message: '请选择股道', trigger: 'blur' },
|
// { required: true, message: '请选择股道', trigger: 'blur' },
|
||||||
{ required: true, message: '请选择股道', trigger: 'change' }
|
// { required: true, message: '请选择股道', trigger: 'change' }
|
||||||
],
|
// ],
|
||||||
arriveTripNumber:[
|
arriveTripNumber:[
|
||||||
{ required: true, validator: validateTripNumber, trigger: 'blur' }
|
{ required: true, validator: validateTripNumber, trigger: 'blur' }
|
||||||
// message: '请输入到达车次'
|
// message: '请输入到达车次'
|
||||||
],
|
],
|
||||||
departTripNumber:[
|
departTripNumber:[
|
||||||
{ required: true, validator: validateTripNumber, trigger: 'blur' }
|
{ required: true, validator: validateTripNumber, trigger: 'blur' }
|
||||||
],
|
|
||||||
// message: '请输入出发车次'
|
|
||||||
arriveTime: [
|
|
||||||
{ required: true, message: '请选择到达时间', trigger: 'blur' },
|
|
||||||
{ required: true, message: '请选择到达时间', trigger: 'change' }
|
|
||||||
],
|
|
||||||
departTime: [
|
|
||||||
{ required: true, message: '请选择出发时间', trigger: 'blur' },
|
|
||||||
{ required: true, message: '请选择出发时间', trigger: 'change' }
|
|
||||||
],
|
|
||||||
arriveDirectionCode: [
|
|
||||||
{ required: true, message: '请选择入口', trigger: 'blur' },
|
|
||||||
{ required: true, message: '请选择入口', trigger: 'change' }
|
|
||||||
],
|
|
||||||
departDirectionCode: [
|
|
||||||
{ required: true, message: '请选择出口', trigger: 'blur' },
|
|
||||||
{ required: true, message: '请选择出口', trigger: 'change' }
|
|
||||||
],
|
|
||||||
arriveStationCode: [
|
|
||||||
{ required: true, message: '请选择后方车站', trigger: 'blur' },
|
|
||||||
{ required: true, message: '请选择后方车站', trigger: 'change' }
|
|
||||||
],
|
|
||||||
departStationCode: [
|
|
||||||
{ required: true, message: '请选择前方车站', trigger: 'blur' },
|
|
||||||
{ required: true, message: '请选择前方车站', trigger: 'change' }
|
|
||||||
]
|
]
|
||||||
|
// message: '请输入出发车次'
|
||||||
|
// arriveTime: [
|
||||||
|
// { required: true, message: '请选择到达时间', trigger: 'blur' },
|
||||||
|
// { required: true, message: '请选择到达时间', trigger: 'change' }
|
||||||
|
// ],
|
||||||
|
// departTime: [
|
||||||
|
// { required: true, message: '请选择出发时间', trigger: 'blur' },
|
||||||
|
// { required: true, message: '请选择出发时间', trigger: 'change' }
|
||||||
|
// ],
|
||||||
|
// arriveDirectionCode: [
|
||||||
|
// { required: true, message: '请选择入口', trigger: 'blur' },
|
||||||
|
// { required: true, message: '请选择入口', trigger: 'change' }
|
||||||
|
// ],
|
||||||
|
// departDirectionCode: [
|
||||||
|
// { required: true, message: '请选择出口', trigger: 'blur' },
|
||||||
|
// { required: true, message: '请选择出口', trigger: 'change' }
|
||||||
|
// ],
|
||||||
|
// arriveStationCode: [
|
||||||
|
// { required: true, message: '请选择后方车站', trigger: 'blur' },
|
||||||
|
// { required: true, message: '请选择后方车站', trigger: 'change' }
|
||||||
|
// ],
|
||||||
|
// departStationCode: [
|
||||||
|
// { required: true, message: '请选择前方车站', trigger: 'blur' },
|
||||||
|
// { required: true, message: '请选择前方车站', trigger: 'change' }
|
||||||
|
// ]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -145,6 +145,7 @@ export default {
|
|||||||
height: this.$store.state.app.height - 61,
|
height: this.$store.state.app.height - 61,
|
||||||
currentStationCode:'',
|
currentStationCode:'',
|
||||||
filterSectionMap:{},
|
filterSectionMap:{},
|
||||||
|
currentRow:null,
|
||||||
lineTypeMap:{
|
lineTypeMap:{
|
||||||
1:'正线',
|
1:'正线',
|
||||||
2:'到发线'
|
2:'到发线'
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<el-button class="trainFixedPathButton" size="small">基本图导入</el-button>
|
<el-button class="trainFixedPathButton" size="small">基本图导入</el-button>
|
||||||
<el-button class="trainFixedPathButton" size="small">基本图申请</el-button>
|
<el-button class="trainFixedPathButton" size="small">基本图申请</el-button>
|
||||||
<el-button class="trainFixedPathButton" size="small">其他站导入</el-button>
|
<el-button class="trainFixedPathButton" size="small">其他站导入</el-button>
|
||||||
<el-button class="trainFixedPathButton" size="small">删除</el-button>
|
<el-button class="trainFixedPathButton" size="small" @click="deleteRunplan">删除</el-button>
|
||||||
<el-button class="trainFixedPathButton" size="small">全部清空</el-button>
|
<el-button class="trainFixedPathButton" size="small">全部清空</el-button>
|
||||||
<el-button class="trainFixedPathButton" size="small">修改</el-button>
|
<el-button class="trainFixedPathButton" size="small">修改</el-button>
|
||||||
<el-button class="trainFixedPathButton" size="small">查找</el-button>
|
<el-button class="trainFixedPathButton" size="small">查找</el-button>
|
||||||
@ -39,6 +39,7 @@
|
|||||||
:height="(height-100)+'px'"
|
:height="(height-100)+'px'"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
style="border:1px #ccc solid;"
|
style="border:1px #ccc solid;"
|
||||||
|
@row-click="selectedSection"
|
||||||
>
|
>
|
||||||
<!-- :height="(height-100)+'px'" -->
|
<!-- :height="(height-100)+'px'" -->
|
||||||
<!-- @cell-click="selectedTripNumber" -->
|
<!-- @cell-click="selectedTripNumber" -->
|
||||||
@ -290,6 +291,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
height: this.$store.state.app.height - 61,
|
height: this.$store.state.app.height - 61,
|
||||||
currentStationCode:'',
|
currentStationCode:'',
|
||||||
|
currentRow:null,
|
||||||
tableData:[],
|
tableData:[],
|
||||||
filterSectionMap:{}
|
filterSectionMap:{}
|
||||||
};
|
};
|
||||||
@ -316,6 +318,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
selectedSection(row, column, event) {
|
||||||
|
this.currentRow = row;
|
||||||
|
},
|
||||||
loadStation() {
|
loadStation() {
|
||||||
this.$refs.terminalStationList.loadStation();
|
this.$refs.terminalStationList.loadStation();
|
||||||
},
|
},
|
||||||
@ -336,6 +341,26 @@ export default {
|
|||||||
mapStationDirectionMap:this.mapStationDirectionData
|
mapStationDirectionMap:this.mapStationDirectionData
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
deleteRunplan() {
|
||||||
|
if (this.currentRow) {
|
||||||
|
const that = this;
|
||||||
|
this.$confirm('确定删除该条列车路径数据?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
// stationCode 车站编码
|
||||||
|
const param = {stationCode:this.currentRow.stationCode, runPlanCode:this.currentRow.runPlanCode};
|
||||||
|
commitOperate(menuOperate.CTC.deleteTrainFixedPath, param, 3).then(({valid})=>{
|
||||||
|
if (valid) {
|
||||||
|
that.$message.success('删除成功!');
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
that.$message.error('删除失败');
|
||||||
|
});
|
||||||
|
}).catch(e => {});
|
||||||
|
}
|
||||||
|
},
|
||||||
noticeInfo() {
|
noticeInfo() {
|
||||||
this.$emit('noticeInfo');
|
this.$emit('noticeInfo');
|
||||||
},
|
},
|
||||||
@ -413,6 +438,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleData() {
|
handleData() {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
|
this.currentRow = null;
|
||||||
const railCtcStationManageRpMsg = copyAssign({}, this.$store.state.socket.railCtcStationManageRpMsg);
|
const railCtcStationManageRpMsg = copyAssign({}, this.$store.state.socket.railCtcStationManageRpMsg);
|
||||||
this.tableData = Object.values(railCtcStationManageRpMsg).filter(data=>{
|
this.tableData = Object.values(railCtcStationManageRpMsg).filter(data=>{
|
||||||
data.arriveTime = this.coverTime(data.arriveTime);
|
data.arriveTime = this.coverTime(data.arriveTime);
|
||||||
@ -499,5 +525,9 @@ export default {
|
|||||||
border-color: #a5a5a5;
|
border-color: #a5a5a5;
|
||||||
}
|
}
|
||||||
#trainFixedPathTableIn.el-table .cell{ padding-left: 5px;padding-right: 5px; text-align: center;font-size: 13px;}
|
#trainFixedPathTableIn.el-table .cell{ padding-left: 5px;padding-right: 5px; text-align: center;font-size: 13px;}
|
||||||
|
#trainFixedPathTableIn .el-table__body tr.current-row>td{
|
||||||
|
background-color: #6aa8ec;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user