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 }) {
// 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}`)
// socket
this.socket.onopen = this.open;
@ -163,7 +163,6 @@ export default {
},
getUserDetail () { //
this.$get(this.api.queryUserInfoDetails).then(res => {
this.initSocket(res.result.userAccount)
let { hrUserInfo } = res.result
if (hrUserInfo) {
const { userAvatars, userName, userId } = hrUserInfo
@ -172,6 +171,7 @@ export default {
console.log("🚀 ~ this.$get ~ userAvatars:", userName)
this.setUserName(userName)
}
this.initSocket(res.result.userAccount)
}).catch(res => { })
},
userCommand (command) { //

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

@ -155,7 +155,7 @@ export default {
if (row.systemId == 19) {
location.href = `${Setting.sandPath}/#/config?token=${this.token}&referrer=${encodeURIComponent(location.href)}`
} 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
} else {
this.$message.warning('请选择小节!')
this.$message.warning('请选择资源!')
}
},
//

@ -20,7 +20,7 @@
@click="course.shrink = !course.shrink"></i>
<el-checkbox class="check" v-model="course.check" @change="checkCourse(course)"></el-checkbox>
<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 v-if="course.shrink" class="chapters">
<!-- 章节 -->

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

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

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

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

Loading…
Cancel
Save