国际采购 销售代码生成
This commit is contained in:
@ -2,7 +2,15 @@
|
||||
<div>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
|
||||
@visible-change="handleVisibleChange" >
|
||||
<BasicTable @register="registerTable" class="approListModal"></BasicTable>
|
||||
<BasicTable @register="registerTable" class="approListModal">
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.dataIndex === 'file'">
|
||||
<div v-for="item in (record.lngFileUploadList )" class="fileCSS">
|
||||
<a @click="handleDownload(item)">{{item.fileOrg}}</a>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</BasicModal>
|
||||
</div>
|
||||
</template>
|
||||
@ -13,7 +21,9 @@
|
||||
import { BasicTable, useTable, FormSchema, BasicColumn, TableAction } from '/@/components/Table';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { getLngApproPage} from '/@/api/approve/appro';
|
||||
import { getLngApproPageFile} from '/@/api/approve/appro';
|
||||
import { parseDownloadUrl} from '/@/api/system/file';
|
||||
import { downloadByUrl } from '/@/utils/file/download';
|
||||
|
||||
const { t } = useI18n();
|
||||
const codeFormSchema: FormSchema[] = [
|
||||
@ -22,12 +32,12 @@
|
||||
|
||||
const columns: BasicColumn[] = [
|
||||
{ dataIndex: 'title', title: '标题', align: 'left', },
|
||||
{ dataIndex: 'code', title: '编号', align: 'left', },
|
||||
{ dataIndex: 'typeName', title: '签报类型', align: 'left', },
|
||||
{ dataIndex: 'empName', title: '拟稿人', align: 'left', },
|
||||
{ dataIndex: 'bDeptName', title: '拟稿人所属部门', align: 'left', },
|
||||
{ dataIndex: 'dateAppro', title: '拟稿日期', align: 'left', },
|
||||
{ dataIndex: 'file', title: '附件', align: 'left', },
|
||||
{ dataIndex: 'code', title: '编号', align: 'left',width: 120 },
|
||||
{ dataIndex: 'typeName', title: '签报类型', align: 'left',width: 100 },
|
||||
{ dataIndex: 'empName', title: '拟稿人', align: 'left',width: 120 },
|
||||
{ dataIndex: 'bDeptName', title: '拟稿人所属部门', align: 'left',width: 120 },
|
||||
{ dataIndex: 'dateAppro', title: '拟稿日期', align: 'left', width: 120 },
|
||||
{ dataIndex: 'file', title: '附件', align: 'left',width: 200 },
|
||||
|
||||
];
|
||||
|
||||
@ -51,7 +61,7 @@
|
||||
|
||||
const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload }] = useTable({
|
||||
title: t('签报列表'),
|
||||
api: getLngApproPage,
|
||||
api: getLngApproPageFile,
|
||||
columns,
|
||||
|
||||
bordered: true,
|
||||
@ -71,6 +81,11 @@
|
||||
onChange: onSelectChange
|
||||
},
|
||||
});
|
||||
const handleDownload = (info) => {
|
||||
const url = parseDownloadUrl(info.response ? info.response.data.fileUrl : info.fileUrl);
|
||||
const fileName = info.response ? info.response.data.fileOrg : info.fileOrg;
|
||||
downloadByUrl({ url, fileName: fileName});
|
||||
};
|
||||
const handleVisibleChange = (visible: boolean) => {
|
||||
if (visible) {
|
||||
nextTick(() => {
|
||||
@ -104,8 +119,20 @@
|
||||
|
||||
</script>
|
||||
<style >
|
||||
.approListModal {
|
||||
width: 100%;
|
||||
}
|
||||
.approListModal .basicCol{
|
||||
position: inherit !important;
|
||||
top: 0;
|
||||
}
|
||||
.fileCSS a{
|
||||
width: 100%;
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user