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
360b070e
Commit
360b070e
authored
May 15, 2025
by
fanyj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tijiao
parent
be102c00
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
233 additions
and
6 deletions
+233
-6
start-flow.jsx
src/view/Manage/AssetDraft/start-flow.jsx
+1
-1
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+1
-1
AssetFlow.tsx
src/view/Manage/AssetManage/Component/AssetFlow.tsx
+209
-0
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+22
-4
No files found.
src/view/Manage/AssetDraft/start-flow.jsx
View file @
360b070e
...
@@ -307,7 +307,7 @@ const List = React.forwardRef(function ({ items }, ref) {
...
@@ -307,7 +307,7 @@ const List = React.forwardRef(function ({ items }, ref) {
)
)
})
})
const
AuditUsersItem
=
({
value
,
onChange
})
=>
{
export
const
AuditUsersItem
=
({
value
,
onChange
})
=>
{
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
options
,
setOptions
]
=
React
.
useState
()
const
[
options
,
setOptions
]
=
React
.
useState
()
...
...
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
360b070e
...
@@ -659,7 +659,7 @@ const AssetAction = React.forwardRef(function (props, ref) {
...
@@ -659,7 +659,7 @@ const AssetAction = React.forwardRef(function (props, ref) {
}
}
});
});
const tempcolumns =
columns
.map((item)=>{
const tempcolumns =
(columns||[])
.map((item)=>{
return {...item,annotation:formdata[item._id]}
return {...item,annotation:formdata[item._id]}
})
})
...
...
src/view/Manage/AssetManage/Component/AssetFlow.tsx
0 → 100644
View file @
360b070e
import
React
,{
useState
}
from
"react"
import
{
Modal
,
Spin
,
Button
,
Form
,
Row
,
Col
,
Upload
,
Input
,
Tooltip
,
Typography
,
Table
}
from
"antd"
import
{
UploadOutlined
}
from
"@ant-design/icons"
import
{
useSetState
}
from
"ahooks"
import
{
AuditUsersItem
,
AttachesItem
}
from
"../../AssetDraft/start-flow"
import
{
showMessage
,
showNotifaction
}
from
'@/util'
import
{
dispatch
}
from
'@/model'
import
produce
from
'immer'
const
AssetFlow
:
React
.
FC
<
any
>=
(
props
)
=>
{
const
{
visible
,
onCancel
,
item
}
=
props
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
[
uploading
,
setUploading
]
=
useState
(
false
)
const
[
tableData
,
setTableData
]
=
React
.
useState
()
const
[
state
,
setState
]
=
useSetState
({
loading
:
false
})
const
[
form
]
=
Form
.
useForm
()
const
close
=
()
=>
{
onCancel
?.()
}
const
save
=
()
=>
{
}
const
onValuesChange
=
()
=>
{
}
const
uploadProps
=
{
beforeUpload
:
file
=>
{
const
isLt5M
=
file
.
size
/
1024
/
1024
<=
100
if
(
!
isLt5M
)
{
showMessage
(
'error'
,
'上传文件限制最大100M'
)
return
false
}
setUploading
(
true
)
dispatch
({
type
:
'assetmanage.uploadAttachment'
,
payload
:
{
fileList
:
[
file
],
},
callback
:
(
data
)
=>
{
setUploading
(
false
)
const
prev
=
form
?.
getFieldValue
(
'attachments'
)
const
newFileList
=
[...
prev
??[],
data
]
form
?.
setFieldsValue
({
attachments
:
newFileList
})
},
error
:
()
=>
{
setUploading
(
false
)
}
})
return
false
},
fileList
:
[],
}
const
dprops
:
any
=
{}
const
cols
=
[
{
title
:
'序号'
,
dataIndex
:
'index'
,
width
:
60
,
render
:(
_
,
__
,
index
)
=>
(
index
+
1
)
},
{
title
:
'资产名称'
,
dataIndex
:
'enName'
,
width
:
160
,
render
:
(
text
,
record
)
=>
(
<
Tooltip
title=
{
text
}
>
<
Typography
.
Text
ellipsis=
{
true
}
>
{
text
}
</
Typography
.
Text
>
</
Tooltip
>
)
},
{
title
:
'中文名称'
,
dataIndex
:
'cnName'
,
width
:
160
,
render
:
(
text
,
record
)
=>
(
<
Tooltip
title=
{
text
}
>
<
Typography
.
Text
ellipsis=
{
true
}
>
{
text
}
</
Typography
.
Text
>
</
Tooltip
>
)
},
{
title
:
'编码'
,
dataIndex
:
'code'
,
width
:
160
,
render
:
(
text
,
record
)
=>
(
<
Tooltip
title=
{
text
}
>
<
Typography
.
Text
ellipsis=
{
true
}
>
{
text
}
</
Typography
.
Text
>
</
Tooltip
>
)
},
{
title
:
'路径'
,
dataIndex
:
'path'
,
width
:
120
,
render
:
(
text
,
record
)
=>
(
<
Tooltip
title=
{
text
}
>
<
Typography
.
Text
ellipsis=
{
true
}
>
{
text
}
</
Typography
.
Text
>
</
Tooltip
>
)
},
{
title
:
'送审备注'
,
dataIndex
:
'remarks'
,
render
:
(
_
,
__
,
index
)
=>
(
<
Input
.
TextArea
rows=
{
1
}
autoSize=
{
{
minRows
:
1
,
maxRows
:
3
}
}
allowClear
onChange=
{
(
e
)
=>
{
setTableData
(
prev
=>
{
return
produce
(
prev
,
(
draft
)
=>
{
draft
[
index
].
remarks
=
e
.
target
.
value
})
})
}
}
/>
)
},
]
return
(
<
Modal
visible=
{
visible
}
confirmLoading=
{
state
.
loading
}
width=
'80%'
bodyStyle=
{
{
padding
:
'15px'
,
overflowX
:
'auto'
,
height
:
'80vh'
}
}
title=
'资产问责'
centered
destroyOnClose
onCancel=
{
()
=>
{
close
()
}
}
>
<
Spin
spinning=
{
state
.
loading
}
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
6
}
}
wrapperCol=
{
{
span
:
18
}
}
autoComplete=
"off"
onValuesChange=
{
onValuesChange
}
>
<
Row
gutter=
{
10
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'评审人员'
name=
"nextAuditUsers"
style=
{
{
marginBottom
:
15
}
}
rules=
{
[{
required
:
true
,
message
:
'请选择评审人员!'
}]
}
>
<
AuditUsersItem
{
...
dprops
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'附件'
style=
{
{
marginBottom
:
15
}
}
>
<
Upload
{
...
uploadProps
}
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
点击上传
</
Button
>
</
Upload
>
</
Form
.
Item
>
<
Form
.
Item
label=
'已上传附件'
name=
'attachments'
>
<
AttachesItem
{
...
dprops
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'送审说明'
name=
"desc"
style=
{
{
marginBottom
:
15
}
}
rules=
{
[{
required
:
true
,
message
:
'请填写送审说明!'
}]
}
>
<
Input
.
TextArea
rows=
{
4
}
placeholder=
'请输入送审说明'
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
>
<
Table
columns=
{
cols
??[]
}
dataSource=
{
tableData
??[]
}
pagination=
{
false
}
/>
</
Spin
>
</
Modal
>
)
}
export
default
AssetFlow
\ No newline at end of file
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
360b070e
...
@@ -33,6 +33,8 @@ import PermissionMenuItem from '../../../../util/Component/PermissionMenuItem'
...
@@ -33,6 +33,8 @@ import PermissionMenuItem from '../../../../util/Component/PermissionMenuItem'
import
"./AssetTable.less"
;
import
"./AssetTable.less"
;
import
'react-contexify/dist/ReactContexify.css'
;
import
'react-contexify/dist/ReactContexify.css'
;
import
{
getTemplateType
}
from
"../../../../util/axios"
;
import
{
getTemplateType
}
from
"../../../../util/axios"
;
import
{
useGetModalInfoAndAction
}
from
"@/hooks/common"
;
import
AssetFlow
from
"./AssetFlow"
const
{
Text
}
=
Typography
;
const
{
Text
}
=
Typography
;
const
{
Column
}
=
Table
;
const
{
Column
}
=
Table
;
...
@@ -422,6 +424,8 @@ const AssetTable = (props) => {
...
@@ -422,6 +424,8 @@ const AssetTable = (props) => {
return
newMenuData
return
newMenuData
},
[
contextMenuItem
])
},
[
contextMenuItem
])
const
questionModal
=
useGetModalInfoAndAction
()
const
storageChange
=
(
e
)
=>
{
const
storageChange
=
(
e
)
=>
{
if
(
e
.
key
===
'assetRelationOnClickEvent'
)
{
if
(
e
.
key
===
'assetRelationOnClickEvent'
)
{
remoteRelationRef
.
current
=
e
.
relation
;
remoteRelationRef
.
current
=
e
.
relation
;
...
@@ -1058,6 +1062,8 @@ const AssetTable = (props) => {
...
@@ -1058,6 +1062,8 @@ const AssetTable = (props) => {
visible: true,
visible: true,
id: contextMenuItem?.id
id: contextMenuItem?.id
})
})
}else if(key ==='发起问责'){
questionModal.openModal(contextMenuItem)
}
}
}
}
...
@@ -1139,6 +1145,12 @@ const AssetTable = (props) => {
...
@@ -1139,6 +1145,12 @@ const AssetTable = (props) => {
添加标签
添加标签
</div>
</div>
</PermissionMenuItem>
</PermissionMenuItem>
<Menu.Item key='questionwaring'
>
<div className='text-center'>
发起问责
</div>
</Menu.Item>
<Menu.Item key='visibleColSetting'
<Menu.Item key='visibleColSetting'
>
>
<div className='text-center'>
<div className='text-center'>
...
@@ -1186,6 +1198,8 @@ const AssetTable = (props) => {
...
@@ -1186,6 +1198,8 @@ const AssetTable = (props) => {
}
}
}
}
console.log('questionModal',questionModal)
return(
return(
<div className={classes}>
<div className={classes}>
<div
<div
...
@@ -1381,8 +1395,9 @@ const AssetTable = (props) => {
...
@@ -1381,8 +1395,9 @@ const AssetTable = (props) => {
total={total}
total={total}
showTotal={total => `
共
$
{
total
}
条
`}
showTotal={total => `
共
$
{
total
}
条
`}
/>
/>
<AssetFlow visible={questionModal.visible} onCancel={()=>{questionModal.cancelModal()}} item={questionModal.currentItem} />
</div>
</div>
<AddAsset
<AddAsset
{...addAssetParams}
{...addAssetParams}
nodeId={nodeId}
nodeId={nodeId}
...
@@ -1491,14 +1506,17 @@ const AssetTable = (props) => {
...
@@ -1491,14 +1506,17 @@ const AssetTable = (props) => {
<RcMenu id={MENU_ID}>
<RcMenu id={MENU_ID}>
{
{
menuData?.map(
item
=> (
menuData?.map(
(item,key)
=> (
<RcItem id={item} onClick={handleItemClick}>
<RcItem
key={key}
id={item} onClick={handleItemClick}>
{item}
{item}
</RcItem>
</RcItem>
))
))
}
}
<RcItem id={'发起问责'} onClick={handleItemClick}>
发起问责
</RcItem>
</RcMenu>
</RcMenu>
{contextHolder}
{contextHolder}
</div>
</div>
)
)
...
...
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