viewApproval.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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
  11. :data="auditList"
  12. tooltip-effect="dark"
  13. stripe
  14. style="width: 100%; margin-bottom: 20px"
  15. >
  16. <el-table-column prop="levelId" width="80" label="序号" type="index">
  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">{{
  57. scope.row.auditItem.slice(0, 10)
  58. }}</span>
  59. <span v-else>{{ scope.row.auditItem }}</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column
  63. prop="auditOpTime"
  64. header-align="center"
  65. width="250"
  66. align="center"
  67. label="提交时间"
  68. >
  69. <template slot-scope="scope">
  70. <span v-if="scope.row.auditOpTime !== undefined">{{
  71. scope.row.auditOpTime.slice(0, 10)
  72. }}</span>
  73. <span v-else>{{ scope.row.auditOpTime }}</span>
  74. </template>
  75. </el-table-column>
  76. </el-table>
  77. <span slot="footer" class="dialog-footer">
  78. <el-button type="primary" @click="closeDia">关 闭</el-button>
  79. </span>
  80. </el-dialog>
  81. </template>
  82. <script>
  83. import { listCharge } from "@/api/system/viewApproval";
  84. export default {
  85. data() {
  86. return {
  87. visible: false,
  88. auditList: [],
  89. };
  90. },
  91. methods: {
  92. init(id, actId, status) {
  93. if (id && actId) {
  94. let data = {
  95. id: id,
  96. actId: actId,
  97. fidStatus: status,
  98. };
  99. this.optionsUsers = [];
  100. this.visible = true;
  101. this.addCharge(data);
  102. } else {
  103. if (!id) {
  104. this.$message.error("主表ID为空");
  105. } else {
  106. this.$message.error("活动ID为空");
  107. }
  108. }
  109. },
  110. addCharge(data) {
  111. listCharge(data).then((data) => {
  112. console.log(data);
  113. this.auditList = data.data;
  114. });
  115. },
  116. // 表单提交
  117. dataFormSubmit() {},
  118. closeDialog(done) {
  119. this.visible = false;
  120. this.$emit("refreshDataList");
  121. Object.assign(this.$data, this.$options.data.call(this));
  122. },
  123. closeDia() {
  124. this.visible = false;
  125. this.$emit("refreshDataList");
  126. Object.assign(this.$data, this.$options.data.call(this));
  127. },
  128. },
  129. };
  130. </script>