This commit is contained in:
fan 2020-10-13 14:10:17 +08:00
commit 6e479fdb3f
22 changed files with 132 additions and 28 deletions

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -42,6 +42,10 @@ import iscsRAFEAFGray from '@/assets/iscs_picture/iscs-RAF-EAF_gray.png';
import iscsSEF from '@/assets/iscs_picture/iscs-SEF.png';
import iscsValue from '@/assets/iscs_picture/iscs-value.png';
import fanCoil from '@/assets/iscs_picture/fanCoil.png';
import iscsSensor from '@/assets/iscs_picture/iscs-sensor.png';
import iscsDangwei from '@/assets/iscs_picture/iscs-dangwei.png';
import iscsDibian from '@/assets/iscs_picture/iscs-dibian.png';
import iscsPt1 from '@/assets/iscs_picture/iscs-pt1.png';
const pictureObj = {
'psdLeft': psdLeft,
@ -83,8 +87,12 @@ const pictureObj = {
iscsRAFEAFGreen,
iscsRAFEAFGray,
iscsSEF,
iscsValue,
fanCoil
iscsValue,
fanCoil,
iscsSensor,
iscsDangwei,
iscsDibian,
iscsPt1
};
export default class Picture extends Group {
constructor(device) {

View File

@ -20,8 +20,8 @@ export default class rect extends Group {
const lineDash = model.type == 'dashed' ? [8, 5] : [0, 0];
this.iscsRect = new Rect({
zlevel: model.zlevel,
z: model.z,
z2: model.z2||0,
z: model.z,
z2: model.z2 || 0,
shape: {
x: 0,
y: 0,
@ -38,6 +38,10 @@ export default class rect extends Group {
this.grouper.add(this.iscsRect);
this.add(this.grouper);
}
setState(model) {
this.iscsRect.setStyle('fill', model.fillColor);
this.iscsRect.setStyle('stroke', model.strokeColor);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;

View File

@ -49,6 +49,10 @@ export default class text extends Group {
this.model.point.x += dx;
this.model.point.y += dy;
}
setState(model) {
this.textName.setStyle('text', model.context);
this.textName.setStyle('textBackgroundColor', model.gbColor);
}
setSize(width, height) {
this.model.width = width;
this.model.height = height;

View File

@ -0,0 +1,6 @@
export default {
Fixed: 'Fixed', // 固定值
A: 'a', // 远
B: 'b', // 红框 阀门
C: 'c' // 数组
};

View File

@ -0,0 +1,3 @@
export default {
A: 'a' // 远 红框 阀门
};

View File

@ -0,0 +1,41 @@
import elType from './elType';
export default {
[elType.A]: {
defval: 'stateA',
stateMap: {
stateA: {
gbColor: 'rgba(157, 171, 0, 1)',
context: '远'
},
stateB: {
gbColor: 'rgba(157, 171, 0, 1)',
context: '近'
}
}
}, // 远
[elType.B]: {
defval: 'stateA',
stateMap: {
stateA: {
fillColor: 'red',
strokeColor: 'red'
},
stateB: {
fillColor: 'rgba(0, 255, 13, 1)',
strokeColor: 'rgba(0, 255, 13, 1)'
}
}
}, // 红框 阀门
[elType.C]: {
defval: 'stateA',
stateMap: {
stateA: {
context: '8.3'
},
stateB: {
context: '7.6'
}
}
} // 数组
};

View File

@ -0,0 +1,13 @@
import elType from './elType';
import grType from './grType';
export default {
[grType.A]: {
name: '',
elemList: [
{type: elType.A},
{type: elType.B},
{type: elType.C}
]
}
};

View File

@ -96,7 +96,9 @@ export default {
{label: '通号', value: 'MAINTAINER', enLabel: 'Repairman '},
{label: '车辆段调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher '},
{label: '工电调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher'},
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '}
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
{label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent_department'}
],
SimulationType: [
{ label: '实训', value: 'Training'},
@ -151,7 +153,7 @@ export default {
{ label: '全线限速', value: 'LimitControl' },
{ label: '司机', value: 'Driver' },
{ label: '列车', value: 'Train' },
{ label: '方向杆', value: 'DirectionRod'}
{ label: '方向杆', value: 'DirectionRod'}
],
simulationDeviceList:[

View File

@ -95,8 +95,12 @@ export default {
{ name: '排烟风机(箭头)-灰色', value: 'iscsRAFEAFGray' },
{ name: '排烟风机(箭头)-绿色', value: 'iscsRAFEAFGreen' },
{ name: '排烟风机', value: 'iscsSEF' },
{ name: '阀门', value: 'iscsValue' },
{ name: '风扇机', value: 'fanCoil'}
{ name: '阀门', value: 'iscsValue' },
{ name: '风扇机', value: 'fanCoil'},
{ name: '烟杆传感器', value: 'iscsSensor' },
{ name: '抵挡图', value: 'iscsDangwei' },
{ name: '地变图', value: 'iscsDibian' },
{ name: 'PT1', value: 'iscsPt1' }
],
rules: {

View File

@ -1,7 +1,7 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="图层:" prop="z2">
<el-form-item label="图层:" prop="z2">
<el-input-number v-model="form.z2" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="宽度:" prop="width">
@ -53,8 +53,8 @@ export default {
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
z2: 1,
code: '',
z2: 1,
fillColor: '',
borderWidth: '',
strokeColor: '',
@ -86,8 +86,8 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.z2 = model.z2||0;
this.form.code = model.code;
this.form.z2 = model.z2 || 0;
this.form.fillColor = model.fillColor;
this.form.borderWidth = model.borderWidth;
this.form.strokeColor = model.strokeColor;
@ -110,8 +110,8 @@ export default {
y: this.form.y
},
code: this.isUpdate ? this.form.code : getUID('IscsRect', this.iscs.iscsRectList),
_type: 'IscsRect',
z2: this.form.z2,
_type: 'IscsRect',
z2: this.form.z2,
fillColor: this.form.fillColor,
borderWidth: this.form.borderWidth,
strokeColor: this.form.strokeColor,

View File

@ -82,7 +82,7 @@ export default {
this.scaleRate = window.innerWidth / 2000;
params.userInterface = 'catenary';
} else {
const tractionList = ['象峰站', '罗汉山站', '树兜站', '东街口站', '达道站', '三叉街站', '葫芦阵站', '城门站', '胪雷站'];
const tractionList = ['象峰站', '罗汉山站', '树兜站', '东街口站', '达道站', '三叉街站', '葫芦阵站', '城门站', '胪雷站', '安平站', '梁厝站', '三江口站'];
if (tractionList.includes(this.stationName)) {
this.title = this.stationName + ' 牵引降压混合变电所主接线图';
params.userInterface = 'combined';

View File

@ -81,7 +81,7 @@ export default {
return {
selectStation: 'mainHouseOne',
stationList:[],
tractionList:['象峰站', '罗汉山站', '树兜站', '东街口站', '达道站', '三叉街站', '葫芦阵站', '城门站', '胪雷站'],
tractionList:['象峰站', '罗汉山站', '树兜站', '东街口站', '达道站', '三叉街站', '葫芦阵站', '城门站', '胪雷站', '安平站', '梁厝站', '三江口站'],
group:'',
lineCode:'',
buttonId:'substation',

View File

@ -158,6 +158,10 @@ export default {
member.label = '通号' + (member.name ? member.name : '');
break;
}
case 'PARENT_DEPARTMENT': {
member.label = '上级部门' + (member.name ? member.name : '');
break;
}
}
// if (member.type === 'DISPATCHER') {
// this.memberId = member.id;

View File

@ -217,6 +217,11 @@ export default {
id: 'depotDispatcher',
type: 'role',
children: result.deviceListData[4]
}, {
label: '上级部门',
id: 'parentDepartment',
type: 'role',
children: result.deviceListData[5]
}];
const lastMemberList = result.lastMemberList;
this.$emit('setTreeData', treeData);

View File

@ -193,15 +193,22 @@ export default {
id: 'depotDispatcher',
type: 'role',
children: result.deviceListData[4]
}];
}, {
label: '上级部门',
id: 'parentDepartment',
type: 'role',
children: result.deviceListData[5]
}
// PARENT_DEPARTMENT
];
this.memberData = result.lastMemberList;
//
const member = resp.data.find(mem=>{
return mem.userId != '' && mem.userId != undefined;
});
if (member) {
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER'];
const prdTypeList = ['01', '02', '04', '', ''];
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT'];
const prdTypeList = ['01', '02', '04', '', '', ''];
const index = memberType.indexOf(member.type);
let prdType;
if (index >= 0) {
@ -300,7 +307,7 @@ export default {
// this.$refs.chatbox.resetCoversition();
},
changeTreeData({newRole, oldRole}) {
const deviceTypeList = ['DISPATCHER', 'STATION_SUPERVISOR', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER'];
const deviceTypeList = ['DISPATCHER', 'STATION_SUPERVISOR', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT'];
if (oldRole.id) {
const oldIndex = deviceTypeList.indexOf(oldRole.type);
if (oldIndex >= 0) {
@ -333,7 +340,7 @@ export default {
},
addScriptMember(member) {
this.memberData.push(member);
const deviceTypeList = ['行调', '行值', '司机', '通号', '车辆段调度'];
const deviceTypeList = ['行调', '行值', '司机', '通号', '车辆段调度', '上级部门'];
const index = deviceTypeList.indexOf(member.type);
if (index >= 0) {
const treeDataIn = this.treeData[index];

View File

@ -15,7 +15,7 @@ export function covertMemberData (activeTrainList, resp) {
lastData = JSON.parse(lastData);
const lastMemberList = [];
// const electricDispatcherList = [];
const deviceListData = [[], [], [], [], []];
const deviceListData = [[], [], [], [], [], []];
const driverList = [];
lastData.forEach((member, index)=>{
if (member.userId && member.userId == store.state.user.id) {
@ -37,8 +37,7 @@ export function covertMemberData (activeTrainList, resp) {
member.label = member.type + name + userName;
member.normalName = member.type + name;
}
const deviceType = ['行调', '通号', '行值', '司机', '车辆段调度'];
const deviceType = ['行调', '通号', '行值', '司机', '车辆段调度', '上级部门'];
const deviceTypeIndex = deviceType.indexOf(member.type);
if (deviceTypeIndex >= 0) {
if (deviceTypeIndex == 3) {

View File

@ -124,10 +124,14 @@ export default {
}
});
this.openWindow = window.open(routeData.href);
} else if (role.type == '车辆段') {
} else if (role.type == '车辆段调度') {
prdType = '05';
role.type = 'DEPOT_DISPATCHER';
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
} else if (role.type == '上级部门') {
prdType = '';
role.type = 'PARENT_DEPARTMENT';
this.$store.dispatch('training/setRoles', 'PARENT_DEPARTMENT');
} else {
prdType = '';
}

View File

@ -341,8 +341,8 @@ export default {
new_member.userId = this.$store.state.user.id;
new_member.disabled = true;
this.quickChangeMember.list = [new_member];
const deviceList = ['行值', '行调', '司机', '通号', '车辆段'];
const deviceType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER'];
const deviceList = ['行值', '行调', '司机', '通号', '车辆段', '上级部门'];
const deviceType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT'];
const new_index = deviceList.indexOf(new_member.type);
const old_index = deviceList.indexOf(old_member.type);
let oldType, newType;