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

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. 204
      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. 21
      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 {

@ -1,76 +1,92 @@
<template> <template>
<div> <div>
<el-form :disabled="isDetail"> <el-form :disabled="isDetail">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="goBack" :content="isDetail ? '查看' : (form.id ? '更新' : '创建') + '教学实验'"></el-page-header> <el-page-header @back="goBack"
:content="isDetail ? '查看' : (form.id ? '更新' : '创建') + '教学实验'"></el-page-header>
<div> <div>
<el-button type="primary" @click="save(0)" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button> <el-button type="primary"
@click="save(0)"
v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgr20 m-b-20"> <el-card shadow="hover"
class="mgr20 m-b-20">
<div> <div>
<p class="m-b-20">考核名称</p> <p class="m-b-20">考核名称</p>
<el-input <el-input placeholder="请输入考核名称"
placeholder="请输入考核名称"
v-model.trim="form.experimentalName" v-model.trim="form.experimentalName"
clearable clearable
maxlength="15" maxlength="15"
class="inline-input" class="inline-input"></el-input>
></el-input>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
class="m-b-20">
<div> <div>
<p class="m-b-20">发布方式</p> <p class="m-b-20">发布方式</p>
<el-radio-group v-model="form.type" :disabled="form.id ? true : false"> <el-radio-group v-model="form.type"
:disabled="form.id ? true : false">
<el-radio :label="1">手动发布</el-radio> <el-radio :label="1">手动发布</el-radio>
<el-radio :label="2">定时发布</el-radio> <el-radio :label="2">定时发布</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</el-card> </el-card>
<!-- 根据发布方式判断时间的显示 --> <!-- 根据发布方式判断时间的显示 -->
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
class="m-b-20">
<div> <div>
<p class="m-b-20">实验时间</p> <p class="m-b-20">实验时间</p>
<!-- 手动发布显示 --> <!-- 手动发布显示 -->
<div class="date-inputs" v-if="form.type==1"> <div class="date-inputs"
v-if="form.type==1">
实验时长 实验时长
<el-input type="number" min="0" v-model.trim="duration.day" placeholder></el-input> <el-input type="number"
min="0"
v-model.trim="duration.day"
placeholder></el-input>
<el-input type="number" min="0" v-model.trim="duration.hour" placeholder></el-input> <el-input type="number"
min="0"
v-model.trim="duration.hour"
placeholder></el-input>
小时 小时
<el-input type="number" min="0" v-model.trim="duration.minute" placeholder></el-input> <el-input type="number"
min="0"
v-model.trim="duration.minute"
placeholder></el-input>
</div> </div>
<!-- 定时发布显示 --> <!-- 定时发布显示 -->
<div v-if="form.type==2" class="addAssess"> <div v-if="form.type==2"
class="addAssess">
<span class="mgr10">开始时间:</span> <span class="mgr10">开始时间:</span>
<el-date-picker <el-date-picker size="small"
size="small"
v-model="date" v-model="date"
type="datetimerange" type="datetimerange"
range-separator="-" range-separator="-"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
:picker-options="pickerOptions" :picker-options="pickerOptions"></el-date-picker>
></el-date-picker>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgr20 m-b-20"> <el-card shadow="hover"
class="mgr20 m-b-20">
<div> <div>
<p class="m-b-20">课程</p> <p class="m-b-20">课程</p>
<div class="inline-input"> <div class="inline-input">
<el-select v-model="form.curriculumId" @change="initData"> <el-select v-model="form.mallId"
<el-option @change="initData">
v-for="item in curriculumList" <el-option v-for="item in curriculumList"
:key="item.cid" :key="item.mallId"
:label="item.curriculumName" :label="item.curriculumName"
:value="item.cid"> :value="item.mallId">
</el-option> </el-option>
</el-select> </el-select>
<!-- <el-select v-model="form.curriculumId" @change="initData"> <!-- <el-select v-model="form.curriculumId" @change="initData">
@ -85,54 +101,76 @@
</div> </div>
</el-card> </el-card>
<!-- 实训项目模块 --> <!-- 实训项目模块 -->
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
class="m-b-20">
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<span>实训项目</span> <span>实训项目</span>
<div style="display: inline-flex;"> <div style="display: inline-flex;">
<div> <div>
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> <el-input placeholder="请输入项目名称"
prefix-icon="el-icon-search"
v-model.trim="keyword"
clearable></el-input>
</div> </div>
<el-button style="margin-left: 5px" type="primary" round @click="toProject">自定义实验项目</el-button> <el-button style="margin-left: 5px"
type="primary"
round
@click="toProject">自定义实验项目</el-button>
</div> </div>
</div> </div>
<!-- 实训项目表格 --> <!-- 实训项目表格 -->
<el-table :data="projectData" class="table" stripe header-align="center"> <el-table :data="projectData"
class="table"
stripe
header-align="center">
<!-- 单选实训项目ID --> <!-- 单选实训项目ID -->
<el-table-column width="60" label="选择" align="center"> <el-table-column width="60"
label="选择"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="form.projectId" :label="scope.row.projectId">&nbsp;</el-radio> <el-radio v-model="form.projectId"
:label="scope.row.projectId">&nbsp;</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="projectName"
<el-table-column prop="auth" label="项目权限" align="center"> label="项目名称"
align="center"></el-table-column>
<el-table-column prop="auth"
label="项目权限"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }} {{ permissionsKeys[scope.row.permissions] }}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="createUser" label="创建人" align="center"></el-table-column> --> <!-- <el-table-column prop="createUser" label="创建人" align="center"></el-table-column> -->
<el-table-column prop="founder" label="创建人" align="center"> <el-table-column prop="founder"
label="创建人"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.createUser }} {{ scope.row.createUser }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="createTime"
<el-table-column label="操作" align="center"> label="创建时间"
align="center"></el-table-column>
<el-table-column label="操作"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showProject(scope.row)">查看</el-button> <el-button type="text"
@click="showProject(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination background
background
:page-size="pageSize" :page-size="pageSize"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="total" :total="total"></el-pagination>
></el-pagination>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgr20 m-b-20"> <el-card shadow="hover"
class="mgr20 m-b-20">
<div> <div>
<p class="m-b-20">考核发布</p> <p class="m-b-20">考核发布</p>
<el-radio-group v-model="form.isSpecify"> <el-radio-group v-model="form.isSpecify">
@ -140,18 +178,19 @@
<el-radio :label="0">无指定范围</el-radio> <el-radio :label="0">无指定范围</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div v-show="form.isSpecify == 1" style="padding-top: 24px;"> <div v-show="form.isSpecify == 1"
style="padding-top: 24px;">
<p class="m-b-20">班级名称</p> <p class="m-b-20">班级名称</p>
<el-input <el-input placeholder="请输入班级名称"
placeholder="请输入班级名称"
v-model.trim="filterClassName" v-model.trim="filterClassName"
class="inline-input m-b-20" class="inline-input m-b-20"
clearable> clearable>
<el-button slot="append" icon="el-icon-search"></el-button> <el-button slot="append"
icon="el-icon-search"></el-button>
</el-input> </el-input>
<div v-show="tagList.length" class="m-b-20"> <div v-show="tagList.length"
<el-tag class="m-b-20">
v-for="(tag, index) in tagList" <el-tag v-for="(tag, index) in tagList"
:key="index" :key="index"
closable closable
@close="handleCloseTag(tag)" @close="handleCloseTag(tag)"
@ -160,8 +199,7 @@
</el-tag> </el-tag>
</div> </div>
<div class="tree-con"> <div class="tree-con">
<student-tree <student-tree ref="tree"
ref="tree"
node-key="id" node-key="id"
show-checkbox show-checkbox
highlight-current highlight-current
@ -177,7 +215,9 @@
</div> </div>
</el-card> </el-card>
<!-- 邀请码 --> <!-- 邀请码 -->
<el-card v-if="form.isSpecify == 0" shadow="hover" class="m-b-20"> <el-card v-if="form.isSpecify == 0"
shadow="hover"
class="m-b-20">
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<p class="m-b-20">设置邀请码</p> <p class="m-b-20">设置邀请码</p>
<el-radio-group v-model="form.isEnableCode"> <el-radio-group v-model="form.isEnableCode">
@ -186,8 +226,13 @@
</el-radio-group> </el-radio-group>
</div> </div>
<div v-if="form.isEnableCode == 1"> <div v-if="form.isEnableCode == 1">
<el-input style="display: inline-block;width: auto;margin-right: 10px" type="number" v-model.trim="form.invitationCode" maxlength="6" placeholder="请设置6个数字"></el-input> <el-input style="display: inline-block;width: auto;margin-right: 10px"
<el-button type="text" @click="createInv">随机</el-button> type="number"
v-model.trim="form.invitationCode"
maxlength="6"
placeholder="请设置6个数字"></el-input>
<el-button type="text"
@click="createInv">随机</el-button>
</div> </div>
</el-card> </el-card>
</el-form> </el-form>
@ -218,6 +263,7 @@ export default {
type: 1, // (1 2) type: 1, // (1 2)
experimentDuration: "0d0h0m", experimentDuration: "0d0h0m",
curriculumId: "", curriculumId: "",
mallId: '',
projectId: "", projectId: "",
isSpecify: 1, // (1 0) isSpecify: 1, // (1 0)
isEnableCode: 0, // isEnableCode: 0, //
@ -397,48 +443,33 @@ export default {
} }
}, },
getschoolCourse () { // getschoolCourse () { //
this.$get(this.api.getSchoolEffectiveCourse).then(res => { this.$get(this.api.getSchoolEffectiveCourse).then(({ data }) => {
this.curriculumList = res.data; this.curriculumList = data;
if (this.curriculumList.length) { if (this.curriculumList.length) {
if (this.form.curriculumId){ if (!this.form.mallId) this.form.mallId = data[0].mallId
for(let i=0;i<this.curriculumList.length; i++) { this.getProjectData()
if(this.curriculumList[i].cid == this.form.curriculumId){
this.getProjectData();
}
}
}else{
this.form.curriculumId = this.curriculumList[0].cid;
for(let i=0;i<this.curriculumList.length; i++) {
this.cidList.push(this.curriculumList[i].cid)
}
this.getProjectData();
}
} }
this.$nextTick(() => { this.$nextTick(() => {
this.updateTime = 0 this.updateTime = 0
}) })
}).catch(err => { }).catch(err => { });
console.log(err);
});
}, },
getProjectData () { getProjectData () {
const curItem = this.curriculumList.find(e => e.cid === this.form.curriculumId) const curItem = this.curriculumList.find(e => e.mallId === this.form.mallId)
console.log("🚀 ~ file: index.vue:471 ~ getProjectData ~ curItem:", curItem)
let data = { let data = {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
cid:this.form.curriculumId, cid: curItem.cid,
projectName: this.keyword, projectName: this.keyword,
systemId: curItem ? curItem.systemId : 1, systemId: curItem ? curItem.systemId : 1,
permissions: 1 permissions: 1,
mallId: this.form.mallId
} }
this.$post(this.api.projectListByCourseId,data).then(res => { this.$post(this.api.projectListByCourseId, data).then(({ data }) => {
let { status, data } = res;
if (status === 200 && data.records) {
this.projectData = data.records this.projectData = data.records
this.total = data.total this.total = data.total
} }).catch(err => { })
}).catch(err => {
});
}, },
handlePage () { handlePage () {
let result = this.projectDataAll.slice((this.page - 1) * this.pageSize, this.page * this.pageSize); let result = this.projectDataAll.slice((this.page - 1) * this.pageSize, this.page * this.pageSize);
@ -496,6 +527,9 @@ export default {
this.form.classId = classId.toString(); this.form.classId = classId.toString();
this.form.stuInfo = stuInfo; this.form.stuInfo = stuInfo;
} }
const curItem = this.curriculumList.find(e => e.mallId === this.form.mallId)
this.form.curriculumId = curItem.cid
this.submiting = true this.submiting = true
if (this.form.id) { if (this.form.id) {
this.$post(this.api.modifyAssessment, this.form).then(res => { this.$post(this.api.modifyAssessment, this.form).then(res => {
@ -621,7 +655,7 @@ export default {
height: 400px; height: 400px;
max-height: 400px; max-height: 400px;
width: 100%; width: 100%;
border: 1px solid #DCDFE6; border: 1px solid #dcdfe6;
border-radius: 4px; border-radius: 4px;
padding: 10px 10px 10px 40px; padding: 10px 10px 10px 40px;
overflow: auto; overflow: auto;
@ -630,7 +664,7 @@ export default {
.el-tree-node__expand-icon { .el-tree-node__expand-icon {
padding: 2px; padding: 2px;
color: #fff; color: #fff;
background-color: #9278FF; background-color: #9278ff;
border-radius: 30px; border-radius: 30px;
margin: 0 10px; margin: 0 10px;
} }
@ -643,7 +677,7 @@ export default {
.el-checkbox__inner { .el-checkbox__inner {
width: 18px; width: 18px;
height: 18px; height: 18px;
border: 1px solid #9278FF; border: 1px solid #9278ff;
border-radius: 20px; border-radius: 20px;
} }
.el-checkbox__inner::after { .el-checkbox__inner::after {

@ -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,7 +203,6 @@
: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"
@ -211,7 +211,6 @@
@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>
</el-timeline-item> </el-timeline-item>
@ -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