Merge branch 'yly' into test

This commit is contained in:
Yuan 2022-08-25 18:24:56 +08:00
commit 5f4be2eb18
8 changed files with 490 additions and 12 deletions

View File

@ -0,0 +1,128 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
title="封锁操作对话框"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="3000"
:append-to-body="true"
:modal="true"
>
<div class="content">
<el-tree
style="height: 50%; overflow-y: scroll;"
:data="treeData"
node-key="id"
show-checkbox
:expand-on-click-node="true"
default-expand-all
>
<span class="custom-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span v-if="data.id <= 2">封锁状态</span>
<span v-else>{{ getBlockState(data.id) ? '' : '' }}</span>
</span>
</el-tree>
<div class="info">
<div class="item">14:36:18 操作成功</div>
<div class="item">14:36:18 操作成功</div>
</div>
</div>
<div class="btn-bar">
<el-button>设置封锁</el-button>
<el-button>解除封锁</el-button>
<el-button>保存</el-button>
<el-button @click="doClose">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'BlockDevice',
data() {
return {
show: false,
treeData: [
{
label: '沈阳',
id: 1,
children: [
{
id: 3,
label: '股道',
children: [
{
id: 5,
label: '11G',
},
{
id: 6,
label: '12G',
},
{
id: 7,
label: 'XIIIG',
},
{
id: 8,
label: '14G',
},
{
id: 9,
label: '15G',
},
{
id: 10,
label: 'XVIG',
},
{
id: 11,
label: 'XVIIG',
},
],
},
],
},
],
}
},
methods: {
doShow() {
this.show = true
},
doClose() {
this.show = false
},
getBlockState(id) {
return true
},
},
}
</script>
<style lang="scss" scoped>
.content {
height: 400px;
.custom-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 2rem;
}
.info {
background-color: #fff;
margin-top: 6px;
padding: 8px;
height: 50%;
}
}
.btn-bar {
display: flex;
justify-content: space-between;
margin-top: 16px;
}
</style>

View File

@ -113,6 +113,7 @@ export default {
if (this.mapData && this.mapData.skinVO) {
const parser = parserFactory(ParserType.Graph.value);
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
console.log('parsed mapDevice', this.mapDevice)
}
},
loadData() {
@ -154,7 +155,7 @@ export default {
const type = elem._type;
//
type != deviceType.Train &&
list.push({ code, _type: type, _free: true });
list.push({ code, _type: type, _free: true });
});
this.map.update(list, false);

View File

@ -0,0 +1,114 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
title="电力臂状态操作"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="3000"
:append-to-body="true"
:modal="true"
>
<el-tree :data="treeData" node-key="id" show-checkbox :expand-on-click-node="true" default-expand-all>
<span class="custom-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span v-if="data.id <= 2">状态</span>
<span v-else>{{ getPowerState(data.id) ? '有电' : '无电' }}</span>
</span>
</el-tree>
<div class="btn-bar">
<el-button>设置有电</el-button>
<el-button>设置停电</el-button>
<el-button>刷新状态</el-button>
<el-button @click="doClose">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'PowerSupplyArmSetting',
data() {
return {
show: false,
treeData: [
{
id: 1,
label: '沈阳',
children: [
{
id: 3,
label: '三线14、15、16道',
},
{
id: 4,
label: '浑下、17、18、19道、机务段、机26、揽、皇',
},
{
id: 5,
label: '浑上、11、12、13道',
},
{
id: 6,
label: '沈北下行',
},
{
id: 7,
label: '沈北上行',
},
{
id: 8,
label: '沈阳站库线',
},
],
},
{
id: 2,
label: '沈阳北',
children: [
{
id: 9,
label: '沈北下行',
},
{
id: 10,
label: '沈北上行',
},
{
id: 11,
label: '沈阳北客技库',
},
],
},
],
}
},
methods: {
doShow() {
this.show = true
},
doClose() {
this.show = false
},
getPowerState(id) {
return true
},
},
}
</script>
<style lang="scss" scoped>
.custom-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 2rem;
}
.btn-bar {
display: flex;
justify-content: space-between;
margin-top: 10px;
}
</style>

View File

@ -31,7 +31,10 @@
</div>
<div class="row">
车站
<el-select style="width: 60%;"></el-select>
<el-select v-model="form.station" style="width: 60%;">
<el-option value="shenyang" label="沈阳"></el-option>
<el-option value="shenyangbei" label="沈阳北"></el-option>
</el-select>
</div>
<div class="wrapper">
<div class="list" style="width: 60%;">
@ -92,6 +95,9 @@ export default {
data() {
return {
show: false,
form: {
station: 'shenyang',
},
}
},
methods: {

View File

@ -0,0 +1,159 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
title="区域批量操作"
:visible.sync="show"
width="1400px"
:before-close="doClose"
:z-index="3000"
:append-to-body="true"
:modal="true"
>
<el-row>
<el-col :span="16">
<map-visual :mapData="mapData" :width="870" :height="600" ref="mapVisual" />
</el-col>
<el-col :span="8">
<div class="form-area">
<div class="top">
<el-select v-model="workspaceName"></el-select>
<el-button>重命名</el-button>
<el-checkbox v-model="isEdit">编辑</el-checkbox>
</div>
<div class="mid">
<el-tree :data="treeData" node-key="id" show-checkbox :expand-on-click-node="true" default-expand-all>
<span class="custom-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span v-if="data.id <= 2">操作</span>
<span v-if="data.id <= 2">状态</span>
<span v-if="data.id > 2">{{ data.operation }}</span>
<span v-if="data.id > 2">{{ data.state }}</span>
</span>
</el-tree>
</div>
<div class="bottom">
<div class="line">
<el-button>增加分区</el-button>
<el-button>删除分区</el-button>
<el-button>保存分区</el-button>
<el-button>上传分区定义</el-button>
</div>
<div class="line">
<el-button>封锁/单锁</el-button>
<el-button>解封/解锁</el-button>
<el-button>刷新状态</el-button>
<el-button @click="doClose">关闭</el-button>
</div>
</div>
</div>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import MapVisual from './mapVisual.vue'
export default {
name: 'RegionBatchOperation',
components: { MapVisual },
data() {
return {
show: false,
workspaceName: '',
isEdit: false,
treeData: [
{
label: '临时批量工作区',
id: 1,
children: [
{
id: 3,
label: '道岔',
operation: '定',
state: '反位',
},
{
id: 4,
label: '股道/无岔',
},
{
id: 5,
label: '区间',
},
{
id: 6,
label: '信号机',
},
],
},
],
mapData: null,
}
},
created() {
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map))
// console.log(this.mapData.pictureList)
},
methods: {
doShow(stationCode) {
this.show = true
this.$nextTick(() => {
this.$store.dispatch('map/setPictureDeviceMap', {})
const picData = this.mapData.pictureList.find(pic => pic.stationCode === stationCode && pic.type === 'regionBatchOperation')
this.$store.dispatch('map/setPictureDeviceMap', picData.deviceMap)
const mapDevice = this.$store.state.map.mapDevice
const list = []
for (const deviceCode in mapDevice) {
list.push(deviceCode)
}
// debugger
this.$refs.mapVisual.loadData()
this.$refs.mapVisual.map.updatePicture(list)
this.$refs.mapVisual.map.updateTransform(picData.scaling, picData.origin)
// console.log(this.mapData)
// console.log('picData mapDevice len', picData.deviceMap.length)
// console.log(this.$store.state.map.mapDevice)
// this.$refs.mapVisual.setMap(this.mapData, this.$store.state.map.mapDevice)
})
},
doClose() {
this.show = false
},
},
}
</script>
<style lang="scss" scoped>
.form-area {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 600px;
.top {
display: flex;
width: 100%;
justify-content: space-between;
}
.mid {
flex: 1;
padding: 10px 0;
.el-tree {
height: 100%;
.custom-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 2rem;
}
}
}
.bottom {
.line {
display: flex;
justify-content: space-between;
}
}
}
</style>

View File

@ -31,6 +31,9 @@
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<BoardViewSetting ref="boardViewSetting" />
<RailViewSetting ref="railViewSetting" />
<PowerSupplyArmSetting ref="powerSupplyArmSetting" />
<BlockDevice ref="blockDevice" />
<RegionBatchOperation ref="regionBatchOperation" />
</div>
</template>
@ -49,6 +52,9 @@ import { EventBus } from '@/scripts/event-bus'
import SettingsMenu from './components/menu.vue'
import BoardViewSetting from './dialog/boardViewSetting.vue'
import RailViewSetting from './dialog/railViewSetting.vue'
import PowerSupplyArmSetting from './dialog/powerSupplyArmSetting.vue'
import BlockDevice from './dialog/blockDevice'
import RegionBatchOperation from './dialog/regionBatchOperation'
export default {
name: 'MenuPanel',
@ -57,6 +63,9 @@ export default {
SettingsMenu,
BoardViewSetting,
RailViewSetting,
PowerSupplyArmSetting,
BlockDevice,
RegionBatchOperation,
},
data() {
return {
@ -82,22 +91,38 @@ export default {
{
label: '调车参数配置',
id: 'shuntingParam',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }],
children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
},
{
label: '调车优先级配置',
id: 'shuntingPriority',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }],
children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
},
{
label: '调车规则配置',
id: 'shuntingRule',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }],
children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
},
{
label: '功能按钮设置',
id: 'functionButton',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }],
children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
},
{ label: '站场界面显示设置', id: 'UIDisplay' },
{ label: '报警提示设置', id: 'alarm' },
@ -106,12 +131,42 @@ export default {
T3MenuItems: [
{ label: '设置供电臂状态', id: 'powerSupplyArm', ctc: true },
{ label: '封锁设备操作', id: 'blockedDeviceOperation', ctc: true },
{ label: '区域批量设备操作', id: 'regionBatchOperation', children: [{}], ctc: true },
{ label: '站存车管理', id: 'stationTrainManage', children: [{}], ctc: true },
{ label: '设备影响分析', id: 'deviceAffectAnalyze', children: [{}], ctc: true },
{ label: '操作日志查询', id: 'operationLog', ctc: true },
{ label: '防溜设置查询', id: 'deviceAffectAnalyze', ctc: true },
{ label: '设备影响分析', id: 'deviceAffectAnalyze', ctc: true },
{
label: '区域批量设备操作',
id: 'regionBatchOperation',
children: [{}],
ctc: true,
children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
},
{
label: '站存车管理',
id: 'stationTrainManage',
children: [{}],
ctc: true,
children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
},
{
label: '设备影响分析',
id: 'deviceAffectAnalyze',
children: [{}],
ctc: true,
children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
},
{ label: '操作日志查询', id: 'operationLog' },
{ label: '防溜设置查询', id: 'deviceAffectAnalyze' },
{ label: '设备影响分析', id: 'deviceAffectAnalyze' },
],
}
},
@ -188,6 +243,19 @@ export default {
},
handleT3MenuSelect(id) {
console.log(id)
this.closeMenus()
const params = id.split('-')
switch (params[0]) {
case 'powerSupplyArm':
this.$refs.powerSupplyArmSetting.doShow()
break
case 'blockedDeviceOperation':
this.$refs.blockDevice.doShow()
break
case 'regionBatchOperation':
if (!params[1]) return
this.$refs.regionBatchOperation.doShow(params[1])
}
},
dragEvent() {
const offset = this.offset

View File

@ -71,6 +71,7 @@ export default {
},
methods: {
init() {
console.log(123)
document.getElementById(this.canvasId).oncontextmenu = function (e) {
return false;
};

View File

@ -14,6 +14,7 @@
<el-option label="站间透明" value="lucency" />
<el-option label="连锁车站" value="chainStation" />
<el-option label="大屏显示" value="bigScreen" />
<el-option label="区域批量操作" value="regionBatchOperation" />
</el-select>
</el-form-item>
<el-form-item v-if="ruleForm.type !== 'bigScreen'" label="所属车站:" prop="stationCode">