From 02bbf25456f3a0165313340be277cfa4a2b3b24f Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 25 十二月 2024 18:09:51 +0800 Subject: [PATCH] 调度记录查看 --- src/views/system/tenantPackage/index.vue | 107 ++++++++++++++++++++++++++++------------------------- 1 files changed, 57 insertions(+), 50 deletions(-) diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue index d8db2bf..56f8f3d 100644 --- a/src/views/system/tenantPackage/index.vue +++ b/src/views/system/tenantPackage/index.vue @@ -49,64 +49,67 @@ </el-form> </ContentWrap> <!-- 列表 --> - <el-skeleton :loading="loading" animated> - <div class="package-card" v-for="(item, index) in packages" :key="`dynamics-${index}`"> - <div class="card-content"> - <img class="card-icon" :src="item.icon"/> - <div class="card-middle"> - <div class="tenant-title">{{ item.name }}</div> - <div class="tenant-operation"> - <el-dropdown @command="(command) => handleCommand(command, item)" - v-hasPermi="[ - 'system:tenant-package:update', - 'system:tenant-package:delete' - ]"> - <el-button type="primary" link> - <Icon icon="ep:more-filled"/> - </el-button> - <template #dropdown> - <el-dropdown-menu> - <el-dropdown-item - command="handleUpdate" - v-if="checkPermi(['system:tenant-package:update'])" - > - <Icon icon="ep:edit"/> - 修改 - </el-dropdown-item> - <el-dropdown-item - command="handleDelete" - v-if="checkPermi(['system:tenant-package:delete'])" - > - <Icon icon="ep:delete"/> - 删除 - </el-dropdown-item> - </el-dropdown-menu> - </template> - </el-dropdown> + <ContentWrap> + <el-skeleton :loading="loading"> + <div class="package-card" v-for="(item, index) in packages" :key="`dynamics-${index}`"> + <div class="card-content"> + <img class="card-icon" :src="item.icon"/> + <div class="card-middle"> + <div class="tenant-title">{{ item.name }}</div> + <div class="tenant-operation"> + <el-dropdown @command="(command) => handleCommand(command, item)" + v-hasPermi="[ + 'system:tenant-package:update', + 'system:tenant-package:delete' + ]"> + <el-button type="primary" link> + <Icon icon="ep:more-filled"/> + </el-button> + <template #dropdown> + <el-dropdown-menu> + <el-dropdown-item + command="handleUpdate" + v-if="checkPermi(['system:tenant-package:update'])" + > + <Icon icon="ep:edit"/> + 修改 + </el-dropdown-item> + <el-dropdown-item + command="handleDelete" + v-if="checkPermi(['system:tenant-package:delete'])" + > + <Icon icon="ep:delete"/> + 删除 + </el-dropdown-item> + </el-dropdown-menu> + </template> + </el-dropdown> + </div> + </div> + <div class="description">{{ item.description }}</div> + <div class="label-areas"> + <el-tag + :disable-transitions="true" + :key="i" + v-for="(label, i) in item.labels" + :index="i" + class="label" + > + {{ label }} + </el-tag> </div> </div> - <div class="description">{{ item.description }}</div> - <div class="label-areas"> - <el-tag - :disable-transitions="true" - :key="i" - v-for="(label, i) in item.labels" - :index="i" - class="label" - > - {{ label }} - </el-tag> - </div> </div> - </div> + </el-skeleton> <!-- 分页 --> <Pagination + class="pagination" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize" @pagination="getList" /> - </el-skeleton> + </ContentWrap> <!-- 表单弹窗:添加/修改 --> <TenantPackageForm ref="formRef" @success="getList"/> @@ -125,7 +128,7 @@ const loading = ref(true) // 列表的加载中 const total = ref(0) // 列表的总页数 -let packages = reactive<TenantPackageVO[]>([]) +const packages = ref([]) const queryParams = reactive({ pageNo: 1, @@ -141,7 +144,7 @@ const getList = async () => { try { const data = await TenantPackageApi.getTenantPackagePage(queryParams) - packages = Object.assign(packages, data.list) + packages.value = data.list total.value = data.total } finally { loading.value = false @@ -277,4 +280,8 @@ border-radius: 80px 80px 80px 80px; border: 1px solid #417CFF; } +.pagination { + margin-right: 30px; + margin-top: 400px; +} </style> -- Gitblit v1.9.3