| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pagesA-profile-mySet-setPersonData-setPersonData"],{"125b":function(e,t,i){"use strict";i("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("bf0f"),i("2797");var n=i("af8c"),a=i("3a07"),o={data:function(){return{id:"",name:"",img:"",email:"",sex:"",post:"",num:"",mobile:"",department_id:"",department_name:"",parent_id:"",parent_name:"",sexList:[{id:1,name:"男"},{id:2,name:"女"}],sexIndex:null,BASE_IMG_URL:a.BASE_IMG_URL}},onShow:function(){this.getInfo()},methods:{getInfo:function(){var e=this;(0,n.netGetUserInfo)().then((function(t){t=t.data,e.id=t.id,e.name=t.name,e.img=t.img,e.email=t.email,e.sex=t.sex,e.post=t.post,e.num=t.num,e.mobile=t.mobile,e.department_name=t.department_name,e.parent_name=t.parent_name,e.department_id=t.department_id,e.parent_id=t.parent_id}))},changeSex:function(e){this.sexIndex=e.detail.value,this.sex=this.sexList[e.detail.value].id},getPhone:function(e){var t=this;if("getPhoneNumber:ok"==e.detail.errMsg){var i=e.detail.encryptedData,n=e.detail.iv,a="";uni.login({success:function(e){a=e.code;var o={encryptedData:i,iv:n,code:a};t.bindPhone(o)}})}},bindPhone:function(e){var t=this;(0,n.netBindPhone)(e).then((function(e){t.mobile=e.data.mobile}))},changeHeaderImg:function(){var e=this;uni.chooseImage({sizeType:["compressed"],success:function(t){var i=t.tempFilePaths;i.forEach((function(t){e.uploadFile(t)}))}})},uploadFile:function(e){var t=this;uni.uploadFile({url:n.uploadUrl,name:"file",header:{token:uni.getStorageSync("token")},filePath:e,success:function(e){var i=JSON.parse(e.data);1==i.code?t.img=i.data.url:uni.showToast({title:"上传失败",icon:"none"})},fail:function(e){console.log(e)}})},saveInfo:function(){var e=this.id,t=this.name,i=this.img,a=this.email,o=this.sex,s=this.post,l=this.num,r=this.mobile,d=this.department_id,u=this.parent_id;if(t)if(s)if(r){var c={id:e,name:t,img:i,email:a,sex:o,post:s,num:l,mobile:r,department_id:d,parent_id:u};(0,n.netEditUserInfo)(c).then((function(e){uni.showToast({title:e.msg,icon:"none"}),setTimeout((function(){uni.navigateBack({delta:1})}),2e3)}))}else uni.showToast({title:"请填写手机号",icon:"none"});else uni.showToast({title:"请填写部门职务",icon:"none"});else uni.showToast({title:"请填写姓名",icon:"none"})}}};t.default=o},1295:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"set_person_data"},[i("v-uni-view",{staticClass:"set_head"},[i("v-uni-view",{staticClass:"set_img"},[i("v-uni-image",{attrs:{src:e.img?e.img:e.BASE_IMG_URL+"headImg.png",mode:"scaleToFill"}})],1),i("v-uni-view",{staticClass:"set_name",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.changeHeaderImg.apply(void 0,arguments)}}},[i("v-uni-view",[e._v("修改头像")]),i("v-uni-view",{staticClass:"iconfont icon-arrows_right"})],1)],1),i("v-uni-view",{staticClass:"fllow_form"},[i("v-uni-view",[i("v-uni-text",[e._v("*")]),e._v("姓名")],1),i("v-uni-view",{staticClass:"form_input"},[i("v-uni-input",{attrs:{type:"text","placeholder-style":"font-size:30rpx;color: #999;",placeholder:"姓名"},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}})],1)],1),i("v-uni-view",{staticClass:"fllow_form"},[i("v-uni-view",[i("v-uni-text",[e._v("*")]),e._v("部门职务")],1),i("v-uni-view",{staticClass:"form_input"},[i("v-uni-input",{attrs:{type:"text","placeholder-style":"font-size:30rpx;color: #999;",placeholder:"点击填写"},model:{value:e.post,callback:function(t){e.post=t},expression:"post"}})],1)],1),i("v-uni-view",{staticClass:"fllow_form_li"},[i("v-uni-view",[e._v("员工编号")]),i("v-uni-view",{staticClass:"form_input"},[i("v-uni-input",{attrs:{type:"text","placeholder-style":"font-size:30rpx;color: #999;",placeholder:"点击填写"},model:{value:e.num,callback:function(t){e.num=t},expression:"num"}})],1)],1),i("v-uni-view",{staticClass:"fllow_form_li"},[i("v-uni-view",[e._v("性别")]),i("v-uni-picker",{attrs:{range:e.sexList,"range-key":"name",value:e.sexIndex},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.changeSex.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"form_right"},[1==e.sex?i("v-uni-view",{staticStyle:{color:"#999"}},[e._v("男")]):e._e(),2==e.sex?i("v-uni-view",{staticStyle:{color:"#999"}},[e._v("女")]):e._e(),e.sex?e._e():i("v-uni-view",{staticStyle:{color:"#999"}},[e._v("未知")]),i("v-uni-view",{staticClass:"iconfont icon-arrows_right"})],1)],1)],1),i("v-uni-view",{staticClass:"fllow_form_li"},[i("v-uni-view",[e._v("邮箱")]),i("v-uni-view",{staticClass:"form_input"},[i("v-uni-input",{attrs:{type:"text",placeholder:"点击填写邮箱","placeholder-style":"font-size:30rpx;color: #999;"},model:{value:e.email,callback:function(t){e.email=t},expression:"email"}})],1)],1),i("v-uni-view",{staticClass:"fllow_form"},[i("v-uni-view",[i("v-uni-text",[e._v("*")]),e._v("手机号")],1),i("v-uni-view",{staticClass:"form_input"},[i("v-uni-input",{attrs:{type:"text",placeholder:"点击填写手机号","placeholder-style":"font-size:30rpx;color: #999;"},model:{value:e.mobile,callback:function(t){e.mobile=t},expression:"mobile"}})],1)],1),i("v-uni-view",{staticClass:"fllow_form_li"},[i("v-uni-view",[e._v("我的上级")]),i("v-uni-view",{staticClass:"form_input"},[i("v-uni-view",[e._v(e._s(e.parent_name?e.parent_name:""))])],1)],1),i("v-uni-view",{staticClass:"btn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.saveInfo.apply(void 0,arguments)}}},[e._v("保存")])],1)},a=[]},"74e9":function(e,t,i){"use strict";var n=i("e5fb"),a=i.n(n);a.a},"885d":function(e,t,i){var n=i("c86c");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 基本颜色 */.fllow_form_li[data-v-7b6222fe]{padding:%?24?% %?24?% %?24?% %?45?%;display:flex;justify-content:space-between;align-items:center;background-color:#fff;border-bottom:%?1?% solid #eaeaea}.fllow_form[data-v-7b6222fe]{display:flex;justify-content:space-between;align-items:center;background-color:#fff;border-bottom:%?1?% solid #eaeaea;padding:%?24?%}.form_right[data-v-7b6222fe]{display:flex;align-items:center;color:#999}.form_right uni-image[data-v-7b6222fe]{width:%?40?%;height:%?40?%;margin:%?28?% %?5?% 0 0}uni-text[data-v-7b6222fe]{color:red;margin-left:%?10?%}.form_input[data-v-7b6222fe]{height:%?60?%}.form_input uni-input[data-v-7b6222fe]{text-align:right;margin-right:%?10?%;color:#999;padding:0;height:%?60?%;line-height:%?60?%}.form_input .buttonNumber[data-v-7b6222fe]{width:%?300?%;background:#fff;font-size:%?30?%;color:#999;padding:0;text-align:right;border:none}.form_input .buttonNumber[data-v-7b6222fe]::after{border:none}.btn[data-v-7b6222fe]{width:%?680?%;height:%?80?%;border-radius:%?40?%;background:#008eff;font-size:%?26?%;color:#fff;text-align:center;line-height:%?80?%;margin:%?100?% auto}.set_person_data[data-v-7b6222fe]{font-size:%?28?%}.set_person_data .set_head[data-v-7b6222fe]{display:flex;justify-content:space-between;margin:%?30?% 0;padding:0 %?24?%;background-color:#fff;height:%?120?%;line-height:%?120?%;border-bottom:%?1?% solid #eaeaea;border-top:%?1?% solid #eaeaea}.set_person_data .set_head .set_img uni-image[data-v-7b6222fe]{vertical-align:middle;width:%?80?%;height:%?80?%;border-radius:50%}.set_person_data .set_head .set_name[data-v-7b6222fe]{display:flex}.set_person_data .set_con[data-v-7b6222fe]{display:flex;justify-content:space-between;background-color:#fff;height:%?100?%;line-height:%?100?%;padding:0 %?30?% 0 %?24?%;border-bottom:%?1?% solid #eaeaea}.set_person_data .set_con uni-text[data-v-7b6222fe]{color:#ff3b30;margin-left:%?5?%}.set_person_data .set_con .con_right[data-v-7b6222fe]{display:flex}.set_person_data .mar-b[data-v-7b6222fe]{margin-bottom:%?30?%}',""]),e.exports=t},a89d:function(e,t,i){"use strict";i.r(t);var n=i("1295"),a=i("fa26");for(var o in a)["default"].indexOf(o)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(o);i("74e9");var s=i("828b"),l=Object(s["a"])(a["default"],n["b"],n["c"],!1,null,"7b6222fe",null,!1,n["a"],void 0);t["default"]=l.exports},e5fb:function(e,t,i){var n=i("885d");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var a=i("967d").default;a("0151910c",n,!0,{sourceMap:!1,shadowMode:!1})},fa26:function(e,t,i){"use strict";i.r(t);var n=i("125b"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(o);t["default"]=a.a}}]);
|