commonInfo.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 :error="isSuspend" title="发起" :desc="inputForm.createTruename +' - '+inputForm.createTime">
  7. </u-steps-item>
  8. <u-steps-item v-for="item in downList"
  9. :error="isSuspend"
  10. :title="item.which=='0'?'承办科(室)意见':item.which=='1'?'办公室意见':item.which=='2'?'分管领导意见':item.which=='3'?'主要领导意见':item.which == '4'
  11. ? '已归档'
  12. : '已中止'"
  13. :desc="item.nextTruename +' - '+item.updateTime">
  14. </u-steps-item>
  15. <u-steps-item v-for="item in gwList"
  16. :title="item.which=='0'?'承办科(室)意见':item.which=='1'?'办公室意见':item.which=='2'?'分管领导意见':item.which=='3'?'主要领导意见':'待归档'"
  17. :desc="item.nextTruename">
  18. </u-steps-item>
  19. </u-steps>
  20. </view>
  21. <view class="info_footer">
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import commonCard from "./commonCard.vue"
  27. import yzCirculationCardService from '@/api/commonseal/yzCirculationCardService.js'
  28. import yzFlowService from '@/api/commonseal/yzFlowService.js'
  29. export default {
  30. onLoad(option) {
  31. this.gwId = option.id
  32. },
  33. components: {
  34. commonCard,
  35. },
  36. data() {
  37. return {
  38. isSuspend: false,
  39. gwId: '',
  40. downList: [],
  41. gwList: [],
  42. current: 0,
  43. inputForm: {},
  44. }
  45. },
  46. mounted() {
  47. yzFlowService.queryByYzId(this.gwId).then(data => {
  48. data.sort((a, b) => a.createTime.localeCompare(b.createTime) || a.createTime
  49. .localeCompare(b.createTime));
  50. this.inputForm = data[0]
  51. data.forEach(item => {
  52. if (item.which == "5") this.isSuspend = true;
  53. if (item.state == 0) {
  54. this.downList.push(item)
  55. } else {
  56. this.gwList.push(item)
  57. }
  58. })
  59. this.downList.sort((a, b) => a.updateTime.localeCompare(b.updateTime) || a.updateTime
  60. .localeCompare(b.updateTime));
  61. this.current = this.downList.length + 1
  62. })
  63. }
  64. }
  65. </script>
  66. <style>
  67. .page_main {
  68. width: 100%;
  69. background-color: #fefefe;
  70. }
  71. .info_main {
  72. margin: 20px;
  73. }
  74. .info_footer {
  75. width: 100%;
  76. height: 20px;
  77. }
  78. </style>