From 5ef0c59622041bd323506e5ccc50516c280d3ad0 Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期四, 18 四月 2024 17:07:46 +0800
Subject: [PATCH] 菜单更新

---
 src/components/props/situationComparison7-9.vue |  327 +----------------------------------------------------
 1 files changed, 10 insertions(+), 317 deletions(-)

diff --git a/src/components/props/situationComparison7-9.vue b/src/components/props/situationComparison7-9.vue
index e1a551b..667a69d 100644
--- a/src/components/props/situationComparison7-9.vue
+++ b/src/components/props/situationComparison7-9.vue
@@ -4,363 +4,56 @@
     <div class="top1">
       <span class="botcon">
         <span class="icon"></span>
-        <span class="text">鎬佸娍鏍囩粯</span>
+        <span class="text">鍐涙爣鏍囩粯</span>
       </span>
       <span class="close"
             @click="close">x</span>
     </div>
     <div class="next">
-      <el-form ref="form"
-               :model="form"
-               label-width="240px">
-        <el-form-item label="鍖哄煙:">
-          <el-select v-model="form.points"
-                     @change="changeplase">
-            <el-option v-for="(item, index) in regions"
-                       :key="index"
-                       :label="item.vname"
-                       :value="{ value: item.vlatlngs, label: item.vname }">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="璧峰鏃堕棿:">
-          <el-date-picker v-model="form.startTime"
-                          value-format="yyyyMMdd"
-                          :picker-options="pickerOptions"
-                          format="yyyy-MM-dd"
-                          type="date"
-                          placeholder="閫夋嫨鏃ユ湡"
-                          @change="change">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="缁撴潫鏃堕棿:">
-          <el-date-picker v-model="form.endTime"
-                          value-format="yyyyMMdd"
-                          :picker-options="pickerOptions"
-                          format="yyyy-MM-dd"
-                          type="date"
-                          placeholder="閫夋嫨鏃ユ湡"
-                          @change="change1">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="鍒嗘瀽绫诲瀷:">
-          <el-select v-model="form.analysisType">
-            <el-option label="棰戠偣"
-                       value="1"></el-option>
-            <el-option label="棰戞"
-                       value="2"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="鏃犵嚎鐢典笟鍔�:">
-          <el-select v-model="form.radio"
-                     @change="choose">
-            <el-option v-for="item in radios"
-                       :key="item.value"
-                       :label="item.bussName"
-                       :value="item.startFreq + '-' + item.endFreq">
-            </el-option>
-          </el-select>
-        </el-form-item>
-      </el-form>
-      <div class="btns">
-        <span @click="reset">閲嶇疆</span>
-        <span @click="analysis">鍒嗘瀽</span>
-      </div>
     </div>
-    <div class="showpic"
-         v-if="showpic">
-      <div :style="innerbac"
-           @click="openDia"></div>
-    </div>
-    <changePic @colordata="getdata" />
+
   </div>
 </template>
 
 <script>
-import { createPic,freqBandAnalysis,showCQ } from "../../api/http";
-import changePic from "../common/color.vue";
+
 import bus from "../../utils/bus";
 import axios from "axios";
 
-let hander,divPoint3;
-let Base64=require("js-base64").Base64;
 export default {
   components: {
     changePic,
   },
   data () {
     return {
-      form: {
-        points: "",
-        startTime: new Date("2016-06-01"),
-        endTime: new Date("2016-06-30"),
-        radio: "璋冮骞挎挱",
-        freqStart: "87",
-        freqEnd: "108",
-        analysisType: "棰戠偣",
-      },
-      nowfile: "",
-      showsituation: false,
-      imageid: null,
-      showpic: false,
-      pickerOptions: {},
-      chooseplase: "",
-      options: [],
-      regions: [],
-      radios: [],
-      colorContainer: {},
-      innerbac: {
-        width: "30%",
-        height: "70%",
-        border: "1px solid #000",
-        transform: "translate(40px,90px)",
-        backgroundImage:
-          "url("+require("@/assets/image/botbtn/color.png")+")",
-        backgroundPosition: "center",
-        backgroundSize: ` 100% 100%`,
-      },
+
       showdata1: true,
       showdata2: true,
-      showDianci: false,
+
+      showsituation: false,
     };
   },
   mounted () {
     bus.$on("clearEve",(e) => {
-      this.reset();
+
     });
     bus.$on("radioData",(e) => {
       this.radios=e;
     });
     bus.$on("guanzhou",(e) => {
-      this.form.startTime=e.fromdate;
-      this.form.endTime=e.todate;
+
     });
     bus.$on("areaData",(e) => {
-      this.regions=e;
+
     });
     bus.$on("showdio",(e) => {
-      this.showsituation=e=="7-9"
+      this.showsituation=e=="7-9-1"
       this.showdata1=true;
       this.showdata2=true;
     });
   },
   methods: {
-    changeplase (value) {
-      if(value.label.indexOf("骞垮窞")>-1) {
-        this.chooseplase="骞垮窞";
-        this.form.startTime=new Date("2019-10-08");
-        this.form.endTime=new Date("2019-10-16");
-        window.Viewer.camera.flyTo({
-          destination: Cesium.Cartesian3.fromDegrees(
-            113.29503528791071,
-            23.104708355136264,
-            4109.8492337442767
-          ),
-          orientation: {
-            heading: 0.8349372341578318,
-            pitch: -0.85222154573481174,
-            roll: 0,
-          },
-        });
-      } else {
-        this.chooseplase="涓婃捣";
-        this.form.startTime=new Date("2016-06-01");
-        this.form.endTime=new Date("2016-06-30");
-        window.Viewer.camera.flyTo({
-          destination: Cesium.Cartesian3.fromDegrees(
-            121.23142475566037,
-            30.314431916707203,
-            101204.78027978493
-          ),
-          orientation: {
-            heading: 0.149372341578318,
-            pitch: -0.8022154573481174,
-            roll: 0,
-          },
-        });
-      }
-    },
-    change () {
-      this.showdata1=false;
-    },
-    change1 () {
-      this.showdata2=false;
-    },
-    openDia () {
-      bus.$emit("changeColor",true);
-    },
-    choose (value) {
-      let arr=value.split("-");
-      this.form.freqStart=arr[0];
-      this.form.freqEnd=arr[1];
-    },
-    close () {
-      this.showsituation=false;
-    },
-    getdata (data) {
-      this.colorContainer=data;
-    },
-    // 鐐瑰嚮鑾峰緱鎬佸娍
-    getTaishi () {
-      if(hander) {
-        return;
-      }
-      hander=new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas);
-      let pickFeature;
-      // 榧犳爣鐐瑰嚮浜嬩欢
-      hander.setInputAction((event) => {
-        // 鎷惧彇瀵硅薄
-        divPoint3&&divPoint3.deleteObject();
-        let clickPosition=viewer.scene.camera.pickEllipsoid(event.position);
-        // 杞粡绾害锛堝姬搴︼級鍧愭爣
-        let radiansPos=Cesium.Cartographic.fromCartesian(clickPosition);
-        let lon=Cesium.Math.toDegrees(radiansPos.longitude);
-        let lat=Cesium.Math.toDegrees(radiansPos.latitude);
-        let filename=this.nowfile;
-        let obj={
-          lat: lat,
-          lng: lon,
-          analysisAction: "-1",
-          analysisType: "1",
-          filename: filename,
-        };
-        showCQ(obj).then((res) => {
-          let data=res.data;
-          if(data!="鏃犳暟鎹�") {
-            divPoint3=sgworld.Creator.createDivPoint(
-              "鍚堣偉",
-              { lon: obj.lng,lat: obj.lat },
-              {
-                type: "custom",
-                offset: ["c",60],
-                description: `
-              <div class="divPoint-custom">
-                <p>${data}</p>
-              </div>
-              `,
-                near: 0,
-                far: 100000,
-              }
-            );
-          }
-        });
-        //鎶婁綘鎷惧彇鐨勪笢瑗挎墦鍗板嚭鏉ョ湅鐪嬩粈涔堝�煎彲浠ョ敤浣滃垽鏂�
-      },Cesium.ScreenSpaceEventType.LEFT_CLICK);
-    },
-    analysis () {
-      this.reset();
-      let that=this;
-      if(that.imageid) {
-        window.Viewer.entities.removeById(that.imageid);
-        that.imageid=null;
-      }
-      let data={
-        colorName: "-100,0000FF;120,FF0000",
-        startTime: "20160601000000",
-        endTime: 20160630000000,
-        freqStart: 87000000,
-        freqEnd: 108000000,
-        freqPoint: 87000000,
-        points:
-          "[[30.5504351,120.5667114],[32.0499889,120.5667114],[32.0499889,122.4453735],[30.5504351,122.4453735]]",
-        radius: 0,
-        analysisAction: "3",
-        analysisType: 1,
-      };
-      data={ ...data,...this.form };
-      data.freqStart=data.freqStart*1000000;
-      data.freqEnd=data.freqEnd*1000000;
-      data.startTime=data.startTime+"000000";
-      data.endTime=data.endTime*1000000;
-      data.analysisType=="棰戠偣"? (data.analysisType=1):"";
-      delete data.radio;
-      if(this.showdata1) {
-        data.startTime=20160601000000;
-        this.chooseplase&&this.chooseplase=="涓婃捣"
-          ? (data.startTime=20160601000000)
-          :(data.startTime=20191008000000);
-      }
-      if(this.showdata2) {
-        data.endTime=20160630000000;
-        this.chooseplase&&this.chooseplase=="涓婃捣"
-          ? (data.endTime=20160630000000)
-          :(data.endTime=20191016000000);
-      }
-      const loading=that.$loading({
-        lock: true,
-        text: "璁$畻涓�",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      data.points=data.points.value;
-      freqBandAnalysis(data)
-        .then((res) => {
-          if(res.message==="Success") {
-            let points=res.data.imgBounds;
-            that.nowfile=Base64.encode(res.data.url)
-            var data1={
-              colorSchemes: 1,
-              file: Base64.encode(res.data.url),
-              maxColor: "FF0000",
-              maxValue: 100,
-              minColor: "0000FF",
-              minValue: 0,
-              showBounds: this.form.points.value,
-            };
-            data1={ ...data1,...this.colorContainer };
-            createPic(data1)
-              .then((res2) => {
-                let rectangle=sgworld.Creator.addSimpleGraphic("rectangle",{
-                  removeEdit: true,
-                  coordinates: Cesium.Rectangle.fromDegrees(
-                    points.xmin,
-                    points.ymin,
-                    points.xmax,
-                    points.ymax
-                  ),
-                  color: "rgba(255,255,255,0.5)",
-                  image:
-                    "http://221.224.53.36:9081/calc/picurl?file="+
-                    Base64.encode(res2.data),
-                });
-                that.showDianci=true;
-                // 鍥剧墖鑾峰彇鎴愬姛  寮�鍚嬀鍙�
-                that.getTaishi();
-                if(that.imageid) {
-                  window.Viewer.entities.removeById(that.imageid);
-                  that.imageid=null;
-                }
-                that.imageid=rectangle.id;
 
-                loading.close();
-                that.$message({
-                  message: "璁$畻鎴愬姛",
-                  type: "success",
-                });
-                that.showpic=true;
-              })
-              .catch((error) => {
-                loading.close();
-              });
-          }
-        })
-        .catch((error) => {
-          loading.close();
-        });
-    },
-    reset () {
-      //閲嶇疆
-      if(this.imageid) {
-        window.Viewer.entities.removeById(this.imageid);
-        hander&&
-          hander.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
-        hander=null;
-        divPoint3&&divPoint3.deleteObject();
-
-        this.imageid=null;
-        this.showDianci=false;
-      }
-    },
   },
   watch: {
     colorContainer: {

--
Gitblit v1.9.3