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