gds-plus-design-vue 1.3.2 → 1.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{btnGroup.868c8549.js → btnGroup.2304f2f4.js} +1 -1
- package/lib/{btnGroup.bbf14548.mjs → btnGroup.cbaa6e6b.mjs} +14 -14
- package/lib/{components.form.9c850f56.mjs → components.form.082d9c9b.mjs} +1 -1
- package/lib/{components.form.column.bb178c13.mjs → components.form.column.cab0072e.mjs} +1 -1
- package/lib/{components.form.column.bbdd2b3a.js → components.form.column.ee06d8bb.js} +1 -1
- package/lib/{components.form.218c5703.js → components.form.f4bb9c4c.js} +1 -1
- package/lib/{components.globalheader.87083065.js → components.globalheader.5db21e71.js} +1 -1
- package/lib/{components.globalheader.c7309694.mjs → components.globalheader.c5ce924d.mjs} +1 -1
- package/lib/components.iconselector.831f847e.js +1 -0
- package/lib/{components.iconselector.d7c731b8.mjs → components.iconselector.ded60514.mjs} +20 -17
- package/lib/{components.sidenavmenu.8a971489.js → components.sidenavmenu.90170635.js} +1 -1
- package/lib/{components.sidenavmenu.d4d48a2e.mjs → components.sidenavmenu.c7b6729b.mjs} +7 -7
- package/lib/{components.table.queriesfield.0c9da7cd.mjs → components.table.queriesfield.84733bb7.mjs} +32 -32
- package/lib/components.table.queriesfield.a50919ee.js +1 -0
- package/lib/{fonticon.9adf1203.mjs → fonticon.0d9a2e23.mjs} +14 -14
- package/lib/{fonticon.1b451e1a.js → fonticon.a1263225.js} +1 -1
- package/lib/{form.designer.build.44a222b7.mjs → form.designer.build.136e3cdd.mjs} +10 -4
- package/lib/form.designer.build.7c94450d.js +1 -0
- package/lib/gd-initial.js +1 -1
- package/lib/gd-initial.mjs +14 -14
- package/lib/{http.filedocument.a10d6b67.mjs → http.filedocument.0219751b.mjs} +14 -14
- package/lib/{index.50e04b35.js → index.3a9b2d69.js} +1 -1
- package/lib/{index.08591f92.mjs → index.459a27d0.mjs} +22 -22
- package/lib/index.53b24311.js +1 -0
- package/lib/{index.55cf8b7e.js → index.6207efd7.js} +1 -1
- package/lib/{index.a32cdfa6.mjs → index.718199db.mjs} +17 -17
- package/lib/{index.dd12afc4.mjs → index.72ea6b6b.mjs} +6 -6
- package/lib/{index.d5afad7c.js → index.8c8698d0.js} +1 -1
- package/lib/{index.6faf770f.js → index.9ec72e55.js} +1 -1
- package/lib/{index.cf8bce6c.mjs → index.e051f15e.mjs} +149 -136
- package/lib/{index.b5d91f53.mjs → index.f1ecfc7f.mjs} +23 -23
- package/lib/{layoutBlocks.22969318.mjs → layoutBlocks.ec55e84e.mjs} +14 -14
- package/lib/{layoutBlocks.3326a2cf.js → layoutBlocks.ff24da6b.js} +1 -1
- package/lib/{layouts.basiclayout.d292ac35.js → layouts.basiclayout.05046cb5.js} +1 -1
- package/lib/{layouts.basiclayout.ba756cfc.mjs → layouts.basiclayout.422c6adc.mjs} +2 -2
- package/lib/{layouts.basiclayouttop.5ea4efd6.mjs → layouts.basiclayouttop.4047325d.mjs} +2 -2
- package/lib/{layouts.basiclayouttop.22fb1854.js → layouts.basiclayouttop.d6ee1637.js} +1 -1
- package/lib/{main.1fe649dd.js → main.467492ec.js} +1 -1
- package/lib/main.72c50010.mjs +941 -0
- package/lib/{main.839b7bab.mjs → main.750a686d.mjs} +1 -1
- package/lib/{main.46333cc1.js → main.77bfdb3d.js} +1 -1
- package/lib/{main.89e80afa.js → main.8024dd7b.js} +1 -1
- package/lib/{main.faec0761.mjs → main.95d3ff6c.mjs} +1 -1
- package/lib/{main.f646cd77.js → main.97e52ee0.js} +1 -1
- package/lib/{main.3781a6a9.js → main.9e4ff9c6.js} +1 -1
- package/lib/{main.9753a7a6.mjs → main.a3a8a32a.mjs} +26 -26
- package/lib/{main.5d1d8c5d.mjs → main.b7f83538.mjs} +1 -1
- package/lib/{main.c57a92f8.js → main.d19f6077.js} +1 -1
- package/lib/{main.e2e786a1.mjs → main.ff2b9dde.mjs} +1 -1
- package/lib/{mobile.designer.menutree.6ada2626.js → mobile.designer.menutree.31a0ac7c.js} +1 -1
- package/lib/{mobile.designer.menutree.5b1640f2.mjs → mobile.designer.menutree.b921fa65.mjs} +2 -2
- package/lib/{page.application.6ea9a771.mjs → page.application.72fd9f5e.mjs} +2 -2
- package/lib/{page.application.bde3a64a.js → page.application.b07312ad.js} +1 -1
- package/lib/{page.bmodule.datafiltering.1ab7a1b7.js → page.bmodule.datafiltering.50c9e358.js} +1 -1
- package/lib/{page.bmodule.datafiltering.82eb5fa8.mjs → page.bmodule.datafiltering.b3254ae9.mjs} +1 -1
- package/lib/{page.build.6447bfd6.js → page.build.5fa4a6c0.js} +1 -1
- package/lib/{page.build.a7f5bc44.mjs → page.build.d8557c78.mjs} +1 -1
- package/lib/{page.designer.layouts.b5447529.js → page.designer.layouts.351f3075.js} +1 -1
- package/lib/{page.designer.layouts.a04efb60.mjs → page.designer.layouts.5d641118.mjs} +1 -1
- package/lib/{page.designer.menutree.02ba7d2c.mjs → page.designer.menutree.34aedf7f.mjs} +491 -416
- package/lib/{page.designer.menutree.e9fcd5d7.js → page.designer.menutree.51b5e5ed.js} +1 -1
- package/lib/{page.designerp.generatorecharts.4e8fb3f2.mjs → page.designerp.generatorecharts.243dafb6.mjs} +1 -1
- package/lib/{page.designerp.generatorecharts.fee5aedd.js → page.designerp.generatorecharts.917dd008.js} +1 -1
- package/lib/{page.designerp.generatorgridmenu.d8820f3c.mjs → page.designerp.generatorgridmenu.85ed1c88.mjs} +3 -3
- package/lib/page.designerp.generatorgridmenu.ef75017c.js +1 -0
- package/lib/{page.designerp.generatortable.9d7b9b14.js → page.designerp.generatortable.79639f31.js} +1 -1
- package/lib/{page.designerp.generatortable.6011f553.mjs → page.designerp.generatortable.c4cbeb36.mjs} +1 -1
- package/lib/{page.designerp.generatortablegrid.c6e94530.js → page.designerp.generatortablegrid.2d33e24a.js} +1 -1
- package/lib/{page.designerp.generatortablegrid.5af3abfa.mjs → page.designerp.generatortablegrid.e61db667.mjs} +2 -2
- package/lib/{page.designerp.generatortree.42248e8f.mjs → page.designerp.generatortree.a26b78ae.mjs} +1 -1
- package/lib/{page.designerp.generatortree.e8320600.js → page.designerp.generatortree.f5ea6e0f.js} +1 -1
- package/lib/{page.designerp.main.8d72b4b4.js → page.designerp.main.9ac6b94e.js} +1 -1
- package/lib/{page.designerp.main.79f9b559.mjs → page.designerp.main.f05dd663.mjs} +1 -1
- package/lib/{page.designerp.properties.9e22da8e.mjs → page.designerp.properties.3bfd6455.mjs} +12 -12
- package/lib/{page.designerp.properties.e0e1b3c6.js → page.designerp.properties.e858d8e2.js} +1 -1
- package/lib/{page.designerp.propertiesbtn.40f9c7ec.mjs → page.designerp.propertiesbtn.187e7302.mjs} +1 -1
- package/lib/{page.designerp.propertiesbtn.1677b44b.js → page.designerp.propertiesbtn.d73a924e.js} +1 -1
- package/lib/{page.designerp.propertieschartbi.076e60a8.mjs → page.designerp.propertieschartbi.2d32c538.mjs} +1 -1
- package/lib/{page.designerp.propertieschartbi.f584d384.js → page.designerp.propertieschartbi.9b310756.js} +1 -1
- package/lib/{page.designerp.propertiesdrawercontainer.6aa245e7.mjs → page.designerp.propertiesdrawercontainer.40446788.mjs} +1 -1
- package/lib/{page.designerp.propertiesdrawercontainer.4602bd6f.js → page.designerp.propertiesdrawercontainer.4aa21503.js} +1 -1
- package/lib/{page.designerp.propertiesecharts.d59cc912.js → page.designerp.propertiesecharts.5002d91b.js} +1 -1
- package/lib/{page.designerp.propertiesecharts.517664c0.mjs → page.designerp.propertiesecharts.fcf3eaa6.mjs} +2 -2
- package/lib/{page.designerp.propertiesgridmenu.4113765c.js → page.designerp.propertiesgridmenu.4e7e22c0.js} +1 -1
- package/lib/{page.designerp.propertiesgridmenu.db55e28c.mjs → page.designerp.propertiesgridmenu.c7214ec6.mjs} +1 -1
- package/lib/{page.designerp.propertieslist.dda1709b.mjs → page.designerp.propertieslist.828fd439.mjs} +3 -3
- package/lib/{page.designerp.propertieslist.caa42641.js → page.designerp.propertieslist.c7d72d78.js} +1 -1
- package/lib/{page.designerp.propertiesstatistic.32f7a24d.js → page.designerp.propertiesstatistic.0f2da29f.js} +1 -1
- package/lib/{page.designerp.propertiesstatistic.4e14df8b.mjs → page.designerp.propertiesstatistic.a417c9e7.mjs} +1 -1
- package/lib/{page.designerp.propertiestable.1fdf9134.mjs → page.designerp.propertiestable.172f9499.mjs} +4 -4
- package/lib/{page.designerp.propertiestable.07b36fd6.js → page.designerp.propertiestable.658e0534.js} +1 -1
- package/lib/{page.designerp.propertiestablegrid.f606c227.mjs → page.designerp.propertiestablegrid.6b5bbe93.mjs} +5 -5
- package/lib/{page.designerp.propertiestablegrid.ccfbd8d6.js → page.designerp.propertiestablegrid.e208f5d1.js} +1 -1
- package/lib/{page.designerp.propertiestree.40f7f272.mjs → page.designerp.propertiestree.61da99df.mjs} +3 -3
- package/lib/{page.designerp.propertiestree.7848fdff.js → page.designerp.propertiestree.ee7014b7.js} +1 -1
- package/lib/page.filedocument.build.48a5874e.js +1 -0
- package/lib/{page.filedocument.build.c0f90ccd.mjs → page.filedocument.build.61f014b4.mjs} +130 -131
- package/lib/{personal.echarts.4f212a5c.mjs → personal.echarts.268fea3e.mjs} +1 -1
- package/lib/{personal.echarts.12a0fad6.js → personal.echarts.a78792db.js} +1 -1
- package/lib/{router.config.65dd255f.mjs → router.config.8be3d360.mjs} +8 -8
- package/lib/{router.config.77b867ce.js → router.config.e68a29e1.js} +1 -1
- package/lib/{search.advanced.327fd0be.mjs → search.advanced.dc688c5c.mjs} +2 -2
- package/lib/{search.advanced.be9d450f.js → search.advanced.ec1656d2.js} +1 -1
- package/lib/{solution.menu.a42e3c39.js → solution.menu.b487f819.js} +1 -1
- package/lib/{solution.menu.fe7037d5.mjs → solution.menu.eea5a105.mjs} +1 -1
- package/lib/style.css +2 -2
- package/lib/{sysComponents.7bcb6181.mjs → sysComponents.5cffa46d.mjs} +1 -1
- package/lib/{sysComponents.96b83ac9.js → sysComponents.90398324.js} +1 -1
- package/lib/{system.account.f43288ef.js → system.account.042e1580.js} +6 -6
- package/lib/{system.account.89c40faa.mjs → system.account.a315cddc.mjs} +37 -33
- package/lib/system.document.classifymanage.4daf3782.mjs +639 -0
- package/lib/system.document.classifymanage.c3771fa0.js +1 -0
- package/lib/system.document.recyclemanage.20503887.mjs +591 -0
- package/lib/system.document.recyclemanage.46e290c5.js +1 -0
- package/lib/{system.user.c90fd671.js → system.user.02e22feb.js} +4 -4
- package/lib/{system.user.3fb93f0e.mjs → system.user.98c9f5e7.mjs} +10 -4
- package/lib/{table.definition.btnconfig.edb31f00.mjs → table.definition.btnconfig.66fef981.mjs} +1 -1
- package/lib/{table.definition.btnconfig.ad94433f.js → table.definition.btnconfig.83478480.js} +1 -1
- package/lib/{table.definition.echartsconfig.1b55ec5a.js → table.definition.echartsconfig.02ff98ea.js} +1 -1
- package/lib/{table.definition.echartsconfig.11213eaa.mjs → table.definition.echartsconfig.34eea92d.mjs} +1 -1
- package/lib/{table.definition.fkconfig.c1f383ce.mjs → table.definition.fkconfig.a15d547f.mjs} +5 -5
- package/lib/{table.definition.fkconfig.0cb9807b.js → table.definition.fkconfig.cdd19291.js} +1 -1
- package/lib/{table.definition.formconfig.14140199.js → table.definition.formconfig.772f9395.js} +1 -1
- package/lib/{table.definition.formconfig.a1e3179f.mjs → table.definition.formconfig.cff793af.mjs} +2 -2
- package/lib/{utils.componentssys.js.0b63c908.mjs → utils.componentssys.js.539b7c3b.mjs} +12 -12
- package/lib/{utils.componentssys.js.85b0f05e.js → utils.componentssys.js.a28c0ac2.js} +1 -1
- package/lib/{view.build.c08b0135.mjs → view.build.c4c937d6.mjs} +5 -5
- package/lib/{view.build.9cf1f654.js → view.build.cbf165ac.js} +1 -1
- package/package.json +59 -107
- package/lib/components.iconselector.b74b573b.js +0 -1
- package/lib/components.table.queriesfield.49895bed.js +0 -1
- package/lib/form.designer.build.2b2da0f4.js +0 -1
- package/lib/index.d884234a.js +0 -1
- package/lib/main.085ed428.mjs +0 -988
- package/lib/page.designerp.generatorgridmenu.dfa1fbbb.js +0 -1
- package/lib/page.filedocument.build.54ae14c3.js +0 -1
- package/lib/system.document.1e100a7f.mjs +0 -1222
- package/lib/system.document.767210d3.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import s from "./utils.componentssys.js.
|
|
1
|
+
import s from "./utils.componentssys.js.539b7c3b.mjs";
|
|
2
2
|
import { m as n, n as r } from "./components.answerquestions.0e877977.mjs";
|
|
3
3
|
import "./utils.util.js.16b83ff8.mjs";
|
|
4
4
|
import "./core.bootstrap.604e7264.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./utils.componentssys.js.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./utils.componentssys.js.a28c0ac2.js"),n=require("./components.answerquestions.9c7165c4.js");require("./utils.util.js.dffba0f0.js");require("./core.bootstrap.bcf2d57e.js");require("./utils.language.js.7d8de345.js");require("./http.filemanage.0cf7a879.js");require("./http.questionnaire.48cbc0f7.js");require("./utils.concurrencyrequest.js.2be28956.js");const r={props:{record:{type:Object,required:!0},develop:{type:[Number,String],default:1},height:{type:Number,default:100},isFlexLayout:{type:Boolean,default:!1}},data(){return{show:!1,gdsDesignVue:null}},computed:{hasComponentItem(){return!!this.componentItem},getHeight(){const t=this.develop===1?78:102,e=this.develop===1?46+24+12:0;return this.develop===1?this.screenHeight-46-t-e:this.height-t-e},componentItem(){const t=this.gdsDesignVue[this.record.component];return t||o.default[this.record.component]},...n.mapGetters(["screenHeight"])},methods:{async init(){const t=await Promise.resolve().then(()=>require("./gd-initial.js"));this.gdsDesignVue=t,this.show=!0}},created(){this.init()},beforeDestroy(){this.gdsDesignVue=null}};var i=function(){var e=this,s=e._self._c;return s("div",[e.show&&e.hasComponentItem?s(e.componentItem,{tag:"component",attrs:{record:e.record,develop:e.develop,height:e.getHeight,isFlexLayout:e.isFlexLayout}}):e._e()],1)},u=[],c=n.normalizeComponent(r,i,u,!1,null,"74dc24f3",null,null);const a=c.exports;exports.default=a;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const H=require("./components.answerquestions.9c7165c4.js"),G=require("vue"),M=require("./http.usermanage.4abed203.js"),Y=require("./http.filemanage.0cf7a879.js"),Z=require("./http.languagemanage.e2c098ec.js"),J=require("./http.currencymanage.37ab5ced.js"),K=require("./http.timezonemanage.76bd11fa.js"),B=require("./http.legal.05562d70.js"),Q=require("./http.loginmanage.326984c3.js"),N=require("./components.settingdrawer.0eaa8a4e.js"),ee=require("./http.appmanage.b998818f.js"),U=require("./http.menumanage.6d740f2c.js"),te=s=>s&&typeof s=="object"&&"default"in s?s:{default:s},D=te(G);const ie={props:{keepAlive:{type:Boolean,default:!0},height:{type:Number,default:0}},name:"GdAccountSettings",data(){return{mode:"inline",openKeys:[],selectedKeys:[],activeIndex:"/account/settings/base",preview:{},option:{img:"/avatar2.jpg",info:!0,size:1,outputType:"jpeg",canScale:!1,autoCrop:!0,autoCropWidth:180,autoCropHeight:180,fixedBox:!0,fixed:!0,fixedNumber:[1,1]},pageTitle:""}},components:{},computed:{fadeColord(){return this.fadeColor(this.primaryColor,.1)},style(){return this.crumbsState?"margin:0 6px 6px;height: 100%;":"margin: 6px;height: 100%;"},getHeight(){return"overflow:auto;height:"+(this.screenHeight-24-20-10-5)+"px;"},getTitle(){let s="",e=this.$route.meta.title;return e==="\u57FA\u672C\u8BBE\u7F6E"?s="basicSettings":e==="\u5B89\u5168\u8BBE\u7F6E"?s="securitySetting":e==="\u4E2A\u6027\u5316\u8BBE\u7F6E"?s="personalization":e==="\u65B0\u6D88\u606F\u901A\u77E5"?s="notify":e==="\u7ED1\u5B9A\u4F01\u4E1A\u5FAE\u4FE1"&&(s="bindenterpriseWechat"),s===""?e:this.$i18nt("gd.account."+s)},...H.mapGetters(["userInfo","screenHeight","primaryColor","multiTab"])},mounted(){this.updateMenu()},methods:{onOpenChange(s,e){this.openKeys=openKeys},updateMenu(){const s=this.$route.matched.concat();this.activeIndex=s.pop().path},clickWx(s,e){const n=this.$route.matched.concat();this.activeIndex=n.pop().path},fadeColor(s,e){let n=parseInt(s.substring(1,3),16),a=parseInt(s.substring(3,5),16),u=parseInt(s.substring(5,7),16);return`rgba(${n},${a},${u},${e})`}},watch:{$route(s){this.updateMenu()}},beforeDestroy(){this._watcher&&this._watcher.teardown()}};var ne=function(){var e=this,n=e._self._c;return n("div",{staticClass:"page-header-index-wide",style:e.style},[n("el-card",{style:e.getHeight,attrs:{bordered:!1,bodyStyle:{padding:"16px 0",height:e.getHeight+"px"}}},[n("div",{staticClass:"account-settings-info-main"},[n("div",{staticClass:"account-settings-info-left",style:{"--dilute":e.fadeColord}},[n("el-menu",{staticClass:"el-menu-vertical-demo",attrs:{router:"","default-active":e.$route.path,mode:"vertical"},on:{select:e.clickWx}},[n("el-menu-item",{attrs:{index:"/account/settings/base"}},[e._v(e._s(e.$i18nt("gd.account.basicSettings")))]),n("el-menu-item",{attrs:{index:"/account/settings/security"}},[e._v(e._s(e.$i18nt("gd.account.securitySetting")))]),n("el-menu-item",{attrs:{index:"/account/settings/custom"}},[e._v(e._s(e.$i18nt("gd.account.personalization")))])],1)],1),n("div",{staticClass:"account-settings-info-right"},[n("div",{staticClass:"account-settings-info-title"},[n("span",[e._v(e._s(e.getTitle))])]),e.multiTab?n("keep-alive",[n("router-view",{key:e.$route.fullPath})],1):n("router-view",{key:e.$route.fullPath})],1)])])],1)},re=[],oe=H.normalizeComponent(ie,ne,re,!1,null,"4e8874d0",null,null);const P=oe.exports;P.install=function(s){s.component(P.name,P)};const se=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"}));const ae={props:{height:{type:Number,default:100}},name:"GdBaseSettings",components:{AvatarModal:()=>Promise.resolve().then(()=>Le)},data(){return{preview:{},sexData:[],langData:[],timezoneData:[],currencyData:[],option:{img:null,info:!0,size:1,outputType:"jpeg",canScale:!1,autoCrop:!0,autoCropWidth:180,autoCropHeight:180,fixedBox:!0,fixed:!0,fixedNumber:[1,1],birthdayString:""},spinning:!1,ruleForm:{},rules:{},timeOut:null,legalList:[],legalHasEnable:0}},computed:{getHeight(){return this.height},...H.mapGetters(["userInfo","locale","language"])},mounted(){this.initUserInfo()},methods:{initLegal(){Promise.all([this.getLegalList(),this.getLegalEnable()]).then(s=>{this.spinning=!1})},getLegalList(){B.getUserAvailLegals({}).then(s=>{s.code===200&&(this.legalList=s.data)})},getLegalEnable(){B.sysLegalEnable({}).then(s=>{s.code===200&&(this.legalHasEnable=s.data&&s.data==="true"?1:0)})},changeLanguage(s){let e=this.langData.filter(n=>n.id==s)[0];this.$store.dispatch("Language",e.code)},initUserInfo(){this.spinning=!0,this.timeOut=setTimeout(()=>{this.languageChange(),this.timezoneChange(),this.currencyChange(),D.default.ls.get("X-Legal-Entity-Id"),this.ruleForm={birthday:this.userInfo.birthday?this.userInfo.birthday:"",nickName:this.userInfo.nickname,gender:this.userInfo.gender.toString(),email:this.userInfo.email,phone:this.userInfo.phone,tel:this.userInfo.tel,languageId:this.userInfo.languageid,currencyId:this.userInfo.currencyid,timezoneId:this.userInfo.timezoneid,defaultSysLegalId:this.userInfo.defaultsyslegalid},this.birthdayString=this.userInfo.birthday,this.userInfo.avatar!=null?Y.sysFileInfoPreview({id:this.userInfo.avatar}).then(s=>{this.option.img=window.URL.createObjectURL(new Blob([s]))}).catch(s=>{this.$message.error("\u9884\u89C8\u9519\u8BEF\uFF1A"+s.message)}):this.option.img="/avatar2.jpg",this.getSexData(),this.initLegal()},100)},onChange(s,e){this.birthdayString=s},currencyChange(){J.sysCurrencyPage().then(s=>{s.success&&(this.currencyData=s.data.rows,D.default.ls.set("currencyData",s.data.rows))})},timezoneChange(){K.sysTimezonePage().then(s=>{s.success&&(this.timezoneData=s.data.rows)})},languageChange(){Z.sysLanguagePage().then(s=>{s.success&&(this.langData=s.data.rows)})},submitUserInfo(){this.spinning||this.$refs.ruleForm.validate(s=>{s&&(this.spinning=!0,M.sysUserUpdateInfo(Object.assign({},this.ruleForm,{birthday:this.birthdayString,id:this.userInfo.id})).then(e=>{if(e.success){let n=this.langData.filter(a=>a.id==this.ruleForm.languageId)[0];this.$store.dispatch("Language",n.code),this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.timeOut=setTimeout(()=>{this.$store.dispatch("GetInfo").then(()=>{})},500)}else this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message);this.spinning=!1}))})},getSexData(){this.sexData=this.$options.filters.dictData("gender")},setavatar(s){Y.sysFileInfoPreview({id:s}).then(e=>{this.option.img=window.URL.createObjectURL(new Blob([e]))}).catch(e=>{this.$message.error("\u9884\u89C8\u9519\u8BEF\uFF1A"+e.message)}),this.$store.dispatch("GetInfo").then(()=>{})}},beforeDestroy(){this.timeOut&&clearTimeout(this.timeOut),this.timeOut=null}};var ce=function(){var e=this,n=e._self._c;return n("div",{staticClass:"account-settings-info-view",staticStyle:{height:"100px"}},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{md:24,lg:16}},[n("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.spinning,expression:"spinning"}],ref:"ruleForm",attrs:{model:e.ruleForm,"label-width":"110px","label-position":"top"},nativeOn:{submit:function(a){a.preventDefault()}}},[n("el-form-item",{attrs:{label:e.$i18nt("gd.account.nickname","\u6635\u79F0"),prop:"nickName"}},[n("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.nickName,callback:function(a){e.$set(e.ruleForm,"nickName",a)},expression:"ruleForm.nickName"}})],1),n("el-form-item",{attrs:{label:e.$i18nt("gd.account.birthday","\u751F\u65E5"),prop:"birthday",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")}]}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")},on:{change:e.onChange},model:{value:e.ruleForm.birthday,callback:function(a){e.$set(e.ruleForm,"birthday",a)},expression:"ruleForm.birthday"}})],1),n("el-form-item",{attrs:{label:e.$i18nt("gd.account.sex","\u6027\u522B"),prop:"gender",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")}]}},[n("el-radio-group",{model:{value:e.ruleForm.gender,callback:function(a){e.$set(e.ruleForm,"gender",a)},expression:"ruleForm.gender"}},e._l(e.sexData,function(a,u){return n("el-radio",{key:u,attrs:{label:a.code}},[e._v(" "+e._s(a.name)+" ")])}),1)],1),n("el-form-item",{attrs:{label:e.$i18nt("gd.account.phone","\u624B\u673A\u53F7"),prop:"phone",rules:[{required:!0,message:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},{pattern:/^1[3-9]\d{9}$/,message:this.$i18nt("gd.account.phoneInvalid","\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801"),trigger:"blur"}]}},[n("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.phone,callback:function(a){e.$set(e.ruleForm,"phone",a)},expression:"ruleForm.phone"}})],1),n("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.account.tel","\u7535\u8BDD"),prop:"tel"}},[n("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.tel,callback:function(a){e.$set(e.ruleForm,"tel",a)},expression:"ruleForm.tel"}})],1),n("el-form-item",{attrs:{label:e.$i18nt("gd.account.email","\u7535\u5B50\u90AE\u4EF6"),prop:"email",rules:[{required:!0,message:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),trigger:"blur"},{type:"email",message:e.$i18nt("gd.account.emailTip","\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u53F7!"),trigger:["blur","change"]}]}},[n("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.email,callback:function(a){e.$set(e.ruleForm,"email",a)},expression:"ruleForm.email"}})],1),n("el-form-item",{attrs:{label:e.$i18nt("gd.account.language","\u9ED8\u8BA4\u8BED\u8A00"),prop:"languageId",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")}]}},[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")},on:{select:e.changeLanguage},model:{value:e.ruleForm.languageId,callback:function(a){e.$set(e.ruleForm,"languageId",a)},expression:"ruleForm.languageId"}},e._l(e.langData,function(a,u){return n("el-option",{key:u,attrs:{value:a.id,label:a.name}})}),1)],1),n("el-form-item",{attrs:{label:e.$i18nt("gd.account.currency","\u9ED8\u8BA4\u8D27\u5E01"),prop:"currencyId",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")}]}},[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")},model:{value:e.ruleForm.currencyId,callback:function(a){e.$set(e.ruleForm,"currencyId",a)},expression:"ruleForm.currencyId"}},e._l(e.currencyData,function(a,u){return n("el-option",{key:u,attrs:{value:a.id,label:a.name}})}),1)],1),n("el-form-item",{attrs:{label:e.$i18nt("gd.account.timeZone","\u9ED8\u8BA4\u65F6\u533A"),prop:"timezoneId",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")}]}},[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")},model:{value:e.ruleForm.timezoneId,callback:function(a){e.$set(e.ruleForm,"timezoneId",a)},expression:"ruleForm.timezoneId"}},e._l(e.timezoneData,function(a,u){return n("el-option",{key:u,attrs:{value:a.id,label:a.name}})}),1)],1),e.legalHasEnable?n("el-form-item",{attrs:{label:e.$i18nt("gd.user.accountSetDefault","\u9ED8\u8BA4\u8D26\u5957")}},[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),clearable:""},model:{value:e.ruleForm.defaultSysLegalId,callback:function(a){e.$set(e.ruleForm,"defaultSysLegalId",a)},expression:"ruleForm.defaultSysLegalId"}},e._l(e.legalList,function(a,u){return n("el-option",{key:a.id,attrs:{value:a.id,label:a.name}},[n("span",[e._v(e._s(a.code))]),n("span",{staticStyle:{"padding-left":"4px"}},[e._v(e._s(a.name))])])}),1)],1):e._e(),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:e.submitUserInfo}},[e._v(" "+e._s(e.$i18nt("gd.account.updateInformation","\u66F4\u65B0\u57FA\u672C\u4FE1\u606F"))+" ")])],1)],1)],1),n("el-col",{style:{minHeight:"180px"},attrs:{md:24,lg:8}},[n("div",{staticClass:"ant-upload-preview",on:{click:function(a){return e.$refs.modal.edit(e.userInfo.id)}}},[n("i",{staticClass:"el-icon-upload upload-icon"}),n("div",{staticClass:"mask"},[n("i",{staticClass:"el-icon-plus"})]),n("img",{attrs:{src:e.option.img}})])])],1),n("avatar-modal",{ref:"modal",on:{ok:e.setavatar}})],1)},le=[],he=H.normalizeComponent(ae,ce,le,!1,null,"edb9394c",null,null);const X=he.exports;X.install=function(s){s.component(X.name,X)};const ue=Object.freeze(Object.defineProperty({__proto__:null,default:X},Symbol.toStringTag,{value:"Module"}));const de={name:"GdSecuritySettings",components:{UpdPwd:()=>Promise.resolve().then(()=>Ae),weChatBind:()=>Promise.resolve().then(()=>Fe)},data(){return{isShow:!1,num:0,wxUserId:null,obj:{},appId:"",agentId:"",redirectURL:"",enterpriseNum:0,bindTitle:"\u7ED1\u5B9A\u4F01\u4E1A\u5FAE\u4FE1",dicsTitle:"",timeOut:null}},watch:{language(s,e){this.changeLanguage()},userInfo(s,e){this.changUserInfo()}},mounted(){this.init()},computed:{...H.mapGetters(["userInfo","language"])},methods:{updPwd(){this.$refs.updPwd.open(this.userInfo.account,null,1)},bind(){this.$refs.weChatBind.open(this.obj,1)},getConfigInfo(){let s={code:"GDS_ENTERPRISE_WECHAT_LOGIN"};M.getConfigInfoByCode(s).then(e=>{this.enterpriseNum=e.data.value})},getConfigsBy(){let s={strCodes:"GDS_ENTERPRISE_WECHAT_CropID,GDS_ENTERPRISE_WECHAT_AgentId,GDS_ENTERPRISE_WECHAT_Redirect_URL"};M.getConfigsByCode(s).then(e=>{e.success&&(this.obj=e)})},getData(){Q.getLoginUser().then(s=>{this.wxuserid=s.data.wxuserid})},changeLanguage(){this.init()},changUserInfo(){this.init()},init(){this.wxuserid=this.userInfo.wxuserid,this.getConfigInfo(),this.getData(),this.getConfigsBy()},getWeChat(s,e){let n=this;s.data.forEach((a,u)=>{a.code=="GDS_ENTERPRISE_WECHAT_CropID"&&(n.appId=a.value),a.code=="GDS_ENTERPRISE_WECHAT_AgentId"&&(n.agentId=a.value),a.code=="GDS_ENTERPRISE_WECHAT_Redirect_URL"&&(n.redirectURL=a.value)}),this.timeOut=setTimeout(()=>{n.wwLogin=ww.createWWLoginPanel({el:"#wx_qrcode",params:{login_type:"CorpApp",appid:n.appId,agentid:n.agentId,redirect_uri:n.redirectURL,state:"loginState",redirect_type:"callback",panel_size:"middle",lang:e=="zh_CN"?"zh":"en"},onCheckWeComLogin({isWeComLogin:a}){console.log(a)},onLoginSuccess({code:a}){n.code=a,n.$refs.updPwd.open(n.userInfo.account,a,2),console.log(a)},onLoginFail(a){}})},500)},bindCode(s){s==1||s==0?this.getData():s==-1?this.getConfigsBy():s==2&&this.getConfigsBy()}},beforeDestroy(){this._watcher&&this._watcher.teardown(),this.timeOut&&clearTimeout(this.timeOut),this.timeOut=null}};var pe=function(){var e=this,n=e._self._c;return n("div",{staticStyle:{"padding-top":"12px"}},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("div",{staticClass:"grid-content bg-purple"},[e._v(" "+e._s(e.$i18nt("gd.account.passWord","\u8D26\u6237\u5BC6\u7801"))+" ")])])],1),n("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[n("el-col",{attrs:{span:8}},[n("div",{staticClass:"grid-content strength",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.account.strength","\u5F53\u524D\u5BC6\u7801\u5F3A\u5EA6"))+":"+e._s(e.$i18nt("gd.account.strong","\u5F3A"))+" ")])]),n("el-col",{attrs:{span:16}},[n("div",{staticClass:"grid-content paw grid-flex"},[n("span",{staticClass:"active-color",staticStyle:{cursor:"pointer"},on:{click:e.updPwd}},[e._v(" "+e._s(e.$i18nt("gd.account.changePaw","\u4FEE\u6539\u5BC6\u7801"))+" ")])])])],1),n("el-divider"),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("div",{staticClass:"grid-content bd",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.account.bindenterpriseWechat","\u7ED1\u5B9A\u4F01\u4E1A\u5FAE\u4FE1"))+" ")])])],1),n("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[n("el-col",{attrs:{span:8}},[n("div",{staticClass:"grid-content state"},[e._v(" "+e._s(e.$i18nt("gd.account.currentState","\u5F53\u524D\u72B6\u6001"))+":"+e._s(e.wxUserId==null||e.wxUserId==""?e.$i18nt("gd.state.no","\u5426"):e.$i18nt("gd.state.yes","\u662F"))+" ")])]),e.wxUserId==null||e.wxUserId==""?n("el-col",{attrs:{span:16}},[n("div",{staticClass:"grid-content paw grid-flex"},[n("span",{staticClass:"active-color",staticStyle:{cursor:"pointer"},on:{click:e.bind}},[e._v(e._s(e.$i18nt("gd.account.bind","\u7ED1\u5B9A")))])])]):e._e()],1),n("upd-pwd",{ref:"updPwd",attrs:{isShow:e.isShow},on:{bindCode:e.bindCode}}),n("weChatBind",{ref:"weChatBind",on:{bindCode:e.bindCode}})],1)},ge=[],fe=H.normalizeComponent(de,pe,ge,!1,null,"dfea750c",null,null);const F=fe.exports;F.install=function(s){s.component(F.name,F)};const me=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"}));const ve={name:"GdCustomSettings",data(){return{colorList:N.colorList,options:[],homePage:["uvgsxjpu","ujhmcamph","uwcscihbx"],account:"",echartsList:[],value:0,primaryColors:this.primaryColor,propOptions:[],propOptionsOld:[],list:null,listOptions:[],listOptionsOld:[],presentText:[]}},computed:{predefine(){let s=[];return N.colorList.forEach(e=>{s.push(e.color)}),s},...H.mapGetters(["userInfo","addRouters","theme","primaryColor","echartsColor","systemInfo"])},components:{ColorEditor:()=>Promise.resolve().then(()=>require("./components.coloreditor.9820c6aa.js")).then(s=>s.main)},watch:{primaryColor(){this.primaryColors=this.primaryColor}},methods:{okColor(s){this.$store.dispatch("EchartsColor",s),this.echartsList=[...s]},getColor(){this.echartsList=[...this.echartsColor]},renew(){let s=this,e=this.homePage,n=!1;if(e.length==0&&(n=!0),e.length>1&&(n=!0),!n){s.$message.error(s.$i18nt("gd.field.replenishData","\u8BF7\u8865\u5145\u6570\u636E"));return}this.$confirm(this.$i18nt("gd.https.configThemeContent","\u662F\u5426\u66F4\u65B0\u4E2A\u4EBA\u9996\u9875\u914D\u7F6E?"),this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:this.$i18nt("gd.https.saveOk","\u786E\u5B9A\u4FDD\u5B58"),cancelButtonText:this.$i18nt("gd.https.delCancel","\u53D6\u6D88"),showClose:!1,confirmButtonLoading:!1,cancelButtonLoading:!1,closeOnClickModal:!1,type:"warning",confirmButtonClass:"el-button--danger",customClass:"custom-alert",callback:()=>{},beforeClose:(a,u,d)=>{this.renewHand(a,u,d,this.homePage)}})},renewHand(s,e,n,a){if(s!=="confirm"){n();return}let u=[],d=M.sysUserConfigTheme({configTheme:a.join(",")}).then(x=>x);u.push(d),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(u).then(x=>{n(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0;const $=x.filter(S=>!S.success);$.length===0?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$store.dispatch("GetInfo").then(()=>{})):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+$[0].message)})},init(){this.value=this.theme=="dark"?1:0,this.homePage=this.userInfo.configtheme?this.userInfo.configtheme.split(","):[],this.systemInfo.id?this.systemInfo:window.$systemInfo},lazyLoad(s,e){const{level:n,value:a}=s;if(this.options.length===0){this.geData().then(()=>{if(this.presentText.length<this.homePage.length){const u=this.options.filter(d=>d.code===this.homePage[0])[0];this.presentText=u?this.presentText.concat([u.label]):this.presentText}e(this.options)});return}this.getMenuListAll(a).then(u=>{if(this.presentText.length<this.homePage.length&&n===2){this.presentText=this.presentText.concat([s.label]);const x=s.children.filter($=>$.value===this.homePage[n])[0];this.presentText=x?this.presentText.concat([x.label]):this.presentText}const d=this.$refs.cascader.presentText;this.presentText.length===this.homePage.length&&d===null&&(this.$refs.cascader.presentText=this.presentText.join(" / ")),e(u)})},geData(){return ee.getAppList({}).then(s=>{if(s.success){let e=s.data.map(n=>{let a=this.userInfo.apps.filter(u=>u.code==n.code)[0];if(a!=null)return n.leaf=a==null,n.value=n.code,n.label=this.$i18nt(`Dynamics.${n.transkey}`,n.name),n.loading=!1,n});return e=e.filter(n=>n!==void 0),this.options=[...e],this.listOptionsOld=JSON.stringify(e),new Promise(n=>{n()})}})},getMenuListAll(s){return Promise.all([this.getMenuList({application:s}),this.sysMenuChange({application:s})]).then(e=>{let n=e[0].data,a=e[1].data;return n.map((u,d)=>{let x=a.filter($=>$.path==u.router);return n[d].value=u.router,n[d].label=this.$i18nt(`Dynamics.${u.transkey}`,u.name),n[d].leaf=u.children.length==0,n[d].disabled=x.length==0,u.children.length==0?n[d].children=null:u.children.map(($,S)=>{let k=a.filter(L=>L.path==$.router);n[d].children[S].value=$.router,n[d].children[S].label=this.$i18nt(`Dynamics.${$.transkey}`,$.name),n[d].children[S].children=[],n[d].children[S].leaf=!0,n[d].children[S].disabled=k.length==0}),u}),n.map(u=>{u.children=u.children?u.children.filter(d=>d.disabled==!1):[]}),n})},getMenuList(s){return U.getMenuList(s).then(e=>e)},sysMenuChange(s){return U.sysMenuChange(s).then(e=>e)},onChangeCascader(s){const e=this.$refs.cascader.presentText;this.presentText=e!==null?e.split(" / "):[]},onChange(s){s?this.$store.dispatch("ToggleTheme","dark"):this.$store.dispatch("ToggleTheme","light")},async changeColor(s){const e=this,n=this.primaryColor;if(typeof s!="string")return;const a=this.$message({message:e.$i18nt("gd.theme.switchingTopics","\u6B63\u5728\u5207\u6362\u4E3B\u9898..."),duration:0,iconClass:"el-icon-loading"}),u=this.getThemeCluster(s.replace("#","")),d=this.getThemeCluster(n.replace("#","")),x=(k,L)=>()=>{const O=this.getThemeCluster(this.primaryColor.replace("#","")),i=this.updateStyle(this[k],O,u);let t=document.getElementById(L);t||(t=document.createElement("style"),t.setAttribute("id",L),document.head.appendChild(t)),t.innerText=i};this.chalk||await Promise.resolve().then(()=>require("./element-theme-chalk.dee12271.js")).then(k=>{this.chalk=k.default}),x("chalk","chalk-style")(),[].slice.call(document.querySelectorAll("style")).filter(k=>{const L=k.innerText;return new RegExp(n,"i").test(L)&&!/Chalk Variables/.test(L)}).forEach(k=>{const{innerText:L}=k;typeof L=="string"&&(k.innerText=this.updateStyle(L,d,u))}),this.$store.dispatch("ToggleColor",s),window.document.body.style=`--color:${s}`,this.$nextTick(()=>{setTimeout(()=>{a.close()},200)})},updateStyle(s,e,n){let a=s;return e.forEach((u,d)=>{a=a.replace(new RegExp(u,"ig"),n[d])}),a},getThemeCluster(s){const e=(u,d)=>{let x=parseInt(u.slice(0,2),16),$=parseInt(u.slice(2,4),16),S=parseInt(u.slice(4,6),16);return d===0?[x,$,S].join(","):(x+=Math.round(d*(255-x)),$+=Math.round(d*(255-$)),S+=Math.round(d*(255-S)),x=x.toString(16),$=$.toString(16),S=S.toString(16),`#${x}${$}${S}`)},n=(u,d)=>{let x=parseInt(u.slice(0,2),16),$=parseInt(u.slice(2,4),16),S=parseInt(u.slice(4,6),16);return x=Math.round((1-d)*x),$=Math.round((1-d)*$),S=Math.round((1-d)*S),x=x.toString(16),$=$.toString(16),S=S.toString(16),`#${x}${$}${S}`},a=[s];for(let u=0;u<=9;u++)a.push(e(s,Number((u/10).toFixed(2))));return a.push(n(s,.1)),a},traverse(s,e){let n=null;const a=u=>(u=u.filter((d,x)=>(d.children&&d.children.length>0&&a(d.children),d.value==s&&(n={...d}),!0)),u);return a(this.propOptions),n}},mounted(){this.getColor(),this.init(),this.primaryColor&&(this.primaryColors=this.primaryColor)}};var we=function(){var e=this,n=e._self._c;return n("div",{staticStyle:{"padding-top":"12px"}},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("div",[e._v(e._s(e.$i18nt("gd.settings.overallStyle","\u6574\u4F53\u98CE\u683C\u8BBE\u7F6E")))])])],1),n("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[n("el-col",{attrs:{span:8}},[n("div",{staticClass:"grid-content strength",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.settings.overallStyleTip","\u6574\u4F53\u98CE\u683C\u8BBE\u7F6E"))+" ")])]),n("el-col",{attrs:{span:16}},[n("div",{staticClass:"grid-content paw grid-flex"},[n("el-switch",{attrs:{"active-text":e.$i18nt("gd.settings.darkness","\u767D\u8272"),"active-color":e.primaryColor,"inactive-text":e.$i18nt("gd.settings.white","\u6697\u8272"),"active-value":1,"inactive-value":0},on:{change:e.onChange},model:{value:e.value,callback:function(a){e.value=a},expression:"value"}})],1)])],1),n("el-divider"),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("div",[e._v(e._s(e.$i18nt("gd.settings.theme","\u4E3B\u9898\u8272")))])])],1),n("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[n("el-col",{attrs:{span:8}},[n("div",{staticClass:"grid-content strength",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.settings.themeTip","\u9875\u9762\u4E3B\u9898\u914D\u8272"))+" ")])]),n("el-col",{attrs:{span:16}},[n("div",{staticClass:"grid-content paw grid-flex"},[n("el-color-picker",{ref:"colorPicker",staticClass:"theme-picker",attrs:{size:"small",predefine:e.predefine,"popper-class":"theme-picker-dropdown"},on:{change:e.changeColor},model:{value:e.primaryColors,callback:function(a){e.primaryColors=a},expression:"primaryColors"}})],1)])],1),n("el-divider"),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("div",[e._v(e._s(e.$i18nt("gd.settings.echartsColor","\u56FE\u8868\u8272")))])])],1),n("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[n("el-col",{attrs:{span:8}},[n("div",{staticClass:"grid-content strength",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.settings.echartsColorStyle","\u56FE\u8868\u98CE\u683C\u914D\u8272"))+" ")])]),n("el-col",{attrs:{span:16}},[n("div",{staticClass:"grid-flex"},[e._l(e.echartsList,function(a,u){return[n("el-tooltip",{staticClass:"setting-drawer-theme-color-colorBlock",attrs:{content:a===0?e.$i18nt("gd.settings.followTheme","\u8DDF\u968F\u7CFB\u7EDF\u4E3B\u9898\u8272"):a}},[n("el-tag",{attrs:{color:a===0?e.primaryColor:a}})],1)]}),n("span",{staticClass:"active-color",staticStyle:{cursor:"pointer"},on:{click:function(a){return e.$refs.echartsTheme.open()}}},[e._v(" "+e._s(e.$i18nt("gd.btn.edit","\u7F16\u8F91"))+" ")])],2)])],1),n("el-divider"),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("div",[e._v(e._s(e.$i18nt("gd.settings.homepage","\u4E2A\u4EBA\u9996\u9875")))])])],1),n("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[n("el-col",{attrs:{span:8}},[n("div",{staticClass:"grid-content strength",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.settings.homepageTip","\u914D\u7F6E\u540E\u7528\u6237\u767B\u5F55\u76F4\u63A5\u8FDB\u5165\u4E2A\u4EBA\u9996\u9875"))+" ")])]),n("el-col",{attrs:{span:16}},[n("div",{staticClass:"grid-flex"},[n("el-cascader",{ref:"cascader",staticStyle:{width:"240px"},attrs:{clearable:"",props:{lazy:!0,lazyLoad:e.lazyLoad}},on:{change:e.onChangeCascader},model:{value:e.homePage,callback:function(a){e.homePage=a},expression:"homePage"}}),n("span",{staticClass:"active-color",staticStyle:{"margin-left":"10px",cursor:"pointer"},on:{click:e.renew}},[e._v(" "+e._s(e.$i18nt("gd.btn.update","\u66F4\u65B0"))+" ")])],1)])],1),n("el-divider"),n("ColorEditor",{ref:"echartsTheme",on:{ok:e.okColor}})],1)},xe=[],be=H.normalizeComponent(ve,we,xe,!1,null,"c49edd36",null,null);const z=be.exports;z.install=function(s){s.component(z.name,z)};const Ce=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"}));var j={exports:{}};(function(s,e){(function(n,a){s.exports=a()})(window,function(){return function(n){var a={};function u(d){if(a[d])return a[d].exports;var x=a[d]={i:d,l:!1,exports:{}};return n[d].call(x.exports,x,x.exports,u),x.l=!0,x.exports}return u.m=n,u.c=a,u.d=function(d,x,$){u.o(d,x)||Object.defineProperty(d,x,{enumerable:!0,get:$})},u.r=function(d){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})},u.t=function(d,x){if(1&x&&(d=u(d)),8&x||4&x&&typeof d=="object"&&d&&d.__esModule)return d;var $=Object.create(null);if(u.r($),Object.defineProperty($,"default",{enumerable:!0,value:d}),2&x&&typeof d!="string")for(var S in d)u.d($,S,function(k){return d[k]}.bind(null,S));return $},u.n=function(d){var x=d&&d.__esModule?function(){return d.default}:function(){return d};return u.d(x,"a",x),x},u.o=function(d,x){return Object.prototype.hasOwnProperty.call(d,x)},u.p="",u(u.s=6)}([function(n,a,u){var d=u(2);typeof d=="string"&&(d=[[n.i,d,""]]);var x={hmr:!0,transform:void 0,insertInto:void 0};u(4)(d,x),d.locals&&(n.exports=d.locals)},function(n,a,u){var d=u(0);u.n(d).a},function(n,a,u){(n.exports=u(3)(!1)).push([n.i,`
|
|
1
|
+
"use strict";const H=require("./components.answerquestions.9c7165c4.js"),G=require("vue"),M=require("./http.usermanage.4abed203.js"),Y=require("./http.filemanage.0cf7a879.js"),Z=require("./http.languagemanage.e2c098ec.js"),J=require("./http.currencymanage.37ab5ced.js"),K=require("./http.timezonemanage.76bd11fa.js"),B=require("./http.legal.05562d70.js"),Q=require("./http.loginmanage.326984c3.js"),N=require("./components.settingdrawer.0eaa8a4e.js"),ee=require("./http.appmanage.b998818f.js"),U=require("./http.menumanage.6d740f2c.js"),te=s=>s&&typeof s=="object"&&"default"in s?s:{default:s},D=te(G);const ne={props:{keepAlive:{type:Boolean,default:!0},height:{type:Number,default:0}},name:"GdAccountSettings",data(){return{mode:"inline",openKeys:[],selectedKeys:[],activeIndex:"/account/settings/base",preview:{},option:{img:"/avatar2.jpg",info:!0,size:1,outputType:"jpeg",canScale:!1,autoCrop:!0,autoCropWidth:180,autoCropHeight:180,fixedBox:!0,fixed:!0,fixedNumber:[1,1]},pageTitle:""}},components:{},computed:{fadeColord(){return this.fadeColor(this.primaryColor,.1)},style(){return this.crumbsState?"margin:0 6px 6px;height: 100%;":"margin: 6px;height: 100%;"},getHeight(){return"overflow:auto;height:"+(this.screenHeight-24-20-10-5)+"px;"},getTitle(){let s="",e=this.$route.meta.title;return e==="\u57FA\u672C\u8BBE\u7F6E"?s="basicSettings":e==="\u5B89\u5168\u8BBE\u7F6E"?s="securitySetting":e==="\u4E2A\u6027\u5316\u8BBE\u7F6E"?s="personalization":e==="\u65B0\u6D88\u606F\u901A\u77E5"?s="notify":e==="\u7ED1\u5B9A\u4F01\u4E1A\u5FAE\u4FE1"&&(s="bindenterpriseWechat"),s===""?e:this.$i18nt("gd.account."+s)},...H.mapGetters(["userInfo","screenHeight","primaryColor","multiTab"])},mounted(){this.updateMenu()},methods:{onOpenChange(s,e){this.openKeys=openKeys},updateMenu(){const s=this.$route.matched.concat();this.activeIndex=s.pop().path},clickWx(s,e){const i=this.$route.matched.concat();this.activeIndex=i.pop().path},fadeColor(s,e){let i=parseInt(s.substring(1,3),16),a=parseInt(s.substring(3,5),16),u=parseInt(s.substring(5,7),16);return`rgba(${i},${a},${u},${e})`}},watch:{$route(s){this.updateMenu()}},beforeDestroy(){this._watcher&&this._watcher.teardown()}};var ie=function(){var e=this,i=e._self._c;return i("div",{staticClass:"page-header-index-wide",style:e.style},[i("el-card",{style:e.getHeight,attrs:{bordered:!1,bodyStyle:{padding:"16px 0",height:e.getHeight+"px"}}},[i("div",{staticClass:"account-settings-info-main"},[i("div",{staticClass:"account-settings-info-left",style:{"--dilute":e.fadeColord}},[i("el-menu",{staticClass:"el-menu-vertical-demo",attrs:{router:"","default-active":e.$route.path,mode:"vertical"},on:{select:e.clickWx}},[i("el-menu-item",{attrs:{index:"/account/settings/base"}},[e._v(e._s(e.$i18nt("gd.account.basicSettings")))]),i("el-menu-item",{attrs:{index:"/account/settings/security"}},[e._v(e._s(e.$i18nt("gd.account.securitySetting")))]),i("el-menu-item",{attrs:{index:"/account/settings/custom"}},[e._v(e._s(e.$i18nt("gd.account.personalization")))])],1)],1),i("div",{staticClass:"account-settings-info-right"},[i("div",{staticClass:"account-settings-info-title"},[i("span",[e._v(e._s(e.getTitle))])]),e.multiTab?i("keep-alive",[i("router-view",{key:e.$route.fullPath})],1):i("router-view",{key:e.$route.fullPath})],1)])])],1)},re=[],oe=H.normalizeComponent(ne,ie,re,!1,null,"4e8874d0",null,null);const P=oe.exports;P.install=function(s){s.component(P.name,P)};const se=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"}));const ae={props:{height:{type:Number,default:100}},name:"GdBaseSettings",components:{AvatarModal:()=>Promise.resolve().then(()=>Le)},data(){return{preview:{},sexData:[],langData:[],timezoneData:[],currencyData:[],option:{img:null,info:!0,size:1,outputType:"jpeg",canScale:!1,autoCrop:!0,autoCropWidth:180,autoCropHeight:180,fixedBox:!0,fixed:!0,fixedNumber:[1,1],birthdayString:""},spinning:!1,ruleForm:{},rules:{},timeOut:null,legalList:[],legalHasEnable:0}},computed:{getHeight(){return this.height},...H.mapGetters(["userInfo","locale","language"])},mounted(){this.initLegal()},methods:{initLegal(){this.spinning=!0,Promise.all([this.getLegalList(),this.getLegalEnable(),this.languageChange(),this.timezoneChange(),this.currencyChange()]).then(s=>{this.initUserInfo()})},getLegalList(){B.getUserAvailLegals({}).then(s=>{s.code===200&&(this.legalList=s.data)})},getLegalEnable(){B.sysLegalEnable({}).then(s=>{s.code===200&&(this.legalHasEnable=s.data&&s.data==="true"?1:0)})},changeLanguage(s){let e=this.langData.filter(i=>i.id==s)[0];this.$store.dispatch("Language",e.code)},initUserInfo(){this.timeOut=setTimeout(()=>{D.default.ls.get("X-Legal-Entity-Id"),this.ruleForm={birthday:this.userInfo.birthday?this.userInfo.birthday:"",nickName:this.userInfo.nickname,gender:this.userInfo.gender.toString(),email:this.userInfo.email,phone:this.userInfo.phone,tel:this.userInfo.tel,languageId:this.userInfo.languageid,currencyId:this.userInfo.currencyid,timezoneId:this.userInfo.timezoneid,defaultSysLegalId:this.userInfo.defaultsyslegalid},this.birthdayString=this.userInfo.birthday,this.userInfo.avatar!=null?Y.sysFileInfoPreview({id:this.userInfo.avatar}).then(s=>{this.option.img=window.URL.createObjectURL(new Blob([s]))}).catch(s=>{this.$message.error("\u9884\u89C8\u9519\u8BEF\uFF1A"+s.message)}):this.option.img="/avatar2.jpg",this.spinning=!1,this.getSexData()},100)},onChange(s,e){this.birthdayString=s},currencyChange(){return J.sysCurrencyPage().then(s=>(s.success&&(this.currencyData=s.data.rows,D.default.ls.set("currencyData",s.data.rows)),s))},timezoneChange(){return K.sysTimezonePage().then(s=>(s.success&&(this.timezoneData=s.data.rows),s))},languageChange(){return Z.sysLanguagePage().then(s=>(s.success&&(this.langData=s.data.rows),s))},submitUserInfo(){this.spinning||this.$refs.ruleForm.validate(s=>{s&&(this.spinning=!0,M.sysUserUpdateInfo(Object.assign({},this.ruleForm,{birthday:this.birthdayString,id:this.userInfo.id})).then(e=>{if(e.success){let i=this.langData.filter(a=>a.id==this.ruleForm.languageId)[0];this.$store.dispatch("Language",i.code),this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.timeOut=setTimeout(()=>{this.$store.dispatch("GetInfo").then(()=>{})},500)}else this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message);this.spinning=!1}))})},getSexData(){this.sexData=this.$options.filters.dictData("gender")},setavatar(s){Y.sysFileInfoPreview({id:s}).then(e=>{this.option.img=window.URL.createObjectURL(new Blob([e]))}).catch(e=>{this.$message.error("\u9884\u89C8\u9519\u8BEF\uFF1A"+e.message)}),this.$store.dispatch("GetInfo").then(()=>{})}},beforeDestroy(){this.timeOut&&clearTimeout(this.timeOut),this.timeOut=null}};var ce=function(){var e=this,i=e._self._c;return i("div",{staticClass:"account-settings-info-view",staticStyle:{height:"100px"}},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{md:24,lg:16}},[i("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.spinning,expression:"spinning"}],ref:"ruleForm",attrs:{model:e.ruleForm,"label-width":"110px","label-position":"top"},nativeOn:{submit:function(a){a.preventDefault()}}},[i("el-form-item",{attrs:{label:e.$i18nt("gd.account.nickname","\u6635\u79F0"),prop:"nickName"}},[i("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.nickName,callback:function(a){e.$set(e.ruleForm,"nickName",a)},expression:"ruleForm.nickName"}})],1),i("el-form-item",{attrs:{label:e.$i18nt("gd.account.birthday","\u751F\u65E5"),prop:"birthday",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")}]}},[i("el-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")},on:{change:e.onChange},model:{value:e.ruleForm.birthday,callback:function(a){e.$set(e.ruleForm,"birthday",a)},expression:"ruleForm.birthday"}})],1),i("el-form-item",{attrs:{label:e.$i18nt("gd.account.sex","\u6027\u522B"),prop:"gender",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")}]}},[i("el-radio-group",{model:{value:e.ruleForm.gender,callback:function(a){e.$set(e.ruleForm,"gender",a)},expression:"ruleForm.gender"}},e._l(e.sexData,function(a,u){return i("el-radio",{key:u,attrs:{label:a.code}},[e._v(" "+e._s(a.name)+" ")])}),1)],1),i("el-form-item",{attrs:{label:e.$i18nt("gd.account.phone","\u624B\u673A\u53F7"),prop:"phone",rules:[{required:!0,message:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},{pattern:/^1[3-9]\d{9}$/,message:this.$i18nt("gd.account.phoneInvalid","\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801"),trigger:"blur"}]}},[i("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.phone,callback:function(a){e.$set(e.ruleForm,"phone",a)},expression:"ruleForm.phone"}})],1),i("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.account.tel","\u7535\u8BDD"),prop:"tel"}},[i("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.tel,callback:function(a){e.$set(e.ruleForm,"tel",a)},expression:"ruleForm.tel"}})],1),i("el-form-item",{attrs:{label:e.$i18nt("gd.account.email","\u7535\u5B50\u90AE\u4EF6"),prop:"email",rules:[{required:!0,message:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),trigger:"blur"},{type:"email",message:e.$i18nt("gd.account.emailTip","\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u53F7!"),trigger:["blur","change"]}]}},[i("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.email,callback:function(a){e.$set(e.ruleForm,"email",a)},expression:"ruleForm.email"}})],1),i("el-form-item",{attrs:{label:e.$i18nt("gd.account.language","\u9ED8\u8BA4\u8BED\u8A00"),prop:"languageId",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")}]}},[i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")},on:{select:e.changeLanguage},model:{value:e.ruleForm.languageId,callback:function(a){e.$set(e.ruleForm,"languageId",a)},expression:"ruleForm.languageId"}},e._l(e.langData,function(a,u){return i("el-option",{key:u,attrs:{value:a.id,label:a.name}})}),1)],1),i("el-form-item",{attrs:{label:e.$i18nt("gd.account.currency","\u9ED8\u8BA4\u8D27\u5E01"),prop:"currencyId",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")}]}},[i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")},model:{value:e.ruleForm.currencyId,callback:function(a){e.$set(e.ruleForm,"currencyId",a)},expression:"ruleForm.currencyId"}},e._l(e.currencyData,function(a,u){return i("el-option",{key:u,attrs:{value:a.id,label:a.name}})}),1)],1),i("el-form-item",{attrs:{label:e.$i18nt("gd.account.timeZone","\u9ED8\u8BA4\u65F6\u533A"),prop:"timezoneId",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")}]}},[i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9")},model:{value:e.ruleForm.timezoneId,callback:function(a){e.$set(e.ruleForm,"timezoneId",a)},expression:"ruleForm.timezoneId"}},e._l(e.timezoneData,function(a,u){return i("el-option",{key:u,attrs:{value:a.id,label:a.name}})}),1)],1),e.legalHasEnable?i("el-form-item",{attrs:{label:e.$i18nt("gd.user.accountSetDefault","\u9ED8\u8BA4\u8D26\u5957")}},[i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),clearable:""},model:{value:e.ruleForm.defaultSysLegalId,callback:function(a){e.$set(e.ruleForm,"defaultSysLegalId",a)},expression:"ruleForm.defaultSysLegalId"}},e._l(e.legalList,function(a,u){return i("el-option",{key:a.id,attrs:{value:a.id,label:a.name}},[i("span",[e._v(e._s(a.code))]),i("span",{staticStyle:{"padding-left":"4px"}},[e._v(e._s(a.name))])])}),1)],1):e._e(),i("el-form-item",[i("el-button",{attrs:{type:"primary"},on:{click:e.submitUserInfo}},[e._v(" "+e._s(e.$i18nt("gd.account.updateInformation","\u66F4\u65B0\u57FA\u672C\u4FE1\u606F"))+" ")])],1)],1)],1),i("el-col",{style:{minHeight:"180px"},attrs:{md:24,lg:8}},[i("div",{staticClass:"ant-upload-preview",on:{click:function(a){return e.$refs.modal.edit(e.userInfo.id)}}},[i("i",{staticClass:"el-icon-upload upload-icon"}),i("div",{staticClass:"mask"},[i("i",{staticClass:"el-icon-plus"})]),i("img",{attrs:{src:e.option.img}})])])],1),i("avatar-modal",{ref:"modal",on:{ok:e.setavatar}})],1)},le=[],he=H.normalizeComponent(ae,ce,le,!1,null,"2025c427",null,null);const X=he.exports;X.install=function(s){s.component(X.name,X)};const ue=Object.freeze(Object.defineProperty({__proto__:null,default:X},Symbol.toStringTag,{value:"Module"}));const de={name:"GdSecuritySettings",components:{UpdPwd:()=>Promise.resolve().then(()=>Ae),weChatBind:()=>Promise.resolve().then(()=>Fe)},data(){return{isShow:!1,num:0,wxUserId:null,obj:{},appId:"",agentId:"",redirectURL:"",enterpriseNum:0,bindTitle:"\u7ED1\u5B9A\u4F01\u4E1A\u5FAE\u4FE1",dicsTitle:"",timeOut:null}},watch:{language(s,e){this.changeLanguage()},userInfo(s,e){this.changUserInfo()}},mounted(){this.init()},computed:{...H.mapGetters(["userInfo","language"])},methods:{updPwd(){this.$refs.updPwd.open(this.userInfo.account,null,1)},bind(){this.$refs.weChatBind.open(this.obj,1)},getConfigInfo(){let s={code:"GDS_ENTERPRISE_WECHAT_LOGIN"};M.getConfigInfoByCode(s).then(e=>{this.enterpriseNum=e.data.value})},getConfigsBy(){let s={strCodes:"GDS_ENTERPRISE_WECHAT_CropID,GDS_ENTERPRISE_WECHAT_AgentId,GDS_ENTERPRISE_WECHAT_Redirect_URL"};M.getConfigsByCode(s).then(e=>{e.success&&(this.obj=e)})},getData(){Q.getLoginUser().then(s=>{this.wxuserid=s.data.wxuserid})},changeLanguage(){this.init()},changUserInfo(){this.init()},init(){this.wxuserid=this.userInfo.wxuserid,this.getConfigInfo(),this.getData(),this.getConfigsBy()},getWeChat(s,e){let i=this;s.data.forEach((a,u)=>{a.code=="GDS_ENTERPRISE_WECHAT_CropID"&&(i.appId=a.value),a.code=="GDS_ENTERPRISE_WECHAT_AgentId"&&(i.agentId=a.value),a.code=="GDS_ENTERPRISE_WECHAT_Redirect_URL"&&(i.redirectURL=a.value)}),this.timeOut=setTimeout(()=>{i.wwLogin=ww.createWWLoginPanel({el:"#wx_qrcode",params:{login_type:"CorpApp",appid:i.appId,agentid:i.agentId,redirect_uri:i.redirectURL,state:"loginState",redirect_type:"callback",panel_size:"middle",lang:e=="zh_CN"?"zh":"en"},onCheckWeComLogin({isWeComLogin:a}){console.log(a)},onLoginSuccess({code:a}){i.code=a,i.$refs.updPwd.open(i.userInfo.account,a,2),console.log(a)},onLoginFail(a){}})},500)},bindCode(s){s==1||s==0?this.getData():s==-1?this.getConfigsBy():s==2&&this.getConfigsBy()}},beforeDestroy(){this._watcher&&this._watcher.teardown(),this.timeOut&&clearTimeout(this.timeOut),this.timeOut=null}};var pe=function(){var e=this,i=e._self._c;return i("div",{staticStyle:{"padding-top":"12px"}},[i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:24}},[i("div",{staticClass:"grid-content bg-purple"},[e._v(" "+e._s(e.$i18nt("gd.account.passWord","\u8D26\u6237\u5BC6\u7801"))+" ")])])],1),i("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[i("el-col",{attrs:{span:8}},[i("div",{staticClass:"grid-content strength",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.account.strength","\u5F53\u524D\u5BC6\u7801\u5F3A\u5EA6"))+":"+e._s(e.$i18nt("gd.account.strong","\u5F3A"))+" ")])]),i("el-col",{attrs:{span:16}},[i("div",{staticClass:"grid-content paw grid-flex"},[i("span",{staticClass:"active-color",staticStyle:{cursor:"pointer"},on:{click:e.updPwd}},[e._v(" "+e._s(e.$i18nt("gd.account.changePaw","\u4FEE\u6539\u5BC6\u7801"))+" ")])])])],1),i("el-divider"),i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:24}},[i("div",{staticClass:"grid-content bd",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.account.bindenterpriseWechat","\u7ED1\u5B9A\u4F01\u4E1A\u5FAE\u4FE1"))+" ")])])],1),i("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[i("el-col",{attrs:{span:8}},[i("div",{staticClass:"grid-content state"},[e._v(" "+e._s(e.$i18nt("gd.account.currentState","\u5F53\u524D\u72B6\u6001"))+":"+e._s(e.wxUserId==null||e.wxUserId==""?e.$i18nt("gd.state.no","\u5426"):e.$i18nt("gd.state.yes","\u662F"))+" ")])]),e.wxUserId==null||e.wxUserId==""?i("el-col",{attrs:{span:16}},[i("div",{staticClass:"grid-content paw grid-flex"},[i("span",{staticClass:"active-color",staticStyle:{cursor:"pointer"},on:{click:e.bind}},[e._v(e._s(e.$i18nt("gd.account.bind","\u7ED1\u5B9A")))])])]):e._e()],1),i("upd-pwd",{ref:"updPwd",attrs:{isShow:e.isShow},on:{bindCode:e.bindCode}}),i("weChatBind",{ref:"weChatBind",on:{bindCode:e.bindCode}})],1)},ge=[],fe=H.normalizeComponent(de,pe,ge,!1,null,"dfea750c",null,null);const F=fe.exports;F.install=function(s){s.component(F.name,F)};const me=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"}));const ve={name:"GdCustomSettings",data(){return{colorList:N.colorList,options:[],homePage:["uvgsxjpu","ujhmcamph","uwcscihbx"],account:"",echartsList:[],value:0,primaryColors:this.primaryColor,propOptions:[],propOptionsOld:[],list:null,listOptions:[],listOptionsOld:[],presentText:[]}},computed:{predefine(){let s=[];return N.colorList.forEach(e=>{s.push(e.color)}),s},...H.mapGetters(["userInfo","addRouters","theme","primaryColor","echartsColor","systemInfo"])},components:{ColorEditor:()=>Promise.resolve().then(()=>require("./components.coloreditor.9820c6aa.js")).then(s=>s.main)},watch:{primaryColor(){this.primaryColors=this.primaryColor}},methods:{okColor(s){this.$store.dispatch("EchartsColor",s),this.echartsList=[...s]},getColor(){this.echartsList=[...this.echartsColor]},renew(){let s=this,e=this.homePage,i=!1;if(e.length==0&&(i=!0),e.length>1&&(i=!0),!i){s.$message.error(s.$i18nt("gd.field.replenishData","\u8BF7\u8865\u5145\u6570\u636E"));return}this.$confirm(this.$i18nt("gd.https.configThemeContent","\u662F\u5426\u66F4\u65B0\u4E2A\u4EBA\u9996\u9875\u914D\u7F6E?"),this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:this.$i18nt("gd.https.saveOk","\u786E\u5B9A\u4FDD\u5B58"),cancelButtonText:this.$i18nt("gd.https.delCancel","\u53D6\u6D88"),showClose:!1,confirmButtonLoading:!1,cancelButtonLoading:!1,closeOnClickModal:!1,type:"warning",confirmButtonClass:"el-button--danger",customClass:"custom-alert",callback:()=>{},beforeClose:(a,u,d)=>{this.renewHand(a,u,d,this.homePage)}})},renewHand(s,e,i,a){if(s!=="confirm"){i();return}let u=[],d=M.sysUserConfigTheme({configTheme:a.join(",")}).then(x=>x);u.push(d),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(u).then(x=>{i(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0;const $=x.filter(S=>!S.success);$.length===0?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$store.dispatch("GetInfo").then(()=>{})):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+$[0].message)})},init(){this.value=this.theme=="dark"?1:0,this.homePage=this.userInfo.configtheme?this.userInfo.configtheme.split(","):[],this.systemInfo.id?this.systemInfo:window.$systemInfo},lazyLoad(s,e){const{level:i,value:a}=s;if(this.options.length===0){this.geData().then(()=>{if(this.presentText.length<this.homePage.length){const u=this.options.filter(d=>d.code===this.homePage[0])[0];this.presentText=u?this.presentText.concat([u.label]):this.presentText}e(this.options)});return}this.getMenuListAll(a).then(u=>{if(this.presentText.length<this.homePage.length&&i===2){this.presentText=this.presentText.concat([s.label]);const x=s.children.filter($=>$.value===this.homePage[i])[0];this.presentText=x?this.presentText.concat([x.label]):this.presentText}const d=this.$refs.cascader.presentText;this.presentText.length===this.homePage.length&&d===null&&this.$refs.cascader&&(this.$refs.cascader.presentText=this.presentText.join(" / ")),e(u)})},geData(){return ee.getAppList({}).then(s=>{if(s.success){let e=s.data.map(i=>{let a=this.userInfo.apps.filter(u=>u.code==i.code)[0];if(a!=null)return i.leaf=a==null,i.value=i.code,i.label=this.$i18nt(`Dynamics.${i.transkey}`,i.name),i.loading=!1,i});return e=e.filter(i=>i!==void 0),this.options=[...e],this.listOptionsOld=JSON.stringify(e),new Promise(i=>{i()})}})},getMenuListAll(s){return Promise.all([this.getMenuList({application:s}),this.sysMenuChange({application:s})]).then(e=>{let i=e[0].data,a=e[1].data;return i.map((u,d)=>{let x=a.filter($=>$.path==u.router);return i[d].value=u.router,i[d].label=this.$i18nt(`Dynamics.${u.transkey}`,u.name),i[d].leaf=u.children.length==0,i[d].disabled=x.length==0,u.children.length==0?i[d].children=null:u.children.map(($,S)=>{let k=a.filter(L=>L.path==$.router);i[d].children[S].value=$.router,i[d].children[S].label=this.$i18nt(`Dynamics.${$.transkey}`,$.name),i[d].children[S].children=[],i[d].children[S].leaf=!0,i[d].children[S].disabled=k.length==0}),u}),i.map(u=>{u.children=u.children?u.children.filter(d=>d.disabled==!1):[]}),i})},getMenuList(s){return U.getMenuList(s).then(e=>e)},sysMenuChange(s){return U.sysMenuChange(s).then(e=>e)},onChangeCascader(s){const e=this.$refs.cascader.presentText;this.presentText=e!==null?e.split(" / "):[]},onChange(s){s?this.$store.dispatch("ToggleTheme","dark"):this.$store.dispatch("ToggleTheme","light")},async changeColor(s){const e=this,i=this.primaryColor;if(typeof s!="string")return;const a=this.$message({message:e.$i18nt("gd.theme.switchingTopics","\u6B63\u5728\u5207\u6362\u4E3B\u9898..."),duration:0,iconClass:"el-icon-loading"}),u=this.getThemeCluster(s.replace("#","")),d=this.getThemeCluster(i.replace("#","")),x=(k,L)=>()=>{const O=this.getThemeCluster(this.primaryColor.replace("#","")),n=this.updateStyle(this[k],O,u);let t=document.getElementById(L);t||(t=document.createElement("style"),t.setAttribute("id",L),document.head.appendChild(t)),t.innerText=n};this.chalk||await Promise.resolve().then(()=>require("./element-theme-chalk.dee12271.js")).then(k=>{this.chalk=k.default}),x("chalk","chalk-style")(),[].slice.call(document.querySelectorAll("style")).filter(k=>{const L=k.innerText;return new RegExp(i,"i").test(L)&&!/Chalk Variables/.test(L)}).forEach(k=>{const{innerText:L}=k;typeof L=="string"&&(k.innerText=this.updateStyle(L,d,u))}),this.$store.dispatch("ToggleColor",s),window.document.body.style=`--color:${s}`,this.$nextTick(()=>{setTimeout(()=>{a.close()},200)})},updateStyle(s,e,i){let a=s;return e.forEach((u,d)=>{a=a.replace(new RegExp(u,"ig"),i[d])}),a},getThemeCluster(s){const e=(u,d)=>{let x=parseInt(u.slice(0,2),16),$=parseInt(u.slice(2,4),16),S=parseInt(u.slice(4,6),16);return d===0?[x,$,S].join(","):(x+=Math.round(d*(255-x)),$+=Math.round(d*(255-$)),S+=Math.round(d*(255-S)),x=x.toString(16),$=$.toString(16),S=S.toString(16),`#${x}${$}${S}`)},i=(u,d)=>{let x=parseInt(u.slice(0,2),16),$=parseInt(u.slice(2,4),16),S=parseInt(u.slice(4,6),16);return x=Math.round((1-d)*x),$=Math.round((1-d)*$),S=Math.round((1-d)*S),x=x.toString(16),$=$.toString(16),S=S.toString(16),`#${x}${$}${S}`},a=[s];for(let u=0;u<=9;u++)a.push(e(s,Number((u/10).toFixed(2))));return a.push(i(s,.1)),a},traverse(s,e){let i=null;const a=u=>(u=u.filter((d,x)=>(d.children&&d.children.length>0&&a(d.children),d.value==s&&(i={...d}),!0)),u);return a(this.propOptions),i}},mounted(){this.getColor(),this.init(),this.primaryColor&&(this.primaryColors=this.primaryColor)}};var we=function(){var e=this,i=e._self._c;return i("div",{staticStyle:{"padding-top":"12px"}},[i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:24}},[i("div",[e._v(e._s(e.$i18nt("gd.settings.overallStyle","\u6574\u4F53\u98CE\u683C\u8BBE\u7F6E")))])])],1),i("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[i("el-col",{attrs:{span:8}},[i("div",{staticClass:"grid-content strength",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.settings.overallStyleTip","\u6574\u4F53\u98CE\u683C\u8BBE\u7F6E"))+" ")])]),i("el-col",{attrs:{span:16}},[i("div",{staticClass:"grid-content paw grid-flex"},[i("el-switch",{attrs:{"active-text":e.$i18nt("gd.settings.darkness","\u767D\u8272"),"active-color":e.primaryColor,"inactive-text":e.$i18nt("gd.settings.white","\u6697\u8272"),"active-value":1,"inactive-value":0},on:{change:e.onChange},model:{value:e.value,callback:function(a){e.value=a},expression:"value"}})],1)])],1),i("el-divider"),i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:24}},[i("div",[e._v(e._s(e.$i18nt("gd.settings.theme","\u4E3B\u9898\u8272")))])])],1),i("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[i("el-col",{attrs:{span:8}},[i("div",{staticClass:"grid-content strength",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.settings.themeTip","\u9875\u9762\u4E3B\u9898\u914D\u8272"))+" ")])]),i("el-col",{attrs:{span:16}},[i("div",{staticClass:"grid-content paw grid-flex"},[i("el-color-picker",{ref:"colorPicker",staticClass:"theme-picker",attrs:{size:"small",predefine:e.predefine,"popper-class":"theme-picker-dropdown"},on:{change:e.changeColor},model:{value:e.primaryColors,callback:function(a){e.primaryColors=a},expression:"primaryColors"}})],1)])],1),i("el-divider"),i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:24}},[i("div",[e._v(e._s(e.$i18nt("gd.settings.echartsColor","\u56FE\u8868\u8272")))])])],1),i("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[i("el-col",{attrs:{span:8}},[i("div",{staticClass:"grid-content strength",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.settings.echartsColorStyle","\u56FE\u8868\u98CE\u683C\u914D\u8272"))+" ")])]),i("el-col",{attrs:{span:16}},[i("div",{staticClass:"grid-flex"},[e._l(e.echartsList,function(a,u){return[i("el-tooltip",{staticClass:"setting-drawer-theme-color-colorBlock",attrs:{content:a===0?e.$i18nt("gd.settings.followTheme","\u8DDF\u968F\u7CFB\u7EDF\u4E3B\u9898\u8272"):a}},[i("el-tag",{attrs:{color:a===0?e.primaryColor:a}})],1)]}),i("span",{staticClass:"active-color",staticStyle:{cursor:"pointer"},on:{click:function(a){return e.$refs.echartsTheme.open()}}},[e._v(" "+e._s(e.$i18nt("gd.btn.edit","\u7F16\u8F91"))+" ")])],2)])],1),i("el-divider"),i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:24}},[i("div",[e._v(e._s(e.$i18nt("gd.settings.homepage","\u4E2A\u4EBA\u9996\u9875")))])])],1),i("el-row",{staticStyle:{"margin-top":"6px"},attrs:{gutter:20}},[i("el-col",{attrs:{span:8}},[i("div",{staticClass:"grid-content strength",staticStyle:{color:"rgba(0, 0, 0, 0.45)"}},[e._v(" "+e._s(e.$i18nt("gd.settings.homepageTip","\u914D\u7F6E\u540E\u7528\u6237\u767B\u5F55\u76F4\u63A5\u8FDB\u5165\u4E2A\u4EBA\u9996\u9875"))+" ")])]),i("el-col",{attrs:{span:16}},[i("div",{staticClass:"grid-flex"},[i("el-cascader",{ref:"cascader",staticStyle:{width:"240px"},attrs:{clearable:"",props:{lazy:!0,lazyLoad:e.lazyLoad}},on:{change:e.onChangeCascader},model:{value:e.homePage,callback:function(a){e.homePage=a},expression:"homePage"}}),i("span",{staticClass:"active-color",staticStyle:{"margin-left":"10px",cursor:"pointer"},on:{click:e.renew}},[e._v(" "+e._s(e.$i18nt("gd.btn.update","\u66F4\u65B0"))+" ")])],1)])],1),i("el-divider"),i("ColorEditor",{ref:"echartsTheme",on:{ok:e.okColor}})],1)},xe=[],be=H.normalizeComponent(ve,we,xe,!1,null,"8b3ce4df",null,null);const z=be.exports;z.install=function(s){s.component(z.name,z)};const Ce=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"}));var j={exports:{}};(function(s,e){(function(i,a){s.exports=a()})(window,function(){return function(i){var a={};function u(d){if(a[d])return a[d].exports;var x=a[d]={i:d,l:!1,exports:{}};return i[d].call(x.exports,x,x.exports,u),x.l=!0,x.exports}return u.m=i,u.c=a,u.d=function(d,x,$){u.o(d,x)||Object.defineProperty(d,x,{enumerable:!0,get:$})},u.r=function(d){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})},u.t=function(d,x){if(1&x&&(d=u(d)),8&x||4&x&&typeof d=="object"&&d&&d.__esModule)return d;var $=Object.create(null);if(u.r($),Object.defineProperty($,"default",{enumerable:!0,value:d}),2&x&&typeof d!="string")for(var S in d)u.d($,S,function(k){return d[k]}.bind(null,S));return $},u.n=function(d){var x=d&&d.__esModule?function(){return d.default}:function(){return d};return u.d(x,"a",x),x},u.o=function(d,x){return Object.prototype.hasOwnProperty.call(d,x)},u.p="",u(u.s=6)}([function(i,a,u){var d=u(2);typeof d=="string"&&(d=[[i.i,d,""]]);var x={hmr:!0,transform:void 0,insertInto:void 0};u(4)(d,x),d.locals&&(i.exports=d.locals)},function(i,a,u){var d=u(0);u.n(d).a},function(i,a,u){(i.exports=u(3)(!1)).push([i.i,`
|
|
2
2
|
.vue-cropper[data-v-6dae58fd] {
|
|
3
3
|
position: relative;
|
|
4
4
|
width: 100%;
|
|
@@ -198,19 +198,19 @@
|
|
|
198
198
|
right: -10px;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
`,""])},function(
|
|
201
|
+
`,""])},function(i,a){i.exports=function(u){var d=[];return d.toString=function(){return this.map(function(x){var $=function(S,k){var L=S[1]||"",O=S[3];if(!O)return L;if(k&&typeof btoa=="function"){var n=function(o){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"}(O),t=O.sources.map(function(o){return"/*# sourceURL="+O.sourceRoot+o+" */"});return[L].concat(t).concat([n]).join(`
|
|
202
202
|
`)}return[L].join(`
|
|
203
|
-
`)}(x,u);return x[2]?"@media "+x[2]+"{"+$+"}":$}).join("")},d.i=function(x,$){typeof x=="string"&&(x=[[null,x,""]]);for(var S={},k=0;k<this.length;k++){var L=this[k][0];typeof L=="number"&&(S[L]=!0)}for(k=0;k<x.length;k++){var O=x[k];typeof O[0]=="number"&&S[O[0]]||($&&!O[2]?O[2]=$:$&&(O[2]="("+O[2]+") and ("+$+")"),d.push(O))}},d}},function(
|
|
203
|
+
`)}(x,u);return x[2]?"@media "+x[2]+"{"+$+"}":$}).join("")},d.i=function(x,$){typeof x=="string"&&(x=[[null,x,""]]);for(var S={},k=0;k<this.length;k++){var L=this[k][0];typeof L=="number"&&(S[L]=!0)}for(k=0;k<x.length;k++){var O=x[k];typeof O[0]=="number"&&S[O[0]]||($&&!O[2]?O[2]=$:$&&(O[2]="("+O[2]+") and ("+$+")"),d.push(O))}},d}},function(i,a,u){var d={},x=function(c){var h;return function(){return h===void 0&&(h=c.apply(this,arguments)),h}}(function(){return window&&document&&document.all&&!window.atob}),$=function(c){var h={};return function(p,g){if(typeof p=="function")return p();if(h[p]===void 0){var w=function(v,C){return C?C.querySelector(v):document.querySelector(v)}.call(this,p,g);if(window.HTMLIFrameElement&&w instanceof window.HTMLIFrameElement)try{w=w.contentDocument.head}catch{w=null}h[p]=w}return h[p]}}(),S=null,k=0,L=[],O=u(5);function n(c,h){for(var p=0;p<c.length;p++){var g=c[p],w=d[g.id];if(w){w.refs++;for(var v=0;v<w.parts.length;v++)w.parts[v](g.parts[v]);for(;v<g.parts.length;v++)w.parts.push(m(g.parts[v],h))}else{var C=[];for(v=0;v<g.parts.length;v++)C.push(m(g.parts[v],h));d[g.id]={id:g.id,refs:1,parts:C}}}}function t(c,h){for(var p=[],g={},w=0;w<c.length;w++){var v=c[w],C=h.base?v[0]+h.base:v[0],_={css:v[1],media:v[2],sourceMap:v[3]};g[C]?g[C].parts.push(_):p.push(g[C]={id:C,parts:[_]})}return p}function o(c,h){var p=$(c.insertInto);if(!p)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var g=L[L.length-1];if(c.insertAt==="top")g?g.nextSibling?p.insertBefore(h,g.nextSibling):p.appendChild(h):p.insertBefore(h,p.firstChild),L.push(h);else if(c.insertAt==="bottom")p.appendChild(h);else{if(typeof c.insertAt!="object"||!c.insertAt.before)throw new Error(`[Style Loader]
|
|
204
204
|
|
|
205
205
|
Invalid value for parameter 'insertAt' ('options.insertAt') found.
|
|
206
206
|
Must be 'top', 'bottom', or Object.
|
|
207
207
|
(https://github.com/webpack-contrib/style-loader#insertat)
|
|
208
208
|
`);var w=$(c.insertAt.before,p);p.insertBefore(h,w)}}function r(c){if(c.parentNode===null)return!1;c.parentNode.removeChild(c);var h=L.indexOf(c);h>=0&&L.splice(h,1)}function l(c){var h=document.createElement("style");if(c.attrs.type===void 0&&(c.attrs.type="text/css"),c.attrs.nonce===void 0){var p=function(){return u.nc}();p&&(c.attrs.nonce=p)}return f(h,c.attrs),o(c,h),h}function f(c,h){Object.keys(h).forEach(function(p){c.setAttribute(p,h[p])})}function m(c,h){var p,g,w,v;if(h.transform&&c.css){if(!(v=typeof h.transform=="function"?h.transform(c.css):h.transform.default(c.css)))return function(){};c.css=v}if(h.singleton){var C=k++;p=S||(S=l(h)),g=b.bind(null,p,C,!1),w=b.bind(null,p,C,!0)}else c.sourceMap&&typeof URL=="function"&&typeof URL.createObjectURL=="function"&&typeof URL.revokeObjectURL=="function"&&typeof Blob=="function"&&typeof btoa=="function"?(p=function(_){var I=document.createElement("link");return _.attrs.type===void 0&&(_.attrs.type="text/css"),_.attrs.rel="stylesheet",f(I,_.attrs),o(_,I),I}(h),g=function(_,I,E){var T=E.css,A=E.sourceMap,W=I.convertToAbsoluteUrls===void 0&&A;(I.convertToAbsoluteUrls||W)&&(T=O(T)),A&&(T+=`
|
|
209
|
-
/*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(A))))+" */");var V=new Blob([T],{type:"text/css"}),R=_.href;_.href=URL.createObjectURL(V),R&&URL.revokeObjectURL(R)}.bind(null,p,h),w=function(){r(p),p.href&&URL.revokeObjectURL(p.href)}):(p=l(h),g=function(_,I){var E=I.css,T=I.media;if(T&&_.setAttribute("media",T),_.styleSheet)_.styleSheet.cssText=E;else{for(;_.firstChild;)_.removeChild(_.firstChild);_.appendChild(document.createTextNode(E))}}.bind(null,p),w=function(){r(p)});return g(c),function(_){if(_){if(_.css===c.css&&_.media===c.media&&_.sourceMap===c.sourceMap)return;g(c=_)}else w()}}
|
|
210
|
-
`)}}();function b(c,h,p,g){var w=p?"":g.css;if(c.styleSheet)c.styleSheet.cssText=y(h,w);else{var v=document.createTextNode(w),C=c.childNodes;C[h]&&c.removeChild(C[h]),C.length?c.insertBefore(v,C[h]):c.appendChild(v)}}},function(n,a){n.exports=function(u){var d=typeof window<"u"&&window.location;if(!d)throw new Error("fixUrls requires window.location");if(!u||typeof u!="string")return u;var x=d.protocol+"//"+d.host,$=x+d.pathname.replace(/\/[^\/]*$/,"/");return u.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(S,k){var L,O=k.trim().replace(/^"(.*)"$/,function(i,t){return t}).replace(/^'(.*)'$/,function(i,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(O)?S:(L=O.indexOf("//")===0?O:O.indexOf("/")===0?x+O:$+O.replace(/^\.\//,""),"url("+JSON.stringify(L)+")")})}},function(n,a,u){u.r(a);var d=function(){var i=this,t=i.$createElement,o=i._self._c||t;return o("div",{ref:"cropper",staticClass:"vue-cropper",on:{mouseover:i.scaleImg,mouseout:i.cancelScale}},[i.imgs?o("div",{staticClass:"cropper-box"},[o("div",{directives:[{name:"show",rawName:"v-show",value:!i.loading,expression:"!loading"}],staticClass:"cropper-box-canvas",style:{width:i.trueWidth+"px",height:i.trueHeight+"px",transform:"scale("+i.scale+","+i.scale+") translate3d("+i.x/i.scale+"px,"+i.y/i.scale+"px,0)rotateZ("+90*i.rotate+"deg)"}},[o("img",{ref:"cropperImg",attrs:{src:i.imgs,alt:"cropper-img"}})])]):i._e(),i._v(" "),o("div",{staticClass:"cropper-drag-box",class:{"cropper-move":i.move&&!i.crop,"cropper-crop":i.crop,"cropper-modal":i.cropping},on:{mousedown:i.startMove,touchstart:i.startMove}}),i._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:i.cropping,expression:"cropping"}],staticClass:"cropper-crop-box",style:{width:i.cropW+"px",height:i.cropH+"px",transform:"translate3d("+i.cropOffsertX+"px,"+i.cropOffsertY+"px,0)"}},[o("span",{staticClass:"cropper-view-box"},[o("img",{style:{width:i.trueWidth+"px",height:i.trueHeight+"px",transform:"scale("+i.scale+","+i.scale+") translate3d("+(i.x-i.cropOffsertX)/i.scale+"px,"+(i.y-i.cropOffsertY)/i.scale+"px,0)rotateZ("+90*i.rotate+"deg)"},attrs:{src:i.imgs,alt:"cropper-img"}})]),i._v(" "),o("span",{staticClass:"cropper-face cropper-move",on:{mousedown:i.cropMove,touchstart:i.cropMove}}),i._v(" "),i.info?o("span",{staticClass:"crop-info",style:{top:i.cropInfo.top}},[i._v(i._s(this.cropInfo.width)+" \xD7 "+i._s(this.cropInfo.height))]):i._e(),i._v(" "),i.fixedBox?i._e():o("span",[o("span",{staticClass:"crop-line line-w",on:{mousedown:function(r){i.changeCropSize(r,!1,!0,0,1)},touchstart:function(r){i.changeCropSize(r,!1,!0,0,1)}}}),i._v(" "),o("span",{staticClass:"crop-line line-a",on:{mousedown:function(r){i.changeCropSize(r,!0,!1,1,0)},touchstart:function(r){i.changeCropSize(r,!0,!1,1,0)}}}),i._v(" "),o("span",{staticClass:"crop-line line-s",on:{mousedown:function(r){i.changeCropSize(r,!1,!0,0,2)},touchstart:function(r){i.changeCropSize(r,!1,!0,0,2)}}}),i._v(" "),o("span",{staticClass:"crop-line line-d",on:{mousedown:function(r){i.changeCropSize(r,!0,!1,2,0)},touchstart:function(r){i.changeCropSize(r,!0,!1,2,0)}}}),i._v(" "),o("span",{staticClass:"crop-point point1",on:{mousedown:function(r){i.changeCropSize(r,!0,!0,1,1)},touchstart:function(r){i.changeCropSize(r,!0,!0,1,1)}}}),i._v(" "),o("span",{staticClass:"crop-point point2",on:{mousedown:function(r){i.changeCropSize(r,!1,!0,0,1)},touchstart:function(r){i.changeCropSize(r,!1,!0,0,1)}}}),i._v(" "),o("span",{staticClass:"crop-point point3",on:{mousedown:function(r){i.changeCropSize(r,!0,!0,2,1)},touchstart:function(r){i.changeCropSize(r,!0,!0,2,1)}}}),i._v(" "),o("span",{staticClass:"crop-point point4",on:{mousedown:function(r){i.changeCropSize(r,!0,!1,1,0)},touchstart:function(r){i.changeCropSize(r,!0,!1,1,0)}}}),i._v(" "),o("span",{staticClass:"crop-point point5",on:{mousedown:function(r){i.changeCropSize(r,!0,!1,2,0)},touchstart:function(r){i.changeCropSize(r,!0,!1,2,0)}}}),i._v(" "),o("span",{staticClass:"crop-point point6",on:{mousedown:function(r){i.changeCropSize(r,!0,!0,1,2)},touchstart:function(r){i.changeCropSize(r,!0,!0,1,2)}}}),i._v(" "),o("span",{staticClass:"crop-point point7",on:{mousedown:function(r){i.changeCropSize(r,!1,!0,0,2)},touchstart:function(r){i.changeCropSize(r,!1,!0,0,2)}}}),i._v(" "),o("span",{staticClass:"crop-point point8",on:{mousedown:function(r){i.changeCropSize(r,!0,!0,2,2)},touchstart:function(r){i.changeCropSize(r,!0,!0,2,2)}}})])])])};d._withStripped=!0;var x={};x.getData=function(i){return new Promise(function(t,o){var r={};(function(l){var f=null;return new Promise(function(m,y){if(l.src)if(/^data\:/i.test(l.src))f=function(h){h=h.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var p=atob(h),g=p.length,w=new ArrayBuffer(g),v=new Uint8Array(w),C=0;C<g;C++)v[C]=p.charCodeAt(C);return w}(l.src),m(f);else if(/^blob\:/i.test(l.src)){var b=new FileReader;b.onload=function(h){f=h.target.result,m(f)},function(h,p){var g=new XMLHttpRequest;g.open("GET",h,!0),g.responseType="blob",g.onload=function(w){this.status!=200&&this.status!==0||p(this.response)},g.send()}(l.src,function(h){b.readAsArrayBuffer(h)})}else{var c=new XMLHttpRequest;c.onload=function(){if(this.status!=200&&this.status!==0)throw"Could not load image";f=c.response,m(f),c=null},c.open("GET",l.src,!0),c.responseType="arraybuffer",c.send(null)}else y("img error")})})(i).then(function(l){r.arrayBuffer=l,r.orientation=function(f){var m,y,b,c,h,p,g,w,v,C=new DataView(f),_=C.byteLength;if(C.getUint8(0)===255&&C.getUint8(1)===216)for(w=2;w<_;){if(C.getUint8(w)===255&&C.getUint8(w+1)===225){p=w;break}w++}if(p&&(y=p+10,function(I,E,T){var A,W="";for(A=E,T+=E;A<T;A++)W+=String.fromCharCode(I.getUint8(A));return W}(C,p+4,4)==="Exif"&&(h=C.getUint16(y),((c=h===18761)||h===19789)&&C.getUint16(y+2,c)===42&&(b=C.getUint32(y+4,c))>=8&&(g=y+b))),g){for(_=C.getUint16(g,c),v=0;v<_;v++)if(w=g+12*v+2,C.getUint16(w,c)===274){w+=8,m=C.getUint16(w,c);break}}return m}(l),t(r)}).catch(function(l){o(l)})})};var $=x,S={data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:function(){return[1,1]}},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:function(){return 10}}},computed:{cropInfo:function(){var i={};if(i.top=this.cropOffsertY>21?"-21px":"0px",i.width=this.cropW>0?this.cropW:0,i.height=this.cropH>0?this.cropH:0,this.infoTrue){var t=1;this.high&&!this.full&&(t=window.devicePixelRatio),this.enlarge!==1&!this.full&&(t=Math.abs(Number(this.enlarge))),i.width=i.width*t,i.height=i.height*t,this.full&&(i.width=i.width/this.scale,i.height=i.height/this.scale)}return i.width=i.width.toFixed(0),i.height=i.height.toFixed(0),i},isIE:function(){var i=!!window.ActiveXObject||"ActiveXObject"in window;return i},passive:function(){return this.isIE?null:{passive:!1}}},watch:{img:function(){this.checkedImg()},imgs:function(i){i!==""&&this.reload()},cropW:function(){this.showPreview()},cropH:function(){this.showPreview()},cropOffsertX:function(){this.showPreview()},cropOffsertY:function(){this.showPreview()},scale:function(i,t){this.showPreview()},x:function(){this.showPreview()},y:function(){this.showPreview()},autoCrop:function(i){i&&this.goAutoCrop()},autoCropWidth:function(){this.autoCrop&&this.goAutoCrop()},autoCropHeight:function(){this.autoCrop&&this.goAutoCrop()},mode:function(){this.checkedImg()},rotate:function(){this.showPreview(),this.autoCrop?this.goAutoCrop(this.cropW,this.cropH):(this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion:function(i){for(var t=navigator.userAgent.split(" "),o="",r=new RegExp(i,"i"),l=0;l<t.length;l++)r.test(t[l])&&(o=t[l]);return o?o.split("/")[1].split("."):["0","0","0"]},checkOrientationImage:function(i,t,o,r){var l=this;if(this.getVersion("chrome")[0]>=81)t=-1;else if(this.getVersion("safari")[0]>=605){var f=this.getVersion("version");f[0]>13&&f[1]>1&&(t=-1)}else{var m=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(m){var y=m[1];((y=y.split("_"))[0]>13||y[0]>=13&&y[1]>=4)&&(t=-1)}}var b=document.createElement("canvas"),c=b.getContext("2d");switch(c.save(),t){case 2:b.width=o,b.height=r,c.translate(o,0),c.scale(-1,1);break;case 3:b.width=o,b.height=r,c.translate(o/2,r/2),c.rotate(180*Math.PI/180),c.translate(-o/2,-r/2);break;case 4:b.width=o,b.height=r,c.translate(0,r),c.scale(1,-1);break;case 5:b.height=o,b.width=r,c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:b.width=r,b.height=o,c.translate(r/2,o/2),c.rotate(90*Math.PI/180),c.translate(-o/2,-r/2);break;case 7:b.height=o,b.width=r,c.rotate(.5*Math.PI),c.translate(o,-r),c.scale(-1,1);break;case 8:b.height=o,b.width=r,c.translate(r/2,o/2),c.rotate(-90*Math.PI/180),c.translate(-o/2,-r/2);break;default:b.width=o,b.height=r}c.drawImage(i,0,0,o,r),c.restore(),b.toBlob(function(h){var p=URL.createObjectURL(h);URL.revokeObjectURL(l.imgs),l.imgs=p},"image/"+this.outputType,1)},checkedImg:function(){var i=this;if(this.img===null||this.img==="")return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();var t=new Image;if(t.onload=function(){if(i.img==="")return i.$emit("imgLoad","error"),i.$emit("img-load","error"),!1;var r=t.width,l=t.height;$.getData(t).then(function(f){i.orientation=f.orientation||1;var m=i.maxImgSize;!i.orientation&&r<m&l<m?i.imgs=i.img:(r>m&&(l=l/r*m,r=m),l>m&&(r=r/l*m,l=m),i.checkOrientationImage(t,i.orientation,r,l))})},t.onerror=function(){i.$emit("imgLoad","error"),i.$emit("img-load","error")},this.img.substr(0,4)!=="data"&&(t.crossOrigin=""),this.isIE){var o=new XMLHttpRequest;o.onload=function(){var r=URL.createObjectURL(this.response);t.src=r},o.open("GET",this.img,!0),o.responseType="blob",o.send()}else t.src=this.img},startMove:function(i){if(i.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=(i.clientX?i.clientX:i.touches[0].clientX)-this.x,this.moveY=(i.clientY?i.clientY:i.touches[0].clientY)-this.y,i.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),i.touches.length==2&&(this.touches=i.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=i.offsetX?i.offsetX:i.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=i.offsetY?i.offsetY:i.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX=i.clientX?i.clientX:i.touches[0].clientX,this.cropY=i.clientY?i.clientY:i.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale:function(i){var t=this;i.preventDefault();var o=this.scale,r=this.touches[0].clientX,l=this.touches[0].clientY,f=i.touches[0].clientX,m=i.touches[0].clientY,y=this.touches[1].clientX,b=this.touches[1].clientY,c=i.touches[1].clientX,h=i.touches[1].clientY,p=Math.sqrt(Math.pow(r-y,2)+Math.pow(l-b,2)),g=Math.sqrt(Math.pow(f-c,2)+Math.pow(m-h,2))-p,w=1,v=(w=(w=w/this.trueWidth>w/this.trueHeight?w/this.trueHeight:w/this.trueWidth)>.1?.1:w)*g;if(!this.touchNow){if(this.touchNow=!0,g>0?o+=Math.abs(v):g<0&&o>Math.abs(v)&&(o-=Math.abs(v)),this.touches=i.touches,setTimeout(function(){t.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o}},cancelTouchScale:function(i){window.removeEventListener("touchmove",this.touchScale)},moveImg:function(i){var t=this;if(i.preventDefault(),i.touches&&i.touches.length===2)return this.touches=i.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;var o,r,l=i.clientX?i.clientX:i.touches[0].clientX,f=i.clientY?i.clientY:i.touches[0].clientY;o=l-this.moveX,r=f-this.moveY,this.$nextTick(function(){if(t.centerBox){var m,y,b,c,h=t.getImgAxis(o,r,t.scale),p=t.getCropAxis(),g=t.trueHeight*t.scale,w=t.trueWidth*t.scale;switch(t.rotate){case 1:case-1:case 3:case-3:m=t.cropOffsertX-t.trueWidth*(1-t.scale)/2+(g-w)/2,y=t.cropOffsertY-t.trueHeight*(1-t.scale)/2+(w-g)/2,b=m-g+t.cropW,c=y-w+t.cropH;break;default:m=t.cropOffsertX-t.trueWidth*(1-t.scale)/2,y=t.cropOffsertY-t.trueHeight*(1-t.scale)/2,b=m-w+t.cropW,c=y-g+t.cropH}h.x1>=p.x1&&(o=m),h.y1>=p.y1&&(r=y),h.x2<=p.x2&&(o=b),h.y2<=p.y2&&(r=c)}t.x=o,t.y=r,t.$emit("imgMoving",{moving:!0,axis:t.getImgAxis()}),t.$emit("img-moving",{moving:!0,axis:t.getImgAxis()})})},leaveImg:function(i){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("imgMoving",{moving:!1,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg:function(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale:function(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize:function(i){var t=this;i.preventDefault();var o=this.scale,r=i.deltaY||i.wheelDelta;r=navigator.userAgent.indexOf("Firefox")>0?30*r:r,this.isIE&&(r=-r);var l=this.coe,f=(l=l/this.trueWidth>l/this.trueHeight?l/this.trueHeight:l/this.trueWidth)*r;f<0?o+=Math.abs(f):o>Math.abs(f)&&(o-=Math.abs(f));var m=f<0?"add":"reduce";if(m!==this.coeStatus&&(this.coeStatus=m,this.coe=.2),this.scaling||(this.scalingSet=setTimeout(function(){t.scaling=!1,t.coe=t.coe+=.01},50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o},changeScale:function(i){var t=this.scale;i=i||1;var o=20;if((i*=o=o/this.trueWidth>o/this.trueHeight?o/this.trueHeight:o/this.trueWidth)>0?t+=Math.abs(i):t>Math.abs(i)&&(t-=Math.abs(i)),!this.checkoutImgAxis(this.x,this.y,t))return!1;this.scale=t},createCrop:function(i){var t=this;i.preventDefault();var o=i.clientX?i.clientX:i.touches?i.touches[0].clientX:0,r=i.clientY?i.clientY:i.touches?i.touches[0].clientY:0;this.$nextTick(function(){var l=o-t.cropX,f=r-t.cropY;if(l>0?(t.cropW=l+t.cropChangeX>t.w?t.w-t.cropChangeX:l,t.cropOffsertX=t.cropChangeX):(t.cropW=t.w-t.cropChangeX+Math.abs(l)>t.w?t.cropChangeX:Math.abs(l),t.cropOffsertX=t.cropChangeX+l>0?t.cropChangeX+l:0),t.fixed){var m=t.cropW/t.fixedNumber[0]*t.fixedNumber[1];m+t.cropOffsertY>t.h?(t.cropH=t.h-t.cropOffsertY,t.cropW=t.cropH/t.fixedNumber[1]*t.fixedNumber[0],t.cropOffsertX=l>0?t.cropChangeX:t.cropChangeX-t.cropW):t.cropH=m,t.cropOffsertY=t.cropOffsertY}else f>0?(t.cropH=f+t.cropChangeY>t.h?t.h-t.cropChangeY:f,t.cropOffsertY=t.cropChangeY):(t.cropH=t.h-t.cropChangeY+Math.abs(f)>t.h?t.cropChangeY:Math.abs(f),t.cropOffsertY=t.cropChangeY+f>0?t.cropChangeY+f:0)})},changeCropSize:function(i,t,o,r,l){i.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=t,this.canChangeY=o,this.changeCropTypeX=r,this.changeCropTypeY=l,this.cropX=i.clientX?i.clientX:i.touches[0].clientX,this.cropY=i.clientY?i.clientY:i.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow:function(i){var t=this;i.preventDefault();var o=i.clientX?i.clientX:i.touches?i.touches[0].clientX:0,r=i.clientY?i.clientY:i.touches?i.touches[0].clientY:0,l=this.w,f=this.h,m=0,y=0;if(this.centerBox){var b=this.getImgAxis(),c=b.x2,h=b.y2;m=b.x1>0?b.x1:0,y=b.y1>0?b.y1:0,l>c&&(l=c),f>h&&(f=h)}this.$nextTick(function(){var p=o-t.cropX,g=r-t.cropY;if(t.canChangeX&&(t.changeCropTypeX===1?t.cropOldW-p>0?(t.cropW=l-t.cropChangeX-p<=l-m?t.cropOldW-p:t.cropOldW+t.cropChangeX-m,t.cropOffsertX=l-t.cropChangeX-p<=l-m?t.cropChangeX+p:m):(t.cropW=Math.abs(p)+t.cropChangeX<=l?Math.abs(p)-t.cropOldW:l-t.cropOldW-t.cropChangeX,t.cropOffsertX=t.cropChangeX+t.cropOldW):t.changeCropTypeX===2&&(t.cropOldW+p>0?(t.cropW=t.cropOldW+p+t.cropOffsertX<=l?t.cropOldW+p:l-t.cropOffsertX,t.cropOffsertX=t.cropChangeX):(t.cropW=l-t.cropChangeX+Math.abs(p+t.cropOldW)<=l-m?Math.abs(p+t.cropOldW):t.cropChangeX-m,t.cropOffsertX=l-t.cropChangeX+Math.abs(p+t.cropOldW)<=l-m?t.cropChangeX-Math.abs(p+t.cropOldW):m))),t.canChangeY&&(t.changeCropTypeY===1?t.cropOldH-g>0?(t.cropH=f-t.cropChangeY-g<=f-y?t.cropOldH-g:t.cropOldH+t.cropChangeY-y,t.cropOffsertY=f-t.cropChangeY-g<=f-y?t.cropChangeY+g:y):(t.cropH=Math.abs(g)+t.cropChangeY<=f?Math.abs(g)-t.cropOldH:f-t.cropOldH-t.cropChangeY,t.cropOffsertY=t.cropChangeY+t.cropOldH):t.changeCropTypeY===2&&(t.cropOldH+g>0?(t.cropH=t.cropOldH+g+t.cropOffsertY<=f?t.cropOldH+g:f-t.cropOffsertY,t.cropOffsertY=t.cropChangeY):(t.cropH=f-t.cropChangeY+Math.abs(g+t.cropOldH)<=f-y?Math.abs(g+t.cropOldH):t.cropChangeY-y,t.cropOffsertY=f-t.cropChangeY+Math.abs(g+t.cropOldH)<=f-y?t.cropChangeY-Math.abs(g+t.cropOldH):y))),t.canChangeX&&t.fixed){var w=t.cropW/t.fixedNumber[0]*t.fixedNumber[1];w+t.cropOffsertY>f?(t.cropH=f-t.cropOffsertY,t.cropW=t.cropH/t.fixedNumber[1]*t.fixedNumber[0]):t.cropH=w}if(t.canChangeY&&t.fixed){var v=t.cropH/t.fixedNumber[1]*t.fixedNumber[0];v+t.cropOffsertX>l?(t.cropW=l-t.cropOffsertX,t.cropH=t.cropW/t.fixedNumber[0]*t.fixedNumber[1]):t.cropW=v}})},checkCropLimitSize:function(){this.cropW,this.cropH;var i=this.limitMinSize,t=new Array;return t=Array.isArray[i]?i:[i,i],[parseFloat(t[0]),parseFloat(t[1])]},changeCropEnd:function(i){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},endCrop:function(){this.cropW===0&&this.cropH===0&&(this.cropping=!1),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop:function(){this.crop=!0},stopCrop:function(){this.crop=!1},clearCrop:function(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove:function(i){if(i.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(i),!1;if(i.touches&&i.touches.length===2)return this.crop=!1,this.startMove(i),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);var t,o,r=i.clientX?i.clientX:i.touches[0].clientX,l=i.clientY?i.clientY:i.touches[0].clientY;t=r-this.cropOffsertX,o=l-this.cropOffsertY,this.cropX=t,this.cropY=o,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop:function(i,t){var o=this,r=0,l=0;i&&(i.preventDefault(),r=i.clientX?i.clientX:i.touches[0].clientX,l=i.clientY?i.clientY:i.touches[0].clientY),this.$nextTick(function(){var f,m,y=r-o.cropX,b=l-o.cropY;if(t&&(y=o.cropOffsertX,b=o.cropOffsertY),f=y<=0?0:y+o.cropW>o.w?o.w-o.cropW:y,m=b<=0?0:b+o.cropH>o.h?o.h-o.cropH:b,o.centerBox){var c=o.getImgAxis();f<=c.x1&&(f=c.x1),f+o.cropW>c.x2&&(f=c.x2-o.cropW),m<=c.y1&&(m=c.y1),m+o.cropH>c.y2&&(m=c.y2-o.cropH)}o.cropOffsertX=f,o.cropOffsertY=m,o.$emit("cropMoving",{moving:!0,axis:o.getCropAxis()}),o.$emit("crop-moving",{moving:!0,axis:o.getCropAxis()})})},getImgAxis:function(i,t,o){i=i||this.x,t=t||this.y,o=o||this.scale;var r={x1:0,x2:0,y1:0,y2:0},l=this.trueWidth*o,f=this.trueHeight*o;switch(this.rotate){case 0:r.x1=i+this.trueWidth*(1-o)/2,r.x2=r.x1+this.trueWidth*o,r.y1=t+this.trueHeight*(1-o)/2,r.y2=r.y1+this.trueHeight*o;break;case 1:case-1:case 3:case-3:r.x1=i+this.trueWidth*(1-o)/2+(l-f)/2,r.x2=r.x1+this.trueHeight*o,r.y1=t+this.trueHeight*(1-o)/2+(f-l)/2,r.y2=r.y1+this.trueWidth*o;break;default:r.x1=i+this.trueWidth*(1-o)/2,r.x2=r.x1+this.trueWidth*o,r.y1=t+this.trueHeight*(1-o)/2,r.y2=r.y1+this.trueHeight*o}return r},getCropAxis:function(){var i={x1:0,x2:0,y1:0,y2:0};return i.x1=this.cropOffsertX,i.x2=i.x1+this.cropW,i.y1=this.cropOffsertY,i.y2=i.y1+this.cropH,i},leaveCrop:function(i){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("cropMoving",{moving:!1,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked:function(i){var t=this,o=document.createElement("canvas"),r=new Image,l=this.rotate,f=this.trueWidth,m=this.trueHeight,y=this.cropOffsertX,b=this.cropOffsertY;function c(h,p){o.width=Math.round(h),o.height=Math.round(p)}r.onload=function(){if(t.cropW!==0){var h=o.getContext("2d"),p=1;t.high&!t.full&&(p=window.devicePixelRatio),t.enlarge!==1&!t.full&&(p=Math.abs(Number(t.enlarge)));var g=t.cropW*p,w=t.cropH*p,v=f*t.scale*p,C=m*t.scale*p,_=(t.x-y+t.trueWidth*(1-t.scale)/2)*p,I=(t.y-b+t.trueHeight*(1-t.scale)/2)*p;switch(c(g,w),h.save(),l){case 0:t.full?(c(g/t.scale,w/t.scale),h.drawImage(r,_/t.scale,I/t.scale,v/t.scale,C/t.scale)):h.drawImage(r,_,I,v,C);break;case 1:case-3:t.full?(c(g/t.scale,w/t.scale),_=_/t.scale+(v/t.scale-C/t.scale)/2,I=I/t.scale+(C/t.scale-v/t.scale)/2,h.rotate(90*l*Math.PI/180),h.drawImage(r,I,-_-C/t.scale,v/t.scale,C/t.scale)):(_+=(v-C)/2,I+=(C-v)/2,h.rotate(90*l*Math.PI/180),h.drawImage(r,I,-_-C,v,C));break;case 2:case-2:t.full?(c(g/t.scale,w/t.scale),h.rotate(90*l*Math.PI/180),_/=t.scale,I/=t.scale,h.drawImage(r,-_-v/t.scale,-I-C/t.scale,v/t.scale,C/t.scale)):(h.rotate(90*l*Math.PI/180),h.drawImage(r,-_-v,-I-C,v,C));break;case 3:case-1:t.full?(c(g/t.scale,w/t.scale),_=_/t.scale+(v/t.scale-C/t.scale)/2,I=I/t.scale+(C/t.scale-v/t.scale)/2,h.rotate(90*l*Math.PI/180),h.drawImage(r,-I-v/t.scale,_,v/t.scale,C/t.scale)):(_+=(v-C)/2,I+=(C-v)/2,h.rotate(90*l*Math.PI/180),h.drawImage(r,-I-v,_,v,C));break;default:t.full?(c(g/t.scale,w/t.scale),h.drawImage(r,_/t.scale,I/t.scale,v/t.scale,C/t.scale)):h.drawImage(r,_,I,v,C)}h.restore()}else{var E=f*t.scale,T=m*t.scale,A=o.getContext("2d");switch(A.save(),l){case 0:c(E,T),A.drawImage(r,0,0,E,T);break;case 1:case-3:c(T,E),A.rotate(90*l*Math.PI/180),A.drawImage(r,0,-T,E,T);break;case 2:case-2:c(E,T),A.rotate(90*l*Math.PI/180),A.drawImage(r,-E,-T,E,T);break;case 3:case-1:c(T,E),A.rotate(90*l*Math.PI/180),A.drawImage(r,-E,0,E,T);break;default:c(E,T),A.drawImage(r,0,0,E,T)}A.restore()}i(o)},this.img.substr(0,4)!=="data"&&(r.crossOrigin="Anonymous"),r.src=this.imgs},getCropData:function(i){var t=this;this.getCropChecked(function(o){i(o.toDataURL("image/"+t.outputType,t.outputSize))})},getCropBlob:function(i){var t=this;this.getCropChecked(function(o){o.toBlob(function(r){return i(r)},"image/"+t.outputType,t.outputSize)})},showPreview:function(){var i=this;if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout(function(){i.isCanShow=!0},16);var t=this.cropW,o=this.cropH,r=this.scale,l={};l.div={width:"".concat(t,"px"),height:"".concat(o,"px")};var f=(this.x-this.cropOffsertX)/r,m=(this.y-this.cropOffsertY)/r;l.w=t,l.h=o,l.url=this.imgs,l.img={width:"".concat(this.trueWidth,"px"),height:"".concat(this.trueHeight,"px"),transform:"scale(".concat(r,")translate3d(").concat(f,"px, ").concat(m,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,"deg)")},l.html=`
|
|
209
|
+
/*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(A))))+" */");var V=new Blob([T],{type:"text/css"}),R=_.href;_.href=URL.createObjectURL(V),R&&URL.revokeObjectURL(R)}.bind(null,p,h),w=function(){r(p),p.href&&URL.revokeObjectURL(p.href)}):(p=l(h),g=function(_,I){var E=I.css,T=I.media;if(T&&_.setAttribute("media",T),_.styleSheet)_.styleSheet.cssText=E;else{for(;_.firstChild;)_.removeChild(_.firstChild);_.appendChild(document.createTextNode(E))}}.bind(null,p),w=function(){r(p)});return g(c),function(_){if(_){if(_.css===c.css&&_.media===c.media&&_.sourceMap===c.sourceMap)return;g(c=_)}else w()}}i.exports=function(c,h){if(typeof DEBUG<"u"&&DEBUG&&typeof document!="object")throw new Error("The style-loader cannot be used in a non-browser environment");(h=h||{}).attrs=typeof h.attrs=="object"?h.attrs:{},h.singleton||typeof h.singleton=="boolean"||(h.singleton=x()),h.insertInto||(h.insertInto="head"),h.insertAt||(h.insertAt="bottom");var p=t(c,h);return n(p,h),function(g){for(var w=[],v=0;v<p.length;v++){var C=p[v];(_=d[C.id]).refs--,w.push(_)}for(g&&n(t(g,h),h),v=0;v<w.length;v++){var _;if((_=w[v]).refs===0){for(var I=0;I<_.parts.length;I++)_.parts[I]();delete d[_.id]}}}};var y=function(){var c=[];return function(h,p){return c[h]=p,c.filter(Boolean).join(`
|
|
210
|
+
`)}}();function b(c,h,p,g){var w=p?"":g.css;if(c.styleSheet)c.styleSheet.cssText=y(h,w);else{var v=document.createTextNode(w),C=c.childNodes;C[h]&&c.removeChild(C[h]),C.length?c.insertBefore(v,C[h]):c.appendChild(v)}}},function(i,a){i.exports=function(u){var d=typeof window<"u"&&window.location;if(!d)throw new Error("fixUrls requires window.location");if(!u||typeof u!="string")return u;var x=d.protocol+"//"+d.host,$=x+d.pathname.replace(/\/[^\/]*$/,"/");return u.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(S,k){var L,O=k.trim().replace(/^"(.*)"$/,function(n,t){return t}).replace(/^'(.*)'$/,function(n,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(O)?S:(L=O.indexOf("//")===0?O:O.indexOf("/")===0?x+O:$+O.replace(/^\.\//,""),"url("+JSON.stringify(L)+")")})}},function(i,a,u){u.r(a);var d=function(){var n=this,t=n.$createElement,o=n._self._c||t;return o("div",{ref:"cropper",staticClass:"vue-cropper",on:{mouseover:n.scaleImg,mouseout:n.cancelScale}},[n.imgs?o("div",{staticClass:"cropper-box"},[o("div",{directives:[{name:"show",rawName:"v-show",value:!n.loading,expression:"!loading"}],staticClass:"cropper-box-canvas",style:{width:n.trueWidth+"px",height:n.trueHeight+"px",transform:"scale("+n.scale+","+n.scale+") translate3d("+n.x/n.scale+"px,"+n.y/n.scale+"px,0)rotateZ("+90*n.rotate+"deg)"}},[o("img",{ref:"cropperImg",attrs:{src:n.imgs,alt:"cropper-img"}})])]):n._e(),n._v(" "),o("div",{staticClass:"cropper-drag-box",class:{"cropper-move":n.move&&!n.crop,"cropper-crop":n.crop,"cropper-modal":n.cropping},on:{mousedown:n.startMove,touchstart:n.startMove}}),n._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:n.cropping,expression:"cropping"}],staticClass:"cropper-crop-box",style:{width:n.cropW+"px",height:n.cropH+"px",transform:"translate3d("+n.cropOffsertX+"px,"+n.cropOffsertY+"px,0)"}},[o("span",{staticClass:"cropper-view-box"},[o("img",{style:{width:n.trueWidth+"px",height:n.trueHeight+"px",transform:"scale("+n.scale+","+n.scale+") translate3d("+(n.x-n.cropOffsertX)/n.scale+"px,"+(n.y-n.cropOffsertY)/n.scale+"px,0)rotateZ("+90*n.rotate+"deg)"},attrs:{src:n.imgs,alt:"cropper-img"}})]),n._v(" "),o("span",{staticClass:"cropper-face cropper-move",on:{mousedown:n.cropMove,touchstart:n.cropMove}}),n._v(" "),n.info?o("span",{staticClass:"crop-info",style:{top:n.cropInfo.top}},[n._v(n._s(this.cropInfo.width)+" \xD7 "+n._s(this.cropInfo.height))]):n._e(),n._v(" "),n.fixedBox?n._e():o("span",[o("span",{staticClass:"crop-line line-w",on:{mousedown:function(r){n.changeCropSize(r,!1,!0,0,1)},touchstart:function(r){n.changeCropSize(r,!1,!0,0,1)}}}),n._v(" "),o("span",{staticClass:"crop-line line-a",on:{mousedown:function(r){n.changeCropSize(r,!0,!1,1,0)},touchstart:function(r){n.changeCropSize(r,!0,!1,1,0)}}}),n._v(" "),o("span",{staticClass:"crop-line line-s",on:{mousedown:function(r){n.changeCropSize(r,!1,!0,0,2)},touchstart:function(r){n.changeCropSize(r,!1,!0,0,2)}}}),n._v(" "),o("span",{staticClass:"crop-line line-d",on:{mousedown:function(r){n.changeCropSize(r,!0,!1,2,0)},touchstart:function(r){n.changeCropSize(r,!0,!1,2,0)}}}),n._v(" "),o("span",{staticClass:"crop-point point1",on:{mousedown:function(r){n.changeCropSize(r,!0,!0,1,1)},touchstart:function(r){n.changeCropSize(r,!0,!0,1,1)}}}),n._v(" "),o("span",{staticClass:"crop-point point2",on:{mousedown:function(r){n.changeCropSize(r,!1,!0,0,1)},touchstart:function(r){n.changeCropSize(r,!1,!0,0,1)}}}),n._v(" "),o("span",{staticClass:"crop-point point3",on:{mousedown:function(r){n.changeCropSize(r,!0,!0,2,1)},touchstart:function(r){n.changeCropSize(r,!0,!0,2,1)}}}),n._v(" "),o("span",{staticClass:"crop-point point4",on:{mousedown:function(r){n.changeCropSize(r,!0,!1,1,0)},touchstart:function(r){n.changeCropSize(r,!0,!1,1,0)}}}),n._v(" "),o("span",{staticClass:"crop-point point5",on:{mousedown:function(r){n.changeCropSize(r,!0,!1,2,0)},touchstart:function(r){n.changeCropSize(r,!0,!1,2,0)}}}),n._v(" "),o("span",{staticClass:"crop-point point6",on:{mousedown:function(r){n.changeCropSize(r,!0,!0,1,2)},touchstart:function(r){n.changeCropSize(r,!0,!0,1,2)}}}),n._v(" "),o("span",{staticClass:"crop-point point7",on:{mousedown:function(r){n.changeCropSize(r,!1,!0,0,2)},touchstart:function(r){n.changeCropSize(r,!1,!0,0,2)}}}),n._v(" "),o("span",{staticClass:"crop-point point8",on:{mousedown:function(r){n.changeCropSize(r,!0,!0,2,2)},touchstart:function(r){n.changeCropSize(r,!0,!0,2,2)}}})])])])};d._withStripped=!0;var x={};x.getData=function(n){return new Promise(function(t,o){var r={};(function(l){var f=null;return new Promise(function(m,y){if(l.src)if(/^data\:/i.test(l.src))f=function(h){h=h.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var p=atob(h),g=p.length,w=new ArrayBuffer(g),v=new Uint8Array(w),C=0;C<g;C++)v[C]=p.charCodeAt(C);return w}(l.src),m(f);else if(/^blob\:/i.test(l.src)){var b=new FileReader;b.onload=function(h){f=h.target.result,m(f)},function(h,p){var g=new XMLHttpRequest;g.open("GET",h,!0),g.responseType="blob",g.onload=function(w){this.status!=200&&this.status!==0||p(this.response)},g.send()}(l.src,function(h){b.readAsArrayBuffer(h)})}else{var c=new XMLHttpRequest;c.onload=function(){if(this.status!=200&&this.status!==0)throw"Could not load image";f=c.response,m(f),c=null},c.open("GET",l.src,!0),c.responseType="arraybuffer",c.send(null)}else y("img error")})})(n).then(function(l){r.arrayBuffer=l,r.orientation=function(f){var m,y,b,c,h,p,g,w,v,C=new DataView(f),_=C.byteLength;if(C.getUint8(0)===255&&C.getUint8(1)===216)for(w=2;w<_;){if(C.getUint8(w)===255&&C.getUint8(w+1)===225){p=w;break}w++}if(p&&(y=p+10,function(I,E,T){var A,W="";for(A=E,T+=E;A<T;A++)W+=String.fromCharCode(I.getUint8(A));return W}(C,p+4,4)==="Exif"&&(h=C.getUint16(y),((c=h===18761)||h===19789)&&C.getUint16(y+2,c)===42&&(b=C.getUint32(y+4,c))>=8&&(g=y+b))),g){for(_=C.getUint16(g,c),v=0;v<_;v++)if(w=g+12*v+2,C.getUint16(w,c)===274){w+=8,m=C.getUint16(w,c);break}}return m}(l),t(r)}).catch(function(l){o(l)})})};var $=x,S={data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:function(){return[1,1]}},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:function(){return 10}}},computed:{cropInfo:function(){var n={};if(n.top=this.cropOffsertY>21?"-21px":"0px",n.width=this.cropW>0?this.cropW:0,n.height=this.cropH>0?this.cropH:0,this.infoTrue){var t=1;this.high&&!this.full&&(t=window.devicePixelRatio),this.enlarge!==1&!this.full&&(t=Math.abs(Number(this.enlarge))),n.width=n.width*t,n.height=n.height*t,this.full&&(n.width=n.width/this.scale,n.height=n.height/this.scale)}return n.width=n.width.toFixed(0),n.height=n.height.toFixed(0),n},isIE:function(){var n=!!window.ActiveXObject||"ActiveXObject"in window;return n},passive:function(){return this.isIE?null:{passive:!1}}},watch:{img:function(){this.checkedImg()},imgs:function(n){n!==""&&this.reload()},cropW:function(){this.showPreview()},cropH:function(){this.showPreview()},cropOffsertX:function(){this.showPreview()},cropOffsertY:function(){this.showPreview()},scale:function(n,t){this.showPreview()},x:function(){this.showPreview()},y:function(){this.showPreview()},autoCrop:function(n){n&&this.goAutoCrop()},autoCropWidth:function(){this.autoCrop&&this.goAutoCrop()},autoCropHeight:function(){this.autoCrop&&this.goAutoCrop()},mode:function(){this.checkedImg()},rotate:function(){this.showPreview(),this.autoCrop?this.goAutoCrop(this.cropW,this.cropH):(this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion:function(n){for(var t=navigator.userAgent.split(" "),o="",r=new RegExp(n,"i"),l=0;l<t.length;l++)r.test(t[l])&&(o=t[l]);return o?o.split("/")[1].split("."):["0","0","0"]},checkOrientationImage:function(n,t,o,r){var l=this;if(this.getVersion("chrome")[0]>=81)t=-1;else if(this.getVersion("safari")[0]>=605){var f=this.getVersion("version");f[0]>13&&f[1]>1&&(t=-1)}else{var m=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(m){var y=m[1];((y=y.split("_"))[0]>13||y[0]>=13&&y[1]>=4)&&(t=-1)}}var b=document.createElement("canvas"),c=b.getContext("2d");switch(c.save(),t){case 2:b.width=o,b.height=r,c.translate(o,0),c.scale(-1,1);break;case 3:b.width=o,b.height=r,c.translate(o/2,r/2),c.rotate(180*Math.PI/180),c.translate(-o/2,-r/2);break;case 4:b.width=o,b.height=r,c.translate(0,r),c.scale(1,-1);break;case 5:b.height=o,b.width=r,c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:b.width=r,b.height=o,c.translate(r/2,o/2),c.rotate(90*Math.PI/180),c.translate(-o/2,-r/2);break;case 7:b.height=o,b.width=r,c.rotate(.5*Math.PI),c.translate(o,-r),c.scale(-1,1);break;case 8:b.height=o,b.width=r,c.translate(r/2,o/2),c.rotate(-90*Math.PI/180),c.translate(-o/2,-r/2);break;default:b.width=o,b.height=r}c.drawImage(n,0,0,o,r),c.restore(),b.toBlob(function(h){var p=URL.createObjectURL(h);URL.revokeObjectURL(l.imgs),l.imgs=p},"image/"+this.outputType,1)},checkedImg:function(){var n=this;if(this.img===null||this.img==="")return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();var t=new Image;if(t.onload=function(){if(n.img==="")return n.$emit("imgLoad","error"),n.$emit("img-load","error"),!1;var r=t.width,l=t.height;$.getData(t).then(function(f){n.orientation=f.orientation||1;var m=n.maxImgSize;!n.orientation&&r<m&l<m?n.imgs=n.img:(r>m&&(l=l/r*m,r=m),l>m&&(r=r/l*m,l=m),n.checkOrientationImage(t,n.orientation,r,l))})},t.onerror=function(){n.$emit("imgLoad","error"),n.$emit("img-load","error")},this.img.substr(0,4)!=="data"&&(t.crossOrigin=""),this.isIE){var o=new XMLHttpRequest;o.onload=function(){var r=URL.createObjectURL(this.response);t.src=r},o.open("GET",this.img,!0),o.responseType="blob",o.send()}else t.src=this.img},startMove:function(n){if(n.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=(n.clientX?n.clientX:n.touches[0].clientX)-this.x,this.moveY=(n.clientY?n.clientY:n.touches[0].clientY)-this.y,n.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),n.touches.length==2&&(this.touches=n.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=n.offsetX?n.offsetX:n.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=n.offsetY?n.offsetY:n.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX=n.clientX?n.clientX:n.touches[0].clientX,this.cropY=n.clientY?n.clientY:n.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale:function(n){var t=this;n.preventDefault();var o=this.scale,r=this.touches[0].clientX,l=this.touches[0].clientY,f=n.touches[0].clientX,m=n.touches[0].clientY,y=this.touches[1].clientX,b=this.touches[1].clientY,c=n.touches[1].clientX,h=n.touches[1].clientY,p=Math.sqrt(Math.pow(r-y,2)+Math.pow(l-b,2)),g=Math.sqrt(Math.pow(f-c,2)+Math.pow(m-h,2))-p,w=1,v=(w=(w=w/this.trueWidth>w/this.trueHeight?w/this.trueHeight:w/this.trueWidth)>.1?.1:w)*g;if(!this.touchNow){if(this.touchNow=!0,g>0?o+=Math.abs(v):g<0&&o>Math.abs(v)&&(o-=Math.abs(v)),this.touches=n.touches,setTimeout(function(){t.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o}},cancelTouchScale:function(n){window.removeEventListener("touchmove",this.touchScale)},moveImg:function(n){var t=this;if(n.preventDefault(),n.touches&&n.touches.length===2)return this.touches=n.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;var o,r,l=n.clientX?n.clientX:n.touches[0].clientX,f=n.clientY?n.clientY:n.touches[0].clientY;o=l-this.moveX,r=f-this.moveY,this.$nextTick(function(){if(t.centerBox){var m,y,b,c,h=t.getImgAxis(o,r,t.scale),p=t.getCropAxis(),g=t.trueHeight*t.scale,w=t.trueWidth*t.scale;switch(t.rotate){case 1:case-1:case 3:case-3:m=t.cropOffsertX-t.trueWidth*(1-t.scale)/2+(g-w)/2,y=t.cropOffsertY-t.trueHeight*(1-t.scale)/2+(w-g)/2,b=m-g+t.cropW,c=y-w+t.cropH;break;default:m=t.cropOffsertX-t.trueWidth*(1-t.scale)/2,y=t.cropOffsertY-t.trueHeight*(1-t.scale)/2,b=m-w+t.cropW,c=y-g+t.cropH}h.x1>=p.x1&&(o=m),h.y1>=p.y1&&(r=y),h.x2<=p.x2&&(o=b),h.y2<=p.y2&&(r=c)}t.x=o,t.y=r,t.$emit("imgMoving",{moving:!0,axis:t.getImgAxis()}),t.$emit("img-moving",{moving:!0,axis:t.getImgAxis()})})},leaveImg:function(n){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("imgMoving",{moving:!1,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg:function(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale:function(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize:function(n){var t=this;n.preventDefault();var o=this.scale,r=n.deltaY||n.wheelDelta;r=navigator.userAgent.indexOf("Firefox")>0?30*r:r,this.isIE&&(r=-r);var l=this.coe,f=(l=l/this.trueWidth>l/this.trueHeight?l/this.trueHeight:l/this.trueWidth)*r;f<0?o+=Math.abs(f):o>Math.abs(f)&&(o-=Math.abs(f));var m=f<0?"add":"reduce";if(m!==this.coeStatus&&(this.coeStatus=m,this.coe=.2),this.scaling||(this.scalingSet=setTimeout(function(){t.scaling=!1,t.coe=t.coe+=.01},50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o},changeScale:function(n){var t=this.scale;n=n||1;var o=20;if((n*=o=o/this.trueWidth>o/this.trueHeight?o/this.trueHeight:o/this.trueWidth)>0?t+=Math.abs(n):t>Math.abs(n)&&(t-=Math.abs(n)),!this.checkoutImgAxis(this.x,this.y,t))return!1;this.scale=t},createCrop:function(n){var t=this;n.preventDefault();var o=n.clientX?n.clientX:n.touches?n.touches[0].clientX:0,r=n.clientY?n.clientY:n.touches?n.touches[0].clientY:0;this.$nextTick(function(){var l=o-t.cropX,f=r-t.cropY;if(l>0?(t.cropW=l+t.cropChangeX>t.w?t.w-t.cropChangeX:l,t.cropOffsertX=t.cropChangeX):(t.cropW=t.w-t.cropChangeX+Math.abs(l)>t.w?t.cropChangeX:Math.abs(l),t.cropOffsertX=t.cropChangeX+l>0?t.cropChangeX+l:0),t.fixed){var m=t.cropW/t.fixedNumber[0]*t.fixedNumber[1];m+t.cropOffsertY>t.h?(t.cropH=t.h-t.cropOffsertY,t.cropW=t.cropH/t.fixedNumber[1]*t.fixedNumber[0],t.cropOffsertX=l>0?t.cropChangeX:t.cropChangeX-t.cropW):t.cropH=m,t.cropOffsertY=t.cropOffsertY}else f>0?(t.cropH=f+t.cropChangeY>t.h?t.h-t.cropChangeY:f,t.cropOffsertY=t.cropChangeY):(t.cropH=t.h-t.cropChangeY+Math.abs(f)>t.h?t.cropChangeY:Math.abs(f),t.cropOffsertY=t.cropChangeY+f>0?t.cropChangeY+f:0)})},changeCropSize:function(n,t,o,r,l){n.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=t,this.canChangeY=o,this.changeCropTypeX=r,this.changeCropTypeY=l,this.cropX=n.clientX?n.clientX:n.touches[0].clientX,this.cropY=n.clientY?n.clientY:n.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow:function(n){var t=this;n.preventDefault();var o=n.clientX?n.clientX:n.touches?n.touches[0].clientX:0,r=n.clientY?n.clientY:n.touches?n.touches[0].clientY:0,l=this.w,f=this.h,m=0,y=0;if(this.centerBox){var b=this.getImgAxis(),c=b.x2,h=b.y2;m=b.x1>0?b.x1:0,y=b.y1>0?b.y1:0,l>c&&(l=c),f>h&&(f=h)}this.$nextTick(function(){var p=o-t.cropX,g=r-t.cropY;if(t.canChangeX&&(t.changeCropTypeX===1?t.cropOldW-p>0?(t.cropW=l-t.cropChangeX-p<=l-m?t.cropOldW-p:t.cropOldW+t.cropChangeX-m,t.cropOffsertX=l-t.cropChangeX-p<=l-m?t.cropChangeX+p:m):(t.cropW=Math.abs(p)+t.cropChangeX<=l?Math.abs(p)-t.cropOldW:l-t.cropOldW-t.cropChangeX,t.cropOffsertX=t.cropChangeX+t.cropOldW):t.changeCropTypeX===2&&(t.cropOldW+p>0?(t.cropW=t.cropOldW+p+t.cropOffsertX<=l?t.cropOldW+p:l-t.cropOffsertX,t.cropOffsertX=t.cropChangeX):(t.cropW=l-t.cropChangeX+Math.abs(p+t.cropOldW)<=l-m?Math.abs(p+t.cropOldW):t.cropChangeX-m,t.cropOffsertX=l-t.cropChangeX+Math.abs(p+t.cropOldW)<=l-m?t.cropChangeX-Math.abs(p+t.cropOldW):m))),t.canChangeY&&(t.changeCropTypeY===1?t.cropOldH-g>0?(t.cropH=f-t.cropChangeY-g<=f-y?t.cropOldH-g:t.cropOldH+t.cropChangeY-y,t.cropOffsertY=f-t.cropChangeY-g<=f-y?t.cropChangeY+g:y):(t.cropH=Math.abs(g)+t.cropChangeY<=f?Math.abs(g)-t.cropOldH:f-t.cropOldH-t.cropChangeY,t.cropOffsertY=t.cropChangeY+t.cropOldH):t.changeCropTypeY===2&&(t.cropOldH+g>0?(t.cropH=t.cropOldH+g+t.cropOffsertY<=f?t.cropOldH+g:f-t.cropOffsertY,t.cropOffsertY=t.cropChangeY):(t.cropH=f-t.cropChangeY+Math.abs(g+t.cropOldH)<=f-y?Math.abs(g+t.cropOldH):t.cropChangeY-y,t.cropOffsertY=f-t.cropChangeY+Math.abs(g+t.cropOldH)<=f-y?t.cropChangeY-Math.abs(g+t.cropOldH):y))),t.canChangeX&&t.fixed){var w=t.cropW/t.fixedNumber[0]*t.fixedNumber[1];w+t.cropOffsertY>f?(t.cropH=f-t.cropOffsertY,t.cropW=t.cropH/t.fixedNumber[1]*t.fixedNumber[0]):t.cropH=w}if(t.canChangeY&&t.fixed){var v=t.cropH/t.fixedNumber[1]*t.fixedNumber[0];v+t.cropOffsertX>l?(t.cropW=l-t.cropOffsertX,t.cropH=t.cropW/t.fixedNumber[0]*t.fixedNumber[1]):t.cropW=v}})},checkCropLimitSize:function(){this.cropW,this.cropH;var n=this.limitMinSize,t=new Array;return t=Array.isArray[n]?n:[n,n],[parseFloat(t[0]),parseFloat(t[1])]},changeCropEnd:function(n){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},endCrop:function(){this.cropW===0&&this.cropH===0&&(this.cropping=!1),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop:function(){this.crop=!0},stopCrop:function(){this.crop=!1},clearCrop:function(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove:function(n){if(n.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(n),!1;if(n.touches&&n.touches.length===2)return this.crop=!1,this.startMove(n),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);var t,o,r=n.clientX?n.clientX:n.touches[0].clientX,l=n.clientY?n.clientY:n.touches[0].clientY;t=r-this.cropOffsertX,o=l-this.cropOffsertY,this.cropX=t,this.cropY=o,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop:function(n,t){var o=this,r=0,l=0;n&&(n.preventDefault(),r=n.clientX?n.clientX:n.touches[0].clientX,l=n.clientY?n.clientY:n.touches[0].clientY),this.$nextTick(function(){var f,m,y=r-o.cropX,b=l-o.cropY;if(t&&(y=o.cropOffsertX,b=o.cropOffsertY),f=y<=0?0:y+o.cropW>o.w?o.w-o.cropW:y,m=b<=0?0:b+o.cropH>o.h?o.h-o.cropH:b,o.centerBox){var c=o.getImgAxis();f<=c.x1&&(f=c.x1),f+o.cropW>c.x2&&(f=c.x2-o.cropW),m<=c.y1&&(m=c.y1),m+o.cropH>c.y2&&(m=c.y2-o.cropH)}o.cropOffsertX=f,o.cropOffsertY=m,o.$emit("cropMoving",{moving:!0,axis:o.getCropAxis()}),o.$emit("crop-moving",{moving:!0,axis:o.getCropAxis()})})},getImgAxis:function(n,t,o){n=n||this.x,t=t||this.y,o=o||this.scale;var r={x1:0,x2:0,y1:0,y2:0},l=this.trueWidth*o,f=this.trueHeight*o;switch(this.rotate){case 0:r.x1=n+this.trueWidth*(1-o)/2,r.x2=r.x1+this.trueWidth*o,r.y1=t+this.trueHeight*(1-o)/2,r.y2=r.y1+this.trueHeight*o;break;case 1:case-1:case 3:case-3:r.x1=n+this.trueWidth*(1-o)/2+(l-f)/2,r.x2=r.x1+this.trueHeight*o,r.y1=t+this.trueHeight*(1-o)/2+(f-l)/2,r.y2=r.y1+this.trueWidth*o;break;default:r.x1=n+this.trueWidth*(1-o)/2,r.x2=r.x1+this.trueWidth*o,r.y1=t+this.trueHeight*(1-o)/2,r.y2=r.y1+this.trueHeight*o}return r},getCropAxis:function(){var n={x1:0,x2:0,y1:0,y2:0};return n.x1=this.cropOffsertX,n.x2=n.x1+this.cropW,n.y1=this.cropOffsertY,n.y2=n.y1+this.cropH,n},leaveCrop:function(n){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("cropMoving",{moving:!1,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked:function(n){var t=this,o=document.createElement("canvas"),r=new Image,l=this.rotate,f=this.trueWidth,m=this.trueHeight,y=this.cropOffsertX,b=this.cropOffsertY;function c(h,p){o.width=Math.round(h),o.height=Math.round(p)}r.onload=function(){if(t.cropW!==0){var h=o.getContext("2d"),p=1;t.high&!t.full&&(p=window.devicePixelRatio),t.enlarge!==1&!t.full&&(p=Math.abs(Number(t.enlarge)));var g=t.cropW*p,w=t.cropH*p,v=f*t.scale*p,C=m*t.scale*p,_=(t.x-y+t.trueWidth*(1-t.scale)/2)*p,I=(t.y-b+t.trueHeight*(1-t.scale)/2)*p;switch(c(g,w),h.save(),l){case 0:t.full?(c(g/t.scale,w/t.scale),h.drawImage(r,_/t.scale,I/t.scale,v/t.scale,C/t.scale)):h.drawImage(r,_,I,v,C);break;case 1:case-3:t.full?(c(g/t.scale,w/t.scale),_=_/t.scale+(v/t.scale-C/t.scale)/2,I=I/t.scale+(C/t.scale-v/t.scale)/2,h.rotate(90*l*Math.PI/180),h.drawImage(r,I,-_-C/t.scale,v/t.scale,C/t.scale)):(_+=(v-C)/2,I+=(C-v)/2,h.rotate(90*l*Math.PI/180),h.drawImage(r,I,-_-C,v,C));break;case 2:case-2:t.full?(c(g/t.scale,w/t.scale),h.rotate(90*l*Math.PI/180),_/=t.scale,I/=t.scale,h.drawImage(r,-_-v/t.scale,-I-C/t.scale,v/t.scale,C/t.scale)):(h.rotate(90*l*Math.PI/180),h.drawImage(r,-_-v,-I-C,v,C));break;case 3:case-1:t.full?(c(g/t.scale,w/t.scale),_=_/t.scale+(v/t.scale-C/t.scale)/2,I=I/t.scale+(C/t.scale-v/t.scale)/2,h.rotate(90*l*Math.PI/180),h.drawImage(r,-I-v/t.scale,_,v/t.scale,C/t.scale)):(_+=(v-C)/2,I+=(C-v)/2,h.rotate(90*l*Math.PI/180),h.drawImage(r,-I-v,_,v,C));break;default:t.full?(c(g/t.scale,w/t.scale),h.drawImage(r,_/t.scale,I/t.scale,v/t.scale,C/t.scale)):h.drawImage(r,_,I,v,C)}h.restore()}else{var E=f*t.scale,T=m*t.scale,A=o.getContext("2d");switch(A.save(),l){case 0:c(E,T),A.drawImage(r,0,0,E,T);break;case 1:case-3:c(T,E),A.rotate(90*l*Math.PI/180),A.drawImage(r,0,-T,E,T);break;case 2:case-2:c(E,T),A.rotate(90*l*Math.PI/180),A.drawImage(r,-E,-T,E,T);break;case 3:case-1:c(T,E),A.rotate(90*l*Math.PI/180),A.drawImage(r,-E,0,E,T);break;default:c(E,T),A.drawImage(r,0,0,E,T)}A.restore()}n(o)},this.img.substr(0,4)!=="data"&&(r.crossOrigin="Anonymous"),r.src=this.imgs},getCropData:function(n){var t=this;this.getCropChecked(function(o){n(o.toDataURL("image/"+t.outputType,t.outputSize))})},getCropBlob:function(n){var t=this;this.getCropChecked(function(o){o.toBlob(function(r){return n(r)},"image/"+t.outputType,t.outputSize)})},showPreview:function(){var n=this;if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout(function(){n.isCanShow=!0},16);var t=this.cropW,o=this.cropH,r=this.scale,l={};l.div={width:"".concat(t,"px"),height:"".concat(o,"px")};var f=(this.x-this.cropOffsertX)/r,m=(this.y-this.cropOffsertY)/r;l.w=t,l.h=o,l.url=this.imgs,l.img={width:"".concat(this.trueWidth,"px"),height:"".concat(this.trueHeight,"px"),transform:"scale(".concat(r,")translate3d(").concat(f,"px, ").concat(m,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,"deg)")},l.html=`
|
|
211
211
|
<div class="show-preview" style="width: `.concat(l.w,"px; height: ").concat(l.h,`px,; overflow: hidden">
|
|
212
212
|
<div style="width: `).concat(t,"px; height: ").concat(o,`px">
|
|
213
213
|
<img src=`).concat(l.url,' style="width: ').concat(this.trueWidth,"px; height: ").concat(this.trueHeight,`px; transform:
|
|
214
214
|
scale(`).concat(r,")translate3d(").concat(f,"px, ").concat(m,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,`deg)">
|
|
215
215
|
</div>
|
|
216
|
-
</div>`),this.$emit("realTime",l),this.$emit("real-time",l)},reload:function(){var i=this,t=new Image;t.onload=function(){i.w=parseFloat(window.getComputedStyle(i.$refs.cropper).width),i.h=parseFloat(window.getComputedStyle(i.$refs.cropper).height),i.trueWidth=t.width,i.trueHeight=t.height,i.original?i.scale=1:i.scale=i.checkedMode(),i.$nextTick(function(){i.x=-(i.trueWidth-i.trueWidth*i.scale)/2+(i.w-i.trueWidth*i.scale)/2,i.y=-(i.trueHeight-i.trueHeight*i.scale)/2+(i.h-i.trueHeight*i.scale)/2,i.loading=!1,i.autoCrop&&i.goAutoCrop(),i.$emit("img-load","success"),i.$emit("imgLoad","success"),setTimeout(function(){i.showPreview()},20)})},t.onerror=function(){i.$emit("imgLoad","error"),i.$emit("img-load","error")},t.src=this.imgs},checkedMode:function(){var i=1,t=(this.trueWidth,this.trueHeight),o=this.mode.split(" ");switch(o[0]){case"contain":this.trueWidth>this.w&&(i=this.w/this.trueWidth),this.trueHeight*i>this.h&&(i=this.h/this.trueHeight);break;case"cover":(t*=i=this.w/this.trueWidth)<this.h&&(i=(t=this.h)/this.trueHeight);break;default:try{var r=o[0];if(r.search("px")!==-1&&(r=r.replace("px",""),i=parseFloat(r)/this.trueWidth),r.search("%")!==-1&&(r=r.replace("%",""),i=parseFloat(r)/100*this.w/this.trueWidth),o.length===2&&r==="auto"){var l=o[1];l.search("px")!==-1&&(l=l.replace("px",""),i=(t=parseFloat(l))/this.trueHeight),l.search("%")!==-1&&(l=l.replace("%",""),i=(t=parseFloat(l)/100*this.h)/this.trueHeight)}}catch{i=1}}return i},goAutoCrop:function(i,t){if(this.imgs!==""&&this.imgs!==null){this.clearCrop(),this.cropping=!0;var o=this.w,r=this.h;if(this.centerBox){var l=this.trueWidth*this.scale,f=this.trueHeight*this.scale;o=l<o?l:o,r=f<r?f:r}var m=i||parseFloat(this.autoCropWidth),y=t||parseFloat(this.autoCropHeight);m!==0&&y!==0||(m=.8*o,y=.8*r),m=m>o?o:m,y=y>r?r:y,this.fixed&&(y=m/this.fixedNumber[0]*this.fixedNumber[1]),y>this.h&&(m=(y=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(m,y)}},changeCrop:function(i,t){var o=this;if(this.centerBox){var r=this.getImgAxis();i>r.x2-r.x1&&(t=(i=r.x2-r.x1)/this.fixedNumber[0]*this.fixedNumber[1]),t>r.y2-r.y1&&(i=(t=r.y2-r.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=i,this.cropH=t,this.checkCropLimitSize(),this.$nextTick(function(){o.cropOffsertX=(o.w-o.cropW)/2,o.cropOffsertY=(o.h-o.cropH)/2,o.centerBox&&o.moveCrop(null,!0)})},refresh:function(){var i=this;this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick(function(){i.checkedImg()})},rotateLeft:function(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight:function(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear:function(){this.rotate=0},checkoutImgAxis:function(i,t,o){i=i||this.x,t=t||this.y,o=o||this.scale;var r=!0;if(this.centerBox){var l=this.getImgAxis(i,t,o),f=this.getCropAxis();l.x1>=f.x1&&(r=!1),l.x2<=f.x2&&(r=!1),l.y1>=f.y1&&(r=!1),l.y2<=f.y2&&(r=!1)}return r}},mounted:function(){this.support="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";var i=this,t=navigator.userAgent;this.isIOS=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(o,r,l){for(var f=atob(this.toDataURL(r,l).split(",")[1]),m=f.length,y=new Uint8Array(m),b=0;b<m;b++)y[b]=f.charCodeAt(b);o(new Blob([y],{type:i.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},destroyed:function(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop)}};u(1);var k=function(i,t,o,r,l,f,m,y){var b,c=typeof i=="function"?i.options:i;if(t&&(c.render=t,c.staticRenderFns=o,c._compiled=!0),r&&(c.functional=!0),f&&(c._scopeId="data-v-"+f),m?(b=function(g){(g=g||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||typeof __VUE_SSR_CONTEXT__>"u"||(g=__VUE_SSR_CONTEXT__),l&&l.call(this,g),g&&g._registeredComponents&&g._registeredComponents.add(m)},c._ssrRegister=b):l&&(b=y?function(){l.call(this,this.$root.$options.shadowRoot)}:l),b)if(c.functional){c._injectStyles=b;var h=c.render;c.render=function(g,w){return b.call(w),h(g,w)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,b):[b]}return{exports:i,options:c}}(S,d,[],!1,null,"6dae58fd",null);k.options.__file="src/vue-cropper.vue";var L=k.exports;u.d(a,"VueCropper",function(){return L});var O=function(i){i.component("VueCropper",L)};typeof window<"u"&&window.Vue&&O(window.Vue),a.default={version:"0.5.5",install:O,VueCropper:L,vueCropper:L}}])})})(j);const ye={data(){return{width:"800px",visible:!1,id:null,confirmLoading:!1,fileList:[],uploading:!1,options:{img:"",autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!0},previews:{},fullscreen:!1}},computed:{modalStyle(){return this.fullscreen?{width:"100%",dialogStyle:{top:"0px"}}:{width:this.width,dialogStyle:{top:"40px"}}}},components:{VueCropper:j.exports.VueCropper},methods:{toggleFullscreen(){this.fullscreen=!this.fullscreen},edit(s){this.fullscreen=!1,this.visible=!0,this.id=s},close(){this.id=null,this.visible=!1},cancelHandel(){this.close()},changeScale(s){s=s||1,this.$refs.cropper.changeScale(s)},rotateLeft(){this.$refs.cropper.rotateLeft()},rotateRight(){this.$refs.cropper.rotateRight()},beforeUpload(s){this.fileList=s;const e=new FileReader;return e.readAsDataURL(s),e.onload=()=>{this.options.img=e.result},!1},finish(s){s==="blob"?(this.uploading=!0,this.$refs.cropper.getCropBlob(e=>{const n=new window.File([e],this.fileList.name,{type:this.fileList.type}),a=new FormData;a.append("file",n),Y.sysFileInfoUploadAvatar(a).then(u=>{u.success?this.updateAvatar(u.data):(this.uploading=!1,this.$message.error(u.message))})})):this.$refs.cropper.getCropData(e=>{})},updateAvatar(s){const e={id:this.id,avatar:s};M.sysUserUpdateAvatar(e).then(n=>{this.uploading=!1,n.success?(this.visible=!1,this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F"))):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+n.message),this.$emit("ok",s)}).catch(n=>{this.$emit("ok",s)})},realTime(s){this.previews=s},doEvent(s){let e=s.item.functionName;this[e]&&this[e]()}}};var _e=function(){var e=this,n=e._self._c;return n("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.modalStyle.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(a){e.visible=a},closed:e.cancelHandel}},[n("gd-modal-title",{attrs:{slot:"title",title:e.$i18nt("gd.account.modifyavatar","\u4FEE\u6539\u5934\u50CF"),fullscreen:e.fullscreen,buttons:[],confirmLoading:e.confirmLoading,showClose:!0,closed:"cancelHandel"},on:{changeEvent:e.doEvent},slot:"title"}),n("div",{staticClass:"gd-model-body",class:e.fullscreen?"modal-bodyq":"modal-body"},[n("el-row",[n("el-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[n("vue-cropper",{ref:"cropper",attrs:{img:e.options.img,info:!0,autoCrop:e.options.autoCrop,autoCropWidth:e.options.autoCropWidth,autoCropHeight:e.options.autoCropHeight,fixedBox:e.options.fixedBox},on:{realTime:e.realTime}})],1),n("el-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[n("div",{staticClass:"avatar-upload-preview"},[n("img",{style:e.previews.img,attrs:{src:e.previews.url}})])])],1),n("br"),n("el-row",[n("el-col",{attrs:{lg:3,md:3}},[n("el-upload",{attrs:{name:"file",action:"",beforeUpload:e.beforeUpload,showUploadList:!1}},[n("el-button",{staticClass:"el-icon-upload2"},[e._v(e._s(e.$i18nt("gd.account.selectPicture","\u9009\u62E9\u56FE\u7247")))])],1)],1),n("el-col",{attrs:{lg:{span:1,offset:2},md:2}},[n("el-button",{staticClass:"el-icon-plus",on:{click:function(a){return e.changeScale(1)}}})],1),n("el-col",{attrs:{lg:{span:1,offset:1},md:2}},[n("el-button",{staticClass:"el-icon-minus",on:{click:function(a){return e.changeScale(-1)}}})],1),n("el-col",{attrs:{lg:{span:1,offset:1},md:2}},[n("el-button",{staticClass:"el-icon-refresh-left",on:{click:e.rotateLeft}})],1),n("el-col",{attrs:{lg:{span:1,offset:1},md:2}},[n("el-button",{staticClass:"el-icon-refresh-right",on:{click:e.rotateRight}})],1),n("el-col",{attrs:{lg:{span:2,offset:6},md:2}},[n("el-button",{attrs:{type:"primary",loading:e.uploading},on:{click:function(a){return e.finish("blob")}}},[e._v(" "+e._s(e.$i18nt("gd.btn.save"))+" ")])],1)],1)],1)],1)},$e=[],Se=H.normalizeComponent(ye,_e,$e,!1,null,"1fe51f00",null,null);const Ie=Se.exports,Le=Object.freeze(Object.defineProperty({__proto__:null,default:Ie},Symbol.toStringTag,{value:"Module"}));const ke={props:{isShow:{type:Boolean,default(){return!1}}},data(){return{sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],confirmLoading:!1,visible:!1,userId:"",width:"600px",min:0,messageTip:"",messageTipErr:"",lenMax:0,lenMin:0,maskValue:"",pattern:null,fullscreen:!1,disabled:!0,code:"",num:0,ruleForm:{}}},computed:{modalStyle(){return this.fullscreen?{width:"100%",dialogStyle:{top:"0px"}}:{width:this.width,dialogStyle:{top:"40px"}}},title(){return this.num==1?this.$i18nt("gd.account.changePaw","\u4FEE\u6539\u5BC6\u7801"):this.$i18nt("gd.account.userBinding","\u7528\u6237\u7ED1\u5B9A")},...H.mapGetters(["labelPosition"])},methods:{toggleFullscreen(){this.fullscreen=!this.fullscreen},open(s,e,n){this.fullscreen=!1,this.userId=s,this.code=e,this.num=n,this.num==1?this.getConfigInfo():this.$nextTick(()=>{this.formUpdPwd.setFieldsValue({account:this.userId})}),this.visible=!0},getConfigInfo(s){M.getPasswordRules().then(e=>{this.min=parseInt(e.data.lengthrule.value),this.lenMin=parseInt(e.data.lengthrule.value),this.messageTip=e.data.lengthrule.remark,this.maskValue=e.data.combinationrule.value,this.lenMax=16,this.maskValue.includes("AL")&&this.maskValue.includes("NU")&&this.maskValue.includes("SC")?this.pattern=new RegExp(`^(?=.*\\d)(?=.*?[a-z])(?=.*?[A-Z])(?=.*[~!@#$%^&*])[\\da-zA-Z~!@#$%^&*]{${this.lenMin},${this.lenMax}}$`):this.maskValue.includes("AL")&&this.maskValue.includes("NU")?this.pattern=new RegExp("(?=.*\\d)(?=.*?[a-z])(?=.*?[A-Z])"):this.maskValue.includes("AL")&&this.maskValue.includes("SC")?this.pattern=new RegExp("(?=.*[~!@#$%^&*])(?=.*?[a-z])(?=.*?[A-Z]))"):this.maskValue.includes("NU")&&this.maskValue.includes("SC")?this.pattern=new RegExp("(?=.*\\d)(?=.*[~!@#$%^&*])"):this.maskValue.includes("AL")?this.pattern=new RegExp("^(?=.*?[a-z])(?=.*?[A-Z])"):this.maskValue.includes("NU")?this.pattern=new RegExp("\\d"):this.maskValue.includes("SC")&&(this.pattern=new RegExp("[^a-zA-Z0-9]")),this.messageTipErr=e.data.combinationrule.remark})},handleSubmit(){this.$refs.ruleForm.validate(s=>{if(s){this.confirmLoading=!0;let e;this.num==1?e={accountName:this.userId,passWord:this.ruleForm.password,newPassword:this.ruleForm.newPassword}:e={account:this.ruleForm.account,password:this.ruleForm.password,corpCode:this.code},(this.num==1?M.updatePwdByAccount:M.BindWechatWorkAccountByCode)(e).then(a=>{a.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+a.message)}).finally(a=>{this.confirmLoading=!1})}})},handleCancel(){this.$refs.ruleForm.resetFields(),this.visible=!1},compareToFirstPassword(s,e,n){e&&e!==this.ruleForm.newPassword?n(this.$i18nt("gd.account.repeatPawTiperr"," \u8BF7\u786E\u8BA4\u4E24\u6B21\u8F93\u5165\u5BC6\u7801\u7684\u4E00\u81F4\u6027")):n()},oldtPassword(s,e,n){e&&e===this.ruleForm.password?n(this.$i18nt("gd.account.repeatPawTipodl","\u65B0\u5BC6\u7801\u4E0D\u80FD\u4E0E\u539F\u5BC6\u7801\u91CD\u590D")):n()},doEvent(s){let e=s.item.functionName;this[e]&&this[e]()}}};var Oe=function(){var e=this,n=e._self._c;return n("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.modalStyle.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(a){e.visible=a},closed:e.handleCancel}},[n("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullscreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,closed:"handleCancel"},on:{changeEvent:e.doEvent},slot:"title"}),n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticClass:"gd-model-body",class:e.fullscreen?"modal-bodyq":"modal-body",staticStyle:{margin:"10px 10px 10px"}},[n("el-form",{ref:"ruleForm",attrs:{model:e.ruleForm,"label-width":"110px","label-position":e.labelPosition},nativeOn:{submit:function(a){a.preventDefault()}}},[e.num==1?n("div",[n("el-form-item",{attrs:{label:e.$i18nt("gd.account.originalPaw","\u539F\u5BC6\u7801"),prop:"password",rules:[{required:!0,message:e.$i18nt("gd.placeholder.input")}]}},[n("el-input",{attrs:{maxlength:18,"show-password":"",placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.password,callback:function(a){e.$set(e.ruleForm,"password",a)},expression:"ruleForm.password"}})],1),n("el-form-item",{attrs:{label:e.$i18nt("gd.account.newPaw","\u65B0\u5BC6\u7801"),prop:"newPassword",rules:[{required:!0,min:e.min,message:e.messageTip},{pattern:e.pattern,message:e.messageTipErr},{validator:e.oldtPassword}]}},[n("el-input",{attrs:{maxlength:18,"show-password":"",placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.newPassword,callback:function(a){e.$set(e.ruleForm,"newPassword",a)},expression:"ruleForm.newPassword"}})],1),n("el-form-item",{attrs:{label:e.$i18nt("gd.account.repeatPaw","\u91CD\u590D\u65B0\u5BC6\u7801"),prop:"confirm",rules:[{required:!0,message:e.$i18nt("gd.account.repeatPawTip","\u8BF7\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801")},{validator:e.compareToFirstPassword}]}},[n("el-input",{attrs:{maxlength:18,"show-password":"",placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.confirm,callback:function(a){e.$set(e.ruleForm,"confirm",a)},expression:"ruleForm.confirm"}})],1)],1):n("div",[n("el-form-item",{attrs:{label:e.$i18nt("gd.account.loginID","\u8D26\u53F7"),prop:"account",rules:[{required:!0,message:this.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")}]}},[n("el-input",{attrs:{placeholder:e.$i18nt("gd.login.account","\u8BF7\u8F93\u5165\u8D26\u53F7"),disabled:e.disabled},model:{value:e.ruleForm.account,callback:function(a){e.$set(e.ruleForm,"account",a)},expression:"ruleForm.account"}})],1),n("el-form-item",{attrs:{label:e.$i18nt("gd.login.password","\u5BC6\u7801"),prop:"password",rules:[{required:!0,message:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")}]}},[n("el-input",{attrs:{maxlength:18,placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),"show-password":""},model:{value:e.ruleForm.password,callback:function(a){e.$set(e.ruleForm,"password",a)},expression:"ruleForm.password"}})],1)],1)])],1)],1)},Te=[],Ee=H.normalizeComponent(ke,Oe,Te,!1,null,"1d4e1c11",null,null);const q=Ee.exports,Ae=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"}));const He={props:{isClear:{type:Number,default:1}},components:{UpdPwd:q},data(){return{visible:!1,qrCodeUrl:"//login.work.weixin.qq.com/wwlogin/sso/qrcode?key=ae88c122560120a2",code:"",logTitle:"",num:1,wwLogin:null,confirmLoading:!1,isInitialize:null,pwdExpiration:"",setDate:void 0,currentTime:void 0,diff:void 0,diffDate:void 0,state:"",isWeComLogin:!1,wxUserId:null,appId:"",agentId:"",redirectURL:"",titleWidth:"504px",num1:0,timeOut:null}},computed:{style(){return{"--color":this.primaryColor}},titleTip(){return this.num==1?$i18nt("gd.account.loading"):""},...H.mapGetters(["userInfo","language","primaryColor"])},mounted(){},methods:{open(s,e){this.num=e,this.visible=!0,this.titleWidth=this.language=="zh_CN"?350+"px":504+"px",this.num==1&&this.getWeChat(s)},getWeChat(s){let e=this;s.data.forEach((n,a)=>{n.code=="GDS_ENTERPRISE_WECHAT_CropID"&&(e.appId=n.value),n.code=="GDS_ENTERPRISE_WECHAT_AgentId"&&(e.agentId=n.value),n.code=="GDS_ENTERPRISE_WECHAT_Redirect_URL"&&(e.redirectURL=n.value)}),this.timeOut=setTimeout(()=>{e.wwLogin=ww.createWWLoginPanel({el:"#wx_qrcode",params:{login_type:"CorpApp",appid:e.appId,agentid:e.agentId,redirect_uri:e.redirectURL,state:"loginState",redirect_type:"callback",panel_size:e.language=="zh_CN"?"small":"middle",lang:e.language=="zh_CN"?"zh":"en"},onCheckWeComLogin({isWeComLogin:n}){e.isWeComLogin=n,e.num1=e.isWeComLogin==!0?1:0},onLoginSuccess({code:n}){e.code=n,e.$refs.updPwd.open(e.userInfo.account,n,2),e.visible=!1},onLoginFail(n){}})},500)},handleCancel(){this.confirmLoading=!1,this.visible=!1,this.$refs.wx_qrcode.innerHTML=""}},beforeDestroy(){this.timeOut&&clearTimeout(this.timeOut),this.timeOut=null}};var Me=function(){var e=this,n=e._self._c;return n("div",[n("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",attrs:{visible:e.visible,width:e.titleWidth,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px"},on:{"update:visible":function(a){e.visible=a},closed:e.handleCancel}},[n("div",{staticClass:"main",style:e.style},[e.num==1?n("div",[n("div",{ref:"wx_qrcode",style:e.num1==0?"height: 290px;":"height: 290px",attrs:{id:"wx_qrcode"}}),n("div",{class:e.num1==0?"div_top":"div_topno"}),n("div",{class:e.num1==0?"div_bottom":""})]):e._e()])]),n("upd-pwd",{ref:"updPwd"})],1)},We=[],Pe=H.normalizeComponent(He,Me,We,!1,null,"cdcc96ed",null,null);const Xe=Pe.exports,Fe=Object.freeze(Object.defineProperty({__proto__:null,default:Xe},Symbol.toStringTag,{value:"Module"}));exports.index=se;exports.index$1=ue;exports.index$2=me;exports.index$3=Ce;
|
|
216
|
+
</div>`),this.$emit("realTime",l),this.$emit("real-time",l)},reload:function(){var n=this,t=new Image;t.onload=function(){n.w=parseFloat(window.getComputedStyle(n.$refs.cropper).width),n.h=parseFloat(window.getComputedStyle(n.$refs.cropper).height),n.trueWidth=t.width,n.trueHeight=t.height,n.original?n.scale=1:n.scale=n.checkedMode(),n.$nextTick(function(){n.x=-(n.trueWidth-n.trueWidth*n.scale)/2+(n.w-n.trueWidth*n.scale)/2,n.y=-(n.trueHeight-n.trueHeight*n.scale)/2+(n.h-n.trueHeight*n.scale)/2,n.loading=!1,n.autoCrop&&n.goAutoCrop(),n.$emit("img-load","success"),n.$emit("imgLoad","success"),setTimeout(function(){n.showPreview()},20)})},t.onerror=function(){n.$emit("imgLoad","error"),n.$emit("img-load","error")},t.src=this.imgs},checkedMode:function(){var n=1,t=(this.trueWidth,this.trueHeight),o=this.mode.split(" ");switch(o[0]){case"contain":this.trueWidth>this.w&&(n=this.w/this.trueWidth),this.trueHeight*n>this.h&&(n=this.h/this.trueHeight);break;case"cover":(t*=n=this.w/this.trueWidth)<this.h&&(n=(t=this.h)/this.trueHeight);break;default:try{var r=o[0];if(r.search("px")!==-1&&(r=r.replace("px",""),n=parseFloat(r)/this.trueWidth),r.search("%")!==-1&&(r=r.replace("%",""),n=parseFloat(r)/100*this.w/this.trueWidth),o.length===2&&r==="auto"){var l=o[1];l.search("px")!==-1&&(l=l.replace("px",""),n=(t=parseFloat(l))/this.trueHeight),l.search("%")!==-1&&(l=l.replace("%",""),n=(t=parseFloat(l)/100*this.h)/this.trueHeight)}}catch{n=1}}return n},goAutoCrop:function(n,t){if(this.imgs!==""&&this.imgs!==null){this.clearCrop(),this.cropping=!0;var o=this.w,r=this.h;if(this.centerBox){var l=this.trueWidth*this.scale,f=this.trueHeight*this.scale;o=l<o?l:o,r=f<r?f:r}var m=n||parseFloat(this.autoCropWidth),y=t||parseFloat(this.autoCropHeight);m!==0&&y!==0||(m=.8*o,y=.8*r),m=m>o?o:m,y=y>r?r:y,this.fixed&&(y=m/this.fixedNumber[0]*this.fixedNumber[1]),y>this.h&&(m=(y=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(m,y)}},changeCrop:function(n,t){var o=this;if(this.centerBox){var r=this.getImgAxis();n>r.x2-r.x1&&(t=(n=r.x2-r.x1)/this.fixedNumber[0]*this.fixedNumber[1]),t>r.y2-r.y1&&(n=(t=r.y2-r.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=n,this.cropH=t,this.checkCropLimitSize(),this.$nextTick(function(){o.cropOffsertX=(o.w-o.cropW)/2,o.cropOffsertY=(o.h-o.cropH)/2,o.centerBox&&o.moveCrop(null,!0)})},refresh:function(){var n=this;this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick(function(){n.checkedImg()})},rotateLeft:function(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight:function(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear:function(){this.rotate=0},checkoutImgAxis:function(n,t,o){n=n||this.x,t=t||this.y,o=o||this.scale;var r=!0;if(this.centerBox){var l=this.getImgAxis(n,t,o),f=this.getCropAxis();l.x1>=f.x1&&(r=!1),l.x2<=f.x2&&(r=!1),l.y1>=f.y1&&(r=!1),l.y2<=f.y2&&(r=!1)}return r}},mounted:function(){this.support="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";var n=this,t=navigator.userAgent;this.isIOS=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(o,r,l){for(var f=atob(this.toDataURL(r,l).split(",")[1]),m=f.length,y=new Uint8Array(m),b=0;b<m;b++)y[b]=f.charCodeAt(b);o(new Blob([y],{type:n.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},destroyed:function(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop)}};u(1);var k=function(n,t,o,r,l,f,m,y){var b,c=typeof n=="function"?n.options:n;if(t&&(c.render=t,c.staticRenderFns=o,c._compiled=!0),r&&(c.functional=!0),f&&(c._scopeId="data-v-"+f),m?(b=function(g){(g=g||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||typeof __VUE_SSR_CONTEXT__>"u"||(g=__VUE_SSR_CONTEXT__),l&&l.call(this,g),g&&g._registeredComponents&&g._registeredComponents.add(m)},c._ssrRegister=b):l&&(b=y?function(){l.call(this,this.$root.$options.shadowRoot)}:l),b)if(c.functional){c._injectStyles=b;var h=c.render;c.render=function(g,w){return b.call(w),h(g,w)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,b):[b]}return{exports:n,options:c}}(S,d,[],!1,null,"6dae58fd",null);k.options.__file="src/vue-cropper.vue";var L=k.exports;u.d(a,"VueCropper",function(){return L});var O=function(n){n.component("VueCropper",L)};typeof window<"u"&&window.Vue&&O(window.Vue),a.default={version:"0.5.5",install:O,VueCropper:L,vueCropper:L}}])})})(j);const ye={data(){return{width:"800px",visible:!1,id:null,confirmLoading:!1,fileList:[],uploading:!1,options:{img:"",autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!0},previews:{},fullscreen:!1}},computed:{modalStyle(){return this.fullscreen?{width:"100%",dialogStyle:{top:"0px"}}:{width:this.width,dialogStyle:{top:"40px"}}}},components:{VueCropper:j.exports.VueCropper},methods:{toggleFullscreen(){this.fullscreen=!this.fullscreen},edit(s){this.fullscreen=!1,this.visible=!0,this.id=s},close(){this.id=null,this.visible=!1},cancelHandel(){this.close()},changeScale(s){s=s||1,this.$refs.cropper.changeScale(s)},rotateLeft(){this.$refs.cropper.rotateLeft()},rotateRight(){this.$refs.cropper.rotateRight()},beforeUpload(s){this.fileList=s;const e=new FileReader;return e.readAsDataURL(s),e.onload=()=>{this.options.img=e.result},!1},finish(s){s==="blob"?(this.uploading=!0,this.$refs.cropper.getCropBlob(e=>{const i=new window.File([e],this.fileList.name,{type:this.fileList.type}),a=new FormData;a.append("file",i),Y.sysFileInfoUploadAvatar(a).then(u=>{u.success?this.updateAvatar(u.data):(this.uploading=!1,this.$message.error(u.message))})})):this.$refs.cropper.getCropData(e=>{})},updateAvatar(s){const e={id:this.id,avatar:s};M.sysUserUpdateAvatar(e).then(i=>{this.uploading=!1,i.success?(this.visible=!1,this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F"))):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+i.message),this.$emit("ok",s)}).catch(i=>{this.$emit("ok",s)})},realTime(s){this.previews=s},doEvent(s){let e=s.item.functionName;this[e]&&this[e]()}}};var _e=function(){var e=this,i=e._self._c;return i("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.modalStyle.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(a){e.visible=a},closed:e.cancelHandel}},[i("gd-modal-title",{attrs:{slot:"title",title:e.$i18nt("gd.account.modifyavatar","\u4FEE\u6539\u5934\u50CF"),fullscreen:e.fullscreen,buttons:[],confirmLoading:e.confirmLoading,showClose:!0,closed:"cancelHandel"},on:{changeEvent:e.doEvent},slot:"title"}),i("div",{staticClass:"gd-model-body",class:e.fullscreen?"modal-bodyq":"modal-body"},[i("el-row",[i("el-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[i("vue-cropper",{ref:"cropper",attrs:{img:e.options.img,info:!0,autoCrop:e.options.autoCrop,autoCropWidth:e.options.autoCropWidth,autoCropHeight:e.options.autoCropHeight,fixedBox:e.options.fixedBox},on:{realTime:e.realTime}})],1),i("el-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[i("div",{staticClass:"avatar-upload-preview"},[i("img",{style:e.previews.img,attrs:{src:e.previews.url}})])])],1),i("br"),i("el-row",[i("el-col",{attrs:{lg:3,md:3}},[i("el-upload",{attrs:{name:"file",action:"",beforeUpload:e.beforeUpload,showUploadList:!1}},[i("el-button",{staticClass:"el-icon-upload2"},[e._v(e._s(e.$i18nt("gd.account.selectPicture","\u9009\u62E9\u56FE\u7247")))])],1)],1),i("el-col",{attrs:{lg:{span:1,offset:2},md:2}},[i("el-button",{staticClass:"el-icon-plus",on:{click:function(a){return e.changeScale(1)}}})],1),i("el-col",{attrs:{lg:{span:1,offset:1},md:2}},[i("el-button",{staticClass:"el-icon-minus",on:{click:function(a){return e.changeScale(-1)}}})],1),i("el-col",{attrs:{lg:{span:1,offset:1},md:2}},[i("el-button",{staticClass:"el-icon-refresh-left",on:{click:e.rotateLeft}})],1),i("el-col",{attrs:{lg:{span:1,offset:1},md:2}},[i("el-button",{staticClass:"el-icon-refresh-right",on:{click:e.rotateRight}})],1),i("el-col",{attrs:{lg:{span:2,offset:6},md:2}},[i("el-button",{attrs:{type:"primary",loading:e.uploading},on:{click:function(a){return e.finish("blob")}}},[e._v(" "+e._s(e.$i18nt("gd.btn.save"))+" ")])],1)],1)],1)],1)},$e=[],Se=H.normalizeComponent(ye,_e,$e,!1,null,"1fe51f00",null,null);const Ie=Se.exports,Le=Object.freeze(Object.defineProperty({__proto__:null,default:Ie},Symbol.toStringTag,{value:"Module"}));const ke={props:{isShow:{type:Boolean,default(){return!1}}},data(){return{sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],confirmLoading:!1,visible:!1,userId:"",width:"600px",min:0,messageTip:"",messageTipErr:"",lenMax:0,lenMin:0,maskValue:"",pattern:null,fullscreen:!1,disabled:!0,code:"",num:0,ruleForm:{}}},computed:{modalStyle(){return this.fullscreen?{width:"100%",dialogStyle:{top:"0px"}}:{width:this.width,dialogStyle:{top:"40px"}}},title(){return this.num==1?this.$i18nt("gd.account.changePaw","\u4FEE\u6539\u5BC6\u7801"):this.$i18nt("gd.account.userBinding","\u7528\u6237\u7ED1\u5B9A")},...H.mapGetters(["labelPosition"])},methods:{toggleFullscreen(){this.fullscreen=!this.fullscreen},open(s,e,i){this.fullscreen=!1,this.userId=s,this.code=e,this.num=i,this.num==1?this.getConfigInfo():this.$nextTick(()=>{this.formUpdPwd.setFieldsValue({account:this.userId})}),this.visible=!0},getConfigInfo(s){M.getPasswordRules().then(e=>{this.min=parseInt(e.data.lengthrule.value),this.lenMin=parseInt(e.data.lengthrule.value),this.messageTip=e.data.lengthrule.remark,this.maskValue=e.data.combinationrule.value,this.lenMax=16,this.maskValue.includes("AL")&&this.maskValue.includes("NU")&&this.maskValue.includes("SC")?this.pattern=new RegExp(`^(?=.*\\d)(?=.*?[a-z])(?=.*?[A-Z])(?=.*[~!@#$%^&*])[\\da-zA-Z~!@#$%^&*]{${this.lenMin},${this.lenMax}}$`):this.maskValue.includes("AL")&&this.maskValue.includes("NU")?this.pattern=new RegExp("(?=.*\\d)(?=.*?[a-z])(?=.*?[A-Z])"):this.maskValue.includes("AL")&&this.maskValue.includes("SC")?this.pattern=new RegExp("(?=.*[~!@#$%^&*])(?=.*?[a-z])(?=.*?[A-Z]))"):this.maskValue.includes("NU")&&this.maskValue.includes("SC")?this.pattern=new RegExp("(?=.*\\d)(?=.*[~!@#$%^&*])"):this.maskValue.includes("AL")?this.pattern=new RegExp("^(?=.*?[a-z])(?=.*?[A-Z])"):this.maskValue.includes("NU")?this.pattern=new RegExp("\\d"):this.maskValue.includes("SC")&&(this.pattern=new RegExp("[^a-zA-Z0-9]")),this.messageTipErr=e.data.combinationrule.remark})},handleSubmit(){this.$refs.ruleForm.validate(s=>{if(s){this.confirmLoading=!0;let e;this.num==1?e={accountName:this.userId,passWord:this.ruleForm.password,newPassword:this.ruleForm.newPassword}:e={account:this.ruleForm.account,password:this.ruleForm.password,corpCode:this.code},(this.num==1?M.updatePwdByAccount:M.BindWechatWorkAccountByCode)(e).then(a=>{a.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+a.message)}).finally(a=>{this.confirmLoading=!1})}})},handleCancel(){this.$refs.ruleForm.resetFields(),this.visible=!1},compareToFirstPassword(s,e,i){e&&e!==this.ruleForm.newPassword?i(this.$i18nt("gd.account.repeatPawTiperr"," \u8BF7\u786E\u8BA4\u4E24\u6B21\u8F93\u5165\u5BC6\u7801\u7684\u4E00\u81F4\u6027")):i()},oldtPassword(s,e,i){e&&e===this.ruleForm.password?i(this.$i18nt("gd.account.repeatPawTipodl","\u65B0\u5BC6\u7801\u4E0D\u80FD\u4E0E\u539F\u5BC6\u7801\u91CD\u590D")):i()},doEvent(s){let e=s.item.functionName;this[e]&&this[e]()}}};var Oe=function(){var e=this,i=e._self._c;return i("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.modalStyle.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(a){e.visible=a},closed:e.handleCancel}},[i("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullscreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,closed:"handleCancel"},on:{changeEvent:e.doEvent},slot:"title"}),i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticClass:"gd-model-body",class:e.fullscreen?"modal-bodyq":"modal-body",staticStyle:{margin:"10px 10px 10px"}},[i("el-form",{ref:"ruleForm",attrs:{model:e.ruleForm,"label-width":"110px","label-position":e.labelPosition},nativeOn:{submit:function(a){a.preventDefault()}}},[e.num==1?i("div",[i("el-form-item",{attrs:{label:e.$i18nt("gd.account.originalPaw","\u539F\u5BC6\u7801"),prop:"password",rules:[{required:!0,message:e.$i18nt("gd.placeholder.input")}]}},[i("el-input",{attrs:{maxlength:18,"show-password":"",placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.password,callback:function(a){e.$set(e.ruleForm,"password",a)},expression:"ruleForm.password"}})],1),i("el-form-item",{attrs:{label:e.$i18nt("gd.account.newPaw","\u65B0\u5BC6\u7801"),prop:"newPassword",rules:[{required:!0,min:e.min,message:e.messageTip},{pattern:e.pattern,message:e.messageTipErr},{validator:e.oldtPassword}]}},[i("el-input",{attrs:{maxlength:18,"show-password":"",placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.newPassword,callback:function(a){e.$set(e.ruleForm,"newPassword",a)},expression:"ruleForm.newPassword"}})],1),i("el-form-item",{attrs:{label:e.$i18nt("gd.account.repeatPaw","\u91CD\u590D\u65B0\u5BC6\u7801"),prop:"confirm",rules:[{required:!0,message:e.$i18nt("gd.account.repeatPawTip","\u8BF7\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801")},{validator:e.compareToFirstPassword}]}},[i("el-input",{attrs:{maxlength:18,"show-password":"",placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleForm.confirm,callback:function(a){e.$set(e.ruleForm,"confirm",a)},expression:"ruleForm.confirm"}})],1)],1):i("div",[i("el-form-item",{attrs:{label:e.$i18nt("gd.account.loginID","\u8D26\u53F7"),prop:"account",rules:[{required:!0,message:this.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")}]}},[i("el-input",{attrs:{placeholder:e.$i18nt("gd.login.account","\u8BF7\u8F93\u5165\u8D26\u53F7"),disabled:e.disabled},model:{value:e.ruleForm.account,callback:function(a){e.$set(e.ruleForm,"account",a)},expression:"ruleForm.account"}})],1),i("el-form-item",{attrs:{label:e.$i18nt("gd.login.password","\u5BC6\u7801"),prop:"password",rules:[{required:!0,message:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")}]}},[i("el-input",{attrs:{maxlength:18,placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),"show-password":""},model:{value:e.ruleForm.password,callback:function(a){e.$set(e.ruleForm,"password",a)},expression:"ruleForm.password"}})],1)],1)])],1)],1)},Te=[],Ee=H.normalizeComponent(ke,Oe,Te,!1,null,"1d4e1c11",null,null);const q=Ee.exports,Ae=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"}));const He={props:{isClear:{type:Number,default:1}},components:{UpdPwd:q},data(){return{visible:!1,qrCodeUrl:"//login.work.weixin.qq.com/wwlogin/sso/qrcode?key=ae88c122560120a2",code:"",logTitle:"",num:1,wwLogin:null,confirmLoading:!1,isInitialize:null,pwdExpiration:"",setDate:void 0,currentTime:void 0,diff:void 0,diffDate:void 0,state:"",isWeComLogin:!1,wxUserId:null,appId:"",agentId:"",redirectURL:"",titleWidth:"504px",num1:0,timeOut:null}},computed:{style(){return{"--color":this.primaryColor}},titleTip(){return this.num==1?$i18nt("gd.account.loading"):""},...H.mapGetters(["userInfo","language","primaryColor"])},mounted(){},methods:{open(s,e){this.num=e,this.visible=!0,this.titleWidth=this.language=="zh_CN"?350+"px":504+"px",this.num==1&&this.getWeChat(s)},getWeChat(s){let e=this;s.data.forEach((i,a)=>{i.code=="GDS_ENTERPRISE_WECHAT_CropID"&&(e.appId=i.value),i.code=="GDS_ENTERPRISE_WECHAT_AgentId"&&(e.agentId=i.value),i.code=="GDS_ENTERPRISE_WECHAT_Redirect_URL"&&(e.redirectURL=i.value)}),this.timeOut=setTimeout(()=>{e.wwLogin=ww.createWWLoginPanel({el:"#wx_qrcode",params:{login_type:"CorpApp",appid:e.appId,agentid:e.agentId,redirect_uri:e.redirectURL,state:"loginState",redirect_type:"callback",panel_size:e.language=="zh_CN"?"small":"middle",lang:e.language=="zh_CN"?"zh":"en"},onCheckWeComLogin({isWeComLogin:i}){e.isWeComLogin=i,e.num1=e.isWeComLogin==!0?1:0},onLoginSuccess({code:i}){e.code=i,e.$refs.updPwd.open(e.userInfo.account,i,2),e.visible=!1},onLoginFail(i){}})},500)},handleCancel(){this.confirmLoading=!1,this.visible=!1,this.$refs.wx_qrcode.innerHTML=""}},beforeDestroy(){this.timeOut&&clearTimeout(this.timeOut),this.timeOut=null}};var Me=function(){var e=this,i=e._self._c;return i("div",[i("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",attrs:{visible:e.visible,width:e.titleWidth,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px"},on:{"update:visible":function(a){e.visible=a},closed:e.handleCancel}},[i("div",{staticClass:"main",style:e.style},[e.num==1?i("div",[i("div",{ref:"wx_qrcode",style:e.num1==0?"height: 290px;":"height: 290px",attrs:{id:"wx_qrcode"}}),i("div",{class:e.num1==0?"div_top":"div_topno"}),i("div",{class:e.num1==0?"div_bottom":""})]):e._e()])]),i("upd-pwd",{ref:"updPwd"})],1)},We=[],Pe=H.normalizeComponent(He,Me,We,!1,null,"cdcc96ed",null,null);const Xe=Pe.exports,Fe=Object.freeze(Object.defineProperty({__proto__:null,default:Xe},Symbol.toStringTag,{value:"Module"}));exports.index=se;exports.index$1=ue;exports.index$2=me;exports.index$3=Ce;
|
|
@@ -159,12 +159,18 @@ const fe = {
|
|
|
159
159
|
...M(["userInfo", "locale", "language"])
|
|
160
160
|
},
|
|
161
161
|
mounted() {
|
|
162
|
-
this.
|
|
162
|
+
this.initLegal();
|
|
163
163
|
},
|
|
164
164
|
methods: {
|
|
165
165
|
initLegal() {
|
|
166
|
-
|
|
167
|
-
this.
|
|
166
|
+
this.spinning = !0, Promise.all([
|
|
167
|
+
this.getLegalList(),
|
|
168
|
+
this.getLegalEnable(),
|
|
169
|
+
this.languageChange(),
|
|
170
|
+
this.timezoneChange(),
|
|
171
|
+
this.currencyChange()
|
|
172
|
+
]).then((s) => {
|
|
173
|
+
this.initUserInfo();
|
|
168
174
|
});
|
|
169
175
|
},
|
|
170
176
|
getLegalList() {
|
|
@@ -182,8 +188,8 @@ const fe = {
|
|
|
182
188
|
this.$store.dispatch("Language", e.code);
|
|
183
189
|
},
|
|
184
190
|
initUserInfo() {
|
|
185
|
-
this.
|
|
186
|
-
|
|
191
|
+
this.timeOut = setTimeout(() => {
|
|
192
|
+
z.ls.get("X-Legal-Entity-Id"), this.ruleForm = {
|
|
187
193
|
birthday: this.userInfo.birthday ? this.userInfo.birthday : "",
|
|
188
194
|
nickName: this.userInfo.nickname,
|
|
189
195
|
gender: this.userInfo.gender.toString(),
|
|
@@ -200,26 +206,20 @@ const fe = {
|
|
|
200
206
|
this.option.img = window.URL.createObjectURL(new Blob([s]));
|
|
201
207
|
}).catch((s) => {
|
|
202
208
|
this.$message.error("\u9884\u89C8\u9519\u8BEF\uFF1A" + s.message);
|
|
203
|
-
}) : this.option.img = "/avatar2.jpg", this.
|
|
209
|
+
}) : this.option.img = "/avatar2.jpg", this.spinning = !1, this.getSexData();
|
|
204
210
|
}, 100);
|
|
205
211
|
},
|
|
206
212
|
onChange(s, e) {
|
|
207
213
|
this.birthdayString = s;
|
|
208
214
|
},
|
|
209
215
|
currencyChange() {
|
|
210
|
-
ne().then((s) =>
|
|
211
|
-
s.success && (this.currencyData = s.data.rows, z.ls.set("currencyData", s.data.rows));
|
|
212
|
-
});
|
|
216
|
+
return ne().then((s) => (s.success && (this.currencyData = s.data.rows, z.ls.set("currencyData", s.data.rows)), s));
|
|
213
217
|
},
|
|
214
218
|
timezoneChange() {
|
|
215
|
-
re().then((s) =>
|
|
216
|
-
s.success && (this.timezoneData = s.data.rows);
|
|
217
|
-
});
|
|
219
|
+
return re().then((s) => (s.success && (this.timezoneData = s.data.rows), s));
|
|
218
220
|
},
|
|
219
221
|
languageChange() {
|
|
220
|
-
ie().then((s) =>
|
|
221
|
-
s.success && (this.langData = s.data.rows);
|
|
222
|
-
});
|
|
222
|
+
return ie().then((s) => (s.success && (this.langData = s.data.rows), s));
|
|
223
223
|
},
|
|
224
224
|
submitUserInfo() {
|
|
225
225
|
this.spinning || this.$refs.ruleForm.validate((s) => {
|
|
@@ -312,7 +312,7 @@ var me = function() {
|
|
|
312
312
|
ve,
|
|
313
313
|
!1,
|
|
314
314
|
null,
|
|
315
|
-
"
|
|
315
|
+
"2025c427",
|
|
316
316
|
null,
|
|
317
317
|
null
|
|
318
318
|
);
|
|
@@ -500,22 +500,26 @@ const _e = {
|
|
|
500
500
|
s.$message.error(s.$i18nt("gd.field.replenishData", "\u8BF7\u8865\u5145\u6570\u636E"));
|
|
501
501
|
return;
|
|
502
502
|
}
|
|
503
|
-
this.$confirm(
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
503
|
+
this.$confirm(
|
|
504
|
+
this.$i18nt("gd.https.configThemeContent", "\u662F\u5426\u66F4\u65B0\u4E2A\u4EBA\u9996\u9875\u914D\u7F6E?"),
|
|
505
|
+
this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"),
|
|
506
|
+
{
|
|
507
|
+
confirmButtonText: this.$i18nt("gd.https.saveOk", "\u786E\u5B9A\u4FDD\u5B58"),
|
|
508
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
509
|
+
showClose: !1,
|
|
510
|
+
confirmButtonLoading: !1,
|
|
511
|
+
cancelButtonLoading: !1,
|
|
512
|
+
closeOnClickModal: !1,
|
|
513
|
+
type: "warning",
|
|
514
|
+
confirmButtonClass: "el-button--danger",
|
|
515
|
+
customClass: "custom-alert",
|
|
516
|
+
callback: () => {
|
|
517
|
+
},
|
|
518
|
+
beforeClose: (a, u, d) => {
|
|
519
|
+
this.renewHand(a, u, d, this.homePage);
|
|
520
|
+
}
|
|
517
521
|
}
|
|
518
|
-
|
|
522
|
+
);
|
|
519
523
|
},
|
|
520
524
|
renewHand(s, e, n, a) {
|
|
521
525
|
if (s !== "confirm") {
|
|
@@ -554,7 +558,7 @@ const _e = {
|
|
|
554
558
|
this.presentText = x ? this.presentText.concat([x.label]) : this.presentText;
|
|
555
559
|
}
|
|
556
560
|
const d = this.$refs.cascader.presentText;
|
|
557
|
-
this.presentText.length === this.homePage.length && d === null && (this.$refs.cascader.presentText = this.presentText.join(" / ")), e(u);
|
|
561
|
+
this.presentText.length === this.homePage.length && d === null && this.$refs.cascader && (this.$refs.cascader.presentText = this.presentText.join(" / ")), e(u);
|
|
558
562
|
});
|
|
559
563
|
},
|
|
560
564
|
geData() {
|
|
@@ -674,7 +678,7 @@ var $e = function() {
|
|
|
674
678
|
Se,
|
|
675
679
|
!1,
|
|
676
680
|
null,
|
|
677
|
-
"
|
|
681
|
+
"8b3ce4df",
|
|
678
682
|
null,
|
|
679
683
|
null
|
|
680
684
|
);
|