diff --git a/build/base.js b/build/base.js
index b03cf8e..cc76614 100644
--- a/build/base.js
+++ b/build/base.js
@@ -5,7 +5,7 @@ const CompressPlugin = require('compress-webpack-plugin')
const { getDllPlugins } = require('./utils')
const httpType = 'http://'
-const proxyUrl = 'yw.iaserver.online:60006/' // 代理地址设置
+const proxyUrl = '101.89.218.38:60006/' // 代理地址设置
exports.getCommonConifg = function ({ devServer, ...other }) {
return {
transpileDependencies: ['@cmp/cmp-core'],
diff --git a/webs/ams-web/src/views/module/relation-module/Tree.vue b/webs/ams-web/src/views/module/relation-module/Tree.vue
index 1d68340..1941097 100644
--- a/webs/ams-web/src/views/module/relation-module/Tree.vue
+++ b/webs/ams-web/src/views/module/relation-module/Tree.vue
@@ -20,12 +20,15 @@
import { reactive, toRefs, ref, watch, onMounted } from 'vue'
import { useStore } from '@cmp/cmp-core'
import { getModuleGroupRoot, getModuleGroupChildren } from 'services/cmdb/module'
+import usePosition from '@/views/usePosition'
export default {
setup(props, { emit, root }) {
+ const { selectPostion } = usePosition()
const state = reactive({})
const store = useStore()
function bindEvent() {
+ if (selectPostion.value) return
const doms = document.querySelectorAll('.drag-item')
doms.forEach((item) => {
// item.setAttribute('draggable', 'true')
diff --git a/webs/ams-web/src/views/module/relation-module/index.vue b/webs/ams-web/src/views/module/relation-module/index.vue
index c167d1b..376cf2a 100644
--- a/webs/ams-web/src/views/module/relation-module/index.vue
+++ b/webs/ams-web/src/views/module/relation-module/index.vue
@@ -4,7 +4,7 @@
-
+
@@ -50,6 +50,7 @@ import { createNode, mouseNode } from '../utils/topogy'
import { getRelationCategories, getModuleRelationDetail, getModuleTopo, getModuleDetail } from 'services/cmdb/module'
import GraphTool from '../graph/graphTool.vue'
import TreeMenu from './Tree.vue'
+import { getSelectPosition } from '@/views/usePosition'
export default {
components: {
@@ -114,6 +115,7 @@ export default {
dialogFormVisible: false,
},
dragId: '',
+ selectPostion: getSelectPosition(),
}
},
computed: {
@@ -450,6 +452,7 @@ export default {
})
// 右侧菜单点击
that.graph.on('node:contextmenu', (evt) => {
+ if (this.selectPostion) return
if (!this.edge && !this.addingEdge) {
evt.preventDefault()
evt.stopPropagation()
@@ -521,6 +524,7 @@ export default {
})
// 节点左键点击连接
that.graph.on('node:click', (evt) => {
+ if (this.selectPostion) return
evt.preventDefault()
evt.stopPropagation()
const nodeId = evt.item.getModel().id
@@ -550,6 +554,7 @@ export default {
})
// 边左击编辑
that.graph.on('edge:click', async (evt) => {
+ if (this.selectPostion) return
evt.preventDefault()
evt.stopPropagation()
const nodeModel = evt.item.getModel(),
@@ -583,6 +588,7 @@ export default {
},
// 拓扑图操作
handleTopology(type) {
+ if (this.selectPostion) return
switch (type) {
case 'add':
this.topologyDialog.id = ''
diff --git a/webs/ams-web/src/views/usePosition.ts b/webs/ams-web/src/views/usePosition.ts
index a06a78f..90e515a 100644
--- a/webs/ams-web/src/views/usePosition.ts
+++ b/webs/ams-web/src/views/usePosition.ts
@@ -20,7 +20,9 @@ const usePostion = (cb?: Function) => {
selectPostion,
}
}
+// 用于单独获取
export const getSelectPosition = () => {
return window.sessionStorage.getItem('selectPostion')
}
+// 用于单独获取自带响应式的值
export default usePostion