Commit 41846a1d by zhaochengxiang

修改问题

parent 618c0e07
......@@ -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) => {
......
......@@ -137,7 +137,7 @@ export class DataDetail extends Component {
}
}}
>
申请
字段申请
</span>
</Descriptions.Item>
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment