fileInfo.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.createTime">
  7. </u-steps-item>
  8. <u-steps-item v-for="item in downList" :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':item.which=='2'?'承办情况':'承办转发'"
  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'?'承办情况':'承办转发'"
  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. gwCirculationCard2Service.queryById(this.gwId).then(data => {
  34. this.inputForm = data
  35. })
  36. },
  37. components: {
  38. fileCard,
  39. },
  40. data() {
  41. return {
  42. gwId: '',
  43. // 办公室信息
  44. officeInfo: [],
  45. // 领导信息
  46. leaderInfo: [],
  47. // 承办信息
  48. undertakeInfo: [],
  49. downList: [],
  50. gwList: [],
  51. current: 0,
  52. allNum: "",
  53. inputForm:{},
  54. }
  55. },
  56. mounted() {
  57. gwFlowService.queryByGwId(this.gwId).then(data => {
  58. data.sort((a, b) => a.createTime.localeCompare(b.createTime) || a.createTime
  59. .localeCompare(b.createTime));
  60. this.allNum = data.length
  61. data.forEach(item => {
  62. if (item.state == 0) {
  63. this.downList.push(item)
  64. } else {
  65. this.gwList.push(item)
  66. }
  67. // if (item.which == 0 && item.state == 1) {
  68. // this.officeInfo.push(item)
  69. // } else if (item.which == 1 && item.state == 1) {
  70. // if (item.state == 1) this.current = 1
  71. // this.leaderInfo.push(item)
  72. // } else if (item.which == 2 && item.state == 1) {
  73. // if (item.state == 1) this.current = 2
  74. // this.undertakeInfo.push(item)
  75. // }
  76. })
  77. this.downList.sort((a, b) => a.createTime.localeCompare(b.createTime) || a.createTime
  78. .localeCompare(b.createTime));
  79. this.current = this.downList.length + 1
  80. })
  81. }
  82. }
  83. </script>
  84. <style>
  85. .page_main {
  86. width: 100%;
  87. background-color: #fefefe;
  88. }
  89. .info_main {
  90. margin: 20px;
  91. }
  92. </style>