1.31 财务分析,财务数据模块完善,产业链桑基图展示
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const echarts = require("../../uni_modules/lime-echart/static/echarts.min.js");
|
||||
const _sfc_main = {
|
||||
name: "cyl-view",
|
||||
data() {
|
||||
@@ -27,7 +28,26 @@ const _sfc_main = {
|
||||
type: "downstream"
|
||||
}
|
||||
],
|
||||
typeIndex: 0
|
||||
typeIndex: 0,
|
||||
option: {
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
grid: {
|
||||
left: "2%",
|
||||
right: "2%",
|
||||
top: "5%",
|
||||
bottom: "30%"
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: "sankey",
|
||||
name: "经营现金流",
|
||||
data: [],
|
||||
links: []
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
props: {
|
||||
@@ -38,25 +58,63 @@ const _sfc_main = {
|
||||
//核心企业
|
||||
downstreamList: Array,
|
||||
//下游客户
|
||||
totalNodes: Number
|
||||
totalNodes: Number,
|
||||
//总节点数
|
||||
valueChainFlowsList: Array
|
||||
//产业链流向数据
|
||||
},
|
||||
watch: {
|
||||
valueChainAnalysisInfo(newValue) {
|
||||
this.types[0].count = newValue.upstream_nodes;
|
||||
this.types[1].count = newValue.company_nodes;
|
||||
this.types[2].count = newValue.downstream_nodes;
|
||||
},
|
||||
valueChainFlowsList(newValue) {
|
||||
let data = [];
|
||||
let links = [];
|
||||
let name = [];
|
||||
for (let item of newValue) {
|
||||
if (name.indexOf(item.source.node_name) == -1) {
|
||||
name.push(item.source.node_name);
|
||||
data.push({ name: item.source.node_name });
|
||||
}
|
||||
links.push({ source: item.source.node_name, target: item.target.node_name, value: item.flow_metrics.flow_ratio });
|
||||
}
|
||||
this.option.series[0].data = data;
|
||||
this.option.series[0].links = links;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
const chart = await this.$refs.chartRef.init(echarts);
|
||||
common_vendor.index.__f__("log", "at components/cyl-view/cyl-view.vue:183", chart);
|
||||
common_vendor.index.__f__("log", "at components/cyl-view/cyl-view.vue:184", this.option);
|
||||
chart.setOption(this.option);
|
||||
},
|
||||
changeCenterIndex(index) {
|
||||
this.center_index = index;
|
||||
if (this.center_index != index) {
|
||||
this.center_index = index;
|
||||
if (index == 1) {
|
||||
let that = this;
|
||||
setTimeout(function() {
|
||||
that.init();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
},
|
||||
clickAction(item) {
|
||||
this.$emit("detail", item);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_l_echart2 = common_vendor.resolveComponent("l-echart");
|
||||
_easycom_l_echart2();
|
||||
}
|
||||
const _easycom_l_echart = () => "../../uni_modules/lime-echart/components/l-echart/l-echart.js";
|
||||
if (!Math) {
|
||||
_easycom_l_echart();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t($props.totalNodes),
|
||||
@@ -64,7 +122,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
c: common_vendor.o(($event) => $options.changeCenterIndex(0)),
|
||||
d: $data.center_index == 1 ? 1 : "",
|
||||
e: common_vendor.o(($event) => $options.changeCenterIndex(1)),
|
||||
f: common_vendor.f($data.types, (item, index, i0) => {
|
||||
f: $data.center_index == 0
|
||||
}, $data.center_index == 0 ? common_vendor.e({
|
||||
g: common_vendor.f($data.types, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.title),
|
||||
b: common_vendor.t(item.count),
|
||||
@@ -79,9 +139,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
i: index
|
||||
});
|
||||
}),
|
||||
g: $data.typeIndex == 0
|
||||
h: $data.typeIndex == 0
|
||||
}, $data.typeIndex == 0 ? {
|
||||
h: common_vendor.f($props.upstreamList, (item, index, i0) => {
|
||||
i: common_vendor.f($props.upstreamList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.node_name),
|
||||
b: common_vendor.t(item.node_description),
|
||||
@@ -94,9 +154,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
i: $data.typeIndex == 1
|
||||
j: $data.typeIndex == 1
|
||||
}, $data.typeIndex == 1 ? {
|
||||
j: common_vendor.f($props.coreEnterpriseList, (item, index, i0) => {
|
||||
k: common_vendor.f($props.coreEnterpriseList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.node_name),
|
||||
b: common_vendor.t(item.node_description),
|
||||
@@ -109,9 +169,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
k: $data.typeIndex == 2
|
||||
l: $data.typeIndex == 2
|
||||
}, $data.typeIndex == 2 ? {
|
||||
l: common_vendor.f($props.downstreamList, (item, index, i0) => {
|
||||
m: common_vendor.f($props.downstreamList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.node_name),
|
||||
b: common_vendor.t(item.node_description),
|
||||
@@ -123,6 +183,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
h: common_vendor.o(($event) => $options.clickAction(item), index)
|
||||
};
|
||||
})
|
||||
} : {}) : {}, {
|
||||
n: $data.center_index == 1
|
||||
}, $data.center_index == 1 ? {
|
||||
o: common_vendor.sr("chartRef", "2cc4c3dc-0")
|
||||
} : {});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"l-echart": "../../uni_modules/lime-echart/components/l-echart/l-echart"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<view class="cyl_view"><view class="top flex"><view class="child_1">产业链分析</view><view class="child_2">目标公司供应链图谱</view><view class="child_3">节点 {{a}}</view></view><view class="center"><view class="{{['child', b && 'action']}}" bindtap="{{c}}"> 层级视图 </view><view class="{{['child', d && 'action']}}" bindtap="{{e}}"> 流向关系 </view></view><view class="bottom"><view class="type flex"><view wx:for="{{f}}" wx:for-item="item" wx:key="i" class="item flex flex1"><view class="{{item.e}}" bindtap="{{item.f}}"><view class="titleNumC">{{item.a}} <text class="{{item.c}}">{{item.b}}</text></view><view class="des">{{item.d}}</view></view><image wx:if="{{item.g}}" class="arrow" src="{{item.h}}" mode="widthFix"></image></view></view><view class="list"><block wx:if="{{g}}"><view wx:for="{{h}}" wx:for-item="item" wx:key="g" class="item" bindtap="{{item.h}}"><view class="title">{{item.a}}</view><view class="des">{{item.b}}</view><view class="labelC flex"><view class="label upstream type">{{item.c}}</view><view class="label upstream market">份额:{{item.d}}%</view></view><view class="importanceC flex"><view class="title">影响度</view><view class="progressBgC flex1"><view class="progress upstream" style="{{'width:' + item.e}}"></view></view><view class="value">{{item.f}}</view></view></view></block><block wx:if="{{i}}"><view wx:for="{{j}}" wx:for-item="item" wx:key="g" class="item" bindtap="{{item.h}}"><view class="title">{{item.a}}</view><view class="des">{{item.b}}</view><view class="labelC flex"><view class="label core type">{{item.c}}</view><view class="label core market">份额:{{item.d}}%</view></view><view class="importanceC flex"><view class="title">影响度</view><view class="progressBgC flex1"><view class="progress core" style="{{'width:' + item.e}}"></view></view><view class="value">{{item.f}}</view></view></view></block><block wx:if="{{k}}"><view wx:for="{{l}}" wx:for-item="item" wx:key="g" class="item" bindtap="{{item.h}}"><view class="title">{{item.a}}</view><view class="des">{{item.b}}</view><view class="labelC flex"><view class="label downstream type">{{item.c}}</view><view class="label downstream market">份额:{{item.d}}%</view></view><view class="importanceC flex"><view class="title">影响度</view><view class="progressBgC flex1"><view class="progress downstream" style="{{'width:' + item.e}}"></view></view><view class="value">{{item.f}}</view></view></view></block></view></view></view>
|
||||
<view class="cyl_view"><view class="top flex"><view class="child_1">产业链分析</view><view class="child_2">目标公司供应链图谱</view><view class="child_3">节点 {{a}}</view></view><view class="center"><view class="{{['child', b && 'action']}}" bindtap="{{c}}"> 层级视图 </view><view class="{{['child', d && 'action']}}" bindtap="{{e}}"> 流向关系 </view></view><view wx:if="{{f}}" class="bottom"><view class="type flex"><view wx:for="{{g}}" wx:for-item="item" wx:key="i" class="item flex flex1"><view class="{{item.e}}" bindtap="{{item.f}}"><view class="titleNumC">{{item.a}} <text class="{{item.c}}">{{item.b}}</text></view><view class="des">{{item.d}}</view></view><image wx:if="{{item.g}}" class="arrow" src="{{item.h}}" mode="widthFix"></image></view></view><view class="list"><block wx:if="{{h}}"><view wx:for="{{i}}" wx:for-item="item" wx:key="g" class="item" bindtap="{{item.h}}"><view class="title">{{item.a}}</view><view class="des">{{item.b}}</view><view class="labelC flex"><view class="label upstream type">{{item.c}}</view><view class="label upstream market">份额:{{item.d}}%</view></view><view class="importanceC flex"><view class="title">影响度</view><view class="progressBgC flex1"><view class="progress upstream" style="{{'width:' + item.e}}"></view></view><view class="value">{{item.f}}</view></view></view></block><block wx:if="{{j}}"><view wx:for="{{k}}" wx:for-item="item" wx:key="g" class="item" bindtap="{{item.h}}"><view class="title">{{item.a}}</view><view class="des">{{item.b}}</view><view class="labelC flex"><view class="label core type">{{item.c}}</view><view class="label core market">份额:{{item.d}}%</view></view><view class="importanceC flex"><view class="title">影响度</view><view class="progressBgC flex1"><view class="progress core" style="{{'width:' + item.e}}"></view></view><view class="value">{{item.f}}</view></view></view></block><block wx:if="{{l}}"><view wx:for="{{m}}" wx:for-item="item" wx:key="g" class="item" bindtap="{{item.h}}"><view class="title">{{item.a}}</view><view class="des">{{item.b}}</view><view class="labelC flex"><view class="label downstream type">{{item.c}}</view><view class="label downstream market">份额:{{item.d}}%</view></view><view class="importanceC flex"><view class="title">影响度</view><view class="progressBgC flex1"><view class="progress downstream" style="{{'width:' + item.e}}"></view></view><view class="value">{{item.f}}</view></view></view></block></view></view><view wx:if="{{n}}" style="height:500rpx"><l-echart class="r" u-r="chartRef" u-i="2cc4c3dc-0" bind:__l="__l"></l-echart></view></view>
|
||||
Reference in New Issue
Block a user