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
4490350d
Commit
4490350d
authored
Apr 23, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
af16a2df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
edit-assets.jsx
src/view/Manage/AssetResourceManage/edit-assets.jsx
+15
-4
No files found.
src/view/Manage/AssetResourceManage/edit-assets.jsx
View file @
4490350d
...
@@ -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
,
getQueryParam
,
isSzseEnv
}
from
'../../../util'
import
{
getAssetType
,
get
AssetTypeName
,
get
QueryParam
,
isSzseEnv
}
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'
...
@@ -37,6 +37,15 @@ const FC = (props) => {
...
@@ -37,6 +37,15 @@ const FC = (props) => {
}
}
},
[])
},
[])
const
title
=
React
.
useMemo
(()
=>
{
let
newTitle
=
''
if
(
type
)
{
newTitle
=
getAssetTypeName
(
type
)
}
return
(
elementIds
??[]).
length
===
0
?
`
${
newTitle
}
批量转资产`
:
`
${
newTitle
}
批量编辑`
},
[
type
,
elementIds
])
const
heartbeat
=
()
=>
{
const
heartbeat
=
()
=>
{
dispatch
({
dispatch
({
type
:
'datamodel.heartbeat'
type
:
'datamodel.heartbeat'
...
@@ -85,7 +94,7 @@ const FC = (props) => {
...
@@ -85,7 +94,7 @@ const FC = (props) => {
<
Spin
spinning=
{
waiting
}
>
<
Spin
spinning=
{
waiting
}
>
<
div
className=
'edit-model position-relative'
>
<
div
className=
'edit-model position-relative'
>
<
div
className=
'edit-header'
>
<
div
className=
'edit-header'
>
<
span
style=
{
{
fontSize
:
16
,
fontWeight
:
'bold'
,
color
:
'#fff'
}
}
>
资产批量编辑
</
span
>
<
span
style=
{
{
fontSize
:
16
,
fontWeight
:
'bold'
,
color
:
'#fff'
}
}
>
{
title
}
</
span
>
</
div
>
</
div
>
<
div
className=
'edit-container'
>
<
div
className=
'edit-container'
>
<
div
className=
'edit-container-card'
style=
{
{
padding
:
'20px 20px 0'
}
}
>
<
div
className=
'edit-container-card'
style=
{
{
padding
:
'20px 20px 0'
}
}
>
...
@@ -196,7 +205,9 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
...
@@ -196,7 +205,9 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
const
rows
=
await
colBatchEditForm
.
validateFields
()
const
rows
=
await
colBatchEditForm
.
validateFields
()
const
newModifyData
=
[...
modifyData
]
const
newModifyData
=
[...
modifyData
]
if
(
dataIndex
===
pathElement
.
name
)
{
if
(
dataIndex
===
pathElement
.
name
)
{
item
.
paths
=
rows
[
dataIndex
]
for
(
const
item
of
newModifyData
)
{
item
.
paths
=
rows
[
dataIndex
]
}
}
else
{
}
else
{
const
index
=
(
element
??[]).
findIndex
(
item
=>
item
.
name
===
dataIndex
)
const
index
=
(
element
??[]).
findIndex
(
item
=>
item
.
name
===
dataIndex
)
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
...
@@ -275,7 +286,7 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
...
@@ -275,7 +286,7 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
loadingTreeData
,
loadingTreeData
,
treeData
,
treeData
,
})
})
if
(
action
===
'edit'
&&
element
.
name
!==
'编号'
&&
element
.
name
!==
'中文名称'
&&
element
.
name
!==
'英文名称'
)
{
if
(
action
===
'edit'
)
{
col
=
{
col
=
{
...
col
,
...
col
,
...
getColumnBatchEditProps
(
element
,
element
.
name
)
...
getColumnBatchEditProps
(
element
,
element
.
name
)
...
...
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