增加用户详情内的多个页面

This commit is contained in:
axlrose2333 2023-03-03 17:59:52 +08:00
parent 33b290c61f
commit afcb62b4eb
9 changed files with 1019 additions and 50 deletions

View File

@ -13,6 +13,12 @@ const api = {
url: '/user/'+data.id, url: '/user/'+data.id,
method: 'get' method: 'get'
}) })
},
getDealMoneyList: data => { // 获取资金交易明细
return service({
url: '/user/'+data.id,
method: 'get'
})
} }
} }
export default api export default api

View File

@ -0,0 +1,155 @@
<script setup>
//
import api from '@/api/userManage'
// import capi from '@/api/course'
import custom from '@/utils/custom'
import {formatDate} from '@/utils/format'
import _ from 'lodash'
// import { toSQLLine } from '@/utils/stringFun'
// import WarningBar from '@/components/warningBar/warningBar.vue'
// import ckEditor from '@/components/richText/ckEditor5.vue'
import {ref,onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
// import * as echarts from 'echarts';
//
const queryParams = ref({
page:1,
pageSize:10,
user_id:0,
type:'', //
time:'', //
})
const tableData = ref([])
const total = ref(0)
const typeList = ref([
{
name:'已中奖',
value:1
},
{
name:'未中奖',
value:2
}
])
//
onMounted(() => {
// getAuctionDetailList()
})
//
async function getAuctionDetailList() {
const res = await api.getAuctionDetailList(queryParams.value)
if(res.code === 0) {
tableData.value = res.data.records
total.value = res.data.total
}
}
function onSubmit() {
getAuctionDetailList()
}
const onReset = () => {
queryParams.value = {
page:1,
pageSize:10,
user_id:0,
type:'', //
time:'', //
}
}
function handleCurrentChange(val) {
queryParams.value.page = val
getAuctionDetailList()
}
function handleSizeChange(val) {
queryParams.value.pageSize = val
getAuctionDetailList()
}
</script>
<template>
<div>
<!-- 搜索框-->
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="queryParams">
<el-form-item label="是否中奖">
<el-select v-model="queryParams.subject" clearable placeholder="请选择">
<el-option
v-for="item in typeList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="竞拍时间">
<el-date-picker class="oi-item" style="margin-left:5px"
v-model="queryParams.last_time"
type="date"
placeholder="竞拍时间"
format="YYYY-MM-DD"
value-format="x"
/>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<!-- 表格数据-->
<div class="gva-table-box">
<!-- 数据列表-->
<el-table :data="tableData">
<el-table-column align="left" label="竞拍时间" min-width="150" >
<template #default="scope">
{{formatDate(scope.row.CreatedAt)}}
</template>
</el-table-column>
<el-table-column align="left" label="竞拍编号" min-width="150" prop="name">
<template #default="scope">
{{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="status" />
<el-table-column align="left" label="是否获奖" min-width="150" prop="status" />
<el-table-column align="left" label="竞拍消费" min-width="150" prop="status" />
</el-table>
<!-- 分页-->
<div class="gva-pagination">
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.option-item{
display: flex;
align-items: center;
margin-bottom: 10px;
}
.button-box {
padding: 10px 20px;
.el-button {
float: right;
}
}
.warning {
color: #dc143c;
}
</style>

View File

@ -0,0 +1,151 @@
<script setup>
//
import api from '@/api/userManage'
// import capi from '@/api/course'
import custom from '@/utils/custom'
import {formatDate} from '@/utils/format'
// import _ from 'lodash'
// import { toSQLLine } from '@/utils/stringFun'
// import WarningBar from '@/components/warningBar/warningBar.vue'
// import ckEditor from '@/components/richText/ckEditor5.vue'
import {ref,onMounted } from 'vue'
// import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
//
const typeList = custom.getExercisesTypeList()
const queryParams = ref({
page:1,
pageSize:10,
type:'',
deal_time:''
})
const tableData = ref([])
const total = ref(0)
const dealTypeList = ref([
{
name:'课程',
value:1
},{
name:'测试',
value:2
},
])
//
onMounted(() => {
// getDealMoneyList()
})
//
async function getDealMoneyList() {
const res = await api.getDealMoneyList(queryParams.value)
if(res.code === 0) {
tableData.value = res.data.records
total.value = res.data.total
}
}
function onSubmit() {
getDealMoneyList()
}
const onReset = () => {
queryParams.value = {
page:1,
pageSize:10,
type:'',
deal_time:''
}
}
function handleCurrentChange(val) {
queryParams.value.page = val
getDealMoneyList()
}
function handleSizeChange(val) {
queryParams.value.pageSize = val
getDealMoneyList()
}
</script>
<template>
<div>
<!-- 搜索框-->
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="queryParams">
<el-form-item label="交易类别">
<el-select v-model="queryParams.subject" clearable placeholder="请选择">
<el-option
v-for="item in dealTypeList"
:key="item.id"
:label="item.name"
:value="item.name"
/>
</el-select>
</el-form-item>
<el-form-item label="交易时间">
<el-date-picker class="oi-item" style="margin-left:5px"
v-model="queryParams.deal_time"
type="date"
placeholder="交易时间"
format="YYYY-MM-DD"
value-format="x"
/>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<!-- 表格数据-->
<div class="gva-table-box">
<!-- 数据列表-->
<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="name" >
<template #default="scope">
{{custom.getExercisesTypeName(scope.row.type)}}
</template>
</el-table-column>
<el-table-column align="left" label="交易时间" min-width="150" >
<template #default="scope">
{{formatDate(scope.row.CreatedAt)}}
</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="teacher_id" />
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.option-item{
display: flex;
align-items: center;
margin-bottom: 10px;
}
.button-box {
padding: 10px 20px;
.el-button {
float: right;
}
}
.warning {
color: #dc143c;
}
</style>

View File

@ -0,0 +1,149 @@
<script setup>
//
import api from '@/api/userManage'
// import capi from '@/api/course'
import custom from '@/utils/custom'
import {formatDate} from '@/utils/format'
// import _ from 'lodash'
// import { toSQLLine } from '@/utils/stringFun'
// import WarningBar from '@/components/warningBar/warningBar.vue'
// import ckEditor from '@/components/richText/ckEditor5.vue'
import {ref,onMounted } from 'vue'
// import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
//
const typeList = custom.getExercisesTypeList()
const queryParams = ref({
page:1,
pageSize:10,
type:'',
deal_time:''
})
const tableData = ref([])
const total = ref(0)
const dealTypeList = ref([
{
name:'课程',
value:1
},{
name:'测试',
value:2
},
])
//
onMounted(() => {
// getDealPointList()
})
//
async function getDealPointList() {
const res = await api.getDealPointList(queryParams.value)
if(res.code === 0) {
tableData.value = res.data.records
total.value = res.data.total
}
}
function onSubmit() {
getDealPointList()
}
const onReset = () => {
queryParams.value = {
page:1,
pageSize:10,
type:'',
deal_time:''
}
}
function handleCurrentChange(val) {
queryParams.value.page = val
getDealPointList()
}
function handleSizeChange(val) {
queryParams.value.pageSize = val
getDealPointList()
}
</script>
<template>
<div>
<!-- 搜索框-->
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="queryParams">
<el-form-item label="交易类别">
<el-select v-model="queryParams.subject" clearable placeholder="请选择">
<el-option
v-for="item in dealTypeList"
:key="item.id"
:label="item.name"
:value="item.name"
/>
</el-select>
</el-form-item>
<el-form-item label="交易时间">
<el-date-picker class="oi-item" style="margin-left:5px"
v-model="queryParams.deal_time"
type="date"
placeholder="交易时间"
format="YYYY-MM-DD"
value-format="x"
/>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<!-- 表格数据-->
<div class="gva-table-box">
<!-- 数据列表-->
<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="name" >
<template #default="scope">
{{custom.getExercisesTypeName(scope.row.type)}}
</template>
</el-table-column>
<el-table-column align="left" label="交易时间" min-width="150" >
<template #default="scope">
{{formatDate(scope.row.CreatedAt)}}
</template>
</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="teacher_id" />
<el-table-column align="left" label="积分余额" min-width="150" prop="teacher_id" />
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.option-item{
display: flex;
align-items: center;
margin-bottom: 10px;
}
.button-box {
padding: 10px 20px;
.el-button {
float: right;
}
}
.warning {
color: #dc143c;
}
</style>

View File

@ -0,0 +1,220 @@
<script setup>
//
import api from '@/api/userManage'
import capi from '@/api/course'
import custom from '@/utils/custom'
import {formatDate} from '@/utils/format'
// import _ from 'lodash'
import {ref,onMounted } from 'vue'
// import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
import * as echarts from 'echarts';
//
const typeList = custom.getExercisesTypeList()
const queryParams = ref({
page:1,
pageSize:10,
user_id:0,
last_time:'',
subject:''
})
const subjectParams = ref({
page:1,
pageSize:100,
})
const tableData = ref([])
const subjectList = ref([])
// const deleteVisible = ref(false)
// const question_ids = ref([])
const total = ref(0)
// const dialogFormVisible = ref(false)
// const dialogTitle = ref('')
// const form =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: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
axisTick: {
alignWithLabel: true
}
},
yAxis: {
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
name: '学习时长(分钟)',
barWidth: '60%',
}
]
});
option.value && myChart.setOption(option.value);
}
async function getSubject(){ //
const res = await capi.getSubjectList(subjectParams.value)
if(res.code === 0) {
subjectList.value = custom.getStdSubject(res.data.records)
// console.log(subjectList.value)
}
}
async function getLearningDetailList() {
const res = await api.getLearningDetailList(queryParams.value)
if(res.code === 0) {
tableData.value = res.data.records
total.value = res.data.total
}
}
function onSubmit() {
getLearningDetailList()
}
const onReset = () => {
queryParams.value = {
page:1,
pageSize:10,
user_id:0,
last_time:'',
subject:''
}
}
// const handleSelectionChange = (val) => {
// question_ids.value = val
// }
function handleCurrentChange(val) {
queryParams.value.page = val
getLearningDetailList()
}
function handleSizeChange(val) {
queryParams.value.pageSize = val
getLearningDetailList()
}
</script>
<template>
<div>
<!-- 搜索框-->
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="queryParams">
<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-form-item>
<el-form-item label="最后学习时间">
<el-date-picker class="oi-item" style="margin-left:5px"
v-model="queryParams.last_time"
type="date"
placeholder="最后学习时间"
format="YYYY-MM-DD"
value-format="x"
/>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<!-- 表格数据-->
<div class="gva-table-box">
<!-- 数据列表-->
<el-table :data="tableData">
<el-table-column align="left" label="ID" prop="course_id" />
<el-table-column align="left" label="最后学习时间" min-width="150" >
<template #default="scope">
{{formatDate(scope.row.CreatedAt)}}
</template>
</el-table-column>
<el-table-column align="left" label="科目" min-width="150" prop="name">
<template #default="scope">
{{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>
<div class="gva-pagination">
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<!-- echart-->
<div class="echarts-box gva-table-box" style="margin-top: 20px">
<div class="report-title">学习报告:</div>
<div id="myEcharts" :style="{ width: '900px', height: '300px',margin: '0 auto' }"></div>
</div>
</div>
</template>
<style scoped lang="scss">
.option-item{
display: flex;
align-items: center;
margin-bottom: 10px;
}
.button-box {
padding: 10px 20px;
.el-button {
float: right;
}
}
.warning {
color: #dc143c;
}
</style>

View File

@ -0,0 +1,155 @@
<script setup>
//
import api from '@/api/userManage'
// import capi from '@/api/course'
import custom from '@/utils/custom'
import {formatDate} from '@/utils/format'
import _ from 'lodash'
// import { toSQLLine } from '@/utils/stringFun'
// import WarningBar from '@/components/warningBar/warningBar.vue'
// import ckEditor from '@/components/richText/ckEditor5.vue'
import {ref,onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
// import * as echarts from 'echarts';
//
const queryParams = ref({
page:1,
pageSize:10,
user_id:0,
type:'', //
time:'', //
})
const tableData = ref([])
const total = ref(0)
const typeList = ref([
{
name:'已中奖',
value:1
},
{
name:'未中奖',
value:2
}
])
//
onMounted(() => {
// getRaffleDetailList()
})
//
async function getRaffleDetailList() {
const res = await api.getRaffleDetailList(queryParams.value)
if(res.code === 0) {
tableData.value = res.data.records
total.value = res.data.total
}
}
function onSubmit() {
getRaffleDetailList()
}
const onReset = () => {
queryParams.value = {
page:1,
pageSize:10,
user_id:0,
type:'', //
time:'', //
}
}
function handleCurrentChange(val) {
queryParams.value.page = val
getRaffleDetailList()
}
function handleSizeChange(val) {
queryParams.value.pageSize = val
getRaffleDetailList()
}
</script>
<template>
<div>
<!-- 搜索框-->
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="queryParams">
<el-form-item label="是否中奖">
<el-select v-model="queryParams.subject" clearable placeholder="请选择">
<el-option
v-for="item in typeList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="抽奖时间">
<el-date-picker class="oi-item" style="margin-left:5px"
v-model="queryParams.last_time"
type="date"
placeholder="抽奖时间"
format="YYYY-MM-DD"
value-format="x"
/>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<!-- 表格数据-->
<div class="gva-table-box">
<!-- 数据列表-->
<el-table :data="tableData">
<el-table-column align="left" label="抽奖时间" min-width="150" >
<template #default="scope">
{{formatDate(scope.row.CreatedAt)}}
</template>
</el-table-column>
<el-table-column align="left" label="抽奖编号" min-width="150" prop="name">
<template #default="scope">
{{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="status" />
<el-table-column align="left" label="是否获奖" min-width="150" prop="status" />
<el-table-column align="left" label="抽奖消费" min-width="150" prop="status" />
</el-table>
<!-- 分页-->
<div class="gva-pagination">
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.option-item{
display: flex;
align-items: center;
margin-bottom: 10px;
}
.button-box {
padding: 10px 20px;
.el-button {
float: right;
}
}
.warning {
color: #dc143c;
}
</style>

View File

@ -0,0 +1,156 @@
<script setup>
//
import api from '@/api/userManage'
import capi from '@/api/course'
import custom from '@/utils/custom'
import {formatDate} from '@/utils/format'
import _ from 'lodash'
import {ref,onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
//
const typeList = custom.getExercisesTypeList()
const queryParams = ref({
page:1,
pageSize:10,
user_id:0,
last_time:'',
subject:''
})
const subjectParams = ref({
page:1,
pageSize:100,
})
const tableData = ref([])
const subjectList = ref([])
const total = ref(0)
//
onMounted(() => {
// getTestDetailList()
getSubject()
})
//
async function getSubject(){ //
const res = await capi.getSubjectList(subjectParams.value)
if(res.code === 0) {
subjectList.value = custom.getStdSubject(res.data.records)
// console.log(subjectList.value)
}
}
async function getTestDetailList() {
const res = await api.getTestDetailList(queryParams.value)
if(res.code === 0) {
tableData.value = res.data.records
total.value = res.data.total
}
}
function onSubmit() {
getTestDetailList()
}
const onReset = () => {
queryParams.value = {
page:1,
pageSize:10,
user_id:0,
last_time:'',
subject:''
}
}
function handleCurrentChange(val) {
queryParams.value.page = val
getTestDetailList()
}
function handleSizeChange(val) {
queryParams.value.pageSize = val
getTestDetailList()
}
</script>
<template>
<div>
<!-- 搜索框-->
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="queryParams">
<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-form-item>
<el-form-item label="测试时间">
<el-date-picker class="oi-item" style="margin-left:5px"
v-model="queryParams.last_time"
type="date"
placeholder="测试时间"
format="YYYY-MM-DD"
value-format="x"
/>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<!-- 表格数据-->
<div class="gva-table-box">
<!-- 数据列表-->
<el-table :data="tableData">
<el-table-column align="left" label="ID" prop="course_id" />
<el-table-column align="left" label="测试时间" min-width="150" >
<template #default="scope">
{{formatDate(scope.row.CreatedAt)}}
</template>
</el-table-column>
<el-table-column align="left" label="科目" min-width="150" prop="name">
<template #default="scope">
{{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="status" />
<el-table-column align="left" label="测试名次" min-width="150" prop="status" />
<el-table-column align="left" label="测试消费" min-width="150" prop="status" />
<el-table-column align="left" label="测试收益" min-width="150" prop="status" />
</el-table>
<!-- 分页-->
<div class="gva-pagination">
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.option-item{
display: flex;
align-items: center;
margin-bottom: 10px;
}
.button-box {
padding: 10px 20px;
.el-button {
float: right;
}
}
.warning {
color: #dc143c;
}
</style>

View File

@ -159,7 +159,7 @@ function getStateName(state) {
<div class="di-right">{{teacherInfo.publish_exam}}</div> <div class="di-right">{{teacherInfo.publish_exam}}</div>
</div> </div>
<div class="dib-item link-item"> <div class="dib-item link-item">
<div class="di-left ">查看课程列表</div> <div class="di-left ">查看试卷列表</div>
</div> </div>
</div> </div>
<div class="dib-row"> <div class="dib-row">

View File

@ -16,6 +16,14 @@ const route = useRoute()
// //
const userManageInfo = ref({}) const userManageInfo = ref({})
const imgs = ref([]) const imgs = ref([])
const detail_type = ref({
dealDetailMoney:'dealDetailMoney',
dealDetailPoint:'dealDetailPoint',
learningDetail:'learningDetail',
testDetail:'testDetail',
auctionDetail:'auctionDetail',//
raffleDetail:'raffleDetail',//
})
// //
onMounted(() => { onMounted(() => {
getUserDetail() getUserDetail()
@ -31,48 +39,17 @@ async function getUserDetail() {
// console.log(imgs.value) // console.log(imgs.value)
} }
} }
const tip_text = ref('') function toDealDetail(type) {
const dialogVisible = ref(false) // let url = ''
const a_type = ref(0) // switch (type){
function actionFunc(type) { // case detail_type.value.dealDetailMoney:
dialogVisible.value = true // url = 'dealDetailMoney';
a_type.value = type // break;
switch (type){ // case 2:
case 3: // url = 'dealDetailPoint';
tip_text.value = '是否同意该教师申请?'; // break;
break; // }
case 2: router.push({name:type,params:{user_id:route.params.id}})
tip_text.value = '是否拒绝该教师申请?';
break;
}
}
async function actionOk() { //
const res = await api.teacherOperator({
teacher_id:userManageInfo.value.user_id,
status:a_type.value
})
if(res.code === 0) {
ElMessage({
type: 'success',
message: res.msg
})
getUserDetail()
}
}
function getStateName(state) {
let str = ''
switch (state){
case 1:
str = '待审核'
break;
case 2:
str = '已拒绝'
break;
case 3:
str = '已同意'
break;
}
return str
} }
</script> </script>
<template> <template>
@ -124,7 +101,7 @@ function getStateName(state) {
<div class="di-left">余额</div> <div class="di-left">余额</div>
<div class="di-right">{{userManageInfo.balance}}</div> <div class="di-right">{{userManageInfo.balance}}</div>
</div> </div>
<div class="dib-item link-item"> <div class="dib-item link-item" @click="toDealDetail(detail_type.dealDetailMoney)">
<div class="di-left">查看交易明细</div> <div class="di-left">查看交易明细</div>
</div> </div>
</div> </div>
@ -133,7 +110,7 @@ function getStateName(state) {
<div class="di-left">积分</div> <div class="di-left">积分</div>
<div class="di-right">{{userManageInfo.points}}</div> <div class="di-right">{{userManageInfo.points}}</div>
</div> </div>
<div class="dib-item link-item"> <div class="dib-item link-item" @click="toDealDetail(detail_type.dealDetailPoint)">
<div class="di-left">查看交易明细</div> <div class="di-left">查看交易明细</div>
</div> </div>
</div> </div>
@ -146,7 +123,7 @@ function getStateName(state) {
<div class="di-left">累计金额</div> <div class="di-left">累计金额</div>
<div class="di-right">{{userManageInfo.course_income}}</div> <div class="di-right">{{userManageInfo.course_income}}</div>
</div> </div>
<div class="dib-item link-item"> <div class="dib-item link-item" @click="toDealDetail(detail_type.learningDetail)">
<div class="di-left">查看学习记录</div> <div class="di-left">查看学习记录</div>
</div> </div>
</div> </div>
@ -159,7 +136,7 @@ function getStateName(state) {
<div class="di-left">累计金额</div> <div class="di-left">累计金额</div>
<div class="di-right">{{userManageInfo.exam_income}}</div> <div class="di-right">{{userManageInfo.exam_income}}</div>
</div> </div>
<div class="dib-item link-item"> <div class="dib-item link-item" @click="toDealDetail(detail_type.testDetail)">
<div class="di-left">查看测试记录</div> <div class="di-left">查看测试记录</div>
</div> </div>
</div> </div>
@ -172,7 +149,7 @@ function getStateName(state) {
<div class="di-left">中奖次数</div> <div class="di-left">中奖次数</div>
<div class="di-right">{{userManageInfo.exam_income}}</div> <div class="di-right">{{userManageInfo.exam_income}}</div>
</div> </div>
<div class="dib-item link-item"> <div class="dib-item link-item" @click="toDealDetail(detail_type.raffleDetail)">
<div class="di-left">查看抽奖记录</div> <div class="di-left">查看抽奖记录</div>
</div> </div>
</div> </div>
@ -185,7 +162,7 @@ function getStateName(state) {
<div class="di-left">中奖次数</div> <div class="di-left">中奖次数</div>
<div class="di-right">{{userManageInfo.exam_income}}</div> <div class="di-right">{{userManageInfo.exam_income}}</div>
</div> </div>
<div class="dib-item link-item"> <div class="dib-item link-item" @click="toDealDetail(detail_type.auctionDetail)">
<div class="di-left">查看竞拍记录</div> <div class="di-left">查看竞拍记录</div>
</div> </div>
</div> </div>
@ -196,7 +173,7 @@ function getStateName(state) {
</div> </div>
<div class="dib-item"> <div class="dib-item">
<div class="di-left">邀请人姓名ID</div> <div class="di-left">邀请人姓名ID</div>
<div class="di-right">{{userManageInfo.invite_id}}</div> <div class="di-right">{{userManageInfo.invite_id}}</div>
</div> </div>
</div> </div>
</div> </div>