|
@@ -18,6 +18,8 @@ import info1 from '@/layout/scientific/otherachieve/info-1.vue';
|
|
|
import search1 from '@/layout/scientific/otherachieve/search-1.vue';
|
|
|
import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions } = createNamespacedHelpers('other');
|
|
|
+
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -29,24 +31,7 @@ export default {
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
|
- list: [
|
|
|
- {
|
|
|
- content: '啊吧啊吧',
|
|
|
- createBy: '1',
|
|
|
- createTime: '2021-09-16 10:45:35',
|
|
|
- delFlag: '0',
|
|
|
- direction: '173d667ff2c04aa68390fefef2519f95',
|
|
|
- directionName: null,
|
|
|
- id: '80624b94ad0d4827b7f15699febe5a2c',
|
|
|
- name: '成果名称',
|
|
|
- params: {},
|
|
|
- remark: null,
|
|
|
- searchValue: null,
|
|
|
- type: '1',
|
|
|
- updateBy: null,
|
|
|
- updateTime: '2021-09-22 20:07:11',
|
|
|
- },
|
|
|
- ],
|
|
|
+ list: [],
|
|
|
total: 0,
|
|
|
limit: 5,
|
|
|
// 查询
|
|
@@ -61,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) {
|