|
@@ -102,11 +102,9 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { COURSE_LEVELS } from "../constants/constants";
|
|
|
-import pagePrivilege from "../mixin/pagePrivilege.js";
|
|
|
import { mapState } from "vuex";
|
|
|
export default {
|
|
|
props: ["form", "getExamCondition"],
|
|
|
- mixins: [pagePrivilege],
|
|
|
data() {
|
|
|
return {
|
|
|
examList: [],
|
|
@@ -188,16 +186,23 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getExams("");
|
|
|
- //如果没有查询所有学习中心的权限
|
|
|
- if (!this.currentPagePrivileges.ORG_FIND_ALL) {
|
|
|
- var userId = this.user.userId;
|
|
|
- this.$http.get("/api/ecs_core/user/" + userId).then(response => {
|
|
|
- this.form.orgId = response.data.orgId;
|
|
|
- this.orgName = response.data.orgName;
|
|
|
+ let params = new URLSearchParams({
|
|
|
+ privilegeCodes: Object.keys(this.currentPagePrivileges).toString()
|
|
|
+ });
|
|
|
+ this.$http
|
|
|
+ .post("/api/ecs_core/rolePrivilege/checkPrivileges?" + params)
|
|
|
+ .then(response => {
|
|
|
+ this.currentPagePrivileges = response.data;
|
|
|
+ if (!this.currentPagePrivileges.ORG_FIND_ALL) {
|
|
|
+ var userId = this.user.userId;
|
|
|
+ this.$http.get("/api/ecs_core/user/" + userId).then(response => {
|
|
|
+ this.form.orgId = response.data.orgId;
|
|
|
+ this.orgName = response.data.orgName;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.getOrgs("");
|
|
|
+ }
|
|
|
});
|
|
|
- } else {
|
|
|
- this.getOrgs("");
|
|
|
- }
|
|
|
}
|
|
|
};
|
|
|
</script>
|