瀏覽代碼

问题调整

maxiaoxiao 1 年之前
父節點
當前提交
fc7272f169

+ 1 - 4
src/components/Query/clickQuery/modelLayering.js

@@ -36,7 +36,6 @@ function getBuildingId(response) { //得到户型id
     for (var i = 0; i < length; i++) {
         idList[i] = response.features[i].ID;
     }
-    console.log('idList0', idList)
 }
 
 export function handlerModel(e) {
@@ -48,8 +47,7 @@ export function handlerModel(e) {
     }
     viewer.pickEvent.addEventListener(function (feature) {
         getFeatureBySQL(feature.BG);
-        getBuildingIdList(feature.BG);
-        console.log('idList2', idList)
+        // getBuildingIdList(feature.BG);
         if (idList.length > 0) {
             Array.prototype.push.apply(totalList, idList);
             var offsetNormal = Cesium.Cartesian3.multiplyByScalar(normal, Number(20), scratchNromal); //可以更改偏移默认值
@@ -66,7 +64,6 @@ function getBuildingIdList(bg) { //得到户型id
         console.log('idList1', idList)
     });
 }
-// getBuildingIdList()
 
 //清除偏移
 export function clearTranslate() {

+ 4 - 2
src/components/echartsTemplate/sankey.vue

@@ -19,13 +19,15 @@ let option = {
   series: {
     type: "sankey",
     layout: "none",
-    left: "20%",
-    bottom: "10%",
+    left: "5%",
+    bottom: "20%",
+    // top: "50%",
     emphasis: {
       focus: "adjacency",
     },
     label: {
       position: "right",
+      color: "#ECF6FF",
       formatter: function (params) {
         let name = params.name;
         return name.length > 5 ? name.substr(0, 5) + "..." : name;

+ 8 - 7
src/views/cockpitNew1/serCenter.vue

@@ -22,16 +22,16 @@ export default {
         { name: "陆域", props: "ly", unit: "km²" },
         { name: "海域", props: "hy", unit: "km²" },
         { name: "海岸线", props: "hax", unit: "km²" },
-        { name: "耕地", props: "gd", unit: "km²" },
-        { name: "林地", props: "ld", unit: "km²" },
+        { name: "耕地", props: "gd", unit: "公顷" },
+        { name: "林地", props: "ld", unit: "公顷" },
         { name: "森林覆盖率", props: "slfgl", unit: "%" },
       ],
       sdata: {
         ly: 1621.4,
         hy: 3226,
         hax: 264.42,
-        gd: 121.4,
-        ld: 121.4,
+        gd: 15905.85,
+        ld: 79737.15,
         slfgl: 21.4,
       },
     };
@@ -50,8 +50,8 @@ export default {
 .content {
   // border: #00FFFF 1px solid;
   position: absolute;
-  left: calc(50% - 300px);
-  width: 600px;
+  left: calc(50% - 400px);
+  width: 800px;
   height: 60px;
   top: 10%;
   z-index: 100;
@@ -105,8 +105,9 @@ export default {
 .text {
   display: inline-block;
   // border: #00FFFF 1px solid;
-  width: 100px;
+  width: 100%;
   margin-bottom: 4px;
+  text-align: center;
 
   p {
     font-kerning: normal;

+ 12 - 4
src/views/cockpitNew1/wpjg.vue

@@ -22,8 +22,10 @@ import borderTemplate from "./borderTemplate.vue";
 import sankey from "../../components/echartsTemplate/sankey.vue";
 import { QueryList } from "../../api/cockpitNew";
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-let lcolors = ["#1677CA", "#5BB57A", "#B1651F"];
-let rcolors = [
+let colors = [
+  "#1677CA",
+  "#5BB57A",
+  "#B1651F",
   "#62ADED",
   "#F26094",
   "#FCED66",
@@ -67,9 +69,15 @@ export default {
               value: edata.xzqdm_num,
             });
             if (data.findIndex((a) => a.name == edata.qlx_type_name) < 0)
-              data.push({ name: edata.qlx_type_name });
+              data.push({
+                name: edata.qlx_type_name,
+                itemStyle: { color: colors[Math.floor(Math.random() * 12)] },
+              });
             if (data.findIndex((a) => a.name == edata.hlx_type_name) < 0)
-              data.push({ name: edata.hlx_type_name });
+              data.push({
+                name: edata.hlx_type_name,
+                itemStyle: { color: colors[Math.floor(Math.random() * 12)] },
+              });
             this.$nextTick(() => {
               this.$refs.echartRef.setOptions(data, links);
             });

+ 67 - 0
src/views/viewer1 copy.vue

@@ -0,0 +1,67 @@
+<template>
+  <div v-show="flag" class="viewer">
+    <JSYD />
+    <TDSC />
+    <HYSY />
+    <TDSY />
+    <GDBH />
+    <STXF />
+    <WPJG />
+  </div>
+</template>
+
+<script>
+//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+
+// import JSYD from './homepage/jsyd.vue';
+// import JSYD from "./cockpitNew1/jsyd";
+import TDSC from "./cockpitNew1/tdsc";
+import HYSY from "./cockpitNew1/hysy";
+import TDSY from "./cockpitNew1/tdsy";
+import GDBH from "./cockpitNew1/gdbh";
+import STXF from "./cockpitNew1/stxf";
+import WPJG from "./cockpitNew1/wpjg";
+import { cockpitInfo } from "@/api/cockpit";
+
+export default {
+  components: { JSYD, TDSC, HYSY, TDSY, GDBH, STXF, WPJG },
+  data() {
+    return {
+      flag: true,
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    switch() {
+      this.flag = !this.flag;
+    },
+  },
+  beforeCreate() {}, //生命周期 - 创建之前
+  created() {}, //生命周期 - 创建完成(可以访问当前this实例)
+  beforeMount() {}, //生命周期 - 挂载之前
+  async mounted() {
+    // let obj = { beginTime: '20230612', endTime: '20230817', jscType: 'jsc_wpjc_yelx', id: '46' };
+    // let data = await cockpitInfo(obj);
+    // let obj1 = { beginTime: '20230612', endTime: '20230817', jscType: 'jsc_wpjc_ztsh', id: '46' }
+    // let data1 = await cockpitInfo(obj1);
+    // console.log(data, "asda");
+    // console.log(data1, "asda");
+  }, //生命周期 - 挂在完成
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroy() {}, //生命周期 - 销毁完成
+  activated() {}, //若组件实例是 <KeepAlive> 缓存树的一部分,当组件被插入到 DOM 中时调用。
+  deactivated() {}, //若组件实例是 <KeepAlive> 缓存树的一部分,当组件从 DOM 中被移除时调用。
+};
+</script>
+<style  scoped>
+.viewer {
+  width: 100%;
+  height: 100%;
+}
+</style>