|  |  | @ -1,26 +1,53 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | <template> |  |  |  | <template> | 
			
		
	
		
		
			
				
					
					|  |  |  | 	<cs-page title="编辑个人信息"> |  |  |  |   <cs-page isCustom> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     <template #header> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       <view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <u-icon name="arrow-left" v-if="form.mobile"></u-icon> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <text class="wd-font-800 wd-text-16">编辑个人信息</text> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     </template> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <view class="container"> |  |  |  |     <view class="container"> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <!-- 我的头像 --> |  |  |  |       <!-- 我的头像 --> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center"> |  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         <text class="wd-font-800">我的头像</text> |  |  |  |         <text class="wd-font-800">我的头像</text> | 
			
		
	
		
		
			
				
					
					|  |  |  | 				<view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |  |  |  |         <button | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 					<u-avatar src="/static/images/avatar.jpg"></u-avatar> |  |  |  |           class="wd-flex wd-flex-row wd-items-center avatarBtn" | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           style="gap: 8px" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           type="balanced" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           open-type="chooseAvatar" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           @chooseavatar="chooseAvatar" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         > | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <u-avatar :src="form.avatar"></u-avatar> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <u-icon name="arrow-right"></u-icon> |  |  |  |           <u-icon name="arrow-right"></u-icon> | 
			
		
	
		
		
			
				
					
					|  |  |  | 				</view> |  |  |  |         </button> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       </view> |  |  |  |       </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <!-- 真实姓名 --> |  |  |  |       <!-- 真实姓名 --> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center"> |  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center"> | 
			
		
	
		
		
			
				
					
					|  |  |  | 				<text class="wd-font-800">真实姓名</text> |  |  |  |         <text class="wd-font-800">姓名</text> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         <view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |  |  |  |         <view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> | 
			
		
	
		
		
			
				
					
					|  |  |  | 					<input class="wd-text-right" type="text" placeholder-class="txt" placeholder="请输入" v-model="form.realName" /> |  |  |  |           <input | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             class="wd-text-right" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             type="text" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             placeholder-class="txt" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             placeholder="请输入姓名" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             v-model="form.realName" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           /> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <u-icon name="arrow-right" color="#99A1B7" size="16"></u-icon> |  |  |  |           <u-icon name="arrow-right" color="#99A1B7" size="16"></u-icon> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </view> |  |  |  |         </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |       </view> |  |  |  |       </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <!-- 用户性别 --> |  |  |  |       <!-- 用户性别 --> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center"> |  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center"> | 
			
		
	
		
		
			
				
					
					|  |  |  | 				<text class="wd-font-800">用户性别</text> |  |  |  |         <text class="wd-font-800">性别</text> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         <view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |  |  |  |         <view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <input | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             class="wd-text-right" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             type="number" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             placeholder-class="txt" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             placeholder="请选择性别" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             v-model="form.sex" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             disabled | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             @click="showPicker()" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           /> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <u-icon name="arrow-right" color="#99A1B7" size="16"></u-icon> |  |  |  |           <u-icon name="arrow-right" color="#99A1B7" size="16"></u-icon> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </view> |  |  |  |         </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |       </view> |  |  |  |       </view> | 
			
		
	
	
		
		
			
				
					|  |  | @ -28,33 +55,108 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center"> |  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         <text class="wd-font-800">手机号码</text> |  |  |  |         <text class="wd-font-800">手机号码</text> | 
			
		
	
		
		
			
				
					
					|  |  |  |         <view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |  |  |  |         <view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> | 
			
		
	
		
		
			
				
					
					|  |  |  | 					<input class="wd-text-right" type="number" placeholder-class="txt" placeholder="请输入" v-model="form.mobile" /> |  |  |  |           <input | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             class="wd-text-right" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             type="number" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             placeholder-class="txt" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             placeholder="请输入手机号码" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             v-model="form.mobile" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           /> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <u-icon name="arrow-right" color="#99A1B7" size="16"></u-icon> |  |  |  |           <u-icon name="arrow-right" color="#99A1B7" size="16"></u-icon> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </view> |  |  |  |         </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |       </view> |  |  |  |       </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <!-- 所属部门 --> |  |  |  |       <!-- 所属部门 --> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center"> |  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center"> | 
			
		
	
		
		
			
				
					
					|  |  |  | 				<text class="wd-font-800">所属部门</text> |  |  |  |         <text class="wd-font-800">部门</text> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <input | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             class="wd-text-right" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             type="number" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             placeholder-class="txt" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             placeholder="请选择部门" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             v-model="form.dept" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             disabled | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             @click="showPicker()" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           /> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <u-icon name="arrow-right" color="#99A1B7" size="16"></u-icon> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       <!-- 身份 --> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       <view class="section wd-flex wd-flex-row wd-justify-between wd-items-center" @click="showPicker()"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <text class="wd-font-800">角色</text> | 
			
		
	
		
		
			
				
					
					|  |  |  |         <view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |  |  |  |         <view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <text v-if="form.userType">{{ $dict.echoDicValue(dictMap.wx_user_type, form.userType) }}</text> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <text class="placeholder" v-else>请选择角色</text> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <u-icon name="arrow-right" color="#99A1B7" size="16"></u-icon> |  |  |  |           <u-icon name="arrow-right" color="#99A1B7" size="16"></u-icon> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </view> |  |  |  |         </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |       </view> |  |  |  |       </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <button class="button">提交</button> |  |  |  |       <button class="button">提交</button> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </view> |  |  |  |     </view> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     <u-picker | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       :show="picker.show" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       :columns="picker.columns" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       @cancel="closePicker" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       closeOnClickOverlay | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       @close="closePicker" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     ></u-picker> | 
			
		
	
		
		
			
				
					
					|  |  |  |   </cs-page> |  |  |  |   </cs-page> | 
			
		
	
		
		
			
				
					
					|  |  |  | </template> |  |  |  | </template> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | <script> |  |  |  | <script> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import { getUserProfile, uploadAvatar } from '@/api/system/user.js' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import { getDictBatchByType } from '@/api/system/dict.js' | 
			
		
	
		
		
			
				
					
					|  |  |  | export default { |  |  |  | export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |   data() { |  |  |  |   data() { | 
			
		
	
		
		
			
				
					
					|  |  |  |     return { |  |  |  |     return { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       dictMap: {}, | 
			
		
	
		
		
			
				
					
					|  |  |  |       form: { |  |  |  |       form: { | 
			
		
	
		
		
			
				
					
					|  |  |  |         avatar: undefined, |  |  |  |         avatar: undefined, | 
			
		
	
		
		
			
				
					
					|  |  |  |         realName: undefined, |  |  |  |         realName: undefined, | 
			
		
	
		
		
			
				
					
					|  |  |  |         mobile: undefined, |  |  |  |         mobile: undefined, | 
			
		
	
		
		
			
				
					
					|  |  |  | 				department: undefined |  |  |  |         department: undefined, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         sex: undefined | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       picker: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         show: false, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         colums: [] | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   onLoad() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     this.getDict() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   onShow() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     // this.init() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   methods: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     showPicker() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.picker.show = true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     closePicker() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.picker = { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         show: false, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         colums: [] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     init() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       getUserProfile().then(res => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.form = res.data | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     getDict() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       getDictBatchByType({ type: ['system_user_sex', 'wx_user_type'].join(',') }).then(res => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.dictMap = res.data | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     chooseAvatar(e) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       const data = { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         name: 'avatarFile', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         filePath: e.detail.avatarUrl | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       uploadAvatar(data).then(res => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.init() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | </script> |  |  |  | </script> | 
			
		
	
	
		
		
			
				
					|  |  | @ -83,5 +185,21 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |     line-height: 40px; |  |  |  |     line-height: 40px; | 
			
		
	
		
		
			
				
					
					|  |  |  |     box-sizing: border-box; |  |  |  |     box-sizing: border-box; | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   .placeholder { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     color: $uni-text-color-grey; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   button { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     padding-left: 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     padding-right: 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   .avatarBtn { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     background-color: #fff; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     flex: 1; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     justify-content: flex-end; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     &::after { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       content: ''; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       display: none; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | </style> |  |  |  | </style> | 
			
		
	
	
		
		
			
				
					|  |  | 
 |