|
@@ -22,7 +22,7 @@
|
|
<script>
|
|
<script>
|
|
const _ = require('lodash');
|
|
const _ = require('lodash');
|
|
import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
|
|
-const { mapActions: user } = createNamespacedHelpers('user');
|
|
|
|
|
|
+const { mapActions } = createNamespacedHelpers('users');
|
|
const { mapActions: admin } = createNamespacedHelpers('admins');
|
|
const { mapActions: admin } = createNamespacedHelpers('admins');
|
|
const { mapActions: dictData } = createNamespacedHelpers('dictData');
|
|
const { mapActions: dictData } = createNamespacedHelpers('dictData');
|
|
export default {
|
|
export default {
|
|
@@ -82,7 +82,7 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
...dictData({ dictQuery: 'query' }),
|
|
...dictData({ dictQuery: 'query' }),
|
|
...admin({ adminPass: 'pass' }),
|
|
...admin({ adminPass: 'pass' }),
|
|
- ...user(['query', 'delete', 'fetch', 'update', 'create']),
|
|
|
|
|
|
+ ...mapActions(['query', 'delete', 'fetch', 'update', 'create']),
|
|
async search({ skip = 0, limit = this.$limit, ...info } = {}) {
|
|
async search({ skip = 0, limit = this.$limit, ...info } = {}) {
|
|
let condition = _.cloneDeep(this.searchForm);
|
|
let condition = _.cloneDeep(this.searchForm);
|
|
let res = await this.query({ skip, limit, ...condition, ...info });
|
|
let res = await this.query({ skip, limit, ...condition, ...info });
|