| | |
| | | </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'; |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | ...mapGetters(["permission","userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.pass_add, true), |
| | |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | permit(){ |
| | | return this.userInfo.role_name == 'admin' || this.userInfo.role_name == 'administrator' ? true:false |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | 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; |