ViewInterior.vue 1.69 KB
<!--
 * @Description: 内部数据页面
 * @Author: huyue
 * @Date: 2023-07-04 13:55:35
 * @LastEditors: huyue
 * @LastEditTime: 2023-08-22 17:31:50
-->
<template>
   <div class="view-content">
    <div class="content">
    <InternalLeft></InternalLeft>
    <InternalRight></InternalRight>
    </div>
  </div>
</template>

<script>
import InternalLeft from "../../internal/InternalLeft.vue"
import InternalRight from "../../internal/InternalRight.vue"
import {overViewList} from '../../internal/components/constant'
export default {
  name: 'ViewInterior',
  components: {
    InternalLeft,
    InternalRight
  },
  data() {
    return {
      overViewData: overViewList
    }
  },
  created() {
    this.getAllOverview()
  },
  mounted() { },
  methods: {
    async getAllOverview() {
      const _data = await this.api.internal.getAllOverview()
      const _dataList = _data.data.dataList[0]
      console.log(_dataList);
      this.overViewData.forEach(item => {
        item.value = _dataList[item.valueName]
        if (item.bottomValue) item.bottomValue = _dataList[item.bottemName]
        if (item.bottomType === 'ratio') {
          item.ratioLeftValue = _dataList[item.ratioLeftValueName]
          item.ratioRightValue = _dataList[item.ratioRightValueName]
        }
      })
      this.$bus.$emit('innerGetAllOverview', this.overViewData)
    }
  }
}
</script>

<style lang="scss" scoped>
.view-content {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  position: relative;
  padding: 1.78vh 24px;
  gap: 0 16px;
}
.content {
  display: flex;
  justify-content: space-between;
  // padding: 1.78vh 0 0;
  // margin-top: 1.78vh;
}
</style>