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

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) {
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}`)
},
getUserDetail () { //

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

File diff suppressed because it is too large Load Diff

@ -9,6 +9,9 @@
<img :src="item.banner"
alt=""
: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>
</div>
</el-carousel-item>

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

@ -24,7 +24,16 @@
:disabled="isDetail">
<div class="flex">
<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="请选择"
@change="systemChange">
<el-option v-for="item in systemList"
@ -285,6 +294,8 @@ export default {
projectId: this.$route.query.projectId,
founder: this.$route.query.founder,
systemList: [],
mallIds: [],
curs: [],
token: btoa(util.local.get(Setting.tokenKey)),
isDetail: Boolean(this.$route.query.show),
@ -293,6 +304,7 @@ export default {
projectName: "", //
permissions: 0, // (0 1 2)
systemId: this.$store.state.project.lastSystemId, // id
mallId: '',
hintOpen: 0, // (0 1 0)
experimentHint: "", //
experimentTarget: "", //
@ -406,14 +418,14 @@ export default {
...mapActions("project", [
"setSystemId", "setProject"
]),
getSystemData () {
this.$get(this.api.getSystemIdBySchool).then(res => {
this.systemList = res.data;
});
},
getInfoData () { //
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
let { projectManage, projectJudgmentVos } = res;
const { mallId, systemId } = projectManage
if (mallId) {
this.mallIds = [mallId]
systemId && this.mallIds.push(systemId)
}
this.projectManage = projectManage;
this.originName = projectManage.projectName
this.projectJudgmentData = projectJudgmentVos;
@ -428,6 +440,31 @@ export default {
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 () { //
const { projectName } = this.projectManage
if (this.originName === projectName) {

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

@ -151,7 +151,8 @@
<div class="tab-content">
<template v-if="active === 1">
<div class="page">
<div v-html="briefIntroduction"></div>
<div class="des"
v-html="briefIntroduction"></div>
</div>
</template>
<template v-if="active === 2">
@ -202,15 +203,13 @@
:key="i">
<p class="sign">{{ item.createTime }}</p>
<div class="ver">
<div>
{{ item.noteName }}
<span class="action">
<i class="el-icon-edit-outline"
@click="editNote(item)"></i>
<i class="el-icon-delete"
@click="delNote(item)"></i>
</span>
</div>
{{ item.noteName }}
<span class="action">
<i class="el-icon-edit-outline"
@click="editNote(item)"></i>
<i class="el-icon-delete"
@click="delNote(item)"></i>
</span>
</div>
<div class="des"
v-html="item.noteContent"></div>
@ -251,7 +250,7 @@
<i class="icon el-icon-chat-dot-square"
@click="showReplay(item)"></i>
<!-- 当前用户是管理员 || 该条评论是学生发的没有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"
@click="delComment(item)"></i>
@ -305,7 +304,7 @@
<i class="icon el-icon-chat-dot-square"
@click="showReplay(reply)"></i>
<!-- 当前用户是管理员 || 该条评论是学生发的没有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"
@click="delComment(reply)"></i>
<!-- <div class="like-wrap"
@ -570,7 +569,7 @@ export default {
//
getStatus () {
this.$get(this.api.whetherToRenewTheFee, {
cid: this.courseId
mallId: this.mallId
}).then(({ isRenew }) => {
// 10
this.overdue = isRenew
@ -972,7 +971,7 @@ export default {
//
sessionStorage.removeItem('projectId')
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) {
//
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;
line-height: 24px;
}
/deep/.des {
div,
p,
span {
font-family: PingFangSC-Regular !important;
}
}
}
.video_wid,
.cover {

@ -26,7 +26,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服
// 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/'; // 赓
}

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

Loading…
Cancel
Save