fileInfo.vue 3.2 KB

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