(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_managedata/editUser"],{304:function(e,t,n){"use strict";(function(e,t){var o=n(4);n(26);o(n(25));var a=o(n(305));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n(1)["default"],n(2)["createPage"])},305:function(e,t,n){"use strict";n.r(t);var o=n(306),a=n(308);for(var i in a)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i);n(310);var r,s=n(34),c=Object(s["default"])(a["default"],o["render"],o["staticRenderFns"],!1,null,"7b89d0dc",null,!1,o["components"],r);c.options.__file="pages_managedata/editUser.vue",t["default"]=c.exports},306:function(e,t,n){"use strict";n.r(t);var o=n(307);n.d(t,"render",(function(){return o["render"]})),n.d(t,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(t,"components",(function(){return o["components"]}))},307:function(e,t,n){"use strict";var o;n.r(t),n.d(t,"render",(function(){return a})),n.d(t,"staticRenderFns",(function(){return r})),n.d(t,"recyclableRender",(function(){return i})),n.d(t,"components",(function(){return o}));try{o={uAvatar:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-avatar/u-avatar")]).then(n.bind(null,639))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范，文档：https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范，需手动引入，并在 components 中注册该组件")}var a=function(){var e=this,t=e.$createElement;e._self._c},i=!1,r=[];a._withStripped=!0},308:function(e,t,n){"use strict";n.r(t);var o=n(309),a=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=a.a},309:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(232),a={data:function(){return{nickName:"",deptName:"",postNames:"",phonenumber:"",email:"",sexPicker:["男","女","未知"],sex:0,headImg:this.$store.state.imgpath+"/app/images/detault_head.jpg",headImgUrl:"",defaultUrl:"https://beiliyo-2025.obs.cn-north-4.myhuaweicloud.com/fs/20250606/1749180611713.png",codeimg:"",codeurlimg:"",roleNames:""}},onLoad:function(){this.getCompanyUser()},methods:{bindUser:function(t){var n=this;n.nickName=t.nickName,n.deptName=t.dept.deptName,t.posts&&(n.postNames=t.posts.map((function(e){return e.postName})).join(",")),t.roles&&(this.roleNames=t.roles.map((function(e){return e.roleName})).join(",")),n.phonenumber=t.phonenumber,n.email=t.email,n.sex=t.sex,n.utils.isEmpty(t.qrCodeWeixin)||(n.codeimg=e.getStorageSync("requestPath")+t.qrCodeWeixin,this.codeurlimg=t.qrCodeWeixin),n.utils.isEmpty(t.avatar)||(n.headImg=e.getStorageSync("requestPath")+t.avatar,this.headImgUrl=t.avatar)},getCompanyUser:function(){var e={},t=this;(0,o.getCompanyUser)(e).then((function(e){t.bindUser(e.user)}),(function(e){}))},pickerSex:function(e){this.sex=e.detail.value},chooseImage:function(){var t=this;e.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(n){e.uploadFile({url:e.getStorageSync("requestPath")+"/companyapp/app/common/upload",filePath:n.tempFilePaths[0],name:"file",formData:{user:"test"},success:function(n){console.log(n);var o=JSON.parse(n.data);t.headImg=e.getStorageSync("requestPath")+o.fileName,t.headImgUrl=o.fileName}})}})},chooseImages:function(){var t=this;e.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(n){e.uploadFile({url:e.getStorageSync("requestPath")+"/companyapp/app/common/upload",filePath:n.tempFilePaths[0],name:"file",formData:{user:"test"},success:function(n){console.log(n);var o=JSON.parse(n.data);t.codeimg=e.getStorageSync("requestPath")+o.fileName,t.codeurlimg=o.fileName}})}})},viewImage:function(){e.previewImage({urls:this.headImg,current:this.headImg})},submit:function(){if(this.utils.isEmpty(this.email))e.showToast({title:"请输入邮箱",icon:"none"});else if(this.utils.isEmpty(this.phonenumber))e.showToast({title:"请输入手机号",icon:"none"});else{var t={mobile:this.phonenumber,email:this.email,name:this.nickName,sex:this.sex.toString(),headImg:this.headImgUrl,qrCodeWeixin:this.codeurlimg};console.log(t),(0,o.setUserInfo)(t).then((function(t){200==t.code?(e.showToast({title:"修改成功",duration:2e3}),setTimeout((function(){e.navigateBack({success:function(){}})}),500)):e.showToast({title:t.msg,icon:"none"})}),(function(e){}))}}}};t.default=a}).call(this,n(2)["default"])},310:function(e,t,n){"use strict";n.r(t);var o=n(311),a=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=a.a},311:function(e,t,n){}},[[304,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../.sourcemap/mp-weixin/pages_managedata/editUser.js.map