hc-basic 1.4.0 → 1.5.0

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.
Files changed (37) hide show
  1. package/lib/css/hc-basic.umd.596515ce.css +1 -0
  2. package/lib/css/hc-basic.umd.min.596515ce.css +1 -0
  3. package/lib/demo.html +10 -0
  4. package/lib/hc-basic.common.axios1680231292043.js +16718 -0
  5. package/lib/hc-basic.common.axios1680231292043.js.gz +0 -0
  6. package/lib/hc-basic.common.element-ui1680231292041.js +43880 -0
  7. package/lib/hc-basic.common.element-ui1680231292041.js.gz +0 -0
  8. package/lib/hc-basic.common.element-ui1680231292042.js +20648 -0
  9. package/lib/hc-basic.common.element-ui1680231292042.js.gz +0 -0
  10. package/lib/hc-basic.common.hc-basic.common.js +3812 -0
  11. package/lib/hc-basic.common.hc-basic.common.js.gz +0 -0
  12. package/lib/hc-basic.common.js +154 -0
  13. package/lib/hc-basic.umd.axios1680231291654.js +21735 -0
  14. package/lib/hc-basic.umd.axios1680231291654.js.gz +0 -0
  15. package/lib/hc-basic.umd.element-ui1680231291649.js +43880 -0
  16. package/lib/hc-basic.umd.element-ui1680231291649.js.gz +0 -0
  17. package/lib/hc-basic.umd.element-ui1680231291651.js +15631 -0
  18. package/lib/hc-basic.umd.element-ui1680231291651.js.gz +0 -0
  19. package/lib/hc-basic.umd.hc-basic.umd.js +3822 -0
  20. package/lib/hc-basic.umd.hc-basic.umd.js.gz +0 -0
  21. package/lib/hc-basic.umd.js +154 -0
  22. package/lib/hc-basic.umd.min.axios1680231291472.js +33 -0
  23. package/lib/hc-basic.umd.min.axios1680231291472.js.gz +0 -0
  24. package/lib/hc-basic.umd.min.element-ui1680231291469.js +1 -0
  25. package/lib/hc-basic.umd.min.element-ui1680231291469.js.gz +0 -0
  26. package/lib/hc-basic.umd.min.element-ui1680231291470.js +9 -0
  27. package/lib/hc-basic.umd.min.element-ui1680231291470.js.gz +0 -0
  28. package/lib/hc-basic.umd.min.hc-basic.umd.min.js +1 -0
  29. package/lib/hc-basic.umd.min.hc-basic.umd.min.js.gz +0 -0
  30. package/lib/hc-basic.umd.min.js +1 -33
  31. package/package.json +7 -2
  32. package/.browserslistrc +0 -2
  33. package/.editorconfig +0 -5
  34. package/.prettierrc +0 -17
  35. package/babel.config.js +0 -5
  36. package/vue.config.js +0 -41
  37. /package/lib/{hc-basic.css → css/hc-basic.common.596515ce.css} +0 -0
@@ -0,0 +1 @@
1
+ (function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["hc-basic"]=t(require("vue")):e["hc-basic"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return(("undefined"!==typeof self?self:this)["webpackJsonphc_basic"]=("undefined"!==typeof self?self:this)["webpackJsonphc_basic"]||[]).push([[3],{0:function(e,t){},"1ee1":function(e,t,a){},"3a0d":function(e,t,a){"use strict";var n=a("3c4e"),o=a.n(n),i={Components:{formItem:{labelFontSize:14,label:"label",value:"value",space:"20px"},pager:{currentPage:"pageNo",pageSize:"pageSize",layout:"total, prev, pager, next, sizes, jumper"},table:{noData:"https://frontendonline-erp.ocj.com.cn/img/nodata.png",optionLabel:"操作"},desc:{color:{label:"regular",value:"textPrimary"},emptyText:"------",distance:"16"},drawer:{submit:"确定",back:"返回"}},tCode:{path:"/code",key:"code",type:"post",dataType:"isNumber",isNumValue:1,cache:!0,func:e=>e.data},Encrypt:{AES:{KEY:"",IV:""}},directives:{copy:{},errImg:{avatarErr:"https://ocj-erp-frontendonline.oss-cn-shanghai.aliyuncs.com/img/avator.png",showErr:"https://ocj-erp-frontendonline.oss-cn-shanghai.aliyuncs.com/img/nofound.png",upErr:"https://ocj-erp-frontendonline.oss-cn-shanghai.aliyuncs.com/img/upload-fail.png"},onlyInt:{},dialogDrag:{},onlyNumber:{},watermark:{width:200,height:200,fillStyle:"rgba(180, 180, 180, 0.3)",font:"16px Microsoft JhengHei",title:"",subTitle:""},rightMenu:{menuStyle:"width:150px;background:#fff;box-shadow: 0 1px 5px 0 rgb(45 47 51 / 10%);cursor: pointer",childMenuStyle:"color:#000;line-height:30px;font-size:15px;border-bottom: 1px solid #ddd"},preventShake:{time:2e3}}},l=function(){var e=this,t=e._self._c;return t("ul",{directives:[{name:"watermark",rawName:"v-watermark",value:{title:e.$Config.directives.watermark.title,subTitle:e.$Config.directives.watermark.subTitle},expression:"{ title: $Config.directives.watermark.title, subTitle: $Config.directives.watermark.subTitle }"}],staticClass:"text-14 flex-wrap w-100 hc-desc border-box"},e._l(e.config,(function(a,n){return t("li",{staticClass:"d-flex border-box",class:a.span&&"col-"+e.colVal*a.span||"col-"+e.colVal},[t("div",{staticClass:"white-space-nowrap hc-desc-label pr-16",class:[e.labelColor,"pb-"+e.distancePb],staticStyle:{"text-align":"right"},style:{width:e.sameLabel&&e.setWidth(n)}},[e._v(" "+e._s(a.label)+" ")]),a.isSlot?e._t(a.prop,null,null,a):t("div",{staticClass:"hc-desc-value border-box pr-20 w-100",class:[a.click?"a-label":"color-dark",e.valueColor,"pb-"+e.distance],on:{click:function(t){a.click&&a.click(e.compatibleWith(e.data,a),a)}}},[e._v(" "+e._s(e.setValue(a,e.data)||e.$Config.Components.desc.emptyText)+" ")])],2)})),0)},r=[],s=a("8bbf"),c=a.n(s);const u=c.a.observable({tCodeData:{},textColor:{primary:"color-primary",success:"color-success",danger:"color-danger",info:"color-info",warning:"color-warning",textPrimary:"color-text-primary",regular:"color-text-regular",secondary:"color-text-secondary",placeholder:"color-text-placeholder",white:"color-text-white"}}),d={getListData(e,t){const a=JSON.parse(window&&window.localStorage.getItem("tCodeData"))||{},n=e.$Config.tCode;let o={[n.key]:t};(n.cache&&!u.tCodeData[t]||!n.cache)&&("get"===n.type&&(o={params:o}),e.$hcHttp[n.type](e.$Config.axios.ipUrl+n.path,o).then(o=>{const i=e.$Func.filterOptionArray(n.func(o)||[],"id");u.tCodeData[t]=i.map(t=>{let a=t[e.$Config.Components.formItem.value];return n.dataType&&t[n.dataType]===n.isNumValue&&(a=Number(a||"0")||0),{...t,[e.$Config.Components.formItem.value]:a}}),u.tCodeData=JSON.parse(JSON.stringify({...a,...u.tCodeData})),e.$Func.addStorgeValue("tCodeData",JSON.stringify(u.tCodeData))}))}};var h={name:"HcDesc",props:{config:{type:Array,required:!0,default:()=>[]},data:{type:Object,required:!0,default:()=>{}},sameLabel:{type:Boolean,default:!1},color:{type:Object,default:()=>({label:"",value:"textPrimary"}),validator:e=>Object.keys(u.textColor).includes(e.label)&&Object.keys(u.textColor).includes(e.value)},column:{type:[Number,String],default:4,validator:e=>-1!==[1,2,3,4,6].indexOf(Number(e))},distance:{type:[Number,String],default:0,validator:e=>Number(e)%4===0},width:{type:String,default:"100%"}},computed:{realColumn(){return Number(this.column)||4},colVal(){return 24/this.realColumn},labelColor(){return u.textColor[this.color.label||this.$Config.Components.desc.color.label]},valueColor(){return u.textColor[this.color.value||this.$Config.Components.desc.color.value]},distancePb(){return this.distance||this.$Config.Components.desc.distance},labelWidth(){const e=[new Array(this.realColumn)],t=[];let a=0,n=0;return this.config.forEach((t,o,i)=>{a+=t.span||1,e[n][a-(t.span||1)]={name:t.label,index:o},a+((i[o+1]||{}).span||1)>this.realColumn&&i[o+1]&&(e.push(new Array(this.realColumn)),n++,a=0)}),e.forEach(e=>{for(let a=0;a<e.length;a++)t[a]||(t[a]=[]),t[a].push(e[a])}),t.map(e=>{const t=Math.max.apply(null,e.map(e=>e&&this.charCode(e.name).length/4||0)),a=e.map(e=>e&&e.index);return{nameLength:t,indexList:a}})}},watch:{config:{handler(e){e.forEach(e=>{e.code&&d.getListData(this,e.code)})},immediate:!0}},methods:{setWidth(e){if(!this.sameLabel)return this.labelWidth;let t=this.labelWidth.find(t=>t.indexList.includes(e));const a=t.hasRules?11:0;return t.nameLength*this.$Config.Components.formItem.labelFontSize+a+16+"px"},charCode:e=>e.split("").reduce((e,t)=>e+t.codePointAt(0).toString(16),""),setValue(e,t){const a=this.compatibleWith(t,e);if(e.code){const t=(u.tCodeData[e.code]||[]).find(e=>a===e[this.$Config.Components.formItem.value])||{};return t[this.$Config.Components.formItem.label]||a}return e.formatter?e.formatter(t):a},compatibleWith(e,t){const a=t.prop.split(".");return a[1]?e[a[0]][a[1]]:e[a[0]]}}},p=h,f=(a("e3b2"),a("2877")),m=Object(f["a"])(p,l,r,!1,null,"a4062538",null),g=m.exports,b=function(){var e=this,t=e._self._c;return t("span",{on:{click:function(t){return t.stopPropagation(),e.open.apply(null,arguments)}}},[e._t("default"),e.show?t("el-dialog",e._b({directives:[{name:"dialogDrag",rawName:"v-dialogDrag",value:e.drag,expression:"drag"}],attrs:{"close-on-click-modal":e.closeOnClickModal,visible:!0,"append-to-body":""},on:{close:e.onCancel}},"el-dialog",e.$attrs,!1),[e._t("title"),e._t("contain")],2):e._e()],2)},y=[],v={name:"HcDialog",props:{outClose:{type:Boolean,required:!0,default:!0},beforeOpen:{type:Function},closeOnClickModal:{type:Boolean,default:!1},single:{type:Boolean,default:!1},drag:{type:Boolean,default:!1}},data(){return{show:!1}},watch:{outClose(){this.onCancel()}},methods:{onCancel(){this.show=!1,this.$emit("cancel")},open(){"function"===typeof this.beforeOpen?this.beforeOpen(()=>{this.show=!0}):this.show=!0}}},C=v,w=Object(f["a"])(C,b,y,!1,null,null,null),$=w.exports,x=function(){var e=this,t=e._self._c;return t("span",{on:{click:function(t){return t.stopPropagation(),e.open.apply(null,arguments)}}},[e._t("default"),t("el-drawer",e._b({attrs:{"close-on-click-modal":e.closeOnClickModal,visible:e.visible,"append-to-body":""},on:{close:e.onCancel}},"el-drawer",e.$attrs,!1),[e._t("title",null,{slot:"title"}),e.show?t("div",{staticClass:"absolute-all"},[t("div",{staticClass:"absolute-all px-20 pt-20 overflow-auto border-box"},[e._t("contain")],2)]):e._e()],2)],2)},k=[],_={name:"HcDialog",props:{outClose:{type:Boolean,required:!0,default:!0},showFooter:{type:Boolean,default:!1},beforeOpen:{type:Function},closeOnClickModal:{type:Boolean,default:!1},single:{type:Boolean,default:!1}},data(){return{show:!1,visible:!1}},watch:{outClose(){this.onCancel()},show(e){this.$nextTick(()=>{this.visible!==e&&(this.visible=e)})}},methods:{onCancel(){this.show=!1,this.$emit("cancel")},open(){"function"===typeof this.beforeOpen?this.beforeOpen(()=>{this.show=!0}):this.show=!0}}},S=_,D=Object(f["a"])(S,x,k,!1,null,null,null),O=D.exports,M=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"watermark",rawName:"v-watermark",value:{title:e.$Config.directives.watermark.title,subTitle:e.$Config.directives.watermark.subTitle},expression:"{ title: $Config.directives.watermark.title, subTitle: $Config.directives.watermark.subTitle }"}],staticClass:"flex-wrap hcFormItem"},[e._l(e.realConfig,(function(a,n){return t("el-form-item",{key:"form-item"+n,class:a.span&&"col-"+e.colVal*a.span||"col-"+e.colVal,attrs:{label:e.noLabel?"":a.label,"label-width":e.setWidth(a,n),prop:a.prop}},[a.isSlot?a.components?t(a.components,e._b({tag:"components",model:{value:e.form[a.prop],callback:function(t){e.$set(e.form,a.prop,t)},expression:"form[item.prop]"}},"components",a,!1)):e._t(a.prop,null,null,a):t("item-"+a.itemType||!1,e._b({tag:"components",style:{width:e.itemWidth(a,n)},attrs:{form:e.form,disabled:a.disabled||e.disabled,clearable:a.clearable||e.clearable}},"components",{...a,noLabel:e.noLabel},!1))],2)})),e.$slots.default?t("el-form-item",{staticClass:"flex-auto slot",class:{formButtonRight:e.rightSide},attrs:{"label-width":"0px"}},[e._t("default")],2):e._e()],2)},T=[],N=function(){var e=this,t=e._self._c;return t("el-checkbox-group",e._b({on:{change:function(t){e.$attrs.change&&e.$attrs.change(e.form)}},model:{value:e.values[e.keys],callback:function(t){e.$set(e.values,e.keys,t)},expression:"values[keys]"}},"el-checkbox-group",e.$attrs,!1),e._l(e.list,(function(a,n){return t("el-checkbox",e._b({key:"checkbox"+n,attrs:{label:a[e.$attrs.valueKey||e.$Config.Components.formItem.value]}},"el-checkbox",{...a},!1),[e._v(" "+e._s(a[e.$attrs.labelKey||e.$Config.Components.formItem.label])+" ")])})),1)},E=[],j={name:"ItemCheckbox",inheritAttrs:!1,props:{form:{type:Object,default:()=>({})}},computed:{list(){return this.$attrs.code&&u.tCodeData[this.$attrs.code]||this.$attrs.list},values(){if(!this.$attrs.prop)throw new Error(this.$attrs.label+":prop未定义");const e=this.$attrs.prop.split(".");return e[1]?this.form[e[0]]:this.form},keys(){const e=this.$attrs.prop.split(".");return e[1]||e[0]}}},I=j,L=Object(f["a"])(I,N,E,!1,null,null,null),A=L.exports,B=function(){var e=this,t=e._self._c;return t("el-input",e._b({attrs:{placeholder:e.placeholder},on:{change:function(t){e.$attrs.change&&e.$attrs.change()},blur:function(t){e.$attrs.blur&&e.$attrs.blur()}},model:{value:e.values[e.keys],callback:function(t){e.$set(e.values,e.keys,"string"===typeof t?t.trim():t)},expression:"values[keys]"}},"el-input",e.$attrs,!1))},P=[],F={name:"ItemInput",inheritAttrs:!1,props:{form:{type:Object,default:()=>{}}},computed:{placeholder(){return this.$attrs.placeholder||this.$attrs.noLabel&&this.$attrs.label||"请输入"},values(){if(!this.$attrs.prop)throw new Error(this.$attrs.label+":prop未定义");const e=this.$attrs.prop.split(".");return e[1]?this.form[e[0]]:this.form},keys(){const e=this.$attrs.prop.split(".");return e[1]||e[0]}}},z=F,H=Object(f["a"])(z,B,P,!1,null,null,null),V=H.exports,W=function(){var e=this,t=e._self._c;return t("el-date-picker",e._b({staticStyle:{width:"100%"},attrs:{type:e.$attrs.type||"date",placeholder:e.placeholder,"range-separato":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:function(t){e.$attrs.change}},model:{value:e.values[e.keys],callback:function(t){e.$set(e.values,e.keys,t)},expression:"values[keys]"}},"el-date-picker",e.$attrs,!1))},R=[],U={name:"ItemDatePicker",inheritAttrs:!1,props:{form:{type:Object,default:()=>{}}},computed:{placeholder(){return this.$attrs.placeholder||this.$attrs.noLabel&&this.$attrs.label||"选择日期"},values(){if(!this.$attrs.prop)throw new Error(this.$attrs.label+":prop未定义");const e=this.$attrs.prop.split(".");return e[1]?this.form[e[0]]:this.form},keys(){const e=this.$attrs.prop.split(".");return e[1]||e[0]}}},q=U,K=Object(f["a"])(q,W,R,!1,null,null,null),J=K.exports,Y=function(){var e=this,t=e._self._c;return t("el-radio-group",e._b({on:{change:function(t){e.$attrs.change&&e.$attrs.change(e.form)}},model:{value:e.values[e.keys],callback:function(t){e.$set(e.values,e.keys,t)},expression:"values[keys]"}},"el-radio-group",e.$attrs,!1),e._l(e.list,(function(a,n){return t("el-radio",e._b({key:"radio"+n,attrs:{label:a[e.$attrs.valueKey||e.$Config.Components.formItem.value]}},"el-radio",{...a},!1),[e._v(" "+e._s(a[e.$attrs.labelKey||e.$Config.Components.formItem.label])+" ")])})),1)},Z=[],X={name:"ItemRadio",inheritAttrs:!1,props:{form:{type:Object,default:()=>({})}},computed:{list(){return this.$attrs.code&&u.tCodeData[this.$attrs.code]||this.$attrs.list},values(){if(!this.$attrs.prop)throw new Error(this.$attrs.label+":prop未定义");const e=this.$attrs.prop.split(".");return e[1]?this.form[e[0]]:this.form},keys(){const e=this.$attrs.prop.split(".");return e[1]||e[0]}}},G=X,Q=Object(f["a"])(G,Y,Z,!1,null,null,null),ee=Q.exports,te=function(){var e=this,t=e._self._c;return t("el-select",e._b({staticStyle:{width:"100%"},attrs:{placeholder:e.placeholder},on:{change:function(t){e.$attrs.change&&e.$attrs.change(e.form)}},model:{value:e.values[e.keys],callback:function(t){e.$set(e.values,e.keys,t)},expression:"values[keys]"}},"el-select",e.$attrs,!1),e._l(e.list,(function(a,n){return t("el-option",{key:"select"+n,attrs:{label:a[e.$attrs.labelKey||e.$Config.Components.formItem.label],value:a[e.$attrs.valueKey||e.$Config.Components.formItem.value],disabled:a.disabled}})})),1)},ae=[],ne={name:"ItemSelect",inheritAttrs:!1,props:{form:{type:Object,default:()=>({})}},computed:{list(){return this.$attrs.code&&u.tCodeData[this.$attrs.code]||this.$attrs.list},placeholder(){return this.$attrs.placeholder||this.$attrs.noLabel&&this.$attrs.label||"请选择"},values(){if(!this.$attrs.prop)throw new Error(this.$attrs.label+":prop未定义");const e=this.$attrs.prop.split(".");return e[1]?this.form[e[0]]:this.form},keys(){const e=this.$attrs.prop.split(".");return e[1]||e[0]}}},oe=ne,ie=Object(f["a"])(oe,te,ae,!1,null,null,null),le=ie.exports,re=function(){var e=this,t=e._self._c;return t("el-switch",e._b({on:{change:function(t){e.$attrs.change&&e.$attrs.change(e.form)}},model:{value:e.values[e.keys],callback:function(t){e.$set(e.values,e.keys,t)},expression:"values[keys]"}},"el-switch",e.$attrs,!1))},se=[],ce={inheritAttrs:!1,props:{form:{type:Object,default:()=>({})}},computed:{values(){if(!this.$attrs.prop)throw new Error(this.$attrs.label+":prop未定义");const e=this.$attrs.prop.split(".");return e[1]?this.form[e[0]]:this.form},keys(){const e=this.$attrs.prop.split(".");return e[1]||e[0]}}},ue=ce,de=Object(f["a"])(ue,re,se,!1,null,null,null),he=de.exports,pe=function(){var e=this,t=e._self._c;return t("el-input-number",e._b({attrs:{placeholder:e.placeholder,controls:!1},on:{change:function(t){e.$attrs.change&&e.$attrs.change()},blur:function(t){e.$attrs.blur&&e.$attrs.blur()}},model:{value:e.values[e.keys],callback:function(t){e.$set(e.values,e.keys,"string"===typeof t?t.trim():t)},expression:"values[keys]"}},"el-input-number",e.$attrs,!1))},fe=[],me={name:"ItemInputNumber",inheritAttrs:!1,props:{form:{type:Object,default:()=>{}}},computed:{placeholder(){return this.$attrs.placeholder||this.$attrs.noLabel&&this.$attrs.label||"请输入"},values(){if(!this.$attrs.prop)throw new Error(this.$attrs.label+":prop未定义");const e=this.$attrs.prop.split(".");return e[1]?this.form[e[0]]:this.form},keys(){const e=this.$attrs.prop.split(".");return e[1]||e[0]}}},ge=me,be=(a("7110"),Object(f["a"])(ge,pe,fe,!1,null,"1074373a",null)),ye=be.exports,ve=function(){var e=this,t=e._self._c;return t("div",[t("el-tooltip",{staticClass:"formItemToolTip",attrs:{disabled:e.disabled,content:String(e.content),placement:"top"}},[t("div",{ref:"text",staticClass:"text-overflow-ellipsis"},[e._v(" "+e._s(e.content)+" ")])])],1)},Ce=[],we={inheritAttrs:!1,props:{form:{type:Object,default:()=>({})}},data(){return{disabled:!0}},computed:{content(){return this.$attrs.formatter&&this.$attrs.formatter(this.form)||this.form[this.$attrs.prop]||"------"}},watch:{content(){this.$nextTick(()=>{this.disabled=!(this.$refs.text.offsetWidth<this.$refs.text.scrollWidth)})}}},$e=we,xe=Object(f["a"])($e,ve,Ce,!1,null,null,null),ke=xe.exports,_e={name:"HcFormItem",components:{itemCheckbox:A,itemInput:V,itemRadio:ee,itemSelect:le,itemSwitch:he,itemDatePicker:J,itemInputNumber:ye,itemText:ke},props:{config:{type:Array,required:!0,default:()=>[]},form:{type:Object,required:!0,default:()=>{}},rules:{type:Object,default:()=>({})},column:{type:[Number,String],default:4,validator:e=>-1!==[1,2,3,4,6].indexOf(Number(e))},width:{type:String,default:"100%"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},sameLabel:{type:Boolean,default:!1},rightSide:{type:Boolean,default:!1},noLabel:{type:Boolean,default:!1},labelWidth:{type:String,default:""}},computed:{realColumn(){return Number(this.column)||4},colVal(){return 24/this.realColumn},realConfig(){return this.config.filter(e=>!e.hidden)},rowList(){const e=[new Array(this.realColumn)];let t=0,a=0;return this.realConfig.forEach((n,o,i)=>{t+=n.span||1,e[a][t-(n.span||1)]={name:n.label,prop:n.prop,index:o,span:n.span||1},t+((i[o+1]||{}).span||1)>this.realColumn&&i[o+1]&&(e.push(new Array(this.realColumn)),a++,t=0)}),e},columnLabelWidth(){const e=[];return this.rowList.forEach(t=>{for(let a=0;a<t.length;a++)e[a]||(e[a]=[]),e[a].push(t[a])}),e.map(e=>{const t=Math.max.apply(null,e.map(e=>e&&this.charCode(e.name).length/4||0));let a=!1;e.map(e=>{e&&e.name&&this.rules[e.prop]&&this.rules[e.prop][0].required&&(a=!0)});const n=e.map(e=>e&&e.index);return{nameLength:t,indexList:n,hasRules:a}})},lastIndex(){const e=this.rowList.map(e=>e.reduce((e,t)=>e+(t&&t.span||0),0)===this.realColumn),t=new Array(this.columnLabelWidth[0].indexList.length).fill("");return t.map((t,a)=>{let n=this.columnLabelWidth.map(e=>e.indexList[a]);return n=e[a]?n.filter(e=>void 0!==e):n,n[n.length-1]})},itemWidth(){return function(e,t){return this.lastIndex.includes(t)?e.width||this.width:`calc(${e.width||this.width} - ${this.$Config.Components.formItem.space})`}}},watch:{config:{handler(e){e.forEach(e=>{e.code&&d.getListData(this,e.code)})},immediate:!0}},methods:{setWidth(e,t){if(this.noLabel)return"0px";if(!this.sameLabel)return this.labelWidth;let a=this.columnLabelWidth.find(e=>e.indexList.includes(t));const n=a.hasRules?11:0;return a.nameLength*this.$Config.Components.formItem.labelFontSize+n+16+"px"},charCode:e=>e.split("").reduce((e,t)=>e+t.codePointAt(0).toString(16),"")}},Se=_e,De=Object(f["a"])(Se,M,T,!1,null,null,null),Oe=De.exports,Me=function(){var e=this,t=e._self._c;return t("div",{staticClass:"s-canvas cursor-pointer",on:{click:e.refreshCode}},[t("canvas",{ref:"s-canvas",attrs:{width:e.width,height:e.height}})])},Te=[],Ne={name:"HcIdentify",props:{value:{type:String,default:""},codeLength:{type:[String,Number],default:"4"},composition:{type:String,default:"1234567890ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"},background:{type:String,default:""},dot:{type:Boolean,default:!1},width:{type:Number,default:90},height:{type:Number,default:38}},data(){return{fontSizeMin:22,fontSizeMax:26,backgroundColorMin:180,backgroundColorMax:240,colorMin:50,colorMax:160,lineColorMin:40,lineColorMax:180,dotColorMin:0,dotColorMax:255}},mounted(){this.refreshCode()},methods:{refreshCode(){let e="";for(let t=0;t<this.codeLength;t++)e+=this.composition[Math.floor(Math.random()*(this.composition.length-0)+0)];this.drawPic(e)},randomNum(e,t){return Math.floor(Math.random()*(t-e)+e)},randomColor(e,t){let a=this.randomNum(e,t),n=this.randomNum(e+50,t),o=this.randomNum(e,t);return`rgb(${a},${n},${o})`},drawPic(e){let t=this.$refs["s-canvas"],a=t.getContext("2d");a.textBaseline="bottom",a.fillStyle=this.background||this.randomColor(this.backgroundColorMin,this.backgroundColorMax),a.fillRect(0,0,this.width,this.height);for(let n=0;n<e.length;n++)this.drawText(a,e[n],n,e);this.dot&&this.drawDot(a),this.$emit("input",e)},drawText(e,t,a,n){e.fillStyle=this.randomColor(this.colorMin,this.colorMax),e.font=this.randomNum(this.fontSizeMin,this.fontSizeMax)+"px SimHei";let o=(a+1)*(this.width/(n.length+1));a>1&&(o+=Number(a));let i=this.randomNum(this.fontSizeMax,this.height-5);var l=this.randomNum(-45,45);e.translate(o,i),e.rotate(l*Math.PI/180),e.fillText(t,0,0),e.rotate(-l*Math.PI/180),e.translate(-o,-i)},drawDot(e){for(let t=0;t<100;t++)e.fillStyle=this.randomColor(0,255),e.beginPath(),e.arc(this.randomNum(0,this.width),this.randomNum(0,this.height),1,0,2*Math.PI),e.fill()}}},Ee=Ne,je=Object(f["a"])(Ee,Me,Te,!1,null,null,null),Ie=je.exports,Le=function(){var e=this,t=e._self._c;return t("el-pagination",e._g(e._b({attrs:{"current-page":e.pager[e.$Config.Components.pager.currentPage],"page-size":e.pager[e.$Config.Components.pager.pageSize],layout:e.layout||e.$Config.Components.pager.layout},on:{"size-change":e.$onSizeChange,"current-change":e.$onCurrentChange}},"el-pagination",e.$attrs,!1),e.$listeners))},Ae=[],Be={name:"HcPager",props:{page:{type:Object,default:()=>{},required:!0},layout:{type:String,default:""}},data(){return{pager:{}}},watch:{page:{handler(e){this.pager=e},immediate:!0}},methods:{$onSizeChange(e){this.pager[this.$Config.Components.pager.pageSize]=e,this.pager[this.$Config.Components.pager.currentPage]=1,this.$emit("change",this.pager)},$onCurrentChange(e){this.pager[this.$Config.Components.pager.currentPage]=e,this.$emit("change",this.pager)}}},Pe=Be,Fe=Object(f["a"])(Pe,Le,Ae,!1,null,null,null),ze=Fe.exports,He=function(){var e=this,t=e._self._c;return t("el-popover",e._g(e._b({attrs:{placement:e.placement,width:e.width},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},"el-popover",e.$attrs,!1),e.$listeners),[t("div",{staticClass:"flex-y-center"},[t("i",{staticClass:"mr-8",class:[e.icon,e.className]}),e._v(" "+e._s(e.title)+" ")]),t("div",{staticClass:"flex-x-end mt-8"},[t("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){e.visible=!1}}},[e._v(" 取消 ")]),t("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.onsubmit}},[e._v(" 确定 ")])],1),e._t("default",(function(){return[e._v(" 删除 ")]}),{slot:"reference"})],2)},Ve=[],We={props:{title:{type:String,default:""},width:{type:String,default:"200"},placement:{type:String,default:"top-end"},icon:{type:String,default:"el-icon-warning-outline"},className:{type:String,default:"color-warning text-20"}},data(){return{visible:!1}},methods:{onsubmit(){this.$emit("submit"),this.visible=!1}}},Re=We,Ue=Object(f["a"])(Re,He,Ve,!1,null,null,null),qe=Ue.exports,Ke=function(){var e=this,t=e._self._c;return t("div",{staticClass:"hcTab",style:{height:e.outLayerHeight}},[t("el-tabs",e._g(e._b({staticClass:"bg-default",model:{value:e.activeVal,callback:function(t){e.activeVal=t},expression:"activeVal"}},"el-tabs",e.$attrs,!1),e.$listeners),e._l(e.tabsData,(function(e,a){return t("el-tab-pane",{key:"tabs"+a,attrs:{label:e.name,name:e.src}})})),1),e._l(e.tabsData,(function(a,n){return t("div",{directives:[{name:"show",rawName:"v-show",value:a.src===e.activeVal,expression:"item.src === activeVal"}],key:"com"+n,staticClass:"overflow-auto width-100 tab-content",class:"hcTabPane"+n,style:{height:e.maxHeight}},[a.isNew?t(a.component,e._g(e._b({tag:"components"},"components",e.$attrs,!1),e.$listeners)):e._e()],1)}))],2)},Je=[],Ye={name:"HcTab",inheritAttrs:!1,props:{tabsData:{type:Array,default:()=>[]},outHeight:{type:Number,default:0},active:{type:String,default:""}},data(){return{activeVal:this.active||this.tabsData[0].src}},computed:{outLayerHeight(){return this.outHeight?`calc(100% - ${this.outHeight}px)`:""},maxHeight(){return this.outHeight?"calc(100% - 39px)":""}},watch:{activeVal(e){for(let t=0;t<this.tabsData.length;t++)if(e===this.tabsData[t].src)return this.$emit("change",this.tabsData[t]),this.tabsData[t].isNew=!0,!1}}},Ze=Ye,Xe=Object(f["a"])(Ze,Ke,Je,!1,null,null,null),Ge=Xe.exports,Qe=function(){var e=this,t=e._self._c;return t("el-table",e._g(e._b({directives:[{name:"watermark",rawName:"v-watermark",value:{title:e.$Config.directives.watermark.title,subTitle:e.$Config.directives.watermark.subTitle},expression:"{ title: $Config.directives.watermark.title, subTitle: $Config.directives.watermark.subTitle }"}],ref:"multipleTable",staticClass:"com",staticStyle:{width:"100%"},attrs:{data:e.tableData,"cell-class-name":e.cellConfigSet},on:{select:e.$comSelect,"select-all":e.$comSelect},scopedSlots:e._u([{key:"empty",fn:function(){return[t("img",{staticClass:"my-24",attrs:{src:e.$Config.Components.table.noData,alt:""}})]},proxy:!0}])},"el-table",e.$attrs,!1),e.$listeners),[e.checkbox?t("el-table-column",{attrs:{fixed:e.showFixed,"reserve-selection":e.reserveSelection,type:"selection",width:"44"}}):e._e(),e.expand?t("el-table-column",{attrs:{fixed:e.showFixed,type:"expand",width:"44"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._t("expand",null,null,t)]}}],null,!0)}):e._e(),e._l(e.column,(function(a,n){return t("el-table-column",e._b({key:"otable"+n,class:a.code,attrs:{formatter:a.code?e.setFormatData(a):a.formatter,fixed:e.showFixed&&a.fixed,"show-overflow-tooltip":!a["hidden-overflow-tooltip"]},scopedSlots:e._u([e.isShowHeader(a.prop)?{key:"header",fn:function(t){return[e._t(a.prop+"Header",null,null,t)]}}:null,e.isShowSlots(a.prop)?{key:"default",fn:function(t){return[e._t(a.prop,null,null,t)]}}:null],null,!0)},"el-table-column",{...a},!1),e._l(a.children,(function(n,o){return a.children?t("childTable",{key:"otables"+o,attrs:{data:n,"show-slots":e.showSlots},scopedSlots:e._u([e._l(e.showSlots,(function(a,n){return{key:a,fn:function(o){return[t("div",{key:n+"slotName"},[e._t(a,null,null,o)],2)]}}}))],null,!0)}):e._e()})),1)})),"auto"!==e.operationWidth?t("el-table-column",{attrs:{fixed:!!e.showFixed&&"right",label:e.$Config.Components.table.optionLabel,width:e.operationWidth},scopedSlots:e._u([{key:"default",fn:function(t){return[e._t("default",null,null,t)]}}],null,!0)}):e._e()],2)},et=[],tt=function(){var e=this,t=e._self._c;return t("el-table-column",e._b({attrs:{"show-overflow-tooltip":!e.data["hidden-overflow-tooltip"]},scopedSlots:e._u([e.showSlots.includes(e.data.prop)?{key:"default",fn:function(t){return[e._t(e.data.prop,null,null,t)]}}:null],null,!0)},"el-table-column",{...e.data},!1),e._l(e.data.children,(function(a,n){return e.data.children?t("childTable",{key:"otables"+n,attrs:{data:a,"show-slots":e.showSlots},scopedSlots:e._u([e._l(e.showSlots,(function(a,n){return{key:a,fn:function(o){return[t("div",{key:n+"slotName"},[e._t(a,null,null,o)],2)]}}}))],null,!0)}):e._e()})),1)},at=[],nt={name:"ChildTable",props:{data:{type:Object,default:()=>({})},showSlots:{type:Array,default:()=>[]}}},ot=nt,it=Object(f["a"])(ot,tt,at,!1,null,null,null),lt=it.exports,rt={name:"HcTable",components:{childTable:lt},props:{data:{type:Array,required:!0,default:()=>[]},column:{type:Array,required:!0,default:()=>[]},expand:{type:Boolean,default:!1},showFixed:{type:Boolean,default:!1},checkbox:{type:Boolean,default:!1},reserveSelection:{type:Boolean,default:!1},checkData:{type:Array,default:()=>[]},cellConfig:{type:Object},cellClassName:{type:Function},operationWidth:{type:String,default:"auto"},showHeaders:{type:Array,default:()=>[]}},data(){return{}},computed:{showSlots(){const e=[];return this.getSlots(this.column,e),e},tableData(){return this.data}},watch:{column:{handler(e){e.forEach(e=>{e.code&&d.getListData(this,e.code),this.codeMap(e)})},immediate:!0},tableData(){this.$nextTick(this.setCheckboxData())}},mounted(){this.setCheckboxData()},methods:{codeMap(e){e.children&&e.children.forEach(e=>{e.code&&d.getListData(this,e.code),this.codeMap(e)})},$comSelect(e){if(!this.checkbox)return!1;this.$emit("on-select",e)},isShowSlots(e){return this.showSlots.includes(e)},isShowHeader(e){let t=!1;return this.showHeaders.map(a=>{if(a.includes(e))return t=!0,!1}),t},cellConfigSet(e){const t=this.cellConfig;return this.cellClassName?this.cellClassName(e):t&&Object.keys(t).includes(e.column.property)?t[e.column.property][e.row[e.column.property]]:void 0},setFormatData(e){const t=this;return function(a){const n=(u.tCodeData[e.code]||[]).find(n=>a[e.prop]===n[t.$Config.Components.formItem.value])||{};return n[t.$Config.Components.formItem.label]||a[e.prop]}},getSlots(e,t=[]){e.forEach(e=>{e.isSlot&&t.push(e.prop),e.children&&this.getSlots(e.children,t)})},setCheckboxData(){const e=this;this.checkbox&&this.checkData.length>0?this.checkData.forEach(t=>{e.$refs.multipleTable.toggleRowSelection(t)}):this.$refs.multipleTable.clearSelection()}}},st=rt,ct=Object(f["a"])(st,Qe,et,!1,null,null,null),ut=ct.exports,dt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"absolute-all hc-frame d-flex"},[e.menu?t("div",{staticClass:"animate-width h-100 hcMenu",style:{width:e.menuWidth+"px"}},[t("div",{style:{height:e.config.height.logo+"px"}},[e._t("logo")],2),t("com-menu",e._b({staticClass:"overflow-auto noScroll hcMenu",style:{height:`calc(100% - ${e.config.height.logo+e.config.height.footer}px)`},attrs:{collapse:e.collapse}},"com-menu",e.$attrs,!1)),t("div",{style:{height:e.config.height.footer+"px"}},[e._t("footer")],2)],1):e._e(),t("div",{staticClass:"relative overflow-hidden animate-width h-100 contentMaxs",style:{width:`calc(100% - ${e.menu?e.menuWidth:0}px)`}},[e.config.height.header?t("div",{style:{height:e.config.height.header+"px"}},[e._t("nav")],2):e._e(),e.config.height.tabs?t("div",{style:{height:e.config.height.tabs+"px"}},[t("com-tabs",e._g(e._b({ref:"hcMenuTabs",staticClass:"pl-24 hcTabs"},"com-tabs",e.$attrs,!1),e.$listeners))],1):e._e(),t("div",{staticClass:"overflow-auto relative pl-20",style:{height:`calc(100% - ${e.config.height.header+e.config.height.tabs}px)`}},[e._t("default")],2)])])},ht=[];const pt=(e,t)=>{for(let a in t)e[a]=e[a]&&"[object Object]"===e[a].toString()?pt(e[a],t[a]):e[a]=t[a];return e};var ft={deepMerge:pt};const mt=e=>JSON.parse(JSON.stringify(e)),gt=(e,t)=>e.map(e=>{const a={};return Object.keys(e).forEach(n=>{!t.split(",").includes(n)&&(a[n]=e[n])}),a}),bt=e=>{while(e.some(e=>Array.isArray(e)))e=[].concat(...e);return e},yt=(e,t)=>{const a={};return vt(t)?(t.forEach(t=>{a[t]=e.reduce((e,a)=>t===a?e+1:e+0,0)}),a):e.reduce((e,a)=>t===a?e+1:e+0,0)},vt=e=>"[object Array]"===Object.prototype.toString.call(e),Ct=e=>"[object Array]"===Object.prototype.toString.call(e)&&0===e.length,wt=(e,t)=>e.length===t.length&&!e.find((e,a)=>JSON.stringify(e)!==JSON.stringify(t[a])),$t=(e,t)=>{const[a,n]=[[],{}];for(let o=0;o<e.length;o++){const i=e[o][t];n[i]||(a.push(e[o]),n[i]=!0)}return a},xt=(e,t)=>{const[a,n,o]=[new Set(e),new Set(t),[]];for(let i of a)n.has(i)?(a.delete(i),n.delete(i)):o.push(i);for(let i of n)a.has(i)||o.push(i);return o},kt=(e,t={id:"id",parentId:"parentId",children:"children"})=>{const a=ft.deepMerge({id:"id",parentId:"parentId",children:"children"},t),n={},o=["",void 0,null],{id:i,parentId:l,children:r}=a;return e.forEach(e=>{e[r]=[],n[e[i]]=e}),e.filter(e=>!(!o.includes(e[l])&&n[e[l]])||(n[e[l]][r].push(e),!1))},_t=(e,t={id:"id",parentId:"parentId",children:"children"})=>{const a=ft.deepMerge({id:"id",parentId:"parentId",children:"children"},t);let n=[],o=e=>{e.forEach(e=>{n.push(e),e[a.children]&&e[a.children].length>0&&o(e[a.children])})};return o(e),n};var St={cloneDeep:mt,filterOptionArray:gt,flatten:bt,getEleCount:yt,isArray:vt,isEmptyArray:Ct,isEqual:wt,repeatObjEle:$t,listToTree:kt,treeToList:_t,unSet:xt};const Dt=e=>{Mt(e,"","-1")},Ot=e=>{let t=document.cookie.split(";");for(let a=0;a<t.length;a++){let n=t[a].split("=");if(e===n[0])return n[1]}return!1},Mt=(e,t,a)=>{const n=new Date;n.setDate(n.getDate()+a),document.cookie=e+"="+t+";expires="+n},Tt=(e,t,a="localStorage")=>{var n=document.createEvent("StorageEvent");const o={setItem:function(e,t){"localStorage"===a?window&&window.localStorage.setItem(e,t):window&&window.sessionStorage.setItem(e,t),n.initStorageEvent("setItem",!1,!1,e,null,t,null,null),window&&window.dispatchEvent(n)}};return o.setItem(e,t)};var Nt={cookie:{del:Dt,get:Ot,set:Mt},addStorgeValue:Tt};const Et=(e,t="-",a="date")=>{let n=new Date(e);const o=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,0),l=String(n.getDate()).padStart(2,0),r=String(n.getHours()).padStart(2,0),s=String(n.getMinutes()).padStart(2,0),c=String(n.getSeconds()).padStart(2,0);return"date"===a?`${o}${t}${i}${t}${l} ${r}:${s}:${c}`:`${o}${t}${i}${t}${l}`};var jt={getDate:Et};const It=({functional:e={},text:t={},border:a={},other:n={},shadow:o})=>{Lt(e,"functional"),Lt(t,"text"),Lt(a,"border");const i={primary:"#409eff",success:"#67c23a",info:"#909399",warning:"#e6a23c",danger:"#f56c6c",...e},l={primary:"#303133",regular:"#606266",secondary:"#909399",placeholder:"#c0c4cc",...t},r={base:"#dcdfe6",light:"#e4e7ed",lighter:"#ebeef5",extraLight:"#f2f6fc",...a},s={...n},c=o||"#000000",u={};Bt(i,u),Pt(l,"text",u),Pt(r,"border",u),Pt(s,"other",u),Ft(c,u),At(u)},Lt=(e,t)=>{const a={functional:["primary","success","info","warning","danger"],text:["primary","regular","secondary","placeholder","danger"],border:["base","light","lighter","extraLight"]};for(let n in e)if(!a[t].includes(n))throw`Function setTheme: 参数${t}错误,不在'${a[t].join("、")}'范围内`;return!0},At=e=>{document.getElementById("hc-theme-style")&&document.getElementById("hc-theme-style").remove();const t=document.createElement("style");t.type="text/css",t.id="hc-theme-style";let a="body{";for(let n in e)a+=`${n}:${e[n]};`;t.innerHTML=a+"}",window.document.head.insertBefore(t,window.document.head.childNodes[0])},Bt=(e,t)=>{for(let a in e){const n=[100,95,90,85,80,50,40,20,10,5];n.forEach(n=>{const o=`--color-${a}${100===n?"":"-"+n}`;t[o]=zt(e[a],n)})}},Pt=(e,t="text",a)=>{for(let n in e){const o=`--color-${t}-${n}`;a[o]=e[n]}},Ft=(e,t)=>{const a=[90,80,70,60,50,40,30,20,10,5];a.forEach(a=>{const n="--shadow-"+a;t[n]=zt(e,a)})},zt=(e,t=100)=>{let a="rgb(";for(let o=1;o<=5;o+=2)a+=parseInt(e.substr(o,2),16)+",";const n=a+t/100+")";return Ht(n)},Ht=e=>{let t=e.replace(/rgba?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),a=parseFloat(t[3]||1),n=Math.floor(a*parseInt(t[0])+255*(1-a)),o=Math.floor(a*parseInt(t[1])+255*(1-a)),i=Math.floor(a*parseInt(t[2])+255*(1-a));return"#"+("0"+n.toString(16)).slice(-2)+("0"+o.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)};var Vt={setTheme:It},Wt={...St,...Nt,...jt,...ft,...Vt};const Rt=c.a.observable({tabData:[],menuData:[],menuActive:"",tabsActive:"",menuConfig:{label:"label",icon:"icon",children:"children",value:"value",parent:"parent",fullPath:"fullPath"}}),Ut={setTabs(e,t){const a=Rt.tabData.map(e=>e[Rt.menuConfig.value]);if(t?a.includes(t):a.includes(e)){const a=Rt.tabData.findIndex(e=>e[Rt.menuConfig.value]===t),n=Rt.menuData.find(a=>a[Rt.menuConfig.value]===(t||e));a>=0&&(Rt.tabData[a][Rt.menuConfig.fullPath]=n[Rt.menuConfig.fullPath]),Rt.tabData=JSON.parse(JSON.stringify(Rt.tabData))}else{const a=Rt.menuData.find(a=>a[Rt.menuConfig.value]===(t||e));a&&Rt.tabData.push(a)}Rt.menuActive=e,Rt.tabsActive=t||e},deleteTabs(e,t){if(Rt.tabData.length<=1)return;const a=Rt.tabData.findIndex(t=>t[Rt.menuConfig.value]===e);return!t&&this.setTabs(Rt.tabData[a?a-1:a+1][Rt.menuConfig.value]),Rt.tabData.splice(a,1),!0}};var qt=function(){var e=this,t=e._self._c;return t("el-menu",e._g(e._b({directives:[{name:"watermark",rawName:"v-watermark",value:{title:e.$Config.directives.watermark.title,subTitle:e.$Config.directives.watermark.subTitle},expression:"{ title: $Config.directives.watermark.title, subTitle: $Config.directives.watermark.subTitle }"}],attrs:{"default-active":e.menuActive},on:{select:e.changeMenu}},"el-menu",e.$attrs,!1),e.$listeners),[e._l(e.data,(function(a,n){return[a[e.menuConfig.children]?t("el-submenu",{key:"submenu"+a[e.menuConfig.label]+n,attrs:{index:a[e.menuConfig.value]}},[t("template",{slot:"title"},[t("div",[t("i",{class:[a[e.menuConfig.icon],e.$attrs.collapse?"text-18":"text-28"]}),t("span",{attrs:{slot:"title"},slot:"title"},[e._v(" "+e._s(a[e.menuConfig.label])+" ")])])]),e._l(a[e.menuConfig.children],(function(e,a){return t("child-submenu",{key:"father"+a,attrs:{menu:e}})}))],2):t("el-menu-item",{key:"menu"+a[e.menuConfig.label]+n,attrs:{index:a[e.menuConfig.value]}},[t("div",[t("i",{class:[a[e.menuConfig.icon],e.$attrs.collapse?"text-18":"text-28"]}),t("span",{attrs:{slot:"title"},slot:"title"},[e._v(" "+e._s(a[e.menuConfig.label])+" ")])])])]}))],2)},Kt=[],Jt=function(){var e=this,t=e._self._c;return e.menu[e.menuConfig.children]&&e.menu[e.menuConfig.children].length?e.menu[e.menuConfig.children]&&e.menu[e.menuConfig.children].length?t("el-submenu",{attrs:{index:e.menu[e.menuConfig.value]}},[t("template",{slot:"title"},[t("div",[e._v(" "+e._s(e.menu[e.menuConfig.label])+" ")])]),e._l(e.menu[e.menuConfig.children],(function(e,a){return t("submenu",{key:a,attrs:{menu:e}})}))],2):e._e():t("el-menu-item",{attrs:{index:e.menu[e.menuConfig.value]}},[t("div",[t("i",{class:e.menu[e.menuConfig.icon]}),e._v(" "+e._s(e.menu[e.menuConfig.label])+" ")])])},Yt=[],Zt={name:"Submenu",props:{menu:{type:Object,default:()=>({})}},computed:{menuConfig:()=>Rt.menuConfig}},Xt=Zt,Gt=Object(f["a"])(Xt,Jt,Yt,!1,null,null,null),Qt=Gt.exports,ea={components:{childSubmenu:Qt},props:{data:{type:Array,required:!0,default:()=>[]}},data(){return{menuData:[]}},computed:{menuActive:()=>Rt.menuActive,menuConfig:()=>Rt.menuConfig},watch:{$route(e,t){e.name!==t.name&&this.init(e.meta.parent||e.name,this.$route)},data(e){e&&this.setMenuData(e)}},created(){this.data&&this.setMenuData(this.data),this.init(this.$route.meta.parent||this.$route.name,this.$route)},methods:{init(e,t){const a={[this.menuConfig.label]:t.meta.title,[this.menuConfig.value]:t.name,tabsParent:e,[this.menuConfig.fullPath]:t.fullPath};Rt.menuData=this.$Func.repeatObjEle([a,...JSON.parse(localStorage.getItem("tabData"))||[],...this.menuData],this.menuConfig.value),Ut.setTabs(e,t.name)},changeMenu(e){Ut.setTabs(e)},setMenuData(e){e.forEach(e=>{this.menuData.push({...e,[this.menuConfig.children]:null}),e[this.menuConfig.children]&&this.setMenuData(e[this.menuConfig.children])})}}},ta=ea,aa=Object(f["a"])(ta,qt,Kt,!1,null,null,null),na=aa.exports,oa=function(){var e=this,t=e._self._c;return t("div",[t("el-tabs",{directives:[{name:"watermark",rawName:"v-watermark",value:{title:e.$Config.directives.watermark.title,subTitle:e.$Config.directives.watermark.subTitle},expression:"{ title: $Config.directives.watermark.title, subTitle: $Config.directives.watermark.subTitle }"}],staticClass:"tabClass",attrs:{closable:e.tabData.length>1},on:{"tab-click":e.handleClick,"tab-remove":e.tabRemove},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.tabData,(function(a,n){return t("el-tab-pane",{key:"tabs"+a[e.menuConfig.value]+n,attrs:{label:a[e.menuConfig.label],name:a[e.menuConfig.value]}})})),1)],1)},ia=[],la={inheritAttrs:!1,data(){return{activeName:""}},computed:{tabData:()=>Rt.tabData,menuData:()=>Rt.menuData,tabsActive:()=>Rt.tabsActive,menuConfig:()=>Rt.menuConfig},watch:{tabData(e){localStorage.setItem("tabData",JSON.stringify(e))},tabsActive:{handler(e){this.activeName=e;const t=this.menuData.find(t=>t[this.menuConfig.value]===e);t&&this.$router.push(t[this.menuConfig.fullPath])},immediate:!0}},methods:{handleClick(e){const t=this.menuData.find(t=>t[this.menuConfig.value]===e.name);t&&t.tabsParent?Ut.setTabs(t.tabsParent,e.name):Ut.setTabs(e.name)},tabRemove(e){Ut.deleteTabs(e)}}},ra=la,sa=Object(f["a"])(ra,oa,ia,!1,null,null,null),ca=sa.exports,ua={name:"HcFrame",components:{comMenu:na,comTabs:ca},provide(){return{tabRemove:this.closeTabs}},props:{collapse:{type:Boolean,default:!1},menu:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({label:"label",icon:"icon",children:"children",value:"value ",parent:"parent",fullPath:"fullPath"})},config:{type:Object,default:()=>({width:{openMenu:240,closeMenu:60},height:{header:50,footer:0,tabs:50,logo:50}})}},data(){return{}},computed:{menuWidth(){return this.config.width[this.collapse?"closeMenu":"openMenu"]}},created(){Rt.menuConfig=this.menuConfig,Rt.tabData=JSON.parse(localStorage.getItem("tabData"))||[]},methods:{closeTabs(e,t=!1){return Ut.deleteTabs(e,t)}}},da=ua,ha=Object(f["a"])(da,dt,ht,!1,null,null,null),pa=ha.exports,fa=function(){var e=this,t=e._self._c;return t("div",{staticClass:"flex-wrap"},[e.noShow?e._e():t("div",[".jpg,.jpeg,.png,.gif"===e.ext?t("div",e._l(e.fileList,(function(a,n){return t("div",{key:"upload"+n,staticClass:"imgUpload radius border relative mr-12",style:{width:e.size,height:e.size}},[t("img",{staticClass:"w-100 h-100",attrs:{src:a[e.keys]}}),t("div",{staticClass:"absolute-all flex-center cursor-pointer",on:{click:function(t){return e.deleteImg(a)}}},[t("i",{staticClass:"el-icon-delete color-white text-24"})])])})),0):t("div",e._l(e.fileList,(function(a,n){return t("div",{key:"upload"+n,staticClass:"flex-y-center mb-8 cursor-pointer"},[t("span",{on:{click:function(t){return e.downFile(a)}}},[e._v(" "+e._s(a.name||"附件"+(n+1))+" ")]),t("i",{staticClass:"el-icon-close ml-80 text-20",on:{click:function(t){return e.deleteImg(a)}}})])})),0)]),e.fileList.length<e.limit||e.noShow?t("el-upload",e._b({attrs:{action:e.action,data:e.uploadData,headers:e.headersData,"file-list":e.fileList,"on-success":e.handleAvatarSuccess,"on-error":e.handleAvatarError,"show-file-list":!1,"before-upload":e.onBeforeUpload,multiple:""}},"el-upload",e.$attrs,!1),[e._t("default")],2):e._e()],1)},ma=[],ga={props:{value:{type:String,default:""},size:{type:String,default:"120px"},ext:{type:String,default:"file"},keys:{type:String,default:"viewUrl"},noShow:{type:Boolean,default:!1},maxSize:{type:Number,default:10240},limit:{type:Number,default:1},action:{type:String,default:"/api/server/upload"}},data(){return{fileList:[]}},computed:{uploadData(){return{}},headersData(){return{Authorization:this.$store.getters.token}}},watch:{value(e){if(!e)return;const t=e.split(",").map(e=>({[this.keys]:e}));this.fileList=t.map(e=>this.fileList.find(t=>t[this.keys]===e[this.keys])||e)}},methods:{handleAvatarSuccess(e,t){this.fileList.push({name:t.name,viewUrl:t.name}),this.$emit("input",t.name),this.$emit("set-val",{...e,name:t.name})},onBeforeUpload(e){return!0},deleteImg(e){this.fileList=this.fileList.filter(t=>e[this.keys]!==t[this.keys]),this.$emit("input",this.fileList.map(e=>e[this.keys]).join(","))},downFile(e){window.open(e[this.keys])},handleAvatarError(e){this.$message.error("导入模版:"+JSON.parse(e.message).message)}}},ba=ga,ya=Object(f["a"])(ba,fa,ma,!1,null,null,null),va=ya.exports,Ca=function(){var e=this,t=e._self._c;return t("div",[e.isSearch?t("el-input",{attrs:{size:"small",placeholder:"输入关键字进行过滤"},model:{value:e.searchFilter,callback:function(t){e.searchFilter=t},expression:"searchFilter"}}):e._e(),t("el-tree",e._g(e._b({ref:"hcTree",staticClass:"mt-16",attrs:{data:e.treeData,"node-key":e.$attrs["node-key"]||"id","filter-node-method":e.filterNode},on:{"check-change":e.treeChange},scopedSlots:e._u([{key:"default",fn:function({node:a,data:n}){return[t("div",{staticClass:"w-100"},[t("div",{staticClass:"flex-between-center pr-20 border-box"},[t("div",{staticClass:"overflow-hidden"},[e.isSlot?t("div",{staticClass:"overflow-hidden"},[e._t("default",null,null,{node:a,data:n})],2):t("div",[e._v(" "+e._s(n[e.labelKey])+" ")])]),e.operation?t("com-operation",e._g(e._b({attrs:{"f-refs":e.$refs,node:a,data:n,"label-key":e.labelKey}},"com-operation",e.$attrs,!1),e.$listeners)):e._e()],1)])]}}],null,!0)},"el-tree",e.$attrs,!1),e.$listeners))],1)},wa=[],$a=function(){var e=this,t=e._self._c;return t("div",[e.expand?t("div",{staticClass:"flex-between-center"},e._l(e.operationConfig,(function(a,n){return t("div",{key:n},[!a.show||"function"!==typeof a.show||a.show(e.$attrs.data)?t("div",[t("com-"+a.prop,e._g(e._b({tag:"components",staticClass:"ml-8"},"components",{...e.$attrs,...a},!1),e.$listeners))],1):e._e()])})),0):t("el-popover",{attrs:{placement:"left-start",width:"40","popper-class":"treeOperationPopper",trigger:"hover"}},[t("div",e._l(e.operationConfig,(function(a,n){return t("div",{key:n,staticClass:"flex-center"},[!a.show||"function"!==typeof a.show||a.show(e.$attrs.data)?t("div",[t("com-"+a.prop,e._g(e._b({tag:"components",staticClass:"ml-8"},"components",{...e.$attrs,...a},!1),e.$listeners))],1):e._e()])})),0),t("i",{staticClass:"el-icon-more color-primary",attrs:{slot:"reference"},slot:"reference"})])],1)},xa=[],ka=function(){var e=this,t=e._self._c;return t("hc-"+e.operationModel,{tag:"components",attrs:{title:e.title,width:e.$attrs.width||"640px",size:e.$attrs.width||"640px","out-close":e.outClose}},[t("el-button",{attrs:{type:"text"}},["text"===e.operationType?t("div",[e._v(" "+e._s(e.$attrs.label)+" ")]):t("i",{class:e.$attrs.icon||"el-icon-plus"})]),t("div",{attrs:{slot:"contain"},slot:"contain"},[t("div",{class:"dialog"===e.operationModel?"":"hc-drawer-body"},[t("el-form",{ref:"form",staticClass:"w-100",attrs:{model:e.form,rules:e.rules}},[t("hc-form-item",e._b({attrs:{form:e.form}},"hc-form-item",e.childConfig,!1))],1),t(e.$attrs.component,{tag:"components"})],1),t("div",{class:"dialog"===e.operationModel?"flex-x-end":"hc-drawer-footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v(" 确定 ")]),t("el-button",{on:{click:function(t){e.outClose=!e.outClose}}},[e._v(" 取消 ")])],1)])],1)},_a=[];const Sa=e=>{const t=e.findIndex(e=>!e.label);if(-1!==t)return console.log(`%chc-tree => operationConfig参数:第${t+1}个参数label字段不能为空`,"color: #e88282"),!1;const a=e.findIndex(e=>!e.prop||!["add","edit","clean"].includes(e.prop));if(-1!==a)return console.log(`%chc-tree => operationConfig参数:第${a+1}个参数prop字段不能为空且需要在'add'、'edit'、'clean'之中`,"color: #e88282"),!1;const n=e.findIndex(e=>!e.httpUrl);return-1===n||(console.log(`%chc-tree => operationConfig参数:第${n+1}个参数httpUrl字段不能为空`,"color: #e88282"),!1)},Da=e=>!0,Oa=e=>["dialog","drawer"].includes(e);var Ma={name:"OperationAdd",inheritAttrs:!1,props:{node:{type:Object,default:()=>{}},fRefs:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},labelKey:{type:String,default:""},operationModel:{type:String,default:"dialog",validator:Oa},operationType:{type:String,default:"text"},httpUrl:{type:String,default:""},childConfig:{type:Object,default:()=>{},required:!0,validator:Da}},data(){return{outClose:!1,form:{}}},computed:{rules(){return this.childConfig.rules||{}},title(){return(this.data.label||"")+this.$attrs.label+"子节点"}},methods:{async onSubmit(){const e=await this.$refs.form.validate();if(e){const e=this.childConfig.paramsDispose&&"function"===typeof this.childConfig.paramsDispose?this.childConfig.paramsDispose(this.form,this.node):this.form,t=await this.$hcHttp.post(this.$Config.axios.ipUrl+this.httpUrl,e);if(t.data){this.outClose=!this.outClose;const a="object"===typeof t.data?{...e,...t.data}:e;this.fRefs.hcTree.append(a,this.node),this.$message.success(this.childConfig.message||`子节点:${e[this.labelKey]} ${this.$attrs.label}成功`),this.form={},this.$emit("change"),this.$emit("edit")}}}}},Ta=Ma,Na=Object(f["a"])(Ta,ka,_a,!1,null,null,null),Ea=Na.exports,ja=function(){var e=this,t=e._self._c;return t("hc-"+e.operationModel,{tag:"components",attrs:{title:e.title,width:e.$attrs.width||"640px",size:e.$attrs.width||"640px","out-close":e.outClose}},[t("el-button",{attrs:{type:"text"}},["text"===e.operationType?t("div",[e._v(" "+e._s(e.$attrs.label)+" ")]):t("i",{class:e.$attrs.icon||"el-icon-edit"})]),t("div",{attrs:{slot:"contain"},slot:"contain"},[t("div",{class:"dialog"===e.operationModel?"":"hc-drawer-body"},[t("el-form",{ref:"form",staticClass:"w-100",attrs:{rules:e.rules,model:e.form}},[t("hc-form-item",e._b({attrs:{form:e.form}},"hc-form-item",e.childConfig,!1))],1)],1),t("div",{class:"dialog"===e.operationModel?"flex-x-end":"hc-drawer-footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v(" 确定 ")]),t("el-button",{on:{click:function(t){e.outClose=!e.outClose}}},[e._v(" 取消 ")])],1)])],1)},Ia=[],La={name:"OperationAdd",inheritAttrs:!1,props:{node:{type:Object,default:()=>{}},fRefs:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},labelKey:{type:String,default:""},httpUrl:{type:String,default:""},operationModel:{type:String,default:"dialog",validator:Oa},operationType:{type:String,default:"text"},childConfig:{type:Object,default:()=>{},required:!0,validator:Da}},data(){return{outClose:!1,form:{}}},computed:{rules(){return this.childConfig.rules||{}},title(){return this.$attrs.label+(this.data.label||"")}},created(){this.form=JSON.parse(JSON.stringify(this.data))},methods:{async onSubmit(){const e=await this.$refs.form.validate();if(e){const e=this.childConfig.paramsDispose&&"function"===typeof this.childConfig.paramsDispose?this.childConfig.paramsDispose(this.form,this.node):this.form,t=await this.$hcHttp.post(this.$Config.axios.ipUrl+this.httpUrl,e);t.data&&(this.outClose=!this.outClose,this.$message.success(this.childConfig.message||`${e[this.labelKey]} ${this.$attrs.label}成功`),this.fRefs.hcTree.getNode(this.data).data[this.labelKey]=e[this.labelKey],this.$emit("change"),this.$emit("edit"))}}}},Aa=La,Ba=Object(f["a"])(Aa,ja,Ia,!1,null,null,null),Pa=Ba.exports,Fa=function(){var e=this,t=e._self._c;return t("el-button",{directives:[{name:"prevent-shake",rawName:"v-prevent-shake"}],attrs:{type:"text"},on:{click:e.deleteData}},["text"===e.operationType?t("div",[e._v(" "+e._s(e.$attrs.label)+" ")]):t("i",{class:e.$attrs.icon||"el-icon-delete"})])},za=[],Ha={name:"OperationDel",inheritAttrs:!1,props:{node:{type:Object,default:()=>{}},fRefs:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},httpUrl:{type:String,default:""},httpType:{type:String,default:"post"},operationType:{type:String,default:"text"},childConfig:{type:Object,default:()=>{},required:!0,validator:Da}},data(){return{outClose:!1}},methods:{deleteData(){this.$confirm(""+(this.childConfig.promptInfo||"此操作将删除当前节点以及当前节点下所有子节点, 是否继续?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(async()=>{const e=this.childConfig.paramsDispose&&"function"===typeof this.childConfig.paramsDispose?this.childConfig.paramsDispose(this.data,this.node):this.data,t=await this.$hcHttp[this.httpType](this.$Config.axios.ipUrl+this.httpUrl,e);t.data&&(this.fRefs.hcTree.remove(this.node),this.outClose=!this.outClose,this.$message.success(this.childConfig.message||`节点:${t.data.label} 删除成功`),this.$emit("change"),this.$emit("clean"))}).catch(()=>{this.$message({type:"info",message:"已取消删除"})})}}},Va=Ha,Wa=Object(f["a"])(Va,Fa,za,!1,null,null,null),Ra=Wa.exports,Ua={name:"Operation",components:{comAdd:Ea,comEdit:Pa,comClean:Ra},inheritAttrs:!1,props:{expand:{type:Boolean,default:!1},operationConfig:{type:Array,default:()=>[],validator:Sa}},data(){return{}}},qa=Ua,Ka=Object(f["a"])(qa,$a,xa,!1,null,null,null),Ja=Ka.exports,Ya={components:{comOperation:Ja},props:{value:{type:Array,default:()=>[]},data:{type:Array,default:()=>[],required:!0},labelKey:{type:String,default:"label"},isList:{type:Boolean,default:!1},isSlot:{type:Boolean,default:!1},details:{type:Boolean,default:!1},operation:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},listConfig:{type:Object,default:()=>({})}},data(){return{searchFilter:""}},computed:{treeData(){let e=this.isList?Wt.listToTree(this.data,this.listConfig):this.data;return this.details&&(e=Wt.treeToList(e,this.listConfig).filter(e=>this.value.includes(e[this.$attrs["node-key"]||"id"])),e=Wt.listToTree(e,this.listConfig)),e}},watch:{searchFilter(e){this.$refs.hcTree.filter(e),this.$emit("search",e)},value:{handler(e){this.$nextTick(()=>{this.$refs.hcTree.setCheckedKeys(e)})},immediate:!0}},methods:{filterNode(e,t){if(this.isSearch)return!e||-1!==t[this.labelKey].indexOf(e)},treeChange(){const e=this.$refs.hcTree.getCheckedKeys();this.$emit("input",e)}}},Za=Ya,Xa=Object(f["a"])(Za,Ca,wa,!1,null,null,null),Ga=Xa.exports,Qa=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"hc-svg",class:e.color,style:{fill:e.color||""},attrs:{width:e.size,height:e.size}},[t("use",{attrs:{"xlink:href":"#icon-"+e.name}})])},en=[],tn={name:"HcIcon",props:{size:{type:[Number,String],default:()=>"100%"},name:{type:String,default:""},type:{type:String,default:null}},computed:{color(){return(u.textColor[this.type]||"color-text-primary")+"-icon"}}},an=tn,nn=Object(f["a"])(an,Qa,en,!1,null,null,null),on=nn.exports;const ln={desc:g,dialog:$,"form-item":Oe,identify:Ie,frame:pa,pager:ze,popover:qe,tab:Ge,table:ut,drawer:O,tree:Ga,upload:va,icon:on},rn=function(e){rn.installed||Object.keys(ln).map(t=>e.component("hc-"+t,ln[t]))};"undefined"!==typeof window&&window.Vue&&rn(window.Vue);var sn={install:rn},cn=a("5c96"),un=a.n(cn);const dn=e=>({bind(e,{value:t}){e.$value=t,e.handler=()=>{if(!e.$value)return void cn["Message"].warning("无复制内容");const t=document.createElement("textarea");t.readOnly="readonly",t.style.position="absolute",t.style.left="-9999px",t.value=e.$value,document.body.appendChild(t),t.select(),t.setSelectionRange(0,t.value.length);const a=document.execCommand("Copy");a&&cn["Message"].success("复制成功"),document.body.removeChild(t)},e.addEventListener("click",e.handler)},componentUpdated(e,{value:t}){e.$value=t},unbind(e){e.removeEventListener("click",e.handler)}});var hn=dn;const pn=()=>({bind(e,t){if(!t.value)return;const a=e.querySelector(".el-dialog__header"),n=e.querySelector(".el-dialog");a.style.cursor="move";const o=n.currentStyle||window.getComputedStyle(n,null);a.onmousedown=e=>{const t=e.clientX-a.offsetLeft,i=e.clientY-a.offsetTop;let l,r;o.left.includes("%")?(l=Number(document.body.clientWidth)*(Number(o.left.replace(/\%/g,""))/100),r=Number(document.body.clientHeight)*(Number(o.top.replace(/\%/g,""))/100)):(l=Number(o.left.replace(/\px/g,"")),r=Number(o.top.replace(/\px/g,""))),document.onmousemove=function(e){const a=e.clientX-t,o=e.clientY-i;n.style.left=a+l+"px",n.style.top=o+r+"px"},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null}}}});var fn=pn;let mn=(e,t)=>e.tagName.toLowerCase()===t?e:e.querySelector(t);function gn(e){return e>0?new RegExp(`^\\d+(?:\\.\\d{0,${e}})?$`):new RegExp("^\\d+$")}function bn(e){if("object"!==typeof e)throw Error("param is expected object");let t=e;function a(e){return e.split(".")}function n(e,t){if(e.hasOwnProperty(t))return e[t];throw Error(t+" is not exist")}return{value:t,get(e){let o=a(e);return o.reduce((e,t,a,o)=>n(e,t),t)},set(e,o){let i,l=a(e),r=null,s=l.reduce((e,t,a,o)=>(r=e,i=t,n(e,t)),t);return r[i]=o,{val:r[i],oldVal:s}}}}const yn=()=>({bind:function(e,t,a){let n=mn(e,"input"),o=t.arg,i=gn(gn);Object.defineProperty(n,"filterReg",{get(){return i},set(e){o=e,i=gn(e)},enumerable:!0,configurable:!0}),e.$inp=n;let l=bn(a.context);n.handle=function(){let e=this.getAttribute("enter");return e>0&&o!==e&&(this.filterReg=e),this.value.length&&!this.filterReg.test(this.value)?n.value=l.get(t.expression):l.set(t.expression,this.value),!1},n.addEventListener("input",n.handle)},unbind:function(e){e.$inp.removeEventListener("input",e.$inp.handle)}});var vn=yn;const Cn=e=>{const t=(t,a)=>{let n=e.showErr,o=a.value,i=o&&o.type||"showErr",l=o&&o.empty||!0;if(!t.src&&l)return void(t.src=n);const r=()=>t.addEventListener("error",e=>t.src=n);try{n=e[i],r()}catch(s){r()}};return{bind:(e,a)=>t(e,a),update:(e,a)=>t(e,a)}};var wn=Cn;const $n=()=>({inserted:function(e){e.addEventListener("keypress",(function(e){e=e||window.event;let t="number"===typeof e.charCode?e.charCode:e.keyCode,a=/\d/;!a.test(String.fromCharCode(t))&&t>9&&!e.ctrlKey&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}))}});var xn=$n;const kn=()=>({inserted(e,t,a){const n=a,o={max:9999999999.99,min:0,decimal:0};let i,l,r;t.value={...o,...t.value},r=(e,a,n)=>{let o=a===t.value.model.length;return a++,o&&(e[t.value.model[a-1]]=n),!o&&r(e[t.value.model[a-1]],a,n)||!1},l=e=>{r(n.context,0,e)},e.addEventListener("keypress",e=>{const a=e||window.event,n=String.fromCharCode("number"===typeof a.charCode?a.charCode:a.keyCode);i=a.target.value,(!/\d|\./.test(n)&&!a.ctrlKey||i.indexOf(".")>0&&"."===n||"."===n&&0===t.value.decimal||a.target.value>t.value.max)&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}),e.addEventListener("keyup",e=>{const a=e||window.event;i=parseFloat(a.target.value);let n=parseFloat(t.value.max);parseFloat(t.value.min);i>n&&(l(n),i=n)}),e.addEventListener("focus",e=>{const a=e||window.event;isNaN(Number(a.target.value))||0===Number(a.target.value)?isNaN(parseFloat(a.target.value))?l(""):l(parseFloat(a.target.value)):(i=parseFloat(a.target.value||0),l(i.toFixed(parseFloat(t.value.decimal))))})}});var _n=kn;const Sn=e=>({inserted(t,a){t.addEventListener("click",()=>{t.disabled||(t.disabled=!0,setTimeout(()=>{t.disabled=!1},a.arg||e.time))})}});var Dn=Sn;const On=e=>({bind:(t,a)=>{function n(t,a,n,o,i){const l=document.createElement("canvas");n.appendChild(l),l.width=e.width,l.height=e.height,l.style.display="none";const r=l.getContext("2d");r.rotate(-20*Math.PI/180),r.font=o,r.fillStyle=i,r.textAlign="left",r.textBaseline="Middle",r.fillText(t,l.width/3,l.height/2),r.fillText(a,l.width/3,l.height/2+20),n.style.backgroundImage="url("+l.toDataURL("image/png")+")"}n(a.value.title||e.title,a.value.subTitle||e.subTitle,t,a.value.font||e.font,a.value.textColor||e.fillStyle)}});var Mn=On;class Tn{constructor(){this.maskStyle="position:fixed;top:0;left:0;width:100%;height:100%;z-index:99997;"}add(){const e=document.createElement("div");e.style=this.maskStyle+"display:none",e.setAttribute("id","hc-right-menu-mask"),document.body.appendChild(e)}show(){document.getElementById("hc-right-menu-mask").style=this.maskStyle+"display:block"}hide(){document.getElementById("hc-right-menu-mask").style=this.maskStyle+"display:none"}}const Nn=e=>{e.stopPropagation(),e.cancelBubble=!0,e.preventDefault()},En=e=>{let t=0;return{bind(e,a,n){if(!(a.value instanceof Array))throw new Error("请设置右键菜单项目,数据类型为Array");const o=new Tn,i="hc-right-menu"+t;document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%",e.style.position=e.style.position||"relative",e.style.zIndex="99998",o.add(),e.addEventListener("contextmenu",e=>{const l=e||window.event;Nn(l);const r=l.pageX||l.pageY?l.pageX:l.clientX+document.body.scrollLeft-document.body.clientLeft,s=l.pageX||l.pageY?l.pageY:l.clientY+document.body.scrollTop-document.body.clientTop;for(let a=0;a<t;a++){let e=document.getElementById("hc-right-menu"+a);e&&(e.style="display:none")}if(o.show(),document.getElementById(i)){let e=document.getElementById(i);e.style=`top:${s}px;left:${r}px;`,r+e.clientWidth>=document.body.clientWidth&&(e.style.left=r-e.clientWidth+"px"),s+e.clientHeight>=document.body.clientHeight&&(e.style.top=s-e.clientHeight+"px")}else{let e=document.createElement("div");e.className="hcRightMenu",(a.value||[]).map(t=>{let a=document.createElement("div"),i=t.name||"空";a.setAttribute("unselectable","on"),a.innerHTML=i,a.className="hcRightMenuChild",a.onclick=function(){return a.parentNode.style.display="none",o.hide(),!!t.clickFunc&&n.context[t.clickFunc](t)},a.addEventListener("contextmenu",e=>{const t=e||window.event;Nn(t)}),e.appendChild(a)}),e.setAttribute("id",i),e.style=`top:${s}px;left:${r}px;`,document.body.appendChild(e)}}),t++;const l=()=>{document.getElementById(i)&&(document.getElementById(i).style="display:none"),document.getElementById("hc-right-menu-mask").style="display:none"};document.getElementById("hc-right-menu-mask").addEventListener("click",l),document.getElementById("hc-right-menu-mask").addEventListener("contextmenu",l)},unbind(e){e.removeEventListener("contextmenu",this,!0)}}};var jn=En;const In={copy:hn,dialogDrag:fn,enter:vn,onlyNumber:_n,onlyInt:xn,errImg:wn,watermark:Mn,rightMenu:jn,preventShake:Dn},Ln=function(e,t){Ln.installed||Object.keys(In).forEach(a=>{e.directive(a,In[a](t[a]))})};"undefined"!==typeof window&&window.Vue&&Ln(window.Vue);var An={install:Ln};const Bn=e=>{const t=(new Date).valueOf()-new Date(e).valueOf(),a=Math.abs(t)/1e3,n=[{time:31536e3,unit:"年"},{time:2592e3,unit:"月"},{time:86400,unit:"天"},{time:3600,unit:"小时"},{time:60,unit:"分钟"},{time:1,unit:"秒"}];for(let o=0;o<n.length;o++)if(a>n[o].time)return Math.floor(a/n[o].time)+n[o].unit+(t>0?"前":"后")},Pn=e=>(e=String(e),e.replace(e.substr(3,4),"****")),Fn=(e,t=!0)=>{const a=t?"":".00";if(e){e=String(e);let t,n=e.split(".")[0],o=e.split(".")[1];return o=o?o.length>=2?"."+o.substr(0,2):"."+o+0:a,t=n.split("").reverse().join("").match(/(\d{1,3})/g),(Number(e)<0?"-":"")+t.join(",").split("").reverse().join("")+o}return 0===e?"0"+a:""},zn=e=>e<10?"0"+e:e,Hn=e=>{const t=new Date;e&&t.setTime(e);let a=t.getFullYear(),n=zn(t.getMonth()+1),o=zn(t.getDate()),i=zn(t.getHours()),l=zn(t.getMinutes()),r=zn(t.getSeconds()),s=t.getDay();return{year:a,month:n,day:o,hour:i,minute:l,second:r,weekend:s}},Vn=e=>{let t=Date.parse(e);return t},Wn=(e,t="yyMMdd hhMMss",a="-")=>{if(!e)return"";let n=Hn(e),o="",i=n.year,l=n.month,r=n.day,s=n.hour,c=n.minute,u=n.second;switch(t){case"yy":o=i;break;case"yyMM":o=i+a+l;break;case"yyMMdd":o=i+a+l+a+r;break;case"yyMMdd hhMMss":o=i+a+l+a+r+" "+s+":"+c+":"+u;break;case"yyMMdd hhMM":o=i+a+l+a+r+" "+s+":"+c;break;case"MMdd hhMM":o=l+a+r+" "+s+":"+c;break;case"hhMMss":o=s+":"+c+":"+u;break;case"hhMM":o=s+":"+c;break}return o},Rn={encryptionPhone:Pn,timeInterval:Bn,moneyFormat:Fn,addZero:zn,timeStringToLong:Vn,timeFormat:Wn},Un=function(e){Un.installed||Object.keys(Rn).forEach(t=>{e.filter(t,Rn[t])})};"undefined"!==typeof window&&window.Vue&&Un(window.Vue);var qn={install:Un},Kn=a("bc3a"),Jn=a.n(Kn);const Yn={IDCard:/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,Number:/^[0-9]*$/g,VerificationCode:/^\d{6}$/g,MobilePhoneNumber:/^1((34[0-8])|(8\d{2})|(([35][0-35-9]|4[579]|66|7[35678]|9[1389])\d{1}))\d{7}$/,TelPhoneNumber:/^0\d{2,3}-?\d{7,8}$/,Www:/\b(([\w-]+:\/\/?|www[.])[^\s()<>]+(?:[\w\d]+|([^[:punct:]\s]|\/)))/,Email:/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/,CreditCode:/^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g,Fax:/^(\d{3,4}-)?\d{7,8}$/,ChEnNumber:/^[a-zA-Z0-9\u4e00-\u9fa5]+$/g,positiveInteger:/^\+?[1-9]\d*$/g,PostalCode:/^[a-zA-Z0-9 ]{3,12}$/};var Zn=Yn,Xn=a("8429"),Gn=a.n(Xn);function Qn(e,t){const a=e||"1234567812345678",n=t||"1234567812345678",o=(e,t=a,o=n)=>{let i=Gn.a.enc.Utf8.parse(t),l=Gn.a.enc.Utf8.parse(o),r=Gn.a.enc.Utf8.parse(e),s=Gn.a.AES.encrypt(r,i,{iv:l,mode:Gn.a.mode.CBC,padding:Gn.a.pad.Pkcs7});return Gn.a.enc.Base64.stringify(s.ciphertext)},i=(e,t=a,o=n)=>{let i=Gn.a.enc.Utf8.parse(t),l=Gn.a.enc.Utf8.parse(o),r=Gn.a.enc.Base64.stringify(Gn.a.enc.Base64.parse(e));const s=Gn.a.AES.decrypt(r,i,{iv:l,mode:Gn.a.mode.CBC,padding:Gn.a.pad.Pkcs7});return s.toString(Gn.a.enc.Utf8)};return{Encrypt:o,Decrypt:i}}var eo={encryptInit:Qn},to={AES:eo};const ao=e=>{e.use(un.a),e.prototype.$messge=un.a.Message,e.prototype.$msgbox=un.a.MessageBox,e.prototype.$alert=un.a.MessageBox.alert,e.prototype.$confirm=un.a.MessageBox.confirm,e.prototype.$prompt=un.a.MessageBox.prompt,e.prototype.$notify=un.a.Notification},no=(e,t)=>{const a=to.AES.encryptInit(t.Encrypt.AES.KEY,t.Encrypt.AES.IV);e.prototype.$AES={encrypt:a.Encrypt,decrypt:a.Decrypt}},oo={400:"错误请求",401:"未授权,请重新登录",403:"拒绝访问",404:"请求错误,未找到该资源",405:"请求方法未允许",408:"请求超时",500:"服务器端出错",501:"网络未实现",502:"网络错误",503:"服务不可用",504:"网络超时",505:"http版本不支持该请求"};let io=(e,t)=>cn["Message"].error(e||"服务调用出错");const lo=(e={})=>{const{config:t={},successCode:a,token:n,requestCallback:o,responseCallback:i}=e,l=e=>{let t={},a=Wt.deepMerge(Jn.a.defaults,e);for(let n in a)Jn.a.defaults[n]=a[n];return t.$http=Jn.a,t},r=e=>{if(o&&"function"===typeof o)o(e);else if(e.headers.common.token=n,"post"===e.method){let t=e.data;for(let e in t)null===t[e]&&(t[e]="")}return e},s=e=>Promise.reject(e),c=e=>i&&"function"===typeof i?i(e):e.data,u=e=>(e&&e.response?(io(oo[e.response.status]||"连接错误"+e.response.status),[401,404].includes(e.response.status)):io(JSON.stringify(e).includes("timeout")?"服务器响应超时,请刷新当前页":"连接服务器失败"),Promise.reject(e));Jn.a.defaults.headers=Object.assign(Jn.a.defaults.headers,t.headers);const d=l(t);return d.$http.interceptors.request.use(r,s),d.$http.interceptors.response.use(c,u),Jn.a};var ro=lo;const so=(e,t={})=>{if(so.installed)return;const a=o()(i,t);e.prototype.$Config=a,ao(e),e.use(sn),e.use(An,a.directives),e.use(qn),e.prototype.$hcHttp=ro(a.axios),e.prototype.$Func=Wt,e.prototype.$Valid=Zn,no(e,a)};"undefined"!==typeof window&&window.Vue&&so(window.Vue);t["a"]={install:so}},7110:function(e,t,a){"use strict";a("f172")},"8bbf":function(t,a){t.exports=e},e3b2:function(e,t,a){"use strict";a("1ee1")},f172:function(e,t,a){}},[["fb15",4,0,2,1]]])}));