1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import { mapState } from 'vuex';
- export default {
- data() {
- return {
- loadding: true
- };
- },
- computed: {
- //全局社区
- ...mapState(['globalCommunity']),
- resize() {
- // 通过scale值来判断窗口是变化
- return this.$store.getters['getScale'];
- }
- },
- watch: {
- globalCommunity: {
- handler(newVal, oldVal) {
- if (!!newVal.type) {
- this.mixins_query.communityId = null;
- this.mixins_query.companyIds = newVal.value.join();
- } else {
- this.mixins_query.companyIds = null;
- this.mixins_query.communityId = newVal.value.join();
- }
- this.getData();
- },
- deep: true
- },
- resize(va) {
- // console.log(va);
- }
- },
- methods: {},
- created() {
- const { type, value } = this.globalCommunity
- if (!!type) {
- this.mixins_query.communityId = null;
- this.mixins_query.companyIds = value.join();
- } else {
- this.mixins_query.companyIds = null;
- this.mixins_query.communityId = value.join();
- }
- }
- };
|