You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wkcrm/static/js/chunk-3b65.256afed3.js

1 line
12 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3b65"],{"+H+P":function(t,e,i){"use strict";var a={name:"EditImage",components:{VueCropper:i("fnnb").VueCropper},props:{width:{type:String,default:"450px"},title:{type:String,default:"编辑头像"},saveButtonTitle:{type:String,default:"开始上传"},show:{type:Boolean,default:!1},fixedNumber:{type:Array,default:function(){return[1,1]}},previewWidth:{type:String,default:"70px"},previewHeight:{type:String,default:"70px"},previewRadius:{type:String,default:"35px"},file:[File],image:String},data:function(){return{loading:!1,showDialog:!1,cropperImg:"",previewImg:""}},computed:{},watch:{show:{handler:function(t){this.showDialog=t},deep:!0,immediate:!0},image:function(t){this.cropperImg=t}},mounted:function(){this.cropperImg=this.image},methods:{realTime:function(t){var e=this;this.$refs.cropper.getCropData(function(t){e.previewImg=t})},submiteImage:function(){var t=this;this.$refs.cropper.getCropBlob(function(e){t.$emit("save",{blob:e,file:t.file,image:t.previewImg}),t.hiddenView()})},hiddenView:function(){this.$emit("close")}}},s=(i("0H2c"),i("KHd+")),r=Object(s.a)(a,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{title:t.title,width:t.width,"append-to-body":!0,"close-on-click-modal":!1,visible:t.showDialog},on:{"update:visible":function(e){t.showDialog=e},close:t.hiddenView}},[i("flexbox",{staticClass:"content"},[i("div",{staticClass:"cropper-box"},[i("vueCropper",{ref:"cropper",attrs:{"can-move":!0,"auto-crop":!0,fixed:!0,"fixed-number":t.fixedNumber,img:t.cropperImg,"output-type":"png"},on:{realTime:t.realTime}})],1),t._v(" "),i("div",{staticClass:"preview"},[i("div",{staticClass:"preview-name"},[t._v("预览")]),t._v(" "),i("img",{staticClass:"preview-img",style:{width:t.previewWidth,height:t.previewHeight,"border-radius":t.previewRadius},attrs:{src:t.previewImg}})])]),t._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submiteImage()}}},[t._v(t._s(t.saveButtonTitle))])],1)],1)},[],!1,null,"923b6484",null);r.options.__file="EditImage.vue";e.a=r.exports},"0H2c":function(t,e,i){"use strict";var a=i("T45K");i.n(a).a},"2f65":function(t,e,i){},"6XJn":function(t,e,i){},"7mY3":function(t,e,i){"use strict";var a=i("2f65");i.n(a).a},"9GgJ":function(t,e,i){"use strict";var a={name:"XrHeader",components:{},props:{iconClass:[String,Array],iconColor:String,label:String,showSearch:{type:Boolean,default:!1},searchIconType:{type:String,default:"text"},placeholder:{type:String,default:"请输入内容"},ftTop:{type:String,default:"15px"},content:[String,Number],inputAttr:{type:Object,default:function(){}}},data:function(){return{search:""}},computed:{},watch:{content:{handler:function(){this.search!=this.content&&(this.search=this.content)},immediate:!0}},mounted:function(){},beforeDestroy:function(){},methods:{inputChange:function(){this.$emit("update:content",this.search)},searchClick:function(){this.$emit("search",this.search)}}},s=(i("7mY3"),i("KHd+")),r=Object(s.a)(a,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("flexbox",{staticClass:"xr-header"},[t.iconClass?i("div",{staticClass:"xr-header__icon",style:{backgroundColor:t.iconColor}},[i("i",{class:t.iconClass})]):t._e(),t._v(" "),i("div",{staticClass:"xr-header__label"},[t.$slots.label?t._t("label"):[t._v(t._s(t.label))]],2),t._v(" "),t.showSearch?i("el-input",t._b({staticClass:"xr-header__search",class:{"is-text":"text"===t.searchIconType},style:{"margin-top":t.ftTop},attrs:{placeholder:t.placeholder},on:{input:t.inputChange},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.searchClick(e):null}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}},"el-input",t.inputAttr,!1),["text"===t.searchIconType?i("el-button",{attrs:{slot:"append",type:"primary"},nativeOn:{click:function(e){return t.searchClick(e)}},slot:"append"},[t._v("搜索")]):i("el-button",{attrs:{slot:"append",icon:"el-icon-search"},nativeOn:{click:function(e){return t.searchClick(e)}},slot:"append"})],1):t._e(),t._v(" "),i("div",{staticClass:"xr-header__ft",style:{top:t.ftTop}},[t._t("ft")],2)],1)},[],!1,null,"acb6d756",null);r.options.__file="index.vue";e.a=r.exports},"9OqV":function(t,e,i){"use strict";i.r(e);var a=i("EJiy"),s=i.n(a),r=i("QbLZ"),n=i.n(r),o=i("3qbY"),l=i("KTTK"),c=i("UxrY"),d=i.n(c),u=i("+H+P"),h=i("9GgJ"),p=i("L2JU"),m={name:"SystemConfig",components:{EditImage:u.a,XrHeader:h.a,RadialProgressBar:d.a},data:function(){return{loading:!1,showEditImage:!1,editImage:null,editFile:null,name:"",logo:"",save_name:""}},computed:n()({},Object(p.b)(["manage"]),{systemSaveAuth:function(){return this.manage&&this.manage.system&&this.manage.system.update}}),created:function(){this.getDetail()},methods:{fileUpload:function(t){var e=new FileReader,i=this;e.onload=function(e){var a=void 0;a="object"===s()(e.target.result)?window.URL.createObjectURL(new Blob([e.target.result])):e.target.result,i.editImage=a,i.editFile=t.file,i.showEditImage=!0},t.type="file",e.readAsDataURL(t.file)},deleteCompanyLogo:function(){this.logo="",this.save_name=""},getDetail:function(){var t=this;this.loading=!0,this.$store.dispatch("SystemLogoAndName").then(function(e){t.loading=!1;var i=e.data||{};t.name=i.name?i.name:"",t.logo=i.logo}).catch(function(){t.loading=!1})},submiteImage:function(t){var e=this;this.loading=!0,Object(l.f)({file:t.blob,type:"file"}).then(function(t){var i=t.data||{};e.logo=i.url,e.save_name=i.save_name,e.loading=!1}).catch(function(){e.loading=!1})},save:function(){var t=this;this.name?(this.loading=!0,Object(o.b)({name:this.name,logo:this.save_name}).then(function(e){t.loading=!1,t.$message.success("操作成功"),t.getDetail()}).catch(function(){t.loading=!1})):this.$message.error("企业名称不能为空")}}},g=(i("ChjE"),i("KHd+")),f=Object(g.a)(m,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("flexbox",{staticClass:"main",attrs:{direction:"column",align:"stretch"}},[i("xr-header",{attrs:{"icon-class":"wk wk-enterprise","icon-color":"#2362FB",label:"企业首页"}}),t._v(" "),i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"body"},[i("div",{staticClass:"section"},[i("div",{staticClass:"section-title"},[t._v("企业基本信息设置")]),t._v(" "),i("div",{staticClass:"section-content"},[i("div",{staticClass:"name"},[t._v("企业名称")]),t._v(" "),i("el-input",{attrs:{maxlength:50},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1),t._v(" "),i("div",{staticClass:"section-content"},[i("div",{staticClass:"name"},[t._v("企业logo")]),t._v(" "),t.logo?i("div",{staticClass:"upload-show"},[i("img",{directives:[{name:"src",rawName:"v-src",value:t.logo,expression:"logo"}]}),t._v(" "),i("i",{staticClass:"el-icon-remove icon-delete",on:{click:t.deleteCompanyLogo}})]):i("el-upload",{staticClass:"upload",attrs:{"show-file-list":!1,"http-request":t.fileUpload,drag:"",action:"http",accept:"image/png, image/jpeg, image/gif, image/jpg"}},[i("i",{staticClass:"el-icon-plus uploader-icon"})])],1)]),t._v(" "),t.systemSaveAuth?i("el-button",{staticClass:"save-button",attrs:{type:"primary"},on:{click:t.save}},[t._v("保存")]):t._e()],1),t._v(" "),i("edit-image",{attrs:{"fixed-number":[15,4],show:t.showEditImage,image:t.editImage,file:t.editFile,title:"编辑企业logo","preview-width":"150px","preview-height":"40px","preview-radius":"0",width:"550px","save-button-title":"确定"},on:{save:t.submiteImage,close:function(e){t.showEditImage=!1}}})],1)},[],!1,null,"668f9a0b",null);f.options.__file="index.vue";e.default=f.exports},ChjE:function(t,e,i){"use strict";var a=i("iPlO");i.n(a).a},T45K:function(t,e,i){},UxrY:function(t,e,i){t.exports=i("u1YS")},hb9p:function(t,e,i){"use strict";var a=i("6XJn");i.n(a).a},iPlO:function(t,e,i){},u1YS:function(t,e,i){"use strict";i.r(e);var a={props:{diameter:{type:Number,required:!1,default:200},totalSteps:{type:Number,required:!0,default:10},completedSteps:{type:Number,required:!0,default:0},startColor:{type:String,required:!1,default:"#bbff42"},stopColor:{type:String,required:!1,default:"#429321"},strokeWidth:{type:Number,required:!1,default:10},animateSpeed:{type:Number,required:!1,default:1e3},innerStrokeColor:{type:String,required:!1,default:"#323232"},fps:{type:Number,required:!1,default:60},timingFunc:{type:String,required:!1,default:"linear"}},data:()=>({gradient:{fx:.99,fy:.5,cx:.5,cy:.5,r:.65},gradientAnimation:null,currentAngle:0,strokeDashoffset:0}),computed:{radius(){return this.diameter/2},circumference(){return Math.PI*this.innerCircleDiameter},stepSize(){return 0===this.totalSteps?0:100/this.totalSteps},finishedPercentage(){return this.stepSize*this.completedSteps},circleSlice(){return 2*Math.PI/this.totalSteps},animateSlice(){return this.circleSlice/this.totalPoints},innerCircleDiameter(){return this.diameter-2*this.strokeWidth},innerCircleRadius(){return this.innerCircleDiameter/2},totalPoints(){return this.animateSpeed/this.animationIncrements},animationIncrements(){return 1e3/this.fps},hasGradient(){return this.startColor!==this.stopColor},containerStyle(){return{height:`${this.diameter}px`,width:`${this.diameter}px`}},progressStyle(){return{height:`${this.diameter}px`,width:`${this.diameter}px`,strokeWidth:`${this.strokeWidth}px`,strokeDashoffset:this.strokeDashoffset,transition:`stroke-dashoffset ${this.animateSpeed}ms ${this.timingFunc}`}},strokeStyle(){return{height:`${this.diameter}px`,width:`${this.diameter}px`,strokeWidth:`${this.strokeWidth}px`}},innerCircleStyle(){return{width:`${this.innerCircleDiameter}px`}}},methods:{getStopPointsOfCircle(t){const e=[];for(let i=0;i<t;i++){const t=this.circleSlice*i;e.push(this.getPointOfCircle(t))}return e},getPointOfCircle:t=>({x:.5+.5*Math.cos(t),y:.5+.5*Math.sin(t)}),gotoPoint(){const t=this.getPointOfCircle(this.currentAngle);this.gradient.fx=t.x,this.gradient.fy=t.y},changeProgress({isAnimate:t=!0}){if(this.strokeDashoffset=(100-this.finishedPercentage)/100*this.circumference,this.gradientAnimation&&clearInterval(this.gradientAnimation),!t)return void this.gotoNextStep();const e=(this.completedSteps-1)*this.circleSlice;let i=(this.currentAngle-e)/this.animateSlice;const a=Math.abs(i-this.totalPoints)/this.totalPoints,s=i<this.totalPoints;this.gradientAnimation=setInterval(()=>{s&&i>=this.totalPoints||!s&&i<this.totalPoints?clearInterval(this.gradientAnimation):(this.currentAngle=e+this.animateSlice*i,this.gotoPoint(),i+=s?a:-a)},this.animationIncrements)},gotoNextStep(){this.currentAngle=this.completedSteps*this.circleSlice,this.gotoPoint()}},watch:{totalSteps(){this.changeProgress({isAnimate:!0})},completedSteps(){this.changeProgress({isAnimate:!0})},diameter(){this.changeProgress({isAnimate:!0})},strokeWidth(){this.changeProgress({isAnimate:!0})}},created(){this.changeProgress({isAnimate:!1})}},s=(i("hb9p"),i("KHd+")),r=Object(s.a)(a,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"radial-progress-container",style:t.containerStyle},[i("div",{staticClass:"radial-progress-inner",style:t.innerCircleStyle},[t._t("default")],2),t._v(" "),i("svg",{staticClass:"radial-progress-bar",attrs:{width:t.diameter,height:t.diameter,version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("defs",[i("radialGradient",{attrs:{id:"radial-gradient"+t._uid,fx:t.gradient.fx,fy:t.gradient.fy,cx:t.gradient.cx,cy:t.gradient.cy,r:t.gradient.r}},[i("stop",{attrs:{offset:"30%","stop-color":t.startColor}}),t._v(" "),i("stop",{attrs:{offset:"100%","stop-color":t.stopColor}})],1)],1),t._v(" "),i("circle",{style:t.strokeStyle,attrs:{r:t.innerCircleRadius,cx:t.radius,cy:t.radius,fill:"transparent",stroke:t.innerStrokeColor,"stroke-dasharray":t.circumference,"stroke-dashoffset":"0","stroke-linecap":"round"}}),t._v(" "),i("circle",{style:t.progressStyle,attrs:{transform:"rotate(270, "+t.radius+","+t.radius+")",r:t.innerCircleRadius,cx:t.radius,cy:t.radius,fill:"transparent",stroke:"url(#radial-gradient"+t._uid+")","stroke-dasharray":t.circumference,"stroke-dashoffset":t.circumference,"stroke-linecap":"round"}})])])},[],!1,null,null,null);r.options.__file="RadialProgressBar.vue";e.default=r.exports}}]);