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 iscsSEF from '@/assets/iscs_picture/iscs-SEF.png';
import iscsValue from '@/assets/iscs_picture/iscs-value.png'; import iscsValue from '@/assets/iscs_picture/iscs-value.png';
import fanCoil from '@/assets/iscs_picture/fanCoil.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 = { const pictureObj = {
'psdLeft': psdLeft, 'psdLeft': psdLeft,
@ -84,7 +88,11 @@ const pictureObj = {
iscsRAFEAFGray, iscsRAFEAFGray,
iscsSEF, iscsSEF,
iscsValue, iscsValue,
fanCoil fanCoil,
iscsSensor,
iscsDangwei,
iscsDibian,
iscsPt1
}; };
export default class Picture extends Group { export default class Picture extends Group {
constructor(device) { constructor(device) {

View File

@ -38,6 +38,10 @@ export default class rect extends Group {
this.grouper.add(this.iscsRect); this.grouper.add(this.iscsRect);
this.add(this.grouper); this.add(this.grouper);
} }
setState(model) {
this.iscsRect.setStyle('fill', model.fillColor);
this.iscsRect.setStyle('stroke', model.strokeColor);
}
setModel(dx, dy) { setModel(dx, dy) {
this.model.point.x += dx; this.model.point.x += dx;
this.model.point.y += dy; 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.x += dx;
this.model.point.y += dy; this.model.point.y += dy;
} }
setState(model) {
this.textName.setStyle('text', model.context);
this.textName.setStyle('textBackgroundColor', model.gbColor);
}
setSize(width, height) { setSize(width, height) {
this.model.width = width; this.model.width = width;
this.model.height = height; 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: 'MAINTAINER', enLabel: 'Repairman '},
{label: '车辆段调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher '}, {label: '车辆段调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher '},
{label: '工电调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric 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: [ SimulationType: [
{ label: '实训', value: 'Training'}, { label: '实训', value: 'Training'},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -124,10 +124,14 @@ export default {
} }
}); });
this.openWindow = window.open(routeData.href); this.openWindow = window.open(routeData.href);
} else if (role.type == '车辆段') { } else if (role.type == '车辆段调度') {
prdType = '05'; prdType = '05';
role.type = 'DEPOT_DISPATCHER'; role.type = 'DEPOT_DISPATCHER';
this.$store.dispatch('training/setRoles', '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 { } else {
prdType = ''; prdType = '';
} }

View File

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