Browse Source

feat: 智慧总控

whh 8 months ago
parent
commit
1a692da2cc

+ 18 - 0
package-lock.json

@@ -12,6 +12,7 @@
         "@vueuse/core": "^10.9.0",
         "axios": "^1.6.8",
         "echarts": "^5.5.0",
+        "echarts-gl": "^2.0.9",
         "highlight.js": "^11.9.0",
         "katex": "^0.16.10",
         "load-awesome": "^1.1.0",
@@ -2404,6 +2405,11 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/claygl": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmmirror.com/claygl/-/claygl-1.3.0.tgz",
+      "integrity": "sha512-+gGtJjT6SSHD2l2yC3MCubW/sCV40tZuSs5opdtn79vFSGUgp/lH139RNEQ6Jy078/L0aV8odCw8RSrUcMfLaQ=="
+    },
     "node_modules/clone": {
       "version": "2.1.2",
       "resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
@@ -2977,6 +2983,18 @@
         "zrender": "5.5.0"
       }
     },
+    "node_modules/echarts-gl": {
+      "version": "2.0.9",
+      "resolved": "https://registry.npmmirror.com/echarts-gl/-/echarts-gl-2.0.9.tgz",
+      "integrity": "sha512-oKeMdkkkpJGWOzjgZUsF41DOh6cMsyrGGXimbjK2l6Xeq/dBQu4ShG2w2Dzrs/1bD27b2pLTGSaUzouY191gzA==",
+      "dependencies": {
+        "claygl": "^1.2.1",
+        "zrender": "^5.1.1"
+      },
+      "peerDependencies": {
+        "echarts": "^5.1.2"
+      }
+    },
     "node_modules/echarts/node_modules/tslib": {
       "version": "2.3.0",
       "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
     "@vueuse/core": "^10.9.0",
     "axios": "^1.6.8",
     "echarts": "^5.5.0",
+    "echarts-gl": "^2.0.9",
     "highlight.js": "^11.9.0",
     "katex": "^0.16.10",
     "load-awesome": "^1.1.0",

+ 6 - 0
src/api/screen.js

@@ -36,4 +36,10 @@ export const screenApi = {
     */
   getInfo: () => http.get('/getInfo'),
 
+  /**
+    * 获取日报费用
+    */
+  getFee: () => http.get('/front/bigModel/daily/recentlyOneFeeInfo'),
+
+ 
 }

BIN
src/assets/images/home/bg-helper-round.png


BIN
src/assets/images/home/home_bg-del.png


BIN
src/assets/images/home/home_bg.png


BIN
src/assets/images/home/water-work.png


+ 0 - 7
src/assets/styles/common.scss

@@ -8,13 +8,6 @@
   font-style: normal;
 }
 
-@font-face {
-  font-display: swap;
-  font-family: 'D-DIN-PRO';
-  src: url('@/assets/font/D-DIN-PRO.woff2') format('ttf');
-  font-weight: normal;
-  font-style: normal;
-}
 // chat 布局相关
 .chat-ask_icon,
 .chat-answer_icon {

+ 5 - 3
src/views/analyse/WorkOrder.vue

@@ -137,6 +137,8 @@ const onRegenerate = async (question, options) => {
         delayLoading: false,
       })
 
+      console.log( "chatDataSource", chatDataSource.value );
+
       scrollToBottomIfAtBottom();
     }
   }
@@ -206,7 +208,7 @@ const handleSubmit = async (question, params) => {
       
     scrollToBottom();
 
-    // onRegenerate(question, params)
+    onRegenerate(question, params)
     
   }, 2 * 1000);
 }
@@ -341,7 +343,7 @@ onMounted(() => {
 
 onUnmounted(() => {
   controller.abort();
-  // Object.keys(chartInstance).forEach(key => chartInstance[key].clear());
+  Object.keys(chartInstance).forEach(key => chartInstance[key].clear());
 })
 </script>
 
@@ -386,7 +388,7 @@ onUnmounted(() => {
               <div 
                 class="area_inner"
                 v-for="(item, index) in item.echartWithTableData"
-                :key="index + new Date().getTime()"
+                :key="index"
               >
                 <div class="echart-warpper" >
                   <span class="mb-[10px] #1A2029 font-bold">{{ item.title }}</span>

+ 100 - 69
src/views/screen/ScreenView.vue

@@ -5,9 +5,12 @@ import dataBox from "./components/dataBox";
 import liuliang from "./components/liuliang";
 import gongyi from "./components/gongyi";
 import middleBox from "./components/middleBox";
+import EchartBar from "./components/EchartBar";
+import ControlHelper from "./components/ControlHelper";
 import { screenApi } from "@/api/screen"
 import dayjs from 'dayjs'
 import 'dayjs/locale/zh-cn';
+import autofit from "@/utils/autofit"
 
 dayjs.locale('zh-cn'); // 设置day.js使用中文/ 导入中文语言包
 import { ref, onBeforeUnmount, onMounted } from "vue";
@@ -66,6 +69,12 @@ const init = () => {
 init()
 
 onMounted(() => {
+  // autofit.init({
+  //     designHeight: 1080,
+  //     designWidth: 1920,
+  //     renderDom: "#screen-view",
+  //     resize: true
+  //   })
   //每5s刷新数据
   timer = setInterval(() => {
     init()
@@ -81,9 +90,9 @@ onBeforeUnmount(() => {
 
 </script>
 <template>
-  <div class="screen-view">
+  <div class="screen-view" id="screen-view">
     <div class="screen-view-top">
-      <div class="left">
+      <div class="left space-x-[1rem]">
         <span class="time">{{ time }}</span>
         <span class="line"></span>
         <div class="data">
@@ -95,57 +104,64 @@ onBeforeUnmount(() => {
         <userTop></userTop>
       </div>
     </div>
+    <div class="menu">
+      <RouterLink to="/" class="item item1">智慧总控</RouterLink>
+      <RouterLink to="/answer" class="item item2">专家问答</RouterLink>
+      <RouterLink to="/water-warn" class="item item3">智能分析</RouterLink>
+      <RouterLink to="/work-order" class="item item4">智能助手</RouterLink>
+    </div>
     <div class="screen-container">
-      <div class="menu">
-        <RouterLink to="/" class="item item1">智慧总控</RouterLink>
-        <RouterLink to="/answer" class="item item2">专家问答</RouterLink>
-        <RouterLink to="/water-warn" class="item item3">智能分析</RouterLink>
-        <RouterLink to="/helper" class="item item4">智能助手</RouterLink>
-      </div>
       <div class="screen-container-main">
         <div class="left">
           <shuizhi :screenData="screenData"></shuizhi>
+          <EchartBar :screenData="screenData"></EchartBar>
           <liuliang :screenData="screenData"></liuliang>
         </div>
         <div class="middle">
           <middleBox :dataTime="dataTime"></middleBox>
         </div>
         <div class="right">
+          <ControlHelper></ControlHelper>
           <dataBox :reportData="reportData"></dataBox>
           <gongyi :gongyiData="gongyiData"></gongyi>
         </div>
       </div>
     </div>
+    <div class="img-card">
+      <img src="@/assets/images/home/water-work.png" alt="" />
+    </div>
   </div>
 </template>
 
 <style lang="scss" scoped>
 .screen-view {
+  position: relative;
+  display: flex;
+  justify-content: space-around;
+  flex-flow: column;
   width: 100vw;
   height: 100vh;
-  background: url(@/assets/images/home/home_bg.png) no-repeat;
+  background: url(@/assets/images/home/home_bg.png) center center no-repeat;
   background-size: 100% 100%;
   overflow: hidden;
 
   &-top {
     display: flex;
+    align-items: end;
     justify-content: space-between;
-    padding: 3.8rem 2rem 3.2rem 3.2rem;
-    height: 3.6rem;
+    padding: 0 5rem;
+    height: 9rem;
 
     .left {
       display: flex;
       align-items: center;
       font-size: 1.6rem;
-      background: #415B73;
-      flex: 1;
     }
 
     .time {
       font-size: 3.6rem;
       font-weight: bold;
       color: #333;
-      width: 14rem;
     }
 
     .line {
@@ -156,93 +172,108 @@ onBeforeUnmount(() => {
       width: 0.2rem;
     }
 
-    .right {
-      flex: 1;
-      display: flex;
+    .data {
+      color: #415B73;
     }
   }
 
-  .screen-container {
-    padding: 0 6rem;
+  .menu {
+    display: flex;
+    align-content: center;
+    justify-content: center;
+    flex-shrink: 0;
 
-    .menu {
-      display: flex;
-      align-content: center;
-      justify-content: center;
+    .item {
+      width: 21.8rem;
+      height: 5.2rem;
+      display: inline-block;
+      font-size: 0;
+    }
 
-      .item {
-        width: 21.8rem;
-        height: 5.2rem;
-        display: inline-block;
-        font-size: 0;
-      }
+    .item1 {
+      background: url('@/assets/images/home/menu_1_hover.png') no-repeat;
+      background-size: 100% 100%;
+    }
 
-      .item1 {
-        background: url('@/assets/images/home/menu_1_hover.png') no-repeat;
-        background-size: 100% 100%;
-      }
+    .item2 {
+      background: url('@/assets/images/home/menu_2.png') no-repeat;
+      background-size: 100% 100%;
+      margin-right: 20rem;
 
-      .item2 {
-        background: url('@/assets/images/home/menu_2.png') no-repeat;
+      &:hover {
+        background: url('@/assets/images/home/menu_2_hover.png') no-repeat;
         background-size: 100% 100%;
-        margin-right: 20rem;
-
-        &:hover {
-          background: url('@/assets/images/home/menu_2_hover.png') no-repeat;
-          background-size: 100% 100%;
-        }
       }
+    }
 
-      .item3 {
-        background: url('@/assets/images/home/menu_3.png') no-repeat;
-        background-size: 100% 100%;
+    .item3 {
+      background: url('@/assets/images/home/menu_3.png') no-repeat;
+      background-size: 100% 100%;
 
-        &:hover {
-          background: url('@/assets/images/home/menu_3_hover.png') no-repeat;
-          background-size: 100% 100%;
-        }
+      &:hover {
+        background: url('@/assets/images/home/menu_3_hover.png') no-repeat;
+        background-size: 100% 100%;
       }
+    }
 
-      .item4 {
-        background: url('@/assets/images/home/menu_4.png') no-repeat;
-        background-size: 100% 100%;
+    .item4 {
+      background: url('@/assets/images/home/menu_4.png') no-repeat;
+      background-size: 100% 100%;
 
-        &:hover {
-          background: url('@/assets/images/home/menu_4_hover.png') no-repeat;
-          background-size: 100% 100%;
-        }
+      &:hover {
+        background: url('@/assets/images/home/menu_4_hover.png') no-repeat;
+        background-size: 100% 100%;
       }
-
     }
 
+  }
+
+  .screen-container {
+    display: flex;
+    flex-flow: column;
+    height: 80rem;
+    padding: 0 6rem;
+
     &-main {
+      height: 100%;
       display: flex;
-    }
+      justify-content: space-between;
 
-    .left,
-    .right,
-    .middle {
-      flex: 1;
-    }
+      .left {
+        display: flex;
+        flex-flow: column;
+      }
 
-    .right {
-      flex: 1;
+      .middle {
+        flex: 1;
+      }
     }
   }
 
+  .img-card {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    width: 79rem;
+    height: 59rem;
+  }
+}
 
-
+@media screen and (max-width: 1440px) {
+  .screen-view {
+    justify-content: flex-start;
+  }
 }
 </style>
 
 <style lang="scss">
 .home-box {
-  background: rgba(255, 255, 255, 0.8);
   width: 54rem;
-  height: 42rem;
+  // width: 540px;
   border-radius: 0.8rem;
-  border: 0.1rem solid #fff;
-  margin-top: 2rem;
+  // border: 1px solid #fff;
+  // margin-bottom: 2rem;
 
   &-top {
     padding: 0.7rem 2.4rem 0.7rem 1.2rem;

+ 124 - 0
src/views/screen/components/ControlHelper.vue

@@ -0,0 +1,124 @@
+<script setup>
+import { ref, watch, onMounted, onUnmounted } from 'vue';
+import { screenApi } from '@/api/screen';
+import * as echarts from 'echarts';
+import "echarts-gl";
+import { getPieOptions } from '../config/echartOption';
+
+let echart = null;
+
+const echartRef = ref(null);
+const legendData = ref([]);
+
+const windowResize = () => echart.resize();
+
+onMounted(async () => {
+
+  const { data: { DF, XNJF, CLF, TYF, QTYJF } } = await screenApi.getFee();
+
+  const data = [
+    { name: '电费', value: DF, color: "#00A0E9"},
+    { name: '絮凝剂费', value: XNJF, color: "#00AB84"},
+    { name: '除磷费', value: CLF, color: "#C6A3FF"},
+    { name: '碳源费', value: TYF, color: "#E9D0A1"},
+    { name:'其他药剂费', value: QTYJF, color: "#45D3F2"}
+  ]
+
+  legendData.value = data
+
+  echart = echarts.init(echartRef.value, 'light');
+
+  echart.setOption( getPieOptions(data) );
+
+  window.addEventListener("resize", windowResize);
+})
+
+onUnmounted(() => {
+  window.removeEventListener("resize", windowResize);
+})
+
+</script>
+
+<template>
+  <div class="home-box">
+    <div class="home-box-top">
+      <div class="title">成本管控助手</div>
+      <div>
+        <span class="text-[#1A2029] text-[1.4rem]">2024-06-08</span>
+      </div>
+    </div>
+    <div class="main">
+      <ul class="flex justify-between items-center">
+        <li class="text-[1.4rem] font-bold text-[#1A2029]">成本指标</li>
+        <li class="text-[1.2rem] text-[#415B73]">
+          <span>直接成本:¥4256元/天</span>
+          <span>单位成本:¥400元/千吨</span>
+        </li>
+      </ul>
+      <div class="echart_inner">
+        <div class="cost-chart flex items-center">
+          <div id="pieEchart" class="w-[16rem] h-[16rem]" ref="echartRef"></div>
+        </div>
+        <ul class="cost-num">
+          <li class="cost-item space-y-[0.4rem]" v-for="item in legendData" :key="item.value">
+            <p class="flex items-center space-x-[0.5rem]">
+              <span class="square-icon" :style="{borderColor: item.color}"><i :style="{background: item.color}"></i></span>
+              <span>{{ item.name }}</span>
+            </p>
+            <span>{{ item.value }} 元</span>
+          </li>
+        </ul>
+      </div>
+    </div>
+  </div>
+</template>
+
+<style scoped lang="scss">
+.main {
+  padding: 1.8rem 2.5rem 1.6rem 4rem;
+
+  .echart_inner {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 12rem;
+
+    .cost-chart {
+      width: 19rem;
+      height: 12rem;
+      display: flex;
+      justify-content: center;
+      margin-right: 3rem;
+      background: url("@/assets/images/home/bg-helper-round.png") no-repeat;
+      background-size: 100% 100%;
+    }
+
+    .cost-num {
+      flex: 1;
+      font-size: 1.2rem;
+      color: #415B73;
+      
+      .cost-item {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+
+        .square-icon {
+          display: inline-block;
+          padding: 0.1rem;
+          border-width: 0.2rem;
+          border-style: solid;
+          background: #fff;
+
+          i {
+            display: block;
+            width: 0.8rem;
+            height: 0.8rem;
+          }
+        }
+      }
+    }
+  }
+
+}
+</style>

+ 97 - 0
src/views/screen/components/EchartBar.vue

@@ -0,0 +1,97 @@
+<script setup>
+import { ref, watch, onMounted, onUnmounted } from 'vue';
+import * as echarts from 'echarts';
+import { getBarOptions } from '../config/echartOption';
+
+let chart = null;
+const echartRef = ref(null);
+
+const props = defineProps({
+  screenData: {
+    type: Object,
+    default: []
+  }
+})
+
+watch(() => props.screenData, (currentVal) => {
+  const { no3Hlj1Jqr, no3Hlj2Jqr, nh31Jqr, nh32Jqr, tpRccJqr } = currentVal;
+  chart.setOption( getBarOptions([ no3Hlj1Jqr, no3Hlj2Jqr, nh31Jqr, nh32Jqr, tpRccJqr ]) )
+})
+
+const windowResize = () => {
+  console.log( "resieze" );
+  chart.resize();
+}
+
+onMounted(() => {
+  chart = echarts.init(echartRef.value, 'light');
+
+  window.addEventListener("resize", windowResize);
+})
+
+onUnmounted(() => {
+  window.removeEventListener("resize", windowResize);
+})
+</script>
+
+<template>
+  <div class="home-box echart-box">
+    <div class="home-box-top">
+      <div class="title">生化监测</div>
+    </div>
+    <div class="main">
+      <ul class="legeng_inner space-x-[3rem]">
+        <li class="item space-x-[0.6rem]">
+          <span class="square-icon border-[#FF6737]"><i class="bg-[#FF6737]"></i></span>
+          <span>当前值</span>
+        </li>
+        <li class="item space-x-[0.6rem]">
+          <span class="square-icon border-[#00AB84]"><i class="bg-[#00AB84]"></i></span>
+          <span>范围值</span>
+        </li>
+      </ul>
+      <div class="echart_inner">
+        <div class="echart w-full h-full" ref="echartRef"></div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<style lang="scss" scoped>
+.echart-box {
+  min-height: 30rem;
+  .echart_inner {
+    height: calc(100% - 5.6rem);
+  }
+}
+.main {
+  height: 100%;
+  padding: 1.8rem 1.8rem 1.6rem;
+
+  .legeng_inner {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    color: #415B73;
+    .item {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      font-size: 1.2rem;
+      .square-icon {
+        display: inline-block;
+        padding: 0.1rem;
+        border-width: 0.2rem;
+        border-style: solid;
+        background: #fff;
+        i {
+          display: block;
+          width: 0.8rem;
+          height: 0.8rem;
+        }
+      }
+    }
+  }
+
+}
+</style>

+ 2 - 2
src/views/screen/components/csBox.vue

@@ -43,13 +43,13 @@
       <div class="name">PH值</div>
       <div class="value">标准值:6~9</div>
     </li>
-    <li class="box-item">
+    <!-- <li class="box-item">
       <div class="cicle">
         <cicle :levelVal="35" :value="screenData.csSw"></cicle>
       </div>
       <div class="name">温度</div>
       <div class="value">标准值:15-35℃</div>
-    </li>
+    </li> -->
   </ul>
 </template>
 

+ 34 - 8
src/views/screen/components/dataBox.vue

@@ -13,38 +13,64 @@ const content = '① 因房地产市场并不十分活跃和顺利运转,因
   <div class="home-box data-box">
     <div class="home-box-top">
       <div class="title">数据分析</div>
+      <div class="flex items-center space-x-[0.4rem] text-[#333333]">
+        <RouterLink to="/work-order" class="flex items-center space-x-[0.4rem] text-[1.6rem]">
+          <span>更多</span>
+          <svg width="1.5rem" height="2rem" viewBox="0 0 15 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+            <path fill-rule="evenodd" clip-rule="evenodd" d="M14.5303 10L4.53033 0L2.84959 1.68074L11.1688 10L2.84959 18.3193L4.53033 20L14.5303 10ZM7.39954 10L2.1534 4.75386L0.472656 6.4346L4.03805 10L0.472656 13.5654L2.1534 15.2461L7.39954 10Z" fill="url(#paint0_linear_1909_2940)"/>
+            <defs>
+            <linearGradient id="paint0_linear_1909_2940" x1="14.5303" y1="10" x2="-0.817942" y2="10.5941" gradientUnits="userSpaceOnUse">
+            <stop stop-color="#1872D8"/>
+            <stop offset="0.43028" stop-color="#08AEF1"/>
+            <stop offset="1" stop-color="white"/>
+            </linearGradient>
+            </defs>
+          </svg>
+        </RouterLink>
+      </div>
     </div>
     <div class="data-box-main">
       <div class="content">
         <h5 class="title">{{ reportData.showVal }}</h5>
-        <ChatText :content="reportData.answer" class="html-box"></ChatText>
+        <div class="markdown-inner">
+          <ChatText :content="reportData.answer" class="html-box"></ChatText>
+        </div>
       </div>
-      <RouterLink to="/work-order" class="btn">更多数据分析</RouterLink>
     </div>
   </div>
 </template>
 
 <style scoped lang="scss">
 .data-box {
-  background: rgba(255, 255, 255, 0.8);
 
   &-main {
-    padding: 2rem 4rem;
+    padding: 1.8rem 2.5rem 1.6rem 4rem;
     display: flex;
     align-items: center;
     flex-direction: column;
 
     .content {
-
+      .markdown-inner {
+        height: 20rem;
+        overflow-y: scroll;
+        &::-webkit-scrollbar {
+          width: 0px !important;
+        }
+      }
+      // .markdown-body{
+      //   &::-webkit-scrollbar {
+      //     width: 0px !important;
+      //   }
+      // }
       .title {
-        margin: 0.6rem 0 1.6rem;
+        margin-bottom:1.6rem;
         font-size: 1.6rem;
         font-weight: bold;
       }
 
       .html-box {
-        height: 22.6rem;
-        overflow-y: auto;
+        // height: 22.6rem;
+        // overflow-y: auto;
         font-size: 1.4rem;
       }
 

+ 22 - 3
src/views/screen/components/gongyi.vue

@@ -18,6 +18,21 @@ const toGongyi = (item) => {
   <div class="home-box gongyi">
     <div class="home-box-top">
       <div class="title">工艺管控助手</div>
+      <div class="flex items-center space-x-[0.4rem] text-[#333333]">
+        <RouterLink to="/water-warn" class="flex items-center space-x-[0.4rem] text-[1.6rem]">
+          <span>更多</span>
+          <svg width="1.5rem" height="2rem" viewBox="0 0 15 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+            <path fill-rule="evenodd" clip-rule="evenodd" d="M14.5303 10L4.53033 0L2.84959 1.68074L11.1688 10L2.84959 18.3193L4.53033 20L14.5303 10ZM7.39954 10L2.1534 4.75386L0.472656 6.4346L4.03805 10L0.472656 13.5654L2.1534 15.2461L7.39954 10Z" fill="url(#paint0_linear_1909_2940)"/>
+            <defs>
+            <linearGradient id="paint0_linear_1909_2940" x1="14.5303" y1="10" x2="-0.817942" y2="10.5941" gradientUnits="userSpaceOnUse">
+            <stop stop-color="#1872D8"/>
+            <stop offset="0.43028" stop-color="#08AEF1"/>
+            <stop offset="1" stop-color="white"/>
+            </linearGradient>
+            </defs>
+          </svg>
+        </RouterLink>
+      </div>
     </div>
     <div class="gongyi-wrap">
       <div class="gongyi-wrap-top gongyi-wrap-item">
@@ -38,8 +53,8 @@ const toGongyi = (item) => {
 
 <style scoped lang="scss">
 .gongyi {
-  height: 36.4rem;
-  margin-top: 2rem;
+  // height: 36.4rem;
+  // margin-top: 2rem;
 
   .gongyi-wrap {
     padding: 1.2rem;
@@ -52,8 +67,12 @@ const toGongyi = (item) => {
     }
 
     &-list {
-      height: 26.5rem;
+      height: 12rem;
       overflow-y: auto;
+      
+      &::-webkit-scrollbar {
+          width: 0px !important;
+        }
     }
 
     &-item {

+ 2 - 2
src/views/screen/components/jsBox.vue

@@ -44,13 +44,13 @@
       <div class="name">PH值</div>
       <div class="value">标准值:6~9</div>
     </li>
-    <li class="box-item">
+    <!-- <li class="box-item">
       <div class="cicle">
         <cicle :levelVal="35" :value="screenData.jsSw"></cicle>
       </div>
       <div class="name">温度</div>
       <div class="value">标准值:15-35℃</div>
-    </li>
+    </li> -->
   </ul>
 </template>
 

+ 55 - 11
src/views/screen/components/liuliang.vue

@@ -1,4 +1,5 @@
 <script setup>
+import { ref } from 'vue';
 
 defineProps({
   screenData: {
@@ -6,6 +7,12 @@ defineProps({
     default: []
   },
 })
+
+const index = ref(0)
+const changeTab = (i) => {
+  index.value = i
+}
+
 const showHBarrow = (value) => {
   const str = value > 0 ? '↑' : '↓'
   const num = value ? (value * 100).toFixed(2) : 0
@@ -21,10 +28,13 @@ const showVal = (value) => {
   <div class="home-box liuliang">
     <div class="home-box-top">
       <div class="title">流量分析</div>
+      <div class="right">
+        <span :class="['btn', index == 0 ? 'action' : '']" @click="changeTab(0)">进水</span>
+        <span :class="['btn', index == 1 ? 'action' : '']" @click="changeTab(1)">出水</span>
+      </div>
     </div>
     <div class="box-wrap">
-      <h3 class="box-wrap-title">进水流量</h3>
-      <ul class="box-wrap-list">
+      <ul class="box-wrap-list" v-show="index === 0">
         <li class="box-wrap-item">
           <div class="dess">瞬时 m³/h</div>
           <div class="num">{{ showVal(screenData.jsSlq) }}</div>
@@ -41,11 +51,7 @@ const showVal = (value) => {
           <div class="footer">{{ showHBarrow(screenData.szZJSHb) }}%</div>
         </li>
       </ul>
-    </div>
-
-    <div class="box-wrap">
-      <h3 class="box-wrap-title">出水流量</h3>
-      <ul class="box-wrap-list">
+      <ul class="box-wrap-list" v-show="index === 1">
         <li class="box-wrap-item">
           <div class="dess">瞬时 m³/h</div>
           <div class="num">{{ showVal(screenData.csSlqc) }}</div>
@@ -64,17 +70,18 @@ const showVal = (value) => {
       </ul>
     </div>
 
+
   </div>
 </template>
 
 <style scoped lang="scss">
 .liuliang {
-  height: 36.4rem;
-  margin-top: 2rem;
+  height: 15rem;
+  // margin-top: 2rem;
 
   .box-wrap {
-    margin-top: 3rem;
-    padding: 0 3rem;
+    // margin-top: 3rem;
+    // padding: 0 3rem;
 
     &-title {
       font-size: 1.6rem;
@@ -85,6 +92,7 @@ const showVal = (value) => {
     }
 
     &-list {
+      padding: 1.8rem 1.8rem 1.6rem 1.8rem;
       display: flex;
     }
 
@@ -137,5 +145,41 @@ const showVal = (value) => {
       }
     }
   }
+  
+  .right {
+    .btn {
+      width: 6.2rem;
+      height: 2.8rem;
+      background: rgba(238, 249, 255, 1);
+      border: 0.1rem solid rgba(122, 215, 249, 1);
+      float: left;
+      border-radius: 0;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      cursor: pointer;
+      color: rgba(84, 194, 248, 1);
+      font-size: 1.4rem;
+
+      &:first-child {
+        border-right: 0;
+        border-top-left-radius: 0.4rem;
+        border-bottom-left-radius: 0.4rem;
+      }
+
+      &:last-child {
+        border-left: 0;
+        border-top-right-radius: 0.4rem;
+        border-bottom-right-radius: 0.4rem;
+      }
+    }
+
+    .action,
+    .btn:hover {
+      background: linear-gradient(270deg, #59CCFA 0%, #3C97F7 100%);
+      border: none;
+      color: #fff;
+    }
+  }
 }
 </style>

+ 2 - 0
src/views/screen/components/shuizhi.vue

@@ -32,6 +32,7 @@ defineProps({
 
 <style scoped lang="scss">
 .shuizhi {
+  height: 31rem;
   .right {
     .btn {
       width: 6.2rem;
@@ -45,6 +46,7 @@ defineProps({
       justify-content: center;
       cursor: pointer;
       color: rgba(84, 194, 248, 1);
+      font-size: 1.4rem;
 
       &:first-child {
         border-right: 0;

+ 736 - 0
src/views/screen/config/echartOption.js

@@ -0,0 +1,736 @@
+export const getBarOptions = (currentData = []) => {
+  const xAxis = ["1#好氧池硝酸盐", "2#好氧池硝酸盐", "1#缺氧氨氮", "2#缺氧氨氮", "二沉池正磷酸盐"];
+  const rangeData = [12, 12, 15, 15, 0.4];
+
+  let option = {
+    tooltip: {
+      trigger: 'axis',
+    },
+    grid: {
+      // containLabel: true,
+      bottom: "10%",
+      top: "6%",
+      left: "10%",
+      right: "2%",
+    },
+    xAxis: [
+      {
+        type: "category",
+        data: xAxis,
+        axisLabel: {
+          interval: 0,
+          show: true,
+          fontSize: '1.1rem',
+          color: "#0A284E",
+        },
+        axisLine: {
+          show: true,
+          lineStyle: {
+            show: true,
+            color: "rgba(54, 153, 255, .4)",
+          },
+        },
+        axisTick: {
+          show: false,
+        },
+      },
+      //背景柱体,不显示数据在图表中,只显示背景色
+      // {
+      //   type: "category",
+      //   show: false,
+      //   data: myData6,
+      // },
+    ],
+    yAxis: [
+      {
+        type: "value",
+        axisLabel: {
+          show: true,
+          fontSize: '1.1rem',
+          color: "#7395B3",
+        },
+        axisLine: {
+          show: false,
+          lineStyle: {
+            color: "#7FD6FF",
+          },
+        },
+        axisTick: {
+          show: false,
+        },
+        splitLine: {
+          lineStyle: {
+            color: "#BDD4E8",
+            type: "dashed",
+          },
+        },
+      },
+    ],
+    series: [
+      {
+        name: "当前值",
+        type: "bar",
+        itemStyle: {
+          borderRadius: [2, 2, 0, 0],
+          color: {
+            x: 0,
+            y: 0,
+            x2: 0,
+            y2: 1,
+            colorStops: [
+              {
+                offset: 0,
+                color: "rgba(246,115,7, 0.5)",
+              },
+              {
+                offset: 1,
+                color: "rgba(246,115,7, 0.1)",
+              },
+            ],
+          },
+        },
+        barWidth: 8,
+        data: currentData,
+      },
+      {
+        name: "范围值",
+        type: "bar",
+        itemStyle: {
+          color: {
+            x: 0,
+            y: 0,
+            x2: 0,
+            y2: 1,
+            colorStops: [
+              {
+                offset: 0,
+                color: "rgba(10,184,4, 0.5)",
+              },
+              {
+                offset: 1,
+                color: "rgba(10,184,4, 0.1)",
+              },
+            ],
+          },
+        },
+        barWidth: 8,
+        // 展示柱图背景
+        data: rangeData,
+      },
+      {
+        // 柱形顶部色块
+        name: '',
+        type: 'pictorialBar',
+        itemStyle: {
+          normal: {
+            color: '#FF6737'
+          }
+        },
+        tooltip: {
+          show: false
+        },
+        symbolRepeat: false,
+        symbolMargin: 8,
+        symbol: 'rect',
+        symbolClip: false,
+        symbolSize: [7, 2],
+        symbolPosition: 'end',
+        symbolOffset: [-4, 0],
+        data: currentData,
+        width: 1,
+        z: 0,
+        zlevel: 1
+      },
+      {
+        // 柱形顶部色块
+        name: '',
+        type: 'pictorialBar',
+        itemStyle: {
+          normal: {
+            color: '#00AB84'
+          }
+        },
+        tooltip: {
+          show: false
+        },
+        symbolRepeat: false,
+        symbolMargin: 8,
+        symbol: 'rect',
+        symbolClip: false,
+        symbolSize: [7, 2],
+        symbolPosition: 'end',
+        symbolOffset: [5, 0],
+        data: rangeData,
+        width: 1,
+        z: 0,
+        zlevel: 1
+      },
+    ],
+  };
+
+  return option;
+}
+
+export const getPieOptions = (optionsData) => {
+  let colors = ['#00A0E9', '#00AB84', '#C6A3FF', '#E9D0A1', '#45D3F2']
+
+  function getParametricEquation(
+    startRatio,
+    endRatio,
+    isSelected,
+    isHovered,
+    k,
+    height,
+    i
+  ) {
+    // 计算
+    let midRatio = (startRatio + endRatio) / 2;
+  
+    let startRadian = startRatio * Math.PI * 2;
+    let endRadian = endRatio * Math.PI * 2;
+    let midRadian = midRatio * Math.PI * 2;
+  
+    // 如果只有一个扇形,则不实现选中效果。
+    if (startRatio === 0 && endRatio === 1) {
+      isSelected = false;
+    }
+  
+    // 通过扇形内径/外径的值,换算出辅助参数 k(默认值 1/3)
+    k = typeof k !== "undefined" ? k : 1 / 3;
+  
+    // 计算选中效果分别在 x 轴、y 轴方向上的位移(未选中,则位移均为 0)
+    let offsetX = isSelected ? Math.cos(midRadian) * 0.1 : 0;
+    let offsetY = isSelected ? Math.sin(midRadian) * 0.1 : 0;
+    let offsetZ = i == 1 ? 2 : 0;
+    // 计算高亮效果的放大比例(未高亮,则比例为 1)
+    let hoverRate = isHovered ? 1.05 : 1;
+  
+    // 返回曲面参数方程
+    return {
+      u: {
+        min: -Math.PI,
+        max: Math.PI * 3,
+        step: Math.PI / 32,
+      },
+  
+      v: {
+        min: 0,
+        max: Math.PI * 2,
+        step: Math.PI / 20,
+      },
+  
+      x: function (u, v) {
+        if (u < startRadian) {
+          return (
+            offsetX + Math.cos(startRadian) * (1 + Math.cos(v) * k) * hoverRate
+          );
+        }
+        if (u > endRadian) {
+          return (
+            offsetX + Math.cos(endRadian) * (1 + Math.cos(v) * k) * hoverRate
+          );
+        }
+        return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate;
+      },
+  
+      y: function (u, v) {
+        if (u < startRadian) {
+          return (
+            offsetY + Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate
+          );
+        }
+        if (u > endRadian) {
+          return (
+            offsetY + Math.sin(endRadian) * (1 + Math.cos(v) * k) * hoverRate
+          );
+        }
+        return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate;
+      },
+  
+      z: function (u, v) {
+        if (u < -Math.PI * 0.5) {
+          return Math.sin(u);
+        }
+        if (u > Math.PI * 2.5) {
+          return Math.sin(u);
+        }
+        return Math.sin(v) > 0 ? 1 * height : -1;
+      },
+    };
+  }
+  // 生成模拟 3D 饼图的配置项
+  function getPie3D(pieData, internalDiameterRatio) {
+    let series = [];
+    let sumValue = 0;
+    let startValue = 0;
+    let endValue = 0;
+    let legendData = [];
+    let k =
+      typeof internalDiameterRatio !== "undefined"
+        ? (1 - internalDiameterRatio) / (1 + internalDiameterRatio)
+        : 1 / 3;
+  
+    // 为每一个饼图数据,生成一个 series-surface 配置
+    for (let i = 0; i < pieData.length - 1; i++) {
+      sumValue += pieData[i].value;
+  
+      let seriesItem = {
+        name:
+          typeof pieData[i].name === "undefined"
+            ? `series${i}`
+            : pieData[i].name,
+        type: "surface",
+        parametric: true,
+        wireframe: {
+          show: false,
+        },
+        pieData: pieData[i],
+        itemStyle: {
+          color: pieData[i].color, // 自定义颜色
+          opacity: '0.7'
+        },
+        pieStatus: {
+          selected: false,
+          hovered: false,
+          k: k,
+        },
+      };
+  
+      if (typeof pieData[i].itemStyle != "undefined") {
+        let itemStyle = {};
+  
+        typeof pieData[i].itemStyle.color != "undefined"
+          ? (itemStyle.color = pieData[i].itemStyle.color)
+          : null;
+        typeof pieData[i].itemStyle.opacity != "undefined"
+          ? (itemStyle.opacity = pieData[i].itemStyle.opacity)
+          : null;
+  
+        seriesItem.itemStyle = itemStyle;
+      }
+      series.push(seriesItem);
+    }
+  
+    for (let i = 0; i < series.length; i++) {
+      endValue = startValue + series[i].pieData.value;
+      series[i].pieData.startRatio = startValue / sumValue;
+      series[i].pieData.endRatio = endValue / sumValue;
+      series[i].parametricEquation = getParametricEquation(
+        series[i].pieData.startRatio,
+        series[i].pieData.endRatio,
+        false,
+        false,
+        k,
+        // 调整扇形高度
+        i === 0 ? 10 : 10,
+        i,
+        series[i].pieData.value
+      );
+  
+      startValue = endValue;
+  
+      legendData.push(series[i].name);
+    }
+    return series;
+  }
+  
+  const series = getPie3D(optionsData, 0.6); // 可做为调整内环大小 0为实心圆饼图,大于0 小于1 为圆环
+  series.push({
+    name: "pie2d",
+    type: "pie",
+    startAngle: 2, //起始角度,支持范围[0, 360]。
+    clockwise: false, //饼图的扇区是否是顺时针排布。上述这两项配置主要是为了对齐3d的样式
+    // radius: ["50%", "60%"],
+    // center: ["62%", "50%"],
+    data: optionsData,
+    itemStyle: {
+      opacity: 0,
+    },
+    labelLine: {
+      show: false
+    },
+    label: {
+      show: false,
+      position: 'center'
+    },
+  });
+  // 准备待返回的配置项,把准备好的 legendData、series 传入。
+  let option = {
+    animation: true,
+    tooltip: {
+      formatter: (params) => {
+         if (params.seriesName !== 'mouseoutSeries') {
+          const { name, value, color} = optionsData[params.seriesIndex] ?? {};
+            return `${name
+               }<br/><span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${color
+               };"></span>${value}` ;
+         }
+      },
+   },
+    title: {
+      x: "center",
+      top: "20",
+      textStyle: {
+        color: "#fff",
+        fontSize: 22,
+      },
+    },
+    xAxis3D: {
+      min: -1,
+      max: 1,
+    },
+    yAxis3D: {
+      min: -1,
+      max: 1,
+    },
+    zAxis3D: {
+      min: -1,
+      max: 1,
+    },
+    grid3D: {
+      show: false,
+      boxHeight: 2.5,
+      top: '-10%',
+      // left: "8%",
+      // bottom: "50%",
+      viewControl: {
+        // alpha: 38,
+        // beta: 70,
+        enabled: true,
+        alpha: 30,
+        beta: 55,
+        distance: 150,
+        rotateSensitivity: 0, //设置为0无法旋转
+        zoomSensitivity: 0, //设置为0无法缩放
+        panSensitivity: 0, //设置为0无法平移
+        autoRotate: false, //自动旋转
+        
+        
+        // beta: 325,
+      //   autoRotate: false, // 自动旋转
+      },
+    },
+    series: series,
+  };
+
+  // return option
+
+  // let colors = ['#16d0ff', '#664bff', '#37a2da', '#ffdb5c', '#ff9f7f', '#9fe6b8', '#67e0e3', '#32c5e9', '#fb7293', "#9A60B4", "#ea7ccc"]
+  // // 传入数据生成 option
+  // const optionsData = [
+  //   {
+  //     name: "第一科室",
+  //     value: 68,
+  //   },
+  //   {
+  //     name: "第二科室",
+  //     value: 52,
+  //   },
+  //   {
+  //     name: "第三科室",
+  //     value: 37,
+  //   },
+  //   {
+  //     name: "第四科室",
+  //     value: 58,
+  //   },
+  // ];
+  // function getParametricEquation(
+  //   startRatio,
+  //   endRatio,
+  //   isSelected,
+  //   isHovered,
+  //   k,
+  //   height,
+  //   i
+  // ) {
+  //   // 计算
+  //   let midRatio = (startRatio + endRatio) / 2;
+  
+  //   let startRadian = startRatio * Math.PI * 2;
+  //   let endRadian = endRatio * Math.PI * 2;
+  //   let midRadian = midRatio * Math.PI * 2;
+  
+  //   // 如果只有一个扇形,则不实现选中效果。
+  //   if (startRatio === 0 && endRatio === 1) {
+  //     isSelected = false;
+  //   }
+  
+  //   // 通过扇形内径/外径的值,换算出辅助参数 k(默认值 1/3)
+  //   k = typeof k !== "undefined" ? k : 1 / 3;
+  
+  //   // 计算选中效果分别在 x 轴、y 轴方向上的位移(未选中,则位移均为 0)
+  //   let offsetX = isSelected ? Math.cos(midRadian) * 0.1 : 0;
+  //   let offsetY = isSelected ? Math.sin(midRadian) * 0.1 : 0;
+  //   let offsetZ = i == 1 ? 2 : 0;
+  //   // 计算高亮效果的放大比例(未高亮,则比例为 1)
+  //   let hoverRate = isHovered ? 1.05 : 1;
+  
+  //   // 返回曲面参数方程
+  //   return {
+  //     u: {
+  //       min: -Math.PI,
+  //       max: Math.PI * 3,
+  //       step: Math.PI / 32,
+  //     },
+  
+  //     v: {
+  //       min: 0,
+  //       max: Math.PI * 2,
+  //       step: Math.PI / 20,
+  //     },
+  
+  //     x: function (u, v) {
+  //       if (u < startRadian) {
+  //         return (
+  //           offsetX + Math.cos(startRadian) * (1 + Math.cos(v) * k) * hoverRate
+  //         );
+  //       }
+  //       if (u > endRadian) {
+  //         return (
+  //           offsetX + Math.cos(endRadian) * (1 + Math.cos(v) * k) * hoverRate
+  //         );
+  //       }
+  //       return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate;
+  //     },
+  
+  //     y: function (u, v) {
+  //       if (u < startRadian) {
+  //         return (
+  //           offsetY + Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate
+  //         );
+  //       }
+  //       if (u > endRadian) {
+  //         return (
+  //           offsetY + Math.sin(endRadian) * (1 + Math.cos(v) * k) * hoverRate
+  //         );
+  //       }
+  //       return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate;
+  //     },
+  
+  //     z: function (u, v) {
+  //       if (u < -Math.PI * 0.5) {
+  //         return Math.sin(u);
+  //       }
+  //       if (u > Math.PI * 2.5) {
+  //         return Math.sin(u);
+  //       }
+  //       return Math.sin(v) > 0 ? 1 * height : -1;
+  //     },
+  //   };
+  // }
+  // // 生成模拟 3D 饼图的配置项
+  // function getPie3D(pieData, internalDiameterRatio) {
+  //   let series = [];
+  //   let sumValue = 0;
+  //   let startValue = 0;
+  //   let endValue = 0;
+  //   let legendData = [];
+  //   let k =
+  //     typeof internalDiameterRatio !== "undefined"
+  //       ? (1 - internalDiameterRatio) / (1 + internalDiameterRatio)
+  //       : 1 / 3;
+  
+  //   // 为每一个饼图数据,生成一个 series-surface 配置
+  //   for (let i = 0; i < pieData.length; i++) {
+  //     sumValue += pieData[i].value;
+  
+  //     let seriesItem = {
+  //       name:
+  //         typeof pieData[i].name === "undefined"
+  //           ? `series${i}`
+  //           : pieData[i].name,
+  //       type: "surface",
+  //       parametric: true,
+  //       wireframe: {
+  //         show: false,
+  //       },
+  //       pieData: pieData[i],
+  //       itemStyle: {
+  //         color: colors[i], // 自定义颜色
+  //         opacity: '0.7'
+  //       },
+  //       pieStatus: {
+  //         selected: false,
+  //         hovered: false,
+  //         k: k,
+  //       },
+  //     };
+  
+  //     if (typeof pieData[i].itemStyle != "undefined") {
+  //       let itemStyle = {};
+  
+  //       typeof pieData[i].itemStyle.color != "undefined"
+  //         ? (itemStyle.color = pieData[i].itemStyle.color)
+  //         : null;
+  //       typeof pieData[i].itemStyle.opacity != "undefined"
+  //         ? (itemStyle.opacity = pieData[i].itemStyle.opacity)
+  //         : null;
+  
+  //       seriesItem.itemStyle = itemStyle;
+  //     }
+  //     series.push(seriesItem);
+  //   }
+  
+  //   // 使用上一次遍历时,计算出的数据和 sumValue,调用 getParametricEquation 函数,
+  //   // 向每个 series-surface 传入不同的参数方程 series-surface.parametricEquation,也就是实现每一个扇形。
+  //   for (let i = 0; i < series.length; i++) {
+  //     endValue = startValue + series[i].pieData.value;
+  //     console.log(series[i]);
+  //     series[i].pieData.startRatio = startValue / sumValue;
+  //     series[i].pieData.endRatio = endValue / sumValue;
+  //     series[i].parametricEquation = getParametricEquation(
+  //       series[i].pieData.startRatio,
+  //       series[i].pieData.endRatio,
+  //       false,
+  //       false,
+  //       k,
+  //       // 调整扇形高度
+  //       i === 0 ? 10 : 10,
+  //       i,
+  //       series[i].pieData.value
+  //     );
+  
+  //     startValue = endValue;
+  
+  //     legendData.push(series[i].name);
+  //   }
+  //   return series;
+  // }
+  
+  // const series = getPie3D(optionsData, 0.6); // 可做为调整内环大小 0为实心圆饼图,大于0 小于1 为圆环
+  // series.push({
+  //   name: "pie2d",
+  //   type: "pie",
+  //   label: {
+  //     opacity: 1,
+  //     fontSize: 14,
+  //     lineHeight: 20,
+  //     textStyle: {
+  //       fontSize: 14,
+  //       color: "#fff",
+  //     },
+  //   },
+  //   labelLine: {
+  //     length: 10,
+  //     length2: 10,
+  //   },
+  //   startAngle: 2, //起始角度,支持范围[0, 360]。
+  //   clockwise: false, //饼图的扇区是否是顺时针排布。上述这两项配置主要是为了对齐3d的样式
+  //   radius: ["50%", "60%"],
+  //   center: ["62%", "50%"],
+  //   data: optionsData,
+  //   itemStyle: {
+  //     opacity: 0,
+  //   },
+  //   labelLine: {
+  //     show: false
+  //   },
+  //   label: {
+  //     show: false,
+  //     position: 'center'
+  //   },
+  // });
+  // // 准备待返回的配置项,把准备好的 legendData、series 传入。
+  // let option = {
+    
+  //   animation: true,
+  //   tooltip: {
+  //     show: false,
+  //     textStyle: {
+  //       fontSize: 14,
+  //     },
+  //   },
+  //   title: {
+  //     x: "center",
+  //     top: "20",
+  //     textStyle: {
+  //       color: "#fff",
+  //       fontSize: 22,
+  //     },
+  //   },
+  //   labelLine: {
+  //     show: true,
+  //     lineStyle: {
+  //       color: "#7BC0CB",
+  //     },
+  //     normal: {
+  //       show: false,
+  //       length: 10,
+  //       length2: 10,
+  //     },
+  //   },
+  //   label: {
+  //     show: true,
+  //     position: "outside",
+  //     // formatter: "{b} {d}%",
+  //     formatter: function (optionsData) {
+  //       console.log('optionsData', optionsData)
+  //       return (
+  //         "{name|" +
+  //         optionsData.name +
+  //         "}" +
+  //         " {value|" +
+  //         optionsData.percent.toFixed(0) +
+  //         "%}"
+  //       );
+  //     },
+  //     rich: {
+  //       name: {
+  //         fontSize: 14,
+  //         color: "#ffffff",
+  //       },
+  //       value: {
+  //         fontSize: 14,
+  //         color: "#ffffff",
+  //       },
+  //     },
+  //     textStyle: {
+  //       color: "#fff",
+  //       fontSize: "14px",
+  //     },
+  //   },
+  //   xAxis3D: {
+  //     min: -1,
+  //     max: 1,
+  //   },
+  //   yAxis3D: {
+  //     min: -1,
+  //     max: 1,
+  //   },
+  //   zAxis3D: {
+  //     min: -1,
+  //     max: 1,
+  //   },
+  //   grid3D: {
+  //     show: false,
+  //     boxHeight: 2,
+  //     top: '-10%',
+  //     // left: "8%",
+  //     // bottom: "50%",
+  //     // environment: "rgba(255,255,255,0)",
+  //     viewControl: {
+  //       alpha: 30,
+  //       distance: 150,
+  //       beta: 15,
+  //       autoRotate: false, // 自动旋转
+
+  // //       // alpha: 38,
+  // //       // beta: 70,
+  // //       enabled: true,
+  // //       alpha: 30,
+  // //       beta: 30,
+  // //       distance: 150,
+  // //       rotateSensitivity: 0, //设置为0无法旋转
+  // //       zoomSensitivity: 0, //设置为0无法缩放
+  // //       panSensitivity: 0, //设置为0无法平移
+  // //       autoRotate: false, //自动旋转
+        
+  //     },
+  //   },
+  //   series: series,
+  // };
+
+  return option;
+
+}

+ 21 - 13
yarn.lock

@@ -364,10 +364,10 @@
   resolved "https://registry.npmmirror.com/@emotion/hash/-/hash-0.8.0.tgz"
   integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==
 
-"@esbuild/darwin-x64@0.20.2":
+"@esbuild/win32-x64@0.20.2":
   version "0.20.2"
-  resolved "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz"
-  integrity sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==
+  resolved "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz"
+  integrity sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==
 
 "@iktakahiro/markdown-it-katex@^4.0.1":
   version "4.0.1"
@@ -465,10 +465,10 @@
     estree-walker "^2.0.2"
     picomatch "^2.3.1"
 
-"@rollup/rollup-darwin-x64@4.18.0":
+"@rollup/rollup-win32-x64-msvc@4.18.0":
   version "4.18.0"
-  resolved "https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz"
-  integrity sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==
+  resolved "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz"
+  integrity sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==
 
 "@trysound/sax@0.2.0":
   version "0.2.0"
@@ -1086,6 +1086,11 @@ class-utils@^0.3.5:
     isobject "^3.0.0"
     static-extend "^0.1.1"
 
+claygl@^1.2.1:
+  version "1.3.0"
+  resolved "https://registry.npmmirror.com/claygl/-/claygl-1.3.0.tgz"
+  integrity sha512-+gGtJjT6SSHD2l2yC3MCubW/sCV40tZuSs5opdtn79vFSGUgp/lH139RNEQ6Jy078/L0aV8odCw8RSrUcMfLaQ==
+
 clone@^2.1.1:
   version "2.1.2"
   resolved "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz"
@@ -1452,7 +1457,15 @@ eastasianwidth@^0.2.0:
   resolved "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz"
   integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
 
-echarts@^5.5.0:
+echarts-gl@^2.0.9:
+  version "2.0.9"
+  resolved "https://registry.npmmirror.com/echarts-gl/-/echarts-gl-2.0.9.tgz"
+  integrity sha512-oKeMdkkkpJGWOzjgZUsF41DOh6cMsyrGGXimbjK2l6Xeq/dBQu4ShG2w2Dzrs/1bD27b2pLTGSaUzouY191gzA==
+  dependencies:
+    claygl "^1.2.1"
+    zrender "^5.1.1"
+
+echarts@^5.1.2, echarts@^5.5.0:
   version "5.5.0"
   resolved "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz"
   integrity sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==
@@ -1807,11 +1820,6 @@ fs-extra@^11.2.0:
     jsonfile "^6.0.1"
     universalify "^2.0.0"
 
-fsevents@~2.3.2, fsevents@~2.3.3:
-  version "2.3.3"
-  resolved "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz"
-  integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
-
 function-bind@^1.1.2:
   version "1.1.2"
   resolved "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz"
@@ -4061,7 +4069,7 @@ yaml@^2.3.4:
   resolved "https://registry.npmmirror.com/yaml/-/yaml-2.4.3.tgz"
   integrity sha512-sntgmxj8o7DE7g/Qi60cqpLBA3HG3STcDA0kO+WfB05jEKhZMbY7umNm2rBpQvsmZ16/lPXCJGW2672dgOUkrg==
 
-zrender@5.5.0:
+zrender@^5.1.1, zrender@5.5.0:
   version "5.5.0"
   resolved "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz"
   integrity sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==