dev_202412
yujialong 3 months ago
parent 77e3ae771a
commit aca04f3719
  1. 4
      src/layouts/header/index.vue
  2. 8
      src/pages/backend/list/index.vue
  3. 2
      src/pages/expSystem/list/index.vue
  4. 2
      src/pages/lesson/content/index.vue
  5. 2
      src/pages/lesson/content/source.vue
  6. 35
      src/pages/lesson/detail/index.vue
  7. 106
      src/pages/station/preview/index.vue
  8. 13
      src/pages/system/list/index.vue
  9. 2
      src/pages/workbench/list/index.vue

@ -131,7 +131,7 @@ export default {
}, },
initSocket ({ id, account }) { initSocket ({ id, account }) {
// socket // socket
this.socket = new WebSocket(`${Setting.isTest ? 'ws' : 'wss'}://${Setting.isDev ? '192.168.31.51:9100' : location.host}/nakadai/websocket/${id}/${account}`) this.socket = new WebSocket(`wss://${Setting.isDev ? '192.168.31.51:9100' : location.host}/nakadai/websocket/${id}/${account}`)
// this.socket = new WebSocket(`ws://118.31.167.228:9100/nakadai/websocket/${id}/${account}`) // this.socket = new WebSocket(`ws://118.31.167.228:9100/nakadai/websocket/${id}/${account}`)
// socket // socket
this.socket.onopen = this.open; this.socket.onopen = this.open;
@ -163,7 +163,6 @@ export default {
}, },
getUserDetail () { // getUserDetail () { //
this.$get(this.api.queryUserInfoDetails).then(res => { this.$get(this.api.queryUserInfoDetails).then(res => {
this.initSocket(res.result.userAccount)
let { hrUserInfo } = res.result let { hrUserInfo } = res.result
if (hrUserInfo) { if (hrUserInfo) {
const { userAvatars, userName, userId } = hrUserInfo const { userAvatars, userName, userId } = hrUserInfo
@ -172,6 +171,7 @@ export default {
console.log("🚀 ~ this.$get ~ userAvatars:", userName) console.log("🚀 ~ this.$get ~ userAvatars:", userName)
this.setUserName(userName) this.setUserName(userName)
} }
this.initSocket(res.result.userAccount)
}).catch(res => { }) }).catch(res => { })
}, },
userCommand (command) { // userCommand (command) { //

@ -25,7 +25,7 @@ export default {
}, },
data () { data () {
return { return {
active: 'tab1', active: this.$route.query.type || 'tab1',
tabs: { tabs: {
tab1: '学生管理', tab1: '学生管理',
tab2: '实验系统管理', tab2: '实验系统管理',
@ -45,6 +45,12 @@ export default {
methods: { methods: {
tabChange (index) { tabChange (index) {
this.active = index this.active = index
this.$router.push({
path: 'list',
query: {
type: index
}
})
}, },
initTabs () { initTabs () {
const { btns } = this const { btns } = this

@ -155,7 +155,7 @@ export default {
if (row.systemId == 19) { if (row.systemId == 19) {
location.href = `${Setting.sandPath}/#/config?token=${this.token}&referrer=${encodeURIComponent(location.href)}` location.href = `${Setting.sandPath}/#/config?token=${this.token}&referrer=${encodeURIComponent(location.href)}`
} else { } else {
this.$router.push(`backstage?systemId=${row.systemId}&show=1&name=${row.systemName}`) this.$router.push(`/expSystem/backstage?systemId=${row.systemId}&show=1&name=${row.systemName}`)
} }
}, },
} }

@ -447,7 +447,7 @@ export default {
] ]
this.moveVisible = true this.moveVisible = true
} else { } else {
this.$message.warning('请选择小节!') this.$message.warning('请选择资源!')
} }
}, },
// //

@ -20,7 +20,7 @@
@click="course.shrink = !course.shrink"></i> @click="course.shrink = !course.shrink"></i>
<el-checkbox class="check" v-model="course.check" @change="checkCourse(course)"></el-checkbox> <el-checkbox class="check" v-model="course.check" @change="checkCourse(course)"></el-checkbox>
<img v-if="course.coverUrl" class="cover" :src="course.coverUrl" alt=""> <img v-if="course.coverUrl" class="cover" :src="course.coverUrl" alt="">
<span class="course-name">{{ course.curriculumName }}</span> <span class="course-name">{{ course.curriculumName || course.courseName }}</span>
</div> </div>
<div v-if="course.shrink" class="chapters"> <div v-if="course.shrink" class="chapters">
<!-- 章节 --> <!-- 章节 -->

@ -80,8 +80,8 @@
<el-card shadow="hover"> <el-card shadow="hover">
<div class="cover-wrap"> <div class="cover-wrap">
<el-upload name="file" accept=".jpg,.png,.jpeg,.gif" ref="upload" drag :on-remove="handleRemove" <el-upload name="file" accept=".jpg,.png,.jpeg,.gif" ref="upload" drag :on-remove="handleRemove"
:on-error="uploadError" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" action="" :on-error="uploadError" :before-remove="beforeRemove" :limit="10000" :file-list="fileList"
:http-request="handleRequest"> :on-exceed="handleExceed" action="" :http-request="handleRequest">
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text"> <div class="el-upload__text">
<p>将图片拖到此处<em>点击上传</em></p> <p>将图片拖到此处<em>点击上传</em></p>
@ -225,7 +225,7 @@
<ul class="systems"> <ul class="systems">
<li v-for="(item, i) in systems" :key="i" :title="item.systemName"> <li v-for="(item, i) in systems" :key="i" :title="item.systemName">
<div class="line"> <div class="line">
<el-checkbox v-model="item.check" @change="val => courseChange(val, item)"></el-checkbox> <!-- <el-checkbox v-model="item.check" @change="val => courseChange(val, item)"></el-checkbox> -->
<div :class="['name', { active: curCourse == item.cid }]" @click="getProject(item)"> <div :class="['name', { active: curCourse == item.cid }]" @click="getProject(item)">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
<i class="el-icon-arrow-right"></i> <i class="el-icon-arrow-right"></i>
@ -234,7 +234,7 @@
<div v-if="item.systemInfo" class="children"> <div v-if="item.systemInfo" class="children">
<div v-for="(system, j) in item.systemInfo" :key="j" :title="system.label" class="line"> <div v-for="(system, j) in item.systemInfo" :key="j" :title="system.label" class="line">
<el-checkbox v-model="system.check" @change="val => systemChange(val, system, item)"></el-checkbox> <!-- <el-checkbox v-model="system.check" @change="val => systemChange(val, system, item)"></el-checkbox> -->
<div :class="['name', { active: curCourse == item.cid && curSystem == system.systemId }]" <div :class="['name', { active: curCourse == item.cid && curSystem == system.systemId }]"
@click="getProject(item, system)"> @click="getProject(item, system)">
<span>{{ system.systemName }}</span> <span>{{ system.systemName }}</span>
@ -269,8 +269,7 @@
<el-button type="text" @click="batchDelChecked">批量移除</el-button> <el-button type="text" @click="batchDelChecked">批量移除</el-button>
</div> </div>
<el-input placeholder="请输入实训项目名称、理论试卷名称" prefix-icon="el-icon-search" v-model="checkedKeyword" <el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="checkedKeyword" clearable></el-input>
clearable></el-input>
<div class="lines"> <div class="lines">
<template v-for="(item, i) in checkeds"> <template v-for="(item, i) in checkeds">
@ -320,6 +319,7 @@ export default {
isAdd: true, isAdd: true,
editorConfig, editorConfig,
step: 1, step: 1,
defaultCover: 'https://izhixinyun.com/images/course-cover.png',
form: { form: {
curriculumName: "", curriculumName: "",
curriculumType: '', curriculumType: '',
@ -332,7 +332,7 @@ export default {
teachingObjectives: "", teachingObjectives: "",
systemIdByAssessment: [], systemIdByAssessment: [],
systemIdByPractice: [], systemIdByPractice: [],
coverUrl: 'https://izhixinyun.com/images/course-cover.png', coverUrl: '',
curriculumDisciplines: [ curriculumDisciplines: [
{ {
professionalClassList: [], professionalClassList: [],
@ -343,6 +343,7 @@ export default {
} }
], ],
}, },
fileList: [],
rules: { rules: {
curriculumName: [ curriculumName: [
{ required: true, message: "请输入课程名称", trigger: "blur" } { required: true, message: "请输入课程名称", trigger: "blur" }
@ -414,19 +415,25 @@ export default {
this.getProject() this.getProject()
}, 500) }, 500)
}, },
},
created () {
}, },
mounted () { mounted () {
if (this.cid) this.isAdd = false if (this.cid) this.isAdd = false
this.form.coverUrl = this.defaultCover
this.getSubject() this.getSubject()
this.cid && this.getInfoData() this.cid && this.getInfoData()
}, },
methods: { methods: {
getInfoData () { getInfoData () {
this.$post(`${this.api.curriculumDetail}?cid=${this.cid}`).then(({ data }) => { this.$post(`${this.api.curriculumDetail}?cid=${this.cid}`).then(({ data }) => {
if (!data.coverUrl) data.coverUrl = 'https://izhixinyun.com/images/course-cover.png' const cover = data.coverUrl
if (!cover) {
data.coverUrl = this.defaultCover
} else if (!cover.includes('course-cover')) {
this.fileList = [{
name: cover,
url: cover,
}]
}
this.form = data this.form = data
this.practiceData = data.practiceConfig this.practiceData = data.practiceConfig
this.assessmentData = data.assessmentConfig this.assessmentData = data.assessmentConfig
@ -532,6 +539,10 @@ export default {
async handleRequest ({ file }) { async handleRequest ({ file }) {
Oss.upload(file).then(res => { Oss.upload(file).then(res => {
this.form.coverUrl = res.url this.form.coverUrl = res.url
this.fileList = [{
name: res.url,
url: res.url
}]
}) })
}, },
uploadError (err, file, fileList) { uploadError (err, file, fileList) {
@ -546,7 +557,7 @@ export default {
}, },
handleRemove () { handleRemove () {
Oss.del(this.form.coverUrl) Oss.del(this.form.coverUrl)
this.form.coverUrl = '' this.form.coverUrl = this.defaultCover
}, },
// //

@ -50,7 +50,7 @@
</div> </div>
</div> </div>
<div class="catalog"> <div class="catalog">
<div v-if="mallId" class="m-b-20"> <div class="m-b-20">
<el-button v-if="mallId && !overdue" class="entry" type="primary" size="small" <el-button v-if="mallId && !overdue" class="entry" type="primary" size="small"
@click="showBuy">续费</el-button> @click="showBuy">续费</el-button>
<el-button v-if="practiceTheoreticalPaper" class="entry" type="primary" @click="entry(1)">进入理论</el-button> <el-button v-if="practiceTheoreticalPaper" class="entry" type="primary" @click="entry(1)">进入理论</el-button>
@ -462,7 +462,7 @@ export default {
let { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`); let { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`);
this.courseName = data.curriculumName; this.courseName = data.curriculumName;
// this.coverUrl = data.coverUrl; // this.coverUrl = data.coverUrl;
this.briefIntroduction = data.briefIntroduction; this.briefIntroduction = data.teachingObjectives;
this.teachingObjectives = data.teachingObjectives; this.teachingObjectives = data.teachingObjectives;
this.assessmentList = data.assessmentConfig; this.assessmentList = data.assessmentConfig;
this.systemIds = data.systemIds this.systemIds = data.systemIds
@ -588,26 +588,28 @@ export default {
// //
getComment () { getComment () {
this.$get(this.api.commentTreeList, { if (this.mallId) {
mallId: this.mallId, this.$get(this.api.commentTreeList, {
}).then(res => { mallId: this.mallId,
this.deleteIdentity = res.deleteIdentity }).then(res => {
const list = res.rootComments this.deleteIdentity = res.deleteIdentity
this.handleComments(list) const list = res.rootComments
this.comments = list this.handleComments(list)
this.$nextTick(async () => { this.comments = list
if (this.curReplyId) { this.$nextTick(async () => {
const el = document.querySelector('#comment' + this.curReplyId) if (this.curReplyId) {
el && el.scrollIntoView(false) const el = document.querySelector('#comment' + this.curReplyId)
} el && el.scrollIntoView(false)
if (this.commentId) { }
this.active = 4 if (this.commentId) {
const el = document.getElementById('comment' + this.commentId) this.active = 4
el && el.scrollIntoView(false) const el = document.getElementById('comment' + this.commentId)
this.commentId = '' el && el.scrollIntoView(false)
} this.commentId = ''
}) }
}).catch(res => { }) })
}).catch(res => { })
}
}, },
// //
handleComments (list, parent = {}) { handleComments (list, parent = {}) {
@ -642,21 +644,23 @@ export default {
}, },
// //
submitComment (row, reply) { submitComment (row, reply) {
const content = reply ? reply.replyContent : row ? row.replyContent : this.comment if (this.mallId) {
if (!content) return Util.errorMsg('请输入内容!') const content = reply ? reply.replyContent : row ? row.replyContent : this.comment
this.$post(this.api.addCommentStation, { if (!content) return Util.errorMsg('请输入内容!')
mallId: this.mallId, this.$post(this.api.addCommentStation, {
content, mallId: this.mallId,
// pid: reply ? reply.commentId : row ? row.commentId : 0, content,
pid: row ? row.commentId : 0, // pid: reply ? reply.commentId : row ? row.commentId : 0,
replyAccountId: reply ? reply.createAccountId : row.createAccountId || '', pid: row ? row.commentId : 0,
status: row ? 2 : 1, replyAccountId: reply ? reply.createAccountId : row.createAccountId || '',
replyCommentId: reply ? reply.commentId : row ? row.commentId : '' status: row ? 2 : 1,
}).then(res => { replyCommentId: reply ? reply.commentId : row ? row.commentId : ''
this.comment = '' }).then(res => {
this.curReplyId = row ? row.commentId : '' this.comment = ''
this.getComment() this.curReplyId = row ? row.commentId : ''
}).catch(res => { }) this.getComment()
}).catch(res => { })
}
}, },
// //
like (row) { like (row) {
@ -825,21 +829,21 @@ export default {
}, },
// //
async queryProject () { async queryProject () {
if (this.mallId) { // if (this.mallId) {
try { try {
this.loading = true this.loading = true
const res = await this.$get(this.api.getProjectBySystemId, { const res = await this.$get(this.api.getProjectBySystemId, {
systemId: this.systemIds, systemId: this.systemIds,
cId: this.courseId, // id cId: this.courseId, // id
mallId: this.mallId, mallId: this.mallId,
permissions: 0 // 0: ,1: permissions: 0 // 0: ,1:
}) })
this.projects = res.projects // this.projects = res.projects //
this.papers = res.exercisePaperList // this.papers = res.exercisePaperList //
} finally { } finally {
this.loading = false this.loading = false
}
} }
// }
}, },
// //
entryProject (projectId = '', paperId = '') { entryProject (projectId = '', paperId = '') {

@ -1,12 +1,8 @@
<template> <template>
<div class="page" <div class="page" style="padding: 0">
style="padding: 0">
<div class="tabs"> <div class="tabs">
<a class="item" <a class="item" v-for="(item, index) in tabs" :key="index" :class="{ active: index == active }"
v-for="(item,index) in tabs" @click="tabChange(index)">{{ item }}</a>
:key="index"
:class="{active: index == active}"
@click="tabChange(index)">{{ item }}</a>
</div> </div>
<staff v-if="active == 'staff'"></staff> <staff v-if="active == 'staff'"></staff>
@ -62,5 +58,4 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

@ -116,11 +116,11 @@ export default {
.apps { .apps {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 40px 20px;
} }
.app { .app {
padding: 0 30px; padding: 0 30px;
margin: 0 20px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
} }

Loading…
Cancel
Save