Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2023-11-30 17:54:51 +08:00
commit c33c50005c
40 changed files with 336 additions and 70 deletions

View File

@ -4,3 +4,6 @@ English | [简体中文](./README-zh.md)
Copyright (c) 2018-present Joylink
### 项目环境
- "node": "<=14.21.3";
- "webpack": ">=4 < 4.29";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -396,7 +396,7 @@ export function JobPaneData() {
],
},
{
name:"调度",
name:"电调度",
value:"dldd",
text:"负责供电系统的正常运行。",
picurl:"",

View File

@ -425,6 +425,10 @@ export default class Train extends Group {
// 西安二号线 列车停车状态 闪烁红色
this.updateTrainBodyFault(model.orderStop);
}
if (!model.groundCommunicable) {
this.trainL && this.trainL.setColor('#f00');
this.trainR && this.trainR.setColor('#f00');
}
}
}
setTrainTypeColor(type) {

View File

@ -48,7 +48,8 @@ export default class EMouse extends Group {
e.target._subType == 'Text') {
this.text.hide();
} else {
this.device.control.setControlColor(this.device.style.ZcControl.lamp.controlColor);
// this.device.control.setControlColor(this.device.style.ZcControl.lamp.controlColor);
this.device.setState(this.device.model)
this.device.control.setTextColor('#FFFFFF');
this.device.control.setTextBorder(false);
this.device.control.setArcBorder(false);

View File

@ -73,7 +73,6 @@ export default class ZcControl extends Group {
// 设置状态
setState(model) {
this.recover();
// 只响应前端自定义类型的状态变化
if (model._free) {
this.setAshShow();

View File

@ -13,6 +13,7 @@ import SetTrainOperation from '@/jmapNew/theme/components/menus/dialog/setTrainO
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { DeviceMenu } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'MenuTrain',
components: {
@ -87,6 +88,31 @@ export default {
{
label: '回库',
handler: this.setInbound
},
{
label: '受电弓操作',
children: [
{
label: '受电弓1升',
handler: this.pantogrphOneUp,
cmdType: CMD.Driver.CMD_SPECIAL_PANTOGRAPH_UP_DOWN
},
{
label: '受电弓1降',
handler: this.pantogrphOneDown,
cmdType: CMD.Driver.CMD_SPECIAL_PANTOGRAPH_UP_DOWN
},
{
label: '受电弓2升',
handler: this.pantogrphTwoUp,
cmdType: CMD.Driver.CMD_SPECIAL_PANTOGRAPH_UP_DOWN
},
{
label: '受电弓2降',
handler: this.pantogrphTwoDown,
cmdType: CMD.Driver.CMD_SPECIAL_PANTOGRAPH_UP_DOWN
}
]
}
]
};
@ -211,6 +237,34 @@ export default {
this.$refs.popMenu.close();
// this.$store.dispatch('map/setTrainWindowShow', false);
}
},
pantogrphOneUp() {
commitOperate(menuOperate.Driver.specialPantographUpDown, { index: 1, up: true, groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
pantogrphOneDown() {
commitOperate(menuOperate.Driver.specialPantographUpDown, { index: 1, up: false, groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
pantogrphTwoUp() {
commitOperate(menuOperate.Driver.specialPantographUpDown, { index: 2, up: true, groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
pantogrphTwoDown() {
commitOperate(menuOperate.Driver.specialPantographUpDown, { index: 2, up: false, groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
}
};

View File

@ -1,20 +1,35 @@
import store from '@/store/index';
import store from "@/store/index";
/**
* 判断菜单行值控制全
* @param {String} stationCode 所属车站code
* @param {String} centralStationCode 所属集中站code
* @param {String} work 当前客户端
* */
export function judgeStationControl(stationCode, centralStationCode, work) {
const centralStation = store.getters['map/getDeviceByCode'](centralStationCode);
// 角色车站是 设备所属车站或所属集中站
if (work === 'localWork') {
const flag1 = store.state.training.roleDeviceCode === stationCode || store.state.training.roleDeviceCode === centralStationCode;
const flag2 = centralStation.controlMode === 'Local' || centralStation.controlMode === 'Emergency';
return flag1 && flag2;
} else if ( work === 'dispatchWork' ) {
return centralStation.controlMode === 'Center';
} else {
return true;
}
export function judgeStationControl(
stationCode,
centralStationCode,
work,
isAvailableInOtherControlMode
) {
const centralStation = store.getters["map/getDeviceByCode"](
centralStationCode
);
const isCenterMode = centralStation.controlMode === "Center";
const isLocalMode =
centralStation.controlMode === "Local" ||
centralStation.controlMode === "Emergency";
// 角色车站是 设备所属车站或所属集中站
if (work === "localWork") {
const isBelongingStation =
store.state.training.roleDeviceCode === stationCode ||
store.state.training.roleDeviceCode === centralStationCode;
return (
((isCenterMode && isAvailableInOtherControlMode) || isLocalMode) &&
isBelongingStation
);
} else if (work === "dispatchWork") {
return isCenterMode || (isLocalMode && isAvailableInOtherControlMode);
} else {
return true;
}
}

View File

@ -631,6 +631,10 @@ export const menuOperate = {
takeOver: {
operation: OperationEvent.Driver.takeOver.menu.operation,
cmdType: CMD.Driver.CMD_DRIVER_TAKEOVER
},
specialPantographUpDown: {
operation: OperationEvent.Driver.pantograph.menu.operation,
cmdType: CMD.Driver.CMD_SPECIAL_PANTOGRAPH_UP_DOWN
}
},
CTC: {

View File

@ -132,7 +132,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
}

View File

@ -220,7 +220,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
}

View File

@ -117,7 +117,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
},

View File

@ -137,7 +137,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
},

View File

@ -212,7 +212,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
},

View File

@ -156,7 +156,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
} else {

View File

@ -285,7 +285,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
}

View File

@ -142,7 +142,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
},

View File

@ -140,7 +140,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
} else {

View File

@ -142,7 +142,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
},

View File

@ -149,7 +149,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
},

View File

@ -169,7 +169,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
},

View File

@ -106,7 +106,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
},

View File

@ -137,7 +137,9 @@ export default {
}
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
},

View File

@ -152,7 +152,9 @@ export default {
this.doClose();
}).catch(() => {
this.loading = false;
this.doClose();
if (!this.$store.state.trainingNew.trainingSwitch) {
this.doClose();
}
this.$refs.noticeInfo.doShow();
});
},

View File

@ -147,7 +147,7 @@ export default {
updateTableValue(controlTransfer) {
this.concertrateStationList.forEach((row, index) => {
if (row.code == controlTransfer.code) {
if (controlTransfer.applicantId) {
if (controlTransfer.applicantId && this.$store.state.training.roles !== 'DISPATCHER') {
this.disabledCommit = true;
} else {
this.disabledCommit = false;

View File

@ -64,14 +64,16 @@ export default {
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
isShow: (signal, work) => true,
isAvailableInOtherControlMode: true
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
isShow: (signal, work) => true,
isAvailableInOtherControlMode: true
},
{
label: '信号重开',
@ -127,14 +129,16 @@ export default {
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
isShow: (signal, work) => true,
isAvailableInOtherControlMode: true
},
{
label: '进路自排开',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
isShow: (signal, work) => true,
isAvailableInOtherControlMode: true
},
{
label: '设置通过模式',
@ -206,7 +210,7 @@ export default {
initMenu() {
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = !judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work) || menuItem.isDisabled(this.selected, this.work);
menuItem.disabled = !judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work, menuItem.isAvailableInOtherControlMode) || menuItem.isDisabled(this.selected, this.work);
menuItem.show = menuItem.isShow(this.selected, this.work);
this.menu.push(menuItem);
});

View File

@ -70,7 +70,7 @@ export default {
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => stand.stationHoldTrain === 1,
isDisabled: (stand, work) => stand.stationHoldTrain !== 1,
isShow: (stand, work) => work === 'localWork'
},
{
@ -84,7 +84,7 @@ export default {
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => stand.centerHoldTrain === 1,
isDisabled: (stand, work) => stand.centerHoldTrain !== 1,
isShow: (stand, work) => work === 'dispatchWork'
},
{

View File

@ -226,6 +226,31 @@ export default {
handler: this.handlerApplyRmMode
}
]
},
{
label: '受电弓操作',
children: [
{
label: '受电弓1升',
handler: this.pantogrphOneUp,
cmdType: CMD.Driver.CMD_SPECIAL_PANTOGRAPH_UP_DOWN
},
{
label: '受电弓1降',
handler: this.pantogrphOneDown,
cmdType: CMD.Driver.CMD_SPECIAL_PANTOGRAPH_UP_DOWN
},
{
label: '受电弓2升',
handler: this.pantogrphTwoUp,
cmdType: CMD.Driver.CMD_SPECIAL_PANTOGRAPH_UP_DOWN
},
{
label: '受电弓2降',
handler: this.pantogrphTwoDown,
cmdType: CMD.Driver.CMD_SPECIAL_PANTOGRAPH_UP_DOWN
}
]
}
],
menuSpeed: [
@ -586,6 +611,34 @@ export default {
this.$refs.trainSetWorkATP.doShow(operate, this.selected);
}
});
},
pantogrphOneUp() {
commitOperate(menuOperate.Driver.specialPantographUpDown, { index: 1, up: true, groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
pantogrphOneDown() {
commitOperate(menuOperate.Driver.specialPantographUpDown, { index: 1, up: false, groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
pantogrphTwoUp() {
commitOperate(menuOperate.Driver.specialPantographUpDown, { index: 2, up: true, groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
pantogrphTwoDown() {
commitOperate(menuOperate.Driver.specialPantographUpDown, { index: 2, up: false, groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
}
};

View File

@ -61,7 +61,7 @@ export default {
{ label: '司机', value: 'DRIVER', enLabel: 'Driver ' },
{ label: '通号', value: 'MAINTAINER', enLabel: 'Repairman ' },
{ label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher ' },
{ label: '调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher' },
{ label: '电调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher' },
{ label: '电力工务', value: 'STATION_ELECTRIC_WORKER', enLabel: 'Station electric worker' },
{ label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher ' },
{ label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department' },

View File

@ -104,7 +104,8 @@ export default {
CMD_INBOUND: {value: 'Inbound', label: '回库'},
CMD_CHANGE_PRESELECTION_MODE: {value: 'Change_Preselection_Mode', label: '修改预选模式'},
CMD_APPLY_NRM: {value: 'Apply_NRM', label: '转NRM模式'},
CMD_DRIVER_TAKEOVER: {value: 'Driver_TakeOver', label: '接管开关'}
CMD_DRIVER_TAKEOVER: {value: 'Driver_TakeOver', label: '接管开关'},
CMD_SPECIAL_PANTOGRAPH_UP_DOWN: { value: 'Special_Pantograph_Up_Down', label: '受电弓升降' }
// CMD_DEPART_TRAIN: {value: 'Depart_Train', label: '发车'},
// CMD_PARKING_TRAIN : {value: 'Parking_Train', label: '停车'}
},

View File

@ -5149,6 +5149,12 @@ export const OperationEvent = {
operation: '130e',
domId: '_Tips-Driver-takeOver'
}
},
pantograph: {
menu: {
operation: '130f',
domId: '_Tips-Driver-pantograph'
}
}
},
// 语音会话

View File

@ -37,7 +37,7 @@ export function covertMemberData (activeTrainList, resp) {
member.label = member.type + name + userName;
member.normalName = member.type + name;
}
const deviceType = ['行调', '通号', '行值', '司机', '车辆段/停车场调度', '上级部门', '调度', '车辆段/停车场信号楼', '车站助理', '车站站长',
const deviceType = ['行调', '通号', '行值', '司机', '车辆段/停车场调度', '上级部门', '电调度', '车辆段/停车场信号楼', '车站助理', '车站站长',
'车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长', '电力工务', '值班站长', '站务员'];
/**

View File

@ -123,7 +123,7 @@ export default {
},
{
id: "23",
name: "调度职责介绍",
name: "电调度职责介绍",
pic: '/other/23.png',
},
{

View File

@ -410,8 +410,8 @@ export default {
dispatcherList[item.id] = this.memberData[item.id];
break;
case 'ELECTRIC_DISPATCHER':
this.memberData[item.id].label = '调度' + (item.name || '');
this.memberData[item.id].labelName = '调度' + (item.name || '');
this.memberData[item.id].label = '电调度' + (item.name || '');
this.memberData[item.id].labelName = '电调度' + (item.name || '');
electricDispatcherList[item.id] = this.memberData[item.id];
break;
case 'DEPOT_DISPATCHER':
@ -539,7 +539,7 @@ export default {
children: parentDepartmentList
}, {
label: '调度',
label: '电调度',
id: 'electricDispatcher',
type: 'role',
children: electricDispatcherList

View File

@ -320,8 +320,8 @@ export default {
dispatcherList[item.id] = this.memberData[item.id];
break;
case 'ELECTRIC_DISPATCHER':
this.memberData[item.id].label = '调度' + (item.name || '');
this.memberData[item.id].labelName = '调度' + (item.name || '');
this.memberData[item.id].label = '电调度' + (item.name || '');
this.memberData[item.id].labelName = '电调度' + (item.name || '');
electricDispatcherList[item.id] = this.memberData[item.id];
break;
case 'DEPOT_DISPATCHER':
@ -447,7 +447,7 @@ export default {
children: parentDepartmentList
}, {
label: '调度',
label: '电调度',
id: 'electricDispatcher',
type: 'role',
children: electricDispatcherList

View File

@ -123,6 +123,7 @@ export default {
}
},
id() {
this.stopNoReadPlay();
this.cancelRecording();
}
},
@ -140,6 +141,46 @@ export default {
this.contentDom = '';
},
methods: {
stopNoReadPlay() {
this.play = false;
this.currentAudioList = [];
this.messageList.forEach(item => {
this.$set(item, 'activeAuto', false);
});
const audioDom = document.querySelector('#audioPlay');
audioDom && audioDom.pause();
},
playNoReadMessage() {
if (!this.id && !this.privateChatId) return;
const list = this.getNoReadVoiceList();
if (this.play) {
const filterList = list.filter(item => {
return !this.currentAudioList.find(ii => {
return ii.id == item.id;
});
});
this.currentAudioList.push(...filterList);
} else {
if (list.length) {
this.currentAudioList = list;
this.playAllAudio();
}
}
},
getNoReadVoiceList() {
const filter = this.messageList.filter(item => {
return item.type == 'Voice' && !item.allRead && !item.readerSet.includes(this.myMemberId) && this.myMemberId != item.memberId;
});
return filter;
},
setActiveAutoStatus(ms, s = false) {
const findIndex = this.messageList.findIndex(item => {
return item.id == ms.id;
});
if (findIndex > -1) {
this.$set(this.messageList[findIndex], 'activeAuto', s);
}
},
setIsBottomFn() {
const scrollTop = this.contentDom.scrollHeight - this.contentDom.clientHeight;
if (scrollTop == 0 || this.contentDom.scrollTop >= scrollTop) {
@ -157,16 +198,18 @@ export default {
},
playAllAudio() {
this.$nextTick(function() {
this.currentMessage = this.currentAudioList.shift();
if (this.currentMessage.type === 'Text') {
if (!this.currentAudioList || !this.currentAudioList[0] || this.currentAudioList[0].type === 'Text') {
return;
}
this.currentMessage = this.currentAudioList.shift();
document.querySelector('#audioPlay').src = this.currentMessage.audioPath;
document.querySelector('#audioPlay').play();
this.$set(this.currentMessage, 'activeAuto', true);
this.setActiveAutoStatus(this.currentMessage, true);
this.play = true;
document.querySelector('#audioPlay').onended = () => {
this.$set(this.currentMessage, 'activeAuto', false);
this.setActiveAutoStatus(this.currentMessage);
if (!this.currentAudioList || !this.currentAudioList.length) {
this.play = false;
} else {
@ -176,8 +219,7 @@ export default {
});
},
playAudio(audioPath, data) {
this.$set(this.currentMessage, 'activeAuto', false);
this.currentAudioList = [];
this.stopNoReadPlay();
this.currentMessage = data;
this.play = true;
document.querySelector('#audioPlay').src = audioPath;
@ -362,6 +404,10 @@ export default {
}
}).catch(() => { console.error('操作失败!'); });
} else {
if (this.seconds < 1) {
this.$message.info('为保证语言质量录制时长不能小于1秒');
return;
}
this.stopRecording(); //
}
}

View File

@ -56,7 +56,7 @@
</div>
</div>
<div class="right">
<chat-content v-if="id || privateChatId" :id="id" :group-name="activeGroupName" :private-chat-id="privateChatId" :message-list="activeMessageList" />
<chat-content v-if="id || privateChatId" :id="id" ref="chatContentRef" :group-name="activeGroupName" :private-chat-id="privateChatId" :message-list="activeMessageList" />
</div>
</div>
<div v-show="tabActive==1" class="contentBox">
@ -183,7 +183,10 @@ export default {
return item.id == val.id;
});
if (find) {
find.messageList.push(val.message);
const fMess = find.messageList.find(ii => ii.id == val.message.id);
if (!fMess) {
find.messageList.push(val.message);
}
if (!this.id && this.privateChatId && this.privateChatId == this.getPrivateChatId(find)) {
this.id = val.id;
}
@ -556,6 +559,10 @@ export default {
return objectIsEqual(m1.sort(), m2.sort());
},
groupClick(item) {
if (this.$refs.chatContentRef && this.$refs.chatContentRef.recordSending) {
this.$message.info('请结束正在录制的语音!');
return;
}
this.id = item.id || 0;
if (item.type == 'GROUP_CHAT') {
this.privateChatId = '';
@ -580,15 +587,22 @@ export default {
setReadGroup() {
if (!this.id || !this.dialogVisible) { return; }
const id = this.id;
setGroupReadMessage(this.groupId, {id}).then(res => {
res.data.forEach(item => {
const obj = {
id: id,
message: {
...item
}
};
this.getMessageStatus(obj);
this.$nextTick(() => {
this.$refs.chatContentRef && this.$refs.chatContentRef.playNoReadMessage();
setGroupReadMessage(this.groupId, {id}).then(() => {
const findG = this.groupList.find(item => {
return item.id == this.id;
});
if (findG) {
findG.messageList.forEach(ii => {
if (!ii.readerSet.includes(this.myMemberId)) {
ii.readerSet.push(this.myMemberId);
if (objectIsEqual(findG.memberList.sort(), ii.readerSet.sort())) {
ii.allRead = true;
}
}
});
}
});
});
},

View File

@ -6,6 +6,9 @@
</el-badge>
</div>
<chatDialog ref="chatDialog" @setTotalUnread="setTotalUnread" />
<audio id="chatBuzzer" style="display:none">
<source :src="buzzerAudio" type="audio/mpeg">
</audio>
</div>
</template>
@ -13,6 +16,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import {UserOperationType} from '@/scripts/ConstDic';
import chatDialog from './chatDialog';
import teleRing from '@/assets/teleRing.mp3';
export default {
name: 'ChatBox',
components: {
@ -20,7 +24,8 @@ export default {
},
data() {
return {
totalUnreadNum: 0
totalUnreadNum: 0,
buzzerAudio: teleRing
};
},
computed:{
@ -36,11 +41,27 @@ export default {
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
},
totalUnreadNum(val) {
if (val && !this.$refs.chatDialog.dialogVisible) {
this.playBuzzer();
}
}
},
mounted() {
},
methods: {
playBuzzer() {
const audioDom = document.querySelector('#chatBuzzer');
if (audioDom) {
audioDom.currentTime = 0;
audioDom.play();
}
},
pauseBuzzer() {
const audioDom = document.querySelector('#chatBuzzer');
audioDom && audioDom.pause();
},
setTotalUnread(val) {
this.totalUnreadNum = val;
},
@ -52,6 +73,7 @@ export default {
// };
this.$store.dispatch('training/setChatBoxMin', false);
this.$refs.chatDialog.dialogVisible = true;
this.pauseBuzzer();
// if (this.$store.state.trainingNew.trainingSwitch) {
// this.$nextTick(() => {
// this.$store.dispatch('trainingNew/next', operate);

View File

@ -43,7 +43,7 @@
<el-divider direction="vertical" />
<el-button size="small" type="text" @click="resetTraining">重置</el-button>
<el-divider direction="vertical" />
<el-button size="small" type="text" @click="showMode = 'draftTrainingList'">返回列表</el-button>
<el-button size="small" type="text" @click="goBackList">返回列表</el-button>
</div>
<div>
<el-divider content-position="center">实训背景</el-divider>
@ -130,6 +130,7 @@ import EditOperate from './editOperate';
import CreateDraftTraining from './createDraftTraining';
import GradeRules from './gradeRules';
import TrackList from './trackList';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'DesignIndex',
@ -217,6 +218,15 @@ export default {
});
},
methods: {
goBackList() {
const qObj = {...this.$route.query};
qObj.record = false;
this.$router.replace({ query:{...qObj}});
this.showMode = 'draftTrainingList';
this.$nextTick(() => {
EventBus.$emit('viewLoading', false);
});
},
computedRoleDisabled(role) {
if (!this.editData.client) {
return false;

View File

@ -218,7 +218,7 @@ export default {
type: 'role',
children: result.deviceListData[5]
}, {
label: '调度',
label: '电调度',
id: 'electricDispatcher',
type: 'role',
children: result.deviceListData[6]
@ -344,7 +344,7 @@ export default {
const covertmember = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
const newMember = covertmember[0];
this.memberList.push(newMember);
const deviceTypeList = ['行调', '行值', '司机', '通号', '车辆段/停车场调度', '上级部门', '调度', '车辆段/停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长', '电力工务'];
const deviceTypeList = ['行调', '行值', '司机', '通号', '车辆段/停车场调度', '上级部门', '电调度', '车辆段/停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长', '电力工务'];
const index = deviceTypeList.indexOf(newMember.type);
if (index >= 0) {
const treeDataIn = this.treeData[index];
@ -553,7 +553,7 @@ export default {
prdType = '';
role.type = 'PARENT_DEPARTMENT';
this.$store.dispatch('training/setRoles', 'PARENT_DEPARTMENT');
} else if (role.type == '调度') {
} else if (role.type == '电调度') {
prdType = '';
role.type = 'ELECTRIC_DISPATCHER';
this.$store.dispatch('training/setRoles', 'ELECTRIC_DISPATCHER');
@ -629,7 +629,7 @@ export default {
'MAINTAINER':'通号',
'DEPOT_DISPATCHER':'车辆段/停车场调度',
'PARENT_DEPARTMENT':'上级部门',
'ELECTRIC_DISPATCHER':'调度',
'ELECTRIC_DISPATCHER':'电调度',
'SIGNAL_BUILDING':'车辆段/停车场信号楼',
'STATION_ASSISTANT':'车站助理',
'STATION_MASTER':'车站站长',