evaluationApplicationTab.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <template>
  2. <div class="applicationTable">
  3. <el-dialog title="统计汇总详情" v-model="editEvaluaVisible" :fullscreen="true" :close-on-click-modal="false">
  4. <div class="reportTAll">
  5. <div class="reportTBtn">
  6. <div class="collectSeach">
  7. <div class="exceed">
  8. <span class="exceedSpan" style="width: 80px">选择时间:</span>
  9. <el-date-picker
  10. v-model="timeIds"
  11. type="monthrange"
  12. unlink-panels
  13. value-format="YYYY-MM"
  14. range-separator="To"
  15. start-placeholder="开始时间"
  16. end-placeholder="结束时间"
  17. />
  18. </div>
  19. <div class="exceed" style="margin-left: 10px">
  20. <span class="exceedSpan" style="width: 100px">填报部门:</span>
  21. <el-select v-model="deptNameS" filterable clearable :disabled="userMes.deptId !== '23031009'"
  22. placeholder="请选择部门名称" @change="changeDeptLead">
  23. <el-option
  24. v-for="item in departData"
  25. :key="item.deptId"
  26. :label="item.deptName"
  27. :value="item.deptId">
  28. </el-option>
  29. </el-select>
  30. </div>
  31. <div class="exceed" style="margin-left: 10px">
  32. <span class="exceedSpan" style="width: 100px">人员编号:</span>
  33. <el-input v-model="userNameS" placeholder="请输入人员编号"/>
  34. </div>
  35. <!-- <div class="exceed" style="margin-left: 10px">
  36. <span class="exceedSpan" style="width: 100px">选择人员:</span>
  37. <el-select v-model="userNameS" filterable clearable placeholder="请选择人员">
  38. <el-option
  39. v-for="item in deptLeaderOptionDet"
  40. :key="item.id"
  41. :label="item.name"
  42. :value="item.id">
  43. </el-option>
  44. </el-select>
  45. </div> -->
  46. <seachs @handleSeach="getreportTableData" :showRest="false"></seachs>
  47. <el-button type="info" icon="Download" size="mini" @click="handleExport" style="margin-left:10px">导出</el-button>
  48. </div>
  49. <div class="reportTTableData">
  50. <el-table :data="reportTableData" ref="report-table" style="width: 100%">
  51. <el-table-column label="序号" type="index" width="50" align="center" />
  52. <el-table-column label="人员编码" prop="employeeNo" align="center" />
  53. <el-table-column label="人员姓名" prop="employeeName" align="center" />
  54. <el-table-column label="评定系数" prop="suggestedValue" align="center" />
  55. <el-table-column label="申报月份" prop="declarationMonth" align="center" />
  56. <el-table-column label="申报次数" prop="declarationsNumber" align="center" />
  57. <el-table-column label="申报部门" prop="reportingDepartment" align="center" />
  58. <el-table-column label="评定级别" prop="declarationLevel" align="center" />
  59. </el-table>
  60. </div>
  61. </div>
  62. </div>
  63. </el-dialog>
  64. </div>
  65. </template>
  66. <script>
  67. import seachs from '../seachGroup.vue'
  68. import { saveAs } from 'file-saver'
  69. import ExcelJS from 'exceljs'
  70. import fileSave from 'file-saver'
  71. import {apiGetstatisticalSummaryList, apiGetuserPageList, apiGetExportMsg} from '../../api/api'
  72. export default {
  73. components: {seachs},
  74. data() {
  75. return {
  76. editEvaluaVisible: false,
  77. reportTableData: [],
  78. departData: [],
  79. deptLeaderOptionDet: [],
  80. timeIds: [],
  81. deptNameS: '',
  82. userNameS: '',
  83. userMes: {},
  84. }
  85. },
  86. methods: {
  87. init(departData) {
  88. this.editEvaluaVisible = true
  89. this.departData = departData
  90. this.userMes = JSON.parse(window.sessionStorage.getItem('user'))
  91. this.deptNameS = this.userMes.deptId ? this.userMes.deptId : ''
  92. this.reportTableData = []
  93. let month = (new Date().getMonth()+1) < 10 ? '0'+(new Date().getMonth()+1) : (new Date().getMonth()+1)
  94. let startTim = `${new Date().getFullYear()}-${new Date().getMonth() < 10 ? '0'+new Date().getMonth() : new Date().getMonth()}`
  95. let endTim = `${new Date().getFullYear()}-${month}`
  96. this.timeIds = [startTim, endTim]
  97. this.getreportTableData()
  98. // this.changeDeptLead()
  99. },
  100. sortMethods(a, b, it) {
  101. if (a[it] < b[it]) {
  102. return -1
  103. }
  104. },
  105. // 根据部门查询人员
  106. changeDeptLead(val) {
  107. let that = this
  108. let params = {
  109. current: 1,
  110. size: 500,
  111. orgId: val ? val : ''
  112. }
  113. apiGetuserPageList(params).then(datas =>{
  114. if (datas && datas.data) {
  115. that.deptLeaderOptionDet = datas.data.records
  116. }
  117. })
  118. },
  119. // 查询数据
  120. getreportTableData() {
  121. let that = this
  122. let params = {
  123. // year: this.timeIds.substring(0, this.timeIds.indexOf('-')),
  124. // month: this.timeIds.substring(this.timeIds.indexOf('-')+1, this.timeIds.length)*1
  125. startTime: that.timeIds[0],
  126. endTime: that.timeIds[1],
  127. deptId: that.deptNameS,
  128. // employeeId: that.userNameS
  129. employeeNo: that.userNameS
  130. }
  131. apiGetstatisticalSummaryList(params).then(datas =>{
  132. if (datas && datas.data) {
  133. that.reportTableData = datas.data
  134. }
  135. })
  136. },
  137. handleExport() {
  138. let that = this
  139. let params = {
  140. startTime: that.timeIds[0],
  141. endTime: that.timeIds[1],
  142. deptId: that.deptNameS,
  143. // employeeId: that.userNameS
  144. employeeNo: that.userNameS
  145. }
  146. let url = 'evaluation-dept-ad/generateStatisticalSummaryReports'
  147. let fileName = '统计汇总信息数据.xlsx'
  148. apiGetExportMsg(url,params).then(datas =>{
  149. let blob = new Blob([datas])
  150. saveAs(blob, fileName)
  151. }).catch((r) => {
  152. console.error(r)
  153. })
  154. }
  155. }
  156. }
  157. </script>
  158. <style lang="less">
  159. .applicationTable{
  160. .el-overlay{
  161. .el-dialog{
  162. // margin-top: 5vh !important;
  163. .el-dialog__body{
  164. padding: 0 20px 30px 20px !important;
  165. .reportTAll{
  166. .el-select, .el-input{
  167. width: 100%;
  168. }
  169. .reportTBtn{
  170. padding: 10px 20px 0 20px;
  171. .collectSeach {
  172. display: flex;
  173. padding: 24px 20px;
  174. border-bottom: 1px solid#D6DBEA;
  175. .exceed {
  176. display: flex;
  177. .exceedSpan {
  178. height: 12px;
  179. font-size: 14px;
  180. font-family: Microsoft YaHei;
  181. font-weight: 400;
  182. color: #8991B0;
  183. line-height: 12px;
  184. margin-top: 14px;
  185. }
  186. .el-select{
  187. line-height: 40px !important;
  188. .el-input__inner, .is-disabled{
  189. height:40px !important;
  190. }
  191. .el-input__suffix{
  192. .el-select__caret{
  193. line-height:40px;
  194. }
  195. }
  196. }
  197. .el-date-editor--monthrange{
  198. height: 40px;
  199. }
  200. }
  201. span {
  202. font-size: 14px;
  203. }
  204. .PeriodBtn {
  205. display: flex;
  206. justify-content: flex-end;
  207. padding: 20px 0;
  208. }
  209. .el-button {
  210. height: 30px;
  211. // width:100px;
  212. padding: 0 30px;
  213. // padding-top: 8px;
  214. span {
  215. margin: 0;
  216. }
  217. }
  218. }
  219. }
  220. .reportTTableData{
  221. .el-table{
  222. .el-table__body-wrapper{
  223. height: 65vh !important;
  224. }
  225. .el-input__inner{
  226. height: 30px !important;
  227. }
  228. .el-radio__label{
  229. display: none;
  230. }
  231. }
  232. .el-pagination{
  233. margin-top: 20px;
  234. text-align: end;
  235. position: relative;
  236. }
  237. }
  238. .onlyDialog{
  239. .el-overlay{
  240. .el-dialog{
  241. margin-top: 10vh !important;
  242. }
  243. }
  244. }
  245. }
  246. }
  247. .el-dialog__footer{
  248. .dialog-footer{
  249. display: flex;
  250. justify-content: center;
  251. .el-button{
  252. width: 180px !important;
  253. height: 40px !important;
  254. }
  255. }
  256. }
  257. }
  258. }
  259. }
  260. </style>