|
@@ -3,19 +3,60 @@ |
|
|
<l-list border> |
|
|
<l-list border> |
|
|
<l-list-item title="头像"><l-avatar :src="avatarSrc" slot="action" /></l-list-item> |
|
|
<l-list-item title="头像"><l-avatar :src="avatarSrc" slot="action" /></l-list-item> |
|
|
<l-list-item :action="currentUser.account" title="账号" /> |
|
|
<l-list-item :action="currentUser.account" title="账号" /> |
|
|
<l-list-item :action="currentUser.enCode" title="工号" /> |
|
|
|
|
|
<l-list-item :action="currentUser.realName" title="姓名" /> |
|
|
<l-list-item :action="currentUser.realName" title="姓名" /> |
|
|
<l-list-item :action="Number(currentUser.gender) === 1 ? '男' : '女'" title="性别" /> |
|
|
<l-list-item :action="Number(currentUser.gender) === 1 ? '男' : '女'" title="性别" /> |
|
|
<l-list-item :action="info.company" title="公司" /> |
|
|
|
|
|
<l-list-item :action="info.dep" title="部门" /> |
|
|
|
|
|
|
|
|
<!-- <l-list-item :action="info.company" title="公司" /> --> |
|
|
|
|
|
<!-- <template v-if="currentUser.Description=='学生'"> |
|
|
|
|
|
<l-list-item :action="info.deptNo" title="系" /> |
|
|
|
|
|
<l-list-item :action="info.dep" title="专业" /> |
|
|
|
|
|
<l-list-item :action="info.dep" title="班级" /> |
|
|
|
|
|
</template> --> |
|
|
|
|
|
<template v-if="currentUser.Description == '教师'"> |
|
|
|
|
|
<l-list-item :action="info.dep" title="部门" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
<!-- <l-list-item :action="info.dep" title="部门" /> |
|
|
<l-list-item :action="info.job" title="岗位" /> |
|
|
<l-list-item :action="info.job" title="岗位" /> |
|
|
<l-list-item :action="info.role" title="角色" /> |
|
|
|
|
|
|
|
|
<l-list-item :action="info.role" title="角色" /> --> |
|
|
</l-list> |
|
|
</l-list> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
export default { |
|
|
export default { |
|
|
|
|
|
data(){ |
|
|
|
|
|
return{ |
|
|
|
|
|
dataSource:{ |
|
|
|
|
|
Department:[] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
methods:{ |
|
|
|
|
|
init(){ |
|
|
|
|
|
this.LOADING() |
|
|
|
|
|
this.HTTP_GET("Learun/adms/EducationalAdministration/StuInfoBasic/stuinfos",{stuNo:this.currentUser.account}).then((success)=>{ |
|
|
|
|
|
this.HIDE_LOADING() |
|
|
|
|
|
if(!success){ |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
findName(array,value){ |
|
|
|
|
|
let obj = array.find(item=>item.value == value) |
|
|
|
|
|
return obj?obj['text']:value |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
onLoad() { |
|
|
|
|
|
this.FETCH_DATASOURCE('classdata').then(data => { |
|
|
|
|
|
this.dataSource.Department = data.data.map(t => ({ |
|
|
|
|
|
text: t.name, |
|
|
|
|
|
value: t.id |
|
|
|
|
|
})); |
|
|
|
|
|
}) |
|
|
|
|
|
// this.init() |
|
|
|
|
|
}, |
|
|
|
|
|
onShow() { |
|
|
|
|
|
console.log(this.currentUser) |
|
|
|
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
// 当前用户对象 |
|
|
// 当前用户对象 |
|
|
currentUser() { |
|
|
currentUser() { |
|
@@ -24,12 +65,13 @@ export default { |
|
|
|
|
|
|
|
|
// 计算出用户公司、岗位等信息 |
|
|
// 计算出用户公司、岗位等信息 |
|
|
info() { |
|
|
info() { |
|
|
const company = this.currentUser.companyId ? this.GET_GLOBAL('company')[this.currentUser.companyId].name : '' |
|
|
|
|
|
const dep = this.currentUser.departmentId ? this.GET_GLOBAL('department')[this.currentUser.departmentId].name : '' |
|
|
|
|
|
|
|
|
// const company = this.currentUser.companyId ? this.GET_GLOBAL('company')[this.currentUser.companyId]?.name : '' |
|
|
|
|
|
// const dep = this.currentUser.departmentId ? this.GET_GLOBAL('department')[this.currentUser.departmentId]?.name : '' |
|
|
|
|
|
const dep = this.findName(this.dataSource.Department,this.currentUser.departmentId) |
|
|
const role = (this.currentUser.role || []).map(t => t.F_FullName).join(' · ') |
|
|
const role = (this.currentUser.role || []).map(t => t.F_FullName).join(' · ') |
|
|
const job = (this.currentUser.post || []).map(t => t.F_Name).join(' · ') |
|
|
const job = (this.currentUser.post || []).map(t => t.F_Name).join(' · ') |
|
|
|
|
|
|
|
|
return { company, dep, role, job } |
|
|
|
|
|
|
|
|
return { dep, role, job } |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 头像图片 url |
|
|
// 头像图片 url |
|
|