|
@@ -36,7 +36,8 @@ export default {
|
|
...personal(['query', 'delete', 'export', 'updatePassword']),
|
|
...personal(['query', 'delete', 'export', 'updatePassword']),
|
|
async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
|
|
async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
|
|
if (searchName) info.name = searchName;
|
|
if (searchName) info.name = searchName;
|
|
- let res = await this.query({ skip, limit, role: this.user.role, code: this.user.code, ...info });
|
|
|
|
|
|
+ if (this.user.role == '1') info.role = this.user.role;
|
|
|
|
+ let res = await this.query({ skip, limit, code: this.user.code, ...info });
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
this.$set(this, `list`, res.data);
|
|
this.$set(this, `list`, res.data);
|
|
this.$set(this, `total`, res.total);
|
|
this.$set(this, `total`, res.total);
|