Browse Source

个人信息修改

西昌缴费二期
杨晓琪 2 years ago
parent
commit
0d10e5453d
2 changed files with 57 additions and 8 deletions
  1. +8
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/contact.vue
  2. +49
    -7
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/info.vue

+ 8
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/contact.vue View File

@@ -1,7 +1,6 @@
<template> <template>
<view class="page"> <view class="page">
<l-input :value="currentUser.mobile || ''" title="手机" disabled></l-input> <l-input :value="currentUser.mobile || ''" title="手机" disabled></l-input>
<l-input :value="currentUser.telephone || ''" title="电话" disabled></l-input>
<l-input :value="currentUser.email || ''" title="邮箱" disabled></l-input> <l-input :value="currentUser.email || ''" title="邮箱" disabled></l-input>
<l-input :value="currentUser.weChat || ''" title="微信" disabled></l-input> <l-input :value="currentUser.weChat || ''" title="微信" disabled></l-input>
<l-input :value="currentUser.oICQ || ''" title="QQ" disabled></l-input> <l-input :value="currentUser.oICQ || ''" title="QQ" disabled></l-input>
@@ -14,6 +13,14 @@ export default {
currentUser() { currentUser() {
return this.GET_GLOBAL('loginUser') return this.GET_GLOBAL('loginUser')
} }
},
mounted() {
this.init()
},
methods:{
init(){
console.log(this.GET_GLOBAL('loginUser'))
}
} }
} }
</script> </script>

+ 49
- 7
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/info.vue View File

@@ -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


Loading…
Cancel
Save