Browse Source

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

maxiaoxiao 9 months ago
parent
commit
e3e7b62da6

+ 2 - 2
src/api/map.js

@@ -1,11 +1,11 @@
 import request from '@/utils/request'
 
 // 收藏
-export function Collect(username, bsm) {
+export function Collect(bsm) {
     return request({
         url: '/apply/yzt/zyml/Collect',
         method: 'post',
-        data: { username: username, bsm: bsm }
+        data: {  bsm: bsm }
     })
 }
 

+ 27 - 25
src/components/Combinations/LayerManage/LayerManageSplit.vue

@@ -9,22 +9,23 @@
         <div class="zyml" :class="$props.splitId >= 0 ? `zymlsplit` : ''">
           <div class="searchDiv">
             <el-input :placeholder="Resource.InputPlaceholder" prefix-icon="el-icon-search" v-model="treeSearchText"
-            size="small">
-          </el-input>
-          <div
-            class="eicon"
-            :class="isshowNum ? 'eyes' : 'close_eyes'"
-            @click="isshowNum = !isshowNum"
-          ></div>
+              size="small">
+            </el-input>
+            <div class="eicon" :class="isshowNum ? 'eyes' : 'close_eyes'" @click="isshowNum = !isshowNum"></div>
           </div>
           <div class="treeDiv">
-            <el-tree @check="handleCheckChange" class="filter-tree" :data="TreeDatas" show-checkbox :props="defaultProps"
-              :filter-node-method="filterNode" :default-checked-keys="checkedKeys" node-key="id" ref="tree">
+            <el-tree @check="handleCheckChange" class="filter-tree" :data="TreeDatas" show-checkbox
+              :props="defaultProps" :filter-node-method="filterNode" :default-checked-keys="checkedKeys" node-key="id"
+              ref="tree">
               <span class="custom-tree-node" slot-scope="{ node, data }">
-                <span>{{ !isshowNum && !data.url && node.label ? node.label.replace(/\[.*$/, '') : node.label }}</span>
+                <span>{{
+                  !isshowNum && !data.url && node.label
+                    ? node.label.replace(/\[.*$/, "")
+                    : node.label
+                }}</span>
                 <span>
-                  <Icon :type="!data.favorite ? 'ios-star-outline' : 'ios-star'" color="green" size="18" class="opBtn"
-                    :title="data.favorite ? Resource.DelCollect : Resource.AddCollect
+                  <Icon :type="!data.favorite ? 'ios-star-outline' : 'ios-star'" color="green" size="18"
+                    class="ivu-icon" :title="data.favorite ? Resource.DelCollect : Resource.AddCollect
                       " @click="favoriteHandle(data)" v-if="data.url != ''" />
                 </span>
               </span>
@@ -47,12 +48,14 @@
                   </template>
                 </i-switch>
                 <Icon type="md-arrow-round-up" color="green" size="18" class="opBtn" :title="Resource.MoveUpOneLevel"
-                  @click="raise(item)" v-if="index > 0 && (item.type == 'Vector' || item.type == 'IMG')
-                    " />
-                <Icon type="md-arrow-round-down" color="green" size="18" class="opBtn" :title="Resource.MoveDownOneLevel"
-                  @click="lower(item)" v-if="index < addlayerdata.length - 1 &&
+                  @click="raise(item)" v-if="
+                    index > 0 && (item.type == 'Vector' || item.type == 'IMG')
+                  " />
+                <Icon type="md-arrow-round-down" color="green" size="18" class="opBtn"
+                  :title="Resource.MoveDownOneLevel" @click="lower(item)" v-if="
+                    index < addlayerdata.length - 1 &&
                     (item.type == 'Vector' || item.type == 'IMG')
-                    " />
+                  " />
                 <Icon type="md-locate" color="green" size="18" class="opBtn" :title="Resource.location"
                   @click="location(item)" />
               </div>
@@ -155,19 +158,18 @@ export default {
       return data.label.indexOf(value) >= 0 && addjudge;
     },
     favoriteHandle(data) {
-      // this.$emit("favoriteHandle", data);
       if (data.favorite) {
-        data.favorite = null;
+        data.favorite = false;
         for (let i = 0; i < this.favoriteLayerList.length; i++) {
           if (this.favoriteLayerList[i].id == data.id) {
             this.favoriteLayerList.splice(i, 1);
           }
         }
       } else {
-        data.favorite = this.username;
+        data.favorite = true;
         this.favoriteLayerList.push(data);
       }
-      Collect(this.username, data.id).then((res) => {
+      Collect(data.id).then((res) => {
         if (res.statuscode == 200) {
           this.$message({
             message: "操作成功",
@@ -216,7 +218,7 @@ export default {
 
       // 递归遍历子节点
       if (node.children) {
-        node.children.forEach(child => {
+        node.children.forEach((child) => {
           this.setDisabledIfChildrenExist(child);
         });
       }
@@ -226,7 +228,7 @@ export default {
       GetResourceTree().then((res) => {
         if (res.statuscode == 200) {
           // 从根节点开始递归
-          res.data.forEach(rootNode => {
+          res.data.forEach((rootNode) => {
             this.setDisabledIfChildrenExist(rootNode);
           });
           this.TreeDatas = res.data;
@@ -289,14 +291,14 @@ export default {
 
 <style lang="scss" scoped>
 @import "./LayerManage.scss";
+
 .searchDiv {
   display: flex;
   justify-content: space-between;
   margin-right: 10px;
+
   .el-input {
     width: calc(100% - 30px);
   }
 }
-
-
 </style>

+ 1 - 1
static/Config/config.js

@@ -1,7 +1,7 @@
 //后台地址配置
 window.axiosURI = "http://192.168.60.2:8080";
 window.ZTaxiosURI = "http://localhost:9300";
-window.aiURI = "http://192.168.60.6:4000";
+window.aiURI = "http://192.168.60.2:4000";
 //倾斜模型高度配置
 window.modelBottomAltitude = 0;
 // 服务器ip