stxf.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <div class="stxf">
  3. <div class="box">
  4. <div class="title">生态修复</div>
  5. <div class="item">
  6. <p class="text">
  7. <span>·</span>
  8. 综合整治项目
  9. <span>66</span>
  10. </p>
  11. <p class="text">
  12. <span>·</span>
  13. 土地整治面积
  14. <span>354.56</span>
  15. KM2
  16. </p>
  17. </div>
  18. <Bar3d id="stxf_echart" ref="echartRef"></Bar3d>
  19. </div>
  20. </div>
  21. </template>
  22. <script>
  23. //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  24. import Bar3d from "../../components/echartsTemplate/3dBar.vue";
  25. export default {
  26. components: { Bar3d },
  27. data() {
  28. return {};
  29. },
  30. //监听属性 类似于data概念
  31. computed: {},
  32. //监控data中的数据变化
  33. watch: {},
  34. methods: {
  35. // //第二个图表
  36. echarts2() {
  37. let v = {
  38. xData: ["农用地", "建设用地", "生态修复", "历史文化保护"],
  39. yData: [
  40. [10, 10, 10, 10],
  41. [10, 10, 30, 10],
  42. [10, 10, 10, 40],
  43. ],
  44. legend: [""],
  45. };
  46. this.$nextTick(() => {
  47. this.$refs.echartRef.setOptions(v);
  48. });
  49. // let option = this.options3d(v);
  50. // myChart.setOption(option);
  51. },
  52. },
  53. mounted() {
  54. // this.getRenKou();
  55. this.echarts2();
  56. },
  57. };
  58. </script>
  59. <style lang="scss" scoped>
  60. .stxf {
  61. border-width: 0px;
  62. position: absolute;
  63. left: 1366px;
  64. top: 35%;
  65. width: 534px;
  66. height: 260px;
  67. display: flex;
  68. }
  69. .title {
  70. border-width: 0px;
  71. width: 100%;
  72. height: 40px;
  73. font-family: "Arial Negreta", "Arial Normal", "Arial";
  74. font-weight: 700;
  75. font-style: normal;
  76. color: #00ffff;
  77. padding: 2%;
  78. text-align: justify;
  79. }
  80. .box {
  81. font-family: "Arial Normal", "Arial";
  82. font-weight: 400;
  83. font-style: normal;
  84. font-size: 13px;
  85. letter-spacing: normal;
  86. color: #333333;
  87. text-align: center;
  88. line-height: normal;
  89. text-transform: none;
  90. border-width: 0px;
  91. position: absolute;
  92. left: 0px;
  93. top: 0px;
  94. width: 535px;
  95. height: 260px;
  96. background: inherit;
  97. background-color: rgba(3, 25, 67, 0.698039215686274);
  98. border: none;
  99. border-radius: 0px;
  100. box-shadow: none;
  101. }
  102. #stxf_echart {
  103. width: 100%;
  104. height: calc(100% - 100px);
  105. position: relative;
  106. // left: -28%;
  107. // top: 7%;
  108. }
  109. .item {
  110. p {
  111. font-size: 14px;
  112. color: #fff;
  113. display: inline-block;
  114. margin-top: 3%;
  115. margin-right: 3%;
  116. }
  117. span {
  118. color: #00ffff;
  119. font-weight: 1000;
  120. }
  121. }
  122. </style>