浏览代码

生态修复-山水工程添加时间节点显示

maxiaoxiao 1 年之前
父节点
当前提交
7e0bf609e4
共有 2 个文件被更改,包括 16 次插入2 次删除
  1. 1 1
      src/components/echartsTemplate/3dBar.vue
  2. 15 1
      src/views/cockpitNew1/stxf.vue

+ 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));

+ 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>