学员详情;市场管理;
This commit is contained in:
parent
31bd50111e
commit
35fc9df240
@ -3,6 +3,7 @@ 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 = https://admin.api.gwkjxb.com
|
||||||
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
|
||||||
|
@ -54,7 +54,7 @@ const api = {
|
|||||||
editDrawData: data => { // 编辑竞拍
|
editDrawData: data => { // 编辑竞拍
|
||||||
return service({
|
return service({
|
||||||
url: '/lottery',
|
url: '/lottery',
|
||||||
method: 'post',
|
method: 'put',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -16,8 +16,37 @@ const api = {
|
|||||||
},
|
},
|
||||||
getDealMoneyList: data => { // 获取资金交易明细
|
getDealMoneyList: data => { // 获取资金交易明细
|
||||||
return service({
|
return service({
|
||||||
url: '/user/'+data.id,
|
url: '/wallet/log/'+data.id,
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDealPointList: data => { // 获取积分交易明细
|
||||||
|
return service({
|
||||||
|
url: '/point/log/'+data.id,
|
||||||
|
method: 'get',
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getLearningDetailList: data => { // 获取学习记录
|
||||||
|
return service({
|
||||||
|
url: '/user/study/record/'+data.id,
|
||||||
|
method: 'get',
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getLearningDetailReport:data => { // 获取学习报告
|
||||||
|
return service({
|
||||||
|
url: '/user/study/report/'+data.id,
|
||||||
|
method: 'get',
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTestDetailList: data => { // 获取测试记录
|
||||||
|
return service({
|
||||||
|
url: '/exam/record/'+data.id,
|
||||||
|
method: 'get',
|
||||||
|
params:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,45 @@ const custom = {
|
|||||||
else{
|
else{
|
||||||
return num/flag+'万'
|
return num/flag+'万'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
getDealType() { // 获取交易类型
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
name:'课程',
|
||||||
|
value:1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'试卷',
|
||||||
|
value:4
|
||||||
|
},{
|
||||||
|
name:'邀请',
|
||||||
|
value:7
|
||||||
|
},{
|
||||||
|
name:'提现',
|
||||||
|
value:8
|
||||||
|
},{
|
||||||
|
name:'助教',
|
||||||
|
value:9
|
||||||
|
},{
|
||||||
|
name:'助教下学员购买试卷',
|
||||||
|
value:10
|
||||||
|
},{
|
||||||
|
name:'助教下学员购买课程',
|
||||||
|
value:11
|
||||||
|
},{
|
||||||
|
name:'助教下老师卖出试卷',
|
||||||
|
value:12
|
||||||
|
},{
|
||||||
|
name:'助教下老师卖出课程',
|
||||||
|
value:13
|
||||||
|
},{
|
||||||
|
name:'域内 课程',
|
||||||
|
value:15
|
||||||
|
},{
|
||||||
|
name:'域内 试卷',
|
||||||
|
value:16
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default custom
|
export default custom
|
||||||
|
@ -33,9 +33,12 @@ const dealTypeList = ref([
|
|||||||
value:2
|
value:2
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
const deal_types = ref([])
|
||||||
// 生命周期
|
// 生命周期
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// getDealMoneyList()
|
queryParams.value.id = parseInt(route.params.user_id)
|
||||||
|
deal_types.value = custom.getDealType()
|
||||||
|
getDealMoneyList()
|
||||||
})
|
})
|
||||||
// 方法
|
// 方法
|
||||||
async function getDealMoneyList() {
|
async function getDealMoneyList() {
|
||||||
@ -43,6 +46,7 @@ async function getDealMoneyList() {
|
|||||||
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
|
||||||
|
console.log(res.data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
@ -64,6 +68,11 @@ function handleSizeChange(val) {
|
|||||||
queryParams.value.pageSize = val
|
queryParams.value.pageSize = val
|
||||||
getDealMoneyList()
|
getDealMoneyList()
|
||||||
}
|
}
|
||||||
|
function getTypeName(type) {
|
||||||
|
return deal_types.value.filter((item,i) => {
|
||||||
|
return item.value == type
|
||||||
|
})[0].name
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
@ -71,25 +80,25 @@ function handleSizeChange(val) {
|
|||||||
<div class="gva-search-box">
|
<div class="gva-search-box">
|
||||||
<el-form ref="searchForm" :inline="true" :model="queryParams">
|
<el-form ref="searchForm" :inline="true" :model="queryParams">
|
||||||
<el-form-item label="交易类别">
|
<el-form-item label="交易类别">
|
||||||
<el-select v-model="queryParams.subject" clearable placeholder="请选择">
|
<el-select v-model="queryParams.type" clearable placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dealTypeList"
|
v-for="item in deal_types"
|
||||||
:key="item.id"
|
:key="item.value"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.name"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="交易时间">
|
<!-- <el-form-item label="交易时间">-->
|
||||||
<el-date-picker class="oi-item" style="margin-left:5px"
|
<!-- <el-date-picker class="oi-item" style="margin-left:5px"-->
|
||||||
v-model="queryParams.deal_time"
|
<!-- v-model="queryParams.deal_time"-->
|
||||||
type="date"
|
<!-- type="date"-->
|
||||||
placeholder="交易时间"
|
<!-- placeholder="交易时间"-->
|
||||||
format="YYYY-MM-DD"
|
<!-- format="YYYY-MM-DD"-->
|
||||||
value-format="x"
|
<!-- value-format="x"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</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>
|
||||||
@ -101,10 +110,10 @@ function handleSizeChange(val) {
|
|||||||
<div class="gva-table-box">
|
<div class="gva-table-box">
|
||||||
<!-- 数据列表-->
|
<!-- 数据列表-->
|
||||||
<el-table :data="tableData">
|
<el-table :data="tableData">
|
||||||
<el-table-column align="left" label="交易单号" min-width="150" prop="question_id" />
|
<el-table-column align="left" label="交易单号" min-width="150" prop="wallet_log_id" />
|
||||||
<el-table-column align="left" label="类别" min-width="150" prop="name" >
|
<el-table-column align="left" label="类别" min-width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{custom.getExercisesTypeName(scope.row.type)}}
|
{{getTypeName(scope.row.wallet_log_type)}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="left" label="交易时间" min-width="150" >
|
<el-table-column align="left" label="交易时间" min-width="150" >
|
||||||
@ -112,10 +121,10 @@ function handleSizeChange(val) {
|
|||||||
{{formatDate(scope.row.CreatedAt)}}
|
{{formatDate(scope.row.CreatedAt)}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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_id" />
|
<el-table-column align="left" label="交易详情" min-width="150" prop="desc" />
|
||||||
<el-table-column align="left" label="交易金额" min-width="150" prop="teacher_id" />
|
<el-table-column align="left" label="交易金额" min-width="150" prop="consume" />
|
||||||
<el-table-column align="left" label="资产余额" min-width="150" prop="teacher_id" />
|
<el-table-column align="left" label="资产余额" min-width="150" prop="balance" />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="gva-pagination">
|
<div class="gva-pagination">
|
||||||
|
@ -13,8 +13,15 @@ import {ref,onMounted } from 'vue'
|
|||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
// 生命周期
|
||||||
|
onMounted(() => {
|
||||||
|
queryParams.value.id = parseInt(route.params.user_id)
|
||||||
|
deal_types.value = custom.getDealType()
|
||||||
|
getDealPointList()
|
||||||
|
})
|
||||||
// 变量
|
// 变量
|
||||||
const typeList = custom.getExercisesTypeList()
|
const typeList = custom.getExercisesTypeList()
|
||||||
|
const deal_types = ref([])
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
page:1,
|
page:1,
|
||||||
pageSize:10,
|
pageSize:10,
|
||||||
@ -32,10 +39,6 @@ const dealTypeList = ref([
|
|||||||
value:2
|
value:2
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
// 生命周期
|
|
||||||
onMounted(() => {
|
|
||||||
// getDealPointList()
|
|
||||||
})
|
|
||||||
// 方法
|
// 方法
|
||||||
async function getDealPointList() {
|
async function getDealPointList() {
|
||||||
const res = await api.getDealPointList(queryParams.value)
|
const res = await api.getDealPointList(queryParams.value)
|
||||||
@ -63,6 +66,11 @@ function handleSizeChange(val) {
|
|||||||
queryParams.value.pageSize = val
|
queryParams.value.pageSize = val
|
||||||
getDealPointList()
|
getDealPointList()
|
||||||
}
|
}
|
||||||
|
function getTypeName(type) {
|
||||||
|
return deal_types.value.filter((item,i) => {
|
||||||
|
return item.value == type
|
||||||
|
})[0].name
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
@ -72,8 +80,8 @@ function handleSizeChange(val) {
|
|||||||
<el-form-item label="交易类别">
|
<el-form-item label="交易类别">
|
||||||
<el-select v-model="queryParams.subject" clearable placeholder="请选择">
|
<el-select v-model="queryParams.subject" clearable placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dealTypeList"
|
v-for="item in deal_types"
|
||||||
:key="item.id"
|
:key="item.value"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.name"
|
:value="item.name"
|
||||||
/>
|
/>
|
||||||
@ -100,10 +108,10 @@ function handleSizeChange(val) {
|
|||||||
<div class="gva-table-box">
|
<div class="gva-table-box">
|
||||||
<!-- 数据列表-->
|
<!-- 数据列表-->
|
||||||
<el-table :data="tableData">
|
<el-table :data="tableData">
|
||||||
<el-table-column align="left" label="交易单号" min-width="150" prop="question_id" />
|
<el-table-column align="left" label="交易单号" min-width="150" prop="wallet_log_id" />
|
||||||
<el-table-column align="left" label="交易类型" min-width="150" prop="name" >
|
<el-table-column align="left" label="交易类型" min-width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{custom.getExercisesTypeName(scope.row.type)}}
|
{{getTypeName(scope.row.wallet_log_type)}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="left" label="交易时间" min-width="150" >
|
<el-table-column align="left" label="交易时间" min-width="150" >
|
||||||
@ -111,9 +119,9 @@ function handleSizeChange(val) {
|
|||||||
{{formatDate(scope.row.CreatedAt)}}
|
{{formatDate(scope.row.CreatedAt)}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="left" label="交易详情" min-width="150" prop="teacher_id" />
|
<el-table-column align="left" label="交易详情" min-width="150" prop="desc" />
|
||||||
<el-table-column align="left" label="交易积分" min-width="150" prop="teacher_id" />
|
<el-table-column align="left" label="交易积分" min-width="150" prop="consume" />
|
||||||
<el-table-column align="left" label="积分余额" min-width="150" prop="teacher_id" />
|
<el-table-column align="left" label="积分余额" min-width="150" prop="balance" />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="gva-pagination">
|
<div class="gva-pagination">
|
||||||
|
@ -20,7 +20,6 @@ const queryParams = ref({
|
|||||||
user_id:0,
|
user_id:0,
|
||||||
last_time:'',
|
last_time:'',
|
||||||
subject:''
|
subject:''
|
||||||
|
|
||||||
})
|
})
|
||||||
const subjectParams = ref({
|
const subjectParams = ref({
|
||||||
page:1,
|
page:1,
|
||||||
@ -28,37 +27,10 @@ const subjectParams = ref({
|
|||||||
})
|
})
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
const subjectList = ref([])
|
const subjectList = ref([])
|
||||||
// const deleteVisible = ref(false)
|
|
||||||
// const question_ids = ref([])
|
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
// const dialogFormVisible = ref(false)
|
// 图表
|
||||||
// const dialogTitle = ref('')
|
// const myChart = echarts.init(document.getElementById('myEcharts'));
|
||||||
// const form =ref({})
|
const option = ref({
|
||||||
// const rules = ref({
|
|
||||||
// name: [{ required: true, message: '请输入课程名称', trigger: 'blur' }]
|
|
||||||
// })
|
|
||||||
// const question_id = ref(0)
|
|
||||||
// const content = ref(null)
|
|
||||||
// const options = ref([]) // 答案选项数组
|
|
||||||
// const dealTypeList = ref([
|
|
||||||
// {
|
|
||||||
// name:'课程',
|
|
||||||
// value:1
|
|
||||||
// },{
|
|
||||||
// name:'测试',
|
|
||||||
// value:2
|
|
||||||
// },
|
|
||||||
// ])
|
|
||||||
// 生命周期
|
|
||||||
onMounted(() => {
|
|
||||||
// getLearningDetailList()
|
|
||||||
getSubject()
|
|
||||||
initChart()
|
|
||||||
})
|
|
||||||
// 方法
|
|
||||||
function initChart() { // echart
|
|
||||||
const myChart = echarts.init(document.getElementById('myEcharts'));
|
|
||||||
const option = ref({
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
@ -90,6 +62,22 @@ function initChart() { // echart
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
// 生命周期
|
||||||
|
onMounted(() => {
|
||||||
|
queryParams.value.id = parseInt(route.params.user_id)
|
||||||
|
getLearningDetailList()
|
||||||
|
getSubject()
|
||||||
|
})
|
||||||
|
// 方法
|
||||||
|
async function getLearningDetailReport() {
|
||||||
|
const res = await api.getLearningDetailReport({id:queryParams.value.id})
|
||||||
|
if(res.code === 0) {
|
||||||
|
option.value.series[0].data = res.data
|
||||||
|
initChart()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function initChart() { // echart
|
||||||
|
const myChart = echarts.init(document.getElementById('myEcharts'));
|
||||||
option.value && myChart.setOption(option.value);
|
option.value && myChart.setOption(option.value);
|
||||||
}
|
}
|
||||||
async function getSubject(){ // 获取课程分类
|
async function getSubject(){ // 获取课程分类
|
||||||
@ -104,6 +92,7 @@ async function getLearningDetailList() {
|
|||||||
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
|
||||||
|
getLearningDetailReport()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
@ -170,16 +159,12 @@ function handleSizeChange(val) {
|
|||||||
<el-table-column align="left" label="ID" prop="course_id" />
|
<el-table-column align="left" label="ID" prop="course_id" />
|
||||||
<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.UpdatedAt)}}
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="left" label="科目" min-width="150" prop="name">
|
|
||||||
<template #default="scope">
|
|
||||||
{{custom.getExercisesTypeName(scope.row.type)}}
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="left" label="科目" min-width="150" prop="subject"></el-table-column>
|
||||||
<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_id" />
|
<el-table-column align="left" label="学习时长(分钟)" min-width="150" prop="duration" />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="gva-pagination">
|
<div class="gva-pagination">
|
||||||
|
@ -28,7 +28,8 @@ const subjectList = ref([])
|
|||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
// 生命周期
|
// 生命周期
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// getTestDetailList()
|
queryParams.value.id = parseInt(route.params.user_id)
|
||||||
|
getTestDetailList()
|
||||||
getSubject()
|
getSubject()
|
||||||
})
|
})
|
||||||
// 方法
|
// 方法
|
||||||
@ -66,6 +67,13 @@ function handleSizeChange(val) {
|
|||||||
queryParams.value.pageSize = val
|
queryParams.value.pageSize = val
|
||||||
getTestDetailList()
|
getTestDetailList()
|
||||||
}
|
}
|
||||||
|
async function getCourseName(course_id) {
|
||||||
|
const res = await capi.getCourse({id:course_id})
|
||||||
|
if(res.code === 0) {
|
||||||
|
return res.data.step1.name
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
@ -104,23 +112,27 @@ function handleSizeChange(val) {
|
|||||||
<div class="gva-table-box">
|
<div class="gva-table-box">
|
||||||
<!-- 数据列表-->
|
<!-- 数据列表-->
|
||||||
<el-table :data="tableData">
|
<el-table :data="tableData">
|
||||||
<el-table-column align="left" label="ID" prop="course_id" />
|
<el-table-column align="left" label="ID" prop="exam_id" />
|
||||||
<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.CreatedAt)}}
|
||||||
</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="subject"></el-table-column>
|
||||||
|
<el-table-column align="left" label="课程" min-width="150" prop="name"></el-table-column>
|
||||||
|
<el-table-column align="left" label="测试用时/限时" min-width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{custom.getExercisesTypeName(scope.row.type)}}
|
{{scope.row.duration/scope.row.duration}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="left" label="课程" min-width="150" prop="subject" />
|
<el-table-column align="left" label="测试状态" min-width="150" prop="status">
|
||||||
<el-table-column align="left" label="测试用时/限时" min-width="150" prop="teacher_id" />
|
<template #default="scope">
|
||||||
<el-table-column align="left" label="测试状态" min-width="150" prop="status" />
|
{{scope.row.score && scope.row.rank ? '已公布':scope.row.score && !scope.row.rank?'提交未公布':'未提交'}}
|
||||||
<el-table-column align="left" label="测试名次" min-width="150" prop="status" />
|
</template>
|
||||||
<el-table-column align="left" label="测试消费" min-width="150" prop="status" />
|
</el-table-column>
|
||||||
<el-table-column align="left" label="测试收益" min-width="150" prop="status" />
|
<el-table-column align="left" label="测试名次" min-width="150" prop="rank" />
|
||||||
|
<el-table-column align="left" label="测试消费" min-width="150" prop="price" />
|
||||||
|
<el-table-column align="left" label="测试收益" min-width="150" prop="reward" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页-->
|
<!-- 分页-->
|
||||||
<div class="gva-pagination">
|
<div class="gva-pagination">
|
||||||
|
@ -139,6 +139,10 @@ const drawFormRules = ref({
|
|||||||
end_time:[{ required: true, message: '请输入截止时间', trigger: 'blur' }],
|
end_time:[{ required: true, message: '请输入截止时间', trigger: 'blur' }],
|
||||||
begin_time:[{ required: true, message: '请输入开始时间', trigger: 'blur' }],
|
begin_time:[{ required: true, message: '请输入开始时间', trigger: 'blur' }],
|
||||||
product_cover:[{ required: true, message: '请选择商品封面', trigger: 'blur' }],
|
product_cover:[{ required: true, message: '请选择商品封面', trigger: 'blur' }],
|
||||||
|
egg_quantity:[{ required: true, message: '请输入金蛋数量', trigger: 'blur'},
|
||||||
|
{ type: 'number', message: '请输入正确的格式' }],
|
||||||
|
prize_number:[{ required: true, message: '请输入中奖号码', trigger: 'blur'},
|
||||||
|
{ type: 'number', message: '请输入正确的格式' }],
|
||||||
})
|
})
|
||||||
const drawFormRef = ref(null)
|
const drawFormRef = ref(null)
|
||||||
function openDialog() {
|
function openDialog() {
|
||||||
@ -318,21 +322,23 @@ async function drawStateFunc(row,type) { //竞拍上架 下架
|
|||||||
<el-table-column align="center" label="满员人数" prop="full_member" />
|
<el-table-column align="center" label="满员人数" prop="full_member" />
|
||||||
<el-table-column align="center" label="发布日期" min-width="150" >
|
<el-table-column align="center" label="发布日期" min-width="150" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{custom.timestampToDate(scope.row.begin_time)}}
|
{{custom.timestampToDate2(scope.row.begin_time)}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="截止日期" min-width="150" >
|
<el-table-column align="center" label="截止日期" min-width="150" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{custom.timestampToDate(scope.row.end_time)}}
|
{{custom.timestampToDate2(scope.row.end_time)}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" label="已参与人数" min-width="150" prop="in_member" />
|
<el-table-column align="center" label="已参与人数" min-width="150" prop="in_member" />
|
||||||
<el-table-column align="center" label="奖品装蛋" min-width="150" prop="loading_egg" >
|
<el-table-column align="center" label="金蛋数量" min-width="150" prop="egg_quantity" />
|
||||||
<template #default="scope">
|
<el-table-column align="center" label="中奖号" min-width="150" prop="prize_number" />
|
||||||
{{scope.row.loading_egg?'是':'否'}}
|
<!-- <el-table-column align="center" label="奖品装蛋" min-width="150" prop="loading_egg" >-->
|
||||||
</template>
|
<!-- <template #default="scope">-->
|
||||||
</el-table-column>
|
<!-- {{scope.row.loading_egg?'是':'否'}}-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
<!-- <el-table-column align="center" label="最高积分" prop="most_point" />-->
|
<!-- <el-table-column align="center" label="最高积分" prop="most_point" />-->
|
||||||
<el-table-column align="center" label="状态">
|
<el-table-column align="center" label="状态">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -438,9 +444,15 @@ async function drawStateFunc(row,type) { //竞拍上架 下架
|
|||||||
value-format="x"
|
value-format="x"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="奖品装蛋" >
|
<el-form-item label="金蛋数量" prop="egg_quantity">
|
||||||
<el-switch @change="loadingEggChange" v-model="drawForm.loading_egg" active-text="是" inactive-text="否" :active-value="true" inactive-value="false" />
|
<el-input v-model.number="drawForm.egg_quantity" placeholder="请输入金蛋数量" autocomplete="off" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="中奖号码" prop="prize_number">
|
||||||
|
<el-input v-model.number="drawForm.prize_number" placeholder="请输入中奖号码" autocomplete="off" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="奖品装蛋" >-->
|
||||||
|
<!-- <el-switch @change="loadingEggChange" v-model="drawForm.loading_egg" active-text="是" inactive-text="否" :active-value="true" inactive-value="false" />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="奖品详情" prop="product_introduce">
|
<el-form-item label="奖品详情" prop="product_introduce">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="avatar-uploader"
|
class="avatar-uploader"
|
||||||
|
@ -51,9 +51,13 @@ async function getExamGroupList() {
|
|||||||
type_list.value = res.data.records
|
type_list.value = res.data.records
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
console.log('子组件获取行为')
|
console.log('子组件获取行为')
|
||||||
if(type_list.value.length==0) {
|
|
||||||
type_list.value = _.cloneDeep(has_exam_types.value)
|
// if(type_list.value.length==0 && has_exam_types.value.length > 0) {
|
||||||
}
|
// type_list.value = _.cloneDeep(has_exam_types.value)
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
//
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function chooseChapterChildExercises() {
|
function chooseChapterChildExercises() {
|
||||||
@ -111,14 +115,14 @@ function oFunc(val) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function checkFunc(row) { // 检查合法性
|
function checkFunc(row) { // 检查合法性
|
||||||
let flag = true
|
let flag = false
|
||||||
for(let item of has_exam_types.value) {
|
// for(let item of has_exam_types.value) {
|
||||||
if(item.persons == row.persons) { // 相同人数(级别)
|
// if(item.persons == row.persons) { // 相同人数(级别)
|
||||||
if( item.expiry_date > Date.parse(new Date())) { // 没有过期
|
// if( item.expiry_date > Date.parse(new Date())) { // 没有过期
|
||||||
flag = false
|
// flag = false
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return flag
|
return flag
|
||||||
}
|
}
|
||||||
function assigntTermFunc() { // 赋值期数
|
function assigntTermFunc() { // 赋值期数
|
||||||
@ -131,16 +135,16 @@ function assigntTermFunc() { // 赋值期数
|
|||||||
return term
|
return term
|
||||||
}
|
}
|
||||||
function enterDb() { // 确认新增/编辑
|
function enterDb() { // 确认新增/编辑
|
||||||
if(edit_flag.value) { // 编辑
|
// if(edit_flag.value) { // 编辑
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
else{ // 新增
|
// else{ // 新增
|
||||||
// let f = checkFunc(gform.value)
|
// // let f = checkFunc(gform.value)
|
||||||
// if(!f) { // 有相同人数且没有过期,无法再次创建
|
// // if(!f) { // 有相同人数且没有过期,无法再次创建
|
||||||
// ElMessage.error('该级别组数已存在!')
|
// // ElMessage.error('该级别组数已存在!')
|
||||||
// return
|
// // return
|
||||||
|
// // }
|
||||||
// }
|
// }
|
||||||
}
|
|
||||||
if(!edit_flag.value) { // 新增
|
if(!edit_flag.value) { // 新增
|
||||||
gform.value.term = assigntTermFunc()
|
gform.value.term = assigntTermFunc()
|
||||||
// 添加临时id
|
// 添加临时id
|
||||||
|
@ -44,7 +44,7 @@ const question_ids = ref([])
|
|||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const dialogTitle = ref('')
|
const dialogTitle = ref('')
|
||||||
const form =ref({})
|
const form =ref({price:4.9})
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
name: [{ required: true, message: '请输入课程名称', trigger: 'blur' }]
|
name: [{ required: true, message: '请输入课程名称', trigger: 'blur' }]
|
||||||
})
|
})
|
||||||
@ -101,7 +101,7 @@ function openDialog(type) {
|
|||||||
switch (type){
|
switch (type){
|
||||||
case 'add':
|
case 'add':
|
||||||
dialogTitle.value = '新增试卷'
|
dialogTitle.value = '新增试卷'
|
||||||
form.value = {}
|
form.value = {price:4.9}
|
||||||
break;
|
break;
|
||||||
case 'edit':
|
case 'edit':
|
||||||
// params.question_id = question_id.value
|
// params.question_id = question_id.value
|
||||||
@ -199,7 +199,7 @@ async function enterDialog() { // 提交
|
|||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
// console.log(form.value)
|
// console.log(form.value)
|
||||||
form.value.price = Number(form.value.price )*100
|
form.value.price = parseInt(Number(form.value.price )*100)
|
||||||
form.value.duration = parseInt(form.value.duration)
|
form.value.duration = parseInt(form.value.duration)
|
||||||
const params = {
|
const params = {
|
||||||
...form.value
|
...form.value
|
||||||
@ -412,7 +412,7 @@ function addGroupFunc(data) {
|
|||||||
<el-input type="number" v-model="form.duration" placeholder="请输入测试时长(分钟)" />
|
<el-input type="number" v-model="form.duration" placeholder="请输入测试时长(分钟)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="测试价格" >
|
<el-form-item label="测试价格" >
|
||||||
<el-input type="number" v-model="form.price" placeholder="请输入测试价格(元)" />
|
<el-input type="number" v-model="form.price" disabled placeholder="请输入测试价格(元)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="测试组别" >
|
<el-form-item label="测试组别" >
|
||||||
<groupPool @addFunc="addGroupFunc" :exam_types="exam_types" :exam_id="form.exam_id" />
|
<groupPool @addFunc="addGroupFunc" :exam_types="exam_types" :exam_id="form.exam_id" />
|
||||||
|
@ -228,14 +228,14 @@ async function pOk() { // 审核提交
|
|||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@click="processFunc(scope.row,2)"
|
@click="processFunc(scope.row,3)"
|
||||||
>同意</el-button>
|
>同意</el-button>
|
||||||
<el-button v-if="scope.row.status == 1"
|
<el-button v-if="scope.row.status == 1"
|
||||||
icon="delete"
|
icon="delete"
|
||||||
size="small"
|
size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
@click="processFunc(scope.row,3)"
|
@click="processFunc(scope.row,2)"
|
||||||
>拒绝</el-button>
|
>拒绝</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -211,7 +211,7 @@ async function pOk() { // 审核提交
|
|||||||
<el-table-column align="center" label="累计销售" prop="exam_sale" />
|
<el-table-column align="center" label="累计销售" prop="exam_sale" />
|
||||||
<el-table-column align="center" label="状态" prop="exam_sale">
|
<el-table-column align="center" label="状态" prop="exam_sale">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>{{scope.row.status == 1?'审核中':scope.row.status == 2?'已同意':'已拒绝'}}</div>
|
<div>{{scope.row.status == 1?'审核中':scope.row.status == 2?'已拒绝':'已同意'}}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="审核说明" prop="desc" />
|
<el-table-column align="center" label="审核说明" prop="desc" />
|
||||||
|
@ -272,10 +272,10 @@ function getProvinceName(province) {
|
|||||||
<el-form-item label="区域">
|
<el-form-item label="区域">
|
||||||
<el-select v-model="queryParams.province" clearable placeholder="请选择">
|
<el-select v-model="queryParams.province" clearable placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in cityList"
|
v-for="(item,i) in cityList"
|
||||||
:key="item.ProID"
|
:key="item.ProID"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.ProID"
|
:value="i"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
Loading…
Reference in New Issue
Block a user