This commit is contained in:
zyy 2020-08-04 10:49:33 +08:00
commit 402a4f48b8
16 changed files with 159 additions and 46 deletions

View File

@ -175,3 +175,11 @@ export function setPlcConfig(id, data) {
data: data data: data
}); });
} }
/** 添加/修改SANDBOX配置 */
export function setSandboxConfig(id, data) {
return request({
url: `/api/device/${id}/config/sandbox`,
method: 'put',
data: data
});
}

View File

@ -232,7 +232,8 @@ export default {
{label: '虚拟CCTV', value: 'CCTV'}, {label: '虚拟CCTV', value: 'CCTV'},
{label: 'PLC网关', value: 'PLC_GATEWAY'}, {label: 'PLC网关', value: 'PLC_GATEWAY'},
{label: '端头控制盒', value: 'PSL'}, {label: '端头控制盒', value: 'PSL'},
{label: 'PSC控制柜', value: 'PSC'} {label: 'PSC控制柜', value: 'PSC'},
{label: '虚拟电子沙盘', value: 'SANDBOX'}
] ]
} }
}; };

View File

@ -117,7 +117,6 @@ const training = {
}, },
over: (state) => { over: (state) => {
state.started = false; state.started = false;
state.switchcount += 1;
}, },
updateMapState: (state, deviceStatus) => { updateMapState: (state, deviceStatus) => {
Vue.prototype.$jlmap && Vue.prototype.$jlmap.update(deviceStatus); Vue.prototype.$jlmap && Vue.prototype.$jlmap.update(deviceStatus);

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -152,6 +152,7 @@ export default {
// this.faultlistshow = true; // this.faultlistshow = true;
const mapdata = this.$store.getters['map/map']; const mapdata = this.$store.getters['map/map'];
const dom = document.getElementById('app'); const dom = document.getElementById('app');
document.querySelector('.schema').style.zIndex = 34;
const project = this.$route.query.project; const project = this.$route.query.project;
// console.log(project); // console.log(project);
@ -165,7 +166,6 @@ export default {
this.jlmap3d.eventon(); this.jlmap3d.eventon();
}, },
initVR:function (skinCode, group) { initVR:function (skinCode, group) {
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path:'/jlmap3d/maintainervr', path:'/jlmap3d/maintainervr',
query:{ query:{

View File

@ -218,19 +218,20 @@ export default {
}, },
bgImg() { bgImg() {
const bgImgAll = process.env.VUE_APP_PRO === 'local' || this.$route.query.project == 'heb' ? '' : bgImg; const bgImgAll = process.env.VUE_APP_PRO === 'local' || this.$route.query.project == 'heb' ? '' : bgImg;
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD']; const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD', 'SANDBOX'];
const imgMap = { const imgMap = {
ISCS_LW: bgIscsImg, ISCS_LW: bgIscsImg,
ISCS_CW: bgIscsImg, ISCS_CW: bgIscsImg,
VR_IBP: bgIbpImg, VR_IBP: bgIbpImg,
CCTV: bgCctvImg, CCTV: bgCctvImg,
VR_PSD: bgPsdImg, VR_PSD: bgPsdImg,
LSW: bgLswImg LSW: bgLswImg,
SANDBOX: bgLswImg
}; };
return synchronousLogin.includes(this.$route.query.type) ? imgMap[this.$route.query.type] : bgImgAll; return synchronousLogin.includes(this.$route.query.type) ? imgMap[this.$route.query.type] : bgImgAll;
}, },
syncLogin() { syncLogin() {
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD']; const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD', 'SANDBOX'];
return this.$route.query.type ? synchronousLogin.includes(this.$route.query.type) : false; return this.$route.query.type ? synchronousLogin.includes(this.$route.query.type) : false;
}, },
loadingText() { loadingText() {
@ -469,6 +470,14 @@ export default {
query.psdCode = JSON.parse(res.data.deviceVO.config).psdCode; query.psdCode = JSON.parse(res.data.deviceVO.config).psdCode;
} }
this.$router.push({ path: `/jointTrainingNew`, query: query }); this.$router.push({ path: `/jointTrainingNew`, query: query });
} else if (this.$route.query.type === 'SANDBOX') {
const sandboxQuery = {
mapid: query.mapId,
group: query.group,
project: getSessionStorage('project'),
token: getToken()
};
this.$router.push({ path: `/jlmap3d/sandbox`, query: sandboxQuery });
} else { } else {
this.$router.push({ path: `/jointTrainingNew`, query: query }); this.$router.push({ path: `/jointTrainingNew`, query: query });
} }

View File

@ -70,7 +70,7 @@ export default {
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
position: absolute; position: absolute;
z-index: 10; z-index: 36;
top: 0px; top: 0px;
left: 0px; left: 0px;
width: 100%; width: 100%;

View File

@ -22,6 +22,7 @@ import ConstConfig from '@/scripts/ConstConfig';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { getSimulationMemberList} from '@/api/simulation'; import { getSimulationMemberList} from '@/api/simulation';
import {getAllConversition} from '@/api/chat';
export default { export default {
name:'DemonChat', name:'DemonChat',
components:{ components:{
@ -46,13 +47,15 @@ export default {
currentMemberList:[], currentMemberList:[],
memberData:{}, memberData:{},
chatContentList:[], chatContentList:[],
activeTrainList:[],
isStartRecord:false, isStartRecord:false,
inviteUserName:'', inviteUserName:'',
createCoversition:true, createCoversition:true,
inviteUser:{}, inviteUser:{},
isQuitShow:false, isQuitShow:false,
treeData:[], treeData:[],
driverList:[] driverList:[],
simulationUsers:{}
}; };
}, },
computed:{ computed:{
@ -86,7 +89,7 @@ export default {
const lastMemberList = []; const lastMemberList = [];
const dispatcherList = []; const dispatcherList = [];
// const electricDispatcherList = []; // const electricDispatcherList = [];
// const depotDispatcherList = []; const depotDispatcherList = [];
const stationSupervisorList = []; const stationSupervisorList = [];
this.driverList = []; this.driverList = [];
const maintainerList = []; const maintainerList = [];
@ -107,7 +110,13 @@ export default {
member.memberName = member.type + device.groupNumber + name; member.memberName = member.type + device.groupNumber + name;
lastMemberList.push(member); lastMemberList.push(member);
member.label = member.memberName; member.label = member.memberName;
this.driverList.push(member); if (this.activeTrainList.length > 0) {
if (this.activeTrainList.includes(member.deviceCode)) {
this.driverList.push(member);
}
} else {
this.driverList.push(member);
}
} else { } else {
member.memberName = member.type + device.name + name; member.memberName = member.type + device.name + name;
lastMemberList.push(member); lastMemberList.push(member);
@ -127,6 +136,8 @@ export default {
dispatcherList.push(member); dispatcherList.push(member);
} else if (member.type == '通号') { } else if (member.type == '通号') {
maintainerList.push(member); maintainerList.push(member);
} else if (member.type == '车辆段调度') {
depotDispatcherList.push(member);
} }
lastMemberList.push(member); lastMemberList.push(member);
} }
@ -146,12 +157,17 @@ export default {
label: '司机', label: '司机',
id: 'driver', id: 'driver',
type: 'role', type: 'role',
children: [] children: this.driverList
}, { }, {
label: '通号', label: '通号',
id: 'maintainer', id: 'maintainer',
type: 'role', type: 'role',
children: maintainerList children: maintainerList
}, {
label: '车辆段',
id: 'depotDispatcher',
type: 'role',
children: depotDispatcherList
}]; }];
this.memberData = lastMemberList; this.memberData = lastMemberList;
}).catch(() => { }).catch(() => {
@ -192,6 +208,7 @@ export default {
}, },
// //
'$store.state.socket.acceptConversionInvite':function(val) { '$store.state.socket.acceptConversionInvite':function(val) {
this.conversitionId = val.id;
if (this.conversitionId) { if (this.conversitionId) {
let result = false; let result = false;
// //
@ -211,9 +228,14 @@ export default {
// //
if (member.userId == this.$store.state.user.id) { if (member.userId == this.$store.state.user.id) {
memberList.push(this.inviteUser); memberList.push(this.inviteUser);
this.inviteUser = {};
this.isStartRecord = true; this.isStartRecord = true;
this.isQuitShow = true; if (member.userId != this.inviteUser.userId) {
this.isQuitShow = false;
} else {
this.isQuitShow = true;
}
this.inviteUser = {};
this.isHasCoversition = true;
} }
} }
} }
@ -257,18 +279,22 @@ export default {
// () // ()
'$store.state.map.activeTrainListChange': function (val) { '$store.state.map.activeTrainListChange': function (val) {
const activeTrainList = this.$store.state.map.activeTrainList; const activeTrainList = this.$store.state.map.activeTrainList;
const driverList = []; if (this.driverList.length > 0) {
if (activeTrainList && activeTrainList.length) { const driverList = [];
activeTrainList.forEach(groupNumber => { if (activeTrainList && activeTrainList.length) {
const drivers = this.driverList.find(driver=>{ activeTrainList.forEach(groupNumber => {
return driver.deviceCode == groupNumber; const drivers = this.driverList.find(driver=>{
return driver.deviceCode == groupNumber;
});
if (drivers) {
driverList.push(drivers);
}
}); });
if (drivers) { }
driverList.push(drivers); this.treeData[2].children = driverList;
} } else {
}); this.activeTrainList = activeTrainList;
} }
this.treeData[2].children = driverList;
}, },
// //
'$store.state.socket.scriptFinish':function(val, old) { '$store.state.socket.scriptFinish':function(val, old) {
@ -292,6 +318,7 @@ export default {
this.inviteUserName = member.label; this.inviteUserName = member.label;
this.conversitionId = val.id; this.conversitionId = val.id;
member.connect = true; member.connect = true;
member.online = true;
this.inviteUser = member; this.inviteUser = member;
this.$refs.chatbox.inviteMember(); this.$refs.chatbox.inviteMember();
} }
@ -333,6 +360,47 @@ export default {
this.inviteUser = {}; this.inviteUser = {};
this.isQuitShow = false; this.isQuitShow = false;
} }
// isAudienceInitData() {
// getAllConversition(this.group).then(resp => {
// const messages = [];
// if (resp.data && resp.data.length) {
// debugger;
// resp.data.forEach(conversation => {
// (conversation.messageList || []).forEach(message => {
// const member = this.memberData[message.memberId];
// message.src = `/audio/${message.audioPath}`;
// message.members = conversation.memberList;
// if (member) {
// message.self = this.$store.state.userId == member.userId;
// }
// messages.push(message);
// });
// if (this.userRole !== 'AUDIENCE') {
// const user = this.simulationUsers[this.$store.state.user.id];
// this.isConversitionCreator = conversation.creatorId == user.memberId;
// !conversation.over && conversation.memberList.forEach(member =>{
// if (member.memberId == user.memberId && member.connect) {
// this.conversitionMemberList = conversation.memberList;
// this.conversitionId = conversation.id;
// this.messageList = [];
// conversation.messageList.forEach(message => {
// const member = this.memberData[message.memberId];
// message.src = `/audio/${message.audioPath}`;
// if (member) {
// message.self = this.$store.state.userId == member.userId;
// }
// this.privateMessageList.push(message);
// this.messageList.push(message);
// });
// }
// });
// }
// });
// }
// this.commonMessageList = messages.sort(this.sortByMessageTime);
// // this.initCommonMemberList();
// });
// }
} }
}; };
</script> </script>

View File

@ -130,6 +130,8 @@ export default {
return 'STATION_SUPERVISOR'; return 'STATION_SUPERVISOR';
} else if (this.$route.query.prdType == '04') { } else if (this.$route.query.prdType == '04') {
return 'DRIVER'; return 'DRIVER';
} else if (this.$route.query.prdType == '05') {
return 'DEPOT_DISPATCHER';
} else { } else {
return 'AUDIENCE'; return 'AUDIENCE';
} }
@ -411,7 +413,7 @@ export default {
height: 32px; height: 32px;
overflow: hidden; overflow: hidden;
padding-left: 44px; padding-left: 44px;
z-index: 360; z-index: 35;
.btn_hover{ .btn_hover{
position: absolute; position: absolute;
left: 0; left: 0;

View File

@ -91,7 +91,8 @@ export default {
swchList: [ swchList: [
{ value: '01', name: '现地' }, { value: '01', name: '现地' },
{ value: '02', name: '行调' } { value: '02', name: '行调' }
] ],
firstLoad: true
}; };
}, },
computed: { computed: {
@ -129,7 +130,10 @@ export default {
if (this.group) { if (this.group) {
if (this.$store.state.training.started) { if (this.$store.state.training.started) {
await this.loadRunData(); await this.loadRunData();
} else if (this.firstLoad) {
await this.loadRunData(this.$route.query);
} }
this.firstLoad = false;
} }
}, },
'$store.state.scriptRecord.bgSet':function (val) { '$store.state.scriptRecord.bgSet':function (val) {
@ -146,7 +150,7 @@ export default {
} }
}, },
async mounted() { async mounted() {
await this.loadRunData(); // await this.loadRunData();
}, },
methods: { methods: {
loadRunData() { loadRunData() {

View File

@ -261,6 +261,7 @@ export default {
const self = this; const self = this;
assignUsersPlayRoles(data, this.$route.query.group).then(resp => { assignUsersPlayRoles(data, this.$route.query.group).then(resp => {
this.$message.success('调整角色成员成功!'); this.$message.success('调整角色成员成功!');
document.querySelector('.schema').style.zIndex = 35;
}).catch(() => { }).catch(() => {
self.memberData[nodeData.id].userId = ''; self.memberData[nodeData.id].userId = '';
this.$message.error('调整角色成员失败!'); this.$message.error('调整角色成员失败!');

View File

@ -533,7 +533,7 @@ export default {
height: 32px; height: 32px;
overflow: hidden; overflow: hidden;
padding-left: 44px; padding-left: 44px;
z-index: 360; z-index: 35;
.btn_hover{ .btn_hover{
position: absolute; position: absolute;
left: 0; left: 0;

View File

@ -87,7 +87,8 @@ export default {
runing: false, runing: false,
userId: '', userId: '',
faultMode: false, faultMode: false,
directiveMode: false directiveMode: false,
firstLoad: true
}; };
}, },
computed: { computed: {
@ -108,21 +109,21 @@ export default {
'$store.state.training.started': function (val) { '$store.state.training.started': function (val) {
this.setRuning(val); this.setRuning(val);
}, },
// '$store.state.training.switchcount': async function () { '$store.state.training.switchcount': async function () {
// if (this.group) { if (this.group) {
// const started = this.$store.state.training.started; const started = this.$store.state.training.started;
// if (started) { if (started) {
// await this.loadRunData(this.$route.query); await this.loadRunData(this.$route.query);
// } } else if (this.firstLoad) {
// } await this.loadRunData(this.$route.query);
// }, }
'$store.state.socket.runPlanReloadCount': function (val) { this.firstLoad = false;
this.loadRunData(this.$route.query); }
} }
}, },
async mounted() { async mounted() {
this.userId = this.$store.state.user.id; this.userId = this.$store.state.user.id;
await this.loadRunData(this.$route.query); // await this.loadRunData(this.$route.query);
}, },
methods: { methods: {
loadRunData(opt) { loadRunData(opt) {

View File

@ -436,9 +436,9 @@ export default {
case 'Axle': case 'Axle':
idPrefix = 'axle'; idPrefix = 'axle';
break; break;
case 'SwitchFault': // case 'SwitchFault':
idPrefix = 'switchFault'; // idPrefix = '';
break; // break;
} }
return idPrefix; return idPrefix;
}, },

View File

@ -9,7 +9,7 @@
</template> </template>
<script> <script>
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig, setPlcConfig } from '@/api/project'; import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig, setPlcConfig, setSandboxConfig } from '@/api/project';
import { getAllMapOnline, getStationListNeedAttendant, getPsdListByStandCode, getStandListByStationCode } from '@/api/jmap/map'; import { getAllMapOnline, getStationListNeedAttendant, getPsdListByStandCode, getStandListByStationCode } from '@/api/jmap/map';
export default { export default {
@ -101,6 +101,13 @@ export default {
{ prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' } { prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' }
] ]
}; };
} else if ( this.data.type === 'SANDBOX') {
form = {
labelWidth: '150px',
items: [
{ prop: 'deviceCode', label: '教研机', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code'}
]
};
} }
return form; return form;
} }
@ -232,6 +239,19 @@ export default {
self.$message.error(this.$t('tip.modifyTheFailure') + error.message); self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
}); });
}); });
} else if (this.data.type === 'SANDBOX') {
this.$refs.dataForm.validateForm(() => {
const param = {
deviceCode: this.formData.deviceCode
};
setSandboxConfig(this.data.id, param).then(() => {
self.$message.success('设置电子沙盘配置成员');
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
});
});
} }
}, },
handleClose() { handleClose() {

View File

@ -183,7 +183,7 @@ export default {
this.$refs.editConfig.doShow(row); this.$refs.editConfig.doShow(row);
} else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD' || row.type === 'PSL' || row.type === 'PSC') { } else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD' || row.type === 'PSL' || row.type === 'PSC') {
this.$refs.editConfigGateway.doShow(row); this.$refs.editConfigGateway.doShow(row);
} else if (row.type == 'LSW' || row.type == 'CCTV' || row.type == 'VR_PSD' || row.type === 'PLC_GATEWAY') { } else if (row.type == 'LSW' || row.type == 'CCTV' || row.type == 'VR_PSD' || row.type === 'PLC_GATEWAY' || row.type === 'SANDBOX') {
this.$refs.editConfigScreen.doShow(row); this.$refs.editConfigScreen.doShow(row);
} else if (row.type === 'IBP') { } else if (row.type === 'IBP') {
this.$refs.editConfigIbp.doShow(row); this.$refs.editConfigIbp.doShow(row);