evaluationDeptRatingPage.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949
  1. <template>
  2. <div class="evaluationRating">
  3. <div class="evaluationRatingBtn">
  4. <div class="collectSeach" :style="$utils.collectSeachSty()">
  5. <div class="exceed">
  6. <span class="exceedSpan">部门名称:</span>
  7. <el-input v-model="resDeptName" placeholder="请输入部门名称"></el-input>
  8. </div>
  9. <div class="exceed">
  10. <span class="exceedSpan" style="width: 80px">考评年度:</span>
  11. <el-date-picker v-model="resAnnual" type="year" value-format="YYYY" placeholder="选择年份" />
  12. </div>
  13. <seachs @handleSeach="getSeachData" @handleRest="resetSeach"></seachs>
  14. </div>
  15. <div class="PeriodBtn" :style="$utils.PeriodBtnSty()">
  16. <btns :showImport="$utils.havePurview('evaluationDeptRating:oneLevel:import')"
  17. :showExport="$utils.havePurview('evaluationDeptRating:oneLevel:export')"
  18. :showSave="$utils.havePurview('evaluationDeptRating:oneLevel:save')"
  19. :showAdd="$utils.havePurview('evaluationDeptRating:oneLevel:add')"
  20. :showDelete="$utils.havePurview('evaluationDeptRating:oneLevel:delete')"
  21. :disSave="changeDateSelect.length === 0 || changeDateSelect.length>1"
  22. :disDelete="changeDateSelect.length === 0" :disImport="false" :disExport="false"
  23. @handleAdd="handleAdd" @handleEdit="handleEdit" @handleDelete="handleDelete"
  24. @handleImport="handleImport" @handleExport="handleExport"></btns>
  25. </div>
  26. <div class="evaluationRatingTableData">
  27. <!-- @row-click="rowClickToggle" -->
  28. <!-- .length>0?evaluationRatingData.slice((page.currentPage-1)*page.pagesize, page.currentPage*page.pagesize):evaluationRatingData -->
  29. <el-table :data="evaluationRatingData" style="width: 100%" ref="tableRating"
  30. :class="evaldeptRatingTableSty()" @select="rowClick" @select-all="rowClick">
  31. <el-table-column type="selection" label="操作" align="center"></el-table-column>
  32. <el-table-column type="index" label="序号" align="center"></el-table-column>
  33. <el-table-column label="考评部门" width="200">
  34. <template #default="scope">
  35. <el-tooltip class="box-item" effect="customized" :content="scope.row.deptName"
  36. placement="right">
  37. <span class="tooltipCC">{{scope.row.deptName}}</span>
  38. </el-tooltip>
  39. </template>
  40. </el-table-column>
  41. <el-table-column label="考评年度" prop="annual" />
  42. <el-table-column :label="it.label" :prop="it.value" v-for="it in monthArr" :key="it.value">
  43. <template #default="scope">
  44. <el-tooltip class="box-item" effect="customized" :content="scope.row[it.value+'Content']"
  45. placement="right">
  46. <span class="tooltipCCDes"
  47. :style="scope.row[it.value] === 'A' ? 'color: #1f52b2' : scope.row[it.value] === 'C' ? 'color: red' : '' ">{{scope.row[it.value]}}</span>
  48. </el-tooltip>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="A级总数" prop="acount" />
  52. <el-table-column label="C级总数" prop="ccount" />
  53. </el-table>
  54. <!-- <el-pagination
  55. @size-change="handleSizeChange"
  56. @current-change="handleCurrentChange"
  57. :current-page="page.currentPage"
  58. :page-size="page.pagesize"
  59. layout="total, prev, pager, next, jumper"
  60. :total="page.total">
  61. </el-pagination> -->
  62. </div>
  63. <el-dialog :title="title" custom-class="startToDia" v-model="dialogVisible" width="600px"
  64. :close-on-click-modal="false">
  65. <div class="periodFrom">
  66. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"
  67. :validate-on-rule-change="false">
  68. <el-form-item label="考评部门" prop="department">
  69. <el-select v-model="ruleForm.department" placeholder="请选择考评部门" filterable
  70. :disabled="isSave">
  71. <el-option v-for="item in departData" :key="item.id" :label="item.name"
  72. :value="item.id">
  73. </el-option>
  74. </el-select>
  75. </el-form-item>
  76. <el-form-item label="年份" prop="year">
  77. <el-date-picker v-model="ruleForm.year" :disabled="isSave" type="year" value-format="YYYY"
  78. placeholder="请选择年份" />
  79. </el-form-item>
  80. <el-row>
  81. <el-col :span="12">
  82. <el-form-item :label="it.label" :prop="it.value" v-for="it in monthArrLeft"
  83. :key="it.value">
  84. <el-select v-model="ruleForm[it.value]" placeholder="请选择评级" clearable
  85. @change="(val)=>changeAData(val, it)" @clear="(val)=>clearAData(val, it)">
  86. <el-option v-for="item in ratingArr" :key="item.value" :label="item.label"
  87. :value="item.value">
  88. </el-option>
  89. </el-select>
  90. </el-form-item>
  91. </el-col>
  92. <el-col :span="12">
  93. <el-form-item :label="it.label" :prop="it.value" v-for="it in monthArrRight"
  94. :key="it.value">
  95. <el-select v-model="ruleForm[it.value]" placeholder="请选择评级" clearable
  96. @change="(val)=>changeAData(val, it)" @clear="(val)=>clearAData(val, it)">
  97. <el-option v-for="item in ratingArr" :key="item.value" :label="item.label"
  98. :value="item.value">
  99. </el-option>
  100. </el-select>
  101. </el-form-item>
  102. </el-col>
  103. </el-row>
  104. <el-form-item :label="it.label+'通告'" :prop="it.value+'Content'" v-for="it in acauseDataArr"
  105. :key="it.value">
  106. <el-input v-model="ruleForm[it.value+'Content']" placeholder="请输入通告"></el-input>
  107. </el-form-item>
  108. </el-form>
  109. </div>
  110. <template #footer>
  111. <span class="dialog-footer">
  112. <el-button @click="dialogVisible = false">取 消</el-button>
  113. <el-button type="primary" @click="saveevaluaStart('ruleForm')">确 定</el-button>
  114. </span>
  115. </template>
  116. </el-dialog>
  117. </div>
  118. <start-from-list ref="startFromDetail"></start-from-list>
  119. <import-dailog ref="importPage" @successImport="successImport"></import-dailog>
  120. </div>
  121. </template>
  122. <script>
  123. import importDailog from '../importPage/importDailog.vue'
  124. import startFromList from './evaluationDeptStartFrom.vue'
  125. import btns from '../elbuttonS.vue'
  126. import seachs from '../seachGroup.vue'
  127. import ExcelJS from 'exceljs'
  128. import fileSave from 'file-saver'
  129. import {
  130. apiGetevaluationdeptratinglist,
  131. apiGetevaluationdeptratingsave,
  132. apiGetorganizationstructureFromTree,
  133. apiPostevaluationdeptratingDelete
  134. } from '../../api/api'
  135. export default {
  136. components: {
  137. startFromList,
  138. importDailog,
  139. btns,
  140. seachs
  141. },
  142. data() {
  143. return {
  144. dialogVisible: false,
  145. isSave: false,
  146. title: '',
  147. evalradio: {},
  148. changeDateSelect: [],
  149. evaluationRatingData: [],
  150. departData: [],
  151. page: {
  152. pagesize: 12,
  153. currentPage: 1,
  154. total: 0
  155. },
  156. ruleForm: {
  157. department: '',
  158. year: '',
  159. jan: '',
  160. feb: '',
  161. mar: '',
  162. apr: '',
  163. may: '',
  164. jun: '',
  165. jul: '',
  166. aug: '',
  167. sep: '',
  168. oct: '',
  169. nov: '',
  170. dece: '',
  171. janContent: '',
  172. febContent: '',
  173. marContent: '',
  174. aprContent: '',
  175. mayContent: '',
  176. junContent: '',
  177. julContent: '',
  178. augContent: '',
  179. sepContent: '',
  180. octContent: '',
  181. novContent: '',
  182. deceContent: ''
  183. },
  184. winPix: window.devicePixelRatio,
  185. innerWidth: window.innerWidth,
  186. rules: {
  187. department: [{
  188. required: true,
  189. message: '请选择考评部门',
  190. trigger: 'change'
  191. }],
  192. year: [{
  193. required: true,
  194. message: '请选择年份',
  195. trigger: 'change'
  196. }],
  197. janContent: [{
  198. required: true,
  199. message: '请输入通告',
  200. trigger: 'blur'
  201. }],
  202. febContent: [{
  203. required: true,
  204. message: '请输入通告',
  205. trigger: 'blur'
  206. }],
  207. marContent: [{
  208. required: true,
  209. message: '请输入通告',
  210. trigger: 'blur'
  211. }],
  212. aprContent: [{
  213. required: true,
  214. message: '请输入通告',
  215. trigger: 'blur'
  216. }],
  217. mayContent: [{
  218. required: true,
  219. message: '请输入通告',
  220. trigger: 'blur'
  221. }],
  222. junContent: [{
  223. required: true,
  224. message: '请输入通告',
  225. trigger: 'blur'
  226. }],
  227. julContent: [{
  228. required: true,
  229. message: '请输入通告',
  230. trigger: 'blur'
  231. }],
  232. augContent: [{
  233. required: true,
  234. message: '请输入通告',
  235. trigger: 'blur'
  236. }],
  237. sepContent: [{
  238. required: true,
  239. message: '请输入通告',
  240. trigger: 'blur'
  241. }],
  242. octContent: [{
  243. required: true,
  244. message: '请输入通告',
  245. trigger: 'blur'
  246. }],
  247. novContent: [{
  248. required: true,
  249. message: '请输入通告',
  250. trigger: 'blur'
  251. }],
  252. deceContent: [{
  253. required: true,
  254. message: '请输入通告',
  255. trigger: 'blur'
  256. }]
  257. },
  258. resDeptName: '',
  259. resAnnual: '',
  260. monthArr: [],
  261. monthArrLeft: [],
  262. monthArrRight: [],
  263. ratingArr: [],
  264. acauseDataArr: []
  265. }
  266. },
  267. created() {
  268. this.monthArrLeft = [{
  269. label: '一月',
  270. value: 'jan',
  271. },
  272. {
  273. label: '二月',
  274. value: 'feb',
  275. },
  276. {
  277. label: '三月',
  278. value: 'mar',
  279. },
  280. {
  281. label: '四月',
  282. value: 'apr',
  283. },
  284. {
  285. label: '五月',
  286. value: 'may',
  287. },
  288. {
  289. label: '六月',
  290. value: 'jun',
  291. }
  292. ]
  293. this.monthArrRight = [{
  294. label: '七月',
  295. value: 'jul',
  296. },
  297. {
  298. label: '八月',
  299. value: 'aug',
  300. },
  301. {
  302. label: '九月',
  303. value: 'sep',
  304. },
  305. {
  306. label: '十月',
  307. value: 'oct',
  308. },
  309. {
  310. label: '十一月',
  311. value: 'nov',
  312. },
  313. {
  314. label: '十二月',
  315. value: 'dece',
  316. },
  317. ]
  318. this.monthArr = this.monthArrLeft.concat(this.monthArrRight)
  319. this.ratingArr = [{
  320. label: 'A级',
  321. value: 'A'
  322. },
  323. {
  324. label: 'B级',
  325. value: 'B'
  326. },
  327. {
  328. label: 'C级',
  329. value: 'C'
  330. }
  331. ]
  332. this.resAnnual = new Date().getFullYear().toString()
  333. this.getevaluRatingList()
  334. this.getDepartmentFromTreeData()
  335. },
  336. methods: {
  337. // 查询列表页面
  338. getevaluRatingList() {
  339. let that = this
  340. let userMes = JSON.parse(window.sessionStorage.getItem('user'))
  341. let params = {
  342. pageNum: that.page.currentPage,
  343. pageSize: that.page.pagesize,
  344. deptId: userMes.deptId,
  345. deptName: that.resDeptName,
  346. annual: that.resAnnual
  347. }
  348. apiGetevaluationdeptratinglist(params).then(datas => {
  349. if (datas && datas.data) {
  350. that.evaluationRatingData = datas.data
  351. }
  352. })
  353. },
  354. // 查询部门
  355. getDepartmentFromTreeData() {
  356. let that = this
  357. let params = {
  358. id: '23031001',
  359. num: 1,
  360. type: 140
  361. }
  362. apiGetorganizationstructureFromTree(params).then(datas => {
  363. if (datas && datas.data) {
  364. that.departData = datas.data[0].children
  365. }
  366. })
  367. },
  368. evaluationRatingFn() {
  369. if (this.evaluationRatingData.length > 0) {
  370. evaluationRatingData.slice((page.currentPage - 1) * page.pagesize, page.currentPage * page.pagesize)
  371. }
  372. },
  373. // rowClickToggle(row) {
  374. // this.$refs.tableRating.toggleRowSelection(row)
  375. // },
  376. changeAData(val, data) {
  377. if (val !== '') {
  378. this.monthArr.forEach(it => {
  379. if (data.label === it.label) {
  380. let model = false
  381. this.acauseDataArr.forEach((iv, index) => {
  382. if (data.label === iv.label) {
  383. model = true
  384. }
  385. })
  386. if (!model) {
  387. this.acauseDataArr.push(it)
  388. }
  389. }
  390. })
  391. }
  392. },
  393. clearAData(val, data) {
  394. this.acauseDataArr.forEach((it, index) => {
  395. if (data.label === it.label) {
  396. this.acauseDataArr.splice(index, 1)
  397. }
  398. })
  399. },
  400. saveevaluaStart(formName) {
  401. let that = this
  402. that.$refs[formName].validate((valid) => {
  403. if (valid) {
  404. that.saveAndEditIndicatorData()
  405. }
  406. });
  407. },
  408. //新增/修改考评启动数据
  409. saveAndEditIndicatorData() {
  410. let that = this
  411. let orgName = ''
  412. this.departData.forEach(item => {
  413. if (item.id === that.ruleForm.department) {
  414. orgName = item.name
  415. }
  416. })
  417. let userMes = JSON.parse(window.sessionStorage.getItem('user'))
  418. let params = {
  419. deptId: that.ruleForm.department,
  420. deptName: orgName,
  421. annual: that.ruleForm.year,
  422. jan: that.ruleForm.jan,
  423. feb: that.ruleForm.feb,
  424. mar: that.ruleForm.mar,
  425. apr: that.ruleForm.apr,
  426. may: that.ruleForm.may,
  427. jun: that.ruleForm.jun,
  428. jul: that.ruleForm.jul,
  429. aug: that.ruleForm.aug,
  430. sep: that.ruleForm.sep,
  431. oct: that.ruleForm.oct,
  432. nov: that.ruleForm.nov,
  433. dece: that.ruleForm.dece,
  434. janContent: that.ruleForm.janContent,
  435. febContent: that.ruleForm.febContent,
  436. marContent: that.ruleForm.marContent,
  437. aprContent: that.ruleForm.aprContent,
  438. mayContent: that.ruleForm.mayContent,
  439. junContent: that.ruleForm.junContent,
  440. julContent: that.ruleForm.julContent,
  441. augContent: that.ruleForm.augContent,
  442. sepContent: that.ruleForm.sepContent,
  443. octContent: that.ruleForm.octContent,
  444. novContent: that.ruleForm.novContent,
  445. deceContent: that.ruleForm.deceContent,
  446. createBy: userMes.id,
  447. createName: userMes.name
  448. }
  449. if (that.isSave) {
  450. params.id = that.evalradio.id
  451. }
  452. apiGetevaluationdeptratingsave(params).then(datas => {
  453. if (!datas.success) {
  454. that.$message({
  455. message: datas.message,
  456. type: 'error'
  457. });
  458. } else {
  459. if (!that.isSave) {
  460. that.$message({
  461. message: '部门绩效考核评级新增成功',
  462. type: 'success'
  463. });
  464. } else {
  465. that.$message({
  466. message: '部门绩效考核评级修改成功',
  467. type: 'success'
  468. });
  469. }
  470. that.dialogVisible = false
  471. that.changeDateSelect = []
  472. that.getevaluRatingList()
  473. }
  474. })
  475. },
  476. getSeachData() {
  477. this.page.currentPage = 1
  478. this.getevaluRatingList()
  479. },
  480. resetSeach() {
  481. this.page.currentPage = 1
  482. this.resDeptName = ''
  483. this.resAnnual = new Date().getFullYear().toString()
  484. this.getevaluRatingList()
  485. },
  486. handleSizeChange(val) {
  487. this.page.pagesize = val
  488. this.getevaluRatingList()
  489. },
  490. handleCurrentChange(val) {
  491. this.page.currentPage = val
  492. this.getevaluRatingList()
  493. },
  494. rowClick(selection, row) {
  495. this.changeDateSelect = selection
  496. },
  497. handleAdd() {
  498. this.dialogVisible = true
  499. this.isSave = false
  500. this.title = '新建部门绩效考核评级'
  501. this.acauseDataArr = []
  502. this.$nextTick(() => {
  503. // this.$refs['ruleForm'].resetFields()
  504. this.ruleForm = {
  505. department: '',
  506. year: '',
  507. jan: '',
  508. feb: '',
  509. mar: '',
  510. apr: '',
  511. may: '',
  512. jun: '',
  513. jul: '',
  514. aug: '',
  515. sep: '',
  516. oct: '',
  517. nov: '',
  518. dece: '',
  519. janContent: '',
  520. febContent: '',
  521. marContent: '',
  522. aprContent: '',
  523. mayContent: '',
  524. junContent: '',
  525. julContent: '',
  526. augContent: '',
  527. sepContent: '',
  528. octContent: '',
  529. novContent: '',
  530. deceContent: ''
  531. }
  532. })
  533. },
  534. handleEdit() {
  535. this.dialogVisible = true
  536. this.isSave = true
  537. this.title = '修改部门绩效考核评级'
  538. this.evalradio = this.changeDateSelect[0]
  539. this.acauseDataArr = []
  540. this.ruleForm = {
  541. department: this.evalradio.deptId,
  542. year: this.evalradio.annual,
  543. jan: this.evalradio.jan,
  544. feb: this.evalradio.feb,
  545. mar: this.evalradio.mar,
  546. apr: this.evalradio.apr,
  547. may: this.evalradio.may,
  548. jun: this.evalradio.jun,
  549. jul: this.evalradio.jul,
  550. aug: this.evalradio.aug,
  551. sep: this.evalradio.sep,
  552. oct: this.evalradio.oct,
  553. nov: this.evalradio.nov,
  554. dece: this.evalradio.dece,
  555. janContent: this.evalradio.janContent,
  556. febContent: this.evalradio.febContent,
  557. marContent: this.evalradio.marContent,
  558. aprContent: this.evalradio.aprContent,
  559. mayContent: this.evalradio.mayContent,
  560. junContent: this.evalradio.junContent,
  561. julContent: this.evalradio.julContent,
  562. augContent: this.evalradio.augContent,
  563. sepContent: this.evalradio.sepContent,
  564. octContent: this.evalradio.octContent,
  565. novContent: this.evalradio.novContent,
  566. deceContent: this.evalradio.deceContent
  567. }
  568. let arr = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dece']
  569. arr.forEach(it => {
  570. if (this.evalradio[it] !== '') {
  571. this.monthArr.forEach(itv => {
  572. if (itv.value === it) {
  573. this.acauseDataArr.push(itv)
  574. }
  575. })
  576. }
  577. })
  578. },
  579. //删除
  580. handleDelete() {
  581. this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  582. confirmButtonText: '确定',
  583. cancelButtonText: '取消',
  584. type: 'warning'
  585. }).then(() => {
  586. let that = this
  587. let paramsArr = []
  588. that.changeDateSelect.forEach(it => {
  589. paramsArr.push(it.id)
  590. })
  591. apiPostevaluationdeptratingDelete(paramsArr.join(',')).then(datas => {
  592. that.$message({
  593. type: 'success',
  594. message: '删除成功!'
  595. });
  596. that.getevaluRatingList()
  597. that.changeDateSelect = []
  598. })
  599. })
  600. },
  601. handleImport() {
  602. this.$refs.importPage.upload.title = "部门考评评级"
  603. this.$refs.importPage.upload.open = true
  604. this.$refs.importPage.upload.url = '/evaluation-dept-rating/import'
  605. },
  606. successImport(val) {
  607. this.getevaluRatingList()
  608. },
  609. handleExport() {
  610. let data = this.evaluationRatingData //接口返回数据
  611. const workbook = new ExcelJS.Workbook()
  612. const worksheet = workbook.addWorksheet('Sheet1')
  613. //根据数据自己调整
  614. let colums = []
  615. colums = [{
  616. header: '部门编号',
  617. key: 'deptId',
  618. width: 26
  619. },
  620. {
  621. header: '考评部门',
  622. key: 'deptName',
  623. width: 26
  624. },
  625. {
  626. header: '考评年度',
  627. key: 'annual',
  628. width: 26
  629. },
  630. {
  631. header: '一月',
  632. key: 'jan',
  633. width: 15
  634. },
  635. {
  636. header: '一月通告',
  637. key: 'janContent',
  638. width: 26
  639. },
  640. {
  641. header: '二月',
  642. key: 'feb',
  643. width: 15
  644. },
  645. {
  646. header: '二月通告',
  647. key: 'febContent',
  648. width: 26
  649. },
  650. {
  651. header: '三月',
  652. key: 'mar',
  653. width: 15
  654. },
  655. {
  656. header: '三月通告',
  657. key: 'marContent',
  658. width: 26
  659. },
  660. {
  661. header: '四月',
  662. key: 'apr',
  663. width: 15
  664. },
  665. {
  666. header: '四月通告',
  667. key: 'aprContent',
  668. width: 26
  669. },
  670. {
  671. header: '五月',
  672. key: 'may',
  673. width: 15
  674. },
  675. {
  676. header: '五月通告',
  677. key: 'mayContent',
  678. width: 26
  679. },
  680. {
  681. header: '六月',
  682. key: 'jun',
  683. width: 15
  684. },
  685. {
  686. header: '六月通告',
  687. key: 'junContent',
  688. width: 26
  689. },
  690. {
  691. header: '七月',
  692. key: 'jul',
  693. width: 15
  694. },
  695. {
  696. header: '七月通告',
  697. key: 'julContent',
  698. width: 26
  699. },
  700. {
  701. header: '八月',
  702. key: 'aug',
  703. width: 15
  704. },
  705. {
  706. header: '八月通告',
  707. key: 'augContent',
  708. width: 26
  709. },
  710. {
  711. header: '九月',
  712. key: 'sep',
  713. width: 15
  714. },
  715. {
  716. header: '九月通告',
  717. key: 'sepContent',
  718. width: 26
  719. },
  720. {
  721. header: '十月',
  722. key: 'oct',
  723. width: 15
  724. },
  725. {
  726. header: '十月通告',
  727. key: 'octContent',
  728. width: 26
  729. },
  730. {
  731. header: '十一月',
  732. key: 'nov',
  733. width: 15
  734. },
  735. {
  736. header: '十一月通告',
  737. key: 'novContent',
  738. width: 26
  739. },
  740. {
  741. header: '十二月',
  742. key: 'dece',
  743. width: 15
  744. },
  745. {
  746. header: '十二月通告',
  747. key: 'deceContent',
  748. width: 26
  749. },
  750. {
  751. header: 'A级总数',
  752. key: 'acount',
  753. width: 15
  754. },
  755. {
  756. header: 'C级总数',
  757. key: 'ccount',
  758. width: 15
  759. },
  760. ]
  761. worksheet.columns = colums
  762. worksheet.getRow(1).font = {
  763. size: 12,
  764. bold: true
  765. }
  766. worksheet.addRows(data)
  767. workbook.xlsx.writeBuffer().then(buffer => {
  768. //这里为type
  769. const blob = new Blob([buffer], {
  770. type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'
  771. })
  772. fileSave(blob, `部门考评评级数据导出.xlsx`)
  773. })
  774. },
  775. evaldeptRatingTableSty() {
  776. if (this.winPix === 1.25 || this.innerWidth < 1800) {
  777. return 'evaldeptRating125Table'
  778. } else {
  779. return 'evaldeptRating100Table'
  780. }
  781. }
  782. }
  783. }
  784. </script>
  785. <style lang="less">
  786. .evaluationRating {
  787. .evaluationRatingBtn {
  788. .collectSeach {
  789. display: flex;
  790. padding: 24px 20px;
  791. border-bottom: 1px solid#D6DBEA;
  792. .exceed {
  793. display: flex;
  794. .exceedSpan {
  795. width: 100px;
  796. height: 12px;
  797. font-size: 14px;
  798. font-family: Microsoft YaHei;
  799. font-weight: 400;
  800. color: #8991B0;
  801. line-height: 12px;
  802. margin-top: 14px;
  803. }
  804. .el-input {
  805. margin-right: 10px;
  806. height: 40px;
  807. .el-input__inner {
  808. height: 40px;
  809. }
  810. .el-input__suffix {
  811. .el-select__caret {
  812. line-height: 30px;
  813. }
  814. }
  815. }
  816. }
  817. .el-select {
  818. margin-right: 10px;
  819. .el-input__inner {
  820. height: 30px;
  821. }
  822. .el-input__suffix {
  823. .el-select__caret {
  824. line-height: 30px;
  825. }
  826. }
  827. }
  828. }
  829. span {
  830. font-size: 14px;
  831. }
  832. .PeriodBtn {
  833. display: flex;
  834. justify-content: flex-end;
  835. padding: 20px 0;
  836. }
  837. .el-button {
  838. height: 30px;
  839. // width:100px;
  840. padding: 0 20px;
  841. // padding-top: 8px;
  842. span {
  843. margin: 0;
  844. }
  845. }
  846. .evaluationRatingTableData {
  847. .evaldeptRating125Table {
  848. .el-table__body-wrapper {
  849. height: 63vh !important;
  850. }
  851. }
  852. .evaldeptRating100Table {
  853. .el-table__body-wrapper {
  854. height: 65vh !important;
  855. }
  856. }
  857. .el-table {
  858. .el-input__inner {
  859. height: 30px !important;
  860. }
  861. .el-radio__label {
  862. display: none;
  863. }
  864. .tooltipCC {
  865. width: 300px !important;
  866. display: inline-block;
  867. overflow: hidden;
  868. text-overflow: ellipsis;
  869. white-space: nowrap;
  870. }
  871. .tooltipCCDes {
  872. width: 50px;
  873. font-weight: bold;
  874. display: inline-block;
  875. overflow: hidden;
  876. text-overflow: ellipsis;
  877. white-space: nowrap;
  878. }
  879. .indicitem {
  880. color: #409EFF;
  881. font-size: 12px;
  882. margin-right: 20px;
  883. cursor: pointer;
  884. &:hover {
  885. text-decoration: underline;
  886. }
  887. }
  888. }
  889. .el-pagination {
  890. margin-top: 20px;
  891. text-align: end;
  892. position: relative;
  893. }
  894. }
  895. .el-overlay {
  896. .startToDia {
  897. .el-dialog__body {
  898. padding: 30px 60px 30px 20px !important;
  899. .periodFrom {
  900. .el-select,
  901. .el-input {
  902. width: 100%;
  903. }
  904. .el-input {
  905. height: 30px;
  906. }
  907. }
  908. .flowSty {
  909. width: 100%;
  910. height: 70vh;
  911. }
  912. }
  913. }
  914. }
  915. }
  916. }
  917. </style>