|
@@ -18,6 +18,8 @@ import info1 from '@/layout/scientific/paper/info-1.vue';
|
|
|
import search1 from '@/layout/scientific/paper/search-1.vue';
|
|
|
import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions } = createNamespacedHelpers('paper');
|
|
|
+
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -29,27 +31,7 @@ export default {
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
|
- list: [
|
|
|
- {
|
|
|
- createBy: '1',
|
|
|
- createTime: '2021-09-16 10:08:17',
|
|
|
- delFlag: '0',
|
|
|
- direction: '338fa9ec011644778ffc28040c835f2a',
|
|
|
- directionName: null,
|
|
|
- id: '1846e091f4eb4b028ef2219a22fd2fc3',
|
|
|
- number: '这里是卷号',
|
|
|
- params: {},
|
|
|
- remark: null,
|
|
|
- searchValue: null,
|
|
|
- startnum: '1-25',
|
|
|
- title: '这里是题目',
|
|
|
- type: '2',
|
|
|
- updateBy: null,
|
|
|
- updateTime: '2021-09-22 20:05:03',
|
|
|
- userId: 'person001',
|
|
|
- userName: '王江涛',
|
|
|
- },
|
|
|
- ],
|
|
|
+ list: [],
|
|
|
total: 0,
|
|
|
limit: 5,
|
|
|
// 查询
|
|
@@ -64,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) {
|