|
|
@@ -440,6 +440,7 @@ import templateDialogE from "./aiEasy/templateDialog.vue";
|
|
|
import { v4 as uuidv4 } from "uuid";
|
|
|
import { myMixin } from "@/mixins/mixin.js"
|
|
|
import backPage from "./liyuan/components/backPage.vue";
|
|
|
+import { result } from "lodash";
|
|
|
|
|
|
export default {
|
|
|
components: { EditorBar, CourseProblem,shareDialog,templateDialog,templateDialogE,backPage },
|
|
|
@@ -645,7 +646,7 @@ export default {
|
|
|
// }
|
|
|
// this.$router.push(path);
|
|
|
},
|
|
|
- goToCourse4(courseId) {
|
|
|
+ async goToCourse4(courseId) {
|
|
|
if (courseId) {
|
|
|
this.$router.push(
|
|
|
"/newAddCourse?cid=" +
|
|
|
@@ -661,6 +662,11 @@ export default {
|
|
|
);
|
|
|
this.addOp3('1', "", { courseid: courseId ,type: "course_stageMode_edit" }, "success")
|
|
|
} else {
|
|
|
+ let classResult = await this.checkClass()
|
|
|
+ if(classResult == 1){
|
|
|
+ this.$message.error(this.lang.ssCreateCourseLimit)
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$router.push(
|
|
|
"/newAddCourse?userid=" +
|
|
|
this.userid +
|
|
|
@@ -728,7 +734,7 @@ export default {
|
|
|
}
|
|
|
this.addOp3('1', "", { type: "course_aiMode_createClick" }, "success")
|
|
|
},
|
|
|
- goToCourse5(courseId) {
|
|
|
+ async goToCourse5(courseId) {
|
|
|
if (courseId) {
|
|
|
this.$router.push(
|
|
|
"/aiAddCourse?cid=" +
|
|
|
@@ -744,6 +750,11 @@ export default {
|
|
|
);
|
|
|
this.addOp3('1', "", { courseid: courseId ,type: "course_aiMode_edit" }, "success")
|
|
|
} else {
|
|
|
+ let classResult = await this.checkClass()
|
|
|
+ if(classResult == 1){
|
|
|
+ this.$message.error(this.lang.ssCreateCourseLimit)
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$router.push(
|
|
|
"/aiAddCourse?userid=" +
|
|
|
this.userid +
|
|
|
@@ -802,7 +813,7 @@ export default {
|
|
|
}
|
|
|
this.addOp3('1', "", { type: "course_aiEasyMode_createClick" }, "success")
|
|
|
},
|
|
|
- goToCourse6(courseId){
|
|
|
+ async goToCourse6(courseId){
|
|
|
if (courseId) {
|
|
|
this.$router.push(
|
|
|
"/addCourseEAi?cid=" +
|
|
|
@@ -818,6 +829,11 @@ export default {
|
|
|
);
|
|
|
this.addOp3('1', "", { courseid: courseId ,type: "course_aiEasyMode_edit" }, "success")
|
|
|
} else {
|
|
|
+ let classResult = await this.checkClass()
|
|
|
+ if(classResult == 1){
|
|
|
+ this.$message.error(this.lang.ssCreateCourseLimit)
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$router.push(
|
|
|
"/addCourseEAi?userid=" +
|
|
|
this.userid +
|
|
|
@@ -857,7 +873,7 @@ export default {
|
|
|
}
|
|
|
this.getCourse();
|
|
|
},
|
|
|
- goToCourse2(courseId) {
|
|
|
+ async goToCourse2(courseId) {
|
|
|
if (courseId) {
|
|
|
this.$router.push(
|
|
|
"/course/addCourseT?cid=" +
|
|
|
@@ -872,6 +888,11 @@ export default {
|
|
|
this.role
|
|
|
);
|
|
|
} else {
|
|
|
+ let classResult = await this.checkClass()
|
|
|
+ if(classResult == 1){
|
|
|
+ this.$message.error(this.lang.ssCreateCourseLimit)
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$router.push(
|
|
|
"/course/addCourseT?userid=" +
|
|
|
this.userid +
|
|
|
@@ -884,7 +905,7 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
- goToCourse3(courseId) {
|
|
|
+ async goToCourse3(courseId) {
|
|
|
if (courseId) {
|
|
|
this.$router.push(
|
|
|
"/course/addCourseE?cid=" +
|
|
|
@@ -900,6 +921,11 @@ export default {
|
|
|
);
|
|
|
this.addOp3('1', "", { courseid: courseId ,type: "course_easyMode_edit" }, "success")
|
|
|
} else {
|
|
|
+ let classResult = await this.checkClass()
|
|
|
+ if(classResult == 1){
|
|
|
+ this.$message.error(this.lang.ssCreateCourseLimit)
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$router.push(
|
|
|
"/course/addCourseE?userid=" +
|
|
|
this.userid +
|
|
|
@@ -1574,7 +1600,7 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
- goToPptEasy(courseId){
|
|
|
+ async goToPptEasy(courseId){
|
|
|
if (courseId) {
|
|
|
let psOrg = ['311882ee-4e86-11f1-9985-005056924926']
|
|
|
let route = '/pptEasy'
|
|
|
@@ -1596,6 +1622,12 @@ export default {
|
|
|
);
|
|
|
this.addOp3('1', "", { courseid: courseId ,type: "course_pptEasyMode_edit" }, "success")
|
|
|
} else {
|
|
|
+ let classResult = await this.checkClass()
|
|
|
+ if(classResult == 1){
|
|
|
+ this.$message.error(this.lang.ssCreateCourseLimit)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
let psOrg = ['311882ee-4e86-11f1-9985-005056924926']
|
|
|
let route = '/pptEasy'
|
|
|
if(psOrg.includes(this.org)){
|
|
|
@@ -1614,6 +1646,22 @@ export default {
|
|
|
this.addOp3('1', "", { type: "course_pptEasyMode_createClick" }, "success")
|
|
|
}
|
|
|
},
|
|
|
+ async checkClass(){
|
|
|
+ if(this.org == '16ace517-b5c7-4168-a9bb-a9e0035df840'){
|
|
|
+ let params = {
|
|
|
+ userid: this.userid,
|
|
|
+ };
|
|
|
+ try {
|
|
|
+ const res = await this.ajax.get(this.$store.state.api + "checkClass", params)
|
|
|
+ let data = res.data[0][0]
|
|
|
+ return data
|
|
|
+ } catch (err) {
|
|
|
+ console.error(err);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ return 2
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
if (this.role == "1") {
|