管道基础大数据平台系统开发-【前端】-新系統界面
TreeWish
2023-02-27 27c5590aab433687c58dbf41e9271f71008834f0
src/components/Screen/right.vue
@@ -1,19 +1,52 @@
<template>
  <div class="current">
    <div class="rightContainer" v-show="ChartDisplay">
    <div class="rightContainer" v-if="ChartDisplay">
      <div class="current1">
        <div class="aside-title">目录分布</div>
        <echart11></echart11>
        <div class="aside-title">项目统计</div>
        <project-category></project-category>
      </div>
      <div class="current1">
        <div class="aside-title">数据及服务提交</div>
        <echart12></echart12>
        <div class="aside-title">数据统计</div>
        <!-- <div class="content" style="height:30px">
          <div class="header">
            <div>格式</div>
            <div>数量</div>
          </div>
        </div> -->
        <file-format></file-format>
      </div>
      <div class="current1">
        <div class="aside-title">各类数据存储分布</div>
        <echart13></echart13>
        <div class="aside-title">服务访问次数</div>
        <Service-Get></Service-Get>
      </div>
    </div>
    <!-- <div
      class="rightContainer2"
      v-if="CourtyDisplay && currentProject =='全球项目'"
    >
      <div class="current1">
        <div class="aside-title">项目数量柱状图</div>
        <country-dimension-bar ref="barRef"></country-dimension-bar>
      </div>
      <div class="current1">
        <div class="aside-title">项目数量饼状图</div>
        <country-dimension-pie ref="pieRef"></country-dimension-pie>
      </div>
    </div>
    <div class="rightContainer2" v-if="CourtyDisplay && currentProject =='全国项目'">
      <div class="current1">
        <div class="aside-title">项目数量柱状图</div>
        <province-dimension-bar ref="barRef"></province-dimension-bar>
      </div>
      <div class="current1">
        <div class="aside-title">项目数量饼状图</div>
        <province-dimension-pie ref="pieRef"></province-dimension-pie>
      </div>
    </div> -->
    <div class="rightarrow">
      <img :src="RightImg" @click="ChangeRight" />
    </div>
@@ -23,32 +56,88 @@
import echart11 from "@/components/echart11.vue"
import echart12 from "@/components/echart12.vue"
import echart13 from "@/components/echart13.vue"
import FileFormat from "@/components/chart/FileFormat.vue"
import ProjectCategory from "../chart/ProjectCategory.vue"
import CountryDimensionBar from "../chart/CountryDimensionBar.vue"
import CountryDimensionPie from "../chart/CountryDimensionPie.vue"
import ProvinceDimensionBar from "../chart/CountryProvinceBar.vue"
import ProvinceDimensionPie from "../chart/CountryProvincePie.vue"
import ServiceGet from "../chart/ServiceGet.vue"
import { countCountryDimension, countProvinceDimension } from "@/api/screen.js"
export default {
  components: {
    echart11,
    echart12,
    echart13,
    FileFormat,
    ProjectCategory,
    CountryDimensionBar,
    CountryDimensionPie,
    ProvinceDimensionBar,
    ProvinceDimensionPie,
    ServiceGet,
  },
  data() {
    return {
      ChartDisplay: true,
      CourtyDisplay: false,
      RightImg: require("../../assets/img/Screen/leftArrow.png"),
      leftMessage: "init",
      currentProject: "全球项目",
      countryData: [],
      provinceData: [],
    }
  },
  mounted() {
    this.$bus.$on("changeProject", name => {
      this.currentProject = name
    })
  },
  methods: {
    ChangeRight() {
      if (this.ChartDisplay) {
        this.RightImg = require("../../assets/img/Screen/rightArrow.png")
      } else {
        this.RightImg = require("../../assets/img/Screen/leftArrow.png")
      if (this.leftMessage == "init") {
        if (this.ChartDisplay) {
          this.RightImg = require("../../assets/img/Screen/rightArrow.png")
        } else {
          this.RightImg = require("../../assets/img/Screen/leftArrow.png")
        }
        this.ChartDisplay = !this.ChartDisplay
      }
      this.ChartDisplay = !this.ChartDisplay
      // if (this.leftMessage == "projectree") {
      //   if (this.CourtyDisplay) {
      //     this.RightImg = require("../../assets/img/Screen/leftArrow.png")
      //   } else {
      //     this.RightImg = require("../../assets/img/Screen/rightArrow.png")
      //   }
      //   this.CourtyDisplay = !this.CourtyDisplay
      // }
      // this.ChartDisplay = !this.ChartDisplay
      this.$parent.ChangeWidth("right")
    },
    //打开大屏左侧界面
    OpenLeftInit() {
      this.ChartDisplay = true
      this.CourtyDisplay = false
      this.leftMessage = "init"
      // this.OpenLeftInitChart();
      // this.$parent.ChangeWidth("leftTree")
    },
    //打开工程树
    // OpenLeftProjectTree() {
    //   this.ChartDisplay = false
    //   this.CourtyDisplay = true
    //   this.leftMessage = "projectree"
    //   this.$parent.ChangeWidth("leftTree")
    // },
  },
}
</script>
<style lang="scss">
<style lang="less" sc>
.current {
  height: 100%;
  width: 100%;
@@ -70,28 +159,49 @@
  }
  .rightContainer {
    height: 100%;
    width: calc(100% - 36px);
    width: calc(100% - 45px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    .current1 {
      height: 30%;
      height: 32%;
      width: 100%;
      background: url(../../assets/img/Screen/chartbg.png);
      background-size: 100% 100%;
      background-repeat: no-repeat;
    }
    .aside-title {
      padding-left: 30px;
      height: 27px;
      line-height: 27px;
      background: linear-gradient(0deg, #9cd2ff 0%, #ffffff 100%);
      font-size: 15px;
      font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular;
      -webkit-background-clip: text;
  }
  // .rightContainer2 {
  //   height: 100%;
  //   width: calc(100% - 45px);
  //   display: flex;
  //   flex-direction: column;
  //   align-items: center;
  //   .current1 {
  //     margin-top: 10px;
  //     margin-bottom: 30px;
  //     height: 30%;
  //     width: 100%;
  //     background: url(../../assets/img/Screen/chartbg.png);
  //     background-size: 100% 100%;
  //     background-repeat: no-repeat;
  //   }
  // }
  .content {
    width: 100%;
    background: url(../../assets/img/Screen/contentBg.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    .header {
      margin: 0px auto;
      padding: 10px 0;
      width: 80%;
      display: flex;
      justify-content: space-between;
      color: #fff;
      font-size: 13px;
    }
  }
}