Browse Source

fix: 添加分页接口

min
song 3 years ago
parent
commit
2c3e5fe10f
  1. 8
      src/components/pluginListTable.vue
  2. 8
      src/views/index-list/business-detail.vue

8
src/components/pluginListTable.vue

@ -6,16 +6,16 @@
<el-table-column prop="startUsing" label="状态" key="slot" sortable> <el-table-column prop="startUsing" label="状态" key="slot" sortable>
<template #default="scope"> <template #default="scope">
<div class="flex flex-row items-center" @click="change(scope.row)"> <div class="flex flex-row items-center" @click="change(scope.row)">
<div :class="scope.row.startUsing ? 'point bg-green-500' : 'point bg-red-500'"></div> <div :class="!scope.row.startUsing ? 'point bg-green-500' : 'point bg-red-500'"></div>
<span style="margin-left: 10px">{{ scope.row.startUsing ? '启动' : '禁用' }}</span> <span style="margin-left: 10px">{{ !scope.row.startUsing ? '启动' : '禁用' }}</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="pub" label="公开" sortable key="slot"> <el-table-column prop="pub" label="公开" sortable key="slot">
<template #default="scope"> <template #default="scope">
<div class="flex flex-row items-center" @click="change(scope.row)"> <div class="flex flex-row items-center" @click="change(scope.row)">
<div :class="scope.row.pub ? 'point bg-green-500' : 'point bg-red-500'"></div> <div :class="!scope.row.pub ? 'point bg-green-500' : 'point bg-red-500'"></div>
<span style="margin-left: 10px">{{ scope.row.pub ? '公开' : '非公开' }}</span> <span style="margin-left: 10px">{{ !scope.row.pub ? '公开' : '非公开' }}</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>

8
src/views/index-list/business-detail.vue

@ -82,13 +82,13 @@ const data = reactive({
}); });
function handleSizeChange(val) { function handleSizeChange(val) {
console.log(val);
data.pageSize = val; data.pageSize = val;
queryPluginOfBusiness();
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
console.log(val);
data.currentPage = val; data.currentPage = val;
queryPluginOfBusiness();
} }
// //
@ -125,9 +125,9 @@ async function handleQueryIdBusiness(businessId) {
* @param {number} pageNum 第几页 * @param {number} pageNum 第几页
* @param {number} pageSize 每页几条信息 * @param {number} pageSize 每页几条信息
*/ */
async function queryPluginOfBusiness(businessId) { async function queryPluginOfBusiness() {
try { try {
const { currentPage, pageSize } = data; const { currentPage, pageSize, businessId } = data;
const params = { const params = {
param: { param: {
businessId, businessId,

Loading…
Cancel
Save