fix: bug#11114、10540、10783
This commit is contained in:
parent
0bef99ca88
commit
0ea4214ee3
|
@ -1,11 +1,12 @@
|
|||
import server from '@/utils/request'
|
||||
|
||||
// 获取记录列表
|
||||
export const getList_api = (data:object): any =>server.get(`/notifications/_query`,encodeParams(data))
|
||||
export const getList_api = (data: object): any => server.get(`/notifications/_query`, encodeParams(data))
|
||||
// 获取未读记录列表
|
||||
export const getListByUnRead_api = (data:object): any =>server.post(`/notifications/_query`,data)
|
||||
export const getListByUnRead_api = (data: object): any => server.post(`/notifications/_query`, data)
|
||||
// 修改记录状态
|
||||
export const changeStatus_api = (type:'_read'|'_unread',data:string[]): any =>server.post(`/notifications/${type}`,data)
|
||||
export const changeStatus_api = (type: '_read' | '_unread', data: string[]): any => server.post(`/notifications/${type}`, data)
|
||||
export const read = (id: string): any => server.get(`notifications/${id}/read`)
|
||||
|
||||
|
||||
const encodeParams = (params: Record<string, any>) => {
|
||||
|
@ -13,10 +14,10 @@ const encodeParams = (params: Record<string, any>) => {
|
|||
for (const key in params) {
|
||||
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
||||
const value = params[key];
|
||||
if(key === 'terms') {
|
||||
if (key === 'terms') {
|
||||
result['terms[0].column:'] = 0
|
||||
result['terms[0].value'] = JSON.stringify(value[0])
|
||||
}else result[key] = value
|
||||
} else result[key] = value
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ const createChart = () => {
|
|||
nextTick(() => {
|
||||
const myChart = echarts.init(chartRef.value as HTMLElement);
|
||||
const sData: number[] = props.chartData.map(
|
||||
(m: any) => m.value && m.value.toFixed(2),
|
||||
(m: any) => m.value && m.value.toFixed(0),
|
||||
);
|
||||
const maxY = Math.max.apply(null, sData.length ? sData : [0]);
|
||||
const options = {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<div class="tool-item">
|
||||
<j-popconfirm
|
||||
title="重置将断开直播, 可能会影响其他播放者"
|
||||
@confirm="() => handleReset"
|
||||
@confirm="handleReset"
|
||||
>
|
||||
重置
|
||||
</j-popconfirm>
|
||||
|
|
|
@ -27,9 +27,19 @@
|
|||
}"
|
||||
>
|
||||
<template #headerTitle>
|
||||
<j-space>
|
||||
<j-button type="primary" @click="dialogVisible = true">
|
||||
<AIcon type="PlusOutlined" />新增
|
||||
</j-button>
|
||||
<PermissionButton
|
||||
:popConfirm="{
|
||||
title: `是否批量解除绑定`,
|
||||
onConfirm: () => table.unbind(),
|
||||
}"
|
||||
>
|
||||
<AIcon type="DisconnectOutlined" />批量解绑
|
||||
</PermissionButton>
|
||||
</j-space>
|
||||
</template>
|
||||
|
||||
<template #status="slotProps">
|
||||
|
@ -159,8 +169,13 @@ const table = {
|
|||
return getUserByRole_api(params);
|
||||
},
|
||||
// 批量解绑
|
||||
unbind: (ids: string[] = []) => {
|
||||
unbindUser_api(roleId, ids).then((resp) => {
|
||||
unbind: (ids?: string[]) => {
|
||||
const data = ids ? ids : selectedRowKeys.value;
|
||||
if (!data.length) {
|
||||
message.warning('请勾选数据');
|
||||
return;
|
||||
}
|
||||
unbindUser_api(roleId, data).then((resp) => {
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功');
|
||||
table.refresh();
|
||||
|
@ -170,6 +185,7 @@ const table = {
|
|||
// 刷新表格
|
||||
refresh: () => {
|
||||
tableRef.value.reload();
|
||||
selectedRowKeys.value = [];
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue