viewApproval.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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>
  61. <span slot="footer" class="dialog-footer">
  62. <el-button type="primary" @click="closeDia">关 闭</el-button>
  63. </span>
  64. </el-dialog>
  65. </template>
  66. <script>
  67. import { listCharge } from '@/api/system/viewApproval'
  68. export default {
  69. data() {
  70. return {
  71. visible: false,
  72. auditList:[]
  73. }
  74. },
  75. methods: {
  76. init(id,actId) {
  77. if (id && actId){
  78. let data = {
  79. id:id,
  80. actId:actId
  81. }
  82. this.optionsUsers = []
  83. this.visible = true
  84. this.addCharge(data)
  85. }else {
  86. if(!id){
  87. this.$message.error('主表ID为空');
  88. }else {
  89. this.$message.error('活动ID为空');
  90. }
  91. }
  92. },
  93. addCharge(data) {
  94. listCharge(data).then(data => {
  95. console.log(data)
  96. this.auditList = data.data
  97. })
  98. },
  99. // 表单提交
  100. dataFormSubmit() {
  101. },
  102. closeDialog(done) {
  103. this.visible = false
  104. this.$emit('refreshDataList')
  105. Object.assign(this.$data, this.$options.data.call(this))
  106. },
  107. closeDia() {
  108. this.visible = false
  109. this.$emit('refreshDataList')
  110. Object.assign(this.$data, this.$options.data.call(this))
  111. }
  112. }
  113. }
  114. </script>