Compare commits
2 Commits
a59c934fd7
...
8af8ed143d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8af8ed143d | ||
|
|
4e525cf6dd |
@ -129,7 +129,6 @@ 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 {
|
||||
@ -137,7 +136,7 @@ async function submit() {
|
||||
}
|
||||
}
|
||||
|
||||
function onClose() { updateVisible(false) }
|
||||
function onClose() { updateVisible(false); if (result.value) emit("refresh") }
|
||||
|
||||
async function copySecret(text: string) {
|
||||
try {
|
||||
@ -232,12 +231,13 @@ 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="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-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>
|
||||
</div>
|
||||
|
||||
@ -330,8 +330,8 @@ function notifyContact() {
|
||||
请立即复制 connectCode 和 appSecret!关弹窗后无法再次查看
|
||||
</el-alert>
|
||||
<p>已为 {{ result.length }} 个客户生成 APIKey:</p>
|
||||
<el-table :data="result" border>
|
||||
<el-table-column prop="customerName" label="客户名" width="160" />
|
||||
<el-table :data="result" border class="rr-apply-table">
|
||||
<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,4 +478,22 @@ 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>
|
||||
|
||||
@ -211,7 +211,7 @@ async function revokeConfirm() {
|
||||
}
|
||||
try {
|
||||
await httpPost('/sys/openapi/app/revoke', {
|
||||
id: Number(revokeTarget.value.id),
|
||||
id: String(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: Number(deleteTarget.value.id) })
|
||||
await httpPost('/sys/openapi/app/delete', { id: String(deleteTarget.value.id) })
|
||||
ElMessage.success('删除成功')
|
||||
deleteVisible.value = false
|
||||
deleteTarget.value = null
|
||||
|
||||
Loading…
Reference in New Issue
Block a user