Browse Source

检查结果

maxiaoxiao 11 months ago
parent
commit
b1ce124ec7

+ 104 - 64
src/components/echartsTemplate/pie.vue

@@ -6,7 +6,7 @@
 let option = {
   backgroundColor: "rgba(0,0,0,0)",
   title: {
-    text: "报建数量",
+    // text: "报建数量",
     x: "20%",
     textStyle: {
       //  rich: {
@@ -35,7 +35,7 @@ let option = {
     orient: "vertical",
     right: "10%",
     top: "center",
-    data: ["城市报建", "私宅报建"],
+    data: [],
     icon: "rect", //  这个字段控制形状  类型包括 circle,rect ,roundRect,triangle,diamond,pin,arrow,none
     itemWidth: 10, // 设置宽度
     itemHeight: 10, // 设置高度
@@ -137,74 +137,114 @@ export default {
         // var dom = document.getElementById("pie_echart");
         this.myChart = echarts.init(this.$refs.echart);
       }
-      var color2 = [
-        {
-          color: {
-            type: "linear",
-            x: 0,
-            y: 0,
-            x2: 1,
-            y2: 1,
-            colorStops: [
-              {
-                offset: 0,
-                color: "#FC8053",
-              },
-              {
-                offset: 1,
-                color: "#F2CAA4",
-              },
-            ],
-            global: false,
-          },
-        },
-        {
-          color: {
-            type: "linear",
-            x: 0,
-            y: 0,
-            x2: 1,
-            y2: 1,
-            colorStops: [
-              {
-                offset: 0,
-                color: "#5583e7",
-              },
-              {
-                offset: 1,
-                color: "#36dddb",
-              },
-            ],
-            global: false,
-          },
-        },
-        {
-          color: {
-            type: "linear",
-            x: 0,
-            y: 0,
-            x2: 1,
-            y2: 1,
-            colorStops: [
-              {
-                offset: 0,
-                color: "#f888b1",
-              },
-              {
-                offset: 1,
-                color: "#fbe6ee",
-              },
-            ],
-            global: false,
-          },
-        },
+      let colors = [
+        ["#FC8053", "#F2CAA4"],
+        ["#5583e7", "#36dddb"],
+        ["#f888b1", "#fbe6ee"],
       ];
+      // var color2 = [
+      //   {
+      //     color: {
+      //       type: "linear",
+      //       x: 0,
+      //       y: 0,
+      //       x2: 1,
+      //       y2: 1,
+      //       colorStops: [
+      //         {
+      //           offset: 0,
+      //           color: "#FC8053",
+      //         },
+      //         {
+      //           offset: 1,
+      //           color: "#F2CAA4",
+      //         },
+      //       ],
+      //       global: false,
+      //     },
+      //   },
+      //   {
+      //     color: {
+      //       type: "linear",
+      //       x: 0,
+      //       y: 0,
+      //       x2: 1,
+      //       y2: 1,
+      //       colorStops: [
+      //         {
+      //           offset: 0,
+      //           color: "#5583e7",
+      //         },
+      //         {
+      //           offset: 1,
+      //           color: "#36dddb",
+      //         },
+      //       ],
+      //       global: false,
+      //     },
+      //   },
+      //   {
+      //     color: {
+      //       type: "linear",
+      //       x: 0,
+      //       y: 0,
+      //       x2: 1,
+      //       y2: 1,
+      //       colorStops: [
+      //         {
+      //           offset: 0,
+      //           color: "#f888b1",
+      //         },
+      //         {
+      //           offset: 1,
+      //           color: "#fbe6ee",
+      //         },
+      //       ],
+      //       global: false,
+      //     },
+      //   },
+      // ];
+
       // var dataAll = 0;
       dataList.forEach((item, index) => {
-        item.itemStyle = color2[index];
+        option.legend.data.push(item.name);
+        // item.itemStyle = {
+        //   color: {
+        //     type: "linear",
+        //     x: 0,
+        //     y: 0,
+        //     x2: 1,
+        //     y2: 1,
+        //     colorStops: [
+        //       {
+        //         offset: 0,
+        //         color: colors[index][0],
+        //       },
+        //       {
+        //         offset: 1,
+        //         color: colors[index][1],
+        //       },
+        //     ],
+        //     global: false,
+        //   },
+        // };
+        item.itemStyle = {
+          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+            {
+              offset: 0,
+              color: colors[index][0],
+            },
+            {
+              offset: 1,
+              color: colors[index][1],
+            },
+          ]),
+        };
         // dataAll += item.value;
       });
+
       option.series[0].data = dataList;
+      this.myChart.resize();
       this.myChart.setOption(option);
     },
   },

+ 188 - 0
src/views/complianceAnalysis/components/scjg.vue

@@ -0,0 +1,188 @@
+<template>
+  <div class="scjg">
+    <div>
+      <div>
+        <span>项目名称:{{}}</span>
+        <el-button
+          type="primary"
+          size="mini"
+          class="downloadBtn"
+          @click="download"
+        >
+          导出报告
+        </el-button>
+      </div>
+      <div>分析面积:{{}}平方米</div>
+    </div>
+
+    <div v-for="(eitem, i) in echarts" :key="i" class="echars">
+      <div class="echartTitle">
+        <div class="block-title">{{ eitem.label }}</div>
+        <div
+          class="eicon"
+          :class="eitem.iseyes ? 'eyes' : 'close_eyes'"
+          @click="eitem.iseyes = !eitem.iseyes"
+        ></div>
+        <div
+          class="eicon"
+          :class="eitem.isshow ? 'eshow' : 'eclose'"
+          @click="eitem.isshow = !eitem.isshow"
+        ></div>
+      </div>
+      <pie v-show="eitem.isshow" class="echart" :ref="`echartRef`"></pie>
+    </div>
+
+    <!-- v-show="isshow"  -->
+  </div>
+</template>
+
+<script>
+import pie from "@/components/echartsTemplate/pie.vue";
+export default {
+  components: { pie },
+  props: {
+    scjgObj: {
+      type: Object,
+    },
+    jgTable: {
+      type: Boolean,
+    },
+  },
+  data() {
+    return {
+      echarts: [
+        { label: "现状分析", iseyes: false, isshow: true },
+        { label: "三线分析", iseyes: false, isshow: true },
+        { label: "土地利用规划分析", iseyes: false, isshow: false },
+        { label: "详细规划分析", iseyes: false, isshow: false },
+      ],
+      ruleForm: {
+        xzmj: "",
+        fileList: [],
+      },
+    };
+  },
+  mounted() {
+    this.setEchart1();
+    this.setEchart2();
+    this.setEchart3();
+    this.setEchart4();
+  },
+  methods: {
+    setEchart1() {
+      let datalist = [
+        { name: "水田", value: 0 },
+        { name: "农村宅基地", value: 0 },
+        { name: "农村道路", value: 0 },
+      ];
+      this.$nextTick(() => {
+        this.$refs.echartRef[0].setOptions(datalist);
+      });
+    },
+    setEchart2() {
+      let datalist = [
+        { name: "永久基本农田", value: 0 },
+        { name: "城镇开发边界", value: 0 },
+        { name: "生态保护红线", value: 0 },
+      ];
+      this.$nextTick(() => {
+        this.$refs.echartRef[1].setOptions(datalist);
+      });
+    },
+    setEchart3() {
+      let datalist = [
+        { name: "水田", value: 0 },
+        { name: "水浇地", value: 0 },
+        { name: "旱地", value: 0 },
+      ];
+      this.$nextTick(() => {
+        this.$refs.echartRef[2].setOptions(datalist);
+      });
+    },
+    setEchart4() {
+      let datalist = [
+        { name: "水田", value: 0 },
+        { name: "水浇地", value: 0 },
+        { name: "旱地", value: 0 },
+      ];
+      this.$nextTick(() => {
+        this.$refs.echartRef[3].setOptions(datalist);
+      });
+    },
+
+    download() {
+      window.open(prop.scjgObj.task.fxbg);
+    },
+    viewReport() {
+      window.open(prop.scjgObj.task.fxbg.replace(".docx", ".pdf"), "_blank");
+    },
+  },
+
+  // watch(
+  //     () => prop.scjgObj,
+  //     (newValue, oldValue) => {
+  //       this.jcfwlist[0].value = newValue.task.fxmj + "m²";
+  //       nextTick(() => {
+  //         this.setEcharts(newValue);
+  //       });
+  //     }
+  //   );
+};
+</script>
+
+<style lang="scss" scoped>
+.scjg {
+  height: 100%;
+  overflow: auto;
+  line-height: 40px;
+  .downloadBtn {
+    position: absolute;
+    right: 0px;
+    top: 15px;
+  }
+  .el-button--primary {
+    color: #409eff;
+    background: #ecf5ff;
+    border-color: #b3d8ff;
+  }
+  .echars {
+    margin-bottom: 10px;
+    .echartTitle {
+      width: 100%;
+      height: 40px;
+      display: flex;
+      justify-content: space-between;
+      background: rgba(38, 38, 38, 0.9);
+      margin-right: 10px;
+      line-height: 40px;
+
+      .block-title {
+        width: calc(100% - 80px);
+      }
+      .eicon {
+        width: 30px;
+        height: 30px;
+        margin: 5px;
+        background-size: 100% 100%;
+      }
+      .eyes {
+        background-image: url("/static/images/ghzc/eyes.png");
+      }
+      .close_eyes {
+        background-image: url("/static/images/ghzc/close_eyes.png");
+      }
+      .eshow {
+        background-image: url("/static/images/ghzc/to_bottom.png");
+      }
+      .eclose {
+        background-image: url("/static/images/ghzc/to_right.png");
+      }
+    }
+
+    .echart {
+      width: 300px;
+      height: 150px;
+    }
+  }
+}
+</style>

+ 0 - 81
static/Config/config copy.js

@@ -1,81 +0,0 @@
-/*
- * @Author: LAPTOP-BJJ3IV5R\SIWEI zhxjavait@163.com
- * @Date: 2024-05-29 08:19:49
- * @LastEditors: Please set LastEditors
- * @LastEditTime: 2024-06-11 09:14:12
- * @FilePath: \real3d-portalsite\static\Config\config.js
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- */
-//后台地址配置
-window.axiosURI = "http://192.168.60.4:8080";
-//倾斜模型高度配置
-window.modelBottomAltitude = 10;
-// 服务器ip
-window.hostconfig = "127.0.0.1";
-//地图初始化中心点
-window.mapview = [110.0353, 16.3, 300000.0];
-//默认影像地址,空则为不加载默认影像
-//window.baseImgLayer = "http://127.0.0.1:8090/iserver/services/map-sanyadsm/rest/maps/%E6%B5%B7%E5%8D%97%E5%B2%9B%E5%BD%B1%E5%83%8F15%E7%BA%A7_Level_15%40DataSource";
-window.baseImgLayer = "http://192.168.60.3:8099/iserver/services/map-WorkSpace/rest/maps/%E6%B5%B7%E5%8D%97%E5%B2%9B%E5%BD%B1%E5%83%8F15%E7%BA%A7_Level_15%40DataSource";
-//三维模型查询地址
-window.baseModelQueryLayer = "http://192.168.60.3:8099/iserver/services/data-building/rest/data/featureResults.rjson?returnContent=true";
-// ai大模型
-window.aiModel = "https://agent-demo.h1url.cn/agents-admin-vue/#/chat/chat?shareId=f509257cc7f8964f44b177aa72549204";/**
- * 模型对应数据图层
- * url:数据服务地址
- * DataName:数据源:数据集
- * Name3D:三维图层名称
- * Fields:要素字段别名对照
- */
-window.layersDataUrl = [{
-        url: "http://www.supermapol.com/realspace/services/data-cbd/rest/data/featureResults.rjson?returnContent=true",
-        datasources: [{
-                DataName: "二维数据:Building",
-                Name3D: "Building@CBD",
-                Fields: [
-                    { FieldEn: "SMID", FieldCn: "唯一键" },
-                    { FieldEn: "SMSDRIW", FieldCn: "西" }
-                ]
-            },
-            {
-                DataName: "二维数据:Ground",
-                Name3D: "Ground@CBD",
-                Fields: [
-                    { FieldEn: "SMID", FieldCn: "唯一键" },
-                    { FieldEn: "SMSDRIW", FieldCn: "西" }
-                ]
-            }
-        ]
-    },
-    {
-        url: "http://www.supermapol.com/realspace/services/data-OlympicGreenNight/rest/data/featureResults.rjson?returnContent=true",
-        datasources: [{
-                DataName: "OlympicGreenNight:BuilderResult_1",
-                Name3D: "BirdNest@OlympicGreenDataSource",
-                Fields: [
-                    { FieldEn: "SMID", FieldCn: "唯一键" },
-                    { FieldEn: "SMSDRIW", FieldCn: "西" }
-                ]
-            },
-            {
-                DataName: "OlympicGreenNight:OlympicGreenNight",
-                Name3D: "Ground@OlympicGreen",
-                Fields: [
-                    { FieldEn: "SMID", FieldCn: "唯一键" },
-                    { FieldEn: "SMSDRIW", FieldCn: "西" }
-                ]
-            }
-        ]
-    },
-    {
-        url: "http://www.supermapol.com/realspace/services/data-jinjiang/rest/data/featureResults.rjson?returnContent=true",
-        datasources: [{
-            DataName: "jinjiang:test",
-            Name3D: "jinjiang",
-            Fields: [
-                { FieldEn: "SMID", FieldCn: "唯一键" },
-                { FieldEn: "SMSDRIW", FieldCn: "西" }
-            ]
-        }]
-    }
-];

BIN
static/images/ghzc/close_eyes.png


BIN
static/images/ghzc/eyes.png


BIN
static/images/ghzc/to_bottom.png


BIN
static/images/ghzc/to_right.png