chunk-40104f98.6c9ca254.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-40104f98"],{"0fee":function(t,e,a){"use strict";a("1e0e")},"1e0e":function(t,e,a){},"5ee4":function(t,e,a){"use strict";a.r(e);var o,n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"setbox fontfpr font28"},[a("div",{staticClass:"clearfix qrcodebox",on:{click:function(e){return e.stopPropagation(),t.upload(3)}}},[a("span",{staticClass:"pull-left lh88"},[t._v("头像")]),a("van-icon",{staticClass:"pull-right mt26",attrs:{name:"arrow",color:"#999999",size:"20"},on:{click:function(e){return e.stopPropagation(),t.upload(3)}}}),t.avatarImg||t.showAvatarImg?a("img",{staticClass:"pull-right",attrs:{src:t.showAvatarImg},on:{click:function(e){return e.stopPropagation(),t.lookTap(t.showAvatarImg)}}}):t._e(),a("input",{ref:"uploadAvatarImage",attrs:{id:"uploadAvatarImage",type:"file",accept:"image/*",hidden:""},on:{change:function(e){return t.chooseAvatar(e)}}})],1),a("div",{staticClass:"personbox lh88"},[a("span",{},[t._v("姓名")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"name"}],staticClass:"right inputbox",attrs:{type:"text",placeholder:"请输入姓名"},domProps:{value:t.name},on:{change:t.editPositionName,input:function(e){e.target.composing||(t.name=e.target.value)}}})]),a("div",{staticClass:"personbox lh88"},[a("span",{},[t._v("昵称")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.nickName,expression:"nickName"}],staticClass:"right inputbox",attrs:{type:"text",placeholder:"请输入昵称"},domProps:{value:t.nickName},on:{change:t.editPositionName,input:function(e){e.target.composing||(t.nickName=e.target.value)}}})]),a("div",{staticClass:"personbox lh88"},[a("span",{},[t._v("部门")]),a("span",{},[t._v(t._s(t.$store.state.personObj.org?t.$store.state.personObj.org.name:""))])]),a("div",{staticClass:"personbox lh88"},[a("span",{},[t._v("职务")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.jobName,expression:"jobName"}],staticClass:"right inputbox",attrs:{type:"text",placeholder:"请输入职务名称"},domProps:{value:t.jobName},on:{change:t.editPositionName,input:function(e){e.target.composing||(t.jobName=e.target.value)}}})]),a("div",{staticClass:"personbox lh88"},[a("span",{},[t._v("微信号")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.wxNumber,expression:"wxNumber"}],staticClass:"right inputbox",attrs:{type:"text",placeholder:"请输入微信号"},domProps:{value:t.wxNumber},on:{change:t.editPositionName,input:function(e){e.target.composing||(t.wxNumber=e.target.value)}}})]),a("div",{staticClass:"xq-call-box"},[a("div",{staticClass:"flex align-center"},[t._v("电话")]),a("div",{staticClass:"flex align-center justify-end"},[a("span",[t._v(t._s(t.$store.state.personObj.phone))]),a("van-icon",{staticClass:"ml10",attrs:{name:"add-o",color:"#249EFB",size:"20"},on:{click:t.addOutCallPhone}})],1)]),t._l(t.outCallPhone,(function(e,o){return a("div",{key:o,staticClass:"xq-call-box"},[a("div",{staticClass:"flex align-center"},[t._v("外呼电话"+t._s(o+1))]),a("div",{staticClass:"flex align-center justify-end"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.phone,expression:"item.phone"}],attrs:{type:"text",placeholder:"请输入手机号"},domProps:{value:e.phone},on:{change:function(a){return t.checkMobile(e)},input:function(a){a.target.composing||t.$set(e,"phone",a.target.value)}}}),a("van-icon",{staticClass:"ml10",attrs:{name:"delete-o",color:"#249EFB",size:"20"},on:{click:function(e){return t.delOutCallPhone(o)}}})],1)])})),a("div",{staticClass:"clearfix qrcodebox",on:{click:function(e){return e.stopPropagation(),t.upload(1)}}},[a("span",{staticClass:"pull-left lh88"},[t._v("微信二维码")]),a("van-icon",{staticClass:"pull-right mt26",attrs:{name:"arrow",color:"#999999",size:"20"},on:{click:function(e){return e.stopPropagation(),t.upload(1)}}}),t.$store.state.personObj.qrcode&&!t.wxViewImg?a("img",{staticClass:"pull-right",attrs:{src:t.$store.state.imgUrl+"/"+t.$store.state.personObj.qrcode},on:{click:function(e){return e.stopPropagation(),t.lookTap(t.$store.state.imgUrl+"/"+t.$store.state.personObj.qrcode)}}}):[t.wxViewImg?a("img",{staticClass:"pull-right",attrs:{src:t.showWxImage},on:{click:function(e){return e.stopPropagation(),t.lookTap(t.wxViewImg)}}}):t._e()],a("input",{ref:"referenceUpload",attrs:{id:"upheadImg",type:"file",accept:"image/*",hidden:""},on:{change:function(e){return t.changeQrTap(e)}}})],2),a("div",{staticClass:"clearfix qrcodebox",on:{click:function(e){return e.stopPropagation(),t.upload(2)}}},[a("span",{staticClass:"pull-left lh88"},[t._v("形象照")]),a("van-icon",{staticClass:"pull-right mt26",attrs:{name:"arrow",color:"#999999",size:"20"},on:{click:function(e){return e.stopPropagation(),t.upload(2)}}}),t.photoImg||t.showPhotoImage?a("img",{staticClass:"pull-right",attrs:{src:t.showPhotoImage},on:{click:function(e){return e.stopPropagation(),t.lookTap(t.showPhotoImage)}}}):t._e(),a("input",{attrs:{id:"upImagePhoto",type:"file",accept:"image/*",hidden:""},on:{change:function(e){return t.changeTap(e)}}})],1),a("div",{directives:[{name:"show",rawName:"v-show",value:t.personObj.org&&2==t.personObj.org.org_type,expression:"personObj.org && personObj.org.org_type == 2"}],staticClass:"clearfix qrcodebox",on:{click:function(e){return e.stopPropagation(),t.toWorks.apply(null,arguments)}}},[a("span",{staticClass:"pull-left lh88"},[t._v("作品集")]),a("van-icon",{staticClass:"pull-right mt26",attrs:{name:"arrow",color:"#999999",size:"20"}})],1),a("wzhload",{directives:[{name:"show",rawName:"v-show",value:t.loadflag,expression:"loadflag"}]})],2)},i=[],s=a("fc11"),r=(a("be7f"),a("565f")),c=(a("4662"),a("28a2")),l=a("f3f3"),u=(a("99af"),a("b0c0"),a("ac1f"),a("1276"),a("00b4"),a("a434"),a("a15b"),a("d81d"),a("4de4"),a("d3b7"),a("18a0")),p=a.n(u),m=a("2d8e"),h=a("5880"),d={name:"set",data:function(){return{loadflag:!1,qecodeimg:"",wxViewImg:"",photoImg:"",jobName:"",nickName:"",wxNumber:"",avatarImg:"",avatarFile:"",name:"",outCallPhone:[]}},computed:Object(l["a"])(Object(l["a"])({},Object(h["mapState"])({personObj:function(t){return t.personObj},imgUrl:function(t){return t.imgUrl}})),{},{showPhotoImage:function(){return this.photoImg?"".concat(this.imgUrl,"/").concat(this.photoImg):this.personObj.image_photo},showWxImage:function(){return this.wxViewImg?"".concat(this.imgUrl,"/").concat(this.wxViewImg):this.personObj.image_photo},showAvatarImg:function(){return this.avatarImg?"".concat(this.imgUrl,"/").concat(this.avatarImg):this.personObj&&this.personObj.user?this.personObj.user.headimgurl:""}}),components:(o={},Object(s["a"])(o,c["a"].Component.name,c["a"].Component),Object(s["a"])(o,r["a"].name,r["a"]),o),methods:{lookTap:function(t){Object(c["a"])([t])},toWorks:function(){p.a.miniProgram.navigateTo({url:"/pages/other/other?type=0090"})},upload:function(t){2==t?document.getElementById("upImagePhoto").click():3==t?document.getElementById("uploadAvatarImage").click():document.getElementById("upheadImg").click()},changeQrTap:function(t){var e=this,a=t.target.files||t.dataTransfer.files;e.loadflag=!0;var o=a[0].name.split("."),n=o[o.length-1],i=new OSS({region:"oss-cn-hangzhou",accessKeyId:"LTAI5tHjWupJSCAycy2yVbQZ",accessKeySecret:"eNFicm77Cfq3u7ZnQyw1urFmFNpf3w",bucket:"zyzswzh",secure:!0}),s=new Date,r=s.getFullYear()+""+(1*s.getMonth()+1)+s.getDate();e.fileName="Employee/"+r+"/"+Date.now()+"."+n,i.multipartUpload(e.fileName,a[0]).then((function(t){e.wxViewImg=t.name,e.loadimg(t.name)})).catch((function(t){console.log(t)}))},changeTap:function(t){var e=this,a=t.target.files||t.dataTransfer.files;e.loadflag=!0;var o=a[0].name.split("."),n=o[o.length-1],i=new OSS({region:"oss-cn-hangzhou",accessKeyId:"LTAI5tHjWupJSCAycy2yVbQZ",accessKeySecret:"eNFicm77Cfq3u7ZnQyw1urFmFNpf3w",bucket:"zyzswzh",secure:!0}),s=new Date,r=s.getFullYear()+""+(1*s.getMonth()+1)+s.getDate();e.fileName="imagephoto/"+r+"/"+Date.now()+"."+n,i.multipartUpload(e.fileName,a[0]).then((function(t){e.photoImg=t.name,e.loadImagePhoto(t.name)})).catch((function(t){console.log(t)}))},chooseAvatar:function(t){var e=this,a=t.target.files||t.dataTransfer.files;e.loadflag=!0;var o=a[0].name.split("."),n=o[o.length-1],i=new OSS({region:"oss-cn-hangzhou",accessKeyId:"LTAI5tHjWupJSCAycy2yVbQZ",accessKeySecret:"eNFicm77Cfq3u7ZnQyw1urFmFNpf3w",bucket:"zyzswzh",secure:!0}),s=new Date,r=s.getFullYear()+""+(1*s.getMonth()+1)+s.getDate();e.avatarFile="imageAvatar/"+r+"/"+Date.now()+"."+n,i.multipartUpload(e.avatarFile,a[0]).then((function(t){e.avatarImg=t.name,p.a.miniProgram.postMessage({data:{type:"img",headimg:e.avatarImg}}),e.uploadAvatarImg(t.name)})).catch((function(t){console.log(t)}))},loadimg:function(t){var e=this,a={qr:t,media_id:"",weixin_media:""};Object(m["f"])(a).then((function(t){0==t.data.code&&(e.$toast("上传成功!"),e.loadflag=!1)}))},loadImagePhoto:function(t){var e=this;Object(m["d"])({image_photo:t}).then((function(t){e.loadflag=!1,0==t.data.code&&e.$toast("上传成功!")}))},uploadAvatarImg:function(t){var e=this;Object(m["i"])({headimg:t}).then((function(t){e.loadflag=!1,0==t.data.code&&e.$toast("上传成功!")}))},editPositionName:function(){var t=this;Object(m["a"])({position:this.jobName,wx:this.wxNumber,nickname:this.nickName,name:this.name}).then((function(e){0==e.data.code&&(p.a.miniProgram.postMessage({data:{type:"person",position:t.jobName,wx:t.wxNumber,nickname:t.nickName,name:t.name}}),t.$toast("编辑成功!"),t.editPosition=!1)}))},checkMobile:function(t){this.isPhoneNum(t.phone)?this.saveOutPhoneApi():(this.$toast("手机号格式不正确!"),t.phone="")},isPhoneNum:function(t){var e=/^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(17[0-9]{1})|(18[0-9]{1})|(19[0-9]{1}))+\d{8})$/;return!!e.test(t)},addOutCallPhone:function(){this.outCallPhone.push({phone:""})},delOutCallPhone:function(t){this.outCallPhone.splice(t,1),this.saveOutPhoneApi()},saveOutPhoneApi:function(){var t=this,e=this.outCallPhone.filter((function(t){return t.phone})).map((function(t){return t.phone})).join(",");Object(m["g"])({phones:e}).then((function(e){0==e.data.code&&t.$toast("保存成功")}))}},mounted:function(){var t=this;setTimeout((function(){t.jobName=t.personObj.position,t.wxNumber=t.personObj.wx,t.nickName=t.personObj.user.nickname,t.name=t.personObj.name,Array.isArray(t.personObj.out_call_phone)&&t.personObj.out_call_phone.length&&(t.outCallPhone=t.personObj.out_call_phone.map((function(t){return{phone:t}}))),t.$forceUpdate()}),800)}},g=d,f=(a("0fee"),a("2877")),v=Object(f["a"])(g,n,i,!1,null,"75ca1ee1",null);e["default"]=v.exports},"99af":function(t,e,a){"use strict";var o=a("23e7"),n=a("da84"),i=a("d039"),s=a("e8b5"),r=a("861d"),c=a("7b0b"),l=a("07fa"),u=a("8418"),p=a("65f0"),m=a("1dde"),h=a("b622"),d=a("2d00"),g=h("isConcatSpreadable"),f=9007199254740991,v="Maximum allowed index exceeded",b=n.TypeError,w=d>=51||!i((function(){var t=[];return t[g]=!1,t.concat()[0]!==t})),x=m("concat"),j=function(t){if(!r(t))return!1;var e=t[g];return void 0!==e?!!e:s(t)},C=!w||!x;o({target:"Array",proto:!0,forced:C},{concat:function(t){var e,a,o,n,i,s=c(this),r=p(s,0),m=0;for(e=-1,o=arguments.length;e<o;e++)if(i=-1===e?s:arguments[e],j(i)){if(n=l(i),m+n>f)throw b(v);for(a=0;a<n;a++,m++)a in i&&u(r,m,i[a])}else{if(m>=f)throw b(v);u(r,m++,i)}return r.length=m,r}})},a15b:function(t,e,a){"use strict";var o=a("23e7"),n=a("e330"),i=a("44ad"),s=a("fc6a"),r=a("a640"),c=n([].join),l=i!=Object,u=r("join",",");o({target:"Array",proto:!0,forced:l||!u},{join:function(t){return c(s(this),void 0===t?",":t)}})},a434:function(t,e,a){"use strict";var o=a("23e7"),n=a("da84"),i=a("23cb"),s=a("5926"),r=a("07fa"),c=a("7b0b"),l=a("65f0"),u=a("8418"),p=a("1dde"),m=p("splice"),h=n.TypeError,d=Math.max,g=Math.min,f=9007199254740991,v="Maximum allowed length exceeded";o({target:"Array",proto:!0,forced:!m},{splice:function(t,e){var a,o,n,p,m,b,w=c(this),x=r(w),j=i(t,x),C=arguments.length;if(0===C?a=o=0:1===C?(a=0,o=x-j):(a=C-2,o=g(d(s(e),0),x-j)),x+a-o>f)throw h(v);for(n=l(w,o),p=0;p<o;p++)m=j+p,m in w&&u(n,p,w[m]);if(n.length=o,a<o){for(p=j;p<x-o;p++)m=p+o,b=p+a,m in w?w[b]=w[m]:delete w[b];for(p=x;p>x-o+a;p--)delete w[p-1]}else if(a>o)for(p=x-o;p>j;p--)m=p+o-1,b=p+a-1,m in w?w[b]=w[m]:delete w[b];for(p=0;p<a;p++)w[p+j]=arguments[p+2];return w.length=x-o+a,n}})},d81d:function(t,e,a){"use strict";var o=a("23e7"),n=a("b727").map,i=a("1dde"),s=i("map");o({target:"Array",proto:!0,forced:!s},{map:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})}}]);