|
|
@@ -326,6 +326,12 @@ function handleStatusChange(row: any) {
|
|
|
row.status = row.status === "0" ? "1" : "0"
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+function handleSyncTenantPackage(row: any) {
|
|
|
+ apis.system.tenantApi.syncTenantPackage(row.tenantId, row.packageId).then(() => {
|
|
|
+ message.msgSuccess("同步成功")
|
|
|
+ })
|
|
|
+}
|
|
|
/** 提交按钮 */
|
|
|
function submitForm() {
|
|
|
apis.system.tenantApi.addOrUpdate(form.value).then(() => {
|
|
|
@@ -362,6 +368,24 @@ function getPackages() {
|
|
|
:check-multiple="true"
|
|
|
:reset-search-form-fun="resetQuery"
|
|
|
:custom-search-fun="handleQuery">
|
|
|
+ <template #packageName="{ row }">
|
|
|
+ <span v-if="row.packageName" class="w-100 position-relative d-block">
|
|
|
+ {{ row.packageName }}
|
|
|
+ <vb-tooltip content="同步套餐" placement="top">
|
|
|
+ <el-button
|
|
|
+ style="right: 0px; position: absolute; top: 50%; transform: translateY(-50%)"
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="handleSyncTenantPackage(row)"
|
|
|
+ v-hasPermission="'system:tenant:edit'">
|
|
|
+ <template #icon>
|
|
|
+ <VbIcon icon-name="arrows-loop" icon-type="solid" class="fs-3"></VbIcon>
|
|
|
+ </template>
|
|
|
+ </el-button>
|
|
|
+ </vb-tooltip>
|
|
|
+ </span>
|
|
|
+ <span class="text-muted" v-else>未配置套餐</span>
|
|
|
+ </template>
|
|
|
<template #expireTime="{ row }">
|
|
|
{{ row.expireTime ? dayjs(row.expireTime).format("YYYY-MM-DD") : "永久" }}
|
|
|
</template>
|