Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
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
zhaochengxiang
szse
Commits
a063cd00
Commit
a063cd00
authored
May 20, 2025
by
fanyj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tijiao
parent
56a9954c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
23 deletions
+40
-23
index.js
src/index.js
+4
-0
httpUtil.tsx
src/utils/httpUtil.tsx
+2
-0
request.ts
src/utils/request.ts
+3
-2
AssetFlow.tsx
src/view/Manage/AssetManage/Component/AssetFlow.tsx
+1
-1
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+1
-1
FlowAcceptDetail.tsx
src/view/Manage/AssetManage/Component/FlowAcceptDetail.tsx
+7
-5
Detail.ts
src/view/Manage/AssetManage/hooks/Detail.ts
+22
-14
No files found.
src/index.js
View file @
a063cd00
...
...
@@ -12,6 +12,10 @@ import { $hostParams } from "./util";
import
'./index.less'
;
ConfigProvider
.
config
({
prefixCls
:
'yy'
,
// 4.13.0+
});
function
render
(
props
)
{
const
{
container
,
...
restProps
}
=
props
;
ReactDOM
.
render
(
...
...
src/utils/httpUtil.tsx
View file @
a063cd00
...
...
@@ -22,6 +22,8 @@ export const httpUtil={
}
},
showError
:(
data
:
any
,
type
:
number
,
title
?:
string
)
=>
{
console
.
log
(
'error'
)
console
.
log
((
data
.
data
||
{}).
ApiError
||
(
data
||
{}).
ApiError
||
(
data
||
{}).
message
||
(
data
.
data
||
{}).
message
)
if
(
data
.
status
&&
((
data
.
data
||
{}).
ApiError
||
(
data
||
{}).
ApiError
||
(
data
||
{}).
message
||
(
data
.
data
||
{}).
message
)){
let
messages
=
'未知异常'
;
try
{
...
...
src/utils/request.ts
View file @
a063cd00
...
...
@@ -153,6 +153,7 @@ export default function request(options:any, autotip:boolean){
return
new
Promise
((
resolve
)
=>
{
let
result
:
any
=
{}
fetch
(
options
).
then
(
response
=>
{
console
.
log
(
'response'
,
response
)
try
{
if
(
response
?.
status
===
200
){
if
(
autotip
)
...
...
@@ -184,10 +185,10 @@ export default function request(options:any, autotip:boolean){
}).
catch
(
async
(
error
)
=>
{
if
(
autotip
)
message
.
error
(
'操作异常'
)
let
data
=
error
;
let
data
=
error
.
response
;
if
(
data
?.
ApiError
||
data
?.
status
){
result
.
status
=
500
result
.
data
=
data
result
.
data
=
data
.
data
}
resolve
(
result
)
})
...
...
src/view/Manage/AssetManage/Component/AssetFlow.tsx
View file @
a063cd00
...
...
@@ -223,7 +223,7 @@ const AssetFlow:React.FC<any>=(props)=>{
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'送审说明'
name=
"
desc
"
name=
"
opinion
"
style=
{
{
marginBottom
:
15
}
}
rules=
{
[{
required
:
true
,
message
:
'请填写送审说明!'
}]
}
>
...
...
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
a063cd00
import
React
,{
useState
,
useEffect
,
useRef
,
useContext
,
useMemo
}
from
"react"
;
import
{
Button
,
Pagination
,
Space
,
Modal
,
Input
,
Tooltip
,
Checkbox
,
Typography
,
Dropdown
,
Menu
,
Divider
,
Select
,
message
}
from
"antd"
;
import
{
Button
,
Pagination
,
Space
,
Modal
,
Input
,
Tooltip
,
Checkbox
,
Typography
,
Dropdown
,
Menu
,
Divider
,
Select
,
message
,
notification
}
from
"antd"
;
import
classNames
from
'classnames'
;
import
{
Resizable
}
from
'react-resizable'
;
import
ResizeObserver
from
'rc-resize-observer'
;
...
...
src/view/Manage/AssetManage/Component/FlowAcceptDetail.tsx
View file @
a063cd00
...
...
@@ -25,7 +25,7 @@ const FlowAcceptDetail:React.FC<any>=(props)=>{
return
httpUtil
.
getQueryVariable
(
'processId'
,
location
.
search
)
||
''
},[
location
.
search
])
const
{
detail
,
detalLoading
}
=
useGetProcessDetail
({
processId
})
const
{
detail
,
detalLoading
,
reload
}
=
useGetProcessDetail
({
processId
})
const
editmodal
=
useGetModalInfoAndAction
()
useEffect
(()
=>
{
...
...
@@ -153,6 +153,7 @@ const FlowAcceptDetail:React.FC<any>=(props)=>{
const playload = {...detail,...data,submitItems:dataSource}
saveQuestionItemNext(playload,()=>{
showMessage('success','操作成功')
reload?.()
})
}else{
showMessage('info','请选择下一步处理人')
...
...
@@ -176,6 +177,7 @@ const FlowAcceptDetail:React.FC<any>=(props)=>{
const playload = {...detail,...data,submitItems:list}
saveQuestionItemFinal(playload,()=>{
showMessage("success",'操作成功')
reload?.()
})
}else{
showMessage('info','请完成待完成项')
...
...
@@ -203,8 +205,8 @@ const FlowAcceptDetail:React.FC<any>=(props)=>{
</Descriptions.Item>
<Descriptions.Item label="附件">
{
(detail?.attachments||[]).map((item:any)=>{
return <Tag color="blue" style={{cursor:'pointer'}} onClick={()=>{openDetail(item.fileId)}} >{item?.fileName}</Tag>
(detail?.attachments||[]).map((item:any
,key:number
)=>{
return <Tag color="blue"
key={key}
style={{cursor:'pointer'}} onClick={()=>{openDetail(item.fileId)}} >{item?.fileName}</Tag>
})
}
</Descriptions.Item>
...
...
@@ -258,8 +260,8 @@ const FlowAcceptDetail:React.FC<any>=(props)=>{
footer={
<div style={{display:'flex',justifyContent:'center',width:'100%'}}>
<Space>
<Button loading={loading} onClick={nextUser} type="primary">转分配</Button>
<Button loading={loading} onClick={finishFlow} type="primary">保存</Button>
<Button loading={loading}
disabled={!detail?.operateAble}
onClick={nextUser} type="primary">转分配</Button>
<Button loading={loading}
disabled={!detail?.operateAble}
onClick={finishFlow} type="primary">保存</Button>
</Space>
</div>
}
...
...
src/view/Manage/AssetManage/hooks/Detail.ts
View file @
a063cd00
...
...
@@ -85,22 +85,29 @@ export const useGetProcessDetail = (props: {processId: string}) => {
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
useEffect
(()
=>
{
const
fetchData
=
async
()
=>
{
try
{
setLoading
(
true
);
const
response
:
any
=
await
assetsManageService
.
getProcessDetail
({
processId
});
if
(
httpUtil
.
checkSuccess
(
response
,
1
))
{
setDetail
(
response
.
data
);
}
else
{
httpUtil
.
showError
(
response
,
1
);
}
}
finally
{
setLoading
(
false
);
}
};
if
(
processId
)
fetchData
();
},
[
processId
]);
return
{
detail
,
detalLoading
:
loading
};
const
fetchData
=
async
()
=>
{
try
{
setLoading
(
true
);
const
response
:
any
=
await
assetsManageService
.
getProcessDetail
({
processId
});
if
(
httpUtil
.
checkSuccess
(
response
,
1
))
{
setDetail
(
response
.
data
);
}
else
{
httpUtil
.
showError
(
response
,
1
);
}
}
finally
{
setLoading
(
false
);
}
};
const
reload
=
useCallback
(()
=>
{
if
(
processId
)
fetchData
();
},[])
return
{
detail
,
detalLoading
:
loading
,
reload
};
};
\ No newline at end of file
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