pssrApprove-detail.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <el-dialog :close-on-click-modal="false"
  3. :title="!this.taskForm.taskId == '' ? $t('处理') : $t('详情')"
  4. :visible.sync="visible"
  5. :append-to-body="true"
  6. width="60%">
  7. <Subitem :sub-id="Number(subId)" :serial-number="sn" :is-approve="Number((taskForm.taskId == '')?2:1)" />
  8. <span slot="footer" class="dialog-footer">
  9. <el-button v-if="!this.taskForm.taskId == ''" type="primary"
  10. @click="dataFormSubmit(1)" :disabled="submitDisabled">通过</el-button>
  11. <el-button v-if="!this.taskForm.taskId == ''" type="danger"
  12. @click="dataFormSubmit(0)" :disabled="submitDisabled">驳回</el-button>
  13. <el-button @click="visible = false">{{ $t('返回') }}</el-button>
  14. </span>
  15. <div>
  16. <span>{{ $t('流转详情') }}</span>
  17. <el-table :data="historyList" border v-loading="historyLoading" style="width: 100%;">
  18. <el-table-column prop="taskName" header-align="center" align="center"
  19. :label="$t('流程进度')"></el-table-column>
  20. <el-table-column prop="userName" header-align="center" align="center" :label="$t('姓名')"></el-table-column>
  21. <el-table-column prop="taskCreateTime" header-align="center" align="center"
  22. :label="$t('开始时间')"></el-table-column>
  23. <el-table-column prop="taskEndTime" header-align="center" align="center"
  24. :label="$t('结束时间')"></el-table-column>
  25. <el-table-column prop="comment" header-align="center" align="center"
  26. :label="$t('审批意见')"></el-table-column>
  27. </el-table>
  28. </div>
  29. </el-dialog>
  30. </template>
  31. <script>
  32. import {getHistorylist} from "@/api/ehs/approvedanger";
  33. import Subitem from "@/views/pssr/subitem/index.vue";
  34. import {getSubcontent} from "@/api/pssr/subcontent";
  35. export default {
  36. name: "pssrApprove-detail",
  37. components: {Subitem},
  38. data() {
  39. return {
  40. //label样式
  41. labelStyle: {'width': '200px'},
  42. //流转列表
  43. historyList: [],
  44. historyLoading: true,
  45. submitDisabled: false,
  46. taskName: '',
  47. visible: false,
  48. subId: null,
  49. sn: null,
  50. taskForm: {
  51. comment: '',
  52. taskId: '',
  53. businessKey: '',
  54. tPssrApprove: {}
  55. },
  56. devList: [],
  57. dataForm: {},
  58. form: {},
  59. rules: {},
  60. flag: false
  61. }
  62. },
  63. methods: {
  64. init(id, taskId, processId, taskName) {
  65. this.subId = id;
  66. getSubcontent(id).then(res => {
  67. this.sn = res.data.serialNumber
  68. })
  69. this.visible = true;
  70. getHistorylist({processId: processId}).then(response => {
  71. this.historyList = response.rows;
  72. this.historyLoading = false
  73. });
  74. },
  75. dataFormSubmit(val) {
  76. }
  77. }
  78. }
  79. </script>
  80. <style scoped>
  81. </style>