管道基础大数据平台系统开发-【前端】-新系統界面
王旭
2023-02-22 e362a284c57b888a03e69075d7257d1c10d8449b
Merge branch 'master' of http://192.168.20.39:8989/r/LFWEB_NEW
已修改2个文件
152 ■■■■ 文件已修改
src/components/Screen/bottom.vue 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Tools/LayerTree.vue 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Screen/bottom.vue
@@ -171,6 +171,7 @@
  },
  created() {
    this.getCountProjectDisplay()
    this.getCountProjectTour()
  },
  methods: {
    ChangeBaseLayer() {
@@ -210,56 +211,17 @@
      const position = line.coordinates[0]
      const result = []
      position.forEach(pos => {
        pos.push(50)
        // 添加漫游高度,后续修改SDK源码可以适配为地面高程
        pos.push(1000)
        result.push(...pos)
      })
      //
      console.log("line", position)
      // 西气东输二线西段干线
      // console.log("PipeLine", PipeLine)
      const features = PipeLine.features
      // features.forEach(item => {
      //   const name = item.properties.pipename
      //   const rawArr = item.geometry.coordinates
      // })
      // const pipeline = features.find(
      //   item => item.properties.pipename == "西气东输一线"
      // )
      // const name = pipeline.properties.pipename
      // const rawArr = pipeline.geometry.coordinates[0]
      // const result = []
      // rawArr.forEach(pos => {
      //   pos.push(50)
      //   result.push(...pos)
      // })
      // console.log("result", result);
      // sgworld.Command.execute(2, 3, "", data => {
      //   data.showPoint = false
      //   data.showLine = true
      //   data.mode = 1
      //   // 弹窗数据
      //   window.PathAnimationData = {
      //     flyData: data,
      //   }
      //   window.PathAnimationData.winIndex = layer.open({
      //     type: 2,
      //     title: "路径动画",
      //     shade: false,
      //     area: ["352px", "690px"],
      //     offset: "r",
      //     skin: "other-class",
      //     content: SmartEarthRootUrl + "Workers/path/Path.html",
      //     end: function () {
      //       PathAnimationData.fly && PathAnimationData.fly.exit()
      //     },
      //   })
      // })
      window.sgworld.Creator.getFlyData(result, data => {
        data.showPoint = false
        data.showLine = true
        data.mode = 1
        data.height = 2000
        data.height = 5000
        // 弹窗数据
        window.PathAnimationData = {
@@ -267,12 +229,12 @@
        }
        window.PathAnimationData.winIndex = layer.open({
          type: 2,
          title: "路径动画",
          title: "工程巡视",
          shade: false,
          area: ["352px", "690px"],
          offset: "r",
          skin: "other-class",
          content: SmartEarthRootUrl + "Workers/path/Path.html",
          content: SmartEarthRootUrl + "Workers/path/ProjectPath.html",
          end: function () {
            PathAnimationData.fly && PathAnimationData.fly.exit()
          },
src/views/Tools/LayerTree.vue
@@ -1,13 +1,10 @@
<template>
  <div class="lalala tree-container">
    <el-input
      placeholder="输入关键字进行过滤"
    <el-input placeholder="输入关键字进行过滤"
      v-model="filterText"
      class="search"
    >
              class="search">
    </el-input>
    <el-tree
      :data="treeData"
    <el-tree :data="treeData"
      node-key="id"
      default-expand-all
      show-checkbox
@@ -15,65 +12,50 @@
      @node-contextmenu="rightClick"
      @check-change="handleCheckChange"
      :default-checked-keys="handleTreeCheck"
      ref="tree"
    >
      <span
        class="slot-t-node"
             ref="tree">
      <span class="slot-t-node"
        slot-scope="{ node, data }"
        @dblclick="editNode(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"
          <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>
                    @keydown.native.enter="NodeBlur(node, data)"></el-input>
        </span>
      </span>
    </el-tree>
    <el-card
      class="box-card"
    <el-card class="box-card"
      ref="card"
      :style="{ ...rightClickMenuStyle }"
      v-show="menuVisible"
    >
             v-show="menuVisible">
      <div @click="addSameLevelNode()">
        <i class="el-icon-circle-plus-outline"></i>&nbsp;&nbsp;添加图层组
      </div>
      <div
        class="add"
      <div class="add"
        @click="addChildNode()"
        v-show="firstLevel"
      >
           v-show="firstLevel">
        <i class="el-icon-circle-plus-outline"></i>&nbsp;&nbsp;添加图层
      </div>
      <div
        class="delete"
        @click="deleteNode()"
      >
      <div class="delete"
           @click="deleteNode()">
        <i class="el-icon-remove-outline"></i>&nbsp;&nbsp;删除节点
      </div>
      <div
        class="edit"
        @click="editNode()"
      >
      <div class="edit"
           @click="editNode()">
        <i class="el-icon-edit"></i>&nbsp;&nbsp;修改节点
      </div>
      <div
        class="edit"
        @click="showLayerAttribute()"
      >
      <div class="edit"
           @click="showLayerAttribute()">
        <i class="el-icon-edit"></i>&nbsp;&nbsp;属性
      </div>
      <!-- <div
@@ -89,33 +71,25 @@
        <i class="el-icon-bottom"></i>&nbsp;&nbsp;下移
      </div> -->
    </el-card>
    <el-dialog
      :title="appendNodetitle"
    <el-dialog :title="appendNodetitle"
      :visible.sync="dialogVisible"
      width="30%"
      top="20vh"
      :modal="false"
      :before-close="handleClose"
    >
      <el-form
        ref="form"
               :before-close="handleClose">
      <el-form ref="form"
        :model="addFormServer"
        label-width="100px"
      >
               label-width="100px">
        <el-form-item label="服务类型">
          <!-- <el-input v-model="addFormServer.type"></el-input> -->
          <el-select
            style="width:100%"
          <el-select style="width:100%"
            :popper-append-to-body="false"
            v-model="addFormServer.layerType"
            placeholder="请选择"
          >
            <el-option
              v-for="item in options"
                     placeholder="请选择">
            <el-option v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
                       :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
@@ -133,14 +107,10 @@
          <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" />
@@ -483,15 +453,14 @@
      }
    },
    setAddLayers(res) {
      if (res.layerType == 'WMS') {
        var url = geoServerURl;
        if (res.url != null && res.url != undefined) {
          url = res.url
        }
        var width = $("#mapdiv").width() +5 ;
        var height = $("#mapdiv").height()+5  ;
        //var width = $("#mapdiv").width();
        //var height = $("#mapdiv").height();
     
        var imageryLayers = window.Viewer.scene.imageryLayers;
        let layerWMS = new Cesium.WebMapServiceImageryProvider({
@@ -503,8 +472,8 @@
                srs: "EPSG:4490",
                styles: "",
          },
          tileWidth: width,
            tileHeight: height
          tileWidth: 512,
          tileHeight: 512
        });
        layerWMS.name = res.label;
        //透明度
@@ -517,7 +486,6 @@
          source: new ImageWMS({
            crossOrigin: 'anonymous',
            url: url,
            params: {
              FORMAT: 'image/png',
              VERSION: '1.1.1',