websocket 重新封装

This commit is contained in:
YunaiV
2023-11-24 00:33:05 +08:00
parent f74ddf46ae
commit 1744c6ec6f
5 changed files with 125 additions and 43 deletions

View File

@ -87,6 +87,9 @@
>
删除
</el-button>
<el-button link @click="handlePush(scope.row.id)" v-hasPermi="['system:notice:update']">
推送
</el-button>
</template>
</el-table-column>
</el-table>
@ -168,6 +171,17 @@ const handleDelete = async (id: number) => {
} catch {}
}
/** 推送按钮操作 */
const handlePush = async (id: number) => {
try {
// 推送的二次确认
await message.confirm('是否推送所选中通知?')
// 发起推送
await NoticeApi.pushNotice(id)
message.success(t('推送成功'))
} catch {}
}
/** 初始化 **/
onMounted(() => {
getList()