Browse Source

压缩包固定名称

master
wenlele 1 year ago
parent
commit
021fd7414b
  1. 16
      web/client/src/sections/dataQuality/containers/documentLibrary.js
  2. 22
      web/client/src/sections/safetySpecification/containers/specificationLibrary.js

16
web/client/src/sections/dataQuality/containers/documentLibrary.js

@ -92,7 +92,7 @@ function Approve ({ loading, clientHeight, actions, dispatch, }) {
})
Promise.all(result).then(() => {
zip.generateAsync({ type: "blob" }).then((res) => {
saveAs(res, `${111}.zip`)
saveAs(res, `标准文档.zip`)
})
})
}
@ -170,13 +170,11 @@ function Approve ({ loading, clientHeight, actions, dispatch, }) {
<Popconfirm
title="是否删除文件夹或文件?当有创建的业务规则与标准文档关联时则不允许删除。"
onConfirm={() => {
console.log(folderId.current, fileId.current);
if (folderId.current?.length || fileId.current?.length) {
dispatch(dataQuality.postFolderFile({ folderId: folderId.current, fileId: fileId.current })).then(res => {
if (res.success) {
resourceData(parent, keywords)
setCheckAll(false)
console.log(res);
res.payload.data?.map(v => {
RouteRequest.delete(RouteTable.cleanUpUploadTrash, { url: v });
})
@ -275,8 +273,8 @@ function Approve ({ loading, clientHeight, actions, dispatch, }) {
}} >
<CreditCardFilled style={{ fontSize: 96, color: 'rgb(238 200 44)', marginRight: 8 }} />
<div style={{ width: 200, display: 'flex', flexDirection: 'column', justifyContent: 'space-evenly' }}>
<div style={{
width: 100, whiteSpace: 'nowrap', overflow: 'hidden', fontWeight: 400,
<div title={v.name} style={{
width: 200, whiteSpace: 'nowrap', overflow: 'hidden', fontWeight: 400,
textOverflow: 'ellipsis', fontSize: 18, color: 'rgb(51 161 34)'
}}>
{v.name}
@ -301,13 +299,15 @@ function Approve ({ loading, clientHeight, actions, dispatch, }) {
}}>
<FilePdfOutlined style={{ fontSize: 96, color: 'rgb(33 211 180)', marginRight: 8 }} />
<div style={{ width: 200, display: 'flex', flexDirection: 'column', justifyContent: 'space-evenly' }}>
<div style={{
width: 100, whiteSpace: 'nowrap', overflow: 'hidden', fontWeight: 400,
<div title={v.docName} style={{
width: 200, whiteSpace: 'nowrap', overflow: 'hidden', fontWeight: 400,
textOverflow: 'ellipsis', fontSize: 18, color: 'rgb(51 161 34)'
}}>
{v.docName}
</div>
<div>标签{v.tags || '--'}</div>
<div title={v.tags} style={{
width: 200, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'
}}>标签{v.tags || '--'}</div>
<div>标准类型{v.standardType}</div>
<div>创建时间{v.createAt && moment(v.createAt).format('YYYY-MM-DD HH:mm:ss') || '--'}</div>
</div>

22
web/client/src/sections/safetySpecification/containers/specificationLibrary.js

@ -5,7 +5,7 @@ import { RouteRequest } from '@peace/utils';
import { RouteTable } from '$utils'
import SimpleBar from 'simplebar-react';
import FileModal from '../components/fileModal';
import { Input, Space, Button, message, Pagination } from 'antd';
import { Input, Space, Button, message, Pagination, Popconfirm } from 'antd';
const { Search } = Input;
import { FilePdfOutlined } from '@ant-design/icons';
@ -69,7 +69,7 @@ function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) {
})
Promise.all(result).then(() => {
zip.generateAsync({ type: "blob" }).then((res) => {
saveAs(res, `${111}.zip`)
saveAs(res, `数据安全规范.zip`)
})
})
@ -109,7 +109,9 @@ function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) {
});
}
}}>下载</Button>
<Button type="primary" onClick={() => {
<Popconfirm
title="确认删除选中的文件吗?"
onConfirm={() => {
if (fileId.current?.length) {
dispatch(safetySpecification.delSpecifications(fileId.current)).then(res => {
if (res.success) {
@ -135,7 +137,11 @@ function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) {
content: '未选择文件',
});
}
}}>删除</Button>
}}
>
<Button type="primary" >删除</Button>
</Popconfirm>
</Space>
<Search
@ -177,13 +183,15 @@ function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) {
}}>
<FilePdfOutlined style={{ fontSize: 96, color: 'rgb(33 211 180)', marginRight: 8 }} />
<div style={{ width: 200, display: 'flex', flexDirection: 'column', justifyContent: 'space-evenly' }}>
<div style={{
width: 100, whiteSpace: 'nowrap', overflow: 'hidden', fontWeight: 400,
<div title={v.fileName} style={{
width: 200, whiteSpace: 'nowrap', overflow: 'hidden', fontWeight: 400,
textOverflow: 'ellipsis', fontSize: 18, color: 'rgb(51 161 34)'
}}>
{v.fileName}
</div>
<div>标签{v.tags || '--'}</div>
<div title={v.tags} style={{
width: 200, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'
}}>标签{v.tags || '--'}</div>
<div>创建时间{v.createAt && moment(v.createAt).format('YYYY-MM-DD HH:mm:ss') || '--'}</div>
</div>
</div>

Loading…
Cancel
Save