画面管理处理设备map为空
This commit is contained in:
parent
5a7c5fdbeb
commit
92c66ab4d6
|
@ -299,7 +299,7 @@ export default {
|
|||
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === 'lucency');
|
||||
if (picture) {
|
||||
this.$jlmap.updateShowStation(list, '');
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
const deviceList = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const deviceCode in mapDevice) {
|
||||
|
@ -320,7 +320,7 @@ export default {
|
|||
if (this.$store.state.map.map && this.$store.state.map.map.pictureList) {
|
||||
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === 'chainStation');
|
||||
if (picture) {
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
const deviceList = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const deviceCode in mapDevice) {
|
||||
|
|
|
@ -100,7 +100,7 @@ export default {
|
|||
this.show = true
|
||||
this.$nextTick(() => {
|
||||
const picData = this.mapData.pictureList.find(pic => pic.stationCodes.includes(stationCode) && pic.type === 'regionBatchOperation')
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picData.deviceMap)
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picData.deviceMap || {})
|
||||
const list = []
|
||||
for (const deviceCode in picData.deviceMap) {
|
||||
list.push(deviceCode)
|
||||
|
|
|
@ -131,7 +131,7 @@ export default {
|
|||
picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
|
||||
}
|
||||
if (picture) {
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
const deviceList = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const deviceCode in mapDevice) {
|
||||
|
|
|
@ -49,7 +49,7 @@ export default {
|
|||
if (this.mapData && this.mapData.pictureList) {
|
||||
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
|
||||
if (picture) {
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
const deviceList = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const deviceCode in mapDevice) {
|
||||
|
|
|
@ -97,7 +97,7 @@ export default {
|
|||
list.push(this.mapDevice[key]);
|
||||
deviceList.push(key);
|
||||
}
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
setTimeout(() => {
|
||||
this.$jlmap.updatePicture(deviceList);
|
||||
const trainingDetail = this.$store.state.trainingNew.trainingDetail;
|
||||
|
|
|
@ -61,7 +61,7 @@ export default {
|
|||
if (this.mapData && this.mapData.pictureList) {
|
||||
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
|
||||
if (picture) {
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
const deviceList = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const deviceCode in mapDevice) {
|
||||
|
|
|
@ -82,7 +82,7 @@ export default {
|
|||
deviceList.push(key);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
setTimeout(() => {
|
||||
this.$jlmap.updatePicture(deviceList);
|
||||
this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
||||
|
|
|
@ -89,7 +89,7 @@ export default {
|
|||
list.push(this.mapDevice[key]);
|
||||
deviceList.push(key);
|
||||
}
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
setTimeout(() => {
|
||||
this.$jlmap.updatePicture(deviceList);
|
||||
const trainingDetail = this.$store.state.trainingNew.trainingDetail;
|
||||
|
|
|
@ -117,7 +117,7 @@ export default {
|
|||
deviceList.push(key);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
setTimeout(() => {
|
||||
this.$jlmap.updatePicture(deviceList);
|
||||
const trainingDetail = this.$store.state.trainingNew.trainingDetail;
|
||||
|
|
|
@ -92,7 +92,7 @@ export default {
|
|||
deviceList.push(key);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
this.$jlmap.updatePicture(deviceList);
|
||||
this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[this.roleDeviceCode]);
|
||||
|
|
|
@ -118,7 +118,7 @@ export default {
|
|||
list.push(this.mapDevice[key]);
|
||||
deviceList.push(key);
|
||||
}
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
setTimeout(() => {
|
||||
this.$jlmap.updatePicture(deviceList);
|
||||
const trainingDetail = this.$store.state.trainingNew.trainingDetail;
|
||||
|
|
|
@ -48,7 +48,7 @@ export default {
|
|||
if (this.mapData && this.mapData.pictureList) {
|
||||
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
|
||||
if (picture) {
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
|
||||
const deviceList = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const deviceCode in mapDevice) {
|
||||
|
|
|
@ -451,7 +451,7 @@ export default {
|
|||
this.$refs.mapOperate.pictureChanged(pictureName);
|
||||
const pictureModel = this.$store.state.map.map.pictureList.find(elem => elem.name == pictureName);
|
||||
const deviceMap = pictureModel ? pictureModel.deviceMap : {};
|
||||
this.$store.dispatch('map/setPictureDeviceMap', deviceMap);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', deviceMap || {});
|
||||
const deviceList = [];
|
||||
const map = this.$store.state.map.map;
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
|
|
Loading…
Reference in New Issue