ocpview-plus 1.0.18 → 1.0.19

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.
@@ -9124,9 +9124,6 @@ const _sfc_main$1F = {
9124
9124
  return this.soltTableColumns.map((c10) => c10.key);
9125
9125
  }
9126
9126
  },
9127
- beforeUnmount() {
9128
- document.removeEventListener("keydown", this.handleKeydown);
9129
- },
9130
9127
  methods: {
9131
9128
  customInit() {
9132
9129
  if (this.myConfig.items && this.myConfig.items.length > 0) {
@@ -9178,9 +9175,6 @@ const _sfc_main$1F = {
9178
9175
  this.customInit2();
9179
9176
  }
9180
9177
  this.myConfig.getGridObject = this.getGridObject;
9181
- document.addEventListener("keydown", (e10) => {
9182
- this.handleKeydown(e10);
9183
- });
9184
9178
  },
9185
9179
  getGridObject() {
9186
9180
  let that = this;
@@ -9527,7 +9521,6 @@ const _sfc_main$1F = {
9527
9521
  return error;
9528
9522
  },
9529
9523
  EditCell(index, config2) {
9530
- this.setEditGridFocus(index, config2.key);
9531
9524
  if (this.myConfig.readOnly) {
9532
9525
  this.cancelCellEditing();
9533
9526
  return;
@@ -9794,7 +9787,6 @@ const _sfc_main$1F = {
9794
9787
  this.editIndex = nextKey.editIndex;
9795
9788
  this.editKey = nextKey.editKey;
9796
9789
  this.setcheckInfo(nextKey.editIndex, nextKey.editKey);
9797
- this.setEditGridFocus(this.editIndex, this.editKey);
9798
9790
  }
9799
9791
  },
9800
9792
  findNextItems(editIndex, editName) {
@@ -3,7 +3,7 @@
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":"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("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,focusIndex:null,focusKey:null}),computed:{colKeys(){return this.soltTableColumns.map((e=>e.key))}},beforeUnmount(){document.removeEventListener("keydown",this.handleKeydown)},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,document.addEventListener("keydown",(e=>{this.handleKeydown(e)}))},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.setEditGridFocus(e,t.key),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)},setEditGridFocus(e,t){this.focusIndex=e,this.focusKey=t,this.editIndex=e,this.editKey=t,this.focusCell(e,t)},focusCell(e,t){this.$nextTick((()=>{const n=this.$refs.table.$el,o=`div[cell-row="${e}"][cell-col="${t}"]`;let i=n.querySelector(o);if(i){const e=n.querySelectorAll(".ivu-table-column-selected");0!=e.length&&e.forEach((e=>{e.classList.remove("ivu-table-column-selected")}));const t=i.closest("td");t&&(t.classList.add("ivu-table-column-selected"),t.scrollIntoView({behavior:"smooth",block:"nearest"}))}}))},handleKeydown(e){if(null===this.focusIndex||null===this.focusKey)return;const t=this.colKeys.findIndex((e=>e==this.focusKey));this.focusKey=this.colKeys[t];let n=this.focusIndex,o=t,i="cell_"+this.editIndex+"_"+this.editKey;const{key:r}=e;if("ArrowUp"==r&&(this.focusIndex>0&&n--,this.extEditStatus()),"ArrowDown"==r&&(this.focusIndex<this.data.length-1&&n++,this.extEditStatus()),"ArrowLeft"==r&&(t>1&&o--,this.extEditStatus()),"ArrowRight"==r&&(t<this.colKeys.length-1&&o++,this.extEditStatus()),"Enter"==r&&t<this.colKeys.length-1&&o++,this.setEditGridFocus(n,this.colKeys[o]),this.myConfig.readOnly)this.handleOut();else if(this.$refs[i]&&this.$refs[i].autofocus)return!0;e.preventDefault()},extEditStatus(){if(!this.myConfig.readOnly){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}))}},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),this.setEditGridFocus(this.editIndex,this.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("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,focusIndex:null,focusKey:null}),computed:{colKeys(){return this.soltTableColumns.map((e=>e.key))}},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)},setEditGridFocus(e,t){this.focusIndex=e,this.focusKey=t,this.editIndex=e,this.editKey=t,this.focusCell(e,t)},focusCell(e,t){this.$nextTick((()=>{const n=this.$refs.table.$el,o=`div[cell-row="${e}"][cell-col="${t}"]`;let i=n.querySelector(o);if(i){const e=n.querySelectorAll(".ivu-table-column-selected");0!=e.length&&e.forEach((e=>{e.classList.remove("ivu-table-column-selected")}));const t=i.closest("td");t&&(t.classList.add("ivu-table-column-selected"),t.scrollIntoView({behavior:"smooth",block:"nearest"}))}}))},handleKeydown(e){if(null===this.focusIndex||null===this.focusKey)return;const t=this.colKeys.findIndex((e=>e==this.focusKey));this.focusKey=this.colKeys[t];let n=this.focusIndex,o=t,i="cell_"+this.editIndex+"_"+this.editKey;const{key:r}=e;if("ArrowUp"==r&&(this.focusIndex>0&&n--,this.extEditStatus()),"ArrowDown"==r&&(this.focusIndex<this.data.length-1&&n++,this.extEditStatus()),"ArrowLeft"==r&&(t>1&&o--,this.extEditStatus()),"ArrowRight"==r&&(t<this.colKeys.length-1&&o++,this.extEditStatus()),"Enter"==r&&t<this.colKeys.length-1&&o++,this.setEditGridFocus(n,this.colKeys[o]),this.myConfig.readOnly)this.handleOut();else if(this.$refs[i]&&this.$refs[i].autofocus)return!0;e.preventDefault()},extEditStatus(){if(!this.myConfig.readOnly){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}))}},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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ocpview-plus",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -52,9 +52,9 @@ export default {
52
52
  return this.soltTableColumns.map(c => c.key);
53
53
  }
54
54
  },
55
- beforeUnmount() {
55
+ /*beforeUnmount() {
56
56
  document.removeEventListener('keydown', this.handleKeydown);
57
- },
57
+ },*/
58
58
  methods: {
59
59
  customInit() {
60
60
  if (this.myConfig.items && this.myConfig.items.length > 0) {
@@ -110,9 +110,9 @@ export default {
110
110
  }
111
111
  this.myConfig.getGridObject = this.getGridObject;
112
112
  //监听键盘事件
113
- document.addEventListener('keydown', (e) => {
113
+ /* document.addEventListener('keydown', (e) => {
114
114
  this.handleKeydown(e);
115
- })
115
+ })*/
116
116
  },
117
117
  getGridObject() {
118
118
  let that = this;
@@ -464,7 +464,7 @@ export default {
464
464
  return error;
465
465
  },
466
466
  EditCell(index, config) {
467
- this.setEditGridFocus(index, config.key);
467
+ //this.setEditGridFocus(index, config.key);
468
468
  if (this.myConfig.readOnly) {
469
469
  this.cancelCellEditing();
470
470
  return;
@@ -737,7 +737,7 @@ export default {
737
737
  this.editIndex = nextKey.editIndex;
738
738
  this.editKey = nextKey.editKey;
739
739
  this.setcheckInfo(nextKey.editIndex, nextKey.editKey);
740
- this.setEditGridFocus(this.editIndex, this.editKey);
740
+ //this.setEditGridFocus(this.editIndex, this.editKey);
741
741
  }
742
742
  },
743
743
  findNextItems(editIndex, editName) {