2.4 组件结构调整,调整会员权限判断
This commit is contained in:
89
unpackage/dist/dev/mp-weixin/pagesStock/components/gltd-view/gltd-view.js
vendored
Normal file
89
unpackage/dist/dev/mp-weixin/pagesStock/components/gltd-view/gltd-view.js
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
"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: "gltd-view",
|
||||
data() {
|
||||
return {
|
||||
getLastNameStr: utils_util.getLastNameStr,
|
||||
//获取姓
|
||||
getAgeByBirthYear: utils_util.getAgeByBirthYear
|
||||
//获取年龄
|
||||
};
|
||||
},
|
||||
props: {
|
||||
managementList: Array
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击展开或收起管理团队人员
|
||||
*/
|
||||
clickExpandOrRetractManagement(index) {
|
||||
this.managementList[index].isExpand = !this.managementList[index].isExpand;
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.f($props.managementList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.list.length > 0
|
||||
}, item.list.length > 0 ? {
|
||||
b: common_vendor.t(item.key),
|
||||
c: common_vendor.t(item.list.length)
|
||||
} : {}, {
|
||||
d: item.list.length > 4 && !item.isExpand
|
||||
}, item.list.length > 4 && !item.isExpand ? {
|
||||
e: common_vendor.f(item.list.slice(0, 4), (pitem, pindex, i1) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t($data.getLastNameStr(pitem.name)),
|
||||
b: pitem.gender == "女"
|
||||
}, pitem.gender == "女" ? {
|
||||
c: common_assets._imports_0$8
|
||||
} : {
|
||||
d: common_assets._imports_1$15
|
||||
}, {
|
||||
e: common_vendor.n("sexC flexCenter absolute " + (pitem.gender == "女" ? "female" : "male")),
|
||||
f: common_vendor.t(pitem.name),
|
||||
g: common_vendor.t(pitem.position_name),
|
||||
h: common_vendor.t(pitem.start_date),
|
||||
i: common_vendor.t(pitem.education),
|
||||
j: common_vendor.t($data.getAgeByBirthYear(pitem.birth_year))
|
||||
});
|
||||
}),
|
||||
f: index
|
||||
} : {
|
||||
g: common_vendor.f(item.list, (pitem, pindex, i1) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t($data.getLastNameStr(pitem.name)),
|
||||
b: pitem.gender == "女"
|
||||
}, pitem.gender == "女" ? {
|
||||
c: common_assets._imports_0$8
|
||||
} : {
|
||||
d: common_assets._imports_1$15
|
||||
}, {
|
||||
e: common_vendor.n("sexC flexCenter absolute " + (pitem.gender == "女" ? "female" : "male")),
|
||||
f: common_vendor.t(pitem.name),
|
||||
g: common_vendor.t(pitem.position_name),
|
||||
h: common_vendor.t(pitem.start_date),
|
||||
i: common_vendor.t(pitem.education),
|
||||
j: common_vendor.t($data.getAgeByBirthYear(pitem.birth_year))
|
||||
});
|
||||
}),
|
||||
h: index
|
||||
}, {
|
||||
i: item.list.length > 4
|
||||
}, item.list.length > 4 ? {
|
||||
j: common_vendor.t(item.isExpand ? "收起" : "展开查看"),
|
||||
k: common_assets._imports_2$14,
|
||||
l: common_vendor.o(($event) => $options.clickExpandOrRetractManagement(index), index)
|
||||
} : {}, {
|
||||
m: index
|
||||
});
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pagesStock/components/gltd-view/gltd-view.js.map
|
||||
3
unpackage/dist/dev/mp-weixin/pagesStock/components/gltd-view/gltd-view.json
vendored
Normal file
3
unpackage/dist/dev/mp-weixin/pagesStock/components/gltd-view/gltd-view.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pagesStock/components/gltd-view/gltd-view.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pagesStock/components/gltd-view/gltd-view.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="managementTeamList"><block wx:for="{{a}}" wx:for-item="item" wx:key="m"><view wx:if="{{item.a}}" class="positionNumC flex"><view class="position">{{item.b}}</view><view class="num director">{{item.c}}人</view></view><block wx:if="{{item.d}}"><view wx:for="{{item.e}}" wx:for-item="pitem" wx:key="f" class="item flex"><view class="avatarC flexCenter relative director">{{pitem.a}} <view class="{{pitem.e}}"><image wx:if="{{pitem.b}}" class="icon" src="{{pitem.c}}" mode="widthFix"></image><image wx:else class="icon" src="{{pitem.d}}" mode="widthFix"></image></view></view><view class="flex1"><view class="flex"><view class="name">{{pitem.f}}</view><view class="position">{{pitem.g}}</view><view class="date flex1">任职日期:{{pitem.h}}</view></view><view class="educationAgeC flex"><view class="education label">{{pitem.i}}</view><view class="age label">{{pitem.j}}岁</view></view></view></view></block><block wx:else><view wx:for="{{item.g}}" wx:for-item="pitem" wx:key="h" class="item flex"><view class="avatarC flexCenter relative director">{{pitem.a}} <view class="{{pitem.e}}"><image wx:if="{{pitem.b}}" class="icon" src="{{pitem.c}}" mode="widthFix"></image><image wx:else class="icon" src="{{pitem.d}}" mode="widthFix"></image></view></view><view class="flex1"><view class="flex"><view class="name">{{pitem.f}}</view><view class="position">{{pitem.g}}</view><view class="date flex1">任职日期:{{pitem.h}}</view></view><view class="educationAgeC flex"><view class="education label">{{pitem.i}}</view><view class="age label">{{pitem.j}}岁</view></view></view></view></block><view wx:if="{{item.i}}" class="expandMoreC flexCenter" bindtap="{{item.l}}"><view>{{item.j}}</view><image class="arrow" src="{{item.k}}" mode="widthFix"></image></view></block></view>
|
||||
111
unpackage/dist/dev/mp-weixin/pagesStock/components/gltd-view/gltd-view.wxss
vendored
Normal file
111
unpackage/dist/dev/mp-weixin/pagesStock/components/gltd-view/gltd-view.wxss
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
.managementTeamList {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.managementTeamList .positionNumC {
|
||||
height: 70rpx;
|
||||
}
|
||||
.managementTeamList .positionNumC .position {
|
||||
margin-right: 11rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.managementTeamList .positionNumC .num {
|
||||
padding: 0 14rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
.managementTeamList .positionNumC .num.director {
|
||||
background-color: #99AFEC;
|
||||
}
|
||||
.managementTeamList .positionNumC .num.supervisor {
|
||||
background-color: #B499EC;
|
||||
}
|
||||
.managementTeamList .positionNumC .num.other {
|
||||
background-color: #B5B5C9;
|
||||
}
|
||||
.managementTeamList .item {
|
||||
background-color: #FAFAFC;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 20rpx 25rpx 20rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.managementTeamList .item .avatarC {
|
||||
margin-right: 18rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
.managementTeamList .item .avatarC .sexC {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
border-radius: 50%;
|
||||
border: solid 2rpx white;
|
||||
}
|
||||
.managementTeamList .item .avatarC .sexC .icon {
|
||||
width: 16rpx;
|
||||
height: auto;
|
||||
}
|
||||
.managementTeamList .item .avatarC .sexC.female {
|
||||
background-color: #FA5A93;
|
||||
}
|
||||
.managementTeamList .item .avatarC .sexC.male {
|
||||
background-color: #3E6CFC;
|
||||
}
|
||||
.managementTeamList .item .avatarC.director {
|
||||
background-color: #99AFEC;
|
||||
}
|
||||
.managementTeamList .item .avatarC.supervisor {
|
||||
background-color: #B499EC;
|
||||
}
|
||||
.managementTeamList .item .avatarC.other {
|
||||
background-color: #B5B5C9;
|
||||
}
|
||||
.managementTeamList .item .name {
|
||||
margin-right: 13rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
}
|
||||
.managementTeamList .item .position {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
.managementTeamList .item .date {
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
text-align: right;
|
||||
}
|
||||
.managementTeamList .item .educationAgeC {
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
.managementTeamList .item .educationAgeC .label {
|
||||
margin-right: 10rpx;
|
||||
background-color: #F1F1F1;
|
||||
line-height: 30rpx;
|
||||
padding: 0 16rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
.managementTeamList .expandMoreC {
|
||||
height: 80rpx;
|
||||
border-bottom: solid 1rpx #E7E7E7;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #C9C9C9;
|
||||
}
|
||||
.managementTeamList .expandMoreC .arrow {
|
||||
margin-left: 18rpx;
|
||||
width: 11rpx;
|
||||
height: auto;
|
||||
}
|
||||
Reference in New Issue
Block a user