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
e6fc6631
Commit
e6fc6631
authored
Dec 14, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务分配增加查看通知模版
parent
33e1ce9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
25 deletions
+67
-25
assetmanage.js
src/model/assetmanage.js
+5
-0
dataassetmanager.js
src/service/dataassetmanager.js
+5
-0
distribute-task.jsx
src/view/Manage/AssetResourceManage/distribute-task.jsx
+57
-25
No files found.
src/model/assetmanage.js
View file @
e6fc6631
...
@@ -410,4 +410,8 @@ export function* getOperationPopularDataAssetRanking() {
...
@@ -410,4 +410,8 @@ export function* getOperationPopularDataAssetRanking() {
export
function
*
getOperationLatestDataAssetRanking
()
{
export
function
*
getOperationLatestDataAssetRanking
()
{
return
yield
call
(
service
.
getOperationLatestDataAssetRanking
)
return
yield
call
(
service
.
getOperationLatestDataAssetRanking
)
}
export
function
*
getNoticeTemplate
(
payload
)
{
return
yield
call
(
service
.
getNoticeTemplate
,
payload
)
}
}
\ No newline at end of file
src/service/dataassetmanager.js
View file @
e6fc6631
...
@@ -398,4 +398,8 @@ export function getPreviewRangeByDirId(payload) {
...
@@ -398,4 +398,8 @@ export function getPreviewRangeByDirId(payload) {
export
function
getOperationLatestDataAssetRanking
()
{
export
function
getOperationLatestDataAssetRanking
()
{
return
GetJSON
(
"/dataassetmanager/operationApi/getLatestDataAssetRanking"
)
return
GetJSON
(
"/dataassetmanager/operationApi/getLatestDataAssetRanking"
)
}
export
function
getNoticeTemplate
(
payload
)
{
return
Get
(
"/baseservice/noticeTemplate/getTemplateContent"
,
payload
)
}
}
\ No newline at end of file
src/view/Manage/AssetResourceManage/distribute-task.jsx
View file @
e6fc6631
import
React
from
"react"
import
React
from
"react"
import
{
Modal
,
Button
,
Form
,
Select
,
Spin
,
Checkbox
}
from
"antd"
import
{
Modal
,
Button
,
Form
,
Select
,
Spin
,
Checkbox
,
Space
,
Row
}
from
"antd"
import
{
debounceTime
,
Subject
}
from
'rxjs'
import
{
debounceTime
,
Subject
}
from
'rxjs'
import
produce
from
"immer"
import
produce
from
"immer"
...
@@ -75,7 +75,6 @@ const FC = (props) => {
...
@@ -75,7 +75,6 @@ const FC = (props) => {
export
default
FC
export
default
FC
export
const
Basic
=
React
.
forwardRef
(
function
({
items
},
ref
)
{
export
const
Basic
=
React
.
forwardRef
(
function
({
items
},
ref
)
{
const
[
noticeTypes
,
setNoticeTypes
]
=
React
.
useState
()
const
[
form
]
=
Form
.
useForm
()
const
[
form
]
=
Form
.
useForm
()
React
.
useImperativeHandle
(
ref
,
()
=>
({
React
.
useImperativeHandle
(
ref
,
()
=>
({
...
@@ -84,28 +83,6 @@ export const Basic = React.forwardRef(function ({ items }, ref) {
...
@@ -84,28 +83,6 @@ export const Basic = React.forwardRef(function ({ items }, ref) {
},
},
}),
[
form
])
}),
[
form
])
React
.
useEffect
(()
=>
{
getNoticeTypes
()
},
[])
const
getNoticeTypes
=
()
=>
{
dispatch
({
type
:
'assetmanage.getNoticeTypes'
,
callback
:
(
data
)
=>
{
const
newData
=
produce
(
data
,
(
draft
)
=>
{
draft
?.
forEach
(
item
=>
{
item
.
label
=
item
.
desc
item
.
value
=
item
.
type
})
})
setNoticeTypes
(
newData
)
},
error
:
()
=>
{
}
})
}
const
onValuesChange
=
(
changedValues
,
allValues
)
=>
{
const
onValuesChange
=
(
changedValues
,
allValues
)
=>
{
console
.
log
(
'all values'
,
allValues
)
console
.
log
(
'all values'
,
allValues
)
}
}
...
@@ -130,7 +107,7 @@ export const Basic = React.forwardRef(function ({ items }, ref) {
...
@@ -130,7 +107,7 @@ export const Basic = React.forwardRef(function ({ items }, ref) {
name=
'noticeTypes'
name=
'noticeTypes'
rules=
{
[{
required
:
true
,
message
:
'请选择通知方式!'
}]
}
rules=
{
[{
required
:
true
,
message
:
'请选择通知方式!'
}]
}
>
>
<
Checkbox
.
Group
options=
{
noticeTypes
}
/>
<
NoticeItem
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
)
)
...
@@ -205,4 +182,58 @@ export const HandlersItem = ({ value, onChange }) => {
...
@@ -205,4 +182,58 @@ export const HandlersItem = ({ value, onChange }) => {
options=
{
options
}
options=
{
options
}
/>
/>
)
)
}
const
NoticeItem
=
({
value
,
onChange
})
=>
{
const
[
noticeTypes
,
setNoticeTypes
]
=
React
.
useState
()
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
()
React
.
useEffect
(()
=>
{
getNoticeTypes
()
},
[])
const
getNoticeTypes
=
()
=>
{
dispatch
({
type
:
'assetmanage.getNoticeTypes'
,
callback
:
(
data
)
=>
{
setNoticeTypes
(
data
)
}
})
}
return
(
<
div
style=
{
{
lineHeight
:
'32px'
}
}
>
{
(
noticeTypes
??[]).
map
((
item
,
index
)
=>
(
<
Row
key=
{
index
}
>
<
Space
>
<
Checkbox
checked=
{
(
value
??[]).
indexOf
(
item
.
type
)
!==
-
1
}
value=
{
item
.
type
}
style=
{
{
width
:
100
}
}
onChange=
{
(
e
)
=>
{
if
(
e
.
target
.
checked
)
{
onChange
?.([...
value
??[],
item
.
type
])
}
else
{
onChange
?.((
value
??[]).
filter
(
item
=>
item
!==
e
.
target
.
value
))
}
}
}
>
{
item
.
desc
}
</
Checkbox
>
<
a
onClick=
{
()
=>
{
dispatch
({
type
:
'assetmanage.getNoticeTemplate'
,
payload
:
{
module
:
'dataAsset'
,
type
:
item
.
desc
},
callback
:
(
content
)
=>
{
modal
.
info
({
title
:
'模版信息'
,
content
:
content
??
''
,
})
}
})
}
}
>
查看通知模版
</
a
>
</
Space
>
</
Row
>
))
}
{
contextHolder
}
</
div
>
)
}
}
\ 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