Commit 99ffb6fe authored by 张伯涛's avatar 张伯涛

数据统计bug修改

parent 015b59b9
......@@ -135,7 +135,13 @@
</el-table-column>
</el-table>
</div>
<pagination
v-show="detailTotal>0"
:total="detailTotal"
:page.sync="detailQueryParams.page"
:limit.sync="detailQueryParams.rows"
@pagination="detailGetList"
/>
</el-drawer>
</div>
......@@ -252,7 +258,7 @@ export default {
}
],
// 抽屉列表查询参数
detailTotal: 20,
detailTotal: 0,
detailQueryParams: {
page: 1,
rows: 10,
......
......@@ -289,7 +289,7 @@ export default {
// },
],
// 抽屉列表查询参数
detailTotal: 20,
detailTotal: 0,
detailQueryParams: {
id: '',
column: '',
......
......@@ -129,7 +129,7 @@
</el-table-column>
<el-table-column label="试用课程数" align="center" prop="noPay">
<template slot-scope="scope">
<span style="color: #214e90;">{{ scope.row.studentNumber }}</span>
<span style="color: #214e90;">{{ scope.row.noPay }}</span>
</template>
</el-table-column>
<el-table-column label="完成必修课人次" align="center" prop="finish">
......@@ -196,6 +196,13 @@
:prop="column.prop"
/>
</el-table>
<pagination
v-show="detailTotal>0"
:total="detailTotal"
:page.sync="detailQueryParams.page"
:limit.sync="detailQueryParams.rows"
@pagination="detailGetList"
/>
</div>
</el-drawer>
......@@ -343,7 +350,7 @@ export default {
}
],
// 抽屉列表查询参数
detailTotal: 20,
detailTotal: 0,
detailQueryParams: {
page: 1,
rows: 10,
......
......@@ -2,31 +2,37 @@
<div class="errLog-manage">
<div class="list">
<div class="title">
<div class="decoration"></div>
<div class="decoration" />
<div class="text">统计列表</div>
</div>
<div style="padding-bottom: 10px;">
<span style="font-size: 16px;">姓名:</span>
<span>
<el-input v-model="input" placeholder="请输入" style="width: 140px; margin-left: 10px;"></el-input>
<el-input v-model="input" placeholder="请输入" style="width: 140px; margin-left: 10px;" />
<el-button type="primary" style="margin-left: 10px;" @click="searchByName">查询</el-button>
<el-button @click="reset">重置</el-button>
</span>
</div>
<el-table
class="table-class"
v-loading="loading"
class="table-class"
border
:data="list"
@cell-click="clickTable"
stripe
:header-cell-style="{background:'rgb(250,250,250)'}">
:header-cell-style="{background:'rgb(250,250,250)'}"
@cell-click="clickTable"
>
<el-table-column type="index" width="55" label="序号" align="center" />
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="所属单位" align="center" prop="unitName" width="130"
:show-overflow-tooltip="true" />
<el-table-column
label="所属单位"
align="center"
prop="unitName"
width="130"
:show-overflow-tooltip="true"
/>
<el-table-column label="手机号" align="center" prop="phone" :show-overflow-tooltip="true" />
<el-table-column label="累计完成课时数" align="center" prop="lessonHour"></el-table-column>
<el-table-column label="累计完成课时数" align="center" prop="lessonHour" />
<el-table-column label="计划课程总数" align="center" prop="total" :show-overflow-tooltip="true">
<template slot-scope="scope">
......@@ -69,7 +75,6 @@
/>
</div>
<!-- 点击列表数据后的右弹窗 -->
<el-drawer
class="drawer"
......@@ -77,18 +82,18 @@
:visible.sync="drawer"
direction="rtl"
:before-close="handleClose"
size="50%">
size="50%"
>
<div slot="title">
<span style="color: #333333;">统计</span>
</div>
<el-divider></el-divider>
<el-divider />
<div class="title">
<span class="name">{{ this.detailQueryParams.name }}-{{ this.detailQueryParams.unitName }}-{{ this.detailQueryParams.phone }}</span>
<span class="people">
{{this.detailQueryParams.label}}:
{{ this.detailQueryParams.label }}:
<span class="num">{{ this.detailQueryParams.labelInfo }}</span>
</span>
<el-table
......@@ -106,6 +111,13 @@
:prop="column.prop"
/>
</el-table>
<pagination
v-show="detailTotal>0"
:total="detailTotal"
:page.sync="detailQueryParams.page"
:limit.sync="detailQueryParams.rows"
@pagination="detailGetList"
/>
</div>
</el-drawer>
......@@ -116,11 +128,10 @@
<script>
import { getDataCache, setDataCache } from '@/assets/js/filterData'
import { getUserView, getTotal,getLearning,getFinish,getNotStart,getExamedNumber,getNotExamedNumber } from '@/api/dataStatistics/userView'
import { getUserView, getTotal, getLearning, getFinish, getNotStart, getExamedNumber, getNotExamedNumber } from '@/api/dataStatistics/userView'
export default {
name: 'userView',
name: 'UserView',
data() {
return {
......@@ -141,7 +152,7 @@ export default {
finish: '7',
notStart: '7',
examedNumber: '7',
notExamedNumber: '7',
notExamedNumber: '7'
},
{
name: 'xxxx',
......@@ -153,7 +164,7 @@ export default {
finish: '7',
notStart: '7',
examedNumber: '7',
notExamedNumber: '7',
notExamedNumber: '7'
},
{
name: 'xxxx',
......@@ -165,8 +176,8 @@ export default {
finish: '7',
notStart: '7',
examedNumber: '7',
notExamedNumber: '7',
},
notExamedNumber: '7'
}
],
// 查询参数
......@@ -178,15 +189,14 @@ export default {
loginTime: ''
},
// 下面的两个要同时获得,保证能对得上
// 抽屉列表的表头信息
drawerHead: [
{label: '用户类型',prop: 'userType'},
{label: '单位类型',prop: 'companyType'},
{label: '所属单位',prop: 'affiliatedUnit'},
{label: '登录名',prop: 'loginName'},
{label: '用户姓名',prop: 'userName'},
{ label: '用户类型', prop: 'userType' },
{ label: '单位类型', prop: 'companyType' },
{ label: '所属单位', prop: 'affiliatedUnit' },
{ label: '登录名', prop: 'loginName' },
{ label: '用户姓名', prop: 'userName' }
],
// 抽屉列表信息
detailList: [
......@@ -195,32 +205,32 @@ export default {
companyType: '2',
affiliatedUnit: '3',
loginName: '4',
userName: '5',
userName: '5'
},
{
userType: '1',
companyType: '2',
affiliatedUnit: '3',
loginName: '4',
userName: '5',
userName: '5'
},
{
userType: '1',
companyType: '2',
affiliatedUnit: '3',
loginName: '4',
userName: '5',
userName: '5'
},
{
userType: '1',
companyType: '2',
affiliatedUnit: '3',
loginName: '4',
userName: '5',
},
userName: '5'
}
],
// 抽屉列表查询参数
detailTotal: 20,
detailTotal: 0,
detailQueryParams: {
page: 1,
rows: 10,
......@@ -231,10 +241,10 @@ export default {
unitName: '',
phone: '',
label: '',
labelInfo: '',
labelInfo: ''
},
// 右到左的抽屉相关数据
drawer: false,
drawer: false
}
},
computed: {
......@@ -261,7 +271,7 @@ export default {
this.queryParams.rows = 10
this.getList()
},
reset(){
reset() {
this.input = ''
this.queryParams.page = 1
this.queryParams.rows = 10
......@@ -269,14 +279,14 @@ export default {
},
/** 查询分页 */
getList() {
getUserView(this.input, this.queryParams.rows , this.queryParams.page)
.then((res)=>{
let data = res.data
getUserView(this.input, this.queryParams.rows, this.queryParams.page)
.then((res) => {
const data = res.data
this.list = data.records
this.total = data.total
})
.catch((err)=>{
console.log(err);
.catch((err) => {
console.log(err)
})
},
/** 查询分页 */
......@@ -284,131 +294,131 @@ export default {
switch (this.detailQueryParams.column) {
case 'total':
this.drawer = true
getTotal(this.detailQueryParams.id,this.detailQueryParams.page,this.detailQueryParams.rows)
.then((res)=>{
let data = res.data
getTotal(this.detailQueryParams.id, this.detailQueryParams.page, this.detailQueryParams.rows)
.then((res) => {
const data = res.data
this.detailList = data.records
this.drawerHead = [
{label: '学习类型',prop: 'isObligatory'},
{label: '课程名称',prop: 'lessonName'},
{label: '课程讲师',prop: 'teacherName'},
{label: '剩余有效天数',prop: 'availableTrialTime'},
{label: '学习状态',prop: 'status'},
{ label: '学习类型', prop: 'isObligatory' },
{ label: '课程名称', prop: 'lessonName' },
{ label: '课程讲师', prop: 'teacherName' },
{ label: '剩余有效天数', prop: 'availableTrialTime' },
{ label: '学习状态', prop: 'status' }
]
this.detailTotal = data.total
})
.catch((err)=>{
console.log(err);
.catch((err) => {
console.log(err)
})
break;
break
case 'learning':
this.drawer = true
getLearning(this.detailQueryParams.id,this.detailQueryParams.page,this.detailQueryParams.rows)
.then((res)=>{
let data = res.data
getLearning(this.detailQueryParams.id, this.detailQueryParams.page, this.detailQueryParams.rows)
.then((res) => {
const data = res.data
this.detailList = data.records
this.drawerHead = [
{label: '学习类型',prop: 'classType'},
{label: '课程名称',prop: 'className'},
{label: '课程讲师',prop: 'classTeacher'},
{label: '剩余有效天数',prop: 'days'},
{label: '学习进度',prop: 'schedule'},
{ label: '学习类型', prop: 'classType' },
{ label: '课程名称', prop: 'className' },
{ label: '课程讲师', prop: 'classTeacher' },
{ label: '剩余有效天数', prop: 'days' },
{ label: '学习进度', prop: 'schedule' }
]
this.detailTotal = data.total
})
.catch((err)=>{
console.log(err);
.catch((err) => {
console.log(err)
})
break;
break
case 'finish':
this.drawer = true
getFinish(this.detailQueryParams.id,this.detailQueryParams.page,this.detailQueryParams.rows)
.then((res)=>{
let data = res.data
getFinish(this.detailQueryParams.id, this.detailQueryParams.page, this.detailQueryParams.rows)
.then((res) => {
const data = res.data
this.detailList = data.records
this.drawerHead = [
{label: '学习类型',prop: 'classType'},
{label: '课程名称',prop: 'className'},
{label: '课程讲师',prop: 'classTeacher'},
{label: '课时',prop: 'classHour'},
{label: '完成日期',prop: 'finishDate'},
{ label: '学习类型', prop: 'classType' },
{ label: '课程名称', prop: 'className' },
{ label: '课程讲师', prop: 'classTeacher' },
{ label: '课时', prop: 'classHour' },
{ label: '完成日期', prop: 'finishDate' }
]
this.detailTotal = data.total
})
.catch((err)=>{
console.log(err);
.catch((err) => {
console.log(err)
})
break;
break
case 'notStart':
this.drawer = true
getNotStart(this.detailQueryParams.id,this.detailQueryParams.page,this.detailQueryParams.rows)
.then((res)=>{
let data = res.data
getNotStart(this.detailQueryParams.id, this.detailQueryParams.page, this.detailQueryParams.rows)
.then((res) => {
const data = res.data
this.detailList = data.records
this.drawerHead = [
{label: '学习类型',prop: 'classType'},
{label: '课程名称',prop: 'className'},
{label: '课程讲师',prop: 'classTeacher'},
{label: '剩余有效天数',prop: 'days'},
{label: '学习状态',prop: 'status'},
{ label: '学习类型', prop: 'classType' },
{ label: '课程名称', prop: 'className' },
{ label: '课程讲师', prop: 'classTeacher' },
{ label: '剩余有效天数', prop: 'days' },
{ label: '学习状态', prop: 'status' }
]
this.detailTotal = data.total
})
.catch((err)=>{
console.log(err);
.catch((err) => {
console.log(err)
})
break;
break
case 'examedNumber':
this.drawer = true
getExamedNumber(this.detailQueryParams.id,this.detailQueryParams.page,this.detailQueryParams.rows)
.then((res)=>{
let data = res.data
getExamedNumber(this.detailQueryParams.id, this.detailQueryParams.page, this.detailQueryParams.rows)
.then((res) => {
const data = res.data
this.detailList = data.records
this.drawerHead = [
{label: '课程名称',prop: 'className'},
{label: '满分/及格线',prop: 'standard'},
{label: '课程平均分',prop: 'courseAverage'},
{label: '考核提交时间',prop: 'submissionTime'},
{label: '考核成绩(分)',prop: 'score'},
{ label: '课程名称', prop: 'className' },
{ label: '满分/及格线', prop: 'standard' },
{ label: '课程平均分', prop: 'courseAverage' },
{ label: '考核提交时间', prop: 'submissionTime' },
{ label: '考核成绩(分)', prop: 'score' }
]
this.detailTotal = data.total
})
.catch((err)=>{
console.log(err);
.catch((err) => {
console.log(err)
})
break;
break
case 'notExamedNumber':
this.drawer = true
getNotExamedNumber(this.detailQueryParams.id,this.detailQueryParams.page,this.detailQueryParams.rows)
.then((res)=>{
let data = res.data
getNotExamedNumber(this.detailQueryParams.id, this.detailQueryParams.page, this.detailQueryParams.rows)
.then((res) => {
const data = res.data
this.detailList = data.records
this.drawerHead = [
{label: '课程名称',prop: 'className'},
{label: '满分/及格线',prop: 'standard'},
{label: '课程平均分',prop: 'courseAverage'},
{label: '最高分',prop: 'topScore'},
{label: '最低分',prop: 'lowScore'},
{ label: '课程名称', prop: 'className' },
{ label: '满分/及格线', prop: 'standard' },
{ label: '课程平均分', prop: 'courseAverage' },
{ label: '最高分', prop: 'topScore' },
{ label: '最低分', prop: 'lowScore' }
]
this.detailTotal = data.total
})
.catch((err)=>{
console.log(err);
.catch((err) => {
console.log(err)
})
break;
break
default:
// console.log('Unknown fruit.');
}
......@@ -418,7 +428,7 @@ export default {
done()
},
// 获取被点击的格的信息
clickTable(row,column,event,cell) {
clickTable(row, column, event, cell) {
this.detailList = []
this.detailQueryParams.page = 1
this.detailQueryParams.rows = 10
......@@ -435,7 +445,7 @@ export default {
this.detailQueryParams.label = column.label
this.detailQueryParams.labelInfo = row[column.property]
this.detailGetList(this.detailQueryParams.rows, this.detailQueryParams.page)
},
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment