From dae8fb08b9ff7327da86ed249c9c97a87c90e6f2 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期二, 16 五月 2023 18:05:34 +0800
Subject: [PATCH] 发布管理,图层管理修改

---
 src/views/datamanage/uploadmanage.vue  |   25 
 src/components/mapol.vue               |   29 
 src/store/index.js                     |    4 
 src/assets/css/index.css               |    2 
 src/components/login.vue               |   41 +
 src/components/mapsdk.vue              |  308 ++------------
 src/components/MapView/mapSpaceTop.vue |   65 ++
 src/utils/request.js                   |   20 
 src/views/Tools/maplayer.vue           |    2 
 src/views/Tools/LayerTree.vue          |  495 ++++++----------------
 src/utils/service.js                   |   18 
 src/components/MapView/mapMenuTop.vue  |   25 
 src/components/preview_map.vue         |   63 +-
 src/views/Home.vue                     |    1 
 src/App.vue                            |   43 +
 src/components/MapView/mapSpacePop.vue |   82 ---
 16 files changed, 425 insertions(+), 798 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 3fe4336..93a9652 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,8 +1,5 @@
 <template>
-  <div
-    id="app"
-
-  >
+  <div id="app">
     <router-view />
   </div>
 </template>
@@ -17,12 +14,13 @@
     return {};
   },
   created() {
+
   },
-  mounted () {
+  mounted() {
     window.addEventListener('beforeunload', e => {
       sessionStorage.setItem('beforeunload', 1);
     });
-     
+
     // 鐩戝惉椤甸潰鍒锋柊
     if (sessionStorage.getItem('beforeunload') == 1) {
       let name = sessionStorage.getItem("routerName");
@@ -33,12 +31,37 @@
         })
       } else {
         this.$nextTick(function () {
-         this.$router.push({ path: '/' });  //涓嶅瓨鍦ㄥ瓨鍌紝鍘讳富椤�
+          this.$router.push({ path: '/' });  //涓嶅瓨鍦ㄥ瓨鍌紝鍘讳富椤�
         })
       }
     }
+
+    this.addListenerExpire();
   },
-  beforeDestroy() { },
+  methods: {
+    addListenerExpire() {
+      var timeViewer = setInterval((res) => {
+        if (this.$store.state.listenTime && window.localStorage.getItem("LFToken")) {
+          var result = JSON.parse(window.localStorage.getItem("LFToken"))
+          var time = this.$store.state.listenTime + (parseInt(result.autoLogOut) * 60 * 1000);
+          var timeire = new Date().getTime();
+          var token_time = result.expire;
+
+          if (timeire >= token_time) {
+            router.push('/login')
+            localStorage.removeItem("LFToken");
+            clearInterval(timeViewer)
+          }
+          if (timeire >= time) {
+            router.push('/login')
+            localStorage.removeItem("LFToken");
+            clearInterval(timeViewer)
+          }
+        }
+      }, 5000)
+    }
+  },
+
 };
 </script>
 <style lang="less" scoped>
@@ -56,9 +79,5 @@
   scrollbar-face-color: #dfebff;
   /*婊氬姩鏉℃暣浣撻鑹�*/
   scrollbar-track-color: #536c97;
-  
 }
-
- 
-
 </style>
diff --git a/src/assets/css/index.css b/src/assets/css/index.css
index 5761591..a8f68df 100644
--- a/src/assets/css/index.css
+++ b/src/assets/css/index.css
@@ -297,7 +297,7 @@
 
 .ol-scale-line {
     bottom: 55px !important;
-    right: 10px
+    right: 110px
 }
 
 .ol-scale-line {
diff --git a/src/components/MapView/mapMenuTop.vue b/src/components/MapView/mapMenuTop.vue
index 0eae947..dd34abe 100644
--- a/src/components/MapView/mapMenuTop.vue
+++ b/src/components/MapView/mapMenuTop.vue
@@ -9,7 +9,7 @@
         <el-select
           v-model="menuTopFrom.queryLayer"
           :title="treeChange"
-          placeholder="閫夋嫨鏁版嵁"
+          placeholder="璇烽�夋嫨..."
           :popper-append-to-body="false"
         >
           <el-option
@@ -48,7 +48,7 @@
         <el-select
           @change="changeValue($event)"
           v-model="menuTopFrom.queryType"
-          placeholder="閫夋嫨鑼冨洿"
+          placeholder="璇烽�夋嫨..."
           :popper-append-to-body="false"
         >
           <el-option
@@ -271,7 +271,7 @@
   },
 
   mounted() {
-    // this.menuTopFrom.queryType = "rectangle"
+    this.menuTopFrom.queryType = "rectangle"
     this.getAllTable()
     this.getPipelineData()
     this.$bus.$on("setExtentBUff", res => {
@@ -389,22 +389,17 @@
     getCheckedNodes() {
       this.layerTabe = [];
       var valTree = this.$refs.tree.getCheckedNodes()
-      var parentIds = this.$refs.tree.getHalfCheckedKeys(true)
       if (valTree.length == 0) return
-      this.treeChange = [];
-      this.menuTopFrom.queryLayer = null;
-      if (parentIds.length > 0) {
-        this.menuTopFrom.queryLayer = this.$refs.tree.getNode(parentIds[0]).data.label
-      } else {
-        this.menuTopFrom.queryLayer = valTree[0].label
-      }
-      this.$store.state.propertiesName = valTree[0];
 
+      this.menuTopFrom.queryLayer = null;
+
+      this.$store.state.propertiesName = valTree[0];
+      this.treeChange = [];
       for (var i = 0; i < valTree.length; i++) {
         if (valTree[i].entity) {
-          // if (!this.menuTopFrom.queryLayer) {
-          //   this.menuTopFrom.queryLayer = valTree[i].tabDesc;
-          // }
+          if (!this.menuTopFrom.queryLayer) {
+            this.menuTopFrom.queryLayer = valTree[i].tabDesc;
+          }
           this.layerTabe.push(valTree[i])
           // this.treeChange.push(valTree[i])
         }
diff --git a/src/components/MapView/mapSpacePop.vue b/src/components/MapView/mapSpacePop.vue
index 9997922..d20a926 100644
--- a/src/components/MapView/mapSpacePop.vue
+++ b/src/components/MapView/mapSpacePop.vue
@@ -218,7 +218,7 @@
           </el-select>
         </el-form-item>
         <el-form-item v-show="!fromSqlflag">
-          <el-input v-model="formSql.value" :placeholder="$t('shuJuGuanLi.shuJuJianSuo.queryContent')"></el-input>
+          <el-input v-model="formSql.value"></el-input>
         </el-form-item>
         <el-form-item v-show="fromSqlflag">
           <el-date-picker
@@ -500,54 +500,23 @@
       if (data.code != 200) {
         this.$message.error("鍒楄〃璋冪敤澶辫触")
       }
-      const data1 = await inquiry_selectDomains({ name: this.spaceLayer })
-      if (data1.code != 200) {
-        this.$message.error("鍒楄〃璋冪敤澶辫触")
-      }
-
-
-
+      this.filedsOption = [];
       this.optionx = []
-      this.attributeData = []
       var valadata = data.result
-      var laydomain = data1.result
-      this.optionx = data1.result
       for (var i in valadata) {
         if (valadata[i].showtype == 1) {
           if (
             valadata[i].domainNa != null &&
             valadata[i].domainNa != undefined
           ) {
-            for (var j in laydomain) {
-              if (laydomain[j].domName == valadata[i].domainNa) {
-                // valadata[i].domainNa = laydomain[j].codeDesc
-              }
-            }
+            valadata[i].domainNa = this.getMatchDomainNa(valadata[i].domainNa)
           }
-
+          this.optionx.push(valadata[i])
           this.filedsOption.push(valadata[i])
-          // this.attributeData.push(valadata[i])
-          // this.optionx.push(valadata[i])
           this.attributeData.push(valadata[i])
-
         }
       }
-
-      // this.filedsOption = [];
-      // this.optionx = []
-      // var valadata = data.result
-      // for (var i in valadata) {
-      //   if (valadata[i].showtype == 1) {
-      //     if (
-      //       valadata[i].domainNa != null &&
-      //       valadata[i].domainNa != undefined
-      //     ) {
-      //       valadata[i].domainNa = this.getMatchDomainNa(valadata[i].domainNa)
-      //     }
-
-      //   }
-      // }
-      // this.startFiledAndcondition();
+      this.startFiledAndcondition();
       this.showSpacePopLayer()
     },
     appendQueryFilter() {
@@ -676,40 +645,21 @@
       })
 
 
-
+      var val_Data = data.result
       this.count = data.count
-      for (var i in val) {
-        var meson = this.optionx.filter(res => {
-          if (res.domCode == val[i].medium) {
-            return res
-          }
-        })
-        if (meson.length > 0) {
-          val[i].medium = meson[0].codeDesc
-        } else {
-          val[i].medium = ''
-        }
 
+      for (var i in val_Data) {
+        var valste = val_Data[i]
+        for (var j in this.optionx) {
+          if (
+            this.optionx[j].domainNa != null &&
+            this.optionx[j].domainNa != undefined
+          ) {
+            valste[this.optionx[j].field] = this.optionx[j].domainNa
+          }
+        }
       }
 
-      // // // for (var i in val_Data) {
-      // // //   var valste = val_Data[i]
-      // // //   for (var j in this.optionx) {
-      // // //     if (
-      // // //       this.optionx[j].domainNa != null &&
-      // // //       this.optionx[j].domainNa != undefined
-      // // //     ) {
-      // // //       console.log(this.optionx[j])
-      // // //       // valste[this.optionx[j].field] = this.optionx[j].domainNa
-      // // //     }
-      // // //   }
-      // // // }
-      // // for (var j in this.optionx) {
-      // //   console.log(this.optionx[j].domainNa)
-      // //   // if (this.optionx[j].alias == '杈撻�佷粙璐�') {
-      // //   //   console.log(this.optionx[j].domainNa)
-      // //   // }
-      // // }
 
       this.tableData = val
       this.$refs.filterTable.doLayout()
diff --git a/src/components/MapView/mapSpaceTop.vue b/src/components/MapView/mapSpaceTop.vue
index fb4b322..af8b830 100644
--- a/src/components/MapView/mapSpaceTop.vue
+++ b/src/components/MapView/mapSpaceTop.vue
@@ -2,7 +2,8 @@
   <div class="spaceBox">
     <el-select
       v-model="menuTopFrom.queryLayer"
-      placeholder="璇烽�夋嫨鏁版嵁..."
+      @change="menuTreeCheck"
+      placeholder="璇烽�夋嫨..."
       filterable
       ref="selectTree1"
     >
@@ -81,7 +82,6 @@
       layerData: [
 
       ],
-
       defaultProps: {
         children: "children",
         label: "label",
@@ -93,6 +93,15 @@
     this.getAllTable();
   },
   methods: {
+    handleNodeClick(data) {
+      if (data.children) return;
+      this.menuTopFrom.queryLayer = data.tabDesc
+      this.$refs.selectTree1.blur();
+      this.mapSpaceQueryLayer = data.entity;
+      this.$store.state.propertiesName = data;
+      this.getCheckedNodes();
+
+    },
     async getAllTable() {
       // const data = await inquiry_SelectTabs();
       const data = await dataLib_selectTabed({
@@ -105,19 +114,51 @@
       }
       var option = data.result;
       this.layerData = getTreeData(option)
+      // var option = data.result;
+      // this.layerData = option.filter((res) => {
 
-      // = option.filter((res) => {
       //   return res;
-      // });
-    },
-    handleNodeClick(data) {
-      if (data.children) return;
-      this.menuTopFrom.queryLayer = data.tabDesc
-      this.$refs.selectTree1.blur();
-      this.mapSpaceQueryLayer = data.entity;
-      this.$store.state.propertiesName = data;
-      this.getCheckedNodes();
 
+      // });
+      // this.layerData = getTreeData(option)
+      // var val = data.result
+      // var std = [];
+      // val.filter((item) => {
+      //   if (std.indexOf(item.bak) == -1) {
+      //     std.push(item.bak);
+      //     this.layerData.push(
+      //       {
+      //         val: item.bak,
+      //         label: item.bak,
+      //         children: [],
+      //       }
+      //     )
+      //   }
+      // });
+      // for (var i in this.layerData) {
+      //   var item = this.layerData[i];
+      //   for (var j in val) {
+      //     var res = val[j];
+
+      //     if (item.val === res.bak) {
+
+      //       res.label = res.tabDesc
+      //       this.layerData[i].children.push(res)
+      //     }
+      //   }
+      // }
+
+      // for (var i in option) {
+      //   // console.log(option[i].tableType)
+      //   var val_Data = option[i];
+      //   val_Data.id = '1' + i;
+      //   val_Data.label = val_Data.tabDesc;
+      //   if (option[i].ns == 'bd') {
+      //     this.layerData[0].children.push(val_Data);
+      //   } else {
+      //     this.layerData[1].children.push(val_Data);
+      //   }
+      // }
     },
     getCheckedNodes() {
       this.$store.state.mapSpaceQueryLayer = this.mapSpaceQueryLayer;
diff --git a/src/components/login.vue b/src/components/login.vue
index 9564628..4a88b67 100644
--- a/src/components/login.vue
+++ b/src/components/login.vue
@@ -26,7 +26,10 @@
       ></iframe>
     </div>
     <div class="title_img">
-      <img src="../assets/img/lg_03.png" alt="" />
+      <img
+        src="../assets/img/lg_03.png"
+        alt=""
+      />
     </div>
     <div class="login">
       <div class="login_title">
@@ -46,7 +49,10 @@
             size="meddle"
             autocomplete="off"
           >
-            <i slot="prefix" class="el-icon-user"></i>
+            <i
+              slot="prefix"
+              class="el-icon-user"
+            ></i>
           </el-input>
         </el-form-item>
 
@@ -58,7 +64,10 @@
             class="nobr"
             autocomplete="off"
           >
-            <i slot="prefix" class="el-icon-lock"></i>
+            <i
+              slot="prefix"
+              class="el-icon-lock"
+            ></i>
           </el-input>
         </el-form-item>
 
@@ -73,26 +82,28 @@
             </el-form-item>
           </el-col>
 
-          <el-col :span="6" align="right">
+          <el-col
+            :span="6"
+            align="right"
+          >
             <validCode
               v-model="validCode"
               ref="refresh"
-        
               @sendData="getCode"
             ></validCode>
           </el-col>
         </el-form-item>
         <el-form-item>
-          <img src="../assets/img/zhengshu.png" alt="" /><span
-            style="color: black"
-            >璇佷功瀹夎涓庢坊鍔犱俊浠荤珯鐐�</span
-          >
+          <img
+            src="../assets/img/zhengshu.png"
+            alt=""
+          /><span style="color: black">璇佷功瀹夎涓庢坊鍔犱俊浠荤珯鐐�</span>
         </el-form-item>
         <el-form-item>
-          <img src="../assets/img/document.png" alt="" /><span
-            style="color: black"
-            >浣跨敤甯姪鏂囨。</span
-          >
+          <img
+            src="../assets/img/document.png"
+            alt=""
+          /><span style="color: black">浣跨敤甯姪鏂囨。</span>
         </el-form-item>
         <el-form-item>
           <el-button
@@ -101,8 +112,7 @@
             style=""
             :loading="loading"
             @click="submitForm('loginForm')"
-            >鐧诲綍</el-button
-          >
+          >鐧诲綍</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -249,6 +259,7 @@
         time: timeData,
         userid: res.result.createUser,
         expire: res.result.expire,
+        autoLogOut: res.result.autoLogOut,
       };
       LfPrems = JSON.stringify(LfPrems);
       localStorage.setItem("LFToken", LfPrems);
diff --git a/src/components/mapol.vue b/src/components/mapol.vue
index b668f48..0cb5ad9 100644
--- a/src/components/mapol.vue
+++ b/src/components/mapol.vue
@@ -35,8 +35,8 @@
 
     <!--    </div>-->
     <div
-      v-show="$store.state.isNaviget"
       class="sindagis-map-compass"
+      style=" bottom: 130px; right: 35px;"
     >
       <span
         class="left"
@@ -98,17 +98,17 @@
     init2DMap() {
       var layerBase = [];
       if (!is_production) {
-        // window.vectorLayer = new TileLayer({
-        //   source: new XYZ({
-        //     url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}",
-        //   }),
-        // })
-        window.vectorLayer = new TileLayer({
+        var vectorLayer = new TileLayer({
+          source: new XYZ({
+            url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}",
+          }),
+        })
+        var imageLayer = new TileLayer({
           source: new XYZ({
             url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=6&x={x}&y={y}&z={z}",
           }),
         })
-        layerBase = [vectorLayer]
+        layerBase = [vectorLayer, imageLayer]
       }
       window.map = new Map({
         target: "mapol",
@@ -147,10 +147,10 @@
 
 
 
-      // var scaleLine = new  ScaleLine({
-      //   units: "metric"
-      // });
-      // map.addControl(scaleLine);
+      var scaleLine = new ScaleLine({
+        units: "metric"
+      });
+      map.addControl(scaleLine);
 
       map.on("moveend", function (e) {
         console.log(($(window).width() - $(".ol-scale-line-inner").width()) + "px");
@@ -297,14 +297,15 @@
 }
 .ol-scale-line {
   bottom: 55px !important;
+  right: 130px !important;
 }
 
 .sindagis-map-compass {
   position: absolute;
   right: 50px;
-  bottom: 90px;
+
   z-index: 5;
-  right: 25px;
+
   width: 52px;
   height: 54px;
   background: url("../assets/img/compass.png") 0% 0% / 266px no-repeat;
diff --git a/src/components/mapsdk.vue b/src/components/mapsdk.vue
index 0b7d4b1..2fa800f 100644
--- a/src/components/mapsdk.vue
+++ b/src/components/mapsdk.vue
@@ -1,10 +1,5 @@
 <template>
-  <div
-    class="mapBox"
-    v-loading="loading"
-    :element-loading-text="loadingText"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-  >
+  <div class="mapBox">
     <div id="mapdiv">
       <div
         class="menu_Top box_divm"
@@ -80,24 +75,16 @@
             <el-form
               ref="form"
               :model="coordFrom"
+              label-width="50px"
             >
               <el-form-item label="缁忓害:">
-                <el-input
-                  v-model="coordFrom.lon"
-                  placeholder="璇疯緭鍏ョ粡搴�"
-                ></el-input>
+                <el-input v-model="coordFrom.lon"></el-input>
               </el-form-item>
               <el-form-item label="绾害:">
-                <el-input
-                  v-model="coordFrom.lat"
-                  placeholder="璇疯緭鍏ョ含搴�"
-                ></el-input>
+                <el-input v-model="coordFrom.lat"></el-input>
               </el-form-item>
               <el-form-item label="楂樺害:">
-                <el-input
-                  v-model="coordFrom.height"
-                  placeholder="璇疯緭鍏ラ珮搴�"
-                ></el-input>
+                <el-input v-model="coordFrom.height"></el-input>
               </el-form-item>
               <el-form-item>
                 <el-button
@@ -312,17 +299,7 @@
       </div>
       <!--      <div style="display: flex;">-->
       <div
-        style=" position: absolute;
-  bottom: 84px;
-  right: 46px;
-  height: 30px;
-  width: 30px;
-  z-index: 101;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  cursor: pointer;
-  border: 1px solid rgba(255, 255, 255, 0.5);"
+        class="changeTerrain"
         @click="changeTerrainLayer"
       >
         <div
@@ -334,17 +311,7 @@
       <!--      class="center CenDiv"-->
       <div
         @click="changeMenulayer"
-        style=" position: absolute;
-  bottom: 116px;
-  right: 46px;
-  height: 30px;
-  width: 30px;
-  z-index: 101;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  cursor: pointer;
-  border: 1px solid rgba(255, 255, 255, 0.5);"
+        class="changeLayer"
       >
         <div
           title="搴曞浘鍒囨崲"
@@ -355,17 +322,7 @@
 
       <div
         @click="changeMapType"
-        style="  position: absolute;
-  bottom: 52px;
-  right: 46px;
-  height: 30px;
-  width: 30px;
-  z-index: 101;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  cursor: pointer;
-  border: 1px solid rgba(255, 255, 255, 0.5);"
+        class="changeMapType"
       >
         <div
           title="2/3缁村垏鎹�"
@@ -689,72 +646,6 @@
 
         </div>
       </el-dialog>
-      <el-dialog
-        title="鐡︾墖涓嬭浇"
-        :append-to-body="false"
-        :visible.sync="downTitleFlag"
-        :close-on-click-modal="false"
-        :show-close="false"
-        width="30%"
-      >
-        <el-form
-          :model="ruleForm"
-          status-icon
-          :rules="rules"
-          ref="ruleForm"
-          label-width="100px"
-          class="demo-ruleForm"
-        >
-          <el-form-item
-            label="鍚嶇О"
-            prop="title"
-          >
-            <el-input
-              v-model="ruleForm.title"
-              size="small"
-              placeholder="璇疯緭鍏ユ暟鎹悕绉�..."
-            ></el-input>
-          </el-form-item>
-          <el-form-item
-            label="瀵嗙爜"
-            prop="pass"
-          >
-            <el-input
-              show-password
-              type="password"
-              v-model="ruleForm.pass"
-              autocomplete="off"
-              size="small"
-              placeholder="璇疯緭鍏ュ瘑鐮�..."
-            ></el-input>
-          </el-form-item>
-          <el-form-item
-            label="纭瀵嗙爜"
-            prop="checkPass"
-          >
-            <el-input
-              show-password
-              type="password"
-              v-model="ruleForm.checkPass"
-              autocomplete="off"
-              size="small"
-              placeholder="纭瀵嗙爜..."
-            ></el-input>
-          </el-form-item>
-
-          <el-form-item>
-            <el-button
-              type="primary"
-              size="small"
-              @click='submitTitleDown("ruleForm")'
-            >鎻愪氦</el-button>
-            <el-button
-              size="small"
-              @click='cannelTitleDown("ruleForm")'
-            >鍙栨秷</el-button>
-          </el-form-item>
-        </el-form>
-      </el-dialog>
       <!--      <div-->
       <!--        @click="changeMenulayer"-->
       <!--        class="center CenDiv"-->
@@ -768,11 +659,6 @@
 
     </div>
     <model-property ref='modelProperty'></model-property>
-    <iframe
-      id="downFrame"
-      src=""
-      style="display: none; border: 0; padding: 0; height: 0; width: 0"
-    ></iframe>
   </div>
 </template>
 
@@ -787,8 +673,7 @@
   comprehensive_selectRoute,
   dataLib_selectFiles, dataQuery_selectFields, dataQuery_selectDomains,
   dataQuery_selectByPage,
-  comprehensive_selectPubById, comprehensive_selectModelByGuid, decr,
-  encr, inquiry_downloadTiles, sign_getPublicKey
+  comprehensive_selectPubById, comprehensive_selectModelByGuid
 } from '../api/api'
 import { getToken } from '@/utils/auth'
 
@@ -816,35 +701,6 @@
             }
           }
         }
-        callback();
-      }
-    };
-    var checkAge = (rule, value, callback) => {
-      if (!value) {
-        return callback(new Error('鏁版嵁鍚嶇О涓嶈兘涓虹┖'));
-      }
-      callback();
-
-    };
-    var validatePass = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('璇疯緭鍏ュ瘑鐮�'));
-      } else {
-        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();
-      }
-    };
-    var validatePass2 = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�'));
-      } else if (value !== this.ruleForm.pass) {
-        callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!'));
-      } else {
         callback();
       }
     };
@@ -877,23 +733,14 @@
             message: "鍧愭爣鐐圭粡绾害閿欒,鍧愭爣搴斿湪[116.xxx, 39.yyy]鑼冨洿",
           },
         ],
-        pass: [
-          { validator: validatePass, trigger: 'blur' }
-        ],
-        checkPass: [
-          { validator: validatePass2, trigger: 'blur' }
-        ],
-        title: [
-          { validator: checkAge, trigger: 'blur' }
-        ]
       },
       bufFrom: {
         val: 50,
       },
       coordFrom: {
-        lon: "",
-        lat: "",
-        height: "",
+        lon: 116.3911,
+        lat: 39.9115,
+        height: 100000,
       },
       listData: {
         name: null,
@@ -939,15 +786,6 @@
       valueX: 0,
       valueY: 0,
       terrainflag: false,
-      downTitleFlag: false,
-      downTitleData: null,
-      ruleForm: {
-        pass: '',
-        checkPass: '',
-        title: ''
-      },
-      loadingText: '',
-      loading: false,
     };
   },
   mounted() {
@@ -974,85 +812,24 @@
     });
     //妯″瀷鎹曟崏
     this.catchmodel()
-    this.$bus.$on("titleDown", res => {
-      this.setDownLoadTitle(res);
-    })
+
     window.localStorage.setItem('slider_x', this.valueX);
     window.localStorage.setItem('slider_y', this.valueY);
     window.localStorage.setItem('slider_z', this.valueZ);
   },
   methods: {
-    setDownLoadTitle(res) {
-      this.signGetPublicKey()
-      this.downTitleFlag = true;
-      this.downTitleData = res;
 
-    },
-    async signGetPublicKey() {
-      const res = await sign_getPublicKey()
-      if (res && res.code == 200) {
-        window.encrypt = new JSEncrypt()
-        encrypt.setPublicKey(res.result)
-      }
-    },
-    submitTitleDown(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-
-          this.downTitleData.title = this.ruleForm.title
-          // this.downTitleData.pwd = encr(this.ruleForm.pass)
-          this.downTitleData.pwd = encrypt.encrypt(this.ruleForm.pass)
-          this.getDownLoadTile(this.downTitleData);
-          this.cannelTitleDown();
-        } else {
-
-          console.log('error submit!!');
-          return false;
-        }
-      });
-    },
-    async getDownLoadTile(res) {
-      this.loading = true;
-      this.loadingText = "鏁版嵁涓嬭浇涓�,璇风◢绛�..."
-      $.ajax({
-        url: BASE_URL + "/inquiry/downloadTiles?token=" + getToken(),
-        type: "POST",
-        data: JSON.stringify(res),
-        dataType: 'json', // html銆乯son銆乯sonp銆乻cript銆乼ext
-        contentType: "application/json", // "application/x-www-form-urlencoded"
-        success: (data) => {
-          var token = getToken()
-          var url = BASE_URL + "/dataLib/downloadFile?token=" + token + "&guid=" + data.result + "&pwd=" + res.pwd;
-          $("#downFrame").attr("src", url).click();
-          this.loading = false;
-          this.loadingText = ""
-        },
-        error: function (e) {
-        }
-      });
-    },
-    cannelTitleDown(formName) {
-      this.downTitleFlag = false;
-      // this.$refs[formName].resetFields();
-      this.ruleForm = {
-        pass: '',
-        checkPass: '',
-        title: ''
-      }
-    },
     catchmodel() {
       var that = this;
       window.pickedFeature;
       window.pickedColor;
       window.modeCatchHandler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas);
       window.modeCatchHandler.setInputAction((event) => {
-        if (window.pickedColor) {
-          window.pickedFeature && (window.pickedFeature.color = window.pickedColor);
-        }
+        window.pickedFeature && (window.pickedFeature.color = window.pickedColor);
         window.pickedFeature = sgworld.Viewer.scene.pick(event.position);
         if (Cesium.defined(window.pickedFeature)) {
           if (window.pickedFeature.primitive instanceof Cesium.Cesium3DTileset) {
-            if (window.pickedFeature && window.pickedFeature.getProperty) {
+            if (window.pickedFeature) {
               window.pickedColor = window.pickedFeature.color
               window.pickedFeature.color = Cesium.Color.RED.withAlpha(0.3);
 
@@ -1065,25 +842,32 @@
       }, Cesium.ScreenSpaceEventType.LEFT_CLICK)
     },
     async setModelInfoData(result) {
-      var modelKey = 'id'
-      if (result.tileset.pubid > 0) {
-        const data = await comprehensive_selectPubById({ id: result.tileset.pubid })
-        if (data.code != 200) {
-          return
+      var modelKey = 'id';
+      debugger
+      var modelid;
+      if (result.tileset) {
+        if (result.tileset.pubid > 0) {
+
+          const data = await comprehensive_selectPubById({ id: result.tileset.pubid })
+          if (data.code != 200) {
+            return
+          } else {
+            debugger
+            modelKey = JSON.parse(data.result.json).modelid
+          }
+          if (!modelKey) {
+            return this.$message('娌℃湁妯″瀷涓婚敭ID,鏃犳硶鏌ヨ鏁版嵁');
+          }
+          modelid = pickedFeature.getProperty(modelKey);
         }
-        if (!JSON.parse(data.result.json)) {
-          return this.$message('娌℃湁鏁版嵁,鏃犳硶鑾峰彇涓婚敭ID');
-        }
-        modelKey = JSON.parse(data.result.json).modelid
-        if (!modelKey) {
-          return this.$message('娌℃湁妯″瀷涓婚敭ID,鏃犳硶鏌ヨ鏁版嵁');
-        }
+      } else {
+        modelid = '3dml' + result.primitive.id;
       }
       var that = this
 
       var obj = {
         layerid: pickedFeature.primitive.layerId,
-        modelid: pickedFeature.getProperty(modelKey)
+        modelid: modelid
       }
 
       const data1 = await comprehensive_selectModelByGuid(obj);
@@ -1101,7 +885,7 @@
       }
 
       that.$store.state.catModelInfo = {
-        id: pickedFeature.getProperty(modelKey),
+        id: modelid,
         name: name,
         type: type,
         bak: bak,
@@ -1214,25 +998,24 @@
     changeTerrainLayer() {
       if (this.terrainflag) {
         Viewer.terrainProvider = new Cesium.EllipsoidTerrainProvider();
-        window.terrainDemLayer = null;
         var option = {
           url: window.sceneConfig.SGUrl,
           layerName: window.sceneConfig.mptName,
           requestVertexNormals: true,
         };
-        window.terrainMptLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, "");
+        window.terrainLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, "");
         Viewer.camera.flyTo({
           destination: Cesium.Cartesian3.fromDegrees(110, 33, 8000000),
         });
 
       } else {
-        window.terrainMptLayer.deleteObject();
-        window.terrainMptLayer = null;
+        window.terrainLayer.deleteObject();
+        window.terrainLayer = null;
 
-        window.terrainDemLayer = new Cesium.CesiumTerrainProvider({
+        window.terrainLayer = new Cesium.CesiumTerrainProvider({
           url: LFData + '/3d/terrain/dem20230321'
         });
-        Viewer.terrainProvider = window.terrainDemLayer
+        Viewer.terrainProvider = window.terrainLayer
         Viewer.camera.flyTo({
           destination: Cesium.Cartesian3.fromDegrees(113.229279, 31.215949, 1000),
           orientation: {
@@ -1410,9 +1193,10 @@
     },
     //瀹氫綅
     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) == NaN ? parseFloat(this.coordFrom.height) : 100;
+
       var position = {
         X: lon,
         Y: lat,
@@ -1985,7 +1769,7 @@
       z-index: 40;
       position: absolute;
       right: 8%;
-      bottom: 10%;
+      bottom: 1%;
     }
     .propertiesPop {
       width: 350px;
diff --git a/src/components/preview_map.vue b/src/components/preview_map.vue
index d1fe011..637c3c9 100644
--- a/src/components/preview_map.vue
+++ b/src/components/preview_map.vue
@@ -1,4 +1,3 @@
-
 <template>
   <div
     id="mapdiv"
@@ -66,11 +65,12 @@
             閲嶈浇
           </el-button>
           <el-button
-            v-if="modelForm.modelid == null"
+            v-if="modelForm.modelid == null && $store.state.previewLayer.type  != '3dml'"
             size="small"
             @click="getModeKeyId"
           >妯″瀷涓婚敭</el-button>
           <el-button
+            v-if="$store.state.previewLayer.type  != '3dml'"
             size="small"
             @click="resave"
           >淇濆瓨</el-button>
@@ -402,7 +402,7 @@
     <undergroundModel ref="undergroundModel" />
   </div>
 </template>
-
+ 
 <script>
 import {
   perms_selectLayers,
@@ -733,26 +733,31 @@
     async setShowModelInfo(result) {
       var modelKey = 'id';
 
-      if (result.tileset.pubid > 0) {
-        const data = await comprehensive_selectPubById({ id: result.tileset.pubid })
-        if (data.code != 200) {
-          return
-        } else {
-
-          modelKey = JSON.parse(data.result.json).modelid
+      if (result.tileset) {
+        if (result.tileSet.pubid > 0) {
+          const data = await comprehensive_selectPubById({ id: result.tileset.pubid })
+          if (data.code != 200) {
+            return
+          } else {
+            modelKey = JSON.parse(data.result.json).modelid
+          }
+          if (!modelKey) {
+            return this.$message('娌℃湁妯″瀷涓婚敭ID,鏃犳硶鏌ヨ鏁版嵁');
+          }
+          this.formInline.Id = result.getProperty(modelKey);
+          this.layerID = result.getProperty(modelKey);
         }
-        if (!modelKey) {
-          return this.$message('娌℃湁妯″瀷涓婚敭ID,鏃犳硶鏌ヨ鏁版嵁');
-        }
+      } else {
+        var id = '3dml' + result.primitive.id;
+        this.formInline.Id = id;
+        this.layerID = id;
       }
 
-
-
-      // this.formInline.title = result.getProperty("name")
-      this.formInline.Id = result.getProperty(modelKey);
-      this.layerID = result.getProperty(modelKey);
       this.formInline.layerId = result.primitive.layerId;
       this.formInline.layerName = result.primitive.id;
+
+      // this.formInline.title = result.getProperty("name")
+
       this.startModelData();
 
       this.dialogVisible = true;
@@ -766,16 +771,13 @@
       if (data.code != 200) {
         return;
       }
-
       if (data.result == null) {
         this.isShowModel = true;
         this.formInline.name = this.formInline.title;
       } else {
         this.isShowModel = false;
         this.formInline = data.result;
-
         this.formInline.title = this.formInline.name;
-
       }
     },
     setChangeTileset(result) {
@@ -798,7 +800,7 @@
       }
     },
     setAddLayers(res) {
-      if (res.serveType == "Tileset") {
+      if (res.serveType == "Tileset" || res.serveType == "3DML") {
         var url;
         if (res.url.indexOf("{host}") != -1) {
           url = res.url.replace("{host}", iisHost);
@@ -821,7 +823,7 @@
           tileset.id = res.cnName;
           tileset.layerId = res.id;
           tileset.pubid = res.pubid;
-          if (res.bak != '3dml') {
+          if (res.serveType != '3DML') {
             that.getArgsTileset(tileset, res);
           }
 
@@ -838,8 +840,12 @@
 
         } else {
 
+          if (res.serveType != '3DML') {
+            this.tileSet(tileset, parseFloat(res.elev))
+          } else {
+            this.reloadTile(tileset, data.result.json)
+          }
 
-          this.tileSet(tileset, parseFloat(res.elev))
 
         }
       } else {
@@ -1114,7 +1120,7 @@
     setTilesetArgs(f) {
 
       if (!this.app.tileset || this.app.isBusy) return;
-      debugger
+
       var pos = Cesium.Cartesian3.fromDegrees(parseFloat(f.lon), parseFloat(f.lat), parseFloat(f.height));
 
       var converter = Cesium.Transforms.eastNorthUpToFixedFrame;
@@ -1259,6 +1265,9 @@
           if (str.url != null && str.type == 2 && str.serveType == 'Tileset') {
             val.push(str);
           }
+          if (str.url != null && str.type == 2 && str.serveType == '3DML') {
+            val.push(str);
+          }
         });
 
         var res = this.setTreeData(val);
@@ -1320,7 +1329,7 @@
 
 }
 </script>
-
+ 
 <style lang="less" scoped>
 .previewBox {
   width: 100%;
@@ -1355,4 +1364,4 @@
     visibility: hidden;
   }
 }
-</style>
\ No newline at end of file
+</style>
diff --git a/src/store/index.js b/src/store/index.js
index 934fde3..0fd9f4b 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -77,8 +77,12 @@
     setAlphaList: [],
     isProjectLayer: [],
     pigCode: null,
+    listenTime: null,
   },
   mutations: {
+    UPDATE_LISTEN_TIME(state, msg) {
+      state.listenTime = msg;
+    },
     //鑾峰彇鏉冮檺鍚堥泦
     getPermsEntity(state, msg) {
       state.permsEntity = msg;
diff --git a/src/utils/request.js b/src/utils/request.js
index 49094c0..006a095 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -40,15 +40,19 @@
   }
 ); service.interceptors.response.use(
   (response) => {
-    if (window.localStorage.getItem("LFToken") != null) {
-      var expire = JSON.parse(window.localStorage.getItem("LFToken")).expire;
-      var timeire = new Date().getTime();
-      if (timeire >= expire) {
+    // if (window.localStorage.getItem("LFToken") != null) {
+    //   var expire = JSON.parse(window.localStorage.getItem("LFToken")).expire;
+    //   var timeire = new Date().getTime();
+    //   console.log(timeire, expire)
+    //   if (timeire >= expire) {
 
-        router.push('/login')
-        localStorage.removeItem("LFToken");
-      }
-    }
+    //     router.push('/login')
+    //     localStorage.removeItem("LFToken");
+    //   }
+    // }
+
+
+    store.commit("UPDATE_LISTEN_TIME", response.data.time);
 
     store.commit("UPDATE_API_COUNT", "sub");
     //console.log(response) 
diff --git a/src/utils/service.js b/src/utils/service.js
index 93ca1de..7dc89b5 100644
--- a/src/utils/service.js
+++ b/src/utils/service.js
@@ -40,16 +40,16 @@
   }
 ); service.interceptors.response.use(
   (response) => {
-    if (window.localStorage.getItem("LFToken") != null) {
-      var expire = JSON.parse(window.localStorage.getItem("LFToken")).expire;
-      var timeire = new Date().getTime();
-      if (timeire >= expire) {
+    // if (window.localStorage.getItem("LFToken") != null) {
+    //   var expire = JSON.parse(window.localStorage.getItem("LFToken")).expire;
+    //  
+    //   if (timeire >= expire) {
 
-        router.push('/login')
-        localStorage.removeItem("LFToken");
-      }
-    }
-
+    //     router.push('/login')
+    //     localStorage.removeItem("LFToken");
+    //   }
+    // }
+    store.commit("UPDATE_LISTEN_TIME", response.data.time);
     store.commit("UPDATE_API_COUNT", "sub");
     //console.log(response) 
     //杩斿洖鍥犳湁ResponeType===Blob ,鍒嗗紑澶勭悊
diff --git a/src/views/Home.vue b/src/views/Home.vue
index 743eb01..4e3b93f 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -28,6 +28,7 @@
     };
   },
   methods: {},
+
 };
 </script>
  
diff --git a/src/views/Tools/LayerTree.vue b/src/views/Tools/LayerTree.vue
index 085b369..5006a68 100644
--- a/src/views/Tools/LayerTree.vue
+++ b/src/views/Tools/LayerTree.vue
@@ -115,7 +115,7 @@
       <div
         class="edit"
         @click="pellucidity()"
-        v-if="showopaque"
+        v-if="showlocal"
       >
         <i class="el-icon-tickets"></i>&nbsp;&nbsp;閫忔槑搴�
       </div>
@@ -125,14 +125,6 @@
         v-show="shwoHistogram"
       >
         <i class="el-icon-tickets"></i>&nbsp;&nbsp;閽诲瓟鏌辩姸鍥�
-      </div>
-      <div
-        class="edit"
-        v-show="shwoTitle"
-        @click="tileDownload()"
-      >
-        <i class="el-icon-download"></i>&nbsp;&nbsp;鐡︾墖涓嬭浇
-
       </div>
       <!-- <div
         class="edit"
@@ -228,7 +220,6 @@
   perms_selectLayers, inquiry_selectDomains, comprehensive_selectPubById,
   project_selectDirAll, project_selectByDirid, dataQuerySelectWktById
 } from "../../api/api.js";
-import { conditions } from '../Archive/Archive.js';
 export default {
   name: "tree",
   components: { queryinfo },
@@ -236,7 +227,6 @@
     return {
       shwoHistogram: false,
       showlocal: false,
-      showopaque: false,
       eleId: "",
       isShow: false,
       currentData: "",
@@ -280,47 +270,10 @@
       mptLayer: [],
       optionts: [],
       proValue: null,
-      setCheeckedLayer: [],
-      shwoTitle: false,
     };
   },
   methods: {
-    //鐡︾墖涓嬭浇
-    tileDownload() {
-      var that = this;
-      this.menuVisible = false
-      sgworld.Creator.createSimpleGraphic(
-        "rectangle",
-        {},
-        function (entity) {
-          that.getTileRectangle(entity);
-          sgworld.Creator.SimpleGraphic.clear()
 
-        }
-      );
-    },
-    getTileRectangle(res) {
-      var value = res.rectangle.coordinates.getValue();
-      var val = {
-        pubid: this.currentData.pubid,
-        pwd: "",
-        title: "",
-        xmax: Cesium.Math.toDegrees(
-          value.east
-        ),
-        xmin: Cesium.Math.toDegrees(
-          value.west
-        ),
-        ymax: Cesium.Math.toDegrees(
-          value.north
-        ),
-        ymin: Cesium.Math.toDegrees(
-          value.south
-        )
-      }
-      this.$bus.$emit("titleDown", val)
-
-    },
     //杞瓟鏌辩姸鍥�
     async histogram() {
       this.menuVisible = false
@@ -370,14 +323,10 @@
       this.currentNode = Node;
 
       this.$store.state.propertiesName = this.currentData;
-      this.showModelAttach = false;
-      this.shwoTitle = false;
-
-
-      if (this.currentData.serveType == 'TMS') {
-        this.shwoTitle = true
-      } else if (this.currentData.serveType == "Tileset") {
+      if (this.currentData.serveType == "Tileset" || this.currentData.serveType == "3DML") {
         this.showModelAttach = true;
+      } else {
+        this.showModelAttach = false;
       }
       if (this.currentData.enName == "s_explorationpoint") {
         this.shwoHistogram = true;
@@ -390,18 +339,10 @@
       } else {
         this.firstLevel = true;
       }
-      if (Node.data.children == null && Node.data.serveType == "Tileset") {
+      if (Node.data.children == null && Node.data.serveType == "Tileset" || Node.data.serveType == "3DML") {
         this.showlocal = true;
-        this.showopaque = true;
-      } else if (Node.data.children == null && Node.data.serveType == "TMS") {
-        this.showlocal = true;
-        this.showopaque = false;
-      } else if (Node.data.children == null && Node.data.serveType != "Tileset") {
+      } else if (Node.data.children == null && Node.data.serveType != "Tileset" || Node.data.serveType == "3DML") {
         this.showlocal = false;
-        this.showopaque = false;
-      } else if (Node.data.children == null && Node.data.serveType != "DEM") {
-        this.showlocal = false;
-        this.showopaque = false;
       }
       this.menuVisible = true;
 
@@ -543,27 +484,15 @@
 
 
     //妯″瀷瀹氫綅
-    async positioning() {
+    positioning() {
       this.menuVisible = false
-
-      if (this.currentData.serveType == 'Tileset') {
-        for (var i in Viewer.scene.primitives._primitives) {
-          if (
-            Viewer.scene.primitives._primitives[i].id == this.currentData.cnName
-          ) {
-            Viewer.flyTo(Viewer.scene.primitives._primitives[i]);
-          }
-        }
-      } else if (this.currentData.serveType == 'TMS' && this.currentData.pubid) {
-        const data = await comprehensive_selectPubById({ id: this.currentData.pubid })
-        if (data.result.geom) {
-          var wkt = this.$wkt.parse(data.result.geom);
-          Viewer.camera.flyTo({
-            destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], 2000),
-          });
+      for (var i in Viewer.scene.primitives._primitives) {
+        if (
+          Viewer.scene.primitives._primitives[i].id == this.currentData.cnName
+        ) {
+          Viewer.flyTo(Viewer.scene.primitives._primitives[i]);
         }
       }
-
     },
     // 缂栬緫鑺傜偣
     editNode(data) {
@@ -637,7 +566,6 @@
       console.log("tree drop: ", dropNode.label, dropType);
     },
     handleCheckChange(data, checked, indeterminate) {
-
       if (data.type == 1) {
         this.childOption = [];
         this.getchilds(data);
@@ -646,7 +574,6 @@
         var listTileset = [];
         var listTMS = [];
         var listMpt = [];
-        var listDem = [];
         for (var i in this.childOption) {
           switch (this.childOption[i].serveType) {
             case 'WMS':
@@ -654,6 +581,9 @@
               break;
             case 'WFS':
               listWFS.push(this.childOption[i])
+              break;
+            case '3DML':
+              listTileset.push(this.childOption[i])
               break;
             case 'Tileset':
               listTileset.push(this.childOption[i])
@@ -664,9 +594,6 @@
             case 'TMS':
               listTMS.push(this.childOption[i])
               break;
-            case 'DEM':
-              listDem.push(this.childOption[i])
-              break;
           }
         }
         this.setChangeWMS(listWMS, checked);
@@ -674,57 +601,84 @@
         this.setChangeTileset(listTileset, checked);
         this.setChangeTMS(listTMS, checked);
         this.setChangeMpt(listMpt, checked);
-        this.setChangeDem(listDem, checked);
       } else if (data.type == 2) {
         if (data.serveType == "WMS") {
           this.setChangeWMS([data], checked);
-        } else if (data.serveType == "Tileset") {
+        } else if (data.serveType == "Tileset" || data.serveType == "3DML") {
           this.setChangeTileset([data], checked);
         } else if (data.serveType == "TMS") {
           this.setChangeTMS([data], checked);
         } else if (data.serveType == "Mpt") {
           this.setChangeMpt([data], checked);
-        } else if (data.serveType == "DEM") {
-          this.setChangeDem([data], checked);
         }
       }
+      // if (data.type != 2) return;
+
+
+
+
+      // if (data.serveType == "WFS") {
+      //   if (window.Viewer.dataSources._dataSources.length == 0) {
+      //     this.setAddLayers(data);
+      //   } else {
+
+      //   }
+      // } else if (data.serveType == "Tileset") {
+
+      //   if (Viewer.scene.primitives._primitives.length == 0) {
+      //     this.setAddLayers(data);
+      //   } else {
+      //     var std = [];
+      //     for (var i in Viewer.scene.primitives._primitives) {
+      //       Viewer.scene.primitives._primitives[i].show = checked;
+      //       if (Viewer.scene.primitives._primitives[i].id == data.cnName) {
+      //         std.push(data.id);
+      //         Viewer.flyTo(Viewer.scene.primitives._primitives[i]);
+      //       }
+      //     }
+      //   }
+      //   if (std.length == 0 && checked == true) {
+      //     this.setAddLayers(data);
+      //   } else {
+      //     window.map.getLayers().getArray().forEach(item => {
+      //       if (item.get("name") == data.cnName) {
+      //         item.setVisible(checked);
+
+      //       }
+      //     });
+      //   }
+      // } else if (data.serveType == "TMS") {
+
+      //   if (data.pubid) {
+
+      //   } else {
+      //     var res;
+      //     if (data.url.indexOf("{host}") != -1) {
+      //       res = data.url.replace("{host}", iisHost);
+      //     } else {
+      //       res = data.url
+      //     }
+      //     var url = res.split(';')
+
+      //     window.sgworld.Creator.createImageryProvider('mpt褰卞儚', "wms", {
+      //       url: url[0],
+      //       layers: url[1]
+      //     }, "0", undefined, true, "");
+      //   }
+
+      // }
+
+
+
+
+      // var layers_ol = window.map.getAllLayers();
+      // for (var i in layers_ol) {
+      //   var layerOl = layers_ol[i];
+      //   if (layerOl.values_.name == data.label) {
+      //     layerOl.setVisible(checked); //鏄剧ず鍥惧眰
+      //   }
+      // }
     },
-    setChangeDem(data, checked) {
-      if (data.length <= 0) return
-      this.cannelTerrainLayer();
-      var val = this.$refs.tree.getCheckedKeys();
-      var std = [];
-      for (var i = 0; i < val.length; i++) {
-        var res = this.$refs.tree.getNode(val[i]).data;
-        if (res.serveType && res.serveType != 'DEM') {
-          std.push(val[i])
-        }
-      }
-      debugger
-      var result = data[0]
-      if (this.$refs.tree.getNode(result.id).checked) {
-
-        std.push(result.id);
-        var base_ulr = result.url;
-        if (base_ulr.indexOf('{host}') > -1) {
-          base_ulr = base_ulr.replace("{host}", iisHost)
-        }
-
-        this.setTerrainDemLayer(base_ulr);
-      } else {
-        this.setTerrainMptLayer();
-      }
-      this.$refs.tree.setCheckedKeys(std)
-      // 
-      // this.$nextTick(() => {
-      //  
-      // });
-
-      // setTimeout(() => {
-      //   
-      // }, 500);
-    },
-
     setChangeWMS(result, checked) {
       var value = this.$refs.tree.getCheckedNodes();
       this.$bus.$emit("showMenuLayer", value);
@@ -780,6 +734,20 @@
           }
         }
       }
+
+
+
+      // if (checked.checkedKeys) {
+      //   for (var i in result) {
+      //
+      //   }
+      // } else {
+
+      //   for (var j in result) {
+      //     console.log(result[j])
+      //     //
+      //   }
+      // }
     },
     setChangeMpt(result, checked) {
       var value = this.$refs.tree.getCheckedNodes();
@@ -918,7 +886,7 @@
           }),
         });
         window.map.addLayer(vectorLayer);
-      } else if (res.serveType == "Tileset") {
+      } else if (res.serveType == "Tileset" || res.serveType == "3DML") {
         var url;
         if (res.url.indexOf("{host}") != -1) {
           url = res.url.replace("{host}", iisHost);
@@ -938,37 +906,35 @@
         );
 
         tileset.readyPromise.then((tileset) => {
-
-
           tileset.id = res.cnName;
           tileset.layerId = res.id;
           tileset.pubid = res.pubid;
-          // Cesium.Matrix4.equals(a,b)鍒ゆ柇涓や釜鍥涚淮鐭╅樀鏄惁鐩哥瓑
-          // 鏁翠釜鏍硅妭鐐规ā鍨嬬煩闃碉紝璇ileSet=>涓栫晫鍧愭爣绯�
-          // 鍗曚綅鐭╅樀锛屽瑙掔嚎鍊间负1.0鐨�4*4鐭╅樀
-          if (!Cesium.Matrix4.equals(tileset.root.transform, Cesium.Matrix4.IDENTITY)) {
-            // 鑾峰彇妯″瀷鐨勪笘鐣屽潗鏍�(绗涘崱灏�)
-            // Cesium.Matrix4.getTranslation 閫氳繃浠垮皠鍙樻崲鐭╅樀鑾峰彇璇ileSet鐨勪笘鐣屽潗鏍�
-            const transformCenter = Cesium.Matrix4.getTranslation(
-              tileset.root.transform,
-              new Cesium.Cartesian3()
-            );
-            // 灏嗙瑳鍗″皵鍧愭爣杞崲涓篧GS84缁忕含搴﹀潗鏍囷紙妯″瀷鐨勶級
-            const transformCartographic = Cesium.Cartographic.fromCartesian(
-              transformCenter
-            );
-            // 灏嗙瑳鍗″皵鍧愭爣杞崲涓篧GS84缁忕含搴﹀潗鏍囷紙鎴潰鐨勶級
-            const boundingSphereCartographic = Cesium.Cartographic.fromCartesian(
-              tileset.boundingSphere.center
-            );
-            const height = boundingSphereCartographic.height - transformCartographic.height;
-            // 浠庝竴涓狢artesian3瀵硅薄鐢熸垚Matrix4鍙樻崲鐭╅樀锛堣鍒囬潰鐨勶級
-            window.modelHeight = height;
-          } else window.modelHeight = 0;
-          this.getTilesetArgs(tileset, res);
+          if (res.serveType != '3DML') {
 
-
-
+            // Cesium.Matrix4.equals(a,b)鍒ゆ柇涓や釜鍥涚淮鐭╅樀鏄惁鐩哥瓑
+            // 鏁翠釜鏍硅妭鐐规ā鍨嬬煩闃碉紝璇ileSet=>涓栫晫鍧愭爣绯�
+            // 鍗曚綅鐭╅樀锛屽瑙掔嚎鍊间负1.0鐨�4*4鐭╅樀
+            if (!Cesium.Matrix4.equals(tileset.root.transform, Cesium.Matrix4.IDENTITY)) {
+              // 鑾峰彇妯″瀷鐨勪笘鐣屽潗鏍�(绗涘崱灏�)
+              // Cesium.Matrix4.getTranslation 閫氳繃浠垮皠鍙樻崲鐭╅樀鑾峰彇璇ileSet鐨勪笘鐣屽潗鏍�
+              const transformCenter = Cesium.Matrix4.getTranslation(
+                tileset.root.transform,
+                new Cesium.Cartesian3()
+              );
+              // 灏嗙瑳鍗″皵鍧愭爣杞崲涓篧GS84缁忕含搴﹀潗鏍囷紙妯″瀷鐨勶級
+              const transformCartographic = Cesium.Cartographic.fromCartesian(
+                transformCenter
+              );
+              // 灏嗙瑳鍗″皵鍧愭爣杞崲涓篧GS84缁忕含搴﹀潗鏍囷紙鎴潰鐨勶級
+              const boundingSphereCartographic = Cesium.Cartographic.fromCartesian(
+                tileset.boundingSphere.center
+              );
+              const height = boundingSphereCartographic.height - transformCartographic.height;
+              // 浠庝竴涓狢artesian3瀵硅薄鐢熸垚Matrix4鍙樻崲鐭╅樀锛堣鍒囬潰鐨勶級
+              window.modelHeight = height;
+            } else window.modelHeight = 0;
+            this.getTilesetArgs(tileset, res);
+          }
         });
         this.$store.state.setAlphaList.push({
           name: res.cnName,
@@ -992,7 +958,6 @@
             })
           );
           layer.name = res.cnName;
-          layer.id = "TMS"
           this.setChangeWMS();
         }
 
@@ -1020,11 +985,12 @@
         if (data.code != 200) {
 
         } else {
-          if (res.bak != '3dml') {
+          if (res.serveType != '3DML') {
             this.reload(tileset, data.result.json)
           } else {
             this.tileSet(tileset, parseFloat(res.elev))
           }
+
         }
       } else {
         this.tileSet(tileset, parseFloat(res.elev))
@@ -1068,12 +1034,12 @@
 
         layer.name = res.cnName;
 
-        // if (data.result.geom) {
-        //   var wkt = this.$wkt.parse(data.result.geom);
-        //   Viewer.camera.flyTo({
-        //     destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], 2000),
-        //   });
-        // }
+        if (data.result.geom) {
+          var wkt = this.$wkt.parse(data.result.geom);
+          Viewer.camera.flyTo({
+            destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], 2000),
+          });
+        }
         this.setChangeWMS();
       }
     },
@@ -1104,15 +1070,7 @@
       let cloneData = JSON.parse(JSON.stringify(source)); // 瀵规簮鏁版嵁娣卞害鍏嬮殕
       return cloneData.filter((father) => {
         // 寰幆鎵�鏈夐」
-        let branchArr = cloneData.filter((child) => father.id == child.pid);
-        if (branchArr.length > 0) {
-
-          branchArr.sort(function (a, b) {
-
-            return a.orderNum - b.orderNum
-          })
-        }
-
+        let branchArr = cloneData.filter((child) => father.id == child.pid); // 瀵规瘮ID锛屽垎鍒笂涓嬬骇鑿滃崟锛屽苟杩斿洖鏁版嵁
         branchArr.length > 0 ? (father.children = branchArr) : ""; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊�
         // 灞炰簬鍚屼竴瀵硅薄闂锛屼緥濡傦細浠� a=b銆乧=1 锛岀劧鍚庡啀浠� b.c=c 锛� 閭d箞 a.c=b.c=c=1 锛涘悓鐞嗭紝鍚庣画浠� c.d=2 ,閭d箞 a.c.d 涔熸槸=2锛�
         // 鐢辨寰幆澶氭鍚庯紝灏辫兘褰㈡垚鐩稿簲鐨勬爲褰㈡暟鎹粨鏋�
@@ -1217,51 +1175,23 @@
       }
       this.$refs.tree.setCheckedKeys(std);
     },
-    getNewTree(obj, result) {
-      for (const i in obj) {
-
-        result.push(obj[i])
-        if (obj[i].children && obj[i].children.length > 0) {
-          this.getNewTree(obj[i].children, result)
-        }
-      }
-      return result
-    },
-
-
-
     // 鏌ヨ
     filterNode(value, data) {
+
       if (!value) return true;
       return data.cnName.indexOf(value) !== -1;
     },
 
     async setproChange(res) {
+
+      this.$store.state.pigCode = res;
       if (res) {
-        this.setCheeckedLayer = this.$refs.tree.getCheckedKeys();
-
-        this.$store.state.pigCode = res;
-        var st_code = this.optionts.filter(rs => {
-          if (rs.code == res) {
-            return rs
-          }
-        })
-
-        var val = this.$store.state.oldTree.filter(rs => {
-          if (rs.enName == st_code[0].code) {
-            return rs
-          }
-          if (rs.enName && rs.enName.indexOf(st_code[0].code) > -1) {
-            return rs
-          }
-        })
-
-        this.removeAllLayer();
         var obj = {
           dirid: res,
           pageIndex: 1,
           pageSize: 10,
         }
+
         const data = await project_selectByDirid(obj);
         if (data.code != 200) {
           this.$message.error("鍒楄〃鑾峰彇澶辫触");
@@ -1269,154 +1199,21 @@
         }
         if (data.result[0]) {
           var geom = data.result[0].geom
-          if (geom) {
-            var wkt = this.$wkt.parse(geom)
-            Viewer.camera.flyTo({
-              destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[0].toFixed(6), wkt.coordinates[1].toFixed(6), 5000),
-            });
-          }
+          var wkt = this.$wkt.parse(geom)
+          Viewer.camera.flyTo({
+            destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[0].toFixed(6), wkt.coordinates[1].toFixed(6), 5000),
+          });
+
         }
-        this.cannelTerrainLayer();
-        this.setTerrainMptLayer();
-        //娓呯┖鍥惧眰鏍戦�変腑鐘舵��
-        this.$refs.tree.setCheckedKeys([]);
-        if (val.length > 0) {
-          var std_check = [];
-          for (var i in val) {
-            if (val[i].type == 1 && val[i].isProject == 1) {//椤圭洰鍒嗙被
-              var std_val = this.getNewTree([this.$refs.tree.getNode(val[i].id).data], [])
-              for (var j in std_val) {
-                std_check.push(std_val[j])
-              }
-            }
-          }
-          var value = this.$store.state.isProjectLayer;
-          for (var i in value) {
-            std_check.push(value[i])
-          }
-
-
-          this.setProjectLayer(std_check);
-        } else {
-          this.setChangeProLayer();
-        }
-
-
+        this.setChangeProLayer();
       } else {
-        this.removeAllLayer();
-        this.$store.state.pigCode = null;
-        this.$refs.tree.setCheckedKeys(this.setCheeckedLayer);
-        var std = [];
-        for (var i in this.setCheeckedLayer) {
-          std.push(this.$refs.tree.getNode(this.setCheeckedLayer[i]).data)
-        }
 
-        this.setProjectLayer(std);
+        this.$store.state.pigCode = null
+        this.setChangeWMS();
       }
     },
-    cannelTerrainLayer() {
-      //娓呯┖鍦板舰
-      if (window.terrainMptLayer) {
-        window.terrainMptLayer.deleteObject();
-        window.terrainMptLayer = null;
-      }
-      if (window.terrainDemLayer) {
-        Viewer.terrainProvider = new Cesium.EllipsoidTerrainProvider();
-        window.terrainDemLayer = null;
-      }
-    },
-    setTerrainMptLayer() {
-      //榛樿鍦板舰MPT
-      var option = {
-        url: window.sceneConfig.SGUrl,
-        layerName: window.sceneConfig.mptName,
-        requestVertexNormals: true,
-      };
-      window.terrainMptLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, "");
-    },
-    setTerrainDemLayer(res) {
-
-      window.terrainDemLayer = new Cesium.CesiumTerrainProvider({
-        url: res
-      });
-      Viewer.terrainProvider = window.terrainDemLayer
-    },
-    setProjectLayer(res) {
-      var layerid = [];
-      for (var i in res) {
-        layerid.push(res[i].id)
-      }
-
-      this.$refs.tree.setCheckedKeys(layerid);
-      // var value = this.$refs.tree.getCheckedNodes();
-      // this.$bus.$emit("showMenuLayer", value);
-
-      var listWMS = [];
-      var listWFS = [];
-      var listTileset = [];
-      var listTMS = [];
-      var listMpt = [];
-      var listDem = [];
-      for (var i in res) {
-        if (res[i].type == 2) {
-          switch (res[i].serveType) {
-            case 'WMS':
-              listWMS.push(res[i])
-              break;
-            case 'WFS':
-              listWFS.push(res[i])
-              break;
-            case 'Tileset':
-              listTileset.push(res[i])
-              break;
-            case 'Mpt':
-              listMpt.push(res[i])
-              break;
-            case 'TMS':
-              listTMS.push(res[i])
-              break;
-            case 'DEM':
-              listDem.push(this.childOption[i])
-              break;
-          }
-        }
-      }
-      // this.setChangeDem(listDem, true);
-      this.setChangeWMS(listWMS, true);
-      this.setChangeWFS(listWFS, true);
-      this.setChangeTileset(listTileset, true);
-      this.setChangeTMS(listTMS, true);
-      this.setChangeMpt(listMpt, true);
-    },
-    removeAllLayer() {
-      for (var j in Viewer.scene.primitives._primitives) {
-        Viewer.scene.primitives.remove(Viewer.scene.primitives._primitives[j])
-      }
-      for (var i in window.Viewer.dataSources._dataSources) {
-        window.Viewer.dataSources.remove(
-          window.Viewer.dataSources._dataSources[i]
-        );
-      }
-      for (var i = 0; i < window.Viewer.imageryLayers._layers.length; i++) {
-        var val_id = window.Viewer.imageryLayers._layers[i].id;
-        if (val_id == 'TMS') {
-          window.Viewer.imageryLayers.remove(
-            window.Viewer.imageryLayers._layers[i]
-          );
-        }
-      }
-      for (var i in this.mptLayer) {
-        this.mptLayer[i].deleteObject();
-        this.mptLayer.splice(i, 1)
-      }
-      this.mptLayer = [];
-    },
-
-
     setChangeProLayer() {
-
       var value = this.$store.state.isProjectLayer;
-
       if (value.length != 0) {
 
         var std = [];
@@ -1447,17 +1244,13 @@
     this.getMenuProject()
     this.$bus.$on("treeDataCopy", (res) => {
       this.$store.state.treeData = this.treeData;
-      if (this.$refs.tree.getCheckedKeys().length > 0) {
-        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;
-
     } else {
-
       this.treeData = this.$store.state.treeData;
       this.$refs.tree.setCheckedKeys(this.$store.state.checkedKeys);
     }
diff --git a/src/views/Tools/maplayer.vue b/src/views/Tools/maplayer.vue
index 1da7dd5..476580e 100644
--- a/src/views/Tools/maplayer.vue
+++ b/src/views/Tools/maplayer.vue
@@ -54,7 +54,7 @@
           const disX = e.clientX;
           const w = dragDom.clientWidth;
           const minW = 300;
-          const maxW = 500;
+          const maxW = 1000;
           const disY = e.clientY;
           const h = dragDom.clientHeight;
           const minH = 300;
diff --git a/src/views/datamanage/uploadmanage.vue b/src/views/datamanage/uploadmanage.vue
index 29bd7b6..0c8703d 100644
--- a/src/views/datamanage/uploadmanage.vue
+++ b/src/views/datamanage/uploadmanage.vue
@@ -477,7 +477,10 @@
               ></el-option>
             </el-select>
           </el-form-item>
-          <el-form-item :label="$t('dataManage.vmobj.minLevel')">
+          <el-form-item
+            v-show="formInline.type !='DEM'"
+            :label="$t('dataManage.vmobj.minLevel')"
+          >
             <!-- <el-input
               v-model="insertLayer.min"
               :placeholder="$t('dataManage.vmobj.labe11')"
@@ -496,7 +499,10 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item :label="$t('dataManage.vmobj.maxLevel')">
+          <el-form-item
+            :label="$t('dataManage.vmobj.maxLevel')"
+            v-show="formInline.type !='DEM'"
+          >
             <!-- <el-input
               v-model="insertLayer.max"
               :placeholder="$t('dataManage.vmobj.labe12')"
@@ -666,9 +672,14 @@
     },
     //鍙戝竷鎻愪氦
     async setinsertLayerSubmit() {
+
       var min = this.insertLayer.min;
       var max = this.insertLayer.max;
       var name = this.insertLayer.name;
+      if (this.formInline.type == 'DEM') {
+        min = 0;
+        max = 18;
+      }
       if (!name) {
         this.$message.error("鍚嶇О涓嶈兘涓虹┖")
         return
@@ -889,13 +900,13 @@
     //鍒嗛〉鍒囨崲
     handleCurrentChange(val) {
       this.listData.pageIndex = val;
-      this.getTableData();
+      this.getTableData_one();
     },
     //姣忛〉鏄剧ず鏁伴噺
     handleSizeChange(val) {
       this.listData.pageSize = val;
       this.listData.pageIndex = 1;
-      this.getTableData();
+      this.getTableData_one();
     },
     //tabs鍒囨彌
     setTabsChange(res) {
@@ -996,9 +1007,13 @@
     },
     //鑾峰彇Table琛ㄦ牸鏁版嵁
     async getTableData() {
-      this.tableData = [];
+
       this.listData.count = 0;
       this.listData.pageIndex = 1;
+      this.getTableData_one();
+    },
+    async getTableData_one() {
+      this.tableData = [];
       if (this.active == "first") {
 
         this.listData.depcode = this.formInline.depid;

--
Gitblit v1.9.3