添加角色NCC行调

This commit is contained in:
dong 2023-04-24 16:10:50 +08:00
parent 5181b1e98a
commit 6d848115b3
5 changed files with 79 additions and 40 deletions

View File

@ -78,6 +78,7 @@ export default {
], ],
roleTypeList: [ roleTypeList: [
{label: '行调', value: 'DISPATCHER'}, {label: '行调', value: 'DISPATCHER'},
{label: 'NCC行调', value: 'NCC_DISPATCHER'},
{label: '行值', value: 'STATION_SUPERVISOR'}, {label: '行值', value: 'STATION_SUPERVISOR'},
{label: '司机', value: 'DRIVER'}, {label: '司机', value: 'DRIVER'},
{label: '通号', value: 'MAINTAINER'}, {label: '通号', value: 'MAINTAINER'},

View File

@ -81,6 +81,7 @@ export default {
], ],
typeList: [ typeList: [
{label: '行调', value: 'DISPATCHER'}, {label: '行调', value: 'DISPATCHER'},
{label: 'NCC行调', value: 'NCC_DISPATCHER'},
{label: '通号', value: 'MAINTAINER'}, {label: '通号', value: 'MAINTAINER'},
{label: '车站值班员', value: 'STATION_SUPERVISOR'}, {label: '车站值班员', value: 'STATION_SUPERVISOR'},
{label: '车站助理', value: 'STATION_ASSISTANT'}, {label: '车站助理', value: 'STATION_ASSISTANT'},

View File

@ -96,6 +96,9 @@ export default {
treeData: [{ treeData: [{
labelName: '行调', labelName: '行调',
children: [] children: []
}, {
labelName: 'NCC行调',
children: []
}, { }, {
labelName: '车站值班员', labelName: '车站值班员',
children: [] children: []
@ -174,6 +177,7 @@ export default {
if (val && val.length) { if (val && val.length) {
this.memberData = this.$store.state.training.memberData; this.memberData = this.$store.state.training.memberData;
const dispatcherList = []; const dispatcherList = [];
const nccDispatcherList = [];
const electricDispatcherList = []; const electricDispatcherList = [];
const depotDispatcherList = []; const depotDispatcherList = [];
const stationSupervisorList = []; const stationSupervisorList = [];
@ -197,6 +201,10 @@ export default {
this.memberData[item.id].labelName = '行调' + (item.name || ''); this.memberData[item.id].labelName = '行调' + (item.name || '');
dispatcherList.push(this.memberData[item.id]); dispatcherList.push(this.memberData[item.id]);
break; break;
case 'NCC_DISPATCHER':
this.memberData[item.id].labelName = 'NCC行调' + (item.name || '');
nccDispatcherList.push(this.memberData[item.id]);
break;
case 'ELECTRIC_DISPATCHER': case 'ELECTRIC_DISPATCHER':
this.memberData[item.id].labelName = '电力调度' + (item.name || ''); this.memberData[item.id].labelName = '电力调度' + (item.name || '');
electricDispatcherList.push(this.memberData[item.id]); electricDispatcherList.push(this.memberData[item.id]);
@ -272,6 +280,10 @@ export default {
labelName: '行调', labelName: '行调',
id: 'dispatcher', id: 'dispatcher',
children: dispatcherList children: dispatcherList
}, {
labelName: 'NCC行调',
id: 'nccDispatcher',
children: nccDispatcherList
}, { }, {
labelName: '车站值班员', labelName: '车站值班员',
id: 'stationSupervisor', id: 'stationSupervisor',

View File

@ -92,6 +92,9 @@ export default {
treeData: [{ treeData: [{
labelName: '行调', labelName: '行调',
children: [] children: []
}, {
labelName: 'NCC行调',
children: []
}, { }, {
labelName: '车站值班员', labelName: '车站值班员',
children: [] children: []
@ -221,6 +224,7 @@ export default {
if (val && val.length) { if (val && val.length) {
// this.memberData = this.$store.state.training.memberData; // this.memberData = this.$store.state.training.memberData;
const dispatcherList = []; const dispatcherList = [];
const nccDispatcherList = [];
const electricDispatcherList = []; const electricDispatcherList = [];
const depotDispatcherList = []; const depotDispatcherList = [];
const stationSupervisorList = []; const stationSupervisorList = [];
@ -244,6 +248,10 @@ export default {
this.memberData[item.id].labelName = '行调' + (item.name || ''); this.memberData[item.id].labelName = '行调' + (item.name || '');
dispatcherList.push(this.memberData[item.id]); dispatcherList.push(this.memberData[item.id]);
break; break;
case 'NCC_DISPATCHER':
this.memberData[item.id].labelName = 'NCC行调' + (item.name || '');
nccDispatcherList.push(this.memberData[item.id]);
break;
case 'ELECTRIC_DISPATCHER': case 'ELECTRIC_DISPATCHER':
this.memberData[item.id].labelName = '电力调度' + (item.name || ''); this.memberData[item.id].labelName = '电力调度' + (item.name || '');
electricDispatcherList.push(this.memberData[item.id]); electricDispatcherList.push(this.memberData[item.id]);
@ -317,8 +325,12 @@ export default {
}); });
this.treeData = [{ this.treeData = [{
labelName: '行调', labelName: '行调',
id: 'dispatcher1', id: 'dispatcher',
children: dispatcherList children: dispatcherList
}, {
labelName: 'NCC行调',
id: 'nccDispatcher',
children: nccDispatcherList
}, { }, {
labelName: '车站值班员', labelName: '车站值班员',
id: 'stationSupervisor', id: 'stationSupervisor',

View File

@ -159,8 +159,6 @@
<el-input-number v-model="batchForm.MAINTAINER" size="small" :min="0" :step="1" :precision="0" /> <el-input-number v-model="batchForm.MAINTAINER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="行值:" prop="STATION_SUPERVISOR"> <el-form-item label="行值:" prop="STATION_SUPERVISOR">
<el-input-number v-model="batchForm.STATION_SUPERVISOR" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_SUPERVISOR" size="small" :min="0" :max="1" :step="1" :precision="0" />
@ -171,104 +169,95 @@
<el-input-number v-model="batchForm.DRIVER" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.DRIVER" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col v-if="batchForm.systemType === 'METRO'" :span="12">
<el-row v-if="batchForm.systemType === 'METRO'">
<el-col :span="12">
<el-form-item label="车辆段/停车场调度:" prop="DEPOT_DISPATCHER"> <el-form-item label="车辆段/停车场调度:" prop="DEPOT_DISPATCHER">
<el-input-number v-model="batchForm.DEPOT_DISPATCHER" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.DEPOT_DISPATCHER" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col v-if="batchForm.systemType === 'METRO'" :span="12">
<el-form-item label="车辆段/停车场信号楼:" prop="SIGNAL_BUILDING"> <el-form-item label="车辆段/停车场信号楼:" prop="SIGNAL_BUILDING">
<el-input-number v-model="batchForm.SIGNAL_BUILDING" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.SIGNAL_BUILDING" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
<el-row v-if="batchForm.systemType === 'RAILWAY'">
<el-col :span="12">
<el-form-item label="车站助理:" prop="STATION_ASSISTANT"> <el-form-item label="车站助理:" prop="STATION_ASSISTANT">
<el-input-number v-model="batchForm.STATION_ASSISTANT" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_ASSISTANT" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
<el-form-item label="车站站长:" prop="STATION_MASTER"> <el-form-item label="车站站长:" prop="STATION_MASTER">
<el-input-number v-model="batchForm.STATION_MASTER" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_MASTER" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
<el-row v-if="batchForm.systemType === 'RAILWAY'">
<el-col :span="12">
<el-form-item label="车站信号员:" prop="STATION_SIGNALER"> <el-form-item label="车站信号员:" prop="STATION_SIGNALER">
<el-input-number v-model="batchForm.STATION_SIGNALER" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_SIGNALER" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
<el-form-item label="车站客运员:" prop="STATION_PASSENGER"> <el-form-item label="车站客运员:" prop="STATION_PASSENGER">
<el-input-number v-model="batchForm.STATION_PASSENGER" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_PASSENGER" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
<el-row v-if="batchForm.systemType === 'RAILWAY'">
<el-col :span="12">
<el-form-item label="车站扳道员:" prop="STATION_SWITCH_MAN"> <el-form-item label="车站扳道员:" prop="STATION_SWITCH_MAN">
<el-input-number v-model="batchForm.STATION_SWITCH_MAN" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_SWITCH_MAN" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
<el-form-item label="车站引导员:" prop="STATION_FACILITATOR"> <el-form-item label="车站引导员:" prop="STATION_FACILITATOR">
<el-input-number v-model="batchForm.STATION_FACILITATOR" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_FACILITATOR" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
<el-row v-if="batchForm.systemType === 'RAILWAY'">
<el-col :span="12">
<el-form-item label="车站工务工:" prop="STATION_WORKER"> <el-form-item label="车站工务工:" prop="STATION_WORKER">
<el-input-number v-model="batchForm.STATION_WORKER" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_WORKER" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
<el-form-item label="设备管理员:" prop="DEVICE_MANAGER"> <el-form-item label="设备管理员:" prop="DEVICE_MANAGER">
<el-input-number v-model="batchForm.DEVICE_MANAGER" size="small" :min="0" :step="1" :precision="0" /> <el-input-number v-model="batchForm.DEVICE_MANAGER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col v-if="batchForm.systemType === 'METRO'" :span="12">
<el-row v-if="batchForm.systemType === 'METRO'">
<el-col :span="12">
<el-form-item label="工电调度:" prop="ELECTRIC_DISPATCHER"> <el-form-item label="工电调度:" prop="ELECTRIC_DISPATCHER">
<el-input-number v-model="batchForm.ELECTRIC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" /> <el-input-number v-model="batchForm.ELECTRIC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col v-if="batchForm.systemType === 'METRO'" :span="12">
<el-form-item label="车务段段长:" prop="TRAIN_MASTER"> <el-form-item label="车务段段长:" prop="TRAIN_MASTER">
<el-input-number v-model="batchForm.TRAIN_MASTER" size="small" :min="0" :step="1" :precision="0" /> <el-input-number v-model="batchForm.TRAIN_MASTER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col v-if="batchForm.systemType === 'METRO'" :span="12">
<el-row v-if="batchForm.systemType === 'METRO'">
<el-col :span="12">
<el-form-item label="值班主任:" prop="SHIFT_MANAGER"> <el-form-item label="值班主任:" prop="SHIFT_MANAGER">
<el-input-number v-model="batchForm.SHIFT_MANAGER" size="small" :min="0" :step="1" :precision="0" /> <el-input-number v-model="batchForm.SHIFT_MANAGER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col v-if="batchForm.systemType === 'METRO'" :span="12">
<el-form-item label="环控调度" prop="ENVIRONMENT_DISPATCHER"> <el-form-item label="环控调度" prop="ENVIRONMENT_DISPATCHER">
<el-input-number v-model="batchForm.ENVIRONMENT_DISPATCHER" size="small" :min="0" :step="1" :precision="0" /> <el-input-number v-model="batchForm.ENVIRONMENT_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col v-if="batchForm.systemType === 'METRO'" :span="12">
<el-form-item label="电力工务" prop="STATION_ELECTRIC_WORKER"> <el-form-item label="电力工务" prop="STATION_ELECTRIC_WORKER">
<el-input-number v-model="batchForm.STATION_ELECTRIC_WORKER" size="small" :min="0" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_ELECTRIC_WORKER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- --> <el-col :span="12">
<el-form-item label="NCC行调" prop="NCC_DISPATCHER">
<el-input-number v-model="batchForm.NCC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row>
<el-form-item> <el-form-item>
<el-button type="primary" @click="batchCreate">批量创建</el-button> <el-button type="primary" @click="batchCreate">批量创建</el-button>
<el-button @click="resetForm">重置</el-button> <el-button @click="resetForm">重置</el-button>
</el-form-item> </el-form-item>
</el-row>
</el-form> </el-form>
</div> </div></el-tab-pane>
</el-tab-pane>
<el-tab-pane class="view-control" label="一键生成" name="fourth" :lazy="lazy"> <el-tab-pane class="view-control" label="一键生成" name="fourth" :lazy="lazy">
<el-form ref="generationForm" :model="generationForm" label-width="120px" class="demo-ruleForm" size="small"> <el-form ref="generationForm" :model="generationForm" label-width="120px" class="demo-ruleForm" size="small">
<el-form-item label="系统:" prop="systemType"> <el-form-item label="系统:" prop="systemType">
@ -451,6 +440,7 @@ export default {
}, },
batchForm: { batchForm: {
DISPATCHER: 0, DISPATCHER: 0,
NCC_DISPATCHER: 0,
STATION_SUPERVISOR: 0, STATION_SUPERVISOR: 0,
DRIVER: 0, DRIVER: 0,
MAINTAINER: 0, MAINTAINER: 0,
@ -545,7 +535,11 @@ export default {
name += findType.label; name += findType.label;
} }
name += '-'; name += '-';
if (obj.type == 'DISPATCHER') { if (obj.type == 'NCC_DISPATCHER') {
if (obj.name) {
name += obj.name;
}
} else if (obj.type == 'DISPATCHER') {
const findDeviceCode = this.disStationList.find(item => { const findDeviceCode = this.disStationList.find(item => {
return item.code == obj.deviceCode; return item.code == obj.deviceCode;
}); });
@ -652,6 +646,17 @@ export default {
} }
} }
} }
if (this.batchForm.NCC_DISPATCHER) {
for (let i = 0; i < this.batchForm.NCC_DISPATCHER; i++) {
const member = {
id: this.getMemberId(this.batchForm.systemType),
name: '',
type: 'NCC_DISPATCHER',
deviceCode: ''
};
memberMap[this.batchForm.systemType].push(member);
}
}
this.stationList.forEach(station => { this.stationList.forEach(station => {
if (!station.depot) { if (!station.depot) {
if (this.batchForm.STATION_SUPERVISOR) { if (this.batchForm.STATION_SUPERVISOR) {
@ -850,6 +855,7 @@ export default {
resetForm() { resetForm() {
this.batchForm = { this.batchForm = {
DISPATCHER: 0, DISPATCHER: 0,
NCC_DISPATCHER: 0,
STATION_SUPERVISOR: 0, STATION_SUPERVISOR: 0,
DRIVER: 0, DRIVER: 0,
MAINTAINER: 0, MAINTAINER: 0,
@ -905,6 +911,13 @@ export default {
}; };
memberMap[this.generationForm.systemType].push(memberDispatcher); memberMap[this.generationForm.systemType].push(memberDispatcher);
} }
const memberNccDispatcher = {
id: this.getMemberId(this.generationForm.systemType),
name: '',
type: 'NCC_DISPATCHER',
deviceCode: ''
};
memberMap[this.generationForm.systemType].push(memberNccDispatcher);
this.stationList.forEach(station => { this.stationList.forEach(station => {
if (!station.depot) { if (!station.depot) {
const member = { const member = {