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
8df595e3
Commit
8df595e3
authored
Jun 04, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报表
parent
87d08137
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
37 deletions
+50
-37
assetmanage.js
src/model/assetmanage.js
+5
-0
dataassetmanager.js
src/service/dataassetmanager.js
+5
-0
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+2
-1
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+1
-1
WorkbookDrawer.jsx
src/view/Manage/AssetManage/Component/WorkbookDrawer.jsx
+17
-12
WorksheetModal.jsx
src/view/Manage/AssetManage/Component/WorksheetModal.jsx
+20
-23
No files found.
src/model/assetmanage.js
View file @
8df595e3
...
...
@@ -468,4 +468,8 @@ export function* getViewUrlByWorkbookId(payload) {
export
function
*
saveWorkbookByType
(
payload
)
{
return
yield
call
(
service
.
saveWorkbookByType
,
payload
)
}
export
function
*
deleteWorkbooks
(
payload
)
{
return
yield
call
(
service
.
deleteWorkbooks
,
payload
)
}
\ No newline at end of file
src/service/dataassetmanager.js
View file @
8df595e3
...
...
@@ -475,4 +475,8 @@ export function getViewUrlByWorkbookId(payload) {
export
function
saveWorkbookByType
(
payload
)
{
return
Post
(
"/dataassetmanagertest/reportApi/saveWorkbook"
,
payload
)
}
export
function
deleteWorkbooks
(
payload
)
{
return
PostJSON
(
"/dataassetmanagertest/reportApi/deleteWorkbooks"
,
payload
)
}
\ No newline at end of file
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
8df595e3
...
...
@@ -604,7 +604,8 @@ const AssetAction = React.forwardRef(function (props, ref) {
if (reference === AssetDraftReference) {
let data = action==='add' ? { elements: newElements } : { ...assets, elements: newElements }
data = {...data, businessRelations: relationAssetsRef.current?.assets, businessColumns: modifyMetadataColumnList}
dispatch({
type: 'assetmanage.updateDraft',
payload: {
...
...
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
8df595e3
...
...
@@ -1047,7 +1047,7 @@ const AssetTable = (props) => {
}
<Button onClick={onFilterElementClick}>可见列设置</Button>
{
reference===AssetManageReference && (reportTypes??[]).length > 0 && <Dropdown overlay={moreMenu} placement="bottomCenter">
reference===AssetManageReference &&
template?.structured &&
(reportTypes??[]).length > 0 && <Dropdown overlay={moreMenu} placement="bottomCenter">
<Button>其他操作</Button>
</Dropdown>
}
...
...
src/view/Manage/AssetManage/Component/WorkbookDrawer.jsx
View file @
8df595e3
...
...
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
import
{
Drawer
,
Pagination
,
List
}
from
'antd'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
showMessage
}
from
'../../../../util'
;
const
WorkbookDrawer
=
(
props
)
=>
{
const
{
onCancel
,
visible
,
report
}
=
props
;
...
...
@@ -44,17 +45,18 @@ const WorkbookDrawer = (props) => {
})
}
// const onDeleteClick = (id) => {
// dispatch({
// type: 'assetmanage.deleteWorkbooks',
// payload: {
// data: [id]
// },
// callback: () => {
// getWorkbooks();
// }
// })
// }
const
onDeleteClick
=
(
id
)
=>
{
dispatch
({
type
:
'assetmanage.deleteWorkbooks'
,
payload
:
{
data
:
[
id
]
},
callback
:
()
=>
{
showMessage
(
'success'
,
'删除成功'
);
getWorkbooks
();
}
})
}
const
onDevelopClick
=
(
id
)
=>
{
dispatch
({
...
...
@@ -88,7 +90,10 @@ const WorkbookDrawer = (props) => {
renderItem=
{
item
=>
(
<
List
.
Item
key=
{
item
.
id
}
actions=
{
[<
a
key=
"develop"
onClick=
{
()
=>
{
onDevelopClick
(
item
.
id
);
}
}
>
报表开发
</
a
>]
}
actions=
{
[
<
a
key=
"develop"
onClick=
{
()
=>
{
onDevelopClick
(
item
.
id
);
}
}
>
报表开发
</
a
>,
<
a
key=
"delete"
onClick=
{
()
=>
{
onDeleteClick
(
item
.
id
);
}
}
>
删除
</
a
>
]
}
>
<
List
.
Item
.
Meta
title=
{
item
.
name
}
...
...
src/view/Manage/AssetManage/Component/WorksheetModal.jsx
View file @
8df595e3
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Form
,
Button
,
Space
,
Input
,
Checkbox
,
Row
,
Col
,
Typography
}
from
'antd'
;
import
{
Modal
,
Form
,
Button
,
Space
,
Input
,
Checkbox
,
Row
,
Col
,
Typography
,
Spin
}
from
'antd'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
showMessage
}
from
'../../../../util'
;
...
...
@@ -68,6 +68,7 @@ const WorksheetModal = (props) => {
const
reset
=
()
=>
{
setLoading
(
false
);
setAsset
();
form
?.
resetFields
();
}
...
...
@@ -102,28 +103,24 @@ const WorksheetModal = (props) => {
</
Space
>
}
>
<
Form
form=
{
form
}
style=
{
{
maxHeight
:
600
,
overflow
:
'auto'
}
}
{
...
formItemLayout
}
>
<
Form
.
Item
label=
"名称"
name=
"name"
rules=
{
[{
required
:
true
,
message
:
'请填写工作簿名称!'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"字段"
name=
"columns"
>
<
ColumnsItem
data=
{
asset
?.
columns
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"元数据"
name=
"tableName"
hidden=
{
true
}
>
<
Input
/>
</
Form
.
Item
>
</
Form
>
<
Spin
spinning=
{
loading
}
>
<
Form
form=
{
form
}
style=
{
{
maxHeight
:
600
,
overflow
:
'auto'
}
}
{
...
formItemLayout
}
>
<
Form
.
Item
label=
"名称"
name=
"name"
rules=
{
[{
required
:
true
,
message
:
'请填写工作簿名称!'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"字段"
name=
"columns"
rules=
{
[{
required
:
true
,
message
:
'请选择字段!'
}]
}
>
<
ColumnsItem
data=
{
asset
?.
columns
}
/>
</
Form
.
Item
>
</
Form
>
</
Spin
>
</
Modal
>
);
}
...
...
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