|
|
|
@ -303,7 +303,7 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import util from "@/libs/util"; |
|
|
|
|
import Util from "@/libs/util"; |
|
|
|
|
import Setting from "@/setting"; |
|
|
|
|
import { mapState } from "vuex"; |
|
|
|
|
import pdf from "vue-pdf"; |
|
|
|
@ -524,11 +524,11 @@ export default { |
|
|
|
|
// 保存笔记 |
|
|
|
|
submitNote () { |
|
|
|
|
const form = this.noteForm |
|
|
|
|
if (!form.noteName) return util.errorMsg('请输入笔记标题') |
|
|
|
|
if (!form.noteContent) return util.errorMsg('请输入笔记内容') |
|
|
|
|
if (!form.noteName) return Util.errorMsg('请输入笔记标题') |
|
|
|
|
if (!form.noteContent) return Util.errorMsg('请输入笔记内容') |
|
|
|
|
this.$post(this.api[form.noteId ? 'updateNote' : 'addNote'], form).then(res => { |
|
|
|
|
this.getNote() |
|
|
|
|
util.successMsg(form.noteId ? '修改成功' : '添加成功') |
|
|
|
|
Util.successMsg(form.noteId ? '修改成功' : '添加成功') |
|
|
|
|
this.showNoteAdd = false |
|
|
|
|
this.noteForm = { |
|
|
|
|
cid: this.courseId, |
|
|
|
@ -543,7 +543,7 @@ export default { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$post(`${this.api.deleteNotes}?noteId=${row.noteId}`).then(res => { |
|
|
|
|
util.successMsg("删除成功"); |
|
|
|
|
Util.successMsg("删除成功"); |
|
|
|
|
this.getNote(); |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}).catch(() => { }) |
|
|
|
@ -604,7 +604,7 @@ export default { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$post(`${this.api.deleteAComment}?commentId=${row.commentId}`).then(res => { |
|
|
|
|
util.successMsg("删除成功"); |
|
|
|
|
Util.successMsg("删除成功"); |
|
|
|
|
this.getComment(); |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}).catch(() => { }) |
|
|
|
@ -612,7 +612,7 @@ export default { |
|
|
|
|
// 保存评论 |
|
|
|
|
submitComment (row, reply) { |
|
|
|
|
const content = reply ? reply.replyContent : row ? row.replyContent : this.comment |
|
|
|
|
if (!content) return util.errorMsg('请输入内容!') |
|
|
|
|
if (!content) return Util.errorMsg('请输入内容!') |
|
|
|
|
this.$post(this.api.addCommentStation, { |
|
|
|
|
mallId: this.mallId, |
|
|
|
|
content, |
|
|
|
@ -827,6 +827,15 @@ export default { |
|
|
|
|
this.showProjectDia() |
|
|
|
|
}) |
|
|
|
|
} else { // python |
|
|
|
|
// python只能存在一个打开的窗口 |
|
|
|
|
const opened = +localStorage.getItem('opened') |
|
|
|
|
if (opened) { |
|
|
|
|
Util.errorMsg('Python系统限单页活跃,请切换至当前已有的活跃实验页面。', 5000) |
|
|
|
|
return false |
|
|
|
|
} else { |
|
|
|
|
localStorage.setItem('opened', 1) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.$get(this.api.getTheMostRecentlyRunProject, { |
|
|
|
|
cid: this.courseId |
|
|
|
|
}).then(({ data }) => { |
|
|
|
@ -844,23 +853,23 @@ export default { |
|
|
|
|
// 进入python系统 |
|
|
|
|
toPython (projectId) { |
|
|
|
|
const id = this.systemIds |
|
|
|
|
let token = util.local.get(Setting.tokenKey); |
|
|
|
|
util.cookies.set('assessmentId', '', -1) |
|
|
|
|
util.cookies.set('startTime', '', -1) |
|
|
|
|
util.cookies.set('stopTime', '', -1) |
|
|
|
|
projectId ? util.cookies.set('projectId', projectId) : util.cookies.set('projectId', '', -1) |
|
|
|
|
util.cookies.set('token', token) |
|
|
|
|
util.cookies.set('mallId', this.mallId) |
|
|
|
|
util.cookies.set('third', this.third) |
|
|
|
|
util.cookies.set('courseId', this.courseId) |
|
|
|
|
util.cookies.set('curriculumName', encodeURIComponent(this.curriculumName)) |
|
|
|
|
util.cookies.set('systemId', id) |
|
|
|
|
util.cookies.set('fromManager', 1) |
|
|
|
|
util.cookies.set('isSubmit', '', -1) |
|
|
|
|
util.cookies.set('competitionId', '', -1) |
|
|
|
|
util.cookies.set('language', '', -1) |
|
|
|
|
util.cookies.set('className', '', -1) |
|
|
|
|
util.cookies.set('loaded', '', -1) |
|
|
|
|
let token = Util.local.get(Setting.tokenKey); |
|
|
|
|
Util.cookies.set('assessmentId', '', -1) |
|
|
|
|
Util.cookies.set('startTime', '', -1) |
|
|
|
|
Util.cookies.set('stopTime', '', -1) |
|
|
|
|
projectId ? Util.cookies.set('projectId', projectId) : Util.cookies.set('projectId', '', -1) |
|
|
|
|
Util.cookies.set('token', token) |
|
|
|
|
Util.cookies.set('mallId', this.mallId) |
|
|
|
|
Util.cookies.set('third', this.third) |
|
|
|
|
Util.cookies.set('courseId', this.courseId) |
|
|
|
|
Util.cookies.set('curriculumName', encodeURIComponent(this.curriculumName)) |
|
|
|
|
Util.cookies.set('systemId', id) |
|
|
|
|
Util.cookies.set('fromManager', 1) |
|
|
|
|
Util.cookies.set('isSubmit', '', -1) |
|
|
|
|
Util.cookies.set('competitionId', '', -1) |
|
|
|
|
Util.cookies.set('language', '', -1) |
|
|
|
|
Util.cookies.set('className', '', -1) |
|
|
|
|
Util.cookies.set('loaded', '', -1) |
|
|
|
|
// 8个python子系统都跳这个地址,子系统会通过cookie里的systemId识别展示哪套系统 |
|
|
|
|
location.href = process.env.NODE_ENV === 'development' ? |
|
|
|
|
`http://${location.hostname}:8085/#/` : |
|
|
|
@ -877,7 +886,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
const { systemId } = curProject |
|
|
|
|
|
|
|
|
|
let token = util.local.get(Setting.tokenKey); |
|
|
|
|
let token = Util.local.get(Setting.tokenKey); |
|
|
|
|
this.third = curProject.type === 2 ? (curProject.systemId === 28 ? 'low' : 'ai') : '' |
|
|
|
|
if (systemId == 11) { |
|
|
|
|
// 银行系统 |
|
|
|
|