feat(inbox): 群管理新增清空群类型配置操作(inbox.group.reset)
This commit is contained in:
parent
5cd18ae9de
commit
55b6255421
@ -215,6 +215,26 @@ export function inboxGroupUpdate(data: InboxGroupUpdateParams) {
|
|||||||
} as any)
|
} as any)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 清空群类型配置参数 */
|
||||||
|
export interface InboxGroupResetParams {
|
||||||
|
id: number // 群记录主键ID
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 清空群类型配置(inbox.group.reset) */
|
||||||
|
export function inboxGroupReset(data: InboxGroupResetParams) {
|
||||||
|
return request({
|
||||||
|
url: '/system',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
method: 'inbox.group.reset',
|
||||||
|
v,
|
||||||
|
timestamp: Date.now()
|
||||||
|
},
|
||||||
|
data,
|
||||||
|
isSystemApi: true
|
||||||
|
} as any)
|
||||||
|
}
|
||||||
|
|
||||||
/** 按群拉取消息列表参数 */
|
/** 按群拉取消息列表参数 */
|
||||||
export interface InboxGroupMessagesParams {
|
export interface InboxGroupMessagesParams {
|
||||||
groupId: string // 群ID(必填)
|
groupId: string // 群ID(必填)
|
||||||
|
|||||||
@ -93,6 +93,7 @@
|
|||||||
{{ row.is_blocked ? '启用' : '禁用' }}
|
{{ row.is_blocked ? '启用' : '禁用' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="small" type="primary" link @click.stop="handleViewMessages(row)">消息</el-button>
|
<el-button size="small" type="primary" link @click.stop="handleViewMessages(row)">消息</el-button>
|
||||||
|
<el-button size="small" type="danger" link @click.stop="handleResetGroupConfig(row)">清空配置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -237,6 +238,7 @@ import {
|
|||||||
inboxGroupDisable,
|
inboxGroupDisable,
|
||||||
inboxGroupUpdate,
|
inboxGroupUpdate,
|
||||||
inboxGroupMessages,
|
inboxGroupMessages,
|
||||||
|
inboxGroupReset,
|
||||||
inboxBindCode,
|
inboxBindCode,
|
||||||
} from '@/api/inbox/inbox'
|
} from '@/api/inbox/inbox'
|
||||||
import { loadStores, loadExpressInterfaces } from '@/api/index/index'
|
import { loadStores, loadExpressInterfaces } from '@/api/index/index'
|
||||||
@ -561,6 +563,22 @@ async function handleToggleDisable(row: any) {
|
|||||||
} catch { /* 用户取消 */ }
|
} catch { /* 用户取消 */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== 清空群类型配置 ====================
|
||||||
|
|
||||||
|
async function handleResetGroupConfig(row: any) {
|
||||||
|
try {
|
||||||
|
await ElMessageBox.confirm(
|
||||||
|
`确定要清空群组「${row.group_name}」的群类型配置吗?群类型/子类型/货主/快递接口/系统快递编码将被清空,AI 自动回复将关闭,仅保留群创建时信息。`,
|
||||||
|
'清空配置确认',
|
||||||
|
{ type: 'warning', confirmButtonText: '清空', confirmButtonClass: 'el-button--danger' }
|
||||||
|
)
|
||||||
|
const res: any = await inboxGroupReset({ id: row.id })
|
||||||
|
if (res && (res.code === 1 || res.code === 200 || res.code === 20000)) {
|
||||||
|
ElMessage.success(res.data?.message || res.message || '群类型配置已清空'); fetchData()
|
||||||
|
} else { ElMessage.error(res?.message || '清空失败') }
|
||||||
|
} catch { /* 用户取消 */ }
|
||||||
|
}
|
||||||
|
|
||||||
// ==================== 群消息 ====================
|
// ==================== 群消息 ====================
|
||||||
|
|
||||||
const messagesDialogVisible = ref(false)
|
const messagesDialogVisible = ref(false)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user