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
c12a1358
Commit
c12a1358
authored
Oct 30, 2024
by
彭俊龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app发版增加上传记录
parent
2a199671
Pipeline
#93531
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
4 deletions
+67
-4
index.js
.../productCenter/mobileConfig/menuconfig/ApkUpload/index.js
+67
-4
No files found.
src/pages/productCenter/mobileConfig/menuconfig/ApkUpload/index.js
View file @
c12a1358
import
React
,
{
useEffect
,
useMemo
,
useState
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Form
,
Modal
,
Input
,
message
,
Button
,
Upload
,
Select
}
from
'antd'
;
import
{
Form
,
Table
,
Input
,
message
,
Button
,
Upload
,
Tooltip
}
from
'antd'
;
import
{
getAppUploadRecords
,
postAppVersionInfo
}
from
'@/services/mobileConfig/api'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
request
}
from
'@wisdom-utils/utils/es'
;
const
ApkUpload
=
props
=>
{
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
const
[
dataSource
,
setDataSource
]
=
useState
([]);
const
{
TextArea
}
=
Input
;
const
tailLayout
=
{
wrapperCol
:
{
offset
:
6
,
span
:
8
},
wrapperCol
:
{
offset
:
6
,
span
:
12
},
};
const
layout
=
{
labelCol
:
{
span
:
6
,
},
wrapperCol
:
{
span
:
8
,
span
:
12
,
},
};
const
columns
=
[
{
title
:
'版本号'
,
dataIndex
:
'Ver'
,
key
:
'Ver'
,
},
{
title
:
'上传时间'
,
dataIndex
:
'UploadTime'
,
key
:
'UploadTime'
,
},
{
title
:
'发版日志'
,
dataIndex
:
'UploadLog'
,
key
:
'UploadLog'
,
render
:
(
text
,
recore
,
index
)
=>
<
Tooltip
title
=
{
text
}
>
<
div
style
=
{{
width
:
'150px'
,
whiteSpace
:
'nowrap'
,
/* 不换行 */
overflow
:
'hidden'
,
/* 超出部分隐藏 */
textOverflow
:
'ellipsis'
/* 显示省略号 */
}}
>
{
text
}
<
/div
>
<
/Tooltip
>
},
{
title
:
'下载'
,
key
:
'DownUrl'
,
dataIndex
:
'DownUrl'
,
render
:
(
text
,
record
,
index
)
=>
<
UploadOutlined
onClick
=
{()
=>
window
.
open
(
`
${
window
.
origin
}${
text
}
`
,
'_self'
)
}
/
>
},
];
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
getRecords
();
//getAppUploadRecords().then(x=> console.log(x, '上传记录'))
},
[])
const
normFile
=
e
=>
{
...
...
@@ -29,6 +66,13 @@ const ApkUpload = props => {
return
e
?.
fileList
;
};
const
getRecords
=
async
()
=>
{
const
res
=
await
getAppUploadRecords
();
if
(
res
.
code
===
0
){
setDataSource
(
res
.
data
||
[]);
}
}
const
postAPPUploadInfo
=
async
()
=>
{
await
form
.
validateFields
();
const
formData
=
form
.
getFieldsValue
();
...
...
@@ -50,7 +94,14 @@ const ApkUpload = props => {
setLoadding
(
false
);
};
return
(
<
Form
<
div
style
=
{{
display
:
'flex'
,
width
:
'100%'
}}
>
<
Form
style
=
{{
width
:
'50%'
}}
{...
layout
}
initialValues
=
{{
DownUrl
:
''
,
...
...
@@ -114,6 +165,18 @@ const ApkUpload = props => {
<
/Button
>
<
/Form.Item
>
<
/Form
>
<
Table
style
=
{{
width
:
'50%'
}}
columns
=
{
columns
}
pagination
=
{{
pageSize
:
10
}}
dataSource
=
{
dataSource
}
/
>
<
/div
>
);
};
export
default
ApkUpload
;
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