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
0283d219
Commit
0283d219
authored
Apr 24, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
6643d4c3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
10 deletions
+29
-10
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+5
-2
edit-assets.jsx
src/view/Manage/AssetResourceManage/edit-assets.jsx
+20
-4
table.jsx
src/view/Manage/AssetResourceManage/table.jsx
+4
-4
No files found.
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
0283d219
...
@@ -660,8 +660,10 @@ export const ElementItem = ({ type = 'detail', element, reference = AssetManageR
...
@@ -660,8 +660,10 @@ export const ElementItem = ({ type = 'detail', element, reference = AssetManageR
}
}
return (
return (
<React.Fragment>
<div onClick={e => {
e.stopPropagation()
}}>
{inputItem()}
{inputItem()}
</
React.Fragment
>
</
div
>
)
)
}
}
\ No newline at end of file
src/view/Manage/AssetResourceManage/edit-assets.jsx
View file @
0283d219
...
@@ -7,7 +7,7 @@ import LocalStorage from 'local-storage'
...
@@ -7,7 +7,7 @@ import LocalStorage from 'local-storage'
import
{
dispatch
}
from
'../../../model'
import
{
dispatch
}
from
'../../../model'
import
{
usePage
}
from
'../../../util/hooks/page'
import
{
usePage
}
from
'../../../util/hooks/page'
import
Table
from
'../../../util/Component/Table'
import
Table
from
'../../../util/Component/Table'
import
{
getAssetType
,
getAssetTypeName
,
getQueryParam
,
isSzseEnv
}
from
'../../../util'
import
{
getAssetType
,
getAssetTypeName
,
getQueryParam
,
isSzseEnv
,
showMessage
}
from
'../../../util'
import
'../Model/Component/EditModel.less'
import
'../Model/Component/EditModel.less'
import
{
ElementItem
,
MultipleItem
}
from
'../AssetManage/Component/AssetAction'
import
{
ElementItem
,
MultipleItem
}
from
'../AssetManage/Component/AssetAction'
...
@@ -17,6 +17,7 @@ import produce from 'immer'
...
@@ -17,6 +17,7 @@ import produce from 'immer'
const
pathElement
=
{
const
pathElement
=
{
name
:
'资产目录'
,
name
:
'资产目录'
,
supportBatchEdit
:
'是'
,
supportBatchEdit
:
'是'
,
manualMaintain
:
'是'
,
require
:
true
,
require
:
true
,
}
}
...
@@ -71,6 +72,14 @@ const FC = (props) => {
...
@@ -71,6 +72,14 @@ const FC = (props) => {
try
{
try
{
await
editAssetsRef
.
current
?.
save
()
await
editAssetsRef
.
current
?.
save
()
const
modifyData
=
editAssetsRef
.
current
?.
getModifyData
()
const
modifyData
=
editAssetsRef
.
current
?.
getModifyData
()
if
((
elementIds
??[]).
length
===
0
)
{
const
index
=
(
modifyData
.
rowDataList
??[]).
findIndex
(
item
=>
(
item
.
dirIds
??[]).
length
===
0
)
if
(
index
!==
-
1
)
{
showMessage
(
'warn'
,
'请选择资产目录'
)
return
}
}
setWaiting
(
true
)
setWaiting
(
true
)
dispatch
({
dispatch
({
type
:
(
elementIds
??[]).
length
===
0
?
'assetmanage.resourceBatchAddAsAsset'
:
'assetmanage.resourceBatchEdit'
,
type
:
(
elementIds
??[]).
length
===
0
?
'assetmanage.resourceBatchAddAsAsset'
:
'assetmanage.resourceBatchEdit'
,
...
@@ -84,8 +93,12 @@ const FC = (props) => {
...
@@ -84,8 +93,12 @@ const FC = (props) => {
setWaiting
(
false
)
setWaiting
(
false
)
setAction
(
'detail'
)
setAction
(
'detail'
)
LocalStorage
.
set
(
'editAssetsChange'
,
!
(
LocalStorage
.
get
(
'editAssetsChange'
)??
false
))
LocalStorage
.
set
(
'editAssetsChange'
,
!
(
LocalStorage
.
get
(
'editAssetsChange'
)??
false
))
showMessage
(
'success'
,
'保存成功'
)
if
((
elementIds
??[]).
length
===
0
)
{
if
((
elementIds
??[]).
length
===
0
)
{
setTimeout
(()
=>
{
window
.
close
()
window
.
close
()
},
[
300
])
}
}
},
},
error
:
()
=>
{
error
:
()
=>
{
...
@@ -255,12 +268,13 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
...
@@ -255,12 +268,13 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
const
columns
=
React
.
useMemo
(()
=>
{
const
columns
=
React
.
useMemo
(()
=>
{
const
newColumns
=
[]
const
newColumns
=
[]
let
index
=
0
let
newElements
=
[...
elements
??[]]
let
newElements
=
[...
elements
??[]]
if
((
elementIds
??[]).
length
===
0
)
{
if
((
elementIds
??[]).
length
===
0
)
{
newElements
=
[
pathElement
,
...
newElements
]
newElements
=
[
pathElement
,
...
newElements
]
}
}
newElements
=
newElements
.
filter
(
item
=>
item
.
manualMaintain
===
'是'
)
for
(
const
element
of
newElements
??[])
{
for
(
const
element
of
newElements
??[])
{
let
col
=
{
let
col
=
{
title
:
element
.
name
,
title
:
element
.
name
,
...
@@ -293,6 +307,9 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
...
@@ -293,6 +307,9 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
</
Tooltip
>
</
Tooltip
>
);
);
}
}
}
else
if
(
element
.
metadataItem
===
'是'
)
{
col
.
width
=
200
col
.
render
=
(
text
,
record
)
=>
<
ElementItem
type=
'detail'
element=
{
element
}
value=
{
text
}
/>
}
}
col
.
onCell
=
(
record
)
=>
({
col
.
onCell
=
(
record
)
=>
({
...
@@ -311,7 +328,6 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
...
@@ -311,7 +328,6 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
}
}
}
}
index
++
newColumns
.
push
(
col
)
newColumns
.
push
(
col
)
}
}
...
@@ -356,7 +372,7 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
...
@@ -356,7 +372,7 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
if
((
elementIds
??[]).
length
===
0
)
{
if
((
elementIds
??[]).
length
===
0
)
{
url
=
'assetmanage.getAddAsAssetBatchEditInfo'
url
=
'assetmanage.getAddAsAssetBatchEditInfo'
payload
=
{
payload
=
{
data
:
ids
data
:
(
ids
??
''
).
split
(
','
)
}
}
}
else
{
}
else
{
url
=
'assetmanage.getResourceBatchEditInfo'
url
=
'assetmanage.getResourceBatchEditInfo'
...
...
src/view/Manage/AssetResourceManage/table.jsx
View file @
0283d219
...
@@ -1672,12 +1672,12 @@ export const MetadataColumnTooltipTitle = ({ data }) => {
...
@@ -1672,12 +1672,12 @@ export const MetadataColumnTooltipTitle = ({ data }) => {
dataIndex: 'typeName',
dataIndex: 'typeName',
ellipsis: true,
ellipsis: true,
render: (text, record) => {
render: (text, record) => {
let suffix = (record.size
!==null&&record.size!==undefined
) ? `
(
$
{
record
.
size
})
` : ''
let suffix = (record.size) ? `
(
$
{
record
.
size
})
` : ''
if(record.size && record.decimalDigits){
if(record.size && record.decimalDigits){
suffix = `
(
$
{
record
.
size
},
$
{
record
.
decimalDigits
})
`
suffix = `
(
$
{
record
.
size
},
$
{
record
.
decimalDigits
})
`
}
}
return `
$
{
text
}
$
{
suffix
}
`
return `
$
{
text
??
''
}
$
{
suffix
}
`
}
}
},
},
{
{
...
@@ -1714,9 +1714,9 @@ export const MetadataColumnTooltipTitle = ({ data }) => {
...
@@ -1714,9 +1714,9 @@ export const MetadataColumnTooltipTitle = ({ data }) => {
type: 'assetmanage.getMetadataColumns',
type: 'assetmanage.getMetadataColumns',
payload: {
payload: {
params: {
params: {
parentId: currentMetadataId
parentId: currentMetadataId
,
},
},
data: [
"Catalog,Database,Schema,Table,Column"]
data: [
],
},
},
callback: (data) => {
callback: (data) => {
setLoading(false)
setLoading(false)
...
...
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