1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<template>
<div>
<title-bar title="集团及经济依存信息" @clickLef="onClick">
<van-icon slot="left" name="cross" size="24" />
</title-bar>
<van-tabs class="guarTabCls" :active="active" @click="checkMod">
<van-tab title="集团母公司">
<div id="mgs" class="d-flex align-items-center justify-content-center echarts-container-class" v-show="active == 0">
<img v-if="!errorFlag" src="../../../../assets/images/nodata.png" class="no-data-class"/>
</div>
</van-tab>
<van-tab title="集团关系">
<div class="d-flex align-items-center justify-content-center echarts-container-class">
<tree-graph-cmp :data="treeData" :format="formatLabel" v-if="active == '2'"></tree-graph-cmp>
<img v-if="!relationFlag" src="../../../../assets/images/nodata.png" class="no-data-class"/>
</div>
</van-tab>
</van-tabs>
</div>
</template>
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import TitleBar from "@/components/general/TitleBar.vue";
import TreeGraphCmp from '@/components/general/TreeGraphCmp.vue';
import { NativeUI } from "@/public/ts/NativeUI";
import nettyApi from "@/constants/api/ms-netty/netty.api";
import Public from "@/public/ts/Public";
/**
* @Description 集团及经济依存信息
* @Author JiangTao
* @Date 2021-11-10 下午 03:15
*/
@Component({
name: "FroupAndEconomicDependenceInformation",
components: {
TitleBar,
TreeGraphCmp
},
})
export default class FroupAndEconomicDependenceInformation extends Vue {
pageTitle = ""; // 页面标题
treeData:any = {};
array:any = {
name: this.$store.getters.getCusInfo.cus_name,
children: []
};
active = 0;
companyArray:any[] = [];
linksArray:any = [];
chartFlag = true;
momCompany = "";
creditcodes = "";
arrayMember:any = {
name: '',
children: []
};
arrayKGZRR:any = {
name: '',
children: []
};
zrPeople = '';
errorFlag = true;
relationFlag = true;
onClick() {
this.$router.back();
}
mounted() {
this.pageTitle = this.$route.meta?.name;
this.active = 0;
this.checkMod();
this.getInfo();
}
formatLabel() {}
/**
* @description: 切换
* @author LiShenghui
* @date 2022/2/18 20:28
*/
checkMod() {
if (this.active == 0) {
this.getInfo();
} else if (this.active == 1) {
this.getInfoMember();
}
}
/**
*
* description:查询集团成员
* ahthor:pd
* 2021年12月13日21:01:38
*/
getInfoMember() {
const parms = {
tc: nettyApi.TRADE_CODE.selectInfoMember,
creditcode: this.creditcodes, //this.$store.getters.getCusInfo.cert_code, //this.$store.getters.getCusInfo.cert_code, //'91510100725399362W','915101002021494601''91110108779517897G'
entid: '',
regno: '',
entname: this.momCompany, //this.$store.getters.getCusInfo.cus_name, //this.$store.getters.getCusInfo.cus_name, //'四川飞森房地产开发有限公司','蓝光投资控股集团有限公司''北京金山奇剑数码科技有限公司'
ProdId: Public.getProdId(),
SvrCode: Public.getSvrCode(nettyApi.TRADE_CODE.selectInfoMember),
ClientNo: this.$store.getters.getCusInfo.cus_id,
pageIndex: '1'
};
NativeUI.showWaiting('正在查询');
return this.$IF.transferDataInter(nettyApi.commonRq, parms).then((res:any) => {
NativeUI.closeWaiting();
if (res.rc == '1') {
this.arrayMember.name = this.momCompany;
if (res.final_out_control && res.final_out_control != '') {
for (let obj of res.final_out_control) {
for (let index in obj.path2.nodes) {
if (obj.path2.nodes[index].innode == true) {
this.zrPeople = obj.path2.nodes[index].name;
// if (index == 0) {
// console.log(this.momCompany);
// this.arrayMember.name = obj.path2.nodes[1].name;
// } else if (index == 1) {
// console.log(this.momCompany);
// this.arrayMember.name = obj.path2.nodes[0].name;
// }
}
}
}
this.arrayKGZRR.name = '最终控股自然人' + this.zrPeople;
let objkg:any = {
name: '控股企业' + '(' + res.final_out_control.length + ')',
children: []
};
for (let index in res.final_out_control) {
if (parseInt(index) < 5) {
let objname:any = {};
objname.name = res.final_out_control[index].entname;
objkg.children.push(objname);
}
}
this.arrayKGZRR.children.push(objkg);
if (res.final_out_legal && res.final_out_legal != '') {
let objFA:any = {
name: '担任法人企业' + '(' + res.final_out_legal.length + ')',
children: []
};
for (let indexs in res.final_out_legal) {
let objcom:any = {};
if (parseInt(indexs) < 5) {
objcom.name = res.final_out_legal[indexs].entname;
objFA.children.push(objcom);
}
}
this.arrayKGZRR.children.push(objFA);
}
this.arrayMember.children.push(this.arrayKGZRR);
}
if (res.parent_and_staff_control && res.parent_and_staff_control != '') {
let objgg:any = {
name: '母公司及其高管共同控制企业' + '(' + res.parent_and_staff_control.length + ')',
children: []
};
for (let objindex in res.parent_and_staff_control) {
if (parseInt(objindex) < 5) {
let obj:any = {};
obj.name = res.parent_and_staff_control[objindex].entname;
objgg.children.push(obj);
}
}
this.arrayMember.children.push(objgg);
}
if (res.staff_out_control && res.staff_out_control != '') {
let objzz:any = {
name: '母公司高管直接控制企业' + '(' + res.staff_out_control.length + ')',
children: []
};
for (let objindex in res.staff_out_control) {
if (parseInt(objindex) < 5) {
let obj:any = {};
obj.name = res.staff_out_control[objindex].entname;
objzz.children.push(obj);
}
}
this.arrayMember.children.push(objzz);
}
if (res.members && res.members != '') {
let objson:any = {
name: '子公司' + '(' + res.members.length + ')',
children: []
};
for (let objindex in res.members) {
if (parseInt(objindex) < 5) {
let obj:any = {};
obj.name = res.members[objindex].entname;
objson.children.push(obj);
}
}
this.arrayMember.children.push(objson);
}
if (res.legal_out_control && res.legal_out_control != '') {
let objdw:any = {
name: '母公司法人对外直接控制' + '(' + res.legal_out_control.length + ')',
children: []
};
for (let objindex in res.legal_out_control) {
if (parseInt(objindex) < 5) {
let obj:any = {};
obj.name = res.legal_out_control[objindex].entname;
objdw.children.push(obj);
}
}
this.arrayMember.children.push(objdw);
}
if (res.parent_and_inv_control && res.parent_and_inv_control != '') {
let objmo:any = {
name: '母公司及主要投资者共同控制' + '(' + res.parent_and_inv_control.length + ')',
children: []
};
for (let objindex in res.parent_and_inv_control) {
if (parseInt(objindex) < 5) {
let obj:any = {};
obj.name = res.parent_and_inv_control[objindex].entname;
objmo.children.push(obj);
}
}
this.arrayMember.children.push(objmo);
}
this.treeData = this.arrayMember;
} else {
this.arrayMember.name = '暂无数据';
this.treeData = this.arrayMember;
this.relationFlag = false;
if (res.ret_code != '4999999') {
NativeUI.toast(res.msg);
}
}
});
}
/**
* 查询集团母公司
* ahthor:pd
* 2021年12月13日20:38:12
* @returns {Promise<void>}
*/
getInfo() {
const parms = {
tc: nettyApi.TRADE_CODE.selectMothCompany,
creditcode: this.$store.getters.getCusInfo.cert_code, //'91510100725399362W',
entname: this.$store.getters.getCusInfo.cus_name, //'四川飞森房地产开发有限公司',
entid: '',
regno: '',
ProdId: Public.getProdId(),
SvrCode: Public.getSvrCode(nettyApi.TRADE_CODE.selectMothCompany),
ClientNo: this.$store.getters.getCusInfo.cus_id
};
NativeUI.showWaiting('正在查询');
return this.$IF.transferDataInter(nettyApi.commonRq, parms).then((res:any) => {
NativeUI.closeWaiting();
if (res.rc == '1') {
let obj:any = {};
obj.name = res.result[0].parent[0].entname;
this.momCompany = res.result[0].parent[0].entname;
this.creditcodes = res.result[0].parent[0].creditcode;
this.companyArray.push(obj);
if (res.result[0].parent[0].path && res.result[0].parent[0].path != '') {
for (let objinfo of res.result[0].parent[0].path) {
if (objinfo.nodes && objinfo.nodes != '') {
for (let objNodes of objinfo.nodes) {
if (objNodes.name == obj.name) {
obj.id = objNodes.id;
}
let objcom:any = {};
if (objNodes.name != obj.name && objNodes.name != this.$store.getters.getCusInfo.cus_name) {
objcom.name = objNodes.name;
objcom.id = objNodes.id;
this.companyArray.push(objcom);
}
if (objNodes.name == this.$store.getters.getCusInfo.cus_name) {
objcom.name = objNodes.name;
objcom.id = objNodes.id;
this.companyArray.push(objcom);
}
}
for (let objLinks of objinfo.links) {
let objLink:any = {};
objLink.source = objLinks.from;
objLink.target = objLinks.to;
if (objLinks.type == 1) {
objLink.relation = '出资比例:' + objLinks.properties[0].conprop * 100 + '%';
} else if (objLinks.type == 2) {
objLink.relation = objLinks.properties[0].position_desc;
} else if (objLinks.type == 13) {
objLink.relation = '持股比例:' + objLinks.properties[0].holderrto + '%';
} else {
objLink.relation = '';
}
this.linksArray.push(objLink);
}
}
}
if (this.chartFlag) {
this.init();
}
}
} else {
if (res.ret_code != '4999999') {
NativeUI.toast(res.msg);
}
this.errorFlag = false;
}
});
}
/**
* 初始化echarts
* anthor:pd
* 2021年12月13日20:38:39
*/
init() {
var chartDom = document.getElementById('mgs');
var myChart = this.$echarts.init(chartDom);
this.chartFlag = false;
var option;
option = {
title: {},
tooltip: {},
animationDurationUpdate: 0,
backgroundColor: '#FFFFFF',
animationEasingUpdate: 'quinticInOut',
color: ['#3FA7DC', '#2BC15D'],
series: [
{
type: 'graph',
layout: 'force',
force: {
repulsion: 200,
gravity: 0.1,
edgeLength: 250,
dataZoom: {
orient: 'horizontal'
}
//layoutAnimation:true
},
draggable: true,
symbolSize: 80,
roam: true,
label: {
show: true,
width: 80,
overflow: 'break',
fontWeight: 14
},
edgeSymbol: ['circle', 'arrow'],
edgeSymbolSize: [4, 10],
edgeLabel: {
fontSize: 20,
normal: {
show: true,
formatter: function(links:any) {
return links.data.relation;
}
}
},
data: this.companyArray,
links: this.linksArray,
lineStyle: {
opacity: 0.9,
width: 2,
curveness: 0
}
}
]
};
myChart.setOption(option);
}
}
</script>
<style scoped>
.guarTabCls {
width: 100%;
}
.echarts-container-class {
height: calc(100vh - 120px);
}
.no-data-class {
width: 40%;
}
::v-deep .van-tab{
font-size: 20px;
line-height: 60px;
}
::v-deep .van-cell__title,
::v-deep .van-field__label {
display: flex;
align-items: center;
width: 20%;
}
::v-deep .van-tabs--line .van-tabs__wrap {
width: 30%;
height: 60px;
}
::v-deep .van-tab--active {
border-bottom: 3px solid #FF574C;
font-weight: bold;
color: #FF574C;
}
::v-deep .van-tabs__line {
height: 0;
background-color: white;
}
::v-deep .van-tabs__content {
height: 100%;
width: 100%;
}
</style>