Browse Source

数据安全规范模块路由修改

master
wenlele 2 years ago
parent
commit
91dac6663b
  1. BIN
      web/client/assets/files/common/1687657483581_2.jpg
  2. 4
      web/client/src/sections/safetySpecification/components/fileModal.js
  3. 6
      web/client/src/sections/safetySpecification/containers/specificationLibrary.js

BIN
web/client/assets/files/common/1687657483581_2.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

4
web/client/src/sections/safetySpecification/components/fileModal.js

@ -10,7 +10,7 @@ import { Tabs, Form, Input, DatePicker, Button, Modal, Select, Tag } from 'antd'
function FileModal ({ loading, parent, user, actions, editData = {}, dispatch, close, success, remove }) { function FileModal ({ loading, parent, user, actions, editData = {}, dispatch, close, success, remove }) {
const { resourceRetrieval } = actions const { safetySpecification } = actions
const [tabsKey, setTabsKey] = useState("stay") const [tabsKey, setTabsKey] = useState("stay")
const [query, setQuery] = useState({ page: 0, limit: 10 }); const [query, setQuery] = useState({ page: 0, limit: 10 });
const [proTableList, setProTableList] = useState({ rows: [], count: 0 }); const [proTableList, setProTableList] = useState({ rows: [], count: 0 });
@ -46,7 +46,7 @@ function FileModal ({ loading, parent, user, actions, editData = {}, dispatch, c
onOk={e => { onOk={e => {
form.validateFields().then(v => { form.validateFields().then(v => {
dispatch(resourceRetrieval.postSpecifications({ dispatch(safetySpecification.postSpecifications({
...v, ...v,
fileName: v?.files[0]?.name,path:v?.files[0]?.url, fileName: v?.files[0]?.name,path:v?.files[0]?.url,
})).then(res => { })).then(res => {

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

@ -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 => {

Loading…
Cancel
Save