|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
- <div style="background:#f1f2f3;" id="full" :style="contentStyle">
|
|
|
- <img style="width: 25px; height: 25px;float: right" v-if="!fullscreen" @click="enterFullscreen" src="@/assets/icons/amplify.svg" title="全屏">
|
|
|
- <img style="width: 25px; height: 25px;float: right" @click="backFullscreen" v-if="fullscreen" src="@/assets/icons/reduce.svg" title="还原">
|
|
|
- <div id="container">
|
|
|
+ <div style="background:#f1f2f3;overflow: auto;" id="full" :style="divStyle">
|
|
|
+ <img style="width: 25px; height: 25px;float: left" v-if="!fullscreen" @click="enterFullscreen" src="@/assets/icons/amplify.svg" title="全屏">
|
|
|
+ <img style="width: 25px; height: 25px;float: left" @click="backFullscreen" v-if="fullscreen" src="@/assets/icons/reduce.svg" title="还原">
|
|
|
+ <div id="container" :style="contentStyle">
|
|
|
</div>
|
|
|
<el-drawer
|
|
|
:visible.sync="drawer"
|
|
@@ -12,9 +12,10 @@
|
|
|
<p style="padding: 10px 0px 0px 10px">{{title}}</p>
|
|
|
<!-- <el-divider></el-divider>-->
|
|
|
<contractInfo v-if="title == '合同列表'" :data="tableData"></contractInfo>
|
|
|
- <projectInfo v-if="title == '项目列表'" :data="tableData"></projectInfo>
|
|
|
+ <projectInfo v-if="title == '项目列表'" :data="tableData" :isList="isList"></projectInfo>
|
|
|
<orderInfo v-if="title == '订单列表'" :data="tableData"></orderInfo>
|
|
|
<serviceInfo v-if="title == '服务列表'" :data="tableData"></serviceInfo>
|
|
|
+ <contactsInfo v-if="title == '联系人列表'" :data="tableData"></contactsInfo>
|
|
|
</el-drawer>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -25,6 +26,7 @@ import contractInfo from "@/components/mindmap/modules/contractInfo";
|
|
|
import projectInfo from "@/components/mindmap/modules/projectInfo";
|
|
|
import orderInfo from "@/components/mindmap/modules/orderInfo";
|
|
|
import serviceInfo from "@/components/mindmap/modules/serviceInfo";
|
|
|
+import contactsInfo from "@/components/mindmap/modules/contactsInfo";
|
|
|
import G6 from '@antv/g6';
|
|
|
let graph;
|
|
|
|
|
@@ -377,7 +379,7 @@ G6.registerNode('card-node', {
|
|
|
setState: nodeBasicMethod.setState,
|
|
|
});
|
|
|
export default {
|
|
|
- props:['id','contentStyle'],
|
|
|
+ props:['id','contentStyle','show','divStyle','isList'],
|
|
|
data () {
|
|
|
return {
|
|
|
fullscreen:false,
|
|
@@ -386,19 +388,24 @@ export default {
|
|
|
tableData: []
|
|
|
}
|
|
|
},
|
|
|
- components:{detailsInfo,contractInfo,projectInfo,orderInfo,serviceInfo},
|
|
|
+ components:{detailsInfo,contractInfo,projectInfo,orderInfo,serviceInfo,contactsInfo},
|
|
|
mounted () {
|
|
|
// this.getData()
|
|
|
+ if (this.show === '1'){
|
|
|
+ this.getData()
|
|
|
+ }
|
|
|
+
|
|
|
document.addEventListener('fullscreenchange', this.handleFullscreenChange);
|
|
|
document.addEventListener('mozfullscreenchange', this.handleFullscreenChange);
|
|
|
document.addEventListener('webkitfullscreenchange', this.handleFullscreenChange);
|
|
|
document.addEventListener('MSFullscreenChange',this.handleFullscreenChange)
|
|
|
+ console.log(this.id,'00000')
|
|
|
},
|
|
|
methods:{
|
|
|
createMenu (array) {
|
|
|
var that = this
|
|
|
let arr = []
|
|
|
- const HASLINKS = ['项目','合同','服务工单数','订单','服务']
|
|
|
+ const HASLINKS = ['项目','合同','服务工单数','订单','服务','联系人']
|
|
|
function convertToElementTree(node) {
|
|
|
// 新节点
|
|
|
var elNode = {
|
|
@@ -427,10 +434,9 @@ export default {
|
|
|
});
|
|
|
return arr
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
async getData () {
|
|
|
var that = this
|
|
|
- console.log(this.id,'8888')
|
|
|
const res = await this.$api.requested({
|
|
|
"id": 20230620143204,
|
|
|
"content": {
|
|
@@ -439,6 +445,7 @@ export default {
|
|
|
})
|
|
|
// this.data = this.createMenu([res.data.data])
|
|
|
const container = document.getElementById('container');
|
|
|
+ console.log(container,'container')
|
|
|
const width = container.scrollWidth;
|
|
|
const height = container.scrollHeight -50 || 500;
|
|
|
const contextMenu = new G6.Menu({
|
|
@@ -510,17 +517,18 @@ export default {
|
|
|
this.tableData = item._cfg.model.data
|
|
|
console.log(this.tableData,'表格订单')
|
|
|
this.title = item._cfg.model.label + '列表'
|
|
|
- if (item._cfg.model.label == '合同' || item._cfg.model.label == '项目' || item._cfg.model.label == '订单' || item._cfg.model.label == '服务'){
|
|
|
+ if (item._cfg.model.label == '合同' || item._cfg.model.label == '项目' || item._cfg.model.label == '订单' || item._cfg.model.label == '服务' || item._cfg.model.label == '联系人'){
|
|
|
this.drawer = true
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
if (typeof window !== 'undefined')
|
|
|
window.onresize = () => {
|
|
|
if (!graph || graph.get('destroyed')) return;
|
|
|
if (!container || !container.scrollWidth || !container.scrollHeight) return;
|
|
|
graph.changeSize(container.scrollWidth, container.scrollHeight);
|
|
|
};
|
|
|
+
|
|
|
if (this.$route.query.portrait === 'ht'){
|
|
|
res.data.children.forEach(item=>{
|
|
|
if (item.name === '合同'){
|