|
|
|
@ -5,7 +5,7 @@ |
|
|
|
|
|
|
|
|
|
<view class="team-wrap" :style="{paddingTop: headerTop}"> |
|
|
|
|
<view v-if="platformId !== 7 && teams.length > 1" class="team"> |
|
|
|
|
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="teams" :map="{text: 'classificationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker> |
|
|
|
|
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="teams" :map="{text: 'organizationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
@ -23,7 +23,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="phone">{{ curAccount.account || info.phone }}</view> |
|
|
|
|
<view class="phone">{{ curTeam.organizationName }}</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
@ -91,7 +91,7 @@ |
|
|
|
|
<view v-if="!isMember" class="badge">{{ platformName }}负责人</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="auth" @click="toEnterAuth(platformId)"> |
|
|
|
|
{{ auditStatus }} |
|
|
|
|
{{ curTeam.authentication }} |
|
|
|
|
<uni-icons class="icon" type="right" size="16" color="#fd9413"></uni-icons> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -160,7 +160,6 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getTeamsByPlatformId } from '@/apis/modules/parner.js' |
|
|
|
|
import { viewUserDetails, enterpriseCertificationStatus, updateAvatars } from '@/apis/modules/user.js' |
|
|
|
|
import OSS from '@/libs/Oss/upload' |
|
|
|
|
import Common from '@/config/common' |
|
|
|
@ -172,6 +171,10 @@ |
|
|
|
|
platformId: uni.getStorageSync('platformId'), |
|
|
|
|
openId: uni.getStorageSync('openId'), |
|
|
|
|
userName: uni.getStorageSync('userName'), |
|
|
|
|
curTeam: { |
|
|
|
|
authentication: '', |
|
|
|
|
organizationName: '', |
|
|
|
|
}, |
|
|
|
|
teams: [], |
|
|
|
|
info: { |
|
|
|
|
authentication: '' |
|
|
|
@ -180,7 +183,6 @@ |
|
|
|
|
headerTop: 0, |
|
|
|
|
auditStatus: '', |
|
|
|
|
isMember: true, // 成员标识 |
|
|
|
|
organizationName: '', |
|
|
|
|
curAccount: { |
|
|
|
|
account: '' |
|
|
|
|
}, |
|
|
|
@ -233,8 +235,30 @@ |
|
|
|
|
this.info = result.hrUserInfo |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const org = result.organizationInfoList |
|
|
|
|
if (org && org.length) this.organizationName = org[0].organizationName |
|
|
|
|
// 团队信息 |
|
|
|
|
const org = result.organizationInfoList.filter(e => !e.isEnable) |
|
|
|
|
if (org && org.length) { |
|
|
|
|
if (this.teams) { |
|
|
|
|
/** |
|
|
|
|
* @description 如果是第一次进,则默认选中第一个团队,并把该团队的信息存入缓存 |
|
|
|
|
* 或者团队列表里没有该id,则说明超管已经被转让,也需要重新选中团队 |
|
|
|
|
*/ |
|
|
|
|
if (!uni.getStorageSync('team') || !org.find(e => e.teamId == this.teamId)) { |
|
|
|
|
this.teamId = org[0].teamId |
|
|
|
|
uni.setStorageSync('teamId', org[0].teamId) |
|
|
|
|
uni.setStorageSync('team', org[0]) |
|
|
|
|
this.curTeam = org[0] |
|
|
|
|
} else { |
|
|
|
|
this.curTeam = org.find(e => e.teamId == this.teamId) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.isMember = uni.getStorageSync('team').isTeam == 0 // 成员 |
|
|
|
|
this.teams = org |
|
|
|
|
} else { |
|
|
|
|
this.curTeam = { |
|
|
|
|
organizationName: this.info.phone |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// userAccountList里有两个身份,则显示企业的名字,否则显示个人姓名 |
|
|
|
|
const accountList = result.userAccountList |
|
|
|
@ -274,7 +298,7 @@ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.platformId !== 7 && this.getTeams() |
|
|
|
|
// this.platformId !== 7 && this.getTeams() |
|
|
|
|
}, |
|
|
|
|
// 企业认证信息 |
|
|
|
|
async getEnterInfo() { |
|
|
|
@ -284,35 +308,12 @@ |
|
|
|
|
this.enterInfo = data |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取团队信息 |
|
|
|
|
async getTeams() { |
|
|
|
|
const { data } = await getTeamsByPlatformId({platformId: this.platformId}) |
|
|
|
|
data.map(e => { |
|
|
|
|
const n = e.platformTeamClassificationList |
|
|
|
|
e.id = n.id |
|
|
|
|
// parnerId是商务经理id,teamId则是下面这个,其他地方要用的话直接uni.getStorageSync('team').partnerId去使用 |
|
|
|
|
e.teamId = e.isTeam === '1' ? +e.classificationId : n.id |
|
|
|
|
e.classificationName = n.classificationName |
|
|
|
|
delete e.platformTeamClassificationList |
|
|
|
|
}) |
|
|
|
|
if (data.length) { |
|
|
|
|
/** |
|
|
|
|
* @description 如果是第一次进,则默认选中第一个团队,并把该团队的信息存入缓存 |
|
|
|
|
* 或者团队列表里没有该id,则说明超管已经被转让,也需要重新选中团队 |
|
|
|
|
*/ |
|
|
|
|
if (!uni.getStorageSync('team') || !data.find(e => e.teamId == this.teamId)) { |
|
|
|
|
this.teamId = data[0].teamId |
|
|
|
|
uni.setStorageSync('teamId', data[0].teamId) |
|
|
|
|
uni.setStorageSync('team', data[0]) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.isMember = uni.getStorageSync('team').isTeam == 0 // 成员 |
|
|
|
|
this.teams = data |
|
|
|
|
}, |
|
|
|
|
// 团队选择回调 |
|
|
|
|
teamChange() { |
|
|
|
|
const { teamId } = this |
|
|
|
|
const e = this.teams.find(e => e.teamId == teamId) |
|
|
|
|
this.curTeam = e |
|
|
|
|
this.isMember = e.isTeam == 0 |
|
|
|
|
uni.setStorageSync('team', e) |
|
|
|
|
uni.setStorageSync('teamId', teamId) |
|
|
|
|
}, |
|
|
|
|