evaluationDeptStartTab.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <div class="startTableDia">
  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: 100px">选择时间:</span>
  9. <el-date-picker v-model="timeIds" type="year" value-format="YYYY" :clearable="false"
  10. placeholder="选择时间" />
  11. </div>
  12. <seachs @handleSeach="getreportTableData" :showRest="false"></seachs>
  13. <el-button type="warning" icon="Download" size="mini" @click="handleExport"
  14. style="margin-left:10px">导出</el-button>
  15. </div>
  16. <div class="reportTTableData">
  17. <el-table :data="reportTableData" ref="report-table" style="width: 100%">
  18. <el-table-column label="部门" prop="deptName" align="center" />
  19. <el-table-column label="序号" type="index" width="50" align="center" />
  20. <el-table-column label="关键业绩指标名称" prop="targetName" align="center" />
  21. <el-table-column label="目标值" prop="targetValue" align="center" />
  22. <el-table-column label="基础分" prop="baseScore" width="80" align="center" />
  23. <el-table-column label="评价标准" prop="evaluationCriteria" align="center" />
  24. </el-table>
  25. </div>
  26. </div>
  27. </div>
  28. </el-dialog>
  29. </div>
  30. </template>
  31. <script>
  32. import seachs from '../seachGroup.vue'
  33. import {
  34. saveAs
  35. } from 'file-saver'
  36. import ExcelJS from 'exceljs'
  37. import fileSave from 'file-saver'
  38. import {
  39. apiGetplanSummaryList,
  40. apiGetplansummaryReport,
  41. apiGetevaluationdownloadReport
  42. } from '../../api/api'
  43. export default {
  44. components: {
  45. seachs
  46. },
  47. data() {
  48. return {
  49. editEvaluaVisible: false,
  50. reportTableData: [],
  51. timeIds: '',
  52. userNameS: '',
  53. ispersonDept: window.sessionStorage.getItem('ispersonDept')
  54. }
  55. },
  56. methods: {
  57. init() {
  58. this.editEvaluaVisible = true
  59. this.reportTableData = []
  60. this.timeIds = new Date().getFullYear().toString()
  61. this.getreportTableData()
  62. },
  63. sortMethods(a, b, it) {
  64. if (a[it] < b[it]) {
  65. return -1
  66. }
  67. },
  68. // 查询数据
  69. getreportTableData() {
  70. let that = this
  71. let params = {
  72. year: that.timeIds
  73. }
  74. apiGetplanSummaryList(params).then(datas => {
  75. if (datas && datas.data) {
  76. that.reportTableData = datas.data
  77. }
  78. })
  79. },
  80. handleExport() {
  81. let that = this
  82. let params = {
  83. year: that.timeIds
  84. }
  85. apiGetplansummaryReport(params).then(datas => {
  86. if (datas && datas.code === 200) {
  87. apiGetevaluationdownloadReport(datas.data).then(datass => {
  88. let blob = new Blob([datass], {
  89. type: 'application/msword;charset=UTF-8'
  90. })
  91. saveAs(blob, `${datas.data}`)
  92. })
  93. }
  94. })
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="less">
  100. .startTableDia {
  101. .el-overlay {
  102. .el-dialog {
  103. // margin-top: 5vh !important;
  104. .el-dialog__body {
  105. padding: 0 20px 30px 20px !important;
  106. .reportTAll {
  107. .el-select,
  108. .el-input {
  109. width: 100%;
  110. }
  111. .reportTBtn {
  112. padding: 10px 20px 0 20px;
  113. .collectSeach {
  114. display: flex;
  115. padding: 24px 20px;
  116. border-bottom: 1px solid#D6DBEA;
  117. .exceed {
  118. display: flex;
  119. .exceedSpan {
  120. height: 12px;
  121. font-size: 14px;
  122. font-family: Microsoft YaHei;
  123. font-weight: 400;
  124. color: #8991B0;
  125. line-height: 12px;
  126. margin-top: 14px;
  127. }
  128. .el-date-editor {
  129. height: 40px;
  130. }
  131. }
  132. span {
  133. font-size: 14px;
  134. }
  135. .PeriodBtn {
  136. display: flex;
  137. justify-content: flex-end;
  138. padding: 20px 0;
  139. }
  140. .el-button {
  141. height: 30px;
  142. // width:100px;
  143. padding: 0 30px;
  144. // padding-top: 8px;
  145. span {
  146. margin: 0;
  147. }
  148. }
  149. }
  150. }
  151. .reportTTableData {
  152. .el-table {
  153. .el-table__body-wrapper {
  154. height: 65vh !important;
  155. }
  156. .el-input__inner {
  157. height: 30px !important;
  158. }
  159. .el-radio__label {
  160. display: none;
  161. }
  162. }
  163. .el-pagination {
  164. margin-top: 20px;
  165. text-align: end;
  166. position: relative;
  167. }
  168. }
  169. .onlyDialog {
  170. .el-overlay {
  171. .el-dialog {
  172. margin-top: 10vh !important;
  173. }
  174. }
  175. }
  176. }
  177. }
  178. .el-dialog__footer {
  179. .dialog-footer {
  180. display: flex;
  181. justify-content: center;
  182. .el-button {
  183. width: 180px !important;
  184. height: 40px !important;
  185. }
  186. }
  187. }
  188. }
  189. }
  190. }
  191. </style>