修改一些bug

main
bibi 3 years ago
parent 12fe818f6f
commit 553e108b46

@ -1,6 +1,6 @@
import httpService from "@/request" import httpService from "@/request"
// 任务列表 // 动态列表
export function dynamicList(params) { export function dynamicList(params) {
return httpService({ return httpService({
url: `/user/dynamic/list`, url: `/user/dynamic/list`,
@ -8,3 +8,43 @@ export function dynamicList(params) {
params: params, params: params,
}) })
} }
// 删除
export function dynamicDel(params) {
return httpService({
url: `/user/dynamic/delete`,
method: 'post',
data: params,
})
}
// 恢复
export function dynamicRecover(params) {
return httpService({
url: `/user/dynamic/recover`,
method: 'post',
data: params,
})
}
// 评论list
export function commentList(params) {
return httpService({
url: `/user/comment/list`,
method: 'get',
params: params,
})
}
// 删除
export function commentDel(params) {
return httpService({
url: `/user/comment/delete`,
method: 'post',
data: params,
})
}
// 恢复
export function commentRecover(params) {
return httpService({
url: `/user/comment/recover`,
method: 'post',
data: params,
})
}

@ -0,0 +1,10 @@
import httpService from "@/request"
// 话题列表
export function topicList(params) {
return httpService({
url: `/user/topic/list`,
method: 'get',
params: params,
})
}

@ -1,11 +1,12 @@
<template> <template>
<div class="formbox"> <div class="form-box">
<a-form-model ref="ruleForm" :model="form" v-bind="layout"> <a-form-model ref="ruleForm" :model="form" layout='inline' v-if="itemList.length > 0">
<a-form-model-item <a-form-model-item
v-for="item in formItem" v-for="item in itemList"
:key="item.prop" :key="item.prop"
:label="item.label" :label="item.label"
:prop="item.prop" :prop="item.prop"
style="margin-left:32px"
> >
<a-input v-if="item.type === 'input'" v-model="form[item.prop]" :placeholder="item.placeholder" /> <a-input v-if="item.type === 'input'" v-model="form[item.prop]" :placeholder="item.placeholder" />
<a-select <a-select
@ -21,11 +22,9 @@
> >
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item :wrapper-col="{ span: 12, offset: 2 }">
<a-button type="primary" @click="getSearch"> </a-button>
<a-button style="margin-left: 10px" @click="resetForm"> </a-button>
</a-form-model-item>
</a-form-model> </a-form-model>
<div class="btn-box"><a-button type="primary" @click="getSearch"> </a-button>
<a-button style="margin-left: 10px" @click="resetForm"> </a-button></div>
</div> </div>
</template> </template>
@ -36,13 +35,23 @@ export default {
type:Array, type:Array,
} }
}, },
watch: {
formItem: {
handler(val){
this.itemList = val
let obj = {}
for(let k of val){
obj[k.prop] = undefined;
}
this.form = obj;
},
immediate: true
}
},
data() { data() {
return { return {
itemList: [],
form: {}, form: {},
layout: {
labelCol: { span: 2 },
wrapperCol: { span: 4 },
},
}; };
}, },
methods: { methods: {
@ -58,10 +67,19 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.formbox { .form-box {
text-align: left; text-align: left;
background: #f9f9f9; background: #f9f9f9;
padding-top: 25px; padding-top: 25px;
padding-bottom: 1px; padding-bottom: 1px;
} }
.btn-box{
margin:10px 0 15px 100px;
}
/deep/.ant-input{
min-width: 150px;
}
/deep/.ant-select{
min-width: 150px;
}
</style> </style>

@ -15,6 +15,13 @@ Router.prototype.push = function push(location) {
} }
Vue.use(Router); Vue.use(Router);
// 枚举文件
// const files = require.context('./', true, /\.js/)
// let configRouters = []
// console.log(files.keys());
// files.keys().forEach((key, index) => {
// console.log(files(key).default,files);
// })
import Layout from "@/views/Layout" import Layout from "@/views/Layout"
import basic from "./basic" // 基础功能 import basic from "./basic" // 基础功能
import payment from "./payment" // 缴费管理 import payment from "./payment" // 缴费管理
@ -39,7 +46,7 @@ const router = [
name: "shop", name: "shop",
title: "智慧商城", title: "智慧商城",
component: Layout, component: Layout,
redirect: '/OrderManage', redirect: '/GoodsManage/GoodsList',
meta: {title: '智慧商城'}, meta: {title: '智慧商城'},
children: [ children: [
...shop, ...shop,

@ -53,6 +53,14 @@ export default [
component: resolve => require(['@/views/Operation/BBS/_dynamic'], resolve), component: resolve => require(['@/views/Operation/BBS/_dynamic'], resolve),
meta: {title: '社区动态'}, meta: {title: '社区动态'},
}, },
{
path: '/BBS/DynamicDetail',
name: "DynamicDetail",
title: "社区动态详情",
hide: true,
component: resolve => require(['@/views/Operation/BBS/_dynamic/detail'], resolve),
meta: {title: '社区动态详情'},
},
{ {
path: '/BBS/Topic', path: '/BBS/Topic',
name: "Topic", name: "Topic",

@ -31,7 +31,9 @@
#commonTable { #commonTable {
margin: 24px; margin: 24px;
} }
.action {
margin-top: -50px;
}
.search-box { .search-box {
margin: 20px; margin: 20px;
} }

@ -130,8 +130,9 @@
<!-- tags --> <!-- tags -->
<span v-for="item,index in typeList" :key="item.id"> <span v-for="item,index in typeList" :key="item.id">
<a-input <a-input
v-if="item.show===true" v-if="item.show==true"
ref="input" ref="input"
v-focus
type="text" type="text"
size="small" size="small"
:style="{ width: '78px','padding-bottom':'3px','margin-right':'7px' }" :style="{ width: '78px','padding-bottom':'3px','margin-right':'7px' }"
@ -140,7 +141,7 @@
@keyup.enter="editType(item)" @keyup.enter="editType(item)"
/> />
<a-tag <a-tag
v-else closable @close="delType(item.id)" v-else-if="item.show==false" closable @close.prevent="delType(item.id)"
@click="editInput(item,index)" > @click="editInput(item,index)" >
{{item.name}} {{item.name}}
</a-tag> </a-tag>
@ -180,6 +181,14 @@ export default {
components: { components: {
vueForm, vueForm,
}, },
directives: {
focus: {
//
inserted: function (el) {
el.focus()
}
}
},
data() { data() {
return { return {
drawerConfig: { drawerConfig: {
@ -286,26 +295,16 @@ export default {
let res = await estateTypeDel({manageEstateTypeIds:[id]}) let res = await estateTypeDel({manageEstateTypeIds:[id]})
if(res.code=== 200){ if(res.code=== 200){
this.$message.success(res.msg); this.$message.success(res.msg);
this.getType()
}else{ }else{
this.$message.error(res.msg); this.$message.error(res.msg);
this.getType()
} }
}, },
onCancel:()=>{
this.getType() //
}
}) })
}, },
// input // input
editInput(obj,i) { editInput(obj,i) {
// this.$set(obj,'show',false) this.$set(this.typeList[i],'show',true)
obj.show = true; // v-if show = trueinput this.$forceUpdate()
console.log(this.typeList);
// this.$nextTick(function(){ //nextTickrefs.inputundefineddom
// console.log(this.$refs.input[0]);
// this.$refs.input[0].focus() //
// })
}, },
// //
async editType(item){ async editType(item){
@ -314,8 +313,9 @@ export default {
name: item.name name: item.name
}) })
if(res.code === 200){ if(res.code === 200){
this.$message.success(res.msg)
item.show = false item.show = false
this.$forceUpdate()
this.$message.success(res.msg)
}else{ }else{
this.$message.error(res.msg) this.$message.error(res.msg)
} }

@ -45,14 +45,14 @@ export default {
yMenu, yMenu,
}, },
mounted(){ mounted(){
this.$router.push({ name: sessionStorage.getItem('routerName') }); this.$router.push({ path: JSON.parse(sessionStorage.getItem('selectedKeys'))[0] });
this.tagActive = Number(sessionStorage.getItem('index')) this.tagActive = Number(sessionStorage.getItem('index'))
}, },
watch: { watch: {
$route: { $route: {
handler(val) { handler(val) {
// console.log(val);
this.tags = val.matched; this.tags = val.matched;
sessionStorage.setItem('routerName',val.name)
}, },
immediate: true, immediate: true,
}, },
@ -68,6 +68,7 @@ export default {
return { return {
collapsed: false, collapsed: false,
tagActive: 0, tagActive: 0,
tags: [],
menuTags: [ menuTags: [
{ {
label: "基础功能", label: "基础功能",
@ -85,10 +86,10 @@ export default {
label: "运营管理", label: "运营管理",
value: "operation" value: "operation"
}, },
{ // {
label: "设置", // label: "",
value: "setting" // value: "setting"
} // }
], ],
}; };
}, },

@ -55,7 +55,7 @@ export default {
csd: { csd: {
type: Boolean, type: Boolean,
default: false, default: false,
indexPath: 0 indexPath: 1
}, },
num:Number, num:Number,
}, },
@ -92,7 +92,7 @@ export default {
collapsed: false, collapsed: false,
openKeys: [], openKeys: [],
selectedKeys: [], selectedKeys: [],
defaultSelectedKeys: [] defaultSelectedKeys: [],
}; };
}, },
created() { created() {
@ -123,8 +123,11 @@ export default {
let menus = []; let menus = [];
this.routerToMenu(arr, menus); this.routerToMenu(arr, menus);
this.list = menus; this.list = menus;
if(modal) {
let path = farr[0].redirect let path = farr[0].redirect
this.$router.push({path:path}) this.$router.push({path:path})
}
}, },
// //
routerToMenu(arr = [], menus) { routerToMenu(arr = [], menus) {

@ -75,7 +75,7 @@ export const columns = [
title: "操作", title: "操作",
dataIndex: "action", dataIndex: "action",
key: "action", key: "action",
width: "200", width: "150",
fixed: "right", fixed: "right",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
@ -84,5 +84,6 @@ export const options = {
isTrue: [ isTrue: [
{ id:1,name:'是'}, { id:1,name:'是'},
{ id:0,name:'否'}, { id:0,name:'否'},
{ id:null,name:'全部'},
] ]
} }

@ -0,0 +1,313 @@
<template>
<div>
<div class="content">
<div class="cardTitle">动态信息</div>
<div class="content">
<span class="title">动态内容</span>
<a-row>
<a-col class="text-content">{{ detailData.content }}</a-col>
<a-col class="img-box">
<!-- <img
:src="$ImgUrl(img.url)"
class="contentImg"
v-for="(img, index) in detailData.imgList"
:key="index"
/> -->
<img src="https://img0.baidu.com/it/u=2560936835,1792581374&fm=253&fmt=auto&app=138&f=JPEG?w=658&h=403" class="contentImg" alt="">
<img src="https://img0.baidu.com/it/u=2560936835,1792581374&fm=253&fmt=auto&app=138&f=JPEG?w=658&h=403" class="contentImg" alt="">
<img src="https://img0.baidu.com/it/u=2560936835,1792581374&fm=253&fmt=auto&app=138&f=JPEG?w=658&h=403" class="contentImg" alt="">
<img src="https://img0.baidu.com/it/u=2560936835,1792581374&fm=253&fmt=auto&app=138&f=JPEG?w=658&h=403" class="contentImg" alt="">
</a-col>
<a-col :span="4">
<span class="title">发布者</span>
<a-card style="width: 60%;margin:10px;border-radius:4px;height:190px;text-align:center">
<div><a-avatar :size="64" icon="user" /></div>
<div class="text-content" style="margin-top:20px">{{detailData.createName}}</div>
</a-card>
</a-col>
<a-col :span="20">
<span class="title">其他信息</span>
<a-card style="width: 60%;margin:10px;border-radius:4px;height:190px">
<a-descriptions layout="vertical">
<a-descriptions-item label="浏览数量">
{{detailData.views}}
</a-descriptions-item>
<a-descriptions-item label="点赞数量">
{{detailData.likes}}
</a-descriptions-item>
<a-descriptions-item label="发布时间">
{{detailData.createDate}}
</a-descriptions-item>
<a-descriptions-item label="是否公开">
{{detailData.isPublic===1?'是':'否'}}
</a-descriptions-item>
<a-descriptions-item label="是否可评论">
{{detailData.isComment===1?'是':'否'}}
</a-descriptions-item>
</a-descriptions>
</a-card>
</a-col>
<a-col>
<div class="title">关联话题</div>
<div class='topic-box'>
<a-button class='topic'>#{{detailData.content}}</a-button>
<a-button class='topic'>#{{detailData.content}}</a-button>
<a-button class='topic'>#{{detailData.content}}</a-button>
<a-button class='topic'>#{{detailData.content}}</a-button>
</div>
</a-col>
</a-row>
</div>
</div>
<div class="content">
<div class="cardTitle">评论列表</div>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 1200 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a
class="ant-dropdown-link"
v-if="row.isDelete === 1"
@click="del([row.id])"
>删除</a
>
<a
class="ant-dropdown-link"
v-if="row.isDelete === 0"
@click="recover([row.id])"
>恢复</a
>
</a-space>
</span>
</a-table>
<div style="margin-bottom: 16px" class="action">
<!-- 批量操作 -->
<a-select
type="primary"
v-model="activeAction"
:disabled="!hasSelected"
:loading="loading"
style="width: 120px"
@change="Actions"
placeholder="请选择操作"
>
批量
<a-select-option v-for="item in ActionsList" :key="item.value">
{{ item.label }}
</a-select-option>
</a-select>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div>
</div>
</template>
<script>
import {
commentList,
commentRecover,
commentDel,
} from "@/api/operation/dynamic";
export default {
data() {
return {
detailData: {},
tableData: [],
selectedRowKeys: [],
activeAction: undefined,
loading: false,
ActionsList: [
{
value: 1,
label: "批量删除",
},
{
value: 2,
label: "批量恢复",
},
],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
columns: [
{
title: "评论内容",
width: "20%",
dataIndex: "content",
},
{
title: "评论人名称",
width: "15%",
dataIndex: "createName",
},
{
title: "评论人时间",
width: "15%",
dataIndex: "createDate",
},
{
title: "点赞数",
width: "12%",
dataIndex: "likes",
},
{
title: "是否删除",
width: "15%",
dataIndex: "isDelete",
customRender: function (isDelete) {
switch (isDelete) {
case 1:
return "否";
case 0:
return "是";
}
},
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "150",
fixed: "right",
scopedSlots: { customRender: "action" },
},
],
};
},
mounted() {
this.detailData = this.$route.params.data;
console.log(this.detailData);
this.getComment();
},
methods: {
async getComment() {
let res = await commentList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await commentDel({ commentIds: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getComment();
} else {
this.$message.error(res.msg);
}
},
});
},
recover(ids) {
this.$confirm({
title: "是否恢复",
// okText:'',
// cancelText:'',
icon: "undo",
onOk: async () => {
let res = await commentRecover({ commentIds: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getComment();
} else {
this.$message.error(res.msg);
}
},
});
},
selectionChoosed(data) {
console.log(data);
this.selectedRowKeys = data;
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
Actions(data) {
console.log(data);
console.log(this.selectedRowKeys);
this.activeAction = undefined;
if (data === 1) {
this.del(this.selectedRowKeys);
} else {
this.recover(this.selectedRowKeys);
}
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.action {
margin-top: -50px;
}
.title {
color: #000000a6;
font-weight: 500;
line-height: 19px;
}
.text-content {
color: #000000d9;
font-weight: 400;
line-height: 22px;
font-size: 16px;
}
.contentImg {
width: 168px;
height: 92px;
border-radius: 4px;
margin:10px;
}
.img-box{
display: flex;
justify-content:flex-start;
}
.topic-box{
display: flex;
justify-content:flex-start;
}
.topic{
margin:5px;
border-radius:44px;
}
</style>

@ -47,7 +47,7 @@
}" }"
:row-key=" :row-key="
(record, index) => { (record, index) => {
return index; return record.id;
} }
" "
> >
@ -60,12 +60,14 @@
> >
<a <a
class="ant-dropdown-link" class="ant-dropdown-link"
@click="detail(row)" v-if="row.isDelete===1"
@click="del([row.id])"
>删除</a >删除</a
> >
<a <a
class="ant-dropdown-link" class="ant-dropdown-link"
@click="detail(row)" v-if="row.isDelete===0"
@click="recover([row.id])"
>恢复</a >恢复</a
> >
</a-space> </a-space>
@ -99,7 +101,7 @@
<script> <script>
import { pagination, columns, options } from "./depend/config"; import { pagination, columns, options } from "./depend/config";
import { dynamicList } from "@/api/operation/dynamic"; import { dynamicList, dynamicRecover, dynamicDel } from "@/api/operation/dynamic";
export default { export default {
data() { data() {
return { return {
@ -111,8 +113,16 @@ export default {
loading: false, loading: false,
// index // index
selectedRowKeys: [], selectedRowKeys: [],
tableChoosed: [], ActionsList: [
ActionsList: [], {
value:1,
label:'批量删除'
},
{
value:2,
label:'批量恢复'
},
],
layout: { layout: {
labelCol: { span: 2 }, labelCol: { span: 2 },
wrapperCol: { span: 4 }, wrapperCol: { span: 4 },
@ -149,11 +159,57 @@ export default {
}, },
Actions(data) { Actions(data) {
console.log(data); console.log(data);
console.log(this.selectedRowKeys);
this.activeAction = undefined; this.activeAction = undefined;
if(data===1){
this.del(this.selectedRowKeys)
}else{
this.recover(this.selectedRowKeys)
}
},
detail(data){
this.$router.push({name:'DynamicDetail',params:{data:data}})
},
del(ids){
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async() => {
let res = await dynamicDel({dynamicIds:ids})
if(res.code === 200){
this.$message.success(res.msg)
this.getData()
}else{
this.$message.error(res.msg)
}
},
});
},
recover(ids){
this.$confirm({
title: "是否恢复",
// okText:'',
// cancelText:'',
icon: "undo",
onOk: async() => {
let res = await dynamicRecover({dynamicIds:ids})
if(res.code === 200){
this.$message.success(res.msg)
this.getData()
}else{
this.$message.error(res.msg)
}
},
});
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); console.log(data);
this.tableChoosed = data; this.selectedRowKeys = data;
}, },
handleTableChange(pagination) { handleTableChange(pagination) {
console.log(pagination); console.log(pagination);
@ -163,6 +219,7 @@ export default {
this.pagination = pager; this.pagination = pager;
this.getData(); this.getData();
}, },
handleMenuClick(){}
}, },
computed: { computed: {
hasSelected() { hasSelected() {
@ -173,13 +230,11 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.action {
margin-top: -50px;
}
.formbox { .formbox {
text-align: left; text-align: left;
background: #f9f9f9; background: #f9f9f9;
padding-top: 25px; padding-top: 25px;
padding-bottom: 1px; padding-bottom: 1px;
margin:24px;
} }
</style> </style>

@ -0,0 +1,124 @@
export const formItem = [
{
type: 'input',
label:'话题标题',
prop:'title',
placeholder:'请输入标题'
},
{
type: 'select',
label:'状态',
prop:'status',
option:[{ id:1,name:'启用中'},{ id:2,name:'禁用中'}],
placeholder:'请选择状态'
},
{
type: 'select',
label:'是否公开',
prop:'isPublic',
placeholder:'请选择',
option:[{ id:1,name:'是'},{ id:0,name:'否'}]
},
{
type: 'select',
label:'是否评论',
prop:'isRating',
placeholder:'请选择',
option:[{ id:1,name:'是'},{ id:0,name:'否'}]
},
]
export const columns = [
{
title: "话题标题",
dataIndex: "title",
width: "12%",
},
{
title: "内容",
dataIndex: "content",
width: "16%",
},
{
title: "状态",
dataIndex: "status",
width: "10%",
customRender: function (status) {
switch (status) {
case 1:
return '启用中'
case 2:
return '禁用中'
}
}
},
{
title: "是否公开",
dataIndex: "isPublic",
width: "9%",
customRender: function (isPublic) {
switch (isPublic) {
case 1:
return '是'
case 0:
return '否'
}
}
},
{
title: "是否可以评论",
dataIndex: "isRating",
width: "10%",
customRender: function (isRating) {
switch (isRating) {
case 1:
return '是'
case 0:
return '否'
}
}
},
{
title: "用户类型",
dataIndex: "userType",
width: "10%",
customRender: function (userType) {
switch (userType) {
case 1:
return '住户'
case 2:
return '物业'
}
}
},
{
title: "发布人",
dataIndex: "createName",
width: "8%",
},
{
title: "发布时间",
dataIndex: "createDate",
width: "12%",
},
{
title: "是否开启租赁",
dataIndex: "isEnableLease",
scopedSlots: { customRender: "switch" },
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -0,0 +1,102 @@
<template>
<div>
<div class="cardTitle">社区话题</div>
<searchForm :formItem="formItem" @getSearch="getData"></searchForm>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 1400 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
<span slot="switch" slot-scope="switchV, row">
<a-switch
:checked="switchV === 1"
@change="handleEnable(row)"
></a-switch>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled='!hasSelected'>
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="1"> 批量删除 </a-menu-item>
<a-menu-item key="2"> 2nd item </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div>
</template>
<script>
import { topicList } from "@/api/operation/dynamic/topic.js";
import { formItem, columns, pagination } from "./depend/config";
export default {
data() {
return {
tableData: [],
searchForm: {},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
this.getData();
},
methods: {
async getData(data) {
this.searchForm = data;
let res = await topicList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
},
selectionChoosed(data) {
console.log(data);
this.selectedRowKeys = data;
},
handleMenuClick(data) {
console.log(data);
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
</style>
Loading…
Cancel
Save