<template>
  <div id="policy">
    <supermarkettable-detail :info="info"></supermarkettable-detail>
  </div>
</template>

<script>
import supermarkettableDetail from '@/components/supermaket/supermarkettableDetail.vue';
import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
import _ from 'loadsh';
const { mapActions: mapSite } = createNamespacedHelpers('site');
export default {
  name: 'policy',
  props: {},
  components: {
    supermarkettableDetail,
  },
  data: () => ({
    info: {},
    policyInfo: {},
    display: 'list',
    columnName: '',
    contentList: [],
    total: 1,
    skip: '',
  }),
  async created() {
    this.searchSite();
  },
  computed: {
    totaltype() {
      return this.$route.query.totaltype;
    },
  },
  methods: {
    ...mapSite(['showInfo']),

    // 查询站点信息
    async searchSite() {
      let res = await this.showInfo();
      let object = JSON.parse(JSON.stringify(res.data));
      if (object) {
        this.$set(this, `info`, res.data);
      } else {
        this.$message.error(res.errmsg ? res.errmsg : 'error');
      }
    },
  },
};
</script>

<style lang="scss" scoped></style>
