diff --git a/src/store/modules/training.js b/src/store/modules/training.js
index ac152a901..3c692bdcd 100644
--- a/src/store/modules/training.js
+++ b/src/store/modules/training.js
@@ -39,7 +39,8 @@ const training = {
centerStationCode:'', // 当前居中的集中站code
memberList: [], // 综合仿真成员列表
memberData: {}, // 综合仿真成员列表
- simulationUserList: [] // 综合仿真用户列表
+ simulationUserList: [], // 综合仿真用户列表
+ addMemberInScript:{} // 剧本录制新增角色
},
getters: {
@@ -253,7 +254,8 @@ const training = {
addMemberListInScript:(state, newMember) => {
if (!state.memberData[newMember.id]) {
- state.memberData[newMember.id] = newMember;
+ // state.memberData[newMember.id] = newMember;
+ state.addMemberInScript = newMember;
}
},
diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue
index d7b5868ba..a4c5813ae 100644
--- a/src/views/newMap/chatView/chatBox.vue
+++ b/src/views/newMap/chatView/chatBox.vue
@@ -305,8 +305,7 @@ export default {
});
},
inviteMember() {
- // this.$refs.chatToolTip.doShow();
- this.$mesaage(this.inviteMember + '与你开启会话');
+ this.$refs.chatToolTip.doShow();
}
}
};
diff --git a/src/views/newMap/displayNew/demonChat.vue b/src/views/newMap/displayNew/demonChat.vue
index ad080e9fc..08c5831e6 100644
--- a/src/views/newMap/displayNew/demonChat.vue
+++ b/src/views/newMap/displayNew/demonChat.vue
@@ -63,6 +63,7 @@ export default {
},
computed:{
isShow() {
+ debugger;
return this.userRole != '' &&
this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' &&
!this.isHasCoversition && this.createCoversition;
@@ -98,13 +99,16 @@ export default {
member.disabled = false;
} else {
member.disabled = true;
+ member.userName = this.$store.state.user.nickname;
}
+ const userName = member.userName ? '-' + member.userName : '';
const name = member.name == undefined ? '' : '-' + member.name;
if (member.deviceCode) {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
if (device._type == 'Train') {
- member.label = member.type + device.groupNumber + name;
+ member.deviceName = device.groupNumber;
+ member.label = member.type + device.groupNumber + name + userName;
lastMemberList.push(member);
if (this.activeTrainList.length > 0) {
if (this.activeTrainList.includes(member.deviceCode)) {
@@ -114,18 +118,21 @@ export default {
this.driverList.push(member);
}
} else {
- member.label = member.type + device.name + name;
+ member.deviceName = device.name;
+ member.label = member.type + device.name + name + userName;
lastMemberList.push(member);
if (device._type == 'Station') {
stationSupervisorList.push(member);
}
}
} else {
- member.label = member.type + member.deviceCode + name;
+ member.deviceName = member.deviceCode;
+ member.label = member.type + member.deviceCode + name + userName;
lastMemberList.push(member);
}
} else {
- member.label = member.type + name;
+ member.label = member.type + name + userName;
+ member.deviceName = '';
if (member.type == '行调') {
dispatcherList.push(member);
} else if (member.type == '通号') {
@@ -286,7 +293,15 @@ export default {
member.connect = true;
member.online = true;
this.inviteUser = member;
- this.$refs.chatbox.inviteMember();
+
+ this.currentMemberList.push(member);
+ const member = this.memberData.find(member=>{ return member.id == val.memberId; });
+ member.connect = true;
+ this.currentMemberList.push(member);
+ this.isStartRecord = true;
+
+ // this.$refs.chatbox.inviteMember();
+ this.$message.success(this.inviteUserName + '与你开启会话');
}
}
@@ -310,21 +325,23 @@ export default {
},
clearAllData() {
this.resetCoversition();
- this.createCoversition = false;
+ this.createCoversition = true;
this.$refs.scriptTip.resetScriptTip();
},
setMembers(roleId) {
this.memberData.map(member=>{
- if (member.userId) {
- member.userId = '';
- member.name = '';
- member.disabled = false;
- }
if (member.id == roleId) {
member.userId = this.$store.state.user.id;
- member.name = this.$store.state.user.nickname;
+ member.userName = this.$store.state.user.nickname;
member.disabled = true;
+ } else {
+ member.userId = '';
+ member.userName = '';
+ member.disabled = false;
}
+ const userName = member.userName ? '-' + member.userName : '';
+ const name = member.name == undefined ? '' : '-' + member.name;
+ member.label = member.type + member.deviceName + name + userName;
});
},
resetCoversition() {
diff --git a/src/views/newMap/displayNew/demonMenu.vue b/src/views/newMap/displayNew/demonMenu.vue
index 75fe99da9..87236c4e4 100644
--- a/src/views/newMap/displayNew/demonMenu.vue
+++ b/src/views/newMap/displayNew/demonMenu.vue
@@ -37,11 +37,15 @@ import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
import { getToken } from '@/utils/auth';
import { getSessionStorage } from '@/utils/auth';
+import Scheduling from '@/views/newMap/displayNew/demon/scheduling';
+import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
export default {
name:'DemonMenu',
components:{
Jl3dDevice,
- Jl3dDrive
+ Jl3dDrive,
+ Scheduling,
+ SchedulingView
},
props:{
isAllShow:{
diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue
index fc03c927e..32ca04b17 100644
--- a/src/views/newMap/displayNew/menuDemon.vue
+++ b/src/views/newMap/displayNew/menuDemon.vue
@@ -358,6 +358,7 @@ export default {
quitQuest() {
this.isScriptRun = false;
let userRole = '';
+ debugger;
if (this.$route.query.prdType) {
if (this.$route.query.prdType == '02') {
userRole = 'DISPATCHER';
diff --git a/src/views/newMap/displayNew/scriptChat.vue b/src/views/newMap/displayNew/scriptChat.vue
index 394948313..b8029e02e 100644
--- a/src/views/newMap/displayNew/scriptChat.vue
+++ b/src/views/newMap/displayNew/scriptChat.vue
@@ -87,14 +87,16 @@ export default {
member.disabled = false;
} else {
member.disabled = true;
+ member.userName = this.$store.state.user.nickname;
}
+ const userName = member.userName ? '-' + member.userName : '';
const name = member.name == undefined ? '' : '-' + member.name;
if (member.deviceCode) {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
if (device._type == 'Train') {
- member.label = member.type + device.groupNumber + name;
- member.deviceName = member.deviceCode;
+ member.deviceName = device.deviceCode;
+ member.label = member.type + device.groupNumber + name + userName;
lastMemberList.push(member);
if (this.activeTrainList.length > 0) {
if (this.activeTrainList.includes(member.deviceCode)) {
@@ -105,7 +107,7 @@ export default {
}
} else {
member.deviceName = device.name;
- member.label = member.type + device.name + name;
+ member.label = member.type + device.name + name + userName;
lastMemberList.push(member);
if (device._type == 'Station') {
stationSupervisorList.push(member);
@@ -113,11 +115,12 @@ export default {
}
} else {
member.deviceName = member.deviceCode;
- member.label = member.type + member.deviceCode + name;
+ member.label = member.type + member.deviceCode + name + userName;
lastMemberList.push(member);
}
} else {
- member.label = member.type + name;
+ member.label = member.type + name + userName;
+ member.deviceName = '';
if (member.type == '行调') {
dispatcherList.push(member);
} else if (member.type == '通号') {
@@ -160,6 +163,14 @@ export default {
this.$messageBox('获取仿真成员列表失败!');
});
},
+ '$store.state.training.addMemberInScript':function(val, oldval) {
+ this.memberData.push(val);
+ const roleList = ['行调', '车站值班员', '司机', '通号', '车辆段'];
+ const roleIndex = roleList.indexOf(val.type);
+ if (roleIndex >= 0) {
+ this.treeData[roleIndex].children.push(val);
+ }
+ },
'userRole':function(val, oldval) {
// 切换对象
this.changeRole(oldval, val);
diff --git a/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue b/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue
index a51f57aca..f818d8271 100644
--- a/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue
+++ b/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue
@@ -28,11 +28,18 @@ export default {
this.scriptTipMessage = '请说:' + val.content;
} else if (val.type == 'Operation') {
const commandName = val.operationType;
- let device = val.operationType.split('_')[0];
- if (device == 'CM') {
- device = 'ControlConvertMenu';
+ let operateName = {};
+ if (commandName == 'Set_Fault') {
+ operateName.label = '设置故障';
+ } else if (commandName == 'Cancel_Fault') {
+ operateName.label = '取消故障';
+ } else {
+ let device = val.operationType.split('_')[0];
+ if (device == 'CM') {
+ device = 'ControlConvertMenu';
+ }
+ operateName = Object.values(CMD[device]).find(res=>{ return res.value == commandName; });
}
- const operateName = Object.values(CMD[device]).find(res=>{ return res.value == commandName; });
this.scriptTipMessage = '请执行【' + operateName.label + '】操作';
} else if (val.type == 'Over_Conversation') {
this.scriptTipMessage = '请结束当前会话';
diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue
index 0c7ee20d7..96fe6c042 100644
--- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue
+++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue
@@ -198,13 +198,31 @@ export default {
this.memberData.map(member=>{
if (member.id == role.id) {
member.userId = this.$store.state.user.id;
- member.name = this.$store.state.user.nickname;
+ member.userName = this.$store.state.user.nickname;
member.disabled = true;
+ } else {
+ member.userId = '';
+ member.userName = '';
+ member.disabled = false;
}
+ const userName = member.userName ? '-' + member.userName : '';
+ const name = member.name == undefined ? '' : '-' + member.name;
+ member.label = member.type + member.deviceName + name + userName;
});
} else {
this.userRole = 'AUDIENCE';
+ this.$store.dispatch('training/setRoles', 'AUDIENCE');
+ this.memberData.map(member=>{
+ if (member.userId) {
+ member.userId = '';
+ member.userName = '';
+ member.disabled = false;
+ const userName = member.userName ? '-' + member.userName : '';
+ const name = member.name == undefined ? '' : '-' + member.name;
+ member.label = member.type + member.deviceName + name + userName;
+ }
+ });
this.switchMode('');
}
} catch (error) {
diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue
index 9a21410a7..3008375f6 100644
--- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue
+++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue
@@ -127,6 +127,7 @@ export default {
methods:{
// 加载地图数据
async initLoadData() {
+ this.$store.dispatch('training/setPrdType', '');
this.setWindowSize();
this.$store.dispatch('training/reset');
try {
@@ -217,28 +218,40 @@ export default {
const maintainerList = [];
this.treeData = [];
lastData.forEach((member, index)=>{
+ if (!member.userId) {
+ member.userId = '';
+ member.disabled = false;
+ } else {
+ member.disabled = true;
+ member.userName = this.$store.state.user.nickname;
+ }
if (member.type != '观众') {
+ const userName = member.userName ? '-' + member.userName : '';
const name = member.name == undefined ? '' : '-' + member.name;
if (member.deviceCode) {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
if (device._type == 'Train') {
- member.label = member.type + device.groupNumber + name;
+ member.deviceName = device.groupNumber;
+ member.label = member.type + device.groupNumber + name + userName;
lastMemberList.push(member);
driverList.push(member);
} else {
- member.label = member.type + device.name + name;
+ member.deviceName = device.name;
+ member.label = member.type + device.name + name + userName;
lastMemberList.push(member);
if (device._type == 'Station') {
stationSupervisorList.push(member);
}
}
} else {
- member.label = member.type + member.deviceCode + name;
+ member.deviceName = member.deviceCode;
+ member.label = member.type + member.deviceCode + name + userName;
lastMemberList.push(member);
}
} else {
- member.label = member.type + name;
+ member.label = member.type + name + userName;
+ member.deviceName = '';
if (member.type == '行调') {
dispatcherList.push(member);
} else if (member.type == '通号') {
@@ -354,7 +367,9 @@ export default {
this.isscriptRun = false;
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
this.$store.dispatch('scriptRecord/updateBgSet', false);
- this.userRole = '';
+ // this.userRole = '';
+ this.$store.dispatch('training/setRoles', '');
+ this.$store.dispatch('training/setPrdType', '');
this.$emit('clearAllData');
// if (resp.data.planRunning) {
// this.$store.dispatch('training/start');// 仿真开始按计划行车
diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptPreviewChat.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptPreviewChat.vue
index aa26827bb..94474fa85 100644
--- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptPreviewChat.vue
+++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptPreviewChat.vue
@@ -70,7 +70,6 @@ export default {
watch:{
// 创建会话
'$store.state.socket.createConversition':function(val) {
- // debugger;
if (this.memberData.length > 0) {
const member = this.memberData.find(member=>{ return member.id == val.creatorId; });
if (member && member.userId == this.$store.state.user.id) {
@@ -86,7 +85,8 @@ export default {
memberList.push(member);
} else {
const member = this.memberData.find(member=>{ return member.id == id; });
- member.connect = false;
+ // member.connect = false;
+ member.connect = true;
member && memberList.push(member);
}
});
@@ -160,13 +160,22 @@ export default {
},
// 邀请会话的消息
'$store.state.socket.inviteSimulationConversition':function(val) {
- const member = this.memberData.find(member=>{ return member.id == val.creatorId; });
- if (member) {
- this.inviteUserName = member.label;
+ const invitemember = this.memberData.find(member=>{ return member.id == val.creatorId; });
+ if (invitemember) {
+ this.inviteUserName = invitemember.label;
this.conversitionId = val.id;
+ invitemember.connect = true;
+ this.inviteUser = invitemember;
+ this.currentMemberList.push(invitemember);
+ const member = this.memberData.find(member=>{ return member.id == val.memberId; });
member.connect = true;
- this.inviteUser = member;
- this.$refs.chatbox.inviteMember();
+ const userName = member.userName ? '-' + member.userName : '';
+ const name = member.name == undefined ? '' : '-' + member.name;
+ member.label = member.type + member.deviceName + name + userName;
+ this.currentMemberList.push(member);
+ this.isStartRecord = true;
+ // this.$refs.chatbox.inviteMember();
+ this.$message.success(this.inviteUserName + '与你开启会话');
}
}
},
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatTooltip.vue b/src/views/newMap/jointTrainingNew/chatView/chatTooltip.vue
index 4431042d8..394d43d55 100644
--- a/src/views/newMap/jointTrainingNew/chatView/chatTooltip.vue
+++ b/src/views/newMap/jointTrainingNew/chatView/chatTooltip.vue
@@ -41,7 +41,7 @@ export default {
this.userName = this.coverName(val);
// this.dialogVisible = true;
// this.conversationId = val.id;
- this.$mesaage(this.userName + '与你开启会话');
+ this.$message.success(this.userName + '与你开启会话');
}
},
methods:{
diff --git a/src/views/scriptManage/addScriptMember.vue b/src/views/scriptManage/addScriptMember.vue
index 8de8cbbca..e19a73790 100644
--- a/src/views/scriptManage/addScriptMember.vue
+++ b/src/views/scriptManage/addScriptMember.vue
@@ -19,9 +19,12 @@
/>
+
+
+
@@ -34,13 +37,18 @@ export default {
data() {
return {
dialogVisible: false,
+ lodaing:false,
formModel: {
- type: ''
+ type: '',
+ name:''
},
rules: {
type: [
- { required: true, message: '请选择显示位置', trigger: 'change' }
+ { required: true, message: '请选择成员类型', trigger: 'change' }
]
+ // name:[
+ // { required: true, message: '请输入成员名称', trigger: 'blur' }
+ // ]
},
typeList: [{label: '行调', value: 'DISPATCHER'}, {label: '通号', value: 'MAINTAINER'}]
};
@@ -59,20 +67,26 @@ export default {
this.dialogVisible = true;
},
doSave() {
- this.$refs.form.validate(() => {
- addSimulationMember(this.formModel, this.$route.query.group).then((res) => {
- this.$message.success('添加仿真角色成员成功!');
- this.$emit('addScriptMember', res.data);
- this.handleClose();
- }).catch(() => {
- this.$message.error('添加仿真角色成员失败!');
- });
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ this.lodaing = true;
+ addSimulationMember(this.formModel, this.$route.query.group).then((res) => {
+ this.lodaing = false;
+ this.$message.success('添加仿真角色成员成功!');
+ this.$emit('addScriptMember', res.data);
+ this.handleClose();
+ }).catch(() => {
+ this.lodaing = false;
+ this.$message.error('添加仿真角色成员失败!');
+ });
+ }
});
},
handleClose() {
this.dialogVisible = false;
this.formModel = {
- type: ''
+ type: '',
+ name:''
};
this.$refs.form.resetFields();
}
diff --git a/src/views/scriptManage/getAction.vue b/src/views/scriptManage/getAction.vue
index 35c978461..41ac28619 100644
--- a/src/views/scriptManage/getAction.vue
+++ b/src/views/scriptManage/getAction.vue
@@ -145,7 +145,7 @@ export default {
{
// const command = CommandHandler.getScriptDefinition(element.operationType);
const commandName = element.operationType;
- if (commandName != 'Set_Fault') {
+ if (commandName != 'Set_Fault' && commandName != 'Cancel_Fault' ) {
let operateType = commandName.split('_')[0];
if (operateType == 'CM') {
operateType = 'ControlConvertMenu';
@@ -158,7 +158,11 @@ export default {
// deviceFaultType
// element.operationParamMap.faultType;
// '(' + operateName.label + ')'
- this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '设置故障', row: element, visible: false});
+ if (commandName == 'Set_Fault') {
+ this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '设置故障', row: element, visible: false});
+ } else if (commandName == 'Cancel_Fault') {
+ this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '取消故障', row: element, visible: false});
+ }
}
break;
}
diff --git a/src/views/scriptManage/tipScriptRecord.vue b/src/views/scriptManage/tipScriptRecord.vue
index 47e1dfee2..80e2b2239 100644
--- a/src/views/scriptManage/tipScriptRecord.vue
+++ b/src/views/scriptManage/tipScriptRecord.vue
@@ -167,13 +167,12 @@ export default {
},
addScriptMember(member) {
member.userId = '';
- member.name = '';
member.disabled = false;
- this.$store.dispatch('training/addMemberListInScript', member);
const lastData = JSON.stringify([member]);
const covertmember = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
covertmember.forEach(each=>{
this.memberList.push(each);
+ this.$store.dispatch('training/addMemberListInScript', each);
});
},
@@ -249,7 +248,7 @@ export default {
deviceName = each.deviceCode;
}
}
- each.name = each.type + deviceName;
+ each.name = each.type + deviceName + (each.name ? '' + each.name : '');
each.label = each.name;
});
return lastData;