Przeglądaj źródła

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

zpf 1 rok temu
rodzic
commit
4a96470a73

+ 1 - 1
src/components/echartsTemplate/3dBar.vue

@@ -44,7 +44,6 @@ let option = {
   },
   // 设置y轴
   yAxis: {
-    
     // 显示y轴
     axisLine: {
       show: false,
@@ -243,6 +242,7 @@ export default {
       this.myChart.setOption(option);
     },
     options3d(v) {
+      option.grid.bottom = v.gridbottom;
       option.xAxis.data = v.xData;
       v.yData.forEach((item, k) => {
         let o = cloneDeep(seriesItem); // JSON.parse(JSON.stringify(seriesItem));

+ 4 - 4
src/components/echartsTemplate/3dPie.vue

@@ -101,14 +101,14 @@ export default {
     };
   },
   methods: {
-    setOptions(data) {
+    setOptions(data, boxHeight) {
       if (!this.myChart) {
         // var dom = document.getElementById("pie_echart");
         this.myChart = echarts.init(this.$refs.echart);
       }
-      this.initEchartXzqh(data);
+      this.initEchartXzqh(data, boxHeight);
     },
-    initEchartXzqh(optionsData) {
+    initEchartXzqh(optionsData, boxHeight) {
       let _this = this;
       option.legend.formatter = function (name) {
         const sItem = optionsData.find((item) =>
@@ -123,7 +123,7 @@ export default {
           return name;
         }
       };
-      option.legend.grid3D.boxHeight = data.boxHeight || 1;
+      option.grid3D.boxHeight = boxHeight || 1;
       const series = this.getPie3D(optionsData, 0.6);
       option.series = series;
 

+ 15 - 1
src/views/cockpitNew1/stxf.vue

@@ -19,6 +19,7 @@
         </el-select>
       </div>
     </template>
+    <div class="time1" v-if="tab == 'ssxf'">2023-2025年</div>
     <div class="stacontent">
       <div class="item" v-for="(sd, index) in sdlist[tab]" :key="index">
         <div class="itembg"></div>
@@ -27,7 +28,8 @@
         {{ sd.unit }}
       </div>
     </div>
-    <Bar3d id="stxf_echart" ref="echartRef"></Bar3d>
+    <div class="time2" v-if="tab == 'ssxf'">截止2024年5月</div>
+    <Bar3d id="stxf_echart" :class="`${tab}_echart`" ref="echartRef"></Bar3d>
   </borderTemplate>
 </template>
 
@@ -94,6 +96,7 @@ export default {
       } else {
         this.sdata.tdxf = { xzqhdm_number: 100, zlmj: 0, tzje: 20 };
         this.sdata.haxf = { xzqhdm_number: 40, zlmj: 30, tzje: 3 };
+        this.eData.gridbottom = '10%';
         this.eData.xData = ["农用地", "建设用地", "生态修复", "历史文化保护"];
         this.eData.yData = [
           [10, 10, 10, 10],
@@ -117,6 +120,7 @@ export default {
     GetQueryList(datas) {
       this.eData.xData = [];
       this.eData.yData = [];
+      this.eData.gridbottom = '40%';
       let params = {
         ...datas,
         jscType: `jsc_stxf_ywlx_${this.tab}`, // "jsc_stxf_ywlx_ssxf"
@@ -180,4 +184,14 @@ export default {
   //   left: -28%;
   //   top: 7%;
 }
+.time1,
+.time2 {
+  font-weight: bold;
+  font-size: 14px;
+  color: #bcd3e5;
+  margin-top: 10px;
+}
+.ssxf_echart {
+  height: calc(100% - 92px) !important;
+}
 </style>