fileInfo.vue 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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="办公室管理员">
  7. </u-steps-item>
  8. <u-steps-item v-for="item in downList" :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':'承办转发'"
  9. :desc="item.state==1?item.nextTruename :item.nextTruename +' - '+item.updateTime">
  10. </u-steps-item>
  11. <u-steps-item v-for="item in gwList" :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':'承办转发'"
  12. :desc="item.state==1?item.nextTruename :item.nextTruename +' - '+item.updateTime">
  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. }
  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. console.log("data========", data);
  57. this.allNum = data.length
  58. data.forEach(item => {
  59. if (item.state == 0) {
  60. this.downList.push(item)
  61. } else {
  62. this.gwList.push(item)
  63. }
  64. // if (item.which == 0 && item.state == 1) {
  65. // this.officeInfo.push(item)
  66. // } else if (item.which == 1 && item.state == 1) {
  67. // if (item.state == 1) this.current = 1
  68. // this.leaderInfo.push(item)
  69. // } else if (item.which == 2 && item.state == 1) {
  70. // if (item.state == 1) this.current = 2
  71. // this.undertakeInfo.push(item)
  72. // }
  73. })
  74. this.downList.sort((a, b) => a.createTime.localeCompare(b.createTime) || a.createTime
  75. .localeCompare(b.createTime));
  76. this.current = this.downList.length+1
  77. })
  78. }
  79. }
  80. </script>
  81. <style>
  82. .page_main {
  83. width: 100%;
  84. background-color: #fefefe;
  85. }
  86. .info_main {
  87. margin: 20px;
  88. }
  89. </style>