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
71991c73
Commit
71991c73
authored
Apr 12, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉checkCodeIsExist
parent
52d5c1d6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
58 deletions
+40
-58
AddAssetModel.jsx
src/view/Manage/AssetManage/Component/AddAssetModel.jsx
+0
-16
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+40
-26
AssetTagModal.jsx
src/view/Manage/AssetManage/Component/AssetTagModal.jsx
+0
-16
No files found.
src/view/Manage/AssetManage/Component/AddAssetModel.jsx
View file @
71991c73
...
...
@@ -40,16 +40,6 @@ const AddAssetModel = (props) => {
setWaiting
(
true
);
dispatch
({
type
:
'assetmanage.checkCodeIsExist'
,
payload
:
{
data
:
{
elements
:
newElements
}
},
callback
:
isExist
=>
{
if
(
isExist
===
'true'
)
{
setWaiting
(
false
);
showMessage
(
'warn'
,
'已存在相同的资产目录编号,请重新输入'
);
}
else
{
dispatch
({
type
:
'assetmanage.checkIsNeedSaveAsDraft'
,
callback
:
(
data
)
=>
{
const
needSaveAsDraft
=
(
data
===
'true'
)?
true
:
false
...
...
@@ -76,12 +66,6 @@ const AddAssetModel = (props) => {
setWaiting
(
false
);
}
})
}
},
error
:
()
=>
{
setWaiting
(
false
);
}
})
}
catch
(
errInfo
)
{
console
.
log
(
'Validate Failed:'
,
errInfo
);
...
...
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
71991c73
...
...
@@ -132,6 +132,28 @@ const AssetAction = (props) => {
},
];
const
businessActionCol
=
{
title
:
'操作'
,
dataIndex
:
'action'
,
width
:
80
,
fixed
:
'right'
,
render
:
(
_
,
record
,
index
)
=>
{
return
<
Button
size=
'small'
onClick=
{
()
=>
{
setModifyMetadataColumnList
(
prev
=>
{
const
newModifyList
=
[...
prev
]
newModifyList
.
splice
(
index
,
1
)
return
newModifyList
})
}
}
>
删除
</
Button
>
}
}
useEffect
(()
=>
{
if
(
!
readonly
)
{
getSystems
();
...
...
@@ -196,10 +218,19 @@ const AssetAction = (props) => {
return
[];
},
[
currentDomainGroup
,
currentBussinessDomain
,
treeDataMap
])
const
tableData
=
useMemo
(()
=>
{
const
cols
=
useMemo
(()
=>
{
let
newCols
=
[...
businessCols
]
if
(
isMetadataEdit
)
{
newCols
.
push
(
businessActionCol
)
}
return
newCols
},
[
isMetadataEdit
,
modifyMetadataColumnList
])
const
[
tableData
,
total
]
=
useMemo
(()
=>
{
let
currentMetadataColumnList
=
isMetadataEdit
?
[...
modifyMetadataColumnList
||
[]]
:
[...
metadataColumnList
||
[]]
return
paginate
(
currentMetadataColumnList
,
pageNum
,
pageSize
)
;
return
[
paginate
(
currentMetadataColumnList
,
pageNum
,
pageSize
),
currentMetadataColumnList
.
length
]
;
},
[
metadataColumnList
,
modifyMetadataColumnList
,
pagination
,
keyword
,
isMetadataEdit
,
assets
])
const
getPermission
=
()
=>
{
...
...
@@ -563,16 +594,6 @@ const AssetAction = (props) => {
}
})
} else {
dispatch({
type: 'assetmanage.checkCodeIsExist',
payload: {
data: action==='add' ? { elements: newElements } : { ...assets, elements: newElements }
},
callback: isExist => {
if (isExist === 'true') {
setConfirmLoading(false);
showMessage('warn', '已存在相同的资产目录编号,请重新输入');
} else {
let params = {
dirId,
metadataId: metadataId??'',
...
...
@@ -601,12 +622,6 @@ const AssetAction = (props) => {
}
})
}
},
error: () => {
setConfirmLoading(false);
}
})
}
} catch (errInfo) {
console.log('Validate Failed:', errInfo);
showMessage('warn', '请完成资产必填项')
...
...
@@ -765,13 +780,13 @@ const AssetAction = (props) => {
<Button onClick={onActionButtonClick}>{(reference===AssetDraftReference||!needSaveAsDraft)?'保存':'保存草稿'}</Button>
</React.Fragment>
}
{
{
/* {
(reference!==AssetDraftReference&&!isPostAsset(assets?.templateType)) && <Button onClick={onAuthorizationButtonClick}>授权</Button>
}
}
*/}
</React.Fragment>
}
{
{
/* {
reference !== AssetRecycleReference && <Button onClick={shareAsset}>分享</Button>
}
{
...
...
@@ -801,7 +816,7 @@ const AssetAction = (props) => {
</Space>
</Button>
</Dropdown>
}
}
*/}
</Space>
}
</div>
...
...
@@ -951,13 +966,12 @@ const AssetAction = (props) => {
<Table
className='mt-3'
loading={loadingMetadataColumnList}
columns={
businessC
ols??[]}
columns={
c
ols??[]}
rowKey='_id'
dataSource={tableData||[]}
pagination={{
position: ['bottomLeft'],
size: 'small',
total: (metadataColumnList||[]).length,
position: ['bottomCenter'],
total,
showTotal: (total) => `
共
$
{
total
}
项
`,
showSizeChanger: true,
current: pageNum,
...
...
src/view/Manage/AssetManage/Component/AssetTagModal.jsx
View file @
71991c73
...
...
@@ -151,16 +151,6 @@ const AssetTagModal = (props) => {
setConfirmLoading
(
true
);
dispatch
({
type
:
'assetmanage.checkCodeIsExist'
,
payload
:
{
data
:
{
...
asset
,
elements
:
newElements
}
},
callback
:
isExist
=>
{
if
(
isExist
===
'true'
)
{
setConfirmLoading
(
false
);
showMessage
(
'warn'
,
'已存在相同的资产目录编号,请重新输入'
);
}
else
{
dispatch
({
type
:
'assetmanage.addOrUpdateDataAsset'
,
payload
:
{
params
,
...
...
@@ -195,12 +185,6 @@ const AssetTagModal = (props) => {
setConfirmLoading
(
false
);
}
})
}
},
error
:
()
=>
{
setConfirmLoading
(
false
);
}
})
}
catch
(
errInfo
)
{
console
.
log
(
'Validate Failed:'
,
errInfo
);
...
...
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