|
|
@@ -1,28 +1,33 @@
|
|
|
<template>
|
|
|
<div class="fullBox white pa-3 relative" ref="boxRef">
|
|
|
- <div ref="graphRef" v-loading="loading" class="fullBox"></div>
|
|
|
- <div class="btnBox pa-1">
|
|
|
- <!-- <el-upload class="el-button pa-0" action="#" :show-file-list="false" :http-request="onImport">
|
|
|
- <m-button type="orange" icon="el-icon-upload2" size="small" :loading="importLoading">导入</m-button>
|
|
|
- </el-upload> -->
|
|
|
- <m-button type="orange" icon="el-icon-download" size="small" :loading="exportLoading" @click="onExport">导出</m-button>
|
|
|
- <!-- <m-button type="orange" icon="el-icon-download" size="small" :loading="downloadLoading" @click="onDownload">模板下载</m-button> -->
|
|
|
- <m-button type="orange" icon="el-icon-plus" size="small" @click="onAdd">新增机构</m-button>
|
|
|
- </div>
|
|
|
- <div ref="contextMenuRefs" class="contextMenu">
|
|
|
- <el-card shadow="always" :body-style="{padding: 0}">
|
|
|
- <div
|
|
|
- v-for="menu in menus"
|
|
|
- :key="menu.prop"
|
|
|
- class="contextMenuItem pa-3"
|
|
|
- @click="onMenuClick(menu.prop)"
|
|
|
- >
|
|
|
- {{ menu.label }}
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
- <OrganizationEdit ref="organizationEditRefs" @refresh="onRefresh"></OrganizationEdit>
|
|
|
- <OrganizationAdd ref="organizationAddRefs" @refresh="onRefresh"></OrganizationAdd>
|
|
|
+ <!-- <div v-if="isIE">
|
|
|
+ IE浏览器暂不支持浏览,请前往其他浏览器获取更好体验
|
|
|
+ </div> -->
|
|
|
+ <!-- <template v-else> -->
|
|
|
+ <div ref="graphRef" v-loading="loading" class="fullBox"></div>
|
|
|
+ <div class="btnBox pa-1">
|
|
|
+ <!-- <el-upload class="el-button pa-0" action="#" :show-file-list="false" :http-request="onImport">
|
|
|
+ <m-button type="orange" icon="el-icon-upload2" size="small" :loading="importLoading">导入</m-button>
|
|
|
+ </el-upload> -->
|
|
|
+ <m-button type="orange" icon="el-icon-download" size="small" :loading="exportLoading" @click="onExport">导出</m-button>
|
|
|
+ <!-- <m-button type="orange" icon="el-icon-download" size="small" :loading="downloadLoading" @click="onDownload">模板下载</m-button> -->
|
|
|
+ <m-button type="orange" icon="el-icon-plus" size="small" @click="onAdd">新增机构</m-button>
|
|
|
+ </div>
|
|
|
+ <div ref="contextMenuRefs" class="contextMenu">
|
|
|
+ <el-card shadow="always" :body-style="{padding: 0}">
|
|
|
+ <div
|
|
|
+ v-for="menu in menus"
|
|
|
+ :key="menu.prop"
|
|
|
+ class="contextMenuItem pa-3"
|
|
|
+ @click="onMenuClick(menu.prop)"
|
|
|
+ >
|
|
|
+ {{ menu.label }}
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ <OrganizationEdit ref="organizationEditRefs" @refresh="onRefresh"></OrganizationEdit>
|
|
|
+ <OrganizationAdd ref="organizationAddRefs" @refresh="onRefresh"></OrganizationAdd>
|
|
|
+ <!-- </template> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -33,6 +38,9 @@ import {
|
|
|
CollapseExpandTree,
|
|
|
MindMapNode
|
|
|
} from '@/utils/antvG6'
|
|
|
+import {
|
|
|
+ isIE
|
|
|
+} from '@/utils'
|
|
|
import {
|
|
|
Graph,
|
|
|
register,
|
|
|
@@ -85,6 +93,7 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ isIE: isIE(),
|
|
|
menus: [
|
|
|
{ label: '编辑', prop: 'edit' },
|
|
|
{ label: '删除', prop: 'delete' }
|
|
|
@@ -101,6 +110,9 @@ export default {
|
|
|
...mapGetters(['organizationTree'])
|
|
|
},
|
|
|
async mounted () {
|
|
|
+ // if (isIE()) {
|
|
|
+ // return
|
|
|
+ // }
|
|
|
register(ExtensionCategory.BEHAVIOR, 'collapse-expand-tree', CollapseExpandTree)
|
|
|
register(ExtensionCategory.NODE, 'MindMapNode', MindMapNode)
|
|
|
const graphData = await this.onInit()
|
|
|
@@ -112,6 +124,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
beforeDestroy () {
|
|
|
+ // if (isIE()) {
|
|
|
+ // return
|
|
|
+ // }
|
|
|
if (this.graph) {
|
|
|
this.graph.off()
|
|
|
}
|
|
|
@@ -373,6 +388,7 @@ export default {
|
|
|
width: 200px;
|
|
|
}
|
|
|
.fullBox {
|
|
|
+ display: -ms-grid; /* IE10/11 */
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
box-sizing: border-box;
|