123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- <template>
- <div class="applicationTable">
- <el-dialog title="统计汇总详情" v-model="editEvaluaVisible" :fullscreen="true" :close-on-click-modal="false">
- <div class="reportTAll">
- <div class="reportTBtn">
- <div class="collectSeach">
- <div class="exceed">
- <span class="exceedSpan" style="width: 80px">选择时间:</span>
- <el-date-picker
- v-model="timeIds"
- type="monthrange"
- unlink-panels
- value-format="YYYY-MM"
- range-separator="To"
- start-placeholder="开始时间"
- end-placeholder="结束时间"
- />
- </div>
- <div class="exceed" style="margin-left: 10px">
- <span class="exceedSpan" style="width: 100px">填报部门:</span>
- <el-select v-model="deptNameS" filterable clearable :disabled="userMes.deptId !== '23031009'"
- placeholder="请选择部门名称" @change="changeDeptLead">
- <el-option
- v-for="item in departData"
- :key="item.deptId"
- :label="item.deptName"
- :value="item.deptId">
- </el-option>
- </el-select>
- </div>
- <div class="exceed" style="margin-left: 10px">
- <span class="exceedSpan" style="width: 100px">人员编号:</span>
- <el-input v-model="userNameS" placeholder="请输入人员编号"/>
- </div>
- <!-- <div class="exceed" style="margin-left: 10px">
- <span class="exceedSpan" style="width: 100px">选择人员:</span>
- <el-select v-model="userNameS" filterable clearable placeholder="请选择人员">
- <el-option
- v-for="item in deptLeaderOptionDet"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div> -->
- <seachs @handleSeach="getreportTableData" :showRest="false"></seachs>
- <el-button type="info" icon="Download" size="mini" @click="handleExport" style="margin-left:10px">导出</el-button>
- </div>
- <div class="reportTTableData">
- <el-table :data="reportTableData" ref="report-table" style="width: 100%">
- <el-table-column label="序号" type="index" width="50" align="center" />
- <el-table-column label="人员编码" prop="employeeNo" align="center" />
- <el-table-column label="人员姓名" prop="employeeName" align="center" />
- <el-table-column label="评定系数" prop="suggestedValue" align="center" />
- <el-table-column label="申报月份" prop="declarationMonth" align="center" />
- <el-table-column label="申报次数" prop="declarationsNumber" align="center" />
- <el-table-column label="申报部门" prop="reportingDepartment" align="center" />
- <el-table-column label="评定级别" prop="declarationLevel" align="center" />
- </el-table>
- </div>
- </div>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import seachs from '../seachGroup.vue'
- import { saveAs } from 'file-saver'
- import ExcelJS from 'exceljs'
- import fileSave from 'file-saver'
- import {apiGetstatisticalSummaryList, apiGetuserPageList, apiGetExportMsg} from '../../api/api'
- export default {
- components: {seachs},
- data() {
- return {
- editEvaluaVisible: false,
- reportTableData: [],
- departData: [],
- deptLeaderOptionDet: [],
- timeIds: [],
- deptNameS: '',
- userNameS: '',
- userMes: {},
- }
- },
- methods: {
- init(departData) {
- this.editEvaluaVisible = true
- this.departData = departData
- this.userMes = JSON.parse(window.sessionStorage.getItem('user'))
- this.deptNameS = this.userMes.deptId ? this.userMes.deptId : ''
- this.reportTableData = []
- let month = (new Date().getMonth()+1) < 10 ? '0'+(new Date().getMonth()+1) : (new Date().getMonth()+1)
- let startTim = `${new Date().getFullYear()}-${new Date().getMonth() < 10 ? '0'+new Date().getMonth() : new Date().getMonth()}`
- let endTim = `${new Date().getFullYear()}-${month}`
- this.timeIds = [startTim, endTim]
- this.getreportTableData()
- // this.changeDeptLead()
- },
- sortMethods(a, b, it) {
- if (a[it] < b[it]) {
- return -1
- }
- },
- // 根据部门查询人员
- changeDeptLead(val) {
- let that = this
- let params = {
- current: 1,
- size: 500,
- orgId: val ? val : ''
- }
- apiGetuserPageList(params).then(datas =>{
- if (datas && datas.data) {
- that.deptLeaderOptionDet = datas.data.records
- }
- })
- },
- // 查询数据
- getreportTableData() {
- let that = this
- let params = {
- // year: this.timeIds.substring(0, this.timeIds.indexOf('-')),
- // month: this.timeIds.substring(this.timeIds.indexOf('-')+1, this.timeIds.length)*1
- startTime: that.timeIds[0],
- endTime: that.timeIds[1],
- deptId: that.deptNameS,
- // employeeId: that.userNameS
- employeeNo: that.userNameS
- }
- apiGetstatisticalSummaryList(params).then(datas =>{
- if (datas && datas.data) {
- that.reportTableData = datas.data
- }
- })
- },
- handleExport() {
- let that = this
- let params = {
- startTime: that.timeIds[0],
- endTime: that.timeIds[1],
- deptId: that.deptNameS,
- // employeeId: that.userNameS
- employeeNo: that.userNameS
- }
- let url = 'evaluation-dept-ad/generateStatisticalSummaryReports'
- let fileName = '统计汇总信息数据.xlsx'
- apiGetExportMsg(url,params).then(datas =>{
- let blob = new Blob([datas])
- saveAs(blob, fileName)
- }).catch((r) => {
- console.error(r)
- })
- }
- }
- }
- </script>
- <style lang="less">
- .applicationTable{
- .el-overlay{
- .el-dialog{
- // margin-top: 5vh !important;
- .el-dialog__body{
- padding: 0 20px 30px 20px !important;
- .reportTAll{
- .el-select, .el-input{
- width: 100%;
- }
- .reportTBtn{
- padding: 10px 20px 0 20px;
- .collectSeach {
- display: flex;
- padding: 24px 20px;
- border-bottom: 1px solid#D6DBEA;
- .exceed {
- display: flex;
- .exceedSpan {
- height: 12px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #8991B0;
- line-height: 12px;
- margin-top: 14px;
- }
- .el-select{
- line-height: 40px !important;
- .el-input__inner, .is-disabled{
- height:40px !important;
- }
- .el-input__suffix{
- .el-select__caret{
- line-height:40px;
- }
- }
- }
- .el-date-editor--monthrange{
- height: 40px;
- }
- }
- span {
- font-size: 14px;
- }
- .PeriodBtn {
- display: flex;
- justify-content: flex-end;
- padding: 20px 0;
- }
- .el-button {
- height: 30px;
- // width:100px;
- padding: 0 30px;
- // padding-top: 8px;
- span {
- margin: 0;
- }
- }
- }
- }
- .reportTTableData{
- .el-table{
- .el-table__body-wrapper{
- height: 65vh !important;
- }
- .el-input__inner{
- height: 30px !important;
- }
- .el-radio__label{
- display: none;
- }
- }
- .el-pagination{
- margin-top: 20px;
- text-align: end;
- position: relative;
- }
- }
- .onlyDialog{
- .el-overlay{
- .el-dialog{
- margin-top: 10vh !important;
- }
- }
- }
- }
- }
- .el-dialog__footer{
- .dialog-footer{
- display: flex;
- justify-content: center;
- .el-button{
- width: 180px !important;
- height: 40px !important;
- }
- }
- }
- }
- }
- }
- </style>
|