commonInfo.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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.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 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. allNum: "",
  40. inputForm: {},
  41. }
  42. },
  43. mounted() {
  44. yzFlowService.queryByYzId(this.gwId).then(data => {
  45. data.sort((a, b) => a.createTime.localeCompare(b.createTime) || a.createTime
  46. .localeCompare(b.createTime));
  47. this.allNum = data.length
  48. this.inputForm = data[0]
  49. data.forEach(item => {
  50. if (item.state == 0) {
  51. this.downList.push(item)
  52. } else {
  53. this.gwList.push(item)
  54. }
  55. })
  56. this.downList.sort((a, b) => a.updateTime.localeCompare(b.updateTime) || a.updateTime
  57. .localeCompare(b.updateTime));
  58. this.current = this.downList.length + 1
  59. })
  60. }
  61. }
  62. </script>
  63. <style>
  64. .page_main {
  65. width: 100%;
  66. background-color: #fefefe;
  67. }
  68. .info_main {
  69. margin: 20px;
  70. }
  71. .info_footer {
  72. width: 100%;
  73. height: 20px;
  74. }
  75. </style>