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

数据统计bug修改

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