init
This commit is contained in:
47
frontend/superadmin/src/views/TenantsPage.vue
Normal file
47
frontend/superadmin/src/views/TenantsPage.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<main style="padding: 16px">
|
||||
<h1 style="font-size: 18px; font-weight: 600">租户</h1>
|
||||
<div style="margin-top: 12px; display: flex; gap: 8px">
|
||||
<input v-model="keyword" placeholder="keyword" />
|
||||
<button @click="load">查询</button>
|
||||
</div>
|
||||
<table style="margin-top: 12px; width: 100%; border-collapse: collapse">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: left; border-bottom: 1px solid #eee; padding: 8px">ID</th>
|
||||
<th style="text-align: left; border-bottom: 1px solid #eee; padding: 8px">Code</th>
|
||||
<th style="text-align: left; border-bottom: 1px solid #eee; padding: 8px">Name</th>
|
||||
<th style="text-align: left; border-bottom: 1px solid #eee; padding: 8px">Admins</th>
|
||||
<th style="text-align: left; border-bottom: 1px solid #eee; padding: 8px">Admin Expire At(max)</th>
|
||||
<th style="text-align: left; border-bottom: 1px solid #eee; padding: 8px">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="it in items" :key="it.id">
|
||||
<td style="border-bottom: 1px solid #f2f2f2; padding: 8px">{{ it.id }}</td>
|
||||
<td style="border-bottom: 1px solid #f2f2f2; padding: 8px">{{ it.tenant_code }}</td>
|
||||
<td style="border-bottom: 1px solid #f2f2f2; padding: 8px">{{ it.name }}</td>
|
||||
<td style="border-bottom: 1px solid #f2f2f2; padding: 8px">{{ it.admin_count }}</td>
|
||||
<td style="border-bottom: 1px solid #f2f2f2; padding: 8px">{{ it.admin_expire_at || '-' }}</td>
|
||||
<td style="border-bottom: 1px solid #f2f2f2; padding: 8px">{{ it.status }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { api } from '../api'
|
||||
|
||||
const keyword = ref('')
|
||||
const items = ref<any[]>([])
|
||||
|
||||
async function load() {
|
||||
const resp = await api.get('/tenants', { params: { page: 1, limit: 50, keyword: keyword.value } })
|
||||
items.value = resp.data.items || []
|
||||
}
|
||||
|
||||
onMounted(load)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user