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
53dd6146
Commit
53dd6146
authored
Oct 27, 2025
by
放生的三文鱼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产草稿
parent
7de5bf81
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
16 deletions
+36
-16
AssetDraft.jsx
src/view/Manage/AssetDraft/component/AssetDraft.jsx
+23
-5
assetData.jsx
src/view/Manage/AssetDraft/hooks/assetData.jsx
+11
-8
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+0
-1
AssetDetailDrawer.jsx
src/view/Manage/AssetManage/Component/AssetDetailDrawer.jsx
+2
-2
No files found.
src/view/Manage/AssetDraft/component/AssetDraft.jsx
View file @
53dd6146
...
@@ -11,9 +11,16 @@ import {
...
@@ -11,9 +11,16 @@ import {
}
from
"antd"
;
}
from
"antd"
;
import
{
useGetAssetDraft
}
from
"../hooks/assetData"
;
import
{
useGetAssetDraft
}
from
"../hooks/assetData"
;
import
{
debounce
}
from
"lodash"
;
import
{
debounce
}
from
"lodash"
;
import
'./index.less'
import
AssetDetailDrawer
from
"../../AssetManage/Component/AssetDetailDrawer"
;
import
"./index.less"
;
// 主组件
// 主组件
const
AssetManagementTable
=
()
=>
{
const
AssetManagementTable
=
()
=>
{
const
[
draftParams
,
setDraftParams
]
=
React
.
useState
({
visible
:
false
,
dirId
:
""
,
id
:
''
,
templateType
:
""
,
});
const
{
const
{
loading
,
loading
,
templates
,
templates
,
...
@@ -25,8 +32,7 @@ const AssetManagementTable = () => {
...
@@ -25,8 +32,7 @@ const AssetManagementTable = () => {
setPagination
,
setPagination
,
dataLoading
,
dataLoading
,
draftData
,
draftData
,
}
=
useGetAssetDraft
();
}
=
useGetAssetDraft
({
setDraftParams
});
console
.
log
(
"columns"
,
columns
);
const
changeTemplate
=
(
value
)
=>
{
const
changeTemplate
=
(
value
)
=>
{
setCurrentTemplate
(
value
);
setCurrentTemplate
(
value
);
...
@@ -56,7 +62,7 @@ const AssetManagementTable = () => {
...
@@ -56,7 +62,7 @@ const AssetManagementTable = () => {
};
};
return
(
return
(
<
div
style=
{
{
background
:
"#fff"
}
}
className=
"container"
>
<
div
style=
{
{
background
:
"#fff"
}
}
className=
"container"
>
{
/* 操作按钮区域 */
}
{
/* 操作按钮区域 */
}
<
div
<
div
style=
{
{
style=
{
{
...
@@ -123,7 +129,7 @@ const AssetManagementTable = () => {
...
@@ -123,7 +129,7 @@ const AssetManagementTable = () => {
scroll=
{
{
x
:
true
}
}
scroll=
{
{
x
:
true
}
}
/>
/>
<
Pagination
<
Pagination
style=
{
{
margin
:
"12px auto"
,
textAlign
:
"center"
}
}
style=
{
{
margin
:
"12px auto"
,
textAlign
:
"center"
}
}
showTotal=
{
(
total
)
=>
`共 ${total} 条记录`
}
showTotal=
{
(
total
)
=>
`共 ${total} 条记录`
}
showSizeChanger
showSizeChanger
showQuickJumper
showQuickJumper
...
@@ -133,6 +139,18 @@ const AssetManagementTable = () => {
...
@@ -133,6 +139,18 @@ const AssetManagementTable = () => {
onShowSizeChange=
{
handlePageChange
}
onShowSizeChange=
{
handlePageChange
}
total=
{
pagination
.
total
}
total=
{
pagination
.
total
}
/>
/>
<
AssetDetailDrawer
{
...
draftParams
}
onCancel=
{
()
=>
{
setDraftParams
({
visible
:
false
,
dirId
:
""
,
id
:
''
,
templateType
:
""
,
});
}
}
/>
</
div
>
</
div
>
);
);
};
};
...
...
src/view/Manage/AssetDraft/hooks/assetData.jsx
View file @
53dd6146
...
@@ -11,7 +11,7 @@ import { showMessage } from "../../../../util";
...
@@ -11,7 +11,7 @@ import { showMessage } from "../../../../util";
const
{
Text
}
=
Typography
;
const
{
Text
}
=
Typography
;
// ../standardmanage/hooks/sourceMap
// ../standardmanage/hooks/sourceMap
export
function
useGetAssetDraft
()
{
export
function
useGetAssetDraft
(
{
setDraftParams
}
)
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
templates
,
setTemplates
]
=
useState
();
const
[
templates
,
setTemplates
]
=
useState
();
const
[
currentTemplate
,
setCurrentTemplate
]
=
useState
();
const
[
currentTemplate
,
setCurrentTemplate
]
=
useState
();
...
@@ -66,7 +66,6 @@ export function useGetAssetDraft() {
...
@@ -66,7 +66,6 @@ export function useGetAssetDraft() {
);
);
},
},
};
};
// if (name === "编号") {
// if (name === "编号") {
// params.width = 60;
// params.width = 60;
// // params.fixed = 'left';
// // params.fixed = 'left';
...
@@ -182,13 +181,15 @@ export function useGetAssetDraft() {
...
@@ -182,13 +181,15 @@ export function useGetAssetDraft() {
// 发布操作逻辑
// 发布操作逻辑
console
.
log
(
"发布记录:"
,
record
);
console
.
log
(
"发布记录:"
,
record
);
};
};
const
handleStop
=
()
=>
{
const
handleEdit
=
(
record
)
=>
{
// 停用操作逻辑
console
.
log
(
"停用记录:"
,
record
);
};
const
handleEdit
=
()
=>
{
// 编辑操作逻辑
// 编辑操作逻辑
console
.
log
(
"编辑记录:"
,
record
);
console
.
log
(
"编辑记录:"
,
record
);
setDraftParams
({
visible
:
true
,
dirId
:
record
?.
dirId
,
id
:
record
?.
id
,
templateType
:
currentTemplate
,
});
};
};
const
handleDelete
=
async
(
record
)
=>
{
const
handleDelete
=
async
(
record
)
=>
{
// 删除操作逻辑
// 删除操作逻辑
...
@@ -222,7 +223,9 @@ export function useGetAssetDraft() {
...
@@ -222,7 +223,9 @@ export function useGetAssetDraft() {
waring
waring
disabled=
{
disabled
}
disabled=
{
disabled
}
type=
"link"
type=
"link"
onClick=
{
handleEdit
}
onClick=
{
()
=>
{
handleEdit
(
record
);
}
}
>
>
编辑
编辑
</
Button
>
</
Button
>
...
...
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
53dd6146
...
@@ -604,7 +604,6 @@ const AssetAction = (props) => {
...
@@ -604,7 +604,6 @@ const AssetAction = (props) => {
})
})
} catch (errInfo) {
} catch (errInfo) {
console.log('Validate Failed:', errInfo);
showMessage('warn', '请完成资产必填项')
showMessage('warn', '请完成资产必填项')
}
}
}
}
...
...
src/view/Manage/AssetManage/Component/AssetDetailDrawer.jsx
View file @
53dd6146
...
@@ -4,7 +4,7 @@ import { Drawer, Form } from 'antd';
...
@@ -4,7 +4,7 @@ import { Drawer, Form } from 'antd';
import
AssetAction
from
'./AssetAction'
;
import
AssetAction
from
'./AssetAction'
;
const
AssetDetailDrawer
=
(
props
)
=>
{
const
AssetDetailDrawer
=
(
props
)
=>
{
const
{
onCancel
,
visible
,
id
,
dirId
,
reference
}
=
props
;
const
{
onCancel
,
visible
,
id
,
dirId
,
reference
,
templateType
=
''
,
draftId
=
''
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
return
(
return
(
...
@@ -20,7 +20,7 @@ const AssetDetailDrawer = (props) => {
...
@@ -20,7 +20,7 @@ const AssetDetailDrawer = (props) => {
}
}
}
}
>
>
{
{
visible
&&
<
AssetAction
reference=
{
reference
}
form=
{
form
}
id=
{
id
}
dirId=
{
dir
Id
}
action=
'detail'
onChange=
{
()
=>
{
visible
&&
<
AssetAction
templateType=
{
templateType
}
reference=
{
reference
}
form=
{
form
}
id=
{
id
}
dirId=
{
dirId
}
draftId=
{
draft
Id
}
action=
'detail'
onChange=
{
()
=>
{
onCancel
?.(
true
);
onCancel
?.(
true
);
}
}
/>
}
}
/>
}
}
...
...
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