|
@@ -113,9 +113,17 @@ export default {
|
|
|
pageNum: 1,
|
|
|
total: "",
|
|
|
loading: false,
|
|
|
- asyncData: []
|
|
|
+ asyncData: [],
|
|
|
+ OpenGroup: null,
|
|
|
+ OpenAuthData: null
|
|
|
};
|
|
|
},
|
|
|
+ created () {
|
|
|
+ const obj = this.$store.state.app.systemSet;
|
|
|
+ const { OpenGroup, UserOfficerMulti } = typeof obj === "string" ? JSON.parse(obj) : obj; //1是请求角色 0是请求用户
|
|
|
+ this.OpenGroup = OpenGroup;
|
|
|
+ this.OpenAuthData = UserOfficerMulti;
|
|
|
+ },
|
|
|
watch: {
|
|
|
radioCheck: {
|
|
|
handler (num) {
|
|
@@ -125,14 +133,16 @@ export default {
|
|
|
},
|
|
|
roleType: {
|
|
|
handler (msg) {
|
|
|
- if (msg == 'account') {
|
|
|
- this.getRoleData('UserId', 'UserName');
|
|
|
- }
|
|
|
- if (msg == "roleByUpId") {
|
|
|
- this.getRoleDataByUpId("roleId");
|
|
|
- }
|
|
|
- if (msg == "onlyRole") {
|
|
|
- this.getRoleData('RoleId', 'RoleName');
|
|
|
+ if (!this.OpenGroup || this.OpenAuthData) {
|
|
|
+ if (msg == 'account') {
|
|
|
+ this.getRoleData('UserId', 'UserName');
|
|
|
+ }
|
|
|
+ if (msg == "roleByUpId") {
|
|
|
+ this.getRoleDataByUpId("roleId");
|
|
|
+ }
|
|
|
+ if (msg == "onlyRole") {
|
|
|
+ this.getRoleData('RoleId', 'RoleName');
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
deep: true,
|
|
@@ -166,7 +176,7 @@ export default {
|
|
|
},
|
|
|
asyncData: {
|
|
|
handler (arr) {
|
|
|
- if (arr && arr.length == 2) {
|
|
|
+ if (arr && arr.length >= 2) {
|
|
|
if (this.roleType == "account") {
|
|
|
this.checkBoxs("UserId");
|
|
|
}
|
|
@@ -179,7 +189,9 @@ export default {
|
|
|
},
|
|
|
GroupIds: {
|
|
|
handler () {
|
|
|
- this.getRoleDataByUpId();
|
|
|
+ if (this.OpenGroup || !this.OpenAuthData) {
|
|
|
+ this.getRoleDataByUpId();
|
|
|
+ }
|
|
|
},
|
|
|
deep: true
|
|
|
}
|
|
@@ -287,7 +299,6 @@ export default {
|
|
|
});
|
|
|
this.dataList = msgs;
|
|
|
this.total = num;
|
|
|
-
|
|
|
this.$emit('roleListChange', msgs)
|
|
|
|
|
|
this.loading = false;
|