|
@@ -61,7 +61,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { subjectDetail, gradingProgressDetail } from "@/api";
|
|
|
+import { subjectDetail, gradingProgressDetail, getParamsSet } from "@/api";
|
|
|
import { grading, main } from "@/constants/authority";
|
|
|
import menuMixins from "@/components/homeMenuMixins";
|
|
|
import { SUBJECT_STAGE } from "@/constants/enumerate";
|
|
@@ -73,10 +73,12 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
subjectId: this.$route.params.subjectId,
|
|
|
+ workId: this.$route.params.workId,
|
|
|
navs: [],
|
|
|
curNav: {},
|
|
|
curSubject: { name: "" },
|
|
|
SUBJECT_STAGE,
|
|
|
+ paramsSet: {},
|
|
|
IS_ADMIN: true,
|
|
|
stepName: "",
|
|
|
stepProgress: ""
|
|
@@ -113,11 +115,24 @@ export default {
|
|
|
this.curSubject.test === 2
|
|
|
? "试评"
|
|
|
: this.SUBJECT_STAGE[this.curSubject.stage];
|
|
|
+ } else {
|
|
|
+ await this.getParamsSetInfo();
|
|
|
+ if (
|
|
|
+ this.$route.name === "GradingStandardPaperManage" &&
|
|
|
+ !this.paramsSet.showStandardPaperManage
|
|
|
+ ) {
|
|
|
+ this.$Message.error("非法操作!");
|
|
|
+ this.$router.replace({ name: "Login" });
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
this.buildNavs();
|
|
|
this.actSubNav();
|
|
|
},
|
|
|
+ async getParamsSetInfo() {
|
|
|
+ this.paramsSet = await getParamsSet(this.workId);
|
|
|
+ },
|
|
|
async getProgressDetail() {
|
|
|
const data = await gradingProgressDetail({
|
|
|
workId: this.curSubject.workId,
|
|
@@ -130,7 +145,9 @@ export default {
|
|
|
if (this.IS_ADMIN) {
|
|
|
this.navs = [...main.slice(0, 2), ...this.navs.slice(0, -2)];
|
|
|
} else {
|
|
|
- this.navs.splice(3, 2);
|
|
|
+ this.paramsSet.showStandardPaperManage
|
|
|
+ ? this.navs.splice(3, 2)
|
|
|
+ : this.navs.splice(3, 3);
|
|
|
}
|
|
|
},
|
|
|
actSubNav() {
|