auditRecords.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <!-- 任务审核记录 -->
  3. <div class="auditRecords">
  4. <el-dialog title="查看审核记录" :visible.sync="dialogVisible" width="1000px" :before-close="handleClose" :append-to-body="true"
  5. :close-on-click-modal="false">
  6. <el-table :data="tableData" style="width: 100%;" border header-row-class-name="custom-table-header"
  7. @sort-change="sortChange">
  8. <el-table-column label="#" align="center" width="60px">
  9. <template slot-scope="scope">
  10. <div>
  11. {{ (queryParams.current - 1) * queryParams.size + scope.$index + 1 }}
  12. </div>
  13. </template>
  14. </el-table-column>
  15. <el-table-column v-for="item in columnList2" :key="item.value" :prop="item.value"
  16. :render-header="$commonJS.renderHeaderMethods" :label="item.name" sortable="custom" align="center">
  17. <template slot-scope="scope">
  18. <div v-html="$commonJS.getColumnData(scope.row, item)"></div>
  19. </template>
  20. </el-table-column>
  21. </el-table>
  22. <span slot="footer" class="dialog-footer">
  23. <el-button type="primary" @click="handleClose">关 闭</el-button>
  24. </span>
  25. </el-dialog>
  26. </div>
  27. </template>
  28. <script>
  29. import { column } from '../mixins/index2'
  30. export default {
  31. mixins: [column],
  32. data() {
  33. return {
  34. // 审核记录数据
  35. tableData: [],
  36. dialogVisible: false,
  37. // 审核记录分页信息
  38. queryParams: {
  39. current: 1,
  40. size: 10,
  41. total: 0,
  42. },
  43. // 排序
  44. sort:[{ "orderBy": "createTime", "orderType": 1 }],
  45. }
  46. },
  47. mounted() {
  48. },
  49. methods: {
  50. //排序
  51. sortChange({ column, prop, order }) {
  52. //如需要多个字段排序,则不需要清空
  53. var params = {
  54. sort: this.sort,
  55. column,
  56. prop,
  57. order,
  58. }
  59. this.sort = this.$commonJS.getSortData(params)
  60. this.queryParams.current = 1
  61. this.getList()
  62. },
  63. getList(row) {
  64. let params = {
  65. taskId: row.id
  66. }
  67. this.$api.queryAuditHistory(params).then(res => {
  68. if (res.code == 200) {
  69. // this.detailsMessage = res.data.projectTaskVO//分配任务信息
  70. // this.tableData = res.data.systemFileList//文件
  71. for (let i = 0; i < res.data.auditHistoryVOS.length ; i++){
  72. if (res.data.auditHistoryVOS[i].taskHandleResultVO) {
  73. this.tableData.push(res.data.auditHistoryVOS[i].taskHandleResultVO)
  74. }
  75. }
  76. }
  77. })
  78. },
  79. // 打开弹窗
  80. open(row) {
  81. this.getList(row)
  82. this.dialogVisible = true
  83. },
  84. handleClose() {
  85. this.dialogVisible = false
  86. },
  87. // 分页查询
  88. handleCurrentChange(val) {
  89. this.queryParams.current = val
  90. this.getList()
  91. },
  92. },
  93. }
  94. </script>
  95. <style lang="scss" scoped></style>