fileInfo.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view class="page_main">
  3. <fileCard :gwId="gwId"></fileCard>
  4. <view class="info_main">
  5. <u-steps :current="current" direction="column" inactiveColor="#36a7f3" activeColor="#5fdf50">
  6. <u-steps-item :error="isSuspend" title="发起" :desc="inputForm.createTruename +' - '+inputForm.createTime">
  7. </u-steps-item>
  8. <u-steps-item v-for="item in downList" :error="isSuspend"
  9. :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':item.which=='2'?'承办情况':item.which=='3'?'承办转发':item.which == '4'
  10. ? '已归档'
  11. : '已中止'"
  12. :desc="item.state==1?item.nextTruename :item.nextTruename +' - '+item.updateTime">
  13. </u-steps-item>
  14. <u-steps-item v-for="item in gwList"
  15. :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':item.which=='2'?'承办情况':item.which=='3'?'承办转发':'待归档'"
  16. :desc="item.state==1?item.nextTruename :item.nextTruename +' - '+item.createTime">
  17. </u-steps-item>
  18. </u-steps>
  19. </view>
  20. <view class="info_footer">
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import fileCard from "./fileCard.vue"
  26. import gwFlowService from '@/api/circulation/gwFlowService.js'
  27. import gwCirculationCard2Service from '@/api/circulation/gwCirculationCard2.js'
  28. export default {
  29. onLoad(option) {
  30. this.gwId = option.id
  31. },
  32. components: {
  33. fileCard,
  34. },
  35. data() {
  36. return {
  37. isSuspend: false,
  38. gwId: '',
  39. // 办公室信息
  40. officeInfo: [],
  41. // 领导信息
  42. leaderInfo: [],
  43. // 承办信息
  44. undertakeInfo: [],
  45. downList: [],
  46. gwList: [],
  47. current: 0,
  48. allNum: "",
  49. inputForm: {},
  50. }
  51. },
  52. mounted() {
  53. gwFlowService.queryByGwId(this.gwId).then(data => {
  54. data.sort((a, b) => a.createTime.localeCompare(b.createTime) || a.createTime
  55. .localeCompare(b.createTime));
  56. this.allNum = data.length
  57. this.inputForm = data[0]
  58. data.forEach(item => {
  59. if (item.which == "5") this.isSuspend = true;
  60. if (item.state == 0) {
  61. this.downList.push(item)
  62. } else {
  63. this.gwList.push(item)
  64. }
  65. })
  66. this.downList.sort((a, b) => a.updateTime.localeCompare(b.updateTime) || a.updateTime
  67. .localeCompare(b.updateTime));
  68. this.current = this.downList.length + 1
  69. })
  70. }
  71. }
  72. </script>
  73. <style>
  74. .page_main {
  75. width: 100%;
  76. background-color: #fefefe;
  77. }
  78. .info_main {
  79. margin: 20px;
  80. }
  81. .info_footer {
  82. width: 100%;
  83. height: 20px;
  84. }
  85. </style>