|
@@ -52,15 +52,13 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import smallModuleIndex from '@views/smallModule/index.js';
|
|
import smallModuleIndex from '@views/smallModule/index.js';
|
|
|
|
+import { mapState } from 'vuex';
|
|
export default {
|
|
export default {
|
|
mixins: [smallModuleIndex],
|
|
mixins: [smallModuleIndex],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
showChart: true,
|
|
showChart: true,
|
|
- edit: true,
|
|
|
|
loadding: true,
|
|
loadding: true,
|
|
- width: '',
|
|
|
|
- height: '',
|
|
|
|
openCur: null,
|
|
openCur: null,
|
|
deviceArr: [
|
|
deviceArr: [
|
|
{
|
|
{
|
|
@@ -84,12 +82,16 @@ export default {
|
|
label: '电表'
|
|
label: '电表'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
|
|
+ mixins_query: {
|
|
|
|
+ communityId: ''
|
|
|
|
+ },
|
|
showPointArr: [1, 2, 3, 4, 5],
|
|
showPointArr: [1, 2, 3, 4, 5],
|
|
point: [],
|
|
point: [],
|
|
- imgUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg9.51tietu.net%2Fpic%2F2019-091407%2Fores3oho25bores3oho25b.jpg&refer=http%3A%2F%2Fimg9.51tietu.net&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1656730680&t=2eb039923a58add4080cd042c1e4e9eb'
|
|
|
|
|
|
+ imgUrl: require('@/assets/img/homeIcon/bg_bottom.png')
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
|
|
+ ...mapState(['homeCommunityAll']),
|
|
points() {
|
|
points() {
|
|
let showArr = [];
|
|
let showArr = [];
|
|
this.point.map((item) => {
|
|
this.point.map((item) => {
|
|
@@ -100,6 +102,15 @@ export default {
|
|
return showArr;
|
|
return showArr;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ //全局社区接口调用
|
|
|
|
+ homeCommunityAll(val) {
|
|
|
|
+ try {
|
|
|
|
+ this.mixins_query.communityId = val;
|
|
|
|
+ this.getData();
|
|
|
|
+ } catch {}
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
addPoint() {
|
|
addPoint() {
|
|
if (this.openCur == 1) {
|
|
if (this.openCur == 1) {
|
|
@@ -121,13 +132,15 @@ export default {
|
|
togglePop(row) {
|
|
togglePop(row) {
|
|
let url = '',
|
|
let url = '',
|
|
width = '2.89rem',
|
|
width = '2.89rem',
|
|
- height = '2.25rem';
|
|
|
|
|
|
+ height = '2.25rem',showHide=false;
|
|
|
|
+
|
|
if (row.deviceType == 1) {
|
|
if (row.deviceType == 1) {
|
|
url = 'typeCamera';
|
|
url = 'typeCamera';
|
|
} else if (row.deviceType == 2) {
|
|
} else if (row.deviceType == 2) {
|
|
url = 'typeAccessControl';
|
|
url = 'typeAccessControl';
|
|
} else if (row.deviceType == 3) {
|
|
} else if (row.deviceType == 3) {
|
|
url = 'typeCard';
|
|
url = 'typeCard';
|
|
|
|
+ showHide = true
|
|
} else if (row.deviceType == 4 || row.deviceType == 5) {
|
|
} else if (row.deviceType == 4 || row.deviceType == 5) {
|
|
url = 'typeHydropower';
|
|
url = 'typeHydropower';
|
|
height = '2.65rem';
|
|
height = '2.65rem';
|
|
@@ -141,7 +154,8 @@ export default {
|
|
height: height,
|
|
height: height,
|
|
fullscreen: false,
|
|
fullscreen: false,
|
|
showFooter: true,
|
|
showFooter: true,
|
|
- showAlarm:true,
|
|
|
|
|
|
+ showAlarm: true,
|
|
|
|
+ showHide:showHide,
|
|
props: {
|
|
props: {
|
|
row,
|
|
row,
|
|
callback: resolve
|
|
callback: resolve
|
|
@@ -170,7 +184,7 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- this.getPoint();
|
|
|
|
|
|
+ this.getData();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
pointClose(item) {
|
|
pointClose(item) {
|
|
@@ -182,7 +196,7 @@ export default {
|
|
type: 'success',
|
|
type: 'success',
|
|
message: '删除成功!'
|
|
message: '删除成功!'
|
|
});
|
|
});
|
|
- this.getPoint();
|
|
|
|
|
|
+ this.getData();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})
|
|
})
|
|
@@ -191,9 +205,9 @@ export default {
|
|
toggleShow() {
|
|
toggleShow() {
|
|
this.showChart = !this.showChart;
|
|
this.showChart = !this.showChart;
|
|
},
|
|
},
|
|
- getPoint() {
|
|
|
|
|
|
+ getData() {
|
|
this.$http
|
|
this.$http
|
|
- .post('/sc-community/community/layer/list', { communityId: this.$store.getters['getHomeCommunityAll'] })
|
|
|
|
|
|
+ .post('/sc-community/community/layer/list', this.mixins_query)
|
|
.then(({ status, data, msg }) => {
|
|
.then(({ status, data, msg }) => {
|
|
if (status == 0 && !!data) {
|
|
if (status == 0 && !!data) {
|
|
this.point = data;
|
|
this.point = data;
|
|
@@ -207,7 +221,9 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
created() {
|
|
created() {
|
|
- this.getPoint();
|
|
|
|
|
|
+ if (!!this.mixins_query.communityId) {
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|