Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hnyc-data
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
hnyc-data
Commits
41846a1d
Commit
41846a1d
authored
Dec 04, 2020
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
618c0e07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
22 deletions
+64
-22
AssetList.js
src/view/Manage/Assets/components/AssetList.js
+63
-21
AssetListHelper.js
src/view/Manage/Assets/components/AssetListHelper.js
+1
-1
No files found.
src/view/Manage/Assets/components/AssetList.js
View file @
41846a1d
...
...
@@ -88,8 +88,6 @@ class AssetListCOM extends Component {
onSubscribeModel
(
item
,
tableModelId
)
{
const
{
updateItems
}
=
this
.
props
;
item
.
subscribed
=
true
;
updateItems
&&
updateItems
();
dispatch
({
type
:
'assets.subscribeTableModel'
,
...
...
@@ -103,6 +101,18 @@ class AssetListCOM extends Component {
}
onApplyModel
(
item
,
tableModelId
)
{
dispatch
({
type
:
'assets.apply'
,
payload
:
{
params
:
{
tableModelId
}},
callback
:
()
=>
{
message
.
success
(
"申请成功!"
);
}
});
}
apply
=
(
columnPositions
,
reason
,
expireDate
,
fileList
)
=>
{
const
{
tableModel
,
activeBtn
}
=
this
.
state
;
...
...
@@ -208,23 +218,33 @@ class AssetListCOM extends Component {
);
const
getActions
=
(
item
)
=>
{
let
actions
=
[]
if
(
subscribeTableModel
)
{
return
[
item
.
subscribed
?
(
<
Button
size
=
"small"
type
=
"link"
icon
=
"book"
disabled
>
已订阅
<
/Button
>
)
:
(
<
Button
size
=
"small"
type
=
"link"
icon
=
"book"
onClick
=
{
this
.
onSubscribeModel
.
bind
(
this
,
item
,
item
.
tableModelId
)}
>
订阅
<
/Button
>
),
item
.
subscribed
&&
subscrible
&&
(
actions
.
push
(
<>
{
item
.
subscribed
?
(
<
Button
size
=
"small"
type
=
"link"
icon
=
"book"
disabled
>
已订阅
<
/Button
>
)
:
(
<
Button
size
=
"small"
type
=
"link"
icon
=
"book"
onClick
=
{
this
.
onSubscribeModel
.
bind
(
this
,
item
,
item
.
tableModelId
)}
>
订阅
<
/Button
>
)
}
<
/
>
);
if
(
item
.
subscribed
&&
subscrible
)
{
actions
.
push
(
<
Button
size
=
"small"
type
=
"link"
...
...
@@ -249,10 +269,32 @@ class AssetListCOM extends Component {
>
取消订阅
<
/Button
>
)
,
];
)
}
}
return
[];
actions
.
push
(
<>
{
item
.
privileged
?
(
<
Button
size
=
"small"
type
=
"link"
icon
=
"setting"
disabled
>
已申请
<
/Button
>
)
:
(
<
Button
size
=
"small"
type
=
"link"
icon
=
"setting"
onClick
=
{
this
.
onApplyModel
.
bind
(
this
,
item
,
item
.
tableModelId
)}
>
权限申请
<
/Button
>
)
}
<
/
>
);
return
actions
;
};
const
getIcon
=
(
type
)
=>
{
...
...
src/view/Manage/Assets/components/AssetListHelper.js
View file @
41846a1d
...
...
@@ -137,7 +137,7 @@ export class DataDetail extends Component {
}
}}
>
申请
字段
申请
<
/span
>
<
/Descriptions.Item
>
}
...
...
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