index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <div class='flex flex-center full-width'>
  3. <div class='ml-10 mr-10 mt-10 flex flex-align-start full-width'>
  4. <basic-container style='flex: 1;padding: 0' v-if='user.info.viewStage === 1' >
  5. <left @change='changeDept'/>
  6. </basic-container>
  7. <div class='full-width ml-5' style='flex:4;'>
  8. <basic-container class='full-width'>
  9. <div>
  10. <years :dept-id='dept' @change='change'/>
  11. </div>
  12. </basic-container>
  13. <basic-container>
  14. <div class='flex '>
  15. <div class='flex-child-average full-width flex flex-col flex-justify-start'>
  16. <span class='font-16 bold full-width text-left '>投资数据统计 单位(万元)</span>
  17. <div class='full-width mt-10' style='background-color: #F7FAFD'>
  18. <chart :dept-id='dept' :quarter='yearType.value === 0 ? "":yearType '/>
  19. </div>
  20. <span class='font-16 bold full-width text-left mt-20'>项目入库统计 单位(个)</span>
  21. <div class='full-width mt-10' style='background-color: #F7FAFD'>
  22. <chart2 :dept-id='dept' :quarter='yearType.value === 0 || yearType === "0" ? "":yearType '/>
  23. </div>
  24. </div>
  25. <div class='white-bg padding'></div>
  26. <div class='flex-child-average'>
  27. <amount v-if='dept===null' :type='yearType' :deptId='dept'/>
  28. <complete v-else :type='yearType' :deptId='dept'/>
  29. </div>
  30. </div>
  31. </basic-container>
  32. </div>
  33. </div>
  34. </div>
  35. </template>
  36. <route>
  37. {
  38. path: '/',
  39. name: '年度投资管理',
  40. }
  41. </route>
  42. <script>
  43. import BasicContainer from '@/components/basic-container/main.vue'
  44. import left from './components/left.vue'
  45. import years from '@/views/invest/components/years.vue'
  46. import amount from '@/views/invest/components/amount.vue'
  47. import chart from '@/views/invest/components/chart.vue'
  48. import chart2 from '@/views/invest/components/chart2.vue'
  49. import complete from '@/views/invest/components/complete.vue'
  50. import { useStore } from '@/store/user.js'
  51. export default {
  52. name: 'index',
  53. components: { BasicContainer, left, years, amount, chart, chart2, complete },
  54. setup () {
  55. const user = useStore()
  56. return { user }
  57. },
  58. data () {
  59. return {
  60. yearType: {
  61. value: 0
  62. },
  63. dept: null
  64. }
  65. },
  66. methods: {
  67. changeDept (res) {
  68. if (res === null) {
  69. this.dept = null
  70. return
  71. }
  72. this.dept = res.id
  73. },
  74. change (index) {
  75. this.yearType = index
  76. }
  77. }
  78. }
  79. </script>
  80. <style scoped>
  81. </style>