竞拍明细;课程审核;课程内容仅查看

master
axlrose2333 2 years ago
parent 2382fc3f9e
commit f2825083ee

@ -79,5 +79,12 @@ const api = {
data
})
},
viewAutionDetail: data => { // 竞拍明细
return service({
url: '/auction/record',
method: 'get',
params:data
})
},
}
export default api

@ -256,6 +256,26 @@ async function auctionStateFunc(row,type) { //竞拍上架 下架
},
})
}
//
const viewParams = ref({
id:0,
type:1,
current_page:1,
page_size:10,
sort:'desc'
})
const dialogViewVisible = ref(false)
const viewInfo = ref({})
const view_total = ref(0)
async function viewAuctionFunc(row) { //
viewParams.value.id = row.id
dialogViewVisible.value = true
const res = await api.viewAutionDetail(viewParams.value)
if(res.code === 0) {
view_total.value = res.data.total
viewInfo.value = res.data.list
}
}
</script>
<template>
<div>
@ -298,7 +318,7 @@ async function auctionStateFunc(row,type) { //竞拍上架 下架
</el-popover>
</div>
<!-- 数据列表-->
<el-table :data="tableData" @selection-change="handleSelectionChange">
<el-table :data="tableData" border @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
@ -339,6 +359,13 @@ async function auctionStateFunc(row,type) { //竞拍上架 下架
link
@click="editAuctionFunc(scope.row)"
>编辑</el-button>
<el-button
icon="view"
size="small"
type="primary"
link
@click="viewAuctionFunc(scope.row)"
>明细</el-button>
<el-button
icon="delete"
size="small"
@ -455,6 +482,32 @@ async function auctionStateFunc(row,type) { //竞拍上架 下架
</div>
</template>
</el-drawer>
<!-- 查看明细窗口-->
<el-dialog v-model="dialogViewVisible" :before-close="closeViewDialog" title="竞拍明细">
<el-table :data="viewInfo" border >
<el-table-column align="center" label="ID" prop="id" />
<el-table-column align="center" label="用户名称" prop="name" />
<el-table-column align="center" label="投注积分" prop="point" />
<el-table-column align="center" label="是否中标" prop="status" />
<el-table-column align="center" label="参与时间" prop="CreatedAt" />
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="viewParams.current_page"
:page-size="viewParams.pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="view_total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeViewDialog"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<style scoped lang="scss">

@ -179,9 +179,7 @@ function beforeAvatarUpload(file) {
}
return !isJPG && isLt05M
}
function onSubmit() {
router.push({name:'courseManage'})
}
function handlerChange(e) {
// console.log(e)
isChange.value = true
@ -205,6 +203,36 @@ function checkFreeTestFromPrice() { // 检查免费试卷分数是否合理
}
return flag
}
//
const verifyVisible = ref(false)
const verifyForm = ref({})
function checkCourseFunc() { //
// console.log(form.value)
if(form.value.status === 2 || form.value.status === 4 ) { //
verifyForm.value.is_pass = -1
}
else{
verifyForm.value.is_pass = 1
}
verifyForm.is_pass = form.value.status
verifyVisible.value = true
}
function transferStateFromVerify(v_state) {
let state = 0
if(v_state === 1) { //
state = form.value.status
}
else{ //
state = 4
}
return state
}
function closeVerifyVisibleDialog() {
verifyVisible.value = false
}
async function enterVerifyDialog() { //
const status = transferStateFromVerify(verifyForm.value.is_pass)
}
</script>
<template>
<div>
@ -218,7 +246,7 @@ function checkFreeTestFromPrice() { // 检查免费试卷分数是否合理
<!-- 表单区域-->
<div class="gva-table-box">
<!-- step1-->
<el-form ref="ruleFormRef" v-if="active == 0" :model="form" :rules="rules" label-width="120px" style="width: 50%">
<el-form ref="ruleFormRef" disabled="true" v-if="active == 0" :model="form" :rules="rules" label-width="120px" style="width: 50%">
<el-form-item label="课程名称" prop="name">
<el-input placeholder="请输入课程名称" v-model="form.name" @change="handlerChange" />
</el-form-item>
@ -288,9 +316,23 @@ function checkFreeTestFromPrice() { // 检查免费试卷分数是否合理
<div class="btn-box" style="text-align: right">
<el-button v-if="active>0" @click="stepChangeFunc(1)"></el-button>
<el-button v-if="active<1" type="primary" @click="stepChangeFunc(2)"></el-button>
<el-button v-else type="primary" @click="onSubmit"></el-button>
<el-button v-else type="primary" @click="checkCourseFunc"></el-button>
</div>
</div>
<!-- 审核窗口-->
<el-dialog v-model="verifyVisible" :before-close="closeVerifyVisibleDialog" title="审核课程">
<el-form :model="verifyForm" label-width="80px">
<el-form-item label="是否通过" prop="is_free">
<el-switch v-model="verifyForm.is_pass" active-text="" inactive-text="" :active-value="1" :inactive-value="1" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeVerifyVisibleDialog"> </el-button>
<el-button size="small" type="primary" @click="enterVerifyDialog"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<style scoped>

@ -109,6 +109,7 @@ async function enterChapterDialog() { // 提交大章节
let func_name = ''
if(chapterForm.value.course_chapter_id) { //
func_name = 'editChapter'
params.course_id = parseInt(props.course_id)
}
else{ //
func_name = 'addChapter'
@ -182,36 +183,36 @@ function addExamFunc(data) {
<template>
<div>
<div class="btn-box" style="text-align: right;margin: 10px 0 20px;">
<el-button type="primary" icon="plus" @click="addChapterFunc"></el-button>
<!-- <el-button type="primary" icon="plus" @click="addChapterFunc"></el-button>-->
</div>
<div class="list-box">
<div class="lb-card" v-for="(item,i) in chapter_data">
<!--大章节标题-->
<div class="lb-title-part">
<div class="lbt-title">{{item.name}}</div>
<div class="lbt-btn-box">
<el-button
icon="edit"
size="small"
type="primary"
link
@click="editChapterFunc(item)"
/>
<el-button
icon="plus"
size="small"
type="primary"
link
@click="addChapterchildFunc(item)"
/>
<el-button
icon="delete"
size="small"
type="primary"
link
@click="deleteChapterFunc(item)"
/>
</div>
<!-- <div class="lbt-btn-box">-->
<!-- <el-button-->
<!-- icon="edit"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- link-->
<!-- @click="editChapterFunc(item)"-->
<!-- />-->
<!-- <el-button-->
<!-- icon="plus"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- link-->
<!-- @click="addChapterchildFunc(item)"-->
<!-- />-->
<!-- <el-button-->
<!-- icon="delete"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- link-->
<!-- @click="deleteChapterFunc(item)"-->
<!-- />-->
<!-- </div>-->
</div>
<!--表格数据-->
<div class="lb-table-part" style="margin-bottom: 20px">
@ -240,24 +241,24 @@ function addExamFunc(data) {
{{scope.row.is_show === 1? '是':'否'}}
</template>
</el-table-column>
<el-table-column align="left" label="操作" min-width="60">
<template #default="scope">
<el-button
icon="edit"
size="small"
type="primary"
link
@click="editChapterChildFunc(scope.row)"
>编辑</el-button>
<el-button
icon="delete"
size="small"
type="primary"
link
@click="deleteChapterChildFunc(scope.row)"
>删除</el-button>
</template>
</el-table-column>
<!-- <el-table-column align="left" label="操作" min-width="60">-->
<!-- <template #default="scope">-->
<!-- <el-button-->
<!-- icon="edit"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- link-->
<!-- @click="editChapterChildFunc(scope.row)"-->
<!-- >编辑</el-button>-->
<!-- <el-button-->
<!-- icon="delete"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- link-->
<!-- @click="deleteChapterChildFunc(scope.row)"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
@ -275,9 +276,9 @@ function addExamFunc(data) {
<el-form-item label="是否免费" prop="is_free">
<el-switch v-model="chapterForm.is_free" active-text="" inactive-text="" :active-value="1" :inactive-value="-1" />
</el-form-item>
<el-form-item label="是否展示" prop="is_show">
<el-switch v-model="chapterForm.is_show" active-text="" inactive-text="" :active-value="1" :inactive-value="-1" />
</el-form-item>
<!-- <el-form-item label="是否展示" prop="is_show">-->
<!-- <el-switch v-model="chapterForm.is_show" active-text="" inactive-text="" :active-value="1" :inactive-value="-1" />-->
<!-- </el-form-item>-->
</el-form>
<template #footer>
<div class="dialog-footer">
@ -314,9 +315,9 @@ function addExamFunc(data) {
<el-form-item label="是否免费" prop="is_free">
<el-switch v-model="chapterChildForm.is_free" active-text="" inactive-text="" :active-value="1" :inactive-value="-1" />
</el-form-item>
<el-form-item label="是否展示" prop="is_show">
<el-switch v-model="chapterChildForm.is_show" active-text="" inactive-text="" :active-value="1" :inactive-value="-1" />
</el-form-item>
<!-- <el-form-item label="是否展示" prop="is_show">-->
<!-- <el-switch v-model="chapterChildForm.is_show" active-text="" inactive-text="" :active-value="1" :inactive-value="-1" />-->
<!-- </el-form-item>-->
</el-form>
<template #footer>
<div class="dialog-footer">

@ -141,6 +141,38 @@ function enterDialog() {
function viewCourseFunc(row) { //
router.push({name:'viewCourse',params:{course_id:row.course_id}})
}
//
//
const verifyVisible = ref(false)
const verifyForm = ref({})
const verifyCourse = ref(null)
function checkCourseFunc(row) { //
// console.log(row)
if(row.status == 2 || row.status == 4 ) { //
verifyForm.value.is_pass = -1
}
else{
verifyForm.value.is_pass = 1
}
verifyForm.is_pass = row.status
verifyVisible.value = true
}
function transferStateFromVerify(v_state) {
let state = 0
if(v_state == 1) { //
state = verifyCourse.value.status
}
else{ //
state = 4
}
return state
}
function closeVerifyVisibleDialog() {
verifyVisible.value = false
}
async function enterVerifyDialog() { //
const status = transferStateFromVerify(verifyForm.value.is_pass)
}
</script>
<template>
<div>
@ -170,28 +202,28 @@ function viewCourseFunc(row) { // 查看课程
<div class="gva-table-box">
<!-- 批量操作-->
<div class="gva-btn-list">
<el-button size="small" type="primary" icon="plus" @click="openDialog('add')"></el-button>
<el-popover v-model="deleteVisible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin-top: 8px;">
<el-button size="small" type="primary" link @click="deleteVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="onDelete"></el-button>
</div>
<template #reference>
<el-button icon="delete" size="small" type="danger" :disabled="!course_ids.length" style="margin-left: 10px;" @click="deleteVisible = true">删除</el-button>
</template>
</el-popover>
<!-- <el-button size="small" type="primary" icon="plus" @click="openDialog('add')"></el-button>-->
<!-- <el-popover v-model="deleteVisible" placement="top" width="160">-->
<!-- <p>确定要删除吗</p>-->
<!-- <div style="text-align: right; margin-top: 8px;">-->
<!-- <el-button size="small" type="primary" link @click="deleteVisible = false">取消</el-button>-->
<!-- <el-button size="small" type="primary" @click="onDelete"></el-button>-->
<!-- </div>-->
<!-- <template #reference>-->
<!-- <el-button icon="delete" size="small" type="danger" :disabled="!course_ids.length" style="margin-left: 10px;" @click="deleteVisible = true">删除</el-button>-->
<!-- </template>-->
<!-- </el-popover>-->
</div>
<!-- 数据列表-->
<el-table :data="tableData" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
/>
<el-table :data="tableData" border @selection-change="handleSelectionChange">
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- width="55"-->
<!-- />-->
<el-table-column align="left" label="id" min-width="60" prop="course_id" sortable="custom" />
<el-table-column align="left" label="名称" min-width="150" prop="name" />
<el-table-column align="left" label="科目" min-width="150" prop="subject" />
<el-table-column align="left" label="价格" min-width="150" prop="price">
<el-table-column align="left" label="价格" min-width="150">
<template #default="scope">{{scope.row.price/100}}</template>
</el-table-column>
<el-table-column align="left" label="状态" min-width="150" prop="status">
@ -199,7 +231,11 @@ function viewCourseFunc(row) { // 查看课程
{{scope.row.status == 1?'上架':scope.row.status == 2?'待审核':scope.row.status == 3?'通过':scope.row.status == 4?'未通过':'下架'}}
</template>
</el-table-column>
<el-table-column align="left" label="是否精品" min-width="150" prop="is_boutique" />
<el-table-column align="left" label="是否精品" min-width="150" prop="is_boutique">
<template #default="scope">
{{scope.row.is_sift === 1? '是':'否'}}
</template>
</el-table-column>
<el-table-column align="left" fixed="right" label="操作" width="200">
<template #default="scope">
<el-button
@ -208,21 +244,28 @@ function viewCourseFunc(row) { // 查看课程
type="primary"
link
@click="viewCourseFunc(scope.row)"
>查看</el-button>
>预览</el-button>
<el-button
icon="edit"
size="small"
type="primary"
link
@click="editCourseFunc(scope.row)"
>编辑</el-button>
>查看</el-button>
<el-button
icon="delete"
icon="check"
size="small"
type="danger"
type="primary"
link
@click="deleteCourseFunc(scope.row)"
>删除</el-button>
@click="checkCourseFunc(scope.row)"
>审核</el-button>
<!-- <el-button-->
<!-- icon="delete"-->
<!-- size="small"-->
<!-- type="danger"-->
<!-- link-->
<!-- @click="deleteCourseFunc(scope.row)"-->
<!-- >删除</el-button>-->
</template>
</el-table-column>
</el-table>
@ -256,6 +299,20 @@ function viewCourseFunc(row) { // 查看课程
</div>
</template>
</el-dialog>
<!-- 审核窗口-->
<el-dialog v-model="verifyVisible" :before-close="closeVerifyVisibleDialog" title="审核课程">
<el-form :model="verifyForm" label-width="80px">
<el-form-item label="是否通过" prop="is_free">
<el-switch v-model="verifyForm.is_pass" active-text="" inactive-text="" :active-value="1" :inactive-value="-1" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeVerifyVisibleDialog"> </el-button>
<el-button size="small" type="primary" @click="enterVerifyDialog"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<style scoped lang="scss">

@ -26,7 +26,6 @@ async function getCourse() { // 获取课程信息
}
function downloadChapterChildFunc(item) { //
// console.log(item)
window.open(row.url)
}
</script>
@ -79,17 +78,17 @@ function downloadChapterChildFunc(item) { // 点击下载
</div>
<!--表格数据-->
<div class="lb-table-part" style="margin-bottom: 20px">
<el-table :data="item.children" >
<el-table :data="item.course_sub" border >
<el-table-column align="left" label="id" width="60" prop="id" />
<el-table-column align="left" label="子章节名称" min-width="60" prop="name" />
<el-table-column align="left" label="课件名称" min-width="60">
<template #default="scope">
{{scope.row.url_name === ''?'未上传课件':scope.row.url_name}}
{{scope.row.url === ''?'未上传课件':scope.row.url}}
</template>
</el-table-column>
<el-table-column align="left" label="章节习题" min-width="60" prop="is_contain_exercise">
<el-table-column align="left" label="试卷习题" min-width="60" prop="is_contain_exercise">
<template #default="scope">
{{scope.row.is_contain_exercise === 0?'未添加习题':scope.row.is_contain_exercise}}
{{scope.row.exam_id === 0?'未添加习题':scope.row.exam_id}}
</template>
</el-table-column>
<el-table-column align="left" label="是否免费" min-width="60">

@ -305,7 +305,7 @@ async function drawStateFunc(row,type) { //竞拍上架 下架
</el-popover>
</div>
<!-- 数据列表-->
<el-table :data="tableData" @selection-change="handleSelectionChange">
<el-table :data="tableData" bor @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"

Loading…
Cancel
Save