This commit is contained in:
fan 2023-05-29 16:28:14 +08:00
commit 80007a7521
8 changed files with 106 additions and 67 deletions

View File

@ -80,7 +80,7 @@ export default {
{label: 'NCC调度', value: 'NCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
{label: '信息调度', value: 'OCC_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: 'MAINTAINER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', simTypeList: ['METRO']},
@ -94,7 +94,7 @@ export default {
{label: '车站工务工', value: 'STATION_WORKER', simTypeList: ['RAILWAY']},
{label: '车务段段长', value: 'TRAIN_MASTER', 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: 'SCHEDULING', simTypeList: ['METRO']},
{label: '设备管理员', value: 'DEVICE_MANAGER', simTypeList: ['RAILWAY']},

View File

@ -144,17 +144,17 @@ class Handler {
const stepInfo = store.state.trainingNew.stepInfo;
const operateOrder = store.state.trainingNew.operateOrder;
const operation = stepInfo.operations[operateOrder];
const operation1 = {
userOperationType: UserOperationType.LEFTCLICK,
domId: OperationEvent.Conversation.Chat.sideButton.operation,
params: { chatBoxMin: true }
};
const step1 = {
description: '点击打开聊天室',
memberId: stepInfo.memberId,
operations: [operation1],
tipPosition: { deviceCode: '', domId: operation1.domId, operateIndex: 0 }
};
// const operation1 = {
// userOperationType: UserOperationType.LEFTCLICK,
// domId: OperationEvent.Conversation.Chat.sideButton.operation,
// params: { chatBoxMin: true }
// };
// const step1 = {
// description: '点击打开聊天室',
// memberId: stepInfo.memberId,
// operations: [operation1],
// tipPosition: { deviceCode: '', domId: operation1.domId, operateIndex: 0 }
// };
const operation2 = {
userOperationType: UserOperationType.LEFTCLICK,
domId: OperationEvent.Conversation.Chat.record.operation,
@ -192,11 +192,11 @@ class Handler {
operations: [operation3],
tipPosition: { deviceCode: '', domId: operation3.domId, operateIndex: 0 }
};
if (store.state.training.chatBoxMin) {
store.dispatch('trainingNew/setVoiceStepList', [step1, step2, step3]);
} else {
// if (store.state.training.chatBoxMin) {
// store.dispatch('trainingNew/setVoiceStepList', [step1, step2, step3]);
// } else {
// }
store.dispatch('trainingNew/setVoiceStepList', [step2, step3]);
}
}
}
export default new Handler();

View File

@ -99,6 +99,9 @@ export default {
if (item.value == 'STATION_SUPERVISOR' && this.simType == 'RAILWAY') {
obj.label = '车站值班员';
}
if (item.value == 'STATION_ELECTRIC_WORKER' && this.simType == 'RAILWAY') {
obj.label = '车站电务';
}
list.push(obj);
}
});

View File

@ -207,7 +207,8 @@ export default {
const environmentDispatherList = [];
const parentDepartmentList = [];
const schedulingList = [];
const t = this.simType == 'METRO' ? '行值-' : '值班员-';
const ss = this.simType == 'RAILWAY' ? '车站值班员' : '行值';
const sew = this.simType == 'RAILWAY' ? '车站电务' : '电力工务';
val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
switch (item.type) {
@ -236,7 +237,7 @@ export default {
signalBuildingList.push(this.memberData[item.id]);
break;
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]);
break;
case 'DRIVER':
@ -304,7 +305,7 @@ export default {
schedulingList.push(this.memberData[item.id]);
break;
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]);
break;
}
@ -325,7 +326,7 @@ export default {
memberType: 'DISPATCHER',
children: dispatcherList
}, {
labelName: this.simType == 'METRO' ? '行值' : '车站值班员',
labelName: ss,
id: 'stationSupervisor',
memberType: 'STATION_SUPERVISOR',
children: stationSupervisorList
@ -426,7 +427,7 @@ export default {
children: environmentDispatherList
},
{
labelName: '电力工务 ',
labelName: sew,
id: 'stationElectricWorker',
memberType: 'STATION_ELECTRIC_WORKER',
children: stationElectricWorkerList

View File

@ -97,8 +97,11 @@ export default {
sendTextId() {
return OperationEvent.Conversation.Chat.menu.domId;
},
chatBoxMin() {
return this.$store.state.training.chatBoxMin;
},
recordVoice() {
return OperationEvent.Conversation.Chat.record.domId;
return this.chatBoxMin ? '' : OperationEvent.Conversation.Chat.record.domId;
},
sideButtonDom() {
return OperationEvent.Conversation.Chat.sideButton;

View File

@ -11,7 +11,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {UserOperationType} from '@/scripts/ConstDic';
// import {UserOperationType} from '@/scripts/ConstDic';
import chatDialog from './chatDialog';
export default {
name: 'ChatBox',
@ -32,6 +32,11 @@ export default {
}
},
watch: {
chatBoxMin() {
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
}
},
mounted() {
},
@ -40,18 +45,18 @@ export default {
this.totalUnreadNum = val;
},
clickBtn() {
const operate = {
operation: this.sideButtonDom.operation,
param: { chatBoxMin: this.chatBoxMin },
userOperationType: UserOperationType.LEFTCLICK
};
// const operate = {
// operation: this.sideButtonDom.operation,
// param: { chatBoxMin: this.chatBoxMin },
// userOperationType: UserOperationType.LEFTCLICK
// };
this.$store.dispatch('training/setChatBoxMin', false);
this.$refs.chatDialog.dialogVisible = true;
if (this.$store.state.trainingNew.trainingSwitch) {
this.$nextTick(() => {
this.$store.dispatch('trainingNew/next', operate);
});
}
// if (this.$store.state.trainingNew.trainingSwitch) {
// this.$nextTick(() => {
// this.$store.dispatch('trainingNew/next', operate);
// });
// }
}
}
};

View File

@ -121,6 +121,8 @@ export default {
this.position = position;
this.position.y -= distance;
this.popTipShow();
} else {
this.popTipHide();
}
} else {
this.popTipHide();

View File

@ -16,7 +16,7 @@
</el-col>
<el-col :span="5" :offset="1">
<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-col>
<el-col :span="5" :offset="1">
@ -48,7 +48,7 @@
</el-col>
<el-col :span="5" :offset="1">
<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-col>
<el-col :span="5" :offset="1">
@ -83,7 +83,7 @@
</el-col>
<el-col :span="5" :offset="1">
<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-col>
<el-col :span="5" :offset="1">
@ -111,7 +111,7 @@
</el-form-item>
<el-form-item label="成员类型:" prop="type">
<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-form-item>
<el-form-item label="关联设备:" prop="deviceCode">
@ -160,7 +160,7 @@
</el-form-item>
</el-col>
<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-form-item>
</el-col>
@ -239,8 +239,8 @@
<el-input-number v-model="batchForm.ENVIRONMENT_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item>
</el-col>
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
<el-form-item label="电力工务" prop="STATION_ELECTRIC_WORKER">
<el-col v-if="batchForm.systemType === 'METRO' || batchForm.systemType === 'RAILWAY'" :span="12">
<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-form-item>
</el-col>
@ -320,13 +320,13 @@
</div>
</el-col>
<el-col :span="5">
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberMetroList)">
<el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<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, 'METRO')" :value="elem.id" />
</el-select>
</el-col>
<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-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-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, 'METRO')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select>
</el-col>
<el-col :span="3" style="text-align: center;">
@ -356,13 +356,13 @@
</div>
</el-col>
<el-col :span="5">
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberRailwayList)">
<el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<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, 'RAILWAY')" :value="elem.id" />
</el-select>
</el-col>
<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-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-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, 'RAILWAY')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select>
</el-col>
<el-col :span="3" style="text-align: center;">
@ -392,13 +392,13 @@
</div>
</el-col>
<el-col :span="5">
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberEmergencyList)">
<el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<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, 'EMERGENCY')" :value="elem.id" />
</el-select>
</el-col>
<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-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-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, 'EMERGENCY')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select>
</el-col>
<el-col :span="3" style="text-align: center;">
@ -426,18 +426,18 @@
</div>
</el-form-item>
<el-form-item label="群主:" prop="leaderId">
<el-select v-model="conversationForm.leaderId" placeholder="请选择" style="width: 200px;" :title="getMemberTitle(conversationForm.leaderId, getFormMemberList)">
<el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<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, conversationForm.systemType)" :value="elem.id" />
</el-select>
</el-form-item>
<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-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-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, conversationForm.systemType)" :value="elem.id" :disabled="conversationForm.memberIds.length ==1 && conversationForm.memberIds.includes(elem.id)" />
</el-select>
</el-form-item>
<el-form-item>
<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>
</div>
@ -505,7 +505,7 @@ export default {
},
disStationList: [],
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: {
systemType: 'METRO',
id: '',
@ -564,10 +564,27 @@ export default {
this.initDisStationList();
},
methods: {
resetConversationForm() {
this.$refs.conversationForm.resetFields();
getRoleList(type) {
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 = {};
list.forEach(item => {
mapList[item.id] = item;
@ -581,7 +598,7 @@ export default {
}
valArr.forEach(id => {
if (mapList[id]) {
titleArr.push(this.getLabel(mapList[id]));
titleArr.push(this.getLabel(mapList[id], type));
}
});
return titleArr.join('\n');
@ -589,9 +606,9 @@ export default {
getImgUrl(url) {
return url ? this.$store.state.user.ossUrl + '/conversationGroup/' + url : '';
},
getLabel(obj) {
getLabel(obj, type) {
let name = '';
const findType = this.roleList.find(item => {
const findType = this.getRoleList(type).find(item => {
return item.value == obj.type;
});
if (findType) {
@ -819,7 +836,7 @@ export default {
};
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 = {
id: this.getMemberId(this.batchForm.systemType),
name: '',
@ -1118,6 +1135,14 @@ export default {
deviceCode: station.code
};
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 = {