|
@@ -4,7 +4,13 @@
|
|
|
<el-button size="small" @click="export1" v-if="tool.checkAuth($route.name,'export')">导出</el-button>
|
|
|
</Header>
|
|
|
<div class="container normal-panel">
|
|
|
- <select-panel @yearChange="yearChange" />
|
|
|
+ <select-panel
|
|
|
+ @yearChange="yearChange"
|
|
|
+ @targetChange="targetChange"
|
|
|
+ @clearTarget="targetClear"
|
|
|
+ @searchActive="searchActive"
|
|
|
+ @clearData="searchClear"
|
|
|
+ />
|
|
|
<Table ref="table">
|
|
|
<template v-slot:detail="scope">
|
|
|
<el-button v-if="tool.checkAuth($route.name,'read')" type="text" size="small" @click="$router.push({path:'/PersonalDetail',query:{id:scope.data.data.hrid,year:scope.data.year}})">详情</el-button>
|
|
@@ -36,10 +42,24 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
yearChange(time) {
|
|
|
- console.log(this.$refs.table.year);
|
|
|
-
|
|
|
this.$refs.table.year = time
|
|
|
},
|
|
|
+ targetChange(data) {
|
|
|
+ this.$refs.table.params.content.type = data
|
|
|
+ this.$refs.table.queryData()
|
|
|
+ },
|
|
|
+ targetClear() {
|
|
|
+ this.$refs.table.params.content.type = ''
|
|
|
+ this.$refs.table.queryData()
|
|
|
+ },
|
|
|
+ searchActive(data) {
|
|
|
+ this.$refs.table.params.content.where.condition = data
|
|
|
+ this.$refs.table.queryData()
|
|
|
+ },
|
|
|
+ searchClear() {
|
|
|
+ this.$refs.table.params.content.where.condition = ''
|
|
|
+ this.$refs.table.queryData()
|
|
|
+ },
|
|
|
async export1() {
|
|
|
if(!Object.keys(this.$refs.table.tableData).length > 0) return
|
|
|
let res = await this.$api.requested({
|