Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
f643013b
Commit
f643013b
authored
1 year ago
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '文件上传功能逻辑优化'
parent
1f94fa8a
Pipeline
#73187
passed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
index.tsx
src/components/Upload/index.tsx
+8
-3
BookConfigNew.jsx
src/pages/bsmanager/base/standingBook/BookConfigNew.jsx
+1
-0
No files found.
src/components/Upload/index.tsx
View file @
f643013b
...
...
@@ -231,7 +231,10 @@ class PicturesWall extends React.Component<PicturesWallType> {
if (file.status === '
done
') {
const files = fileList.map(item => {
const { status, name, thumbUrl } = item;
const url = item.response && item.response.data || thumbUrl;
let url = item.response && item.response.data || thumbUrl;
if (url && (!url.includes('
CityTemp
') && !url.includes('
图库
'))) {
url = '
CityTemp
\\图库\\
' + url
}
return { uid: uuid(8, 16), name, status, url };
});
this.setState({ fileList: files })
...
...
@@ -273,8 +276,6 @@ class PicturesWall extends React.Component<PicturesWallType> {
// reader.onload = () => resolve(reader.result as string);
// })
// });
if (path && path.indexOf('
http
') === 0) {
return path
}
...
...
@@ -284,6 +285,10 @@ class PicturesWall extends React.Component<PicturesWallType> {
if (path && path.indexOf('
assets
') === 0) {
return `${window.location.origin}/civweb4/${path}`.replace(/
\\
/g, '
/
')
}
if (path && (!path.includes('
CityTemp
') && !path.includes('
图库
'))) {
path = '
CityTemp
\\图库\\
' + path
}
if (previewFlag) {
return path
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/bsmanager/base/standingBook/BookConfigNew.jsx
View file @
f643013b
...
...
@@ -568,6 +568,7 @@ const BookConfigNew = props => {
// }}
// width="100vw"
confirmLoading=
{
modalLoading
}
okText=
"保存并查看"
>
<
div
className=
{
styles
.
top
}
>
<
Form
form=
{
form
}
{
...
layout
}
>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment