研发图纸文件管理系统-前端项目
longyvfengyun
2023-10-26 696c5d4547b4906c198335abecb038ff51aa1a4f
提交版本说明
2个文件已修改
3个文件已添加
178 ■■■■■ 已修改文件
README.md 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/version/img/反馈流程图.png 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/workplaceList.vue 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/config.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
version.md 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
src/assets/version/img/·´À¡Á÷³Ìͼ.png
src/pages/workplace/workplaceList.vue
New file
@@ -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>
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: {
version.md
New file
@@ -0,0 +1,4 @@
#### ä¸€ã€åé¦ˆæµç¨‹å›¾
<p>
<img src="./src/assets/version/img/反馈流程图.png"/>
</p>