Browse Source

问题修改

dev
wenlele 2 years ago
parent
commit
026ff346bc
  1. 6
      api/app/lib/controllers/means/index.js
  2. 59
      web/client/src/sections/means/containers/devOpsStandard.jsx
  3. 59
      web/client/src/sections/means/containers/faultInformation.jsx
  4. 51
      web/client/src/sections/means/containers/projectMeans.jsx
  5. 51
      web/client/src/sections/means/containers/repairFQA.jsx

6
api/app/lib/controllers/means/index.js

@ -106,13 +106,17 @@ async function addFile (ctx, next) {
async function folderFileList (ctx, next) {
try {
const models = ctx.fs.dc.models;
const { fileId, limit, page } = ctx.query;
const { fileId, limit, page, keyword } = ctx.query;
let options = { where: {}, }
if (JSON.parse(fileId).length) {
options.where.fileId = { $in: JSON.parse(fileId) }
}
if (keyword) {
options.where.name = { $ilike: `%${keyword}%` }
}
if (limit) {
options.limit = Number(limit)
}

59
web/client/src/sections/means/containers/devOpsStandard.jsx

@ -1,7 +1,7 @@
import React, { useEffect, useState, useMemo } from 'react';
import { connect } from 'react-redux';
import { Input, Button, Tree, Modal, Table, Upload, Pagination, Popconfirm } from '@douyinfe/semi-ui';
import { IconDeleteStroked, IconEditStroked, IconUpload, IconAlertCircle } from '@douyinfe/semi-icons';
import { IconDeleteStroked, IconEditStroked, IconUpload, IconAlertCircle, IconSearch } from '@douyinfe/semi-icons';
import SimpleBar from 'simplebar-react';
import FileModal from '../components/fileModal';
import moment from 'moment';
@ -29,12 +29,12 @@ const Rest = (props) => {
const [videoModalV, setVideoModalV] = useState(false);
const [videoUrl, setvideoUrl] = useState(null);
const [hint, setHint] = useState(false);
const [fileLists, setFileLists] = useState([])
const [fileSearch, setFileSearch] = useState([]) //
useEffect(() => {
dispatch(install.getProjectPoms({ global: 4 })).then((res => {
dispatch(install.getProjectPoms({ global: 1 })).then((res => {
if (res.success) {
let data = res.payload.data?.rows?.filter(v => v.pepProjectIsDelete !== 1)?.map(v => ({ pepProjectId: v.id, pepProjectName: v.pepProjectName || v.name }))
setPomsList(data)
@ -56,6 +56,9 @@ const Rest = (props) => {
setShowPomsList(data)
setPepProjectId(data[0]?.pepProjectId)
fileList(data[0]?.pepProjectId)
setDataSource([])
setFileId('')
setFileSearch('')
}, [projectSearch])
useEffect(() => {
@ -69,25 +72,29 @@ const Rest = (props) => {
setShowPomsList(data)
setPepProjectId(data[0]?.pepProjectId)
fileList(data[0]?.pepProjectId)
setDataSource([])
setFileId('')
setFileSearch('')
}, [overallProjectId])
useEffect(() => {
if (fileId) {
filfolderFileListe()
setQuery({ limit: 10, page: 0 })
setFileSearch('')
}
}, [fileId])
const fileList = (id) => {
dispatch(means.fileList({ projectId: id, type: 1 })).then((res => {
dispatch(means.fileList({ projectId: id, type: 4 })).then((res => {
if (res.success) {
let data = res.payload.data
let oneLevel = res.payload.data?.filter(f => !f.higherFileId) || []
setHigherFile(data?.map(d => ({ name: d.fileName, value: d.id })))
dispatch(means.folderFileList({ fileId: JSON.stringify(data?.map(d => d.id)) })).then((s => {
if (s.success) {
setFileLists(s.payload.data?.rows)
// setFileLists(s.payload.data?.rows)
settreeData(listErgodic(oneLevel, data, s.payload.data?.rows))
}
}))
@ -113,7 +120,7 @@ const Rest = (props) => {
}
treeDataList(treeData)
let datas = params || query
dispatch(means.folderFileList({ fileId: JSON.stringify(fileIds), ...datas })).then((res => {
dispatch(means.folderFileList({ keyword: fileSearch, fileId: JSON.stringify(fileIds), ...datas, })).then((res => {
if (res.success) {
setDataSource(res.payload.data?.rows || [])
setCount(res.payload.data?.count)
@ -277,6 +284,8 @@ const Rest = (props) => {
onClick={() => {
setPepProjectId(v.pepProjectId)
fileList(v.pepProjectId)
setDataSource([])
setFileId('')
}}>
<img src="/assets/images/icon/project-icon.png" style={{ width: 14, marginRight: 8 }} />
<div style={{ fontSize: 14, width: 152, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}> {v.pepProjectName}</div>
@ -301,7 +310,7 @@ const Rest = (props) => {
editData={editData}
higherFile={higherFile}
pepProjectId={pepProjectId}
type={4}
type={1}
close={() => {
setIsFileModal(false)
setEditData({})
@ -315,10 +324,11 @@ const Rest = (props) => {
<Tree
treeData={treeData}
defaultExpandAll
// labelEllipsis={true}
value={fileId}
// style={style}
onSelect={(selectedKey, selected, selectedNode) => {
setFileId(selectedKey)
setFileSearch('')
}}
/>
</SimpleBar>
@ -329,13 +339,27 @@ const Rest = (props) => {
flex: 1, height: '100%',
// border: '1px solid rgb(24 22 22)'
}}>
<div style={{ margin: '20px 0 10px 10px', display: 'flex', alignItems: 'center' }}>
<Button theme='solid' type='primary' style={{ width: 80, background: '#005ABD', marginRight: 10 }} onClick={() => {
if (higherFile?.filter(c => c.value == fileId)?.length) {
setUploadModal(true)
}
}}> 上传 </Button>
<div style={{ display: 'flex' }}>当前文件夹{higherFile?.filter(c => c.value == fileId)[0]?.name || <div style={{ color: '#c31515' }}>请选择文件夹</div>}</div>
<div style={{ margin: '20px 0 10px 10px', display: 'flex', alignItems: 'center', width: 'calc(100% - 20px)' }}>
<div style={{ width: '100%', display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Button theme='solid' type='primary' style={{ width: 80, background: '#005ABD', marginRight: 10 }} onClick={() => {
if (higherFile?.filter(c => c.value == fileId)?.length) {
setUploadModal(true)
}
}}> 上传 </Button>
<div style={{ display: 'flex' }}>当前文件夹{higherFile?.filter(c => c.value == fileId)[0]?.name || <div style={{ color: '#c31515' }}>请选择文件夹</div>}</div>
</div>
<Input placeholder='请输入文件名称'
style={{ width: 220 }}
suffix={<IconSearch />}
value={fileSearch}
onChange={v => {
setFileSearch(v)
filfolderFileListe({ keyword: v, limit: 10, page: 0 })
setQuery({ limit: 10, page: 0 })
}} />
</div>
{uploadModal ?
<Modal
title={'上传文件'}
@ -370,7 +394,7 @@ const Rest = (props) => {
style={{ display: 'inline-block' }}
action="/_upload/attachments"
accept={'.txt, .doc, .docx, .xls, .xlsx, .pdf, .png, .jpg, .rar, .zip'}
limit={1}
limit={4}
maxSize={51200}
onRemove={() => {
setUploadData({})
@ -441,6 +465,7 @@ const Rest = (props) => {
total={count}
showSizeChanger
currentPage={(query?.page || 0) + 1}
pageSize={query?.limit || 10}
pageSizeOpts={[10, 20, 50]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });

59
web/client/src/sections/means/containers/faultInformation.jsx

@ -1,7 +1,7 @@
import React, { useEffect, useState, useMemo } from 'react';
import { connect } from 'react-redux';
import { Input, Button, Tree, Modal, Table, Upload, Pagination, Popconfirm } from '@douyinfe/semi-ui';
import { IconDeleteStroked, IconEditStroked, IconUpload, IconAlertCircle } from '@douyinfe/semi-icons';
import { IconDeleteStroked, IconEditStroked, IconUpload, IconAlertCircle, IconSearch } from '@douyinfe/semi-icons';
import SimpleBar from 'simplebar-react';
import FileModal from '../components/fileModal';
import moment from 'moment';
@ -29,12 +29,12 @@ const Rest = (props) => {
const [videoModalV, setVideoModalV] = useState(false);
const [videoUrl, setvideoUrl] = useState(null);
const [hint, setHint] = useState(false);
const [fileLists, setFileLists] = useState([])
const [fileSearch, setFileSearch] = useState([]) //
useEffect(() => {
dispatch(install.getProjectPoms({ global: 3 })).then((res => {
dispatch(install.getProjectPoms({ global: 1 })).then((res => {
if (res.success) {
let data = res.payload.data?.rows?.filter(v => v.pepProjectIsDelete !== 1)?.map(v => ({ pepProjectId: v.id, pepProjectName: v.pepProjectName || v.name }))
setPomsList(data)
@ -56,6 +56,9 @@ const Rest = (props) => {
setShowPomsList(data)
setPepProjectId(data[0]?.pepProjectId)
fileList(data[0]?.pepProjectId)
setDataSource([])
setFileId('')
setFileSearch('')
}, [projectSearch])
useEffect(() => {
@ -69,25 +72,29 @@ const Rest = (props) => {
setShowPomsList(data)
setPepProjectId(data[0]?.pepProjectId)
fileList(data[0]?.pepProjectId)
setDataSource([])
setFileId('')
setFileSearch('')
}, [overallProjectId])
useEffect(() => {
if (fileId) {
filfolderFileListe()
setQuery({ limit: 10, page: 0 })
setFileSearch('')
}
}, [fileId])
const fileList = (id) => {
dispatch(means.fileList({ projectId: id, type: 1 })).then((res => {
dispatch(means.fileList({ projectId: id, type: 3 })).then((res => {
if (res.success) {
let data = res.payload.data
let oneLevel = res.payload.data?.filter(f => !f.higherFileId) || []
setHigherFile(data?.map(d => ({ name: d.fileName, value: d.id })))
dispatch(means.folderFileList({ fileId: JSON.stringify(data?.map(d => d.id)) })).then((s => {
if (s.success) {
setFileLists(s.payload.data?.rows)
// setFileLists(s.payload.data?.rows)
settreeData(listErgodic(oneLevel, data, s.payload.data?.rows))
}
}))
@ -113,7 +120,7 @@ const Rest = (props) => {
}
treeDataList(treeData)
let datas = params || query
dispatch(means.folderFileList({ fileId: JSON.stringify(fileIds), ...datas })).then((res => {
dispatch(means.folderFileList({ keyword: fileSearch, fileId: JSON.stringify(fileIds), ...datas, })).then((res => {
if (res.success) {
setDataSource(res.payload.data?.rows || [])
setCount(res.payload.data?.count)
@ -277,6 +284,8 @@ const Rest = (props) => {
onClick={() => {
setPepProjectId(v.pepProjectId)
fileList(v.pepProjectId)
setDataSource([])
setFileId('')
}}>
<img src="/assets/images/icon/project-icon.png" style={{ width: 14, marginRight: 8 }} />
<div style={{ fontSize: 14, width: 152, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}> {v.pepProjectName}</div>
@ -301,7 +310,7 @@ const Rest = (props) => {
editData={editData}
higherFile={higherFile}
pepProjectId={pepProjectId}
type={3}
type={1}
close={() => {
setIsFileModal(false)
setEditData({})
@ -315,10 +324,11 @@ const Rest = (props) => {
<Tree
treeData={treeData}
defaultExpandAll
// labelEllipsis={true}
value={fileId}
// style={style}
onSelect={(selectedKey, selected, selectedNode) => {
setFileId(selectedKey)
setFileSearch('')
}}
/>
</SimpleBar>
@ -329,13 +339,27 @@ const Rest = (props) => {
flex: 1, height: '100%',
// border: '1px solid rgb(24 22 22)'
}}>
<div style={{ margin: '20px 0 10px 10px', display: 'flex', alignItems: 'center' }}>
<Button theme='solid' type='primary' style={{ width: 80, background: '#005ABD', marginRight: 10 }} onClick={() => {
if (higherFile?.filter(c => c.value == fileId)?.length) {
setUploadModal(true)
}
}}> 上传 </Button>
<div style={{ display: 'flex' }}>当前文件夹{higherFile?.filter(c => c.value == fileId)[0]?.name || <div style={{ color: '#c31515' }}>请选择文件夹</div>}</div>
<div style={{ margin: '20px 0 10px 10px', display: 'flex', alignItems: 'center', width: 'calc(100% - 20px)' }}>
<div style={{ width: '100%', display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Button theme='solid' type='primary' style={{ width: 80, background: '#005ABD', marginRight: 10 }} onClick={() => {
if (higherFile?.filter(c => c.value == fileId)?.length) {
setUploadModal(true)
}
}}> 上传 </Button>
<div style={{ display: 'flex' }}>当前文件夹{higherFile?.filter(c => c.value == fileId)[0]?.name || <div style={{ color: '#c31515' }}>请选择文件夹</div>}</div>
</div>
<Input placeholder='请输入文件名称'
style={{ width: 220 }}
suffix={<IconSearch />}
value={fileSearch}
onChange={v => {
setFileSearch(v)
filfolderFileListe({ keyword: v, limit: 10, page: 0 })
setQuery({ limit: 10, page: 0 })
}} />
</div>
{uploadModal ?
<Modal
title={'上传文件'}
@ -370,7 +394,7 @@ const Rest = (props) => {
style={{ display: 'inline-block' }}
action="/_upload/attachments"
accept={'.txt, .doc, .docx, .xls, .xlsx, .pdf, .png, .jpg, .rar, .zip'}
limit={1}
limit={3}
maxSize={51200}
onRemove={() => {
setUploadData({})
@ -441,6 +465,7 @@ const Rest = (props) => {
total={count}
showSizeChanger
currentPage={(query?.page || 0) + 1}
pageSize={query?.limit || 10}
pageSizeOpts={[10, 20, 50]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });

51
web/client/src/sections/means/containers/projectMeans.jsx

@ -1,7 +1,7 @@
import React, { useEffect, useState, useMemo } from 'react';
import { connect } from 'react-redux';
import { Input, Button, Tree, Modal, Table, Upload, Pagination, Popconfirm } from '@douyinfe/semi-ui';
import { IconDeleteStroked, IconEditStroked, IconUpload, IconAlertCircle } from '@douyinfe/semi-icons';
import { IconDeleteStroked, IconEditStroked, IconUpload, IconAlertCircle, IconSearch } from '@douyinfe/semi-icons';
import SimpleBar from 'simplebar-react';
import FileModal from '../components/fileModal';
import moment from 'moment';
@ -29,7 +29,7 @@ const Rest = (props) => {
const [videoModalV, setVideoModalV] = useState(false);
const [videoUrl, setvideoUrl] = useState(null);
const [hint, setHint] = useState(false);
const [fileLists, setFileLists] = useState([])
const [fileSearch, setFileSearch] = useState([]) //
@ -56,6 +56,9 @@ const Rest = (props) => {
setShowPomsList(data)
setPepProjectId(data[0]?.pepProjectId)
fileList(data[0]?.pepProjectId)
setDataSource([])
setFileId('')
setFileSearch('')
}, [projectSearch])
useEffect(() => {
@ -69,17 +72,21 @@ const Rest = (props) => {
setShowPomsList(data)
setPepProjectId(data[0]?.pepProjectId)
fileList(data[0]?.pepProjectId)
setDataSource([])
setFileId('')
setFileSearch('')
}, [overallProjectId])
useEffect(() => {
if (fileId) {
filfolderFileListe()
setQuery({ limit: 10, page: 0 })
setFileSearch('')
}
}, [fileId])
const fileList = (id) => {
dispatch(means.fileList({ projectId: id, type: 1 })).then((res => {
if (res.success) {
let data = res.payload.data
@ -87,7 +94,7 @@ const Rest = (props) => {
setHigherFile(data?.map(d => ({ name: d.fileName, value: d.id })))
dispatch(means.folderFileList({ fileId: JSON.stringify(data?.map(d => d.id)) })).then((s => {
if (s.success) {
setFileLists(s.payload.data?.rows)
// setFileLists(s.payload.data?.rows)
settreeData(listErgodic(oneLevel, data, s.payload.data?.rows))
}
}))
@ -113,7 +120,7 @@ const Rest = (props) => {
}
treeDataList(treeData)
let datas = params || query
dispatch(means.folderFileList({ fileId: JSON.stringify(fileIds), ...datas })).then((res => {
dispatch(means.folderFileList({ keyword: fileSearch, fileId: JSON.stringify(fileIds), ...datas, })).then((res => {
if (res.success) {
setDataSource(res.payload.data?.rows || [])
setCount(res.payload.data?.count)
@ -277,6 +284,8 @@ const Rest = (props) => {
onClick={() => {
setPepProjectId(v.pepProjectId)
fileList(v.pepProjectId)
setDataSource([])
setFileId('')
}}>
<img src="/assets/images/icon/project-icon.png" style={{ width: 14, marginRight: 8 }} />
<div style={{ fontSize: 14, width: 152, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}> {v.pepProjectName}</div>
@ -315,10 +324,11 @@ const Rest = (props) => {
<Tree
treeData={treeData}
defaultExpandAll
// labelEllipsis={true}
value={fileId}
// style={style}
onSelect={(selectedKey, selected, selectedNode) => {
setFileId(selectedKey)
setFileSearch('')
}}
/>
</SimpleBar>
@ -329,13 +339,27 @@ const Rest = (props) => {
flex: 1, height: '100%',
// border: '1px solid rgb(24 22 22)'
}}>
<div style={{ margin: '20px 0 10px 10px', display: 'flex', alignItems: 'center' }}>
<Button theme='solid' type='primary' style={{ width: 80, background: '#005ABD', marginRight: 10 }} onClick={() => {
if (higherFile?.filter(c => c.value == fileId)?.length) {
setUploadModal(true)
}
}}> 上传 </Button>
<div style={{ display: 'flex' }}>当前文件夹{higherFile?.filter(c => c.value == fileId)[0]?.name || <div style={{ color: '#c31515' }}>请选择文件夹</div>}</div>
<div style={{ margin: '20px 0 10px 10px', display: 'flex', alignItems: 'center', width: 'calc(100% - 20px)' }}>
<div style={{ width: '100%', display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Button theme='solid' type='primary' style={{ width: 80, background: '#005ABD', marginRight: 10 }} onClick={() => {
if (higherFile?.filter(c => c.value == fileId)?.length) {
setUploadModal(true)
}
}}> 上传 </Button>
<div style={{ display: 'flex' }}>当前文件夹{higherFile?.filter(c => c.value == fileId)[0]?.name || <div style={{ color: '#c31515' }}>请选择文件夹</div>}</div>
</div>
<Input placeholder='请输入文件名称'
style={{ width: 220 }}
suffix={<IconSearch />}
value={fileSearch}
onChange={v => {
setFileSearch(v)
filfolderFileListe({ keyword: v, limit: 10, page: 0 })
setQuery({ limit: 10, page: 0 })
}} />
</div>
{uploadModal ?
<Modal
title={'上传文件'}
@ -441,6 +465,7 @@ const Rest = (props) => {
total={count}
showSizeChanger
currentPage={(query?.page || 0) + 1}
pageSize={query?.limit || 10}
pageSizeOpts={[10, 20, 50]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });

51
web/client/src/sections/means/containers/repairFQA.jsx

@ -1,7 +1,7 @@
import React, { useEffect, useState, useMemo } from 'react';
import { connect } from 'react-redux';
import { Input, Button, Tree, Modal, Table, Upload, Pagination, Popconfirm } from '@douyinfe/semi-ui';
import { IconDeleteStroked, IconEditStroked, IconUpload, IconAlertCircle } from '@douyinfe/semi-icons';
import { IconDeleteStroked, IconEditStroked, IconUpload, IconAlertCircle, IconSearch } from '@douyinfe/semi-icons';
import SimpleBar from 'simplebar-react';
import FileModal from '../components/fileModal';
import moment from 'moment';
@ -29,7 +29,7 @@ const Rest = (props) => {
const [videoModalV, setVideoModalV] = useState(false);
const [videoUrl, setvideoUrl] = useState(null);
const [hint, setHint] = useState(false);
const [fileLists, setFileLists] = useState([])
const [fileSearch, setFileSearch] = useState([]) //
@ -56,6 +56,9 @@ const Rest = (props) => {
setShowPomsList(data)
setPepProjectId(data[0]?.pepProjectId)
fileList(data[0]?.pepProjectId)
setDataSource([])
setFileId('')
setFileSearch('')
}, [projectSearch])
useEffect(() => {
@ -69,17 +72,21 @@ const Rest = (props) => {
setShowPomsList(data)
setPepProjectId(data[0]?.pepProjectId)
fileList(data[0]?.pepProjectId)
setDataSource([])
setFileId('')
setFileSearch('')
}, [overallProjectId])
useEffect(() => {
if (fileId) {
filfolderFileListe()
setQuery({ limit: 10, page: 0 })
setFileSearch('')
}
}, [fileId])
const fileList = (id) => {
dispatch(means.fileList({ projectId: id, type: 2 })).then((res => {
if (res.success) {
let data = res.payload.data
@ -87,7 +94,7 @@ const Rest = (props) => {
setHigherFile(data?.map(d => ({ name: d.fileName, value: d.id })))
dispatch(means.folderFileList({ fileId: JSON.stringify(data?.map(d => d.id)) })).then((s => {
if (s.success) {
setFileLists(s.payload.data?.rows)
// setFileLists(s.payload.data?.rows)
settreeData(listErgodic(oneLevel, data, s.payload.data?.rows))
}
}))
@ -113,7 +120,7 @@ const Rest = (props) => {
}
treeDataList(treeData)
let datas = params || query
dispatch(means.folderFileList({ fileId: JSON.stringify(fileIds), ...datas })).then((res => {
dispatch(means.folderFileList({ keyword: fileSearch, fileId: JSON.stringify(fileIds), ...datas, })).then((res => {
if (res.success) {
setDataSource(res.payload.data?.rows || [])
setCount(res.payload.data?.count)
@ -277,6 +284,8 @@ const Rest = (props) => {
onClick={() => {
setPepProjectId(v.pepProjectId)
fileList(v.pepProjectId)
setDataSource([])
setFileId('')
}}>
<img src="/assets/images/icon/project-icon.png" style={{ width: 14, marginRight: 8 }} />
<div style={{ fontSize: 14, width: 152, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}> {v.pepProjectName}</div>
@ -315,10 +324,11 @@ const Rest = (props) => {
<Tree
treeData={treeData}
defaultExpandAll
// labelEllipsis={true}
value={fileId}
// style={style}
onSelect={(selectedKey, selected, selectedNode) => {
setFileId(selectedKey)
setFileSearch('')
}}
/>
</SimpleBar>
@ -329,13 +339,27 @@ const Rest = (props) => {
flex: 1, height: '100%',
// border: '1px solid rgb(24 22 22)'
}}>
<div style={{ margin: '20px 0 10px 10px', display: 'flex', alignItems: 'center' }}>
<Button theme='solid' type='primary' style={{ width: 80, background: '#005ABD', marginRight: 10 }} onClick={() => {
if (higherFile?.filter(c => c.value == fileId)?.length) {
setUploadModal(true)
}
}}> 上传 </Button>
<div style={{ display: 'flex' }}>当前文件夹{higherFile?.filter(c => c.value == fileId)[0]?.name || <div style={{ color: '#c31515' }}>请选择文件夹</div>}</div>
<div style={{ margin: '20px 0 10px 10px', display: 'flex', alignItems: 'center', width: 'calc(100% - 20px)' }}>
<div style={{ width: '100%', display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Button theme='solid' type='primary' style={{ width: 80, background: '#005ABD', marginRight: 10 }} onClick={() => {
if (higherFile?.filter(c => c.value == fileId)?.length) {
setUploadModal(true)
}
}}> 上传 </Button>
<div style={{ display: 'flex' }}>当前文件夹{higherFile?.filter(c => c.value == fileId)[0]?.name || <div style={{ color: '#c31515' }}>请选择文件夹</div>}</div>
</div>
<Input placeholder='请输入文件名称'
style={{ width: 220 }}
suffix={<IconSearch />}
value={fileSearch}
onChange={v => {
setFileSearch(v)
filfolderFileListe({ keyword: v, limit: 10, page: 0 })
setQuery({ limit: 10, page: 0 })
}} />
</div>
{uploadModal ?
<Modal
title={'上传文件'}
@ -441,6 +465,7 @@ const Rest = (props) => {
total={count}
showSizeChanger
currentPage={(query?.page || 0) + 1}
pageSize={query?.limit || 10}
pageSizeOpts={[10, 20, 50]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });

Loading…
Cancel
Save