|
|
@ -18,7 +18,7 @@ const queryParams = ref({
|
|
|
|
subject:''
|
|
|
|
subject:''
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const subjectParams = ref({
|
|
|
|
const subjectParams = ref({
|
|
|
|
pageIndex:1,
|
|
|
|
page:1,
|
|
|
|
pageSize:100,
|
|
|
|
pageSize:100,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const tableData = ref([])
|
|
|
|
const tableData = ref([])
|
|
|
@ -33,6 +33,28 @@ const rules = ref({
|
|
|
|
name: [{ required: true, message: '请输入课程名称', trigger: 'blur' }]
|
|
|
|
name: [{ required: true, message: '请输入课程名称', trigger: 'blur' }]
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const course_id = ref(0)
|
|
|
|
const course_id = ref(0)
|
|
|
|
|
|
|
|
const statusList = ref([
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name:'已上架',
|
|
|
|
|
|
|
|
value:1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name:'已下架',
|
|
|
|
|
|
|
|
value:-1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name:'待审核',
|
|
|
|
|
|
|
|
value:2
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name:'已通过',
|
|
|
|
|
|
|
|
value:3
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name:'已拒绝',
|
|
|
|
|
|
|
|
value:4
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
])
|
|
|
|
// 生命周期
|
|
|
|
// 生命周期
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
getCourseList()
|
|
|
|
getCourseList()
|
|
|
@ -43,6 +65,7 @@ async function getCourseList() {
|
|
|
|
const res = await api.getCourseList(queryParams.value)
|
|
|
|
const res = await api.getCourseList(queryParams.value)
|
|
|
|
if(res.code === 0) {
|
|
|
|
if(res.code === 0) {
|
|
|
|
tableData.value = res.data.records
|
|
|
|
tableData.value = res.data.records
|
|
|
|
|
|
|
|
total.value = res.data.total
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async function getSubject(){ // 获取课程分类
|
|
|
|
async function getSubject(){ // 获取课程分类
|
|
|
@ -58,7 +81,7 @@ function onSubmit() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const onReset = () => {
|
|
|
|
const onReset = () => {
|
|
|
|
queryParams.value = {
|
|
|
|
queryParams.value = {
|
|
|
|
pageIndex:1,
|
|
|
|
page:1,
|
|
|
|
pageSize:10,
|
|
|
|
pageSize:10,
|
|
|
|
name:'',
|
|
|
|
name:'',
|
|
|
|
status:'',
|
|
|
|
status:'',
|
|
|
@ -126,7 +149,7 @@ function deleteCourseFunc(row) {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleCurrentChange(val) {
|
|
|
|
function handleCurrentChange(val) {
|
|
|
|
queryParams.value.pageIndex = val
|
|
|
|
queryParams.value.page = val
|
|
|
|
getCourseList()
|
|
|
|
getCourseList()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleSizeChange(val) {
|
|
|
|
function handleSizeChange(val) {
|
|
|
@ -206,17 +229,20 @@ async function enterVerifyDialog() { // 审核提交
|
|
|
|
<el-form-item label="课程名称">
|
|
|
|
<el-form-item label="课程名称">
|
|
|
|
<el-input v-model="queryParams.name" placeholder="根据课程名称进行查询" />
|
|
|
|
<el-input v-model="queryParams.name" placeholder="根据课程名称进行查询" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="课程状态">
|
|
|
|
|
|
|
|
<el-select v-model="queryParams.status" clearable placeholder="请选择">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in statusList"
|
|
|
|
|
|
|
|
:key="item.value"
|
|
|
|
|
|
|
|
:label="item.name"
|
|
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="课程分类">
|
|
|
|
<el-form-item label="课程分类">
|
|
|
|
<!-- <el-select v-model="queryParams.subject" clearable placeholder="请选择">-->
|
|
|
|
|
|
|
|
<!-- <el-option-->
|
|
|
|
|
|
|
|
<!-- v-for="item in subjectList"-->
|
|
|
|
|
|
|
|
<!-- :key="item.id"-->
|
|
|
|
|
|
|
|
<!-- :label="item.name"-->
|
|
|
|
|
|
|
|
<!-- :value="item.id"-->
|
|
|
|
|
|
|
|
<!-- />-->
|
|
|
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
|
|
|
<el-tree-select v-model="queryParams.subject" :data="subjectList" :render-after-expand="false" />
|
|
|
|
<el-tree-select v-model="queryParams.subject" :data="subjectList" :render-after-expand="false" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
|
|
|
|
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
|
|
|
|
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
|
|
|
|
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
|
|
|
@ -248,12 +274,13 @@ async function enterVerifyDialog() { // 审核提交
|
|
|
|
<el-table-column align="left" label="id" min-width="60" prop="course_id" sortable="custom" />
|
|
|
|
<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="name" />
|
|
|
|
<el-table-column align="left" label="科目" min-width="150" prop="subject" />
|
|
|
|
<el-table-column align="left" label="科目" min-width="150" prop="subject" />
|
|
|
|
|
|
|
|
<el-table-column align="left" label="教师" min-width="150" prop="teacher_name" />
|
|
|
|
<el-table-column align="left" label="价格" min-width="150">
|
|
|
|
<el-table-column align="left" label="价格" min-width="150">
|
|
|
|
<template #default="scope">{{scope.row.price/100}}</template>
|
|
|
|
<template #default="scope">{{scope.row.price/100}}</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column align="left" label="状态" min-width="150" prop="status">
|
|
|
|
<el-table-column align="left" label="状态" min-width="150" prop="status">
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
|
{{scope.row.status == 1?'上架':scope.row.status == 2?'待审核':scope.row.status == 3?'通过':scope.row.status == 4?'未通过':'下架'}}
|
|
|
|
{{scope.row.status == 1?'上架':scope.row.status == 2?'待审核':scope.row.status == 3?'已通过':scope.row.status == 4?'未通过':'下架'}}
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</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">
|
|
|
@ -290,7 +317,7 @@ async function enterVerifyDialog() { // 审核提交
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
<div class="gva-pagination">
|
|
|
|
<div class="gva-pagination">
|
|
|
|
<el-pagination
|
|
|
|
<el-pagination
|
|
|
|
:current-page="queryParams.pageIndex"
|
|
|
|
:current-page="queryParams.page"
|
|
|
|
:page-size="queryParams.pageSize"
|
|
|
|
:page-size="queryParams.pageSize"
|
|
|
|
:page-sizes="[10, 30, 50, 100]"
|
|
|
|
:page-sizes="[10, 30, 50, 100]"
|
|
|
|
:total="total"
|
|
|
|
:total="total"
|
|
|
@ -324,6 +351,10 @@ async function enterVerifyDialog() { // 审核提交
|
|
|
|
<el-form-item label="是否通过" prop="is_free">
|
|
|
|
<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-switch v-model="verifyForm.is_pass" active-text="通过" inactive-text="拒绝" :active-value="1" :inactive-value="-1" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<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-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="verifyForm.desc" autocomplete="off" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<template #footer>
|
|
|
|
<template #footer>
|
|
|
|
<div class="dialog-footer">
|
|
|
|
<div class="dialog-footer">
|
|
|
|