或然中台小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.4 KiB

2 years ago
<template>
<view>
2 years ago
<uni-section title="邀请城市合伙人" type="line">
<view class="page">
<view class="org-picker">
<uni-data-picker class="picker-input" placeholder="请选择组织" popup-title="请选择组织" preload :localdata="orgs" :map="{text: 'partnerClassificationName', value: 'id'}" v-model="org" @nodeclick="orgClick" @popupclosed="orgClose"></uni-data-picker>
</view>
<button type="primary" @click="toCode">生成邀请二维码</button>
</view>
2 years ago
</uni-section>
</view>
</template>
<script>
2 years ago
import { treeList } from '@/apis/modules/parner.js'
2 years ago
export default {
data() {
return {
2 years ago
orgs: [],
org: '',
orgTemp: '',
2 years ago
extraIcon: {
color: '#007eff',
size: '22',
type: 'icon-qrcode'
}
}
},
2 years ago
onShow() {
this.getOrg()
},
2 years ago
methods: {
2 years ago
// 获取组织
getOrg() {
treeList().then(({ treeList }) => {
this.orgs = treeList
}).catch(e => {})
},
// 组织点击回调
orgClick(e) {
this.orgTemp = e.id
},
// 组织关闭回调
orgClose(e) {
this.org = this.orgTemp
},
// 邀请成员
toCode() {
this.$util.to(`../qrcode/qrcode?id=${this.org}`)
}
2 years ago
}
}
</script>
<style scoped lang="scss">
2 years ago
.page {
padding: 0 20px 20px;
.org-picker {
margin-bottom: 20px;
}
}
2 years ago
.slot-box {
display: flex;
flex-direction: row;
align-items: center;
}
.icon {
width: 25px;
height: 25px;
margin-right: 10px;
}
.text {
font-size: 14px;
}
</style>