|
@@ -59,7 +59,11 @@
|
|
@click="deleteMult(selectedIds)"
|
|
@click="deleteMult(selectedIds)"
|
|
>批量删除</el-button
|
|
>批量删除</el-button
|
|
>
|
|
>
|
|
- <el-button size="small" type="success" @click="openSynchronousDialog"
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="rolePrivileges.ORG_IP_CONFIG_SYNC"
|
|
|
|
+ size="small"
|
|
|
|
+ type="success"
|
|
|
|
+ @click="openSynchronousDialog"
|
|
>同步到考试</el-button
|
|
>同步到考试</el-button
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
@@ -301,6 +305,9 @@ export default {
|
|
name: "IpConfig",
|
|
name: "IpConfig",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ rolePrivileges: {
|
|
|
|
+ ORG_IP_CONFIG_SYNC: false,
|
|
|
|
+ },
|
|
examList: [],
|
|
examList: [],
|
|
curRow: null,
|
|
curRow: null,
|
|
showSynchronousDialog: false,
|
|
showSynchronousDialog: false,
|
|
@@ -363,6 +370,7 @@ export default {
|
|
...mapState({ user: (state) => state.user }),
|
|
...mapState({ user: (state) => state.user }),
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ this.initPrivileges();
|
|
this.getOrgList4Search("");
|
|
this.getOrgList4Search("");
|
|
this.searchForm();
|
|
this.searchForm();
|
|
this.getExamList();
|
|
this.getExamList();
|
|
@@ -372,6 +380,17 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ initPrivileges() {
|
|
|
|
+ let params = new URLSearchParams();
|
|
|
|
+ params.append(
|
|
|
|
+ "privilegeCodes",
|
|
|
|
+ Object.keys(this.rolePrivileges).toString()
|
|
|
|
+ );
|
|
|
|
+ var url = CORE_API + "/rolePrivilege/checkPrivileges?" + params;
|
|
|
|
+ this.$httpWithMsg.post(url).then((response) => {
|
|
|
|
+ this.rolePrivileges = response.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
dialogBeforeClose() {
|
|
dialogBeforeClose() {
|
|
this.$refs.editRef.clearValidate();
|
|
this.$refs.editRef.clearValidate();
|
|
},
|
|
},
|