@indfnd/common-mobile 1.0.71 → 1.0.72
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.72](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.71...v1.0.72) (2026-03-23)
|
|
6
|
+
|
|
5
7
|
### [1.0.71](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.70...v1.0.71) (2026-03-20)
|
|
6
8
|
|
|
7
9
|
|
|
@@ -3,7 +3,7 @@ import { getQuarterNum, getHalfYearNum, formatDate, useConfig, getLocalStorage,
|
|
|
3
3
|
import Vue$1 from "vue";
|
|
4
4
|
import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
|
|
5
5
|
const name$1 = "@indfnd/common-mobile";
|
|
6
|
-
const version$2 = "1.0.
|
|
6
|
+
const version$2 = "1.0.71";
|
|
7
7
|
const author$1 = "huxuetong";
|
|
8
8
|
const publishConfig = {
|
|
9
9
|
registry: "https://registry.npmjs.org/"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(N,Hi){typeof exports=="object"&&typeof module!="undefined"?Hi(exports,require("lodash"),require("@indfnd/utils"),require("vue"),require("view-design")):typeof define=="function"&&define.amd?define(["exports","lodash","@indfnd/utils","vue","view-design"],Hi):(N=typeof globalThis!="undefined"?globalThis:N||self,Hi(N.IndMobileCommon={},N.lodash,N["@indfnd/utils"],N.vue,N["view-design"]))})(this,function(N,Hi,M,kp,ke){"use strict";function Ao(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var y=Ao(Hi),_t=Ao(kp),Tp={name:"@indfnd/common-mobile",version:"1.0.70",author:"huxuetong",publishConfig:{registry:"https://registry.npmjs.org/"},main:"./dist/ind-common-mobile.umd.cjs",module:"./dist/ind-common-mobile.es.js",style:"./dist/styles/index.css",types:"./types/index.d.ts",exports:{".":{import:"./dist/ind-common-mobile.es.js",require:"./dist/ind-common-mobile.umd.cjs"},"./dist/styles/index.css":{import:"./dist/styles/index.css",require:"./dist/styles/index.css"},"./src/styles/variables/index.less":{import:"./src/styles/variables/index.less",require:"./src/styles/variables/index.less"}},files:["dist","types","global.d.ts","src/styles/variables"],scripts:{"build:prod":"vite build","build:style":"gulp --gulpfile build/build-style.js",build:"yarn build:prod && yarn build:style","type-check":"vue-tsc --noEmit -p tsconfig.check.json --composite false",dts:"vue-tsc -p tsconfig.types.json",release:"node build/auto-build.js && yarn release-patch && git push --follow-tags && yarn re-publish","release-major":"standard-version --release-as major","release-minor":"standard-version --release-as minor","release-patch":"standard-version --release-as patch","re-publish":"yarn publish --access public"},dependencies:{classnames:"^2.5.1",vuedraggable:"^2.24.3"},devDependencies:{lodash:"4.17.21","@indfnd/utils":"^0.1.40",eslint:"^3.19.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-vue":"^2.1.0",gulp:"^4.0.2","gulp-autoprefixer":"^8.0.0","gulp-clean-css":"^4.3.0","gulp-less":"^5.0.0","gulp-rename":"^2.0.0","gulp-replace":"^1.1.4",less:"^4.1.3",prettier:"^2.7.1","rollup-plugin-visualizer":"4.2.0","standard-version":"^9.5.0",typescript:"^5.1.6",vant:"^2.13.2","view-design":"^4.6.1",vite:"^2.0.5","vite-plugin-eslint":"1.3.0","vite-plugin-resolve-externals":"^0.2.2","vite-plugin-vue2":"^1.3.2",vue:"^2.6.14","vue-property-decorator":"^8.5.1","vue-router":"^3.5.3","vue-template-compiler":"^2.6.12","vue-tsc":"^1.8.8",vuex:"^3.6.2"},engines:{node:">= 16"}},_p=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("Button",{attrs:{size:"large",type:"text"},on:{click:e.backHome}},[e._v("\u8FD4\u56DE\u9996\u9875")]),i("Button",{attrs:{size:"large",type:"text"},on:{click:e.backPrev}},[e._v("\u8FD4\u56DE\u4E0A\u4E00\u9875("+e._s(e.second)+"s)")])],1)},Ip=[];function Y(e,t,i,n,r,a,s,o){var l=typeof e=="function"?e.options:e;t&&(l.render=t,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),a&&(l._scopeId="data-v-"+a);var c;if(s?(c=function(u){u=u||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!u&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(u=__VUE_SSR_CONTEXT__),r&&r.call(this,u),u&&u._registeredComponents&&u._registeredComponents.add(s)},l._ssrRegister=c):r&&(c=o?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var h=l.render;l.render=function(f,p){return c.call(p),h(f,p)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:e,options:l}}const Ep={name:"IndBackBtnGroup",data(){return{second:5,timer:null}},mounted(){this.timer=setInterval(()=>{this.second===0?this.backPrev():this.second--},1e3)},beforeDestroy(){clearInterval(this.timer)},methods:{backHome(){this.$router.replace({name:this.$config.homeRouteName})},backPrev(){this.$router.go(-1)}}},Po={};var Dp=Y(Ep,_p,Ip,!1,Mp,null,null,null);function Mp(e){for(let t in Po)this[t]=Po[t]}var Op=function(){return Dp.exports}(),Lp=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"ind-error-page"},[i("div",{staticClass:"content-con"},[i("img",{attrs:{src:e.src,alt:e.code}}),i("div",{staticClass:"text-con"},[i("h4",[e._v(e._s(e.code))]),i("h5",[e._v(e._s(e.desc))])])])])},Ap=[];const Pp={name:"IndErrorContent",components:{BackBtnGroup:Op},props:{code:String,desc:String,src:String}},No={};var Np=Y(Pp,Lp,Ap,!1,Bp,null,null,null);function Bp(e){for(let t in No)this[t]=No[t]}var ta=function(){return Np.exports}(),Fp=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ErrorContent",{attrs:{code:"404",desc:"Oh~~\u60A8\u7684\u9875\u9762\u597D\u50CF\u98DE\u8D70\u4E86~",src:e.src}})},Rp=[];const Vp={name:"IndNotFound",components:{ErrorContent:ta},data(){return{src:`${location.protocol}//${location.host}`+(location.pathname.includes("scyxweb")?"/scyxweb":"")+"/ind-mobile/imgs/error-page/error-404.svg"}}},Bo={};var zp=Y(Vp,Fp,Rp,!1,jp,null,null,null);function jp(e){for(let t in Bo)this[t]=Bo[t]}var Ui=function(){return zp.exports}(),Fo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Hp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Up(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),t}var Ro={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Fo,function(){var i=1e3,n=6e4,r=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",h="week",d="month",u="quarter",f="year",p="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var k=["th","st","nd","rd"],g=V%100;return"["+V+(k[(g-20)%10]||k[g]||k[0])+"]"}},E=function(V,k,g){var I=String(V);return!I||I.length>=k?V:""+Array(k+1-I.length).join(g)+V},_={s:E,z:function(V){var k=-V.utcOffset(),g=Math.abs(k),I=Math.floor(g/60),D=g%60;return(k<=0?"+":"-")+E(I,2,"0")+":"+E(D,2,"0")},m:function V(k,g){if(k.date()<g.date())return-V(g,k);var I=12*(g.year()-k.year())+(g.month()-k.month()),D=k.clone().add(I,d),j=g-D<0,H=k.clone().add(I+(j?-1:1),d);return+(-(I+(g-D)/(j?D-H:H-D))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:d,y:f,w:h,d:c,D:p,h:l,m:o,s,ms:a,Q:u}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},T="en",O={};O[T]=x;var X="$isDayjsObject",R=function(V){return V instanceof it||!(!V||!V[X])},z=function V(k,g,I){var D;if(!k)return T;if(typeof k=="string"){var j=k.toLowerCase();O[j]&&(D=j),g&&(O[j]=g,D=j);var H=k.split("-");if(!D&&H.length>1)return V(H[0])}else{var S=k.name;O[S]=k,D=S}return!I&&D&&(T=D),D||!I&&T},B=function(V,k){if(R(V))return V.clone();var g=typeof k=="object"?k:{};return g.date=V,g.args=arguments,new it(g)},A=_;A.l=z,A.i=R,A.w=function(V,k){return B(V,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var it=function(){function V(g){this.$L=z(g.locale,null,!0),this.parse(g),this.$x=this.$x||g.x||{},this[X]=!0}var k=V.prototype;return k.parse=function(g){this.$d=function(I){var D=I.date,j=I.utc;if(D===null)return new Date(NaN);if(A.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var H=D.match(v);if(H){var S=H[2]-1||0,b=(H[7]||"0").substring(0,3);return j?new Date(Date.UTC(H[1],S,H[3]||1,H[4]||0,H[5]||0,H[6]||0,b)):new Date(H[1],S,H[3]||1,H[4]||0,H[5]||0,H[6]||0,b)}}return new Date(D)}(g),this.init()},k.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},k.$utils=function(){return A},k.isValid=function(){return this.$d.toString()!==m},k.isSame=function(g,I){var D=B(g);return this.startOf(I)<=D&&D<=this.endOf(I)},k.isAfter=function(g,I){return B(g)<this.startOf(I)},k.isBefore=function(g,I){return this.endOf(I)<B(g)},k.$g=function(g,I,D){return A.u(g)?this[I]:this.set(D,g)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(g,I){var D=this,j=!!A.u(I)||I,H=A.p(g),S=function(Tt,$t){var Ae=A.w(D.$u?Date.UTC(D.$y,$t,Tt):new Date(D.$y,$t,Tt),D);return j?Ae:Ae.endOf(c)},b=function(Tt,$t){return A.w(D.toDate()[Tt].apply(D.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice($t)),D)},C=this.$W,F=this.$M,K=this.$D,G="set"+(this.$u?"UTC":"");switch(H){case f:return j?S(1,0):S(31,11);case d:return j?S(1,F):S(0,F+1);case h:var tt=this.$locale().weekStart||0,ct=(C<tt?C+7:C)-tt;return S(j?K-ct:K+(6-ct),F);case c:case p:return b(G+"Hours",0);case l:return b(G+"Minutes",1);case o:return b(G+"Seconds",2);case s:return b(G+"Milliseconds",3);default:return this.clone()}},k.endOf=function(g){return this.startOf(g,!1)},k.$set=function(g,I){var D,j=A.p(g),H="set"+(this.$u?"UTC":""),S=(D={},D[c]=H+"Date",D[p]=H+"Date",D[d]=H+"Month",D[f]=H+"FullYear",D[l]=H+"Hours",D[o]=H+"Minutes",D[s]=H+"Seconds",D[a]=H+"Milliseconds",D)[j],b=j===c?this.$D+(I-this.$W):I;if(j===d||j===f){var C=this.clone().set(p,1);C.$d[S](b),C.init(),this.$d=C.set(p,Math.min(this.$D,C.daysInMonth())).$d}else S&&this.$d[S](b);return this.init(),this},k.set=function(g,I){return this.clone().$set(g,I)},k.get=function(g){return this[A.p(g)]()},k.add=function(g,I){var D,j=this;g=Number(g);var H=A.p(I),S=function(F){var K=B(j);return A.w(K.date(K.date()+Math.round(F*g)),j)};if(H===d)return this.set(d,this.$M+g);if(H===f)return this.set(f,this.$y+g);if(H===c)return S(1);if(H===h)return S(7);var b=(D={},D[o]=n,D[l]=r,D[s]=i,D)[H]||1,C=this.$d.getTime()+g*b;return A.w(C,this)},k.subtract=function(g,I){return this.add(-1*g,I)},k.format=function(g){var I=this,D=this.$locale();if(!this.isValid())return D.invalidDate||m;var j=g||"YYYY-MM-DDTHH:mm:ssZ",H=A.z(this),S=this.$H,b=this.$m,C=this.$M,F=D.weekdays,K=D.months,G=D.meridiem,tt=function($t,Ae,_n,Qr){return $t&&($t[Ae]||$t(I,j))||_n[Ae].slice(0,Qr)},ct=function($t){return A.s(S%12||12,$t,"0")},Tt=G||function($t,Ae,_n){var Qr=$t<12?"AM":"PM";return _n?Qr.toLowerCase():Qr};return j.replace(w,function($t,Ae){return Ae||function(_n){switch(_n){case"YY":return String(I.$y).slice(-2);case"YYYY":return A.s(I.$y,4,"0");case"M":return C+1;case"MM":return A.s(C+1,2,"0");case"MMM":return tt(D.monthsShort,C,K,3);case"MMMM":return tt(K,C);case"D":return I.$D;case"DD":return A.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return tt(D.weekdaysMin,I.$W,F,2);case"ddd":return tt(D.weekdaysShort,I.$W,F,3);case"dddd":return F[I.$W];case"H":return String(S);case"HH":return A.s(S,2,"0");case"h":return ct(1);case"hh":return ct(2);case"a":return Tt(S,b,!0);case"A":return Tt(S,b,!1);case"m":return String(b);case"mm":return A.s(b,2,"0");case"s":return String(I.$s);case"ss":return A.s(I.$s,2,"0");case"SSS":return A.s(I.$ms,3,"0");case"Z":return H}return null}($t)||H.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(g,I,D){var j,H=this,S=A.p(I),b=B(g),C=(b.utcOffset()-this.utcOffset())*n,F=this-b,K=function(){return A.m(H,b)};switch(S){case f:j=K()/12;break;case d:j=K();break;case u:j=K()/3;break;case h:j=(F-C)/6048e5;break;case c:j=(F-C)/864e5;break;case l:j=F/r;break;case o:j=F/n;break;case s:j=F/i;break;default:j=F}return D?j:A.a(j)},k.daysInMonth=function(){return this.endOf(d).$D},k.$locale=function(){return O[this.$L]},k.locale=function(g,I){if(!g)return this.$L;var D=this.clone(),j=z(g,I,!0);return j&&(D.$L=j),D},k.clone=function(){return A.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},V}(),ot=it.prototype;return B.prototype=ot,[["$ms",a],["$s",s],["$m",o],["$H",l],["$W",c],["$M",d],["$y",f],["$D",p]].forEach(function(V){ot[V[1]]=function(k){return this.$g(k,V[0],V[1])}}),B.extend=function(V,k){return V.$i||(V(k,it,B),V.$i=!0),B},B.locale=z,B.isDayjs=R,B.unix=function(V){return B(1e3*V)},B.en=O[T],B.Ls=O,B.p={},B})})(Ro);var St=Ro.exports,Kp=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"ind-input-select"},[i("Input",{staticClass:"selected-input",class:{readonly:e.readonly},attrs:{value:e.formatValue,icon:e.readonly?"":e.inputIcon,placeholder:"\u8BF7\u9009\u62E9",readonly:""},on:{"on-clear":e.clear},nativeOn:{click:function(n){e.visible=!0}}}),i("van-popup",{style:{height:"40%"},attrs:{position:"bottom","get-container":"body"},model:{value:e.visible,callback:function(n){e.visible=n},expression:"visible"}},[e.type!="year-quarter"&&e.type!="year-half"?i("van-datetime-picker",e._b({attrs:{type:e.type,value:e.dateValue},on:{confirm:e.confirm,cancel:e.cancel}},"van-datetime-picker",Object.assign({},e.$attrs),!1)):i("van-picker",{attrs:{"show-toolbar":"",title:e.$attrs.placeholder,columns:e.dataList},on:{confirm:e.confirm,cancel:e.cancel}})],1)],1)},Wp=[];const Vo=new Date().getFullYear(),zo=new Date().getMonth()+1,Yp=`Q${M.getQuarterNum(zo)}`,Xp=`H${M.getHalfYearNum(zo)}`,jo=10,Ho=10,Gp={inheritAttrs:!1,props:{type:{type:String,default:"date"},fullYear:{type:Boolean,default:!1},value:String,defaultVisible:Boolean,readonly:Boolean},data(){return{visible:!1,dateValue:new Date,inputIcon:"ios-arrow-forward",dataList:[{values:[],defaultIndex:1},{values:[],defaultIndex:1}],quarterList:[{label:"\u7B2C\u4E00\u5B63\u5EA6",value:"Q1",startMonth:"01",endMonth:"03"},{label:"\u7B2C\u4E8C\u5B63\u5EA6",value:"Q2",startMonth:"04",endMonth:"06"},{label:"\u7B2C\u4E09\u5B63\u5EA6",value:"Q3",startMonth:"07",endMonth:"09"},{label:"\u7B2C\u56DB\u5B63\u5EA6",value:"Q4",startMonth:"10",endMonth:"12"}],halfList:[{label:"\u4E0A\u534A\u5E74",value:"H1",startMonth:"01",endMonth:"06"},{label:"\u4E0B\u534A\u5E74",value:"H2",startMonth:"07",endMonth:"12"}]}},created(){if(this.visible=this.defaultVisible,this.dateValue=this.value?St(this.value).toDate():new Date,this.type=="year-quarter"){this.dateValue=this.value?getQuarter(this.value):Vo+Yp;let e=parseInt(this.dateValue.substring(0,4)),t=this.dateValue.substring(4,6);for(let r=e-jo;r<=e+Ho;r++)this.dataList[0].values.push(r);let i=this.dataList[0].values.findIndex(r=>r==e);this.dataList[0].defaultIndex=i;let n=this.quarterList.findIndex(r=>r.value==t);this.dataList[1].values=["\u7B2C\u4E00\u5B63\u5EA6","\u7B2C\u4E8C\u5B63\u5EA6","\u7B2C\u4E09\u5B63\u5EA6","\u7B2C\u56DB\u5B63\u5EA6"],this.dataList[1].defaultIndex=n}else if(this.type=="year-half"){this.fullYear&&(this.halfList=[{label:"\u5168\u5E74",value:"H0",startMonth:"01",endMonth:"12"},{label:"\u4E0A\u534A\u5E74",value:"H1",startMonth:"01",endMonth:"06"},{label:"\u4E0B\u534A\u5E74",value:"H2",startMonth:"07",endMonth:"12"}]),this.dateValue=this.value?this.value:Vo+Xp;let e=parseInt(this.dateValue.substring(0,4)),t=this.dateValue.substring(4,6);for(let r=e-jo;r<=e+Ho;r++)this.dataList[0].values.push(r);let i=this.dataList[0].values.findIndex(r=>r==e);this.dataList[0].defaultIndex=i;let n=this.halfList.findIndex(r=>r.value==t);this.dataList[1].values=["\u4E0A\u534A\u5E74","\u4E0B\u534A\u5E74"],this.fullYear&&(this.dataList[1].values=["\u5168\u5E74","\u4E0A\u534A\u5E74","\u4E0B\u534A\u5E74"]),this.dataList[1].defaultIndex=n,console.log(this.dataList)}},deactivated(){this.visible=!1},watch:{value(){console.log("value change",this.value),this.dateValue=this.value?St(this.value).toDate():new Date}},computed:{formatValue:function(){if(this.value&&this.type=="year-quarter"){let e=parseInt(this.value.substring(0,4)),t=this.value.substring(4,6);return t=this.quarterList.find(i=>i.value==t),`${e}${t.label}`}else if(this.value&&this.type=="year-half"){let e=parseInt(this.value.substring(0,4)),t=this.value.substring(4,6);return t=this.halfList.find(i=>i.value==t),`${e}${t.label}`}return this.value?M.formatDate(this.value):""}},methods:{emitValue(e,t){let i;if(this.type=="year-month")i=St(this.dateValue).format("YYYYMM");else if(this.type=="date")i=St(this.dateValue).format("YYYYMMDD");else if(this.type=="year-quarter"){let n=this.quarterList[t[1]];i=`${e[0]}${n.value}`}else if(this.type=="year-half"){let n=this.halfList[t[1]];i=`${e[0]}${n.value}`}this.$emit("input",i)},clear(){this.dateValue=new Date,this.$emit("input","")},confirm(e,t){this.dateValue=e,this.emitValue(e,t),this.visible=!1},cancel(){this.visible=!1}}},Uo={};var qp=Y(Gp,Kp,Wp,!1,Jp,null,null,null);function Jp(e){for(let t in Uo)this[t]=Uo[t]}var Ko=function(){return qp.exports}();function In(e){window.curTarget=e.target||e.srcElement||e.curTarget}function Wo(){setTimeout(()=>{var e;(e=window==null?void 0:window.curTarget)==null||e.scrollIntoView({block:"center",behavior:"smooth"})},0)}function Zp(e){let t=e.split("_");for(let i=1;i<t.length;i++)t[i]=t[i].substring(0,1).toUpperCase()+t[i].substring(1);return t.join("")}function ea(e,t){let i=e.column||[];i instanceof Array||(i=[i]),i=i.map(l=>{let c={...l._attributes};c.id=t?Zp(c.id):c.id;let h=c.props;if(h)try{h=JSON.parse(h)}catch{console.log("props \u89E3\u6790\u5F02\u5E38",h),h=null}c.props=h;let d=c.enumList;if(d)try{d=JSON.parse(d)}catch{console.log("enumList \u89E3\u6790\u5F02\u5E38",d),d=null}return c.enumList=d,c});let n=i.filter(l=>l.frontHide!="true").map(l=>({...l,title:l.name,width:200,field:l.id,sortable:!0,align:l.type=="INTEGER"?"right":"left",type:l.inputType||null})),r=i.filter(l=>l.listSearch=="true").map(l=>({...l,formKey:l.id,title:l.name,type:l.searchType||"input"})),a=i.filter(l=>l.frontHide!="true").map(l=>({...l,formKey:l.id,title:l.name,isTitle:l.isTitle==="true",type:l.inputType||null,required:l.required==="true"})),s=e.table,o=null;return s&&(s instanceof Array?o=s.map(l=>ea(l)):o=[ea(s)]),{...e._attributes,columns:n,searchFormFields:r,formFieldList:a,subTable:o}}function En(e,t){if(!e)return{};try{let n=JSON.parse(xml2json(e,{compact:!0})).table;return ea(n,t)}catch(i){return console.log("\u914D\u7F6E\u5185\u5BB9",e),console.error("\u89E3\u6790\u529F\u80FD\u914D\u7F6E\u4FE1\u606F\u5F02\u5E38",i),{}}}const Qp=!1;var Te=M.useConfig(Qp);function tm(e){if(typeof e!="string"||!St(e).isValid())return e;switch(e.length){case 4:return St(e,"YYYY").format("YYYY");case 6:return St(e,"YYYYMM").format("YYYY-MM");case 8:return St(e,"YYYYMMDD").format("YYYY-MM-DD");case 14:return St(e,"YYYYMMDDhhmmss").format("YYYY-MM-DD hh:mm:ss");default:return e}}function em(e,t){let i=St(e).diff(St(),"day");i<=Te.leftLockDays&&t(i)}const im={0:"\u65E5",1:"\u4E00",2:"\u4E8C",3:"\u4E09",4:"\u56DB",5:"\u4E94",6:"\u516D"},nm=new _t.default,rm=e=>e.children&&e.children.length,am=(e,t)=>e.some(i=>t.includes(i)),Yo=(e,t)=>e.meta&&e.meta.access&&e.meta.access.length?!!am(e.meta.access,t):!0,sm=(e,t)=>{let i=-1;for(;++i<e;)t(i)},Xo=e=>{let t={...e},i={...e.meta},n="";return i.title&&(typeof i.title=="function"?(i.__titleIsFunction__=!0,n=i.title(t)):n=i.title),i.title=n,t.meta=i,t},om=()=>{},Go=(e,t)=>{let i=[];return um(e,n=>{if(!n.meta||n.meta&&!n.meta.hideInMenu){let r={icon:n.meta&&n.meta.icon||"",name:n.name,meta:n.meta};(rm(n)||n.meta&&n.meta.showAlways)&&Yo(n,t)&&(r.children=Go(n.children,t)),n.meta&&n.meta.href&&(r.href=n.meta.href),Yo(n,t)&&i.push(r)}}),i},qo=(e,t)=>{let i={...t,icon:t.meta.icon};const{crumbs:n}=e.meta;n&&n.length>0&&n.forEach(a=>{a.meta={title:a.title},a.type===2&&(a.to=a.name)});let r=[{...i,to:t.name}];return n&&n.length>0&&(r=r.concat(n)),r},lm=e=>e.meta.title,ia=e=>{sessionStorage.tagNaveList=JSON.stringify(e)},Jo=()=>{const e=sessionStorage.tagNaveList;return e?JSON.parse(e):[]},Dn=(e,t="home")=>{let i=-1,n=e.length,r={};for(;++i<n;){let a=e[i];if(a.children&&a.children.length){let s=Dn(a.children,t);if(s.name)return s}else a.name===t&&(r=a)}return r},Zo=(e,t)=>{let i={};if(e.length===2)i=Dn(e);else{const n=e.findIndex(r=>Ki(r,t));n===e.length-1?i=e[e.length-2]:i=e[n+1]}return i},Qo=(e,t)=>{let i=e.length,n=!1;return sm(i,r=>{Ki(e[r],t)&&(n=!0)}),n},Ki=(e,t)=>e.name===t.name,cm=(e,t)=>{const{name:i,path:n,meta:r}=t;let a=[...e];return a.findIndex(s=>s.name===i)>=0||a.push({name:i,path:n,meta:r}),a};function um(e,t){if(!e.length||!t)return;let i=-1,n=e.length;for(;++i<n;){let r=e[i];t(r,i,e)}}const hm=/([\:\-\_]+(.))/g,dm=/^moz([A-Z])/;function fm(e){return e.replace(hm,function(t,i,n,r){return r?n.toUpperCase():n}).replace(dm,"Moz$1")}function pm(e,t){if(!e||!t)return null;t=fm(t),t==="float"&&(t="cssFloat");try{const i=document.defaultView.getComputedStyle(e,"");return e.style[t]||i?i[t]:null}catch{return e.style[t]}}var tl={exports:{}};/*!
|
|
1
|
+
(function(N,Hi){typeof exports=="object"&&typeof module!="undefined"?Hi(exports,require("lodash"),require("@indfnd/utils"),require("vue"),require("view-design")):typeof define=="function"&&define.amd?define(["exports","lodash","@indfnd/utils","vue","view-design"],Hi):(N=typeof globalThis!="undefined"?globalThis:N||self,Hi(N.IndMobileCommon={},N.lodash,N["@indfnd/utils"],N.vue,N["view-design"]))})(this,function(N,Hi,M,kp,ke){"use strict";function Ao(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var y=Ao(Hi),_t=Ao(kp),Tp={name:"@indfnd/common-mobile",version:"1.0.71",author:"huxuetong",publishConfig:{registry:"https://registry.npmjs.org/"},main:"./dist/ind-common-mobile.umd.cjs",module:"./dist/ind-common-mobile.es.js",style:"./dist/styles/index.css",types:"./types/index.d.ts",exports:{".":{import:"./dist/ind-common-mobile.es.js",require:"./dist/ind-common-mobile.umd.cjs"},"./dist/styles/index.css":{import:"./dist/styles/index.css",require:"./dist/styles/index.css"},"./src/styles/variables/index.less":{import:"./src/styles/variables/index.less",require:"./src/styles/variables/index.less"}},files:["dist","types","global.d.ts","src/styles/variables"],scripts:{"build:prod":"vite build","build:style":"gulp --gulpfile build/build-style.js",build:"yarn build:prod && yarn build:style","type-check":"vue-tsc --noEmit -p tsconfig.check.json --composite false",dts:"vue-tsc -p tsconfig.types.json",release:"node build/auto-build.js && yarn release-patch && git push --follow-tags && yarn re-publish","release-major":"standard-version --release-as major","release-minor":"standard-version --release-as minor","release-patch":"standard-version --release-as patch","re-publish":"yarn publish --access public"},dependencies:{classnames:"^2.5.1",vuedraggable:"^2.24.3"},devDependencies:{lodash:"4.17.21","@indfnd/utils":"^0.1.40",eslint:"^3.19.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-vue":"^2.1.0",gulp:"^4.0.2","gulp-autoprefixer":"^8.0.0","gulp-clean-css":"^4.3.0","gulp-less":"^5.0.0","gulp-rename":"^2.0.0","gulp-replace":"^1.1.4",less:"^4.1.3",prettier:"^2.7.1","rollup-plugin-visualizer":"4.2.0","standard-version":"^9.5.0",typescript:"^5.1.6",vant:"^2.13.2","view-design":"^4.6.1",vite:"^2.0.5","vite-plugin-eslint":"1.3.0","vite-plugin-resolve-externals":"^0.2.2","vite-plugin-vue2":"^1.3.2",vue:"^2.6.14","vue-property-decorator":"^8.5.1","vue-router":"^3.5.3","vue-template-compiler":"^2.6.12","vue-tsc":"^1.8.8",vuex:"^3.6.2"},engines:{node:">= 16"}},_p=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("Button",{attrs:{size:"large",type:"text"},on:{click:e.backHome}},[e._v("\u8FD4\u56DE\u9996\u9875")]),i("Button",{attrs:{size:"large",type:"text"},on:{click:e.backPrev}},[e._v("\u8FD4\u56DE\u4E0A\u4E00\u9875("+e._s(e.second)+"s)")])],1)},Ip=[];function Y(e,t,i,n,r,a,s,o){var l=typeof e=="function"?e.options:e;t&&(l.render=t,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),a&&(l._scopeId="data-v-"+a);var c;if(s?(c=function(u){u=u||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!u&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(u=__VUE_SSR_CONTEXT__),r&&r.call(this,u),u&&u._registeredComponents&&u._registeredComponents.add(s)},l._ssrRegister=c):r&&(c=o?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var h=l.render;l.render=function(f,p){return c.call(p),h(f,p)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:e,options:l}}const Ep={name:"IndBackBtnGroup",data(){return{second:5,timer:null}},mounted(){this.timer=setInterval(()=>{this.second===0?this.backPrev():this.second--},1e3)},beforeDestroy(){clearInterval(this.timer)},methods:{backHome(){this.$router.replace({name:this.$config.homeRouteName})},backPrev(){this.$router.go(-1)}}},Po={};var Dp=Y(Ep,_p,Ip,!1,Mp,null,null,null);function Mp(e){for(let t in Po)this[t]=Po[t]}var Op=function(){return Dp.exports}(),Lp=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"ind-error-page"},[i("div",{staticClass:"content-con"},[i("img",{attrs:{src:e.src,alt:e.code}}),i("div",{staticClass:"text-con"},[i("h4",[e._v(e._s(e.code))]),i("h5",[e._v(e._s(e.desc))])])])])},Ap=[];const Pp={name:"IndErrorContent",components:{BackBtnGroup:Op},props:{code:String,desc:String,src:String}},No={};var Np=Y(Pp,Lp,Ap,!1,Bp,null,null,null);function Bp(e){for(let t in No)this[t]=No[t]}var ta=function(){return Np.exports}(),Fp=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ErrorContent",{attrs:{code:"404",desc:"Oh~~\u60A8\u7684\u9875\u9762\u597D\u50CF\u98DE\u8D70\u4E86~",src:e.src}})},Rp=[];const Vp={name:"IndNotFound",components:{ErrorContent:ta},data(){return{src:`${location.protocol}//${location.host}`+(location.pathname.includes("scyxweb")?"/scyxweb":"")+"/ind-mobile/imgs/error-page/error-404.svg"}}},Bo={};var zp=Y(Vp,Fp,Rp,!1,jp,null,null,null);function jp(e){for(let t in Bo)this[t]=Bo[t]}var Ui=function(){return zp.exports}(),Fo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Hp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Up(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),t}var Ro={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Fo,function(){var i=1e3,n=6e4,r=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",h="week",d="month",u="quarter",f="year",p="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var k=["th","st","nd","rd"],g=V%100;return"["+V+(k[(g-20)%10]||k[g]||k[0])+"]"}},E=function(V,k,g){var I=String(V);return!I||I.length>=k?V:""+Array(k+1-I.length).join(g)+V},_={s:E,z:function(V){var k=-V.utcOffset(),g=Math.abs(k),I=Math.floor(g/60),D=g%60;return(k<=0?"+":"-")+E(I,2,"0")+":"+E(D,2,"0")},m:function V(k,g){if(k.date()<g.date())return-V(g,k);var I=12*(g.year()-k.year())+(g.month()-k.month()),D=k.clone().add(I,d),j=g-D<0,H=k.clone().add(I+(j?-1:1),d);return+(-(I+(g-D)/(j?D-H:H-D))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:d,y:f,w:h,d:c,D:p,h:l,m:o,s,ms:a,Q:u}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},T="en",O={};O[T]=x;var X="$isDayjsObject",R=function(V){return V instanceof it||!(!V||!V[X])},z=function V(k,g,I){var D;if(!k)return T;if(typeof k=="string"){var j=k.toLowerCase();O[j]&&(D=j),g&&(O[j]=g,D=j);var H=k.split("-");if(!D&&H.length>1)return V(H[0])}else{var S=k.name;O[S]=k,D=S}return!I&&D&&(T=D),D||!I&&T},B=function(V,k){if(R(V))return V.clone();var g=typeof k=="object"?k:{};return g.date=V,g.args=arguments,new it(g)},A=_;A.l=z,A.i=R,A.w=function(V,k){return B(V,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var it=function(){function V(g){this.$L=z(g.locale,null,!0),this.parse(g),this.$x=this.$x||g.x||{},this[X]=!0}var k=V.prototype;return k.parse=function(g){this.$d=function(I){var D=I.date,j=I.utc;if(D===null)return new Date(NaN);if(A.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var H=D.match(v);if(H){var S=H[2]-1||0,b=(H[7]||"0").substring(0,3);return j?new Date(Date.UTC(H[1],S,H[3]||1,H[4]||0,H[5]||0,H[6]||0,b)):new Date(H[1],S,H[3]||1,H[4]||0,H[5]||0,H[6]||0,b)}}return new Date(D)}(g),this.init()},k.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},k.$utils=function(){return A},k.isValid=function(){return this.$d.toString()!==m},k.isSame=function(g,I){var D=B(g);return this.startOf(I)<=D&&D<=this.endOf(I)},k.isAfter=function(g,I){return B(g)<this.startOf(I)},k.isBefore=function(g,I){return this.endOf(I)<B(g)},k.$g=function(g,I,D){return A.u(g)?this[I]:this.set(D,g)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(g,I){var D=this,j=!!A.u(I)||I,H=A.p(g),S=function(Tt,$t){var Ae=A.w(D.$u?Date.UTC(D.$y,$t,Tt):new Date(D.$y,$t,Tt),D);return j?Ae:Ae.endOf(c)},b=function(Tt,$t){return A.w(D.toDate()[Tt].apply(D.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice($t)),D)},C=this.$W,F=this.$M,K=this.$D,G="set"+(this.$u?"UTC":"");switch(H){case f:return j?S(1,0):S(31,11);case d:return j?S(1,F):S(0,F+1);case h:var tt=this.$locale().weekStart||0,ct=(C<tt?C+7:C)-tt;return S(j?K-ct:K+(6-ct),F);case c:case p:return b(G+"Hours",0);case l:return b(G+"Minutes",1);case o:return b(G+"Seconds",2);case s:return b(G+"Milliseconds",3);default:return this.clone()}},k.endOf=function(g){return this.startOf(g,!1)},k.$set=function(g,I){var D,j=A.p(g),H="set"+(this.$u?"UTC":""),S=(D={},D[c]=H+"Date",D[p]=H+"Date",D[d]=H+"Month",D[f]=H+"FullYear",D[l]=H+"Hours",D[o]=H+"Minutes",D[s]=H+"Seconds",D[a]=H+"Milliseconds",D)[j],b=j===c?this.$D+(I-this.$W):I;if(j===d||j===f){var C=this.clone().set(p,1);C.$d[S](b),C.init(),this.$d=C.set(p,Math.min(this.$D,C.daysInMonth())).$d}else S&&this.$d[S](b);return this.init(),this},k.set=function(g,I){return this.clone().$set(g,I)},k.get=function(g){return this[A.p(g)]()},k.add=function(g,I){var D,j=this;g=Number(g);var H=A.p(I),S=function(F){var K=B(j);return A.w(K.date(K.date()+Math.round(F*g)),j)};if(H===d)return this.set(d,this.$M+g);if(H===f)return this.set(f,this.$y+g);if(H===c)return S(1);if(H===h)return S(7);var b=(D={},D[o]=n,D[l]=r,D[s]=i,D)[H]||1,C=this.$d.getTime()+g*b;return A.w(C,this)},k.subtract=function(g,I){return this.add(-1*g,I)},k.format=function(g){var I=this,D=this.$locale();if(!this.isValid())return D.invalidDate||m;var j=g||"YYYY-MM-DDTHH:mm:ssZ",H=A.z(this),S=this.$H,b=this.$m,C=this.$M,F=D.weekdays,K=D.months,G=D.meridiem,tt=function($t,Ae,_n,Qr){return $t&&($t[Ae]||$t(I,j))||_n[Ae].slice(0,Qr)},ct=function($t){return A.s(S%12||12,$t,"0")},Tt=G||function($t,Ae,_n){var Qr=$t<12?"AM":"PM";return _n?Qr.toLowerCase():Qr};return j.replace(w,function($t,Ae){return Ae||function(_n){switch(_n){case"YY":return String(I.$y).slice(-2);case"YYYY":return A.s(I.$y,4,"0");case"M":return C+1;case"MM":return A.s(C+1,2,"0");case"MMM":return tt(D.monthsShort,C,K,3);case"MMMM":return tt(K,C);case"D":return I.$D;case"DD":return A.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return tt(D.weekdaysMin,I.$W,F,2);case"ddd":return tt(D.weekdaysShort,I.$W,F,3);case"dddd":return F[I.$W];case"H":return String(S);case"HH":return A.s(S,2,"0");case"h":return ct(1);case"hh":return ct(2);case"a":return Tt(S,b,!0);case"A":return Tt(S,b,!1);case"m":return String(b);case"mm":return A.s(b,2,"0");case"s":return String(I.$s);case"ss":return A.s(I.$s,2,"0");case"SSS":return A.s(I.$ms,3,"0");case"Z":return H}return null}($t)||H.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(g,I,D){var j,H=this,S=A.p(I),b=B(g),C=(b.utcOffset()-this.utcOffset())*n,F=this-b,K=function(){return A.m(H,b)};switch(S){case f:j=K()/12;break;case d:j=K();break;case u:j=K()/3;break;case h:j=(F-C)/6048e5;break;case c:j=(F-C)/864e5;break;case l:j=F/r;break;case o:j=F/n;break;case s:j=F/i;break;default:j=F}return D?j:A.a(j)},k.daysInMonth=function(){return this.endOf(d).$D},k.$locale=function(){return O[this.$L]},k.locale=function(g,I){if(!g)return this.$L;var D=this.clone(),j=z(g,I,!0);return j&&(D.$L=j),D},k.clone=function(){return A.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},V}(),ot=it.prototype;return B.prototype=ot,[["$ms",a],["$s",s],["$m",o],["$H",l],["$W",c],["$M",d],["$y",f],["$D",p]].forEach(function(V){ot[V[1]]=function(k){return this.$g(k,V[0],V[1])}}),B.extend=function(V,k){return V.$i||(V(k,it,B),V.$i=!0),B},B.locale=z,B.isDayjs=R,B.unix=function(V){return B(1e3*V)},B.en=O[T],B.Ls=O,B.p={},B})})(Ro);var St=Ro.exports,Kp=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"ind-input-select"},[i("Input",{staticClass:"selected-input",class:{readonly:e.readonly},attrs:{value:e.formatValue,icon:e.readonly?"":e.inputIcon,placeholder:"\u8BF7\u9009\u62E9",readonly:""},on:{"on-clear":e.clear},nativeOn:{click:function(n){e.visible=!0}}}),i("van-popup",{style:{height:"40%"},attrs:{position:"bottom","get-container":"body"},model:{value:e.visible,callback:function(n){e.visible=n},expression:"visible"}},[e.type!="year-quarter"&&e.type!="year-half"?i("van-datetime-picker",e._b({attrs:{type:e.type,value:e.dateValue},on:{confirm:e.confirm,cancel:e.cancel}},"van-datetime-picker",Object.assign({},e.$attrs),!1)):i("van-picker",{attrs:{"show-toolbar":"",title:e.$attrs.placeholder,columns:e.dataList},on:{confirm:e.confirm,cancel:e.cancel}})],1)],1)},Wp=[];const Vo=new Date().getFullYear(),zo=new Date().getMonth()+1,Yp=`Q${M.getQuarterNum(zo)}`,Xp=`H${M.getHalfYearNum(zo)}`,jo=10,Ho=10,Gp={inheritAttrs:!1,props:{type:{type:String,default:"date"},fullYear:{type:Boolean,default:!1},value:String,defaultVisible:Boolean,readonly:Boolean},data(){return{visible:!1,dateValue:new Date,inputIcon:"ios-arrow-forward",dataList:[{values:[],defaultIndex:1},{values:[],defaultIndex:1}],quarterList:[{label:"\u7B2C\u4E00\u5B63\u5EA6",value:"Q1",startMonth:"01",endMonth:"03"},{label:"\u7B2C\u4E8C\u5B63\u5EA6",value:"Q2",startMonth:"04",endMonth:"06"},{label:"\u7B2C\u4E09\u5B63\u5EA6",value:"Q3",startMonth:"07",endMonth:"09"},{label:"\u7B2C\u56DB\u5B63\u5EA6",value:"Q4",startMonth:"10",endMonth:"12"}],halfList:[{label:"\u4E0A\u534A\u5E74",value:"H1",startMonth:"01",endMonth:"06"},{label:"\u4E0B\u534A\u5E74",value:"H2",startMonth:"07",endMonth:"12"}]}},created(){if(this.visible=this.defaultVisible,this.dateValue=this.value?St(this.value).toDate():new Date,this.type=="year-quarter"){this.dateValue=this.value?getQuarter(this.value):Vo+Yp;let e=parseInt(this.dateValue.substring(0,4)),t=this.dateValue.substring(4,6);for(let r=e-jo;r<=e+Ho;r++)this.dataList[0].values.push(r);let i=this.dataList[0].values.findIndex(r=>r==e);this.dataList[0].defaultIndex=i;let n=this.quarterList.findIndex(r=>r.value==t);this.dataList[1].values=["\u7B2C\u4E00\u5B63\u5EA6","\u7B2C\u4E8C\u5B63\u5EA6","\u7B2C\u4E09\u5B63\u5EA6","\u7B2C\u56DB\u5B63\u5EA6"],this.dataList[1].defaultIndex=n}else if(this.type=="year-half"){this.fullYear&&(this.halfList=[{label:"\u5168\u5E74",value:"H0",startMonth:"01",endMonth:"12"},{label:"\u4E0A\u534A\u5E74",value:"H1",startMonth:"01",endMonth:"06"},{label:"\u4E0B\u534A\u5E74",value:"H2",startMonth:"07",endMonth:"12"}]),this.dateValue=this.value?this.value:Vo+Xp;let e=parseInt(this.dateValue.substring(0,4)),t=this.dateValue.substring(4,6);for(let r=e-jo;r<=e+Ho;r++)this.dataList[0].values.push(r);let i=this.dataList[0].values.findIndex(r=>r==e);this.dataList[0].defaultIndex=i;let n=this.halfList.findIndex(r=>r.value==t);this.dataList[1].values=["\u4E0A\u534A\u5E74","\u4E0B\u534A\u5E74"],this.fullYear&&(this.dataList[1].values=["\u5168\u5E74","\u4E0A\u534A\u5E74","\u4E0B\u534A\u5E74"]),this.dataList[1].defaultIndex=n,console.log(this.dataList)}},deactivated(){this.visible=!1},watch:{value(){console.log("value change",this.value),this.dateValue=this.value?St(this.value).toDate():new Date}},computed:{formatValue:function(){if(this.value&&this.type=="year-quarter"){let e=parseInt(this.value.substring(0,4)),t=this.value.substring(4,6);return t=this.quarterList.find(i=>i.value==t),`${e}${t.label}`}else if(this.value&&this.type=="year-half"){let e=parseInt(this.value.substring(0,4)),t=this.value.substring(4,6);return t=this.halfList.find(i=>i.value==t),`${e}${t.label}`}return this.value?M.formatDate(this.value):""}},methods:{emitValue(e,t){let i;if(this.type=="year-month")i=St(this.dateValue).format("YYYYMM");else if(this.type=="date")i=St(this.dateValue).format("YYYYMMDD");else if(this.type=="year-quarter"){let n=this.quarterList[t[1]];i=`${e[0]}${n.value}`}else if(this.type=="year-half"){let n=this.halfList[t[1]];i=`${e[0]}${n.value}`}this.$emit("input",i)},clear(){this.dateValue=new Date,this.$emit("input","")},confirm(e,t){this.dateValue=e,this.emitValue(e,t),this.visible=!1},cancel(){this.visible=!1}}},Uo={};var qp=Y(Gp,Kp,Wp,!1,Jp,null,null,null);function Jp(e){for(let t in Uo)this[t]=Uo[t]}var Ko=function(){return qp.exports}();function In(e){window.curTarget=e.target||e.srcElement||e.curTarget}function Wo(){setTimeout(()=>{var e;(e=window==null?void 0:window.curTarget)==null||e.scrollIntoView({block:"center",behavior:"smooth"})},0)}function Zp(e){let t=e.split("_");for(let i=1;i<t.length;i++)t[i]=t[i].substring(0,1).toUpperCase()+t[i].substring(1);return t.join("")}function ea(e,t){let i=e.column||[];i instanceof Array||(i=[i]),i=i.map(l=>{let c={...l._attributes};c.id=t?Zp(c.id):c.id;let h=c.props;if(h)try{h=JSON.parse(h)}catch{console.log("props \u89E3\u6790\u5F02\u5E38",h),h=null}c.props=h;let d=c.enumList;if(d)try{d=JSON.parse(d)}catch{console.log("enumList \u89E3\u6790\u5F02\u5E38",d),d=null}return c.enumList=d,c});let n=i.filter(l=>l.frontHide!="true").map(l=>({...l,title:l.name,width:200,field:l.id,sortable:!0,align:l.type=="INTEGER"?"right":"left",type:l.inputType||null})),r=i.filter(l=>l.listSearch=="true").map(l=>({...l,formKey:l.id,title:l.name,type:l.searchType||"input"})),a=i.filter(l=>l.frontHide!="true").map(l=>({...l,formKey:l.id,title:l.name,isTitle:l.isTitle==="true",type:l.inputType||null,required:l.required==="true"})),s=e.table,o=null;return s&&(s instanceof Array?o=s.map(l=>ea(l)):o=[ea(s)]),{...e._attributes,columns:n,searchFormFields:r,formFieldList:a,subTable:o}}function En(e,t){if(!e)return{};try{let n=JSON.parse(xml2json(e,{compact:!0})).table;return ea(n,t)}catch(i){return console.log("\u914D\u7F6E\u5185\u5BB9",e),console.error("\u89E3\u6790\u529F\u80FD\u914D\u7F6E\u4FE1\u606F\u5F02\u5E38",i),{}}}const Qp=!1;var Te=M.useConfig(Qp);function tm(e){if(typeof e!="string"||!St(e).isValid())return e;switch(e.length){case 4:return St(e,"YYYY").format("YYYY");case 6:return St(e,"YYYYMM").format("YYYY-MM");case 8:return St(e,"YYYYMMDD").format("YYYY-MM-DD");case 14:return St(e,"YYYYMMDDhhmmss").format("YYYY-MM-DD hh:mm:ss");default:return e}}function em(e,t){let i=St(e).diff(St(),"day");i<=Te.leftLockDays&&t(i)}const im={0:"\u65E5",1:"\u4E00",2:"\u4E8C",3:"\u4E09",4:"\u56DB",5:"\u4E94",6:"\u516D"},nm=new _t.default,rm=e=>e.children&&e.children.length,am=(e,t)=>e.some(i=>t.includes(i)),Yo=(e,t)=>e.meta&&e.meta.access&&e.meta.access.length?!!am(e.meta.access,t):!0,sm=(e,t)=>{let i=-1;for(;++i<e;)t(i)},Xo=e=>{let t={...e},i={...e.meta},n="";return i.title&&(typeof i.title=="function"?(i.__titleIsFunction__=!0,n=i.title(t)):n=i.title),i.title=n,t.meta=i,t},om=()=>{},Go=(e,t)=>{let i=[];return um(e,n=>{if(!n.meta||n.meta&&!n.meta.hideInMenu){let r={icon:n.meta&&n.meta.icon||"",name:n.name,meta:n.meta};(rm(n)||n.meta&&n.meta.showAlways)&&Yo(n,t)&&(r.children=Go(n.children,t)),n.meta&&n.meta.href&&(r.href=n.meta.href),Yo(n,t)&&i.push(r)}}),i},qo=(e,t)=>{let i={...t,icon:t.meta.icon};const{crumbs:n}=e.meta;n&&n.length>0&&n.forEach(a=>{a.meta={title:a.title},a.type===2&&(a.to=a.name)});let r=[{...i,to:t.name}];return n&&n.length>0&&(r=r.concat(n)),r},lm=e=>e.meta.title,ia=e=>{sessionStorage.tagNaveList=JSON.stringify(e)},Jo=()=>{const e=sessionStorage.tagNaveList;return e?JSON.parse(e):[]},Dn=(e,t="home")=>{let i=-1,n=e.length,r={};for(;++i<n;){let a=e[i];if(a.children&&a.children.length){let s=Dn(a.children,t);if(s.name)return s}else a.name===t&&(r=a)}return r},Zo=(e,t)=>{let i={};if(e.length===2)i=Dn(e);else{const n=e.findIndex(r=>Ki(r,t));n===e.length-1?i=e[e.length-2]:i=e[n+1]}return i},Qo=(e,t)=>{let i=e.length,n=!1;return sm(i,r=>{Ki(e[r],t)&&(n=!0)}),n},Ki=(e,t)=>e.name===t.name,cm=(e,t)=>{const{name:i,path:n,meta:r}=t;let a=[...e];return a.findIndex(s=>s.name===i)>=0||a.push({name:i,path:n,meta:r}),a};function um(e,t){if(!e.length||!t)return;let i=-1,n=e.length;for(;++i<n;){let r=e[i];t(r,i,e)}}const hm=/([\:\-\_]+(.))/g,dm=/^moz([A-Z])/;function fm(e){return e.replace(hm,function(t,i,n,r){return r?n.toUpperCase():n}).replace(dm,"Moz$1")}function pm(e,t){if(!e||!t)return null;t=fm(t),t==="float"&&(t="cssFloat");try{const i=document.defaultView.getComputedStyle(e,"");return e.style[t]||i?i[t]:null}catch{return e.style[t]}}var tl={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|