fileInfo.vue 3.0 KB

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