优化后台

This commit is contained in:
axlrose2333 2023-03-27 18:35:31 +08:00
parent 1339aa2fe4
commit a2087efdc9
28 changed files with 238 additions and 135 deletions

View File

@ -2,8 +2,9 @@ ENV = 'development'
VITE_CLI_PORT = 8088 VITE_CLI_PORT = 8088
VITE_SERVER_PORT = 8888 VITE_SERVER_PORT = 8888
VITE_BASE_API = /api VITE_BASE_API = /api
//VITE_BASE_PATH = http://192.168.1.133 VITE_BASE_PATH = http://192.168.1.133
VITE_BASE_PATH = http://122.9.143.61 //VITE_BASE_PATH = http://122.9.143.61
//VITE_BASE_PATH = http://192.168.1.40
VITE_EDITOR = vscode VITE_EDITOR = vscode
// VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm // VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm
// 如果使用docker-compose开发模式设置为下面的地址或本机主机IP // 如果使用docker-compose开发模式设置为下面的地址或本机主机IP

View File

@ -4,4 +4,5 @@ VITE_CLI_PORT = 8080
VITE_SERVER_PORT = 8888 VITE_SERVER_PORT = 8888
VITE_BASE_API = /api VITE_BASE_API = /api
#下方修改为你的线上ip #下方修改为你的线上ip
VITE_BASE_PATH = https://admin.api.gwkjxb.com //VITE_BASE_PATH = https://admin.api.gwkjxb.com
VITE_BASE_PATH = http://test_admin_api.gwkjxb.com

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -19,26 +19,38 @@ const queryParams = ref({
page:1, page:1,
pageSize:10, pageSize:10,
key:'', key:'',
status:'', status:20,
sort:'', sort:'',
current_page:1 current_page:1
}) })
// const subjectParams = ref({
// pageIndex:1,
// pageSize:100,
// })
const state_arr = ref([ const state_arr = ref([
{ {
name:'报名中', name:'全部',
value:20
},
{
name:'已上架',
value:1 value:1
}, },
{ {
name:'取消', name:'未上架',
value:0
},
{
name:'已下架',
value:2 value:2
}, },
{ {
name:'结束', name:'结束',
value:3 value:3
},
{
name:'未开始',
value:4
},
{
name:'报名中',
value:5
} }
]) ])
const tableData = ref([]) const tableData = ref([])
@ -65,7 +77,7 @@ const onReset = () => {
page:1, page:1,
pageSize:10, pageSize:10,
key:'', key:'',
status:'', status:20,
sort:'', sort:'',
current_page:1 current_page:1
} }
@ -107,15 +119,18 @@ function getStateName(row) {
name = '已结束'; name = '已结束';
row.status = 3 row.status = 3
} }
else{ else if(row.begin_time < (Date.parse(new Date()))) { //
name = '报名中'; name = '报名中';
} }
else{
name = '未开始';
}
break; break;
case 2: case 2:
name = '已取消'; name = '已下架';
break; break;
case 0: case 0:
name = '已取消'; name = '未上架';
break; break;
case 3: case 3:
name = '已结束'; name = '已结束';
@ -362,19 +377,20 @@ function closeViewDialog() {
link link
@click="editAuctionFunc(scope.row)" @click="editAuctionFunc(scope.row)"
>编辑</el-button> >编辑</el-button>
<el-button <!-- <el-button-->
icon="view" <!-- icon="view"-->
size="small" <!-- size="small"-->
type="primary" <!-- type="primary"-->
link <!-- link-->
@click="viewAuctionFunc(scope.row)" <!-- @click="viewAuctionFunc(scope.row)"-->
>明细</el-button> <!-- >明细</el-button>-->
<el-button <el-button
icon="delete" icon="delete"
size="small" size="small"
type="danger" type="danger"
link link
@click="delFunc(scope.row)" @click="delFunc(scope.row)"
v-if="scope.row.status===2 || scope.row.status===0"
>删除</el-button> >删除</el-button>
<el-button <el-button
icon="top" icon="top"
@ -382,7 +398,7 @@ function closeViewDialog() {
type="primary" type="primary"
link link
@click="auctionStateFunc(scope.row,1)" @click="auctionStateFunc(scope.row,1)"
v-if="scope.row.status!=3" v-if="scope.row.status===2 || scope.row.status===0"
>上架</el-button> >上架</el-button>
<el-button <el-button
icon="bottom" icon="bottom"
@ -390,7 +406,7 @@ function closeViewDialog() {
type="danger" type="danger"
link link
@click="auctionStateFunc(scope.row,2)" @click="auctionStateFunc(scope.row,2)"
v-if="scope.row.status!=3" v-if="scope.row.status!==2 && scope.row.status!==0"
>下架</el-button> >下架</el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -19,7 +19,7 @@ const course_id = ref(0)
const active = ref(0) const active = ref(0)
const form = ref({status:1,is_boutique:-1,is_audition:-1}) const form = ref({status:1,is_boutique:-1,is_audition:-1})
const subjectParams = ref({ const subjectParams = ref({
pageIndex:1, page:1,
pageSize:100, pageSize:100,
}) })
const subjectList = ref([]) const subjectList = ref([])

View File

@ -20,7 +20,7 @@ import { getToken } from '@/utils/auth'
const headers = ref({ Authorization: 'Bearer ' + getToken() }) const headers = ref({ Authorization: 'Bearer ' + getToken() })
const drawer = ref(false) const drawer = ref(false)
const queryParams =ref({ const queryParams =ref({
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
subject:'' subject:''
@ -41,7 +41,7 @@ function onSubmit() {
} }
function onReset() { function onReset() {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'' name:''
} }

View File

@ -38,16 +38,19 @@ onMounted(() => {
getSubjectList() getSubjectList()
}) })
// //
const origin_list = ref([])
async function getSubjectList() { async function getSubjectList() {
const res = await api.getSubjectList(queryParams.value) const res = await api.getSubjectList(queryParams.value)
subjectList.value = res.data.records subjectList.value = res.data.records
if(res.code === 0) { if(res.code === 0) {
subjectList.value = res.data.records subjectList.value = res.data.records
total.value = res.data.total total.value = res.data.total
origin_list.value = res.data.records
subjectList.value = addTreeFormatSubject(subjectList.value) subjectList.value = addTreeFormatSubject(subjectList.value)
// console.log(subjectList.value) // console.log(subjectList.value)
} }
} }
const current_categral_id = ref(0) // id
function addTreeFormatSubject(data) { function addTreeFormatSubject(data) {
if(!data) { if(!data) {
return [] return []
@ -55,6 +58,13 @@ function addTreeFormatSubject(data) {
data.map( item => { data.map( item => {
item.label = item.name item.label = item.name
item.value = item.id item.value = item.id
if(current_categral_id.value && (item.id === current_categral_id.value || item.parent_id === current_categral_id.value)) {
item.disabled = true
}
else{
item.disabled = false
}
if(item.level === 3) { if(item.level === 3) {
item.disabled = true item.disabled = true
} }
@ -83,12 +93,15 @@ const handleSelectionChange = (val) => {
apis.value = val apis.value = val
} }
function editApiFunc(row) { function editApiFunc(row) {
//
for(let prop in form.value) { for(let prop in form.value) {
if(row[prop]){ if(row[prop]){
form.value[prop] = row[prop] form.value[prop] = row[prop]
} }
} }
form.value.id = row.id form.value.id = row.id
current_categral_id.value = row.id
subjectList.value = addTreeFormatSubject(origin_list.value)
// return // return
openDialog('edit') openDialog('edit')
} }
@ -119,6 +132,8 @@ function openDialog(key) {
switch (key) { switch (key) {
case 'add': case 'add':
dialogTitle.value = '新增类型' dialogTitle.value = '新增类型'
current_categral_id.value = 0
subjectList.value = addTreeFormatSubject(origin_list.value)
break break
case 'edit': case 'edit':
dialogTitle.value = '编辑类型' dialogTitle.value = '编辑类型'
@ -183,13 +198,13 @@ async function enterDialog() { // 确认创建或修改
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
keyword:'' keyword:''
} }
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getSubjectList() getSubjectList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {
@ -252,7 +267,7 @@ function handleSizeChange(val) {
</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"

View File

@ -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">

View File

@ -28,6 +28,14 @@ function downloadChapterChildFunc(item) { // 点击下载
// console.log(item) // console.log(item)
window.open(row.url) window.open(row.url)
} }
function viewFunc(row,type) { //
if(type === 1) { //
console.log(row.url)
}
else{ //
}
}
</script> </script>
<template> <template>
<div> <div>
@ -83,12 +91,16 @@ function downloadChapterChildFunc(item) { // 点击下载
<el-table-column align="left" label="子章节名称" min-width="60" prop="name" /> <el-table-column align="left" label="子章节名称" min-width="60" prop="name" />
<el-table-column align="left" label="课件名称" min-width="60"> <el-table-column align="left" label="课件名称" min-width="60">
<template #default="scope"> <template #default="scope">
{{scope.row.url === ''?'未上传课件':scope.row.url}} <!-- {{scope.row.url === ''?'未上传课件':scope.row.url}}-->
<div v-if="scope.row.url" @click="viewFunc(scope.row,1)">查看</div>
<div v-else>未上传课件</div>
</template> </template>
</el-table-column> </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"> <template #default="scope">
{{scope.row.exam_id === 0?'未添加习题':scope.row.exam_id}} <!-- {{scope.row.exam_id === 0?'未添加习题':scope.row.exam_id}}-->
<div v-if="scope.row.exam_id" @click="viewFunc(scope.row,2)">查看</div>
<div v-else>未添加试卷</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="left" label="是否免费" min-width="60"> <el-table-column align="left" label="是否免费" min-width="60">
@ -96,11 +108,11 @@ function downloadChapterChildFunc(item) { // 点击下载
{{scope.row.is_free === 1? '是':'否'}} {{scope.row.is_free === 1? '是':'否'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="left" label="是否展示" min-width="60"> <!-- <el-table-column align="left" label="是否展示" min-width="60">-->
<template #default="scope"> <!-- <template #default="scope">-->
{{scope.row.is_show === 1? '是':'否'}} <!-- {{scope.row.is_show === 1? '是':'否'}}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column align="left" label="操作" min-width="60"> <el-table-column align="left" label="操作" min-width="60">
<template #default="scope"> <template #default="scope">
<el-button v-if="scope.row.url" <el-button v-if="scope.row.url"

View File

@ -19,8 +19,8 @@ const route = useRoute()
const queryParams = ref({ const queryParams = ref({
page:1, page:1,
pageSize:10, pageSize:10,
user_id:0, id:0,
type:'', // type:1, //
time:'', // , time:'', // ,
current_page:1 current_page:1
}) })
@ -39,13 +39,13 @@ const typeList = ref([
// //
onMounted(() => { onMounted(() => {
queryParams.value.id = parseInt(route.params.user_id) queryParams.value.id = parseInt(route.params.user_id)
// getAuctionDetailList() getAuctionDetailList()
}) })
// //
async function getAuctionDetailList() { async function getAuctionDetailList() {
const res = await api.getAuctionDetailList(queryParams.value) const res = await api.getAuctionDetailList(queryParams.value)
if(res.code === 0) { if(res.code === 0) {
tableData.value = res.data.records tableData.value = res.data.list
total.value = res.data.total total.value = res.data.total
} }
} }
@ -111,19 +111,19 @@ function handleSizeChange(val) {
<el-table :data="tableData"> <el-table :data="tableData">
<el-table-column align="left" label="竞拍时间" min-width="150" > <el-table-column align="left" label="竞拍时间" min-width="150" >
<template #default="scope"> <template #default="scope">
{{formatDate(scope.row.CreatedAt)}} {{formatDate(scope.row.in_time)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="left" label="竞拍编号" min-width="150" prop="name"> <el-table-column align="left" label="竞拍编号" min-width="150" prop="prize_id" />
<template #default="scope"> <el-table-column align="left" label="竞拍奖品" min-width="150" prop="prize_name" />
{{custom.getExercisesTypeName(scope.row.type)}}
</template>
</el-table-column>
<el-table-column align="left" label="竞拍奖品" min-width="150" prop="subject" />
<!-- <el-table-column align="left" label="选择号数" min-width="150" prop="teacher_id" />--> <!-- <el-table-column align="left" label="选择号数" min-width="150" prop="teacher_id" />-->
<el-table-column align="left" label="参与人数" min-width="150" prop="status" /> <el-table-column align="left" label="参与人数" min-width="150" prop="in_member" />
<el-table-column align="left" label="是否获奖" min-width="150" prop="status" /> <el-table-column align="left" label="是否获奖" min-width="150" prop="is_jackpot" >
<el-table-column align="left" label="竞拍消费" min-width="150" prop="status" /> <template #default="scope">
{{scope.row.is_jackpot?'是':'否'}}
</template>
</el-table-column>
<el-table-column align="left" label="竞拍消费" min-width="150" prop="consume" />
</el-table> </el-table>
<!-- 分页--> <!-- 分页-->
<div class="gva-pagination"> <div class="gva-pagination">

View File

@ -20,7 +20,7 @@ const queryParams = ref({
teacherId:0 teacherId:0
}) })
const subjectParams = ref({ const subjectParams = ref({
pageIndex:1, page:1,
pageSize:100, pageSize:100,
}) })
const tableData = ref([]) const tableData = ref([])
@ -61,7 +61,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',
@ -129,7 +129,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) {
@ -299,7 +299,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"

View File

@ -33,7 +33,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([])
@ -92,7 +92,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',
@ -176,7 +176,7 @@ function deleteExamFunc(row) {
}) })
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getExaminationList() getExaminationList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {

View File

@ -19,9 +19,10 @@ const route = useRoute()
const queryParams = ref({ const queryParams = ref({
page:1, page:1,
pageSize:10, pageSize:10,
user_id:0, id:0,
type:'', // type:2, //
time:'', // time:'', //
current_page:1
}) })
const tableData = ref([]) const tableData = ref([])
const total = ref(0) const total = ref(0)
@ -37,11 +38,12 @@ const typeList = ref([
]) ])
// //
onMounted(() => { onMounted(() => {
queryParams.value.id = parseInt(route.params.user_id)
getRaffleDetailList() getRaffleDetailList()
}) })
// //
async function getRaffleDetailList() { async function getRaffleDetailList() {
const res = await api.getRaffleDetailList(queryParams.value) const res = await api.getAuctionDetailList(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 total.value = res.data.total
@ -57,6 +59,7 @@ const onReset = () => {
user_id:0, user_id:0,
type:'', // type:'', //
time:'', // time:'', //
current_page:1
} }
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {

View File

@ -19,7 +19,7 @@ const queryParams = ref({
page:1, page:1,
pageSize:10, pageSize:10,
key:'', key:'',
status:'', status:20,
sort:'', sort:'',
current_page:1, current_page:1,
loading_egg:'' loading_egg:''
@ -30,16 +30,32 @@ const queryParams = ref({
// }) // })
const state_arr = ref([ const state_arr = ref([
{ {
name:'报名中', name:'全部',
value:20
},
{
name:'已上架',
value:1 value:1
}, },
{ {
name:'取消', name:'未上架',
value:0
},
{
name:'已下架',
value:2 value:2
}, },
{ {
name:'结束', name:'结束',
value:3 value:3
},
{
name:'未开始',
value:4
},
{
name:'报名中',
value:5
} }
]) ])
const tableData = ref([]) const tableData = ref([])
@ -66,7 +82,7 @@ const onReset = () => {
page:1, page:1,
pageSize:10, pageSize:10,
key:'', key:'',
status:'', status:20,
sort:'', sort:'',
current_page:1 current_page:1
} }
@ -106,16 +122,20 @@ function getStateName(row) {
// //
if(row.end_time < (Date.parse(new Date()))) { // if(row.end_time < (Date.parse(new Date()))) { //
name = '已结束'; name = '已结束';
row.status = 3
}
else if(row.begin_time < (Date.parse(new Date()))) { //
name = '报名中';
} }
else{ else{
name = '报名中'; name = '未开始';
} }
break; break;
case 2: case 2:
name = '已取消'; name = '已下架';
break; break;
case 0: case 0:
name = '已取消'; name = '未上架';
break; break;
case 3: case 3:
name = '已结束'; name = '已结束';
@ -374,18 +394,19 @@ async function viewAuctionFunc(row) { // 竞拍明细
link link
@click="editDrawFunc(scope.row)" @click="editDrawFunc(scope.row)"
>编辑</el-button> >编辑</el-button>
<el-button <!-- <el-button-->
icon="view" <!-- icon="view"-->
size="small" <!-- size="small"-->
type="primary" <!-- type="primary"-->
link <!-- link-->
@click="viewAuctionFunc(scope.row)" <!-- @click="viewAuctionFunc(scope.row)"-->
>明细</el-button> <!-- >明细</el-button>-->
<el-button <el-button
icon="delete" icon="delete"
size="small" size="small"
type="danger" type="danger"
link link
v-if="scope.row.status===2 || scope.row.status===0"
@click="delFunc(scope.row)" @click="delFunc(scope.row)"
>删除</el-button> >删除</el-button>
<el-button <el-button
@ -394,7 +415,7 @@ async function viewAuctionFunc(row) { // 竞拍明细
type="primary" type="primary"
link link
@click="drawStateFunc(scope.row,1)" @click="drawStateFunc(scope.row,1)"
v-if="scope.row.status!=3" v-if="scope.row.status===2 || scope.row.status===0"
>上架</el-button> >上架</el-button>
<el-button <el-button
icon="bottom" icon="bottom"
@ -402,7 +423,7 @@ async function viewAuctionFunc(row) { // 竞拍明细
type="danger" type="danger"
link link
@click="drawStateFunc(scope.row,2)" @click="drawStateFunc(scope.row,2)"
v-if="scope.row.status!=3" v-if="scope.row.status!==2 && scope.row.status!==0"
>下架</el-button> >下架</el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -33,7 +33,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([])
@ -89,7 +89,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',
@ -173,7 +173,7 @@ function deleteExamFunc(row) {
}) })
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getExaminationList() getExaminationList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {

View File

@ -54,14 +54,14 @@ async function getFinanceInfo() {
<img :src="icon4" alt=""> <img :src="icon4" alt="">
</div> </div>
<div class="ci-title">课程订单</div> <div class="ci-title">课程订单</div>
<div class="ci-value">{{financeInfo.course_order_num}}</div> <div class="ci-value">{{financeInfo.course_order_num}}</div>
</div> </div>
<div class="card-item"> <div class="card-item">
<div class="ci-icon"> <div class="ci-icon">
<img :src="icon5" alt=""> <img :src="icon5" alt="">
</div> </div>
<div class="ci-title">测试订单</div> <div class="ci-title">测试订单</div>
<div class="ci-value">{{financeInfo.exam_order_num}}</div> <div class="ci-value">{{financeInfo.exam_order_num}}</div>
</div> </div>
</div> </div>
<div class="total-box"> <div class="total-box">

View File

@ -68,7 +68,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',

View File

@ -3,12 +3,14 @@
<div> <div>
<span>Powered by</span> <span>Powered by</span>
<span> <span>
<a href="https://github.com/flipped-aurora/gin-vue-admin">{{ $GIN_VUE_ADMIN.appName }}</a> <!-- <a href="https://github.com/flipped-aurora/gin-vue-admin">{{ $GIN_VUE_ADMIN.appName }}</a>-->
<a href="javascript:void">{{ $GIN_VUE_ADMIN.appName }}</a>
</span> </span>
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<span>Copyright</span> <span>Copyright</span>
<span> <span>
<a href="https://github.com/flipped-aurora">flipped-aurora团队</a> <!-- <a href="https://github.com/flipped-aurora">flipped-aurora团队</a>-->
<a href="javascript:void">谷翁科技团队</a>
</span> </span>
</div> </div>
</div> </div>

View File

@ -94,7 +94,7 @@
</transition> </transition>
</div> </div>
</router-view> </router-view>
<BottomInfo /> <!-- <BottomInfo />-->
<setting /> <setting />
</el-main> </el-main>
</el-container> </el-container>

View File

@ -23,7 +23,7 @@ const queryParams = ref({
province:'' province:''
}) })
// const subjectParams = ref({ // const subjectParams = ref({
// pageIndex:1, // page:1,
// pageSize:100, // pageSize:100,
// }) // })
const state_arr = ref([ const state_arr = ref([
@ -77,7 +77,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',
@ -102,7 +102,7 @@ const handleSelectionChange = (val) => {
}) })
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getAssistantList() getAssistantList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {

View File

@ -24,7 +24,7 @@ const queryParams = ref({
province:'' province:''
}) })
// const subjectParams = ref({ // const subjectParams = ref({
// pageIndex:1, // page:1,
// pageSize:100, // pageSize:100,
// }) // })
const state_arr = ref([ const state_arr = ref([
@ -89,7 +89,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',
@ -114,7 +114,7 @@ const handleSelectionChange = (val) => {
}) })
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getManagerList() getManagerList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {
@ -146,17 +146,18 @@ async function delFunc(row) {
} }
// & // &
const dialogVisible = ref(false) const dialogVisible = ref(false)
const mForm = ref({}) const mForm = ref({province: 0})
const mFormRef = ref(null) const mFormRef = ref(null)
const mFormRules = ref({ const mFormRules = ref({
province: [{ required: true, message: '请选择管辖区域', trigger: 'blur' }], province: [{ required: true, message: '请选择管辖区域', trigger: 'blur' }],
user_id: [{ required: true, message: '请选择用户', trigger: 'blur' }] user_id: [{ required: true, message: '请选择用户', trigger: 'blur' }]
}) })
function openDialog() { function openDialog() {
mForm.value = {} mForm.value = {province:0}
dialogVisible.value = true dialogVisible.value = true
} }
function addOk() { // function addOk() { //
// console.log(mForm.value)
submitForm(mFormRef.value) submitForm(mFormRef.value)
} }
async function submitForm(formEl) { async function submitForm(formEl) {
@ -254,8 +255,8 @@ async function remoteMethod(query) {
{{scope.row.province>-1?cityList[scope.row.province].name:'无'}} {{scope.row.province>-1?cityList[scope.row.province].name:'无'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="域内市场助教" prop="assistant_num" /> <el-table-column align="center" min-width="150" label="域内市场助教" prop="assistant_num" />
<el-table-column align="center" label="域内市场学员" prop="student_num" /> <el-table-column align="center" min-width="150" label="域内市场学员" prop="student_num" />
<el-table-column align="center" label="课程订单" prop="course_num" /> <el-table-column align="center" label="课程订单" prop="course_num" />
<el-table-column align="center" label="佣金" prop="course_income" /> <el-table-column align="center" label="佣金" prop="course_income" />
<el-table-column align="center" label="试卷订单" prop="exam_num" /> <el-table-column align="center" label="试卷订单" prop="exam_num" />
@ -310,15 +311,6 @@ async function remoteMethod(query) {
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="用户ID" prop="user_id"> <el-form-item label="用户ID" prop="user_id">
<!-- <el-select v-model="mForm.user_id" clearable placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="(item,index) in user_list"-->
<!-- :key="item.user_id"-->
<!-- :label="item.nickname"-->
<!-- :value="item.user_id"-->
<!-- />-->
<!-- </el-select>-->
<el-select <el-select
v-model="mForm.user_id" v-model="mForm.user_id"
filterable filterable

View File

@ -29,7 +29,7 @@ const queryParams = ref({
status:0 status:0
}) })
const subjectParams = ref({ const subjectParams = ref({
pageIndex:1, page:1,
pageSize:100, pageSize:100,
}) })
const tableData = ref([]) const tableData = ref([])
@ -75,7 +75,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',
@ -149,7 +149,7 @@ function deleteExamFunc(row) {
}) })
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getOrderList() getOrderList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {

View File

@ -23,7 +23,7 @@ const queryParams = ref({
province:'' province:''
}) })
// const subjectParams = ref({ // const subjectParams = ref({
// pageIndex:1, // page:1,
// pageSize:100, // pageSize:100,
// }) // })
const state_arr = ref([ const state_arr = ref([
@ -77,7 +77,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',
@ -102,7 +102,7 @@ const handleSelectionChange = (val) => {
}) })
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getAssistantList() getAssistantList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {

View File

@ -28,7 +28,7 @@ const queryParams = ref({
status:1 status:1
}) })
const subjectParams = ref({ const subjectParams = ref({
pageIndex:1, page:1,
pageSize:100, pageSize:100,
}) })
const state_arr = ref([ const state_arr = ref([
@ -88,7 +88,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',
@ -162,7 +162,7 @@ function deleteExamFunc(row) {
}) })
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getTeacherList() getTeacherList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {

View File

@ -22,7 +22,7 @@ const queryParams = ref({
status:'' status:''
}) })
// const subjectParams = ref({ // const subjectParams = ref({
// pageIndex:1, // page:1,
// pageSize:100, // pageSize:100,
// }) // })
const state_arr = ref([ const state_arr = ref([
@ -76,7 +76,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',
@ -101,7 +101,7 @@ const handleSelectionChange = (val) => {
}) })
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getTeacherList() getTeacherList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {

View File

@ -28,7 +28,7 @@ const queryParams = ref({
province:'' province:''
}) })
const subjectParams = ref({ const subjectParams = ref({
pageIndex:1, page:1,
pageSize:100, pageSize:100,
}) })
const tableData = ref([]) const tableData = ref([])
@ -74,7 +74,7 @@ function onSubmit() {
} }
const onReset = () => { const onReset = () => {
queryParams.value = { queryParams.value = {
pageIndex:1, page:1,
pageSize:10, pageSize:10,
name:'', name:'',
status:'', status:'',
@ -148,7 +148,7 @@ function deleteExamFunc(row) {
}) })
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getUserList() getUserList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {

View File

@ -49,6 +49,15 @@ function toDealDetail(type) {
// url = 'dealDetailPoint'; // url = 'dealDetailPoint';
// break; // break;
// } // }
const params = {
user_id:route.params.id
}
if(type === detail_type.value.auctionDetail) { //
params.type = 1
}
else if(type === detail_type.value.raffleDetail){ //
params.type = 2
}
router.push({name:type,params:{user_id:route.params.id}}) router.push({name:type,params:{user_id:route.params.id}})
} }
</script> </script>

View File

@ -72,7 +72,7 @@ const onReset = () => {
} }
} }
function handleCurrentChange(val) { function handleCurrentChange(val) {
queryParams.value.pageIndex = val queryParams.value.page = val
getWithdrawList() getWithdrawList()
} }
function handleSizeChange(val) { function handleSizeChange(val) {