|
@@ -173,18 +173,21 @@ export default {
|
|
|
subjectNames: null,
|
|
|
// isReset: false,
|
|
|
isInside: false,
|
|
|
+ tenantId: null, // 当前机构编号
|
|
|
isAssignHomework: 0, // 是否有布置作业,0 => 否 1 => 是
|
|
|
enableAssignHomework: 0, // 是否要布置作业 0 否 1 是
|
|
|
memberStatus: 0, // 是否有学生或者乐团是会员
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.tenantId = sessionStorage.getItem('tenantId') || null
|
|
|
+ },
|
|
|
async mounted() {
|
|
|
let params = this.$route.query;
|
|
|
if (params.Authorization) {
|
|
|
localStorage.setItem("Authorization", decodeURI(params.Authorization));
|
|
|
localStorage.setItem("userInfo", decodeURI(params.Authorization));
|
|
|
}
|
|
|
- console.log(params)
|
|
|
this.courseId = params.id;
|
|
|
this.reviewId = parseInt(params.reviewId);
|
|
|
this.isInside = params.isInside;
|
|
@@ -280,7 +283,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
submitReview() {
|
|
|
- if(!this.isAssignHomework && this.enableAssignHomework) {
|
|
|
+ // 不是大雅机构则作业非必填
|
|
|
+ if(!this.isAssignHomework && this.enableAssignHomework && this.tenantId == 1) {
|
|
|
this.$toast('请布置课后训练')
|
|
|
return
|
|
|
}
|
|
@@ -316,7 +320,8 @@ export default {
|
|
|
updateReviewInfo(obj).then((res) => {
|
|
|
this.$toast("修改成功");
|
|
|
setTimeout((res) => {
|
|
|
- if (this.isInside) {
|
|
|
+ // 硬编码,判断是否是大雅机构,其它机构则可以不用布置作业
|
|
|
+ if (this.isInside && this.tenantId == 1) {
|
|
|
this.$router.replace({ path: "/manageEvaluation" });
|
|
|
} else {
|
|
|
this.onAppBack();
|
|
@@ -328,7 +333,7 @@ export default {
|
|
|
if (res.data.code == 200) {
|
|
|
this.$toast("提交成功");
|
|
|
setTimeout((res) => {
|
|
|
- if (this.isInside) {
|
|
|
+ if (this.isInside && this.tenantId == 1) {
|
|
|
this.$router.push({ path: "/manageEvaluation" });
|
|
|
} else {
|
|
|
this.onAppBack();
|
|
@@ -403,7 +408,7 @@ export default {
|
|
|
},
|
|
|
onClose() {
|
|
|
// 关闭弹窗
|
|
|
- if (this.isInside) {
|
|
|
+ if (this.isInside && this.tenantId == 1) {
|
|
|
this.$router.replace({ path: "/manageEvaluation" });
|
|
|
} else {
|
|
|
this.onAppBack();
|