|
@@ -190,14 +190,9 @@ |
|
@@ -190,14 +190,9 @@ |
190
|
}
|
190
|
}
|
191
|
};
|
191
|
};
|
192
|
|
192
|
|
193
|
- const handlePublish = async ({ id }) => {
|
|
|
194
|
- await bigScreenPublish(id);
|
|
|
195
|
- createMessage.success('发布成功');
|
|
|
196
|
- getListData();
|
|
|
197
|
- };
|
|
|
198
|
- const handleCancelPublish = async ({ id }) => {
|
|
|
199
|
- await bigScreenCancelPublish(id);
|
|
|
200
|
- createMessage.success('取消发布成功');
|
193
|
+ const handlePublish = async ({ id, state }) => {
|
|
|
194
|
+ state === 0 ? await bigScreenPublish(id) : await bigScreenCancelPublish(id);
|
|
|
195
|
+ createMessage.success(state === 0 ? '发布成功' : '取消发布成功');
|
201
|
getListData();
|
196
|
getListData();
|
202
|
};
|
197
|
};
|
203
|
</script>
|
198
|
</script>
|
|
@@ -310,20 +305,14 @@ |
|
@@ -310,20 +305,14 @@ |
310
|
onClick: handleOpenShareModal.bind(null, item),
|
305
|
onClick: handleOpenShareModal.bind(null, item),
|
311
|
},
|
306
|
},
|
312
|
{
|
307
|
{
|
313
|
- text: '发布',
|
308
|
+ text: item.state == 0 ? '发布' : '取消发布',
|
314
|
auth: ConfigurationPermission.PUBLISH,
|
309
|
auth: ConfigurationPermission.PUBLISH,
|
315
|
- icon: 'ant-design:node-expand-outlined',
|
310
|
+ icon:
|
|
|
311
|
+ item.state == 0
|
|
|
312
|
+ ? 'ant-design:node-expand-outlined'
|
|
|
313
|
+ : 'ant-design:node-collapse-outlined',
|
316
|
event: '',
|
314
|
event: '',
|
317
|
onClick: handlePublish.bind(null, item),
|
315
|
onClick: handlePublish.bind(null, item),
|
318
|
- disabled: item.state === 0 ? false : true,
|
|
|
319
|
- },
|
|
|
320
|
- {
|
|
|
321
|
- text: '取消发布',
|
|
|
322
|
- auth: ConfigurationPermission.CANCEL_PUBLISH,
|
|
|
323
|
- icon: 'ant-design:node-collapse-outlined',
|
|
|
324
|
- event: '',
|
|
|
325
|
- onClick: handleCancelPublish.bind(null, item),
|
|
|
326
|
- disabled: item.state === 1 ? false : true,
|
|
|
327
|
},
|
316
|
},
|
328
|
{
|
317
|
{
|
329
|
text: '编辑',
|
318
|
text: '编辑',
|