commonInfo.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view class="page_main">
  3. <commonCard :gwId="gwId"></commonCard>
  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.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.nextTruename">
  15. </u-steps-item>
  16. </u-steps>
  17. </view>
  18. <view class="info_footer">
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import commonCard from "./commonCard.vue"
  24. import yzCirculationCardService from '@/api/commonseal/yzCirculationCardService.js'
  25. import yzFlowService from '@/api/commonseal/yzFlowService.js'
  26. export default {
  27. onLoad(option) {
  28. this.gwId = option.id
  29. },
  30. components: {
  31. commonCard,
  32. },
  33. data() {
  34. return {
  35. gwId: '',
  36. downList: [],
  37. gwList: [],
  38. current: 0,
  39. inputForm: {},
  40. }
  41. },
  42. mounted() {
  43. yzFlowService.queryByYzId(this.gwId).then(data => {
  44. data.sort((a, b) => a.createTime.localeCompare(b.createTime) || a.createTime
  45. .localeCompare(b.createTime));
  46. this.inputForm = data[0]
  47. data.forEach(item => {
  48. if (item.state == 0) {
  49. this.downList.push(item)
  50. } else {
  51. this.gwList.push(item)
  52. }
  53. })
  54. this.downList.sort((a, b) => a.updateTime.localeCompare(b.updateTime) || a.updateTime
  55. .localeCompare(b.updateTime));
  56. this.current = this.downList.length + 1
  57. })
  58. }
  59. }
  60. </script>
  61. <style>
  62. .page_main {
  63. width: 100%;
  64. background-color: #fefefe;
  65. }
  66. .info_main {
  67. margin: 20px;
  68. }
  69. .info_footer {
  70. width: 100%;
  71. height: 20px;
  72. }
  73. </style>