viewApproval.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <el-dialog
  3. title="查看审批流"
  4. :close-on-click-modal="false"
  5. :before-close="closeDialog"
  6. :visible.sync="visible"
  7. :modal="false"
  8. width="75%"
  9. >
  10. <el-table :data="auditList" tooltip-effect="dark" stripe style="width: 100%; margin-bottom: 20px">
  11. <el-table-column
  12. prop="levelId"
  13. width="80"
  14. label="序号"
  15. type="index"
  16. >
  17. </el-table-column>
  18. <el-table-column
  19. prop="nickName"
  20. header-align="center"
  21. align="center"
  22. width="130"
  23. label="节点人"
  24. >
  25. </el-table-column>
  26. <el-table-column
  27. prop="auditStatus"
  28. header-align="center"
  29. width="130"
  30. align="center"
  31. label="状态"
  32. >
  33. <template slot-scope="scope">
  34. <span v-if="scope.row.auditStatus === 'O'">提交</span>
  35. <span v-if="scope.row.auditStatus === 'S'">待审</span>
  36. <span v-if="scope.row.auditStatus === 'N'">等待</span>
  37. <span v-if="scope.row.auditStatus === 'B'">审核退回</span>
  38. <span v-if="scope.row.auditStatus === 'A'">审核通过</span>
  39. </template>
  40. </el-table-column>
  41. <el-table-column
  42. prop="auditMsg"
  43. header-align="center"
  44. align="center"
  45. label="意见"
  46. >
  47. </el-table-column>
  48. <el-table-column
  49. prop="auditItem"
  50. header-align="center"
  51. width="250"
  52. align="center"
  53. label="审核时间"
  54. >
  55. <template slot-scope="scope">
  56. <span v-if="scope.row.auditItem !== undefined">{{ scope.row.auditItem.slice(0,10)}}</span>
  57. <span v-else>{{scope.row.auditItem}}</span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column
  61. prop="auditOpTime"
  62. header-align="center"
  63. width="250"
  64. align="center"
  65. label="提交时间"
  66. >
  67. <template slot-scope="scope">
  68. <span v-if="scope.row.auditOpTime !== undefined">{{ scope.row.auditOpTime.slice(0,10)}}</span>
  69. <span v-else>{{scope.row.auditOpTime}}</span>
  70. </template>
  71. </el-table-column>
  72. </el-table>
  73. <span slot="footer" class="dialog-footer">
  74. <el-button type="primary" @click="closeDia">关 闭</el-button>
  75. </span>
  76. </el-dialog>
  77. </template>
  78. <script>
  79. import { listCharge } from '@/api/system/viewApproval'
  80. export default {
  81. data() {
  82. return {
  83. visible: false,
  84. auditList:[]
  85. }
  86. },
  87. methods: {
  88. init(id,actId) {
  89. if (id && actId){
  90. let data = {
  91. id:id,
  92. actId:actId
  93. }
  94. this.optionsUsers = []
  95. this.visible = true
  96. this.addCharge(data)
  97. }else {
  98. if(!id){
  99. this.$message.error('主表ID为空');
  100. }else {
  101. this.$message.error('活动ID为空');
  102. }
  103. }
  104. },
  105. addCharge(data) {
  106. listCharge(data).then(data => {
  107. console.log(data)
  108. this.auditList = data.data
  109. })
  110. },
  111. // 表单提交
  112. dataFormSubmit() {
  113. },
  114. closeDialog(done) {
  115. this.visible = false
  116. this.$emit('refreshDataList')
  117. Object.assign(this.$data, this.$options.data.call(this))
  118. },
  119. closeDia() {
  120. this.visible = false
  121. this.$emit('refreshDataList')
  122. Object.assign(this.$data, this.$options.data.call(this))
  123. }
  124. }
  125. }
  126. </script>