|
@@ -15,6 +15,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import _ from 'lodash';
|
|
|
import dataForm from '@/components/form.vue';
|
|
|
import dataTable from '@/components/data-table.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
@@ -71,7 +72,9 @@ export default {
|
|
|
...users(['query', 'fetch', 'create', 'update', 'delete']),
|
|
|
...authUser({ authUserDelete: 'delete', getBusinessUser: 'getBusinessUser' }),
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
- const res = await this.getBusinessUser({ skip, limit, pid: this.user.uid, ...info });
|
|
|
+ let query = { skip, limit, ...info };
|
|
|
+ this.user.role == '0' && !_.get(this.user, 'pid') ? '' : (query.pid = this.user.uid);
|
|
|
+ const res = await this.getBusinessUser(query);
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `list`, res.data);
|
|
|
this.$set(this, `total`, res.total);
|