| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <div>
- <!-- 数据表格 -->
- <ele-pro-table
- ref="table"
- :columns="columns"
- :datasource="tableList"
- tool-class="ele-toolbar-form"
- :needPage="false"
- >
- </ele-pro-table>
- </div>
- </template>
- <script>
- import { queryRelease } from '@/api/doc-manage';
- export default {
- props: {
- // 上级id
- parentId: [Number, String]
- },
- data() {
- return {
- // 表格列配置
- tableList:[],
- columns: [
- {
- columnKey: 'index',
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center',
- showOverflowTooltip: true,
- },
- {
- prop: 'versionNum',
- label: '版本',
- align: 'center',
- slot: 'versionNum',
- showOverflowTooltip: true,
- width: 100
- },
- {
- prop: 'fileName',
- label: '文档名称',
- align: 'center',
- slot: 'fileName',
- showOverflowTooltip: true,
- minWidth: 200
- },
- {
- prop: 'storagePath',
- label: '文件名称',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 200,
- formatter: (_row, _column, cellValue) => {
- // return '';
- return cellValue[0]?.name
- }
- },
- {
- prop: 'operationUserName',
- label: '发布人',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 100
- },
- {
- prop: 'createTime',
- label: '发布时间',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 160
- },
- {
- prop: 'createUserName',
- label: '创建人',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 100
- },
-
- {
- prop: 'sizeUnit',
- label: '文档大小',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 100
- }
- // {
- // prop: '',
- // label: '状态',
- // align: 'center',
- // showOverflowTooltip: true,
- // minWidth: 100,
- // }
- ]
- };
- },
- watch:{
- parentId(val){
- if(val){
- this.getList(val)
- }
- }
- },
- methods: {
- async getList() {
- this.tableList = await queryRelease(this.parentId);
- },
- init() {
- this.$nextTick(() => {
- this.$refs.table.reRenderTable()
- });
- }
- }
- };
- </script>
|