ocpview-plus 1.0.14 → 1.0.15
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.
|
@@ -453,7 +453,7 @@ common.initEview = function(ViewUI2) {
|
|
|
453
453
|
common.initAnchor(ViewUI2.Anchor);
|
|
454
454
|
};
|
|
455
455
|
const name = "ocpview-plus";
|
|
456
|
-
const version$2 = "1.0.
|
|
456
|
+
const version$2 = "1.0.14";
|
|
457
457
|
const title = "ocpviewPlus";
|
|
458
458
|
const description = "A high quality Service UI components Library with Vue.js";
|
|
459
459
|
const homepage = "";
|
|
@@ -6907,6 +6907,8 @@ const _sfc_main$1I = {
|
|
|
6907
6907
|
column2.place = "grid";
|
|
6908
6908
|
if (column2.sortable === true) {
|
|
6909
6909
|
column2.sortable = "custom";
|
|
6910
|
+
} else if (column2.sortable === "default") {
|
|
6911
|
+
column2.sortable = true;
|
|
6910
6912
|
}
|
|
6911
6913
|
if (type === "numberbox") {
|
|
6912
6914
|
if (!column2.contentAlign) {
|
package/dist/ocpviewplus.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("view-ui-plus"),require("axios"),require("jquery"),require("js-cookie"),require("js-md5"),require("xlsx"),require("xlsx-style-vite"),require("file-saver"),require("vue"),require("element-resize-detector"),require("pako"),require("viewerjs"),require("pdfobject"),require("echarts-liquidfill"),require("vue-draggable-plus")):"function"==typeof define&&define.amd?define(["exports","view-ui-plus","axios","jquery","js-cookie","js-md5","xlsx","xlsx-style-vite","file-saver","vue","element-resize-detector","pako","viewerjs","pdfobject","echarts-liquidfill","vue-draggable-plus"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ocpviewPlus={},e.ViewUiPlus,e.Axios,e.Jquery,e.JsCookie,e.JsMd5,e.Xlsx,e.XlsxStyleVite,e.FileSaver,e.Vue,e.ElementResizeDetector,e.Pako,e.Viewerjs,e.Pdfobject,e.EchartsLiquidfill,e.VueDraggablePlus)}(this,(function(e,t,n,o,i,r,a,s,l,c,u,d,h,A,f,p){"use strict";function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function m(e){if(e&&e.__esModule)return e;var t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var y=g(t),v=g(n),C=g(o),b=g(i),w=g(r),x=m(a),B=m(s),E=g(u),_=g(d),k=g(h);function S(e,t){for(let n=0;n<t.length;n++)if(e===t[n])return!0;return!1}function D(e){const t=(n=e,{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(n)]);var n;let o;if("array"===t)o=[];else{if("object"!==t)return e;o={}}if("array"===t)for(let i=0;i<e.length;i++)o.push(D(e[i]));else if("object"===t)for(let i in e)o[i]=D(e[i]);return o}let O={};function F(){let e=[],t=[];for(let o in this.objData){const n=this.objData[o];n._isChecked&&e.push(parseInt(o)),n.children&&n.children.length&&(t=t.concat(this.getSelectionChildrenRowKeys(n,t)))}t=[...new Set(t)];let n=[];return this.data.forEach(((o,i)=>{e.indexOf(i)>-1&&(o._customIndex=i,n=n.concat(o)),o.children&&o.children.length&&t.length&&(n=n.concat(this.getSelectionChildren(o,n,t)))})),n=[...new Set(n)],JSON.parse(JSON.stringify(n))}function T(){let e=this.$el.parentNode.offsetWidth,t={},n=0,o=[],i=[],r=[];this.cloneColumns.forEach((e=>{e.width?o.push(e):(i.push(e),e.minWidth&&(n+=e.minWidth),e.maxWidth||r.push(e)),e._width=null}));let a=e-o.map((e=>e.width)).reduce(((e,t)=>e+t),0)-n-(this.showVerticalScrollBar?this.scrollBarWidth:0)-1,s=i.length,l=0;a>0&&s>0&&(l=parseInt(a/s));for(let c=0;c<this.cloneColumns.length;c++){const e=this.cloneColumns[c];let n=l+(e.minWidth?e.minWidth:0);e.width?n=e.width:e._width?n=e._width:(e.minWidth>n?n=e.minWidth:e.maxWidth<n&&(n=e.maxWidth),a>0?(a-=n-(e.minWidth?e.minWidth:0),s--,l=s>0?parseInt(a/s):0):l=0),e._width=n,t[e._index]={width:n}}if(a>0){s=r.length,l=parseInt(a/s);for(let e=0;e<r.length;e++){const n=r[e];let o=n._width+l;s>1?(s--,a-=l,l=parseInt(a/s)):l=0,n._width=o,t[n._index]={width:o}}}this.tableWidth=this.cloneColumns.map((e=>e._width)).reduce(((e,t)=>e+t),0)+(this.showVerticalScrollBar?this.scrollBarWidth:0)+1,this.columnsWidth=t,this.fixedHeader()}function I(e,t){const n=t?this.getDataByRowKey(t):this.objData[e];n&&this.highlightRow&&!n._isHighlight&&this.handleCurrentRow("highlight",e,t)}function N(e){return D(e).map((e=>("children"in e&&(e.children=this.makeColumnsId(e.children)),e.__id=function(e=32){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",n=t.length;let o="";for(let i=0;i<e;i++)o+=t.charAt(Math.floor(Math.random()*n));return o}(6),e)))}function R(){let e=!1;for(let t in this.headRows)for(let n in this.headRows[t]){if("right"===this.headRows[t][n].fixed){e=!0;break}if(e)break}return[{[`${this.prefixCls}-hidden`]:e,"efuture-table-scroll-th":!0}]}function P(e,t=!1){if(this.to){if("_blank"===this.target)return!1;e.preventDefault(),"click"===this.to?this.$emit("click",e):this.handleClick(t)}}function M(){this.itemDisabled||(this.$parent&&this.$parent.onClick?this.$parent.onClick():this.$refs.input&&this.$refs.input.click())}function V(){this.$refs.pickerPanel&&this.$refs.pickerPanel.reset&&this.$refs.pickerPanel.reset()}function U(e){const t=e.keyCode;if(9===t)if(this.visible)if(e.stopPropagation(),e.preventDefault(),this.isConfirm){const t=".ivu-picker-confirm > *",n=this.$refs.drop.$el.querySelectorAll(t);this.internalFocus=!0;[...n][e.shiftKey?"pop":"shift"]().focus()}else this.handleClose();else this.focused=!1;const n=[37,38,39,40];if(this.visible||!n.includes(t)){if(27===t&&this.visible&&(e.stopPropagation(),this.handleClose()),13===t){const e=this.timeSpinnerList.map((e=>e.timeSpinner));if(e.length>0){const t=e[0].showSeconds?3:2,n=Math.floor(this.focusedTime.column/t),o=this.focusedTime.time[n];return void e[n].chooseValue(o)}if(this.type.match(/range/))this.$refs.pickerPanel.handleRangePick(this.focusedDate,"date");else{const e=this.panelTableList.map((e=>e.panelTable)),t=e=>{const t=["year","month","date"].indexOf(this.type)+1;return[e.getFullYear(),e.getMonth(),e.getDate()].slice(0,t).join("-")};e.find((({cells:e})=>e.find((({date:e,disabled:n})=>t(e)===t(this.focusedDate)&&!n))))&&(null===this.modelValue?this.onPick(null,!1,"date"):this.onPick(this.focusedDate,!1,"date"))}}n.includes(t)&&(this.focusedTime.active&&e.preventDefault(),this.navigateDatePanel(keyValueMapper[t],e.shiftKey))}else this.visible=!0}function L(e){this.internalFocus?this.internalFocus=!1:this.visible?e.preventDefault():(this.isFocused=!1,this.onSelectionModeChange(this.type),this.internalValue=this.internalValue.slice(),this.reset(),this.$refs.pickerPanel&&this.$refs.pickerPanel.onToggleVisibility(!1))}const j="undefined"!=typeof window;function $(e,t){const n=t?"scrollTop":"scrollLeft";let o=e[t?"pageYOffset":"pageXOffset"];return j&&"number"!=typeof o&&(o=window.document.documentElement[n]),o}function Q(e){if(this.upperFirstTitle=!!this.titlesOffsetArr[0]&&e.target.scrollTop<this.titlesOffsetArr[0].offset,this.animating)return;const t=this.scrollContainer.scrollTop;this.getCurrentScrollAtTitleId(t)}function H(){if(!j)return;const e=this.affix,t=$(window,!0),n=function(e){if(!j)return;const t=e.getBoundingClientRect(),n=$(window,!0),o=$(window),i=window.document.body,r=i.clientTop||0,a=i.clientLeft||0;return{top:t.top+n-r,left:t.left+o-a}}(this.$el),o=window.innerHeight,i=this.$el.getElementsByTagName("div")[0].offsetHeight;n.top-this.offsetTop<t&&"top"==this.offsetType&&!e?(this.affix=!0,this.slotStyle={width:this.$refs.point.clientWidth+"px",height:this.$refs.point.clientHeight+"px"},this.slot=!0,this.styles={top:`${this.offsetTop}px`},n.left&&(this.styles.left=`${n.left}px`),this.$el.offsetWidth&&(this.styles.width=`${this.$el.offsetWidth}px`),this.$emit("on-change",!0)):n.top-this.offsetTop>t&&"top"==this.offsetType&&e&&(this.slot=!1,this.slotStyle={},this.affix=!1,this.styles=null,this.$emit("on-change",!1)),n.top+this.offsetBottom+i>t+o&&"bottom"==this.offsetType&&!e?(this.affix=!0,this.styles={bottom:`${this.offsetBottom}px`,left:`${n.left}px`,width:`${this.$el.offsetWidth}px`},this.$emit("on-change",!0)):n.top+this.offsetBottom+i<t+o&&"bottom"==this.offsetType&&e&&(this.affix=!1,this.styles=null,this.$emit("on-change",!1))}O.initTable=function(e){e.methods.getSelection=F,e.methods.handleResize=T,e.methods.highlightCurrentRow=I,e.methods.makeColumnsId=N,e.components.tableHead.methods.scrollBarCellClass=R},O.initBreadcrumbItem=function(e){e.mixins[0].methods.handleCheckClick=P},O.initButton=function(e){e.mixins[0].methods.handleCheckClick=P},O.initCard=function(e){e.mixins[0].methods.handleCheckClick=P},O.initCell=function(e){e.mixins[0].methods.handleCheckClick=P},O.initMenuItem=function(e){e.mixins[1].methods.handleCheckClick=P},O.initUpload=function(e){e.methods.handleClick=M},O.initDatePicker=function(e){e.mixins[0].methods.reset=V,e.mixins[0].methods.handleBlur=L,e.mixins[0].methods.handleKeydown=U},O.initAffix=function(e){e.methods.handleScroll=H},O.initAnchor=function(e){e.methods.handleScroll=Q},O.initEview=function(e){O.initTable(e.Table),O.initBreadcrumbItem(e.BreadcrumbItem),O.initButton(e.Button),O.initCard(e.Card),O.initCell(e.Cell),O.initMenuItem(e.MenuItem),O.initUpload(e.Upload),O.initDatePicker(e.DatePicker),O.initAffix(e.Affix),O.initAnchor(e.Anchor)};var z="1.0.13";let K={},G={};function q(e,t,n){let o=K.getToken(),i=K.getEnt_id(),r=t;r||(r={});let a=e.OmdUrl.portalkey;if(K.getUrlParam("portalkey")||(a=K.getUrlParam("portalkey")),"cloud"===K.getUrlParam("srvkey")&&(a="cloud"),"1"===n){let t="";if(o&&""!==o.trim()){if(t=t+"&ent_id="+i+"&token="+o+"×tamp="+(new Date).getTime()+"&format="+e.OmdUrl.format+"&app_key="+e.OmdUrl.appKey+"&portalkey="+a+"&ver="+e.OmdUrl.ver,0!==e.OmdUrl.signMethod.trim().length&&0!=e.OmdUrl.secret.trim().length){t=t+"&sign_method="+e.OmdUrl.signMethod+"&sign=";let n=e.OmdUrl.appKey+"="+e.OmdUrl.secret+"&body="+JSON.stringify(r).toString()+"&token="+o;void 0!==e.OmdUrl.getMd5&&(n=e.OmdUrl.getMd5(r,o)),t+=w.default(n)}}else{let n={ent_id:i,user_id:e.OmdUrl.uid,user_code:e.OmdUrl.uid,user_name:e.OmdUrl.uname};t=t+"&session="+JSON.stringify(n)}return t}{let t={};if(o&&""!==o.trim()){t.ent_id=i,t.token=o,t.timestamp=(new Date).getTime(),t.format=e.OmdUrl.format,t.app_key=e.OmdUrl.appKey,t.ver=e.OmdUrl.ver,t.portalkey=a,t.sign_method=e.OmdUrl.signMethod;let n=e.OmdUrl.appKey+"="+e.OmdUrl.secret+"&body="+JSON.stringify(r).toString()+"&token="+o;void 0!==e.OmdUrl.getMd5&&(n=e.OmdUrl.getMd5(r,o)),t.sign=w.default(n)}else{let n={ent_id:i,user_id:e.OmdUrl.uid,user_code:e.OmdUrl.uid,user_name:e.OmdUrl.uname};t.session=JSON.stringify(n)}return t}}function W(e,t,n,o,i){let r=null;try{if(r="string"==typeof e?JSON.parse(e):e,0===parseInt(r.returncode)){try{t&&t(r.data)}catch(dV){i.$Spin&&i.$Spin.hide(),i.$nextTick((()=>{setTimeout((()=>{i.alert(dV,null,2)}),1e3)}))}return}if(parseInt(r.returncode)>0){if(n){try{n(r.data)}catch(dV){i.$Spin&&i.$Spin.hide(),i.$nextTick((()=>{setTimeout((()=>{i.alert(dV,null,2)}),1e3)}))}return}throw r.data}if(o){try{o(r.data)}catch(dV){i.$Spin&&i.$Spin.hide(),i.$nextTick((()=>{setTimeout((()=>{i.alert(dV,null,2)}),1e3)}))}return}throw r.data}catch(dV){i.$Spin&&i.$Spin.hide(),i.$nextTick((()=>{setTimeout((()=>{"string"==typeof e?i.alert(dV+"<br/>"+e,null,2):i.alert(dV,null,2)}),1e3)}))}}function X(e,t,n,o){let i="";i=t?"method="+t:"method=",i+=q(o,n,"1"),i=e&&-1!=e.indexOf("?")?e+"&"+i:e+"?"+i;let r=K.getUrlParam("menuCode");return r&&(i=i+"&menuCode="+r),encodeURI(i)}function Y(e){if(!e)return"";try{let t=JSON.parse(e);return t=t.state,t?t.split(":")[1]:e}catch(dV){return e}}G.eid="0",G.uid="0",G.uname="future",G.format="json",G.appKey="mall",G.portalkey="congou",G.checktoken="Y",G.ver="1.0",G.signMethod="MD5",G.secret="",G.omp="/mall-work-webin/rest",G.mall="/mall-work-webin/rest",G.mss="/mall-work-webin/rest",G.portal="/mall-portal-rest/portalesb/ocmrest",G.mdm="/ocm-mdm-webin/rest",G.omc="/omc-tags-webin/rest",G.member="/omc-membership-webin/rest",G.accnt="/omc-accnt-webin/rest",G.work="/omc-work-webin/rest",G.investment="/mall-investment-webin/rest",G.uploadfile="/mss-sysconf-boot/upload",G.delfile="/mss-sysconf-boot/delete?filekey=",G.downfile="/mss-sysconf-boot/download?filekey=",G.getfile="/mss-sysconf-boot/filedata?",G.amp="/ampOpenapiService/",G.uidespath=G.amp,G.helpUrl="docs.sjhgo.com",G.mallmdm="/mall-mdm-webin/rest",G.mallmaster="/mall-master-webin/rest",G.portal=G.mallmdm,G.uiConfigExpire=24,G.fairyConfigExpire=24,G.dictExpire=24,G.operbilllog="/mss-sysconf-query/rest",G.getCurHelpUrl=function(e){var t="";if("Y"===e.OmdUrl.startHelp&&e.OmdUrl.helpType){var n=e.$Method.getUrlParam("helpindex"),o=e.$Method.getLocalStorage("modulecodeHelp_"+e.OmdUrl.helpType+"_"+n);if(o)return o;if(n){var i=e.OmdUrl.helpUrl;if(i||e.getHelpdocumenturl&&(i=e.getHelpdocumenturl()),i){let o=e.getHelpId(e.OmdUrl.helpType,n);t=o?"http://"+i+"/web/#/p/"+o:"http://"+i+"/web/#/"+e.OmdUrl.helpType+"?page_id="+n}e.$Method.setLocalStorage("modulecodeHelp_"+e.OmdUrl.helpType+"_"+n,t,e.OmdUrl.uiConfigExpire)}}return t},K.OmdUrl=G,K.alert=function(e,n,o){o||(o="1"),e&&"string"==typeof e&&(e='<xmp style="margin: 0;white-space:break-spaces;">'+(e=(e=e.replace(new RegExp("</xmp>","gi"),"</txmp>")).replace(new RegExp("<xmp","gi"),"<txmp"))+"</xmp>"),"2"===(o+="")?t.Modal.error({title:"系统警告",content:'<div style="word-wrap:break-word">'+e+"</div>"}):"3"===o?(n||(n="成功"),t.Modal.success({title:n,content:'<div style="word-wrap:break-word">'+e+"</div>"})):(n||(n="提醒"),t.Modal.warning({title:n,content:'<div style="word-wrap:break-word">'+e+"</div>"}))},K.asyncPost=function(e,t,n,o,i,r,a){let s=this;e.startsWith("/")||(e="/"+e),function(e,t,n,o,i){let r={};t&&(r.method=t);let a=q(o,n,"2");for(let l in a)r[l]=a[l];n||(n={});let s=K.getUrlParam("menuCode");return s&&(r.menuCode=s),new Promise("get"===i?(t,o)=>{v.default.get(e,n,{params:r}).then((e=>{t(e.data)}),(e=>{o(e)})).catch((e=>{o(e)}))}:(t,o)=>{v.default.post(e,n,{params:r}).then((e=>{t(e.data)}),(e=>{o(e)})).catch((e=>{o(e)}))})}(e,t,n,s,a).then((function(e){return W(e,o,i,null,s)}),(function(e){i?i(e):(s.$Spin&&s.$Spin.hide(),s.$nextTick((()=>{setTimeout((()=>{s.alert(e.message+"<br/>"+e.response.data,null,"2")}),1e3)})))})).catch((e=>{if(!r){s.$Spin&&s.$Spin.hide();let t=JSON.stringify(e);return s.$nextTick((()=>{setTimeout((()=>{s.alert(t,null,"2")}),1e3)})),!1}r(e)}))},K.getResturl=X,K.synchroPost=function(e,t,n,o,i,r,a){let s=this,l="POST";a&&(l=a);let c=X(e,t,n,s);c.startsWith("/")||(c="/"+c),C.default.ajaxSetup({cache:!1});let u={type:l,contentType:"text/plain; charset=UTF-8",async:!1,dataType:"JSON",processData:!1,success:function(e){return W(e,o,i,r,s)},error:function(e,t,n){s.$Spin&&s.$Spin.hide();try{let e=JSON.stringify(n);s.alert(e,null,"2")}catch(dV){setTimeout((()=>{s.alert(n,null,"2")}),1e3)}return!1}};n||(n={}),"POST"===l?u.data=JSON.stringify(n):delete u.data,C.default.ajax(c,u)},K.getOmdUrlConfig=function(e){C.default.ajax({url:"/amp-glod/config.json",type:"GET",dataType:"json",success:function(t){let n=t,o={};if(n)for(let e in n)n[e]instanceof Array?n[e].forEach((e=>{o[e.name]=e.value})):o[e]=n[e];e.config.globalProperties.OmdUrl=Object.assign({},e.config.globalProperties.OmdUrl,o)}})},K.getPortalConfig=function(e){C.default.ajax({url:"/ampOpenapiService?method=usercenter.portal.getConfig",type:"POST",data:{},dataType:"json",success:function(t){if(0==t.returncode&&t.data){if(t.data.OmdUrl){let n=JSON.parse(t.data.OmdUrl);e.config.globalProperties.OmdUrl=Object.assign({},e.config.globalProperties.OmdUrl,n)}e.config.globalProperties.portalConfig=t.data}}})},K.getUserCode=function(e){let t=null;t=e||this;let n=K.getToken(e),o="",i="";return o=t.portalkey,i=t.OmdUrl.uid,n&&("congou"==o?i=Y(b.default.get("user_code")):b.default.get("user_code")&&(i=b.default.get("user_code"))),i},K.getUserName=function(e){let t=null;t=e||this;let n=K.getToken(e),o="",i="";return o=t.portalkey,i="["+t.OmdUrl.uid+"]"+t.OmdUrl.uname,n&&("congou"==o?i="["+Y(b.default.get("user_code"))+"]"+Y(b.default.get("user_name")):b.default.get("user_code")&&(i="["+b.default.get("user_code")+"]"+b.default.get("user_name"))),i},K.getPortalMkt=function(){let e={};return e.shopId=b.default.get("shopId"),e.shopCode=b.default.get("shopCode"),e.shopName=b.default.get("shopName"),e},K.getSession=function(){let e={},t=K.getUserName(),n=K.getUserCode(),o=b.default.get("user_id"),i=K.getEnt_id(),r=K.getToken();return e.user_name=t||"",e.user_code=n||"",e.user_id=o||"",e.ent_id=i||"",e.token=r||"",JSON.stringify(e)},K.getUrlParam=function(e){let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.href.split("?"),o="";return n.length>1&&(o=n[1].match(t)),o||n.length>2&&(o=n[2].match(t)),o?decodeURI(o[2]):""},K.initGlobal=function(e,t,n){let o={};e.config.globalProperties.OmdUrl||(e.config.globalProperties.OmdUrl={}),t&&(o=Object.assign({},e.config.globalProperties.OmdUrl,t));let i=K.getUrlParam("portalkey");i&&(o.portalkey=i),o.eid=K.getEnt_id(e.config.globalProperties),o.modulecode=K.getUrlParam("modulecode"),o.modulecode||(o.modulecode=K.getUrlParam("billmoduleid")),o.helpindex=K.getUrlParam("helpindex"),o.billmoduleid=e.config.globalProperties.modulecode,o.openbillno=K.getUrlParam("billno"),o.opentaskid=K.getUrlParam("taskid"),o.nocheck=K.getUrlParam("nocheck")?K.getUrlParam("nocheck"):"N",e.config.globalProperties.OmdUrl=Object.assign({},e.config.globalProperties.OmdUrl,o),K.getPortalConfig(e)},K.getUserModuleMethod=function(e){let t=null,n=K.getToken();if(!n)return t;let o="";if(e)o=e;else if(o=K.getUrlParam("modulecode"),!o)return t;let i="/mall-portal-rest/portalesb/ocmrest";this.OmdUrl&&this.OmdUrl.portal&&(i=this.OmdUrl.portal),"cloud"===K.getUrlParam("srvkey")&&(i=this.OmdUrl.mdm);let r={};return r.token=n,r.modulecode=o,this.synchroPost(i,"runtime.modulesrivce.getUserModuleMethod",r,(function(e){t=e}),null),t},K.checkModuleByToken=function(){let e=!1,t=K.getToken();if(!t)return e;let n=K.getUrlParam("modulecode");if(!n)return e;if(!location.pathname)return e;if("congou"!=this.portalkey)return e;let o="/mall-portal-rest/portalesb/ocmrest";this.OmdUrl.portal&&(o=this.OmdUrl.portal);let i={token:t,modulecode:n,execmodule:location.pathname};"cloud"===K.getUrlParam("srvkey")&&(o=this.OmdUrl.mdm);return this.synchroPost(o,"runtime.modulesrivce.checkmodulebytoken",i,(function(t){"-1"===t.flag&&(e=!0)}),null),e},K.getDict=function(e,t){let n="code,name";t&&(n=t);let o={},i={fields:n,dict_group_code:e};return this.synchroPost(this.OmdUrl.omp,"omp.work.dict.getbydictgroupcode",i,(function(e){o=e}),null),o},K.setQueryConfig=function(e){Object.assign(this.query.Config,e)},K.getQueryConfig=function(e){let t=null;return t=this.query.Config[e]?JSON.parse(JSON.stringify(this.query.Config[e])):{},void 0===t.width&&(t.isTree?t.width=.3:t.width=.4),void 0===t.height&&(t.height=.6),void 0===t.responseId&&(t.responseId=t.responseCode),void 0===t.manualLoad&&(t.manualLoad=!0),void 0===t.multiSelect&&(t.multiSelect=!1),void 0===t.showCondition&&(t.showCondition=!0),t.isConfig?t:this.query.customQueryConfig?this.query.customQueryConfig(t):t},K.getBillmoduleid=function(e){let t="",n={billtype:e,order_field:"modeid"};return this.synchroPost(this.OmdUrl.mall,"mss.base.billmain.search",n,(function(e){e&&e.billmain&&e.billmain.length>0&&(t=e.billmain[0].modeid)}),null),t},K.getBilltype=function(e){let t="",n={modeid:e};return this.synchroPost(this.OmdUrl.mall,"mss.base.billmain.search",n,(function(e){e&&e.billmain&&e.billmain.length>0&&(t=e.billmain[0].billtype)}),null),t},K.getHelpdocumenturl=function(){let e="";return this.synchroPost(this.OmdUrl.mall,"mss.work.report.query",{queryid:"select_fgetmanapara",mpmkt:"00",mpcode:"HELPDOCUMENTURL"},(function(t){t&&t.report&&t.report.length>0&&(e=t.report[0].mpvalue)}),null),e},K.getHelpId=function(e,t){let n="",o={};return o.helpType=e,o.helpIndex=t,this.synchroPost(this.OmdUrl.amp,"usercenter.helpconfig.getHelpId",o,(function(e){e&&e.helpId&&(n=e.helpId)}),(function(e){n=""}),(function(e){n=""})),n},K.getConditionValue=function(e,t,n,o){let i={};if("=="===n)if("DateBox"===o.type){i[e]={};let n={};n[">="]=t,"month"===o.vtype?n["<"]=this.$Method.getNextMonthFirstDay(t):n["<"]=this.$Method.getTomorrow(t),i[e]=n}else if("inputer"===e||"auditor"===e||"canceler"===e){let n={};n[e]={"==":t};let o={};o[e+"_name"]={LIKE:"[%]"+t},i.$or=[],i.$or.push(n),i.$or.push(o)}else i[e]={},void 0!==t.value?i[e][n]=t.value:i[e][n]=t;return"LIKE"===n&&(i[e]={},i[e][n]="%"+t+"%"),"LIKE"!==n&&"=="!==n&&(i[e]={},i[e][n]=t),i},K.getHelpUrl=function(){let e="";if(this.helpindex){let t="";t=this.OmdUrl.helpUrl?this.OmdUrl.helpUrl:this.getHelpdocumenturl(),t&&(e="http://"+t+"/web/#/"+this.OmdUrl.helpType+"?page_id="+this.helpindex)}return e},K.getEnt_id=function(e){let t="",n="";if(e?(t=e.OmdUrl.eid,n=e.OmdUrl.portalkey):(t=this.OmdUrl.eid,n=this.OmdUrl.portalkey),void 0!==b.default.get("ent_id")&&""!==b.default.get("ent_id"))t=b.default.get("ent_id");else{let e=K.getUrlParam("ent_id");void 0!==e&&""!==e&&(t=e)}if("cloud"===n){let e=K.getUrlParam("lock_entid");void 0!==e&&""!==e&&(t=e)}return t},K.getToken=function(e){let t="";if(e?e.token&&(t=e.token):this.token&&(t=this.token),b.default.get("token"))t=b.default.get("token");else{let e=K.getUrlParam("token");e&&(t=e)}return t},K.getModulecode=function(){let e="";return e=K.getUrlParam("modulecode"),e||(e=K.getUrlParam("billmoduleid")),e},K.downloadFile=function(e,t){if(!e)return;let n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(){if(200===this.status){let e=this.response,n=new FileReader,o=decodeURI(this.getResponseHeader("content-disposition")).replace("attachment;filename*=UTF-8''","");o=o.replace("attachment;filename=",""),n.readAsDataURL(e),o=decodeURIComponent(o),o=o.replace(/\ +/g,""),o=o.replace(/[\r\n]/g,""),n.onload=function(){let n=document.createElement("a");n.download=o,n.href=URL.createObjectURL(e),C.default("body").append(n),t.$Spin.hide(),n.click(),C.default(n).remove()}}else t.$Spin.hide(),t.alert("导出失败")},n.send(new Blob)},K.exportExcelback=function(e){e.child?setTimeout(e.exportExcelback(e),100):e.$Spin.hide()},K.doExportExcel=function(e,t,n,o,i){let r=e;n||(n={}),r=X(r,t,n,i);let a=JSON.stringify(n);a=a.replaceAll("#","%23"),a=a.replaceAll("&","%26"),a=a.replaceAll("+","%2B"),r=encodeURI(r+"¶m="+a);let s=b.default.get("user_id"),l=b.default.get("user_code");if(s&&(r+=encodeURI("&user_id="+s)),l&&(r+=encodeURI("&user_code="+l)),i.$Spin.show({render:e=>e("div","导出中...,请勿关闭!")}),o||(o="2"),"2"===o)K.downloadFile(r,i);else{const e=window.open(r,"_blank");var c=setInterval((function(){e.closed&&(i.$Spin.hide(),clearInterval(c))}),100)}},K.doExportReport=function(e,t,n,o){let i=e;n||(n={}),i=X(i,t,n,o);let r=JSON.stringify(n);r=r.replaceAll("#","%23"),r=r.replaceAll("&","%26"),r=r.replaceAll("+","%2B"),i=encodeURI(i+"¶m="+r),o.$Spin.show({render:e=>e("div","导出中...,请勿关闭!")}),K.downloadFile(i,o)},K.getFilesInfo=function(e,t,n,o,i){let r=K.getUserCode(),a=K.getUserName(),s=K.getToken(),l=G.getfile+"billno="+e+"&billmoduleid="+t+"&scenetype="+o,c="&usercode="+r+"&username="+a+"&token="+s;c+="Y"!==n?"¬delfile=N":"¬delfile=Y",c=encodeURI(c),K.synchroPost(l,"",{},(e=>{let t=[];e&&e.length>0&&e.forEach((e=>{let n=Object.assign({},{},e);n.filename=e.filename,n.filekey=e.filekey,n.downUrl=G.downfile+n.filekey+c,n.delUrl=G.delfile+n.filekey+c,n.title=n.filename,n.url=n.downUrl,n.modflag=e.modflag,t.push(n)})),i(t)}),null,null,"get")},K.getFilesInfoByIdkey=function(e,t){let n=K.getUserCode(),o=K.getUserName(),i=K.getToken(),r=G.getfile+"idkey="+e,a="&usercode="+n+"&username="+o+"&token="+i;a=encodeURI(a),K.synchroPost(r,"",{},(e=>{let n=[];e&&e.length>0&&e.forEach((e=>{let t=Object.assign({},{},e);t.filename=e.filename,t.filekey=e.filekey,t.downUrl=G.downfile+t.filekey+a,t.delUrl=G.delfile+t.filekey+a,t.title=t.filename,t.url=t.downUrl,t.modflag=e.modflag,n.push(t)})),t(n)}),null,null,"get")},K.getFileInfo=function(e,t){let n=K.getUserCode(),o=K.getUserName(),i=K.getToken(),r=G.getfile+"filekey="+e,a="&usercode="+n+"&username="+o+"&token="+i;a=encodeURI(a),K.synchroPost(r,"",{},(e=>{let n=[];e&&e.length>0&&e.forEach((e=>{let t=Object.assign({},{},e);t.filename=e.filename,t.filekey=e.filekey,t.downUrl=G.downfile+t.filekey+a,t.delUrl=G.delfile+t.filekey+a,t.title=t.filename,t.url=t.downUrl,t.modflag=e.modflag,n.push(t)})),t(n)}),null,null,"get")},K.setUrlSuffix=function(e,t){let n=K.getUrlParam("srvkey"),o=K.getUrlParam("token"),i=K.getUrlParam("usercode"),r=K.getUrlParam("portalkey");return e?-1!=e.indexOf("?")?e+"&token="+o+"&srvkey="+n+"&app_key="+t.OmdUrl.appKey+"&secret="+t.OmdUrl.secret+"&portalkey="+r+"&usercode="+i:e+"?token="+o+"&srvkey="+n+"&app_key="+t.OmdUrl.appKey+"&secret="+t.OmdUrl.secret+"&portalkey="+r+"&usercode="+i:e};var J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Z="undefined"==typeof window,ee={version:"1.1.1",storage:Z?null:window.localStorage,session:{storage:Z?null:window.sessionStorage}},te={set:function(e,t){if(!this.disabled)return void 0===t?this.remove(e):(this.storage.setItem(e,function(e){return JSON.stringify(e)}(t)),t)},get:function(e,t){if(this.disabled)return t;var n=function(e){if("string"!=typeof e)return;try{return JSON.parse(e)}catch(dV){return e||void 0}}(this.storage.getItem(e));return void 0===n?t:n},has:function(e){return void 0!==this.get(e)},remove:function(e){this.disabled||this.storage.removeItem(e)},clear:function(){this.disabled||this.storage.clear()},getAll:function(){if(this.disabled)return null;var e={};return this.forEach((function(t,n){e[t]=n})),e},forEach:function(e){if(!this.disabled)for(var t=0;t<this.storage.length;t++){var n=this.storage.key(t);e(n,this.get(n))}}};J(ee,te),J(ee.session,te);try{var ne="__storejs__";ee.set(ne,ne),ee.get(ne)!==ne&&(ee.disabled=!0),ee.remove(ne)}catch(dV){ee.disabled=!0}function oe(e,t){return t&&(e+=1462),(Date.parse(e)-new Date(Date.UTC(1899,11,30)))/864e5}function ie(e,t){for(var n={},o={s:{c:1e7,r:1e7},e:{c:0,r:0}},i=0;i!=e.length;++i)for(var r=0;r!=e[i].length;++r){o.s.r>i&&(o.s.r=i),o.s.c>r&&(o.s.c=r),o.e.r<i&&(o.e.r=i),o.e.c<r&&(o.e.c=r);var a={v:e[i][r]};if(null!=a.v){var s=x.utils.encode_cell({c:r,r:i});"number"==typeof a.v?a.t="n":"boolean"==typeof a.v?a.t="b":a.v instanceof Date?(a.t="n",a.z=x.SSF._table[14],a.v=oe(a.v)):a.t="s",n[s]=a}}return o.s.c<1e7&&(n["!ref"]=x.utils.encode_range(o)),n}function re(){if(!(this instanceof re))return new re;this.SheetNames=[],this.Sheets={}}function ae(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),o=0;o!=e.length;++o)n[o]=255&e.charCodeAt(o);return t}function se(e,t){return t.map((t=>e.map((e=>t[e]))))}function le(e,t,n,o,i){if(!(e instanceof Array)){if(!1!==e.visible){let r={};r.label=e.label,r.num=1;let a=0,s=t[n].length;if(e.children&&e.children.length>0)e.children.forEach((e=>{let i=le(e,t,n+1,o,s);a+=i})),r.num=a;else if(e.name){r.name=e.name;let t=100;e.width?e.width>100&&(t=e.width):e.maxWidth?e.maxWidth>100&&(t=e.maxWidth):e.minWidth&&e.minWidth>100&&(t=e.minWidth),r.width=t,r.excelPro=function(e){let t={alignment:{vertical:"center",wrapText:!0}};if("NumberBox"===e.type){if(t.alignment.horizontal="right",e.format&&e.format.length>1){let n=e.format[0],o=e.format[1],i="0";"n"===n||"p"===n?i="0":"c"===n&&(i="¥#,##0");let r="";if(Number(o)>0)for(let e=0;e<Number(o);e++)r+="0";r&&(i=i+"."+r),"p"===n&&(i+="%"),t.numFmt=i}t.t="n"}else if("DataBox"===e.type){t.alignment.horizontal="center";let n="yyyy年m月d日";"datetime"===e.vtype&&(n="yyyy年m月d日 h:mm:ss"),t.numFmt=n,t.t="d"}else t.alignment.horizontal="left",t.numFmt="@",t.t="s";return t}(e),o.push(r)}return(i||0===i)&&0!==n&&(r.fIndex=i),t[n].push(r),r.num}return 0}e.forEach((e=>{le(e,t,n,o,i)}))}!function(e){if(e.URL=e.URL||e.webkitURL,e.Blob&&e.URL)try{return void new Blob}catch(dV){}var t=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||function(e){var t=function(e){return Object.prototype.toString.call(e).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},o=function(e,t,n){this.data=e,this.size=e.length,this.type=t,this.encoding=n},i=n.prototype,r=o.prototype,a=e.FileReaderSync,s=function(e){this.code=this[this.name=e]},l="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),c=l.length,u=e.URL||e.webkitURL||e,d=u.createObjectURL,h=u.revokeObjectURL,A=u,f=e.btoa,p=e.atob,g=e.ArrayBuffer,m=e.Uint8Array;for(o.fake=r.fake=!0;c--;)s.prototype[l[c]]=c+1;return u.createObjectURL||(A=e.URL={}),A.createObjectURL=function(e){var t,n=e.type;return null===n&&(n="application/octet-stream"),e instanceof o?(t="data:"+n,"base64"===e.encoding?t+";base64,"+e.data:"URI"===e.encoding?t+","+decodeURIComponent(e.data):f?t+";base64,"+f(e.data):t+","+encodeURIComponent(e.data)):d?d.call(u,e):void 0},A.revokeObjectURL=function(e){"data:"!==e.substring(0,5)&&h&&h.call(u,e)},i.append=function(e){var n=this.data;if(m&&(e instanceof g||e instanceof m)){for(var i="",r=new m(e),l=0,c=r.length;l<c;l++)i+=String.fromCharCode(r[l]);n.push(i)}else if("Blob"===t(e)||"File"===t(e)){if(!a)throw new s("NOT_READABLE_ERR");var u=new a;n.push(u.readAsBinaryString(e))}else e instanceof o?"base64"===e.encoding&&p?n.push(p(e.data)):"URI"===e.encoding?n.push(decodeURIComponent(e.data)):"raw"===e.encoding&&n.push(e.data):("string"!=typeof e&&(e+=""),n.push(unescape(encodeURIComponent(e))))},i.getBlob=function(e){return arguments.length||(e=null),new o(this.data.join(""),e,"raw")},i.toString=function(){return"[object BlobBuilder]"},r.slice=function(e,t,n){var i=arguments.length;return i<3&&(n=null),new o(this.data.slice(e,i>1?t:this.data.length),n,this.encoding)},r.toString=function(){return"[object Blob]"},r.close=function(){this.size=this.data.length=0},n}(e);e.Blob=function(e,n){var o=n&&n.type||"",i=new t;if(e)for(var r=0,a=e.length;r<a;r++)i.append(e[r]);return i.getBlob(o)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||globalThis.content||globalThis);const ce="postMessage"in window;class ue{constructor(e,t,n){let o="";if(arguments.length<2?o="target error - target and name are both required":"object"!=typeof e?o="target error - target itself must be window object":"string"!=typeof t&&(o="target error - target name must be string type"),o)throw new Error(o);this.target=e,this.name=t,this.prefix=n}send(e){if(ce)this.target.postMessage(`${this.prefix}|${this.name}__Messenger__${e}`,"*");else{const t=window.navigator[this.prefix+this.name];if("function"!=typeof t)throw new Error("target callback function is not defined");t(this.prefix+e,window)}}}class de{constructor(e,t){this.targets={},this.name=e,this.listenFunc=[],this.prefix=t,this.initListen()}addTarget(e,t){const n=new ue(e,t,this.prefix);this.targets[t]=n}listen(e){let t=0;const n=this.listenFunc.length;let o=!1;for(;t<n;t++){if(this.listenFunc[t].toString()===e.toString()){this.listenFunc[t]=e,o=!0;break}}o||this.listenFunc.push(e)}clear(){this.listenFunc=[]}send(e){const{targets:t}=this;let n;for(n in t)t.hasOwnProperty(n)&&t[n].send(e)}initListen(){const e=this,t=function(t){if("object"==typeof t&&t.data&&(t=t.data),"string"==typeof t){const n=t.split("__Messenger__");t=n[1];const o=n[0].split("|"),i=o[0],r=o[1];for(let a=0;a<e.listenFunc.length;a++)i+r===e.prefix+e.name&&e.listenFunc[a](t)}};ce?"addEventListener"in document?window.addEventListener("message",t,!1):"attachEvent"in document&&window.attachEvent("onmessage",t):window.navigator[this.prefix+this.name]=t}}window.EfuMessenger=new class{constructor(e,t,n){this.messengerOBJ=null,this.messageName=t||"AMPclient",this.targetName=e||"AMPframe",this.projectName=n||"AMP",this.init()}init(){this.messengerOBJ=new de(this.messageName,this.projectName),this.messengerOBJ.addTarget(window.parent,this.targetName)}openPortalTabPage(e){this.messengerOBJ.targets[this.targetName].send(JSON.stringify({name:this.messageName,action:"openPortalTabPage",params:{...e}}))}openPortalTabByModuleCode(e){this.messengerOBJ.targets[this.targetName].send(JSON.stringify({name:this.messageName,action:"openPortalTabByModuleCode",params:{...e}}))}};let he={};function Ae(e){let t=[];for(let n=0;n<e;n++){let e=[Math.random(),Math.random(),Math.random()];n>0&&Math.abs(e[0]-t[n-1][0])<.25?n--:(e[1]=.7+.2*e[1],e[2]=.4+.4*e[2],e=e.map((function(e){return parseFloat(e.toFixed(2))})),t.push(e))}return function(e){for(let t=0;t<e.length;t++){let n,o,i,r=e[t][0],a=e[t][1],s=e[t][2];if(0==+a)n=o=i=s;else{let e=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},t=s<.5?s*(1+a):s+a-s*a,l=2*s-t;n=e(l,t,r+1/3),o=e(l,t,r),i=e(l,t,r-1/3)}e[t][0]=Math.round(255*n),e[t][1]=Math.round(255*o),e[t][2]=Math.round(255*i)}}(t),function(e){let t=[],n="";for(let o=0;o<e.length;o++){let i=e[o];n="#";for(let e=0;e<i.length;e++){let t=Number(i[e]).toString(16);"0"===t&&(t+=t),n+=t}t.push(n)}return t}(t)}he.padLeftZero=function(e,t){return(e+t).substr(t.length)},he.formatDate=function(e,t){/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));let n={"M+":e.getMonth()+1,"d+":e.getDate(),"H+":e.getHours(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(let o in n)if(new RegExp(`(${o})`).test(t)){let e=n[o]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?e:he.padLeftZero("00",e))}return t},he.getToday=function(){let e=new Date,t=Number(e.getMonth())+1;return e.getFullYear()+"-"+he.padLeftZero("00",t+"")+"-"+he.padLeftZero("00",e.getDate()+"")},he.getTomorrow=function(e){let t;t=e?new Date(e):new Date,t.setDate(t.getDate()+1);let n=Number(t.getMonth())+1;return t.getFullYear()+"-"+he.padLeftZero("00",n+"")+"-"+he.padLeftZero("00",t.getDate()+"")},he.getWeekFirstDay=function(){let e=new Date,t=new Date(e-864e5*(e.getDay()-1)),n=Number(t.getMonth())+1;return t.getFullYear()+"-"+he.padLeftZero("00",n+"")+"-"+he.padLeftZero("00",t.getDate()+"")},he.getWeekLastDay=function(){let e=new Date,t=new Date(e-864e5*(e.getDay()-1)),n=new Date(1e3*(t/1e3+518400)),o=Number(n.getMonth())+1;return n.getFullYear()+"-"+he.padLeftZero("00",o+"")+"-"+he.padLeftZero("00",n.getDate()+"")},he.getMonthFirstDay=function(){let e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1),n=Number(t.getMonth())+1;return t.getFullYear()+"-"+he.padLeftZero("00",n+"")+"-"+he.padLeftZero("00",t.getDate()+"")},he.getMonthLastDay=function(e){let t;t=e?new Date(e):new Date;let n=new Date(t.getFullYear(),t.getMonth()+1,1),o=new Date(n-864e5),i=Number(o.getMonth())+1;return o.getFullYear()+"-"+he.padLeftZero("00",i+"")+"-"+he.padLeftZero("00",o.getDate()+"")},he.getNextMonthFirstDay=function(e){let t;t=e?new Date(e):new Date;let n=new Date(t.getFullYear(),t.getMonth()+1,1),o=Number(n.getMonth())+1;return n.getFullYear()+"-"+he.padLeftZero("00",o+"")+"-"+he.padLeftZero("00",n.getDate()+"")},he.getPreMonthFirstDay=function(e){let t;t=e?new Date(e):new Date;let n=new Date(t.getFullYear(),t.getMonth()-1,1),o=Number(n.getMonth())+1;return n.getFullYear()+"-"+he.padLeftZero("00",o+"")+"-"+he.padLeftZero("00",n.getDate()+"")},he.getYearFirstDay=function(){return(new Date).getFullYear()+"-01-01"},he.getYearLastDay=function(){return(new Date).getFullYear()+"-12-31"},he.getWeek=function(e){return new Date(e).getDay()},he.copy=D,he.getUrlParam=function(e){let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.href.split("?"),o="";return n.length>1&&(o=n[1].match(t)),o||n.length>2&&(o=n[2].match(t)),o?decodeURI(o[2]):""},he.formatNumber=function(e,t,n){let o=0;e?isNaN(e)||(e+=""):e="0",t?2===t.length&&Number(t[1])&&(o=Number(t[1])):t="n";let i=Number(e).toFixed(o);t.startsWith("p")&&(i=(100*Number(e)).toFixed(o));let r=i.split("."),a="",s="";if(r.length>0&&(a=r[0]),t.startsWith("c")&&(a=a.replace(/(\d)(?=(?:\d{3})+$)/g,"$1,")),r.length>1&&(s=r[1]),s){let e=s;if(n)for(let t=s.length-1;t>=0&&0===Number(s[t]);t--)e=e.slice(0,-1);s=e}let l="";return l=s?a+"."+s:a,t.startsWith("p")&&(l+="%"),l},he.precisionNumber=function(e,t){let n=0;return e?isNaN(e)||(e+=""):e="0",t?2===t.length&&(Number(t[1])&&(n=Number(t[1])),t.startsWith("p")&&(n+=2)):t="n",Number(e).toFixed(n)},he.getColorList=function(e,t){let n=Number(t)-e.length;if(0===n)return e;let o=Ae(n),i=!1;for(;;){i=!1;for(let t=0;t<o.length;t++)for(let n=0;n<e.length;n++)if(o[t]===e[n]){i=!0;break}if(!i){o=e.concat(o);break}o=Ae(n)}return o},he.getColor=function(){return Ae(1)[0]},he.getGlobalColor=function(e,t,n,o){let i=[];if(e>0){let r=o.$Store.state.app.mychartColor[n];e>r.length?t?(i=o.$Method.getColorList(r,e),o.$nextTick((()=>{o.$Store.commit("setMychartColor",n,i)}))):i=r.concat(r.slice(0,e-r.length)):i=r.slice(0,e)}return i},he.getHeight=function(e){return e.$Store.state.app.clientHeight},he.getWidth=function(e){return e.$Store.state.app.clientWidth},he.getXDpi=function(){let e=0;if(window.screen.deviceXDPI)e=window.screen.deviceXDPI;else{let t=document.createElement("DIV");t.style.cssText="width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden",document.body.appendChild(t),e=parseInt(t.offsetWidth),document.body.removeChild(t)}return e},he.getYDpi=function(){let e=0;if(window.screen.deviceXDPI)e=window.screen.deviceYDPI;else{let t=document.createElement("DIV");t.style.cssText="width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden",document.body.appendChild(t),e=parseInt(t.offsetHeight),document.body.removeChild(t)}return e},he.mmToYpixe=function(e,t){let n=t;return n||(n=he.getYDpi()),Number((e/25.4*n).toFixed(2))},he.mmToXpixe=function(e,t){let n=t;return n||(n=he.getXDpi()),Number((e/25.4*n).toFixed(2))},he.xPixelToMm=function(e,t){let n=t;return n||(n=he.getXDpi()),Number((e/n*25.4).toFixed(2))},he.yPixelToMm=function(e,t){let n=t;return n||(n=he.getYDpi()),Number((e/n*25.4).toFixed(2))},he.unique=function(e){const t=new Map;return e.filter((e=>!t.has(e)&&t.set(e,1)))},he.formatComboBox=function(e,t){if(!e&&0!==e)return e;if(null==t.renderValue&&(t.renderValue={}),t.renderValue[e])return t.renderValue[e];let n=e;if(t.data&&t.data.length>0){let o="code",i="name";t.valueField&&(o=t.valueField),t.textField&&(i=t.textField);const r=t.data.findIndex((t=>t[o]===e));r>-1&&t.data[r][i]&&(n=!1===t.codeWithName?t.data[r][i]:"["+e+"]"+t.data[r][i])}return t.renderValue[e]=n,n},he.formatDataBox=function(e,t){return e?(null==t.renderFormat&&(t.renderFormat="yyyy-MM-dd",t&&void 0===t.format?"date"===t.vtype?t.renderFormat="yyyy-MM-dd":"datetime"===t.vtype?t.renderFormat="yyyy-MM-dd hh:mm:ss":"month"===t.vtype&&(t.renderFormat="yyyy-MM"):t.format&&(t.renderFormat=t.format)),"string"==typeof e||"number"==typeof e?he.formatDate(new Date(e),t.renderFormat):e.constructor===Date?he.formatDate(e,t.renderFormat):e):""},he.formatValue=function(e,t,n){if(n){if(n.type){let o=n.type.toLowerCase();return"textbox"===o?e:"numberbox"===o||"numberboxv1"===o?e||e!==n.defaultValue?he.formatNumber(e,n.format,n.notzero):e:"combobox"===o?he.formatComboBox(e,n):"datebox"===o?he.formatDataBox(e,n):n.textName?t[n.textName]?t[n.textName]:e||"":e}return e}return e},he.getDefaultFieldStyle=function(e,t,n){let o="";if("DateBox"===e.type){let t="";t=void 0!==e.format?e.format:"date"===e.vtype?"yyyy-MM-dd":"datetime"===e.vtype?"yyyy-MM-dd hh:mm:ss":"month"===e.vtype?"yyyy-MM":"yyyy-MM-dd",o=o+"d="+t+"=center"}if("NumberBox"===e.type){let t="";t=void 0!==e.format?e.format:"n2",o=o+t+"=right"}if("ComboBox"===e.type){let i=e.dictkey;i||(i=e.name);let r="t="+i;!1===e.codeWithName?r+="=N":r+="=Y",o=o+r+"=left";let a="code",s="name";e.valueField&&(a=e.valueField),e.textField&&(s=e.textField),t[i]&&!n[i]?(n[i]=[],t[i].forEach((e=>{let t={};t.code=e[a],t.name=e[s],n[i].push(t)}))):null!=e.data&&(n[i]=he.copy(e.data))}return o},he.getGridField=function(e,t,n,o){let i="";for(let r=0;r<e.length;r++){let a=e[r];if(!1!==a.visible&&!1!==a.isExport){if(a.name){i+=a.name+t+a.label;let e="";a.excel&&a.excel.type?(e=a.excel.type,a.excel.format?e+="="+a.excel.format:e+="=",a.excel.align?e+="="+a.excel.align:e+="="):e=he.getDefaultFieldStyle(a,n,o),i+=e?t+e+",":","}if(a.children)for(let e=0;e<a.children.length;e++){let r=a.children[e];if(r.name){let e="";e=a.label?a.label+"("+r.label+")":r.label,i+=r.name+t+e;let s="";r.excel&&r.excel.type?(s=r.excel.type,r.excel.format?s+="="+r.excel.format:s+="=",r.excel.align?s+="="+r.excel.align:s+="="):s=he.getDefaultFieldStyle(r,n,o),i+=s?t+s+",":","}}}}return i.length>0&&(i=i.substring(0,i.length-1)),i},he.print=function(e,t){let n="<html><head>"+document.head.innerHTML+"</head>";n=e?n+"<body>"+e.$el.innerHTML+"</body></html>":n+"<body>"+document.body.innerHTML+"</body></html>";let o=window.open("Print.htm","print");if(o.document.write(n),t){let e=document.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t,o.document.getElementsByTagName("head")[0].appendChild(e)}o.document.close(),o.print(),o.close()},he.openPage=function(e,t){let n={};n.moduleCode=e,n.params=t,window.EfuMessenger.openPortalTabByModuleCode(n)},he.setLocalStorage=function(e,t,n){let o={};o.data=t,o.time=Date.now(),o.expire=n,ee.set(e,JSON.stringify(o))},he.getLocalStorage=function(e){let t=ee.get(e);if(!t)return null;t=JSON.parse(t);let n=60*Number(t.expire)*60*1e3;return Date.now()-t.time>n?(ee.remove(e),null):t.data},he.getTextWidth=function(e){const t=document.createElement("span");t.style.display="inline-block;",t.textContent=e,document.body.appendChild(t);const n=t.offsetWidth;return document.body.removeChild(t),100*Math.ceil(n/100)+40},he.changeMoneyToChinese=function(e){let t,n,o,i=new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"),r=new Array("","拾","佰","仟"),a=new Array("","万","亿","兆"),s=new Array("角","分","毫","厘"),l="";if(""==e)return"";if((e=parseFloat(e))>=1e15)return this.alert("超出最大处理数字"),"";if(0==e)return l=i[0]+"元",l;if(e<0&&(l="负",e*=-1),-1===(e=e.toString()).indexOf(".")?(t=e,n=""):(o=e.split("."),t=o[0],n=o[1].substr(0,4)),parseInt(t,10)>0){let e=0,n=t.length;for(let o=0;o<n;o++){let s=t.substr(o,1),c=n-o-1,u=c/4,d=c%4;"0"==s?e++:(e>0&&(l+=i[0]),e=0,l+=i[parseInt(s)]+r[d]),0==d&&e<4&&(l+=a[u])}l+="元"}if(""!==n){let e=n.length;for(let t=0;t<e;t++){let e=n.substr(t,1);"0"!=e&&(l+=i[Number(e)]+s[t])}}return""===l&&(l+=i[0]+"元"),l},he.exportExcel=function(e,t,n,o){var i=[],r=[];e.forEach((e=>{e.label?i.push(e.label):i.push(e.name),r.push(e.name)}));var a=se(r,t);a.unshift(i);var s="SheetJS";n&&(s=n);var c=new re,u=ie(a);c.SheetNames.push(s),c.Sheets[s]=u;var d=x.write(c,{bookType:"xlsx",bookSST:!1,type:"binary"}),h=o||"列表";l.saveAs(new Blob([ae(d)],{type:"application/octet-stream"}),h+".xlsx")},he.exportMultiSheetExcel=function(e,t){var n=new re,o=[],i=[],r="";e.forEach(((e,t)=>{o=[],i=[],e.config.forEach((e=>{e.label?o.push(e.label):o.push(e.name),i.push(e.name)}));var a=se(i,e.data);a.unshift(o),r="SheetJS"+t,e.sheetName&&(r=e.sheetName),n.SheetNames.push(r),n.Sheets[r]=ie(a)}));var a=x.write(n,{bookType:"xlsx",bookSST:!1,type:"binary"}),s=t||"列表";l.saveAs(new Blob([ae(a)],{type:"application/octet-stream"}),s+".xlsx")},he.exportExcelStyle=function(e,t,n,o){let i=[];for(let l=0;l<n;l++)i.push([]);let r=[];le(e,i,0,r);let a=[],s=[];!function(e,t,n,o){let i=0;for(let r=0;r<t.length;r++){let a=new Array(e.length).fill("");i=0;let s="";for(let e=0;e<t[r].length;e++){if(t[r][e].fIndex||0===t[r][e].fIndex){let n=t[r-1][t[r][e].fIndex].sIndex;s!==n&&(i=n,s=n)}a[i]=t[r][e].label,t[r][e].sIndex=i;let n={s:{}};n.s.r=r,n.s.c=i,n.e={},n.e.r=n.s.r,i+=t[r][e].num,1===t[r][e].num?0===r&&(n.e.r=t.length-1,n.e.c=n.s.c):n.e.c=i-1,r!==t.length-1&&o.push(n)}n.push(a)}}(r,i,s,a);let c=[];r.forEach((e=>{c.push({wpx:e.width})})),t.forEach((e=>{let t=[];r.forEach((n=>{if("n"===n.excelPro.t)t.push(Number(e[n.name]));else if("d"===n.excelPro.t){let o=oe(new Date(e[n.name]));t.push(o),n.excelPro.t="n"}else t.push(e[n.name])})),s.push(t)}));let u=r.length,d={font:{name:"宋体",sz:9,bold:!0},border:{top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}},alignment:{horizontal:"center",vertical:"center",wrapText:!0}},h={font:{name:"宋体",sz:9},border:{top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}}},A="example.xlsx";o&&(A=o);const f=x.utils.book_new(),p=x.utils.aoa_to_sheet(s);x.utils.book_append_sheet(f,p,"Sheet1"),a.length>0&&(p["!merges"]=a);let g=0;for(let l in p)if("!merges"!==l&&"!ref"!==l&&"!cols"!==l){if(p[l].s=d,g<u*n)p[l].s=d;else{let e=Object.assign({},{},h),t=g%u;Object.assign(e,r[t].excelPro),p[l].s=e}g++}p["!cols"]=c;let m=B.write(f,{bookType:"xlsx",bookSST:!1,type:"binary"});l.saveAs(new Blob([ae(m)],{type:"application/octet-stream"}),A)};let fe={Config:{},customQueryConfig:function(e){return e.isTree?(e.popControl="SimpleTree",e.width||(e.width=.4)):(e.popControl="SimpleViewGrid",e.width?Number(e.width)<.55&&(e.width=.55):e.width=.55),e}};var pe={caseMethod:K,commonMethod:he,query:fe};function ge(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{}}const me="function"==typeof Proxy;let ye,ve;function Ce(){return void 0!==ye||("undefined"!=typeof window&&window.performance?(ye=!0,ve=window.performance):"undefined"!=typeof globalThis&&(null===(e=globalThis.perf_hooks)||void 0===e?void 0:e.performance)?(ye=!0,ve=globalThis.perf_hooks.performance):ye=!1),ye?ve.now():Date.now();var e}class be{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const r in e.settings){const t=e.settings[r];n[r]=t.defaultValue}const o=`__vue-devtools-plugin-settings__${e.id}`;let i=Object.assign({},n);try{const e=localStorage.getItem(o),t=JSON.parse(e);Object.assign(i,t)}catch(dV){}this.fallbacks={getSettings:()=>i,setSettings(e){try{localStorage.setItem(o,JSON.stringify(e))}catch(dV){}i=e},now:()=>Ce()},t&&t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((n=>{this.targetQueue.push({method:t,args:e,resolve:n})}))})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function we(e,t){const n=e,o=ge(),i=ge().__VUE_DEVTOOLS_GLOBAL_HOOK__,r=me&&n.enableEarlyProxy;if(!i||!o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&r){const e=r?new be(n,i):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else i.emit("devtools-plugin:setup",e,t)}
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("view-ui-plus"),require("axios"),require("jquery"),require("js-cookie"),require("js-md5"),require("xlsx"),require("xlsx-style-vite"),require("file-saver"),require("vue"),require("element-resize-detector"),require("pako"),require("viewerjs"),require("pdfobject"),require("echarts-liquidfill"),require("vue-draggable-plus")):"function"==typeof define&&define.amd?define(["exports","view-ui-plus","axios","jquery","js-cookie","js-md5","xlsx","xlsx-style-vite","file-saver","vue","element-resize-detector","pako","viewerjs","pdfobject","echarts-liquidfill","vue-draggable-plus"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ocpviewPlus={},e.ViewUiPlus,e.Axios,e.Jquery,e.JsCookie,e.JsMd5,e.Xlsx,e.XlsxStyleVite,e.FileSaver,e.Vue,e.ElementResizeDetector,e.Pako,e.Viewerjs,e.Pdfobject,e.EchartsLiquidfill,e.VueDraggablePlus)}(this,(function(e,t,n,o,i,r,a,s,l,c,u,d,h,A,f,p){"use strict";function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function m(e){if(e&&e.__esModule)return e;var t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var y=g(t),v=g(n),C=g(o),b=g(i),w=g(r),x=m(a),B=m(s),E=g(u),_=g(d),k=g(h);function S(e,t){for(let n=0;n<t.length;n++)if(e===t[n])return!0;return!1}function D(e){const t=(n=e,{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(n)]);var n;let o;if("array"===t)o=[];else{if("object"!==t)return e;o={}}if("array"===t)for(let i=0;i<e.length;i++)o.push(D(e[i]));else if("object"===t)for(let i in e)o[i]=D(e[i]);return o}let O={};function F(){let e=[],t=[];for(let o in this.objData){const n=this.objData[o];n._isChecked&&e.push(parseInt(o)),n.children&&n.children.length&&(t=t.concat(this.getSelectionChildrenRowKeys(n,t)))}t=[...new Set(t)];let n=[];return this.data.forEach(((o,i)=>{e.indexOf(i)>-1&&(o._customIndex=i,n=n.concat(o)),o.children&&o.children.length&&t.length&&(n=n.concat(this.getSelectionChildren(o,n,t)))})),n=[...new Set(n)],JSON.parse(JSON.stringify(n))}function T(){let e=this.$el.parentNode.offsetWidth,t={},n=0,o=[],i=[],r=[];this.cloneColumns.forEach((e=>{e.width?o.push(e):(i.push(e),e.minWidth&&(n+=e.minWidth),e.maxWidth||r.push(e)),e._width=null}));let a=e-o.map((e=>e.width)).reduce(((e,t)=>e+t),0)-n-(this.showVerticalScrollBar?this.scrollBarWidth:0)-1,s=i.length,l=0;a>0&&s>0&&(l=parseInt(a/s));for(let c=0;c<this.cloneColumns.length;c++){const e=this.cloneColumns[c];let n=l+(e.minWidth?e.minWidth:0);e.width?n=e.width:e._width?n=e._width:(e.minWidth>n?n=e.minWidth:e.maxWidth<n&&(n=e.maxWidth),a>0?(a-=n-(e.minWidth?e.minWidth:0),s--,l=s>0?parseInt(a/s):0):l=0),e._width=n,t[e._index]={width:n}}if(a>0){s=r.length,l=parseInt(a/s);for(let e=0;e<r.length;e++){const n=r[e];let o=n._width+l;s>1?(s--,a-=l,l=parseInt(a/s)):l=0,n._width=o,t[n._index]={width:o}}}this.tableWidth=this.cloneColumns.map((e=>e._width)).reduce(((e,t)=>e+t),0)+(this.showVerticalScrollBar?this.scrollBarWidth:0)+1,this.columnsWidth=t,this.fixedHeader()}function I(e,t){const n=t?this.getDataByRowKey(t):this.objData[e];n&&this.highlightRow&&!n._isHighlight&&this.handleCurrentRow("highlight",e,t)}function N(e){return D(e).map((e=>("children"in e&&(e.children=this.makeColumnsId(e.children)),e.__id=function(e=32){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",n=t.length;let o="";for(let i=0;i<e;i++)o+=t.charAt(Math.floor(Math.random()*n));return o}(6),e)))}function R(){let e=!1;for(let t in this.headRows)for(let n in this.headRows[t]){if("right"===this.headRows[t][n].fixed){e=!0;break}if(e)break}return[{[`${this.prefixCls}-hidden`]:e,"efuture-table-scroll-th":!0}]}function P(e,t=!1){if(this.to){if("_blank"===this.target)return!1;e.preventDefault(),"click"===this.to?this.$emit("click",e):this.handleClick(t)}}function M(){this.itemDisabled||(this.$parent&&this.$parent.onClick?this.$parent.onClick():this.$refs.input&&this.$refs.input.click())}function V(){this.$refs.pickerPanel&&this.$refs.pickerPanel.reset&&this.$refs.pickerPanel.reset()}function U(e){const t=e.keyCode;if(9===t)if(this.visible)if(e.stopPropagation(),e.preventDefault(),this.isConfirm){const t=".ivu-picker-confirm > *",n=this.$refs.drop.$el.querySelectorAll(t);this.internalFocus=!0;[...n][e.shiftKey?"pop":"shift"]().focus()}else this.handleClose();else this.focused=!1;const n=[37,38,39,40];if(this.visible||!n.includes(t)){if(27===t&&this.visible&&(e.stopPropagation(),this.handleClose()),13===t){const e=this.timeSpinnerList.map((e=>e.timeSpinner));if(e.length>0){const t=e[0].showSeconds?3:2,n=Math.floor(this.focusedTime.column/t),o=this.focusedTime.time[n];return void e[n].chooseValue(o)}if(this.type.match(/range/))this.$refs.pickerPanel.handleRangePick(this.focusedDate,"date");else{const e=this.panelTableList.map((e=>e.panelTable)),t=e=>{const t=["year","month","date"].indexOf(this.type)+1;return[e.getFullYear(),e.getMonth(),e.getDate()].slice(0,t).join("-")};e.find((({cells:e})=>e.find((({date:e,disabled:n})=>t(e)===t(this.focusedDate)&&!n))))&&(null===this.modelValue?this.onPick(null,!1,"date"):this.onPick(this.focusedDate,!1,"date"))}}n.includes(t)&&(this.focusedTime.active&&e.preventDefault(),this.navigateDatePanel(keyValueMapper[t],e.shiftKey))}else this.visible=!0}function L(e){this.internalFocus?this.internalFocus=!1:this.visible?e.preventDefault():(this.isFocused=!1,this.onSelectionModeChange(this.type),this.internalValue=this.internalValue.slice(),this.reset(),this.$refs.pickerPanel&&this.$refs.pickerPanel.onToggleVisibility(!1))}const j="undefined"!=typeof window;function $(e,t){const n=t?"scrollTop":"scrollLeft";let o=e[t?"pageYOffset":"pageXOffset"];return j&&"number"!=typeof o&&(o=window.document.documentElement[n]),o}function Q(e){if(this.upperFirstTitle=!!this.titlesOffsetArr[0]&&e.target.scrollTop<this.titlesOffsetArr[0].offset,this.animating)return;const t=this.scrollContainer.scrollTop;this.getCurrentScrollAtTitleId(t)}function H(){if(!j)return;const e=this.affix,t=$(window,!0),n=function(e){if(!j)return;const t=e.getBoundingClientRect(),n=$(window,!0),o=$(window),i=window.document.body,r=i.clientTop||0,a=i.clientLeft||0;return{top:t.top+n-r,left:t.left+o-a}}(this.$el),o=window.innerHeight,i=this.$el.getElementsByTagName("div")[0].offsetHeight;n.top-this.offsetTop<t&&"top"==this.offsetType&&!e?(this.affix=!0,this.slotStyle={width:this.$refs.point.clientWidth+"px",height:this.$refs.point.clientHeight+"px"},this.slot=!0,this.styles={top:`${this.offsetTop}px`},n.left&&(this.styles.left=`${n.left}px`),this.$el.offsetWidth&&(this.styles.width=`${this.$el.offsetWidth}px`),this.$emit("on-change",!0)):n.top-this.offsetTop>t&&"top"==this.offsetType&&e&&(this.slot=!1,this.slotStyle={},this.affix=!1,this.styles=null,this.$emit("on-change",!1)),n.top+this.offsetBottom+i>t+o&&"bottom"==this.offsetType&&!e?(this.affix=!0,this.styles={bottom:`${this.offsetBottom}px`,left:`${n.left}px`,width:`${this.$el.offsetWidth}px`},this.$emit("on-change",!0)):n.top+this.offsetBottom+i<t+o&&"bottom"==this.offsetType&&e&&(this.affix=!1,this.styles=null,this.$emit("on-change",!1))}O.initTable=function(e){e.methods.getSelection=F,e.methods.handleResize=T,e.methods.highlightCurrentRow=I,e.methods.makeColumnsId=N,e.components.tableHead.methods.scrollBarCellClass=R},O.initBreadcrumbItem=function(e){e.mixins[0].methods.handleCheckClick=P},O.initButton=function(e){e.mixins[0].methods.handleCheckClick=P},O.initCard=function(e){e.mixins[0].methods.handleCheckClick=P},O.initCell=function(e){e.mixins[0].methods.handleCheckClick=P},O.initMenuItem=function(e){e.mixins[1].methods.handleCheckClick=P},O.initUpload=function(e){e.methods.handleClick=M},O.initDatePicker=function(e){e.mixins[0].methods.reset=V,e.mixins[0].methods.handleBlur=L,e.mixins[0].methods.handleKeydown=U},O.initAffix=function(e){e.methods.handleScroll=H},O.initAnchor=function(e){e.methods.handleScroll=Q},O.initEview=function(e){O.initTable(e.Table),O.initBreadcrumbItem(e.BreadcrumbItem),O.initButton(e.Button),O.initCard(e.Card),O.initCell(e.Cell),O.initMenuItem(e.MenuItem),O.initUpload(e.Upload),O.initDatePicker(e.DatePicker),O.initAffix(e.Affix),O.initAnchor(e.Anchor)};var z="1.0.14";let K={},G={};function q(e,t,n){let o=K.getToken(),i=K.getEnt_id(),r=t;r||(r={});let a=e.OmdUrl.portalkey;if(K.getUrlParam("portalkey")||(a=K.getUrlParam("portalkey")),"cloud"===K.getUrlParam("srvkey")&&(a="cloud"),"1"===n){let t="";if(o&&""!==o.trim()){if(t=t+"&ent_id="+i+"&token="+o+"×tamp="+(new Date).getTime()+"&format="+e.OmdUrl.format+"&app_key="+e.OmdUrl.appKey+"&portalkey="+a+"&ver="+e.OmdUrl.ver,0!==e.OmdUrl.signMethod.trim().length&&0!=e.OmdUrl.secret.trim().length){t=t+"&sign_method="+e.OmdUrl.signMethod+"&sign=";let n=e.OmdUrl.appKey+"="+e.OmdUrl.secret+"&body="+JSON.stringify(r).toString()+"&token="+o;void 0!==e.OmdUrl.getMd5&&(n=e.OmdUrl.getMd5(r,o)),t+=w.default(n)}}else{let n={ent_id:i,user_id:e.OmdUrl.uid,user_code:e.OmdUrl.uid,user_name:e.OmdUrl.uname};t=t+"&session="+JSON.stringify(n)}return t}{let t={};if(o&&""!==o.trim()){t.ent_id=i,t.token=o,t.timestamp=(new Date).getTime(),t.format=e.OmdUrl.format,t.app_key=e.OmdUrl.appKey,t.ver=e.OmdUrl.ver,t.portalkey=a,t.sign_method=e.OmdUrl.signMethod;let n=e.OmdUrl.appKey+"="+e.OmdUrl.secret+"&body="+JSON.stringify(r).toString()+"&token="+o;void 0!==e.OmdUrl.getMd5&&(n=e.OmdUrl.getMd5(r,o)),t.sign=w.default(n)}else{let n={ent_id:i,user_id:e.OmdUrl.uid,user_code:e.OmdUrl.uid,user_name:e.OmdUrl.uname};t.session=JSON.stringify(n)}return t}}function W(e,t,n,o,i){let r=null;try{if(r="string"==typeof e?JSON.parse(e):e,0===parseInt(r.returncode)){try{t&&t(r.data)}catch(dV){i.$Spin&&i.$Spin.hide(),i.$nextTick((()=>{setTimeout((()=>{i.alert(dV,null,2)}),1e3)}))}return}if(parseInt(r.returncode)>0){if(n){try{n(r.data)}catch(dV){i.$Spin&&i.$Spin.hide(),i.$nextTick((()=>{setTimeout((()=>{i.alert(dV,null,2)}),1e3)}))}return}throw r.data}if(o){try{o(r.data)}catch(dV){i.$Spin&&i.$Spin.hide(),i.$nextTick((()=>{setTimeout((()=>{i.alert(dV,null,2)}),1e3)}))}return}throw r.data}catch(dV){i.$Spin&&i.$Spin.hide(),i.$nextTick((()=>{setTimeout((()=>{"string"==typeof e?i.alert(dV+"<br/>"+e,null,2):i.alert(dV,null,2)}),1e3)}))}}function X(e,t,n,o){let i="";i=t?"method="+t:"method=",i+=q(o,n,"1"),i=e&&-1!=e.indexOf("?")?e+"&"+i:e+"?"+i;let r=K.getUrlParam("menuCode");return r&&(i=i+"&menuCode="+r),encodeURI(i)}function Y(e){if(!e)return"";try{let t=JSON.parse(e);return t=t.state,t?t.split(":")[1]:e}catch(dV){return e}}G.eid="0",G.uid="0",G.uname="future",G.format="json",G.appKey="mall",G.portalkey="congou",G.checktoken="Y",G.ver="1.0",G.signMethod="MD5",G.secret="",G.omp="/mall-work-webin/rest",G.mall="/mall-work-webin/rest",G.mss="/mall-work-webin/rest",G.portal="/mall-portal-rest/portalesb/ocmrest",G.mdm="/ocm-mdm-webin/rest",G.omc="/omc-tags-webin/rest",G.member="/omc-membership-webin/rest",G.accnt="/omc-accnt-webin/rest",G.work="/omc-work-webin/rest",G.investment="/mall-investment-webin/rest",G.uploadfile="/mss-sysconf-boot/upload",G.delfile="/mss-sysconf-boot/delete?filekey=",G.downfile="/mss-sysconf-boot/download?filekey=",G.getfile="/mss-sysconf-boot/filedata?",G.amp="/ampOpenapiService/",G.uidespath=G.amp,G.helpUrl="docs.sjhgo.com",G.mallmdm="/mall-mdm-webin/rest",G.mallmaster="/mall-master-webin/rest",G.portal=G.mallmdm,G.uiConfigExpire=24,G.fairyConfigExpire=24,G.dictExpire=24,G.operbilllog="/mss-sysconf-query/rest",G.getCurHelpUrl=function(e){var t="";if("Y"===e.OmdUrl.startHelp&&e.OmdUrl.helpType){var n=e.$Method.getUrlParam("helpindex"),o=e.$Method.getLocalStorage("modulecodeHelp_"+e.OmdUrl.helpType+"_"+n);if(o)return o;if(n){var i=e.OmdUrl.helpUrl;if(i||e.getHelpdocumenturl&&(i=e.getHelpdocumenturl()),i){let o=e.getHelpId(e.OmdUrl.helpType,n);t=o?"http://"+i+"/web/#/p/"+o:"http://"+i+"/web/#/"+e.OmdUrl.helpType+"?page_id="+n}e.$Method.setLocalStorage("modulecodeHelp_"+e.OmdUrl.helpType+"_"+n,t,e.OmdUrl.uiConfigExpire)}}return t},K.OmdUrl=G,K.alert=function(e,n,o){o||(o="1"),e&&"string"==typeof e&&(e='<xmp style="margin: 0;white-space:break-spaces;">'+(e=(e=e.replace(new RegExp("</xmp>","gi"),"</txmp>")).replace(new RegExp("<xmp","gi"),"<txmp"))+"</xmp>"),"2"===(o+="")?t.Modal.error({title:"系统警告",content:'<div style="word-wrap:break-word">'+e+"</div>"}):"3"===o?(n||(n="成功"),t.Modal.success({title:n,content:'<div style="word-wrap:break-word">'+e+"</div>"})):(n||(n="提醒"),t.Modal.warning({title:n,content:'<div style="word-wrap:break-word">'+e+"</div>"}))},K.asyncPost=function(e,t,n,o,i,r,a){let s=this;e.startsWith("/")||(e="/"+e),function(e,t,n,o,i){let r={};t&&(r.method=t);let a=q(o,n,"2");for(let l in a)r[l]=a[l];n||(n={});let s=K.getUrlParam("menuCode");return s&&(r.menuCode=s),new Promise("get"===i?(t,o)=>{v.default.get(e,n,{params:r}).then((e=>{t(e.data)}),(e=>{o(e)})).catch((e=>{o(e)}))}:(t,o)=>{v.default.post(e,n,{params:r}).then((e=>{t(e.data)}),(e=>{o(e)})).catch((e=>{o(e)}))})}(e,t,n,s,a).then((function(e){return W(e,o,i,null,s)}),(function(e){i?i(e):(s.$Spin&&s.$Spin.hide(),s.$nextTick((()=>{setTimeout((()=>{s.alert(e.message+"<br/>"+e.response.data,null,"2")}),1e3)})))})).catch((e=>{if(!r){s.$Spin&&s.$Spin.hide();let t=JSON.stringify(e);return s.$nextTick((()=>{setTimeout((()=>{s.alert(t,null,"2")}),1e3)})),!1}r(e)}))},K.getResturl=X,K.synchroPost=function(e,t,n,o,i,r,a){let s=this,l="POST";a&&(l=a);let c=X(e,t,n,s);c.startsWith("/")||(c="/"+c),C.default.ajaxSetup({cache:!1});let u={type:l,contentType:"text/plain; charset=UTF-8",async:!1,dataType:"JSON",processData:!1,success:function(e){return W(e,o,i,r,s)},error:function(e,t,n){s.$Spin&&s.$Spin.hide();try{let e=JSON.stringify(n);s.alert(e,null,"2")}catch(dV){setTimeout((()=>{s.alert(n,null,"2")}),1e3)}return!1}};n||(n={}),"POST"===l?u.data=JSON.stringify(n):delete u.data,C.default.ajax(c,u)},K.getOmdUrlConfig=function(e){C.default.ajax({url:"/amp-glod/config.json",type:"GET",dataType:"json",success:function(t){let n=t,o={};if(n)for(let e in n)n[e]instanceof Array?n[e].forEach((e=>{o[e.name]=e.value})):o[e]=n[e];e.config.globalProperties.OmdUrl=Object.assign({},e.config.globalProperties.OmdUrl,o)}})},K.getPortalConfig=function(e){C.default.ajax({url:"/ampOpenapiService?method=usercenter.portal.getConfig",type:"POST",data:{},dataType:"json",success:function(t){if(0==t.returncode&&t.data){if(t.data.OmdUrl){let n=JSON.parse(t.data.OmdUrl);e.config.globalProperties.OmdUrl=Object.assign({},e.config.globalProperties.OmdUrl,n)}e.config.globalProperties.portalConfig=t.data}}})},K.getUserCode=function(e){let t=null;t=e||this;let n=K.getToken(e),o="",i="";return o=t.portalkey,i=t.OmdUrl.uid,n&&("congou"==o?i=Y(b.default.get("user_code")):b.default.get("user_code")&&(i=b.default.get("user_code"))),i},K.getUserName=function(e){let t=null;t=e||this;let n=K.getToken(e),o="",i="";return o=t.portalkey,i="["+t.OmdUrl.uid+"]"+t.OmdUrl.uname,n&&("congou"==o?i="["+Y(b.default.get("user_code"))+"]"+Y(b.default.get("user_name")):b.default.get("user_code")&&(i="["+b.default.get("user_code")+"]"+b.default.get("user_name"))),i},K.getPortalMkt=function(){let e={};return e.shopId=b.default.get("shopId"),e.shopCode=b.default.get("shopCode"),e.shopName=b.default.get("shopName"),e},K.getSession=function(){let e={},t=K.getUserName(),n=K.getUserCode(),o=b.default.get("user_id"),i=K.getEnt_id(),r=K.getToken();return e.user_name=t||"",e.user_code=n||"",e.user_id=o||"",e.ent_id=i||"",e.token=r||"",JSON.stringify(e)},K.getUrlParam=function(e){let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.href.split("?"),o="";return n.length>1&&(o=n[1].match(t)),o||n.length>2&&(o=n[2].match(t)),o?decodeURI(o[2]):""},K.initGlobal=function(e,t,n){let o={};e.config.globalProperties.OmdUrl||(e.config.globalProperties.OmdUrl={}),t&&(o=Object.assign({},e.config.globalProperties.OmdUrl,t));let i=K.getUrlParam("portalkey");i&&(o.portalkey=i),o.eid=K.getEnt_id(e.config.globalProperties),o.modulecode=K.getUrlParam("modulecode"),o.modulecode||(o.modulecode=K.getUrlParam("billmoduleid")),o.helpindex=K.getUrlParam("helpindex"),o.billmoduleid=e.config.globalProperties.modulecode,o.openbillno=K.getUrlParam("billno"),o.opentaskid=K.getUrlParam("taskid"),o.nocheck=K.getUrlParam("nocheck")?K.getUrlParam("nocheck"):"N",e.config.globalProperties.OmdUrl=Object.assign({},e.config.globalProperties.OmdUrl,o),K.getPortalConfig(e)},K.getUserModuleMethod=function(e){let t=null,n=K.getToken();if(!n)return t;let o="";if(e)o=e;else if(o=K.getUrlParam("modulecode"),!o)return t;let i="/mall-portal-rest/portalesb/ocmrest";this.OmdUrl&&this.OmdUrl.portal&&(i=this.OmdUrl.portal),"cloud"===K.getUrlParam("srvkey")&&(i=this.OmdUrl.mdm);let r={};return r.token=n,r.modulecode=o,this.synchroPost(i,"runtime.modulesrivce.getUserModuleMethod",r,(function(e){t=e}),null),t},K.checkModuleByToken=function(){let e=!1,t=K.getToken();if(!t)return e;let n=K.getUrlParam("modulecode");if(!n)return e;if(!location.pathname)return e;if("congou"!=this.portalkey)return e;let o="/mall-portal-rest/portalesb/ocmrest";this.OmdUrl.portal&&(o=this.OmdUrl.portal);let i={token:t,modulecode:n,execmodule:location.pathname};"cloud"===K.getUrlParam("srvkey")&&(o=this.OmdUrl.mdm);return this.synchroPost(o,"runtime.modulesrivce.checkmodulebytoken",i,(function(t){"-1"===t.flag&&(e=!0)}),null),e},K.getDict=function(e,t){let n="code,name";t&&(n=t);let o={},i={fields:n,dict_group_code:e};return this.synchroPost(this.OmdUrl.omp,"omp.work.dict.getbydictgroupcode",i,(function(e){o=e}),null),o},K.setQueryConfig=function(e){Object.assign(this.query.Config,e)},K.getQueryConfig=function(e){let t=null;return t=this.query.Config[e]?JSON.parse(JSON.stringify(this.query.Config[e])):{},void 0===t.width&&(t.isTree?t.width=.3:t.width=.4),void 0===t.height&&(t.height=.6),void 0===t.responseId&&(t.responseId=t.responseCode),void 0===t.manualLoad&&(t.manualLoad=!0),void 0===t.multiSelect&&(t.multiSelect=!1),void 0===t.showCondition&&(t.showCondition=!0),t.isConfig?t:this.query.customQueryConfig?this.query.customQueryConfig(t):t},K.getBillmoduleid=function(e){let t="",n={billtype:e,order_field:"modeid"};return this.synchroPost(this.OmdUrl.mall,"mss.base.billmain.search",n,(function(e){e&&e.billmain&&e.billmain.length>0&&(t=e.billmain[0].modeid)}),null),t},K.getBilltype=function(e){let t="",n={modeid:e};return this.synchroPost(this.OmdUrl.mall,"mss.base.billmain.search",n,(function(e){e&&e.billmain&&e.billmain.length>0&&(t=e.billmain[0].billtype)}),null),t},K.getHelpdocumenturl=function(){let e="";return this.synchroPost(this.OmdUrl.mall,"mss.work.report.query",{queryid:"select_fgetmanapara",mpmkt:"00",mpcode:"HELPDOCUMENTURL"},(function(t){t&&t.report&&t.report.length>0&&(e=t.report[0].mpvalue)}),null),e},K.getHelpId=function(e,t){let n="",o={};return o.helpType=e,o.helpIndex=t,this.synchroPost(this.OmdUrl.amp,"usercenter.helpconfig.getHelpId",o,(function(e){e&&e.helpId&&(n=e.helpId)}),(function(e){n=""}),(function(e){n=""})),n},K.getConditionValue=function(e,t,n,o){let i={};if("=="===n)if("DateBox"===o.type){i[e]={};let n={};n[">="]=t,"month"===o.vtype?n["<"]=this.$Method.getNextMonthFirstDay(t):n["<"]=this.$Method.getTomorrow(t),i[e]=n}else if("inputer"===e||"auditor"===e||"canceler"===e){let n={};n[e]={"==":t};let o={};o[e+"_name"]={LIKE:"[%]"+t},i.$or=[],i.$or.push(n),i.$or.push(o)}else i[e]={},void 0!==t.value?i[e][n]=t.value:i[e][n]=t;return"LIKE"===n&&(i[e]={},i[e][n]="%"+t+"%"),"LIKE"!==n&&"=="!==n&&(i[e]={},i[e][n]=t),i},K.getHelpUrl=function(){let e="";if(this.helpindex){let t="";t=this.OmdUrl.helpUrl?this.OmdUrl.helpUrl:this.getHelpdocumenturl(),t&&(e="http://"+t+"/web/#/"+this.OmdUrl.helpType+"?page_id="+this.helpindex)}return e},K.getEnt_id=function(e){let t="",n="";if(e?(t=e.OmdUrl.eid,n=e.OmdUrl.portalkey):(t=this.OmdUrl.eid,n=this.OmdUrl.portalkey),void 0!==b.default.get("ent_id")&&""!==b.default.get("ent_id"))t=b.default.get("ent_id");else{let e=K.getUrlParam("ent_id");void 0!==e&&""!==e&&(t=e)}if("cloud"===n){let e=K.getUrlParam("lock_entid");void 0!==e&&""!==e&&(t=e)}return t},K.getToken=function(e){let t="";if(e?e.token&&(t=e.token):this.token&&(t=this.token),b.default.get("token"))t=b.default.get("token");else{let e=K.getUrlParam("token");e&&(t=e)}return t},K.getModulecode=function(){let e="";return e=K.getUrlParam("modulecode"),e||(e=K.getUrlParam("billmoduleid")),e},K.downloadFile=function(e,t){if(!e)return;let n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(){if(200===this.status){let e=this.response,n=new FileReader,o=decodeURI(this.getResponseHeader("content-disposition")).replace("attachment;filename*=UTF-8''","");o=o.replace("attachment;filename=",""),n.readAsDataURL(e),o=decodeURIComponent(o),o=o.replace(/\ +/g,""),o=o.replace(/[\r\n]/g,""),n.onload=function(){let n=document.createElement("a");n.download=o,n.href=URL.createObjectURL(e),C.default("body").append(n),t.$Spin.hide(),n.click(),C.default(n).remove()}}else t.$Spin.hide(),t.alert("导出失败")},n.send(new Blob)},K.exportExcelback=function(e){e.child?setTimeout(e.exportExcelback(e),100):e.$Spin.hide()},K.doExportExcel=function(e,t,n,o,i){let r=e;n||(n={}),r=X(r,t,n,i);let a=JSON.stringify(n);a=a.replaceAll("#","%23"),a=a.replaceAll("&","%26"),a=a.replaceAll("+","%2B"),r=encodeURI(r+"¶m="+a);let s=b.default.get("user_id"),l=b.default.get("user_code");if(s&&(r+=encodeURI("&user_id="+s)),l&&(r+=encodeURI("&user_code="+l)),i.$Spin.show({render:e=>e("div","导出中...,请勿关闭!")}),o||(o="2"),"2"===o)K.downloadFile(r,i);else{const e=window.open(r,"_blank");var c=setInterval((function(){e.closed&&(i.$Spin.hide(),clearInterval(c))}),100)}},K.doExportReport=function(e,t,n,o){let i=e;n||(n={}),i=X(i,t,n,o);let r=JSON.stringify(n);r=r.replaceAll("#","%23"),r=r.replaceAll("&","%26"),r=r.replaceAll("+","%2B"),i=encodeURI(i+"¶m="+r),o.$Spin.show({render:e=>e("div","导出中...,请勿关闭!")}),K.downloadFile(i,o)},K.getFilesInfo=function(e,t,n,o,i){let r=K.getUserCode(),a=K.getUserName(),s=K.getToken(),l=G.getfile+"billno="+e+"&billmoduleid="+t+"&scenetype="+o,c="&usercode="+r+"&username="+a+"&token="+s;c+="Y"!==n?"¬delfile=N":"¬delfile=Y",c=encodeURI(c),K.synchroPost(l,"",{},(e=>{let t=[];e&&e.length>0&&e.forEach((e=>{let n=Object.assign({},{},e);n.filename=e.filename,n.filekey=e.filekey,n.downUrl=G.downfile+n.filekey+c,n.delUrl=G.delfile+n.filekey+c,n.title=n.filename,n.url=n.downUrl,n.modflag=e.modflag,t.push(n)})),i(t)}),null,null,"get")},K.getFilesInfoByIdkey=function(e,t){let n=K.getUserCode(),o=K.getUserName(),i=K.getToken(),r=G.getfile+"idkey="+e,a="&usercode="+n+"&username="+o+"&token="+i;a=encodeURI(a),K.synchroPost(r,"",{},(e=>{let n=[];e&&e.length>0&&e.forEach((e=>{let t=Object.assign({},{},e);t.filename=e.filename,t.filekey=e.filekey,t.downUrl=G.downfile+t.filekey+a,t.delUrl=G.delfile+t.filekey+a,t.title=t.filename,t.url=t.downUrl,t.modflag=e.modflag,n.push(t)})),t(n)}),null,null,"get")},K.getFileInfo=function(e,t){let n=K.getUserCode(),o=K.getUserName(),i=K.getToken(),r=G.getfile+"filekey="+e,a="&usercode="+n+"&username="+o+"&token="+i;a=encodeURI(a),K.synchroPost(r,"",{},(e=>{let n=[];e&&e.length>0&&e.forEach((e=>{let t=Object.assign({},{},e);t.filename=e.filename,t.filekey=e.filekey,t.downUrl=G.downfile+t.filekey+a,t.delUrl=G.delfile+t.filekey+a,t.title=t.filename,t.url=t.downUrl,t.modflag=e.modflag,n.push(t)})),t(n)}),null,null,"get")},K.setUrlSuffix=function(e,t){let n=K.getUrlParam("srvkey"),o=K.getUrlParam("token"),i=K.getUrlParam("usercode"),r=K.getUrlParam("portalkey");return e?-1!=e.indexOf("?")?e+"&token="+o+"&srvkey="+n+"&app_key="+t.OmdUrl.appKey+"&secret="+t.OmdUrl.secret+"&portalkey="+r+"&usercode="+i:e+"?token="+o+"&srvkey="+n+"&app_key="+t.OmdUrl.appKey+"&secret="+t.OmdUrl.secret+"&portalkey="+r+"&usercode="+i:e};var J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Z="undefined"==typeof window,ee={version:"1.1.1",storage:Z?null:window.localStorage,session:{storage:Z?null:window.sessionStorage}},te={set:function(e,t){if(!this.disabled)return void 0===t?this.remove(e):(this.storage.setItem(e,function(e){return JSON.stringify(e)}(t)),t)},get:function(e,t){if(this.disabled)return t;var n=function(e){if("string"!=typeof e)return;try{return JSON.parse(e)}catch(dV){return e||void 0}}(this.storage.getItem(e));return void 0===n?t:n},has:function(e){return void 0!==this.get(e)},remove:function(e){this.disabled||this.storage.removeItem(e)},clear:function(){this.disabled||this.storage.clear()},getAll:function(){if(this.disabled)return null;var e={};return this.forEach((function(t,n){e[t]=n})),e},forEach:function(e){if(!this.disabled)for(var t=0;t<this.storage.length;t++){var n=this.storage.key(t);e(n,this.get(n))}}};J(ee,te),J(ee.session,te);try{var ne="__storejs__";ee.set(ne,ne),ee.get(ne)!==ne&&(ee.disabled=!0),ee.remove(ne)}catch(dV){ee.disabled=!0}function oe(e,t){return t&&(e+=1462),(Date.parse(e)-new Date(Date.UTC(1899,11,30)))/864e5}function ie(e,t){for(var n={},o={s:{c:1e7,r:1e7},e:{c:0,r:0}},i=0;i!=e.length;++i)for(var r=0;r!=e[i].length;++r){o.s.r>i&&(o.s.r=i),o.s.c>r&&(o.s.c=r),o.e.r<i&&(o.e.r=i),o.e.c<r&&(o.e.c=r);var a={v:e[i][r]};if(null!=a.v){var s=x.utils.encode_cell({c:r,r:i});"number"==typeof a.v?a.t="n":"boolean"==typeof a.v?a.t="b":a.v instanceof Date?(a.t="n",a.z=x.SSF._table[14],a.v=oe(a.v)):a.t="s",n[s]=a}}return o.s.c<1e7&&(n["!ref"]=x.utils.encode_range(o)),n}function re(){if(!(this instanceof re))return new re;this.SheetNames=[],this.Sheets={}}function ae(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),o=0;o!=e.length;++o)n[o]=255&e.charCodeAt(o);return t}function se(e,t){return t.map((t=>e.map((e=>t[e]))))}function le(e,t,n,o,i){if(!(e instanceof Array)){if(!1!==e.visible){let r={};r.label=e.label,r.num=1;let a=0,s=t[n].length;if(e.children&&e.children.length>0)e.children.forEach((e=>{let i=le(e,t,n+1,o,s);a+=i})),r.num=a;else if(e.name){r.name=e.name;let t=100;e.width?e.width>100&&(t=e.width):e.maxWidth?e.maxWidth>100&&(t=e.maxWidth):e.minWidth&&e.minWidth>100&&(t=e.minWidth),r.width=t,r.excelPro=function(e){let t={alignment:{vertical:"center",wrapText:!0}};if("NumberBox"===e.type){if(t.alignment.horizontal="right",e.format&&e.format.length>1){let n=e.format[0],o=e.format[1],i="0";"n"===n||"p"===n?i="0":"c"===n&&(i="¥#,##0");let r="";if(Number(o)>0)for(let e=0;e<Number(o);e++)r+="0";r&&(i=i+"."+r),"p"===n&&(i+="%"),t.numFmt=i}t.t="n"}else if("DataBox"===e.type){t.alignment.horizontal="center";let n="yyyy年m月d日";"datetime"===e.vtype&&(n="yyyy年m月d日 h:mm:ss"),t.numFmt=n,t.t="d"}else t.alignment.horizontal="left",t.numFmt="@",t.t="s";return t}(e),o.push(r)}return(i||0===i)&&0!==n&&(r.fIndex=i),t[n].push(r),r.num}return 0}e.forEach((e=>{le(e,t,n,o,i)}))}!function(e){if(e.URL=e.URL||e.webkitURL,e.Blob&&e.URL)try{return void new Blob}catch(dV){}var t=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||function(e){var t=function(e){return Object.prototype.toString.call(e).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},o=function(e,t,n){this.data=e,this.size=e.length,this.type=t,this.encoding=n},i=n.prototype,r=o.prototype,a=e.FileReaderSync,s=function(e){this.code=this[this.name=e]},l="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),c=l.length,u=e.URL||e.webkitURL||e,d=u.createObjectURL,h=u.revokeObjectURL,A=u,f=e.btoa,p=e.atob,g=e.ArrayBuffer,m=e.Uint8Array;for(o.fake=r.fake=!0;c--;)s.prototype[l[c]]=c+1;return u.createObjectURL||(A=e.URL={}),A.createObjectURL=function(e){var t,n=e.type;return null===n&&(n="application/octet-stream"),e instanceof o?(t="data:"+n,"base64"===e.encoding?t+";base64,"+e.data:"URI"===e.encoding?t+","+decodeURIComponent(e.data):f?t+";base64,"+f(e.data):t+","+encodeURIComponent(e.data)):d?d.call(u,e):void 0},A.revokeObjectURL=function(e){"data:"!==e.substring(0,5)&&h&&h.call(u,e)},i.append=function(e){var n=this.data;if(m&&(e instanceof g||e instanceof m)){for(var i="",r=new m(e),l=0,c=r.length;l<c;l++)i+=String.fromCharCode(r[l]);n.push(i)}else if("Blob"===t(e)||"File"===t(e)){if(!a)throw new s("NOT_READABLE_ERR");var u=new a;n.push(u.readAsBinaryString(e))}else e instanceof o?"base64"===e.encoding&&p?n.push(p(e.data)):"URI"===e.encoding?n.push(decodeURIComponent(e.data)):"raw"===e.encoding&&n.push(e.data):("string"!=typeof e&&(e+=""),n.push(unescape(encodeURIComponent(e))))},i.getBlob=function(e){return arguments.length||(e=null),new o(this.data.join(""),e,"raw")},i.toString=function(){return"[object BlobBuilder]"},r.slice=function(e,t,n){var i=arguments.length;return i<3&&(n=null),new o(this.data.slice(e,i>1?t:this.data.length),n,this.encoding)},r.toString=function(){return"[object Blob]"},r.close=function(){this.size=this.data.length=0},n}(e);e.Blob=function(e,n){var o=n&&n.type||"",i=new t;if(e)for(var r=0,a=e.length;r<a;r++)i.append(e[r]);return i.getBlob(o)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||globalThis.content||globalThis);const ce="postMessage"in window;class ue{constructor(e,t,n){let o="";if(arguments.length<2?o="target error - target and name are both required":"object"!=typeof e?o="target error - target itself must be window object":"string"!=typeof t&&(o="target error - target name must be string type"),o)throw new Error(o);this.target=e,this.name=t,this.prefix=n}send(e){if(ce)this.target.postMessage(`${this.prefix}|${this.name}__Messenger__${e}`,"*");else{const t=window.navigator[this.prefix+this.name];if("function"!=typeof t)throw new Error("target callback function is not defined");t(this.prefix+e,window)}}}class de{constructor(e,t){this.targets={},this.name=e,this.listenFunc=[],this.prefix=t,this.initListen()}addTarget(e,t){const n=new ue(e,t,this.prefix);this.targets[t]=n}listen(e){let t=0;const n=this.listenFunc.length;let o=!1;for(;t<n;t++){if(this.listenFunc[t].toString()===e.toString()){this.listenFunc[t]=e,o=!0;break}}o||this.listenFunc.push(e)}clear(){this.listenFunc=[]}send(e){const{targets:t}=this;let n;for(n in t)t.hasOwnProperty(n)&&t[n].send(e)}initListen(){const e=this,t=function(t){if("object"==typeof t&&t.data&&(t=t.data),"string"==typeof t){const n=t.split("__Messenger__");t=n[1];const o=n[0].split("|"),i=o[0],r=o[1];for(let a=0;a<e.listenFunc.length;a++)i+r===e.prefix+e.name&&e.listenFunc[a](t)}};ce?"addEventListener"in document?window.addEventListener("message",t,!1):"attachEvent"in document&&window.attachEvent("onmessage",t):window.navigator[this.prefix+this.name]=t}}window.EfuMessenger=new class{constructor(e,t,n){this.messengerOBJ=null,this.messageName=t||"AMPclient",this.targetName=e||"AMPframe",this.projectName=n||"AMP",this.init()}init(){this.messengerOBJ=new de(this.messageName,this.projectName),this.messengerOBJ.addTarget(window.parent,this.targetName)}openPortalTabPage(e){this.messengerOBJ.targets[this.targetName].send(JSON.stringify({name:this.messageName,action:"openPortalTabPage",params:{...e}}))}openPortalTabByModuleCode(e){this.messengerOBJ.targets[this.targetName].send(JSON.stringify({name:this.messageName,action:"openPortalTabByModuleCode",params:{...e}}))}};let he={};function Ae(e){let t=[];for(let n=0;n<e;n++){let e=[Math.random(),Math.random(),Math.random()];n>0&&Math.abs(e[0]-t[n-1][0])<.25?n--:(e[1]=.7+.2*e[1],e[2]=.4+.4*e[2],e=e.map((function(e){return parseFloat(e.toFixed(2))})),t.push(e))}return function(e){for(let t=0;t<e.length;t++){let n,o,i,r=e[t][0],a=e[t][1],s=e[t][2];if(0==+a)n=o=i=s;else{let e=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},t=s<.5?s*(1+a):s+a-s*a,l=2*s-t;n=e(l,t,r+1/3),o=e(l,t,r),i=e(l,t,r-1/3)}e[t][0]=Math.round(255*n),e[t][1]=Math.round(255*o),e[t][2]=Math.round(255*i)}}(t),function(e){let t=[],n="";for(let o=0;o<e.length;o++){let i=e[o];n="#";for(let e=0;e<i.length;e++){let t=Number(i[e]).toString(16);"0"===t&&(t+=t),n+=t}t.push(n)}return t}(t)}he.padLeftZero=function(e,t){return(e+t).substr(t.length)},he.formatDate=function(e,t){/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));let n={"M+":e.getMonth()+1,"d+":e.getDate(),"H+":e.getHours(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(let o in n)if(new RegExp(`(${o})`).test(t)){let e=n[o]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?e:he.padLeftZero("00",e))}return t},he.getToday=function(){let e=new Date,t=Number(e.getMonth())+1;return e.getFullYear()+"-"+he.padLeftZero("00",t+"")+"-"+he.padLeftZero("00",e.getDate()+"")},he.getTomorrow=function(e){let t;t=e?new Date(e):new Date,t.setDate(t.getDate()+1);let n=Number(t.getMonth())+1;return t.getFullYear()+"-"+he.padLeftZero("00",n+"")+"-"+he.padLeftZero("00",t.getDate()+"")},he.getWeekFirstDay=function(){let e=new Date,t=new Date(e-864e5*(e.getDay()-1)),n=Number(t.getMonth())+1;return t.getFullYear()+"-"+he.padLeftZero("00",n+"")+"-"+he.padLeftZero("00",t.getDate()+"")},he.getWeekLastDay=function(){let e=new Date,t=new Date(e-864e5*(e.getDay()-1)),n=new Date(1e3*(t/1e3+518400)),o=Number(n.getMonth())+1;return n.getFullYear()+"-"+he.padLeftZero("00",o+"")+"-"+he.padLeftZero("00",n.getDate()+"")},he.getMonthFirstDay=function(){let e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1),n=Number(t.getMonth())+1;return t.getFullYear()+"-"+he.padLeftZero("00",n+"")+"-"+he.padLeftZero("00",t.getDate()+"")},he.getMonthLastDay=function(e){let t;t=e?new Date(e):new Date;let n=new Date(t.getFullYear(),t.getMonth()+1,1),o=new Date(n-864e5),i=Number(o.getMonth())+1;return o.getFullYear()+"-"+he.padLeftZero("00",i+"")+"-"+he.padLeftZero("00",o.getDate()+"")},he.getNextMonthFirstDay=function(e){let t;t=e?new Date(e):new Date;let n=new Date(t.getFullYear(),t.getMonth()+1,1),o=Number(n.getMonth())+1;return n.getFullYear()+"-"+he.padLeftZero("00",o+"")+"-"+he.padLeftZero("00",n.getDate()+"")},he.getPreMonthFirstDay=function(e){let t;t=e?new Date(e):new Date;let n=new Date(t.getFullYear(),t.getMonth()-1,1),o=Number(n.getMonth())+1;return n.getFullYear()+"-"+he.padLeftZero("00",o+"")+"-"+he.padLeftZero("00",n.getDate()+"")},he.getYearFirstDay=function(){return(new Date).getFullYear()+"-01-01"},he.getYearLastDay=function(){return(new Date).getFullYear()+"-12-31"},he.getWeek=function(e){return new Date(e).getDay()},he.copy=D,he.getUrlParam=function(e){let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.href.split("?"),o="";return n.length>1&&(o=n[1].match(t)),o||n.length>2&&(o=n[2].match(t)),o?decodeURI(o[2]):""},he.formatNumber=function(e,t,n){let o=0;e?isNaN(e)||(e+=""):e="0",t?2===t.length&&Number(t[1])&&(o=Number(t[1])):t="n";let i=Number(e).toFixed(o);t.startsWith("p")&&(i=(100*Number(e)).toFixed(o));let r=i.split("."),a="",s="";if(r.length>0&&(a=r[0]),t.startsWith("c")&&(a=a.replace(/(\d)(?=(?:\d{3})+$)/g,"$1,")),r.length>1&&(s=r[1]),s){let e=s;if(n)for(let t=s.length-1;t>=0&&0===Number(s[t]);t--)e=e.slice(0,-1);s=e}let l="";return l=s?a+"."+s:a,t.startsWith("p")&&(l+="%"),l},he.precisionNumber=function(e,t){let n=0;return e?isNaN(e)||(e+=""):e="0",t?2===t.length&&(Number(t[1])&&(n=Number(t[1])),t.startsWith("p")&&(n+=2)):t="n",Number(e).toFixed(n)},he.getColorList=function(e,t){let n=Number(t)-e.length;if(0===n)return e;let o=Ae(n),i=!1;for(;;){i=!1;for(let t=0;t<o.length;t++)for(let n=0;n<e.length;n++)if(o[t]===e[n]){i=!0;break}if(!i){o=e.concat(o);break}o=Ae(n)}return o},he.getColor=function(){return Ae(1)[0]},he.getGlobalColor=function(e,t,n,o){let i=[];if(e>0){let r=o.$Store.state.app.mychartColor[n];e>r.length?t?(i=o.$Method.getColorList(r,e),o.$nextTick((()=>{o.$Store.commit("setMychartColor",n,i)}))):i=r.concat(r.slice(0,e-r.length)):i=r.slice(0,e)}return i},he.getHeight=function(e){return e.$Store.state.app.clientHeight},he.getWidth=function(e){return e.$Store.state.app.clientWidth},he.getXDpi=function(){let e=0;if(window.screen.deviceXDPI)e=window.screen.deviceXDPI;else{let t=document.createElement("DIV");t.style.cssText="width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden",document.body.appendChild(t),e=parseInt(t.offsetWidth),document.body.removeChild(t)}return e},he.getYDpi=function(){let e=0;if(window.screen.deviceXDPI)e=window.screen.deviceYDPI;else{let t=document.createElement("DIV");t.style.cssText="width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden",document.body.appendChild(t),e=parseInt(t.offsetHeight),document.body.removeChild(t)}return e},he.mmToYpixe=function(e,t){let n=t;return n||(n=he.getYDpi()),Number((e/25.4*n).toFixed(2))},he.mmToXpixe=function(e,t){let n=t;return n||(n=he.getXDpi()),Number((e/25.4*n).toFixed(2))},he.xPixelToMm=function(e,t){let n=t;return n||(n=he.getXDpi()),Number((e/n*25.4).toFixed(2))},he.yPixelToMm=function(e,t){let n=t;return n||(n=he.getYDpi()),Number((e/n*25.4).toFixed(2))},he.unique=function(e){const t=new Map;return e.filter((e=>!t.has(e)&&t.set(e,1)))},he.formatComboBox=function(e,t){if(!e&&0!==e)return e;if(null==t.renderValue&&(t.renderValue={}),t.renderValue[e])return t.renderValue[e];let n=e;if(t.data&&t.data.length>0){let o="code",i="name";t.valueField&&(o=t.valueField),t.textField&&(i=t.textField);const r=t.data.findIndex((t=>t[o]===e));r>-1&&t.data[r][i]&&(n=!1===t.codeWithName?t.data[r][i]:"["+e+"]"+t.data[r][i])}return t.renderValue[e]=n,n},he.formatDataBox=function(e,t){return e?(null==t.renderFormat&&(t.renderFormat="yyyy-MM-dd",t&&void 0===t.format?"date"===t.vtype?t.renderFormat="yyyy-MM-dd":"datetime"===t.vtype?t.renderFormat="yyyy-MM-dd hh:mm:ss":"month"===t.vtype&&(t.renderFormat="yyyy-MM"):t.format&&(t.renderFormat=t.format)),"string"==typeof e||"number"==typeof e?he.formatDate(new Date(e),t.renderFormat):e.constructor===Date?he.formatDate(e,t.renderFormat):e):""},he.formatValue=function(e,t,n){if(n){if(n.type){let o=n.type.toLowerCase();return"textbox"===o?e:"numberbox"===o||"numberboxv1"===o?e||e!==n.defaultValue?he.formatNumber(e,n.format,n.notzero):e:"combobox"===o?he.formatComboBox(e,n):"datebox"===o?he.formatDataBox(e,n):n.textName?t[n.textName]?t[n.textName]:e||"":e}return e}return e},he.getDefaultFieldStyle=function(e,t,n){let o="";if("DateBox"===e.type){let t="";t=void 0!==e.format?e.format:"date"===e.vtype?"yyyy-MM-dd":"datetime"===e.vtype?"yyyy-MM-dd hh:mm:ss":"month"===e.vtype?"yyyy-MM":"yyyy-MM-dd",o=o+"d="+t+"=center"}if("NumberBox"===e.type){let t="";t=void 0!==e.format?e.format:"n2",o=o+t+"=right"}if("ComboBox"===e.type){let i=e.dictkey;i||(i=e.name);let r="t="+i;!1===e.codeWithName?r+="=N":r+="=Y",o=o+r+"=left";let a="code",s="name";e.valueField&&(a=e.valueField),e.textField&&(s=e.textField),t[i]&&!n[i]?(n[i]=[],t[i].forEach((e=>{let t={};t.code=e[a],t.name=e[s],n[i].push(t)}))):null!=e.data&&(n[i]=he.copy(e.data))}return o},he.getGridField=function(e,t,n,o){let i="";for(let r=0;r<e.length;r++){let a=e[r];if(!1!==a.visible&&!1!==a.isExport){if(a.name){i+=a.name+t+a.label;let e="";a.excel&&a.excel.type?(e=a.excel.type,a.excel.format?e+="="+a.excel.format:e+="=",a.excel.align?e+="="+a.excel.align:e+="="):e=he.getDefaultFieldStyle(a,n,o),i+=e?t+e+",":","}if(a.children)for(let e=0;e<a.children.length;e++){let r=a.children[e];if(r.name){let e="";e=a.label?a.label+"("+r.label+")":r.label,i+=r.name+t+e;let s="";r.excel&&r.excel.type?(s=r.excel.type,r.excel.format?s+="="+r.excel.format:s+="=",r.excel.align?s+="="+r.excel.align:s+="="):s=he.getDefaultFieldStyle(r,n,o),i+=s?t+s+",":","}}}}return i.length>0&&(i=i.substring(0,i.length-1)),i},he.print=function(e,t){let n="<html><head>"+document.head.innerHTML+"</head>";n=e?n+"<body>"+e.$el.innerHTML+"</body></html>":n+"<body>"+document.body.innerHTML+"</body></html>";let o=window.open("Print.htm","print");if(o.document.write(n),t){let e=document.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t,o.document.getElementsByTagName("head")[0].appendChild(e)}o.document.close(),o.print(),o.close()},he.openPage=function(e,t){let n={};n.moduleCode=e,n.params=t,window.EfuMessenger.openPortalTabByModuleCode(n)},he.setLocalStorage=function(e,t,n){let o={};o.data=t,o.time=Date.now(),o.expire=n,ee.set(e,JSON.stringify(o))},he.getLocalStorage=function(e){let t=ee.get(e);if(!t)return null;t=JSON.parse(t);let n=60*Number(t.expire)*60*1e3;return Date.now()-t.time>n?(ee.remove(e),null):t.data},he.getTextWidth=function(e){const t=document.createElement("span");t.style.display="inline-block;",t.textContent=e,document.body.appendChild(t);const n=t.offsetWidth;return document.body.removeChild(t),100*Math.ceil(n/100)+40},he.changeMoneyToChinese=function(e){let t,n,o,i=new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"),r=new Array("","拾","佰","仟"),a=new Array("","万","亿","兆"),s=new Array("角","分","毫","厘"),l="";if(""==e)return"";if((e=parseFloat(e))>=1e15)return this.alert("超出最大处理数字"),"";if(0==e)return l=i[0]+"元",l;if(e<0&&(l="负",e*=-1),-1===(e=e.toString()).indexOf(".")?(t=e,n=""):(o=e.split("."),t=o[0],n=o[1].substr(0,4)),parseInt(t,10)>0){let e=0,n=t.length;for(let o=0;o<n;o++){let s=t.substr(o,1),c=n-o-1,u=c/4,d=c%4;"0"==s?e++:(e>0&&(l+=i[0]),e=0,l+=i[parseInt(s)]+r[d]),0==d&&e<4&&(l+=a[u])}l+="元"}if(""!==n){let e=n.length;for(let t=0;t<e;t++){let e=n.substr(t,1);"0"!=e&&(l+=i[Number(e)]+s[t])}}return""===l&&(l+=i[0]+"元"),l},he.exportExcel=function(e,t,n,o){var i=[],r=[];e.forEach((e=>{e.label?i.push(e.label):i.push(e.name),r.push(e.name)}));var a=se(r,t);a.unshift(i);var s="SheetJS";n&&(s=n);var c=new re,u=ie(a);c.SheetNames.push(s),c.Sheets[s]=u;var d=x.write(c,{bookType:"xlsx",bookSST:!1,type:"binary"}),h=o||"列表";l.saveAs(new Blob([ae(d)],{type:"application/octet-stream"}),h+".xlsx")},he.exportMultiSheetExcel=function(e,t){var n=new re,o=[],i=[],r="";e.forEach(((e,t)=>{o=[],i=[],e.config.forEach((e=>{e.label?o.push(e.label):o.push(e.name),i.push(e.name)}));var a=se(i,e.data);a.unshift(o),r="SheetJS"+t,e.sheetName&&(r=e.sheetName),n.SheetNames.push(r),n.Sheets[r]=ie(a)}));var a=x.write(n,{bookType:"xlsx",bookSST:!1,type:"binary"}),s=t||"列表";l.saveAs(new Blob([ae(a)],{type:"application/octet-stream"}),s+".xlsx")},he.exportExcelStyle=function(e,t,n,o){let i=[];for(let l=0;l<n;l++)i.push([]);let r=[];le(e,i,0,r);let a=[],s=[];!function(e,t,n,o){let i=0;for(let r=0;r<t.length;r++){let a=new Array(e.length).fill("");i=0;let s="";for(let e=0;e<t[r].length;e++){if(t[r][e].fIndex||0===t[r][e].fIndex){let n=t[r-1][t[r][e].fIndex].sIndex;s!==n&&(i=n,s=n)}a[i]=t[r][e].label,t[r][e].sIndex=i;let n={s:{}};n.s.r=r,n.s.c=i,n.e={},n.e.r=n.s.r,i+=t[r][e].num,1===t[r][e].num?0===r&&(n.e.r=t.length-1,n.e.c=n.s.c):n.e.c=i-1,r!==t.length-1&&o.push(n)}n.push(a)}}(r,i,s,a);let c=[];r.forEach((e=>{c.push({wpx:e.width})})),t.forEach((e=>{let t=[];r.forEach((n=>{if("n"===n.excelPro.t)t.push(Number(e[n.name]));else if("d"===n.excelPro.t){let o=oe(new Date(e[n.name]));t.push(o),n.excelPro.t="n"}else t.push(e[n.name])})),s.push(t)}));let u=r.length,d={font:{name:"宋体",sz:9,bold:!0},border:{top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}},alignment:{horizontal:"center",vertical:"center",wrapText:!0}},h={font:{name:"宋体",sz:9},border:{top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}}},A="example.xlsx";o&&(A=o);const f=x.utils.book_new(),p=x.utils.aoa_to_sheet(s);x.utils.book_append_sheet(f,p,"Sheet1"),a.length>0&&(p["!merges"]=a);let g=0;for(let l in p)if("!merges"!==l&&"!ref"!==l&&"!cols"!==l){if(p[l].s=d,g<u*n)p[l].s=d;else{let e=Object.assign({},{},h),t=g%u;Object.assign(e,r[t].excelPro),p[l].s=e}g++}p["!cols"]=c;let m=B.write(f,{bookType:"xlsx",bookSST:!1,type:"binary"});l.saveAs(new Blob([ae(m)],{type:"application/octet-stream"}),A)};let fe={Config:{},customQueryConfig:function(e){return e.isTree?(e.popControl="SimpleTree",e.width||(e.width=.4)):(e.popControl="SimpleViewGrid",e.width?Number(e.width)<.55&&(e.width=.55):e.width=.55),e}};var pe={caseMethod:K,commonMethod:he,query:fe};function ge(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{}}const me="function"==typeof Proxy;let ye,ve;function Ce(){return void 0!==ye||("undefined"!=typeof window&&window.performance?(ye=!0,ve=window.performance):"undefined"!=typeof globalThis&&(null===(e=globalThis.perf_hooks)||void 0===e?void 0:e.performance)?(ye=!0,ve=globalThis.perf_hooks.performance):ye=!1),ye?ve.now():Date.now();var e}class be{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const r in e.settings){const t=e.settings[r];n[r]=t.defaultValue}const o=`__vue-devtools-plugin-settings__${e.id}`;let i=Object.assign({},n);try{const e=localStorage.getItem(o),t=JSON.parse(e);Object.assign(i,t)}catch(dV){}this.fallbacks={getSettings:()=>i,setSettings(e){try{localStorage.setItem(o,JSON.stringify(e))}catch(dV){}i=e},now:()=>Ce()},t&&t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((n=>{this.targetQueue.push({method:t,args:e,resolve:n})}))})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function we(e,t){const n=e,o=ge(),i=ge().__VUE_DEVTOOLS_GLOBAL_HOOK__,r=me&&n.enableEarlyProxy;if(!i||!o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&r){const e=r?new be(n,i):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else i.emit("devtools-plugin:setup",e,t)}
|
|
2
2
|
/*!
|
|
3
3
|
* vuex v4.1.0
|
|
4
4
|
* (c) 2022 Evan You
|
|
5
5
|
* @license MIT
|
|
6
|
-
*/function xe(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Be(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Ee(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;ke(e,n,[],e._modules.root,!0),_e(e,n,t)}function _e(e,t,n){var o=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,a={},s={},l=c.effectScope(!0);l.run((function(){xe(r,(function(t,n){a[n]=function(e,t){return function(){return e(t)}}(t,e),s[n]=c.computed((function(){return a[n]()})),Object.defineProperty(e.getters,n,{get:function(){return s[n].value},enumerable:!0})}))})),e._state=c.reactive({data:t}),e._scope=l,e.strict&&function(e){c.watch((function(){return e._state.data}),(function(){}),{deep:!0,flush:"sync"})}(e),o&&n&&e._withCommit((function(){o.data=null})),i&&i.stop()}function ke(e,t,n,o,i){var r=!n.length,a=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=o),!r&&!i){var s=De(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){s[l]=o.state}))}var c=o.context=function(e,t,n){var o=""===t,i={dispatch:o?e.dispatch:function(n,o,i){var r=Oe(n,o,i),a=r.payload,s=r.options,l=r.type;return s&&s.root||(l=t+l),e.dispatch(l,a)},commit:o?e.commit:function(n,o,i){var r=Oe(n,o,i),a=r.payload,s=r.options,l=r.type;s&&s.root||(l=t+l),e.commit(l,a,s)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return Se(e,t)}},state:{get:function(){return De(e.state,n)}}}),i}(e,a,n);o.forEachMutation((function(t,n){!function(e,t,n,o){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,o.state,t)}))}(e,a+n,t,c)})),o.forEachAction((function(t,n){var o=t.root?n:a+n,i=t.handler||t;!function(e,t,n,o){(e._actions[t]||(e._actions[t]=[])).push((function(t){var i,r=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return(i=r)&&"function"==typeof i.then||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}(e,o,i,c)})),o.forEachGetter((function(t,n){!function(e,t,n,o){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)}}(e,a+n,t,c)})),o.forEachChild((function(o,r){ke(e,t,n.concat(r),o,i)}))}function Se(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,o)===t){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function De(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Oe(e,t,n){var o;return null!==(o=e)&&"object"==typeof o&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Fe="vuex:mutations",Te="vuex:actions",Ie="vuex",Ne=0;function Re(e,t){we({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(n){n.addTimelineLayer({id:Fe,label:"Vuex Mutations",color:Pe}),n.addTimelineLayer({id:Te,label:"Vuex Actions",color:Pe}),n.addInspector({id:Ie,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===Ie)if(n.filter){var o=[];Le(o,t._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[Ue(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===Ie){var o=n.nodeId;Se(t,o),n.state=function(e,t,n){t="root"===n?t:t[n];var o=Object.keys(t),i={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var r=function(e){var t={};return Object.keys(e).forEach((function(n){var o=n.split("/");if(o.length>1){var i=t,r=o.pop();o.forEach((function(e){i[e]||(i[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),i=i[e]._custom.value})),i[r]=je((function(){return e[n]}))}else t[n]=je((function(){return e[n]}))})),t}(t);i.getters=Object.keys(r).map((function(e){return{key:e.endsWith("/")?Ve(e):e,editable:!1,value:je((function(){return r[e]}))}}))}return i}((i=t._modules,(a=(r=o).split("/").filter((function(e){return e}))).reduce((function(e,t,n){var o=e[t];if(!o)throw new Error('Missing module "'+t+'" for path "'+r+'".');return n===a.length-1?o:o._children}),"root"===r?i:i.root._children)),"root"===o?t.getters:t._makeLocalGettersCache,o)}var i,r,a})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===Ie){var o=n.nodeId,i=n.path;"root"!==o&&(i=o.split("/").filter(Boolean).concat(i)),t._withCommit((function(){n.set(t._state.data,i,n.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(Ie),n.sendInspectorState(Ie),n.addTimelineEvent({layerId:Fe,event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=Ne++,e._time=Date.now(),o.state=t,n.addTimelineEvent({layerId:Te,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},i=Date.now()-e._time;o.duration={_custom:{type:"duration",display:i+"ms",tooltip:"Action duration",value:i}},e.payload&&(o.payload=e.payload),o.state=t,n.addTimelineEvent({layerId:Te,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var Pe=8702998,Me={label:"namespaced",textColor:16777215,backgroundColor:6710886};function Ve(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function Ue(e,t){return{id:t||"root",label:Ve(t),tags:e.namespaced?[Me]:[],children:Object.keys(e._children).map((function(n){return Ue(e._children[n],t+n+"/")}))}}function Le(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[Me]:[]}),Object.keys(t._children).forEach((function(i){Le(e,t._children[i],n,o+i+"/")}))}function je(e){try{return e()}catch(dV){return dV}}var $e=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},Qe={namespaced:{configurable:!0}};Qe.namespaced.get=function(){return!!this._rawModule.namespaced},$e.prototype.addChild=function(e,t){this._children[e]=t},$e.prototype.removeChild=function(e){delete this._children[e]},$e.prototype.getChild=function(e){return this._children[e]},$e.prototype.hasChild=function(e){return e in this._children},$e.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},$e.prototype.forEachChild=function(e){xe(this._children,e)},$e.prototype.forEachGetter=function(e){this._rawModule.getters&&xe(this._rawModule.getters,e)},$e.prototype.forEachAction=function(e){this._rawModule.actions&&xe(this._rawModule.actions,e)},$e.prototype.forEachMutation=function(e){this._rawModule.mutations&&xe(this._rawModule.mutations,e)},Object.defineProperties($e.prototype,Qe);var He=function(e){this.register([],e,!1)};function ze(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return;ze(e.concat(o),t.getChild(o),n.modules[o])}}He.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},He.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},He.prototype.update=function(e){ze([],this.root,e)},He.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var i=new $e(t,n);0===e.length?this.root=i:this.get(e.slice(0,-1)).addChild(e[e.length-1],i);t.modules&&xe(t.modules,(function(t,i){o.register(e.concat(i),t,n)}))},He.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},He.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Ke=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var i=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new He(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=i;var r=this,a=this.dispatch,s=this.commit;this.dispatch=function(e,t){return a.call(r,e,t)},this.commit=function(e,t,n){return s.call(r,e,t,n)},this.strict=o;var l=this._modules.root.state;ke(this,l,[],this._modules.root),_e(this,l),n.forEach((function(e){return e(t)}))},Ge={state:{configurable:!0}};Ke.prototype.install=function(e,t){e.provide(t||"store",this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&Re(e,this)},Ge.state.get=function(){return this._state.data},Ge.state.set=function(e){},Ke.prototype.commit=function(e,t,n){var o=this,i=Oe(e,t,n),r=i.type,a=i.payload,s={type:r,payload:a},l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,o.state)})))},Ke.prototype.dispatch=function(e,t){var n=this,o=Oe(e,t),i=o.type,r=o.payload,a={type:i,payload:r},s=this._actions[i];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(dV){}var l=s.length>1?Promise.all(s.map((function(e){return e(r)}))):s[0](r);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,n.state)}))}catch(dV){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(dV){}t(e)}))}))}},Ke.prototype.subscribe=function(e,t){return Be(e,this._subscribers,t)},Ke.prototype.subscribeAction=function(e,t){return Be("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},Ke.prototype.watch=function(e,t,n){var o=this;return c.watch((function(){return e(o.state,o.getters)}),t,Object.assign({},n))},Ke.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Ke.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),ke(this,this.state,e,this._modules.get(e),n.preserveState),_e(this,this.state)},Ke.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete De(t.state,e.slice(0,-1))[e[e.length-1]]})),Ee(this)},Ke.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},Ke.prototype.hotUpdate=function(e){this._modules.update(e),Ee(this,!0)},Ke.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Ke.prototype,Ge);const qe={state:{clientHeight:window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,clientWidth:window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,mychartColor:{pie:["#FF8636","#028154","#FC635B","#FDBA4F","#436EFD","#7ACBBD","#6882FF","#819DE4"],bar:["#627AE1","#8CBBFF","#8CE8BB"],line:["#01332F","#627AE1","#ED6A4C"]},floorMap:{}},mutations:{setClientHeight(e){e.clientHeight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height},setClientWidth(e){e.clientWidth=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width},setMychartColor(e,t,n){let o=[];n&&n.forEach((e=>{e&&o.push(e)})),e.mychartColor[t]=o},setFloorMap(e,t){Object.assign(e.floorMap,t)}}};var We=new Ke({state:{},mutations:{},actions:{},modules:{app:qe}}),Xe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n};var Ye=Xe({name:"ebutton",data:()=>({visible:!0,btn:{},colorStyle:{selected:"#2d8cf0",unselected:"#3f414d",disabled:"#c5c8ce"},mouseStyle:{usable:"cursor: pointer",disabled:"cursor:not-allowed"},iconStyle:{seletedSize:40,unseletedSize:30},divStyle:"cursor: pointer",disabled:!1,iconSize:30,fontStyle:"font-size: 10px;color:#3f414d",iconColor:"#3f414d"}),props:{config:{type:Object,default:null},amplify:{type:Boolean,default:!0},dynamic:{type:Boolean,default:!0},type:{type:String,default:""},size:{type:Number,default:30},color:{type:String,default:""},text:{type:String,default:""},fontsize:{type:String,default:"10px"},fontplacement:{validator:e=>S(e,["bottom","right"]),default:"bottom"}},created(){this.config?(this.btn=this.config,this.config.size&&(this.iconSize=this.config.size),this.config.color&&(this.iconColor=this.config.color)):(this.btn.iconcls=this.type,this.btn.text=this.text,this.iconSize=this.size,this.iconColor=this.color),this.setStyle("unselected")},methods:{doAction(e){this.disabled||this.$emit("click",e)},changeActive(){this.dynamic&&this.setStyle("selected")},removeActive(){this.dynamic&&this.setStyle("unselected")},setStyle(e){switch(e){case"selected":this.disabled||(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.selected,this.amplify&&(this.iconSize=this.iconStyle.seletedSize,this.iconColor=this.colorStyle.selected));break;case"unselected":this.disabled||(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.unselected,this.amplify&&(this.iconSize=this.iconStyle.unseletedSize,this.iconColor=this.colorStyle.unselected));break;case"disabled":this.disabled?(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.disabled,this.amplify&&(this.iconSize=this.iconStyle.unseletedSize,this.iconColor=this.colorStyle.disabled),this.divStyle=this.mouseStyle.disabled):(this.divStyle=this.mouseStyle.usable,this.setStyle("unselected"))}},setEnabled(e){this.disabled=e,this.setStyle("disabled")},setVisible(e){this.visible=e}}},[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("CommonIcon"),s=c.resolveComponent("Span"),l=c.resolveComponent("Col"),u=c.resolveComponent("Row");return i.visible?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(i.divStyle),onClick:t[0]||(t[0]=e=>r.doAction(i.btn.name)),onMouseover:t[1]||(t[1]=e=>r.changeActive(e)),onMouseout:t[2]||(t[2]=e=>r.removeActive(e))},[c.createVNode(u,{type:"flex",justify:"center"},{default:c.withCtx((()=>[c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(a,{type:i.btn.iconcls,size:i.iconSize,color:i.iconColor},null,8,["type","size","color"]),c.withDirectives(c.createVNode(s,{style:c.normalizeStyle(i.fontStyle)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(i.btn.text),1)])),_:1},8,["style"]),[[c.vShow,"right"===n.fontplacement&&void 0!==i.btn.text]])])),_:1})])),_:1}),c.withDirectives(c.createVNode(u,{type:"flex",justify:"center"},{default:c.withCtx((()=>[c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(s,{style:c.normalizeStyle(i.fontStyle)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(i.btn.text),1)])),_:1},8,["style"])])),_:1})])),_:1},512),[[c.vShow,"bottom"===n.fontplacement&&void 0!==i.btn.text]])],36)):c.createCommentVNode("",!0)}]]);const Je={name:"Toolbar",data:()=>({globalConfig:{moduleMethod:[]},btnList:[],myConfig:{spacing:16},modulecode:"",token:"",buttonSize:"default",btnShow:!0,showType:!0,visible:!0,showAddData:!1,showBatchAction:!1,vjustify:"center",defaultStatus:{N:["saveData"],V:["addData","editData","auditData","delData"],E:["addData","saveData","delData"],S:["addData","editData","auditData","delData","printData"],A:["addData","copyData","cancelData"],C:["addData","printData"],D:["addData"]},defaultRule:{billstatus:{Y:["addData","cancelData","printData"],N:["addData","editData","auditData","delData","printData"],C:["addData","printData"]}}}),props:{type:{validator:e=>S(e,["horizontal","vertical"]),default:"vertical"},config:{type:Object,default:()=>({})},amplify:{type:Boolean,default:!0},fontplacement:{validator:e=>S(e,["bottom","right"]),default:"right"},showback:{type:Boolean,default:!1},tooltype:{type:String,default:"form"},btntype:{validator:e=>S(e,["Button","Ebutton"]),default:"Ebutton"},moduleMethod:{type:Array,default:()=>[]},billmoduleid:{type:String,default:""},checkBtn:{type:Boolean,default:!1},row:{type:Object,default:()=>({})}},created(){this.init()},components:{Ebutton:Ye},methods:{init(){this.config&&(this.myConfig=Object.assign({},this.myConfig,this.config)),this.myConfig.items||(this.myConfig.items=[]),this.myConfig.buttonSize&&(this.buttonSize=this.myConfig.buttonSize),this.moduleMethod.length>0&&(this.globalConfig.moduleMethod=this.$Method.copy(this.moduleMethod)),this.filterBtn(),this.btnList.length>0?this.visible=!0:"batch"===this.tooltype?this.visible=this.showAddData:this.visible=!1,this.btnList.forEach((e=>{void 0===e.visible&&(e.visible=!0)}))},filterBtn(){this.checkBtn&&this.getModuleMethod(),this.filterBtnByToken()},getModuleMethod(){if(this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid")),this.billmoduleid&&(this.modulecode=this.billmoduleid),this.token=this.$Method.getUrlParam("token"),this.modulecode&&this.token){let e=this.getUserModuleMethod(this.modulecode);e&&(this.globalConfig.moduleMethod=e.modulemethod)}},filterBtnByToken(){let e=this.commonFilterBtn(),t=[],n=[],o=[];if(e.forEach((e=>{"addData"===e.name&&(this.showAddData=!0),"batch"===e.iconcls?o.push(e):"row"===e.iconcls?n.push(e):t.push(e)})),o.length>0&&(this.showBatchAction=!0),"batch"===this.tooltype)this.btnList=this.$Method.copy(o);else if("row"===this.tooltype)this.btnList=this.$Method.copy(n);else{if("right"===this.fontplacement&&(this.vjustify="start"),this.btnList=this.$Method.copy(t),this.isBillImport()){let e={};this.myConfig.importbtn&&"{}"!==JSON.stringify(this.myConfig.importbtn)?(e=Object.assign({},{iconcls:"_download",name:"downTemplate",text:"导入模版"},this.myConfig.backbtn),e.name="downTemplate"):e={iconcls:"_download",name:"downTemplate",text:"导入模版"},e.visible=!0,this.btnList.push(e)}if(this.showback){let e={};this.myConfig.backbtn&&"{}"!==JSON.stringify(this.myConfig.backbtn)?(e=Object.assign({},{iconcls:"_back",name:"back",text:"返回"},this.myConfig.backbtn),e.name="back"):e={iconcls:"_back",name:"back",text:"返回"},e.visible=!0,this.btnList.push(e)}this.initStatus()}},commonFilterBtn(){if(this.globalConfig.moduleMethod.length<=0)return this.myConfig.items;let e=[];this.globalConfig.moduleMethod.forEach((t=>{let n=this.myConfig.items.findIndex((e=>e.name===t.name));n>-1&&e.push(this.$Method.copy(this.myConfig.items[n]))}));let t=this.myConfig.items.findIndex((e=>"editRowForm"===e.name));return t>-1&&e.push(this.$Method.copy(this.myConfig.items[t])),e},initStatus(){this.myConfig.status?Object.keys(this.defaultStatus).forEach((e=>{void 0===this.myConfig.status[e]&&(this.myConfig.status[e]=[]);let t=this.myConfig.status[e].concat(this.defaultStatus[e]);this.myConfig.status[e]=this.uniqueArr(t)})):this.myConfig.status=this.$Method.copy(this.defaultStatus),this.myConfig.rule?Object.keys(this.defaultRule).forEach((e=>{this.myConfig.rule[e]&&Object.keys(this.defaultRule[e]).forEach((t=>{this.defaultStatus[e]?(void 0===this.myConfig.rule[e][t]&&(this.myConfig.rule[e][t]=[]),void 0===this.defaultStatus[e][t]&&(this.defaultStatus[e][t]=[])):(this.defaultStatus[e]={},this.defaultStatus[e][t]=[],void 0===this.myConfig.rule[e][t]&&(this.myConfig.rule[e][t]=[]));let n=this.myConfig.rule[e][t].concat(this.defaultStatus[e][t]);this.myConfig.rule[e][t]=this.uniqueArr(n)}))})):this.myConfig.rule=this.$Method.copy(this.defaultRule)},click(e){let t={};t.name=e,this.$emit("doAction",t)},changedStatusCommon(e){this.btnList.forEach((e=>{this.setReadOnly(e.name,!0)})),e||(e=[]),(e=e.concat(["back","downTemplate","editRowForm"])).forEach((e=>{this.setReadOnly(e,!1)}))},changedStatus(e){if(e){let t=this.myConfig.status[e];this.changedStatusCommon(t)}},isBillImport(){return this.btnList.some((e=>"billImport"===e.name))},gridChangedStatus(e,t){if(this.myConfig&&this.myConfig.rule&&this.myConfig.rule[e]){let n=this.myConfig.rule[e][t];this.changedStatusCommon(n)}},uniqueArr(e){let t=[];for(let n=0,o=e.length;n<o;n++){for(let t=n+1;t<o;t++)e[n]===e[t]&&(t=++n);t.push(e[n])}return t},action(e){let t={};t.name=e,this.$emit("doAction",t)},getType:e=>e.type?e.type:"text",setVisible(e,t,n){let o=this.btntype;if(n&&(o=n),"Ebutton"===o)this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setVisible(t);else{const n=this.btnList.findIndex((t=>t.name===e));if(n>-1){let e=this.$Method.copy(this.btnList[n]);e.visible=t,this.btnList.splice(n,1,e)}}},setReadOnly(e,t,n){let o=this.btntype;if(n&&(o=n),"Ebutton"===o)this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setEnabled(t);else{const n=this.btnList.findIndex((t=>t.name===e));if(n>-1){let e=this.$Method.copy(this.btnList[n]);e.disabled=t,this.btnList.splice(n,1,e)}}}},mounted(){let e=this;e.config.customInit&&e.config.customInit(e.row,e)}},Ze={key:0},et={key:0},tt={href:"javascript:void(0)"};var nt=Xe(Je,[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Ebutton"),s=c.resolveComponent("Button"),l=c.resolveComponent("Col"),u=c.resolveComponent("Row"),d=c.resolveComponent("CommonIcon"),h=c.resolveComponent("DropdownItem"),A=c.resolveComponent("DropdownMenu"),f=c.resolveComponent("Dropdown");return c.withDirectives((c.openBlock(),c.createElementBlock("div",null,["form"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[i.visible?(c.openBlock(),c.createElementBlock("div",Ze,["horizontal"===n.type?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"start",gutter:i.myConfig.spacing},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(l,{key:"btn_"+t},{default:c.withCtx((()=>["Ebutton"===n.btntype?(c.openBlock(),c.createBlock(a,{key:0,ref_for:!0,ref:e.name,config:e,onClick:r.click,amplify:n.amplify,fontplacement:n.fontplacement,dynamic:i.myConfig.btnDynamic},null,8,["config","onClick","amplify","fontplacement","dynamic"])):c.createCommentVNode("",!0),"Button"===n.btntype?(c.openBlock(),c.createBlock(s,{key:1,ref_for:!0,ref:e.name,onClick:t=>r.action(e.name),icon:e.iconcls,type:e.type,size:i.buttonSize,disabled:e.disabled},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["onClick","icon","type","size","disabled"])):c.createCommentVNode("",!0)])),_:2},1024)),[[c.vShow,e.visible]]))),128))])),_:1},8,["gutter"])):c.createCommentVNode("",!0),"vertical"===n.type?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.btnList,((e,t)=>(c.openBlock(),c.createBlock(u,{type:"flex",justify:i.vjustify,key:"btn_"+t,style:{"margin-top":"5px"}},{default:c.withCtx((()=>["Ebutton"===n.btntype?(c.openBlock(),c.createBlock(a,{key:0,ref_for:!0,ref:e.name,config:e,onClick:r.click,amplify:n.amplify,fontplacement:n.fontplacement,dynamic:i.myConfig.btnDynamic},null,8,["config","onClick","amplify","fontplacement","dynamic"])):c.createCommentVNode("",!0),"Button"===n.btntype?c.withDirectives((c.openBlock(),c.createBlock(s,{key:1,ref_for:!0,ref:e.name,onClick:t=>r.action(e.name),icon:e.iconcls,type:e.type,size:i.buttonSize},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["onClick","icon","type","size"])),[[c.vShow,e.visible]]):c.createCommentVNode("",!0)])),_:2},1032,["justify"])))),128)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),"row"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[i.visible?(c.openBlock(),c.createElementBlock("div",et,[i.showType?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"center",gutter:8},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(l,{key:"btn_"+t},{default:c.withCtx((()=>[!0===i.myConfig.icon?(c.openBlock(),c.createBlock(s,{key:0,size:"small",type:r.getType(e),icon:e.icon,"custom-icon":e.customIcon,onClick:t=>r.action(e.name)},null,8,["type","icon","custom-icon","onClick"])):(c.openBlock(),c.createBlock(s,{key:1,size:"small",type:r.getType(e),onClick:t=>r.action(e.name)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["type","onClick"]))])),_:2},1024)),[[c.vShow,e.visible]]))),128))])),_:1})):c.createCommentVNode("",!0),i.showType?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(f,{key:1,onOnClick:r.action},{list:c.withCtx((()=>[c.createVNode(A,null,{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(h,{key:"btndropdown_"+t,name:e.name},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["name"])),[[c.vShow,e.visible]]))),128))])),_:1})])),default:c.withCtx((()=>[c.createElementVNode("a",tt,[t[1]||(t[1]=c.createTextVNode(" 操作 ")),c.createVNode(d,{type:"ios-arrow-down"})])])),_:1},8,["onOnClick"]))])):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),"batch"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[i.visible?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"end",gutter:8},{default:c.withCtx((()=>[i.showAddData?(c.openBlock(),c.createBlock(l,{key:0},{default:c.withCtx((()=>[c.createVNode(s,{icon:"ios-add",onClick:t[0]||(t[0]=e=>r.action("addData"))},{default:c.withCtx((()=>t[2]||(t[2]=[c.createTextVNode("新建")]))),_:1})])),_:1})):c.createCommentVNode("",!0),c.createVNode(l,null,{default:c.withCtx((()=>[i.showBatchAction?(c.openBlock(),c.createBlock(f,{key:0,onOnClick:r.action},{list:c.withCtx((()=>[c.createVNode(A,null,{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(h,{key:"dropbtn_"+t,name:e.name},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["name"])),[[c.vShow,e.visible]]))),128))])),_:1})])),default:c.withCtx((()=>[c.createVNode(s,null,{default:c.withCtx((()=>[t[3]||(t[3]=c.createTextVNode(" 批量操作 ")),c.createVNode(d,{type:"ios-arrow-down"})])),_:1})])),_:1},8,["onOnClick"])):c.createCommentVNode("",!0)])),_:1})])),_:1})):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)],512)),[[c.vShow,i.btnShow]])}]]),ot={name:"size",data:()=>({calHeight:1,calWidth:1,adjustHeight:0,adjustWidth:0}),computed:{clientHeight(){return this.$Store.state.app.clientHeight},clientWidth(){return this.$Store.state.app.clientWidth},currentHeight(){let e=this.clientHeight;return this.calHeight&&(Number(this.calHeight)<=1?(e*=Number(this.calHeight),e=Number(e.toFixed(0))):e=this.calHeight),this.adjustHeight&&(e-=Number(this.adjustHeight)),e},currentWidth(){let e=this.clientWidth;return this.calWidth&&(Number(this.calWidth)<=1?(e*=Number(this.calWidth),e=Number(e.toFixed(1))):e=this.calWidth),this.adjustWidth&&(e-=Number(this.adjustWidth)),e}},methods:{setCalHeight(e){this.calHeight=e},setAdjustHeight(e){this.adjustHeight=e},setCalWidth(e){this.calWidth=e},setAdjustWidth(e){this.adjustWidth=e},setSizeConfig(e){e.height&&this.setCalHeight(e.height),e.width&&this.setCalWidth(e.width),e.adjustHeight&&this.setAdjustHeight(e.adjustHeight),e.adjustWidth&&this.setAdjustWidth(e.adjustWidth)}}};const it={mixins:[ot],data:()=>({globalConfig:{label:"",name:"",readOnly:!1,visible:!0,size:"default",valueChanged:"",placeholder:null,place:"",required:!1},myConfig:{},value:"",oldValue:"",hackReset:!0,showTooltip:!1,isEnter:!1}),props:{config:{type:Object,default:()=>{}},fatherValue:{type:[String,Number,Array],default:""},readOnly:{type:Boolean,default:!1}},created(){this.init()},methods:{init(){this.myConfig=Object.assign({},this.globalConfig,this.myConfig),this.config&&(this.myConfig=Object.assign({},this.myConfig,this.config)),this.customInit&&this.customInit()},_fatherValueToValue(e){return this.fatherValueToValue?this.fatherValueToValue(e):e},_valueToFatherValue(){let e=this.value;if(this.valueToFatherValue)return this.valueToFatherValue();{let t={};return t.value=e,t}},keyDown(e){let t=e+"KeyDown";this[t]&&this[t]()},enterKeyDown(){this.customEnterKeyDown&&this.customEnterKeyDown();let e=this;this.$nextTick((()=>{let t={};t.controlName=e.myConfig.name,e.myConfig.sname&&(t.controlName=e.myConfig.sname),t.name="enterKeyDown",e.$emit("doAction",t)}))},setFatherValue(e){let t=!0,n=this._valueToFatherValue();n.name=this.myConfig.name,this.myConfig.valueChanged&&(n.value!==this.oldValue||n.svalue!==this.oldSvalue||n.evalue!==this.oldEvalue?(t=this.myConfig.valueChanged(n),void 0===t&&(t=!0)):t=!1),t?(this.setFatherValueSuccess?this.setFatherValueSuccess(n):this.$emit("inputValue",n),this.$nextTick((()=>{this.isEnter&&(this.customEnterKeyDown?this.customEnterKeyDown(e):this.$parent.enterKeyDown&&this.$parent.enterKeyDown(),this.isEnter=!1)}))):this.setFatherValueFail?this.setFatherValueFail(e):this.$nextTick((()=>{this.value=this.oldValue}))},_setFatherValue(e){e||0===e||(e=this.myConfig.defaultValue),this.value=e,this.setFatherValue()},setPro(e){this.setCustomPro&&(e=this.setCustomPro(e)),e&&(this.myConfig=Object.assign({},this.myConfig,e))},setReadOnly(e){let t={};t.readOnly=e,!1===t.readOnly?!0!==this.config.readOnly&&this.setPro(t):this.setPro(t)},getPro(e){return this.myConfig[e]}},watch:{fatherValue:{handler(e){this.value=this._fatherValueToValue(e),this.oldValue=this.value,this.watchCustomFatherValue&&this.watchCustomFatherValue()},immediate:!0}}};var rt=Xe({name:"combobox",extends:it,data:()=>({myConfig:{data:[],valueField:"code",textField:"name",maxTagCount:2,codeWithName:!0,defaultValue:"",filterable:!1,clearable:!0,readOnly:!1,showOptionGroup:!1,multiSelect:!1,editData:[],showNullItem:!1,filterData:null,transfer:!1}}),methods:{fatherValueToValue(e){return this.myConfig.multiSelect?e:e+""},watchCustomFatherValue(){let e={},t=!1;this.myConfig.multiSelect||""!==this.value?e.value=this.value:this.myConfig.showNullItem||1!==this.myConfig.data.length||(this.myConfig.required&&(this.myConfig.showOptionGroup?1===this.myConfig.data[0].data.length&&(this.value=this.myConfig.data[0].data[0][this.myConfig.valueField],t=!0):(this.value=this.myConfig.data[0][this.myConfig.valueField],t=!0)),e.value=this.value),this.oldValue=this.value,t&&this.$nextTick((()=>{e.name=this.myConfig.name,this.$emit("inputValue",e)}))},setPro(e){this.setCustomPro&&(e=this.setCustomPro(e)),e&&(this.myConfig=Object.assign({},this.myConfig,e))},isOptionShow(e){return!!this.myConfig.readOnly||e.visible},setCustomPro(e){return void 0!==e.data&&e.data.length>0&&(this.editData=[],this.myConfig.showOptionGroup?e.forEach((e=>{this.$Method.copy(e).data=[],e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e.label=e[this.myConfig.textField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)}))})):e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e.label=e[this.myConfig.textField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)}))),e},customInit(){this.editData=[],this.myConfig.data&&this.myConfig.data.length>0&&(this.myConfig.showOptionGroup?this.myConfig.data.forEach((e=>{let t=this.$Method.copy(e);t.data=[],e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e[this.myConfig.textField]?e.label=e[this.myConfig.textField]:e.label=e[this.myConfig.valueField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)})),this.editData.push(t)})):this.myConfig.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e[this.myConfig.textField]?e.label=e[this.myConfig.textField]:e.label=e[this.myConfig.valueField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)})))},onOpenChange(e){this.config.onOpenChange&&this.config.onOpenChange(e)},doDictGroupKey(e){if(!this.config.dictgroupkey)return!0;let t=this.config.dictgroupkey.split(",");if(e.dgroup){return t.findIndex((t=>t===e.dgroup))>-1}return!0},setFocus(e){e?(this.$refs.myControl.$refs.reference.focus(),this.$refs.myControl.isFocused=!0):(this.$refs.myControl.$refs.reference.blur(),this.$refs.myControl.isFocused=!1)}}},[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Option"),s=c.resolveComponent("OptionGroup"),l=c.resolveComponent("Select");return c.withDirectives((c.openBlock(),c.createElementBlock("div",null,[c.createVNode(l,{ref:"myControl",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=t=>e.value=t),transfer:i.myConfig.transfer,multiple:i.myConfig.multiSelect,"max-tag-count":i.myConfig.maxTagCount,size:i.myConfig.size,disabled:i.myConfig.readOnly,clearable:i.myConfig.clearable,onOnChange:e._setFatherValue,filterable:i.myConfig.filterable,placeholder:i.myConfig.placeholder,onOnOpenChange:r.onOpenChange},{default:c.withCtx((()=>[i.myConfig.showOptionGroup?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.myConfig.data,((e,t)=>(c.openBlock(),c.createBlock(s,{label:e.label,key:"option_"+t},{default:c.withCtx((()=>[i.myConfig.readOnly?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(e.data,(e=>(c.openBlock(),c.createBlock(a,{value:e[i.myConfig.valueField],key:e[i.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(e.data,(e=>c.withDirectives((c.openBlock(),c.createBlock(a,{value:e[i.myConfig.valueField],key:e[i.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])),[[c.vShow,e.visible]]))),128))])),_:2},1032,["label"])))),128)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[i.myConfig.readOnly?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.myConfig.data,(e=>(c.openBlock(),c.createBlock(a,{value:e[i.myConfig.valueField],key:e[i.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.myConfig.data,(e=>c.withDirectives((c.openBlock(),c.createBlock(a,{value:e[i.myConfig.valueField],key:e[i.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])),[[c.vShow,e.visible]]))),128))],64))])),_:1},8,["modelValue","transfer","multiple","max-tag-count","size","disabled","clearable","onOnChange","filterable","placeholder","onOnOpenChange"])],512)),[[c.vShow,i.myConfig.visible]])}]]),at={name:"formpcompro",data:()=>({}),props:{config:{type:Object,default:null},dictData:{type:Object,default:null}},methods:{}};const st={name:"baseform",mixins:[at],data:()=>({form:{},oldForm:{},initForm:{},items:[],formRules:{},updateConfig:[],errorFlag:!1,style:"",myConfig:{lineNum:1,itemSpan:8,labelWidth:80,labelPosition:"right",showLabel:!0,inline:!0,isFull:!0}}),methods:{initFormItemCol(e){let t=this.myConfig.itemSpan,n=this.items[e];return"Divider"===n.type?t=24:void 0!==n.colNum&&(t=Number(n.colNum)>Number(this.myConfig.lineNum)?this.myConfig.itemSpan*Number(this.myConfig.lineNum):this.myConfig.itemSpan*Number(n.colNum)),t>24&&(t=24),t},initFormItem(e){if(e.status=!0,e.valueChanged&&(e.valueChanged=this.valueChanged),e.searchBefore&&(e.searchBefore=this.searchBefore),e.setDataBefore&&(e.setDataBefore=this.setDataBefore),e.onAddTag&&(e.onAddTag=this.onAddTag),e.onDelTag&&(e.onDelTag=this.onDelTag),e.onSearch&&(e.onSearch=this.onSearch),e.onLinkTo&&(e.onLinkTo=this.onLinkTo),this.dictData){let t="";e.dictkey&&(t=e.dictkey),e.customDictkey&&(t=e.customDictkey),t&&void 0===e.data&&(e.data=this.dictData[t])}return this.setFormItemCommonPro(e),e},init(){let e=this.$Method.copy(this.config);this.myConfig=Object.assign({},this.myConfig,e);let t=24/Number(this.myConfig.lineNum);this.myConfig.itemSpan=Number(t.toFixed(0)),24===this.myConfig.itemSpan&&(this.myConfig.inline=!1),this.initForm={},this.myConfig.items&&this.myConfig.items.forEach((e=>{let t=this.initFormItem(e);this.items.push(t)})),this.customInit&&this.customInit(),Object.assign(this.form,this.initForm),Object.assign(this.oldForm,this.form)},setData(e){e&&(this.$refs.form.resetFields(),"I"===e.flag?this.form=Object.assign({},this.initForm,e):(this.items.forEach((t=>{t.name&&void 0===e[t.name]&&(e[t.name]=""),t.sname&&void 0===e[t.sname]&&(e[t.sname]=""),t.ename&&void 0===e[t.ename]&&(e[t.ename]=""),t.textName&&void 0===e[t.textName]&&(e[t.textName]="")})),this.form=Object.assign({},{},e)),this.oldForm=this.$Method.copy(this.form))},isChange(){return JSON.stringify(this.form)!==JSON.stringify(this.oldForm)||!(!this.form.flag||"I"!==this.form.flag&&"U"!==this.form.flag)},input(e){let t={};e.name&&(t[e.name]=e.value),e.textName&&(t[e.textName]=e.text),e.sname&&(t[e.sname]=e.svalue),e.ename&&(t[e.ename]=e.evalue),this.form=Object.assign({},this.form,t),this.$emit("inputValue",e)},validatorIsNull(e,t,n){this.isArrayFn(this.form[e.field])?0===this.form[e.field].length?n(new Error("")):n():this.form[e.field]||0===this.form[e.field]?n():n(new Error(""))},isArrayFn:e=>"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e),GetConfigIndex(e){return this.config.items.findIndex((t=>t.name===e||t.sname===e||t.ename===e))},valueChanged(e){if(e.form=this.$Method.copy(this.form),e.formObject=this,e.sname){return this.config.items.find((t=>t.sname===e.sname)).valueChanged(e)}return this.config.items.find((t=>t.name===e.name)).valueChanged(e)},searchBefore(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.myConfig.name)).searchBefore(e)},onAddTag(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onAddTag(e)},onDelTag(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onDelTag(e)},onSearch(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onSearch(e)},onLinkTo(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onLinkTo(e)},setDataBefore(e,t){let n={};n.data=e,n.form=this.$Method.copy(this.form),n.formObject=this;return this.config.items.find((e=>e.name===t.myConfig.name)).setDataBefore(n,t)},checkValidate(){this.$refs.form[0]?this.$refs.form.forEach((e=>{e.validate?this.errorFlag=!1:this.errorFlag=!0})):this.$refs.form.validate((e=>{this.errorFlag=!e}))},isError(){return this.errorFlag},getTrigger(e){let t="blur";switch(e&&(e=e.toLowerCase()),e){case"combobox":case"tagbox":case"daterangebox":t="change"}return t},getValue(e){return this.form[e]},setValue(e,t){let n={};n[e]=void 0===t?"":t,this.form=Object.assign({},this.form,n)},setValues(e){for(let t in e)void 0===e[t]&&(e[t]="");this.form=Object.assign({},this.form,e)},setFormReadOnly(e){if(!this.myConfig.items||0===this.myConfig.items.length)return!1;this.myConfig.items.forEach((t=>{let n="";if(t.name?n=t.name:t.sname&&(n=t.sname),e)this.setReadOnly(n,e);else if(this.myConfig.cellbeginedit){let t={};t.name=n,t.form=this.$Method.copy(this.form),this.myConfig.cellbeginedit(t)?this.setReadOnly(n,e):this.setReadOnly(n,!e)}else this.setReadOnly(n,e)}))},setPro(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setPro(t)},getPro(e,t){if(this.$refs[e]&&this.$refs[e][0])return this.$refs[e][0].getPro(t)},setReadOnly(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setReadOnly&&this.$refs[e][0].setReadOnly(t)},getData(){const e=this.$Method.copy(this.form);return this.doDetialItem(e)},doDetialItem(e){return this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.forEach((t=>{if("PopTagBox"===t.type){let n=[],o=this.oldForm[t.name],i=this.$Method.copy(e[t.name]);o&&o.length>0&&o.forEach((e=>{if(e.ph_key)if(i&&i.length>0){let t=i.findIndex((t=>t.ph_key===e.ph_key));if(t>-1)i.splice(t,1);else{let t=this.$Method.copy(e);t.flag="D",n.push(t)}}else{let t=this.$Method.copy(e);t.flag="D",n.push(t)}})),i&&i.length>0&&i.forEach((e=>{e.flag="I",n.push(e)})),e[t.name]=n}})),e},setCommonRequired(e,t,n){let o="";if(n.ename&&(o=n.ename),o&&(void 0===this.formRules[o]?!0===t&&(this.formRules[o]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(n.type)}]):t||delete this.formRules[o]),void 0===this.formRules[e]){if(!0===t)return this.formRules[e]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(n.type)}],!0}else if(!t)return delete this.formRules[e],!0;return!1},setRequired(e,t){let n=!1;const o=this.items.findIndex((t=>t.name===e||t.sname===e));if(o>-1&&(n=this.setCommonRequired(e,t,this.items[o]),n)){let e=Object.assign({},this.items[o],{required:t,status:!1});this.items.splice(o,1,e),this.$nextTick((()=>{this.items[o].status=!0}))}},updateCommonConfig(e,t){let n={},o=this.items.findIndex((t=>t.name===e||t.sname===e));if(o>-1){let i=!1;for(let e in t)if(t[e]!==this.items[o][e]){i=!0;break}if(i){t.status=!1,n.index=o,n.name=e;let i=this.$Method.copy(this.items[o]);n.config=Object.assign({},i,t),this.setCommonRequired(e,t.required,n.config)}}return n},updateItemConfig(e,t){let n=this.updateCommonConfig(e,t);if(n&&n.index>-1){let e=[];e.push(n),this.updateConfigReset(0,e)}},updateConfigReset(e,t){let n=t[e].index;this.items.splice(n,1,t[e].config),e+1<t.length?this.$nextTick((()=>{this.items[n].status=!0,this.$nextTick((()=>{this.$refs[t[e].name]&&this.$refs[t[e].name].length>0&&this.$refs[t[e].name][0].reset(),this.updateConfigReset(e+1,t)}))})):this.$nextTick((()=>{this.items[n].status=!0,this.$nextTick((()=>{this.$refs[t[e].name]&&this.$refs[t[e].name].length>0&&this.$refs[t[e].name][0].reset()}))}))},updateItemsConfig(e){let t=[];e&&(e.forEach((e=>{let n=this.updateCommonConfig(e.name,e);n&&n.index>-1&&t.push(n)})),t.length>0&&this.updateConfigReset(0,t))},clearData(){this.$refs.form.resetFields(),this.form=Object.assign({},{},this.initForm),this.oldForm=this.$Method.copy(this.form)},getFormItemStyle(e){let t={},n=this.myConfig.isFull;if(void 0!==e.isFull&&(n=e.isFull),n)t.width="100%";else{let e=this.myConfig.labelWidth+100;t["min-width"]=e+"px"}return void 0!==e.style&&(t=Object.assign({},t,e.style)),t},setFormItemCommonPro(e){void 0===e.isFull&&(e.isFull=!0),e.name&&this.setFormItemValue(e.name,e,!0),e.sname&&this.setFormItemValue(e.sname,e,!0),e.ename&&this.setFormItemValue(e.ename,e,!0),e.textName&&this.setFormItemValue(e.textName,e,!1)},setFormItemValue(e,t,n){if(void 0!==t.defaultValue)this.initForm[e]=t.defaultValue;else if("NumberBox"===t.type||"NumberRangeBox"===t.type){let n="";void 0!==t.min&&(n=t.min),void 0!==t.smin&&(n=t.smin),void 0===t.smin&&void 0!==t.emin&&(n=t.emin),this.initForm[e]=n,t.defaultValue=n,!1===t.boundaryValue&&(this.initForm[e]="",t.defaultValue="")}else"PopTagBox"===t.type?this.initForm[e]=[]:this.initForm[e]="";n&&(t.required?void 0===this.formRules[e]&&(this.formRules[e]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(t.type)}]):delete this.formRules[e])},doAction(e){this[e.name]&&this[e.name](e)},enterKeyDown(e){let t=this.findNextItems(e.controlName);this.setFoucs(e.controlName,!1),this.$nextTick((()=>{let e=this;setTimeout((()=>{e.setFoucs(t,!0)}),200)}))},setFoucs(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setFocus&&this.$refs[e][0].setFocus(t)},setHideDividerValue(e){this.$refs.hidedivider&&this.$refs.hidedivider[0]&&this.$refs.hidedivider[0].setHide(e)},findNextItems(e){let t="",n="",o=!1;return this.myConfig.items.some((i=>{let r=i.name;if(i.sname&&(r=i.sname),"wRichTextBox"!==i.type&&"RichTextBox"!==i.type&&"PictureBox"!==i.type&&"VideoBox"!==i.type&&this.$refs[r]&&this.$refs[r][0]&&!1!==this.$refs[r][0].getPro("visible")&&!0!==this.$refs[r][0].getPro("readOnly")&&(t||(t=r),o))return n=r,!0;e===r&&(o=!0)})),n||(n=t),n}}},lt={extends:st,data:()=>({editIndex:-1,editKey:""}),created(){this.init()},props:{valueData:{type:Object,default:()=>({})},vstyle:{type:String,default:""},showRowAction:{type:Boolean,default:!1}},methods:{customInit(){this.form=Object.assign({},this.form,this.valueData),this.style=this.vstyle},keyDownEvent(){this.cancelCellEditing()},formatValue(e,t,n){return this.$Method.formatValue(e,t,n)},EditCell(e){if(e.readOnly)return this.editKey="",void this.cancelCellEditing();if(this.showRowAction)this.cancelCellEditing();else if(this.editKey!==e.name)if(this.config.cellbeginedit){let t={};if(t.index=this.editIndex,t.column=e,t.row=this.valueData,this.config.cellbeginedit){if(!this.config.cellbeginedit(t))return void this.cancelCellEditing();this.editKey=e.name}}else this.editKey=e.name},addRowInfo(e,t){e.rowinfo={},e.rowinfo.column=t,e.rowinfo.index=this.editIndex,e.rowinfo.row=this.valueData,e.rowinfo.gridObject=this.config.getGridObject(),e.rowinfo.formObject=this},valueChanged(e){const t=this.config.items.find((t=>t.name===e.name));return this.addRowInfo(e,t),t.valueChanged(e)},searchBefore(e){const t=this.config.items.find((t=>t.name===e.config.name));return this.addRowInfo(e,t),t.searchBefore(e)},setDataBefore(e,t){const n=this.config.items.find((e=>e.name===t.myConfig.name));let o={};return o.data=e,this.addRowInfo(o,n),n.setDataBefore(o,t)},setEditIndex(e){this.editIndex=e},getEditIndex(){return this.editIndex},cancelCellEditing(){this.editKey=""}},watch:{valueData:{handler(e){this.form=Object.assign({},this.form,e)},deep:!0,immediate:!0}}},ct={key:0,style:{color:"#348eed"}},ut={key:1},dt=["onClick"];var ht=Xe(lt,[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("ControlBox"),s=c.resolveComponent("ShowText"),l=c.resolveComponent("FormItem"),u=c.resolveComponent("Col"),d=c.resolveComponent("Row"),h=c.resolveComponent("Form");return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(e.style)},[c.createVNode(h,{ref:"form",model:e.form,rules:e.formRules,"label-width":e.myConfig.labelWidth,inline:e.myConfig.inline,id:e.myConfig.name,onKeydown:c.withKeys(c.withModifiers(r.keyDownEvent,["prevent"]),["enter"])},{default:c.withCtx((()=>[c.createVNode(d,{type:"flex",justify:"start"},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.items,((t,n)=>c.withDirectives((c.openBlock(),c.createBlock(u,{key:"form_"+n,span:e.initFormItemCol(n),style:c.normalizeStyle({height:t.height})},{default:c.withCtx((()=>[c.createVNode(l,{label:t.label,prop:t.name||t.sname,style:{width:"100%"},"show-message":!1},{label:c.withCtx((()=>[!0===t.required?(c.openBlock(),c.createElementBlock("span",ct,c.toDisplayString(t.label),1)):(c.openBlock(),c.createElementBlock("span",ut,c.toDisplayString(t.label),1))])),default:c.withCtx((()=>[c.createElementVNode("div",{onClick:e=>r.EditCell(t),style:{width:"100%",height:"100%"}},[i.editKey===t.name?(c.openBlock(),c.createBlock(a,{key:0,config:t,valueData:e.form,onInputValue:e.input,style:{width:"100%"},editIndex:i.editIndex},null,8,["config","valueData","onInputValue","editIndex"])):(c.openBlock(),c.createBlock(s,{key:1,style:{display:"inline-block",height:"32px","line-height":"32px"},label:r.formatValue(e.form[t.name],e.form,t),contentAlign:"left"},null,8,["label"]))],8,dt)])),_:2},1032,["label","prop"])])),_:2},1032,["span","style"])),[[c.vShow,!1!==t.visible]]))),128))])),_:1})])),_:1},8,["model","rules","label-width","inline","id","onKeydown"])],4)}]]);const At={mixins:[ot],data:()=>({globalConfig:{cellbeginedit:"",showHeader:!0,showIndex:!0,showStripe:!1,showBorder:!0,showCheckBox:!1,showCondition:!1,checkByHighlight:!0,readOnly:!1,showPage:!0,tableSize:"default",pageSize:null,pageShowElevator:!0,pageShowTotal:!0,pageShowSizer:!0,height:null,manualLoad:!0,multiSelect:!1,operFixedFlag:!0,gridType:"viewGrid",dynamicHeight:!1,generalOrientation:!1,showSummary:!1,showSumGroup:!1,sumText:"合计",pageSizeNum:"",adjustHeight:0,items:[],pageConfig:{page_no:1,page_size:100,total_results:0,pageSizeList:[20,50,100,200,500,1e3]},moduleMethod:[],headClassName:""},tempData:[],data:[],addData:[],delData:[],columns:[],checkInfo:[],checkAddInfo:[],expand:{},dictkey:"",currentDictData:{},editRowIndex:"",editRowFlag:!0,loading:!1,conditionSearchParam:{},showRowAction:!1,modulecode:"",myToolConfig:{},showMoreBtn:!1,initData:[],showDelRow:!1,showCondition:!0,delRowAction:[{iconcls:"row",name:"delRow",text:"删除",type:"text"}],operFixedFlag:!0,editIndex:-1,editKey:"",newRow:{},summaryColumn:[],total_summary:{},extraHeight:0,outsideHeight:0,tableColumns:[],soltTableColumns:[],sumGroupNum:0,culPage:1}),props:{config:{type:Object,default:()=>({})},dictData:{type:Object,default:null},toolConfig:{type:Object,default:()=>({})},isPop:{type:Boolean,default:!1}},created(){this.init(),this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid"))},computed:{makeTableColumns(){return this.initColumn()},tableHeight(){if(this.myConfig.dynamicHeight)return null;{let e=this.currentHeight;return this.extraHeight&&(e-=Number(this.extraHeight)),this.outsideHeight&&(e-=Number(this.outsideHeight)),this.myConfig.showSummary&&(e-=50),e}},tableMaxHeight(){if(this.myConfig.dynamicHeight){let e=this.currentHeight-this.extraHeight-this.outsideHeight;return this.myConfig.showSummary&&(e-=50),e}return null}},methods:{init(){if(this.myConfig=Object.assign({},this.globalConfig,this.myConfig),this.config){let e=this.$Method.copy(this.config);for(let t in e)if("pageConfig"===t)for(let n in e[t])this.myConfig.pageConfig[n]=e[t][n];else this.myConfig[t]=e[t]}if(this.dictData?this.currentDictData=this.dictData:this.currentDictData=[],void 0!==this.myConfig.showDelRow&&(this.showDelRow=this.myConfig.showDelRow),void 0!==this.myConfig.showCondition&&(this.showCondition=this.myConfig.showCondition),this.myToolConfig=this.$Method.copy(this.toolConfig),!this.isPop){let e=0;this.myToolConfig.items&&this.myToolConfig.items.forEach((t=>{"row"===t.iconcls&&e++})),this.showMoreBtn=e>2,this.showRowAction=e>0,this.showRowAction&&(this.myConfig.showCheckBox||this.myConfig.multiSelect&&(this.myConfig.showCheckBox=!0))}this.operFixedFlag=this.myConfig.operFixedFlag,this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.some((e=>{if(!0===e.resizable)return this.myConfig.showBorder=!0,!0})),this.setSizeConfig(this.myConfig),this.customInit&&this.customInit()},initCheckColumn(e){if(this.myConfig.showCheckBox){let t={type:"selection",align:"center",key:"selection",width:40};t.multiSelect=this.myConfig.multiSelect,e.push(t)}},isToolBar(e){let t=!1;return this.myToolConfig&&this.myToolConfig.items&&this.myToolConfig.items.some((n=>{if(n.iconcls===e)return t=!0,!0})),t},initIndexColumn(e){if(this.myConfig.showIndex)if(this.myConfig.showSumGroup){let e={label:"行号",name:"sumindex",type:"TextBox",align:"center",width:45};"sumindex"!==this.myConfig.items[0].name&&this.myConfig.items.splice(0,0,e)}else{let t={type:"index",key:"index",width:45,title:"行号",align:"center"};void 0!==this.myConfig.headClassName&&(t.className=this.myConfig.headClassName),t.indexMethod=this.indexRender,void 0!==this.myConfig.indexConfig&&Object.assign(t,this.myConfig.indexConfig),e.push(t)}},initOperColumn(e){if(this.showRowAction||this.showDelRow){let t={title:"操作"};void 0!==this.myConfig.headClassName&&(t.className=this.myConfig.headClassName),t.key="action",t.render=this.actionRender,this.operFixedFlag&&(t.fixed="right"),t.width=120,1===this.myToolConfig.items.length&&(t.width=80),t.align="center",this.customInitOperColumn?this.customInitOperColumn(t,e):e.push(t)}},onColumnWidthResize(e,t,n){let o={};o.newWidth=e,o.oldWidth=t,o.column=n,this.$emit("onColumnWidthResize",o)},initExpandColumn(e){this.expand.items=[];let t=[];for(let n=0;n<e.length;n++)!0===e[n].isExpand?this.expand.items.push(e[n]):t.push(e[n]);if(this.expand.items.length>0){let n={type:"expand",width:50,render:this.expandRendel};const o=t.findIndex((e=>"index"===e.type));if(o>-1)t.splice(o+1,0,n);else{const e=t.findIndex((e=>"selection"===e.type));e>-1?t.splice(e+1,0,n):t.splice(0,0,n)}e=t}},initColumn(){let e={},t=[],n=[];if(!this.myConfig.items||0===this.myConfig.items.length)return n;this.initCheckColumn(n),this.initOperColumn(n),this.initIndexColumn(n);const o=this.myConfig.items.length;for(let r=0;r<o;r++)!1!==this.myConfig.items[r].visible?this.initCommonColumn(this.myConfig.items[r],n,t,e):void 0!==this.myConfig.items[r].defaultValue&&(this.myConfig.items[r].name&&(e[this.myConfig.items[r].name]=this.myConfig.items[r].defaultValue),this.myConfig.items[r].sname&&(e[this.myConfig.items[r].sname]=this.myConfig.items[r].defaultValue),this.myConfig.items[r].ename&&(e[this.myConfig.items[r].ename]=this.myConfig.items[r].defaultValue));this.initExpandColumn(n);let i={};return i.columns=n,i.newRow=e,i.summaryColumn=t,i},initCommonColumn(e,t,n,o){let i=this.$Method.copy(e);if(i.contentAlign||(i.contentAlign=i.align),i.title=i.label,i.headClassName?i.className=i.headClassName:void 0!==this.myConfig.headClassName&&(i.className=this.myConfig.headClassName),e.children&&e.children.length>0){i.children=[];for(let t=0;t<e.children.length;t++)this.initCommonColumn(e.children[t],i.children,n,o);t.push(i)}else i=this.initColumnConfig(i,n,o),t.push(i)},initColumnConfig(e,t,n){let o="";return e.type&&(o=e.type.toLowerCase()),e.key=e.name,Number(e.width)?e.width=Number(e.width):delete e.width,this.setColumnPro(e,o,t,n),"render"!==o&&void 0===e.render&&this.setCustomColumn&&this.setCustomColumn(e),"checkbox"!==o&&"picturebox"!==o&&"videobox"!==o||(e.render=this.commonRendel,"picturebox"===o&&(void 0===e.height&&(e.height=40),e.isGrid=!0),"videobox"===o&&void 0===e.height&&(e.height=60),this.myConfig.readOnly?e.readOnly=!0:!0!==e.readOnly&&(e.readOnly=!1)),e.required&&(e.className||(e.className="efuture-grid-head-required")),e.valueChanged&&(e.valueChanged=this.valueChanged),e.searchBefore&&(e.searchBefore=this.searchBefore),e.setDataBefore&&(e.setDataBefore=this.setDataBefore),e.onLinkTo&&(e.onLinkTo=this.onLinkTo),"timepicbox"!==o&&"datebox"!==o&&"daterangebox"!==o&&"colorbox"!==o&&"combobox"!==o||(e.transfer=!0),e},setColumn(e){let t=this.$Method.copy(this.myConfig.items[e]);t.title=t.label;let n="";t.type&&(n=t.type.toLowerCase()),n&&(t.key=t.name,Number(t.width)?t.width=Number(t.width):delete t.width,this.setColumnPro(t,n),"render"!==n&&void 0===t.render&&this.setCustomColumn&&this.setCustomColumn(t),"checkbox"!==n&&"picturebox"!==n&&"videobox"!==n||(t.render=this.commonRendel,"picturebox"===n&&void 0===t.height&&(t.height=40),"videobox"===n&&void 0===t.height&&(t.height=60),this.myConfig.readOnly?t.readOnly=!0:t.readOnly=!1),t.required&&(t.className||(t.className="efuture-grid-head-required")),t.contentAlign||t.align||(t.contentAlign=t.align),this.myConfig.items[e].valueChanged&&(t.valueChanged=this.valueChanged),this.myConfig.items[e].searchBefore&&(t.searchBefore=this.searchBefore),this.myConfig.items[e].setDataBefore&&(t.setDataBefore=this.setDataBefore),this.myConfig.items[e].onLinkTo&&(t.onLinkTo=this.onLinkTo),void 0===t.formatValue&&void 0!==this.myConfig.formatValue&&(t.formatValue=this.myConfig.formatValue),this.columns.push(t))},setColumnPro(e,t,n,o){if(e.place="grid",!0===e.sortable&&(e.sortable="custom"),"numberbox"===t?(e.contentAlign||(e.contentAlign="right"),e.align||(e.align="right"),e.summary&&void 0!==n&&n.push(e.name)):"datebox"===t||"checkbox"===t||"picturebox"===t||"videobox"===t?this.myConfig.generalOrientation&&"datebox"===t?(e.contentAlign||(e.contentAlign="left"),e.align||(e.align="left")):(e.contentAlign||(e.contentAlign="center"),e.align||(e.align="center")):(e.contentAlign||(e.contentAlign="left"),e.align||(e.align="left")),"combobox"===t&&void 0===e.data){let t=e.dictkey;e.customDictkey&&(t=e.customDictkey),e.data=this.currentDictData[t]}if(void 0!==e.defaultValue)o[e.name]=e.defaultValue;else if("numberbox"===t||"numberrangebox"===t){let t="";void 0!==e.min&&(t=e.min),void 0!==e.smin&&(t=e.smin),void 0===e.smin&&void 0!==e.emin&&(t=e.emin),e.defaultValue=t,void 0!==o&&(o[e.name]=t,!1===e.boundaryValue&&(o[e.name]="",e.defaultValue=""))}else void 0!==o&&("poptagbox"===e.type?o[e.name]=[]:o[e.name]="")},expandRendel(e,t){return e("div",[e(c.resolveComponent("ExpandRow"),{config:this.expand,valueData:t.row,vstyle:"margin-right: 120px",showRowAction:!1,onInputValue:e=>{this.editIndex=t.index,this.input(e)}})])},indexRender(e,t){let n=t+1;return this.myConfig.showPage&&(n+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size),this.myConfig.indexMethod?this.myConfig.indexMethod(e,n):n},actionRender(e,t){return e("div",[e(c.resolveComponent("Toolbar"),{config:this.myToolConfig,tooltype:"row",moduleMethod:this.globalConfig.moduleMethod,row:t.row,onDoAction:e=>{e.rowinfo=t,"editRowForm"===e.name?this.initRowForm&&this.initRowForm(e):"delRow"===e.name?this.delRow&&this.delRow(t.index):this.$emit("doAction",e)}})])},remove(e){let t=this.data.findIndex((t=>t._customIndex===e));if(-1===t&&(t=e),t>-1){if(void 0===this.data[t].flag||"U"===this.data[t].flag){this.data[t].flag="D";const e=this.$Method.copy(this.data[t]);this.delData.push(e)}this.data.splice(t,1)}this.customRemove&&this.customRemove(t)},setEdit(e){this.editRowIndex===e?this.editRowIndex=null:this.editRowIndex=e},dbclick(e){this.$emit("dbclick",e)},click(e){this.$emit("rowclick",e),this.$emit("click",e)},setData(e){this.data=[],this.data=e,this.initData=this.$Method.copy(this.data),this.delData=[],this.checkInfo=[],this.cancelCellEditing&&this.cancelCellEditing()},getData(){return this.$Method.copy(this.data)},clearData(){this.editIndex=-1,this.editKey="",this.data=[],this.delData=[],this.initData=[],this.checkInfo=[],this.addData=[],this.checkAddInfo=[],this.conditionSearchParam={},this.myConfig.pageConfig.page_no=1,this.myConfig.pageConfig.total_results=0,this.columnWidth={},this.customClearData&&this.customClearData()},updataRow(e,t){let n=Object.assign({},this.data[e],t);this.data.splice(e,1,n),this.tempData.splice(e,1,n)},getModuleMethod(){if(this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid")),this.token=this.$Method.getUrlParam("token"),this.modulecode&&this.token){let e=this.getUserModuleMethod();e&&(this.globalConfig.moduleMethod=e.modulemethod)}},getSelection(){return this.$refs.table.getSelection()},input(e){let t=this.editIndex;if(-1===t){if(void 0===e.editIndex)return;t=e.editIndex}let n={};if(void 0!==e.value&&(n[e.name]=e.value),void 0!==e.text&&(n[e.textName]=e.text),void 0!==e.svalue&&(n[e.sname]=e.svalue),void 0!==e.evalue&&(n[e.ename]=e.evalue),void 0===this.data[t].flag&&(n.flag="U"),e.customRows&&e.customRows.length>0){let t=this;e.customRows.forEach((e=>{if(void 0!==e.changeIndex){let n=Object.assign({},t.data[e.changeIndex],e);void 0===t.data[e.changeIndex].flag&&(n.flag="U"),t.data.splice(e.changeIndex,1,n)}})),e.customRows.forEach((e=>{if(void 0===e.changeIndex){let n=Object.assign({},{},e);n.flag="I",t.data.push(n)}}))}else{let e=Object.assign({},this.data[t],n);this.$nextTick((()=>{this.data.splice(t,1,e)}))}},updateColPro(e,t){const n=this.myConfig.items.findIndex((t=>e===t.name));if(n>-1){let e=Object.assign({},this.myConfig.items[n],t);this.myConfig.items.splice(n,1,e)}},setRowCheck(e,t){if(this.myConfig.multiSelect){if(e>-1){let n=Object.assign({},this.data[e],{});n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t),this.myConfig.onSetRowCheckBefore?this.myConfig.onSetRowCheckBefore(e,t)&&this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)})):this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}}else{let n=this.$Method.copy(this.data);n.forEach(((n,o)=>{o===e?this.myConfig.onSetRowCheckBefore?this.myConfig.onSetRowCheckBefore(e,t)&&(n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t)):(n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t)):(n._checked=!1,n._highlight=!1)})),this.$nextTick((()=>{this.data=n}))}},setAllRowCheck(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._checked=e,this.myConfig.checkByHighlight&&(t._highlight=e)})),this.$nextTick((()=>{this.data=t}))},setRowDisabled(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._disabled=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}},setAllRowDisabled(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._disabled=e})),this.$nextTick((()=>{this.data=t}))},setRowHighlight(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._highlight=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}},setAllRowHighlight(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._highlight=e})),this.$nextTick((()=>{this.data=t}))},commonRendel(e,t){return e("div",[e(c.resolveComponent("ControlBox"),{config:t.column,valueData:t.row,readOnly:"D"===t.row.flag,autofocus:this.editIndex===t.index&&this.editKey===t.column.key,onInputValue:e=>{this.editIndex=t.index,this.editKey=t.column.key,this.input(e)},onDoAction:e=>{this.doAction(e)}})])},setExtraHeight(){let e=0;this.$refs.head&&(e=this.$refs.head.offsetHeight),this.$refs.page&&(e+=this.$refs.page.offsetHeight),this.extraHeight=e},setOutsideHeight(e){this.outsideHeight=e},getSoltTableColumns(e,t){if(e)if(e instanceof Array)e.forEach((e=>{this.getSoltTableColumns(e,t)}));else if(e.children&&e.children.length>0)e.children.forEach((e=>{this.getSoltTableColumns(e,t)}));else{let n=Object.assign({},e);"action"!==n.key&&"actionbtn"!==n.key&&t.push(n)}},findColumnConfig(e,t){if(e){if(t instanceof Array){let n=!1,o={};return t.some((t=>{let i=this.findColumnConfig(e,t);if(i)return n=!0,o=i,!0})),!!n&&o}if(t.children&&t.children.length>0){let n=!1,o={};return t.children.some((t=>{let i=this.findColumnConfig(e,t);if(i)return n=!0,o=i,!0})),!!n&&o}return e===t.name&&t}},openHelp(){window.open(this.curHelpUrl)},initScrollLeft(){this.$refs.table&&this.$refs.table.$refs.body&&(this.$refs.table.$refs.body.scrollLeft=0)}},watch:{data(e){this.tempData=D(e)},makeTableColumns(e){this.total_summary={},this.newRow=D(e.newRow),this.summaryColumn=D(e.summaryColumn),this.tableColumns=D(e.columns);let t=[];this.getSoltTableColumns(e.columns,t),this.soltTableColumns=t}},mounted(){}},ft={name:"viewgridbase",extends:At,data:()=>({myConfig:{resources:"",method:"",response:"",searchParam:null,readOnly:!0,multiSelect:!0,bindSearchParam:"ph_key",showAll:!1,exportMethod:"exportExcel",separator:"::",exportType:"2",overrideData:"",headStyle:"padding-bottom: 10px;padding-top: 10px;",multiSelectGrid:!1,multiGridCol:11,multiGridTitle:"已选择",gridTitle:"待选择",highLightRow:!0,dynamicColumnFlag:!1,dynameicColumnConfig:{groupColumns:[],dynameicColumnName:"",dynameicColumnValue:"",dynameicColumnValueTitle:"",dynameicColumnValuePro:{},dynameicColumnSumLable:"动态合计"}},multiGridCol:11,gridCol:11,editRowFlag:!1,singleData:{},searchBeforeSearchParam:{},order_field:"",order_direction:"",rightActive:!1,leftActive:!1,multiSelectData:[],multiTableColumns:[],dynamicColumnItems:[],tempMultiSelectData:[],multiSoltTableColumns:[],showHelpBtn:!1}),computed:{makeTableColumns(){return this.myConfig.dynamicColumnFlag?[]:this.initColumn()}},methods:{customInit(){this.isPop&&(this.myConfig.showCheckBox||this.myConfig.multiSelect&&(this.myConfig.showCheckBox=!0),this.myConfig.multiGridCol&&(this.multiGridCol=Number(this.myConfig.multiGridCol),this.gridCol=22-this.multiGridCol),this.myConfig.tableSize="small",this.myConfig.headStyle="",this.myConfig.showBorder=!1,this.myConfig.headStyle="",this.myConfig.pageSize="small",void 0===this.myConfig.height&&(this.myConfig.height=360),this.myConfig.pageSizeNum||(this.myConfig.pageConfig.page_size=50)),this.myConfig.pageSizeNum&&(this.myConfig.pageConfig.page_size=Number(this.myConfig.pageSizeNum)),this.myConfig.items.forEach((e=>{void 0===e.resizable&&(e.resizable=!0),e.width||e.minWidth||(e.minWidth=60)})),this.myConfig.multiSelectGrid&&(this.multiTableColumns=this.multiInitColumn()),"billGrid"===this.myConfig.gridType&&this.getModuleMethod(),this.myConfig.dynamicColumnFlag&&(this.myConfig.showPage=!1);this.curHelpUrl=this.OmdUrl.getCurHelpUrl(this),this.curHelpUrl?this.showHelpBtn=!0:this.showHelpBtn=!1},conditionAction(e){let t=[];switch(e.action){case"condition_search":e.para&&(this.conditionSearchParam=this.$Method.copy(e.para)),this.refurbish();break;case"condition_clear":this.conditionSearchParam={};break;case"condition_ok":this.myConfig.multiSelect?t=this.getSelection():this.singleData.currentRow&&t.push(this.singleData.currentRow),0===t.length?this.alert("请选择"):(e.rows=t,this.$emit("conditionAction",e));break;case"condition_cancel":this.$emit("conditionAction",e)}},getSearchParam(e,t){let n=Object.assign({},this.myConfig.searchParam,this.searchBeforeSearchParam);if(n||(n={}),"report"===this.myConfig.response)n=Object.assign({},n,this.conditionSearchParam);else{let e={};for(let t in n)if(this.conditionSearchParam[t]){e[t]={$and:[]};let o={};o[t]=n[t],e[t].$and.push(o);let i={};i[t]=this.conditionSearchParam[t],e[t].$and.push(i)}n=Object.assign({},n,this.conditionSearchParam);for(let t in e)n.$and=this.$Method.copy(e[t].$and),delete n[t]}return this.myConfig.showPage&&(t?this.myConfig.pageConfig.page_no?n.page_no=this.myConfig.pageConfig.page_no:n.page_no=1:(this.myConfig.pageConfig.page_no=1,n.page_no=1,this.culPage=1),n.page_size=this.myConfig.pageConfig.page_size),this.order_field&&(n.order_field=this.order_field,this.order_direction&&(n.order_direction=this.order_direction)),e&&(n=Object.assign({},n,e)),this.myConfig.dynamicColumnFlag||this.summaryColumn&&this.summaryColumn.length>0&&(n.summary_fld=this.summaryColumn.join(",")),this.myConfig.showSumGroup&&(n.sumgroups=this.myConfig.sumgroups),this.myConfig.overrideSearchParam?this.myConfig.overrideSearchParam(n):n},setWhereParam(e){this.conditionSearchParam=this.$Method.copy(e)},refurbish(e,t){this.loading=!0;let n=this;this.singleData={},n.data=[],n.asyncPost(n.myConfig.resources,n.myConfig.method,n.getSearchParam(e,t),(function(e){n.dynamicInitData=e,n.myConfig.dynamicColumnFlag?n.makeDynamicColumn():n.refurbishSucceedDefault(),n.loading=!1}),(function(e){n.loading=!1,n.$nextTick((()=>{setTimeout((()=>{n.alert(e,null,2)}),1e3)}))}))},changePage(e){let t=this.myConfig.pageConfig.page_no;this.myConfig.refurbishCheck?this.myConfig.refurbishCheck(e,t,this.callBackChangePage):(this.myConfig.pageConfig.page_no=e,this.refurbish(null,!0))},refurbishSucceedDefault(){if(this.sumGroupNum=0,this.dynamicInitData&&this.dynamicInitData[this.myConfig.response]){this.myConfig.showAll&&this.myConfig.rowAll&&this.dynamicInitData[this.myConfig.response].splice(0,0,this.myConfig.rowAll);let e=[];e=this.myConfig.overrideData?this.myConfig.overrideData(this.dynamicInitData[this.myConfig.response]):this.dynamicInitData[this.myConfig.response],this.dynamicInitData.sumgroups&&(e=this.doSumgroups(e,this.dynamicInitData.sumgroups)),this.data=e,this.tempData=this.$Method.copy(e)}void 0!==this.dynamicInitData.total_results&&(this.myConfig.pageConfig.total_results=Number(this.dynamicInitData.total_results)),void 0!==this.dynamicInitData.total_summary?(this.total_summary=Object.assign({},{},this.dynamicInitData.total_summary),this.myConfig.showSummary||Object.assign(this.myConfig,{showSummary:!0})):this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1})},callBackChangePage(e,t,n){e?(this.myConfig.pageConfig.page_no=t,this.refurbish(null,!0)):this.$nextTick((()=>{this.myConfig.pageConfig.page_no=n,this.myConfig.showPage=!1,this.myConfig=Object.assign({},this.myConfig),this.$nextTick((()=>{this.myConfig.showPage=!0,this.myConfig=Object.assign({},this.myConfig)}))}))},callBackChangePageSize(e,t,n){e?(this.myConfig.pageConfig.page_size=t,this.refurbish(null,!0)):this.$nextTick((()=>{this.myConfig.pageConfig.page_size=n,this.myConfig.showPage=!1,this.myConfig=Object.assign({},this.myConfig),this.$nextTick((()=>{this.myConfig.showPage=!0,this.myConfig=Object.assign({},this.myConfig)}))}))},changePageSize(e){let t=this.myConfig.pageConfig.page_size;this.myConfig.refurbishCheck?this.myConfig.refurbishCheck(e,t,this.callBackChangePageSize):(this.myConfig.pageConfig.page_size=e,this.data&&this.data.length>0&&this.refurbish(null,!0))},sortChagne(e){this.order_field="",this.order_direction="";let t=[],n=[];if(this.config.searchParam&&this.config.searchParam.order_field)if(t=this.config.searchParam.order_field.split(","),this.config.searchParam.order_direction){n=this.config.searchParam.order_direction.split(",");for(let e=n.length;e<t.length;e++)n.push("asc")}else for(let o=0;o<t.length;o++)n.push("asc");if("normal"!==e.order){let o=t.findIndex((t=>t===e.key));o>-1?n.splice(o,1,e.order):(t.push(e.key),n.push(e.order))}t.length>0&&(this.order_field=t.join(),this.order_direction=n.join()),this.data&&this.data.length>0&&this.refurbish()},onCurrentChange(e,t){this.singleData={},this.singleData.currentRow=e,this.singleData.oldCurrentRow=t,this.myConfig.onSingleChange&&this.myConfig.onSingleChange(),this.myConfig.showCheckBox&&(this.myConfig.onSetRowCheck?this.myConfig.onSetRowCheck(e._customIndex,!0):this.setRowCheck(e._customIndex,!0))},onSelect(e,t){this.myConfig.onSelect&&this.myConfig.onSelect(e,t)},onSelectCancel(e,t){this.myConfig.onSelectCancel&&this.myConfig.onSelectCancel(e,t)},OnSelectionChange(e){this.$nextTick((()=>{this.myConfig.onSelectionChange&&this.myConfig.onSelectionChange(e),e&&e.length>0?this.leftActive=!0:this.leftActive=!1;let t=this.$Method.copy(this.data),n=!1;t.forEach(((t,o)=>{n=!1,e.forEach((e=>{if(o===e._customIndex)return n=!0,!0})),t._checked=n})),this.data=t,this.tempData=this.$Method.copy(t)}))},OnMultiSelectionChange(e){this.$nextTick((()=>{let t=this.$Method.copy(this.tempMultiSelectData),n=!1;t.forEach(((t,o)=>{n=!1,e.forEach((e=>{if(o===e._customIndex)return n=!0,!0})),t._checked=n})),this.tempMultiSelectData=t,e&&e.length>0?this.rightActive=!0:this.rightActive=!1}))},removeRow(e){this.data.splice(e,1)},doBatchAction(e){if("addData"!==e.name){let t=this.getSelection();if(0===t.length)return void this.alert("请至少选择一行");e.data=t}this.$emit("doAction",e)},add(){let e={name:"addData"};this.$emit("doAction",e)},setSearchBeforeSearchParam(e){this.searchBeforeSearchParam=Object.assign({},{},e)},clearSearchBeforeSearchParam(){this.searchBeforeSearchParam={}},popValueChanged(e){let t=[],n=this,o=Object.assign({},n.getSearchParam(),e);return n.synchroPost(n.myConfig.resources,n.myConfig.method,o,(function(e){e&&e[n.myConfig.response]&&(t=e[n.myConfig.response])}),null),t},getTotalCount(){let e="";return void 0!==this.myConfig.pageConfig.total_results&&(e=this.myConfig.pageConfig.total_results),e},export(e,t){if(0==this.data.length)return void this.alert("请先查询数据");let n=this.getSearchParam();this.OmdUrl.maxRowNum&&(n.maxrownum=this.OmdUrl.maxRowNum),this.OmdUrl.maxDataNum&&(n.maxdatanum=this.OmdUrl.maxDataNum);let o=this.getModulecode();o&&(n.modulecode=o);let i={dictdata:{}};n.fields=this.$Method.getGridField(this.myConfig.items,this.myConfig.separator,this.dictData,i.dictdata),n.fields||(n.fields="");let r=this.getTotalCount();r&&(n.fields+=",totalCount"+this.myConfig.separator+r),o&&(n.fields+=",modulecode"+this.myConfig.separator+o);let a=this.myConfig.exportMethod;e&&(a="asyncExport");let s=this.myConfig.resources.replace("rest",a),l=this;const c=this.zip(JSON.stringify(i.dictdata));n.dictdata=encodeURIComponent(c),e?this.asyncExport(s,this.myConfig.method,n,t):this.doExportExcel(s,this.myConfig.method,n,this.myConfig.exportType,l)},zip(e){let t=d.gzip(e,{to:"string"});return btoa(t)},asyncExport(e,t,n,o){this.synchroPost(e,t,n,(function(e){"1"===e.flag&&(o?o():this.alert("文件正在生成,请稍后"))}),null)},initAsynExportConfig(e,t,n){for(let o=0;o<e.length;o++){let i=this.$Method.copy(e[o]);if(!1!==i.visible&&!1!==i.isExport&&(i.name&&(i.label=t+i.label,n.push(i)),i.children)){let e=t+"("+i.label+")";this.initAsynExportConfig(i.children,e,n)}}},setRowHighlight(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._highlight=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n),this.myConfig.multiSelect||(this.singleData.currentRow=this.$Method.copy(this.data[e]))}))}},getSelection(){return!1===this.myConfig.multiSelect?this.singleData.currentRow?[this.singleData.currentRow]:[]:this.myConfig.multiSelectGrid?this.$Method.copy(this.multiSelectData):this.$refs.table.getSelection()},setSelection(e){this.myConfig.multiSelectGrid&&(this.multiSelectData=[],this.$nextTick((()=>{this.multiSelectData=e,this.tempMultiSelectData=this.$Method.copy(this.multiSelectData)})))},moveToLeft(){let e=this.$refs.multiSelectTable.getSelection();e&&e.length>0&&e.forEach((e=>{let t=this.multiSelectData.findIndex((t=>t[this.myConfig.responseId]===e[this.myConfig.responseId]));t>-1&&this.multiSelectData.splice(t,1)})),this.tempMultiSelectData=this.$Method.copy(this.multiSelectData),this.rightActive=!1},moveToRight(){let e=this.$refs.table.getSelection();e&&e.length>0&&e.forEach((e=>{if(this.myConfig.multiCheck)this.myConfig.multiCheck(this.multiSelectData,e)&&(delete e._customIndex,delete e._checked,this.multiSelectData.push(e));else{-1===this.multiSelectData.findIndex((t=>t[this.myConfig.responseId]===e[this.myConfig.responseId]))&&(delete e._customIndex,delete e._checked,this.multiSelectData.push(e))}})),this.tempMultiSelectData=this.$Method.copy(this.multiSelectData)},multiInitColumn(){let e=[],t=this.myConfig.items;if(this.myConfig.multiItems&&(t=this.myConfig.multiItems),!t||0===t.length)return e;this.initCheckColumn(e),this.initMultiIndexColumn(e);const n=t.length;for(let i=0;i<n;i++)!1!==t[i].visible&&this.initCommonColumn(t[i],e);this.initExpandColumn(e),this.initOperColumn(e);let o=[];return this.getSoltTableColumns(e,o),this.multiSoltTableColumns=o,e},customClearData(){this.multiSelectData=[],this.rightActive=!1,this.leftActive=!1,this.myConfig.dynamicColumnFlag&&(this.tableColumns=[],this.soltTableColumns=[],this.newRow={},this.total_summary={},this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1}))},clearCondition(){this.$refs.condition&&this.$refs.condition.clear&&this.$refs.condition.clear()},clearCurrentRow(){this.$refs.table&&this.$refs.table.clearCurrentRow()},delRow(e){this.data.splice(e,1),this.tempData=this.data},updataRow(e,t){let n=Object.assign({},this.data[e],t);this.data.splice(e,1,n),this.tempData=this.data},initMultiIndexColumn(e){let t={type:"index",key:"index",width:45,title:"行号",align:"center"};e.push(t)},makeDynamicColumn(){let e=[];if(this.tableColumns=[],this.soltTableColumns=[],this.total_summary={},this.dynamicInitData&&this.dynamicInitData[this.myConfig.response]){e=this.$Method.copy(this.dynamicInitData[this.myConfig.response]);let t=[];t=this.$Method.copy(this.myConfig.dynameicColumnConfig.groupColumns);let n=[];this.myConfig.dynameicColumnConfig.dynameicColumnName&&(n=this.myConfig.dynameicColumnConfig.dynameicColumnName.split(","));let o=[];this.myConfig.dynameicColumnConfig.dynameicColumnValue&&(o=this.myConfig.dynameicColumnConfig.dynameicColumnValue.split(","));let i=[];this.myConfig.dynameicColumnConfig.dynameicColumnValueTitle&&(i=this.myConfig.dynameicColumnConfig.dynameicColumnValueTitle.split(","));let r=[];n.forEach((e=>{let t={};t.name=e,r.push(t)}));let a={},s={},l=0;e.forEach((e=>{let i="";t.forEach((t=>{i=i+e[t]+"-"})),i&&(i=i.substring(0,i.length-1));let c="",u="";n.forEach(((t,o)=>{c=c+e[t]+"-",r[o][e[t]]||(r[o][e[t]]={},r[o][e[t]].fatherId=u,r[o][e[t]].label=e[t]),u=e[t],o===n.length-1&&(r[o][e[t]].id=c.substring(0,c.length-1))})),c&&(c=c.substring(0,c.length-1)),a[i]||(a[i]={},a[i].data={},t.forEach((t=>{a[i].data[t]=e[t]})),a[i].columns={}),a[i].columns[c]||(o.length>1?(a[i].columns[c]={},o.forEach((t=>{a[i].columns[c][t]=e[t]}))):a[i].columns[c]=e[this.myConfig.dynameicColumnConfig.dynameicColumnValue]),s[c]||(s[c]={},s[c].name="dy_col_"+l,o.length>1?(s[c].sum={},o.forEach((t=>{s[c].sum[t]=e[t]}))):s[c].sum=0,l++),o.length>1?o.forEach((t=>{s[c].sum[t]=Number(s[c].sum[t])+Number(e[t])})):s[c].sum=Number(s[c].sum)+Number(e[this.myConfig.dynameicColumnConfig.dynameicColumnValue])}));let c=[];for(let e in a){let t={};Object.assign(t,a[e].data);let n=0;for(let i in s)o.length>1?void 0!==a[e].columns[i]?o.forEach((o=>{let r=s[i].name+"_"+o;t[r]=a[e].columns[i][o],n+=Number(t[r])})):o.forEach((e=>{let o=s[i].name+"_"+e;t[o]=0,n+=Number(t[o])})):void 0!==a[e].columns[i]?(t[s[i].name]=a[e].columns[i],n+=Number(t[s[i].name])):(t[s[i].name]=0,n+=Number(t[s[i].name]));t.dynamic_sum=n,c.push(t)}let u=[];this.makeDynamicColumnConfig(r,0,"",u,s,o,i);let d={};this.myConfig.dynameicColumnConfig.dynameicColumnSumLable?d.label=this.myConfig.dynameicColumnConfig.dynameicColumnSumLable:d.label="动态合计",d.type="NumberBox",d.contentAlign="right",d.summary=!0,d.name="dynamic_sum";let h=this.$Method.getTextWidth(d.label);d.width=h,Object.assign(d,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro),u.push(d);let A=this.myConfig.items.concat(u);this.dynamicColumnConfig=this.$Method.copy(A),this.initDynamicColumn(A);let f={},p=0;for(let e in s)o.length>1?o.forEach((t=>{let n=s[e].name+"_"+t;f[n]=s[e].sum[t],p+=Number(s[e].sum[t])})):(f[s[e].name]=s[e].sum,p+=Number(s[e].sum));f.dynamic_sum=p;let g=[];this.summaryColumn.forEach((e=>{void 0===f[e]&&g.push(e)})),g.length>0&&c.forEach((e=>{g.forEach((t=>{f[t]||(f[t]=0),f[t]=f[t]+Number(e[t])}))})),this.data=c,this.tempData=this.$Method.copy(c),this.total_summary=Object.assign({},{},f),this.myConfig.showSummary||Object.assign(this.myConfig,{showSummary:!0})}else this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1})},initDynamicColumn(e){let t={},n=[],o=[];this.initCheckColumn(o),this.initOperColumn(o),this.initIndexColumn(o);const i=e.length;for(let a=0;a<i;a++)!1!==e[a].visible?this.initCommonColumn(e[a],o,n,t):void 0!==e[a].defaultValue&&(e[a].name&&(t[e[a].name]=e[a].defaultValue),e[a].sname&&(t[e[a].sname]=e[a].defaultValue),e[a].ename&&(t[e[a].ename]=e[a].defaultValue));this.total_summary={},this.newRow=D(t),n.push("dynamic_sum"),this.summaryColumn=D(n),this.tableColumns=D(o);let r=[];this.getSoltTableColumns(o,r),this.soltTableColumns=r,this.dynamicColumnItems=e},makeDynamicColumnConfig(e,t,n,o,i,r,a){let s=e[t];if(t===e.length-1)for(let l in s){if("name"===l)continue;let e={};if(e.label=s[l].label,r.length>1)e.align="center",e.children=[],r.forEach(((t,n)=>{let o={type:"NumberBox",align:"center",contentAlign:"right",summary:!0};Object.assign(o,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro),o.label=a[n];let r=this.$Method.getTextWidth(o.label);o.width=r,o.name=i[s[l].id].name+"_"+t,e.children.push(o)}));else{e.type="NumberBox",e.align="center",e.contentAlign="right",e.summary=!0;let t=this.$Method.getTextWidth(e.label);e.width=t,i[s[l].id]&&(e.name=i[s[l].id].name),Object.assign(e,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro)}n?s[l].fatherId===n&&(o.push(e),o.sort(((e,t)=>e>t))):(o.push(e),o.sort(((e,t)=>e>t)))}else for(let l in s){if("name"===l)continue;let c={};c.label=s[l].label,c.align="center",n?s[l].fatherId===n&&(c.children=[],this.makeDynamicColumnConfig(e,t+1,l,c.children,i,r,a),o.push(c),o.sort(((e,t)=>e>t))):(c.children=[],this.makeDynamicColumnConfig(e,t+1,l,c.children,i,r,a),o.push(c),o.sort(((e,t)=>e>t)))}},handleSummary({columns:e}){let t={};for(let i in this.newRow)t[i]={key:i,value:""};e.findIndex((e=>"index"===e.type))>-1&&(t.index={key:"index",value:""}),e.findIndex((e=>"selection"===e.type))>-1&&(t.selection={key:"selection",value:""});let n=[];n=this.myConfig.dynamicColumnFlag?this.dynamicColumnItems:this.config.items;for(let i in this.total_summary){let e={};if(this.findItemByName(n,i,e),e.name){let n=this.total_summary[i];void 0!==e.format&&(n=this.$Method.formatNumber(n,e.format,e.notzero)),t[i]={key:i,value:n}}}let o=this.findFirst(e);return t[o]={key:o,value:this.myConfig.sumText},this.myConfig.customSummary?this.myConfig.customSummary(t):t},findFirst(e){let t="";return e.some((e=>{if("selection"!==e.key&&"index"!==e.key&&"sumindex"!==e.key)return t=e.name,!0})),t},findItemByName(e,t,n){if(e instanceof Array){let o=!1;return e.some((e=>{if(e.children&&e.children.length>0){if(o=this.findItemByName(e.children,t,n),o)return!0}else if(e.name&&e.name===t)return Object.assign(n,e),o=!0,!0})),o}return!(!e.name||e.name!==t)&&(Object.assign(n,e),!0)},dynamicExportExcel(){let e=[];this.myConfig.dynameicColumnConfig.dynameicColumnName&&(e=this.myConfig.dynameicColumnConfig.dynameicColumnName.split(","));let t=e.length,n=this.$Method.getUrlParam("modulecode");n||(n=this.$Method.getUrlParam("billmoduleid"));let o=this.$Method.formatDate(new Date,"yyyyMMddhhmmss")+"(合计"+this.data.length+"条).xlsx";n&&(o=n+"_"+o);let i=this.$Method.copy(this.data);this.dynamicColumnConfig.forEach((e=>{if("ComboBox"===e.type){let t="code",n="name";e.valueField&&(t=column.valueField),e.textField&&(n=column.textField),i.forEach((o=>{if(o[e.name]&&e.data){let i=e.data.findIndex((n=>n[t]===o[e.name]));i>-1&&(!1===e.codeWithName?o[e.name]=e.data[i][n]:o[e.name]="["+e.data[i][t]+"]"+e.data[i][n])}}))}}));let r=[];this.initAsynExportConfig(this.dynamicColumnConfig,"",r),this.$Method.exportExcelStyle(r,i,t,o)},formatValue(e,t){let n="",o=this.$Method.copy(this.tempData[e]);t.name&&(n=o[t.name]);let i=t,r=this.$Method.formatValue(n,o,i),a={};return a.value=n,a.row=o,a.config=i,a.valueFormat=r,t.formatValue?t.formatValue(a):this.myConfig.formatValue?this.myConfig.formatValue(a):r},formatMulValue(e,t){let n="",o=this.$Method.copy(this.tempMultiSelectData[e]);t.name&&(n=o[t.name]);let i=t;return this.$Method.formatValue(n,o,i)},setCustomColumn(e){e.slot=e.key},onLinkTo(e){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),t.onLinkTo(e)},addRowInfo(e,t){let n=e.rowIndex;e.rowinfo={},e.rowinfo.column=t,e.rowinfo.index=n,n>-1&&(e.rowinfo.row=this.data[n]);e.rowinfo.gridObject=this},doSumgroups(e,t){let n=[];if(t.forEach((t=>{if(t.data&&t.data.length>0){let o=t.group.split(","),i="",r="";e.forEach(((e,a)=>{if(r="",o.forEach((t=>{r+=e[t]})),i||(i=r),i!==r){let e=t.data.find((e=>{let t="";return o.forEach((n=>{t+=e[n]})),t===i})),s={};if(s.index=a,s.sum=e,t.showgroup){let e=t.showgroup.split(",");s.showgroup=e}s.group=o,n.push(s),i=r}}))}})),n.length>0){let t=[];return e.forEach(((e,o)=>{let i=o+1;this.myConfig.showPage&&(i+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size),e.sumindex=i+"";let r=n.find((e=>e.index===o));r?(this.myConfig.customSummaryGroup&&(r=this.myConfig.customSummaryGroup(r)),r.showgroup&&r.group.forEach((e=>{-1===r.showgroup.findIndex((t=>e===t))&&(r.sum[e]="")})),r.sum.sumindex="",t.push(r.sum),t.push(e)):t.push(e)})),t}return e}},mounted(){this.observer=E.default(),this.$refs.head&&this.observer.listenTo(this.$refs.head,this.setExtraHeight),this.$refs.page&&this.observer.listenTo(this.$refs.page,this.setExtraHeight)},beforeUnmount(){this.$refs.head&&this.observer.removeListener(this.$refs.head,this.setExtraHeight),this.$refs.page&&this.observer.removeListener(this.$refs.page,this.setExtraHeight)}},pt={ref:"head"},gt={key:0},mt={key:0},yt={ref:"page",name:"page"},vt={key:0,style:{background:"#eee","padding-top":"5px"}},Ct=["textContent"],bt=["textContent"],wt={ref:"page",name:"page"},xt={key:0},Bt={key:1,ref:"page",style:{background:"#eee","padding-top":"5px"}};var Et=Xe({name:"viewgrid",extends:ft,mounted(){}},[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("ConditionBox"),s=c.resolveComponent("Col"),l=c.resolveComponent("Toolbar"),u=c.resolveComponent("CommonIcon"),d=c.resolveComponent("Tooltip"),h=c.resolveComponent("Row"),A=c.resolveComponent("ShowText"),f=c.resolveComponent("Table"),p=c.resolveComponent("Page"),g=c.resolveComponent("Card"),m=c.resolveComponent("Button");return c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",pt,[e.$slots.header?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(e.myConfig.headStyle)},[c.renderSlot(e.$slots,"header")],4)):(c.openBlock(),c.createElementBlock("div",{key:1,style:c.normalizeStyle(e.myConfig.headStyle)},[e.showCondition?(c.openBlock(),c.createElementBlock("div",gt,["billGrid"===e.myConfig.gridType?(c.openBlock(),c.createBlock(h,{key:0,gutter:4},{default:c.withCtx((()=>[c.createVNode(s,{span:"18"},{default:c.withCtx((()=>[c.createVNode(a,{ref:"condition",config:e.myConfig,onConditionAction:e.conditionAction,dictData:e.dictData,modelType:"billSearch"},null,8,["config","onConditionAction","dictData"])])),_:1}),c.createVNode(s,{span:"6"},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",gutter:8},{default:c.withCtx((()=>[c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(l,{config:e.myToolConfig,onDoAction:e.doBatchAction,tooltype:"batch",moduleMethod:e.globalConfig.moduleMethod},null,8,["config","onDoAction","moduleMethod"])])),_:1}),e.showHelpBtn?(c.openBlock(),c.createBlock(s,{key:0},{default:c.withCtx((()=>[c.createElementVNode("a",{href:"#",onClick:t[0]||(t[0]=c.withModifiers(((...t)=>e.openHelp&&e.openHelp(...t)),["prevent"]))},[c.createVNode(d,{content:"帮助中心",placement:"left"},{default:c.withCtx((()=>[c.createVNode(u,{size:"32",color:"#2d8cf0",type:"md-help-circle"})])),_:1})])])),_:1})):c.createCommentVNode("",!0),e.modulecode?(c.openBlock(),c.createBlock(s,{key:1},{default:c.withCtx((()=>[c.createVNode(d,{content:e.modulecode,placement:"left"},{default:c.withCtx((()=>[c.createVNode(u,{size:"32",color:"#2d8cf0",type:"ios-information-circle-outline"})])),_:1},8,["content"])])),_:1})):c.createCommentVNode("",!0)])),_:1})])),_:1})])),_:1})):(c.openBlock(),c.createBlock(h,{key:1},{default:c.withCtx((()=>[c.createVNode(s,{span:"24"},{default:c.withCtx((()=>[c.createVNode(a,{ref:"condition",config:e.myConfig,onConditionAction:e.conditionAction,dictData:e.dictData,isPop:e.isPop},null,8,["config","onConditionAction","dictData","isPop"])])),_:1})])),_:1}))])):c.createCommentVNode("",!0)],4))],512),e.myConfig.multiSelectGrid?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(h,{type:"flex",justify:"center",align:"middle"},{default:c.withCtx((()=>[c.createVNode(s,{span:e.gridCol},{default:c.withCtx((()=>[c.createVNode(g,{padding:0,bordered:!1},{title:c.withCtx((()=>[c.createElementVNode("span",{textContent:c.toDisplayString(e.myConfig.gridTitle)},null,8,Ct)])),default:c.withCtx((()=>[c.createVNode(f,{ref:"table","row-class-name":e.myConfig.rowClassName,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary,loading:e.loading,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.tableColumns,data:e.tempData,onOnSortChange:e.sortChagne,onOnCurrentChange:e.onCurrentChange,"highlight-row":e.myConfig.highLightRow,onOnRowDblclick:e.dbclick,onOnSelect:e.onSelect,onOnSelectCancel:e.onSelectCancel,onOnSelectionChange:e.OnSelectionChange,onOnRowClick:e.click,onOnColumnWidthResize:e.onColumnWidthResize},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatValue(n,t),contentAlign:t.contentAlign,rowIndex:n},null,8,["label","contentAlign","rowIndex"])]))})))]),1032,["row-class-name","show-summary","summary-method","loading","size","stripe","border","height","max-height","show-header","columns","data","onOnSortChange","onOnCurrentChange","highlight-row","onOnRowDblclick","onOnSelect","onOnSelectCancel","onOnSelectionChange","onOnRowClick","onOnColumnWidthResize"])])),_:1})])),_:1},8,["span"]),c.createVNode(s,{span:"2"},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"center",align:"middle",style:{padding:"5px"}},{default:c.withCtx((()=>[c.createVNode(d,{content:"删除",placement:"left"},{default:c.withCtx((()=>[c.createVNode(m,{type:"primary",size:"small",icon:"ios-arrow-back",disabled:!e.rightActive,onClick:e.moveToLeft},null,8,["disabled","onClick"])])),_:1})])),_:1}),c.createVNode(h,{type:"flex",justify:"center",align:"middle",style:{padding:"5px"}},{default:c.withCtx((()=>[c.createVNode(d,{content:"添加",placement:"right"},{default:c.withCtx((()=>[c.createVNode(m,{type:"primary",size:"small",icon:"ios-arrow-forward",disabled:!e.leftActive,onClick:e.moveToRight},null,8,["disabled","onClick"])])),_:1})])),_:1})])),_:1}),c.createVNode(s,{span:e.multiGridCol},{default:c.withCtx((()=>[c.createVNode(g,{padding:0,bordered:!1},{title:c.withCtx((()=>[c.createElementVNode("span",{textContent:c.toDisplayString(e.myConfig.multiGridTitle)},null,8,bt)])),default:c.withCtx((()=>[c.createVNode(f,{ref:"multiSelectTable","row-class-name":e.myConfig.rowClassName,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.multiTableColumns,data:e.tempMultiSelectData,"highlight-row":e.myConfig.highLightRow,onOnSelectionChange:e.OnMultiSelectionChange},c.createSlots({_:2},[c.renderList(e.multiSoltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatMulValue(n,t),contentAlign:t.contentAlign},null,8,["label","contentAlign"])]))})))]),1032,["row-class-name","size","stripe","border","height","max-height","show-header","columns","data","highlight-row","onOnSelectionChange"])])),_:1})])),_:1},8,["span"])])),_:1}),c.createElementVNode("div",wt,[e.$slots.footer?(c.openBlock(),c.createElementBlock("div",xt,[c.renderSlot(e.$slots,"footer")])):c.createCommentVNode("",!0),e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Bt,[c.createVNode(g,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"start",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(p,{modelValue:e.culPage,"onUpdate:modelValue":t[2]||(t[2]=t=>e.culPage=t),total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["modelValue","total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)],512)],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(f,{ref:"table","row-class-name":e.myConfig.rowClassName,loading:e.loading,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.tableColumns,data:e.tempData,onOnSortChange:e.sortChagne,onOnCurrentChange:e.onCurrentChange,"highlight-row":e.myConfig.highLightRow,onOnRowDblclick:e.dbclick,onOnSelect:e.onSelect,onOnSelectCancel:e.onSelectCancel,onOnSelectionChange:e.OnSelectionChange,onOnRowClick:e.click,onOnColumnWidthResize:e.onColumnWidthResize},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatValue(n,t),contentAlign:t.contentAlign,rowIndex:n},null,8,["label","contentAlign","rowIndex"])]))})))]),1032,["row-class-name","loading","show-summary","summary-method","size","stripe","border","height","max-height","show-header","columns","data","onOnSortChange","onOnCurrentChange","highlight-row","onOnRowDblclick","onOnSelect","onOnSelectCancel","onOnSelectionChange","onOnRowClick","onOnColumnWidthResize"]),e.$slots.footer?(c.openBlock(),c.createElementBlock("div",mt,[c.renderSlot(e.$slots,"footer")])):c.createCommentVNode("",!0),c.createElementVNode("div",yt,[e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",vt,[c.createVNode(g,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(p,{modelValue:e.culPage,"onUpdate:modelValue":t[1]||(t[1]=t=>e.culPage=t),total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["modelValue","total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})])):c.createCommentVNode("",!0)],512)],64))])}]]);const _t={name:"editgridbase",extends:At,data:()=>({myConfig:{resources:"",method:"",response:"",searchParam:null,readOnly:!1,showIndex:!0,showCheckBox:!0,multiSelect:!0,addRowBefore:"",name:"",editItemMaxNum:8,lineNum:4,labelWidth:100,showAddBtn:!0,showDelBatchBtn:!0,showZoom:!1,delBatchBtnName:"删除",addBtnName:"新增",editBtnName:"编辑",cancelBtnName:"放弃",showPage:!1},showAddBtn:!0,showDelBatchBtn:!0,showDelBtn:!0,showZoom:!1,delBatchBtnName:"删除",addBtnName:"新增",showEditRowForm:!1,defaultRow:{},editItemNum:0,rowAction:[{iconcls:"row",name:"editRowForm",text:"编辑"}],openChange:!1}),methods:{customInit(){this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.forEach((e=>{!1!==e.visible&&this.editItemNum++})),this.editItemNum>Number(this.myConfig.editItemMaxNum)?(this.showRowAction=!0,this.myToolConfig.items=this.$Method.copy(this.rowAction),this.editRowFlag=!1):(this.toolConfig.items=[],this.showRowAction=!1,this.editRowFlag=!0),this.showDelRow&&(this.myToolConfig.items||(this.myToolConfig.items=[]),this.myToolConfig.items=this.myToolConfig.items.concat(this.delRowAction)),void 0!==this.myConfig.showAddBtn&&(this.showAddBtn=this.myConfig.showAddBtn),void 0!==this.myConfig.showAddBtn&&(this.showAddBtn=this.myConfig.showAddBtn),void 0!==this.myConfig.addBtnName&&(this.addBtnName=this.myConfig.addBtnName),void 0!==this.myConfig.showDelBatchBtn&&(this.showDelBatchBtn=this.myConfig.showDelBatchBtn),void 0!==this.myConfig.showZoom&&(this.showZoom=this.myConfig.showZoom),this.myConfig.showPage&&(this.myConfig.indexMethod=this.customIndexMethod,this.myConfig.pageSizeNum?this.myConfig.pageConfig.page_size=Number(this.myConfig.pageSizeNum):this.myConfig.pageConfig.page_size=20),this.customInit2&&this.customInit2(),this.myConfig.getGridObject=this.getGridObject},getGridObject(){return this},conditionAction(e){let t=[];switch(e.action){case"condition_search":e.para&&(this.conditionSearchParam=this.$Method.copy(e.para)),this.refurbish();break;case"condition_clear":this.conditionSearchParam={};break;case"condition_ok":this.myConfig.multiSelect?t=this.getSelection():this.singleData.currentRow&&t.push(this.singleData.currentRow),0===t.length?this.alert("请选择"):(e.action="viewgrid_ok",e.rows=t,this.$emit("viewGridAction",e));break;case"condition_cancel":e.action="viewgrid_cancel",this.$emit("viewGridAction",e)}},addRow(e){if(this.checkIsEdit&&!this.checkIsEdit())return;this.myConfig.readOnly&&this.setReadOnly(!1);let t=null;if(this.myConfig.addRowBefore){let e={};if(e.name=this.myConfig.name,e.grid=this.$refs.table,t=this.myConfig.addRowBefore(e),!1===t)return}t&&!0!==t||(t={}),e&&(t=Object.assign({},t,e)),this.initScrollLeft(),this.cancelCellEditing(),this.$nextTick((()=>{t.flag="I";let e=Object.assign({},this.newRow,t);this.data.push(e);let n={name:"editGrid"};n.gridname=this.myConfig.name,this.$emit("doAction",n)}))},setPro(e){e&&(this.myConfig=Object.assign({},this.myConfig,e))},setReadOnly(e){let t={};t.readOnly=e,!1!==this.config.showCheckBox&&(t.readOnly?t.showCheckBox=!1:t.showCheckBox=!0),this.cancelCellEditing(),this.setPro(t)},delBatchRow(){this.delCommonRow(null)},delRow(e){this.delCommonRow(e)},delCommonRow(e){let t=null,n=this;if(this.myConfig.delRowBefore){let n={};if(n.name=this.myConfig.name,n.grid=this.$refs.table,n.index=e,t=this.myConfig.delRowBefore(n),!1===t)return}if(this.cancelCellEditing(),e||0===e)this.remove(e);else{let e=this.getSelection();const t=e.length;for(let n=0;n<t;n++)this.remove(e[n]._customIndex,!0)}if(this.myConfig.delRowAfter){let e={};e.name=this.myConfig.name,e.grid=n,this.$nextTick((()=>{this.myConfig.delRowAfter(e)}))}},updataRow(e,t){let n=this.getData();if(this.myConfig.showPage){let o=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,i=o+this.myConfig.pageConfig.page_size,r=n[e],a=!0;if(e>=o&&e<i&&(a=!1),void 0===r.flag&&(t.flag="U"),t=Object.assign({},r,t),a)if("I"===r.flag){let n=this.getAddIndex(e);n>-1&&this.data.splice(this.getAddCurlIndex(n),1,t)}else this.initData.splice(e,1,t);else{let n=e-o;this.data.splice(n,1,t)}}else void 0===n[e].flag&&(t.flag="U"),t=Object.assign({},n[e],t),this.data.splice(e,1,t);this.showEditRowForm&&this.$refs.rowForm&&e===this.$refs.rowForm.getEditIndex()&&this.$refs.rowForm.setData(t)},updateRow(e,t){this.updataRow(e,t)},initRowForm(e){"D"!==e.rowinfo.row.flag&&(this.showEditRowForm=!0,this.$refs.rowForm.setEditIndex(e.rowinfo.index),this.$refs.rowForm.setData(e.rowinfo.row))},OnSelectionChange(e){this.myConfig.onSelectionChange&&this.myConfig.onSelectionChange(e);let t=this.$Method.copy(this.data),n=!1;t.forEach(((t,o)=>{n=!1,e.forEach((e=>{if(o===e._customIndex)return n=!0,!0})),t._checked=n})),this.data=t},customInitOperColumn(e,t){if(!0!==this.myConfig.readOnly)if(!1===this.showDelRow){let n=this.myToolConfig.items.findIndex((e=>"delRow"===e.name));n>-1&&this.myToolConfig.items.splice(n,1),this.myToolConfig.items.length>0&&t.push(e)}else t.push(e)},editRow(){let e=this.$refs.rowForm.getData();this.$refs.rowForm.cancelCellEditing(),this.updateRow(this.$refs.rowForm.getEditIndex(),e)},getChangeData(){let e=[],t=this.getData();return t.length>0&&t.forEach((t=>{void 0!==t.flag&&e.push(t)})),this.myConfig.showPage?e:this.delData.concat(e)},isChange(){return this.getChangeData().length>0},setShowAddBtn(e){this.showAddBtn=e},setShowDelBatchBtn(e){this.showDelBatchBtn=e},setCustomColumn(e){e.slot=e.key},addRowInfo(e,t){let n=this.editIndex;e.rowinfo={},e.rowinfo.column=t,-1===n&&(n=this.oldEditIndex),e.rowinfo.index=n,n>-1&&(e.rowinfo.row=this.$Method.copy(this.data[n]));e.rowinfo.gridObject=this},valueChanged(e){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),t.valueChanged(e)},onLinkTo(e){if(this.myConfig.readOnly){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),e.rowinfo.index=e.rowIndex,e.rowIndex>-1&&(e.rowinfo.row=this.$Method.copy(this.data[e.rowIndex])),t.onLinkTo(e)}},searchBefore(e){const t=this.findColumnConfig(e.myConfig.name,this.myConfig.items);return this.addRowInfo(e,t),t.searchBefore(e)},setDataBefore(e,t){const n=this.findColumnConfig(t.myConfig.name,this.myConfig.items);let o={};return o.data=e,o.tabname=this.myConfig.name,this.addRowInfo(o,n),n.setDataBefore(o,t)},cancelCellEditing(){let e="cell_"+this.editIndex+"_"+this.editKey;this.$refs[e]&&this.$refs[e].setFocus&&this.$refs[e].setFocus(!1);let t=this;this.$nextTick((()=>{t.editKey="",t.oldEditIndex=this.editIndex,t.editIndex=-1}))},IsCellError(e,t){let n="",o=this.$Method.copy(this.data[e]);if("D"===o.flag)n="efutre-del-row";else if(!0===t.required&&!o[t.name]&&0!==o[t.name]){let i=e;this.myConfig.showPage?"I"===o.flag?(i=this.getAddIndex(e,!0),this.checkAddInfo.length>i&&this.checkAddInfo[i][t.key]&&(n="efuture-grid-cell-error")):(i+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,this.checkInfo.length>i&&this.checkInfo[i][t.key]&&(n="efuture-grid-cell-error")):this.checkInfo.length>i&&this.checkInfo[i][t.key]&&(n="efuture-grid-cell-error")}return n||(n="efuture-grid-cell"),n},EditCell(e,t){if(this.myConfig.readOnly)return void this.cancelCellEditing();if(t.readOnly)return void this.cancelCellEditing();let n=this.getCurRow(e);if(!(this.myConfig.showPage&&"D"===n.flag||this.editIndex===e&&this.editKey===t.key))if(this.myConfig.cellbeginedit){let o={};if(o.index=e,o.column=t,o.tabname=this.myConfig.name,o.row=n,!this.myConfig.cellbeginedit(o))return void this.cancelCellEditing();this.editIndex=e,this.editKey=t.key,this.setcheckInfo(e,t.key)}else this.editIndex=e,this.editKey=t.key,this.setcheckInfo(e,t.key)},setcheckInfo(e,t){let n=e,o=this.getCurRow(e);this.myConfig.showPage?(n+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,"I"===o.flag?this.setCheckCommonInfo(this.checkAddInfo,this.getAddIndex(e,!0),t):this.setCheckCommonInfo(this.checkInfo,n,t)):this.setCheckCommonInfo(this.checkInfo,n,t)},setCheckCommonInfo(e,t,n){if(e.length>t)this.checkInfo[t][n]=!0;else{let n=e.length;for(let o=0;o<t-n+1;o++)e.push({})}e[t][n]=!0},formatValue(e,t){let n="",o=this.$Method.copy(this.data[e]);t.name&&(n=o[t.name]);let i=t;if(t.updateCellConfig){let n={};n.index=e,n.column=t,n.row=this.$Method.copy(this.data[e]),i=t.updateCellConfig(n)}let r=this.$Method.formatValue(n,o,i),a={};return a.value=n,a.row=o,a.config=i,a.valueFormat=r,t.formatValue?t.formatValue(a):this.myConfig.formatValue?this.myConfig.formatValue(a):r},getCellConfig(e,t){const n=this.findColumnConfig(t.name,this.myConfig.items);if(n.updateCellConfig){let o={};o.index=e,o.column=t,o.row=this.$Method.copy(this.data[e]);let i=n.updateCellConfig(o);return i.onOpenChange=this.onOpenChange,i.place="grid",i}return t.onOpenChange=this.onOpenChange,t.place="grid",t},onOpenChange(e){this.openChange=e},getCurRow(e){return this.$Method.copy(this.data[e])},handleOut(){this.editKey&&(this.openChange||this.cancelCellEditing())},checkValidate(){this.cancelCellEditing();let e=!1,t=this.getData();if(t.length>0){let n=[];this.soltTableColumns.some((e=>{(e.name||e.sname)&&!1!==e.visible&&!0===e.required&&(e.name&&n.push(e.name),e.sname&&n.push(e.sname),e.ename&&n.push(e.ename))}));let o=-1;t.forEach(((t,i)=>{"I"===t.flag&&o++,"D"!==t.flag&&n.forEach((n=>{t[n]||0===t[n]||(e||(e=!0),this.myConfig.showPage&&"I"===t.flag?this.setCheckCommonInfo(this.checkAddInfo,o,n):this.setCheckCommonInfo(this.checkInfo,i,n))}))}))}return e},setShowBtn(e){this.showBtn=e},doAction(e){this[e.name]&&this[e.name](e)},enterKeyDown(){let e=this.findNextItems(this.editIndex,this.editKey);e&&(this.editIndex=e.editIndex,this.editKey=e.editKey,this.setcheckInfo(e.editIndex,e.editKey))},findNextItems(e,t){let n=this.soltTableColumns.findIndex((e=>e.name===t||e.sname===t)),o=n+1;if(!(n>-1))return null;if(o>=this.soltTableColumns.length)if(e+1>=this.data.length)e=this.findNextRow(0),o=0,"selection"!==this.soltTableColumns[0].type&&"index"!==this.soltTableColumns[0].type||o++,"index"===this.soltTableColumns[1].type&&o++;else{let t=e+1;e=this.findNextRow(t),o=0,"selection"!==this.soltTableColumns[0].type&&"index"!==this.soltTableColumns[0].type||o++,"index"===this.soltTableColumns[1].type&&o++}let i=this.soltTableColumns[o],r=this.getCellConfig(e,i),a=r.name;if(r.sname&&(a=r.sname),!0===r.readOnly||!1===r.visible||"PictureBox"===r.type||"VideoBox"===r.type||"RichTextBox"===r.type||"wRichTextBox"===r.type||"selection"===r.type||"index"===r.type)return this.findNextItems(e,a);if(this.myConfig.cellbeginedit){let t={};if(t.index=e,t.column=r,t.tabname=this.myConfig.name,t.row=this.$Method.copy(this.data[e]),this.myConfig.cellbeginedit(t)){let t={};return t.editIndex=e,t.editKey=a,t}return this.findNextItems(e,a)}{let t={};return t.editIndex=e,t.editKey=a,t}},customIndexMethod:(e,t)=>"I"===e.flag?"+":t,findNextRow(e){let t=e;return this.myConfig.showPage&&this.data.some(((n,o)=>{if(o>=e&&"D"!==n.flag)return t=o,!0})),t},rowClassName:e=>"D"===e.flag?"efutre-del-row":"",getCellClass(e){let t=this.getCurRow(e);return t&&"D"===t.flag?"efutre-del-row":""},changePageSize(e){this.saveCurlData(this.myConfig.pageConfig.page_no,this.initData),this.myConfig.pageConfig.page_no=1,this.data=this.fillData(this.myConfig.pageConfig.page_no,e),this.myConfig.pageConfig.page_size=e,this.cancelCellEditing()},changePage(e){this.saveCurlData(this.myConfig.pageConfig.page_no,this.initData),this.data=this.fillData(e,this.myConfig.pageConfig.page_size),this.myConfig.pageConfig.page_no=e,this.cancelCellEditing()},customClearData(){this.initScrollLeft()},saveCurlData(e,t){let n=[];this.data.forEach(((o,i)=>{let r=(e-1)*this.myConfig.pageConfig.page_size+i;"U"===o.flag||"D"===o.flag?t.splice(r,1,o):"I"===o.flag&&n.push(o)})),this.addData=n},setData(e){e||(e=[]),this.myConfig.showPage?(this.initData=this.$Method.copy(e),this.myConfig.pageConfig.page_no=1,this.myConfig.pageConfig.total_results=e.length,this.data=this.fillData(this.myConfig.pageConfig.page_no,this.myConfig.pageConfig.page_size)):(this.data=e,this.initData=this.$Method.copy(this.data)),this.addData=[],this.delData=[],this.checkInfo=[],this.initScrollLeft(),this.cancelCellEditing()},fillData(e,t){let n=[],o=(e-1)*t,i=o+t;i>this.myConfig.pageConfig.total_results&&(i=this.myConfig.pageConfig.total_results);for(var r=o,a=i;r<a;r++){var s=this.initData[r];s&&n.push(s)}return this.addData.forEach((e=>{n.push(e)})),n},getData(){if(this.myConfig.showPage){let e=this.$Method.copy(this.initData);return this.saveCurlData(this.myConfig.pageConfig.page_no,e),this.addData.forEach((t=>{e.push(t)})),e}return this.$Method.copy(this.data)},remove(e,t){let n=e;if(t){let t=this.data.findIndex((t=>t._customIndex===e));t>-1&&(n=t)}let o=this.getData();if(n>-1)if(void 0===o[n].flag||"U"===o[n].flag){let t=this.$Method.copy(o[n]);if(t.flag="D",this.myConfig.showPage){let o=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,i=o+this.myConfig.pageConfig.page_size,r=n;e>=o&&e<i?(r=e-o,this.data.splice(r,1,t)):this.initData.splice(r,1,t)}else this.delData.push(t),this.data.splice(n,1)}else if("I"===o[n].flag)if(this.myConfig.showPage){let e=this.getAddIndex(n);e>-1&&(this.checkAddInfo.splice(e,1),this.data.splice(this.getAddCurlIndex(e),1))}else this.data.splice(n,1),this.checkInfo.splice(n,1);this.initScrollLeft()},getAddIndex(e,t){let n=-1,o=[];return o=t?this.data:this.getData(),o.some(((t,o)=>{if("I"===t.flag&&n++,o===e)return!0})),n},getAddCurlIndex(e){let t=-1,n=-1;return this.data.some(((o,i)=>{if("I"===o.flag&&t++,t===e)return n=i,!0})),n},setSummary(e,t,n){if(e.children)e.children.forEach((e=>{this.setSummary(e,t.sums)}));else{const o=e.key;if(e.summary){const i=t.map((e=>Number(e[o])));if(i.every((e=>isNaN(e))))n[o]={key:o,value:"N/A"};else{const t=i.reduce(((e,t)=>{const n=Number(t);return isNaN(n)?e:e+t}),0);n[o]={key:o,value:this.$Method.formatNumber(t,e.format,e.notzero),countValue:t}}}else n[o]={key:o,value:""}}},handleSummary({columns:e,data:t}){const n={};e.forEach((e=>{this.setSummary(e,t,n)}));let o=this.findFirst(e);return n[o]={key:o,value:this.myConfig.sumText},this.myConfig.customSummary?this.myConfig.customSummary(n):n},findFirst(e){let t="";return e.some((e=>{if("selection"!==e.key&&"index"!==e.key)return t=e.name,!0})),t}}},kt=["id"],St={key:0},Dt=["onClick"],Ot={key:0,ref:"page",style:{background:"#eee","padding-top":"5px",width:"100%"}};var Ft=Xe({name:"editgrid",extends:_t,mounted(){this.$refs.card&&this.$refs.card.$el&&(this.$refs.card.$el.onmouseleave=()=>{})}},[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Button"),s=c.resolveComponent("Col"),l=c.resolveComponent("Row"),u=c.resolveComponent("ControlBox"),d=c.resolveComponent("ShowText"),h=c.resolveComponent("Table"),A=c.resolveComponent("Page"),f=c.resolveComponent("Card"),p=c.resolveComponent("ExpandRow"),g=c.resolveComponent("Modal");return c.openBlock(),c.createElementBlock("div",{ref:"card",id:e.config.name,style:{padding:"5px"}},[e.$slots.header?(c.openBlock(),c.createElementBlock("div",St,[c.renderSlot(e.$slots,"header")])):c.withDirectives((c.openBlock(),c.createBlock(l,{key:1,type:"flex",justify:"start",gutter:4},{default:c.withCtx((()=>[c.withDirectives(c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(a,{icon:"ios-add",size:"small",onClick:e.addRow},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.addBtnName),1)])),_:1},8,["onClick"])])),_:1},512),[[c.vShow,e.showAddBtn]]),c.withDirectives(c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(a,{icon:"ios-remove",size:"small",onClick:e.delBatchRow},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.delBatchBtnName),1)])),_:1},8,["onClick"])])),_:1},512),[[c.vShow,e.showDelBatchBtn]])])),_:1},512)),[[c.vShow,!e.myConfig.readOnly]]),c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(h,{ref:"table",style:{"margin-top":"5px"},"row-class-name":e.rowClassName,loading:e.loading,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,maxHeight:e.tableMaxHeight,"show-header":e.myConfig.showHeader,onOnSelectionChange:e.OnSelectionChange,columns:e.tableColumns,data:e.data,onOnColumnWidthResize:e.onColumnWidthResize,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createElementVNode("div",{onClick:o=>e.EditCell(n,t)},[e.editIndex===n&&e.editKey===t.key?(c.openBlock(),c.createBlock(u,{key:0,autofocus:!0,config:e.getCellConfig(n,t),valueData:e.getCurRow(n),onInputValue:e.input,editIndex:n,onDoAction:e.doAction},null,8,["config","valueData","onInputValue","editIndex","onDoAction"])):(c.openBlock(),c.createBlock(d,{key:1,label:e.formatValue(n,t),contentAlign:t.contentAlign,class:c.normalizeClass(e.IsCellError(n,t))},null,8,["label","contentAlign","class"]))],8,Dt)]))})))]),1032,["row-class-name","loading","size","stripe","border","height","maxHeight","show-header","onOnSelectionChange","columns","data","onOnColumnWidthResize","show-summary","summary-method"]),e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Ot,[c.createVNode(f,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(l,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(A,{total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)])),_:1}),e.editRowFlag?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(g,{key:2,modelValue:e.showEditRowForm,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showEditRowForm=t),width:"90%",title:"编辑",onOnOk:e.editRow},{default:c.withCtx((()=>[c.createElementVNode("div",null,[c.createVNode(p,{ref:"rowForm",config:e.myConfig,dictData:e.dictData},null,8,["config","dictData"])])])),_:1},8,["modelValue","onOnOk"]))],8,kt)}]]);const Tt=["textContent"],It={key:1},Nt={key:4,style:{"margin-left":"10px"}},Rt=["onClick"],Pt={key:0,ref:"page",style:{background:"#eee","padding-top":"5px",width:"100%"}};var Mt=Xe({name:"editgridcard",extends:_t,data:()=>({myConfig:{addBtnType:"2",hide:!0,titleType:1,bordered:!0,disHover:!1,operFixedFlag:!1},btnReadOnly:!1,showBtn:!0,cardPadding:0,cardStyle:"",showGrid:!0,showTitle:!0,editFlag:!1,pStyle:"",iconStyle:"",showDelRow:!0,rowAction:[],delRowAction:[{iconcls:"row",icon:"ios-trash",name:"delRow",text:"删除",size:"20",type:"text"}]}),computed:{titleClass(){return`efuture-title-font-${this.myConfig.titleType}`},headClass(){return this.showGrid?`efuture-card-head-title-${this.myConfig.titleType}`:`efuture-card-head-title-${this.myConfig.titleType} efuture-card-head-title-nobottom`},extraClass(){return`efuture-card-extra-title-${this.myConfig.titleType}`}},methods:{customInit2(){this.myConfig.hide&&(this.pStyle="cursor:pointer",this.iconStyle="transform: rotate(90deg)"),1!==this.myConfig.titleType?(void 0===this.config.hide&&(this.myConfig.hide=!1),void 0===this.config.bordered&&(this.myConfig.bordered=!1),void 0===this.config.disHover&&(this.myConfig.disHover=!0)):(void 0===this.config.hide&&(this.myConfig.hide=!0),void 0===this.config.bordered&&(this.myConfig.bordered=!0),void 0===this.config.disHover&&(this.myConfig.disHover=!1)),void 0!==this.myConfig.showTitle&&(this.showTitle=this.myConfig.showTitle),void 0!==this.myConfig.showBtn&&(this.showBtn=this.myConfig.showBtn),void 0!==this.myConfig.showAddBtn&&(this.showBtn=this.myConfig.showAddBtn),this.myToolConfig.icon=!0,this.setTitleStyle()},toggle(){this.myConfig.hide&&(this.showGrid=!this.showGrid,this.setTitleStyle())},setShowGrid(e){this.showGrid=e,this.setTitleStyle()},setTitleStyle(){this.showGrid?(this.iconStyle="transform: rotate(90deg)",this.cardPadding=5*Number(this.myConfig.titleType),this.cardStyle="padding-left:"+this.cardPadding+"px;padding-right:"+this.cardPadding+"px;padding-bottom: 10px;"):(this.iconStyle="",this.cardPadding=0,this.cardStyle="")},editGrid(){if(this.checkIsEdit()){this.setReadOnly(!1);let e={name:"editGrid"};e.gridname=this.myConfig.name,this.$emit("doAction",e)}},cancelGrid(){this.setData(this.initData),this.setReadOnly(!0);let e={name:"cancelGrid"};e.gridname=this.myConfig.name,this.$emit("doAction",e)},checkIsEdit(){let e=!0;return this.myConfig.editObjectBefore&&(e=this.myConfig.editObjectBefore(this.myConfig.name)),e},setBtnType(e){let t={};t.addBtnType=e,this.setPro(t)},setBtnReadOnly(e){this.btnReadOnly=e}},mounted(){this.$refs.card&&this.$refs.card.$el&&(this.$refs.card.$el.onmouseleave=()=>{this.handleOut()})}},[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Icon"),s=c.resolveComponent("ControlBox"),l=c.resolveComponent("ShowText"),u=c.resolveComponent("Table"),d=c.resolveComponent("Page"),h=c.resolveComponent("Row"),A=c.resolveComponent("Card"),f=c.resolveComponent("Button");return c.openBlock(),c.createBlock(A,{ref:"card",padding:0,bordered:i.myConfig.bordered,"dis-hover":i.myConfig.disHover,headClass:r.headClass,extraClass:r.extraClass},c.createSlots({extra:c.withCtx((()=>[i.showBtn&&i.myConfig.readOnly&&"3"===i.myConfig.addBtnType&&!i.btnReadOnly?(c.openBlock(),c.createElementBlock("a",{key:0,href:"#",onClick:t[1]||(t[1]=c.withModifiers(((...e)=>r.editGrid&&r.editGrid(...e)),["prevent"]))},c.toDisplayString(i.myConfig.editBtnName),1)):c.createCommentVNode("",!0),i.showBtn&&i.myConfig.readOnly&&"3"===i.myConfig.addBtnType&&i.btnReadOnly?(c.openBlock(),c.createElementBlock("span",It,c.toDisplayString(i.myConfig.editBtnName),1)):c.createCommentVNode("",!0),i.showBtn&&!i.myConfig.readOnly&&"3"===i.myConfig.addBtnType?(c.openBlock(),c.createElementBlock("a",{key:2,href:"#",onClick:t[2]||(t[2]=c.withModifiers(((...e)=>r.cancelGrid&&r.cancelGrid(...e)),["prevent"]))},c.toDisplayString(i.myConfig.cancelBtnName),1)):c.createCommentVNode("",!0),i.showBtn&&"3"===i.myConfig.addBtnType&&!i.btnReadOnly?(c.openBlock(),c.createElementBlock("a",{key:3,style:{"margin-left":"10px"},href:"#",onClick:t[3]||(t[3]=c.withModifiers(((...t)=>e.addRow&&e.addRow(...t)),["prevent"]))},c.toDisplayString(i.myConfig.addBtnName),1)):c.createCommentVNode("",!0),i.showBtn&&"3"===i.myConfig.addBtnType&&i.btnReadOnly?(c.openBlock(),c.createElementBlock("span",Nt,c.toDisplayString(i.myConfig.addBtnName),1)):c.createCommentVNode("",!0),i.showBtn&&!i.myConfig.readOnly&&"1"===i.myConfig.addBtnType?(c.openBlock(),c.createElementBlock("a",{key:5,href:"#",onClick:t[4]||(t[4]=c.withModifiers(((...t)=>e.addRow&&e.addRow(...t)),["prevent"]))},c.toDisplayString(i.myConfig.addBtnName),1)):c.createCommentVNode("",!0)])),default:c.withCtx((()=>[c.withDirectives(c.createElementVNode("div",{style:c.normalizeStyle(i.cardStyle)},[c.createVNode(h,null,{default:c.withCtx((()=>[c.createVNode(u,{ref:"table",loading:e.loading,size:i.myConfig.tableSize,"row-class-name":e.rowClassName,stripe:i.myConfig.showStripe,border:i.myConfig.showBorder,height:e.tableHeight,maxHeight:e.tableMaxHeight,"show-header":i.myConfig.showHeader,columns:e.tableColumns,onOnSelectionChange:e.OnSelectionChange,data:e.data,onOnColumnWidthResize:e.onColumnWidthResize,"show-summary":i.myConfig.showSummary,"summary-method":e.handleSummary},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createElementVNode("div",{onClick:o=>e.EditCell(n,t),class:"ivu-table-cell"},[e.editIndex===n&&e.editKey===t.key?(c.openBlock(),c.createBlock(s,{key:0,config:e.getCellConfig(n,t),autofocus:!0,valueData:e.getCurRow(n),onInputValue:e.input,editIndex:n,onDoAction:e.doAction},null,8,["config","valueData","onInputValue","editIndex","onDoAction"])):(c.openBlock(),c.createBlock(l,{key:1,style:{display:"inline-block"},label:e.formatValue(n,t),contentAlign:t.contentAlign,class:c.normalizeClass(e.IsCellError(n,t))},null,8,["label","contentAlign","class"]))],8,Rt)]))})))]),1032,["loading","size","row-class-name","stripe","border","height","maxHeight","show-header","columns","onOnSelectionChange","data","onOnColumnWidthResize","show-summary","summary-method"]),i.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Pt,[c.createVNode(A,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(d,{total:i.myConfig.pageConfig.total_results,size:i.myConfig.pageSize,current:i.myConfig.pageConfig.page_no,"page-size":i.myConfig.pageConfig.page_size,"page-size-opts":i.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":i.myConfig.pageShowTotal,"show-elevator":i.myConfig.pageShowElevator,"show-sizer":i.myConfig.pageShowSizer},null,8,["total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)])),_:1}),i.showBtn&&!i.myConfig.readOnly&&"2"===i.myConfig.addBtnType?(c.openBlock(),c.createBlock(h,{key:0,type:"flex",justify:"center",style:{"margin-top":"10px","margin-bottom":"10px"}},{default:c.withCtx((()=>[c.createVNode(f,{type:"default",style:{"background-color":"#f8f8f9"},onClick:e.addRow,long:""},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(i.myConfig.addBtnName),1)])),_:1},8,["onClick"])])),_:1})):c.createCommentVNode("",!0)],4),[[c.vShow,i.showGrid]])])),_:2},[i.showTitle?{name:"title",fn:c.withCtx((()=>[c.createElementVNode("p",{style:c.normalizeStyle(i.pStyle),onClick:t[0]||(t[0]=(...e)=>r.toggle&&r.toggle(...e))},[c.createElementVNode("span",{class:c.normalizeClass(r.titleClass),textContent:c.toDisplayString(i.myConfig.title)},null,10,Tt),i.myConfig.hide?(c.openBlock(),c.createBlock(a,{key:0,class:"efuture-title-icon",style:c.normalizeStyle(i.iconStyle),type:"ios-arrow-forward"},null,8,["style"])):c.createCommentVNode("",!0)],4)])),key:"0"}:void 0]),1032,["bordered","dis-hover","headClass","extraClass"])}]]);const Vt={name:"textbox",extends:it,components:{},data:()=>({myConfig:{maxLength:null,vtype:"text",defaultValue:"",rows:3,clearable:!1,appendWidth:80,search:!1,allowInput:!0,showAppend:!1,notSpecial:!1},passwordFlag:!1}),methods:{keyUp(e){this.myConfig.notSpecial&&(e.target.value=e.target.value.replace(/[`~!@$%^&*()_\-+=<>?:"{}|,\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g,""))},customInit(){"password"===this.myConfig.vtype?(this.passwordFlag=!0,void 0!==this.myConfig.passwordFlag&&(this.passwordFlag=this.myConfig.passwordFlag)):this.passwordFlag=!1},_enterSetFatherValue(){"textarea"!==this.myConfig.vtype&&(this.isEnter=!0),this.setFatherValue()},search(){if(this.myConfig.onSearch&&!0!==this.myConfig.readOnly){let e=this,t={};t.control=e,t.name=this.myConfig.name,this.myConfig.onSearch(t)}},appendClick(){this.myConfig.onAppend&&this.myConfig.onAppend()},setFocus(e){e?this.$refs.myControl.focus():this.$refs.myControl.blur()}}};var Ut=Xe(Vt,[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Button"),s=c.resolveComponent("Input");return c.withDirectives((c.openBlock(),c.createElementBlock("div",null,[c.createVNode(s,{ref:"myControl",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=t=>e.value=t),size:i.myConfig.size,type:i.myConfig.vtype,password:i.passwordFlag,rows:i.myConfig.rows,placeholder:i.myConfig.placeholder,maxlength:i.myConfig.maxLength,disabled:i.myConfig.readOnly,clearable:i.myConfig.clearable,readonly:!i.myConfig.allowInput,onKeydown:c.withKeys(c.withModifiers(r._enterSetFatherValue,["stop"]),["enter"]),onKeyup:r.keyUp,onOnBlur:e.setFatherValue,search:i.myConfig.search,onOnSearch:r.search},c.createSlots({_:2},[i.myConfig.showAppend?{name:"append",fn:c.withCtx((()=>[c.createVNode(a,{size:i.myConfig.size,type:"primary",disabled:i.myConfig.readOnly,onClick:r.appendClick},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(i.myConfig.appendText),1)])),_:1},8,["size","disabled","onClick"])])),key:"0"}:void 0]),1032,["modelValue","size","type","password","rows","placeholder","maxlength","disabled","clearable","readonly","onKeydown","onKeyup","onOnBlur","search","onOnSearch"])],512)),[[c.vShow,i.myConfig.visible]])}]]);const Lt={name:"uploadbox",data:()=>({defaultList:[],fileSize:2048,myConfig:{},uploadUrl:"",disabled:!1}),props:{config:{type:Object,default:null},headers:{type:Object,default:null},readOnly:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!0}},computed:{uploadClass(){return this.disabled?"efuture-upload-disabled":""}},created(){this.myConfig=Object.assign({},this.myConfig,this.config),void 0!==this.myConfig.fileSize&&(this.fileSize=1024*Number(this.myConfig.fileSize)),this.uploadUrl=this.myConfig.uploadfile},methods:{handleSuccess(e,t){if(e.data&&e.data.length>0)if(e.data[0].filekey)t.filekey=e.data[0].filekey;else if(e.data[0].fileKey)t.filekey=e.data[0].fileKey;else if(void 0!==e.data[0].url){let n=e.data[0].url.split("/");t.filekey=n[n.length-1]}this.$emit("success",e)},handleFormatError(e){let t=this.myConfig.fileType.join(",");this.alert("文件["+e.name+"]的格式不正确,请上传格式为("+t+")的文件")},handleMaxSize(e){let t="",n=Number(this.myConfig.fileSize);if(n>1024){t=(n/1024).toFixed(2)+"G"}else if(n<1){t=(1024*n).toFixed(2)+"K"}else t=n+"M";this.alert("文件["+e.name+"]的文件大小不允许超过"+t)},handleBeforeUpload(){if(this.myConfig.multiSelect)return!0;{const e=this.$refs.upload.fileList.length<this.myConfig.fileNum;return e||this.alert("上传的文件数量过多,请先删除部分已上传文件再上传"),e}},delFile(e){const t=this.$refs.upload.fileList.findIndex((t=>t.filekey===e));t>-1&&this.$refs.upload.fileList.splice(t,1)},onClick(){let e=!0;return this.$parent.$parent.$parent.checkPara&&(e=this.$parent.$parent.$parent.checkPara()),e&&this.config.onOpenChange&&this.config.onOpenChange(!0),e&&this.$refs.upload.$refs&&this.$refs.upload.$refs.input&&this.$refs.upload.$refs.input.click(),e},clearData(){this.$refs.upload.clearFiles()}},watch:{config:{handler(e){this.readOnly||e.readOnly?this.disabled=!0:this.disabled=!1},deep:!0,immediate:!0},readOnly(e){e||this.config.readOnly?this.disabled=!0:this.disabled=!1}}};var jt=Xe(Lt,[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Upload");return c.openBlock(),c.createBlock(a,{ref:"upload","show-upload-list":!1,"default-file-list":i.defaultList,"on-success":r.handleSuccess,format:i.myConfig.fileType,disabled:i.disabled,"max-size":i.fileSize,data:n.headers,"on-format-error":r.handleFormatError,"on-exceeded-size":r.handleMaxSize,"before-upload":r.handleBeforeUpload,multiple:n.multiSelect,type:"drag",class:c.normalizeClass(r.uploadClass),action:i.uploadUrl},{default:c.withCtx((()=>[c.renderSlot(e.$slots,"btn")])),_:3},8,["default-file-list","on-success","format","disabled","max-size","data","on-format-error","on-exceeded-size","before-upload","multiple","class","action"])}]]),$t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Qt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ht,zt={exports:{}};
|
|
6
|
+
*/function xe(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Be(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Ee(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;ke(e,n,[],e._modules.root,!0),_e(e,n,t)}function _e(e,t,n){var o=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,a={},s={},l=c.effectScope(!0);l.run((function(){xe(r,(function(t,n){a[n]=function(e,t){return function(){return e(t)}}(t,e),s[n]=c.computed((function(){return a[n]()})),Object.defineProperty(e.getters,n,{get:function(){return s[n].value},enumerable:!0})}))})),e._state=c.reactive({data:t}),e._scope=l,e.strict&&function(e){c.watch((function(){return e._state.data}),(function(){}),{deep:!0,flush:"sync"})}(e),o&&n&&e._withCommit((function(){o.data=null})),i&&i.stop()}function ke(e,t,n,o,i){var r=!n.length,a=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=o),!r&&!i){var s=De(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){s[l]=o.state}))}var c=o.context=function(e,t,n){var o=""===t,i={dispatch:o?e.dispatch:function(n,o,i){var r=Oe(n,o,i),a=r.payload,s=r.options,l=r.type;return s&&s.root||(l=t+l),e.dispatch(l,a)},commit:o?e.commit:function(n,o,i){var r=Oe(n,o,i),a=r.payload,s=r.options,l=r.type;s&&s.root||(l=t+l),e.commit(l,a,s)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return Se(e,t)}},state:{get:function(){return De(e.state,n)}}}),i}(e,a,n);o.forEachMutation((function(t,n){!function(e,t,n,o){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,o.state,t)}))}(e,a+n,t,c)})),o.forEachAction((function(t,n){var o=t.root?n:a+n,i=t.handler||t;!function(e,t,n,o){(e._actions[t]||(e._actions[t]=[])).push((function(t){var i,r=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return(i=r)&&"function"==typeof i.then||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}(e,o,i,c)})),o.forEachGetter((function(t,n){!function(e,t,n,o){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)}}(e,a+n,t,c)})),o.forEachChild((function(o,r){ke(e,t,n.concat(r),o,i)}))}function Se(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,o)===t){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function De(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Oe(e,t,n){var o;return null!==(o=e)&&"object"==typeof o&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Fe="vuex:mutations",Te="vuex:actions",Ie="vuex",Ne=0;function Re(e,t){we({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(n){n.addTimelineLayer({id:Fe,label:"Vuex Mutations",color:Pe}),n.addTimelineLayer({id:Te,label:"Vuex Actions",color:Pe}),n.addInspector({id:Ie,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===Ie)if(n.filter){var o=[];Le(o,t._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[Ue(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===Ie){var o=n.nodeId;Se(t,o),n.state=function(e,t,n){t="root"===n?t:t[n];var o=Object.keys(t),i={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var r=function(e){var t={};return Object.keys(e).forEach((function(n){var o=n.split("/");if(o.length>1){var i=t,r=o.pop();o.forEach((function(e){i[e]||(i[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),i=i[e]._custom.value})),i[r]=je((function(){return e[n]}))}else t[n]=je((function(){return e[n]}))})),t}(t);i.getters=Object.keys(r).map((function(e){return{key:e.endsWith("/")?Ve(e):e,editable:!1,value:je((function(){return r[e]}))}}))}return i}((i=t._modules,(a=(r=o).split("/").filter((function(e){return e}))).reduce((function(e,t,n){var o=e[t];if(!o)throw new Error('Missing module "'+t+'" for path "'+r+'".');return n===a.length-1?o:o._children}),"root"===r?i:i.root._children)),"root"===o?t.getters:t._makeLocalGettersCache,o)}var i,r,a})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===Ie){var o=n.nodeId,i=n.path;"root"!==o&&(i=o.split("/").filter(Boolean).concat(i)),t._withCommit((function(){n.set(t._state.data,i,n.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(Ie),n.sendInspectorState(Ie),n.addTimelineEvent({layerId:Fe,event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=Ne++,e._time=Date.now(),o.state=t,n.addTimelineEvent({layerId:Te,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},i=Date.now()-e._time;o.duration={_custom:{type:"duration",display:i+"ms",tooltip:"Action duration",value:i}},e.payload&&(o.payload=e.payload),o.state=t,n.addTimelineEvent({layerId:Te,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var Pe=8702998,Me={label:"namespaced",textColor:16777215,backgroundColor:6710886};function Ve(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function Ue(e,t){return{id:t||"root",label:Ve(t),tags:e.namespaced?[Me]:[],children:Object.keys(e._children).map((function(n){return Ue(e._children[n],t+n+"/")}))}}function Le(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[Me]:[]}),Object.keys(t._children).forEach((function(i){Le(e,t._children[i],n,o+i+"/")}))}function je(e){try{return e()}catch(dV){return dV}}var $e=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},Qe={namespaced:{configurable:!0}};Qe.namespaced.get=function(){return!!this._rawModule.namespaced},$e.prototype.addChild=function(e,t){this._children[e]=t},$e.prototype.removeChild=function(e){delete this._children[e]},$e.prototype.getChild=function(e){return this._children[e]},$e.prototype.hasChild=function(e){return e in this._children},$e.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},$e.prototype.forEachChild=function(e){xe(this._children,e)},$e.prototype.forEachGetter=function(e){this._rawModule.getters&&xe(this._rawModule.getters,e)},$e.prototype.forEachAction=function(e){this._rawModule.actions&&xe(this._rawModule.actions,e)},$e.prototype.forEachMutation=function(e){this._rawModule.mutations&&xe(this._rawModule.mutations,e)},Object.defineProperties($e.prototype,Qe);var He=function(e){this.register([],e,!1)};function ze(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return;ze(e.concat(o),t.getChild(o),n.modules[o])}}He.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},He.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},He.prototype.update=function(e){ze([],this.root,e)},He.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var i=new $e(t,n);0===e.length?this.root=i:this.get(e.slice(0,-1)).addChild(e[e.length-1],i);t.modules&&xe(t.modules,(function(t,i){o.register(e.concat(i),t,n)}))},He.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},He.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Ke=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var i=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new He(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=i;var r=this,a=this.dispatch,s=this.commit;this.dispatch=function(e,t){return a.call(r,e,t)},this.commit=function(e,t,n){return s.call(r,e,t,n)},this.strict=o;var l=this._modules.root.state;ke(this,l,[],this._modules.root),_e(this,l),n.forEach((function(e){return e(t)}))},Ge={state:{configurable:!0}};Ke.prototype.install=function(e,t){e.provide(t||"store",this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&Re(e,this)},Ge.state.get=function(){return this._state.data},Ge.state.set=function(e){},Ke.prototype.commit=function(e,t,n){var o=this,i=Oe(e,t,n),r=i.type,a=i.payload,s={type:r,payload:a},l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,o.state)})))},Ke.prototype.dispatch=function(e,t){var n=this,o=Oe(e,t),i=o.type,r=o.payload,a={type:i,payload:r},s=this._actions[i];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(dV){}var l=s.length>1?Promise.all(s.map((function(e){return e(r)}))):s[0](r);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,n.state)}))}catch(dV){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(dV){}t(e)}))}))}},Ke.prototype.subscribe=function(e,t){return Be(e,this._subscribers,t)},Ke.prototype.subscribeAction=function(e,t){return Be("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},Ke.prototype.watch=function(e,t,n){var o=this;return c.watch((function(){return e(o.state,o.getters)}),t,Object.assign({},n))},Ke.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Ke.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),ke(this,this.state,e,this._modules.get(e),n.preserveState),_e(this,this.state)},Ke.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete De(t.state,e.slice(0,-1))[e[e.length-1]]})),Ee(this)},Ke.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},Ke.prototype.hotUpdate=function(e){this._modules.update(e),Ee(this,!0)},Ke.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Ke.prototype,Ge);const qe={state:{clientHeight:window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,clientWidth:window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,mychartColor:{pie:["#FF8636","#028154","#FC635B","#FDBA4F","#436EFD","#7ACBBD","#6882FF","#819DE4"],bar:["#627AE1","#8CBBFF","#8CE8BB"],line:["#01332F","#627AE1","#ED6A4C"]},floorMap:{}},mutations:{setClientHeight(e){e.clientHeight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height},setClientWidth(e){e.clientWidth=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width},setMychartColor(e,t,n){let o=[];n&&n.forEach((e=>{e&&o.push(e)})),e.mychartColor[t]=o},setFloorMap(e,t){Object.assign(e.floorMap,t)}}};var We=new Ke({state:{},mutations:{},actions:{},modules:{app:qe}}),Xe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n};var Ye=Xe({name:"ebutton",data:()=>({visible:!0,btn:{},colorStyle:{selected:"#2d8cf0",unselected:"#3f414d",disabled:"#c5c8ce"},mouseStyle:{usable:"cursor: pointer",disabled:"cursor:not-allowed"},iconStyle:{seletedSize:40,unseletedSize:30},divStyle:"cursor: pointer",disabled:!1,iconSize:30,fontStyle:"font-size: 10px;color:#3f414d",iconColor:"#3f414d"}),props:{config:{type:Object,default:null},amplify:{type:Boolean,default:!0},dynamic:{type:Boolean,default:!0},type:{type:String,default:""},size:{type:Number,default:30},color:{type:String,default:""},text:{type:String,default:""},fontsize:{type:String,default:"10px"},fontplacement:{validator:e=>S(e,["bottom","right"]),default:"bottom"}},created(){this.config?(this.btn=this.config,this.config.size&&(this.iconSize=this.config.size),this.config.color&&(this.iconColor=this.config.color)):(this.btn.iconcls=this.type,this.btn.text=this.text,this.iconSize=this.size,this.iconColor=this.color),this.setStyle("unselected")},methods:{doAction(e){this.disabled||this.$emit("click",e)},changeActive(){this.dynamic&&this.setStyle("selected")},removeActive(){this.dynamic&&this.setStyle("unselected")},setStyle(e){switch(e){case"selected":this.disabled||(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.selected,this.amplify&&(this.iconSize=this.iconStyle.seletedSize,this.iconColor=this.colorStyle.selected));break;case"unselected":this.disabled||(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.unselected,this.amplify&&(this.iconSize=this.iconStyle.unseletedSize,this.iconColor=this.colorStyle.unselected));break;case"disabled":this.disabled?(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.disabled,this.amplify&&(this.iconSize=this.iconStyle.unseletedSize,this.iconColor=this.colorStyle.disabled),this.divStyle=this.mouseStyle.disabled):(this.divStyle=this.mouseStyle.usable,this.setStyle("unselected"))}},setEnabled(e){this.disabled=e,this.setStyle("disabled")},setVisible(e){this.visible=e}}},[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("CommonIcon"),s=c.resolveComponent("Span"),l=c.resolveComponent("Col"),u=c.resolveComponent("Row");return i.visible?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(i.divStyle),onClick:t[0]||(t[0]=e=>r.doAction(i.btn.name)),onMouseover:t[1]||(t[1]=e=>r.changeActive(e)),onMouseout:t[2]||(t[2]=e=>r.removeActive(e))},[c.createVNode(u,{type:"flex",justify:"center"},{default:c.withCtx((()=>[c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(a,{type:i.btn.iconcls,size:i.iconSize,color:i.iconColor},null,8,["type","size","color"]),c.withDirectives(c.createVNode(s,{style:c.normalizeStyle(i.fontStyle)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(i.btn.text),1)])),_:1},8,["style"]),[[c.vShow,"right"===n.fontplacement&&void 0!==i.btn.text]])])),_:1})])),_:1}),c.withDirectives(c.createVNode(u,{type:"flex",justify:"center"},{default:c.withCtx((()=>[c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(s,{style:c.normalizeStyle(i.fontStyle)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(i.btn.text),1)])),_:1},8,["style"])])),_:1})])),_:1},512),[[c.vShow,"bottom"===n.fontplacement&&void 0!==i.btn.text]])],36)):c.createCommentVNode("",!0)}]]);const Je={name:"Toolbar",data:()=>({globalConfig:{moduleMethod:[]},btnList:[],myConfig:{spacing:16},modulecode:"",token:"",buttonSize:"default",btnShow:!0,showType:!0,visible:!0,showAddData:!1,showBatchAction:!1,vjustify:"center",defaultStatus:{N:["saveData"],V:["addData","editData","auditData","delData"],E:["addData","saveData","delData"],S:["addData","editData","auditData","delData","printData"],A:["addData","copyData","cancelData"],C:["addData","printData"],D:["addData"]},defaultRule:{billstatus:{Y:["addData","cancelData","printData"],N:["addData","editData","auditData","delData","printData"],C:["addData","printData"]}}}),props:{type:{validator:e=>S(e,["horizontal","vertical"]),default:"vertical"},config:{type:Object,default:()=>({})},amplify:{type:Boolean,default:!0},fontplacement:{validator:e=>S(e,["bottom","right"]),default:"right"},showback:{type:Boolean,default:!1},tooltype:{type:String,default:"form"},btntype:{validator:e=>S(e,["Button","Ebutton"]),default:"Ebutton"},moduleMethod:{type:Array,default:()=>[]},billmoduleid:{type:String,default:""},checkBtn:{type:Boolean,default:!1},row:{type:Object,default:()=>({})}},created(){this.init()},components:{Ebutton:Ye},methods:{init(){this.config&&(this.myConfig=Object.assign({},this.myConfig,this.config)),this.myConfig.items||(this.myConfig.items=[]),this.myConfig.buttonSize&&(this.buttonSize=this.myConfig.buttonSize),this.moduleMethod.length>0&&(this.globalConfig.moduleMethod=this.$Method.copy(this.moduleMethod)),this.filterBtn(),this.btnList.length>0?this.visible=!0:"batch"===this.tooltype?this.visible=this.showAddData:this.visible=!1,this.btnList.forEach((e=>{void 0===e.visible&&(e.visible=!0)}))},filterBtn(){this.checkBtn&&this.getModuleMethod(),this.filterBtnByToken()},getModuleMethod(){if(this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid")),this.billmoduleid&&(this.modulecode=this.billmoduleid),this.token=this.$Method.getUrlParam("token"),this.modulecode&&this.token){let e=this.getUserModuleMethod(this.modulecode);e&&(this.globalConfig.moduleMethod=e.modulemethod)}},filterBtnByToken(){let e=this.commonFilterBtn(),t=[],n=[],o=[];if(e.forEach((e=>{"addData"===e.name&&(this.showAddData=!0),"batch"===e.iconcls?o.push(e):"row"===e.iconcls?n.push(e):t.push(e)})),o.length>0&&(this.showBatchAction=!0),"batch"===this.tooltype)this.btnList=this.$Method.copy(o);else if("row"===this.tooltype)this.btnList=this.$Method.copy(n);else{if("right"===this.fontplacement&&(this.vjustify="start"),this.btnList=this.$Method.copy(t),this.isBillImport()){let e={};this.myConfig.importbtn&&"{}"!==JSON.stringify(this.myConfig.importbtn)?(e=Object.assign({},{iconcls:"_download",name:"downTemplate",text:"导入模版"},this.myConfig.backbtn),e.name="downTemplate"):e={iconcls:"_download",name:"downTemplate",text:"导入模版"},e.visible=!0,this.btnList.push(e)}if(this.showback){let e={};this.myConfig.backbtn&&"{}"!==JSON.stringify(this.myConfig.backbtn)?(e=Object.assign({},{iconcls:"_back",name:"back",text:"返回"},this.myConfig.backbtn),e.name="back"):e={iconcls:"_back",name:"back",text:"返回"},e.visible=!0,this.btnList.push(e)}this.initStatus()}},commonFilterBtn(){if(this.globalConfig.moduleMethod.length<=0)return this.myConfig.items;let e=[];this.globalConfig.moduleMethod.forEach((t=>{let n=this.myConfig.items.findIndex((e=>e.name===t.name));n>-1&&e.push(this.$Method.copy(this.myConfig.items[n]))}));let t=this.myConfig.items.findIndex((e=>"editRowForm"===e.name));return t>-1&&e.push(this.$Method.copy(this.myConfig.items[t])),e},initStatus(){this.myConfig.status?Object.keys(this.defaultStatus).forEach((e=>{void 0===this.myConfig.status[e]&&(this.myConfig.status[e]=[]);let t=this.myConfig.status[e].concat(this.defaultStatus[e]);this.myConfig.status[e]=this.uniqueArr(t)})):this.myConfig.status=this.$Method.copy(this.defaultStatus),this.myConfig.rule?Object.keys(this.defaultRule).forEach((e=>{this.myConfig.rule[e]&&Object.keys(this.defaultRule[e]).forEach((t=>{this.defaultStatus[e]?(void 0===this.myConfig.rule[e][t]&&(this.myConfig.rule[e][t]=[]),void 0===this.defaultStatus[e][t]&&(this.defaultStatus[e][t]=[])):(this.defaultStatus[e]={},this.defaultStatus[e][t]=[],void 0===this.myConfig.rule[e][t]&&(this.myConfig.rule[e][t]=[]));let n=this.myConfig.rule[e][t].concat(this.defaultStatus[e][t]);this.myConfig.rule[e][t]=this.uniqueArr(n)}))})):this.myConfig.rule=this.$Method.copy(this.defaultRule)},click(e){let t={};t.name=e,this.$emit("doAction",t)},changedStatusCommon(e){this.btnList.forEach((e=>{this.setReadOnly(e.name,!0)})),e||(e=[]),(e=e.concat(["back","downTemplate","editRowForm"])).forEach((e=>{this.setReadOnly(e,!1)}))},changedStatus(e){if(e){let t=this.myConfig.status[e];this.changedStatusCommon(t)}},isBillImport(){return this.btnList.some((e=>"billImport"===e.name))},gridChangedStatus(e,t){if(this.myConfig&&this.myConfig.rule&&this.myConfig.rule[e]){let n=this.myConfig.rule[e][t];this.changedStatusCommon(n)}},uniqueArr(e){let t=[];for(let n=0,o=e.length;n<o;n++){for(let t=n+1;t<o;t++)e[n]===e[t]&&(t=++n);t.push(e[n])}return t},action(e){let t={};t.name=e,this.$emit("doAction",t)},getType:e=>e.type?e.type:"text",setVisible(e,t,n){let o=this.btntype;if(n&&(o=n),"Ebutton"===o)this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setVisible(t);else{const n=this.btnList.findIndex((t=>t.name===e));if(n>-1){let e=this.$Method.copy(this.btnList[n]);e.visible=t,this.btnList.splice(n,1,e)}}},setReadOnly(e,t,n){let o=this.btntype;if(n&&(o=n),"Ebutton"===o)this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setEnabled(t);else{const n=this.btnList.findIndex((t=>t.name===e));if(n>-1){let e=this.$Method.copy(this.btnList[n]);e.disabled=t,this.btnList.splice(n,1,e)}}}},mounted(){let e=this;e.config.customInit&&e.config.customInit(e.row,e)}},Ze={key:0},et={key:0},tt={href:"javascript:void(0)"};var nt=Xe(Je,[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Ebutton"),s=c.resolveComponent("Button"),l=c.resolveComponent("Col"),u=c.resolveComponent("Row"),d=c.resolveComponent("CommonIcon"),h=c.resolveComponent("DropdownItem"),A=c.resolveComponent("DropdownMenu"),f=c.resolveComponent("Dropdown");return c.withDirectives((c.openBlock(),c.createElementBlock("div",null,["form"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[i.visible?(c.openBlock(),c.createElementBlock("div",Ze,["horizontal"===n.type?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"start",gutter:i.myConfig.spacing},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(l,{key:"btn_"+t},{default:c.withCtx((()=>["Ebutton"===n.btntype?(c.openBlock(),c.createBlock(a,{key:0,ref_for:!0,ref:e.name,config:e,onClick:r.click,amplify:n.amplify,fontplacement:n.fontplacement,dynamic:i.myConfig.btnDynamic},null,8,["config","onClick","amplify","fontplacement","dynamic"])):c.createCommentVNode("",!0),"Button"===n.btntype?(c.openBlock(),c.createBlock(s,{key:1,ref_for:!0,ref:e.name,onClick:t=>r.action(e.name),icon:e.iconcls,type:e.type,size:i.buttonSize,disabled:e.disabled},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["onClick","icon","type","size","disabled"])):c.createCommentVNode("",!0)])),_:2},1024)),[[c.vShow,e.visible]]))),128))])),_:1},8,["gutter"])):c.createCommentVNode("",!0),"vertical"===n.type?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.btnList,((e,t)=>(c.openBlock(),c.createBlock(u,{type:"flex",justify:i.vjustify,key:"btn_"+t,style:{"margin-top":"5px"}},{default:c.withCtx((()=>["Ebutton"===n.btntype?(c.openBlock(),c.createBlock(a,{key:0,ref_for:!0,ref:e.name,config:e,onClick:r.click,amplify:n.amplify,fontplacement:n.fontplacement,dynamic:i.myConfig.btnDynamic},null,8,["config","onClick","amplify","fontplacement","dynamic"])):c.createCommentVNode("",!0),"Button"===n.btntype?c.withDirectives((c.openBlock(),c.createBlock(s,{key:1,ref_for:!0,ref:e.name,onClick:t=>r.action(e.name),icon:e.iconcls,type:e.type,size:i.buttonSize},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["onClick","icon","type","size"])),[[c.vShow,e.visible]]):c.createCommentVNode("",!0)])),_:2},1032,["justify"])))),128)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),"row"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[i.visible?(c.openBlock(),c.createElementBlock("div",et,[i.showType?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"center",gutter:8},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(l,{key:"btn_"+t},{default:c.withCtx((()=>[!0===i.myConfig.icon?(c.openBlock(),c.createBlock(s,{key:0,size:"small",type:r.getType(e),icon:e.icon,"custom-icon":e.customIcon,onClick:t=>r.action(e.name)},null,8,["type","icon","custom-icon","onClick"])):(c.openBlock(),c.createBlock(s,{key:1,size:"small",type:r.getType(e),onClick:t=>r.action(e.name)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["type","onClick"]))])),_:2},1024)),[[c.vShow,e.visible]]))),128))])),_:1})):c.createCommentVNode("",!0),i.showType?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(f,{key:1,onOnClick:r.action},{list:c.withCtx((()=>[c.createVNode(A,null,{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(h,{key:"btndropdown_"+t,name:e.name},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["name"])),[[c.vShow,e.visible]]))),128))])),_:1})])),default:c.withCtx((()=>[c.createElementVNode("a",tt,[t[1]||(t[1]=c.createTextVNode(" 操作 ")),c.createVNode(d,{type:"ios-arrow-down"})])])),_:1},8,["onOnClick"]))])):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),"batch"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[i.visible?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"end",gutter:8},{default:c.withCtx((()=>[i.showAddData?(c.openBlock(),c.createBlock(l,{key:0},{default:c.withCtx((()=>[c.createVNode(s,{icon:"ios-add",onClick:t[0]||(t[0]=e=>r.action("addData"))},{default:c.withCtx((()=>t[2]||(t[2]=[c.createTextVNode("新建")]))),_:1})])),_:1})):c.createCommentVNode("",!0),c.createVNode(l,null,{default:c.withCtx((()=>[i.showBatchAction?(c.openBlock(),c.createBlock(f,{key:0,onOnClick:r.action},{list:c.withCtx((()=>[c.createVNode(A,null,{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(h,{key:"dropbtn_"+t,name:e.name},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["name"])),[[c.vShow,e.visible]]))),128))])),_:1})])),default:c.withCtx((()=>[c.createVNode(s,null,{default:c.withCtx((()=>[t[3]||(t[3]=c.createTextVNode(" 批量操作 ")),c.createVNode(d,{type:"ios-arrow-down"})])),_:1})])),_:1},8,["onOnClick"])):c.createCommentVNode("",!0)])),_:1})])),_:1})):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)],512)),[[c.vShow,i.btnShow]])}]]),ot={name:"size",data:()=>({calHeight:1,calWidth:1,adjustHeight:0,adjustWidth:0}),computed:{clientHeight(){return this.$Store.state.app.clientHeight},clientWidth(){return this.$Store.state.app.clientWidth},currentHeight(){let e=this.clientHeight;return this.calHeight&&(Number(this.calHeight)<=1?(e*=Number(this.calHeight),e=Number(e.toFixed(0))):e=this.calHeight),this.adjustHeight&&(e-=Number(this.adjustHeight)),e},currentWidth(){let e=this.clientWidth;return this.calWidth&&(Number(this.calWidth)<=1?(e*=Number(this.calWidth),e=Number(e.toFixed(1))):e=this.calWidth),this.adjustWidth&&(e-=Number(this.adjustWidth)),e}},methods:{setCalHeight(e){this.calHeight=e},setAdjustHeight(e){this.adjustHeight=e},setCalWidth(e){this.calWidth=e},setAdjustWidth(e){this.adjustWidth=e},setSizeConfig(e){e.height&&this.setCalHeight(e.height),e.width&&this.setCalWidth(e.width),e.adjustHeight&&this.setAdjustHeight(e.adjustHeight),e.adjustWidth&&this.setAdjustWidth(e.adjustWidth)}}};const it={mixins:[ot],data:()=>({globalConfig:{label:"",name:"",readOnly:!1,visible:!0,size:"default",valueChanged:"",placeholder:null,place:"",required:!1},myConfig:{},value:"",oldValue:"",hackReset:!0,showTooltip:!1,isEnter:!1}),props:{config:{type:Object,default:()=>{}},fatherValue:{type:[String,Number,Array],default:""},readOnly:{type:Boolean,default:!1}},created(){this.init()},methods:{init(){this.myConfig=Object.assign({},this.globalConfig,this.myConfig),this.config&&(this.myConfig=Object.assign({},this.myConfig,this.config)),this.customInit&&this.customInit()},_fatherValueToValue(e){return this.fatherValueToValue?this.fatherValueToValue(e):e},_valueToFatherValue(){let e=this.value;if(this.valueToFatherValue)return this.valueToFatherValue();{let t={};return t.value=e,t}},keyDown(e){let t=e+"KeyDown";this[t]&&this[t]()},enterKeyDown(){this.customEnterKeyDown&&this.customEnterKeyDown();let e=this;this.$nextTick((()=>{let t={};t.controlName=e.myConfig.name,e.myConfig.sname&&(t.controlName=e.myConfig.sname),t.name="enterKeyDown",e.$emit("doAction",t)}))},setFatherValue(e){let t=!0,n=this._valueToFatherValue();n.name=this.myConfig.name,this.myConfig.valueChanged&&(n.value!==this.oldValue||n.svalue!==this.oldSvalue||n.evalue!==this.oldEvalue?(t=this.myConfig.valueChanged(n),void 0===t&&(t=!0)):t=!1),t?(this.setFatherValueSuccess?this.setFatherValueSuccess(n):this.$emit("inputValue",n),this.$nextTick((()=>{this.isEnter&&(this.customEnterKeyDown?this.customEnterKeyDown(e):this.$parent.enterKeyDown&&this.$parent.enterKeyDown(),this.isEnter=!1)}))):this.setFatherValueFail?this.setFatherValueFail(e):this.$nextTick((()=>{this.value=this.oldValue}))},_setFatherValue(e){e||0===e||(e=this.myConfig.defaultValue),this.value=e,this.setFatherValue()},setPro(e){this.setCustomPro&&(e=this.setCustomPro(e)),e&&(this.myConfig=Object.assign({},this.myConfig,e))},setReadOnly(e){let t={};t.readOnly=e,!1===t.readOnly?!0!==this.config.readOnly&&this.setPro(t):this.setPro(t)},getPro(e){return this.myConfig[e]}},watch:{fatherValue:{handler(e){this.value=this._fatherValueToValue(e),this.oldValue=this.value,this.watchCustomFatherValue&&this.watchCustomFatherValue()},immediate:!0}}};var rt=Xe({name:"combobox",extends:it,data:()=>({myConfig:{data:[],valueField:"code",textField:"name",maxTagCount:2,codeWithName:!0,defaultValue:"",filterable:!1,clearable:!0,readOnly:!1,showOptionGroup:!1,multiSelect:!1,editData:[],showNullItem:!1,filterData:null,transfer:!1}}),methods:{fatherValueToValue(e){return this.myConfig.multiSelect?e:e+""},watchCustomFatherValue(){let e={},t=!1;this.myConfig.multiSelect||""!==this.value?e.value=this.value:this.myConfig.showNullItem||1!==this.myConfig.data.length||(this.myConfig.required&&(this.myConfig.showOptionGroup?1===this.myConfig.data[0].data.length&&(this.value=this.myConfig.data[0].data[0][this.myConfig.valueField],t=!0):(this.value=this.myConfig.data[0][this.myConfig.valueField],t=!0)),e.value=this.value),this.oldValue=this.value,t&&this.$nextTick((()=>{e.name=this.myConfig.name,this.$emit("inputValue",e)}))},setPro(e){this.setCustomPro&&(e=this.setCustomPro(e)),e&&(this.myConfig=Object.assign({},this.myConfig,e))},isOptionShow(e){return!!this.myConfig.readOnly||e.visible},setCustomPro(e){return void 0!==e.data&&e.data.length>0&&(this.editData=[],this.myConfig.showOptionGroup?e.forEach((e=>{this.$Method.copy(e).data=[],e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e.label=e[this.myConfig.textField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)}))})):e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e.label=e[this.myConfig.textField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)}))),e},customInit(){this.editData=[],this.myConfig.data&&this.myConfig.data.length>0&&(this.myConfig.showOptionGroup?this.myConfig.data.forEach((e=>{let t=this.$Method.copy(e);t.data=[],e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e[this.myConfig.textField]?e.label=e[this.myConfig.textField]:e.label=e[this.myConfig.valueField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)})),this.editData.push(t)})):this.myConfig.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e[this.myConfig.textField]?e.label=e[this.myConfig.textField]:e.label=e[this.myConfig.valueField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)})))},onOpenChange(e){this.config.onOpenChange&&this.config.onOpenChange(e)},doDictGroupKey(e){if(!this.config.dictgroupkey)return!0;let t=this.config.dictgroupkey.split(",");if(e.dgroup){return t.findIndex((t=>t===e.dgroup))>-1}return!0},setFocus(e){e?(this.$refs.myControl.$refs.reference.focus(),this.$refs.myControl.isFocused=!0):(this.$refs.myControl.$refs.reference.blur(),this.$refs.myControl.isFocused=!1)}}},[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Option"),s=c.resolveComponent("OptionGroup"),l=c.resolveComponent("Select");return c.withDirectives((c.openBlock(),c.createElementBlock("div",null,[c.createVNode(l,{ref:"myControl",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=t=>e.value=t),transfer:i.myConfig.transfer,multiple:i.myConfig.multiSelect,"max-tag-count":i.myConfig.maxTagCount,size:i.myConfig.size,disabled:i.myConfig.readOnly,clearable:i.myConfig.clearable,onOnChange:e._setFatherValue,filterable:i.myConfig.filterable,placeholder:i.myConfig.placeholder,onOnOpenChange:r.onOpenChange},{default:c.withCtx((()=>[i.myConfig.showOptionGroup?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.myConfig.data,((e,t)=>(c.openBlock(),c.createBlock(s,{label:e.label,key:"option_"+t},{default:c.withCtx((()=>[i.myConfig.readOnly?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(e.data,(e=>(c.openBlock(),c.createBlock(a,{value:e[i.myConfig.valueField],key:e[i.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(e.data,(e=>c.withDirectives((c.openBlock(),c.createBlock(a,{value:e[i.myConfig.valueField],key:e[i.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])),[[c.vShow,e.visible]]))),128))])),_:2},1032,["label"])))),128)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[i.myConfig.readOnly?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.myConfig.data,(e=>(c.openBlock(),c.createBlock(a,{value:e[i.myConfig.valueField],key:e[i.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.myConfig.data,(e=>c.withDirectives((c.openBlock(),c.createBlock(a,{value:e[i.myConfig.valueField],key:e[i.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])),[[c.vShow,e.visible]]))),128))],64))])),_:1},8,["modelValue","transfer","multiple","max-tag-count","size","disabled","clearable","onOnChange","filterable","placeholder","onOnOpenChange"])],512)),[[c.vShow,i.myConfig.visible]])}]]),at={name:"formpcompro",data:()=>({}),props:{config:{type:Object,default:null},dictData:{type:Object,default:null}},methods:{}};const st={name:"baseform",mixins:[at],data:()=>({form:{},oldForm:{},initForm:{},items:[],formRules:{},updateConfig:[],errorFlag:!1,style:"",myConfig:{lineNum:1,itemSpan:8,labelWidth:80,labelPosition:"right",showLabel:!0,inline:!0,isFull:!0}}),methods:{initFormItemCol(e){let t=this.myConfig.itemSpan,n=this.items[e];return"Divider"===n.type?t=24:void 0!==n.colNum&&(t=Number(n.colNum)>Number(this.myConfig.lineNum)?this.myConfig.itemSpan*Number(this.myConfig.lineNum):this.myConfig.itemSpan*Number(n.colNum)),t>24&&(t=24),t},initFormItem(e){if(e.status=!0,e.valueChanged&&(e.valueChanged=this.valueChanged),e.searchBefore&&(e.searchBefore=this.searchBefore),e.setDataBefore&&(e.setDataBefore=this.setDataBefore),e.onAddTag&&(e.onAddTag=this.onAddTag),e.onDelTag&&(e.onDelTag=this.onDelTag),e.onSearch&&(e.onSearch=this.onSearch),e.onLinkTo&&(e.onLinkTo=this.onLinkTo),this.dictData){let t="";e.dictkey&&(t=e.dictkey),e.customDictkey&&(t=e.customDictkey),t&&void 0===e.data&&(e.data=this.dictData[t])}return this.setFormItemCommonPro(e),e},init(){let e=this.$Method.copy(this.config);this.myConfig=Object.assign({},this.myConfig,e);let t=24/Number(this.myConfig.lineNum);this.myConfig.itemSpan=Number(t.toFixed(0)),24===this.myConfig.itemSpan&&(this.myConfig.inline=!1),this.initForm={},this.myConfig.items&&this.myConfig.items.forEach((e=>{let t=this.initFormItem(e);this.items.push(t)})),this.customInit&&this.customInit(),Object.assign(this.form,this.initForm),Object.assign(this.oldForm,this.form)},setData(e){e&&(this.$refs.form.resetFields(),"I"===e.flag?this.form=Object.assign({},this.initForm,e):(this.items.forEach((t=>{t.name&&void 0===e[t.name]&&(e[t.name]=""),t.sname&&void 0===e[t.sname]&&(e[t.sname]=""),t.ename&&void 0===e[t.ename]&&(e[t.ename]=""),t.textName&&void 0===e[t.textName]&&(e[t.textName]="")})),this.form=Object.assign({},{},e)),this.oldForm=this.$Method.copy(this.form))},isChange(){return JSON.stringify(this.form)!==JSON.stringify(this.oldForm)||!(!this.form.flag||"I"!==this.form.flag&&"U"!==this.form.flag)},input(e){let t={};e.name&&(t[e.name]=e.value),e.textName&&(t[e.textName]=e.text),e.sname&&(t[e.sname]=e.svalue),e.ename&&(t[e.ename]=e.evalue),this.form=Object.assign({},this.form,t),this.$emit("inputValue",e)},validatorIsNull(e,t,n){this.isArrayFn(this.form[e.field])?0===this.form[e.field].length?n(new Error("")):n():this.form[e.field]||0===this.form[e.field]?n():n(new Error(""))},isArrayFn:e=>"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e),GetConfigIndex(e){return this.config.items.findIndex((t=>t.name===e||t.sname===e||t.ename===e))},valueChanged(e){if(e.form=this.$Method.copy(this.form),e.formObject=this,e.sname){return this.config.items.find((t=>t.sname===e.sname)).valueChanged(e)}return this.config.items.find((t=>t.name===e.name)).valueChanged(e)},searchBefore(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.myConfig.name)).searchBefore(e)},onAddTag(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onAddTag(e)},onDelTag(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onDelTag(e)},onSearch(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onSearch(e)},onLinkTo(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onLinkTo(e)},setDataBefore(e,t){let n={};n.data=e,n.form=this.$Method.copy(this.form),n.formObject=this;return this.config.items.find((e=>e.name===t.myConfig.name)).setDataBefore(n,t)},checkValidate(){this.$refs.form[0]?this.$refs.form.forEach((e=>{e.validate?this.errorFlag=!1:this.errorFlag=!0})):this.$refs.form.validate((e=>{this.errorFlag=!e}))},isError(){return this.errorFlag},getTrigger(e){let t="blur";switch(e&&(e=e.toLowerCase()),e){case"combobox":case"tagbox":case"daterangebox":t="change"}return t},getValue(e){return this.form[e]},setValue(e,t){let n={};n[e]=void 0===t?"":t,this.form=Object.assign({},this.form,n)},setValues(e){for(let t in e)void 0===e[t]&&(e[t]="");this.form=Object.assign({},this.form,e)},setFormReadOnly(e){if(!this.myConfig.items||0===this.myConfig.items.length)return!1;this.myConfig.items.forEach((t=>{let n="";if(t.name?n=t.name:t.sname&&(n=t.sname),e)this.setReadOnly(n,e);else if(this.myConfig.cellbeginedit){let t={};t.name=n,t.form=this.$Method.copy(this.form),this.myConfig.cellbeginedit(t)?this.setReadOnly(n,e):this.setReadOnly(n,!e)}else this.setReadOnly(n,e)}))},setPro(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setPro(t)},getPro(e,t){if(this.$refs[e]&&this.$refs[e][0])return this.$refs[e][0].getPro(t)},setReadOnly(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setReadOnly&&this.$refs[e][0].setReadOnly(t)},getData(){const e=this.$Method.copy(this.form);return this.doDetialItem(e)},doDetialItem(e){return this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.forEach((t=>{if("PopTagBox"===t.type){let n=[],o=this.oldForm[t.name],i=this.$Method.copy(e[t.name]);o&&o.length>0&&o.forEach((e=>{if(e.ph_key)if(i&&i.length>0){let t=i.findIndex((t=>t.ph_key===e.ph_key));if(t>-1)i.splice(t,1);else{let t=this.$Method.copy(e);t.flag="D",n.push(t)}}else{let t=this.$Method.copy(e);t.flag="D",n.push(t)}})),i&&i.length>0&&i.forEach((e=>{e.flag="I",n.push(e)})),e[t.name]=n}})),e},setCommonRequired(e,t,n){let o="";if(n.ename&&(o=n.ename),o&&(void 0===this.formRules[o]?!0===t&&(this.formRules[o]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(n.type)}]):t||delete this.formRules[o]),void 0===this.formRules[e]){if(!0===t)return this.formRules[e]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(n.type)}],!0}else if(!t)return delete this.formRules[e],!0;return!1},setRequired(e,t){let n=!1;const o=this.items.findIndex((t=>t.name===e||t.sname===e));if(o>-1&&(n=this.setCommonRequired(e,t,this.items[o]),n)){let e=Object.assign({},this.items[o],{required:t,status:!1});this.items.splice(o,1,e),this.$nextTick((()=>{this.items[o].status=!0}))}},updateCommonConfig(e,t){let n={},o=this.items.findIndex((t=>t.name===e||t.sname===e));if(o>-1){let i=!1;for(let e in t)if(t[e]!==this.items[o][e]){i=!0;break}if(i){t.status=!1,n.index=o,n.name=e;let i=this.$Method.copy(this.items[o]);n.config=Object.assign({},i,t),this.setCommonRequired(e,t.required,n.config)}}return n},updateItemConfig(e,t){let n=this.updateCommonConfig(e,t);if(n&&n.index>-1){let e=[];e.push(n),this.updateConfigReset(0,e)}},updateConfigReset(e,t){let n=t[e].index;this.items.splice(n,1,t[e].config),e+1<t.length?this.$nextTick((()=>{this.items[n].status=!0,this.$nextTick((()=>{this.$refs[t[e].name]&&this.$refs[t[e].name].length>0&&this.$refs[t[e].name][0].reset(),this.updateConfigReset(e+1,t)}))})):this.$nextTick((()=>{this.items[n].status=!0,this.$nextTick((()=>{this.$refs[t[e].name]&&this.$refs[t[e].name].length>0&&this.$refs[t[e].name][0].reset()}))}))},updateItemsConfig(e){let t=[];e&&(e.forEach((e=>{let n=this.updateCommonConfig(e.name,e);n&&n.index>-1&&t.push(n)})),t.length>0&&this.updateConfigReset(0,t))},clearData(){this.$refs.form.resetFields(),this.form=Object.assign({},{},this.initForm),this.oldForm=this.$Method.copy(this.form)},getFormItemStyle(e){let t={},n=this.myConfig.isFull;if(void 0!==e.isFull&&(n=e.isFull),n)t.width="100%";else{let e=this.myConfig.labelWidth+100;t["min-width"]=e+"px"}return void 0!==e.style&&(t=Object.assign({},t,e.style)),t},setFormItemCommonPro(e){void 0===e.isFull&&(e.isFull=!0),e.name&&this.setFormItemValue(e.name,e,!0),e.sname&&this.setFormItemValue(e.sname,e,!0),e.ename&&this.setFormItemValue(e.ename,e,!0),e.textName&&this.setFormItemValue(e.textName,e,!1)},setFormItemValue(e,t,n){if(void 0!==t.defaultValue)this.initForm[e]=t.defaultValue;else if("NumberBox"===t.type||"NumberRangeBox"===t.type){let n="";void 0!==t.min&&(n=t.min),void 0!==t.smin&&(n=t.smin),void 0===t.smin&&void 0!==t.emin&&(n=t.emin),this.initForm[e]=n,t.defaultValue=n,!1===t.boundaryValue&&(this.initForm[e]="",t.defaultValue="")}else"PopTagBox"===t.type?this.initForm[e]=[]:this.initForm[e]="";n&&(t.required?void 0===this.formRules[e]&&(this.formRules[e]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(t.type)}]):delete this.formRules[e])},doAction(e){this[e.name]&&this[e.name](e)},enterKeyDown(e){let t=this.findNextItems(e.controlName);this.setFoucs(e.controlName,!1),this.$nextTick((()=>{let e=this;setTimeout((()=>{e.setFoucs(t,!0)}),200)}))},setFoucs(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setFocus&&this.$refs[e][0].setFocus(t)},setHideDividerValue(e){this.$refs.hidedivider&&this.$refs.hidedivider[0]&&this.$refs.hidedivider[0].setHide(e)},findNextItems(e){let t="",n="",o=!1;return this.myConfig.items.some((i=>{let r=i.name;if(i.sname&&(r=i.sname),"wRichTextBox"!==i.type&&"RichTextBox"!==i.type&&"PictureBox"!==i.type&&"VideoBox"!==i.type&&this.$refs[r]&&this.$refs[r][0]&&!1!==this.$refs[r][0].getPro("visible")&&!0!==this.$refs[r][0].getPro("readOnly")&&(t||(t=r),o))return n=r,!0;e===r&&(o=!0)})),n||(n=t),n}}},lt={extends:st,data:()=>({editIndex:-1,editKey:""}),created(){this.init()},props:{valueData:{type:Object,default:()=>({})},vstyle:{type:String,default:""},showRowAction:{type:Boolean,default:!1}},methods:{customInit(){this.form=Object.assign({},this.form,this.valueData),this.style=this.vstyle},keyDownEvent(){this.cancelCellEditing()},formatValue(e,t,n){return this.$Method.formatValue(e,t,n)},EditCell(e){if(e.readOnly)return this.editKey="",void this.cancelCellEditing();if(this.showRowAction)this.cancelCellEditing();else if(this.editKey!==e.name)if(this.config.cellbeginedit){let t={};if(t.index=this.editIndex,t.column=e,t.row=this.valueData,this.config.cellbeginedit){if(!this.config.cellbeginedit(t))return void this.cancelCellEditing();this.editKey=e.name}}else this.editKey=e.name},addRowInfo(e,t){e.rowinfo={},e.rowinfo.column=t,e.rowinfo.index=this.editIndex,e.rowinfo.row=this.valueData,e.rowinfo.gridObject=this.config.getGridObject(),e.rowinfo.formObject=this},valueChanged(e){const t=this.config.items.find((t=>t.name===e.name));return this.addRowInfo(e,t),t.valueChanged(e)},searchBefore(e){const t=this.config.items.find((t=>t.name===e.config.name));return this.addRowInfo(e,t),t.searchBefore(e)},setDataBefore(e,t){const n=this.config.items.find((e=>e.name===t.myConfig.name));let o={};return o.data=e,this.addRowInfo(o,n),n.setDataBefore(o,t)},setEditIndex(e){this.editIndex=e},getEditIndex(){return this.editIndex},cancelCellEditing(){this.editKey=""}},watch:{valueData:{handler(e){this.form=Object.assign({},this.form,e)},deep:!0,immediate:!0}}},ct={key:0,style:{color:"#348eed"}},ut={key:1},dt=["onClick"];var ht=Xe(lt,[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("ControlBox"),s=c.resolveComponent("ShowText"),l=c.resolveComponent("FormItem"),u=c.resolveComponent("Col"),d=c.resolveComponent("Row"),h=c.resolveComponent("Form");return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(e.style)},[c.createVNode(h,{ref:"form",model:e.form,rules:e.formRules,"label-width":e.myConfig.labelWidth,inline:e.myConfig.inline,id:e.myConfig.name,onKeydown:c.withKeys(c.withModifiers(r.keyDownEvent,["prevent"]),["enter"])},{default:c.withCtx((()=>[c.createVNode(d,{type:"flex",justify:"start"},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.items,((t,n)=>c.withDirectives((c.openBlock(),c.createBlock(u,{key:"form_"+n,span:e.initFormItemCol(n),style:c.normalizeStyle({height:t.height})},{default:c.withCtx((()=>[c.createVNode(l,{label:t.label,prop:t.name||t.sname,style:{width:"100%"},"show-message":!1},{label:c.withCtx((()=>[!0===t.required?(c.openBlock(),c.createElementBlock("span",ct,c.toDisplayString(t.label),1)):(c.openBlock(),c.createElementBlock("span",ut,c.toDisplayString(t.label),1))])),default:c.withCtx((()=>[c.createElementVNode("div",{onClick:e=>r.EditCell(t),style:{width:"100%",height:"100%"}},[i.editKey===t.name?(c.openBlock(),c.createBlock(a,{key:0,config:t,valueData:e.form,onInputValue:e.input,style:{width:"100%"},editIndex:i.editIndex},null,8,["config","valueData","onInputValue","editIndex"])):(c.openBlock(),c.createBlock(s,{key:1,style:{display:"inline-block",height:"32px","line-height":"32px"},label:r.formatValue(e.form[t.name],e.form,t),contentAlign:"left"},null,8,["label"]))],8,dt)])),_:2},1032,["label","prop"])])),_:2},1032,["span","style"])),[[c.vShow,!1!==t.visible]]))),128))])),_:1})])),_:1},8,["model","rules","label-width","inline","id","onKeydown"])],4)}]]);const At={mixins:[ot],data:()=>({globalConfig:{cellbeginedit:"",showHeader:!0,showIndex:!0,showStripe:!1,showBorder:!0,showCheckBox:!1,showCondition:!1,checkByHighlight:!0,readOnly:!1,showPage:!0,tableSize:"default",pageSize:null,pageShowElevator:!0,pageShowTotal:!0,pageShowSizer:!0,height:null,manualLoad:!0,multiSelect:!1,operFixedFlag:!0,gridType:"viewGrid",dynamicHeight:!1,generalOrientation:!1,showSummary:!1,showSumGroup:!1,sumText:"合计",pageSizeNum:"",adjustHeight:0,items:[],pageConfig:{page_no:1,page_size:100,total_results:0,pageSizeList:[20,50,100,200,500,1e3]},moduleMethod:[],headClassName:""},tempData:[],data:[],addData:[],delData:[],columns:[],checkInfo:[],checkAddInfo:[],expand:{},dictkey:"",currentDictData:{},editRowIndex:"",editRowFlag:!0,loading:!1,conditionSearchParam:{},showRowAction:!1,modulecode:"",myToolConfig:{},showMoreBtn:!1,initData:[],showDelRow:!1,showCondition:!0,delRowAction:[{iconcls:"row",name:"delRow",text:"删除",type:"text"}],operFixedFlag:!0,editIndex:-1,editKey:"",newRow:{},summaryColumn:[],total_summary:{},extraHeight:0,outsideHeight:0,tableColumns:[],soltTableColumns:[],sumGroupNum:0,culPage:1}),props:{config:{type:Object,default:()=>({})},dictData:{type:Object,default:null},toolConfig:{type:Object,default:()=>({})},isPop:{type:Boolean,default:!1}},created(){this.init(),this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid"))},computed:{makeTableColumns(){return this.initColumn()},tableHeight(){if(this.myConfig.dynamicHeight)return null;{let e=this.currentHeight;return this.extraHeight&&(e-=Number(this.extraHeight)),this.outsideHeight&&(e-=Number(this.outsideHeight)),this.myConfig.showSummary&&(e-=50),e}},tableMaxHeight(){if(this.myConfig.dynamicHeight){let e=this.currentHeight-this.extraHeight-this.outsideHeight;return this.myConfig.showSummary&&(e-=50),e}return null}},methods:{init(){if(this.myConfig=Object.assign({},this.globalConfig,this.myConfig),this.config){let e=this.$Method.copy(this.config);for(let t in e)if("pageConfig"===t)for(let n in e[t])this.myConfig.pageConfig[n]=e[t][n];else this.myConfig[t]=e[t]}if(this.dictData?this.currentDictData=this.dictData:this.currentDictData=[],void 0!==this.myConfig.showDelRow&&(this.showDelRow=this.myConfig.showDelRow),void 0!==this.myConfig.showCondition&&(this.showCondition=this.myConfig.showCondition),this.myToolConfig=this.$Method.copy(this.toolConfig),!this.isPop){let e=0;this.myToolConfig.items&&this.myToolConfig.items.forEach((t=>{"row"===t.iconcls&&e++})),this.showMoreBtn=e>2,this.showRowAction=e>0,this.showRowAction&&(this.myConfig.showCheckBox||this.myConfig.multiSelect&&(this.myConfig.showCheckBox=!0))}this.operFixedFlag=this.myConfig.operFixedFlag,this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.some((e=>{if(!0===e.resizable)return this.myConfig.showBorder=!0,!0})),this.setSizeConfig(this.myConfig),this.customInit&&this.customInit()},initCheckColumn(e){if(this.myConfig.showCheckBox){let t={type:"selection",align:"center",key:"selection",width:40};t.multiSelect=this.myConfig.multiSelect,e.push(t)}},isToolBar(e){let t=!1;return this.myToolConfig&&this.myToolConfig.items&&this.myToolConfig.items.some((n=>{if(n.iconcls===e)return t=!0,!0})),t},initIndexColumn(e){if(this.myConfig.showIndex)if(this.myConfig.showSumGroup){let e={label:"行号",name:"sumindex",type:"TextBox",align:"center",width:45};"sumindex"!==this.myConfig.items[0].name&&this.myConfig.items.splice(0,0,e)}else{let t={type:"index",key:"index",width:45,title:"行号",align:"center"};void 0!==this.myConfig.headClassName&&(t.className=this.myConfig.headClassName),t.indexMethod=this.indexRender,void 0!==this.myConfig.indexConfig&&Object.assign(t,this.myConfig.indexConfig),e.push(t)}},initOperColumn(e){if(this.showRowAction||this.showDelRow){let t={title:"操作"};void 0!==this.myConfig.headClassName&&(t.className=this.myConfig.headClassName),t.key="action",t.render=this.actionRender,this.operFixedFlag&&(t.fixed="right"),t.width=120,1===this.myToolConfig.items.length&&(t.width=80),t.align="center",this.customInitOperColumn?this.customInitOperColumn(t,e):e.push(t)}},onColumnWidthResize(e,t,n){let o={};o.newWidth=e,o.oldWidth=t,o.column=n,this.$emit("onColumnWidthResize",o)},initExpandColumn(e){this.expand.items=[];let t=[];for(let n=0;n<e.length;n++)!0===e[n].isExpand?this.expand.items.push(e[n]):t.push(e[n]);if(this.expand.items.length>0){let n={type:"expand",width:50,render:this.expandRendel};const o=t.findIndex((e=>"index"===e.type));if(o>-1)t.splice(o+1,0,n);else{const e=t.findIndex((e=>"selection"===e.type));e>-1?t.splice(e+1,0,n):t.splice(0,0,n)}e=t}},initColumn(){let e={},t=[],n=[];if(!this.myConfig.items||0===this.myConfig.items.length)return n;this.initCheckColumn(n),this.initOperColumn(n),this.initIndexColumn(n);const o=this.myConfig.items.length;for(let r=0;r<o;r++)!1!==this.myConfig.items[r].visible?this.initCommonColumn(this.myConfig.items[r],n,t,e):void 0!==this.myConfig.items[r].defaultValue&&(this.myConfig.items[r].name&&(e[this.myConfig.items[r].name]=this.myConfig.items[r].defaultValue),this.myConfig.items[r].sname&&(e[this.myConfig.items[r].sname]=this.myConfig.items[r].defaultValue),this.myConfig.items[r].ename&&(e[this.myConfig.items[r].ename]=this.myConfig.items[r].defaultValue));this.initExpandColumn(n);let i={};return i.columns=n,i.newRow=e,i.summaryColumn=t,i},initCommonColumn(e,t,n,o){let i=this.$Method.copy(e);if(i.contentAlign||(i.contentAlign=i.align),i.title=i.label,i.headClassName?i.className=i.headClassName:void 0!==this.myConfig.headClassName&&(i.className=this.myConfig.headClassName),e.children&&e.children.length>0){i.children=[];for(let t=0;t<e.children.length;t++)this.initCommonColumn(e.children[t],i.children,n,o);t.push(i)}else i=this.initColumnConfig(i,n,o),t.push(i)},initColumnConfig(e,t,n){let o="";return e.type&&(o=e.type.toLowerCase()),e.key=e.name,Number(e.width)?e.width=Number(e.width):delete e.width,this.setColumnPro(e,o,t,n),"render"!==o&&void 0===e.render&&this.setCustomColumn&&this.setCustomColumn(e),"checkbox"!==o&&"picturebox"!==o&&"videobox"!==o||(e.render=this.commonRendel,"picturebox"===o&&(void 0===e.height&&(e.height=40),e.isGrid=!0),"videobox"===o&&void 0===e.height&&(e.height=60),this.myConfig.readOnly?e.readOnly=!0:!0!==e.readOnly&&(e.readOnly=!1)),e.required&&(e.className||(e.className="efuture-grid-head-required")),e.valueChanged&&(e.valueChanged=this.valueChanged),e.searchBefore&&(e.searchBefore=this.searchBefore),e.setDataBefore&&(e.setDataBefore=this.setDataBefore),e.onLinkTo&&(e.onLinkTo=this.onLinkTo),"timepicbox"!==o&&"datebox"!==o&&"daterangebox"!==o&&"colorbox"!==o&&"combobox"!==o||(e.transfer=!0),e},setColumn(e){let t=this.$Method.copy(this.myConfig.items[e]);t.title=t.label;let n="";t.type&&(n=t.type.toLowerCase()),n&&(t.key=t.name,Number(t.width)?t.width=Number(t.width):delete t.width,this.setColumnPro(t,n),"render"!==n&&void 0===t.render&&this.setCustomColumn&&this.setCustomColumn(t),"checkbox"!==n&&"picturebox"!==n&&"videobox"!==n||(t.render=this.commonRendel,"picturebox"===n&&void 0===t.height&&(t.height=40),"videobox"===n&&void 0===t.height&&(t.height=60),this.myConfig.readOnly?t.readOnly=!0:t.readOnly=!1),t.required&&(t.className||(t.className="efuture-grid-head-required")),t.contentAlign||t.align||(t.contentAlign=t.align),this.myConfig.items[e].valueChanged&&(t.valueChanged=this.valueChanged),this.myConfig.items[e].searchBefore&&(t.searchBefore=this.searchBefore),this.myConfig.items[e].setDataBefore&&(t.setDataBefore=this.setDataBefore),this.myConfig.items[e].onLinkTo&&(t.onLinkTo=this.onLinkTo),void 0===t.formatValue&&void 0!==this.myConfig.formatValue&&(t.formatValue=this.myConfig.formatValue),this.columns.push(t))},setColumnPro(e,t,n,o){if(e.place="grid",!0===e.sortable?e.sortable="custom":"default"===e.sortable&&(e.sortable=!0),"numberbox"===t?(e.contentAlign||(e.contentAlign="right"),e.align||(e.align="right"),e.summary&&void 0!==n&&n.push(e.name)):"datebox"===t||"checkbox"===t||"picturebox"===t||"videobox"===t?this.myConfig.generalOrientation&&"datebox"===t?(e.contentAlign||(e.contentAlign="left"),e.align||(e.align="left")):(e.contentAlign||(e.contentAlign="center"),e.align||(e.align="center")):(e.contentAlign||(e.contentAlign="left"),e.align||(e.align="left")),"combobox"===t&&void 0===e.data){let t=e.dictkey;e.customDictkey&&(t=e.customDictkey),e.data=this.currentDictData[t]}if(void 0!==e.defaultValue)o[e.name]=e.defaultValue;else if("numberbox"===t||"numberrangebox"===t){let t="";void 0!==e.min&&(t=e.min),void 0!==e.smin&&(t=e.smin),void 0===e.smin&&void 0!==e.emin&&(t=e.emin),e.defaultValue=t,void 0!==o&&(o[e.name]=t,!1===e.boundaryValue&&(o[e.name]="",e.defaultValue=""))}else void 0!==o&&("poptagbox"===e.type?o[e.name]=[]:o[e.name]="")},expandRendel(e,t){return e("div",[e(c.resolveComponent("ExpandRow"),{config:this.expand,valueData:t.row,vstyle:"margin-right: 120px",showRowAction:!1,onInputValue:e=>{this.editIndex=t.index,this.input(e)}})])},indexRender(e,t){let n=t+1;return this.myConfig.showPage&&(n+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size),this.myConfig.indexMethod?this.myConfig.indexMethod(e,n):n},actionRender(e,t){return e("div",[e(c.resolveComponent("Toolbar"),{config:this.myToolConfig,tooltype:"row",moduleMethod:this.globalConfig.moduleMethod,row:t.row,onDoAction:e=>{e.rowinfo=t,"editRowForm"===e.name?this.initRowForm&&this.initRowForm(e):"delRow"===e.name?this.delRow&&this.delRow(t.index):this.$emit("doAction",e)}})])},remove(e){let t=this.data.findIndex((t=>t._customIndex===e));if(-1===t&&(t=e),t>-1){if(void 0===this.data[t].flag||"U"===this.data[t].flag){this.data[t].flag="D";const e=this.$Method.copy(this.data[t]);this.delData.push(e)}this.data.splice(t,1)}this.customRemove&&this.customRemove(t)},setEdit(e){this.editRowIndex===e?this.editRowIndex=null:this.editRowIndex=e},dbclick(e){this.$emit("dbclick",e)},click(e){this.$emit("rowclick",e),this.$emit("click",e)},setData(e){this.data=[],this.data=e,this.initData=this.$Method.copy(this.data),this.delData=[],this.checkInfo=[],this.cancelCellEditing&&this.cancelCellEditing()},getData(){return this.$Method.copy(this.data)},clearData(){this.editIndex=-1,this.editKey="",this.data=[],this.delData=[],this.initData=[],this.checkInfo=[],this.addData=[],this.checkAddInfo=[],this.conditionSearchParam={},this.myConfig.pageConfig.page_no=1,this.myConfig.pageConfig.total_results=0,this.columnWidth={},this.customClearData&&this.customClearData()},updataRow(e,t){let n=Object.assign({},this.data[e],t);this.data.splice(e,1,n),this.tempData.splice(e,1,n)},getModuleMethod(){if(this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid")),this.token=this.$Method.getUrlParam("token"),this.modulecode&&this.token){let e=this.getUserModuleMethod();e&&(this.globalConfig.moduleMethod=e.modulemethod)}},getSelection(){return this.$refs.table.getSelection()},input(e){let t=this.editIndex;if(-1===t){if(void 0===e.editIndex)return;t=e.editIndex}let n={};if(void 0!==e.value&&(n[e.name]=e.value),void 0!==e.text&&(n[e.textName]=e.text),void 0!==e.svalue&&(n[e.sname]=e.svalue),void 0!==e.evalue&&(n[e.ename]=e.evalue),void 0===this.data[t].flag&&(n.flag="U"),e.customRows&&e.customRows.length>0){let t=this;e.customRows.forEach((e=>{if(void 0!==e.changeIndex){let n=Object.assign({},t.data[e.changeIndex],e);void 0===t.data[e.changeIndex].flag&&(n.flag="U"),t.data.splice(e.changeIndex,1,n)}})),e.customRows.forEach((e=>{if(void 0===e.changeIndex){let n=Object.assign({},{},e);n.flag="I",t.data.push(n)}}))}else{let e=Object.assign({},this.data[t],n);this.$nextTick((()=>{this.data.splice(t,1,e)}))}},updateColPro(e,t){const n=this.myConfig.items.findIndex((t=>e===t.name));if(n>-1){let e=Object.assign({},this.myConfig.items[n],t);this.myConfig.items.splice(n,1,e)}},setRowCheck(e,t){if(this.myConfig.multiSelect){if(e>-1){let n=Object.assign({},this.data[e],{});n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t),this.myConfig.onSetRowCheckBefore?this.myConfig.onSetRowCheckBefore(e,t)&&this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)})):this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}}else{let n=this.$Method.copy(this.data);n.forEach(((n,o)=>{o===e?this.myConfig.onSetRowCheckBefore?this.myConfig.onSetRowCheckBefore(e,t)&&(n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t)):(n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t)):(n._checked=!1,n._highlight=!1)})),this.$nextTick((()=>{this.data=n}))}},setAllRowCheck(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._checked=e,this.myConfig.checkByHighlight&&(t._highlight=e)})),this.$nextTick((()=>{this.data=t}))},setRowDisabled(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._disabled=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}},setAllRowDisabled(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._disabled=e})),this.$nextTick((()=>{this.data=t}))},setRowHighlight(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._highlight=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}},setAllRowHighlight(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._highlight=e})),this.$nextTick((()=>{this.data=t}))},commonRendel(e,t){return e("div",[e(c.resolveComponent("ControlBox"),{config:t.column,valueData:t.row,readOnly:"D"===t.row.flag,autofocus:this.editIndex===t.index&&this.editKey===t.column.key,onInputValue:e=>{this.editIndex=t.index,this.editKey=t.column.key,this.input(e)},onDoAction:e=>{this.doAction(e)}})])},setExtraHeight(){let e=0;this.$refs.head&&(e=this.$refs.head.offsetHeight),this.$refs.page&&(e+=this.$refs.page.offsetHeight),this.extraHeight=e},setOutsideHeight(e){this.outsideHeight=e},getSoltTableColumns(e,t){if(e)if(e instanceof Array)e.forEach((e=>{this.getSoltTableColumns(e,t)}));else if(e.children&&e.children.length>0)e.children.forEach((e=>{this.getSoltTableColumns(e,t)}));else{let n=Object.assign({},e);"action"!==n.key&&"actionbtn"!==n.key&&t.push(n)}},findColumnConfig(e,t){if(e){if(t instanceof Array){let n=!1,o={};return t.some((t=>{let i=this.findColumnConfig(e,t);if(i)return n=!0,o=i,!0})),!!n&&o}if(t.children&&t.children.length>0){let n=!1,o={};return t.children.some((t=>{let i=this.findColumnConfig(e,t);if(i)return n=!0,o=i,!0})),!!n&&o}return e===t.name&&t}},openHelp(){window.open(this.curHelpUrl)},initScrollLeft(){this.$refs.table&&this.$refs.table.$refs.body&&(this.$refs.table.$refs.body.scrollLeft=0)}},watch:{data(e){this.tempData=D(e)},makeTableColumns(e){this.total_summary={},this.newRow=D(e.newRow),this.summaryColumn=D(e.summaryColumn),this.tableColumns=D(e.columns);let t=[];this.getSoltTableColumns(e.columns,t),this.soltTableColumns=t}},mounted(){}},ft={name:"viewgridbase",extends:At,data:()=>({myConfig:{resources:"",method:"",response:"",searchParam:null,readOnly:!0,multiSelect:!0,bindSearchParam:"ph_key",showAll:!1,exportMethod:"exportExcel",separator:"::",exportType:"2",overrideData:"",headStyle:"padding-bottom: 10px;padding-top: 10px;",multiSelectGrid:!1,multiGridCol:11,multiGridTitle:"已选择",gridTitle:"待选择",highLightRow:!0,dynamicColumnFlag:!1,dynameicColumnConfig:{groupColumns:[],dynameicColumnName:"",dynameicColumnValue:"",dynameicColumnValueTitle:"",dynameicColumnValuePro:{},dynameicColumnSumLable:"动态合计"}},multiGridCol:11,gridCol:11,editRowFlag:!1,singleData:{},searchBeforeSearchParam:{},order_field:"",order_direction:"",rightActive:!1,leftActive:!1,multiSelectData:[],multiTableColumns:[],dynamicColumnItems:[],tempMultiSelectData:[],multiSoltTableColumns:[],showHelpBtn:!1}),computed:{makeTableColumns(){return this.myConfig.dynamicColumnFlag?[]:this.initColumn()}},methods:{customInit(){this.isPop&&(this.myConfig.showCheckBox||this.myConfig.multiSelect&&(this.myConfig.showCheckBox=!0),this.myConfig.multiGridCol&&(this.multiGridCol=Number(this.myConfig.multiGridCol),this.gridCol=22-this.multiGridCol),this.myConfig.tableSize="small",this.myConfig.headStyle="",this.myConfig.showBorder=!1,this.myConfig.headStyle="",this.myConfig.pageSize="small",void 0===this.myConfig.height&&(this.myConfig.height=360),this.myConfig.pageSizeNum||(this.myConfig.pageConfig.page_size=50)),this.myConfig.pageSizeNum&&(this.myConfig.pageConfig.page_size=Number(this.myConfig.pageSizeNum)),this.myConfig.items.forEach((e=>{void 0===e.resizable&&(e.resizable=!0),e.width||e.minWidth||(e.minWidth=60)})),this.myConfig.multiSelectGrid&&(this.multiTableColumns=this.multiInitColumn()),"billGrid"===this.myConfig.gridType&&this.getModuleMethod(),this.myConfig.dynamicColumnFlag&&(this.myConfig.showPage=!1);this.curHelpUrl=this.OmdUrl.getCurHelpUrl(this),this.curHelpUrl?this.showHelpBtn=!0:this.showHelpBtn=!1},conditionAction(e){let t=[];switch(e.action){case"condition_search":e.para&&(this.conditionSearchParam=this.$Method.copy(e.para)),this.refurbish();break;case"condition_clear":this.conditionSearchParam={};break;case"condition_ok":this.myConfig.multiSelect?t=this.getSelection():this.singleData.currentRow&&t.push(this.singleData.currentRow),0===t.length?this.alert("请选择"):(e.rows=t,this.$emit("conditionAction",e));break;case"condition_cancel":this.$emit("conditionAction",e)}},getSearchParam(e,t){let n=Object.assign({},this.myConfig.searchParam,this.searchBeforeSearchParam);if(n||(n={}),"report"===this.myConfig.response)n=Object.assign({},n,this.conditionSearchParam);else{let e={};for(let t in n)if(this.conditionSearchParam[t]){e[t]={$and:[]};let o={};o[t]=n[t],e[t].$and.push(o);let i={};i[t]=this.conditionSearchParam[t],e[t].$and.push(i)}n=Object.assign({},n,this.conditionSearchParam);for(let t in e)n.$and=this.$Method.copy(e[t].$and),delete n[t]}return this.myConfig.showPage&&(t?this.myConfig.pageConfig.page_no?n.page_no=this.myConfig.pageConfig.page_no:n.page_no=1:(this.myConfig.pageConfig.page_no=1,n.page_no=1,this.culPage=1),n.page_size=this.myConfig.pageConfig.page_size),this.order_field&&(n.order_field=this.order_field,this.order_direction&&(n.order_direction=this.order_direction)),e&&(n=Object.assign({},n,e)),this.myConfig.dynamicColumnFlag||this.summaryColumn&&this.summaryColumn.length>0&&(n.summary_fld=this.summaryColumn.join(",")),this.myConfig.showSumGroup&&(n.sumgroups=this.myConfig.sumgroups),this.myConfig.overrideSearchParam?this.myConfig.overrideSearchParam(n):n},setWhereParam(e){this.conditionSearchParam=this.$Method.copy(e)},refurbish(e,t){this.loading=!0;let n=this;this.singleData={},n.data=[],n.asyncPost(n.myConfig.resources,n.myConfig.method,n.getSearchParam(e,t),(function(e){n.dynamicInitData=e,n.myConfig.dynamicColumnFlag?n.makeDynamicColumn():n.refurbishSucceedDefault(),n.loading=!1}),(function(e){n.loading=!1,n.$nextTick((()=>{setTimeout((()=>{n.alert(e,null,2)}),1e3)}))}))},changePage(e){let t=this.myConfig.pageConfig.page_no;this.myConfig.refurbishCheck?this.myConfig.refurbishCheck(e,t,this.callBackChangePage):(this.myConfig.pageConfig.page_no=e,this.refurbish(null,!0))},refurbishSucceedDefault(){if(this.sumGroupNum=0,this.dynamicInitData&&this.dynamicInitData[this.myConfig.response]){this.myConfig.showAll&&this.myConfig.rowAll&&this.dynamicInitData[this.myConfig.response].splice(0,0,this.myConfig.rowAll);let e=[];e=this.myConfig.overrideData?this.myConfig.overrideData(this.dynamicInitData[this.myConfig.response]):this.dynamicInitData[this.myConfig.response],this.dynamicInitData.sumgroups&&(e=this.doSumgroups(e,this.dynamicInitData.sumgroups)),this.data=e,this.tempData=this.$Method.copy(e)}void 0!==this.dynamicInitData.total_results&&(this.myConfig.pageConfig.total_results=Number(this.dynamicInitData.total_results)),void 0!==this.dynamicInitData.total_summary?(this.total_summary=Object.assign({},{},this.dynamicInitData.total_summary),this.myConfig.showSummary||Object.assign(this.myConfig,{showSummary:!0})):this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1})},callBackChangePage(e,t,n){e?(this.myConfig.pageConfig.page_no=t,this.refurbish(null,!0)):this.$nextTick((()=>{this.myConfig.pageConfig.page_no=n,this.myConfig.showPage=!1,this.myConfig=Object.assign({},this.myConfig),this.$nextTick((()=>{this.myConfig.showPage=!0,this.myConfig=Object.assign({},this.myConfig)}))}))},callBackChangePageSize(e,t,n){e?(this.myConfig.pageConfig.page_size=t,this.refurbish(null,!0)):this.$nextTick((()=>{this.myConfig.pageConfig.page_size=n,this.myConfig.showPage=!1,this.myConfig=Object.assign({},this.myConfig),this.$nextTick((()=>{this.myConfig.showPage=!0,this.myConfig=Object.assign({},this.myConfig)}))}))},changePageSize(e){let t=this.myConfig.pageConfig.page_size;this.myConfig.refurbishCheck?this.myConfig.refurbishCheck(e,t,this.callBackChangePageSize):(this.myConfig.pageConfig.page_size=e,this.data&&this.data.length>0&&this.refurbish(null,!0))},sortChagne(e){this.order_field="",this.order_direction="";let t=[],n=[];if(this.config.searchParam&&this.config.searchParam.order_field)if(t=this.config.searchParam.order_field.split(","),this.config.searchParam.order_direction){n=this.config.searchParam.order_direction.split(",");for(let e=n.length;e<t.length;e++)n.push("asc")}else for(let o=0;o<t.length;o++)n.push("asc");if("normal"!==e.order){let o=t.findIndex((t=>t===e.key));o>-1?n.splice(o,1,e.order):(t.push(e.key),n.push(e.order))}t.length>0&&(this.order_field=t.join(),this.order_direction=n.join()),this.data&&this.data.length>0&&this.refurbish()},onCurrentChange(e,t){this.singleData={},this.singleData.currentRow=e,this.singleData.oldCurrentRow=t,this.myConfig.onSingleChange&&this.myConfig.onSingleChange(),this.myConfig.showCheckBox&&(this.myConfig.onSetRowCheck?this.myConfig.onSetRowCheck(e._customIndex,!0):this.setRowCheck(e._customIndex,!0))},onSelect(e,t){this.myConfig.onSelect&&this.myConfig.onSelect(e,t)},onSelectCancel(e,t){this.myConfig.onSelectCancel&&this.myConfig.onSelectCancel(e,t)},OnSelectionChange(e){this.$nextTick((()=>{this.myConfig.onSelectionChange&&this.myConfig.onSelectionChange(e),e&&e.length>0?this.leftActive=!0:this.leftActive=!1;let t=this.$Method.copy(this.data),n=!1;t.forEach(((t,o)=>{n=!1,e.forEach((e=>{if(o===e._customIndex)return n=!0,!0})),t._checked=n})),this.data=t,this.tempData=this.$Method.copy(t)}))},OnMultiSelectionChange(e){this.$nextTick((()=>{let t=this.$Method.copy(this.tempMultiSelectData),n=!1;t.forEach(((t,o)=>{n=!1,e.forEach((e=>{if(o===e._customIndex)return n=!0,!0})),t._checked=n})),this.tempMultiSelectData=t,e&&e.length>0?this.rightActive=!0:this.rightActive=!1}))},removeRow(e){this.data.splice(e,1)},doBatchAction(e){if("addData"!==e.name){let t=this.getSelection();if(0===t.length)return void this.alert("请至少选择一行");e.data=t}this.$emit("doAction",e)},add(){let e={name:"addData"};this.$emit("doAction",e)},setSearchBeforeSearchParam(e){this.searchBeforeSearchParam=Object.assign({},{},e)},clearSearchBeforeSearchParam(){this.searchBeforeSearchParam={}},popValueChanged(e){let t=[],n=this,o=Object.assign({},n.getSearchParam(),e);return n.synchroPost(n.myConfig.resources,n.myConfig.method,o,(function(e){e&&e[n.myConfig.response]&&(t=e[n.myConfig.response])}),null),t},getTotalCount(){let e="";return void 0!==this.myConfig.pageConfig.total_results&&(e=this.myConfig.pageConfig.total_results),e},export(e,t){if(0==this.data.length)return void this.alert("请先查询数据");let n=this.getSearchParam();this.OmdUrl.maxRowNum&&(n.maxrownum=this.OmdUrl.maxRowNum),this.OmdUrl.maxDataNum&&(n.maxdatanum=this.OmdUrl.maxDataNum);let o=this.getModulecode();o&&(n.modulecode=o);let i={dictdata:{}};n.fields=this.$Method.getGridField(this.myConfig.items,this.myConfig.separator,this.dictData,i.dictdata),n.fields||(n.fields="");let r=this.getTotalCount();r&&(n.fields+=",totalCount"+this.myConfig.separator+r),o&&(n.fields+=",modulecode"+this.myConfig.separator+o);let a=this.myConfig.exportMethod;e&&(a="asyncExport");let s=this.myConfig.resources.replace("rest",a),l=this;const c=this.zip(JSON.stringify(i.dictdata));n.dictdata=encodeURIComponent(c),e?this.asyncExport(s,this.myConfig.method,n,t):this.doExportExcel(s,this.myConfig.method,n,this.myConfig.exportType,l)},zip(e){let t=d.gzip(e,{to:"string"});return btoa(t)},asyncExport(e,t,n,o){this.synchroPost(e,t,n,(function(e){"1"===e.flag&&(o?o():this.alert("文件正在生成,请稍后"))}),null)},initAsynExportConfig(e,t,n){for(let o=0;o<e.length;o++){let i=this.$Method.copy(e[o]);if(!1!==i.visible&&!1!==i.isExport&&(i.name&&(i.label=t+i.label,n.push(i)),i.children)){let e=t+"("+i.label+")";this.initAsynExportConfig(i.children,e,n)}}},setRowHighlight(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._highlight=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n),this.myConfig.multiSelect||(this.singleData.currentRow=this.$Method.copy(this.data[e]))}))}},getSelection(){return!1===this.myConfig.multiSelect?this.singleData.currentRow?[this.singleData.currentRow]:[]:this.myConfig.multiSelectGrid?this.$Method.copy(this.multiSelectData):this.$refs.table.getSelection()},setSelection(e){this.myConfig.multiSelectGrid&&(this.multiSelectData=[],this.$nextTick((()=>{this.multiSelectData=e,this.tempMultiSelectData=this.$Method.copy(this.multiSelectData)})))},moveToLeft(){let e=this.$refs.multiSelectTable.getSelection();e&&e.length>0&&e.forEach((e=>{let t=this.multiSelectData.findIndex((t=>t[this.myConfig.responseId]===e[this.myConfig.responseId]));t>-1&&this.multiSelectData.splice(t,1)})),this.tempMultiSelectData=this.$Method.copy(this.multiSelectData),this.rightActive=!1},moveToRight(){let e=this.$refs.table.getSelection();e&&e.length>0&&e.forEach((e=>{if(this.myConfig.multiCheck)this.myConfig.multiCheck(this.multiSelectData,e)&&(delete e._customIndex,delete e._checked,this.multiSelectData.push(e));else{-1===this.multiSelectData.findIndex((t=>t[this.myConfig.responseId]===e[this.myConfig.responseId]))&&(delete e._customIndex,delete e._checked,this.multiSelectData.push(e))}})),this.tempMultiSelectData=this.$Method.copy(this.multiSelectData)},multiInitColumn(){let e=[],t=this.myConfig.items;if(this.myConfig.multiItems&&(t=this.myConfig.multiItems),!t||0===t.length)return e;this.initCheckColumn(e),this.initMultiIndexColumn(e);const n=t.length;for(let i=0;i<n;i++)!1!==t[i].visible&&this.initCommonColumn(t[i],e);this.initExpandColumn(e),this.initOperColumn(e);let o=[];return this.getSoltTableColumns(e,o),this.multiSoltTableColumns=o,e},customClearData(){this.multiSelectData=[],this.rightActive=!1,this.leftActive=!1,this.myConfig.dynamicColumnFlag&&(this.tableColumns=[],this.soltTableColumns=[],this.newRow={},this.total_summary={},this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1}))},clearCondition(){this.$refs.condition&&this.$refs.condition.clear&&this.$refs.condition.clear()},clearCurrentRow(){this.$refs.table&&this.$refs.table.clearCurrentRow()},delRow(e){this.data.splice(e,1),this.tempData=this.data},updataRow(e,t){let n=Object.assign({},this.data[e],t);this.data.splice(e,1,n),this.tempData=this.data},initMultiIndexColumn(e){let t={type:"index",key:"index",width:45,title:"行号",align:"center"};e.push(t)},makeDynamicColumn(){let e=[];if(this.tableColumns=[],this.soltTableColumns=[],this.total_summary={},this.dynamicInitData&&this.dynamicInitData[this.myConfig.response]){e=this.$Method.copy(this.dynamicInitData[this.myConfig.response]);let t=[];t=this.$Method.copy(this.myConfig.dynameicColumnConfig.groupColumns);let n=[];this.myConfig.dynameicColumnConfig.dynameicColumnName&&(n=this.myConfig.dynameicColumnConfig.dynameicColumnName.split(","));let o=[];this.myConfig.dynameicColumnConfig.dynameicColumnValue&&(o=this.myConfig.dynameicColumnConfig.dynameicColumnValue.split(","));let i=[];this.myConfig.dynameicColumnConfig.dynameicColumnValueTitle&&(i=this.myConfig.dynameicColumnConfig.dynameicColumnValueTitle.split(","));let r=[];n.forEach((e=>{let t={};t.name=e,r.push(t)}));let a={},s={},l=0;e.forEach((e=>{let i="";t.forEach((t=>{i=i+e[t]+"-"})),i&&(i=i.substring(0,i.length-1));let c="",u="";n.forEach(((t,o)=>{c=c+e[t]+"-",r[o][e[t]]||(r[o][e[t]]={},r[o][e[t]].fatherId=u,r[o][e[t]].label=e[t]),u=e[t],o===n.length-1&&(r[o][e[t]].id=c.substring(0,c.length-1))})),c&&(c=c.substring(0,c.length-1)),a[i]||(a[i]={},a[i].data={},t.forEach((t=>{a[i].data[t]=e[t]})),a[i].columns={}),a[i].columns[c]||(o.length>1?(a[i].columns[c]={},o.forEach((t=>{a[i].columns[c][t]=e[t]}))):a[i].columns[c]=e[this.myConfig.dynameicColumnConfig.dynameicColumnValue]),s[c]||(s[c]={},s[c].name="dy_col_"+l,o.length>1?(s[c].sum={},o.forEach((t=>{s[c].sum[t]=e[t]}))):s[c].sum=0,l++),o.length>1?o.forEach((t=>{s[c].sum[t]=Number(s[c].sum[t])+Number(e[t])})):s[c].sum=Number(s[c].sum)+Number(e[this.myConfig.dynameicColumnConfig.dynameicColumnValue])}));let c=[];for(let e in a){let t={};Object.assign(t,a[e].data);let n=0;for(let i in s)o.length>1?void 0!==a[e].columns[i]?o.forEach((o=>{let r=s[i].name+"_"+o;t[r]=a[e].columns[i][o],n+=Number(t[r])})):o.forEach((e=>{let o=s[i].name+"_"+e;t[o]=0,n+=Number(t[o])})):void 0!==a[e].columns[i]?(t[s[i].name]=a[e].columns[i],n+=Number(t[s[i].name])):(t[s[i].name]=0,n+=Number(t[s[i].name]));t.dynamic_sum=n,c.push(t)}let u=[];this.makeDynamicColumnConfig(r,0,"",u,s,o,i);let d={};this.myConfig.dynameicColumnConfig.dynameicColumnSumLable?d.label=this.myConfig.dynameicColumnConfig.dynameicColumnSumLable:d.label="动态合计",d.type="NumberBox",d.contentAlign="right",d.summary=!0,d.name="dynamic_sum";let h=this.$Method.getTextWidth(d.label);d.width=h,Object.assign(d,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro),u.push(d);let A=this.myConfig.items.concat(u);this.dynamicColumnConfig=this.$Method.copy(A),this.initDynamicColumn(A);let f={},p=0;for(let e in s)o.length>1?o.forEach((t=>{let n=s[e].name+"_"+t;f[n]=s[e].sum[t],p+=Number(s[e].sum[t])})):(f[s[e].name]=s[e].sum,p+=Number(s[e].sum));f.dynamic_sum=p;let g=[];this.summaryColumn.forEach((e=>{void 0===f[e]&&g.push(e)})),g.length>0&&c.forEach((e=>{g.forEach((t=>{f[t]||(f[t]=0),f[t]=f[t]+Number(e[t])}))})),this.data=c,this.tempData=this.$Method.copy(c),this.total_summary=Object.assign({},{},f),this.myConfig.showSummary||Object.assign(this.myConfig,{showSummary:!0})}else this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1})},initDynamicColumn(e){let t={},n=[],o=[];this.initCheckColumn(o),this.initOperColumn(o),this.initIndexColumn(o);const i=e.length;for(let a=0;a<i;a++)!1!==e[a].visible?this.initCommonColumn(e[a],o,n,t):void 0!==e[a].defaultValue&&(e[a].name&&(t[e[a].name]=e[a].defaultValue),e[a].sname&&(t[e[a].sname]=e[a].defaultValue),e[a].ename&&(t[e[a].ename]=e[a].defaultValue));this.total_summary={},this.newRow=D(t),n.push("dynamic_sum"),this.summaryColumn=D(n),this.tableColumns=D(o);let r=[];this.getSoltTableColumns(o,r),this.soltTableColumns=r,this.dynamicColumnItems=e},makeDynamicColumnConfig(e,t,n,o,i,r,a){let s=e[t];if(t===e.length-1)for(let l in s){if("name"===l)continue;let e={};if(e.label=s[l].label,r.length>1)e.align="center",e.children=[],r.forEach(((t,n)=>{let o={type:"NumberBox",align:"center",contentAlign:"right",summary:!0};Object.assign(o,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro),o.label=a[n];let r=this.$Method.getTextWidth(o.label);o.width=r,o.name=i[s[l].id].name+"_"+t,e.children.push(o)}));else{e.type="NumberBox",e.align="center",e.contentAlign="right",e.summary=!0;let t=this.$Method.getTextWidth(e.label);e.width=t,i[s[l].id]&&(e.name=i[s[l].id].name),Object.assign(e,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro)}n?s[l].fatherId===n&&(o.push(e),o.sort(((e,t)=>e>t))):(o.push(e),o.sort(((e,t)=>e>t)))}else for(let l in s){if("name"===l)continue;let c={};c.label=s[l].label,c.align="center",n?s[l].fatherId===n&&(c.children=[],this.makeDynamicColumnConfig(e,t+1,l,c.children,i,r,a),o.push(c),o.sort(((e,t)=>e>t))):(c.children=[],this.makeDynamicColumnConfig(e,t+1,l,c.children,i,r,a),o.push(c),o.sort(((e,t)=>e>t)))}},handleSummary({columns:e}){let t={};for(let i in this.newRow)t[i]={key:i,value:""};e.findIndex((e=>"index"===e.type))>-1&&(t.index={key:"index",value:""}),e.findIndex((e=>"selection"===e.type))>-1&&(t.selection={key:"selection",value:""});let n=[];n=this.myConfig.dynamicColumnFlag?this.dynamicColumnItems:this.config.items;for(let i in this.total_summary){let e={};if(this.findItemByName(n,i,e),e.name){let n=this.total_summary[i];void 0!==e.format&&(n=this.$Method.formatNumber(n,e.format,e.notzero)),t[i]={key:i,value:n}}}let o=this.findFirst(e);return t[o]={key:o,value:this.myConfig.sumText},this.myConfig.customSummary?this.myConfig.customSummary(t):t},findFirst(e){let t="";return e.some((e=>{if("selection"!==e.key&&"index"!==e.key&&"sumindex"!==e.key)return t=e.name,!0})),t},findItemByName(e,t,n){if(e instanceof Array){let o=!1;return e.some((e=>{if(e.children&&e.children.length>0){if(o=this.findItemByName(e.children,t,n),o)return!0}else if(e.name&&e.name===t)return Object.assign(n,e),o=!0,!0})),o}return!(!e.name||e.name!==t)&&(Object.assign(n,e),!0)},dynamicExportExcel(){let e=[];this.myConfig.dynameicColumnConfig.dynameicColumnName&&(e=this.myConfig.dynameicColumnConfig.dynameicColumnName.split(","));let t=e.length,n=this.$Method.getUrlParam("modulecode");n||(n=this.$Method.getUrlParam("billmoduleid"));let o=this.$Method.formatDate(new Date,"yyyyMMddhhmmss")+"(合计"+this.data.length+"条).xlsx";n&&(o=n+"_"+o);let i=this.$Method.copy(this.data);this.dynamicColumnConfig.forEach((e=>{if("ComboBox"===e.type){let t="code",n="name";e.valueField&&(t=column.valueField),e.textField&&(n=column.textField),i.forEach((o=>{if(o[e.name]&&e.data){let i=e.data.findIndex((n=>n[t]===o[e.name]));i>-1&&(!1===e.codeWithName?o[e.name]=e.data[i][n]:o[e.name]="["+e.data[i][t]+"]"+e.data[i][n])}}))}}));let r=[];this.initAsynExportConfig(this.dynamicColumnConfig,"",r),this.$Method.exportExcelStyle(r,i,t,o)},formatValue(e,t){let n="",o=this.$Method.copy(this.tempData[e]);t.name&&(n=o[t.name]);let i=t,r=this.$Method.formatValue(n,o,i),a={};return a.value=n,a.row=o,a.config=i,a.valueFormat=r,t.formatValue?t.formatValue(a):this.myConfig.formatValue?this.myConfig.formatValue(a):r},formatMulValue(e,t){let n="",o=this.$Method.copy(this.tempMultiSelectData[e]);t.name&&(n=o[t.name]);let i=t;return this.$Method.formatValue(n,o,i)},setCustomColumn(e){e.slot=e.key},onLinkTo(e){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),t.onLinkTo(e)},addRowInfo(e,t){let n=e.rowIndex;e.rowinfo={},e.rowinfo.column=t,e.rowinfo.index=n,n>-1&&(e.rowinfo.row=this.data[n]);e.rowinfo.gridObject=this},doSumgroups(e,t){let n=[];if(t.forEach((t=>{if(t.data&&t.data.length>0){let o=t.group.split(","),i="",r="";e.forEach(((e,a)=>{if(r="",o.forEach((t=>{r+=e[t]})),i||(i=r),i!==r){let e=t.data.find((e=>{let t="";return o.forEach((n=>{t+=e[n]})),t===i})),s={};if(s.index=a,s.sum=e,t.showgroup){let e=t.showgroup.split(",");s.showgroup=e}s.group=o,n.push(s),i=r}}))}})),n.length>0){let t=[];return e.forEach(((e,o)=>{let i=o+1;this.myConfig.showPage&&(i+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size),e.sumindex=i+"";let r=n.find((e=>e.index===o));r?(this.myConfig.customSummaryGroup&&(r=this.myConfig.customSummaryGroup(r)),r.showgroup&&r.group.forEach((e=>{-1===r.showgroup.findIndex((t=>e===t))&&(r.sum[e]="")})),r.sum.sumindex="",t.push(r.sum),t.push(e)):t.push(e)})),t}return e}},mounted(){this.observer=E.default(),this.$refs.head&&this.observer.listenTo(this.$refs.head,this.setExtraHeight),this.$refs.page&&this.observer.listenTo(this.$refs.page,this.setExtraHeight)},beforeUnmount(){this.$refs.head&&this.observer.removeListener(this.$refs.head,this.setExtraHeight),this.$refs.page&&this.observer.removeListener(this.$refs.page,this.setExtraHeight)}},pt={ref:"head"},gt={key:0},mt={key:0},yt={ref:"page",name:"page"},vt={key:0,style:{background:"#eee","padding-top":"5px"}},Ct=["textContent"],bt=["textContent"],wt={ref:"page",name:"page"},xt={key:0},Bt={key:1,ref:"page",style:{background:"#eee","padding-top":"5px"}};var Et=Xe({name:"viewgrid",extends:ft,mounted(){}},[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("ConditionBox"),s=c.resolveComponent("Col"),l=c.resolveComponent("Toolbar"),u=c.resolveComponent("CommonIcon"),d=c.resolveComponent("Tooltip"),h=c.resolveComponent("Row"),A=c.resolveComponent("ShowText"),f=c.resolveComponent("Table"),p=c.resolveComponent("Page"),g=c.resolveComponent("Card"),m=c.resolveComponent("Button");return c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",pt,[e.$slots.header?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(e.myConfig.headStyle)},[c.renderSlot(e.$slots,"header")],4)):(c.openBlock(),c.createElementBlock("div",{key:1,style:c.normalizeStyle(e.myConfig.headStyle)},[e.showCondition?(c.openBlock(),c.createElementBlock("div",gt,["billGrid"===e.myConfig.gridType?(c.openBlock(),c.createBlock(h,{key:0,gutter:4},{default:c.withCtx((()=>[c.createVNode(s,{span:"18"},{default:c.withCtx((()=>[c.createVNode(a,{ref:"condition",config:e.myConfig,onConditionAction:e.conditionAction,dictData:e.dictData,modelType:"billSearch"},null,8,["config","onConditionAction","dictData"])])),_:1}),c.createVNode(s,{span:"6"},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",gutter:8},{default:c.withCtx((()=>[c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(l,{config:e.myToolConfig,onDoAction:e.doBatchAction,tooltype:"batch",moduleMethod:e.globalConfig.moduleMethod},null,8,["config","onDoAction","moduleMethod"])])),_:1}),e.showHelpBtn?(c.openBlock(),c.createBlock(s,{key:0},{default:c.withCtx((()=>[c.createElementVNode("a",{href:"#",onClick:t[0]||(t[0]=c.withModifiers(((...t)=>e.openHelp&&e.openHelp(...t)),["prevent"]))},[c.createVNode(d,{content:"帮助中心",placement:"left"},{default:c.withCtx((()=>[c.createVNode(u,{size:"32",color:"#2d8cf0",type:"md-help-circle"})])),_:1})])])),_:1})):c.createCommentVNode("",!0),e.modulecode?(c.openBlock(),c.createBlock(s,{key:1},{default:c.withCtx((()=>[c.createVNode(d,{content:e.modulecode,placement:"left"},{default:c.withCtx((()=>[c.createVNode(u,{size:"32",color:"#2d8cf0",type:"ios-information-circle-outline"})])),_:1},8,["content"])])),_:1})):c.createCommentVNode("",!0)])),_:1})])),_:1})])),_:1})):(c.openBlock(),c.createBlock(h,{key:1},{default:c.withCtx((()=>[c.createVNode(s,{span:"24"},{default:c.withCtx((()=>[c.createVNode(a,{ref:"condition",config:e.myConfig,onConditionAction:e.conditionAction,dictData:e.dictData,isPop:e.isPop},null,8,["config","onConditionAction","dictData","isPop"])])),_:1})])),_:1}))])):c.createCommentVNode("",!0)],4))],512),e.myConfig.multiSelectGrid?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(h,{type:"flex",justify:"center",align:"middle"},{default:c.withCtx((()=>[c.createVNode(s,{span:e.gridCol},{default:c.withCtx((()=>[c.createVNode(g,{padding:0,bordered:!1},{title:c.withCtx((()=>[c.createElementVNode("span",{textContent:c.toDisplayString(e.myConfig.gridTitle)},null,8,Ct)])),default:c.withCtx((()=>[c.createVNode(f,{ref:"table","row-class-name":e.myConfig.rowClassName,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary,loading:e.loading,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.tableColumns,data:e.tempData,onOnSortChange:e.sortChagne,onOnCurrentChange:e.onCurrentChange,"highlight-row":e.myConfig.highLightRow,onOnRowDblclick:e.dbclick,onOnSelect:e.onSelect,onOnSelectCancel:e.onSelectCancel,onOnSelectionChange:e.OnSelectionChange,onOnRowClick:e.click,onOnColumnWidthResize:e.onColumnWidthResize},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatValue(n,t),contentAlign:t.contentAlign,rowIndex:n},null,8,["label","contentAlign","rowIndex"])]))})))]),1032,["row-class-name","show-summary","summary-method","loading","size","stripe","border","height","max-height","show-header","columns","data","onOnSortChange","onOnCurrentChange","highlight-row","onOnRowDblclick","onOnSelect","onOnSelectCancel","onOnSelectionChange","onOnRowClick","onOnColumnWidthResize"])])),_:1})])),_:1},8,["span"]),c.createVNode(s,{span:"2"},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"center",align:"middle",style:{padding:"5px"}},{default:c.withCtx((()=>[c.createVNode(d,{content:"删除",placement:"left"},{default:c.withCtx((()=>[c.createVNode(m,{type:"primary",size:"small",icon:"ios-arrow-back",disabled:!e.rightActive,onClick:e.moveToLeft},null,8,["disabled","onClick"])])),_:1})])),_:1}),c.createVNode(h,{type:"flex",justify:"center",align:"middle",style:{padding:"5px"}},{default:c.withCtx((()=>[c.createVNode(d,{content:"添加",placement:"right"},{default:c.withCtx((()=>[c.createVNode(m,{type:"primary",size:"small",icon:"ios-arrow-forward",disabled:!e.leftActive,onClick:e.moveToRight},null,8,["disabled","onClick"])])),_:1})])),_:1})])),_:1}),c.createVNode(s,{span:e.multiGridCol},{default:c.withCtx((()=>[c.createVNode(g,{padding:0,bordered:!1},{title:c.withCtx((()=>[c.createElementVNode("span",{textContent:c.toDisplayString(e.myConfig.multiGridTitle)},null,8,bt)])),default:c.withCtx((()=>[c.createVNode(f,{ref:"multiSelectTable","row-class-name":e.myConfig.rowClassName,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.multiTableColumns,data:e.tempMultiSelectData,"highlight-row":e.myConfig.highLightRow,onOnSelectionChange:e.OnMultiSelectionChange},c.createSlots({_:2},[c.renderList(e.multiSoltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatMulValue(n,t),contentAlign:t.contentAlign},null,8,["label","contentAlign"])]))})))]),1032,["row-class-name","size","stripe","border","height","max-height","show-header","columns","data","highlight-row","onOnSelectionChange"])])),_:1})])),_:1},8,["span"])])),_:1}),c.createElementVNode("div",wt,[e.$slots.footer?(c.openBlock(),c.createElementBlock("div",xt,[c.renderSlot(e.$slots,"footer")])):c.createCommentVNode("",!0),e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Bt,[c.createVNode(g,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"start",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(p,{modelValue:e.culPage,"onUpdate:modelValue":t[2]||(t[2]=t=>e.culPage=t),total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["modelValue","total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)],512)],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(f,{ref:"table","row-class-name":e.myConfig.rowClassName,loading:e.loading,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.tableColumns,data:e.tempData,onOnSortChange:e.sortChagne,onOnCurrentChange:e.onCurrentChange,"highlight-row":e.myConfig.highLightRow,onOnRowDblclick:e.dbclick,onOnSelect:e.onSelect,onOnSelectCancel:e.onSelectCancel,onOnSelectionChange:e.OnSelectionChange,onOnRowClick:e.click,onOnColumnWidthResize:e.onColumnWidthResize},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatValue(n,t),contentAlign:t.contentAlign,rowIndex:n},null,8,["label","contentAlign","rowIndex"])]))})))]),1032,["row-class-name","loading","show-summary","summary-method","size","stripe","border","height","max-height","show-header","columns","data","onOnSortChange","onOnCurrentChange","highlight-row","onOnRowDblclick","onOnSelect","onOnSelectCancel","onOnSelectionChange","onOnRowClick","onOnColumnWidthResize"]),e.$slots.footer?(c.openBlock(),c.createElementBlock("div",mt,[c.renderSlot(e.$slots,"footer")])):c.createCommentVNode("",!0),c.createElementVNode("div",yt,[e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",vt,[c.createVNode(g,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(p,{modelValue:e.culPage,"onUpdate:modelValue":t[1]||(t[1]=t=>e.culPage=t),total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["modelValue","total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})])):c.createCommentVNode("",!0)],512)],64))])}]]);const _t={name:"editgridbase",extends:At,data:()=>({myConfig:{resources:"",method:"",response:"",searchParam:null,readOnly:!1,showIndex:!0,showCheckBox:!0,multiSelect:!0,addRowBefore:"",name:"",editItemMaxNum:8,lineNum:4,labelWidth:100,showAddBtn:!0,showDelBatchBtn:!0,showZoom:!1,delBatchBtnName:"删除",addBtnName:"新增",editBtnName:"编辑",cancelBtnName:"放弃",showPage:!1},showAddBtn:!0,showDelBatchBtn:!0,showDelBtn:!0,showZoom:!1,delBatchBtnName:"删除",addBtnName:"新增",showEditRowForm:!1,defaultRow:{},editItemNum:0,rowAction:[{iconcls:"row",name:"editRowForm",text:"编辑"}],openChange:!1}),methods:{customInit(){this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.forEach((e=>{!1!==e.visible&&this.editItemNum++})),this.editItemNum>Number(this.myConfig.editItemMaxNum)?(this.showRowAction=!0,this.myToolConfig.items=this.$Method.copy(this.rowAction),this.editRowFlag=!1):(this.toolConfig.items=[],this.showRowAction=!1,this.editRowFlag=!0),this.showDelRow&&(this.myToolConfig.items||(this.myToolConfig.items=[]),this.myToolConfig.items=this.myToolConfig.items.concat(this.delRowAction)),void 0!==this.myConfig.showAddBtn&&(this.showAddBtn=this.myConfig.showAddBtn),void 0!==this.myConfig.showAddBtn&&(this.showAddBtn=this.myConfig.showAddBtn),void 0!==this.myConfig.addBtnName&&(this.addBtnName=this.myConfig.addBtnName),void 0!==this.myConfig.showDelBatchBtn&&(this.showDelBatchBtn=this.myConfig.showDelBatchBtn),void 0!==this.myConfig.showZoom&&(this.showZoom=this.myConfig.showZoom),this.myConfig.showPage&&(this.myConfig.indexMethod=this.customIndexMethod,this.myConfig.pageSizeNum?this.myConfig.pageConfig.page_size=Number(this.myConfig.pageSizeNum):this.myConfig.pageConfig.page_size=20),this.customInit2&&this.customInit2(),this.myConfig.getGridObject=this.getGridObject},getGridObject(){return this},conditionAction(e){let t=[];switch(e.action){case"condition_search":e.para&&(this.conditionSearchParam=this.$Method.copy(e.para)),this.refurbish();break;case"condition_clear":this.conditionSearchParam={};break;case"condition_ok":this.myConfig.multiSelect?t=this.getSelection():this.singleData.currentRow&&t.push(this.singleData.currentRow),0===t.length?this.alert("请选择"):(e.action="viewgrid_ok",e.rows=t,this.$emit("viewGridAction",e));break;case"condition_cancel":e.action="viewgrid_cancel",this.$emit("viewGridAction",e)}},addRow(e){if(this.checkIsEdit&&!this.checkIsEdit())return;this.myConfig.readOnly&&this.setReadOnly(!1);let t=null;if(this.myConfig.addRowBefore){let e={};if(e.name=this.myConfig.name,e.grid=this.$refs.table,t=this.myConfig.addRowBefore(e),!1===t)return}t&&!0!==t||(t={}),e&&(t=Object.assign({},t,e)),this.initScrollLeft(),this.cancelCellEditing(),this.$nextTick((()=>{t.flag="I";let e=Object.assign({},this.newRow,t);this.data.push(e);let n={name:"editGrid"};n.gridname=this.myConfig.name,this.$emit("doAction",n)}))},setPro(e){e&&(this.myConfig=Object.assign({},this.myConfig,e))},setReadOnly(e){let t={};t.readOnly=e,!1!==this.config.showCheckBox&&(t.readOnly?t.showCheckBox=!1:t.showCheckBox=!0),this.cancelCellEditing(),this.setPro(t)},delBatchRow(){this.delCommonRow(null)},delRow(e){this.delCommonRow(e)},delCommonRow(e){let t=null,n=this;if(this.myConfig.delRowBefore){let n={};if(n.name=this.myConfig.name,n.grid=this.$refs.table,n.index=e,t=this.myConfig.delRowBefore(n),!1===t)return}if(this.cancelCellEditing(),e||0===e)this.remove(e);else{let e=this.getSelection();const t=e.length;for(let n=0;n<t;n++)this.remove(e[n]._customIndex,!0)}if(this.myConfig.delRowAfter){let e={};e.name=this.myConfig.name,e.grid=n,this.$nextTick((()=>{this.myConfig.delRowAfter(e)}))}},updataRow(e,t){let n=this.getData();if(this.myConfig.showPage){let o=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,i=o+this.myConfig.pageConfig.page_size,r=n[e],a=!0;if(e>=o&&e<i&&(a=!1),void 0===r.flag&&(t.flag="U"),t=Object.assign({},r,t),a)if("I"===r.flag){let n=this.getAddIndex(e);n>-1&&this.data.splice(this.getAddCurlIndex(n),1,t)}else this.initData.splice(e,1,t);else{let n=e-o;this.data.splice(n,1,t)}}else void 0===n[e].flag&&(t.flag="U"),t=Object.assign({},n[e],t),this.data.splice(e,1,t);this.showEditRowForm&&this.$refs.rowForm&&e===this.$refs.rowForm.getEditIndex()&&this.$refs.rowForm.setData(t)},updateRow(e,t){this.updataRow(e,t)},initRowForm(e){"D"!==e.rowinfo.row.flag&&(this.showEditRowForm=!0,this.$refs.rowForm.setEditIndex(e.rowinfo.index),this.$refs.rowForm.setData(e.rowinfo.row))},OnSelectionChange(e){this.myConfig.onSelectionChange&&this.myConfig.onSelectionChange(e);let t=this.$Method.copy(this.data),n=!1;t.forEach(((t,o)=>{n=!1,e.forEach((e=>{if(o===e._customIndex)return n=!0,!0})),t._checked=n})),this.data=t},customInitOperColumn(e,t){if(!0!==this.myConfig.readOnly)if(!1===this.showDelRow){let n=this.myToolConfig.items.findIndex((e=>"delRow"===e.name));n>-1&&this.myToolConfig.items.splice(n,1),this.myToolConfig.items.length>0&&t.push(e)}else t.push(e)},editRow(){let e=this.$refs.rowForm.getData();this.$refs.rowForm.cancelCellEditing(),this.updateRow(this.$refs.rowForm.getEditIndex(),e)},getChangeData(){let e=[],t=this.getData();return t.length>0&&t.forEach((t=>{void 0!==t.flag&&e.push(t)})),this.myConfig.showPage?e:this.delData.concat(e)},isChange(){return this.getChangeData().length>0},setShowAddBtn(e){this.showAddBtn=e},setShowDelBatchBtn(e){this.showDelBatchBtn=e},setCustomColumn(e){e.slot=e.key},addRowInfo(e,t){let n=this.editIndex;e.rowinfo={},e.rowinfo.column=t,-1===n&&(n=this.oldEditIndex),e.rowinfo.index=n,n>-1&&(e.rowinfo.row=this.$Method.copy(this.data[n]));e.rowinfo.gridObject=this},valueChanged(e){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),t.valueChanged(e)},onLinkTo(e){if(this.myConfig.readOnly){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),e.rowinfo.index=e.rowIndex,e.rowIndex>-1&&(e.rowinfo.row=this.$Method.copy(this.data[e.rowIndex])),t.onLinkTo(e)}},searchBefore(e){const t=this.findColumnConfig(e.myConfig.name,this.myConfig.items);return this.addRowInfo(e,t),t.searchBefore(e)},setDataBefore(e,t){const n=this.findColumnConfig(t.myConfig.name,this.myConfig.items);let o={};return o.data=e,o.tabname=this.myConfig.name,this.addRowInfo(o,n),n.setDataBefore(o,t)},cancelCellEditing(){let e="cell_"+this.editIndex+"_"+this.editKey;this.$refs[e]&&this.$refs[e].setFocus&&this.$refs[e].setFocus(!1);let t=this;this.$nextTick((()=>{t.editKey="",t.oldEditIndex=this.editIndex,t.editIndex=-1}))},IsCellError(e,t){let n="",o=this.$Method.copy(this.data[e]);if("D"===o.flag)n="efutre-del-row";else if(!0===t.required&&!o[t.name]&&0!==o[t.name]){let i=e;this.myConfig.showPage?"I"===o.flag?(i=this.getAddIndex(e,!0),this.checkAddInfo.length>i&&this.checkAddInfo[i][t.key]&&(n="efuture-grid-cell-error")):(i+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,this.checkInfo.length>i&&this.checkInfo[i][t.key]&&(n="efuture-grid-cell-error")):this.checkInfo.length>i&&this.checkInfo[i][t.key]&&(n="efuture-grid-cell-error")}return n||(n="efuture-grid-cell"),n},EditCell(e,t){if(this.myConfig.readOnly)return void this.cancelCellEditing();if(t.readOnly)return void this.cancelCellEditing();let n=this.getCurRow(e);if(!(this.myConfig.showPage&&"D"===n.flag||this.editIndex===e&&this.editKey===t.key))if(this.myConfig.cellbeginedit){let o={};if(o.index=e,o.column=t,o.tabname=this.myConfig.name,o.row=n,!this.myConfig.cellbeginedit(o))return void this.cancelCellEditing();this.editIndex=e,this.editKey=t.key,this.setcheckInfo(e,t.key)}else this.editIndex=e,this.editKey=t.key,this.setcheckInfo(e,t.key)},setcheckInfo(e,t){let n=e,o=this.getCurRow(e);this.myConfig.showPage?(n+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,"I"===o.flag?this.setCheckCommonInfo(this.checkAddInfo,this.getAddIndex(e,!0),t):this.setCheckCommonInfo(this.checkInfo,n,t)):this.setCheckCommonInfo(this.checkInfo,n,t)},setCheckCommonInfo(e,t,n){if(e.length>t)this.checkInfo[t][n]=!0;else{let n=e.length;for(let o=0;o<t-n+1;o++)e.push({})}e[t][n]=!0},formatValue(e,t){let n="",o=this.$Method.copy(this.data[e]);t.name&&(n=o[t.name]);let i=t;if(t.updateCellConfig){let n={};n.index=e,n.column=t,n.row=this.$Method.copy(this.data[e]),i=t.updateCellConfig(n)}let r=this.$Method.formatValue(n,o,i),a={};return a.value=n,a.row=o,a.config=i,a.valueFormat=r,t.formatValue?t.formatValue(a):this.myConfig.formatValue?this.myConfig.formatValue(a):r},getCellConfig(e,t){const n=this.findColumnConfig(t.name,this.myConfig.items);if(n.updateCellConfig){let o={};o.index=e,o.column=t,o.row=this.$Method.copy(this.data[e]);let i=n.updateCellConfig(o);return i.onOpenChange=this.onOpenChange,i.place="grid",i}return t.onOpenChange=this.onOpenChange,t.place="grid",t},onOpenChange(e){this.openChange=e},getCurRow(e){return this.$Method.copy(this.data[e])},handleOut(){this.editKey&&(this.openChange||this.cancelCellEditing())},checkValidate(){this.cancelCellEditing();let e=!1,t=this.getData();if(t.length>0){let n=[];this.soltTableColumns.some((e=>{(e.name||e.sname)&&!1!==e.visible&&!0===e.required&&(e.name&&n.push(e.name),e.sname&&n.push(e.sname),e.ename&&n.push(e.ename))}));let o=-1;t.forEach(((t,i)=>{"I"===t.flag&&o++,"D"!==t.flag&&n.forEach((n=>{t[n]||0===t[n]||(e||(e=!0),this.myConfig.showPage&&"I"===t.flag?this.setCheckCommonInfo(this.checkAddInfo,o,n):this.setCheckCommonInfo(this.checkInfo,i,n))}))}))}return e},setShowBtn(e){this.showBtn=e},doAction(e){this[e.name]&&this[e.name](e)},enterKeyDown(){let e=this.findNextItems(this.editIndex,this.editKey);e&&(this.editIndex=e.editIndex,this.editKey=e.editKey,this.setcheckInfo(e.editIndex,e.editKey))},findNextItems(e,t){let n=this.soltTableColumns.findIndex((e=>e.name===t||e.sname===t)),o=n+1;if(!(n>-1))return null;if(o>=this.soltTableColumns.length)if(e+1>=this.data.length)e=this.findNextRow(0),o=0,"selection"!==this.soltTableColumns[0].type&&"index"!==this.soltTableColumns[0].type||o++,"index"===this.soltTableColumns[1].type&&o++;else{let t=e+1;e=this.findNextRow(t),o=0,"selection"!==this.soltTableColumns[0].type&&"index"!==this.soltTableColumns[0].type||o++,"index"===this.soltTableColumns[1].type&&o++}let i=this.soltTableColumns[o],r=this.getCellConfig(e,i),a=r.name;if(r.sname&&(a=r.sname),!0===r.readOnly||!1===r.visible||"PictureBox"===r.type||"VideoBox"===r.type||"RichTextBox"===r.type||"wRichTextBox"===r.type||"selection"===r.type||"index"===r.type)return this.findNextItems(e,a);if(this.myConfig.cellbeginedit){let t={};if(t.index=e,t.column=r,t.tabname=this.myConfig.name,t.row=this.$Method.copy(this.data[e]),this.myConfig.cellbeginedit(t)){let t={};return t.editIndex=e,t.editKey=a,t}return this.findNextItems(e,a)}{let t={};return t.editIndex=e,t.editKey=a,t}},customIndexMethod:(e,t)=>"I"===e.flag?"+":t,findNextRow(e){let t=e;return this.myConfig.showPage&&this.data.some(((n,o)=>{if(o>=e&&"D"!==n.flag)return t=o,!0})),t},rowClassName:e=>"D"===e.flag?"efutre-del-row":"",getCellClass(e){let t=this.getCurRow(e);return t&&"D"===t.flag?"efutre-del-row":""},changePageSize(e){this.saveCurlData(this.myConfig.pageConfig.page_no,this.initData),this.myConfig.pageConfig.page_no=1,this.data=this.fillData(this.myConfig.pageConfig.page_no,e),this.myConfig.pageConfig.page_size=e,this.cancelCellEditing()},changePage(e){this.saveCurlData(this.myConfig.pageConfig.page_no,this.initData),this.data=this.fillData(e,this.myConfig.pageConfig.page_size),this.myConfig.pageConfig.page_no=e,this.cancelCellEditing()},customClearData(){this.initScrollLeft()},saveCurlData(e,t){let n=[];this.data.forEach(((o,i)=>{let r=(e-1)*this.myConfig.pageConfig.page_size+i;"U"===o.flag||"D"===o.flag?t.splice(r,1,o):"I"===o.flag&&n.push(o)})),this.addData=n},setData(e){e||(e=[]),this.myConfig.showPage?(this.initData=this.$Method.copy(e),this.myConfig.pageConfig.page_no=1,this.myConfig.pageConfig.total_results=e.length,this.data=this.fillData(this.myConfig.pageConfig.page_no,this.myConfig.pageConfig.page_size)):(this.data=e,this.initData=this.$Method.copy(this.data)),this.addData=[],this.delData=[],this.checkInfo=[],this.initScrollLeft(),this.cancelCellEditing()},fillData(e,t){let n=[],o=(e-1)*t,i=o+t;i>this.myConfig.pageConfig.total_results&&(i=this.myConfig.pageConfig.total_results);for(var r=o,a=i;r<a;r++){var s=this.initData[r];s&&n.push(s)}return this.addData.forEach((e=>{n.push(e)})),n},getData(){if(this.myConfig.showPage){let e=this.$Method.copy(this.initData);return this.saveCurlData(this.myConfig.pageConfig.page_no,e),this.addData.forEach((t=>{e.push(t)})),e}return this.$Method.copy(this.data)},remove(e,t){let n=e;if(t){let t=this.data.findIndex((t=>t._customIndex===e));t>-1&&(n=t)}let o=this.getData();if(n>-1)if(void 0===o[n].flag||"U"===o[n].flag){let t=this.$Method.copy(o[n]);if(t.flag="D",this.myConfig.showPage){let o=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,i=o+this.myConfig.pageConfig.page_size,r=n;e>=o&&e<i?(r=e-o,this.data.splice(r,1,t)):this.initData.splice(r,1,t)}else this.delData.push(t),this.data.splice(n,1)}else if("I"===o[n].flag)if(this.myConfig.showPage){let e=this.getAddIndex(n);e>-1&&(this.checkAddInfo.splice(e,1),this.data.splice(this.getAddCurlIndex(e),1))}else this.data.splice(n,1),this.checkInfo.splice(n,1);this.initScrollLeft()},getAddIndex(e,t){let n=-1,o=[];return o=t?this.data:this.getData(),o.some(((t,o)=>{if("I"===t.flag&&n++,o===e)return!0})),n},getAddCurlIndex(e){let t=-1,n=-1;return this.data.some(((o,i)=>{if("I"===o.flag&&t++,t===e)return n=i,!0})),n},setSummary(e,t,n){if(e.children)e.children.forEach((e=>{this.setSummary(e,t.sums)}));else{const o=e.key;if(e.summary){const i=t.map((e=>Number(e[o])));if(i.every((e=>isNaN(e))))n[o]={key:o,value:"N/A"};else{const t=i.reduce(((e,t)=>{const n=Number(t);return isNaN(n)?e:e+t}),0);n[o]={key:o,value:this.$Method.formatNumber(t,e.format,e.notzero),countValue:t}}}else n[o]={key:o,value:""}}},handleSummary({columns:e,data:t}){const n={};e.forEach((e=>{this.setSummary(e,t,n)}));let o=this.findFirst(e);return n[o]={key:o,value:this.myConfig.sumText},this.myConfig.customSummary?this.myConfig.customSummary(n):n},findFirst(e){let t="";return e.some((e=>{if("selection"!==e.key&&"index"!==e.key)return t=e.name,!0})),t}}},kt=["id"],St={key:0},Dt=["onClick"],Ot={key:0,ref:"page",style:{background:"#eee","padding-top":"5px",width:"100%"}};var Ft=Xe({name:"editgrid",extends:_t,mounted(){this.$refs.card&&this.$refs.card.$el&&(this.$refs.card.$el.onmouseleave=()=>{})}},[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Button"),s=c.resolveComponent("Col"),l=c.resolveComponent("Row"),u=c.resolveComponent("ControlBox"),d=c.resolveComponent("ShowText"),h=c.resolveComponent("Table"),A=c.resolveComponent("Page"),f=c.resolveComponent("Card"),p=c.resolveComponent("ExpandRow"),g=c.resolveComponent("Modal");return c.openBlock(),c.createElementBlock("div",{ref:"card",id:e.config.name,style:{padding:"5px"}},[e.$slots.header?(c.openBlock(),c.createElementBlock("div",St,[c.renderSlot(e.$slots,"header")])):c.withDirectives((c.openBlock(),c.createBlock(l,{key:1,type:"flex",justify:"start",gutter:4},{default:c.withCtx((()=>[c.withDirectives(c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(a,{icon:"ios-add",size:"small",onClick:e.addRow},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.addBtnName),1)])),_:1},8,["onClick"])])),_:1},512),[[c.vShow,e.showAddBtn]]),c.withDirectives(c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(a,{icon:"ios-remove",size:"small",onClick:e.delBatchRow},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.delBatchBtnName),1)])),_:1},8,["onClick"])])),_:1},512),[[c.vShow,e.showDelBatchBtn]])])),_:1},512)),[[c.vShow,!e.myConfig.readOnly]]),c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(h,{ref:"table",style:{"margin-top":"5px"},"row-class-name":e.rowClassName,loading:e.loading,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,maxHeight:e.tableMaxHeight,"show-header":e.myConfig.showHeader,onOnSelectionChange:e.OnSelectionChange,columns:e.tableColumns,data:e.data,onOnColumnWidthResize:e.onColumnWidthResize,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createElementVNode("div",{onClick:o=>e.EditCell(n,t)},[e.editIndex===n&&e.editKey===t.key?(c.openBlock(),c.createBlock(u,{key:0,autofocus:!0,config:e.getCellConfig(n,t),valueData:e.getCurRow(n),onInputValue:e.input,editIndex:n,onDoAction:e.doAction},null,8,["config","valueData","onInputValue","editIndex","onDoAction"])):(c.openBlock(),c.createBlock(d,{key:1,label:e.formatValue(n,t),contentAlign:t.contentAlign,class:c.normalizeClass(e.IsCellError(n,t))},null,8,["label","contentAlign","class"]))],8,Dt)]))})))]),1032,["row-class-name","loading","size","stripe","border","height","maxHeight","show-header","onOnSelectionChange","columns","data","onOnColumnWidthResize","show-summary","summary-method"]),e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Ot,[c.createVNode(f,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(l,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(A,{total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)])),_:1}),e.editRowFlag?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(g,{key:2,modelValue:e.showEditRowForm,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showEditRowForm=t),width:"90%",title:"编辑",onOnOk:e.editRow},{default:c.withCtx((()=>[c.createElementVNode("div",null,[c.createVNode(p,{ref:"rowForm",config:e.myConfig,dictData:e.dictData},null,8,["config","dictData"])])])),_:1},8,["modelValue","onOnOk"]))],8,kt)}]]);const Tt=["textContent"],It={key:1},Nt={key:4,style:{"margin-left":"10px"}},Rt=["onClick"],Pt={key:0,ref:"page",style:{background:"#eee","padding-top":"5px",width:"100%"}};var Mt=Xe({name:"editgridcard",extends:_t,data:()=>({myConfig:{addBtnType:"2",hide:!0,titleType:1,bordered:!0,disHover:!1,operFixedFlag:!1},btnReadOnly:!1,showBtn:!0,cardPadding:0,cardStyle:"",showGrid:!0,showTitle:!0,editFlag:!1,pStyle:"",iconStyle:"",showDelRow:!0,rowAction:[],delRowAction:[{iconcls:"row",icon:"ios-trash",name:"delRow",text:"删除",size:"20",type:"text"}]}),computed:{titleClass(){return`efuture-title-font-${this.myConfig.titleType}`},headClass(){return this.showGrid?`efuture-card-head-title-${this.myConfig.titleType}`:`efuture-card-head-title-${this.myConfig.titleType} efuture-card-head-title-nobottom`},extraClass(){return`efuture-card-extra-title-${this.myConfig.titleType}`}},methods:{customInit2(){this.myConfig.hide&&(this.pStyle="cursor:pointer",this.iconStyle="transform: rotate(90deg)"),1!==this.myConfig.titleType?(void 0===this.config.hide&&(this.myConfig.hide=!1),void 0===this.config.bordered&&(this.myConfig.bordered=!1),void 0===this.config.disHover&&(this.myConfig.disHover=!0)):(void 0===this.config.hide&&(this.myConfig.hide=!0),void 0===this.config.bordered&&(this.myConfig.bordered=!0),void 0===this.config.disHover&&(this.myConfig.disHover=!1)),void 0!==this.myConfig.showTitle&&(this.showTitle=this.myConfig.showTitle),void 0!==this.myConfig.showBtn&&(this.showBtn=this.myConfig.showBtn),void 0!==this.myConfig.showAddBtn&&(this.showBtn=this.myConfig.showAddBtn),this.myToolConfig.icon=!0,this.setTitleStyle()},toggle(){this.myConfig.hide&&(this.showGrid=!this.showGrid,this.setTitleStyle())},setShowGrid(e){this.showGrid=e,this.setTitleStyle()},setTitleStyle(){this.showGrid?(this.iconStyle="transform: rotate(90deg)",this.cardPadding=5*Number(this.myConfig.titleType),this.cardStyle="padding-left:"+this.cardPadding+"px;padding-right:"+this.cardPadding+"px;padding-bottom: 10px;"):(this.iconStyle="",this.cardPadding=0,this.cardStyle="")},editGrid(){if(this.checkIsEdit()){this.setReadOnly(!1);let e={name:"editGrid"};e.gridname=this.myConfig.name,this.$emit("doAction",e)}},cancelGrid(){this.setData(this.initData),this.setReadOnly(!0);let e={name:"cancelGrid"};e.gridname=this.myConfig.name,this.$emit("doAction",e)},checkIsEdit(){let e=!0;return this.myConfig.editObjectBefore&&(e=this.myConfig.editObjectBefore(this.myConfig.name)),e},setBtnType(e){let t={};t.addBtnType=e,this.setPro(t)},setBtnReadOnly(e){this.btnReadOnly=e}},mounted(){this.$refs.card&&this.$refs.card.$el&&(this.$refs.card.$el.onmouseleave=()=>{this.handleOut()})}},[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Icon"),s=c.resolveComponent("ControlBox"),l=c.resolveComponent("ShowText"),u=c.resolveComponent("Table"),d=c.resolveComponent("Page"),h=c.resolveComponent("Row"),A=c.resolveComponent("Card"),f=c.resolveComponent("Button");return c.openBlock(),c.createBlock(A,{ref:"card",padding:0,bordered:i.myConfig.bordered,"dis-hover":i.myConfig.disHover,headClass:r.headClass,extraClass:r.extraClass},c.createSlots({extra:c.withCtx((()=>[i.showBtn&&i.myConfig.readOnly&&"3"===i.myConfig.addBtnType&&!i.btnReadOnly?(c.openBlock(),c.createElementBlock("a",{key:0,href:"#",onClick:t[1]||(t[1]=c.withModifiers(((...e)=>r.editGrid&&r.editGrid(...e)),["prevent"]))},c.toDisplayString(i.myConfig.editBtnName),1)):c.createCommentVNode("",!0),i.showBtn&&i.myConfig.readOnly&&"3"===i.myConfig.addBtnType&&i.btnReadOnly?(c.openBlock(),c.createElementBlock("span",It,c.toDisplayString(i.myConfig.editBtnName),1)):c.createCommentVNode("",!0),i.showBtn&&!i.myConfig.readOnly&&"3"===i.myConfig.addBtnType?(c.openBlock(),c.createElementBlock("a",{key:2,href:"#",onClick:t[2]||(t[2]=c.withModifiers(((...e)=>r.cancelGrid&&r.cancelGrid(...e)),["prevent"]))},c.toDisplayString(i.myConfig.cancelBtnName),1)):c.createCommentVNode("",!0),i.showBtn&&"3"===i.myConfig.addBtnType&&!i.btnReadOnly?(c.openBlock(),c.createElementBlock("a",{key:3,style:{"margin-left":"10px"},href:"#",onClick:t[3]||(t[3]=c.withModifiers(((...t)=>e.addRow&&e.addRow(...t)),["prevent"]))},c.toDisplayString(i.myConfig.addBtnName),1)):c.createCommentVNode("",!0),i.showBtn&&"3"===i.myConfig.addBtnType&&i.btnReadOnly?(c.openBlock(),c.createElementBlock("span",Nt,c.toDisplayString(i.myConfig.addBtnName),1)):c.createCommentVNode("",!0),i.showBtn&&!i.myConfig.readOnly&&"1"===i.myConfig.addBtnType?(c.openBlock(),c.createElementBlock("a",{key:5,href:"#",onClick:t[4]||(t[4]=c.withModifiers(((...t)=>e.addRow&&e.addRow(...t)),["prevent"]))},c.toDisplayString(i.myConfig.addBtnName),1)):c.createCommentVNode("",!0)])),default:c.withCtx((()=>[c.withDirectives(c.createElementVNode("div",{style:c.normalizeStyle(i.cardStyle)},[c.createVNode(h,null,{default:c.withCtx((()=>[c.createVNode(u,{ref:"table",loading:e.loading,size:i.myConfig.tableSize,"row-class-name":e.rowClassName,stripe:i.myConfig.showStripe,border:i.myConfig.showBorder,height:e.tableHeight,maxHeight:e.tableMaxHeight,"show-header":i.myConfig.showHeader,columns:e.tableColumns,onOnSelectionChange:e.OnSelectionChange,data:e.data,onOnColumnWidthResize:e.onColumnWidthResize,"show-summary":i.myConfig.showSummary,"summary-method":e.handleSummary},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createElementVNode("div",{onClick:o=>e.EditCell(n,t),class:"ivu-table-cell"},[e.editIndex===n&&e.editKey===t.key?(c.openBlock(),c.createBlock(s,{key:0,config:e.getCellConfig(n,t),autofocus:!0,valueData:e.getCurRow(n),onInputValue:e.input,editIndex:n,onDoAction:e.doAction},null,8,["config","valueData","onInputValue","editIndex","onDoAction"])):(c.openBlock(),c.createBlock(l,{key:1,style:{display:"inline-block"},label:e.formatValue(n,t),contentAlign:t.contentAlign,class:c.normalizeClass(e.IsCellError(n,t))},null,8,["label","contentAlign","class"]))],8,Rt)]))})))]),1032,["loading","size","row-class-name","stripe","border","height","maxHeight","show-header","columns","onOnSelectionChange","data","onOnColumnWidthResize","show-summary","summary-method"]),i.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Pt,[c.createVNode(A,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(d,{total:i.myConfig.pageConfig.total_results,size:i.myConfig.pageSize,current:i.myConfig.pageConfig.page_no,"page-size":i.myConfig.pageConfig.page_size,"page-size-opts":i.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":i.myConfig.pageShowTotal,"show-elevator":i.myConfig.pageShowElevator,"show-sizer":i.myConfig.pageShowSizer},null,8,["total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)])),_:1}),i.showBtn&&!i.myConfig.readOnly&&"2"===i.myConfig.addBtnType?(c.openBlock(),c.createBlock(h,{key:0,type:"flex",justify:"center",style:{"margin-top":"10px","margin-bottom":"10px"}},{default:c.withCtx((()=>[c.createVNode(f,{type:"default",style:{"background-color":"#f8f8f9"},onClick:e.addRow,long:""},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(i.myConfig.addBtnName),1)])),_:1},8,["onClick"])])),_:1})):c.createCommentVNode("",!0)],4),[[c.vShow,i.showGrid]])])),_:2},[i.showTitle?{name:"title",fn:c.withCtx((()=>[c.createElementVNode("p",{style:c.normalizeStyle(i.pStyle),onClick:t[0]||(t[0]=(...e)=>r.toggle&&r.toggle(...e))},[c.createElementVNode("span",{class:c.normalizeClass(r.titleClass),textContent:c.toDisplayString(i.myConfig.title)},null,10,Tt),i.myConfig.hide?(c.openBlock(),c.createBlock(a,{key:0,class:"efuture-title-icon",style:c.normalizeStyle(i.iconStyle),type:"ios-arrow-forward"},null,8,["style"])):c.createCommentVNode("",!0)],4)])),key:"0"}:void 0]),1032,["bordered","dis-hover","headClass","extraClass"])}]]);const Vt={name:"textbox",extends:it,components:{},data:()=>({myConfig:{maxLength:null,vtype:"text",defaultValue:"",rows:3,clearable:!1,appendWidth:80,search:!1,allowInput:!0,showAppend:!1,notSpecial:!1},passwordFlag:!1}),methods:{keyUp(e){this.myConfig.notSpecial&&(e.target.value=e.target.value.replace(/[`~!@$%^&*()_\-+=<>?:"{}|,\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g,""))},customInit(){"password"===this.myConfig.vtype?(this.passwordFlag=!0,void 0!==this.myConfig.passwordFlag&&(this.passwordFlag=this.myConfig.passwordFlag)):this.passwordFlag=!1},_enterSetFatherValue(){"textarea"!==this.myConfig.vtype&&(this.isEnter=!0),this.setFatherValue()},search(){if(this.myConfig.onSearch&&!0!==this.myConfig.readOnly){let e=this,t={};t.control=e,t.name=this.myConfig.name,this.myConfig.onSearch(t)}},appendClick(){this.myConfig.onAppend&&this.myConfig.onAppend()},setFocus(e){e?this.$refs.myControl.focus():this.$refs.myControl.blur()}}};var Ut=Xe(Vt,[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Button"),s=c.resolveComponent("Input");return c.withDirectives((c.openBlock(),c.createElementBlock("div",null,[c.createVNode(s,{ref:"myControl",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=t=>e.value=t),size:i.myConfig.size,type:i.myConfig.vtype,password:i.passwordFlag,rows:i.myConfig.rows,placeholder:i.myConfig.placeholder,maxlength:i.myConfig.maxLength,disabled:i.myConfig.readOnly,clearable:i.myConfig.clearable,readonly:!i.myConfig.allowInput,onKeydown:c.withKeys(c.withModifiers(r._enterSetFatherValue,["stop"]),["enter"]),onKeyup:r.keyUp,onOnBlur:e.setFatherValue,search:i.myConfig.search,onOnSearch:r.search},c.createSlots({_:2},[i.myConfig.showAppend?{name:"append",fn:c.withCtx((()=>[c.createVNode(a,{size:i.myConfig.size,type:"primary",disabled:i.myConfig.readOnly,onClick:r.appendClick},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(i.myConfig.appendText),1)])),_:1},8,["size","disabled","onClick"])])),key:"0"}:void 0]),1032,["modelValue","size","type","password","rows","placeholder","maxlength","disabled","clearable","readonly","onKeydown","onKeyup","onOnBlur","search","onOnSearch"])],512)),[[c.vShow,i.myConfig.visible]])}]]);const Lt={name:"uploadbox",data:()=>({defaultList:[],fileSize:2048,myConfig:{},uploadUrl:"",disabled:!1}),props:{config:{type:Object,default:null},headers:{type:Object,default:null},readOnly:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!0}},computed:{uploadClass(){return this.disabled?"efuture-upload-disabled":""}},created(){this.myConfig=Object.assign({},this.myConfig,this.config),void 0!==this.myConfig.fileSize&&(this.fileSize=1024*Number(this.myConfig.fileSize)),this.uploadUrl=this.myConfig.uploadfile},methods:{handleSuccess(e,t){if(e.data&&e.data.length>0)if(e.data[0].filekey)t.filekey=e.data[0].filekey;else if(e.data[0].fileKey)t.filekey=e.data[0].fileKey;else if(void 0!==e.data[0].url){let n=e.data[0].url.split("/");t.filekey=n[n.length-1]}this.$emit("success",e)},handleFormatError(e){let t=this.myConfig.fileType.join(",");this.alert("文件["+e.name+"]的格式不正确,请上传格式为("+t+")的文件")},handleMaxSize(e){let t="",n=Number(this.myConfig.fileSize);if(n>1024){t=(n/1024).toFixed(2)+"G"}else if(n<1){t=(1024*n).toFixed(2)+"K"}else t=n+"M";this.alert("文件["+e.name+"]的文件大小不允许超过"+t)},handleBeforeUpload(){if(this.myConfig.multiSelect)return!0;{const e=this.$refs.upload.fileList.length<this.myConfig.fileNum;return e||this.alert("上传的文件数量过多,请先删除部分已上传文件再上传"),e}},delFile(e){const t=this.$refs.upload.fileList.findIndex((t=>t.filekey===e));t>-1&&this.$refs.upload.fileList.splice(t,1)},onClick(){let e=!0;return this.$parent.$parent.$parent.checkPara&&(e=this.$parent.$parent.$parent.checkPara()),e&&this.config.onOpenChange&&this.config.onOpenChange(!0),e&&this.$refs.upload.$refs&&this.$refs.upload.$refs.input&&this.$refs.upload.$refs.input.click(),e},clearData(){this.$refs.upload.clearFiles()}},watch:{config:{handler(e){this.readOnly||e.readOnly?this.disabled=!0:this.disabled=!1},deep:!0,immediate:!0},readOnly(e){e||this.config.readOnly?this.disabled=!0:this.disabled=!1}}};var jt=Xe(Lt,[["render",function(e,t,n,o,i,r){const a=c.resolveComponent("Upload");return c.openBlock(),c.createBlock(a,{ref:"upload","show-upload-list":!1,"default-file-list":i.defaultList,"on-success":r.handleSuccess,format:i.myConfig.fileType,disabled:i.disabled,"max-size":i.fileSize,data:n.headers,"on-format-error":r.handleFormatError,"on-exceeded-size":r.handleMaxSize,"before-upload":r.handleBeforeUpload,multiple:n.multiSelect,type:"drag",class:c.normalizeClass(r.uploadClass),action:i.uploadUrl},{default:c.withCtx((()=>[c.renderSlot(e.$slots,"btn")])),_:3},8,["default-file-list","on-success","format","disabled","max-size","data","on-format-error","on-exceeded-size","before-upload","multiple","class","action"])}]]),$t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Qt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ht,zt={exports:{}};
|
|
7
7
|
/*!
|
|
8
8
|
* Quill Editor v1.3.7
|
|
9
9
|
* https://quilljs.com/
|
package/package.json
CHANGED
|
@@ -557,6 +557,8 @@ export default {
|
|
|
557
557
|
column.place = 'grid';
|
|
558
558
|
if (column.sortable === true) {
|
|
559
559
|
column.sortable = 'custom';
|
|
560
|
+
} else if (column.sortable === 'default') {
|
|
561
|
+
column.sortable = true;
|
|
560
562
|
}
|
|
561
563
|
if (type === 'numberbox') {
|
|
562
564
|
if (!column.contentAlign) {
|