大件运输联网系统前端代码
guoshilong
2022-12-20 b2832a9c5d287b8a11c0e7ba312bfd45f195d8df
src/views/pass/pass.vue
@@ -52,7 +52,7 @@
</template>
<script>
  import {getList, getDetail, add, update, remove} from "@/api/pass/pass";
  import {getPage, getDetail, add, update, remove} from "@/api/pass/pass";
  import option from "@/const/pass/pass";
  import {mapGetters} from "vuex";
  import QRCode from 'qrcodejs2';
@@ -76,7 +76,7 @@
      };
    },
    computed: {
      ...mapGetters(["permission"]),
      ...mapGetters(["permission","userInfo"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.pass_add, true),
@@ -91,6 +91,9 @@
          ids.push(ele.id);
        });
        return ids.join(",");
      },
      permit(){
        return this.userInfo.role_name == 'admin' || this.userInfo.role_name == 'administrator' ? true:false
      }
    },
    methods: {
@@ -195,7 +198,12 @@
      },
      onLoad(page, params = {}) {
        this.loading = true;
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
        if (!this.permit){
          params.userId = this.userInfo.user_id
        }
        getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;