考核、项目等课程改成产品

Branch_d40a2540
yujialong 1 year ago
parent 3ebf81ed6c
commit f0b9757e66
  1. 1
      src/layouts/header/index.vue
  2. 3
      src/pages/achievement/teach/index.vue
  3. 1204
      src/pages/assessment/add/index.vue
  4. 3
      src/pages/product/list/index.vue
  5. 7
      src/pages/product/show/index.vue
  6. 49
      src/pages/project/add/index.vue
  7. 92
      src/pages/project/list/index.vue
  8. 35
      src/pages/station/preview/index.vue
  9. 2
      src/setting.js
  10. 2
      src/styles/page/station.scss

@ -174,6 +174,7 @@ export default {
// //
async toComment (item) { async toComment (item) {
await this.$post(`${this.api.noticeRead}?isRead=1&notifyId=${item.notifyId}`) // await this.$post(`${this.api.noticeRead}?isRead=1&notifyId=${item.notifyId}`) //
this.getNotice()
this.$router.push(`/station/preview?courseId=${item.cid}&commentId=${item.commentId}&notifyId=${item.notifyId}`) this.$router.push(`/station/preview?courseId=${item.cid}&commentId=${item.commentId}&notifyId=${item.notifyId}`)
}, },
getUserDetail () { // getUserDetail () { //

@ -546,6 +546,7 @@ export default {
// //
errorChart () { errorChart () {
const data = this.errorAnalysis.scoringPointList const data = this.errorAnalysis.scoringPointList
const maxFontLength = data.length > 13 ? 6 : 10
const option = { const option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -580,7 +581,7 @@ export default {
color: '#333', color: '#333',
}, },
formatter: function (value, index) { formatter: function (value, index) {
value = value.substring(0, 10) + (value.length > 10 ? '...' : '') value = value.substring(0, maxFontLength) + (value.length > maxFontLength ? '...' : '')
// if (index % 2 != 0) { // if (index % 2 != 0) {
// return '\n\n' + value; // return '\n\n' + value;
// } else { // } else {

File diff suppressed because it is too large Load Diff

@ -9,6 +9,9 @@
<img :src="item.banner" <img :src="item.banner"
alt="" alt=""
:style="{height: carouselHeight}"> :style="{height: carouselHeight}">
<!-- <img src="https://huoran.oss-cn-shenzhen.aliyuncs.com/20230707/png/1677215781005844480.png"
alt=""
:style="{height: carouselHeight}"> -->
<p class="banner-name">{{ item.title }}</p> <p class="banner-name">{{ item.title }}</p>
</div> </div>
</el-carousel-item> </el-carousel-item>

@ -505,6 +505,13 @@ export default {
} }
.courses { .courses {
margin-top: 40px; margin-top: 40px;
/deep/.des {
div,
p,
span {
font-family: PingFangSC-Regular !important;
}
}
.chapters { .chapters {
margin-top: 16px; margin-top: 16px;
max-height: calc(100% - 53px); max-height: calc(100% - 53px);

@ -24,7 +24,16 @@
:disabled="isDetail"> :disabled="isDetail">
<div class="flex"> <div class="flex">
<el-form-item label="系统"> <el-form-item label="系统">
<el-select v-model="projectManage.systemId" <el-cascader v-if="projectManage.founder"
v-model="mallIds"
:options="curs"
:props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas"
@expand-change="curChange"
@change="curChange"></el-cascader>
<el-select v-else
v-model="projectManage.systemId"
placeholder="请选择" placeholder="请选择"
@change="systemChange"> @change="systemChange">
<el-option v-for="item in systemList" <el-option v-for="item in systemList"
@ -285,6 +294,8 @@ export default {
projectId: this.$route.query.projectId, projectId: this.$route.query.projectId,
founder: this.$route.query.founder, founder: this.$route.query.founder,
systemList: [], systemList: [],
mallIds: [],
curs: [],
token: btoa(util.local.get(Setting.tokenKey)), token: btoa(util.local.get(Setting.tokenKey)),
isDetail: Boolean(this.$route.query.show), isDetail: Boolean(this.$route.query.show),
@ -293,6 +304,7 @@ export default {
projectName: "", // projectName: "", //
permissions: 0, // (0 1 2) permissions: 0, // (0 1 2)
systemId: this.$store.state.project.lastSystemId, // id systemId: this.$store.state.project.lastSystemId, // id
mallId: '',
hintOpen: 0, // (0 1 0) hintOpen: 0, // (0 1 0)
experimentHint: "", // experimentHint: "", //
experimentTarget: "", // experimentTarget: "", //
@ -406,14 +418,14 @@ export default {
...mapActions("project", [ ...mapActions("project", [
"setSystemId", "setProject" "setSystemId", "setProject"
]), ]),
getSystemData () {
this.$get(this.api.getSystemIdBySchool).then(res => {
this.systemList = res.data;
});
},
getInfoData () { // getInfoData () { //
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
let { projectManage, projectJudgmentVos } = res; let { projectManage, projectJudgmentVos } = res;
const { mallId, systemId } = projectManage
if (mallId) {
this.mallIds = [mallId]
systemId && this.mallIds.push(systemId)
}
this.projectManage = projectManage; this.projectManage = projectManage;
this.originName = projectManage.projectName this.originName = projectManage.projectName
this.projectJudgmentData = projectJudgmentVos; this.projectJudgmentData = projectJudgmentVos;
@ -428,6 +440,31 @@ export default {
console.log(err); console.log(err);
}); });
}, },
//
async getSystemData () {
const { data } = await this.$get(this.api.getSystemIdBySchool)
this.systemList = data
const res = await this.$get(this.api.getSchoolEffectiveCourse)
if (res.data.length) {
res.data.map(e => {
e.id = e.mallId
e.label = e.curriculumName
e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) //
})
this.curs = res.data
console.log("🚀 ~ file: index.vue:431 ~ getSystemData ~ res.data:", res.data)
}
},
//
curChange (val) {
const id = val[0]
if (val.length === 1) {
//
this.mallIds = [id, this.curs.find(e => e.id == id).children[0].id]
}
this.projectManage.mallId = id
this.projectManage.systemId = this.mallIds[1]
},
projectNameExistis () { // projectNameExistis () { //
const { projectName } = this.projectManage const { projectName } = this.projectManage
if (this.originName === projectName) { if (this.originName === projectName) {

@ -200,11 +200,19 @@
width="24%" width="24%"
center center
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-form> <el-form label-width="70px">
<el-form-item> <el-form-item label="项目名称">
<!--前端不用做名称判重了@change='projectNameExistis'-->
<el-input placeholder="请输入项目名称" <el-input placeholder="请输入项目名称"
v-model="projectName"></el-input> v-model="copyForm.projectName"></el-input>
</el-form-item>
<el-form-item v-if="!curRow.projectManage.founder"
label="系统">
<el-cascader v-model="copyMallId"
:options="curs"
:props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas"
@expand-change="copySystemChange"
@change="copySystemChange"></el-cascader>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer"
@ -237,7 +245,8 @@ export default {
founder: +this.$route.query.founder || 2, // (0: 1: 2:) founder: +this.$route.query.founder || 2, // (0: 1: 2:)
state: "", // (0:稿 1:) state: "", // (0:稿 1:)
permissions: "", // (0: 1: 2:) permissions: "", // (0: 1: 2:)
cid: '' cid: '',
mallId: ''
}, },
keyword: "", keyword: "",
status: "", status: "",
@ -299,8 +308,14 @@ export default {
pageSize: 10, pageSize: 10,
multipleSelection: [], multipleSelection: [],
copyVisible: false, copyVisible: false,
projectName: "", copyForm: {
currentRow: {}, // projectName: '',
mallId: []
},
copyMallId: [],
curRow: {
projectManage: {}
}, //
listDataAll: [], listDataAll: [],
isFirst: true isFirst: true
}; };
@ -351,7 +366,7 @@ export default {
projectName: this.keyword, projectName: this.keyword,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
systemId: this.systemId systemId: this.systemId,
}; };
this.$post(this.api.queryProjectManage, data).then(res => { this.$post(this.api.queryProjectManage, data).then(res => {
this.isFirst = false this.isFirst = false
@ -371,12 +386,12 @@ export default {
getschoolCourse () { getschoolCourse () {
this.$get(this.api.getSchoolEffectiveCourse).then(({ data }) => { this.$get(this.api.getSchoolEffectiveCourse).then(({ data }) => {
this.curriculumList = data this.curriculumList = data
const { cid } = this.queryData const { mallId } = this.queryData
if (data.length) { if (data.length) {
this.cid = [cid || data[0].cid] this.cid = [mallId || data[0].mallId]
const all = this.systemListAll const all = this.systemListAll
data.map(e => { data.map(e => {
e.id = e.cid e.id = e.mallId
e.label = e.curriculumName e.label = e.curriculumName
e.children = all.filter(n => e.systemId.split(',').includes(n.id + '')) // e.children = all.filter(n => e.systemId.split(',').includes(n.id + '')) //
}) })
@ -387,12 +402,13 @@ export default {
}, },
// //
curChange (val) { curChange (val) {
const cid = val[0] const mallId = val[0]
if (val.length === 1) { if (val.length === 1) {
// //
this.cid = [cid, this.curs.find(e => e.id === cid).children[0].id] this.cid = [mallId, this.curs.find(e => e.id === mallId).children[0].id]
} }
this.queryData.cid = cid this.queryData.mallId = mallId
this.queryData.cid = this.curs.find(e => e.id === mallId).cid
this.systemId = this.cid[1] this.systemId = this.cid[1]
this.initData() this.initData()
}, },
@ -481,48 +497,44 @@ export default {
console.log(err); console.log(err);
}); });
}, },
projectNameExistis () { //
if (this.projectName) {
this.$post(this.api.queryNameIsExist, { projectName: this.projectName }).then(res => {
if (res.status === 200) {
this.projectNameRepeat = false;
}
}).catch(err => {
this.projectNameRepeat = true;
});
} else {
this.projectNameRepeat = false;
}
},
copyData (projectId) { // id copyData (projectId) { // id
this.copyVisible = true; this.copyVisible = true;
this.$get(`${this.api.getProjectDetail}?projectId=${projectId}`).then(res => { this.$get(`${this.api.getProjectDetail}?projectId=${projectId}`).then(res => {
this.projectName = res.projectManage.projectName; this.copyMallId = []
this.currentRow = { this.copyForm.projectName = res.projectManage.projectName;
projectManage: res.projectManage, this.curRow = {
projectJudgmentList: res.projectJudgmentVos projectManage: JSON.parse(JSON.stringify(res.projectManage)),
projectJudgmentList: JSON.parse(JSON.stringify(res.projectJudgmentVos))
}; };
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}); });
}, },
//
copySystemChange (val) {
this.copyForm.mallId = val[0]
},
copySubmit () { copySubmit () {
if (!this.projectName) { const form = this.copyForm
const row = this.curRow
const fromSystem = !row.projectManage.founder
if (!form.projectName) {
util.warningMsg("请输入项目名称"); util.warningMsg("请输入项目名称");
return; return;
} }
; //
if (this.projectNameRepeat) { if (fromSystem && !form.mallId) {
util.warningMsg("该项目名称已存在"); util.warningMsg("请选择系统");
return; return;
} }
this.currentRow.projectManage.projectName = this.projectName; row.projectManage.projectName = form.projectName
this.currentRow.projectManage.projectId = ""; if (fromSystem) row.projectManage.mallId = form.mallId
this.currentRow.projectManage.founder = 1 row.projectManage.projectId = "";
this.currentRow.projectJudgmentList.forEach(i => { row.projectManage.founder = 1
row.projectJudgmentList.forEach(i => {
i.projectId = ""; i.projectId = "";
}); });
this.$post(`${this.api.copyProjectManage}`, this.currentRow).then(res => { this.$post(`${this.api.copyProjectManage}`, row).then(res => {
this.initData(); this.initData();
util.successMsg("复制实验项目成功"); util.successMsg("复制实验项目成功");
this.copyVisible = false; this.copyVisible = false;

@ -151,7 +151,8 @@
<div class="tab-content"> <div class="tab-content">
<template v-if="active === 1"> <template v-if="active === 1">
<div class="page"> <div class="page">
<div v-html="briefIntroduction"></div> <div class="des"
v-html="briefIntroduction"></div>
</div> </div>
</template> </template>
<template v-if="active === 2"> <template v-if="active === 2">
@ -202,15 +203,13 @@
:key="i"> :key="i">
<p class="sign">{{ item.createTime }}</p> <p class="sign">{{ item.createTime }}</p>
<div class="ver"> <div class="ver">
<div> {{ item.noteName }}
{{ item.noteName }} <span class="action">
<span class="action"> <i class="el-icon-edit-outline"
<i class="el-icon-edit-outline" @click="editNote(item)"></i>
@click="editNote(item)"></i> <i class="el-icon-delete"
<i class="el-icon-delete" @click="delNote(item)"></i>
@click="delNote(item)"></i> </span>
</span>
</div>
</div> </div>
<div class="des" <div class="des"
v-html="item.noteContent"></div> v-html="item.noteContent"></div>
@ -251,7 +250,7 @@
<i class="icon el-icon-chat-dot-square" <i class="icon el-icon-chat-dot-square"
@click="showReplay(item)"></i> @click="showReplay(item)"></i>
<!-- 当前用户是管理员 || 该条评论是学生发的没有createRoleName即是学生 || 当前用户的account==该条评论的创建人accountId --> <!-- 当前用户是管理员 || 该条评论是学生发的没有createRoleName即是学生 || 当前用户的account==该条评论的创建人accountId -->
<i v-if="item.currentRoleName.includes('管理员') || !item.createRoleName || item.currentAccountId == item.createAccountId" <i v-if="(item.currentRoleName && item.currentRoleName.includes('管理员')) || !item.createRoleName || item.currentAccountId == item.createAccountId"
class="icon el-icon-delete" class="icon el-icon-delete"
@click="delComment(item)"></i> @click="delComment(item)"></i>
@ -305,7 +304,7 @@
<i class="icon el-icon-chat-dot-square" <i class="icon el-icon-chat-dot-square"
@click="showReplay(reply)"></i> @click="showReplay(reply)"></i>
<!-- 当前用户是管理员 || 该条评论是学生发的没有createRoleName即是学生 || 当前用户的account==该条评论的创建人accountId --> <!-- 当前用户是管理员 || 该条评论是学生发的没有createRoleName即是学生 || 当前用户的account==该条评论的创建人accountId -->
<i v-if="reply.currentRoleName.includes('管理员') || !reply.createRoleName || reply.currentAccountId == reply.createAccountId" <i v-if="(reply.currentRoleName && reply.currentRoleName.includes('管理员')) || !reply.createRoleName || reply.currentAccountId == reply.createAccountId"
class="icon el-icon-delete" class="icon el-icon-delete"
@click="delComment(reply)"></i> @click="delComment(reply)"></i>
<!-- <div class="like-wrap" <!-- <div class="like-wrap"
@ -570,7 +569,7 @@ export default {
// //
getStatus () { getStatus () {
this.$get(this.api.whetherToRenewTheFee, { this.$get(this.api.whetherToRenewTheFee, {
cid: this.courseId mallId: this.mallId
}).then(({ isRenew }) => { }).then(({ isRenew }) => {
// 10 // 10
this.overdue = isRenew this.overdue = isRenew
@ -972,7 +971,7 @@ export default {
// //
sessionStorage.removeItem('projectId') sessionStorage.removeItem('projectId')
sessionStorage.removeItem('submited') sessionStorage.removeItem('submited')
location.href = `${Setting.bankPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&test=true&manager=1` location.href = `${Setting.bankPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&mallId=${this.mallId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&test=true&manager=1`
} else if (systemId == 12) { } else if (systemId == 12) {
// //
window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${this.courseId}&projectId=${this.curProject}&token=${token}&userId=${this.userId}&classId=1`); window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${this.courseId}&projectId=${this.curProject}&token=${token}&userId=${this.userId}&classId=1`);
@ -999,6 +998,14 @@ $height: 700px;
color: #333; color: #333;
line-height: 24px; line-height: 24px;
} }
/deep/.des {
div,
p,
span {
font-family: PingFangSC-Regular !important;
}
}
} }
.video_wid, .video_wid,
.cover { .cover {

@ -26,7 +26,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/` uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服 host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服 // host = 'https://www.occupationlab.com/' // 正式服
// host = "http://192.168.31.152:9000/"; // 榕 host = "http://192.168.31.152:9000/"; // 榕
// host = 'http://192.168.31.51:9000/'; // 赓 // host = 'http://192.168.31.51:9000/'; // 赓
} }

@ -120,7 +120,7 @@
align-items: center; align-items: center;
padding-bottom: 10px; padding-bottom: 10px;
margin: -22px 0 20px; margin: -22px 0 20px;
font-size: 18px; font-size: 20px;
color: #9076ff; color: #9076ff;
border-bottom: 1px dashed #bfbfbf; border-bottom: 1px dashed #bfbfbf;
} }

Loading…
Cancel
Save