2.4 组件结构调整,调整会员权限判断
This commit is contained in:
194
unpackage/dist/dev/mp-weixin/pagesStock/components/cyl-view/cyl-view.js
vendored
Normal file
194
unpackage/dist/dev/mp-weixin/pagesStock/components/cyl-view/cyl-view.js
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
"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() {
|
||||
return {
|
||||
isShow: false,
|
||||
center_index: 0,
|
||||
types: [
|
||||
{
|
||||
title: "上游供应链",
|
||||
count: 0,
|
||||
desc: "原材料与供应商",
|
||||
type: "upstream"
|
||||
},
|
||||
{
|
||||
title: "核心企业",
|
||||
count: 0,
|
||||
desc: "公司主体与产品",
|
||||
type: "core"
|
||||
},
|
||||
{
|
||||
title: "下游客户",
|
||||
count: 0,
|
||||
desc: "客户与终端市场",
|
||||
type: "downstream"
|
||||
}
|
||||
],
|
||||
typeIndex: 0,
|
||||
option: {
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
grid: {
|
||||
left: "2%",
|
||||
right: "2%",
|
||||
top: "5%",
|
||||
bottom: "30%"
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: "sankey",
|
||||
name: "经营现金流",
|
||||
data: [],
|
||||
links: []
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
props: {
|
||||
valueChainAnalysisInfo: Object,
|
||||
upstreamList: Array,
|
||||
//上游供应链
|
||||
coreEnterpriseList: Array,
|
||||
//核心企业
|
||||
downstreamList: Array,
|
||||
//下游客户
|
||||
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 pagesStock/components/cyl-view/cyl-view.vue:183", chart);
|
||||
common_vendor.index.__f__("log", "at pagesStock/components/cyl-view/cyl-view.vue:184", this.option);
|
||||
chart.setOption(this.option);
|
||||
},
|
||||
changeCenterIndex(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),
|
||||
b: $data.center_index == 0 ? 1 : "",
|
||||
c: common_vendor.o(($event) => $options.changeCenterIndex(0)),
|
||||
d: $data.center_index == 1 ? 1 : "",
|
||||
e: common_vendor.o(($event) => $options.changeCenterIndex(1)),
|
||||
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),
|
||||
c: common_vendor.n("num " + ($data.typeIndex == index ? item.type : "")),
|
||||
d: common_vendor.t(item.desc),
|
||||
e: common_vendor.n("contentC flexColumnCenter flex1 " + ($data.typeIndex == index ? item.type : "")),
|
||||
f: common_vendor.o(($event) => $data.typeIndex = index, index),
|
||||
g: index != $data.types.length - 1
|
||||
}, index != $data.types.length - 1 ? {
|
||||
h: common_assets._imports_0$4
|
||||
} : {}, {
|
||||
i: index
|
||||
});
|
||||
}),
|
||||
h: $data.typeIndex == 0
|
||||
}, $data.typeIndex == 0 ? {
|
||||
i: common_vendor.f($props.upstreamList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.node_name),
|
||||
b: common_vendor.t(item.node_description),
|
||||
c: common_vendor.t(item.node_type),
|
||||
d: common_vendor.t(item.market_share),
|
||||
e: `${item.importance_score}%`,
|
||||
f: common_vendor.t(item.importance_score),
|
||||
g: index,
|
||||
h: common_vendor.o(($event) => $options.clickAction(item), index)
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
j: $data.typeIndex == 1
|
||||
}, $data.typeIndex == 1 ? {
|
||||
k: common_vendor.f($props.coreEnterpriseList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.node_name),
|
||||
b: common_vendor.t(item.node_description),
|
||||
c: common_vendor.t(item.node_type),
|
||||
d: common_vendor.t(item.market_share),
|
||||
e: `${item.importance_score}%`,
|
||||
f: common_vendor.t(item.importance_score),
|
||||
g: index,
|
||||
h: common_vendor.o(($event) => $options.clickAction(item), index)
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
l: $data.typeIndex == 2
|
||||
}, $data.typeIndex == 2 ? {
|
||||
m: common_vendor.f($props.downstreamList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.node_name),
|
||||
b: common_vendor.t(item.node_description),
|
||||
c: common_vendor.t(item.node_type),
|
||||
d: common_vendor.t(item.market_share),
|
||||
e: `${item.importance_score}%`,
|
||||
f: common_vendor.t(item.importance_score),
|
||||
g: index,
|
||||
h: common_vendor.o(($event) => $options.clickAction(item), index)
|
||||
};
|
||||
})
|
||||
} : {}) : {}, {
|
||||
n: $data.center_index == 1
|
||||
}, $data.center_index == 1 ? {
|
||||
o: common_vendor.sr("chartRef", "4ade4b3d-0")
|
||||
} : {});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pagesStock/components/cyl-view/cyl-view.js.map
|
||||
5
unpackage/dist/dev/mp-weixin/pagesStock/components/cyl-view/cyl-view.json
vendored
Normal file
5
unpackage/dist/dev/mp-weixin/pagesStock/components/cyl-view/cyl-view.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"l-echart": "../../../uni_modules/lime-echart/components/l-echart/l-echart"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pagesStock/components/cyl-view/cyl-view.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pagesStock/components/cyl-view/cyl-view.wxml
vendored
Normal file
@@ -0,0 +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 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="4ade4b3d-0" bind:__l="__l"></l-echart></view></view>
|
||||
194
unpackage/dist/dev/mp-weixin/pagesStock/components/cyl-view/cyl-view.wxss
vendored
Normal file
194
unpackage/dist/dev/mp-weixin/pagesStock/components/cyl-view/cyl-view.wxss
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
.cyl_view {
|
||||
padding: 20rpx;
|
||||
}
|
||||
.cyl_view .top {
|
||||
font-weight: 500;
|
||||
}
|
||||
.cyl_view .top .child_1 {
|
||||
color: #2B2B2B;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.cyl_view .top .child_2 {
|
||||
color: #71675D;
|
||||
font-size: 24rpx;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
.cyl_view .top .child_3 {
|
||||
border: 1rpx solid #F3C368;
|
||||
border-radius: 5rpx;
|
||||
padding: 0 5rpx;
|
||||
color: #F2C369;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.cyl_view .center {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
font-weight: 500;
|
||||
}
|
||||
.cyl_view .center .child {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 26rpx;
|
||||
color: #939393;
|
||||
padding: 10rpx 40rpx;
|
||||
}
|
||||
.cyl_view .center .child.action {
|
||||
background-color: #F2C369;
|
||||
color: #070707;
|
||||
}
|
||||
.cyl_view .bottom .type .item {
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
.cyl_view .bottom .type .item .contentC {
|
||||
background-color: #FAFAFC;
|
||||
justify-content: center;
|
||||
height: 120rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.cyl_view .bottom .type .item .contentC .titleNumC {
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
}
|
||||
.cyl_view .bottom .type .item .contentC .titleNumC .num {
|
||||
background-color: #F2C369;
|
||||
margin-left: 6rpx;
|
||||
padding: 0 5rpx;
|
||||
min-width: 24rpx;
|
||||
border-radius: 5rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
.cyl_view .bottom .type .item .contentC .titleNumC .num.upstream {
|
||||
background-color: #FF5501;
|
||||
color: white;
|
||||
}
|
||||
.cyl_view .bottom .type .item .contentC .titleNumC .num.core {
|
||||
background-color: #175CE6;
|
||||
color: white;
|
||||
}
|
||||
.cyl_view .bottom .type .item .contentC .titleNumC .num.downstream {
|
||||
background-color: #1DB26F;
|
||||
color: white;
|
||||
}
|
||||
.cyl_view .bottom .type .item .contentC .des {
|
||||
margin-top: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
.cyl_view .bottom .type .item .contentC.upstream {
|
||||
background-color: #FFF4EF;
|
||||
border: solid 1rpx #FF5501;
|
||||
}
|
||||
.cyl_view .bottom .type .item .contentC.core {
|
||||
background-color: #F2F6FD;
|
||||
border: solid 1rpx #175CE6;
|
||||
}
|
||||
.cyl_view .bottom .type .item .contentC.downstream {
|
||||
background-color: #E7F5F0;
|
||||
border: solid 1rpx #1DB26F;
|
||||
}
|
||||
.cyl_view .bottom .type .item .arrow {
|
||||
margin: 0 6rpx;
|
||||
width: 19rpx;
|
||||
height: auto;
|
||||
}
|
||||
.cyl_view .list {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.cyl_view .list .item {
|
||||
background-color: #FAFAFC;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 25rpx 20rpx;
|
||||
}
|
||||
.cyl_view .list .item .title {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
}
|
||||
.cyl_view .list .item .des {
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
.cyl_view .list .item .labelC {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.cyl_view .list .item .labelC .label {
|
||||
margin-right: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.cyl_view .list .item .labelC .label.upstream {
|
||||
color: #FF5501;
|
||||
}
|
||||
.cyl_view .list .item .labelC .label.upstream.type {
|
||||
background-color: #FFF4EF;
|
||||
}
|
||||
.cyl_view .list .item .labelC .label.upstream.market {
|
||||
border: solid 1rpx #FF5501;
|
||||
}
|
||||
.cyl_view .list .item .labelC .label.core {
|
||||
color: #175CE6;
|
||||
}
|
||||
.cyl_view .list .item .labelC .label.core.type {
|
||||
background-color: #EDF2FD;
|
||||
}
|
||||
.cyl_view .list .item .labelC .label.core.market {
|
||||
border: solid 1rpx #175CE6;
|
||||
}
|
||||
.cyl_view .list .item .labelC .label.downstream {
|
||||
color: #1DB26F;
|
||||
}
|
||||
.cyl_view .list .item .labelC .label.downstream.type {
|
||||
background-color: #E7F5F0;
|
||||
}
|
||||
.cyl_view .list .item .labelC .label.downstream.market {
|
||||
border: solid 1rpx #1DB26F;
|
||||
}
|
||||
.cyl_view .list .item .importanceC {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.cyl_view .list .item .importanceC .title {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #71675D;
|
||||
}
|
||||
.cyl_view .list .item .importanceC .progressBgC {
|
||||
background-color: #EFEFEF;
|
||||
height: 10rpx;
|
||||
border-radius: 5rpx;
|
||||
margin: 0 15rpx;
|
||||
}
|
||||
.cyl_view .list .item .importanceC .progressBgC .progress {
|
||||
height: 100%;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
.cyl_view .list .item .importanceC .progressBgC .progress.upstream {
|
||||
background: linear-gradient(90deg, #FF8C53 0%, #FF5501 100%);
|
||||
}
|
||||
.cyl_view .list .item .importanceC .progressBgC .progress.core {
|
||||
background: linear-gradient(90deg, #518BFF 0%, #175CE6 100%);
|
||||
}
|
||||
.cyl_view .list .item .importanceC .progressBgC .progress.downstream {
|
||||
background: linear-gradient(90deg, #48D394 0%, #1DB26F 100%);
|
||||
}
|
||||
.cyl_view .list .item .importanceC .value {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #71675D;
|
||||
}
|
||||
Reference in New Issue
Block a user