| | |
| | | <img src="./src/assets/img/alipay.png" width="320px" style="display: inline-block;" /> |
| | | <img src="./src/assets/img/wechatpay.png" width="320px" style="display: inline-block; margin-left: 24px;" /> |
| | | </p> |
| | | |
New file |
| | |
| | | <script> |
| | | import AdvanceTable from "@/components/table/advance/AdvanceTable"; |
| | | import {mapGetters} from "vuex"; |
| | | export default { |
| | | name: "workplaceList", |
| | | components: { |
| | | AdvanceTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | y: 400, |
| | | update: -1, |
| | | spinning: false, |
| | | loading: false, |
| | | pageCurr: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | columns: [], |
| | | dataSource: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | update(n) { |
| | | if (-1 != n && !this._inactive) { |
| | | this.$nextTick(() => { |
| | | const table = this.$refs.table; |
| | | const header = document.querySelectorAll( |
| | | ".doc-center-table .ant-table-header" |
| | | )[0].clientHeight; |
| | | const bar = document.querySelectorAll(".header-bar")[0].clientHeight; |
| | | if (table.fullScreen) { |
| | | this.y = table.$el.clientHeight - bar - header - 64; |
| | | } else { |
| | | const wraper = this.$refs.wraper.clientHeight; |
| | | const card = document.querySelectorAll(".ant-card-body")[0]; |
| | | const { paddingBottom, paddingTop } = getComputedStyle(card, null); |
| | | const h = |
| | | wraper - |
| | | header - |
| | | 64 - |
| | | bar - |
| | | parseInt(paddingBottom) - |
| | | parseInt(paddingTop); |
| | | console.log(h, "h",wraper, header, bar ); |
| | | this.y = h; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | affixed() { |
| | | setTimeout(() => { |
| | | this.update = Math.random(); |
| | | }, 200); |
| | | }, |
| | | }, |
| | | methods: { |
| | | resize() { |
| | | setTimeout(() => { |
| | | this.update = Math.random(); |
| | | }, 200); |
| | | }, |
| | | activeFN() { |
| | | this.resize(); |
| | | }, |
| | | rowClassFn(record) { |
| | | let classList = []; |
| | | if (record.enabled == -1) { |
| | | classList.push("locked"); |
| | | } |
| | | return classList; |
| | | }, |
| | | searchData() { |
| | | if (-1 == this.update) { |
| | | this.update = Math.random(); |
| | | } |
| | | }, |
| | | onSearch(conditions, searchOptions) { |
| | | this.pageCurr = 1; |
| | | this.conditions = conditions; |
| | | this.searchData(); |
| | | }, |
| | | onPageChange(page, pageSize) { |
| | | this.pageCurr = page; |
| | | this.pageSize = pageSize; |
| | | this.searchData(); |
| | | }, |
| | | onSizeChange(current, size) { |
| | | this.pageCurr = 1; |
| | | this.pageSize = size; |
| | | this.searchData(); |
| | | }, |
| | | onRefresh(conditions) { |
| | | this.conditions = conditions; |
| | | this.searchData(); |
| | | }, |
| | | onReset(conditions) { |
| | | this.conditions = conditions; |
| | | this.searchData(); |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters("setting", ["affixed"]), |
| | | }, |
| | | mounted() { |
| | | this.searchData(); |
| | | window.addEventListener("resize", this.resize); |
| | | }, |
| | | destroyed() { |
| | | window.removeEventListener("resize", this.resize); |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main"> |
| | | <div class="inner" ref="wraper"> |
| | | <a-spin class="" :spinning="spinning" tip="æ¼å½å è½½ä¸..."> |
| | | <a-card> |
| | | <advance-table |
| | | ref="table" |
| | | class="doc-center-table" |
| | | :data-source="dataSource" |
| | | :columns="columns" |
| | | :loading="loading" |
| | | title="" |
| | | row-key="id" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | | :format-conditions="true" |
| | | :scroll="{ x: 400, y }" |
| | | :pagination="{ |
| | | current: pageCurr, |
| | | pageSize: pageSize, |
| | | total: total, |
| | | showSizeChanger: true, |
| | | showLessItems: true, |
| | | showQuickJumper: true, |
| | | pageSizeOptions: ['10', '20', '50', '100'], |
| | | showTotal: (total, range) => |
| | | `第 ${range[0]}-${range[1]} æ¡ï¼æ»è®¡ ${total} æ¡`, |
| | | onChange: onPageChange, |
| | | onShowSizeChange: onSizeChange, |
| | | }" |
| | | :rowClassName="rowClassFn"></advance-table> |
| | | </a-card> |
| | | </a-spin> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped lang="less"> |
| | | .main { |
| | | height: 100%; |
| | | position: relative; |
| | | |
| | | .inner { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | component: () => import('@/pages/workplace'), |
| | | }, |
| | | { |
| | | path: 'workplaceList', |
| | | name: 'å®¡æ¹æµæ¥è¯¢', |
| | | meta: { |
| | | icon: "profile" |
| | | }, |
| | | component: () => import('@/pages/workplace/workplaceList') |
| | | }, |
| | | { |
| | | path: 'resource', |
| | | name: 'èµæºç®¡ç', |
| | | meta: { |
New file |
| | |
| | | #### ä¸ãå馿µç¨å¾ |
| | | <p> |
| | | <img src="./src/assets/version/img/å馿µç¨å¾.png"/> |
| | | </p> |