2.4 组件结构调整,调整会员权限判断
This commit is contained in:
104
unpackage/dist/dev/mp-weixin/pagesStock/components/fzlc-view/fzlc-view.js
vendored
Normal file
104
unpackage/dist/dev/mp-weixin/pagesStock/components/fzlc-view/fzlc-view.js
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
"use strict";
|
||||
const utils_util = require("../../../utils/util.js");
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
name: "fzlc-view",
|
||||
data() {
|
||||
return {
|
||||
getRateUpOrDown: utils_util.getRateUpOrDown
|
||||
};
|
||||
},
|
||||
props: {
|
||||
keyFactorsInfo: null,
|
||||
keyFactorsList: Array,
|
||||
//关键因素数组
|
||||
timelineInfo: null,
|
||||
timelineList: Array
|
||||
//发展时间线数组
|
||||
},
|
||||
methods: {
|
||||
clickAction(item) {
|
||||
this.$emit("detail", item);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $props.keyFactorsInfo
|
||||
}, $props.keyFactorsInfo ? {
|
||||
b: common_vendor.t($props.keyFactorsInfo.total_factors)
|
||||
} : {}, {
|
||||
c: common_vendor.f($props.keyFactorsList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.category_name),
|
||||
b: common_vendor.t(item.factors.length),
|
||||
c: item.show
|
||||
}, item.show ? {
|
||||
d: common_assets._imports_0$6
|
||||
} : {
|
||||
e: common_assets._imports_1$13
|
||||
}, {
|
||||
f: item.show
|
||||
}, item.show ? {
|
||||
g: common_vendor.f(item.factors, (fitem, findex, i1) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(fitem.factor_name),
|
||||
b: fitem.impact_direction == "negative"
|
||||
}, fitem.impact_direction == "negative" ? {} : {}, {
|
||||
c: fitem.impact_direction == "neutral"
|
||||
}, fitem.impact_direction == "neutral" ? {} : {}, {
|
||||
d: fitem.impact_direction == "positive"
|
||||
}, fitem.impact_direction == "positive" ? {} : {}, {
|
||||
e: common_vendor.t(fitem.factor_value),
|
||||
f: common_vendor.t(fitem.factor_unit),
|
||||
g: common_vendor.n("value " + fitem.impact_direction),
|
||||
h: $data.getRateUpOrDown(fitem.year_on_year)
|
||||
}, $data.getRateUpOrDown(fitem.year_on_year) ? {
|
||||
i: common_assets._imports_0$7
|
||||
} : {
|
||||
j: common_assets._imports_1$14
|
||||
}, {
|
||||
k: common_vendor.t(fitem.year_on_year ? fitem.year_on_year : 0),
|
||||
l: common_vendor.n("chgC flex " + ($data.getRateUpOrDown(fitem.year_on_year) ? "down" : "up")),
|
||||
m: common_vendor.t(fitem.factor_desc),
|
||||
n: common_vendor.t(fitem.impact_weight),
|
||||
o: findex
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
h: index,
|
||||
i: common_vendor.o(($event) => item.show = !item.show, index)
|
||||
});
|
||||
}),
|
||||
d: $props.timelineInfo
|
||||
}, $props.timelineInfo ? {
|
||||
e: common_vendor.t($props.timelineInfo.positive_events),
|
||||
f: common_vendor.t($props.timelineInfo.negative_events)
|
||||
} : {}, {
|
||||
g: common_vendor.f($props.timelineList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.impact_metrics.is_positive == 1
|
||||
}, item.impact_metrics.is_positive == 1 ? {
|
||||
b: common_assets._imports_4$13
|
||||
} : {
|
||||
c: common_assets._imports_5$8
|
||||
}, {
|
||||
d: common_vendor.n("line flex1 " + (item.impact_metrics.is_positive == 1 ? "up" : "down")),
|
||||
e: common_vendor.t(item.event_title),
|
||||
f: common_vendor.t(item.event_type),
|
||||
g: common_vendor.n("eventType " + (item.impact_metrics.is_positive == 1 ? "up" : "down")),
|
||||
h: common_vendor.t(item.event_date),
|
||||
i: common_vendor.t(item.event_desc),
|
||||
j: common_vendor.n("progress " + (item.impact_metrics.is_positive == 1 ? "up" : "down")),
|
||||
k: `${item.impact_metrics.impact_score}%`,
|
||||
l: common_vendor.t(item.impact_metrics.impact_score),
|
||||
m: index,
|
||||
n: common_vendor.o(($event) => $options.clickAction(item), index)
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pagesStock/components/fzlc-view/fzlc-view.js.map
|
||||
3
unpackage/dist/dev/mp-weixin/pagesStock/components/fzlc-view/fzlc-view.json
vendored
Normal file
3
unpackage/dist/dev/mp-weixin/pagesStock/components/fzlc-view/fzlc-view.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pagesStock/components/fzlc-view/fzlc-view.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pagesStock/components/fzlc-view/fzlc-view.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view style="padding:25rpx 20rpx;box-sizing:border-box"><view wx:if="{{a}}" class="flex" style="font-size:28rpx"><text>关键因素</text><text style="font-size:24rpx;color:#070707;padding:0rpx 10rpx;border-radius:3rpx;background-color:#F2C369;margin-left:10rpx">{{b}}</text></view><view class="keyFactorsList"><view wx:for="{{c}}" wx:for-item="item" wx:key="h" class="item" bindtap="{{item.i}}" style="margin:20rpx 0;background-color:#FAFAFC;border-radius:10rpx;padding:25rpx 20rpx;color:#2B2B2B"><view style="display:flex;align-items:center;justify-content:space-between"><view style="flex:1;font-size:26rpx"><text>{{item.a}}</text><text style="font-size:24rpx;color:#070707;padding:0rpx 10rpx;border-radius:3rpx;background-color:#F2C369;margin-left:10rpx">{{item.b}}</text></view><image wx:if="{{item.c}}" style="width:20rpx;height:12rpx" src="{{item.d}}" mode="widthFix"></image><image wx:else style="width:20rpx;height:12rpx" src="{{item.e}}" mode="widthFix"></image></view><block wx:if="{{item.f}}"><view wx:for="{{item.g}}" wx:for-item="fitem" wx:key="o" class="fitem" style="margin:20rpx 0;padding:20rpx;background-color:white;border-radius:10rpx;border:1rpx solid #E7E7E7;color:#2B2B2B;font-weight:500;font-size:26rpx"><view class="titleImpactC flex between"><view>{{fitem.a}}</view><view wx:if="{{fitem.b}}" class="impact negative">负面</view><view wx:if="{{fitem.c}}" class="impact neutral">中性</view><view wx:if="{{fitem.d}}" class="impact positive">正面</view></view><view class="valueChgC flex" style="margin-top:10rpx"><view class="{{fitem.g}}">{{fitem.e}}{{fitem.f}}</view><view class="{{fitem.l}}"><image wx:if="{{fitem.h}}" class="icon" src="{{fitem.i}}" mode="widthFix"></image><image wx:else class="icon" src="{{fitem.j}}" mode="widthFix"></image><view>{{fitem.k}}%</view></view></view><view style="margin-top:10rpx;color:#999999;font-size:22rpx">{{fitem.m}}</view><view style="margin-top:10rpx;color:#999999;font-size:22rpx">影响权重: {{fitem.n}}</view></view></block></view></view><view wx:if="{{d}}" class="flex" style="font-size:28rpx"><text>发展时间线</text><text style="font-size:24rpx;color:white;padding:0rpx 10rpx;border-radius:3rpx;background-color:#EC3440;margin-left:10rpx">正面 {{e}}</text><text style="font-size:24rpx;color:white;padding:0rpx 10rpx;border-radius:3rpx;background-color:#345423;margin-left:10rpx">负面 {{f}}</text></view><view class="timelineList"><view wx:for="{{g}}" wx:for-item="item" wx:key="m" class="item" bindtap="{{item.n}}"><view class="impactC flexColumnCenter"><image wx:if="{{item.a}}" class="icon" style="margin-top:20rpx" src="{{item.b}}" mode="widthFix"></image><image wx:else class="icon" src="{{item.c}}" mode="widthFix"></image><view class="{{item.d}}"></view></view><view style="flex:1;margin-left:10rpx;background-color:#FAFAFC;padding:24rpx 15rpx;border-radius:10rpx;font-weight:500"><view class="titleTypeC"><text class="title">{{item.e}}</text><text class="{{item.g}}">{{item.f}}</text></view><view style="color:#999999;font-size:20rpx;margin:15rpx 0">{{item.h}}</view><view style="color:#71675D;font-size:22rpx">{{item.i}}</view><view style="display:flex;align-items:center;margin-top:30rpx"><view style="color:#71675D;font-size:22rpx;font-weight:500">影响度</view><view class="progressBgC"><view class="{{item.j}}" style="{{'width:' + item.k}}"></view></view><view style="color:#71675D;font-size:24rpx;font-weight:500">{{item.l}}</view></view></view></view></view></view>
|
||||
105
unpackage/dist/dev/mp-weixin/pagesStock/components/fzlc-view/fzlc-view.wxss
vendored
Normal file
105
unpackage/dist/dev/mp-weixin/pagesStock/components/fzlc-view/fzlc-view.wxss
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
.keyFactorsList .item .fitem .impact {
|
||||
border-radius: 5rpx;
|
||||
padding: 0 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: white;
|
||||
}
|
||||
.keyFactorsList .item .fitem .impact.negative {
|
||||
background-color: #345423;
|
||||
}
|
||||
.keyFactorsList .item .fitem .impact.neutral {
|
||||
background-color: #345423;
|
||||
}
|
||||
.keyFactorsList .item .fitem .impact.positive {
|
||||
background-color: #EC3440;
|
||||
}
|
||||
.keyFactorsList .item .fitem .valueChgC .value {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.keyFactorsList .item .fitem .valueChgC .value.negative {
|
||||
color: #345423;
|
||||
}
|
||||
.keyFactorsList .item .fitem .valueChgC .value.neutral {
|
||||
color: #345423;
|
||||
}
|
||||
.keyFactorsList .item .fitem .valueChgC .value.positive {
|
||||
color: #EC3440;
|
||||
}
|
||||
.keyFactorsList .item .fitem .valueChgC .chgC {
|
||||
padding: 0 10rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.keyFactorsList .item .fitem .valueChgC .chgC .icon {
|
||||
margin-right: 5rpx;
|
||||
width: 11rpx;
|
||||
height: auto;
|
||||
}
|
||||
.keyFactorsList .item .fitem .valueChgC .chgC.down {
|
||||
border: 1rpx solid #345423;
|
||||
color: #345423;
|
||||
}
|
||||
.keyFactorsList .item .fitem .valueChgC .chgC.up {
|
||||
border: 1rpx solid #EC3440;
|
||||
color: #EC3440;
|
||||
}
|
||||
.timelineList .item {
|
||||
display: flex;
|
||||
margin: 20rpx 0;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.timelineList .item .impactC .icon {
|
||||
width: 30rpx;
|
||||
height: auto;
|
||||
}
|
||||
.timelineList .item .impactC .line {
|
||||
margin: 10rpx 0 -30rpx;
|
||||
width: 1rpx;
|
||||
}
|
||||
.timelineList .item .impactC .line.up {
|
||||
border-left: 1rpx dashed #EC3440;
|
||||
}
|
||||
.timelineList .item .impactC .line.down {
|
||||
border-left: 1rpx dashed #345423;
|
||||
}
|
||||
.timelineList .item .titleTypeC .title {
|
||||
margin-right: 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #2A2A2A;
|
||||
}
|
||||
.timelineList .item .titleTypeC .eventType {
|
||||
padding: 5rpx 10rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.timelineList .item .titleTypeC .eventType.up {
|
||||
background-color: #FFE7E9;
|
||||
color: #EC3440;
|
||||
}
|
||||
.timelineList .item .titleTypeC .eventType.down {
|
||||
background-color: #DEEED6;
|
||||
color: #345423;
|
||||
}
|
||||
.timelineList .item .progressBgC {
|
||||
background-color: #EFEFEF;
|
||||
margin: 0 15rpx;
|
||||
width: 200rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 5rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.timelineList .item .progressBgC .progress {
|
||||
height: 100%;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
.timelineList .item .progressBgC .progress.up {
|
||||
background: linear-gradient(to right, #FF525D, #EC3440);
|
||||
}
|
||||
.timelineList .item .progressBgC .progress.down {
|
||||
background: linear-gradient(to right, #537D3D, #345423);
|
||||
}
|
||||
Reference in New Issue
Block a user