fileInfo.vue 2.2 KB

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