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
bb00d951
Commit
bb00d951
authored
Apr 24, 2025
by
fanyj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tijiao
parent
0cca2a3c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
5 deletions
+81
-5
commons.ts
src/commons.ts
+2
-1
index.ts
src/services/index.ts
+4
-1
usersService.ts
src/services/usersService.ts
+0
-0
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+12
-3
SelectUser.tsx
src/view/Manage/AssetManage/Component/SelectUser.tsx
+63
-0
No files found.
src/commons.ts
View file @
bb00d951
...
...
@@ -94,7 +94,8 @@ const config = {
pdataservice
:
`
${
Api
}
/pdataservice`
,
dbmanager
:
`
${
Api
}
/dbmanager`
,
datasource
:
`
${
Api
}
/metadataharvester/datasource`
,
classifier
:
`
${
Api
}
/classifier`
classifier
:
`
${
Api
}
/classifier`
,
syncdata
:
`
${
Api
}
/syncdata`
,
}
}
...
...
src/services/index.ts
View file @
bb00d951
...
...
@@ -2,10 +2,12 @@ import metaManageService from "./metaManageService"
import
metaAdminManageService
from
"./metaAdminManageService"
import
metaUserManageService
from
"./metaUserManageService"
import
assetsActionManageService
from
"./assetsActionManageService"
import
usersService
from
"./usersService"
export
{
metaManageService
,
metaAdminManageService
,
metaUserManageService
,
assetsActionManageService
assetsActionManageService
,
usersService
}
\ No newline at end of file
src/services/usersService.ts
0 → 100644
View file @
bb00d951
This diff is collapsed.
Click to expand it.
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
bb00d951
...
...
@@ -18,7 +18,7 @@ import Table from '../../ResizeableTable';
import
SubsribeButton
from
'./subscribe-button'
;
import
{
CancelSvg
,
EditSvg
,
SaveSvg
,
FullScreenSvg
,
CancelFullScreenSvg
}
from
'./AssetSvg'
;
import
SelectUser
from
'../
../Model/Component/SelectUsers
'
;
import
SelectUser
from
'../
Component/SelectUser
'
;
import
SelectFilter
from
'../../Model/Component/SelectFilter'
;
import
{
checkDataAssetEditable
}
from
'../../../../service/dataassetmanager'
;
import
download
from
'../../../../util/download'
;
...
...
@@ -789,6 +789,7 @@ const getResourceTag = () => {
// };
const elementEditComponent = (element) => {
console.log(element)
if (element.selectMode==='单选') {
return (
<Select
...
...
@@ -806,18 +807,26 @@ const getResourceTag = () => {
)
}
if(element.name==='数据负责人'||element.name==='数据管家'){
return <SelectUser item={element} />
}
if (element.selectMode==='多选') return <MultipleSelect element={element}/>;
return <Input disabled={element.manualMaintain==='否'} />;
}
const elementDetailComponent = (item, publishedItem) => {
return <span>
if(item.name==='数据负责人'||item.name==='数据管家'){
return <SelectUser value={item.value} item={item} readOnly={true} terms={terms} />
}else{
return <span>
<Typography.Text>{highlightSearchContentByTerms(item.value||'', terms)}</Typography.Text>
{
publishedItem?.value && publishedItem?.value!==item.value && <Typography.Text className='ml-2' type='danger'><del>{publishedItem?.value}</del></Typography.Text>
}
</span>;
}
}
const onExportClick = () => {
...
...
@@ -1037,7 +1046,7 @@ const getResourceTag = () => {
<Divider orientation='left'>字段级资源目录信息</Divider>
</div>
<Button size='small' onClick={()=>{comparemodal.openModal()}}>对比</Button>
{action!=='add'&&<Button size='small' onClick={()=>{comparemodal.openModal()}}>对比</Button>}
</div>
{
...
...
src/view/Manage/AssetManage/Component/SelectUser.tsx
0 → 100644
View file @
bb00d951
import
{
useSetState
}
from
"ahooks"
import
React
,
{
useEffect
}
from
"react"
import
{
Select
}
from
"antd"
import
{
usersService
}
from
"@/services"
import
{
httpUtil
}
from
"@/utils"
import
{
highlightSearchContentByTerms
}
from
'../../../../util'
;
const
SelectUser
:
React
.
FC
<
any
>=
(
props
)
=>
{
const
{
value
,
onChange
,
item
,
readOnly
=
false
,
terms
=
[]}
=
props
const
[
state
,
setState
]
=
useSetState
({
usermap
:{},
userlist
:[],
loading
:
false
,
})
useEffect
(()
=>
{
if
(
item
.
name
){
getusers
()
}
},[
item
])
const
getusers
=
async
()
=>
{
const
id
=
1
setState
({
loading
:
true
})
const
result
:
any
=
await
usersService
.
getUserInRoles
({
params
:{
dataRoleId
:
id
}})
if
(
httpUtil
.
checkSuccess
(
result
,
1
)){
let
obj
=
{};
let
list
=
[];
result
.
data
.
forEach
((
item
)
=>
{
const
label
=
`
${
item
.
name
}
(
${
item
.
dname
}
)`
;
obj
[
item
.
name
]
=
label
;
list
.
push
({
value
:
item
.
name
,
label
})
})
setState
({
loading
:
false
,
userlist
:
list
,
usermap
:
obj
})
}
else
{
setState
({
loading
:
false
,
userlist
:[],
usermap
:{}})
}
}
if
(
readOnly
){
return
<
span
>
{
highlightSearchContentByTerms
(
state
.
usermap
[
value
],
terms
)
}
</
span
>
}
else
{
return
(
<
Select
options=
{
state
.
userlist
}
loading=
{
state
.
loading
}
value=
{
value
}
onChange=
{
onChange
}
style=
{
{
width
:
'100%'
}
}
showSearch
filterOption=
{
(
input
,
option
)
=>
(
option
?.
label
??
''
).
toLowerCase
().
includes
(
input
.
toLowerCase
())
}
/>
)
}
}
export
default
SelectUser
\ 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