index.vue 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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'>
  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. export default {
  51. name: 'index',
  52. components: { BasicContainer, left, years, amount, chart, chart2, complete },
  53. data () {
  54. return {
  55. yearType: {
  56. value: 0
  57. },
  58. dept: null
  59. }
  60. },
  61. methods: {
  62. changeDept (res) {
  63. if (res === null) {
  64. this.dept = null
  65. return
  66. }
  67. this.dept = res.id
  68. },
  69. change (index) {
  70. this.yearType = index
  71. }
  72. }
  73. }
  74. </script>
  75. <style scoped>
  76. </style>