Compare commits

..

No commits in common. "8af8ed143d6e2eed12c73e8c92568a301a081237" and "a59c934fd7074ac361707dbe4200cd57a58e36b4" have entirely different histories.

2 changed files with 10 additions and 28 deletions

View File

@ -129,6 +129,7 @@ async function submit() {
const res = await httpPost<ApplyResult[]>('/sys/openapi/app/apply', payload)
result.value = Array.isArray(res) ? res : []
ElMessage.success(`已为 ${result.value.length} 个客户生成 APIKey`)
emit('refresh')
} catch (e: any) {
ElMessage.error(e?.msg || e?.message || '申请失败')
} finally {
@ -136,7 +137,7 @@ async function submit() {
}
}
function onClose() { updateVisible(false); if (result.value) emit("refresh") }
function onClose() { updateVisible(false) }
async function copySecret(text: string) {
try {
@ -231,13 +232,12 @@ function notifyContact() {
:row-style="{ height: '36px' }"
:cell-style="{ padding: '4px 8px', fontSize: '12.5px' }"
:header-cell-style="{ padding: '6px 8px', fontSize: '12px', height: '32px', background: 'var(--surface-2)' }"
class="rr-apply-table"
@selection-change="onSelectionChange"
>
<el-table-column type="selection" header-align="center" align="center" width="48" />
<el-table-column prop="customerName" label="公司名称" min-width="200" header-align="left" align="left" show-overflow-tooltip />
<el-table-column prop="contactName" label="联系人" width="100" header-align="center" align="center" />
<el-table-column prop="contactPhone" label="联系电话" width="140" header-align="center" align="center" />
<el-table-column type="selection" header-align="center" align="center" width="40" />
<el-table-column prop="customerName" label="客户名" min-width="180" header-align="center" align="center" show-overflow-tooltip />
<el-table-column prop="contactName" label="联系人" width="100" align="center" />
<el-table-column prop="contactPhone" label="联系电话" width="130" align="center" />
</el-table>
</div>
@ -330,8 +330,8 @@ function notifyContact() {
请立即复制 connectCode 和 appSecret!关弹窗后无法再次查看
</el-alert>
<p>已为 {{ result.length }} 个客户生成 APIKey:</p>
<el-table :data="result" border class="rr-apply-table">
<el-table-column prop="customerName" label="公司名称" width="160" />
<el-table :data="result" border>
<el-table-column prop="customerName" label="客户名" width="160" />
<el-table-column prop="appId" label="AppID" width="280">
<template #default="{ row }">
<code>{{ row.appId }}</code>
@ -478,22 +478,4 @@ function notifyContact() {
}
.rr-code-accent { color: var(--red); font-family: ui-monospace, monospace; }
/* 弹窗内表格圆角 + 边框颜色统一 (修复圆角缺失) */
:deep(.rr-apply-dialog .rr-apply-table) {
border-radius: 8px;
overflow: hidden;
border: 1px solid var(--border) !important;
}
:deep(.rr-apply-dialog .rr-apply-table .el-table__inner-wrapper) {
border-radius: 8px;
}
/* selection 列 checkbox 居中 */
:deep(.rr-apply-dialog .rr-apply-table .el-table-column--selection .cell) {
text-align: center;
padding: 0;
}
:deep(.rr-apply-dialog .rr-apply-table th.el-table-column--selection .cell) {
text-align: center;
}
</style>

View File

@ -211,7 +211,7 @@ async function revokeConfirm() {
}
try {
await httpPost('/sys/openapi/app/revoke', {
id: String(revokeTarget.value.id),
id: Number(revokeTarget.value.id),
reason: revokeReason.value
})
ElMessage.success('撤销成功')
@ -231,7 +231,7 @@ function deleteHandle(row: OpenApp) {
async function deleteConfirm() {
if (!deleteTarget.value) return
try {
await httpPost('/sys/openapi/app/delete', { id: String(deleteTarget.value.id) })
await httpPost('/sys/openapi/app/delete', { id: Number(deleteTarget.value.id) })
ElMessage.success('删除成功')
deleteVisible.value = false
deleteTarget.value = null