Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
80007a7521
@ -80,7 +80,7 @@ export default {
|
|||||||
{label: 'NCC调度', value: 'NCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
{label: 'NCC调度', value: 'NCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: '信息调度', value: 'OCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
{label: '信息调度', value: 'OCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: '行调', value: 'DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
{label: '行调', value: 'DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: '行值', value: 'STATION_SUPERVISOR', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
{label: '行值', value: 'STATION_SUPERVISOR', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']}, // 大铁:车站值班员
|
||||||
{label: '司机', value: 'DRIVER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
{label: '司机', value: 'DRIVER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: '通号', value: 'MAINTAINER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
{label: '通号', value: 'MAINTAINER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', simTypeList: ['METRO']},
|
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', simTypeList: ['METRO']},
|
||||||
@ -94,7 +94,7 @@ export default {
|
|||||||
{label: '车站工务工', value: 'STATION_WORKER', simTypeList: ['RAILWAY']},
|
{label: '车站工务工', value: 'STATION_WORKER', simTypeList: ['RAILWAY']},
|
||||||
{label: '车务段段长', value: 'TRAIN_MASTER', simTypeList: ['METRO']},
|
{label: '车务段段长', value: 'TRAIN_MASTER', simTypeList: ['METRO']},
|
||||||
{label: '工电调度', value: 'ELECTRIC_DISPATCHER', simTypeList: ['METRO']},
|
{label: '工电调度', value: 'ELECTRIC_DISPATCHER', simTypeList: ['METRO']},
|
||||||
{label: '电力工务', value: 'STATION_ELECTRIC_WORKER', simTypeList: ['METRO']},
|
{label: '电力工务', value: 'STATION_ELECTRIC_WORKER', simTypeList: ['METRO', 'RAILWAY']}, // 大铁:车站电务
|
||||||
{label: '上级部分', value: 'PARENT_DEPARTMENT', simTypeList: ['METRO']},
|
{label: '上级部分', value: 'PARENT_DEPARTMENT', simTypeList: ['METRO']},
|
||||||
{label: '派班员', value: 'SCHEDULING', simTypeList: ['METRO']},
|
{label: '派班员', value: 'SCHEDULING', simTypeList: ['METRO']},
|
||||||
{label: '设备管理员', value: 'DEVICE_MANAGER', simTypeList: ['RAILWAY']},
|
{label: '设备管理员', value: 'DEVICE_MANAGER', simTypeList: ['RAILWAY']},
|
||||||
|
@ -144,17 +144,17 @@ class Handler {
|
|||||||
const stepInfo = store.state.trainingNew.stepInfo;
|
const stepInfo = store.state.trainingNew.stepInfo;
|
||||||
const operateOrder = store.state.trainingNew.operateOrder;
|
const operateOrder = store.state.trainingNew.operateOrder;
|
||||||
const operation = stepInfo.operations[operateOrder];
|
const operation = stepInfo.operations[operateOrder];
|
||||||
const operation1 = {
|
// const operation1 = {
|
||||||
userOperationType: UserOperationType.LEFTCLICK,
|
// userOperationType: UserOperationType.LEFTCLICK,
|
||||||
domId: OperationEvent.Conversation.Chat.sideButton.operation,
|
// domId: OperationEvent.Conversation.Chat.sideButton.operation,
|
||||||
params: { chatBoxMin: true }
|
// params: { chatBoxMin: true }
|
||||||
};
|
// };
|
||||||
const step1 = {
|
// const step1 = {
|
||||||
description: '点击打开聊天室',
|
// description: '点击打开聊天室',
|
||||||
memberId: stepInfo.memberId,
|
// memberId: stepInfo.memberId,
|
||||||
operations: [operation1],
|
// operations: [operation1],
|
||||||
tipPosition: { deviceCode: '', domId: operation1.domId, operateIndex: 0 }
|
// tipPosition: { deviceCode: '', domId: operation1.domId, operateIndex: 0 }
|
||||||
};
|
// };
|
||||||
const operation2 = {
|
const operation2 = {
|
||||||
userOperationType: UserOperationType.LEFTCLICK,
|
userOperationType: UserOperationType.LEFTCLICK,
|
||||||
domId: OperationEvent.Conversation.Chat.record.operation,
|
domId: OperationEvent.Conversation.Chat.record.operation,
|
||||||
@ -192,11 +192,11 @@ class Handler {
|
|||||||
operations: [operation3],
|
operations: [operation3],
|
||||||
tipPosition: { deviceCode: '', domId: operation3.domId, operateIndex: 0 }
|
tipPosition: { deviceCode: '', domId: operation3.domId, operateIndex: 0 }
|
||||||
};
|
};
|
||||||
if (store.state.training.chatBoxMin) {
|
// if (store.state.training.chatBoxMin) {
|
||||||
store.dispatch('trainingNew/setVoiceStepList', [step1, step2, step3]);
|
// store.dispatch('trainingNew/setVoiceStepList', [step1, step2, step3]);
|
||||||
} else {
|
// } else {
|
||||||
store.dispatch('trainingNew/setVoiceStepList', [step2, step3]);
|
// }
|
||||||
}
|
store.dispatch('trainingNew/setVoiceStepList', [step2, step3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default new Handler();
|
export default new Handler();
|
||||||
|
@ -99,6 +99,9 @@ export default {
|
|||||||
if (item.value == 'STATION_SUPERVISOR' && this.simType == 'RAILWAY') {
|
if (item.value == 'STATION_SUPERVISOR' && this.simType == 'RAILWAY') {
|
||||||
obj.label = '车站值班员';
|
obj.label = '车站值班员';
|
||||||
}
|
}
|
||||||
|
if (item.value == 'STATION_ELECTRIC_WORKER' && this.simType == 'RAILWAY') {
|
||||||
|
obj.label = '车站电务';
|
||||||
|
}
|
||||||
list.push(obj);
|
list.push(obj);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -207,7 +207,8 @@ export default {
|
|||||||
const environmentDispatherList = [];
|
const environmentDispatherList = [];
|
||||||
const parentDepartmentList = [];
|
const parentDepartmentList = [];
|
||||||
const schedulingList = [];
|
const schedulingList = [];
|
||||||
const t = this.simType == 'METRO' ? '行值-' : '值班员-';
|
const ss = this.simType == 'RAILWAY' ? '车站值班员' : '行值';
|
||||||
|
const sew = this.simType == 'RAILWAY' ? '车站电务' : '电力工务';
|
||||||
val.forEach(item => {
|
val.forEach(item => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
@ -236,7 +237,7 @@ export default {
|
|||||||
signalBuildingList.push(this.memberData[item.id]);
|
signalBuildingList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
case 'STATION_SUPERVISOR':
|
case 'STATION_SUPERVISOR':
|
||||||
this.memberData[item.id].labelName = t + device.name + (item.name ? `-${item.name }` : '');
|
this.memberData[item.id].labelName = ss + '-' + device.name + (item.name ? `-${item.name }` : '');
|
||||||
stationSupervisorList.push(this.memberData[item.id]);
|
stationSupervisorList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
case 'DRIVER':
|
case 'DRIVER':
|
||||||
@ -304,7 +305,7 @@ export default {
|
|||||||
schedulingList.push(this.memberData[item.id]);
|
schedulingList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
case 'STATION_ELECTRIC_WORKER':
|
case 'STATION_ELECTRIC_WORKER':
|
||||||
this.memberData[item.id].labelName = '电力工务' + (item.name || '');
|
this.memberData[item.id].labelName = sew + '-' + device.name + (item.name ? `-${item.name }` : '');
|
||||||
stationElectricWorkerList.push(this.memberData[item.id]);
|
stationElectricWorkerList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -325,7 +326,7 @@ export default {
|
|||||||
memberType: 'DISPATCHER',
|
memberType: 'DISPATCHER',
|
||||||
children: dispatcherList
|
children: dispatcherList
|
||||||
}, {
|
}, {
|
||||||
labelName: this.simType == 'METRO' ? '行值' : '车站值班员',
|
labelName: ss,
|
||||||
id: 'stationSupervisor',
|
id: 'stationSupervisor',
|
||||||
memberType: 'STATION_SUPERVISOR',
|
memberType: 'STATION_SUPERVISOR',
|
||||||
children: stationSupervisorList
|
children: stationSupervisorList
|
||||||
@ -426,7 +427,7 @@ export default {
|
|||||||
children: environmentDispatherList
|
children: environmentDispatherList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelName: '电力工务 ',
|
labelName: sew,
|
||||||
id: 'stationElectricWorker',
|
id: 'stationElectricWorker',
|
||||||
memberType: 'STATION_ELECTRIC_WORKER',
|
memberType: 'STATION_ELECTRIC_WORKER',
|
||||||
children: stationElectricWorkerList
|
children: stationElectricWorkerList
|
||||||
|
@ -97,8 +97,11 @@ export default {
|
|||||||
sendTextId() {
|
sendTextId() {
|
||||||
return OperationEvent.Conversation.Chat.menu.domId;
|
return OperationEvent.Conversation.Chat.menu.domId;
|
||||||
},
|
},
|
||||||
|
chatBoxMin() {
|
||||||
|
return this.$store.state.training.chatBoxMin;
|
||||||
|
},
|
||||||
recordVoice() {
|
recordVoice() {
|
||||||
return OperationEvent.Conversation.Chat.record.domId;
|
return this.chatBoxMin ? '' : OperationEvent.Conversation.Chat.record.domId;
|
||||||
},
|
},
|
||||||
sideButtonDom() {
|
sideButtonDom() {
|
||||||
return OperationEvent.Conversation.Chat.sideButton;
|
return OperationEvent.Conversation.Chat.sideButton;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import {UserOperationType} from '@/scripts/ConstDic';
|
// import {UserOperationType} from '@/scripts/ConstDic';
|
||||||
import chatDialog from './chatDialog';
|
import chatDialog from './chatDialog';
|
||||||
export default {
|
export default {
|
||||||
name: 'ChatBox',
|
name: 'ChatBox',
|
||||||
@ -32,6 +32,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
chatBoxMin() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
@ -40,18 +45,18 @@ export default {
|
|||||||
this.totalUnreadNum = val;
|
this.totalUnreadNum = val;
|
||||||
},
|
},
|
||||||
clickBtn() {
|
clickBtn() {
|
||||||
const operate = {
|
// const operate = {
|
||||||
operation: this.sideButtonDom.operation,
|
// operation: this.sideButtonDom.operation,
|
||||||
param: { chatBoxMin: this.chatBoxMin },
|
// param: { chatBoxMin: this.chatBoxMin },
|
||||||
userOperationType: UserOperationType.LEFTCLICK
|
// userOperationType: UserOperationType.LEFTCLICK
|
||||||
};
|
// };
|
||||||
this.$store.dispatch('training/setChatBoxMin', false);
|
this.$store.dispatch('training/setChatBoxMin', false);
|
||||||
this.$refs.chatDialog.dialogVisible = true;
|
this.$refs.chatDialog.dialogVisible = true;
|
||||||
if (this.$store.state.trainingNew.trainingSwitch) {
|
// if (this.$store.state.trainingNew.trainingSwitch) {
|
||||||
this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
this.$store.dispatch('trainingNew/next', operate);
|
// this.$store.dispatch('trainingNew/next', operate);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -121,6 +121,8 @@ export default {
|
|||||||
this.position = position;
|
this.position = position;
|
||||||
this.position.y -= distance;
|
this.position.y -= distance;
|
||||||
this.popTipShow();
|
this.popTipShow();
|
||||||
|
} else {
|
||||||
|
this.popTipHide();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.popTipHide();
|
this.popTipHide();
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1">
|
<el-col :span="5" :offset="1">
|
||||||
<el-select v-model="item.type" placeholder="请选择" size="mini">
|
<el-select v-model="item.type" placeholder="请选择" size="mini">
|
||||||
<el-option v-for="elem in roleList" :key="elem.value" :label="elem.label" :value="elem.value" />
|
<el-option v-for="elem in getRoleList('METRO')" :key="elem.value" :label="elem.label" :value="elem.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1">
|
<el-col :span="5" :offset="1">
|
||||||
@ -48,7 +48,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1">
|
<el-col :span="5" :offset="1">
|
||||||
<el-select v-model="item.type" placeholder="请选择" size="mini">
|
<el-select v-model="item.type" placeholder="请选择" size="mini">
|
||||||
<el-option v-for="elem in roleList" :key="elem.value" :label="elem.label" :value="elem.value" />
|
<el-option v-for="elem in getRoleList('RAILWAY')" :key="elem.value" :label="elem.label" :value="elem.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1">
|
<el-col :span="5" :offset="1">
|
||||||
@ -83,7 +83,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1">
|
<el-col :span="5" :offset="1">
|
||||||
<el-select v-model="item.type" placeholder="请选择" size="mini">
|
<el-select v-model="item.type" placeholder="请选择" size="mini">
|
||||||
<el-option v-for="elem in roleList" :key="elem.value" :label="elem.label" :value="elem.value" />
|
<el-option v-for="elem in getRoleList('EMERGENCY')" :key="elem.value" :label="elem.label" :value="elem.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1">
|
<el-col :span="5" :offset="1">
|
||||||
@ -111,7 +111,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="成员类型:" prop="type">
|
<el-form-item label="成员类型:" prop="type">
|
||||||
<el-select v-model="createForm.type" placeholder="请选择">
|
<el-select v-model="createForm.type" placeholder="请选择">
|
||||||
<el-option v-for="item in roleList" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in getRoleList(createForm.systemType)" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联设备:" prop="deviceCode">
|
<el-form-item label="关联设备:" prop="deviceCode">
|
||||||
@ -160,7 +160,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="行值:" prop="STATION_SUPERVISOR">
|
<el-form-item :label="batchForm.systemType == 'RAILWAY' ?'车站值班员:':'行值:'" 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" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -239,8 +239,8 @@
|
|||||||
<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 v-if="batchForm.systemType === 'METRO'" :span="12">
|
<el-col v-if="batchForm.systemType === 'METRO' || batchForm.systemType === 'RAILWAY'" :span="12">
|
||||||
<el-form-item label="电力工务" prop="STATION_ELECTRIC_WORKER">
|
<el-form-item :label="batchForm.systemType == 'RAILWAY' ?'车站电务:':'电力工务:'" 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>
|
||||||
@ -320,13 +320,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberMetroList)">
|
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberMetroList, 'METRO')">
|
||||||
<el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
|
<el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem, 'METRO')" :value="elem.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberMetroList)">
|
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberMetroList, 'METRO')">
|
||||||
<el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
|
<el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem, 'METRO')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" style="text-align: center;">
|
<el-col :span="3" style="text-align: center;">
|
||||||
@ -356,13 +356,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberRailwayList)">
|
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberRailwayList, 'RAILWAY')">
|
||||||
<el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
|
<el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem, 'RAILWAY')" :value="elem.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberRailwayList)">
|
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberRailwayList, 'RAILWAY')">
|
||||||
<el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
|
<el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem, 'RAILWAY')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" style="text-align: center;">
|
<el-col :span="3" style="text-align: center;">
|
||||||
@ -392,13 +392,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberEmergencyList)">
|
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberEmergencyList, 'EMERGENCY')">
|
||||||
<el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
|
<el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem, 'EMERGENCY')" :value="elem.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberEmergencyList)">
|
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberEmergencyList, 'EMERGENCY')">
|
||||||
<el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
|
<el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem, 'EMERGENCY')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" style="text-align: center;">
|
<el-col :span="3" style="text-align: center;">
|
||||||
@ -426,18 +426,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="群主:" prop="leaderId">
|
<el-form-item label="群主:" prop="leaderId">
|
||||||
<el-select v-model="conversationForm.leaderId" placeholder="请选择" style="width: 200px;" :title="getMemberTitle(conversationForm.leaderId, getFormMemberList)">
|
<el-select v-model="conversationForm.leaderId" placeholder="请选择" style="width: 200px;" :title="getMemberTitle(conversationForm.leaderId, getFormMemberList, conversationForm.systemType)">
|
||||||
<el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
|
<el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem, conversationForm.systemType)" :value="elem.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="群成员:" prop="memberIds">
|
<el-form-item label="群成员:" prop="memberIds">
|
||||||
<el-select v-model="conversationForm.memberIds" :class="{disabledClear: conversationForm.memberIds.length ==1}" style="width: 200px;" multiple collapse-tags placeholder="请选择" :title="getMemberTitle(conversationForm.memberIds, getFormMemberList)">
|
<el-select v-model="conversationForm.memberIds" :class="{disabledClear: conversationForm.memberIds.length ==1}" style="width: 200px;" multiple collapse-tags placeholder="请选择" :title="getMemberTitle(conversationForm.memberIds, getFormMemberList, conversationForm.systemType)">
|
||||||
<el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="conversationForm.memberIds.length ==1 && conversationForm.memberIds.includes(elem.id)" />
|
<el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem, conversationForm.systemType)" :value="elem.id" :disabled="conversationForm.memberIds.length ==1 && conversationForm.memberIds.includes(elem.id)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="createConversation">确定</el-button>
|
<el-button type="primary" @click="createConversation">确定</el-button>
|
||||||
<el-button @click="resetConversationForm">重置</el-button>
|
<el-button @click="resetConversationForm()">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -505,7 +505,7 @@ export default {
|
|||||||
},
|
},
|
||||||
disStationList: [],
|
disStationList: [],
|
||||||
stationShow: ['STATION_SUPERVISOR', 'DEPOT_DISPATCHER', 'SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
|
stationShow: ['STATION_SUPERVISOR', 'DEPOT_DISPATCHER', 'SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
|
||||||
'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'],
|
'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'STATION_WORKER', 'STATION_ELECTRIC_WORKER'],
|
||||||
conversationForm: {
|
conversationForm: {
|
||||||
systemType: 'METRO',
|
systemType: 'METRO',
|
||||||
id: '',
|
id: '',
|
||||||
@ -564,10 +564,27 @@ export default {
|
|||||||
this.initDisStationList();
|
this.initDisStationList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
resetConversationForm() {
|
getRoleList(type) {
|
||||||
this.$refs.conversationForm.resetFields();
|
const list = JSON.parse(JSON.stringify(ConstConfig.ConstSelect.roleTypeList));
|
||||||
|
if (type == 'RAILWAY') {
|
||||||
|
list.forEach(item => {
|
||||||
|
if (item.value == 'STATION_SUPERVISOR') {
|
||||||
|
item.label = '车站值班员';
|
||||||
|
}
|
||||||
|
if (item.value == 'STATION_ELECTRIC_WORKER') {
|
||||||
|
item.label = '车站电务';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return list;
|
||||||
},
|
},
|
||||||
getMemberTitle(val, list) {
|
resetConversationForm(val) {
|
||||||
|
this.$refs.conversationForm.resetFields();
|
||||||
|
if (val) {
|
||||||
|
this.conversationForm.systemType = val;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getMemberTitle(val, list, type) {
|
||||||
const mapList = {};
|
const mapList = {};
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
mapList[item.id] = item;
|
mapList[item.id] = item;
|
||||||
@ -581,7 +598,7 @@ export default {
|
|||||||
}
|
}
|
||||||
valArr.forEach(id => {
|
valArr.forEach(id => {
|
||||||
if (mapList[id]) {
|
if (mapList[id]) {
|
||||||
titleArr.push(this.getLabel(mapList[id]));
|
titleArr.push(this.getLabel(mapList[id], type));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return titleArr.join('\n');
|
return titleArr.join('\n');
|
||||||
@ -589,9 +606,9 @@ export default {
|
|||||||
getImgUrl(url) {
|
getImgUrl(url) {
|
||||||
return url ? this.$store.state.user.ossUrl + '/conversationGroup/' + url : '';
|
return url ? this.$store.state.user.ossUrl + '/conversationGroup/' + url : '';
|
||||||
},
|
},
|
||||||
getLabel(obj) {
|
getLabel(obj, type) {
|
||||||
let name = '';
|
let name = '';
|
||||||
const findType = this.roleList.find(item => {
|
const findType = this.getRoleList(type).find(item => {
|
||||||
return item.value == obj.type;
|
return item.value == obj.type;
|
||||||
});
|
});
|
||||||
if (findType) {
|
if (findType) {
|
||||||
@ -819,7 +836,7 @@ export default {
|
|||||||
};
|
};
|
||||||
memberMap[this.batchForm.systemType].push(member);
|
memberMap[this.batchForm.systemType].push(member);
|
||||||
}
|
}
|
||||||
if (this.batchForm.STATION_ELECTRIC_WORKER && this.batchForm.systemType === 'RAILWAY') {
|
if (this.batchForm.STATION_ELECTRIC_WORKER && (this.batchForm.systemType === 'RAILWAY' || this.batchForm.systemType === 'METRO')) {
|
||||||
const member = {
|
const member = {
|
||||||
id: this.getMemberId(this.batchForm.systemType),
|
id: this.getMemberId(this.batchForm.systemType),
|
||||||
name: '',
|
name: '',
|
||||||
@ -1118,6 +1135,14 @@ export default {
|
|||||||
deviceCode: station.code
|
deviceCode: station.code
|
||||||
};
|
};
|
||||||
memberMap[this.generationForm.systemType].push(memberSignalBuilDing);
|
memberMap[this.generationForm.systemType].push(memberSignalBuilDing);
|
||||||
|
} else {
|
||||||
|
const memberStationElectricWorker = {
|
||||||
|
id: this.getMemberId(this.generationForm.systemType),
|
||||||
|
name: '',
|
||||||
|
type: 'STATION_ELECTRIC_WORKER',
|
||||||
|
deviceCode: station.code
|
||||||
|
};
|
||||||
|
memberMap[this.generationForm.systemType].push(memberStationElectricWorker);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const memberTrainMaster = {
|
const memberTrainMaster = {
|
||||||
|
Loading…
Reference in New Issue
Block a user