管道基础大数据平台系统开发-【前端】-新系統界面
王旭
2023-02-23 67769a8a47fe971de05219de20bb65a9e6604f8b
Merge branch 'master' of http://192.168.20.39:8989/r/LFWEB_NEW
已修改11个文件
1615 ■■■■ 文件已修改
src/assets/css/configure.css 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lang/en.js 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lang/zh.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/MapView/mapSpacePop.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/mapsdk.vue 501 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Archive/index.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Tools/LayerTree.vue 477 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Tools/Popup.vue 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Tools/maplayer.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Tools/pipeLineAnaly.vue 507 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/metadataManage.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/configure.css
@@ -31,6 +31,7 @@
.box_divm {
    background-color: rgba(244, 248, 255, 0.85) !important;
}
.subpage_Div {
    border: 1px solid #dcdfe6;
}
@@ -324,12 +325,11 @@
.twoMenu_imge88 {
    background: url("../../assets/img/synthesis/images/3白底_166.png") no-repeat center;
}
.el-icon-download{
.menuPop .leftBox li {
    color: black;
}
.menuPop .leftBox li{
    color: black  ;
}
.popupBox .popupContainer{
    color: #606266 !important;
.popupBox .popupContainer {
    color: #606266 !important;
}
src/assets/lang/en.js
@@ -1,6 +1,6 @@
const en = {
  common: {
    bak:'Bak',
    bak: 'Bak',
    domCode: 'DomCode',
    confirm: 'confirm',
    choose: 'Please choose',
@@ -41,13 +41,14 @@
    size: 'size',
    versionName: 'version Name',
    type: 'type',
    fileType:'File Type',
    fileType: 'File Type',
    quayTest: 'Auality testing',
    md5: 'MD5 Code',
    lineNuber: 'line Nuber',
    pleaseInputPassworld: 'Please input a password',
    passworld: 'Passworld',
    language: "中文"
    language: "中文",
    title: 'Title'
  },
  dataManage: {
@@ -59,11 +60,11 @@
    dataRetrieval: 'data retrieval',
    dataDownload: 'Data download',
    projectManage: 'project management',
    dataStatistics:'data Statistics',
    dataStaticObj:{
      type1:'Primary module',
      type2:'Secondary module',
      type3:'Statistical data',
    dataStatistics: 'data Statistics',
    dataStaticObj: {
      type1: 'Primary module',
      type2: 'Secondary module',
      type3: 'Statistical data',
    },
    projectObj: {
      projname: 'Project Name',
@@ -104,9 +105,9 @@
      entryName: 'Entry Name',
      selectWBSData: 'Select WBS Data',
      coordinateSystem: 'Coordinate System',
      fileExtension:"File extension",
      inspectionItems:"Inspection items",
      code:'Code'
      fileExtension: "File extension",
      inspectionItems: "Inspection items",
      code: 'Code'
    },
    metadataManage: 'Source Data Management',
@@ -531,7 +532,7 @@
    careatetime: 'Date of application',
    ReApply: 'Re apply',
    details: 'details',
    ApplicationCancel: "Application Cancel",
    ApplicationCancel: "withdraw",
  },
  loglog: {
    serialnumber: 'Serial Number',
src/assets/lang/zh.js
@@ -47,7 +47,8 @@
    lineNuber: '行数',
    pleaseInputPassworld: '请输入密码',
    passworld: '密码',
    language: "English"
    language: "English",
    title: '标题'
  },
  dataManage: {
    dataManage: '数据管理',
@@ -58,11 +59,14 @@
    dataRetrieval: '数据检索',
    dataDownload: '数据下载',
    projectManage: '项目管理',
    dataStatistics:'数据统计',
    dataStaticObj:{
      type1:'一级模块',
      type2:'二级模块',
      type3:'统计数据',
    dataStatistics: '数据统计',
    dataStaticObj: {
      type1: '服务名称',
      type2: '访问次数',
      type3: '单位名称',
      type4: '数据量',
      type5: '菜单名称',
      type7: '访问次数'
    },
    projectObj: {
      projname: '项目名称',
@@ -525,7 +529,7 @@
    careatetime: '申请日期',
    ReApply: '重新申请',
    details: '详情',
    ApplicationCancel: "申请取消",
    ApplicationCancel: "取消申请",
  },
  downlog: {
    type1: 'Shp文件',
src/components/MapView/mapSpacePop.vue
@@ -320,9 +320,9 @@
    //初始化查询阈值表
    async getDomainsLayer() {
      const data = await inquiry_selectDomains({ name: this.spaceLayer });
      if (data.code != 200) {
        this.$message.error('列表调用失败');
      }
        if (data.code != 200) {
          this.$message.error('列表调用失败');
        }
      this.domainsLayer = data.result;
      this.setListDataStart();
      this.getTableselectFields();
src/components/mapsdk.vue
@@ -1,82 +1,44 @@
<template>
  <div class="mapBox">
    <div id="mapdiv">
      <div
        class="menu_Top box_divm"
        v-if="$store.state.mapMenuBoolean"
      >
      <div class="menu_Top box_divm" v-if="$store.state.mapMenuBoolean">
        <map-menu-top v-if="$store.state.mapMenuBoxFlag == '1'" />
        <map-space-top v-if="$store.state.mapMenuBoxFlag == '2'" />
      </div>
      <div
        class="bufferBox"
        v-if="showBufferBoxDialog"
      >
      <div class="bufferBox" v-if="showBufferBoxDialog">
        <el-card class="box-card box_divm">
          <div
            slot="header"
            class="clearfix"
          >
          <div slot="header" class="clearfix">
            <span>缓冲区分析</span>
            <div style="float: right; cursor: pointer">
              <i
                class="el-icon-close"
                @click="closeBufferBox(1)"
              ></i>
              <i class="el-icon-close" @click="closeBufferBox(1)"></i>
            </div>
          </div>
          <div class="box-body">
            <el-form
              ref="form"
              :model="bufFrom"
              label-width="100px"
            >
            <el-form ref="form" :model="bufFrom" label-width="100px">
              <el-form-item label="缓冲半径(米):">
                <el-input v-model="bufFrom.val"></el-input>
              </el-form-item>
              <el-form-item>
                <el-button
                  @click="addBuffer(1)"
                  type="info"
                >点</el-button>
                <el-button
                  @click="addBuffer(2)"
                  type="info"
                >线</el-button>
                <el-button
                  @click="addBuffer(3)"
                  type="info"
                >面</el-button>
                <el-button
                  @click="clearBuffer"
                  type="info"
                >清除</el-button>
                <el-button @click="addBuffer(1)" type="info">点</el-button>
                <el-button @click="addBuffer(2)" type="info">线</el-button>
                <el-button @click="addBuffer(3)" type="info">面</el-button>
                <el-button @click="clearBuffer" type="info">清除</el-button>
              </el-form-item>
            </el-form>
          </div>
        </el-card>
      </div>
      <div
        class="coordLocalBox"
        v-if="showCoordLocalBoxDialog"
      >
      <div class="coordLocalBox" v-if="showCoordLocalBoxDialog">
        <el-card class="box-card">
          <div slot="header">
            <span>坐标定位</span>
            <div style="float: right; cursor: pointer">
              <i
                class="el-icon-close"
                @click="closeBufferBox(2)"
              ></i>
              <i class="el-icon-close" @click="closeBufferBox(2)"></i>
            </div>
          </div>
          <div class="box-body">
            <el-form
              ref="form"
              :model="coordFrom"
              label-width="50px"
            >
            <el-form ref="form" :model="coordFrom" label-width="50px">
              <el-form-item label="经度:">
                <el-input v-model="coordFrom.lon"></el-input>
              </el-form-item>
@@ -87,38 +49,22 @@
                <el-input v-model="coordFrom.height"></el-input>
              </el-form-item>
              <el-form-item>
                <el-button
                  @click="setCoordLocal"
                  type="info"
                >定位</el-button>
                <el-button @click="setCoordLocal" type="info">定位</el-button>
              </el-form-item>
            </el-form>
          </div>
        </el-card>
      </div>
      <div
        class="toponymicLocalBox"
        v-if="showToponymicLocalBoxDialog"
      >
      <div class="toponymicLocalBox" v-if="showToponymicLocalBoxDialog">
        <el-card class="box-card">
          <div
            slot="header"
            class="clearfix"
          >
          <div slot="header" class="clearfix">
            <span>地名定位</span>
            <div style="float: right; cursor: pointer">
              <i
                class="el-icon-close"
                @click="closeBufferBox(3)"
              ></i>
              <i class="el-icon-close" @click="closeBufferBox(3)"></i>
            </div>
          </div>
          <div class="box-body">
            <el-form
              :model="comprehensive"
              :inline="true"
              label-width="50px"
            >
            <el-form :model="comprehensive" :inline="true" label-width="50px">
              <el-form-item label="地名:">
                <el-input
                  style="width: 200px"
@@ -126,28 +72,17 @@
                ></el-input>
              </el-form-item>
              <el-form-item>
                <el-button
                  @click="setQueryTable"
                  type="info"
                >查询</el-button>
                <el-button @click="setQueryTable" type="info">查询</el-button>
              </el-form-item>
            </el-form>
            <el-table
              :data="tableData"
              height="200px"
              style="width: 100%"
            >
            <el-table :data="tableData" height="200px" style="width: 100%">
              <el-table-column
                align="center"
                type="index"
                label="序号"
                width="70px"
              />
              <el-table-column
                prop="name"
                align="center"
                label="定位"
              >
              <el-table-column prop="name" align="center" label="定位">
                <template slot-scope="scope">
                  <el-button
                    @click="handleLocation(scope.$index, scope.row)"
@@ -156,11 +91,7 @@
                  ></el-button>
                </template>
              </el-table-column>
              <el-table-column
                prop="name"
                align="center"
                label="地名"
              >
              <el-table-column prop="name" align="center" label="地名">
              </el-table-column>
            </el-table>
            <div class="pagination_box">
@@ -178,21 +109,12 @@
          </div>
        </el-card>
      </div>
      <div
        class="pathAnalysisBox"
        v-if="showPathAnalysisBoxDialog"
      >
      <div class="pathAnalysisBox" v-if="showPathAnalysisBoxDialog">
        <el-card class="box-card">
          <div
            slot="header"
            class="clearfix"
          >
          <div slot="header" class="clearfix">
            <span>路径分析</span>
            <div style="float: right; cursor: pointer">
              <i
                class="el-icon-close"
                @click="closeBufferBox(4)"
              ></i>
              <i class="el-icon-close" @click="closeBufferBox(4)"></i>
            </div>
          </div>
          <div class="box-body">
@@ -202,10 +124,7 @@
              :rules="rules"
              label-width="55px"
            >
              <el-form-item
                label="起点:"
                prop="lon"
              >
              <el-form-item label="起点:" prop="lon">
                <el-input
                  style="width: 250px"
                  v-model="pathFrom.lon"
@@ -215,15 +134,10 @@
                  :underline="false"
                  @click="showMouseLeftClick(1)"
                  style="margin-left: 10px"
                ><i
                    style="color: white"
                    class="el-icon-plus"
                  ></i></el-link>
                  ><i style="color: white" class="el-icon-plus"></i
                ></el-link>
              </el-form-item>
              <el-form-item
                label="终点:"
                prop="lat"
              >
              <el-form-item label="终点:" prop="lat">
                <el-input
                  style="width: 250px"
                  v-model="pathFrom.lat"
@@ -233,16 +147,13 @@
                  :underline="false"
                  @click="showMouseLeftClick(2)"
                  style="margin-left: 10px"
                ><i
                    style="color: white"
                    class="el-icon-plus"
                  ></i></el-link>
                  ><i style="color: white" class="el-icon-plus"></i
                ></el-link>
              </el-form-item>
              <el-form-item>
                <el-button
                  @click="showMouseLeftClick(3)"
                  type="info"
                >查询</el-button>
                <el-button @click="showMouseLeftClick(3)" type="info"
                  >查询</el-button
                >
              </el-form-item>
            </el-form>
          </div>
@@ -263,16 +174,16 @@
</template>
<script>
import $ from "jquery"
import mapMenuTop from "./MapView/mapMenuTop.vue"
import $ from "jquery";
import mapMenuTop from "./MapView/mapMenuTop.vue";
import mapSpaceTop from "./MapView/mapSpaceTop.vue"
import mapSpaceTop from "./MapView/mapSpaceTop.vue";
import {
  select_Comprehensive_ByPageAndCount,
  select_Comprehensive_SelectWktById,
  comprehensive_selectRoute,
} from "../api/api"
} from "../api/api";
export default {
  name: "",
@@ -284,22 +195,22 @@
  data() {
    var validatePosition = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请输入密码"))
        callback(new Error("请输入密码"));
      } else {
        if (value) {
          let arr = value.split(",")
          let arr = value.split(",");
          if (arr.length !== 2) {
            callback(new Error("坐标点经纬度格式错误!"))
            callback(new Error("坐标点经纬度格式错误!"));
          } else {
            if (arr[0].startsWith("116") && arr[1].startsWith("39")) {
            } else {
              callback(new Error("坐标点纬度格式错误!"))
              callback(new Error("坐标点纬度格式错误!"));
            }
          }
        }
        callback()
        callback();
      }
    }
    };
    return {
      centerFlag: false,
      buffer: null,
@@ -365,26 +276,26 @@
        children: "children",
        label: "label",
      }, //树绑定对象
    }
    };
  },
  mounted() {
    this.init3DMap()
    this.$bus.$on("mapChangeBox", res => {
      this.showChangeBox(res)
    })
    this.init3DMap();
    this.$bus.$on("mapChangeBox", (res) => {
      this.showChangeBox(res);
    });
  },
  methods: {
    init3DMap() {
      var webKey = "94a34772eb88317fcbf8428e10448561"
      var webKey = "94a34772eb88317fcbf8428e10448561";
      //地图初始化
      window.sgworld = new SmartEarth.SGWorld("mapdiv", {
        url:SmartEarthRootUrl+"Workers/image/earth.jpg",
        url: SmartEarthRootUrl + "Workers/image/earth.jpg",
        licenseServer: window.sceneConfig.licenseServer,
      })
      });
      window.Viewer = window.sgworld._Viewer
      Viewer.imageryLayers._layers[0].show = false
      window.Viewer = window.sgworld._Viewer;
      Viewer.imageryLayers._layers[0].show = false;
      //定位
      // sgworld.Navigate.jumpTo({
      //   //跳转视角
@@ -396,26 +307,25 @@
      // })
      Viewer.camera.flyTo({
        destination: Cesium.Cartesian3.fromDegrees(110, 33, 8000000),
      });
      this.layer1 = Viewer.imageryLayers.addImageryProvider(
        new Cesium.UrlTemplateImageryProvider({
          url: gaoDeBaseUrl[0].url,
        })
      )
      );
      this.layer2 = Viewer.imageryLayers.addImageryProvider(
        new Cesium.UrlTemplateImageryProvider({
          url: gaoDeBaseUrl[1].url,
        })
      )
      );
      this.layer3 = Viewer.imageryLayers.addImageryProvider(
        new Cesium.UrlTemplateImageryProvider({
          url: gaoDeBaseUrl[2].url,
        })
      )
      );
      window.ImageLayer3=this.layer3;
      window.ImageLayer3 = this.layer3;
      // for (var i in gaoDeBaseUrl) {
      //   sgworld.Creator.createUrlTemplateImageryProvider(
@@ -428,13 +338,13 @@
      //   );
      // }
      Viewer._enableInfoOrSelection = false
      Viewer._enableInfoOrSelection = false;
      //显示fps
      Viewer.scene.debugShowFramesPerSecond = false
      Viewer.scene.debugShowFramesPerSecond = false;
      //导航控件
      window.sgworld.navControl("nav", false)
      window.sgworld.navControl("nav", false);
      //比例尺
      window.sgworld.navControl("scale", false)
      window.sgworld.navControl("scale", false);
      //开启深度检测
      // sgworld.Analysis.depthTestAgainstTerrain(true)
      Viewer.scene.globe.depthTestAgainstTerrain = true;
@@ -459,12 +369,12 @@
      var option = {
        url: window.sceneConfig.SGUrl,
        layerName: window.sceneConfig.mptName,
        requestVertexNormals: true
      }
        requestVertexNormals: true,
      };
      sgworld.Creator.sfsterrainprovider("", option, "", true, "");
      window.elevationTool = new SmartEarth.ElevationTool(window.sgworld)
      elevationTool.setContourColor("#F1D487")
      window.elevationTool = new SmartEarth.ElevationTool(window.sgworld);
      elevationTool.setContourColor("#F1D487");
      // var helper = new Cesium.EventHelper();
      // helper.add(Viewer.scene.globe.tileLoadProgressEvent, function (e) {
@@ -478,9 +388,9 @@
    },
    changeMenulayer() {
      this.isActive = !this.isActive
      this.isMenuLayer = !this.isMenuLayer
      this.setLayerVisible()
      this.isActive = !this.isActive;
      this.isMenuLayer = !this.isMenuLayer;
      this.setLayerVisible();
    },
    setLayerVisible() {
      if (this.isActive == true) {
@@ -490,12 +400,10 @@
        Viewer.imageryLayers.lower(this.layer2);
        Viewer.imageryLayers.lower(this.layer3);
      } else {
        Viewer.imageryLayers.raise(this.layer3);
        Viewer.imageryLayers.raise(this.layer2);
        // Viewer.imageryLayers._layers[1].show = false
        // Viewer.imageryLayers._layers[2].show = true
        // Viewer.imageryLayers._layers[3].show = true
@@ -507,62 +415,66 @@
        if (res.id == "6") {
        } else if (res.id == "7") {
        } else {
          this.showBufferBoxDialog = true
          this.showBufferBoxDialog = true;
        }
      } else if (res.name == "Coord") {
        if (res.id == "1") {
          this.showCoordLocalBoxDialog = true
          this.showCoordLocalBoxDialog = true;
        } else if (res.id == "2") {
          this.showToponymicLocalBoxDialog = true
          this.getToponymicData()
          this.showToponymicLocalBoxDialog = true;
          this.getToponymicData();
        }
      } else if (res.name == "Analysis") {
        if (res.id == "3") {
          this.showPathAnalysisBoxDialog = true
          if (res.show == true) {
            this.showPathAnalysisBoxDialog = true;
          } else {
            this.showPathAnalysisBoxDialog = false;
          }
        }
      }
    },
    handleSizeChange(val) {
      this.listData.pageSize = val
      this.getToponymicData()
      this.listData.pageSize = val;
      this.getToponymicData();
    },
    handleCurrentChange(val) {
      this.listData.pageIndex = val
      this.getToponymicData()
      this.listData.pageIndex = val;
      this.getToponymicData();
    },
    setQueryTable() {
      this.listData.pageSize = 10
      this.listData.pageIndex = 1
      this.getToponymicData()
      this.listData.pageSize = 10;
      this.listData.pageIndex = 1;
      this.getToponymicData();
    },
    async getToponymicData() {
      if (this.listData.tab == "") {
        delete this.listData.tab
        delete this.listData.tab;
      }
      this.listData.name = this.comprehensive.name
      const data = await select_Comprehensive_ByPageAndCount(this.listData)
      this.listData.name = this.comprehensive.name;
      const data = await select_Comprehensive_ByPageAndCount(this.listData);
      if (data.code != 200) {
        this.$message.error("列表调用失败")
        this.$message.error("列表调用失败");
      }
      this.tableData = data.result
      this.count = data.count
      this.tableData = data.result;
      this.count = data.count;
    },
    async handleLocation(index, row) {
      const data = await select_Comprehensive_SelectWktById({ id: row.gid })
      const data = await select_Comprehensive_SelectWktById({ id: row.gid });
      if (data.code != 200) {
        this.$message.error("列表调用失败")
        this.$message.error("列表调用失败");
      }
      var val = data.result.slice(6, data.result.length - 1)
      val = val.split(" ")
      var val = data.result.slice(6, data.result.length - 1);
      val = val.split(" ");
      var position = {
        X: parseFloat(val[0]),
        Y: parseFloat(val[1]),
        Altitude: 2000,
      }
      };
      if (this.imagePoint != null) {
        sgworld.Creator.DeleteObject(this.imagePoint)
        this.imagePoint = null
        sgworld.Creator.DeleteObject(this.imagePoint);
        this.imagePoint = null;
      }
      this.imagePoint = sgworld.Creator.CreateLabel(
        position,
@@ -574,7 +486,7 @@
        },
        0,
        "巡检点"
      )
      );
      sgworld.Navigate.jumpTo({
        //跳转视角
@@ -583,121 +495,124 @@
          parseFloat(val[1]),
          10000
        ),
      })
      });
    },
    closeBufferBox(res) {
      switch (res) {
        case 1:
          this.showBufferBoxDialog = false
          this.clearBuffer()
          break
          this.showBufferBoxDialog = false;
          this.clearBuffer();
          break;
        case 2:
          this.showCoordLocalBoxDialog = false
          break
          this.showCoordLocalBoxDialog = false;
          break;
        case 3:
          this.showToponymicLocalBoxDialog = false
          this.showToponymicLocalBoxDialog = false;
          if (this.imagePoint != null) {
            sgworld.Creator.DeleteObject(this.imagePoint)
            this.imagePoint = null
            sgworld.Creator.DeleteObject(this.imagePoint);
            this.imagePoint = null;
          }
          break
          break;
        case 4:
          this.showPathAnalysisBoxDialog = false
          this.clearPathAll(3)
          this.showPathAnalysisBoxDialog = false;
          this.clearPathAll(3);
          break
          break;
      }
    },
    //定位
    setCoordLocal() {
      var lon = parseFloat(this.coordFrom.lon)
      var lat = parseFloat(this.coordFrom.lat)
      var height = parseFloat(this.coordFrom.height)
      var lon = parseFloat(this.coordFrom.lon);
      var lat = parseFloat(this.coordFrom.lat);
      var height = parseFloat(this.coordFrom.height);
      sgworld.Navigate.jumpTo({
        //跳转视角
        destination: new Cesium.Cartesian3.fromDegrees(lon, lat, height),
      })
      });
    },
    //缓冲区分析
    clearBuffer() {
      if (this.buffer == null) return
      this.buffer && this.buffer.clearBuff()
      this.buffer = null
      if (this.buffer == null) return;
      this.buffer && this.buffer.clearBuff();
      this.buffer = null;
    },
    getBufferTable(type) {
      const points =
        this.buffer.this_buff.buff.polygon.hierarchy.getValue().positions
      let geometrys = ""
      let firstPoint
      let degrees = ""
        this.buffer.this_buff.buff.polygon.hierarchy.getValue().positions;
      let geometrys = "";
      let firstPoint;
      let degrees = "";
      points.forEach((p, i) => {
        degrees = window.sgworld.Core.toDegrees(p)
        geometrys += "[" + degrees.lon + "," + degrees.lat + "],"
        i === 0 && (firstPoint = "[" + degrees.lon + "," + degrees.lat + "]")
      })
      geometrys += firstPoint
      if (geometrys.length != 0) geometrys.trimEnd(",")
      geometrys = "{rings:[[" + geometrys + "]]}"
        degrees = window.sgworld.Core.toDegrees(p);
        geometrys += "[" + degrees.lon + "," + degrees.lat + "],";
        i === 0 && (firstPoint = "[" + degrees.lon + "," + degrees.lat + "]");
      });
      geometrys += firstPoint;
      if (geometrys.length != 0) geometrys.trimEnd(",");
      geometrys = "{rings:[[" + geometrys + "]]}";
    },
    addBuffer(res) {
      this.clearBuffer()
      var buffRadius = this.bufFrom.val
      this.clearBuffer();
      var buffRadius = this.bufFrom.val;
      switch (res) {
        case 1:
          this.buffer = sgworld.Analysis.DrawPointBuffer(buffRadius, event => {
            this.getBufferTable("point")
          })
          break
          this.buffer = sgworld.Analysis.DrawPointBuffer(
            buffRadius,
            (event) => {
              this.getBufferTable("point");
            }
          );
          break;
        case 2:
          this.buffer = sgworld.Analysis.DrawPolylineBuffer(
            buffRadius,
            event => {
              this.getBufferTable("line")
            (event) => {
              this.getBufferTable("line");
            }
          )
          break
          );
          break;
        case 3:
          this.buffer = sgworld.Analysis.DrawPolygonBuffer(
            buffRadius,
            event => {
              this.getBufferTable("polygon")
            (event) => {
              this.getBufferTable("polygon");
            }
          )
          break
          );
          break;
      }
    },
    async showMouseLeftClick(res) {
      if (res == 3) {
        this.$refs.form.validate(valid => {
        this.$refs.form.validate((valid) => {
          if (!valid) {
            return false
            return false;
          }
        })
        this.clearPathAll(3)
        var start = this.pathFrom.lon.split(",")
        var end = this.pathFrom.lat.split(",")
        });
        this.clearPathAll(3);
        var start = this.pathFrom.lon.split(",");
        var end = this.pathFrom.lat.split(",");
        var startData = {
          x1: parseFloat(start[0]),
          y1: parseFloat(start[1]),
          x2: parseFloat(end[0]),
          y2: parseFloat(end[1]),
        }
        };
        const data = await comprehensive_selectRoute(startData)
        const data = await comprehensive_selectRoute(startData);
        if (data.code != 200) {
          return this.$message.error("数据请求失败")
          return this.$message.error("数据请求失败");
        }
        var wkt = this.$wkt.parse(data.result)
        var wkt = this.$wkt.parse(data.result);
        var bufferSource = Cesium.GeoJsonDataSource.load(wkt, {
          stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1),
          strokeWidth: 5,
          clampToGround: true,
        })
        bufferSource.then(bufferSource => {
          sgworld.Navigate.flyToObj(bufferSource)
          Viewer.dataSources.add(bufferSource)
        })
        });
        bufferSource.then((bufferSource) => {
          sgworld.Navigate.flyToObj(bufferSource);
          Viewer.dataSources.add(bufferSource);
        });
        // var jsonurl =
        //   wnsUrl +
        //   '?start=' +
@@ -716,29 +631,29 @@
        //   },
        // });
      } else {
        var that = this
        var that = this;
        if (this.handler != null) {
          this.clearLeftClick()
          this.clearLeftClick();
        }
        this.handler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas)
        this.handler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas);
        this.handler.setInputAction(function (event) {
          let cartesian = Viewer.camera.pickEllipsoid(event.position)
          let cartographic = Cesium.Cartographic.fromCartesian(cartesian)
          let cartesian = Viewer.camera.pickEllipsoid(event.position);
          let cartographic = Cesium.Cartographic.fromCartesian(cartesian);
          let lng = parseFloat(
            Cesium.Math.toDegrees(cartographic.longitude)
          ).toFixed(6) // 经度
          ).toFixed(6); // 经度
          let lat = parseFloat(
            Cesium.Math.toDegrees(cartographic.latitude)
          ).toFixed(6) // 纬度
          ).toFixed(6); // 纬度
          if (that.linePath != null) {
            that.clearPathAll(3)
            that.clearPathAll(3);
          }
          if (lng != null && lat != null) {
            let val = lng + "," + lat
            var position = sgworld.Creator.CreatePosition(lng, lat, 0)
            let val = lng + "," + lat;
            var position = sgworld.Creator.CreatePosition(lng, lat, 0);
            if (res == 1) {
              if (that.pathStart != null) {
                that.clearPathAll(1)
                that.clearPathAll(1);
              }
              that.pathStart = sgworld.Creator.CreateLabel(
@@ -756,12 +671,12 @@
                },
                0,
                "起始点"
              )
              );
              that.pathFrom.lon = val
              that.pathFrom.lon = val;
            } else if (res == 2) {
              if (that.pathEnd != null) {
                that.clearPathAll(2)
                that.clearPathAll(2);
              }
              that.pathEnd = sgworld.Creator.CreateLabel(
@@ -779,68 +694,68 @@
                },
                0,
                "结束点"
              )
              that.pathFrom.lat = val
              );
              that.pathFrom.lat = val;
            }
            that.clearLeftClick()
            that.clearLeftClick();
          }
        }, Cesium.ScreenSpaceEventType.LEFT_CLICK)
        }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
      }
    },
    clearPathAll(res) {
      switch (res) {
        case 1:
          if (this.pathStart != null) {
            sgworld.Creator.DeleteObject(this.pathStart)
            this.pathStart = null
            sgworld.Creator.DeleteObject(this.pathStart);
            this.pathStart = null;
          }
          break
          break;
        case 2:
          if (this.pathEnd != null) {
            sgworld.Creator.DeleteObject(this.pathEnd)
            this.pathEnd = null
            sgworld.Creator.DeleteObject(this.pathEnd);
            this.pathEnd = null;
          }
          break
          break;
        case 3:
          if (this.pathStart != null) {
            sgworld.Creator.DeleteObject(this.pathStart)
            this.pathStart = null
            sgworld.Creator.DeleteObject(this.pathStart);
            this.pathStart = null;
          }
          if (this.pathEnd != null) {
            sgworld.Creator.DeleteObject(this.pathEnd)
            this.pathEnd = null
            sgworld.Creator.DeleteObject(this.pathEnd);
            this.pathEnd = null;
          }
          if (this.linePath != null) {
            sgworld.Creator.DeleteObject(this.linePath)
            this.linePath = null
            sgworld.Creator.DeleteObject(this.linePath);
            this.linePath = null;
          }
          Viewer.dataSources.removeAll()
          break
          Viewer.dataSources.removeAll();
          break;
        case 4:
          if (this.linePath != null) {
            sgworld.Creator.DeleteObject(this.linePath)
            this.linePath = null
            sgworld.Creator.DeleteObject(this.linePath);
            this.linePath = null;
          }
          break
          break;
      }
    },
    clearLeftClick() {
      this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK) //移除事件
      this.handler = null
      this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); //移除事件
      this.handler = null;
    },
    executeFly3D(res) {
      var position = []
      var position = [];
      if (res) {
        var positionA = res.features
        var positionA = res.features;
        if (positionA.length > 0) {
          for (var i = 0; i < positionA.length; i++) {
            var val = positionA[i]
            var val = positionA[i];
            if (val.geometry.type == "LineString") {
              var val_data = val.geometry.coordinates
              var val_data = val.geometry.coordinates;
              for (var j = 0; j < val_data.length; j++) {
                position.push({ x: val_data[j][0], y: val_data[j][1] })
                position.push({ x: val_data[j][0], y: val_data[j][1] });
              }
            }
          }
@@ -850,15 +765,15 @@
            1,
            0,
            "线"
          )
          sgworld.Navigate.flyToObj(this.linePath)
          );
          sgworld.Navigate.flyToObj(this.linePath);
        } else {
          return
          return;
        }
      }
    },
  },
}
};
</script>
<style scoped lang="less">
src/views/Archive/index.vue
@@ -527,27 +527,31 @@
          <el-form-item>
            <el-button
              @click="conditionVisible = true"
              type="info"
              type="success"
                        size="small"
              icon="el-icon-plus"
            >{{$t('common.append')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              @click="submitForm()"
              type="info"
              type="primary"
              size="small"
              icon="el-icon-search"
            >{{$t('common.iquery')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              type="info"
                        size="small"
              @click="resetForm()"
              icon="el-icon-search"
            >{{$t('common.reset')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              type="info"
              type="warning"
                        size="small"
              @click="downloadForm()"
              icon="el-icon-download"
            >{{$t('common.download')}}</el-button>
@@ -829,30 +833,30 @@
          <el-table-column
            type="index"
            width="50"
            label="序号"
            :label="$t('common.index')"
          >
          </el-table-column>
          <el-table-column
            property="descr"
            label="标题"
         :label="$t('common.title')"
          > </el-table-column>
          <el-table-column
            property="name"
            label="文件名称"
         :label="$t('common.fileNme')"
          > </el-table-column>
          <el-table-column
            property="createName"
            label="出图人"
           :label="$t('operatManage.BWL.requestUser')"
          > </el-table-column>
          <el-table-column
            property="createTime"
            :formatter="formatData"
            label="日期"
         :label="$t('dataApply.careatetime')"
          >
          </el-table-column>
          <el-table-column
            label="操作"
             :label="$t('common.download')"
            width="120"
          >
            <template slot-scope="scope">
src/views/Tools/LayerTree.vue
@@ -1,62 +1,66 @@
<template>
  <div class="lalala tree-container">
    <el-input placeholder="输入关键字进行过滤"
              v-model="filterText"
              class="search">
    <el-input
      placeholder="输入关键字进行过滤"
      v-model="filterText"
      class="search"
    >
    </el-input>
    <el-tree :data="treeData"
             node-key="id"
             default-expand-all
             show-checkbox
             @node-click="handleLeftclick"
             @node-contextmenu="rightClick"
             @check-change="handleCheckChange"
             :default-checked-keys="handleTreeCheck"
             ref="tree">
      <span class="slot-t-node"
            slot-scope="{ node, data }"
            @dblclick="editNode(data)">
    <el-tree
      ref="tree"
      :data="treeData"
      node-key="id"
      default-expand-all
      show-checkbox
      @node-click="handleLeftclick"
      @node-contextmenu="rightClick"
      @check-change="handleCheckChange"
      :default-checked-keys="handleTreeCheck"
    >
      <span
        class="slot-t-node"
        slot-scope="{ node, data }"
        @dblclick="editNode(data)"
      >
        <span v-show="!data.isEdit">
          <span :class="[data.id >= 99 ? 'slot-t-node--label' : '']">{{
            node.label
          }}</span>
        </span>
        <span v-show="data.isEdit">
          <el-input class="slot-t-input"
                    size="mini"
                    autofocus
                    v-model="data.label"
                    :ref="'slotTreeInput' + data.id"
                    @blur.stop="NodeBlur(node, data)"
                    @keydown.native.enter="NodeBlur(node, data)"></el-input>
          <el-input
            class="slot-t-input"
            size="mini"
            autofocus
            v-model="data.label"
            :ref="'slotTreeInput' + data.id"
            @blur.stop="NodeBlur(node, data)"
            @keydown.native.enter="NodeBlur(node, data)"
          ></el-input>
        </span>
      </span>
    </el-tree>
    <el-card class="box-card"
             ref="card"
             :style="{ ...rightClickMenuStyle }"
             v-show="menuVisible">
      <div @click="addSameLevelNode()">
        <i class="el-icon-circle-plus-outline"></i>&nbsp;&nbsp;添加图层组
    <el-card
      class="box-card"
      ref="card"
      :style="{ ...rightClickMenuStyle }"
      v-show="menuVisible"
    >
      <div @click="addSameLevelNode()" v-show="firstLevel">
        <i class="el-icon-plus"></i>&nbsp;&nbsp;添加图层组
      </div>
      <div class="add"
           @click="addChildNode()"
           v-show="firstLevel">
        <i class="el-icon-circle-plus-outline"></i>&nbsp;&nbsp;添加图层
      <div class="add" @click="addChildNode()">
        <i class="el-icon-plus"></i>&nbsp;&nbsp;添加图层
      </div>
      <div class="delete"
           @click="deleteNode()">
        <i class="el-icon-remove-outline"></i>&nbsp;&nbsp;删除节点
      <div class="delete" @click="deleteNode()">
        <i class="el-icon-delete"></i>&nbsp;&nbsp;删除
      </div>
      <div class="edit"
           @click="editNode()">
        <i class="el-icon-edit"></i>&nbsp;&nbsp;修改节点
      <div class="edit" @click="editNode()">
        <i class="el-icon-edit"></i>&nbsp;&nbsp;重命名
      </div>
      <div class="edit"
           @click="showLayerAttribute()">
        <i class="el-icon-edit"></i>&nbsp;&nbsp;属性
      <div class="edit" @click="showLayerAttribute()">
        <i class="el-icon-tickets"></i>&nbsp;&nbsp;属性
      </div>
      <!-- <div
        class="edit"
@@ -71,25 +75,29 @@
        <i class="el-icon-bottom"></i>&nbsp;&nbsp;下移
      </div> -->
    </el-card>
    <el-dialog :title="appendNodetitle"
               :visible.sync="dialogVisible"
               width="30%"
               top="20vh"
               :modal="false"
               :before-close="handleClose">
      <el-form ref="form"
               :model="addFormServer"
               label-width="100px">
    <el-dialog
      :title="appendNodetitle"
      :visible.sync="dialogVisible"
      width="30%"
      top="20vh"
      :modal="false"
      :before-close="handleClose"
    >
      <el-form ref="form" :model="addFormServer" label-width="100px">
        <el-form-item label="服务类型">
          <!-- <el-input v-model="addFormServer.type"></el-input> -->
          <el-select style="width:100%"
                     :popper-append-to-body="false"
                     v-model="addFormServer.layerType"
                     placeholder="请选择">
            <el-option v-for="item in options"
                       :key="item.value"
                       :label="item.label"
                       :value="item.value">
          <el-select
            style="width: 100%"
            :popper-append-to-body="false"
            v-model="addFormServer.layerType"
            placeholder="请选择"
          >
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
@@ -107,10 +115,8 @@
          <el-slider v-model="addFormServer.opacity"></el-slider>
        </el-form-item>
      </el-form>
      <span slot="footer"
            class="dialog-footer">
        <el-button type="primary"
                   @click="setAddServer">确 定</el-button>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="setAddServer">确 定</el-button>
      </span>
    </el-dialog>
    <queryinfo ref="queryinfo" />
@@ -118,96 +124,95 @@
</template>
<script>
import { image_layer } from '../../assets/js/index.js';
import ImageWMS from 'ol/source/ImageWMS';
import Image from 'ol/layer/Image';
import GeoJSON from 'ol/format/GeoJSON.js';
import Map from 'ol/Map.js';
import queryinfo from './queryinfo.vue';
import { image_layer } from "../../assets/js/index.js";
import ImageWMS from "ol/source/ImageWMS";
import Image from "ol/layer/Image";
import GeoJSON from "ol/format/GeoJSON.js";
import Map from "ol/Map.js";
import queryinfo from "./queryinfo.vue";
import { Vector as VectorSource } from "ol/source";
import { Vector as VectorLayer, } from "ol/layer";
import { Vector as VectorLayer } from "ol/layer";
import View from 'ol/View.js';
import { Fill, Stroke, Style } from 'ol/style.js';
import { perms_selectLayers } from '../../api/api.js'
import View from "ol/View.js";
import { Fill, Stroke, Style } from "ol/style.js";
import { perms_selectLayers } from "../../api/api.js";
export default {
  name: 'tree',
  name: "tree",
  components: { queryinfo },
  data () {
  data() {
    return {
      eleId: '',
      eleId: "",
      isShow: false,
      currentData: '',
      currentNode: '',
      currentData: "",
      currentNode: "",
      menuVisible: false,
      firstLevel: false,
      filterText: '',
      appendNodetitle: '',
      filterText: "",
      appendNodetitle: "",
      maxexpandId: 4,
      rightClickMenuStyle: {},
      handleTreeCheck: [],
      dialogVisible: false,
      addFormServer: {
        opacity: 100,
        layerType: 'WMS',
        layerType: "WMS",
        type: 2,
      },
      layerId: [
        'm_pipeline',
        'th_strategic_channel',
        'bs_project',
        'm_sitepoint',
        "m_pipeline",
        "th_strategic_channel",
        "bs_project",
        "m_sitepoint",
      ],
      treeData: [
      ],
      treeData: [],
      defaultProps: {
        children: 'children',
        label: 'label',
        children: "children",
        label: "label",
      },
      options: [{
        value: 'WMS',
        label: 'WMS'
      }, {
        value: 'WFS',
        label: 'WFS'
      }],
      options: [
        {
          value: "WMS",
          label: "WMS",
        },
        {
          value: "WFS",
          label: "WFS",
        },
      ],
    };
  },
  methods: {
    NodeBlur (Node, data) {
    NodeBlur(Node, data) {
      if (data.label.length === 0) {
        this.$message.error('菜单名不可为空!');
        this.$message.error("菜单名不可为空!");
        return false;
      } else {
        if (data.isEdit) {
          this.$set(data, 'isEdit', false);
          this.$set(data, "isEdit", false);
        }
        this.$nextTick(() => {
          this.$refs['slotTreeInput' + data.id].$refs.input.focus();
          this.$refs["slotTreeInput" + data.id].$refs.input.focus();
        });
      }
    },
    // 查询
    filterNode (value, data) {
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    allowDrop (draggingNode, dropNode, type) {
      if (dropNode.data.label === '二级 3-1') {
        return type !== 'inner';
    allowDrop(draggingNode, dropNode, type) {
      if (dropNode.data.label === "二级 3-1") {
        return type !== "inner";
      } else {
        return true;
      }
    },
    allowDrag (draggingNode) {
      return draggingNode.data.label.indexOf('三级 3-2-2') === -1;
    allowDrag(draggingNode) {
      return draggingNode.data.label.indexOf("三级 3-2-2") === -1;
    },
    // 鼠标右击事件
    rightClick (event, object, Node, element) {
    rightClick(event, object, Node, element) {
      this.currentData = object;
      this.currentNode = Node;
      if (Node.level === 1) {
@@ -217,11 +222,11 @@
      }
      this.menuVisible = true;
      this.$refs.card.$el.style.left = event.pageX + 20 + 'px';
      this.$refs.card.$el.style.top = event.pageY + 'px';
      this.$refs.card.$el.style.left = event.pageX + 20 + "px";
      this.$refs.card.$el.style.top = event.pageY + "px";
    },
    // 鼠标左击事件
    handleLeftclick (data, node) {
    handleLeftclick(data, node) {
      this.foo();
      if (node.checked == true) {
        for (var i = 0; i < window.Viewer.imageryLayers._layers.length; i++) {
@@ -234,43 +239,42 @@
      }
    },
    //  取消鼠标监听事件 菜单栏
    foo () {
    foo() {
      this.menuVisible = false;
      //  要及时关掉监听,不关掉的是一个坑,不信你试试,虽然前台显示的时候没有啥毛病,加一个alert你就知道了
      document.removeEventListener('click', this.foo);
      document.removeEventListener("click", this.foo);
    },
    // 增加同级节点事件
    addSameLevelNode () {
    addSameLevelNode() {
      this.foo();
      if (this.currentNode.level == 2) {
        this.appendNodetitle = this.currentData.label;
        this.dialogVisible = true;
      } else {
        let id = Math.ceil(Math.random() * 100);
        var data = { id: id, label: '新增节点' };
        var data = { id: id, label: "新增节点" };
        this.$refs.tree.append(data, this.currentNode.parent);
      }
    },
    // 增加子级节点事件
    addChildNode () {
    addChildNode() {
      this.foo();
      if (this.currentNode.level >= 2) {
        this.$message.error('最多只支两级!');
        return false;
      }
      // if (this.currentNode.level >= 2) {
      //   this.$message.error("最多只支两级!");
      //   return false;
      // }
      this.appendNodetitle = this.currentData.label;
      this.dialogVisible = true;
    },
    handleClose () {
    handleClose() {
      this.dialogVisible = false;
      this.addFormServer = {
        opacity: 100,
        layerType: 'WMS',
        layerType: "WMS",
        type: 2,
      };
    },
    setAddServer () {
    setAddServer() {
      var val = this.currentNode;
      if (this.currentNode.level == 2) {
        val = this.currentNode.parent;
@@ -281,22 +285,24 @@
      this.handleClose();
    },
    // 删除节点
    deleteNode () {
    deleteNode() {
      this.foo();
      var label = this.currentNode.data.label;
      if (this.currentNode.data.layerType == 'WMS') {
      if (this.currentNode.data.layerType == "WMS") {
        for (var i in window.Viewer.imageryLayers_layers) {
          if (window.Viewer.imageryLayers_layers[i].name === label) {
            window.Viewer.imageryLayers.remove(window.Viewer.imageryLayers_layers[i])
            window.Viewer.imageryLayers.remove(
              window.Viewer.imageryLayers_layers[i]
            );
          }
        }
      } else if (this.currentNode.data.layerType == 'WFS') {
      } else if (this.currentNode.data.layerType == "WFS") {
        for (var i in window.Viewer.dataSources._dataSources) {
          if (window.Viewer.dataSources._dataSources[i].name == label) {
            window.Viewer.dataSources.remove(window.Viewer.dataSources._dataSources[i]);
            std.push(data.label)
            window.Viewer.dataSources.remove(
              window.Viewer.dataSources._dataSources[i]
            );
            std.push(data.label);
          }
        }
      }
@@ -311,122 +317,116 @@
      this.$refs.tree.remove(this.currentNode);
    },
    //属性显示
    showLayerAttribute (data) {
    showLayerAttribute(data) {
      this.foo();
      this.currentData = data ? data : this.currentData;
      var layer = this.currentData.layer.replaceAll('_', "");
      var layer = this.currentData.layer.replaceAll("_", "");
      this.$store.state.mapSpaceQueryLayer = layer;
      // this.$store.state.mapPopBoolean = true;
      this.$store.state.mapPopBoxFlag = '2';
      this.$store.state.mapPopBoxFlag = "2";
      this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close();
      this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("属性", null, {
        close: () => {
      this.$refs &&
        this.$refs.queryinfo &&
        this.$refs.queryinfo.open("属性", null, {
          close: () => {
            if (this.$store.state.primitLayer != null) {
              sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
              this.$store.state.primitLayer = null;
            }
          if (this.$store.state.primitLayer != null) {
            sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
            this.$store.state.primitLayer = null;
          }
          if (window.Viewer.scene.primitives.length != 0) {
            window.Viewer.scene.primitives.removeAll()
          }
        }
      });
            if (window.Viewer.scene.primitives.length != 0) {
              window.Viewer.scene.primitives.removeAll();
            }
          },
        });
    },
    // 编辑节点
    editNode (data) {
    editNode(data) {
      this.foo();
      this.currentData = data ? data : this.currentData;
      if (!this.currentData.isEdit) {
        this.$set(this.currentData, 'isEdit', true);
        this.$set(this.currentData, "isEdit", true);
      }
      // 获取焦点
      this.$nextTick(() => {
        this.$refs['slotTreeInput' + this.currentData.id].focus();
        this.$refs["slotTreeInput" + this.currentData.id].focus();
      });
    },
    menuMoveF (type) {
    menuMoveF(type) {
      // 将变动之前的node备份
      var node = this.currentNode;
      var data = this.currentData;
      let copyNode = this.currentNode
      let copyNode = this.currentNode;
      // copyNode.previousSibling = {...node. }
      // copyNode.nextSibling = {...node.nextSibling}
      // window.sessionStorage.setItem('menuNode',CircularJSON.stringify(copyNode))
      let nodeData = {}
      if (type === 'up') {
      let nodeData = {};
      if (type === "up") {
        // 上移
        if (node.previousSibling) {
          // 删除原先的node
          this.$refs.tree.remove(node.data)
          this.$refs.tree.remove(node.data);
          // 拿到copy的node
          // nodeData = CircularJSON.parse(window.sessionStorage.getItem('menuNode'))
          // // 复制该node到指定位置(参数:1. 要增加的节点的 data 2. 要增加的节点的后一个节点的 data、key 或者 node)
          // this.$refs.tree.insertBefore(nodeData.data,nodeData.previousSibling.data)
          window.sessionStorage.removeItem('menuNode')
          window.sessionStorage.removeItem("menuNode");
        } else {
          this.$message.warning('该菜单已经是当前层最上级')
          this.$message.warning("该菜单已经是当前层最上级");
        }
      } else {
        // 下移
        if (node.nextSibling) {
          this.$refs.tree.remove(node.data)
          nodeData = CircularJSON.parse(window.sessionStorage.getItem('menuNode'))
          this.$refs.tree.remove(node.data);
          nodeData = CircularJSON.parse(
            window.sessionStorage.getItem("menuNode")
          );
          // 参数:1. 要增加的节点的 data 2. 要增加的节点的前一个节点的 data、key 或者 node
          this.$refs.tree.insertAfter(nodeData.data, nodeData.nextSibling.data)
          window.sessionStorage.removeItem('menuNode')
          this.$refs.tree.insertAfter(nodeData.data, nodeData.nextSibling.data);
          window.sessionStorage.removeItem("menuNode");
        } else {
          this.$message.warning('该菜单已经是当前层最下级')
          this.$message.warning("该菜单已经是当前层最下级");
        }
      }
    },
    handleDragStart (node, ev) {
      console.log('drag start', node);
    handleDragStart(node, ev) {
      console.log("drag start", node);
    },
    handleDragEnter (draggingNode, dropNode, ev) {
      console.log('tree drag enter: ', dropNode.label);
    handleDragEnter(draggingNode, dropNode, ev) {
      console.log("tree drag enter: ", dropNode.label);
    },
    handleDragLeave (draggingNode, dropNode, ev) {
      console.log('tree drag leave: ', dropNode.label);
    handleDragLeave(draggingNode, dropNode, ev) {
      console.log("tree drag leave: ", dropNode.label);
    },
    handleDragOver (draggingNode, dropNode, ev) {
      console.log('tree drag over: ', dropNode.label);
    handleDragOver(draggingNode, dropNode, ev) {
      console.log("tree drag over: ", dropNode.label);
    },
    handleDragEnd (draggingNode, dropNode, dropType, ev) {
      console.log('tree drag end: ', dropNode && dropNode.label, dropType);
    handleDragEnd(draggingNode, dropNode, dropType, ev) {
      console.log("tree drag end: ", dropNode && dropNode.label, dropType);
    },
    handleDrop (draggingNode, dropNode, dropType, ev) {
      console.log('tree drop: ', dropNode.label, dropType);
    handleDrop(draggingNode, dropNode, dropType, ev) {
      console.log("tree drop: ", dropNode.label, dropType);
    },
    handleCheckChange(data, checked, indeterminate) {
      if (data.type != 2) return;
      //做判断是否是1:100万行政界面
      if(data.layer==window.XZOutlie&&checked){
        window.ImageLayer3.show=false;
      }else{
        window.ImageLayer3.show=true;
      if (data.layer == window.XZOutlie && checked) {
        window.ImageLayer3.show = false;
      } else {
        window.ImageLayer3.show = true;
      }
      var std = [];
      if (data.layerType == 'WMS') {
      if (data.layerType == "WMS") {
        var layers_ol = window.map.getAllLayers();
        for (var i = 0; i < window.Viewer.imageryLayers._layers.length; i++) {
          var val_id = window.Viewer.imageryLayers._layers[i].imageryProvider.name;
          var val_id =
            window.Viewer.imageryLayers._layers[i].imageryProvider.name;
          if (val_id == data.label) {
            std.push(data.label)
            std.push(data.label);
            const img_layer = window.Viewer.imageryLayers._layers[i];
            img_layer.show = checked;
@@ -439,21 +439,20 @@
            layerOl.setVisible(checked); //显示图层
          }
        }
      } else if (data.layerType == 'WFS') {
      } else if (data.layerType == "WFS") {
        if (window.Viewer.dataSources._dataSources.length == 0) {
          this.setAddLayers(data);
        } else {
          for (var i in window.Viewer.dataSources._dataSources) {
            if (window.Viewer.dataSources._dataSources[i].name == data.label) {
              window.Viewer.dataSources._dataSources[i].show = checked;
              std.push(data.label)
              std.push(data.label);
            }
          }
        }
      }
      if (std.length == 0 && checked == true) {
        this.setAddLayers(data)
        this.setAddLayers(data);
      }
      var layers_ol = window.map.getAllLayers();
      for (var i in layers_ol) {
@@ -464,10 +463,10 @@
      }
    },
    setAddLayers(res) {
      if (res.layerType == 'WMS') {
      if (res.layerType == "WMS") {
        var url = geoServerURl;
        if (res.url != null && res.url != undefined) {
          url = res.url
          url = res.url;
        }
        //var width = $("#mapdiv").width();
@@ -484,7 +483,7 @@
            styles: "",
          },
          tileWidth: 512,
          tileHeight: 512
          tileHeight: 512,
        });
        layerWMS.name = res.label;
        //透明度
@@ -495,11 +494,11 @@
        var layer2 = new Image({
          name: res.label,
          source: new ImageWMS({
            crossOrigin: 'anonymous',
            crossOrigin: "anonymous",
            url: url,
            params: {
              FORMAT: 'image/png',
              VERSION: '1.1.1',
              FORMAT: "image/png",
              VERSION: "1.1.1",
              LAYERS: res.resource,
            },
          }),
@@ -508,10 +507,12 @@
          layer2.setOpacity(parseInt(res.opacity) / 100);
        }
        window.map.addLayer(layer2);
      } else if (res.layerType == 'WFS') {
        var url = res.url + "?service=WFS&version=1.0.0&request=GetFeature&typeName=" + res.resource + "&outputFormat=application%2Fjson"
      } else if (res.layerType == "WFS") {
        var url =
          res.url +
          "?service=WFS&version=1.0.0&request=GetFeature&typeName=" +
          res.resource +
          "&outputFormat=application%2Fjson";
        $.ajax({
          url: url,
          cache: false,
@@ -522,17 +523,16 @@
              fill: Cesium.Color.YELLOW.withAlpha(0.1),
              alpha: 0.1,
              strokeWidth: 8,
              clampToGround: true //是否贴地
              clampToGround: true, //是否贴地
            });
            datasource.then((data) => {
              data.name = res.label;
              window.Viewer.dataSources.add(data);
            })
            });
          },
          error: function (data) {
            console.log("error");
          }
          },
        });
        var vectorLayer = new VectorLayer({
@@ -541,16 +541,14 @@
            url: url,
            format: new GeoJSON(),
          }),
        });
        window.map.addLayer(vectorLayer);
      }
    },
    async layersStart () {
    async layersStart() {
      const data = await perms_selectLayers();
      if (data.code != 200) {
        return this.$message.error("图层列表查询失败");
      }
      this.newData = data.result;
@@ -566,11 +564,9 @@
            type: data.result[i].type,
            isEdit: false,
            children: [],
          })
          });
        } else if (data.result[i].type == 2) {
          if (data.result[i].url != null) {
            var layer_entity = {
              id: data.result[i].id,
              pid: data.result[i].pid,
@@ -579,15 +575,14 @@
              type: data.result[i].type,
              isEdit: false,
              layer: data.result[i].enName,
              layerType: data.result[i].serveType
            }
            layer_list.push(layer_entity)
              layerType: data.result[i].serveType,
            };
            layer_list.push(layer_entity);
            if (data.result[i].isShow == 1) {
              std.push(data.result[i].id);
              this.setAddLayers(layer_entity);
            }
          }
        }
      }
@@ -595,19 +590,19 @@
      for (var i in layer_list) {
        for (var j in layer_groups) {
          if (layer_list[i].pid === layer_groups[j].id) {
            layer_groups[j].children.push(layer_list[i])
            layer_groups[j].children.push(layer_list[i]);
          }
        }
      }
      layer_groups = layer_groups.filter((res) => {
        if (res.children && res.children.length != 0) {
          return res
          return res;
        }
      })
      });
      this.treeData = layer_groups;
      this.$refs.tree.setCheckedKeys(std);
    },
    async treelayersStart () {
    async treelayersStart() {
      const data = await perms_selectLayers();
      if (data.code != 200) {
        return this.$message.error("图层列表查询失败");
@@ -623,7 +618,7 @@
            type: data.result[i].type,
            isEdit: false,
            children: [],
          })
          });
        } else if (data.result[i].type == 2) {
          if (data.result[i].url != null) {
            var layer_entity = {
@@ -633,23 +628,23 @@
              resource: data.result[i].url,
              type: data.result[i].type,
              isEdit: false,
            }
            layer_list.push(layer_entity)
            };
            layer_list.push(layer_entity);
          }
        }
      }
      for (var i in layer_list) {
        for (var j in layer_groups) {
          if (layer_list[i].pid === layer_groups[j].id) {
            layer_groups[j].children.push(layer_list[i])
            layer_groups[j].children.push(layer_list[i]);
          }
        }
      }
      layer_groups = layer_groups.filter((res) => {
        if (res.children && res.children.length != 0) {
          return res
          return res;
        }
      })
      });
      this.treeData = layer_groups;
      for (var i in data.result) {
@@ -657,7 +652,6 @@
          for (var j = 0; j < window.Viewer.imageryLayers._layers.length; j++) {
            var val_id = window.Viewer.imageryLayers._layers[j];
            if (val_id.show == true) {
              if (val_id.imageryProvider.name == data.result[i].cnName) {
                std.push(data.result[i].id);
              }
@@ -666,21 +660,19 @@
        }
      }
      this.$refs.tree.setCheckedKeys(std);
    }
  },
  watch: {
    filterText (val) {
      this.$refs.tree.filter(val);
    },
  },
  mounted () {
  watch: {
    filterText(val) {
      this.$refs.tree.filter(val);
    },
  },
  mounted() {
    this.$bus.$on("treeDataCopy", (res) => {
      this.$store.state.treeData = this.treeData;
      this.$store.state.checkedKeys = this.$refs.tree.getCheckedKeys()
      this.$store.state.checkedKeys = this.$refs.tree.getCheckedKeys();
    });
    if (this.$store.state.showAllLayers == true) {
      this.layersStart();
      this.$store.state.showAllLayers = false;
@@ -688,7 +680,6 @@
      this.treeData = this.$store.state.treeData;
      this.$refs.tree.setCheckedKeys(this.$store.state.checkedKeys);
    }
  },
};
</script>
src/views/Tools/Popup.vue
@@ -64,21 +64,21 @@
</template>
<script>
import baseVuex from './baseVuex';
import baseVuex from "./baseVuex";
export default {
  name: 'Popup',
  name: "Popup",
  components: {},
  mixins: [baseVuex],
  props: [
    'title',
    'left',
    'top',
    'maxHeight',
    'width',
    'shadow',
    'closeHidePage',
    'showBtn',
    'btnArr',
    "title",
    "left",
    "top",
    "maxHeight",
    "width",
    "shadow",
    "closeHidePage",
    "showBtn",
    "btnArr",
  ],
  data() {
    return {
@@ -86,14 +86,14 @@
      showBox: false,
      // 是否显示内容
      showContainer: true,
      defaultMaxHeight: '400px',
      defaultMaxHeight: "400px",
    };
  },
  directives: {
    // 拖拽
    drag(el) {
      // 获取弹窗头部
      let popupTitle = el.querySelector('.popupTitle');
      let popupTitle = el.querySelector(".popupTitle");
      // 添加鼠标按下事件
      popupTitle.onmousedown = function (e) {
        let disx = e.clientX - el.offsetLeft;
@@ -107,8 +107,8 @@
          left > maxleft && (left = maxleft);
          top < 0 && (top = 0);
          top > maxTop && (top = maxTop);
          el.style.left = left + 'px';
          el.style.top = top + 'px';
          el.style.left = left + "px";
          el.style.top = top + "px";
        };
        document.onmouseup = function () {
          document.onmousemove = document.onmouseup = null;
@@ -117,10 +117,10 @@
    },
  },
  mounted() {
    if (this.maxHeight === 'max') {
    if (this.maxHeight === "max") {
      this.$parent.maxHeight = undefined;
      this.$nextTick(() => {
        this.defaultMaxHeight = this.$el.offsetHeight * 0.92 - 40 + 'px';
        this.defaultMaxHeight = this.$el.offsetHeight * 0.92 - 40 + "px";
      });
    }
  },
@@ -132,18 +132,18 @@
    // 关闭弹窗
    close() {
      this.showBox = false;
      this.$emit('close');
      this.$emit("close");
    },
    yes() {
      this.$emit('yes');
      this.$emit("yes");
    },
    cancel() {
      this.$emit('cancel');
      this.$emit("cancel");
    },
    // 打开弹窗
    open() {
      this.showBox = true;
      this.$emit('open');
      this.$emit("open");
    },
  },
};
@@ -167,7 +167,7 @@
    border: 1px solid rgba(32, 160, 255, 0.6);
    border-radius: 5px;
    pointer-events: all;
    min-width: 323px;
    min-width: 280px;
    color: #fff;
    font-size: 18px;
    font-family: 微软雅黑;
src/views/Tools/maplayer.vue
@@ -5,7 +5,7 @@
      v-for="(data, index) in PopupData"
      :key="data.id"
      title="图层管理"
      :maxHeight="data.maxHeight || '500px'"
      :maxHeight="data.maxHeight || '400px'"
      @close="close(data.id)"
      :left="data.left || left"
      :top="data.top || top + index * 42 + 'px'"
src/views/Tools/pipeLineAnaly.vue
@@ -2,11 +2,7 @@
  <div class="pipeLineBox">
    <div class="headerBox">
      <div class="elFrom">
        <el-form
          ref="form"
          :model="ruleFrom"
          label-width="120px"
        >
        <el-form ref="form" :model="ruleFrom" label-width="120px">
          <el-form-item label="管道中心线">
            <el-select
              @change="selectChange"
@@ -39,38 +35,32 @@
          </el-form-item>
        </el-form>
      </div>
      <div style="display:flex">
      <div style="display: flex">
        <div class="transBox">
          <label>基础数据图层</label>
          <div class="checkBox">
            <ul>
              <li
                @click="checkLeft(item)"
                :class="{checkhover:checkedLeftflag == item.id}"
                v-for='(item,index) in cities'
                :class="{ checkhover: checkedLeftflag == item.id }"
                v-for="(item, index) in cities"
                :label="item.label"
                :key="item.id"
              >{{item.label}}</li>
              >
                {{ item.label }}
              </li>
            </ul>
          </div>
        </div>
        <div class="transInfo">
          <div>
            <el-link
              @click="setTransRight"
              :underline="false"
            ><i
                style="color:white"
                class="el-icon-d-arrow-right"
              ></i></el-link>
            <el-link @click="setTransRight" :underline="false"
              ><i class="el-icon-d-arrow-right"></i
            ></el-link>
            <br />
            <el-link
              @click="setTransLeft"
              :underline="false"
            ><i
                style="color:white"
                class="el-icon-d-arrow-left"
              ></i></el-link>
            <el-link @click="setTransLeft" :underline="false"
              ><i class="el-icon-d-arrow-left"></i
            ></el-link>
          </div>
        </div>
        <div class="transBox">
@@ -79,28 +69,22 @@
            <ul>
              <li
                @click="checkRight(item)"
                :class="{checkhover:checkedRightflag == item.id}"
                v-for='(item,index) in citiyData'
                :class="{ checkhover: checkedRightflag == item.id }"
                v-for="(item, index) in citiyData"
                :label="item.label"
                :key="item.id"
              >{{item.label}}</li>
              >
                {{ item.label }}
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div class="sureButton">
        <div class="suerBox">
          <el-button
            @click="setAnalysis"
            size="small"
          >分析</el-button>
          <el-button
            @click="clearAnalysis"
            size="small"
          >取消</el-button>
          <el-button @click="setAnalysis" size="small">分析</el-button>
          <el-button @click="clearAnalysis" size="small">取消</el-button>
        </div>
      </div>
    </div>
    <div class="contentBox">
@@ -108,19 +92,19 @@
        <ul>
          <li
            @click="setlistChange(item)"
            :class="{checkhover:listflag == item.id}"
            :class="{ checkhover: listflag == item.id }"
            v-for="item in listData"
          >{{item.label}}</li>
          >
            {{ item.label }}
          </li>
        </ul>
      </div>
      <div class="contentLeft">
        <div style="float:right;padding:2px">
          <el-button
            @click="showDialogVivable()"
            size="small"
            type="info"
          >下载</el-button>
        <div style="float: right; padding: 2px">
          <el-button @click="showDialogVivable()" size="small" type="info"
            >下载</el-button
          >
          <!-- <el-button
            size="mini"
            type="info"
@@ -130,22 +114,14 @@
            type="info"
          >删除</el-button> -->
        </div>
        <el-table
          :data="tableData"
          style="width: 100%"
          height="70%"
        >
        <el-table :data="tableData" style="width: 100%" height="70%">
          <el-table-column
            align="center"
            type="index"
            :label="$t('operatManage.ELM.index')"
            width="70px"
          />
          <el-table-column
            label="定位"
            width="100"
            align="center"
          >
          <el-table-column label="定位" width="100" align="center">
            <template slot-scope="scope">
              <el-button
                icon="el-icon-map-location"
@@ -154,41 +130,18 @@
              ></el-button>
            </template>
          </el-table-column>
          <el-table-column
            prop="acrossName"
            label="被穿越地物名称"
            width="180"
          >
          <el-table-column prop="acrossName" label="被穿越地物名称" width="180">
          </el-table-column>
          <el-table-column
            prop="acrossLength"
            label="穿越长度"
            width="100"
          >
          <el-table-column prop="acrossLength" label="穿越长度" width="100">
          </el-table-column>
          <el-table-column
            prop="pipeName"
            label="管线名称"
            width="180"
          >
          <el-table-column prop="pipeName" label="管线名称" width="180">
          </el-table-column>
          <el-table-column
            prop="segName"
            label="管段名称"
            width="180"
          >
          <el-table-column prop="segName" label="管段名称" width="180">
          </el-table-column>
          <el-table-column
            prop="remarks"
            label="备注"
            width="100"
          >
          <el-table-column prop="remarks" label="备注" width="100">
          </el-table-column>
        </el-table>
        <div
          class="pagination_box"
          style="margin-top:10px"
        >
        <div class="pagination_box" style="margin-top: 10px">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
@@ -218,20 +171,14 @@
        label-width="100px"
        class="codeForm"
      >
        <el-form-item
          :label="$t('common.passworld')"
          prop="password"
        >
        <el-form-item :label="$t('common.passworld')" prop="password">
          <el-input
            type="password"
            v-model="codeForm.password"
            show-password
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('common.SPassword')"
          prop="repassword"
        >
        <el-form-item :label="$t('common.SPassword')" prop="repassword">
          <el-input
            type="password"
            v-model="codeForm.repassword"
@@ -239,16 +186,12 @@
          ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button
            type="info"
            size="small"
            @click="download "
          >{{$t('common.confirm')}}</el-button>
          <el-button
            type="info"
            size="small"
            @click="closeDialog "
          >{{$t('common.cancel')}}</el-button>
          <el-button type="info" size="small" @click="download">{{
            $t("common.confirm")
          }}</el-button>
          <el-button type="info" size="small" @click="closeDialog">{{
            $t("common.cancel")
          }}</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
@@ -261,17 +204,22 @@
</template>
<script>
import WKT from 'terraformer-wkt-parser'
import WKT from "terraformer-wkt-parser";
import { getToken } from "@/utils/auth";
import { pipelines_selectSegNames, pipeline_selectPipeAnalysis, sign_getPublicKey, pipeline_downloadReq } from '../../api/api.js';
import {
  pipelines_selectSegNames,
  pipeline_selectPipeAnalysis,
  sign_getPublicKey,
  pipeline_downloadReq,
} from "../../api/api.js";
import $ from "jquery";
export default {
  data() {
    var repasswordValidator = (rule, value, callback) => {
      if (value === '') {
        callback(new Error('请再次输入密码'));
      if (value === "") {
        callback(new Error("请再次输入密码"));
      } else if (value !== this.codeForm.password) {
        callback(new Error('两次输入密码不一致!'));
        callback(new Error("两次输入密码不一致!"));
      } else {
        callback();
      }
@@ -280,61 +228,68 @@
      var passwordreg =
        /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/;
      if (!passwordreg.test(value)) {
        callback(
          new Error('密码必须由数字、字母、特殊字符组合,请输入13-20位')
        );
        callback(new Error("密码必须由数字、字母、特殊字符组合,请输入13-20位"));
      } else {
        callback();
      }
    };
    return {
      rules: {
        password: [{ required: true, message: '请输入密码', trigger: 'blur' }, { validator: passwordValidator, trigger: 'blur' }],
        password: [
          { required: true, message: "请输入密码", trigger: "blur" },
          { validator: passwordValidator, trigger: "blur" },
        ],
        repassword: [
          { required: true, message: '请输入确认密码', trigger: 'blur' },
          { validator: repasswordValidator, trigger: 'blur' },
          { required: true, message: "请输入确认密码", trigger: "blur" },
          { validator: repasswordValidator, trigger: "blur" },
        ],
      },
      dialogVisible: false,
      codeForm: {
        repassword: '', password: ''
        repassword: "",
        password: "",
      },
      ruleFrom: {
        value1: '',
        value2: ''
        value1: "",
        value2: "",
      },
      options1: [],
      options2: [],
      checkList: [],
      checkData: [{
        id: 1,
        label: '铁路(dlg_25w_lrrl)',
        tabs: 'dlg_25w_lrrl',
        tabdesc: '铁路',
        table: 'bd.dlg_25w_lrrl',
        checked: false,
      }, {
        id: 2,
        label: '公路(dlg_25w_lrdl)',
        tabs: 'dlg_25w_lrdl',
        tabdesc: '公路',
        table: 'bd.dlg_25w_lrdl',
        checked: false,
      }, {
        id: 3,
        label: '水系线(dlg_25w_hydl)',
        tabs: 'dlg_25w_hydl',
        tabdesc: '水系线',
        table: 'bd.dlg_25w_hydl',
        checked: false,
      }, {
        id: 4,
        label: '水系面(dlg_25w_hyda)',
        tabs: 'dlg_25w_hyda',
        tabdesc: '水系面',
        table: 'bd.dlg_25w_hyda',
        checked: false,
      }],
      checkData: [
        {
          id: 1,
          label: "铁路(dlg_25w_lrrl)",
          tabs: "dlg_25w_lrrl",
          tabdesc: "铁路",
          table: "bd.dlg_25w_lrrl",
          checked: false,
        },
        {
          id: 2,
          label: "公路(dlg_25w_lrdl)",
          tabs: "dlg_25w_lrdl",
          tabdesc: "公路",
          table: "bd.dlg_25w_lrdl",
          checked: false,
        },
        {
          id: 3,
          label: "水系线(dlg_25w_hydl)",
          tabs: "dlg_25w_hydl",
          tabdesc: "水系线",
          table: "bd.dlg_25w_hydl",
          checked: false,
        },
        {
          id: 4,
          label: "水系面(dlg_25w_hyda)",
          tabs: "dlg_25w_hyda",
          tabdesc: "水系面",
          table: "bd.dlg_25w_hyda",
          checked: false,
        },
      ],
      citiyData: [],
      cities: [],
      checkedCities: [],
@@ -350,12 +305,12 @@
      pageData: {
        pageIndex: 1,
        pageSize: 10,
        pageCount: 0
        pageCount: 0,
      },
      multipleSelection: [],
      featurTable: null,
      featureLayer: [],
    }
    };
  },
  methods: {
    spaceLocation(index, row) {
@@ -368,43 +323,55 @@
      this.claerAll();
      switch (geojson.type) {
        case 'Point':
          this.setShowImagePoint(geojson.coordinates)
        case "Point":
          this.setShowImagePoint(geojson.coordinates);
          break;
        case 'MultiPoint':
        case "MultiPoint":
          for (var i in geojson.coordinates) {
            this.setShowImagePoint(geojson.coordinates[i])
            this.setShowImagePoint(geojson.coordinates[i]);
          }
          break;
        case 'LineString':
          this.setShowImageLine(geojson.coordinates)
        case "LineString":
          this.setShowImageLine(geojson.coordinates);
          break;
        case 'MultiLineString':
        case "MultiLineString":
          for (var i in geojson.coordinates) {
            this.setShowImageLine(geojson.coordinates[i])
            this.setShowImageLine(geojson.coordinates[i]);
          }
          break;
      }
    },
    setShowImagePoint(res) {
      var obj = { X: res[0], Y: res[1], Altitude: 1000 }
      var imageLabel = sgworld.Creator.CreateImageLabel(obj, SmartEarthRootUrl + "Workers/image/mark.png", {}, 0, "管道空间分析");
      this.$store.state.pipelineEntity.push(imageLabel.item)
      var obj = { X: res[0], Y: res[1], Altitude: 1000 };
      var imageLabel = sgworld.Creator.CreateImageLabel(
        obj,
        SmartEarthRootUrl + "Workers/image/mark.png",
        {},
        0,
        "管道空间分析"
      );
      this.$store.state.pipelineEntity.push(imageLabel.item);
      sgworld.Navigate.flyToObj(imageLabel.item);
    },
    setShowImageLine(res) {
      var obj = [];
      for (var i in res) {
        obj.push({ x: res[i][0], y: res[i][1], z: 1000 })
        obj.push({ x: res[i][0], y: res[i][1], z: 1000 });
      }
      var line = sgworld.Creator.createPolyline(obj, "#ffff00", 1, 0, "管道空间分析");
      this.$store.state.pipelineEntity.push(line.item)
      var line = sgworld.Creator.createPolyline(
        obj,
        "#ffff00",
        1,
        0,
        "管道空间分析"
      );
      this.$store.state.pipelineEntity.push(line.item);
      sgworld.Navigate.flyToObj(line.item);
    },
    claerAll() {
      for (var i in this.$store.state.pipelineEntity) {
        var item = this.$store.state.pipelineEntity[i]
        var item = this.$store.state.pipelineEntity[i];
        sgworld.Viewer.entities.remove(item);
      }
      this.$store.state.pipelineEntity = [];
@@ -417,20 +384,17 @@
      }
    },
    async download() {
      var std = [];
      for (var i in this.listData) {
        std.push(this.listData[i].table)
        std.push(this.listData[i].table);
      }
      var obj = {
        pwd: encrypt.encrypt(this.codeForm.password),
        gid: this.analyGid,
        tabs: std
        tabs: std,
      };
      const data = await pipeline_downloadReq(obj);
      if (data.code != 200) {
        this.$message.error("下载请求失败");
        this.closeDialog();
@@ -452,47 +416,47 @@
      //  this.$store.state.loading = false;
    },
    showDialogVivable() {
      if (this.listData.length == 0) return
      this.dialogVisible = true
      if (this.listData.length == 0) return;
      this.dialogVisible = true;
    },
    handleClose() {
      this.$confirm('确认关闭?')
        .then(_ => {
          this.closeDialog()
      this.$confirm("确认关闭?")
        .then((_) => {
          this.closeDialog();
        })
        .catch(_ => { });
        .catch((_) => {});
    },
    closeDialog() {
      this.dialogVisible = false
      this.dialogVisible = false;
      this.codeForm = {
        repassword: '', password: ''
      }
        repassword: "",
        password: "",
      };
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    setTransLeft() {
      if (this.rightChecked == null) return
      this.cities.push(this.rightChecked)
      if (this.rightChecked == null) return;
      this.cities.push(this.rightChecked);
      this.citiyData.forEach((value, index, array) => {
        if (value.label == this.rightChecked.label) {
          array.splice(index, 1)
          array.splice(index, 1);
        }
      });
      this.checkedLeftflag = null;
      this.rightChecked = null
      this.rightChecked = null;
    },
    setTransRight() {
      if (this.leftChecked == null) return
      this.citiyData.push(this.leftChecked)
      if (this.leftChecked == null) return;
      this.citiyData.push(this.leftChecked);
      this.cities.forEach((value, index, array) => {
        if (value.label == this.leftChecked.label) {
          array.splice(index, 1)
          array.splice(index, 1);
        }
      });
      this.checkedRightflag = null;
      this.leftChecked = null
      this.leftChecked = null;
    },
    checkLeft(res) {
      this.checkedLeftflag = res.id;
@@ -503,10 +467,9 @@
      this.rightChecked = res;
    },
    selectChange(res) {
      this.changeSelect2(res)
      this.changeSelect2(res);
    },
    selectChange1(res) {
      this.analyGid = res;
    },
    changeSelect2(res) {
@@ -514,7 +477,7 @@
      var value = this.featureLayer;
      for (var i in value) {
        if (value[i].pipeName == res) {
          this.options2.push(value[i])
          this.options2.push(value[i]);
        }
      }
      this.ruleFrom.value2 = this.options2[0].segName;
@@ -524,35 +487,40 @@
      this.tableData = [];
      this.listData = [];
      this.cities = [{
        id: 1,
        label: '铁路(dlg_25w_lrrl)',
        tabs: 'dlg_25w_lrrl',
        tabdesc: '铁路',
        table: 'bd.dlg_25w_lrrl',
        checked: false,
      }, {
        id: 2,
        label: '公路(dlg_25w_lrdl)',
        tabs: 'dlg_25w_lrdl',
        tabdesc: '公路',
        table: 'bd.dlg_25w_lrdl',
        checked: false,
      }, {
        id: 3,
        label: '水系线(dlg_25w_hydl)',
        tabs: 'dlg_25w_hydl',
        tabdesc: '水系线',
        table: 'bd.dlg_25w_hydl',
        checked: false,
      }, {
        id: 4,
        label: '水系面(dlg_25w_hyda)',
        tabs: 'dlg_25w_hyda',
        tabdesc: '水系面',
        table: 'bd.dlg_25w_hyda',
        checked: false,
      }];
      this.cities = [
        {
          id: 1,
          label: "铁路(dlg_25w_lrrl)",
          tabs: "dlg_25w_lrrl",
          tabdesc: "铁路",
          table: "bd.dlg_25w_lrrl",
          checked: false,
        },
        {
          id: 2,
          label: "公路(dlg_25w_lrdl)",
          tabs: "dlg_25w_lrdl",
          tabdesc: "公路",
          table: "bd.dlg_25w_lrdl",
          checked: false,
        },
        {
          id: 3,
          label: "水系线(dlg_25w_hydl)",
          tabs: "dlg_25w_hydl",
          tabdesc: "水系线",
          table: "bd.dlg_25w_hydl",
          checked: false,
        },
        {
          id: 4,
          label: "水系面(dlg_25w_hyda)",
          tabs: "dlg_25w_hyda",
          tabdesc: "水系面",
          table: "bd.dlg_25w_hyda",
          checked: false,
        },
      ];
      this.citiyData = [];
      this.getAllData();
      this.listflag = null;
@@ -561,40 +529,40 @@
      this.pageData = {
        pageIndex: 1,
        pageSize: 10,
        pageCount: 0
      }
        pageCount: 0,
      };
    },
    async setAnalysis() {
      if (this.citiyData.length == 0) {
        this.$message.error('请选择要分析的图层!');
        this.$message.error("请选择要分析的图层!");
      }
      var std = [];
      var listTable = [];
      for (var i in this.citiyData) {
        std.push(this.citiyData[i].table)
        listTable.push(this.citiyData[i])
        std.push(this.citiyData[i].table);
        listTable.push(this.citiyData[i]);
      }
      this.listData = listTable;
      this.listflag = this.listData[0].id
      this.listflag = this.listData[0].id;
      var obj = {
        gid: this.analyGid,
        tabs: std
      }
        tabs: std,
      };
      const data = await pipeline_selectPipeAnalysis(obj);
      if (data.code != 200) {
        this.$message.error('列表调用失败');
        this.$message.error("列表调用失败");
      }
      this.featureData = data.result;
      this.featurTable = this.featureData[this.listData[0].table]
      this.featurTable = this.featureData[this.listData[0].table];
      this.pageData.pageCount = this.featurTable.length;
      this.pageData.pageIndex = 1;
      this.pageData.pageSize = 10;
      this.changePageData();
    },
    setlistChange(res) {
      this.listflag = res.id
      this.featurTable = this.featureData[res.table]
      this.listflag = res.id;
      this.featurTable = this.featureData[res.table];
      this.pageData.pageCount = this.featurTable.length;
      this.pageData.pageIndex = 1;
      this.pageData.pageSize = 10;
@@ -615,10 +583,9 @@
      this.changePageData();
    },
    async getAllData() {
      const data = await pipelines_selectSegNames();
      if (data.code != 200) {
        this.$message.error('列表调用失败');
        this.$message.error("列表调用失败");
      }
      var std = [];
      var str = [];
@@ -626,50 +593,54 @@
      for (var i in result) {
        if (std.indexOf(result[i].pipeName) == -1) {
          std.push(result[i].pipeName);
          str.push(result[i])
          str.push(result[i]);
        }
      }
      this.featureLayer = data.result;
      this.options1 = str;
      this.ruleFrom.value1 = this.options1[0].pipeName;
      this.changeSelect2(this.ruleFrom.value1)
      this.changeSelect2(this.ruleFrom.value1);
    },
  },
  mounted() {
    this.cities = [{
      id: 1,
      label: '铁路(dlg_25w_lrrl)',
      tabs: 'dlg_25w_lrrl',
      tabdesc: '铁路',
      table: 'bd.dlg_25w_lrrl',
      checked: false,
    }, {
      id: 2,
      label: '公路(dlg_25w_lrdl)',
      tabs: 'dlg_25w_lrdl',
      tabdesc: '公路',
      table: 'bd.dlg_25w_lrdl',
      checked: false,
    }, {
      id: 3,
      label: '水系线(dlg_25w_hydl)',
      tabs: 'dlg_25w_hydl',
      tabdesc: '水系线',
      table: 'bd.dlg_25w_hydl',
      checked: false,
    }, {
      id: 4,
      label: '水系面(dlg_25w_hyda)',
      tabs: 'dlg_25w_hyda',
      tabdesc: '水系面',
      table: 'bd.dlg_25w_hyda',
      checked: false,
    }];
    this.cities = [
      {
        id: 1,
        label: "铁路(dlg_25w_lrrl)",
        tabs: "dlg_25w_lrrl",
        tabdesc: "铁路",
        table: "bd.dlg_25w_lrrl",
        checked: false,
      },
      {
        id: 2,
        label: "公路(dlg_25w_lrdl)",
        tabs: "dlg_25w_lrdl",
        tabdesc: "公路",
        table: "bd.dlg_25w_lrdl",
        checked: false,
      },
      {
        id: 3,
        label: "水系线(dlg_25w_hydl)",
        tabs: "dlg_25w_hydl",
        tabdesc: "水系线",
        table: "bd.dlg_25w_hydl",
        checked: false,
      },
      {
        id: 4,
        label: "水系面(dlg_25w_hyda)",
        tabs: "dlg_25w_hyda",
        tabdesc: "水系面",
        table: "bd.dlg_25w_hyda",
        checked: false,
      },
    ];
    this.getAllData();
    this.signGetPublicKey();
  }
}
  },
};
</script>
<style scoped lang="less">
@@ -698,8 +669,6 @@
        border-radius: 5px;
        overflow-y: auto;
      }
    }
    .transInfo {
@@ -736,7 +705,7 @@
  .checkhover {
    color: #409eff;
  }
  .country-group {
    display: flex;
    justify-content: center;
@@ -745,7 +714,5 @@
      margin: 4px 0;
    }
  }
}
</style>
</style>
src/views/datamanage/metadataManage.vue
@@ -204,6 +204,7 @@
          <template slot-scope="scope">
            <span v-if="scope.row.ismeta > 0">
              <el-link
                style="color: #409eff"
                title="源数据查询"
                @click="setQueryMetaData(scope.row)"
                target="_blank"