fileInfo.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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>
  17. </view>
  18. <view class="info_footer">
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import fileCard from "./fileCard.vue"
  24. import gwFlowService from '@/api/circulation/gwFlowService.js'
  25. import gwCirculationCard2Service from '@/api/circulation/gwCirculationCard2.js'
  26. export default {
  27. onLoad(option) {
  28. this.gwId = option.id
  29. },
  30. components: {
  31. fileCard,
  32. },
  33. data() {
  34. return {
  35. gwId: '',
  36. // 办公室信息
  37. officeInfo: [],
  38. // 领导信息
  39. leaderInfo: [],
  40. // 承办信息
  41. undertakeInfo: [],
  42. downList: [],
  43. gwList: [],
  44. current: 0,
  45. allNum: "",
  46. inputForm: {},
  47. }
  48. },
  49. mounted() {
  50. gwFlowService.queryByGwId(this.gwId).then(data => {
  51. data.sort((a, b) => a.createTime.localeCompare(b.createTime) || a.createTime
  52. .localeCompare(b.createTime));
  53. this.allNum = data.length
  54. this.inputForm = data[0]
  55. data.forEach(item => {
  56. if (item.state == 0) {
  57. this.downList.push(item)
  58. } else {
  59. this.gwList.push(item)
  60. }
  61. })
  62. this.downList.sort((a, b) => a.updateTime.localeCompare(b.updateTime) || a.updateTime
  63. .localeCompare(b.updateTime));
  64. this.current = this.downList.length + 1
  65. })
  66. }
  67. }
  68. </script>
  69. <style>
  70. .page_main {
  71. width: 100%;
  72. background-color: #fefefe;
  73. }
  74. .info_main {
  75. margin: 20px;
  76. }
  77. .info_footer {
  78. width: 100%;
  79. height: 20px;
  80. }
  81. </style>