first commit
This commit is contained in:
@@ -0,0 +1,199 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker :clearable="false"
|
||||
@change="yearChange"
|
||||
placeholder="年度"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
|
||||
<el-select :clearable="false" v-model="pageForm.hdid">
|
||||
<el-option :key="i.value"
|
||||
:label="i.label"
|
||||
:value="i.value"
|
||||
v-for="i in hdxxlist"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-cascader :options="hdxxlist"
|
||||
@change="(v)=>{ pageForm.hdid = clone(v).pop() }"
|
||||
clearable filterable
|
||||
placeholder="请选择活动主题"
|
||||
v-model="pageForm.hdids"></el-cascader>-->
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-input @keyup.enter.native="doSearch" clearable
|
||||
placeholder="请输入内容" v-model="pageForm.searchKeyword">
|
||||
<el-select clearable placeholder="查询类型" slot="prepend"
|
||||
style="width: 120px;"
|
||||
v-model="pageForm.searchName">
|
||||
<!-- <el-option v-if="hasSuperAdminOrXghRole" label="分工会" value="gh.unionname"></el-option>-->
|
||||
<!-- <el-option label="单位" value="dw.name"></el-option>-->
|
||||
<el-option label="教职工姓名" value="sbr.username"></el-option>
|
||||
<el-option label="工资号" value="sbr.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<el-row class="btn-group tool-button">
|
||||
<el-select @change="unionChange" clearable="true" filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 200px;"
|
||||
v-if="hasSuperAdminOrXghRole" v-model="pageForm.union">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
|
||||
<el-row class="btn-group tool-button">
|
||||
<el-select clearable="true" filterable="true" placeholder="所属单位"
|
||||
style="width: 200px;"
|
||||
v-model="pageForm.unit">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button @click="exportExcel(1)" size="medium">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出获奖人员名单
|
||||
</el-button>
|
||||
<el-button @click="exportExcel(2)" size="medium" v-if="hasSuperAdminOrXghRole">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出分工会获奖信息
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="50">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="姓名" prop="username"
|
||||
sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工资号"
|
||||
prop="loginname"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="单位" prop="dwname"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="分工会" prop="ghname"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="获奖次数" prop="hjcount"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-size="pageForm.pageSize"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageNumberChange"
|
||||
@size-change="pageSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
hasSuperAdminOrXghRole: "${@shiro.hasAnyRoles('sysadmin,A06',',')}" === 'true' ? true : false,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
hdid: null,
|
||||
searchName: 'sbr.username'
|
||||
},
|
||||
tableData: [],
|
||||
hdxxlist: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async unionChange() {
|
||||
this.$set(this.pageForm, "unit", null)
|
||||
this.units = await getUnits(this.pageForm.union)
|
||||
},
|
||||
|
||||
exportExcel: function (num) {
|
||||
var self = this;
|
||||
var hdid = self.pageForm.hdid;
|
||||
if (hdid === '') {
|
||||
this.$message.warning('请先选择活动主题');
|
||||
return;
|
||||
}
|
||||
window.location.href = base + '/platform/hd/childhd/hjxx/exportExcel?num=' + num + '&hdid=' + hdid;
|
||||
},
|
||||
doSearch: function () {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
},
|
||||
async initHdxxlist() {
|
||||
const data = await $.post(base + '/platform/hd/childhd/zpxx/initHdxxlist')
|
||||
if (data.code == 0) {
|
||||
this.yearActivityList = data.data
|
||||
let activityList = []
|
||||
data.data.map(v => {
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
this.hdxxlist = activityList
|
||||
}
|
||||
},
|
||||
yearChange(val) {
|
||||
let activityList = []
|
||||
if (val === null) {
|
||||
this.yearActivityList.map(v => {
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
} else {
|
||||
let enen = this.yearActivityList.filter(v => v.value == val)
|
||||
enen.map(v => {
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
}
|
||||
|
||||
this.hdxxlist = activityList
|
||||
if (this.hdxxlist && this.hdxxlist.length > 0) {
|
||||
this.$set(this.pageForm, 'hdid', this.hdxxlist[0].value);
|
||||
} else {
|
||||
this.$set(this.pageForm, 'hdid', null);
|
||||
}
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initHdxxlist()
|
||||
await this.yearChange(new Date().getFullYear() + '');
|
||||
this.unions = await getUnions()
|
||||
this.units = await getUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user