添加角色NCC行调
This commit is contained in:
parent
5181b1e98a
commit
6d848115b3
@ -78,6 +78,7 @@ export default {
|
||||
],
|
||||
roleTypeList: [
|
||||
{label: '行调', value: 'DISPATCHER'},
|
||||
{label: 'NCC行调', value: 'NCC_DISPATCHER'},
|
||||
{label: '行值', value: 'STATION_SUPERVISOR'},
|
||||
{label: '司机', value: 'DRIVER'},
|
||||
{label: '通号', value: 'MAINTAINER'},
|
||||
|
@ -81,6 +81,7 @@ export default {
|
||||
],
|
||||
typeList: [
|
||||
{label: '行调', value: 'DISPATCHER'},
|
||||
{label: 'NCC行调', value: 'NCC_DISPATCHER'},
|
||||
{label: '通号', value: 'MAINTAINER'},
|
||||
{label: '车站值班员', value: 'STATION_SUPERVISOR'},
|
||||
{label: '车站助理', value: 'STATION_ASSISTANT'},
|
||||
|
@ -96,6 +96,9 @@ export default {
|
||||
treeData: [{
|
||||
labelName: '行调',
|
||||
children: []
|
||||
}, {
|
||||
labelName: 'NCC行调',
|
||||
children: []
|
||||
}, {
|
||||
labelName: '车站值班员',
|
||||
children: []
|
||||
@ -174,6 +177,7 @@ export default {
|
||||
if (val && val.length) {
|
||||
this.memberData = this.$store.state.training.memberData;
|
||||
const dispatcherList = [];
|
||||
const nccDispatcherList = [];
|
||||
const electricDispatcherList = [];
|
||||
const depotDispatcherList = [];
|
||||
const stationSupervisorList = [];
|
||||
@ -197,6 +201,10 @@ export default {
|
||||
this.memberData[item.id].labelName = '行调' + (item.name || '');
|
||||
dispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'NCC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = 'NCC行调' + (item.name || '');
|
||||
nccDispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = '电力调度' + (item.name || '');
|
||||
electricDispatcherList.push(this.memberData[item.id]);
|
||||
@ -272,6 +280,10 @@ export default {
|
||||
labelName: '行调',
|
||||
id: 'dispatcher',
|
||||
children: dispatcherList
|
||||
}, {
|
||||
labelName: 'NCC行调',
|
||||
id: 'nccDispatcher',
|
||||
children: nccDispatcherList
|
||||
}, {
|
||||
labelName: '车站值班员',
|
||||
id: 'stationSupervisor',
|
||||
|
@ -92,6 +92,9 @@ export default {
|
||||
treeData: [{
|
||||
labelName: '行调',
|
||||
children: []
|
||||
}, {
|
||||
labelName: 'NCC行调',
|
||||
children: []
|
||||
}, {
|
||||
labelName: '车站值班员',
|
||||
children: []
|
||||
@ -221,6 +224,7 @@ export default {
|
||||
if (val && val.length) {
|
||||
// this.memberData = this.$store.state.training.memberData;
|
||||
const dispatcherList = [];
|
||||
const nccDispatcherList = [];
|
||||
const electricDispatcherList = [];
|
||||
const depotDispatcherList = [];
|
||||
const stationSupervisorList = [];
|
||||
@ -244,6 +248,10 @@ export default {
|
||||
this.memberData[item.id].labelName = '行调' + (item.name || '');
|
||||
dispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'NCC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = 'NCC行调' + (item.name || '');
|
||||
nccDispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = '电力调度' + (item.name || '');
|
||||
electricDispatcherList.push(this.memberData[item.id]);
|
||||
@ -317,8 +325,12 @@ export default {
|
||||
});
|
||||
this.treeData = [{
|
||||
labelName: '行调',
|
||||
id: 'dispatcher1',
|
||||
id: 'dispatcher',
|
||||
children: dispatcherList
|
||||
}, {
|
||||
labelName: 'NCC行调',
|
||||
id: 'nccDispatcher',
|
||||
children: nccDispatcherList
|
||||
}, {
|
||||
labelName: '车站值班员',
|
||||
id: 'stationSupervisor',
|
||||
|
@ -159,8 +159,6 @@
|
||||
<el-input-number v-model="batchForm.MAINTAINER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<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" />
|
||||
@ -171,104 +169,95 @@
|
||||
<el-input-number v-model="batchForm.DRIVER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'METRO'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<el-form-item label="设备管理员:" prop="DEVICE_MANAGER">
|
||||
<el-input-number v-model="batchForm.DEVICE_MANAGER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'METRO'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="工电调度:" prop="ELECTRIC_DISPATCHER">
|
||||
<el-input-number v-model="batchForm.ELECTRIC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="车务段段长:" prop="TRAIN_MASTER">
|
||||
<el-input-number v-model="batchForm.TRAIN_MASTER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'METRO'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="值班主任:" prop="SHIFT_MANAGER">
|
||||
<el-input-number v-model="batchForm.SHIFT_MANAGER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="环控调度" prop="ENVIRONMENT_DISPATCHER">
|
||||
<el-input-number v-model="batchForm.ENVIRONMENT_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<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-form-item>
|
||||
</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-form-item>
|
||||
<el-button type="primary" @click="batchCreate">批量创建</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</div></el-tab-pane>
|
||||
<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-item label="系统:" prop="systemType">
|
||||
@ -451,6 +440,7 @@ export default {
|
||||
},
|
||||
batchForm: {
|
||||
DISPATCHER: 0,
|
||||
NCC_DISPATCHER: 0,
|
||||
STATION_SUPERVISOR: 0,
|
||||
DRIVER: 0,
|
||||
MAINTAINER: 0,
|
||||
@ -545,7 +535,11 @@ export default {
|
||||
name += findType.label;
|
||||
}
|
||||
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 => {
|
||||
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 => {
|
||||
if (!station.depot) {
|
||||
if (this.batchForm.STATION_SUPERVISOR) {
|
||||
@ -850,6 +855,7 @@ export default {
|
||||
resetForm() {
|
||||
this.batchForm = {
|
||||
DISPATCHER: 0,
|
||||
NCC_DISPATCHER: 0,
|
||||
STATION_SUPERVISOR: 0,
|
||||
DRIVER: 0,
|
||||
MAINTAINER: 0,
|
||||
@ -905,6 +911,13 @@ export default {
|
||||
};
|
||||
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 => {
|
||||
if (!station.depot) {
|
||||
const member = {
|
||||
|
Loading…
Reference in New Issue
Block a user