From 696c5d4547b4906c198335abecb038ff51aa1a4f Mon Sep 17 00:00:00 2001 From: longyvfengyun <496960745@qq.com> Date: 星期四, 26 十月 2023 15:56:25 +0800 Subject: [PATCH] 提交版本说明 --- src/assets/version/img/反馈流程图.png | 0 version.md | 4 + src/pages/workplace/workplaceList.vue | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/router/config.js | 8 ++ README.md | 1 5 files changed, 178 insertions(+), 0 deletions(-) diff --git a/README.md b/README.md index 7bac601..5e61984 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,4 @@ <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> + diff --git "a/src/assets/version/img/\345\217\215\351\246\210\346\265\201\347\250\213\345\233\276.png" "b/src/assets/version/img/\345\217\215\351\246\210\346\265\201\347\250\213\345\233\276.png" new file mode 100644 index 0000000..e78ab90 --- /dev/null +++ "b/src/assets/version/img/\345\217\215\351\246\210\346\265\201\347\250\213\345\233\276.png" Binary files differ diff --git a/src/pages/workplace/workplaceList.vue b/src/pages/workplace/workplaceList.vue new file mode 100644 index 0000000..a5316bf --- /dev/null +++ b/src/pages/workplace/workplaceList.vue @@ -0,0 +1,165 @@ +<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> diff --git a/src/router/config.js b/src/router/config.js index 26e3fb9..998831f 100644 --- a/src/router/config.js +++ b/src/router/config.js @@ -41,6 +41,14 @@ component: () => import('@/pages/workplace'), }, { + path: 'workplaceList', + name: '瀹℃壒娴佹煡璇�', + meta: { + icon: "profile" + }, + component: () => import('@/pages/workplace/workplaceList') + }, + { path: 'resource', name: '璧勬簮绠$悊', meta: { diff --git a/version.md b/version.md new file mode 100644 index 0000000..9c55c7a --- /dev/null +++ b/version.md @@ -0,0 +1,4 @@ +#### 涓�銆佸弽棣堟祦绋嬪浘 +<p> +<img src="./src/assets/version/img/鍙嶉娴佺▼鍥�.png"/> +</p> -- Gitblit v1.9.1