| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- <template>
- <view class="default_page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
- <cus-header title='我的团队'></cus-header>
- <div class="list">
- <div class="list-item" v-for="(item,index) in list" :key="item.id">
- <image class="list-item-icon" :src="imgBase+'team_icon.png'"></image>
- <image class="list-item-edit" :src="imgBase+'team_edit.png'" @click="handleEdit(item)"></image>
- <div class="list-item-top">
- <div class="list-item-top-title">{{item.teamName}}</div>
- <div class="list-item-top-pre adf" style="margin-top: 36rpx;">
- <div class="list-item-top-pre-left">所属地区:</div>
- <div class="list-item-top-pre-right">{{item.provinceName+item.cityName}}</div>
- </div>
- <div class="list-item-top-pre adf">
- <div class="list-item-top-pre-left">所属行业:</div>
- <div class="list-item-top-pre-right">{{item.industryName||''}}</div>
- </div>
- <div class="list-item-top-pre adf">
- <div class="list-item-top-pre-left">团队职能类型:</div>
- <div class="list-item-top-pre-right">{{item.functionNames||''}}</div>
- </div>
- <div class="list-item-top-pre adf">
- <div class="list-item-top-pre-left">团队结构类型:</div>
- <div class="list-item-top-pre-right">{{item.orgNames||''}}</div>
- </div>
- <div class="list-item-top-pre adf">
- <div class="list-item-top-pre-left">团队规模:</div>
- <div class="list-item-top-pre-right">{{item.scaleName||''}}</div>
- </div>
- <div class="list-item-top-pre adf">
- <div class="list-item-top-pre-left">团队层级:</div>
- <div class="list-item-top-pre-right">{{item.hierarchyName||''}}</div>
- </div>
- </div>
- <!-- <div class="list-item-bottom adfacjb" @click="handleReivew">
- <div class="list-item-bottom-left">关联问卷:</div>
- <div class="list-item-bottom-right adfacjb">
- <div class="list-item-bottom-right-num">{{item.queNum||0}}条</div>
- <div class="list-item-bottom-right-review adfac">
- <text>查看</text>
- <image :src="imgBase+'my_arrow_right.png'"></image>
- </div>
- </div>
- </div> -->
- </div>
- </div>
- </view>
- </template>
- <script>
- export default {
- data(){
- return {
- list:[],
- query:{
- page:1,
- limit:10,
- coachId:''
- },
- isOver:false,
- scaleMap:new Map(),
- hierarchyMap:new Map()
- }
- },
- async onLoad() {
- this.query.coachId = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).id||'';
- await this.getTeamScaleData();
- await this.getTeamHierarchyData();
- this.getList()
- },
- onReachBottom() {
- if(this.isOver) return
- this.getList()
- },
- methods:{
- getTeamScaleData(){
- return new Promise((resolve,reject)=>{
- this.$api.get('/getListByType/team_scale').then(({data:res})=>{
- if(res.code!==0) return this.$showToast(res.msg)
- res.data.forEach(d=>{
- this.scaleMap.set(d.dictValue,d)
- })
- resolve()
- })
- })
- },
- getTeamHierarchyData(){
- return new Promise((resolve,reject)=>{
- this.$api.get('/getListByType/team_hierarchy').then(({data:res})=>{
- if(res.code!==0) return this.$showToast(res.msg)
- res.data.forEach(d=>{
- this.hierarchyMap.set(d.dictValue,d)
- })
- resolve()
- })
- })
- },
- getList(){
- this.$api.get('/core/user/team/page',this.query).then(({data:res})=>{
- if(res.code!==0) return this.$showToast(res.msg)
- this.list = [...this.list,...res.data.list]
- this.list.forEach(l=>{
- l.functionNames = l.functions.map(f=>f.functionName).join('、');
- l.orgNames = l.organizations.map(f=>f.orgName).join('、');
- l.scaleName = this.scaleMap.get(l.scale).dictLabel;
- l.hierarchyName = this.hierarchyMap.get(l.hierarchy).dictLabel;
- })
- this.query.page++;
- if(this.list.length>=res.data.total) this.isOver = true;
- })
- },
- handleEdit(item){
- uni.navigateTo({
- url:`/pagesMy/teamEdit?id=${item.id}&scaleName=${item.scaleName}&hierarchyName=${item.hierarchyName}`
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .default_page{
- background: #F7F7F7;
- padding: 0 24rpx 40rpx;
- box-sizing: border-box;
- .list{
- overflow: hidden;
- &-item{
- margin-top: 20rpx;
- background: #FFFFFF;
- border-radius: 24rpx;
- position: relative;
- padding-bottom: 20rpx;
- &-icon{
- width: 40rpx;
- height: 40rpx;
- position: absolute;
- top: 36rpx;
- left: 24rpx;
- }
- &-edit{
- width: 80rpx;
- height: 56rpx;
- position: absolute;
- top: 36rpx;
- right: 24rpx;
- }
- &-top{
- padding: 40rpx 80rpx 24rpx;
- &-title{
- padding-right: 100rpx;
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 32rpx;
- color: #002846;
- line-height: 32rpx;
- }
- &-pre{
- margin-top: 24rpx;
- &-left{
- width: 202rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 24rpx;
- color: #6B7280;
- line-height: 32rpx;
- }
- &-right{
- width: calc(100% - 202rpx);
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 24rpx;
- color: #6B7280;
- line-height: 32rpx;
- }
- }
- }
- &-bottom{
- padding: 24rpx 24rpx 24rpx 80rpx;
- border-top: 1rpx solid #E5E7EB;
- &-left{
- width: 202rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 24rpx;
- color: #393939;
- line-height: 32rpx;
- }
- &-right{
- width: calc(100% - 202rpx);
- &-num{
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 26rpx;
- color: #199C9C;
- line-height: 32rpx;
- }
- &-review{
- text{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 24rpx;
- color: #A6A6A6;
- line-height: 32rpx;
- }
- image{
- width: 32rpx;
- height: 32rpx;
- margin-left: 8rpx;
- }
- }
- }
- }
- }
- }
- }
- </style>
|