实训画面位置切换调整
This commit is contained in:
parent
ace0f3d0ae
commit
79e27bf5dc
@ -24,12 +24,12 @@ export function handlerUrl(data) {
|
|||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// const data = null;
|
// const data = null;
|
||||||
// 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.233/rtss-server';
|
// BASE_API = 'http://192.168.3.233/rtss-server';
|
||||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||||
// BASE_API = 'http://192.168.3.90:9100'; // 周寅
|
// BASE_API = 'http://192.168.3.90:9100'; // 周寅
|
||||||
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
||||||
BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
|
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
|
||||||
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
|
@ -94,13 +94,38 @@ export default {
|
|||||||
'$store.state.training.simulationUserList': function(val) {
|
'$store.state.training.simulationUserList': function(val) {
|
||||||
const userInfo = this.$store.state.training.simulationUserList.find(user => user.userId == this.$store.state.user.id );
|
const userInfo = this.$store.state.training.simulationUserList.find(user => user.userId == this.$store.state.user.id );
|
||||||
if (userInfo.type === 'STATION_SUPERVISOR') {
|
if (userInfo.type === 'STATION_SUPERVISOR') {
|
||||||
this.$store.dispatch('map/setShowCentralizedStationCode', userInfo.deviceCode);
|
if (this.$store.state.map.map && this.$store.state.map.map.pictureList) {
|
||||||
const mapDevice = this.$store.state.map.mapDevice;
|
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === userInfo.deviceCode && picture.type === 'chainStation');
|
||||||
const list = [];
|
if (picture) {
|
||||||
for (const key in mapDevice) {
|
const mapDevice = this.$store.state.map.mapDevice;
|
||||||
list.push(mapDevice[key]);
|
const list = [];
|
||||||
|
const deviceList = [];
|
||||||
|
for (const key in mapDevice) {
|
||||||
|
list.push(mapDevice[key]);
|
||||||
|
deviceList.push(key);
|
||||||
|
}
|
||||||
|
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||||
|
this.$jlmap.updatePicture(deviceList);
|
||||||
|
// this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
||||||
|
this.$store.dispatch('map/setShowCentralizedStationCode', userInfo.deviceCode);
|
||||||
|
} else {
|
||||||
|
this.$store.dispatch('map/setShowCentralizedStationCode', userInfo.deviceCode);
|
||||||
|
const mapDevice = this.$store.state.map.mapDevice;
|
||||||
|
const list = [];
|
||||||
|
for (const key in mapDevice) {
|
||||||
|
list.push(mapDevice[key]);
|
||||||
|
}
|
||||||
|
this.$jlmap.updateShowStation(list, userInfo.deviceCode);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$store.dispatch('map/setShowCentralizedStationCode', userInfo.deviceCode);
|
||||||
|
const mapDevice = this.$store.state.map.mapDevice;
|
||||||
|
const list = [];
|
||||||
|
for (const key in mapDevice) {
|
||||||
|
list.push(mapDevice[key]);
|
||||||
|
}
|
||||||
|
this.$jlmap.updateShowStation(list, userInfo.deviceCode);
|
||||||
}
|
}
|
||||||
this.$jlmap.updateShowStation(list, userInfo.deviceCode);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -228,13 +253,38 @@ export default {
|
|||||||
checkRoleChange(list) {
|
checkRoleChange(list) {
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
if (item.messageType === 'PLAY_CHANGE' && item.userId == this.$store.state.user.id && item.type === 'STATION_SUPERVISOR') {
|
if (item.messageType === 'PLAY_CHANGE' && item.userId == this.$store.state.user.id && item.type === 'STATION_SUPERVISOR') {
|
||||||
this.$store.dispatch('map/setShowCentralizedStationCode', item.deviceCode);
|
if (this.$store.state.map.map && this.$store.state.map.map.pictureList) {
|
||||||
const mapDevice = this.$store.state.map.mapDevice;
|
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === item.deviceCode && picture.type === 'chainStation');
|
||||||
const list = [];
|
if (picture) {
|
||||||
for (const key in mapDevice) {
|
const mapDevice = this.$store.state.map.mapDevice;
|
||||||
list.push(mapDevice[key]);
|
const list = [];
|
||||||
|
const deviceList = [];
|
||||||
|
for (const key in mapDevice) {
|
||||||
|
list.push(mapDevice[key]);
|
||||||
|
deviceList.push(key);
|
||||||
|
}
|
||||||
|
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||||
|
this.$jlmap.updatePicture(deviceList);
|
||||||
|
// this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
||||||
|
this.$store.dispatch('map/setShowCentralizedStationCode', item.deviceCode);
|
||||||
|
} else {
|
||||||
|
this.$store.dispatch('map/setShowCentralizedStationCode', item.deviceCode);
|
||||||
|
const mapDevice = this.$store.state.map.mapDevice;
|
||||||
|
const list = [];
|
||||||
|
for (const key in mapDevice) {
|
||||||
|
list.push(mapDevice[key]);
|
||||||
|
}
|
||||||
|
this.$jlmap.updateShowStation(list, item.deviceCode);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$store.dispatch('map/setShowCentralizedStationCode', item.deviceCode);
|
||||||
|
const mapDevice = this.$store.state.map.mapDevice;
|
||||||
|
const list = [];
|
||||||
|
for (const key in mapDevice) {
|
||||||
|
list.push(mapDevice[key]);
|
||||||
|
}
|
||||||
|
this.$jlmap.updateShowStation(list, item.deviceCode);
|
||||||
}
|
}
|
||||||
this.$jlmap.updateShowStation(list, item.deviceCode);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -129,14 +129,42 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.training.simulationUserList': function(val) {
|
'$store.state.training.simulationUserList': function(val) {
|
||||||
const userInfo = this.$store.state.training.simulationUserList.find(user => user.userId == this.$store.state.user.id );
|
const userInfo = this.$store.state.training.simulationUserList.find(user => user.userId == this.$store.state.user.id );
|
||||||
if (userInfo.type === 'STATION_SUPERVISOR') {
|
if (userInfo.type === 'STATION_SUPERVISOR' || userInfo.type === 'STATION_WORKER') {
|
||||||
this.$store.dispatch('map/setShowCentralizedStationCode', userInfo.deviceCode);
|
if (this.$store.state.map.map && this.$store.state.map.map.pictureList) {
|
||||||
const mapDevice = this.$store.state.map.mapDevice;
|
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === userInfo.deviceCode && picture.type === 'chainStation');
|
||||||
const list = [];
|
console.log(picture, '----------');
|
||||||
for (const key in mapDevice) {
|
if (picture) {
|
||||||
list.push(mapDevice[key]);
|
const mapDevice = this.$store.state.map.mapDevice;
|
||||||
|
const list = [];
|
||||||
|
const deviceList = [];
|
||||||
|
for (const key in mapDevice) {
|
||||||
|
list.push(mapDevice[key]);
|
||||||
|
deviceList.push(key);
|
||||||
|
}
|
||||||
|
console.log('-------------');
|
||||||
|
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||||
|
this.$jlmap.updatePicture(deviceList);
|
||||||
|
// this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
||||||
|
this.$store.dispatch('map/setShowCentralizedStationCode', userInfo.deviceCode);
|
||||||
|
} else {
|
||||||
|
this.$store.dispatch('map/setShowCentralizedStationCode', userInfo.deviceCode);
|
||||||
|
const mapDevice = this.$store.state.map.mapDevice;
|
||||||
|
const list = [];
|
||||||
|
for (const key in mapDevice) {
|
||||||
|
list.push(mapDevice[key]);
|
||||||
|
}
|
||||||
|
this.$jlmap.updateShowStation(list, userInfo.deviceCode);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log('-------------1');
|
||||||
|
this.$store.dispatch('map/setShowCentralizedStationCode', userInfo.deviceCode);
|
||||||
|
const mapDevice = this.$store.state.map.mapDevice;
|
||||||
|
const list = [];
|
||||||
|
for (const key in mapDevice) {
|
||||||
|
list.push(mapDevice[key]);
|
||||||
|
}
|
||||||
|
this.$jlmap.updateShowStation(list, userInfo.deviceCode);
|
||||||
}
|
}
|
||||||
this.$jlmap.updateShowStation(list, userInfo.deviceCode);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.simulationRoleList':function(list) {
|
'$store.state.socket.simulationRoleList':function(list) {
|
||||||
|
Loading…
Reference in New Issue
Block a user