新增待办信息
This commit is contained in:
@@ -25,6 +25,7 @@ export interface BizMailAttachments extends BasicModel<BizMailAttachments> {
|
||||
downloadCount?: number; // 下载次数
|
||||
isCompressed?: string; // 是否压缩
|
||||
isEncrypted?: string; // 是否加密
|
||||
svgIcon?: string; //文件图标
|
||||
}
|
||||
|
||||
export const bizMailAttachmentsList = (params?: BizMailAttachments | any) =>
|
||||
|
||||
@@ -34,19 +34,15 @@
|
||||
<div class="attachment-icon-wrapper">
|
||||
<Icon :icon="item.svgIcon" size="24" />
|
||||
</div>
|
||||
|
||||
<div class="attachment-info-wrapper">
|
||||
<div class="file-info-row">
|
||||
<span class="attachment-name">{{ item.fileName }}</span>
|
||||
<span class="attachment-size">({{ formatFileSize(item.fileSize) }})</span>
|
||||
<a-button type="link" size="small" @click="downloadAttachment(item)">
|
||||
<Icon icon="ant-design:cloud-download-outlined"/>
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="attachment-action-wrapper">
|
||||
<button class="download-btn" @click="downloadAttachment(item)">
|
||||
下载
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,27 +54,19 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, PropType } from 'vue';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
import { BizMailReceived } from '@jeesite/biz/api/biz/mailReceived';
|
||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||
import { downloadByUrl } from '@jeesite/core/utils/file/download';
|
||||
import { BizMailAttachments, bizMailAttachmentsListAll } from '@jeesite/biz/api/biz/mailAttachments';
|
||||
|
||||
// 定义自定义图标配置类型
|
||||
interface CustomIconConfig {
|
||||
default?: string;
|
||||
types?: Record<string, string>;
|
||||
exts?: Record<string, string>;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
components: { BasicModal },
|
||||
components: { BasicModal, Icon },
|
||||
emits: ['modalClose'],
|
||||
setup(props, { emit }) {
|
||||
const ReceivedList = ref<BizMailReceived>();
|
||||
const MailAttachments = ref<BizMailAttachments[]>([]);
|
||||
const { createMessage } = useMessage();
|
||||
|
||||
const [register, { closeModal }] = useModalInner(async (data: any) => {
|
||||
if (!data) return;
|
||||
@@ -100,6 +88,7 @@
|
||||
};
|
||||
|
||||
async function downloadAttachment(attachment: BizMailAttachments) {
|
||||
message.success("附件正在下载中,请稍后...");
|
||||
const { ctxAdminPath } = useGlobSetting();
|
||||
await downloadByUrl({
|
||||
url: ctxAdminPath + '/biz/mailAttachments/downloadFile',
|
||||
@@ -317,7 +306,7 @@
|
||||
background: #ffffff;
|
||||
border: 1px solid #d1e7ff;
|
||||
border-radius: 6px;
|
||||
padding: 8px 10px;
|
||||
padding: 4px 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
@@ -345,20 +334,6 @@
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.attachment-icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
border-radius: 2px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.attachment-icon[src] {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.attachment-info-wrapper {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
Reference in New Issue
Block a user