shs před 1 rokem
rodič
revize
5eed45ebb1

binární
aidex-framework/target/classes/com/aidex/framework/config/SecurityConfig.class


+ 0 - 3
aidex-ui/package.json

@@ -24,11 +24,8 @@
     "mockjs2": "1.0.8",
     "moment": "^2.24.0",
     "nprogress": "^0.2.0",
-<<<<<<< HEAD
     "qmap": "^0.2.3",
-=======
     "qqmap": "^1.0.1",
->>>>>>> 34c6333943d0cc560d6accd15c07990996522dd6
     "sortablejs": "^1.10.2",
     "store": "^2.0.12",
     "v-viewer": "^1.5.1",

+ 38 - 24
aidex-ui/src/views/operation/location/index.vue

@@ -4,7 +4,6 @@
       <a-page-header style="border-bottom: 1px solid rgb(235, 237, 240); padding: 8px 16px" title="" />
       <split splitHeight="100%" leftWidth="220">
         <template slot="paneL">
-          <!-- 部门树 -->
           <ship-tree
             ref="shipTree"
             :shipOptions="shipOptions"
@@ -12,9 +11,9 @@
           />
         </template>
         <template slot="paneR">
-          <!-- 条件搜索 -->
           <div class="table-page-search-wrapper">
             <h2>{{ selShipData.shipNanme }}-实时位置</h2>
+            位置数据: {{ batchLocation }}
           </div>
           <a-divider />
 
@@ -83,30 +82,45 @@ export default {
         mapTypeId: qq.maps.MapTypeId.ROADMAP // 设置地图样式详情参见MapType
       }
       // 获取dom元素添加地图信息
-      var mapDD = new qq.maps.Map(document.getElementById('mapLocation'), myOptions)
+      this.map = new qq.maps.Map(document.getElementById('mapLocation'), myOptions)
 
-      qq.maps.MarkerCluster({
-        map: mapDD,
-        geometries: [
-          // 点标记数据数组
-          {
-            position: new qq.maps.LatLng(39.953416, 116.480945),
-            properties: {
-                assetName: 'dsadsad',
-                assetClassification: 'dddd',
-                userDepartment: '2222'
-            }
-          },
-          {
-            position: new qq.maps.LatLng(39.984104, 116.407503),
-            properties: {
-                assetName: '2222',
-                assetClassification: '3232',
-                userDepartment: 'ssas'
-            }
-          }
-        ]
+      var marker = new qq.maps.Marker({
+          position: new qq.maps.LatLng(39.953416, 116.480945),
+          map: this.map
       })
+      console.log(marker)
+
+      // var marker = new qq.maps.MarkerCluster({
+      //   map: this.map,
+      //   styles: {
+      //       'marker': qq.maps.MarkerStyle({
+      //           'width': 25,
+      //           'height': 35,
+      //           'anchor': { x: 16, y: 32 },
+      //           'src': 'https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/markerDefault.png'
+      //       })
+      //   },
+      //   geometries: [
+      //     // 点标记数据数组
+      //     {
+      //       position: new qq.maps.LatLng(39.953416, 116.480945),
+      //       properties: {
+      //           title: 'dsadsad',
+      //           assetClassification: 'dddd',
+      //           userDepartment: '2222'
+      //       }
+      //     },
+      //     {
+      //       position: new qq.maps.LatLng(39.984104, 116.407503),
+      //       properties: {
+      //         title: '2222',
+      //           assetClassification: '3232',
+      //           userDepartment: 'ssas'
+      //       }
+      //     }
+      //   ]
+      // })
+      // console.log(marker)
     },
     /** 查询部门下拉树结构 */
     getTreeselect() {

+ 152 - 152
aidex-ui/src/views/operation/location/modules/ShipTree.vue

@@ -1,152 +1,152 @@
-<!--<template>-->
-<!--  <div>-->
-<!--    &lt;!&ndash; <a-input-search style="margin-bottom: 8px" placeholder="输入名称回车查询" @search="filterNode" /> &ndash;&gt;-->
-<!--    <a-tree-->
-<!--      v-if="shipOptions.length > 0"-->
-<!--      :tree-data="shipOptions"-->
-<!--      :replaceFields="replaceFields"-->
-<!--      :default-expanded-keys="expandedKeys"-->
-<!--      :expanded-keys="expandedKeys"-->
-<!--      :auto-expand-parent="autoExpandParent"-->
-<!--      showIcon-->
-<!--      @select="handleNodeClick"-->
-<!--      @expand="onExpand"-->
-<!--    >-->
-<!--    </a-tree></div>-->
-<!--</template>-->
-<!--<script>-->
-<!--  import allIcon from '@/core/icons'-->
-<!--const getParentKey = (id, tree) => {-->
-<!--  let parentKey-->
-<!--  for (let i = 0; i < tree.length; i++) {-->
-<!--    const node = tree[i]-->
-<!--    if (node.children) {-->
-<!--      if (node.children.some(item => item.id === id)) {-->
-<!--        parentKey = node.id-->
-<!--      } else if (getParentKey(id, node.children)) {-->
-<!--        parentKey = getParentKey(id, node.children)-->
-<!--      }-->
-<!--    }-->
-<!--  }-->
-<!--  return parentKey-->
-<!--}-->
-<!--export default {-->
-<!--  name: 'ShipTree',-->
-<!--  props: {-->
-<!--    shipOptions: {-->
-<!--          type: Array,-->
-<!--          required: true-->
-<!--        },-->
-<!--    defalutExpandedKeys: {-->
-<!--          type: Array-->
-<!--        }-->
-<!--  },-->
-<!--  components: {-->
-<!--    allIcon-->
-<!--  },-->
-<!--  data () {-->
-<!--    return {-->
-<!--      expandedKeys: this.defalutExpandedKeys,-->
-<!--      oldShipOptions: [], // 记录查询前数据结构-->
-<!--      oldExpandedKeys: [],-->
-<!--      allIcon,-->
-<!--      replaceFields: { children: 'children', key: 'id', title: 'shipNanme' },-->
-<!--      shipNodes: [],-->
-<!--      searchValue: '',-->
-<!--      autoExpandParent: true-->
-<!--    }-->
-<!--  },-->
-<!--  filters: {-->
-<!--  },-->
-<!--  created () {-->
-<!--  },-->
-<!--  computed: {-->
-<!--  },-->
-<!--  watch: {-->
-<!--  },-->
-<!--  methods: {-->
-<!--    getAllShipNode (nodes) {-->
-<!--      if (!nodes || nodes.length === 0) {-->
-<!--        return []-->
-<!--      }-->
-<!--      nodes.forEach(node => {-->
-<!--        this.shipNodes.push({ id: node.id, label: node.label })-->
-<!--        return this.getAllShipNode(node.children)-->
-<!--      })-->
-<!--    },-->
-<!--    getExpandedKeys (nodes) {-->
-<!--     if (!nodes || nodes.length === 0) {-->
-<!--       return []-->
-<!--     }-->
-<!--        // 最后一层不展开-->
-<!--        nodes.forEach(node => {-->
-<!--        this.shipNodes.push(node.id)-->
-<!--        return this.getExpandedKeys(node.children)-->
-<!--        })-->
-<!--    },-->
-<!--    // 筛选节点-->
-<!--    filterNode (value, e) {-->
-<!--      if (this.oldShipOptions.length === 0) {-->
-<!--       this.oldShipOptions = this.shipOptions-->
-<!--       this.oldExpandedKeys = this.expandedKeys-->
-<!--      }-->
-<!--      if (value.trim() === '') {-->
-<!--        // 触发父页面设置树数据-->
-<!--          this.$emit('setDataOptionInfo', this.oldShipOptions)-->
-<!--          Object.assign(this, {-->
-<!--            expandedKeys: this.oldExpandedKeys,-->
-<!--            searchValue: value,-->
-<!--            autoExpandParent: true-->
-<!--          })-->
-<!--     } else {-->
-<!--      //  const searchInfo = { shipName: value }-->
-<!--      //  searchShip(searchInfo).then(response => {-->
-<!--      //    // 触发父页面设置树数据-->
-<!--      //     this.$emit('setDataOptionInfo', response.data)-->
-<!--      //     // this.searchTree(value, response.data)-->
-<!--      //     this.getExpandedKeys(response.data)-->
-<!--      //    Object.assign(this, {-->
-<!--      //      expandedKeys: this.shipNodes,-->
-<!--      //      searchValue: value,-->
-<!--      //      autoExpandParent: true-->
-<!--      //    })-->
-<!--      //    this.shipNodes = []-->
-<!--      //  })-->
-<!--     }-->
-<!--    },-->
-<!--    // 节点单击事件,-->
-<!--    handleNodeClick (keys, event) {-->
-<!--      this.$emit('select', event.node)-->
-<!--    },-->
-<!--    onExpand (expandedKeys) {-->
-<!--      this.expandedKeys = expandedKeys-->
-<!--      this.autoExpandParent = false-->
-<!--    },-->
-<!--    searchTree (value, options) {-->
-<!--      this.getAllShipNode(options)-->
-<!--      console.log('shipNodes', this.shipNodes)-->
-<!--      const gData = options-->
-<!--      const expandedKeys = this.shipNodes-->
-<!--        .map(item => {-->
-<!--          if (item.label.indexOf(value) > -1) {-->
-<!--            return getParentKey(item.id, gData)-->
-<!--          }-->
-<!--          return null-->
-<!--        })-->
-<!--        .filter((item, i, self) => item && self.indexOf(item) === i)-->
-<!--      Object.assign(this, {-->
-<!--        expandedKeys: expandedKeys,-->
-<!--        searchValue: value,-->
-<!--        autoExpandParent: true-->
-<!--      })-->
-<!--      this.shipNodes = []-->
-<!--    }-->
-<!--  }-->
-<!--}-->
-<!--</script>-->
-<!--<style lang="less">-->
-<!--  .depIcon {-->
-<!--    color: #2f54eb;-->
-<!--     font-size: 20px;-->
-<!--  }-->
-<!--</style>-->
+<template>
+  <div>
+    <!-- <a-input-search style="margin-bottom: 8px" placeholder="输入名称回车查询" @search="filterNode" /> -->
+    <a-tree
+      v-if="shipOptions.length > 0"
+      :tree-data="shipOptions"
+      :replaceFields="replaceFields"
+      :default-expanded-keys="expandedKeys"
+      :expanded-keys="expandedKeys"
+      :auto-expand-parent="autoExpandParent"
+      showIcon
+      @select="handleNodeClick"
+      @expand="onExpand"
+    >
+    </a-tree></div>
+</template>
+<script>
+  import allIcon from '@/core/icons'
+const getParentKey = (id, tree) => {
+  let parentKey
+  for (let i = 0; i < tree.length; i++) {
+    const node = tree[i]
+    if (node.children) {
+      if (node.children.some(item => item.id === id)) {
+        parentKey = node.id
+      } else if (getParentKey(id, node.children)) {
+        parentKey = getParentKey(id, node.children)
+      }
+    }
+  }
+  return parentKey
+}
+export default {
+  name: 'ShipTree',
+  props: {
+    shipOptions: {
+          type: Array,
+          required: true
+        },
+    defalutExpandedKeys: {
+          type: Array
+        }
+  },
+  components: {
+    allIcon
+  },
+  data () {
+    return {
+      expandedKeys: this.defalutExpandedKeys,
+      oldShipOptions: [], // 记录查询前数据结构
+      oldExpandedKeys: [],
+      allIcon,
+      replaceFields: { children: 'children', key: 'id', title: 'shipNanme' },
+      shipNodes: [],
+      searchValue: '',
+      autoExpandParent: true
+    }
+  },
+  filters: {
+  },
+  created () {
+  },
+  computed: {
+  },
+  watch: {
+  },
+  methods: {
+    getAllShipNode (nodes) {
+      if (!nodes || nodes.length === 0) {
+        return []
+      }
+      nodes.forEach(node => {
+        this.shipNodes.push({ id: node.id, label: node.label })
+        return this.getAllShipNode(node.children)
+      })
+    },
+    getExpandedKeys (nodes) {
+     if (!nodes || nodes.length === 0) {
+       return []
+     }
+        // 最后一层不展开
+        nodes.forEach(node => {
+        this.shipNodes.push(node.id)
+        return this.getExpandedKeys(node.children)
+        })
+    },
+    // 筛选节点
+    filterNode (value, e) {
+      if (this.oldShipOptions.length === 0) {
+       this.oldShipOptions = this.shipOptions
+       this.oldExpandedKeys = this.expandedKeys
+      }
+      if (value.trim() === '') {
+        // 触发父页面设置树数据
+          this.$emit('setDataOptionInfo', this.oldShipOptions)
+          Object.assign(this, {
+            expandedKeys: this.oldExpandedKeys,
+            searchValue: value,
+            autoExpandParent: true
+          })
+     } else {
+      //  const searchInfo = { shipName: value }
+      //  searchShip(searchInfo).then(response => {
+      //    // 触发父页面设置树数据
+      //     this.$emit('setDataOptionInfo', response.data)
+      //     // this.searchTree(value, response.data)
+      //     this.getExpandedKeys(response.data)
+      //    Object.assign(this, {
+      //      expandedKeys: this.shipNodes,
+      //      searchValue: value,
+      //      autoExpandParent: true
+      //    })
+      //    this.shipNodes = []
+      //  })
+     }
+    },
+    // 节点单击事件,
+    handleNodeClick (keys, event) {
+      this.$emit('select', event.node)
+    },
+    onExpand (expandedKeys) {
+      this.expandedKeys = expandedKeys
+      this.autoExpandParent = false
+    },
+    searchTree (value, options) {
+      this.getAllShipNode(options)
+      console.log('shipNodes', this.shipNodes)
+      const gData = options
+      const expandedKeys = this.shipNodes
+        .map(item => {
+          if (item.label.indexOf(value) > -1) {
+            return getParentKey(item.id, gData)
+          }
+          return null
+        })
+        .filter((item, i, self) => item && self.indexOf(item) === i)
+      Object.assign(this, {
+        expandedKeys: expandedKeys,
+        searchValue: value,
+        autoExpandParent: true
+      })
+      this.shipNodes = []
+    }
+  }
+}
+</script>
+<style lang="less">
+  .depIcon {
+    color: #2f54eb;
+     font-size: 20px;
+  }
+</style>