!function(){functione(t){returne="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},e(t)}functiont(e){returnfunction(e){if(Array.isArray(e))returno(e)}(e)||function(e){if("undefined"!=typeofSymbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])returnArray.from(e)}(e)||r(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionn(e,t){returnfunction(e){if(Array.isArray(e))returne}(e)||function(e,t){varn=null==e?null:"undefined"!=typeofSymbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){varr,o,i,a,c=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}elsefor(;!(u=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throwo}}returnc}}(e,t)||r(e,t)||function(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionr(e,t){if(e){if("string"==typeofe)returno(e,t);varn={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void0}}functiono(e,t){(null==t||t>e.length)&&(t=e.length);for(varn=0,r=Array(t);n<t;n++)r[n]=e[n];returnr}functioni(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */vare,t,n="function"==typeofSymbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";functionc(n,r,o,i){varc=r&&r.prototypeinstanceofs?r:s,l=Object.create(c.prototype);returna(l,"_invoke",function(n,r,o){vari,a,c,s=0,l=o||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){returni=t,a=0,c=e,d.n=n,u}};functionh(n,r){for(a=n,c=r,t=0;!f&&s&&!o&&t<l.length;t++){varo,i=l[t],h=d.p,v=i[2];n>3?(o=v===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=h&&((o=n<2&&h<i[1])?(a=0,d.v=r,d.n=i[1]):h<v&&(o=n<3||i[0]>r||r>v)&&(i[4]=n,i[5]=r,d.n=v,a=0))}if(o||n>1)returnu;throwf=!0,r}returnfunction(o,l,v){if(s>1)throwTypeError("Generator is already running");for(f&&1===l&&h(l,v),a=l,c=v;(t=a<2?e:c)||!f;){i||(a?a<3?(a>1&&(d.n=-1),h(a,c)):d.n=c:d.v=c);try{if(s=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throwTypeError("iterator result is not an object");if(!t.done)returnt;c=t.value,a<2&&(a=0)}else1===a&&(t=i.return)&&t.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}elseif((t=(f=d.n<0)?c:n.call(r,d))!==u)break}catch(t){i=e,a=1,c=t}finally{s=1}}return{value:t,done:f}}}(n,o,i),!0),l}varu={};functions(){}functionl(){}functionf(){}t=Object.getPrototypeOf;vard=[][r]?t(t([][r]())):(a(t={},r,(function(){returnthis})),t),h=f.prototype=s.prototype=Object.create(d);functionv(e){returnObject.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,a(e,o,"GeneratorFunction")),e.prototype=Object.create(h),e}returnl.prototype=f,a(h,"constructor",f),a(f,"constructor",l),l.displayName="GeneratorFunction",a(f,o,"GeneratorFunction"),a(h),a(h,o,"Generator"),a(h,r,(function(){returnthis})),a(h,"toString",(function(){return"[object Generator]"})),(i=function(){return{w:c,m:v}})()}functiona(e,t,n,r){varo=Object.defineProperty;try{o({},"",{})}catch(e){o=0}a=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{functioni(t,n){a(e,t,(function(e){returnthis._invoke(t,n,e)}))}i("next",0),i("throw",1),i("return",2)}},a(e,t,n,r)}functionc(e,t,n,r,o,i,a){try{varc=e[i](a),u=c.value}catch(e){returnvoidn(e)}c.done?t(u):Promise.resolve(u).then(r,o)}functionu(e){returnfunction(){vart=this,n=arguments;returnnewPromise((function(r,o){vari=e.apply(t,n);functiona(e){c(i,r,o,a,u,"next",e)}functionu(e){c(i,r,o,a,u,"throw",e)}a(void0)}))}}functions(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functionl(e,t){for(varn=0;n<t.length;n++){varr=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,S(r.key),r)}}functionf(e,t,n){returnt&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}functiond(t,n,r){returnn=y(n),function(t,n){if(n&&("object"==e(n)||"function"==typeofn))returnn;if(void0!==n)thrownewTypeError("Derived constructors may only return object or undefined");returnfunction(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}(t)}(t,h()?Reflect.construct(n,r||[],y(t).constructor):n.apply(t,r))}functionh(){try{vare=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}functionv(e,t,n,r){varo=m(y(1&r?e.prototype:e),t,n);return2&r&&"function"==typeofo?function(e){returno.apply(n,e)}:o}functionm(){returnm="undefined"!=typeofReflect&&Reflect.get?Reflect.get.bind():function(e,t,n){varr=p(e,t);if(r){varo=Object.getOwnPropertyDescriptor(r,t);returno.get?o.get.call(arguments.length<3?e:n):o.value}},m.apply(null,arguments)}functionp(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=y(e)););returne}functiony(e){returny=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){returne.__proto__||Object.getPrototypeOf(e)},y(e)}functionb(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}functiong(e,t){returng=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){returne.__proto__=t,e},g(e,t)}functionw(e,t){varn=Object.keys(e);if(Object.getOwnPropertySymbols){varr=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}returnn}functionC(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}returne}functionk(e,t,n){return(t=S(t))ine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}functionS(t){varn=function(t,n){if("object"!=e(t)||!t)returnt;varr=t[Symbol.toPrimitive];if(void0!==r){varo=r.call(t,n||"default");if("object"!=e(o))returno;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}System.register(["@ibiz-template/runtime","vue","@ibiz-template/vue-util","ramda","@ibiz-template/controller","@ibiz-template/model","qs","@ibiz-template/core","dayjs"],(function(e,r){"use strict";varo,a,c,l,h,m,p,y,g,w,S,O,P,D,E,R,j,I,x,N,T,_,A,L,G,M,z,B,V,F,U;return{setters:[function(e){o=e.PluginStaticResource,a=e.ViewMode},function(e){c=e.defineComponent,l=e.ref,h=e.watch,m=e.computed,p=e.getCurrentInstance,y=e.h,g=e.toRef,w=e.onUnmounted},function(e){S=e.getCheckboxProps,O=e.getEditorEmits,P=e.useNamespace,D=e.useControlController,E=e.useListExpViewController,R=e.useRoute,j=e.useRouteKey,I=e.usePropsWatch},function(e){x=e.isNil,N=e.clone},function(e){T=e.CheckBoxListEditorController,_=e.SearchFormController,A=e.FormNotifyState,L=e.GridController,G=e.GridRowController,M=e.GridNotifyState},function(e){z=e.SearchFormModel,B=e.GridModel},function(e){V=e.default},function(e){F=e.promiseAllSettled},function(e){U=e.default}],execute:function(){varH=newo(r.meta.url),K=c({name:"CustomCheckboxList",props:S(),emits:O(),setup:function(e,t){varn=t.emit,r=P("checkbox"),o=e.controller,i=o.model.codeList,a=l([]);h((function(){returne.data}),(function(e){o.loadCodeList(e).then((function(e){a.value=e}))}),{immediate:!0,deep:!0});varc=m((function(){returni&&i.orMode?i.orMode.toLowerCase():"str"})),u=",";i&&i.valueSeparator&&(u=i.valueSeparator);vars=m({get:function(){if(!x(e.value)){if(Object.is(c.value,"num")&&a){vart=[],n="string"==typeofe.value?parseInt(e.value,10):e.value;returna.value.forEach((function(e){(n&e.value)===e.value&&t.push(e.value)})),t}if(Object.is(c.value,"str")){varr=e.value;if(""!==r){if(i){varo=r.split(u);if(i.codeItemValueNumber)for(vars=0,l=o.length;s<l;s++)o[s]=Number(o[s]);returno}returnr.split(",")}}}return[]},set:function(e){vart=null;if(Object.is(c.value,"num")){varr=0;e.forEach((function(e){vart="string"==typeofe?parseInt(e,10):e;r|=t})),t=r}elseif(Object.is(c.value,"str")){varo=[];a.value.length>0&&(a.value.forEach((function(t){-1!==e.findIndex((function(e){returnObject.is(t.value,e)}))&&o.push(t.value)})),t=o.join(u))}n("change",t)}}),f=m((function(){vare=Array.isArray(s.value)?s.value:[s.value];returna.value.filter((function(t){returne.includes(t.value)})).map((function(e){returne.text})).join("、")}));return{ns:r,items:a,selectArray:s,valueText:f,onSelectArrayChange:function(e){s.value=e},c:o}},render:function(e){vart=this;returne("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[[this.readonly&&this.valueText,!this.readonly&&e("ICheckboxGroup",{props:C(C({},this.c.customProps),{},{value:this.selectArray}),on:{"on-change":this.onSelectArrayChange}},[this.items.map((function(n,r){returne("i-checkbox",{key:r,attrs:{label:n.value,disabled:t.disabled||t.c.disabledList.includes(n.value)}},[e("span",{class:t.ns.e("text")},[n.text])])}))])]])}}),q=function(e){functiont(){vare;s(this,t);for(varn=arguments.length,r=newArray(n),o=0;o<n;o++)r[o]=arguments[o];returnk(e=d(this,t,[].concat(r)),"disabledList",[]),e}returnb(t,e),f(t,[{key:"onInit",value:(n=u(i().m((functione(){varn,r;returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,v(t,"onInit",this,3)([]);case1:if(null!==(n=this.editorParams)&&void0!==n&&n.DEFAULTDISABLEDLIST)try{this.disabledList=JSON.parse(null===(r=this.editorParams)||void0===r?void0:r.DEFAULTDISABLEDLIST)}catch(o){this.disabledList=[]}case2:returne.a(2)}}),e,this)}))),function(){returnn.apply(this,arguments)})}]);varn}(T),W=function(e){functiont(){vare;s(this,t);for(varn=arguments.length,r=newArray(n),o=0;o<n;o++)r[o]=arguments[o];returnk(e=d(this,t,[].concat(r)),"filterParams",[]),e}returnb(t,e),f(t,[{key:"onInit",value:(r=u(i().m((functione(){varn;returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,v(t,"onInit",this,3)([]);case1:if(n=this.controlParams.FILTERPARAMS)try{this.filterParams=JSON.parse(n)}catch(r){this.filterParams=[]}case2:returne.a(2)}}),e,this)}))),function(){returnr.apply(this,arguments)})},{key:"getParams",value:function(){vare=C({},this.data.getRequestData());if(this.filterParams){vart={};returnthis.filterParams.forEach((function(n){Object.assign(t,k({},n,e[n]))})),t}returne}},{key:"reset",value:(n=u(i().m((functione(){vart,n=this;returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,this.service.getDraft(this.context,this.params);case1:returnt=e.v,this.filterParams.forEach((function(e){Object.assign(n.data,k({},e,t.data[e]))})),this.isLoaded=!0,Object.values(this.details).forEach((function(e){n.filterParams.includes(e.model.codeName)&&e.formStateNotify(A.DRAFT)})),this.force(),e.n=2,this.nerve.self.evt.asyncEmit("search");case2:returne.a(2)}}),e,this)}))),function(){returnn.apply(this,arguments)})}]);varn,r}(_),Y=c({name:"SearchFormDynamic",props:{controller:{type:Object,required:!0},modelData:{type:z,required:!0},context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}}},setup:function(e){vart=p().proxy;return{c:D(t,(function(){returnnewW(e.modelData,e.context,e.params)})),ns:P("search-form"),btntype:e.modelData.source.searchButtonStyle}},render:function(){vare=this;if(this.c.complete)returny("div",{class:[this.ns.b(),this.ns.m(this.btntype).toLowerCase()]},[y("form-control",{attrs:{"model-data":this.modelData,context:this.context,controller:this.c},nativeOn:{keyup:function(t){returne.c.onKeyUp(t)}}}),"NONE"===this.c.model.source.searchButtonStyle?null:y("div",{class:this.ns.b("buttons")},[y("i-button",{class:this.ns.be("buttons","search"),on:{click:function(){returne.c.onSearchButtonClick()}}},["查询"]),y("i-button",{class:this.ns.be("buttons","reset"),on:{click:function(){returne.c.reset()}}},["重置"])])])}}),X=function(){returnf((functione(){s(this,e),k(this,"formEditor","CustomCheckboxList"),k(this,"gridEditor","CustomCheckboxList")}),[{key:"createController",value:(e=u(i().m((functione(t,n){varr;returni().w((function(e){for(;;)switch(e.n){case0:returnr=newq(t,n),e.n=1,r.init();case1:returne.a(2,r)}}),e)}))),function(t,n){returne.apply(this,arguments)})}]);vare}(),$=f((functione(){s(this,e),k(this,"component","SearchFormDynamic")})),J=c({name:"DataViewExpView",props:{context:Object,params:{type:Object},srfnav:String,modelPath:{type:String,required:!0},modal:{type:Object},noLoadDefault:{type:Boolean,required:!1}},setup:function(e){vart=p().proxy,n=E(t,e.modelPath),r=l(""),o=l([]),i=P("dataview-exp");if(!0===n.context.isRouter){vara=R(t);n.nerve.self.evt.on("created",(function(){if(a.params.params1){vare=a.params.params1,i=V.parse(e,{delimiter:";"})[n.model.appEntity.deName];i&&(n.navItem.key=i,o.value=[i])}j(g(n.navItem,"key"),t,r)}))}return{c:n,ns:i,defaultSelectKeys:o,routeViewKey:r}},render:function(){vare=this,t=!0===this.c.context.isRouter,n=null,r=null;if(this.c.complete){varo=this.c.model.listExpBar,i=o.list;r=o,this.c.providers[i.name]&&(n=y(this.c.providers[i.name].component,{props:{modelData:i,context:this.c.context,params:this.c.params,isExpView:!0,isSelectFirstDefault:!0,mdCtrlActiveMode:1,defaultSelectKeys:this.defaultSelectKeys},on:{neuronInit:this.c.nerve.onNeuronInit(i.name)}})),r.width=0}returny("div",{class:this.ns.b()},[y("exp-view-base",{attrs:{controller:this.c,expBarModel:r},scopedSlots:{expView:function(){if(e.c.complete){varn=e.c.model.listExpBar.list;returnn.navView?t?e.routeViewKey?y("router-view",{key:e.routeViewKey}):null:y("ViewShell",{attrs:{context:e.c.navItem.context,params:e.c.navItem.params,modal:{mode:a.EMBED},modelPath:n.navView.source.modelPath},key:e.c.navItem.key}):null}}}}),n])}}),Q=f((functione(){s(this,e),k(this,"component","DataViewExpView")}));functionZ(e,t){varn,r,o=[];"GROUPGRIDCOLUMN"===e.source.columnType&&e.children.forEach((function(e){o.push(Z(e,t))}));vari={title:e.title,width:"STAR"===e.source.widthUnit?void0:e.width,minWidth:e.width,align:(null===(n=e.source.align)||void0===n?void0:n.toLowerCase())||"center",slot:e.codeName,key:e.codeName,fieldName:e.deFieldName,ellipsis:!0,tooltip:!1,resizable:!0,sortable:!(t.noSort||!e.source.enableSort)&&"custom",columnType:e.source.columnType,userParams:e.source.userParams,className:null===(r=e.source.getCellPSSysCss())||void0===r?void0:r.cssName};returno.length>0&&Object.assign(i,{children:o}),i}functionee(e){vart=e.model,n=[],r=t.columns.map((function(t){returnZ(t,e)}));returnt.children.forEach((function(e){vart=r.find((function(t){returnt.key===e.codeName}));t&&n.push(t)})),e.singleSelect||n.splice(0,0,{type:"selection",width:60}),n}varte=function(e){functiont(){vare;s(this,t);for(varn=arguments.length,r=newArray(n),o=0;o<n;o++)r[o]=arguments[o];returnk(e=d(this,t,[].concat(r)),"weekDays",["日","一","二","三","四","五","六"]),k(e,"customColumns",[]),k(e,"loaded",!1),k(e,"checkinData",[]),e}returnb(t,e),f(t,[{key:"onInit",value:(a=u(i().m((functione(){returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,v(t,"onInit",this,3)([]);case1:returne.n=2,this.initMonthColumns();case2:returne.a(2)}}),e,this)}))),function(){returna.apply(this,arguments)})},{key:"initMonthColumns",value:(o=u(i().m((functione(){vart,n,r,o,a,c,u;returni().w((function(e){for(;;)switch(e.n){case0:for(t=U().daysInMonth(),n=U(),r=1;r<=t;r++)o=U("".concat(n.year(),"-").concat(n.month()+1,"-").concat(r)),a=o.day(),c=o.format("YYYY-MM-DD"),u={align:"center",className:void0,columnType:"DEFGRIDCOLUMN",ellipsis:!0,fieldName:"".concat(c),key:"".concat(c),minWidth:100,resizable:!0,slot:"".concat(c),sortable:"custom",title:"".concat(r,"\n").concat(this.weekDays[a]),tooltip:!1,width:100,userParam:{columnType:"date"}},this.customColumns.push(u);case1:returne.a(2)}}),e,this)}))),function(){returno.apply(this,arguments)})},{key:"afterLoad",value:(r=u(i().m((functione(t){varn=this;returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,F(Object.values(this.fieldColumns).map(function(){vare=u(i().m((functione(t){returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,t.loadCodeList();case1:returne.a(2)}}),e)})));returnfunction(t){returne.apply(this,arguments)}}()));case1:returne.n=2,this.initGroup();case2:returnthis.items=this.calcDayData(t),this.items.forEach((function(e,t){e.srfserialnum=t+1})),this.rows=this.items.map((function(e){vart=newG(e,n);returnn.gridStateNotify(t,M.LOAD),t})),this.loaded=!0,e.a(2,t)}}),e,this)}))),function(e){returnr.apply(this,arguments)})},{key:"calcDayData",value:function(e){vart=[];returne.forEach((function(e){varn=t.findIndex((function(t){returnt.member_id===e.member_id}));-1===n?(e.children=k({},e.checkin_date,C({},e)),t.push(e)):t[n].children[e.checkin_date]=e})),t}},{key:"setCheckInData",value:function(e,t){varn=this.checkinData.findIndex((function(t){returnt.id===e}));-1===n?this.checkinData.push(t):this.checkinData[n]=t}},{key:"removeCheckInData",value:function(e){vart=this.checkinData.findIndex((function(t){returnt.id===e}));-1!==t&&this.checkinData.splice(t,1)}},{key:"saveCheckInData",value:(n=u(i().m((functione(){returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,ibiz.net.post("/schedules/manual",this.checkinData);case1:e.v.ok&&(this.loaded=!1,this.checkinData=[],this.load());case2:returne.a(2)}}),e,this)}))),function(){returnn.apply(this,arguments)})}]);varn,r,o,a}(L);varne=c({props:{controller:{type:Object,required:!0},modelData:B,context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}},gridRowActiveMode:{type:Number,default:2},modal:{type:Object}},setup:function(e){varr,o=p().proxy,i=P("grid"),a=function(e,t,n){varr=arguments.length>3&&void0!==arguments[3]?arguments[3]:{};returnD(e,(function(){varo=newte(t,n,r);returnI(e,"gridRowActiveMode",o.setGridRowActiveMode.bind(o)),o}))}(o,e.modelData,e.context,e.params),c=a.model.source.getPSControlParam(),u="true"===(null==c||null===(r=c.ctrlParams)||void0===r?void0:r.IS_NOT_FLEX),s=l(),f=function(e){vart=l([]);e.nerve.self.evt.on("created",(function(){t.value=ee(e)}));varn=function(t){returnt.filter((function(t){return!e.hiddenColumnKeys.includes(t.key)&&(t.children&&t.children.length&&(t.children=n(t.children)),!0)}))};return[m((function(){varr,o=N(t.value),i=(o=n(o)).find((function(e){return!e.width})),a=null===(r=e.model.source.getPSControlParam())||void0===r?void0:r.ctrlParams,c="true"===(null==a?void0:a.IS_NOT_FLEX);if(!i&&!c){varu=o.length-1;"rowEdit"===o[u].key&&(u-=1),o[u]=C(C({},o[u]),{},{width:void0})}vars=o.find((function(e){return"UAGRIDCOLUMN"===e.columnType}));if(s){varl=s.userParams;l&&"true"===l.fixed&&(s.fixed="right")}returno.forEach((function(t){t.fixed="left","TRUE"!==ibiz.env.enableGridRowBreak&&!0!==ibiz.env.enableGridRowBreak||(t.ellipsis=!1),e.controlParams.ENABLEGRIDROWBREAK&&(t.ellipsis="TRUE"!==e.controlParams.ENABLEGRIDROWBREAK)})),o})),t]}(a),d=n(f,1)[0],v=m((function(){return[].concat(t(d.value),t(a.customColumns))})),y=function(e){vart=function(t){returne.items.find((function(e){returne.srfkey===t.srfkey}))};return{onRowClick:function(n){varr=t(n);if(e.singleSelect){varo=e.selectedData.find((function(e){returne.srfkey===n.srfkey}));e.onSelectionChange(o?[]:[r])}e.onRowClick(r)},onDbRowClick:function(n){e.onDbRowClick(t(n))},onSelectionChange:function(n){if(!e.singleSelect){varr=[];n.forEach((function(e){varn=t(e);n&&r.push(n)})),e.onSelectionChange(r)}},onSortChange:function(t){varn=t.column,r=t.order,o="asc"===r||"desc"===r?r:void0;e.setSort(n.fieldName,o),e.load()}}}(a),b=y.onRowClick,g=y.onDbRowClick,k=y.onSelectionChange,S=y.onSortChange,O=function(e){return{onPageChange:function(t){t&&t!==e.curPage&&(e.curPage=t,e.load())},onPageSizeChange:function(t){t&&t!==e.size&&(e.size=t,1===e.curPage&&e.load())},onPageReset:function(){e.curPage=1,e.load()}}}(a),E=O.onPageChange,R=O.onPageReset,j=O.onPageSizeChange,x=m((function(){vart,n=null===(t=e.modelData)||void0===t||null===(t=t.source.getPSControlParam())||void0===t?void0:t.ctrlParams;return"false"!==(null==n?void0:n.HIGHLIGHT)})),T=null,_=l(0),A=l(null),L=l(null),G=null,M=0,z=function(){vart;if(A.value&&"EMBED"!==(null===(t=e.modal)||void0===t?void0:t.mode))if(a.model.source.enablePagingBar&&L.value){varn=L.value.$el,r=n.offsetHeight+parseFloat(window.getComputedStyle(n).paddingTop);_.value=A.value.offsetHeight-r}else_.value=A.value.offsetHeight;a.model.source.height>0&&(_.value=a.model.source.height)};h(A,(function(e,t){e&&e!==t&&(z(),window.ResizeObserver&&A.value&&(G=newResizeObserver((function(e){vart=e[0].contentRect.height;t!==M&&(z(),M=t)}))).observe(A.value))})),w((function(){G&&G.disconnect()}));varB=m((function(){vare=a.items.map((function(e){returne._checked=a.selectedData.some((function(t){returnt.srfkey===e.srfkey})),e}));returne.length?(e.unshift({hiddenRow:!0,_checked:a.items.every((function(e){returne._checked}))}),e):e}));return{c:a,ns:i,columns:d,curColumns:v,tableData:B,onDbRowClick:g,onUIRowClick:function(e,t){null!=T&&window.clearTimeout(T),T=window.setTimeout((function(){varn=o.$refs.grid;n&&(a.selectedData.find((function(t){returnt.srfkey===e.srfkey}))&&n.clearCurrentRow(),n.toggleSelect&&n.toggleSelect(t));b(e)}),300)},onUIDbRowClick:function(e){null!=T&&window.clearTimeout(T);vart=o.$refs.grid;t&&(a.selectedData.find((function(t){returnt.srfkey===e.srfkey}))||t.clearCurrentRow());g(e)},onSelectionChange:k,onSortChange:S,onPageChange:E,onPageSizeChange:j,onPageReset:R,tableHeight:_,gridRef:A,girdPaginationRef:L,highlight:x,isNotFlex:u,grid:s}},render:function(){vare,t=this;if(this.c.complete&&this.c.loaded){varn={};returnthis.c.model.columns.forEach((function(e){if("GROUPGRIDCOLUMN"!==e.source.columnType){varr=e.codeName;n[r]=function(e){varn=e.row,o=e.index,i=t.c.rows[o-1];returnn.hiddenRow?y("span",{style:"word-break: break-word;white-space: pre-wrap;"},["隐藏行的列"]):i?y(t.c.providers[r].component,{props:{controller:t.c.columns[r],row:i},key:n.srfkey+r}):void0}}})),this.c.customColumns.forEach((function(e){varr=e.fieldName;n[r]=function(e){varn=e.row,o=e.index,i=t.c.rows[o-1],a=n.children[r];if(i&&a)returny("CheckInGridColumn",{props:{controller:t.c,data:n,value:a},key:n.srfkey+r})}})),y("control-layout",{attrs:{modelData:this.c.model}},[y("div",{ref:"gridRef",class:[this.ns.b(),this.ns.is("show-header",!this.c.model.source.hideHeader),this.ns.is("enable-page",this.c.model.source.enablePagingBar)],style:this.isNotFlex?null===(e=this.grid)||void0===e?void0:e.tableStyle:void0},[y("i-table",{ref:"grid",attrs:{height:this.tableHeight,"show-header":!this.c.model.source.hideHeader,"highlight-row":this.c.singleSelect&&this.highlight,data:this.tableData,columns:this.curColumns,"row-class-name":function(e){returne.hiddenRow?"hidden-row":""},"span-method":this.c.spanMethod.bind(this.c)},class:this.ns.b("content"),on:{"on-row-click":this.onUIRowClick,"on-row-dblclick":this.onUIDbRowClick,"on-selection-change":this.onSelectionChange,"on-sort-change":this.onSortChange},scopedSlots:n}),this.c.model.source.enablePagingBar&&y("appGridPagination",{ref:"girdPaginationRef",attrs:{total:this.c.total,curPage:this.c.curPage,size:this.c.size},on:{change:this.onPageChange,"page-size-change":this.onPageSizeChange,"page-reset":this.onPageReset}})])])}}}),re=c({name:"IBizCheckInGridColumn",props:{value:{type:Object,required:!0},data:{type:Object,required:!0},controller:{type:Object,required:!0}},setup:function(e){varn=P("checkin-column"),r=l(""),o=m((function(){varn=e.value||{},r=n.shifts,o=void0===r?[]:r,i=n.work_time,a=(void0===i?[]:i)[0]||{},c=a.start_base_time,u=a.end_base_time,s=c,l=u,f={title:"休息 (".concat(s," - ").concat(l,")"),value:"rest",name:"休息"},d={title:"白班 (".concat(s," - ").concat(l,")"),value:"work",name:"白班"};if(!o.length)return[d,f];varh=o.map((function(e){vart=e.name;return{title:"".concat(t," (").concat(s," - ").concat(l,")"),value:e.id,name:t,origin:e}}));return[].concat(t(h),[f])})),a=m((function(){vart=e.value||{},n=t.workday,r=t.shift_data;if(!n){vari=o.value.find((function(e){return"rest"===e.value}));returni?i.title:"休息"}if(r){vara=r.name,c=o.value.find((function(e){returne.name===a}));returnc?c.title:a}return""})),c=m((function(){if(r.value){vare=o.value.find((function(e){returne.value===r.value}));if(e)returne.title}return""})),s=function(){vart=u(i().m((functiont(n){varc,u;returni().w((function(t){for(;;)switch(t.n){case0:if(e.value){t.n=1;break}returnt.a(2);case1:c=e.controller,(u=o.value.find((function(e){returne.value===n}))).title===a.value?(r.value="",c.removeCheckInData(e.value.id)):(r.value=n,c.setCheckInData(e.value.id,{id:e.value.id,workday:"rest"!==n?1:0,choose_shift:u.origin}));case2:returnt.a(2)}}),t)})));returnfunction(e){returnt.apply(this,arguments)}}();return{ns:n,curValue:a,selectValue:c,items:o,selected:r,handleClick:s}},render:function(){vare=this;if(this.value){vart=this.selectValue||this.curValue;returny("i-dropdown",{on:{"on-click":function(t){returne.handleClick(t)}},class:[this.ns.b(),this.ns.m("dropdown"),this.ns.is("active",!!this.selected),this.ns.is("manual",this.value.manual)],attrs:{"transfer-class-name":this.ns.b("popper"),transfer:!0,trigger:"click"}},[y("div",{class:this.ns.e("caption")},[t.replace(/\(.*\)/g,"")]),y("i-dropdownMenu",{slot:"list"},[this.items.map((function(t){returny("i-dropdown-item",{class:[e.ns.e("item")],attrs:{title:t.title,name:t.value,disabled:t.title===(e.selectValue||e.curValue)}},[t.title])}))])])}}}),oe=f((functione(){s(this,e),k(this,"component","CheckinGridControl")}));e("default",{mateUrl:r.meta.url,install:function(e){H.loadStyle(["/style.css"]),e.component("CustomCheckboxList",K),ibiz.register.editor.register("EDITOR_CUSTOMSTYLE_CUSTOM_CHECKBOX_LIST",newX),e.component("SearchFormDynamic",Y),ibiz.register.control.register("SEARCHFORM_RENDER_DYNAMIC",new$),e.component("DataViewExpView",J),ibiz.register.view.register("DELISTEXPVIEW_CARD",newQ),e.component("CheckinGridControl",ne),e.component("CheckInGridColumn",re),ibiz.register.control.register("GRID_RENDER_CHECKIN",newoe)}})}}}))}();
!function(){functione(t){returne="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},e(t)}functiont(e){returnfunction(e){if(Array.isArray(e))returno(e)}(e)||function(e){if("undefined"!=typeofSymbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])returnArray.from(e)}(e)||r(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionn(e,t){returnfunction(e){if(Array.isArray(e))returne}(e)||function(e,t){varn=null==e?null:"undefined"!=typeofSymbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){varr,o,i,a,c=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}elsefor(;!(u=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throwo}}returnc}}(e,t)||r(e,t)||function(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionr(e,t){if(e){if("string"==typeofe)returno(e,t);varn={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void0}}functiono(e,t){(null==t||t>e.length)&&(t=e.length);for(varn=0,r=Array(t);n<t;n++)r[n]=e[n];returnr}functioni(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */vare,t,n="function"==typeofSymbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";functionc(n,r,o,i){varc=r&&r.prototypeinstanceofs?r:s,l=Object.create(c.prototype);returna(l,"_invoke",function(n,r,o){vari,a,c,s=0,l=o||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){returni=t,a=0,c=e,d.n=n,u}};functionh(n,r){for(a=n,c=r,t=0;!f&&s&&!o&&t<l.length;t++){varo,i=l[t],h=d.p,v=i[2];n>3?(o=v===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=h&&((o=n<2&&h<i[1])?(a=0,d.v=r,d.n=i[1]):h<v&&(o=n<3||i[0]>r||r>v)&&(i[4]=n,i[5]=r,d.n=v,a=0))}if(o||n>1)returnu;throwf=!0,r}returnfunction(o,l,v){if(s>1)throwTypeError("Generator is already running");for(f&&1===l&&h(l,v),a=l,c=v;(t=a<2?e:c)||!f;){i||(a?a<3?(a>1&&(d.n=-1),h(a,c)):d.n=c:d.v=c);try{if(s=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throwTypeError("iterator result is not an object");if(!t.done)returnt;c=t.value,a<2&&(a=0)}else1===a&&(t=i.return)&&t.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}elseif((t=(f=d.n<0)?c:n.call(r,d))!==u)break}catch(t){i=e,a=1,c=t}finally{s=1}}return{value:t,done:f}}}(n,o,i),!0),l}varu={};functions(){}functionl(){}functionf(){}t=Object.getPrototypeOf;vard=[][r]?t(t([][r]())):(a(t={},r,(function(){returnthis})),t),h=f.prototype=s.prototype=Object.create(d);functionv(e){returnObject.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,a(e,o,"GeneratorFunction")),e.prototype=Object.create(h),e}returnl.prototype=f,a(h,"constructor",f),a(f,"constructor",l),l.displayName="GeneratorFunction",a(f,o,"GeneratorFunction"),a(h),a(h,o,"Generator"),a(h,r,(function(){returnthis})),a(h,"toString",(function(){return"[object Generator]"})),(i=function(){return{w:c,m:v}})()}functiona(e,t,n,r){varo=Object.defineProperty;try{o({},"",{})}catch(e){o=0}a=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{functioni(t,n){a(e,t,(function(e){returnthis._invoke(t,n,e)}))}i("next",0),i("throw",1),i("return",2)}},a(e,t,n,r)}functionc(e,t,n,r,o,i,a){try{varc=e[i](a),u=c.value}catch(e){returnvoidn(e)}c.done?t(u):Promise.resolve(u).then(r,o)}functionu(e){returnfunction(){vart=this,n=arguments;returnnewPromise((function(r,o){vari=e.apply(t,n);functiona(e){c(i,r,o,a,u,"next",e)}functionu(e){c(i,r,o,a,u,"throw",e)}a(void0)}))}}functions(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functionl(e,t){for(varn=0;n<t.length;n++){varr=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,S(r.key),r)}}functionf(e,t,n){returnt&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}functiond(t,n,r){returnn=y(n),function(t,n){if(n&&("object"==e(n)||"function"==typeofn))returnn;if(void0!==n)thrownewTypeError("Derived constructors may only return object or undefined");returnfunction(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}(t)}(t,h()?Reflect.construct(n,r||[],y(t).constructor):n.apply(t,r))}functionh(){try{vare=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}functionv(e,t,n,r){varo=m(y(1&r?e.prototype:e),t,n);return2&r&&"function"==typeofo?function(e){returno.apply(n,e)}:o}functionm(){returnm="undefined"!=typeofReflect&&Reflect.get?Reflect.get.bind():function(e,t,n){varr=p(e,t);if(r){varo=Object.getOwnPropertyDescriptor(r,t);returno.get?o.get.call(arguments.length<3?e:n):o.value}},m.apply(null,arguments)}functionp(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=y(e)););returne}functiony(e){returny=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){returne.__proto__||Object.getPrototypeOf(e)},y(e)}functionb(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}functiong(e,t){returng=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){returne.__proto__=t,e},g(e,t)}functionw(e,t){varn=Object.keys(e);if(Object.getOwnPropertySymbols){varr=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}returnn}functionC(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}returne}functionk(e,t,n){return(t=S(t))ine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}functionS(t){varn=function(t,n){if("object"!=e(t)||!t)returnt;varr=t[Symbol.toPrimitive];if(void0!==r){varo=r.call(t,n||"default");if("object"!=e(o))returno;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}System.register(["@ibiz-template/runtime","vue","@ibiz-template/vue-util","ramda","@ibiz-template/controller","@ibiz-template/model","qs","@ibiz-template/core","dayjs"],(function(e,r){"use strict";varo,a,c,l,h,m,p,y,g,w,S,O,P,D,E,R,j,I,x,N,T,_,A,L,G,M,z,B,V,F,U;return{setters:[function(e){o=e.PluginStaticResource,a=e.ViewMode},function(e){c=e.defineComponent,l=e.ref,h=e.watch,m=e.computed,p=e.getCurrentInstance,y=e.h,g=e.toRef,w=e.onUnmounted},function(e){S=e.getCheckboxProps,O=e.getEditorEmits,P=e.useNamespace,D=e.useControlController,E=e.useListExpViewController,R=e.useRoute,j=e.useRouteKey,I=e.usePropsWatch},function(e){x=e.isNil,N=e.clone},function(e){T=e.CheckBoxListEditorController,_=e.SearchFormController,A=e.FormNotifyState,L=e.GridController,G=e.GridRowController,M=e.GridNotifyState},function(e){z=e.SearchFormModel,B=e.GridModel},function(e){V=e.default},function(e){F=e.promiseAllSettled},function(e){U=e.default}],execute:function(){varH=newo(r.meta.url),K=c({name:"CustomCheckboxList",props:S(),emits:O(),setup:function(e,t){varn=t.emit,r=P("checkbox"),o=e.controller,i=o.model.codeList,a=l([]);h((function(){returne.data}),(function(e){o.loadCodeList(e).then((function(e){a.value=e}))}),{immediate:!0,deep:!0});varc=m((function(){returni&&i.orMode?i.orMode.toLowerCase():"str"})),u=",";i&&i.valueSeparator&&(u=i.valueSeparator);vars=m({get:function(){if(!x(e.value)){if(Object.is(c.value,"num")&&a){vart=[],n="string"==typeofe.value?parseInt(e.value,10):e.value;returna.value.forEach((function(e){(n&e.value)===e.value&&t.push(e.value)})),t}if(Object.is(c.value,"str")){varr=e.value;if(""!==r){if(i){varo=r.split(u);if(i.codeItemValueNumber)for(vars=0,l=o.length;s<l;s++)o[s]=Number(o[s]);returno}returnr.split(",")}}}return[]},set:function(e){vart=null;if(Object.is(c.value,"num")){varr=0;e.forEach((function(e){vart="string"==typeofe?parseInt(e,10):e;r|=t})),t=r}elseif(Object.is(c.value,"str")){varo=[];a.value.length>0&&(a.value.forEach((function(t){-1!==e.findIndex((function(e){returnObject.is(t.value,e)}))&&o.push(t.value)})),t=o.join(u))}n("change",t)}}),f=m((function(){vare=Array.isArray(s.value)?s.value:[s.value];returna.value.filter((function(t){returne.includes(t.value)})).map((function(e){returne.text})).join("、")}));return{ns:r,items:a,selectArray:s,valueText:f,onSelectArrayChange:function(e){s.value=e},c:o}},render:function(e){vart=this;returne("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[[this.readonly&&this.valueText,!this.readonly&&e("ICheckboxGroup",{props:C(C({},this.c.customProps),{},{value:this.selectArray}),on:{"on-change":this.onSelectArrayChange}},[this.items.map((function(n,r){returne("i-checkbox",{key:r,attrs:{label:n.value,disabled:t.disabled||t.c.disabledList.includes(n.value)}},[e("span",{class:t.ns.e("text")},[n.text])])}))])]])}}),q=function(e){functiont(){vare;s(this,t);for(varn=arguments.length,r=newArray(n),o=0;o<n;o++)r[o]=arguments[o];returnk(e=d(this,t,[].concat(r)),"disabledList",[]),e}returnb(t,e),f(t,[{key:"onInit",value:(n=u(i().m((functione(){varn,r;returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,v(t,"onInit",this,3)([]);case1:if(null!==(n=this.editorParams)&&void0!==n&&n.DEFAULTDISABLEDLIST)try{this.disabledList=JSON.parse(null===(r=this.editorParams)||void0===r?void0:r.DEFAULTDISABLEDLIST)}catch(o){this.disabledList=[]}case2:returne.a(2)}}),e,this)}))),function(){returnn.apply(this,arguments)})}]);varn}(T),W=function(e){functiont(){vare;s(this,t);for(varn=arguments.length,r=newArray(n),o=0;o<n;o++)r[o]=arguments[o];returnk(e=d(this,t,[].concat(r)),"filterParams",[]),e}returnb(t,e),f(t,[{key:"onInit",value:(r=u(i().m((functione(){varn;returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,v(t,"onInit",this,3)([]);case1:if(n=this.controlParams.FILTERPARAMS)try{this.filterParams=JSON.parse(n)}catch(r){this.filterParams=[]}case2:returne.a(2)}}),e,this)}))),function(){returnr.apply(this,arguments)})},{key:"getParams",value:function(){vare=C({},this.data.getRequestData());if(this.filterParams){vart={};returnthis.filterParams.forEach((function(n){Object.assign(t,k({},n,e[n]))})),t}returne}},{key:"reset",value:(n=u(i().m((functione(){vart,n=this;returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,this.service.getDraft(this.context,this.params);case1:returnt=e.v,this.filterParams.forEach((function(e){Object.assign(n.data,k({},e,t.data[e]))})),this.isLoaded=!0,Object.values(this.details).forEach((function(e){n.filterParams.includes(e.model.codeName)&&e.formStateNotify(A.DRAFT)})),this.force(),e.n=2,this.nerve.self.evt.asyncEmit("search");case2:returne.a(2)}}),e,this)}))),function(){returnn.apply(this,arguments)})}]);varn,r}(_),Y=c({name:"SearchFormDynamic",props:{controller:{type:Object,required:!0},modelData:{type:z,required:!0},context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}}},setup:function(e){vart=p().proxy;return{c:D(t,(function(){returnnewW(e.modelData,e.context,e.params)})),ns:P("search-form"),btntype:e.modelData.source.searchButtonStyle}},render:function(){vare=this;if(this.c.complete)returny("div",{class:[this.ns.b(),this.ns.m(this.btntype).toLowerCase()]},[y("form-control",{attrs:{"model-data":this.modelData,context:this.context,controller:this.c},nativeOn:{keyup:function(t){returne.c.onKeyUp(t)}}}),"NONE"===this.c.model.source.searchButtonStyle?null:y("div",{class:this.ns.b("buttons")},[y("i-button",{class:this.ns.be("buttons","search"),on:{click:function(){returne.c.onSearchButtonClick()}}},["查询"]),y("i-button",{class:this.ns.be("buttons","reset"),on:{click:function(){returne.c.reset()}}},["重置"])])])}}),X=function(){returnf((functione(){s(this,e),k(this,"formEditor","CustomCheckboxList"),k(this,"gridEditor","CustomCheckboxList")}),[{key:"createController",value:(e=u(i().m((functione(t,n){varr;returni().w((function(e){for(;;)switch(e.n){case0:returnr=newq(t,n),e.n=1,r.init();case1:returne.a(2,r)}}),e)}))),function(t,n){returne.apply(this,arguments)})}]);vare}(),$=f((functione(){s(this,e),k(this,"component","SearchFormDynamic")})),J=c({name:"DataViewExpView",props:{context:Object,params:{type:Object},srfnav:String,modelPath:{type:String,required:!0},modal:{type:Object},noLoadDefault:{type:Boolean,required:!1}},setup:function(e){vart=p().proxy,n=E(t,e.modelPath),r=l(""),o=l([]),i=P("dataview-exp");if(!0===n.context.isRouter){vara=R(t);n.nerve.self.evt.on("created",(function(){if(a.params.params1){vare=a.params.params1,i=V.parse(e,{delimiter:";"})[n.model.appEntity.deName];i&&(n.navItem.key=i,o.value=[i])}j(g(n.navItem,"key"),t,r)}))}return{c:n,ns:i,defaultSelectKeys:o,routeViewKey:r}},render:function(){vare=this,t=!0===this.c.context.isRouter,n=null,r=null;if(this.c.complete){varo=this.c.model.listExpBar,i=o.list;r=o,this.c.providers[i.name]&&(n=y(this.c.providers[i.name].component,{props:{modelData:i,context:this.c.context,params:this.c.params,isExpView:!0,isSelectFirstDefault:!0,mdCtrlActiveMode:1,defaultSelectKeys:this.defaultSelectKeys},on:{neuronInit:this.c.nerve.onNeuronInit(i.name)}})),r.width=0}returny("div",{class:this.ns.b()},[y("exp-view-base",{attrs:{controller:this.c,expBarModel:r},scopedSlots:{expView:function(){if(e.c.complete){varn=e.c.model.listExpBar.list;returnn.navView?t?e.routeViewKey?y("router-view",{key:e.routeViewKey}):null:y("ViewShell",{attrs:{context:e.c.navItem.context,params:e.c.navItem.params,modal:{mode:a.EMBED},modelPath:n.navView.source.modelPath},key:e.c.navItem.key}):null}}}}),n])}}),Q=f((functione(){s(this,e),k(this,"component","DataViewExpView")}));functionZ(e,t){varn,r,o=[];"GROUPGRIDCOLUMN"===e.source.columnType&&e.children.forEach((function(e){o.push(Z(e,t))}));vari={title:e.title,width:"STAR"===e.source.widthUnit?void0:e.width,minWidth:e.width,align:(null===(n=e.source.align)||void0===n?void0:n.toLowerCase())||"center",slot:e.codeName,key:e.codeName,fieldName:e.deFieldName,ellipsis:!0,tooltip:!1,resizable:!0,sortable:!(t.noSort||!e.source.enableSort)&&"custom",columnType:e.source.columnType,userParams:e.source.userParams,className:null===(r=e.source.getCellPSSysCss())||void0===r?void0:r.cssName};returno.length>0&&Object.assign(i,{children:o}),i}functionee(e){vart=e.model,n=[],r=t.columns.map((function(t){returnZ(t,e)}));returnt.children.forEach((function(e){vart=r.find((function(t){returnt.key===e.codeName}));t&&n.push(t)})),e.singleSelect||n.splice(0,0,{type:"selection",width:60}),n}varte=function(e){functiont(){vare;s(this,t);for(varn=arguments.length,r=newArray(n),o=0;o<n;o++)r[o]=arguments[o];returnk(e=d(this,t,[].concat(r)),"weekDays",["日","一","二","三","四","五","六"]),k(e,"customColumns",[]),k(e,"loaded",!1),k(e,"checkinData",[]),e}returnb(t,e),f(t,[{key:"onInit",value:(a=u(i().m((functione(){returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,v(t,"onInit",this,3)([]);case1:returne.n=2,this.initMonthColumns();case2:returne.a(2)}}),e,this)}))),function(){returna.apply(this,arguments)})},{key:"initMonthColumns",value:(o=u(i().m((functione(){vart,n,r,o,a,c,u;returni().w((function(e){for(;;)switch(e.n){case0:for(t=U().daysInMonth(),n=U(),r=1;r<=t;r++)o=U("".concat(n.year(),"-").concat(n.month()+1,"-").concat(r)),a=o.day(),c=o.format("YYYY-MM-DD"),u={align:"center",className:void0,columnType:"DEFGRIDCOLUMN",ellipsis:!0,fieldName:"".concat(c),key:"".concat(c),minWidth:100,resizable:!0,slot:"".concat(c),sortable:"custom",title:"".concat(r,"\n").concat(this.weekDays[a]),tooltip:!1,width:100,userParam:{columnType:"date"}},this.customColumns.push(u);case1:returne.a(2)}}),e,this)}))),function(){returno.apply(this,arguments)})},{key:"afterLoad",value:(r=u(i().m((functione(t){varn=this;returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,F(Object.values(this.fieldColumns).map(function(){vare=u(i().m((functione(t){returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,t.loadCodeList();case1:returne.a(2)}}),e)})));returnfunction(t){returne.apply(this,arguments)}}()));case1:returne.n=2,this.initGroup();case2:returnthis.items=this.calcDayData(t),this.items.forEach((function(e,t){e.srfserialnum=t+1})),this.rows=this.items.map((function(e){vart=newG(e,n);returnn.gridStateNotify(t,M.LOAD),t})),this.loaded=!0,e.a(2,t)}}),e,this)}))),function(e){returnr.apply(this,arguments)})},{key:"calcDayData",value:function(e){vart=[];returne.forEach((function(e){varn=t.findIndex((function(t){returnt.member_id===e.member_id}));-1===n?(e.children=k({},e.checkin_date,C({},e)),t.push(e)):t[n].children[e.checkin_date]=e})),t}},{key:"setCheckInData",value:function(e,t){varn=this.checkinData.findIndex((function(t){returnt.id===e}));-1===n?this.checkinData.push(t):this.checkinData[n]=t}},{key:"removeCheckInData",value:function(e){vart=this.checkinData.findIndex((function(t){returnt.id===e}));-1!==t&&this.checkinData.splice(t,1)}},{key:"saveCheckInData",value:(n=u(i().m((functione(){returni().w((function(e){for(;;)switch(e.n){case0:returne.n=1,ibiz.net.post("/schedules/manual",this.checkinData);case1:e.v.ok&&(this.loaded=!1,this.checkinData=[],this.load());case2:returne.a(2)}}),e,this)}))),function(){returnn.apply(this,arguments)})}]);varn,r,o,a}(L);varne=c({props:{controller:{type:Object,required:!0},modelData:B,context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}},gridRowActiveMode:{type:Number,default:2},modal:{type:Object}},setup:function(e){varr,o=p().proxy,i=P("grid"),a=function(e,t,n){varr=arguments.length>3&&void0!==arguments[3]?arguments[3]:{};returnD(e,(function(){varo=newte(t,n,r);returnI(e,"gridRowActiveMode",o.setGridRowActiveMode.bind(o)),o}))}(o,e.modelData,e.context,e.params),c=a.model.source.getPSControlParam(),u="true"===(null==c||null===(r=c.ctrlParams)||void0===r?void0:r.IS_NOT_FLEX),s=l(),f=function(e){vart=l([]);e.nerve.self.evt.on("created",(function(){t.value=ee(e)}));varn=function(t){returnt.filter((function(t){return!e.hiddenColumnKeys.includes(t.key)&&(t.children&&t.children.length&&(t.children=n(t.children)),!0)}))};return[m((function(){varr,o=N(t.value),i=(o=n(o)).find((function(e){return!e.width})),a=null===(r=e.model.source.getPSControlParam())||void0===r?void0:r.ctrlParams,c="true"===(null==a?void0:a.IS_NOT_FLEX);if(!i&&!c){varu=o.length-1;"rowEdit"===o[u].key&&(u-=1),o[u]=C(C({},o[u]),{},{width:void0})}vars=o.find((function(e){return"UAGRIDCOLUMN"===e.columnType}));if(s){varl=s.userParams;l&&"true"===l.fixed&&(s.fixed="right")}returno.forEach((function(t){t.fixed="left","TRUE"!==ibiz.env.enableGridRowBreak&&!0!==ibiz.env.enableGridRowBreak||(t.ellipsis=!1),e.controlParams.ENABLEGRIDROWBREAK&&(t.ellipsis="TRUE"!==e.controlParams.ENABLEGRIDROWBREAK)})),o})),t]}(a),d=n(f,1)[0],v=m((function(){return[].concat(t(d.value),t(a.customColumns))})),y=function(e){vart=function(t){returne.items.find((function(e){returne.srfkey===t.srfkey}))};return{onRowClick:function(n){varr=t(n);if(e.singleSelect){varo=e.selectedData.find((function(e){returne.srfkey===n.srfkey}));e.onSelectionChange(o?[]:[r])}e.onRowClick(r)},onDbRowClick:function(n){e.onDbRowClick(t(n))},onSelectionChange:function(n){if(!e.singleSelect){varr=[];n.forEach((function(e){varn=t(e);n&&r.push(n)})),e.onSelectionChange(r)}},onSortChange:function(t){varn=t.column,r=t.order,o="asc"===r||"desc"===r?r:void0;e.setSort(n.fieldName,o),e.load()}}}(a),b=y.onRowClick,g=y.onDbRowClick,k=y.onSelectionChange,S=y.onSortChange,O=function(e){return{onPageChange:function(t){t&&t!==e.curPage&&(e.curPage=t,e.load())},onPageSizeChange:function(t){t&&t!==e.size&&(e.size=t,1===e.curPage&&e.load())},onPageReset:function(){e.curPage=1,e.load()}}}(a),E=O.onPageChange,R=O.onPageReset,j=O.onPageSizeChange,x=m((function(){vart,n=null===(t=e.modelData)||void0===t||null===(t=t.source.getPSControlParam())||void0===t?void0:t.ctrlParams;return"false"!==(null==n?void0:n.HIGHLIGHT)})),T=null,_=l(0),A=l(null),L=l(null),G=null,M=0,z=function(){vart;if(A.value&&"EMBED"!==(null===(t=e.modal)||void0===t?void0:t.mode))if(a.model.source.enablePagingBar&&L.value){varn=L.value.$el,r=n.offsetHeight+parseFloat(window.getComputedStyle(n).paddingTop);_.value=A.value.offsetHeight-r}else_.value=A.value.offsetHeight;a.model.source.height>0&&(_.value=a.model.source.height)};h(A,(function(e,t){e&&e!==t&&(z(),window.ResizeObserver&&A.value&&(G=newResizeObserver((function(e){vart=e[0].contentRect.height;t!==M&&(z(),M=t)}))).observe(A.value))})),w((function(){G&&G.disconnect()}));varB=m((function(){vare=a.items.map((function(e){returne._checked=a.selectedData.some((function(t){returnt.srfkey===e.srfkey})),e}));returne.length?(e.unshift({hiddenRow:!0,_checked:a.items.every((function(e){returne._checked}))}),e):e}));return{c:a,ns:i,columns:d,curColumns:v,tableData:B,onDbRowClick:g,onUIRowClick:function(e,t){null!=T&&window.clearTimeout(T),T=window.setTimeout((function(){varn=o.$refs.grid;n&&(a.selectedData.find((function(t){returnt.srfkey===e.srfkey}))&&n.clearCurrentRow(),n.toggleSelect&&n.toggleSelect(t));b(e)}),300)},onUIDbRowClick:function(e){null!=T&&window.clearTimeout(T);vart=o.$refs.grid;t&&(a.selectedData.find((function(t){returnt.srfkey===e.srfkey}))||t.clearCurrentRow());g(e)},onSelectionChange:k,onSortChange:S,onPageChange:E,onPageSizeChange:j,onPageReset:R,tableHeight:_,gridRef:A,girdPaginationRef:L,highlight:x,isNotFlex:u,grid:s}},render:function(){vare,t=this;if(this.c.complete&&this.c.loaded){varn={};returnthis.c.model.columns.forEach((function(e){if("GROUPGRIDCOLUMN"!==e.source.columnType){varr=e.codeName;n[r]=function(e){varn=e.row,o=e.index,i=t.c.rows[o-1];returnn.hiddenRow?y("span",{style:"word-break: break-word;white-space: pre-wrap;"},["隐藏行的列"]):i?y(t.c.providers[r].component,{props:{controller:t.c.columns[r],row:i},key:n.srfkey+r}):void0}}})),this.c.customColumns.forEach((function(e){varr=e.fieldName;n[r]=function(e){varn=e.row,o=e.index,i=t.c.rows[o-1],a=n.children[r];if(i&&a)returny("CheckInGridColumn",{props:{controller:t.c,data:n,value:a},key:n.srfkey+r})}})),y("control-layout",{attrs:{modelData:this.c.model}},[y("div",{ref:"gridRef",class:[this.ns.b(),this.ns.is("show-header",!this.c.model.source.hideHeader),this.ns.is("enable-page",this.c.model.source.enablePagingBar)],style:this.isNotFlex?null===(e=this.grid)||void0===e?void0:e.tableStyle:void0},[y("i-table",{ref:"grid",attrs:{height:this.tableHeight,"show-header":!this.c.model.source.hideHeader,"highlight-row":this.c.singleSelect&&this.highlight,data:this.tableData,columns:this.curColumns,"row-class-name":function(e){returne.hiddenRow?"hidden-row":""},"span-method":this.c.spanMethod.bind(this.c)},class:this.ns.b("content"),on:{"on-row-click":this.onUIRowClick,"on-row-dblclick":this.onUIDbRowClick,"on-selection-change":this.onSelectionChange,"on-sort-change":this.onSortChange},scopedSlots:n}),this.c.model.source.enablePagingBar&&y("appGridPagination",{ref:"girdPaginationRef",attrs:{total:this.c.total,curPage:this.c.curPage,size:this.c.size},on:{change:this.onPageChange,"page-size-change":this.onPageSizeChange,"page-reset":this.onPageReset}})])])}}}),re=c({name:"IBizCheckInGridColumn",props:{value:{type:Object,required:!0},data:{type:Object,required:!0},controller:{type:Object,required:!0}},setup:function(e){varn=P("checkin-column"),r=l(""),o=m((function(){varn=e.value||{},r=n.shifts,o=void0===r?[]:r,i=n.work_time,a=(void0===i?[]:i)[0]||{},c=a.start_base_time,u=a.end_base_time,s="";c&&u&&(s="(".concat(c," - ").concat(u,")"));varl={title:"休息".concat(s),value:"rest",name:"休息"},f={title:"白班".concat(s),value:"work",name:"白班"};if(!o.length)return[f,l];vard=o.map((function(e){vart=e.name;return{title:"".concat(t).concat(s),value:e.id,name:t,origin:e}}));return[].concat(t(d),[l])})),a=m((function(){vart=e.value||{},n=t.workday,r=t.shift_data;if(!n){vari=o.value.find((function(e){return"rest"===e.value}));returni?i.title:"休息"}if(r){vara=r.name,c=o.value.find((function(e){returne.name===a}));returnc?c.title:a}return""})),c=m((function(){if(r.value){vare=o.value.find((function(e){returne.value===r.value}));if(e)returne.title}return""})),s=function(){vart=u(i().m((functiont(n){varc,u;returni().w((function(t){for(;;)switch(t.n){case0:if(e.value){t.n=1;break}returnt.a(2);case1:c=e.controller,(u=o.value.find((function(e){returne.value===n}))).title===a.value?(r.value="",c.removeCheckInData(e.value.id)):(r.value=n,c.setCheckInData(e.value.id,{id:e.value.id,workday:"rest"!==n?1:0,choose_shift:u.origin}));case2:returnt.a(2)}}),t)})));returnfunction(e){returnt.apply(this,arguments)}}();return{ns:n,curValue:a,selectValue:c,items:o,selected:r,handleClick:s}},render:function(){vare=this;if(this.value){vart=this.selectValue||this.curValue;returny("i-dropdown",{on:{"on-click":function(t){returne.handleClick(t)}},class:[this.ns.b(),this.ns.m("dropdown"),this.ns.is("active",!!this.selected),this.ns.is("manual",this.value.manual)],attrs:{"transfer-class-name":this.ns.b("popper"),transfer:!0,trigger:"click"}},[y("div",{class:this.ns.e("caption")},[t.replace(/\(.*\)/g,"")]),y("i-dropdownMenu",{slot:"list"},[this.items.map((function(t){returny("i-dropdown-item",{class:[e.ns.e("item")],attrs:{title:t.title,name:t.value,disabled:t.title===(e.selectValue||e.curValue)}},[t.title])}))])])}}}),oe=f((functione(){s(this,e),k(this,"component","CheckinGridControl")}));e("default",{mateUrl:r.meta.url,install:function(e){H.loadStyle(["/style.css"]),e.component("CustomCheckboxList",K),ibiz.register.editor.register("EDITOR_CUSTOMSTYLE_CUSTOM_CHECKBOX_LIST",newX),e.component("SearchFormDynamic",Y),ibiz.register.control.register("SEARCHFORM_RENDER_DYNAMIC",new$),e.component("DataViewExpView",J),ibiz.register.view.register("DELISTEXPVIEW_CARD",newQ),e.component("CheckinGridControl",ne),e.component("CheckInGridColumn",re),ibiz.register.control.register("GRID_RENDER_CHECKIN",newoe)}})}}}))}();