|
@ -14,7 +14,7 @@ const CheckboxGroup = Checkbox.Group; |
|
|
|
|
|
|
|
|
function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) { |
|
|
function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) { |
|
|
|
|
|
|
|
|
const { resourceRetrieval } = actions |
|
|
const { safetySpecification } = actions |
|
|
const [checkAll, setCheckAll] = useState(false) |
|
|
const [checkAll, setCheckAll] = useState(false) |
|
|
const [query, setQuery] = useState({ page: 0, limit: 20 }); |
|
|
const [query, setQuery] = useState({ page: 0, limit: 20 }); |
|
|
const [fileData, setFileData] = useState({ data: [], count: 0 }) |
|
|
const [fileData, setFileData] = useState({ data: [], count: 0 }) |
|
@ -32,7 +32,7 @@ function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) { |
|
|
|
|
|
|
|
|
let resourceData = (data) => { |
|
|
let resourceData = (data) => { |
|
|
let params = data || query |
|
|
let params = data || query |
|
|
dispatch(resourceRetrieval.getSpecifications({ keyword: keyword, ...params, })).then(res => { |
|
|
dispatch(safetySpecification.getSpecifications({ keyword: keyword, ...params, })).then(res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
setFileData({ data: res.payload.data?.rows, count: res.payload.data?.count }) |
|
|
setFileData({ data: res.payload.data?.rows, count: res.payload.data?.count }) |
|
|
|
|
|
|
|
@ -61,7 +61,7 @@ function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) { |
|
|
<Button type="primary">下载</Button> |
|
|
<Button type="primary">下载</Button> |
|
|
<Button type="primary" onClick={() => { |
|
|
<Button type="primary" onClick={() => { |
|
|
if (fileId.current?.length) { |
|
|
if (fileId.current?.length) { |
|
|
dispatch(resourceRetrieval.delSpecifications(fileId.current)).then(res => { |
|
|
dispatch(safetySpecification.delSpecifications(fileId.current)).then(res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
let url = [] |
|
|
let url = [] |
|
|
fileData?.data?.map(f => { |
|
|
fileData?.data?.map(f => { |
|
|