画面管理处理设备map为空
local-test分支构建发布到本地服务器 / Build-Publish (push) Successful in 9m49s Details

This commit is contained in:
joylink_fanyuhong 2024-09-29 14:07:51 +08:00
parent 447a0e589c
commit 92a782de6b
13 changed files with 14 additions and 14 deletions

View File

@ -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'); const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === 'lucency');
if (picture) { if (picture) {
this.$jlmap.updateShowStation(list, ''); this.$jlmap.updateShowStation(list, '');
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {
@ -320,7 +320,7 @@ export default {
if (this.$store.state.map.map && this.$store.state.map.map.pictureList) { 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'); const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === 'chainStation');
if (picture) { if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {

View File

@ -100,7 +100,7 @@ export default {
this.show = true this.show = true
this.$nextTick(() => { this.$nextTick(() => {
const picData = this.mapData.pictureList.find(pic => pic.stationCodes.includes(stationCode) && pic.type === 'regionBatchOperation') 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 = [] const list = []
for (const deviceCode in picData.deviceMap) { for (const deviceCode in picData.deviceMap) {
list.push(deviceCode) list.push(deviceCode)

View File

@ -131,7 +131,7 @@ export default {
picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen'); picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
} }
if (picture) { if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {

View File

@ -49,7 +49,7 @@ export default {
if (this.mapData && this.mapData.pictureList) { if (this.mapData && this.mapData.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen'); const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
if (picture) { if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {

View File

@ -97,7 +97,7 @@ export default {
list.push(this.mapDevice[key]); list.push(this.mapDevice[key]);
deviceList.push(key); deviceList.push(key);
} }
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
setTimeout(() => { setTimeout(() => {
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
const trainingDetail = this.$store.state.trainingNew.trainingDetail; const trainingDetail = this.$store.state.trainingNew.trainingDetail;

View File

@ -61,7 +61,7 @@ export default {
if (this.mapData && this.mapData.pictureList) { if (this.mapData && this.mapData.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen'); const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
if (picture) { if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {

View File

@ -82,7 +82,7 @@ export default {
deviceList.push(key); deviceList.push(key);
} }
this.$jlmap.updateShowStation(list); this.$jlmap.updateShowStation(list);
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
setTimeout(() => { setTimeout(() => {
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(picture.scaling, picture.origin); this.$jlmap.updateTransform(picture.scaling, picture.origin);

View File

@ -89,7 +89,7 @@ export default {
list.push(this.mapDevice[key]); list.push(this.mapDevice[key]);
deviceList.push(key); deviceList.push(key);
} }
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
setTimeout(() => { setTimeout(() => {
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
const trainingDetail = this.$store.state.trainingNew.trainingDetail; const trainingDetail = this.$store.state.trainingNew.trainingDetail;

View File

@ -117,7 +117,7 @@ export default {
deviceList.push(key); deviceList.push(key);
} }
this.$jlmap.updateShowStation(list); this.$jlmap.updateShowStation(list);
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
setTimeout(() => { setTimeout(() => {
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
const trainingDetail = this.$store.state.trainingNew.trainingDetail; const trainingDetail = this.$store.state.trainingNew.trainingDetail;

View File

@ -92,7 +92,7 @@ export default {
deviceList.push(key); deviceList.push(key);
} }
this.$jlmap.updateShowStation(list); this.$jlmap.updateShowStation(list);
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(picture.scaling, picture.origin); this.$jlmap.updateTransform(picture.scaling, picture.origin);
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[this.roleDeviceCode]); this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[this.roleDeviceCode]);

View File

@ -118,7 +118,7 @@ export default {
list.push(this.mapDevice[key]); list.push(this.mapDevice[key]);
deviceList.push(key); deviceList.push(key);
} }
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
setTimeout(() => { setTimeout(() => {
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
const trainingDetail = this.$store.state.trainingNew.trainingDetail; const trainingDetail = this.$store.state.trainingNew.trainingDetail;

View File

@ -48,7 +48,7 @@ export default {
if (this.mapData && this.mapData.pictureList) { if (this.mapData && this.mapData.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen'); const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
if (picture) { if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {

View File

@ -451,7 +451,7 @@ export default {
this.$refs.mapOperate.pictureChanged(pictureName); this.$refs.mapOperate.pictureChanged(pictureName);
const pictureModel = this.$store.state.map.map.pictureList.find(elem => elem.name == pictureName); const pictureModel = this.$store.state.map.map.pictureList.find(elem => elem.name == pictureName);
const deviceMap = pictureModel ? pictureModel.deviceMap : {}; const deviceMap = pictureModel ? pictureModel.deviceMap : {};
this.$store.dispatch('map/setPictureDeviceMap', deviceMap); this.$store.dispatch('map/setPictureDeviceMap', deviceMap || {});
const deviceList = []; const deviceList = [];
const map = this.$store.state.map.map; const map = this.$store.state.map.map;
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;