|
@@ -18,6 +18,8 @@ import info1 from '@/layout/learning/sociology/info-1.vue';
|
|
|
import search1 from '@/layout/learning/sociology/search-1.vue';
|
|
|
import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions } = createNamespacedHelpers('socialservices');
|
|
|
+
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -29,25 +31,7 @@ export default {
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
|
- list: [
|
|
|
- {
|
|
|
- content: '111',
|
|
|
- createBy: '1',
|
|
|
- createTime: '2021-09-16 15:37:41',
|
|
|
- delFlag: '0',
|
|
|
- id: '91d0c1548b3b4e0ea8db25839faf50cf',
|
|
|
- name: '活动名称',
|
|
|
- numbers: 50,
|
|
|
- params: {},
|
|
|
- propaganda: '1',
|
|
|
- remark: null,
|
|
|
- role: '角色111',
|
|
|
- searchValue: null,
|
|
|
- updateBy: null,
|
|
|
- updateTime: '2021-09-22 09:01:40',
|
|
|
- usernames: '组织者11',
|
|
|
- },
|
|
|
- ],
|
|
|
+ list: [],
|
|
|
total: 0,
|
|
|
limit: 5,
|
|
|
// 查询
|
|
@@ -62,9 +46,13 @@ export default {
|
|
|
await this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
- async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
|
|
|
- if (searchName) info.name = searchName;
|
|
|
- console.log(this.searhForm);
|
|
|
+ ...mapActions(['query', 'fetch']),
|
|
|
+ async search({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
+ const res = await this.query({ skip, limit, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.rows);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
},
|
|
|
// 查看信息
|
|
|
async toView(data) {
|