|
@@ -18,6 +18,7 @@ import info1 from '@/layout/ranks/personnel/info-1.vue';
|
|
|
import search1 from '@/layout/ranks/personnel/search-1.vue';
|
|
|
import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions } = createNamespacedHelpers('personnelname');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -29,25 +30,7 @@ export default {
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
|
- list: [
|
|
|
- {
|
|
|
- createBy: '1',
|
|
|
- createTime: '2021-09-16 17:11:44',
|
|
|
- delFlag: '0',
|
|
|
- direction: '338fa9ec011644778ffc28040c835f2a',
|
|
|
- directionName: null,
|
|
|
- id: '62868565807c45a39c38038e85950171',
|
|
|
- name: 'person001',
|
|
|
- nekename: '11',
|
|
|
- params: {},
|
|
|
- remark: null,
|
|
|
- searchValue: null,
|
|
|
- time: '2021-09-08',
|
|
|
- updateBy: null,
|
|
|
- updateTime: '2021-09-22 20:12:18',
|
|
|
- userName: '王江涛',
|
|
|
- },
|
|
|
- ],
|
|
|
+ list: [],
|
|
|
total: 0,
|
|
|
limit: 5,
|
|
|
// 查询
|
|
@@ -62,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, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.rows);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
},
|
|
|
// 查看信息
|
|
|
async toView(data) {
|