|
@@ -18,6 +18,7 @@ import info1 from '@/layout/activity/time/info-1.vue';
|
|
|
import search1 from '@/layout/activity/time/search-1.vue';
|
|
|
import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions } = createNamespacedHelpers('times');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -29,22 +30,7 @@ export default {
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
|
- list: [
|
|
|
- {
|
|
|
- createBy: '1',
|
|
|
- createTime: '2021-11-17 15:20:03',
|
|
|
- endTime: '2021-12-31',
|
|
|
- id: '3d927a9ce1b54ba2879b7c6a8aab6370',
|
|
|
- isOpen: '0',
|
|
|
- params: {},
|
|
|
- remark: null,
|
|
|
- searchValue: null,
|
|
|
- startTime: '2021-11-01',
|
|
|
- title: '测试',
|
|
|
- updateBy: null,
|
|
|
- updateTime: null,
|
|
|
- },
|
|
|
- ],
|
|
|
+ list: [],
|
|
|
total: 0,
|
|
|
limit: 5,
|
|
|
// 查询
|
|
@@ -59,9 +45,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, isOpen: '0', ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.rows);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
},
|
|
|
// 查看信息
|
|
|
async toView(data) {
|