first commit
This commit is contained in:
@@ -0,0 +1,179 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.albumId" placeholder="请选择专辑" filterable clearable @change="doSearch">
|
||||
<el-option
|
||||
v-for="item in albumList"
|
||||
:key="item.id"
|
||||
:label="item.title"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" clearable
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 120px;">
|
||||
<el-option label="标题" value="tev.title"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="统计" :app="this">
|
||||
<template #func>
|
||||
<el-button type="primary" size="small" @click="exportXlsx">导出</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<!-- <template v-if="column.prop==='sumDuration'" scope="{row}">-->
|
||||
<!-- {{(row.sumDuration / 60 / 60).toFixed(2) + 'h'}}-->
|
||||
<!-- </template>-->
|
||||
<template v-if="column.prop==='isQualified'" scope="{row}">
|
||||
<span v-if="row.watchCount>=row.qualifiedNum" class="text-success">
|
||||
是
|
||||
</span>
|
||||
<span v-else class="text-danger">
|
||||
否
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" header-align="center" label="操作" width="200">-->
|
||||
<!-- <template scope="{row}">-->
|
||||
<!-- <el-button size="mini" type="primary" @click="openView(row)">查看具体学习情况</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<!-- <template #view>-->
|
||||
<!-- <el-table :data="viewTableData" stripe border style="width: 100%">-->
|
||||
<!-- <el-table-column type="index" label="序号" width="80px">-->
|
||||
<!-- <template scope="scope">-->
|
||||
<!-- <span>{{ scope.$index + (viewPageForm.pageNumber - 1) * viewPageForm.pageSize + 1 }} </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- align="center"-->
|
||||
<!-- header-align="center"-->
|
||||
<!-- v-for="column in viewTableColumns"-->
|
||||
<!-- show-overflow-tooltip-->
|
||||
<!-- :label="column.label"-->
|
||||
<!-- :prop="column.prop"-->
|
||||
<!-- :sortable="column.sortable"-->
|
||||
<!-- >-->
|
||||
<!-- <template v-if="column.prop==='studyDuration'" scope="{row}">-->
|
||||
<!-- {{(row.studyDuration / 60 / 60).toFixed(2) + 'h'}}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
|
||||
<!-- <el-row class="el-pagination-container" style="margin-bottom: 0px">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- @current-change="(val)=>{viewPageForm.pageNumber=val;viewPageData()}"-->
|
||||
<!-- :current-page="viewPageForm.pageNumber"-->
|
||||
<!-- :page-size="viewPageForm.pageSize"-->
|
||||
<!-- layout="total, sizes, prev, pager, next"-->
|
||||
<!-- :total="viewPageForm.totalCount">-->
|
||||
<!-- </el-pagination>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<!-- </template>-->
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/platform/trainEdu/include/include.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'username', label: '姓名'},
|
||||
{prop: 'loginname', label: '工号'},
|
||||
{prop: 'unitname', label: '单位'},
|
||||
{prop: 'unionname', label: '分工会'},
|
||||
// {prop: 'studyDuration', label: '观看总时长'},
|
||||
{prop: 'watchCount', label: '学习总次数'},
|
||||
{prop: 'isQualified', label: '是否达标'},
|
||||
],
|
||||
viewTableColumns: [
|
||||
{prop: 'username', label: '姓名'},
|
||||
{prop: 'loginname', label: '工号'},
|
||||
{prop: 'unitname', label: '单位'},
|
||||
{prop: 'unionname', label: '分工会'},
|
||||
// {prop: 'studyDuration', label: '观看总时长'},
|
||||
{prop: 'watchCount', label: '学习总次数'},
|
||||
],
|
||||
viewPageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
albumId: null
|
||||
},
|
||||
viewTableData: [],
|
||||
|
||||
albumList: [],
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openView(row) {
|
||||
this.viewPageForm.albumId = row.id
|
||||
this.$refs['guava'].view()
|
||||
await this.viewPageData()
|
||||
},
|
||||
async viewPageData() {
|
||||
const resp = await $.post(loc() + '/getWatchDuration', this.viewPageForm)
|
||||
if (resp.code === 0) {
|
||||
this.viewTableData = resp.data.list
|
||||
this.viewPageForm.totalCount = resp.data.totalCount
|
||||
}
|
||||
},
|
||||
viewPageNumberChange(val) {
|
||||
},
|
||||
exportXlsx() {
|
||||
window.open(loc() + '/exportXlsx?albumId=' + this.pageForm.albumId)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.albumList = await getAllAlbum()
|
||||
if (this.albumList) {
|
||||
this.pageForm.albumId = this.albumList[0].id
|
||||
await this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user