yujialong 4 weeks ago
parent 1b70f00dbc
commit 515fadb15d
  1. 13
      src/pages/product/show/index.vue
  2. 62
      src/pages/project/list/index.vue
  3. 26
      src/pages/station/preview/index.vue

@ -253,19 +253,6 @@ export default {
this.$router.push(`/station/preview?courseId=${this.form.mall.associatedProduct}&curriculumName=${this.form.mall.productName}&mallId=${this.id}&chapter=${i}&section=${j}&admin=1`) :
this.toTrail()
},
// /
studySection (item) {
item.whetherToStudyOrNot ?
this.$post(`${this.api.deleteLearningProgress}?id=${item.learningProgressId}`).then(res => {
this.getChapter()
}).catch(res => { }) :
this.$post(this.api.saveLearningProgress, {
cid: this.form.mall.associatedProduct,
projectId: item.projectId,
}).then(res => {
this.getChapter()
}).catch(res => { })
},
//
async toRenew () {
try {

@ -74,11 +74,12 @@
<!-- 老师 -->
<el-switch v-if="scope.row.founder" v-model="scope.row.hintOpen"
:active-text="scope.row.hintOpen ? '关闭' : '启用'" :active-value="0" :inactive-value="1"
style="margin: 0 10px 0 10px" @change="switchOffTips(scope.row, scope.row.hintOpen)"></el-switch>
style="margin: 0 10px 0 10px" :disabled="scope.row.type === 3"
@change="switchOffTips(scope.row, scope.row.hintOpen)"></el-switch>
<!-- 系统 -->
<el-switch v-else v-model="scope.row.hintOpenBySchool"
:active-text="scope.row.hintOpenBySchool ? '关闭' : '启用'" :active-value="0" :inactive-value="1"
style="margin: 0 10px 0 10px"
style="margin: 0 10px 0 10px" :disabled="scope.row.type === 3"
@change="switchOffTips(scope.row, scope.row.hintOpenBySchool)"></el-switch>
</template>
</template>
@ -88,14 +89,15 @@
<el-button type="text" @click="edit(scope.row, 1)">查看</el-button>
<el-button
v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))"
type="text" @click="edit(scope.row)">编辑</el-button>
type="text" :disabled="scope.row.type === 3" @click="edit(scope.row)">编辑</el-button>
<el-button
v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))"
type="text" @click="handleDelete(scope.row.projectId)">删除</el-button>
<el-button v-auth type="text" @click="copyData(scope.row.projectId)">复制</el-button>
type="text" :disabled="scope.row.type === 3" @click="handleDelete(scope.row.projectId)">删除</el-button>
<el-button v-auth type="text" :disabled="scope.row.type === 3"
@click="copyData(scope.row.projectId)">复制</el-button>
<el-switch v-auth="'禁用'" v-if="scope.row.state" v-model="scope.row.ccupationlabOpen"
:active-text="scope.row.ccupationlabOpen ? '关闭' : '启用'" :active-value="0" :inactive-value="1"
style="margin: 0 10px 0 10px" @change="switchOff(scope.row)"></el-switch>
:disabled="scope.row.type === 3" style="margin: 0 10px 0 10px" @change="switchOff(scope.row)"></el-switch>
</template>
</el-table-column>
</el-table>
@ -120,16 +122,28 @@
</span>
</el-dialog>
</div>
<el-drawer title="" :visible.sync="examVisible" size="100%" :close-on-click-modal="false" :withHeader="false"
custom-class="exam-dia" @closed="examClose">
<div>
<button type="button" class="el-drawer__close-btn" @click="examVisible = false">
<i class="el-dialog__close el-icon el-icon-close"></i>
</button>
</div>
<iframe :src="examUrl" frameborder="0" width="100%"></iframe>
</el-drawer>
</div>
</template>
<script>
import { mapState } from "vuex";
import Setting from "@/setting";
import util from "@/libs/util";
import qs from 'qs'
export default {
data () {
return {
token: util.local.get(Setting.tokenKey),
fromAss: Boolean(this.$route.query.show), //
lc: [11, 12, 19],
cid: [this.$route.query.mallId ? +this.$route.query.mallId : '', this.$route.query.cid ? +this.$route.query.cid : ''],
@ -218,6 +232,9 @@ export default {
projectManage: {}
}, //
listDataAll: [],
examVisible: false,
examUrl: '',
};
},
computed: {
@ -313,8 +330,23 @@ export default {
this.$router.push(`/project/add?founder=${this.form.founder}${this.fromAss ? '&ass=1' : ''}`);
},
edit (row, show) { //
this.setCache()
this.$router.push(`/project/add?projectId=${row.projectId}&founder=${this.form.founder}${show ? `&show=1` : ''}${this.fromAss ? '&ass=1' : ''}`);
if (row.type === 3) {
//
let url = `${location.origin}/examination/`
if (Setting.isDev) url = `http://192.168.31.125:8098/`
url += `#/testPaper/detail?token=${this.token}&v=${Date.now()}&paperId=${row.paperId}`
localStorage.setItem('exam_token', this.token)
this.examUrl = url
this.examVisible = true
} else {
//
this.setCache()
this.$router.push(`/project/add?projectId=${row.projectId}&founder=${this.form.founder}${show ? `&show=1` : ''}${this.fromAss ? '&ass=1' : ''}`)
}
},
//
examClose () {
this.examUrl = ''
},
handleSelectionChange (val) { //
this.multipleSelection = val;
@ -447,4 +479,16 @@ export default {
};
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
/deep/.exam-dia {
.el-drawer__close-btn {
position: absolute;
top: 20px;
right: 20px;
}
iframe {
height: 100%;
}
}
</style>

@ -52,7 +52,8 @@
<div class="catalog">
<div class="m-b-20">
<el-button v-if="!overdue" class="entry" type="primary" size="small" @click="showBuy">续费</el-button>
<el-button v-else class="entry" type="primary" @click="entry"> </el-button>
<el-button v-if="practiceTheoreticalPaper" class="entry" type="primary" @click="entry">进入理论</el-button>
<el-button v-if="practicePracticeProject" class="entry" type="primary" @click="entry">进入实训</el-button>
</div>
<div class="list">
<h4 class="title">{{ curriculumName || courseName }}</h4>
@ -259,7 +260,7 @@
<h6 class="title">练习成绩排行</h6>
<el-select style="width: 100%" v-model="archProject" placeholder="请选择" @change="getMaximumScore">
<el-option v-for="(item, i) in progressList" :key="i" :label="item.projectName"
:value="item.projectId"></el-option>
:value="item.uuid"></el-option>
</el-select>
<div v-if="maximumScores.length" class="arches">
<div v-for="(item, i) in maximumScores" :key="i" class="line">
@ -333,6 +334,8 @@ export default {
teachingObjectives: "", //
assessmentList: "", //
systemIds: '',
practicePracticeProject: 0,
practiceTheoreticalPaper: 0,
curLink: "", //
playAuth: "",
player: null,
@ -448,6 +451,8 @@ export default {
this.teachingObjectives = data.teachingObjectives;
this.assessmentList = data.assessmentConfig;
this.systemIds = data.systemIds
this.practicePracticeProject = data.practicePracticeProject
this.practiceTheoreticalPaper = data.practiceTheoreticalPaper
this.queryProject()
}
this.getStatus()
@ -484,8 +489,11 @@ export default {
async getProgress () {
if (this.courseId) {
let res = await this.$post(`${this.api.courseLearningProgress}?courseId=${this.courseId}&systemId=${this.systemIds}&mallId=${this.mallId}`);
res.list.forEach(e => {
e.uuid = e.projectId || e.paperId
})
this.progressList = res.list
if (res.list.length) this.archProject = res.list[0].projectId
if (res.list.length) this.archProject = res.list[0].uuid
this.maximumScores.length || this.getMaximumScore()
this.plan = res.plan
this.schedule = +(res.schedule.replace('%', ''))
@ -493,7 +501,8 @@ export default {
},
//
async getMaximumScore () {
let { message } = await this.$post(`${this.api.maximumPracticeScoreList}?projectId=${this.archProject}&pageNum=1&pageSize=1000&mallId=${this.mallId}&cid=${this.courseId}`);
const item = this.progressList.find(e => e.uuid === this.archProject)
let { message } = await this.$post(`${this.api.maximumPracticeScoreList}?projectId=${item.projectId || ''}&paperId=${item.paperId || ''}&pageNum=1&pageSize=1000&mallId=${this.mallId}&cid=${this.courseId}`);
const list = message.records
list.forEach(e => {
if (!e.userAvatars) e.userAvatars = 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
@ -681,7 +690,8 @@ export default {
}).catch(res => { }) :
this.$post(this.api.saveLearningProgress, {
cid: this.courseId,
projectId: item.projectId,
projectId: item.projectId || '',
paperId: item.paperId || '',
}).then(res => {
this.getProgress()
}).catch(res => { })
@ -996,9 +1006,13 @@ $height: 700px;
background-color: #252528;
.entry {
width: 100%;
width: 48%;
height: 40px;
font-size: 17px;
&:only-child {
width: 100%;
}
}
.types {

Loading…
Cancel
Save