mooho-base-admin-plus 2.10.47 → 2.10.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/history.md
CHANGED
|
@@ -7590,7 +7590,9 @@ const showFormat = {}, mixinPage = {
|
|
|
7590
7590
|
}
|
|
7591
7591
|
if (s === "DateTime")
|
|
7592
7592
|
return (l || "").trim() ? format$6(new Date(d), l) : format$6(new Date(d), "yyyy-MM-dd");
|
|
7593
|
-
if (s === "Integer")
|
|
7593
|
+
if (s === "Integer") {
|
|
7594
|
+
if (l === "Thousand")
|
|
7595
|
+
return this.formatThousand(d);
|
|
7594
7596
|
if ((l || "").trim()) {
|
|
7595
7597
|
let f = null;
|
|
7596
7598
|
try {
|
|
@@ -7601,7 +7603,7 @@ const showFormat = {}, mixinPage = {
|
|
|
7601
7603
|
return f;
|
|
7602
7604
|
} else
|
|
7603
7605
|
return d;
|
|
7604
|
-
else {
|
|
7606
|
+
} else {
|
|
7605
7607
|
if (s === "Decimal" || s === "Float" || s === "Double")
|
|
7606
7608
|
return d = parseFloat(d), l === "Money" ? this.formatThousand(d.toFixed(2)) : l === "Thousand" ? this.formatThousand(this.keepDecimal(d, c, u)) : l === "Percent" ? this.keepDecimal(d, c, u) + "%" : this.keepDecimal(d, c, u);
|
|
7607
7609
|
if (s === "Boolean")
|
|
@@ -100,7 +100,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
100
100
|
`):setInnerHtml(a,iconContent({question:"?",warning:"!",info:"i"}[r.icon]))},iconContent=a=>`<div class="${swalClasses["icon-content"]}">${a}</div>`,renderImage=(a,r)=>{const o=getImage();if(!r.imageUrl)return hide(o);show(o,""),o.setAttribute("src",r.imageUrl),o.setAttribute("alt",r.imageAlt),applyNumericalStyle(o,"width",r.imageWidth),applyNumericalStyle(o,"height",r.imageHeight),o.className=swalClasses.image,applyCustomClass(o,r,"image")};let currentSteps=[];const queue$1=function(a){const r=this;currentSteps=a;const o=(l,u)=>{currentSteps=[],l(u)},s=[];return new Promise(l=>{(function u(c,d){c<currentSteps.length?(document.body.setAttribute("data-swal2-queue-step",c),r.fire(currentSteps[c]).then(h=>{typeof h.value<"u"?(s.push(h.value),u(c+1)):o(l,{dismiss:h.dismiss})})):o(l,{value:s})})(0)})},getQueueStep=()=>getContainer()&&getContainer().getAttribute("data-queue-step"),insertQueueStep=(a,r)=>r&&r<currentSteps.length?currentSteps.splice(r,0,a):currentSteps.push(a),deleteQueueStep=a=>{typeof currentSteps[a]<"u"&¤tSteps.splice(a,1)},createStepElement=a=>{const r=document.createElement("li");return addClass$2(r,swalClasses["progress-step"]),setInnerHtml(r,a),r},createLineElement=a=>{const r=document.createElement("li");return addClass$2(r,swalClasses["progress-step-line"]),a.progressStepsDistance&&(r.style.width=a.progressStepsDistance),r},renderProgressSteps=(a,r)=>{const o=getProgressSteps$1();if(!r.progressSteps||r.progressSteps.length===0)return hide(o);show(o),o.textContent="";const s=parseInt(r.currentProgressStep===void 0?getQueueStep():r.currentProgressStep);s>=r.progressSteps.length&&warn$5("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),r.progressSteps.forEach((l,u)=>{const c=createStepElement(l);if(o.appendChild(c),u===s&&addClass$2(c,swalClasses["active-progress-step"]),u!==r.progressSteps.length-1){const d=createLineElement(r);o.appendChild(d)}})},renderTitle$1=(a,r)=>{const o=getTitle();toggle(o,r.title||r.titleText),r.title&&parseHtmlToContainer(r.title,o),r.titleText&&(o.innerText=r.titleText),applyCustomClass(o,r,"title")},renderHeader=(a,r)=>{const o=getHeader();applyCustomClass(o,r,"header"),renderProgressSteps(a,r),renderIcon(a,r),renderImage(a,r),renderTitle$1(a,r),renderCloseButton(a,r)},renderPopup=(a,r)=>{const o=getPopup();applyNumericalStyle(o,"width",r.width),applyNumericalStyle(o,"padding",r.padding),r.background&&(o.style.background=r.background),addClasses$1(o,r)},addClasses$1=(a,r)=>{a.className=`${swalClasses.popup} ${isVisible$2(a)?r.showClass.popup:""}`,r.toast?(addClass$2([document.documentElement,document.body],swalClasses["toast-shown"]),addClass$2(a,swalClasses.toast)):addClass$2(a,swalClasses.modal),applyCustomClass(a,r,"popup"),typeof r.customClass=="string"&&addClass$2(a,r.customClass),r.icon&&addClass$2(a,swalClasses[`icon-${r.icon}`])},render$2=(a,r)=>{renderPopup(a,r),renderContainer(a,r),renderHeader(a,r),renderContent(a,r),renderActions(a,r),renderFooter(a,r),typeof r.onRender=="function"&&r.onRender(getPopup())},isVisible$1=()=>isVisible$2(getPopup()),clickConfirm=()=>getConfirmButton()&&getConfirmButton().click(),clickCancel=()=>getCancelButton()&&getCancelButton().click();function fire(...a){const r=this;return new r(...a)}function mixin$3(a){class r extends this{_main(s){return super._main(Object.assign({},a,s))}}return r}const showLoading=()=>{let a=getPopup();a||Swal.fire(),a=getPopup();const r=getActions(),o=getConfirmButton();show(r),show(o,"inline-block"),addClass$2([a,r],swalClasses.loading),o.disabled=!0,a.setAttribute("data-loading",!0),a.setAttribute("aria-busy",!0),a.focus()},RESTORE_FOCUS_TIMEOUT=100,globalState$3={},focusPreviousActiveElement=()=>{globalState$3.previousActiveElement&&globalState$3.previousActiveElement.focus?(globalState$3.previousActiveElement.focus(),globalState$3.previousActiveElement=null):document.body&&document.body.focus()},restoreActiveElement=()=>new Promise(a=>{const r=window.scrollX,o=window.scrollY;globalState$3.restoreFocusTimeout=setTimeout(()=>{focusPreviousActiveElement(),a()},RESTORE_FOCUS_TIMEOUT),typeof r<"u"&&typeof o<"u"&&window.scrollTo(r,o)}),getTimerLeft=()=>globalState$3.timeout&&globalState$3.timeout.getTimerLeft(),stopTimer=()=>{if(globalState$3.timeout)return stopTimerProgressBar(),globalState$3.timeout.stop()},resumeTimer=()=>{if(globalState$3.timeout){const a=globalState$3.timeout.start();return animateTimerProgressBar(a),a}},toggleTimer=()=>{const a=globalState$3.timeout;return a&&(a.running?stopTimer():resumeTimer())},increaseTimer=a=>{if(globalState$3.timeout){const r=globalState$3.timeout.increase(a);return animateTimerProgressBar(r,!0),r}},isTimerRunning=()=>globalState$3.timeout&&globalState$3.timeout.isRunning(),defaultParams={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconHtml:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:void 0,target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,onRender:void 0,onClose:void 0,onAfterClose:void 0,onDestroy:void 0,scrollbarPadding:!0},updatableParams=["allowEscapeKey","allowOutsideClick","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","footer","hideClass","html","icon","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","text","title","titleText"],deprecatedParams={animation:'showClass" and "hideClass'},toastIncompatibleParams=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],isValidParameter=a=>Object.prototype.hasOwnProperty.call(defaultParams,a),isUpdatableParameter=a=>updatableParams.indexOf(a)!==-1,isDeprecatedParameter=a=>deprecatedParams[a],checkIfParamIsValid=a=>{isValidParameter(a)||warn$5(`Unknown parameter "${a}"`)},checkIfToastParamIsValid=a=>{toastIncompatibleParams.includes(a)&&warn$5(`The parameter "${a}" is incompatible with toasts`)},checkIfParamIsDeprecated=a=>{isDeprecatedParameter(a)&&warnAboutDepreation(a,isDeprecatedParameter(a))},showWarningsForParams=a=>{for(const r in a)checkIfParamIsValid(r),a.toast&&checkIfToastParamIsValid(r),checkIfParamIsDeprecated(r)},staticMethods=Object.freeze(Object.defineProperty({__proto__:null,argsToParams,clickCancel,clickConfirm,deleteQueueStep,enableLoading:showLoading,fire,getActions,getCancelButton,getCloseButton,getConfirmButton,getContainer,getContent,getFocusableElements,getFooter,getHeader,getHtmlContainer,getIcon,getIcons,getImage,getPopup,getQueueStep,getTimerLeft,getTimerProgressBar,getTitle,getValidationMessage,increaseTimer,insertQueueStep,isDeprecatedParameter,isLoading,isTimerRunning,isUpdatableParameter,isValidParameter,isVisible:isVisible$1,mixin:mixin$3,queue:queue$1,resumeTimer,showLoading,stopTimer,toggleTimer},Symbol.toStringTag,{value:"Module"}));function hideLoading(){const a=privateProps.innerParams.get(this);if(!a)return;const r=privateProps.domCache.get(this);a.showConfirmButton||(hide(r.confirmButton),a.showCancelButton||hide(r.actions)),removeClass$2([r.popup,r.actions],swalClasses.loading),r.popup.removeAttribute("aria-busy"),r.popup.removeAttribute("data-loading"),r.confirmButton.disabled=!1,r.cancelButton.disabled=!1}function getInput(a){const r=privateProps.innerParams.get(a||this),o=privateProps.domCache.get(a||this);return o?getInput$1(o.content,r.input):null}const fixScrollbar=()=>{states.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(states.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${states.previousBodyPadding+measureScrollbar()}px`)},undoScrollbar=()=>{states.previousBodyPadding!==null&&(document.body.style.paddingRight=`${states.previousBodyPadding}px`,states.previousBodyPadding=null)},iOSfix=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!hasClass$2(document.body,swalClasses.iosfix)){const r=document.body.scrollTop;document.body.style.top=`${r*-1}px`,addClass$2(document.body,swalClasses.iosfix),lockBodyScroll(),addBottomPaddingForTallPopups()}},addBottomPaddingForTallPopups=()=>{!navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)&&getPopup().scrollHeight>window.innerHeight-44&&(getContainer().style.paddingBottom="44px")},lockBodyScroll=()=>{const a=getContainer();let r;a.ontouchstart=o=>{r=shouldPreventTouchMove(o.target)},a.ontouchmove=o=>{r&&(o.preventDefault(),o.stopPropagation())}},shouldPreventTouchMove=a=>{const r=getContainer();return a===r||!isScrollable(r)&&a.tagName!=="INPUT"&&!(isScrollable(getContent())&&getContent().contains(a))},undoIOSfix=()=>{if(hasClass$2(document.body,swalClasses.iosfix)){const a=parseInt(document.body.style.top,10);removeClass$2(document.body,swalClasses.iosfix),document.body.style.top="",document.body.scrollTop=a*-1}},isIE11=()=>!!window.MSInputMethodContext&&!!document.documentMode,fixVerticalPositionIE=()=>{const a=getContainer(),r=getPopup();a.style.removeProperty("align-items"),r.offsetTop<0&&(a.style.alignItems="flex-start")},IEfix=()=>{typeof window<"u"&&isIE11()&&(fixVerticalPositionIE(),window.addEventListener("resize",fixVerticalPositionIE))},undoIEfix=()=>{typeof window<"u"&&isIE11()&&window.removeEventListener("resize",fixVerticalPositionIE)},setAriaHidden=()=>{toArray$2(document.body.children).forEach(r=>{r===getContainer()||contains(r,getContainer())||(r.hasAttribute("aria-hidden")&&r.setAttribute("data-previous-aria-hidden",r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))})},unsetAriaHidden=()=>{toArray$2(document.body.children).forEach(r=>{r.hasAttribute("data-previous-aria-hidden")?(r.setAttribute("aria-hidden",r.getAttribute("data-previous-aria-hidden")),r.removeAttribute("data-previous-aria-hidden")):r.removeAttribute("aria-hidden")})},privateMethods={swalPromiseResolve:new WeakMap};function removePopupAndResetState(a,r,o,s){o?triggerOnAfterCloseAndDispose(a,s):(restoreActiveElement().then(()=>triggerOnAfterCloseAndDispose(a,s)),globalState$3.keydownTarget.removeEventListener("keydown",globalState$3.keydownHandler,{capture:globalState$3.keydownListenerCapture}),globalState$3.keydownHandlerAdded=!1),r.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&r.parentNode.removeChild(r),isModal()&&(undoScrollbar(),undoIOSfix(),undoIEfix(),unsetAriaHidden()),removeBodyClasses()}function removeBodyClasses(){removeClass$2([document.documentElement,document.body],[swalClasses.shown,swalClasses["height-auto"],swalClasses["no-backdrop"],swalClasses["toast-shown"],swalClasses["toast-column"]])}function close(a){const r=getPopup();if(!r)return;const o=privateProps.innerParams.get(this);if(!o||hasClass$2(r,o.hideClass.popup))return;const s=privateMethods.swalPromiseResolve.get(this);removeClass$2(r,o.showClass.popup),addClass$2(r,o.hideClass.popup);const l=getContainer();removeClass$2(l,o.showClass.backdrop),addClass$2(l,o.hideClass.backdrop),handlePopupAnimation(this,r,o),typeof a<"u"?(a.isDismissed=typeof a.dismiss<"u",a.isConfirmed=typeof a.dismiss>"u"):a={isDismissed:!0,isConfirmed:!1},s(a||{})}const handlePopupAnimation=(a,r,o)=>{const s=getContainer(),l=animationEndEvent&&hasCssAnimation(r),{onClose:u,onAfterClose:c}=o;u!==null&&typeof u=="function"&&u(r),l?animatePopup(a,r,s,c):removePopupAndResetState(a,s,isToast(),c)},animatePopup=(a,r,o,s)=>{globalState$3.swalCloseEventFinishedCallback=removePopupAndResetState.bind(null,a,o,isToast(),s),r.addEventListener(animationEndEvent,function(l){l.target===r&&(globalState$3.swalCloseEventFinishedCallback(),delete globalState$3.swalCloseEventFinishedCallback)})},triggerOnAfterCloseAndDispose=(a,r)=>{setTimeout(()=>{typeof r=="function"&&r(),a._destroy()})};function setButtonsDisabled(a,r,o){const s=privateProps.domCache.get(a);r.forEach(l=>{s[l].disabled=o})}function setInputDisabled(a,r){if(!a)return!1;if(a.type==="radio"){const s=a.parentNode.parentNode.querySelectorAll("input");for(let l=0;l<s.length;l++)s[l].disabled=r}else a.disabled=r}function enableButtons(){setButtonsDisabled(this,["confirmButton","cancelButton"],!1)}function disableButtons(){setButtonsDisabled(this,["confirmButton","cancelButton"],!0)}function enableInput(){return setInputDisabled(this.getInput(),!1)}function disableInput(){return setInputDisabled(this.getInput(),!0)}function showValidationMessage(a){const r=privateProps.domCache.get(this);setInnerHtml(r.validationMessage,a);const o=window.getComputedStyle(r.popup);r.validationMessage.style.marginLeft=`-${o.getPropertyValue("padding-left")}`,r.validationMessage.style.marginRight=`-${o.getPropertyValue("padding-right")}`,show(r.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedBy",swalClasses["validation-message"]),focusInput(s),addClass$2(s,swalClasses.inputerror))}function resetValidationMessage(){const a=privateProps.domCache.get(this);a.validationMessage&&hide(a.validationMessage);const r=this.getInput();r&&(r.removeAttribute("aria-invalid"),r.removeAttribute("aria-describedBy"),removeClass$2(r,swalClasses.inputerror))}function getProgressSteps(){return privateProps.domCache.get(this).progressSteps}class Timer{constructor(r,o){this.callback=r,this.remaining=o,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}increase(r){const o=this.running;return o&&this.stop(),this.remaining+=r,o&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const defaultInputValidators={email:(a,r)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(a)?Promise.resolve():Promise.resolve(r||"Invalid email address"),url:(a,r)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(a)?Promise.resolve():Promise.resolve(r||"Invalid URL")};function setDefaultInputValidators(a){a.inputValidator||Object.keys(defaultInputValidators).forEach(r=>{a.input===r&&(a.inputValidator=defaultInputValidators[r])})}function validateCustomTargetElement(a){(!a.target||typeof a.target=="string"&&!document.querySelector(a.target)||typeof a.target!="string"&&!a.target.appendChild)&&(warn$5('Target parameter is not valid, defaulting to "body"'),a.target="body")}function setParameters(a){setDefaultInputValidators(a),a.showLoaderOnConfirm&&!a.preConfirm&&warn$5(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
|
|
101
101
|
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
102
102
|
https://sweetalert2.github.io/#ajax-request`),a.animation=callIfFunction(a.animation),validateCustomTargetElement(a),typeof a.title=="string"&&(a.title=a.title.split(`
|
|
103
|
-
`).join("<br />")),init$3(a)}const openPopup=a=>{const r=getContainer(),o=getPopup();typeof a.onBeforeOpen=="function"&&a.onBeforeOpen(o);const l=window.getComputedStyle(document.body).overflowY;addClasses(r,o,a),setScrollingVisibility(r,o),isModal()&&(fixScrollContainer(r,a.scrollbarPadding,l),setAriaHidden()),!isToast()&&!globalState$3.previousActiveElement&&(globalState$3.previousActiveElement=document.activeElement),typeof a.onOpen=="function"&&setTimeout(()=>a.onOpen(o)),removeClass$2(r,swalClasses["no-transition"])};function swalOpenAnimationFinished(a){const r=getPopup();if(a.target!==r)return;const o=getContainer();r.removeEventListener(animationEndEvent,swalOpenAnimationFinished),o.style.overflowY="auto"}const setScrollingVisibility=(a,r)=>{animationEndEvent&&hasCssAnimation(r)?(a.style.overflowY="hidden",r.addEventListener(animationEndEvent,swalOpenAnimationFinished)):a.style.overflowY="auto"},fixScrollContainer=(a,r,o)=>{iOSfix(),IEfix(),r&&o!=="hidden"&&fixScrollbar(),setTimeout(()=>{a.scrollTop=0})},addClasses=(a,r,o)=>{addClass$2(a,o.showClass.backdrop),show(r),addClass$2(r,o.showClass.popup),addClass$2([document.documentElement,document.body],swalClasses.shown),o.heightAuto&&o.backdrop&&!o.toast&&addClass$2([document.documentElement,document.body],swalClasses["height-auto"])},handleInputOptionsAndValue=(a,r)=>{r.input==="select"||r.input==="radio"?handleInputOptions(a,r):["text","email","number","tel","textarea"].includes(r.input)&&(hasToPromiseFn(r.inputValue)||isPromise$2(r.inputValue))&&handleInputValue(a,r)},getInputValue=(a,r)=>{const o=a.getInput();if(!o)return null;switch(r.input){case"checkbox":return getCheckboxValue(o);case"radio":return getRadioValue(o);case"file":return getFileValue(o);default:return r.inputAutoTrim?o.value.trim():o.value}},getCheckboxValue=a=>a.checked?1:0,getRadioValue=a=>a.checked?a.value:null,getFileValue=a=>a.files.length?a.getAttribute("multiple")!==null?a.files:a.files[0]:null,handleInputOptions=(a,r)=>{const o=getContent(),s=l=>populateInputOptions[r.input](o,formatInputOptions(l),r);hasToPromiseFn(r.inputOptions)||isPromise$2(r.inputOptions)?(showLoading(),asPromise(r.inputOptions).then(l=>{a.hideLoading(),s(l)})):typeof r.inputOptions=="object"?s(r.inputOptions):error$2(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof r.inputOptions}`)},handleInputValue=(a,r)=>{const o=a.getInput();hide(o),asPromise(r.inputValue).then(s=>{o.value=r.input==="number"?parseFloat(s)||0:`${s}`,show(o),o.focus(),a.hideLoading()}).catch(s=>{error$2(`Error in inputValue promise: ${s}`),o.value="",show(o),o.focus(),a.hideLoading()})},populateInputOptions={select:(a,r,o)=>{const s=getChildByClass(a,swalClasses.select),l=(u,c,d)=>{const h=document.createElement("option");h.value=d,setInnerHtml(h,c),o.inputValue.toString()===d.toString()&&(h.selected=!0),u.appendChild(h)};r.forEach(u=>{const c=u[0],d=u[1];if(Array.isArray(d)){const h=document.createElement("optgroup");h.label=c,h.disabled=!1,s.appendChild(h),d.forEach(f=>l(h,f[1],f[0]))}else l(s,d,c)}),s.focus()},radio:(a,r,o)=>{const s=getChildByClass(a,swalClasses.radio);r.forEach(u=>{const c=u[0],d=u[1],h=document.createElement("input"),f=document.createElement("label");h.type="radio",h.name=swalClasses.radio,h.value=c,o.inputValue.toString()===c.toString()&&(h.checked=!0);const p=document.createElement("span");setInnerHtml(p,d),p.className=swalClasses.label,f.appendChild(h),f.appendChild(p),s.appendChild(f)});const l=s.querySelectorAll("input");l.length&&l[0].focus()}},formatInputOptions=a=>{const r=[];return typeof Map<"u"&&a instanceof Map?a.forEach((o,s)=>{let l=o;typeof l=="object"&&(l=formatInputOptions(l)),r.push([s,l])}):Object.keys(a).forEach(o=>{let s=a[o];typeof s=="object"&&(s=formatInputOptions(s)),r.push([o,s])}),r},handleConfirmButtonClick=(a,r)=>{a.disableButtons(),r.input?handleConfirmWithInput(a,r):confirm(a,r,!0)},handleCancelButtonClick=(a,r)=>{a.disableButtons(),r(DismissReason.cancel)},handleConfirmWithInput=(a,r)=>{const o=getInputValue(a,r);r.inputValidator?(a.disableInput(),Promise.resolve().then(()=>asPromise(r.inputValidator(o,r.validationMessage))).then(l=>{a.enableButtons(),a.enableInput(),l?a.showValidationMessage(l):confirm(a,r,o)})):a.getInput().checkValidity()?confirm(a,r,o):(a.enableButtons(),a.showValidationMessage(r.validationMessage))},succeedWith=(a,r)=>{a.closePopup({value:r})},confirm=(a,r,o)=>{r.showLoaderOnConfirm&&showLoading(),r.preConfirm?(a.resetValidationMessage(),Promise.resolve().then(()=>asPromise(r.preConfirm(o,r.validationMessage))).then(l=>{isVisible$2(getValidationMessage())||l===!1?a.hideLoading():succeedWith(a,typeof l>"u"?o:l)})):succeedWith(a,o)},addKeydownHandler=(a,r,o,s)=>{r.keydownTarget&&r.keydownHandlerAdded&&(r.keydownTarget.removeEventListener("keydown",r.keydownHandler,{capture:r.keydownListenerCapture}),r.keydownHandlerAdded=!1),o.toast||(r.keydownHandler=l=>keydownHandler(a,l,s),r.keydownTarget=o.keydownListenerCapture?window:getPopup(),r.keydownListenerCapture=o.keydownListenerCapture,r.keydownTarget.addEventListener("keydown",r.keydownHandler,{capture:r.keydownListenerCapture}),r.keydownHandlerAdded=!0)},setFocus=(a,r,o)=>{const s=getFocusableElements();for(let l=0;l<s.length;l++)return r=r+o,r===s.length?r=0:r===-1&&(r=s.length-1),s[r].focus();getPopup().focus()},arrowKeys=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"],escKeys=["Escape","Esc"],keydownHandler=(a,r,o)=>{const s=privateProps.innerParams.get(a);s.stopKeydownPropagation&&r.stopPropagation(),r.key==="Enter"?handleEnter(a,r,s):r.key==="Tab"?handleTab(r,s):arrowKeys.includes(r.key)?handleArrows():escKeys.includes(r.key)&&handleEsc(r,s,o)},handleEnter=(a,r,o)=>{if(!r.isComposing&&r.target&&a.getInput()&&r.target.outerHTML===a.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;clickConfirm(),r.preventDefault()}},handleTab=(a,r)=>{const o=a.target,s=getFocusableElements();let l=-1;for(let u=0;u<s.length;u++)if(o===s[u]){l=u;break}a.shiftKey?setFocus(r,l,-1):setFocus(r,l,1),a.stopPropagation(),a.preventDefault()},handleArrows=()=>{const a=getConfirmButton(),r=getCancelButton();document.activeElement===a&&isVisible$2(r)?r.focus():document.activeElement===r&&isVisible$2(a)&&a.focus()},handleEsc=(a,r,o)=>{callIfFunction(r.allowEscapeKey)&&(a.preventDefault(),o(DismissReason.esc))},handlePopupClick=(a,r,o)=>{privateProps.innerParams.get(a).toast?handleToastClick(a,r,o):(handleModalMousedown(r),handleContainerMousedown(r),handleModalClick(a,r,o))},handleToastClick=(a,r,o)=>{r.popup.onclick=()=>{const s=privateProps.innerParams.get(a);s.showConfirmButton||s.showCancelButton||s.showCloseButton||s.input||o(DismissReason.close)}};let ignoreOutsideClick=!1;const handleModalMousedown=a=>{a.popup.onmousedown=()=>{a.container.onmouseup=function(r){a.container.onmouseup=void 0,r.target===a.container&&(ignoreOutsideClick=!0)}}},handleContainerMousedown=a=>{a.container.onmousedown=()=>{a.popup.onmouseup=function(r){a.popup.onmouseup=void 0,(r.target===a.popup||a.popup.contains(r.target))&&(ignoreOutsideClick=!0)}}},handleModalClick=(a,r,o)=>{r.container.onclick=s=>{const l=privateProps.innerParams.get(a);if(ignoreOutsideClick){ignoreOutsideClick=!1;return}s.target===r.container&&callIfFunction(l.allowOutsideClick)&&o(DismissReason.backdrop)}};function _main(a){showWarningsForParams(a),globalState$3.currentInstance&&globalState$3.currentInstance._destroy(),globalState$3.currentInstance=this;const r=prepareParams(a);setParameters(r),Object.freeze(r),globalState$3.timeout&&(globalState$3.timeout.stop(),delete globalState$3.timeout),clearTimeout(globalState$3.restoreFocusTimeout);const o=populateDomCache(this);return render$2(this,r),privateProps.innerParams.set(this,r),swalPromise(this,o,r)}const prepareParams=a=>{const r=Object.assign({},defaultParams.showClass,a.showClass),o=Object.assign({},defaultParams.hideClass,a.hideClass),s=Object.assign({},defaultParams,a);return s.showClass=r,s.hideClass=o,a.animation===!1&&(s.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"},s.hideClass={}),s},swalPromise=(a,r,o)=>new Promise(s=>{const l=u=>{a.closePopup({dismiss:u})};privateMethods.swalPromiseResolve.set(a,s),r.confirmButton.onclick=()=>handleConfirmButtonClick(a,o),r.cancelButton.onclick=()=>handleCancelButtonClick(a,l),r.closeButton.onclick=()=>l(DismissReason.close),handlePopupClick(a,r,l),addKeydownHandler(a,globalState$3,o,l),o.toast&&(o.input||o.footer||o.showCloseButton)?addClass$2(document.body,swalClasses["toast-column"]):removeClass$2(document.body,swalClasses["toast-column"]),handleInputOptionsAndValue(a,o),openPopup(o),setupTimer(globalState$3,o,l),initFocus(r,o),setTimeout(()=>{r.container.scrollTop=0})}),populateDomCache=a=>{const r={popup:getPopup(),container:getContainer(),content:getContent(),actions:getActions(),confirmButton:getConfirmButton(),cancelButton:getCancelButton(),closeButton:getCloseButton(),validationMessage:getValidationMessage(),progressSteps:getProgressSteps$1()};return privateProps.domCache.set(a,r),r},setupTimer=(a,r,o)=>{const s=getTimerProgressBar();hide(s),r.timer&&(a.timeout=new Timer(()=>{o("timer"),delete a.timeout},r.timer),r.timerProgressBar&&(show(s),setTimeout(()=>{a.timeout.running&&animateTimerProgressBar(r.timer)})))},initFocus=(a,r)=>{if(!r.toast){if(!callIfFunction(r.allowEnterKey))return blurActiveElement();if(r.focusCancel&&isVisible$2(a.cancelButton))return a.cancelButton.focus();if(r.focusConfirm&&isVisible$2(a.confirmButton))return a.confirmButton.focus();setFocus(r,-1,1)}},blurActiveElement=()=>{document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};function update(a){const r=getPopup(),o=privateProps.innerParams.get(this);if(!r||hasClass$2(r,o.hideClass.popup))return warn$5("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const s={};Object.keys(a).forEach(u=>{Swal.isUpdatableParameter(u)?s[u]=a[u]:warn$5(`Invalid parameter to update: "${u}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js`)});const l=Object.assign({},o,s);render$2(this,l),privateProps.innerParams.set(this,l),Object.defineProperties(this,{params:{value:Object.assign({},this.params,a),writable:!1,enumerable:!0}})}function _destroy(){const a=privateProps.domCache.get(this),r=privateProps.innerParams.get(this);r&&(a.popup&&globalState$3.swalCloseEventFinishedCallback&&(globalState$3.swalCloseEventFinishedCallback(),delete globalState$3.swalCloseEventFinishedCallback),globalState$3.deferDisposalTimer&&(clearTimeout(globalState$3.deferDisposalTimer),delete globalState$3.deferDisposalTimer),typeof r.onDestroy=="function"&&r.onDestroy(),disposeSwal(this))}const disposeSwal=a=>{delete a.params,delete globalState$3.keydownHandler,delete globalState$3.keydownTarget,unsetWeakMaps(privateProps),unsetWeakMaps(privateMethods)},unsetWeakMaps=a=>{for(const r in a)a[r]=new WeakMap},instanceMethods=Object.freeze(Object.defineProperty({__proto__:null,_destroy,_main,close,closeModal:close,closePopup:close,closeToast:close,disableButtons,disableInput,disableLoading:hideLoading,enableButtons,enableInput,getInput,getProgressSteps,hideLoading,resetValidationMessage,showValidationMessage,update},Symbol.toStringTag,{value:"Module"}));let currentInstance;class SweetAlert{constructor(...r){if(typeof window>"u")return;typeof Promise>"u"&&error$2("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),currentInstance=this;const o=Object.freeze(this.constructor.argsToParams(r));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});const s=this._main(this.params);privateProps.promise.set(this,s)}then(r){return privateProps.promise.get(this).then(r)}finally(r){return privateProps.promise.get(this).finally(r)}}if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const a=new Date,r=localStorage.getItem("swal-initiation");r?(a.getTime()-Date.parse(r))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const o=document.createElement("audio");o.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",o.loop=!0,document.body.appendChild(o),setTimeout(()=>{o.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${a}`)}Object.assign(SweetAlert.prototype,instanceMethods),Object.assign(SweetAlert,staticMethods),Object.keys(instanceMethods).forEach(a=>{SweetAlert[a]=function(...r){if(currentInstance)return currentInstance[a](...r)}}),SweetAlert.DismissReason=DismissReason,SweetAlert.version="9.17.2";const Swal=SweetAlert;Swal.default=Swal;const showFormat={},mixinPage={data(){return{grid4:{xxl:4,xl:4,lg:4,md:6,sm:12,xs:24},grid6:{xxl:6,xl:6,lg:8,md:12,sm:12,xs:24},grid8:{xxl:8,xl:8,lg:8,md:12,sm:24,xs:24},grid12:{xxl:12,xl:12,lg:12,md:12,sm:24,xs:24},grid16:{xxl:16,xl:16,lg:16,md:24,sm:24,xs:24},grid18:{xxl:18,xl:18,lg:18,md:24,sm:24,xs:24},grid24:{xxl:24,xl:24,lg:24,md:24,sm:24,xs:24}}},computed:{...mapState("admin/user",["info"]),...mapState("admin/cache",["userNames","enums","dicts","caches"]),...mapState("admin/menu",["userPermissions"]),rootPath(){return"admin".trim()?"/admin/static/":"/static/"},sysInfo(){return Setting.info},layout(){return Setting.layout},apiBaseURL(){return window.$mode==="development"?Setting.apiBaseURL.dev:Setting.apiBaseURL.prd},uploadURL(){return this.apiBaseURL+"api/Attachment/add"},uploadHeaders(){return{Authorization:"Bearer "+util$2.cookies.get("token")}}},methods:{...mapActions("admin/cache",["loadEnum","loadDict","loadUserName","loadCache"]),...mapMutations("admin/loader",{enableLoader:"enable"}),...mapMutations("admin/loader",{disableLoader:"disable"}),copy(a){return lodashExports.cloneDeep(a)},allow(a){if(a.startsWith("permission/"))return this.userPermissions[a];{let r=this.$router.currentRoute.value.fullPath.substr(1).split("?")[0];if(this.userPermissions[r+"$"+a]==!0)return!0;let o=Object.keys(this.userPermissions).filter(s=>s.startsWith(r+"$")).length;return this.userPermissions[r]==!0&&o==0}},getCache(a,r){return this.loadCache(a),this.caches[a].find(o=>o.id==r)},getCacheList(a){return this.loadCache(a),this.caches[a]},getEnum(a,r){return this.loadEnum(a),r==null?null:this.layout.showI18n?this.$t("Enum_"+a+"_"+r):this.enums[a][r]},getEnumList(a){return this.loadEnum(a),Object.keys(this.enums[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Enum_"+a+"_"+r)}:{id:r,name:this.enums[a][r]})},getDict(a,r){return this.loadDict(a),r==null?null:this.layout.showI18n?this.$t("Dict_"+a+"_"+r):this.dicts[a][r]},getDictList(a){return this.loadDict(a),Object.keys(this.dicts[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Dict_"+a+"_"+r)}:{id:r,name:this.dicts[a][r]})},getUserName(a){return this.loadUserName(a),this.userNames[a]},getAttachmentUrl(a,r){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/get?file="+encodeURIComponent(a)+"&name="+encodeURIComponent(r):null},fileDownload(a,r){let o=this.getAttachmentUrl(a,r);o&&(window.location.href=o)},getImgUrl(a){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/getImage?file="+encodeURIComponent(a):this.rootPath+"images/no-image.png"},showData(a,r){let o=r.code,s=r.dataType,l=r.displayFormat,u=r.digit,c=r.fixedDigit;if(!s)return null;if(s.startsWith("Enum:"))return this.getEnum(s.replace("Enum:",""),this.parseData(a,o));if(s==="BigInteger"&&l=="User")return this.getUserName(this.parseData(a,o));let d=this.parseData(a,o);if(d==null)return null;if(showFormat.customFormat){let h=showFormat.customFormat(a,r);if(h!=null)return h}if(s==="DateTime")return(l||"").trim()?format$6(new Date(d),l):format$6(new Date(d),"yyyy-MM-dd");if(s==="Integer")if((l||"").trim()){let h=null;try{h=format$6(new Date(d*1e3),l)}catch(f){console.log(f,d)}return h}else return d;else{if(s==="Decimal"||s==="Float"||s==="Double")return d=parseFloat(d),l==="Money"?this.formatThousand(d.toFixed(2)):l==="Thousand"?this.formatThousand(this.keepDecimal(d,u,c)):l==="Percent"?this.keepDecimal(d,u,c)+"%":this.keepDecimal(d,u,c);if(s==="Boolean")return l==="Y"?d?'<i class="fa fa-check info"></i>':"":l==="YN"?d?'<i class="fa fa-check"></i>':'<i class="fa fa-times"></i>':l==="Disabled"?d?'<i class="fa fa-ban error"></i>':"":l==="Valid"?d?'<i class="fa fa-check success"></i>':"":l==="Attention"?d?'<i class="fa fa-exclamation error"></i>':"":d?'<i class="fa fa-check info"></i>':"";if(s==="String")if(l==="Array"){let h="";try{h=JSON.parse(d).join(", ")}catch(f){console.log(f,d)}return h}else if((l||"").trim()){let h=null;try{h=format$6(new Date(parseInt(d)*1e3),l)}catch(f){console.log(f,d)}return h}else return d.toString().startsWith("`r;")?'<font color="red">'+this.tParam(this.showMultiLine(d.substr(3)))+"</font>":this.tParam(this.showMultiLine(d));else return d}},showMultiLine(a){return typeof a=="string"?a.replaceAll(" "," ").replaceAll(`
|
|
103
|
+
`).join("<br />")),init$3(a)}const openPopup=a=>{const r=getContainer(),o=getPopup();typeof a.onBeforeOpen=="function"&&a.onBeforeOpen(o);const l=window.getComputedStyle(document.body).overflowY;addClasses(r,o,a),setScrollingVisibility(r,o),isModal()&&(fixScrollContainer(r,a.scrollbarPadding,l),setAriaHidden()),!isToast()&&!globalState$3.previousActiveElement&&(globalState$3.previousActiveElement=document.activeElement),typeof a.onOpen=="function"&&setTimeout(()=>a.onOpen(o)),removeClass$2(r,swalClasses["no-transition"])};function swalOpenAnimationFinished(a){const r=getPopup();if(a.target!==r)return;const o=getContainer();r.removeEventListener(animationEndEvent,swalOpenAnimationFinished),o.style.overflowY="auto"}const setScrollingVisibility=(a,r)=>{animationEndEvent&&hasCssAnimation(r)?(a.style.overflowY="hidden",r.addEventListener(animationEndEvent,swalOpenAnimationFinished)):a.style.overflowY="auto"},fixScrollContainer=(a,r,o)=>{iOSfix(),IEfix(),r&&o!=="hidden"&&fixScrollbar(),setTimeout(()=>{a.scrollTop=0})},addClasses=(a,r,o)=>{addClass$2(a,o.showClass.backdrop),show(r),addClass$2(r,o.showClass.popup),addClass$2([document.documentElement,document.body],swalClasses.shown),o.heightAuto&&o.backdrop&&!o.toast&&addClass$2([document.documentElement,document.body],swalClasses["height-auto"])},handleInputOptionsAndValue=(a,r)=>{r.input==="select"||r.input==="radio"?handleInputOptions(a,r):["text","email","number","tel","textarea"].includes(r.input)&&(hasToPromiseFn(r.inputValue)||isPromise$2(r.inputValue))&&handleInputValue(a,r)},getInputValue=(a,r)=>{const o=a.getInput();if(!o)return null;switch(r.input){case"checkbox":return getCheckboxValue(o);case"radio":return getRadioValue(o);case"file":return getFileValue(o);default:return r.inputAutoTrim?o.value.trim():o.value}},getCheckboxValue=a=>a.checked?1:0,getRadioValue=a=>a.checked?a.value:null,getFileValue=a=>a.files.length?a.getAttribute("multiple")!==null?a.files:a.files[0]:null,handleInputOptions=(a,r)=>{const o=getContent(),s=l=>populateInputOptions[r.input](o,formatInputOptions(l),r);hasToPromiseFn(r.inputOptions)||isPromise$2(r.inputOptions)?(showLoading(),asPromise(r.inputOptions).then(l=>{a.hideLoading(),s(l)})):typeof r.inputOptions=="object"?s(r.inputOptions):error$2(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof r.inputOptions}`)},handleInputValue=(a,r)=>{const o=a.getInput();hide(o),asPromise(r.inputValue).then(s=>{o.value=r.input==="number"?parseFloat(s)||0:`${s}`,show(o),o.focus(),a.hideLoading()}).catch(s=>{error$2(`Error in inputValue promise: ${s}`),o.value="",show(o),o.focus(),a.hideLoading()})},populateInputOptions={select:(a,r,o)=>{const s=getChildByClass(a,swalClasses.select),l=(u,c,d)=>{const h=document.createElement("option");h.value=d,setInnerHtml(h,c),o.inputValue.toString()===d.toString()&&(h.selected=!0),u.appendChild(h)};r.forEach(u=>{const c=u[0],d=u[1];if(Array.isArray(d)){const h=document.createElement("optgroup");h.label=c,h.disabled=!1,s.appendChild(h),d.forEach(f=>l(h,f[1],f[0]))}else l(s,d,c)}),s.focus()},radio:(a,r,o)=>{const s=getChildByClass(a,swalClasses.radio);r.forEach(u=>{const c=u[0],d=u[1],h=document.createElement("input"),f=document.createElement("label");h.type="radio",h.name=swalClasses.radio,h.value=c,o.inputValue.toString()===c.toString()&&(h.checked=!0);const p=document.createElement("span");setInnerHtml(p,d),p.className=swalClasses.label,f.appendChild(h),f.appendChild(p),s.appendChild(f)});const l=s.querySelectorAll("input");l.length&&l[0].focus()}},formatInputOptions=a=>{const r=[];return typeof Map<"u"&&a instanceof Map?a.forEach((o,s)=>{let l=o;typeof l=="object"&&(l=formatInputOptions(l)),r.push([s,l])}):Object.keys(a).forEach(o=>{let s=a[o];typeof s=="object"&&(s=formatInputOptions(s)),r.push([o,s])}),r},handleConfirmButtonClick=(a,r)=>{a.disableButtons(),r.input?handleConfirmWithInput(a,r):confirm(a,r,!0)},handleCancelButtonClick=(a,r)=>{a.disableButtons(),r(DismissReason.cancel)},handleConfirmWithInput=(a,r)=>{const o=getInputValue(a,r);r.inputValidator?(a.disableInput(),Promise.resolve().then(()=>asPromise(r.inputValidator(o,r.validationMessage))).then(l=>{a.enableButtons(),a.enableInput(),l?a.showValidationMessage(l):confirm(a,r,o)})):a.getInput().checkValidity()?confirm(a,r,o):(a.enableButtons(),a.showValidationMessage(r.validationMessage))},succeedWith=(a,r)=>{a.closePopup({value:r})},confirm=(a,r,o)=>{r.showLoaderOnConfirm&&showLoading(),r.preConfirm?(a.resetValidationMessage(),Promise.resolve().then(()=>asPromise(r.preConfirm(o,r.validationMessage))).then(l=>{isVisible$2(getValidationMessage())||l===!1?a.hideLoading():succeedWith(a,typeof l>"u"?o:l)})):succeedWith(a,o)},addKeydownHandler=(a,r,o,s)=>{r.keydownTarget&&r.keydownHandlerAdded&&(r.keydownTarget.removeEventListener("keydown",r.keydownHandler,{capture:r.keydownListenerCapture}),r.keydownHandlerAdded=!1),o.toast||(r.keydownHandler=l=>keydownHandler(a,l,s),r.keydownTarget=o.keydownListenerCapture?window:getPopup(),r.keydownListenerCapture=o.keydownListenerCapture,r.keydownTarget.addEventListener("keydown",r.keydownHandler,{capture:r.keydownListenerCapture}),r.keydownHandlerAdded=!0)},setFocus=(a,r,o)=>{const s=getFocusableElements();for(let l=0;l<s.length;l++)return r=r+o,r===s.length?r=0:r===-1&&(r=s.length-1),s[r].focus();getPopup().focus()},arrowKeys=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"],escKeys=["Escape","Esc"],keydownHandler=(a,r,o)=>{const s=privateProps.innerParams.get(a);s.stopKeydownPropagation&&r.stopPropagation(),r.key==="Enter"?handleEnter(a,r,s):r.key==="Tab"?handleTab(r,s):arrowKeys.includes(r.key)?handleArrows():escKeys.includes(r.key)&&handleEsc(r,s,o)},handleEnter=(a,r,o)=>{if(!r.isComposing&&r.target&&a.getInput()&&r.target.outerHTML===a.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;clickConfirm(),r.preventDefault()}},handleTab=(a,r)=>{const o=a.target,s=getFocusableElements();let l=-1;for(let u=0;u<s.length;u++)if(o===s[u]){l=u;break}a.shiftKey?setFocus(r,l,-1):setFocus(r,l,1),a.stopPropagation(),a.preventDefault()},handleArrows=()=>{const a=getConfirmButton(),r=getCancelButton();document.activeElement===a&&isVisible$2(r)?r.focus():document.activeElement===r&&isVisible$2(a)&&a.focus()},handleEsc=(a,r,o)=>{callIfFunction(r.allowEscapeKey)&&(a.preventDefault(),o(DismissReason.esc))},handlePopupClick=(a,r,o)=>{privateProps.innerParams.get(a).toast?handleToastClick(a,r,o):(handleModalMousedown(r),handleContainerMousedown(r),handleModalClick(a,r,o))},handleToastClick=(a,r,o)=>{r.popup.onclick=()=>{const s=privateProps.innerParams.get(a);s.showConfirmButton||s.showCancelButton||s.showCloseButton||s.input||o(DismissReason.close)}};let ignoreOutsideClick=!1;const handleModalMousedown=a=>{a.popup.onmousedown=()=>{a.container.onmouseup=function(r){a.container.onmouseup=void 0,r.target===a.container&&(ignoreOutsideClick=!0)}}},handleContainerMousedown=a=>{a.container.onmousedown=()=>{a.popup.onmouseup=function(r){a.popup.onmouseup=void 0,(r.target===a.popup||a.popup.contains(r.target))&&(ignoreOutsideClick=!0)}}},handleModalClick=(a,r,o)=>{r.container.onclick=s=>{const l=privateProps.innerParams.get(a);if(ignoreOutsideClick){ignoreOutsideClick=!1;return}s.target===r.container&&callIfFunction(l.allowOutsideClick)&&o(DismissReason.backdrop)}};function _main(a){showWarningsForParams(a),globalState$3.currentInstance&&globalState$3.currentInstance._destroy(),globalState$3.currentInstance=this;const r=prepareParams(a);setParameters(r),Object.freeze(r),globalState$3.timeout&&(globalState$3.timeout.stop(),delete globalState$3.timeout),clearTimeout(globalState$3.restoreFocusTimeout);const o=populateDomCache(this);return render$2(this,r),privateProps.innerParams.set(this,r),swalPromise(this,o,r)}const prepareParams=a=>{const r=Object.assign({},defaultParams.showClass,a.showClass),o=Object.assign({},defaultParams.hideClass,a.hideClass),s=Object.assign({},defaultParams,a);return s.showClass=r,s.hideClass=o,a.animation===!1&&(s.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"},s.hideClass={}),s},swalPromise=(a,r,o)=>new Promise(s=>{const l=u=>{a.closePopup({dismiss:u})};privateMethods.swalPromiseResolve.set(a,s),r.confirmButton.onclick=()=>handleConfirmButtonClick(a,o),r.cancelButton.onclick=()=>handleCancelButtonClick(a,l),r.closeButton.onclick=()=>l(DismissReason.close),handlePopupClick(a,r,l),addKeydownHandler(a,globalState$3,o,l),o.toast&&(o.input||o.footer||o.showCloseButton)?addClass$2(document.body,swalClasses["toast-column"]):removeClass$2(document.body,swalClasses["toast-column"]),handleInputOptionsAndValue(a,o),openPopup(o),setupTimer(globalState$3,o,l),initFocus(r,o),setTimeout(()=>{r.container.scrollTop=0})}),populateDomCache=a=>{const r={popup:getPopup(),container:getContainer(),content:getContent(),actions:getActions(),confirmButton:getConfirmButton(),cancelButton:getCancelButton(),closeButton:getCloseButton(),validationMessage:getValidationMessage(),progressSteps:getProgressSteps$1()};return privateProps.domCache.set(a,r),r},setupTimer=(a,r,o)=>{const s=getTimerProgressBar();hide(s),r.timer&&(a.timeout=new Timer(()=>{o("timer"),delete a.timeout},r.timer),r.timerProgressBar&&(show(s),setTimeout(()=>{a.timeout.running&&animateTimerProgressBar(r.timer)})))},initFocus=(a,r)=>{if(!r.toast){if(!callIfFunction(r.allowEnterKey))return blurActiveElement();if(r.focusCancel&&isVisible$2(a.cancelButton))return a.cancelButton.focus();if(r.focusConfirm&&isVisible$2(a.confirmButton))return a.confirmButton.focus();setFocus(r,-1,1)}},blurActiveElement=()=>{document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};function update(a){const r=getPopup(),o=privateProps.innerParams.get(this);if(!r||hasClass$2(r,o.hideClass.popup))return warn$5("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const s={};Object.keys(a).forEach(u=>{Swal.isUpdatableParameter(u)?s[u]=a[u]:warn$5(`Invalid parameter to update: "${u}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js`)});const l=Object.assign({},o,s);render$2(this,l),privateProps.innerParams.set(this,l),Object.defineProperties(this,{params:{value:Object.assign({},this.params,a),writable:!1,enumerable:!0}})}function _destroy(){const a=privateProps.domCache.get(this),r=privateProps.innerParams.get(this);r&&(a.popup&&globalState$3.swalCloseEventFinishedCallback&&(globalState$3.swalCloseEventFinishedCallback(),delete globalState$3.swalCloseEventFinishedCallback),globalState$3.deferDisposalTimer&&(clearTimeout(globalState$3.deferDisposalTimer),delete globalState$3.deferDisposalTimer),typeof r.onDestroy=="function"&&r.onDestroy(),disposeSwal(this))}const disposeSwal=a=>{delete a.params,delete globalState$3.keydownHandler,delete globalState$3.keydownTarget,unsetWeakMaps(privateProps),unsetWeakMaps(privateMethods)},unsetWeakMaps=a=>{for(const r in a)a[r]=new WeakMap},instanceMethods=Object.freeze(Object.defineProperty({__proto__:null,_destroy,_main,close,closeModal:close,closePopup:close,closeToast:close,disableButtons,disableInput,disableLoading:hideLoading,enableButtons,enableInput,getInput,getProgressSteps,hideLoading,resetValidationMessage,showValidationMessage,update},Symbol.toStringTag,{value:"Module"}));let currentInstance;class SweetAlert{constructor(...r){if(typeof window>"u")return;typeof Promise>"u"&&error$2("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),currentInstance=this;const o=Object.freeze(this.constructor.argsToParams(r));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});const s=this._main(this.params);privateProps.promise.set(this,s)}then(r){return privateProps.promise.get(this).then(r)}finally(r){return privateProps.promise.get(this).finally(r)}}if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const a=new Date,r=localStorage.getItem("swal-initiation");r?(a.getTime()-Date.parse(r))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const o=document.createElement("audio");o.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",o.loop=!0,document.body.appendChild(o),setTimeout(()=>{o.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${a}`)}Object.assign(SweetAlert.prototype,instanceMethods),Object.assign(SweetAlert,staticMethods),Object.keys(instanceMethods).forEach(a=>{SweetAlert[a]=function(...r){if(currentInstance)return currentInstance[a](...r)}}),SweetAlert.DismissReason=DismissReason,SweetAlert.version="9.17.2";const Swal=SweetAlert;Swal.default=Swal;const showFormat={},mixinPage={data(){return{grid4:{xxl:4,xl:4,lg:4,md:6,sm:12,xs:24},grid6:{xxl:6,xl:6,lg:8,md:12,sm:12,xs:24},grid8:{xxl:8,xl:8,lg:8,md:12,sm:24,xs:24},grid12:{xxl:12,xl:12,lg:12,md:12,sm:24,xs:24},grid16:{xxl:16,xl:16,lg:16,md:24,sm:24,xs:24},grid18:{xxl:18,xl:18,lg:18,md:24,sm:24,xs:24},grid24:{xxl:24,xl:24,lg:24,md:24,sm:24,xs:24}}},computed:{...mapState("admin/user",["info"]),...mapState("admin/cache",["userNames","enums","dicts","caches"]),...mapState("admin/menu",["userPermissions"]),rootPath(){return"admin".trim()?"/admin/static/":"/static/"},sysInfo(){return Setting.info},layout(){return Setting.layout},apiBaseURL(){return window.$mode==="development"?Setting.apiBaseURL.dev:Setting.apiBaseURL.prd},uploadURL(){return this.apiBaseURL+"api/Attachment/add"},uploadHeaders(){return{Authorization:"Bearer "+util$2.cookies.get("token")}}},methods:{...mapActions("admin/cache",["loadEnum","loadDict","loadUserName","loadCache"]),...mapMutations("admin/loader",{enableLoader:"enable"}),...mapMutations("admin/loader",{disableLoader:"disable"}),copy(a){return lodashExports.cloneDeep(a)},allow(a){if(a.startsWith("permission/"))return this.userPermissions[a];{let r=this.$router.currentRoute.value.fullPath.substr(1).split("?")[0];if(this.userPermissions[r+"$"+a]==!0)return!0;let o=Object.keys(this.userPermissions).filter(s=>s.startsWith(r+"$")).length;return this.userPermissions[r]==!0&&o==0}},getCache(a,r){return this.loadCache(a),this.caches[a].find(o=>o.id==r)},getCacheList(a){return this.loadCache(a),this.caches[a]},getEnum(a,r){return this.loadEnum(a),r==null?null:this.layout.showI18n?this.$t("Enum_"+a+"_"+r):this.enums[a][r]},getEnumList(a){return this.loadEnum(a),Object.keys(this.enums[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Enum_"+a+"_"+r)}:{id:r,name:this.enums[a][r]})},getDict(a,r){return this.loadDict(a),r==null?null:this.layout.showI18n?this.$t("Dict_"+a+"_"+r):this.dicts[a][r]},getDictList(a){return this.loadDict(a),Object.keys(this.dicts[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Dict_"+a+"_"+r)}:{id:r,name:this.dicts[a][r]})},getUserName(a){return this.loadUserName(a),this.userNames[a]},getAttachmentUrl(a,r){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/get?file="+encodeURIComponent(a)+"&name="+encodeURIComponent(r):null},fileDownload(a,r){let o=this.getAttachmentUrl(a,r);o&&(window.location.href=o)},getImgUrl(a){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/getImage?file="+encodeURIComponent(a):this.rootPath+"images/no-image.png"},showData(a,r){let o=r.code,s=r.dataType,l=r.displayFormat,u=r.digit,c=r.fixedDigit;if(!s)return null;if(s.startsWith("Enum:"))return this.getEnum(s.replace("Enum:",""),this.parseData(a,o));if(s==="BigInteger"&&l=="User")return this.getUserName(this.parseData(a,o));let d=this.parseData(a,o);if(d==null)return null;if(showFormat.customFormat){let h=showFormat.customFormat(a,r);if(h!=null)return h}if(s==="DateTime")return(l||"").trim()?format$6(new Date(d),l):format$6(new Date(d),"yyyy-MM-dd");if(s==="Integer"){if(l==="Thousand")return this.formatThousand(d);if((l||"").trim()){let h=null;try{h=format$6(new Date(d*1e3),l)}catch(f){console.log(f,d)}return h}else return d}else{if(s==="Decimal"||s==="Float"||s==="Double")return d=parseFloat(d),l==="Money"?this.formatThousand(d.toFixed(2)):l==="Thousand"?this.formatThousand(this.keepDecimal(d,u,c)):l==="Percent"?this.keepDecimal(d,u,c)+"%":this.keepDecimal(d,u,c);if(s==="Boolean")return l==="Y"?d?'<i class="fa fa-check info"></i>':"":l==="YN"?d?'<i class="fa fa-check"></i>':'<i class="fa fa-times"></i>':l==="Disabled"?d?'<i class="fa fa-ban error"></i>':"":l==="Valid"?d?'<i class="fa fa-check success"></i>':"":l==="Attention"?d?'<i class="fa fa-exclamation error"></i>':"":d?'<i class="fa fa-check info"></i>':"";if(s==="String")if(l==="Array"){let h="";try{h=JSON.parse(d).join(", ")}catch(f){console.log(f,d)}return h}else if((l||"").trim()){let h=null;try{h=format$6(new Date(parseInt(d)*1e3),l)}catch(f){console.log(f,d)}return h}else return d.toString().startsWith("`r;")?'<font color="red">'+this.tParam(this.showMultiLine(d.substr(3)))+"</font>":this.tParam(this.showMultiLine(d));else return d}},showMultiLine(a){return typeof a=="string"?a.replaceAll(" "," ").replaceAll(`
|
|
104
104
|
`,"<br/>"):a},getDateFormat(a,r){return format$6(new Date(a),r)},parseData(a,r){return lodashExports.get(a,r)},setData(a,r,o){lodashExports.set(a,r,o)},parseDateTimeData(a,r){let o=this.parseData(a,r);return o??""},parseArrayData(a,r){let o=[],s=this.parseData(a,r);return this.isJSON(s)&&(o=JSON.parse(s)),o},setArrayData(a,r,o){let s="";o!=null&&(s=JSON.stringify(o)),this.setData(a,r,s)},parseDateRangeData(a,r){let o=[],s=this.parseData(a,r);return this.isJSON(s)&&(o=JSON.parse(s),o[0]=new Date(o[0]),o[1]=new Date(o[1])),o},getTriggers(a){let r=[],o="";for(let s=0;s<a.length;s++)a[s]==" "||a[s]=="+"||a[s]=="-"||a[s]=="*"||a[s]=="/"||a[s]=="("||a[s]==")"||a[s]==">"||a[s]=="<"||a[s]=="!"||a[s]=="&"||a[s]=="|"||a[s]=="="?(o||"").trim()&&(r.push(o),o=""):o+=a[s];return(o||"").trim()&&(o.indexOf(".")>=0?r.push(o.split(".")[0]+"ID"):r.push(o)),r},calculate(text,model){if(text==null)return null;text=text.toString();let result="",expression="";for(let a=0;a<text.length;a++){const r=text[a]==" "||text[a]=="+"||text[a]=="-"||text[a]=="*"||text[a]=="/"||text[a]=="("||text[a]==")"||text[a]==">"||text[a]=="<"||text[a]=="!"||text[a]=="|"||text[a]=="&"||text[a]=="=";if(r||a==text.length-1){if(r||(expression+=text[a]),(expression||"").trim()){if(!isNaN(expression)||expression.substr(0,1)=="'"||expression.substr(0,1)=='"'||expression=="null")result+=expression;else{let o=this.parseData(model,expression);o==null?result+="null":typeof o=="object"?result+=expression:isNaN(o)||o.toString().length>16?result+="'"+String(o)+"'":result+=String(o)}expression=""}r&&(result+=text[a])}else expression+=text[a]}let data=null;try{console.log("expression",text,result),data=eval(result),(data!="NaN"&&String(data)=="NaN"||typeof data=="number"&&(String(data)=="Infinity"||String(data)=="-Infinity"))&&(data=null)}catch(a){}return data},judgeCondition(a,r){if(!a)return!1;if(a.type=="Condition"){for(let o=0;o<a.condition.length;o++){let s=this.parseData(r,a.condition[o].code);s==null&&(s="null");let l=a.condition[o].value;l==null&&(l="");let u=a.condition[o].operator,c=!1;if(u=="Equal"?c=l.split(",").some(d=>String(s)==d):u=="Contains"?c=l.split(",").some(d=>String(s).indexOf(d)!=-1):u=="GreaterThan"?c=s>l:u=="LessThan"?c=s<l:u=="GreaterThanOrEqual"?c=s>=l:u=="LessThanOrEqual"?c=s<=l:u=="NotEqual"&&(c=l.split(",").every(d=>String(s)!=d)),!c)return!1}return!0}else if(a.type=="Expression")return this.calculate(a.expression,r)==!0},confirm(a,r){let o=Swal.fire({title:this.tParam(a),icon:"question",confirmButtonText:this.$t("Front_Btn_OK"),cancelButtonText:this.$t("Front_Btn_Cancel"),showCancelButton:!0});return o.then(s=>{s.value&&typeof r=="function"&&r()}),o},confirmInput(a,r,o,s){let l=Swal.fire({title:this.tParam(a),input:"text",confirmButtonText:this.$t("Front_Btn_OK"),cancelButtonText:this.$t("Front_Btn_Cancel"),inputPlaceholder:r,icon:"question",showCancelButton:!0,preConfirm:s});return l.then(u=>{u.value&&typeof o=="function"&&o()}),l},success(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.success({content:this.tParam(a)}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.success({title:this.tParam(a)}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"success",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},warning(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.warning({content:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.warning({title:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"warning",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},error(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.error({content:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.error({title:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"error",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},getTemplateReplace(a,r){let o=r;for(;o.indexOf("{")>=0;){let s=o.indexOf("{"),l=o.indexOf("}"),u=o.substring(s+1,l),c=this.parseData(a,u);c==null&&(c=""),o=o.substring(0,s)+c+o.substring(l+1)}return o},keepDecimal(a,r,o){if(r==null)return a;let s=parseFloat(a);return isNaN(s)||isNaN(r)?null:o?s.toFixed(r):Math.round(a*Math.pow(10,r))/Math.pow(10,r)},formatThousand(a){if(a==null)return a;let o=Math.trunc(a).toString().replace(/(\d)(?=(?:\d{3})+$)/g,"$1,"),s=a.toString().split(".");return s.length===2?o+"."+s[1].toString():o},resetNotice(){let a=this.getNotice(this);a&&a.init()},getNotice(a){return a.$refs.notice!=null?a.$refs.notice:a.$parent!=null?this.getNotice(a.$parent):null},isJSON(a){if(typeof a=="string"&&(a||"").trim())try{var r=JSON.parse(a);return!!(typeof r=="object"&&r)}catch{return!1}else return!1},tParam(a){if(a==null)return null;let o=a.toString().split("|"),s=o[0];return o.shift(),this.$t(s,o)}}},_export_sfc=(a,r)=>{const o=a.__vccOpts||a;for(const[s,l]of r)o[s]=l;return o},_sfc_main$1v={mixins:[mixinPage],components:{},data(){return{username:"",password:"",autoLogin:!0}},created(){},computed:{},methods:{...mapActions("admin/account",["login"]),async submit(a){if(a){var r=window.event?a.keyCode:a.which;if(!r||r!==0&&r!==1&&r!==13)return}this.username&&this.password&&(await this.login({username:this.username,password:this.password}),setTimeout(()=>{this.$router.replace(this.$route.query.redirect||"/home")}))},close(){this.confirm("Front_Sure_To_Exit",()=>{window.location.href="about:blank",window.close()})}}},_hoisted_1$1c={class:"signIn"},_hoisted_2$H={class:"box cf"},_hoisted_3$B={class:"right"},_hoisted_4$p={class:"logo cf"},_hoisted_5$f=["src"],_hoisted_6$a=["placeholder"],_hoisted_7$9=["placeholder"],_hoisted_8$9={class:"cpt"};function _sfc_render$1v(a,r,o,s,l,u){return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$1c,[require$$0$1.createElementVNode("div",_hoisted_2$H,[require$$0$1.createElementVNode("div",{class:"left",style:require$$0$1.normalizeStyle({background:"url("+a.rootPath+"images/login/signIn-img.png) center center no-repeat","background-size":"cover"})},[require$$0$1.createElementVNode("h3",null,require$$0$1.toDisplayString(a.sysInfo.banner),1),require$$0$1.createElementVNode("p",null,require$$0$1.toDisplayString(a.sysInfo.subBanner),1)],4),require$$0$1.createElementVNode("div",_hoisted_3$B,[require$$0$1.createElementVNode("div",_hoisted_4$p,[require$$0$1.createElementVNode("img",{src:a.rootPath+"images/login/logo.png"},null,8,_hoisted_5$f),require$$0$1.createElementVNode("h2",null,require$$0$1.toDisplayString(a.layout.showI18n?a.$t("Front_Label_Setting_Info_Title"):a.sysInfo.title),1),r[6]||(r[6]=require$$0$1.createElementVNode("small",null,null,-1))]),require$$0$1.withDirectives(require$$0$1.createElementVNode("input",{type:"text","onUpdate:modelValue":r[0]||(r[0]=c=>l.username=c),onKeyup:r[1]||(r[1]=(...c)=>u.submit&&u.submit(...c)),class:"username",autofocus:"",placeholder:a.$t("Front_Msg_Please_Input_Account")},null,40,_hoisted_6$a),[[require$$0$1.vModelText,l.username]]),require$$0$1.withDirectives(require$$0$1.createElementVNode("input",{type:"password","onUpdate:modelValue":r[2]||(r[2]=c=>l.password=c),onKeyup:r[3]||(r[3]=(...c)=>u.submit&&u.submit(...c)),class:"password",placeholder:a.$t("Front_Msg_Please_Input_Password")},null,40,_hoisted_7$9),[[require$$0$1.vModelText,l.password]]),require$$0$1.createElementVNode("button",{type:"button",onClick:r[4]||(r[4]=c=>u.submit()),class:"sign-in"},require$$0$1.toDisplayString(a.$t("Front_Btn_Login")),1),require$$0$1.createElementVNode("button",{type:"button",onClick:r[5]||(r[5]=(...c)=>u.close&&u.close(...c)),class:"exit"},require$$0$1.toDisplayString(a.$t("Front_Btn_Exit")),1)])]),require$$0$1.createElementVNode("div",_hoisted_8$9,require$$0$1.toDisplayString(a.sysInfo.copyright),1)])}const login=_export_sfc(_sfc_main$1v,[["render",_sfc_render$1v],["__scopeId","data-v-96b2c272"]]),__vite_glob_0_0$2=Object.freeze(Object.defineProperty({__proto__:null,default:login},Symbol.toStringTag,{value:"Module"}));/*!
|
|
105
105
|
* vue-router v4.6.2
|
|
106
106
|
* (c) 2025 Eduardo San Martin Morote
|
package/package.json
CHANGED
package/src/mixins/page.js
CHANGED
|
@@ -272,8 +272,11 @@ export default {
|
|
|
272
272
|
// return $filter('date')(value, 'yyyy-MM-dd');
|
|
273
273
|
}
|
|
274
274
|
} else if (dataType === 'Integer') {
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
if (format === 'Thousand') {
|
|
276
|
+
// 千分位
|
|
277
|
+
return this.formatThousand(value);
|
|
278
|
+
} else if (!!(format || '').trim()) {
|
|
279
|
+
// 日期
|
|
277
280
|
let result = null;
|
|
278
281
|
try {
|
|
279
282
|
result = dateFormat(new Date(value * 1000), format);
|