|
@@ -270,6 +270,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ rolePrivileges: {
|
|
|
+ user_data_rule_setting: false
|
|
|
+ },
|
|
|
loading: false,
|
|
|
style: {
|
|
|
label_width_tab1: "160px",
|
|
@@ -432,9 +435,31 @@ export default {
|
|
|
},
|
|
|
addOrg() {
|
|
|
this.$refs.addOrgDialog.openDialog();
|
|
|
+ },
|
|
|
+ async initPrivileges() {
|
|
|
+ let params = new URLSearchParams();
|
|
|
+ params.append(
|
|
|
+ "privilegeCodes",
|
|
|
+ Object.keys(this.rolePrivileges).toString()
|
|
|
+ );
|
|
|
+ var url = CORE_API + "/rolePrivilege/checkPrivileges?" + params;
|
|
|
+ await this.$httpWithMsg.post(url).then(response => {
|
|
|
+ this.rolePrivileges = response.data;
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
async created() {
|
|
|
+ await this.initPrivileges();
|
|
|
+ if (!this.rolePrivileges.user_data_rule_setting) {
|
|
|
+ this.$alert("没有权限访问!", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ callback: () => {
|
|
|
+ this.back();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
this.userId = this.$route.params.userId;
|
|
|
await this.init();
|
|
|
this.$nextTick(function() {
|