general-basic-form 1.2.6 → 1.2.7
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/README.md +1 -1
- package/dist/index.js +419 -313
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(I,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],A):(I=typeof globalThis<"u"?globalThis:I||self,A(I.Index={},I.Vue))})(this,function(I,A){"use strict";const vt="";function E(a,e,t,r,n,o,i,s){var c=typeof a=="function"?a.options:a;e&&(c.render=e,c.staticRenderFns=t,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o);var f;if(i?(f=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),n&&n.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(i)},c._ssrRegister=f):n&&(f=s?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),f)if(c.functional){c._injectStyles=f;var p=c.render;c.render=function(y,b){return f.call(b),p(y,b)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,f):[f]}return{exports:a,options:c}}const ge={props:{verificationSetting:{type:Object,default:()=>{}},getSmscode:{type:Function,default:()=>{}}},data(){return{defaultText:this.verificationSetting.defaultText||"获取验证码",buttonText:this.verificationSetting.defaultText||"获取验证码",restTime:this.verificationSetting.restTime||60,timer:null}},computed:{buttonType(){return this.buttonText===this.defaultText}},destroyed(){this.reset()},methods:{reset(){this.timer&&(clearInterval(this.timer),this.timer=null,this.buttonText=this.defaultText)},async buttonClick(){if(this.buttonText===this.defaultText)if(this.buttonText=this.restTime,this.timer=setInterval(()=>{if(Number(this.buttonText)<=0||!this.buttonText){this.reset();return}else this.buttonText=Number(this.buttonText)-1},1e3),this.getSmscode)await this.getSmscode()===!1&&this.reset();else return}}};var _e=function(){var e=this,t=e._self._c;return t("el-button",{on:{click:e.buttonClick}},[e._v(e._s(e.buttonType?e.defaultText:e.buttonText+"s"))])},ve=[],De=E(ge,_e,ve,!1,null,null,null,null);const Se=De.exports,we=(a={})=>{for(const e in a)if(Object.prototype.hasOwnProperty.call(a,e)){const t=a[e];Object.prototype.toString.call(t)==="[object Object]"&&(a[e]=JSON.stringify(t))}return a},ke=(a={})=>{for(const e in a)if(Object.prototype.hasOwnProperty.call(a,e)){const t=a[e];try{/[{]+/g.test(t)&&/[}]+/g.test(t)&&(a[e]=JSON.parse(t))}catch{}}return a},ae={paramsToQuery:we,queryToData:ke},N=q;(function(a,e){const t=q,r=a();for(;;)try{if(parseInt(t(561))/1+-parseInt(t(558))/2+parseInt(t(521))/3*(parseInt(t(527))/4)+-parseInt(t(506))/5*(parseInt(t(510))/6)+-parseInt(t(550))/7*(parseInt(t(503))/8)+parseInt(t(540))/9+-parseInt(t(546))/10*(-parseInt(t(562))/11)===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(G,819524);const S={};let C=null;const ce=async(a,e)=>{const t=q;!window[t(543)]&&window[t(498)]("您的浏览器不支持IndexedDB的稳定版本。离线数据功能将不可用。Your browser doesn't support a stable version of IndexedDB. offline data feature will not be available.");const{DBName:r="",DBVersion:n=1}=a;let o,i=!1;try{const s=window[t(543)][t(519)](r,n);await new Promise((c,f)=>{const p=t;s[p(551)]=async function(u){const l=p,y=u.target.result,{stores:b=[]}=a;await Promise.all(b[l(509)](async d=>{const m=l,{DBStoreName:h="",properties:g={}}=d;try{const _={};_[m(536)]=a[m(557)];const P=u[m(541)][m(520)][m(554)](h,_);if(Object[m(548)](g)[m(500)]===0){console[m(559)](h+"没有设置默认值");return}for(const v in g)if(g[m(556)][m(515)](g,v)){const D=g[v],k={...D.createIndex};P[m(504)](v,v,k)}}catch(_){console[m(559)](_)}})),o=y,i=!0},s[p(535)]=async function(u){const l=p;if(o=this[l(520)],i){const{stores:y=[]}=a;await Promise[l(528)](y[l(509)](async b=>{const d=l,{DBStoreName:m=""}=b,h=o[d(552)]([m],d(547)),g=h[d(496)](m),_={};_[a[d(557)]]=e,g[d(502)](_);try{await new Promise((P,v)=>{const D=d;h[D(525)]=function(k){const T=D;console[T(513)](T(512),k),v()},h[D(544)]=function(k){P()},h[D(529)]=function(k){const T=D;console[T(513)](T(534),k),v()}})}catch(P){console.warn(d(511),P)}}))}c()},s.onerror=function(u){f(u)}})}catch(s){console[t(513)](s,t(526))}return o};function G(){const a=["transaction","DBName","createObjectStore","close","hasOwnProperty","primaryKey","208156ZfrAJr","warn","delete","1575928bFmnZg","154LBDnQZ","objectStore","数据更新失败","alert","store不存在,请更新schema和DBVersion并重启前端服务","length","openCursor","add","15752fkogxb","createIndex","deleteDB","299045NkkBTh","请传入主键","mapDB","map","102uEoUGM","目前所有数据都在用户ID的主键下面,所以没有主键的话做重新载入页面处理","主键插入中止","error","数据库删除失败","call","continue","update","deleteStore","open","result","66891DVCnfv","get","getDataByKey","数据删除失败","onabort","打开数据库报错,可能是数据库版本不对,或者储存容量不足等原因","52JGzdMb","all","onerror","put","数据更新失败没有request","Database connection closed, reconnecting...","target","主键插入失败","onsuccess","keyPath","数据更新成功","主键查询结果:","传入结构化克隆算法不支持的数据类型可能导致报错","4779333CtWPbr","currentTarget","获取Database缺乏用户信息,请先传入对primaryKey的赋值","indexedDB","oncomplete","事务失败","634540WpNScH","readwrite","keys","getDB","4781SEkDBZ","onupgradeneeded"];return G=function(){return a},G()}function q(a,e){const t=G();return q=function(r,n){return r=r-496,t[r]},q(a,e)}let W=!1;S[N(549)]=async(a,e)=>{const t=N,{mapDB:r,primaryKey:n}=a;return r?n?(W&&await new Promise(async(o,i)=>{const s=()=>{W?setTimeout(()=>{s()},200):o()};s()}),!C&&(W=!0,C=await ce(r,n),C==null||C.addEventListener(t(555),async()=>{console.info(t(532)),C=await ce(r,n)}),W=!1),e&&e(C),C):(console[t(559)](t(542)),!1):(console[t(559)]("必须传入数据库配置信息"),!1)},S[N(523)]=async(a,e)=>{const t=N,{mapDB:r,tableName:n,primaryKey:o}=a,i={};i[t(508)]=r,i[t(557)]=o;const s=await S.getDB(i);if(!s)return;const c=s.transaction([n]),f=c[t(496)](n),p=f[t(522)](o);return new Promise((u,l)=>{const y=t;p.onsuccess=function(b){const d=q;e&&e(n+d(538)+p[d(520)]),u(p[d(520)])},p[y(529)]=function(b){console.error(n+y(545)+b),l()}})},S.updateStore=async(a,e)=>{var t;const r=N,{mapDB:n,tableName:o,updateData:i}=a;!i[n==null?void 0:n[r(557)]]&&console[r(559)](r(507)+n[r(557)]);const s={};s.mapDB=n,s[r(557)]=i[n==null?void 0:n[r(557)]];const c=await S[r(549)](s);if(!c)return;let f=null;try{f=c[r(552)]([o],r(547)).objectStore(o)}catch(y){console[r(513)](r(499),y)}let p=null,u=null;const l=await new Promise((y,b)=>{const d=r,m=f[d(501)](i[n==null?void 0:n[d(557)]]);m[d(535)]=h=>{y(h)},m.onerror=h=>{b(h)}});u=(t=l==null?void 0:l[r(533)])==null?void 0:t[r(520)];try{u&&(u==null?void 0:u.primaryKey)===i[n==null?void 0:n.primaryKey]?p=u[r(517)](i):p=f[r(530)](i)}catch(y){console[r(513)](r(539),y,i)}new Promise((y,b)=>{const d=r;!p&&(console[d(513)](o+d(531)),b()),p[d(535)]=function(m){e&&e(o+d(537)),y()},p[d(529)]=function(m){const h=d;console[h(513)](o+h(497),m),b()}}),u&&u[r(516)]()},S[N(518)]=async(a,e)=>{const t=N,{mapDB:r,tableName:n,primaryKey:o}=a,i={};i[t(508)]=r,i[t(557)]=o;const s=await S.getDB(i);if(!s)return;const c=s[t(552)]([n],t(547))[t(496)](n)[t(560)](o);return new Promise((f,p)=>{const u=t;c[u(535)]=function(l){e&&e(n+"数据删除成功"),f()},c.onerror=function(l){const y=u;console[y(513)](n+y(524)+l),p()}})},S[N(505)]=async(a,e)=>{const{mapDB:t}=a,r=window.indexedDB.deleteDatabase(t.DBName);return new Promise((n,o)=>{const i=q;r[i(535)]=s=>{e&&e(t[i(553)]+"数据库已删除"),n()},r[i(529)]=s=>{const c=i;console[c(513)](t[c(553)]+c(514)+s),o()}})};function K(a,e){const t=J();return K=function(r,n){return r=r-125,t[r]},K(a,e)}function J(){const a=["updateData","error","getDataByKey","531aQoQZo","primaryKey","handleData","2kSsgxs","777jFjQPc","1271805RJVSFy","546pnZEJw","3522904vvFeGW","4wGSwDA","tableName","780ChApSf","deleteStore","655364nEjUrb","3705144rIEFqv","updateStore","getData","clearData","mapDB","3003845nIJAzp"];return J=function(){return a},J()}const Z=K;(function(a,e){const t=K,r=a();for(;;)try{if(-parseInt(t(140))/1*(-parseInt(t(127))/2)+parseInt(t(142))/3*(parseInt(t(145))/4)+-parseInt(t(133))/5+-parseInt(t(143))/6*(parseInt(t(141))/7)+-parseInt(t(128))/8+parseInt(t(137))/9*(parseInt(t(125))/10)+parseInt(t(144))/11===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(J,330152);async function xe(a,e){const t=K,{tableName:r,propertiesKey:n,parameter:o,primaryKey:i,mapDB:s}=a;let c=null,f={[s[t(138)]]:i};const p={};p[t(132)]=s,p.tableName=r,p[t(138)]=i;const u=await S[t(136)](p);u&&(f={...u,[s.primaryKey]:i}),f[n]=o;const l={};return l[t(132)]=s,l.tableName=r,l[t(134)]=f,await S[t(129)](l),o&&(c=o),e&&e(c),c}async function Be(a,e){const t=K,{tableName:r,propertiesKey:n,primaryKey:o,mapDB:i}=a;let s=null;const c={};c[t(132)]=i,c[t(146)]=r,c.primaryKey=o;const f=await S[t(136)](c);return f&&(s=f[n]),e&&e(s),s}async function Ie(a,e){const t=K,{tableName:r,propertiesKey:n,parameter:o,primaryKey:i,mapDB:s}=a;let c={};const f={};f.mapDB=s,f[t(146)]=r,f[t(138)]=i;const p=await S[t(136)](f);try{if(p){c={...p[n],...o};const u={[s[t(138)]]:i},l=u;l[n]=c;const y={};y[t(132)]=s,y[t(146)]=r,y[t(134)]=l,await S.updateStore(y)}else console.warn(r+"为空,请先调用handleData")}catch(u){console[t(135)](u)}return e&&e(c),c}async function Pe(a,e){const t=K,{tableName:r,primaryKey:n,mapDB:o}=a;let i=null;try{const s={};s.mapDB=o,s[t(146)]=r,s[t(138)]=n,await S[t(126)](s)}catch(s){console.error(s)}return e&&e(i),i}const L={};L[Z(139)]=xe,L[Z(130)]=Be,L[Z(134)]=Ie,L[Z(131)]=Pe;var x=U;(function(a,e){for(var t=U,r=a();;)try{var n=-parseInt(t(385))/1+parseInt(t(387))/2+-parseInt(t(389))/3+-parseInt(t(398))/4*(parseInt(t(394))/5)+-parseInt(t(402))/6+-parseInt(t(399))/7+-parseInt(t(386))/8*(-parseInt(t(400))/9);if(n===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(M,363872);var le={};le[x(397)]=!1;var ne={};ne[x(384)]=le,ne[x(392)]={};var ue={};function M(){var a=["default","mapDB-indexeddb-form-schema","663915ecCGKl","primaryKey","stores","unique","12QKZOdu","2103521TxMjSC","1212714qgZAmF","formParams","3534618LLAImJ","DBName","properties","createIndex","464644FTRsMp","128qSoFyx","33606razpoB","DBVersion","168804drPGaG","queryParams","DBStoreName"];return M=function(){return a},M()}ue[x(390)]=ne;function U(a,e){var t=M();return U=function(r,n){r=r-382;var o=t[r];return o},U(a,e)}var se={};se[x(391)]=x(401),se[x(383)]=ue;var R={};R[x(395)]="userId",R[x(382)]=x(393),R[x(388)]=1,R[x(396)]=[se];const Te={formSchema:R},Ne=L,{handleData:Ke,getData:$e}=Ne,{formSchema:pe}=Te,Fe=async(a,e)=>{var t;return e.parametersType==="url"&&(a={...ae.queryToData((t=e.$route)==null?void 0:t.query),...a}),e.parametersType==="indexDB"&&(a={...await $e({tableName:"formParams",propertiesKey:e.$route.path||"defQueryParams",primaryKey:e.DBPrimaryKey||"default",mapDB:pe}),...a}),a},Ce=async(a,e)=>{e.parametersType==="url"&&await e.$router.push({query:ae.paramsToQuery({...a})}),e.parametersType==="indexDB"&&await Ke({tableName:"formParams",propertiesKey:e.$route.path||"defQueryParams",parameter:{...a},primaryKey:e.DBPrimaryKey||"default",mapDB:pe})},qe={makeParamsByType:Fe,saveParamsByType:Ce},fe=ae,j=qe,$=z;(function(a,e){const t=z,r=a();for(;;)try{if(parseInt(t(561))/1+-parseInt(t(558))/2+parseInt(t(521))/3*(parseInt(t(527))/4)+-parseInt(t(506))/5*(parseInt(t(510))/6)+-parseInt(t(550))/7*(parseInt(t(503))/8)+parseInt(t(540))/9+-parseInt(t(546))/10*(-parseInt(t(562))/11)===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(H,819524);const w={};let O=null;const de=async(a,e)=>{const t=z;!window[t(543)]&&window[t(498)]("您的浏览器不支持IndexedDB的稳定版本。离线数据功能将不可用。Your browser doesn't support a stable version of IndexedDB. offline data feature will not be available.");const{DBName:r="",DBVersion:n=1}=a;let o,i=!1;try{const s=window[t(543)][t(519)](r,n);await new Promise((c,f)=>{const p=t;s[p(551)]=async function(u){const l=p,y=u.target.result,{stores:b=[]}=a;await Promise.all(b[l(509)](async d=>{const m=l,{DBStoreName:h="",properties:g={}}=d;try{const _={};_[m(536)]=a[m(557)];const P=u[m(541)][m(520)][m(554)](h,_);if(Object[m(548)](g)[m(500)]===0){console[m(559)](h+"没有设置默认值");return}for(const v in g)if(g[m(556)][m(515)](g,v)){const D=g[v],k={...D.createIndex};P[m(504)](v,v,k)}}catch(_){console[m(559)](_)}})),o=y,i=!0},s[p(535)]=async function(u){const l=p;if(o=this[l(520)],i){const{stores:y=[]}=a;await Promise[l(528)](y[l(509)](async b=>{const d=l,{DBStoreName:m=""}=b,h=o[d(552)]([m],d(547)),g=h[d(496)](m),_={};_[a[d(557)]]=e,g[d(502)](_);try{await new Promise((P,v)=>{const D=d;h[D(525)]=function(k){const T=D;console[T(513)](T(512),k),v()},h[D(544)]=function(k){P()},h[D(529)]=function(k){const T=D;console[T(513)](T(534),k),v()}})}catch(P){console.warn(d(511),P)}}))}c()},s.onerror=function(u){f(u)}})}catch(s){console[t(513)](s,t(526))}return o};function H(){const a=["transaction","DBName","createObjectStore","close","hasOwnProperty","primaryKey","208156ZfrAJr","warn","delete","1575928bFmnZg","154LBDnQZ","objectStore","数据更新失败","alert","store不存在,请更新schema和DBVersion并重启前端服务","length","openCursor","add","15752fkogxb","createIndex","deleteDB","299045NkkBTh","请传入主键","mapDB","map","102uEoUGM","目前所有数据都在用户ID的主键下面,所以没有主键的话做重新载入页面处理","主键插入中止","error","数据库删除失败","call","continue","update","deleteStore","open","result","66891DVCnfv","get","getDataByKey","数据删除失败","onabort","打开数据库报错,可能是数据库版本不对,或者储存容量不足等原因","52JGzdMb","all","onerror","put","数据更新失败没有request","Database connection closed, reconnecting...","target","主键插入失败","onsuccess","keyPath","数据更新成功","主键查询结果:","传入结构化克隆算法不支持的数据类型可能导致报错","4779333CtWPbr","currentTarget","获取Database缺乏用户信息,请先传入对primaryKey的赋值","indexedDB","oncomplete","事务失败","634540WpNScH","readwrite","keys","getDB","4781SEkDBZ","onupgradeneeded"];return H=function(){return a},H()}function z(a,e){const t=H();return z=function(r,n){return r=r-496,t[r]},z(a,e)}let X=!1;w[$(549)]=async(a,e)=>{const t=$,{mapDB:r,primaryKey:n}=a;return r?n?(X&&await new Promise(async(o,i)=>{const s=()=>{X?setTimeout(()=>{s()},200):o()};s()}),!O&&(X=!0,O=await de(r,n),O==null||O.addEventListener(t(555),async()=>{console.info(t(532)),O=await de(r,n)}),X=!1),e&&e(O),O):(console[t(559)](t(542)),!1):(console[t(559)]("必须传入数据库配置信息"),!1)},w[$(523)]=async(a,e)=>{const t=$,{mapDB:r,tableName:n,primaryKey:o}=a,i={};i[t(508)]=r,i[t(557)]=o;const s=await w.getDB(i);if(!s)return;const c=s.transaction([n]),f=c[t(496)](n),p=f[t(522)](o);return new Promise((u,l)=>{const y=t;p.onsuccess=function(b){const d=z;e&&e(n+d(538)+p[d(520)]),u(p[d(520)])},p[y(529)]=function(b){console.error(n+y(545)+b),l()}})},w.updateStore=async(a,e)=>{var t;const r=$,{mapDB:n,tableName:o,updateData:i}=a;!i[n==null?void 0:n[r(557)]]&&console[r(559)](r(507)+n[r(557)]);const s={};s.mapDB=n,s[r(557)]=i[n==null?void 0:n[r(557)]];const c=await w[r(549)](s);if(!c)return;let f=null;try{f=c[r(552)]([o],r(547)).objectStore(o)}catch(y){console[r(513)](r(499),y)}let p=null,u=null;const l=await new Promise((y,b)=>{const d=r,m=f[d(501)](i[n==null?void 0:n[d(557)]]);m[d(535)]=h=>{y(h)},m.onerror=h=>{b(h)}});u=(t=l==null?void 0:l[r(533)])==null?void 0:t[r(520)];try{u&&(u==null?void 0:u.primaryKey)===i[n==null?void 0:n.primaryKey]?p=u[r(517)](i):p=f[r(530)](i)}catch(y){console[r(513)](r(539),y,i)}new Promise((y,b)=>{const d=r;!p&&(console[d(513)](o+d(531)),b()),p[d(535)]=function(m){e&&e(o+d(537)),y()},p[d(529)]=function(m){const h=d;console[h(513)](o+h(497),m),b()}}),u&&u[r(516)]()},w[$(518)]=async(a,e)=>{const t=$,{mapDB:r,tableName:n,primaryKey:o}=a,i={};i[t(508)]=r,i[t(557)]=o;const s=await w.getDB(i);if(!s)return;const c=s[t(552)]([n],t(547))[t(496)](n)[t(560)](o);return new Promise((f,p)=>{const u=t;c[u(535)]=function(l){e&&e(n+"数据删除成功"),f()},c.onerror=function(l){const y=u;console[y(513)](n+y(524)+l),p()}})},w[$(505)]=async(a,e)=>{const{mapDB:t}=a,r=window.indexedDB.deleteDatabase(t.DBName);return new Promise((n,o)=>{const i=z;r[i(535)]=s=>{e&&e(t[i(553)]+"数据库已删除"),n()},r[i(529)]=s=>{const c=i;console[c(513)](t[c(553)]+c(514)+s),o()}})};function F(a,e){const t=Y();return F=function(r,n){return r=r-125,t[r]},F(a,e)}function Y(){const a=["updateData","error","getDataByKey","531aQoQZo","primaryKey","handleData","2kSsgxs","777jFjQPc","1271805RJVSFy","546pnZEJw","3522904vvFeGW","4wGSwDA","tableName","780ChApSf","deleteStore","655364nEjUrb","3705144rIEFqv","updateStore","getData","clearData","mapDB","3003845nIJAzp"];return Y=function(){return a},Y()}const ee=F;(function(a,e){const t=F,r=a();for(;;)try{if(-parseInt(t(140))/1*(-parseInt(t(127))/2)+parseInt(t(142))/3*(parseInt(t(145))/4)+-parseInt(t(133))/5+-parseInt(t(143))/6*(parseInt(t(141))/7)+-parseInt(t(128))/8+parseInt(t(137))/9*(parseInt(t(125))/10)+parseInt(t(144))/11===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(Y,330152);async function Oe(a,e){const t=F,{tableName:r,propertiesKey:n,parameter:o,primaryKey:i,mapDB:s}=a;let c=null,f={[s[t(138)]]:i};const p={};p[t(132)]=s,p.tableName=r,p[t(138)]=i;const u=await w[t(136)](p);u&&(f={...u,[s.primaryKey]:i}),f[n]=o;const l={};return l[t(132)]=s,l.tableName=r,l[t(134)]=f,await w[t(129)](l),o&&(c=o),e&&e(c),c}async function ze(a,e){const t=F,{tableName:r,propertiesKey:n,primaryKey:o,mapDB:i}=a;let s=null;const c={};c[t(132)]=i,c[t(146)]=r,c.primaryKey=o;const f=await w[t(136)](c);return f&&(s=f[n]),e&&e(s),s}async function Ee(a,e){const t=F,{tableName:r,propertiesKey:n,parameter:o,primaryKey:i,mapDB:s}=a;let c={};const f={};f.mapDB=s,f[t(146)]=r,f[t(138)]=i;const p=await w[t(136)](f);try{if(p){c={...p[n],...o};const u={[s[t(138)]]:i},l=u;l[n]=c;const y={};y[t(132)]=s,y[t(146)]=r,y[t(134)]=l,await w.updateStore(y)}else console.warn(r+"为空,请先调用handleData")}catch(u){console[t(135)](u)}return e&&e(c),c}async function je(a,e){const t=F,{tableName:r,primaryKey:n,mapDB:o}=a;let i=null;try{const s={};s.mapDB=o,s[t(146)]=r,s[t(138)]=n,await w[t(126)](s)}catch(s){console.error(s)}return e&&e(i),i}const V={};V[ee(139)]=Oe,V[ee(130)]=ze,V[ee(134)]=Ee,V[ee(131)]=je;var B=re;(function(a,e){for(var t=re,r=a();;)try{var n=-parseInt(t(385))/1+parseInt(t(387))/2+-parseInt(t(389))/3+-parseInt(t(398))/4*(parseInt(t(394))/5)+-parseInt(t(402))/6+-parseInt(t(399))/7+-parseInt(t(386))/8*(-parseInt(t(400))/9);if(n===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(te,363872);var ye={};ye[B(397)]=!1;var oe={};oe[B(384)]=ye,oe[B(392)]={};var me={};function te(){var a=["default","mapDB-indexeddb-form-schema","663915ecCGKl","primaryKey","stores","unique","12QKZOdu","2103521TxMjSC","1212714qgZAmF","formParams","3534618LLAImJ","DBName","properties","createIndex","464644FTRsMp","128qSoFyx","33606razpoB","DBVersion","168804drPGaG","queryParams","DBStoreName"];return te=function(){return a},te()}me[B(390)]=oe;function re(a,e){var t=te();return re=function(r,n){r=r-382;var o=t[r];return o},re(a,e)}var ie={};ie[B(391)]=B(401),ie[B(383)]=me;var Q={};Q[B(395)]="userId",Q[B(382)]=B(393),Q[B(388)]=1,Q[B(396)]=[ie];const he={formSchema:Q},be=V,Dt="",{getData:Ae}=be,{formSchema:Le}=he,Re={name:"GeneralBasicForm",components:{InputArchive:a=>{const{templateEle:e}=a;return e()},VerificationButton:Se},props:{showSearch:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},formOnly:{type:Boolean,default:!1},getList:{type:Function,default:()=>{}},afterReset:{type:Function,default:()=>{}},formItem:{type:Array,default:()=>[]},size:{type:String,default:""},labelWidth:{type:String,default:"90px"},parametersType:{type:String,default:"url"},DBPrimaryKey:{type:[String,Number],required:!1},formData:{type:Object,default:()=>{}},noInputBlank:{type:Boolean,default:()=>!1},currentPageKey:{type:String,default:"page"},pageSizeKey:{type:String,default:"limit"},defCurrentPage:{type:Number,default:1},defPageSize:{type:Number,default:10},queryWhenReady:{type:Boolean,default:()=>!1}},data(){return{queryParams:this.initQueryParams(),formLoading:this.loading||!1,selectSetting:{placeholder:"请选择",filterable:!0,clearable:!0,style:"width: 200px"},inputSetting:{placeholder:"请输入",style:"width: 200px",clearable:!0},datePackerSetting:{style:"width: 227px","start-placeholder":"开始日期","end-placeholder":"结束日期",type:"daterange"},attrs:{inline:!0,"label-position":"left"}}},watch:{formData:{handler(a,e){JSON.stringify(a)!==JSON.stringify(this.queryParams)&&(this.queryParams={...this.queryParams,...a})},immediate:!0,deep:!0},queryParams:{handler(a){this.$emit("update:formData",{...a})},deep:!0},$attrs:{handler(a){this.attrs={...this.attrs,...a}},immediate:!0,deep:!0},loading(a){this.formLoading!==a&&(this.formLoading=a)},formLoading(a){this.loading!==a&&this.$emit("update:loading",a)}},methods:{async handleQuery(a={}){a.defaultPageFirst??(a.defaultPageFirst=!0);const e={[this.currentPageKey]:this.defCurrentPage};let t={...e,...this.queryParams};t=await j.makeParamsByType(t,this),a.defaultPageFirst&&(t={...t,...e}),await j.saveParamsByType(t,this),this.getList({...t})},async resetQuery(){this.$refs.queryFormRef.resetFields();const a=await j.makeParamsByType({},this),e={[this.currentPageKey]:this.defCurrentPage,[this.pageSizeKey]:(a==null?void 0:a[this.pageSizeKey])||this.defPageSize};await j.saveParamsByType(e,this),this.queryParams={...e},this.afterReset(),this.handleQuery()},initQueryParams(){var e;let a={[this.pageSizeKey]:this.defPageSize};return this.parametersType==="url"&&(a={...a,...fe.queryToData((e=this.$route)==null?void 0:e.query)}),this.parametersType==="indexDB"&&Ae({tableName:"formParams",propertiesKey:this.$route.path||"defQueryParams",primaryKey:this.DBPrimaryKey||"default",mapDB:Le},t=>{t&&(this.queryParams={...a,...t}),this.queryWhenReady&&this.$nextTick(()=>{this.handleQuery({defaultPageFirst:!1})})}),this.queryWhenReady&&this.parametersType!=="indexDB"&&this.$nextTick(()=>{this.handleQuery({defaultPageFirst:!1})}),a},currentInputComponent(){return"input-archive"},getItemRules(a){const{type:e,rules:t=[]}=a,r=[...t];return this.noInputBlank&&e==="input"&&r.push({pattern:this.trimRegex,message:"请输入(不能仅输入空格)",trigger:"blur"}),r},getInputSetting(a){const{inputSetting:e,setting:t}=a;return{...this.inputSetting,...e,...t}},defaultFunction(){},getInputEvents(a){return{blur:a.blur||this.defaultFunction,focus:a.focus||this.defaultFunction,change:a.change||this.defaultFunction,input:a.input||this.defaultFunction,clear:a.clear||this.defaultFunction}},getSelectSetting(a){const{selectSetting:e,setting:t}=a;return{...this.selectSetting,...e,...t}},getSelectEvents(a){return{change:a.change||this.defaultFunction,"visible-change":a["visible-change"]||this.defaultFunction,"remove-tag":a["remove-tag"]||this.defaultFunction,"expand-change":a["expand-change"]||this.defaultFunction,clear:a.clear||this.defaultFunction,blur:a.blur||this.defaultFunction,focus:a.focus||this.defaultFunction}},getDatePackerSetting(a){const{datePackerSetting:e,setting:t}=a;return{...this.datePackerSetting,...e,...t}},getDatePackerEvents(a){return{change:a.change||this.defaultFunction,blur:a.blur||this.defaultFunction,focus:a.focus||this.defaultFunction}},getCheckboxGroupSetting(a){const{checkboxGroupSetting:e,setting:t}=a;return{...e,...t}},getCheckboxGroupEvents(a){return{change:a.change||this.defaultFunction}}}};var Ve=function(){var e=this,t=e._self._c;return t("el-form",e._b({directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryFormRef",attrs:{model:e.queryParams,"label-width":e.labelWidth}},"el-form",e.attrs,!1),[e._l(e.formItem,function(r){return t("el-form-item",e._b({key:r.prop,attrs:{rules:e.getItemRules(r)}},"el-form-item",r,!1),[r.type==="input"?t("el-input",e._g(e._b({attrs:{size:e.size},nativeOn:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(r.template,function(n,o){return{key:o,fn:function(){return[n?t(e.currentInputComponent(),{key:o,tag:"component",attrs:{templateEle:n}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(r),!1),e.getInputEvents(r))):r.type==="input-mobile-verification"?t("el-input",e._g(e._b({attrs:{size:e.size},nativeOn:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(r.template,function(n,o){return{key:o,fn:function(){return[n?t(e.currentInputComponent(),{key:o,tag:"component",attrs:{templateEle:n}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(r),!1),e.getInputEvents(r)),[t("template",{slot:"append"},[t("verification-button",{attrs:{verificationSetting:r.verificationSetting,getSmscode:r.getSmscode}})],1)],2):r.type==="select"?t("el-select",e._g(e._b({attrs:{filterable:"",size:e.size},model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-select",e.getSelectSetting(r),!1),e.getSelectEvents(r)),e._l(r.option||[],function(n){return t("el-option",{key:n.key||n.value,attrs:{label:n.label,value:n.value}})}),1):r.type==="cascader"?t("el-cascader",e._g(e._b({attrs:{filterable:"",size:e.size,options:r.options||[]},model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-cascader",e.getSelectSetting(r),!1),e.getSelectEvents(r))):r.type==="date-picker"?t("el-date-picker",e._g(e._b({attrs:{size:e.size},model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-date-picker",e.getDatePackerSetting(r),!1),e.getDatePackerEvents(r))):e._e(),r.type==="input-number"?t("el-input-number",e._g(e._b({attrs:{size:e.size},model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-input-number",e.getInputSetting(r),!1),e.getInputEvents(r))):r.type==="checkbox"?t("el-checkbox-group",e._g(e._b({attrs:{size:e.size},model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-checkbox-group",e.getCheckboxGroupSetting(r),!1),e.getCheckboxGroupEvents(r)),e._l(r.option||[],function(n){return t("el-checkbox",e._b({key:n.key||n.value||n.label},"el-checkbox",n,!1))}),1):e._e(),/^form-item-slot$/i.test(r.type)?e._t(r.name):e._e()],2)}),e._t("default"),e.formOnly?e._e():t("el-form-item",[t("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:e.size,loading:e.formLoading},on:{click:e.handleQuery}},[e._v("查询")]),t("el-button",{attrs:{icon:"el-icon-refresh",size:e.size},on:{click:e.resetQuery}},[e._v("重置")])],1),e._t("behind-the-button")],2)},Qe=[],Ge=E(Re,Ve,Qe,!1,null,"111d2d55",null,null);const We=Ge.exports,St="",Je={components:{},props:{query:{type:Object,default:()=>({prefCode:sessionStorage.getItem("prefCode")})},routePath:{type:String,default:()=>"/search/searchDetail"},inputstyle:{type:Object,default:()=>({width:"1280px"})},openHref:{type:Boolean,default:()=>!1},size:{type:String,default:()=>"medium"}},data(){var a,e;return{keyWord:((e=(a=this.$route)==null?void 0:a.query)==null?void 0:e.keyWord)||"",attrs:{}}},watch:{$attrs:{handler(a){this.attrs={...this.attrs,...a}},immediate:!0,deep:!0}},methods:{search(){const a={path:this.routePath,query:{...this.query,keyWord:this.keyWord}};if(this.openHref){const e=this.$router.resolve(a);window.open(e.href,"_blank")}else this.$router.push(a)}}};var Ze=function(){var e=this,t=e._self._c;return t("div",{staticClass:"search-box"},[t("el-input",e._b({style:{...e.inputstyle},attrs:{size:e.size},nativeOn:{keydown:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"enter",13,r.key,"Enter")?null:e.search.apply(null,arguments)}},model:{value:e.keyWord,callback:function(r){e.keyWord=r},expression:"keyWord"}},"el-input",e.attrs,!1),[t("svg",{staticClass:"el-input__icon",attrs:{slot:"prefix",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},slot:"prefix"},[t("path",{attrs:{d:"M9.51033 10.2186C8.69189 10.8814 7.64943 11.2784 6.51424 11.2784C3.88302 11.2784 1.75 9.14541 1.75 6.51421C1.75 3.88301 3.88302 1.75 6.51424 1.75C9.14545 1.75 11.2785 3.88301 11.2785 6.51421C11.2785 7.64942 10.8814 8.69189 10.2186 9.51034L13.75 13.0417L13.0417 13.75L9.51033 10.2186ZM10.2768 6.51421C10.2768 4.43623 8.59224 2.75168 6.51424 2.75168C4.43623 2.75168 2.75168 4.43623 2.75168 6.51421C2.75168 8.59219 4.43623 10.2767 6.51424 10.2767C8.59224 10.2767 10.2768 8.59219 10.2768 6.51421Z",fill:"#959A9F"}})])])],1)},Me=[],Ue=E(Je,Ze,Me,!1,null,"ef706e31",null,null);const He=Ue.exports,Xe={name:"Descriptions",components:{DescriptionsColumn:{functional:!0,props:{column:{default:{render:()=>{}},type:Object},formData:{default:{},type:Object}},render(a,e){const{props:t}=e,{column:r,formData:n}=t;return r.render(n)}}},data(){return{attrs:{border:!0,class:"v-descriptions"}}},props:{formItem:{type:Array,default:()=>[]},formData:{type:Object,default:()=>{}}},watch:{$attrs:{handler(a){this.attrs={...this.attrs,...a}},immediate:!0,deep:!0}}};var Ye=function(){var e=this,t=e._self._c;return t("el-descriptions",e._b({},"el-descriptions",e.attrs,!1),e._l(e.formItem,function(r,n){return t("el-descriptions-item",e._b({key:r.prop,attrs:{label:r.label}},"el-descriptions-item",r.descriptionsItemProps,!1),[r.render?t("DescriptionsColumn",{attrs:{column:r,formData:e.formData}}):t("span",[e._v(e._s(e.formData[r.prop]))])],1)}),1)},et=[],tt=E(Xe,Ye,et,!1,null,null,null,null);const rt=tt.exports,kt="",at={props:{nodeKey:{type:String,default:"id"},filterable:{type:Boolean,default:!1},dataSource:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]}},watch:{sourceFilterText(a){this.$refs.sourceTree.filter(a)},selectedFilterText(a){this.$refs.selectTree.filter(a)},checkedKeys(a){this.$refs.sourceTree.setCheckedKeys(a),A.nextTick(()=>{this.getSelectedData(),this.$refs.selectTree.setCheckedKeys(a)})}},data(){return{defaultTreeAttributes:{"default-expand-all":!0,"show-checkbox":!0},selectedList:[],sourceFilterText:"",selectedFilterText:""}},methods:{sourceFilterNode(a,e){return a?e.label.indexOf(a)!==-1:!0},getSelectedData(){let a=!0,e;const t=this.$refs.sourceTree.getCheckedNodes(a,e);this.selectedList=t},removeSelectedData(){let a,e;const t=this.$refs.selectTree.getCheckedNodes(a,e),r={};t.forEach(n=>{r[n[this.nodeKey]]=n}),this.selectedList=this.selectedList.filter(n=>!r[n[this.nodeKey]])}}};var nt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tree-box"},[t("div",{staticClass:"left-box"},[e.filterable?t("el-input",{attrs:{placeholder:"输入关键字进行过滤"},model:{value:e.sourceFilterText,callback:function(r){e.sourceFilterText=r},expression:"sourceFilterText"}}):e._e(),t("el-tree",e._b({ref:"sourceTree",attrs:{data:e.dataSource,"filter-node-method":e.sourceFilterNode,nodeKey:e.nodeKey}},"el-tree",{...e.defaultTreeAttributes},!1))],1),t("div",{staticClass:"mid-box"},[t("el-button",{attrs:{icon:"el-icon-arrow-right",circle:""},on:{click:e.getSelectedData}}),t("el-button",{attrs:{icon:"el-icon-arrow-left",circle:""},on:{click:e.removeSelectedData}})],1),t("div",{staticClass:"right-box"},[e.filterable?t("el-input",{attrs:{placeholder:"输入关键字进行过滤"},model:{value:e.selectedFilterText,callback:function(r){e.selectedFilterText=r},expression:"selectedFilterText"}}):e._e(),t("el-tree",e._b({ref:"selectTree",attrs:{data:e.selectedList,"filter-node-method":e.sourceFilterNode,nodeKey:e.nodeKey}},"el-tree",{...e.defaultTreeAttributes},!1))],1)])},st=[],ot=E(at,nt,st,!1,null,"49dbad2a",null,null);const it=ot.exports,xt="",{getData:ct}=be,{formSchema:lt}=he,ut={name:"VTabs",data(){return{activeName:this.activeNameInit()}},props:{tabPanes:{type:Array,default:()=>[]},parametersType:{type:String,default:"url"},DBPrimaryKey:{type:[String,Number],required:!1},activeNameKey:{type:String,default:"activeName"},defActiveName:{type:String},getList:{type:Function,default:()=>{}}},watch:{defActiveName:{handler(a,e){JSON.stringify(a)!==JSON.stringify(this.activeName)&&(this.activeName=a)},immediate:!0},activeName:{handler(a){this.$emit(`update:${this.activeNameKey}`,a)}}},methods:{async handleClick(a,e){const t=await j.makeParamsByType({[this.activeNameKey]:this.activeName},this);await j.saveParamsByType(t,this),this.getList({...t})},activeNameInit(){var t,r,n;let a="";(t=this.tabPanes[0])!=null&&t.name&&(a=(r=this.tabPanes[0])==null?void 0:r.name);const e=fe.queryToData(Number((n=this.$route)==null?void 0:n.query[this.activeNameKey]));return this.parametersType==="url"&&e&&(a=e),this.parametersType==="indexDB"&&ct({tableName:"formParams",propertiesKey:this.$route.path||"defQueryParams",primaryKey:this.DBPrimaryKey||"default",mapDB:lt},o=>{(o==null?void 0:o[this.activeNameKey])&&(this.activeName=o==null?void 0:o[this.activeNameKey])}),this.defActiveName&&(a=this.defActiveName),`${a}`}}};var pt=function(){var e=this,t=e._self._c;return t("el-tabs",e._b({on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(r){e.activeName=r},expression:"activeName"}},"el-tabs",e.$attrs,!1),[e._l(e.tabPanes,function(r){return t("el-tab-pane",e._b({key:r.name},"el-tab-pane",r,!1),[e._v(" "+e._s(r.render&&r.render(r))+" ")])}),e._t("default")],2)},ft=[],dt=E(ut,pt,ft,!1,null,"be4034be",null,null);const yt=dt.exports,mt=We,ht=He,bt=rt,gt=it,_t=yt;I.VDescriptions=bt,I.VGeneralBasicForm=mt,I.VSearchBox=ht,I.VTabs=_t,I.VTreeTransfer=gt,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(D,R){typeof exports=="object"&&typeof module<"u"?R(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],R):(D=typeof globalThis<"u"?globalThis:D||self,R(D.Index={},D.Vue))})(this,function(D,R){"use strict";const Tt="";function $(a,e,t,r,n,o,i,s){var c=typeof a=="function"?a.options:a;e&&(c.render=e,c.staticRenderFns=t,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o);var d;if(i?(d=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),n&&n.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(i)},c._ssrRegister=d):n&&(d=s?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),d)if(c.functional){c._injectStyles=d;var p=c.render;c.render=function(y,b){return d.call(b),p(y,b)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,d):[d]}return{exports:a,options:c}}const ge={props:{verificationSetting:{type:Object,default:()=>{}},getSmscode:{type:Function,default:()=>{}}},data(){return{defaultText:this.verificationSetting.defaultText||"获取验证码",buttonText:this.verificationSetting.defaultText||"获取验证码",restTime:this.verificationSetting.restTime||60,timer:null}},computed:{buttonType(){return this.buttonText===this.defaultText}},destroyed(){this.reset()},methods:{reset(){this.timer&&(clearInterval(this.timer),this.timer=null,this.buttonText=this.defaultText)},async buttonClick(){if(this.buttonText===this.defaultText)if(this.buttonText=this.restTime,this.timer=setInterval(()=>{if(Number(this.buttonText)<=0||!this.buttonText){this.reset();return}else this.buttonText=Number(this.buttonText)-1},1e3),this.getSmscode)await this.getSmscode()===!1&&this.reset();else return}}};var ve=function(){var e=this,t=e._self._c;return t("el-button",{on:{click:e.buttonClick}},[e._v(e._s(e.buttonType?e.defaultText:e.buttonText+"s"))])},Se=[],we=$(ge,ve,Se,!1,null,null,null,null);const ke=we.exports,xe=(a={})=>{for(const e in a)if(Object.prototype.hasOwnProperty.call(a,e)){const t=a[e];Object.prototype.toString.call(t)==="[object Object]"&&(a[e]=JSON.stringify(t))}return a},De=(a={})=>{for(const e in a)if(Object.prototype.hasOwnProperty.call(a,e)){const t=a[e];try{/[{]+/g.test(t)&&/[}]+/g.test(t)&&(a[e]=JSON.parse(t))}catch{}}return a},ae={paramsToQuery:xe,queryToData:De},N=L;(function(a,e){const t=L,r=a();for(;;)try{if(parseInt(t(561))/1+-parseInt(t(558))/2+parseInt(t(521))/3*(parseInt(t(527))/4)+-parseInt(t(506))/5*(parseInt(t(510))/6)+-parseInt(t(550))/7*(parseInt(t(503))/8)+parseInt(t(540))/9+-parseInt(t(546))/10*(-parseInt(t(562))/11)===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(G,819524);const w={};let q=null;const le=async(a,e)=>{const t=L;!window[t(543)]&&window[t(498)]("您的浏览器不支持IndexedDB的稳定版本。离线数据功能将不可用。Your browser doesn't support a stable version of IndexedDB. offline data feature will not be available.");const{DBName:r="",DBVersion:n=1}=a;let o,i=!1;try{const s=window[t(543)][t(519)](r,n);await new Promise((c,d)=>{const p=t;s[p(551)]=async function(u){const l=p,y=u.target.result,{stores:b=[]}=a;await Promise.all(b[l(509)](async f=>{const h=l,{DBStoreName:m="",properties:_={}}=f;try{const g={};g[h(536)]=a[h(557)];const T=u[h(541)][h(520)][h(554)](m,g);if(Object[h(548)](_)[h(500)]===0){console[h(559)](m+"没有设置默认值");return}for(const v in _)if(_[h(556)][h(515)](_,v)){const S=_[v],x={...S.createIndex};T[h(504)](v,v,x)}}catch(g){console[h(559)](g)}})),o=y,i=!0},s[p(535)]=async function(u){const l=p;if(o=this[l(520)],i){const{stores:y=[]}=a;await Promise[l(528)](y[l(509)](async b=>{const f=l,{DBStoreName:h=""}=b,m=o[f(552)]([h],f(547)),_=m[f(496)](h),g={};g[a[f(557)]]=e,_[f(502)](g);try{await new Promise((T,v)=>{const S=f;m[S(525)]=function(x){const P=S;console[P(513)](P(512),x),v()},m[S(544)]=function(x){T()},m[S(529)]=function(x){const P=S;console[P(513)](P(534),x),v()}})}catch(T){console.warn(f(511),T)}}))}c()},s.onerror=function(u){d(u)}})}catch(s){console[t(513)](s,t(526))}return o};function G(){const a=["transaction","DBName","createObjectStore","close","hasOwnProperty","primaryKey","208156ZfrAJr","warn","delete","1575928bFmnZg","154LBDnQZ","objectStore","数据更新失败","alert","store不存在,请更新schema和DBVersion并重启前端服务","length","openCursor","add","15752fkogxb","createIndex","deleteDB","299045NkkBTh","请传入主键","mapDB","map","102uEoUGM","目前所有数据都在用户ID的主键下面,所以没有主键的话做重新载入页面处理","主键插入中止","error","数据库删除失败","call","continue","update","deleteStore","open","result","66891DVCnfv","get","getDataByKey","数据删除失败","onabort","打开数据库报错,可能是数据库版本不对,或者储存容量不足等原因","52JGzdMb","all","onerror","put","数据更新失败没有request","Database connection closed, reconnecting...","target","主键插入失败","onsuccess","keyPath","数据更新成功","主键查询结果:","传入结构化克隆算法不支持的数据类型可能导致报错","4779333CtWPbr","currentTarget","获取Database缺乏用户信息,请先传入对primaryKey的赋值","indexedDB","oncomplete","事务失败","634540WpNScH","readwrite","keys","getDB","4781SEkDBZ","onupgradeneeded"];return G=function(){return a},G()}function L(a,e){const t=G();return L=function(r,n){return r=r-496,t[r]},L(a,e)}let W=!1;w[N(549)]=async(a,e)=>{const t=N,{mapDB:r,primaryKey:n}=a;return r?n?(W&&await new Promise(async(o,i)=>{const s=()=>{W?setTimeout(()=>{s()},200):o()};s()}),!q&&(W=!0,q=await le(r,n),q==null||q.addEventListener(t(555),async()=>{console.info(t(532)),q=await le(r,n)}),W=!1),e&&e(q),q):(console[t(559)](t(542)),!1):(console[t(559)]("必须传入数据库配置信息"),!1)},w[N(523)]=async(a,e)=>{const t=N,{mapDB:r,tableName:n,primaryKey:o}=a,i={};i[t(508)]=r,i[t(557)]=o;const s=await w.getDB(i);if(!s)return;const c=s.transaction([n]),d=c[t(496)](n),p=d[t(522)](o);return new Promise((u,l)=>{const y=t;p.onsuccess=function(b){const f=L;e&&e(n+f(538)+p[f(520)]),u(p[f(520)])},p[y(529)]=function(b){console.error(n+y(545)+b),l()}})},w.updateStore=async(a,e)=>{var t;const r=N,{mapDB:n,tableName:o,updateData:i}=a;!i[n==null?void 0:n[r(557)]]&&console[r(559)](r(507)+n[r(557)]);const s={};s.mapDB=n,s[r(557)]=i[n==null?void 0:n[r(557)]];const c=await w[r(549)](s);if(!c)return;let d=null;try{d=c[r(552)]([o],r(547)).objectStore(o)}catch(y){console[r(513)](r(499),y)}let p=null,u=null;const l=await new Promise((y,b)=>{const f=r,h=d[f(501)](i[n==null?void 0:n[f(557)]]);h[f(535)]=m=>{y(m)},h.onerror=m=>{b(m)}});u=(t=l==null?void 0:l[r(533)])==null?void 0:t[r(520)];try{u&&(u==null?void 0:u.primaryKey)===i[n==null?void 0:n.primaryKey]?p=u[r(517)](i):p=d[r(530)](i)}catch(y){console[r(513)](r(539),y,i)}new Promise((y,b)=>{const f=r;!p&&(console[f(513)](o+f(531)),b()),p[f(535)]=function(h){e&&e(o+f(537)),y()},p[f(529)]=function(h){const m=f;console[m(513)](o+m(497),h),b()}}),u&&u[r(516)]()},w[N(518)]=async(a,e)=>{const t=N,{mapDB:r,tableName:n,primaryKey:o}=a,i={};i[t(508)]=r,i[t(557)]=o;const s=await w.getDB(i);if(!s)return;const c=s[t(552)]([n],t(547))[t(496)](n)[t(560)](o);return new Promise((d,p)=>{const u=t;c[u(535)]=function(l){e&&e(n+"数据删除成功"),d()},c.onerror=function(l){const y=u;console[y(513)](n+y(524)+l),p()}})},w[N(505)]=async(a,e)=>{const{mapDB:t}=a,r=window.indexedDB.deleteDatabase(t.DBName);return new Promise((n,o)=>{const i=L;r[i(535)]=s=>{e&&e(t[i(553)]+"数据库已删除"),n()},r[i(529)]=s=>{const c=i;console[c(513)](t[c(553)]+c(514)+s),o()}})};function C(a,e){const t=J();return C=function(r,n){return r=r-125,t[r]},C(a,e)}function J(){const a=["updateData","error","getDataByKey","531aQoQZo","primaryKey","handleData","2kSsgxs","777jFjQPc","1271805RJVSFy","546pnZEJw","3522904vvFeGW","4wGSwDA","tableName","780ChApSf","deleteStore","655364nEjUrb","3705144rIEFqv","updateStore","getData","clearData","mapDB","3003845nIJAzp"];return J=function(){return a},J()}const Z=C;(function(a,e){const t=C,r=a();for(;;)try{if(-parseInt(t(140))/1*(-parseInt(t(127))/2)+parseInt(t(142))/3*(parseInt(t(145))/4)+-parseInt(t(133))/5+-parseInt(t(143))/6*(parseInt(t(141))/7)+-parseInt(t(128))/8+parseInt(t(137))/9*(parseInt(t(125))/10)+parseInt(t(144))/11===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(J,330152);async function Ie(a,e){const t=C,{tableName:r,propertiesKey:n,parameter:o,primaryKey:i,mapDB:s}=a;let c=null,d={[s[t(138)]]:i};const p={};p[t(132)]=s,p.tableName=r,p[t(138)]=i;const u=await w[t(136)](p);u&&(d={...u,[s.primaryKey]:i}),d[n]=o;const l={};return l[t(132)]=s,l.tableName=r,l[t(134)]=d,await w[t(129)](l),o&&(c=o),e&&e(c),c}async function Be(a,e){const t=C,{tableName:r,propertiesKey:n,primaryKey:o,mapDB:i}=a;let s=null;const c={};c[t(132)]=i,c[t(146)]=r,c.primaryKey=o;const d=await w[t(136)](c);return d&&(s=d[n]),e&&e(s),s}async function Te(a,e){const t=C,{tableName:r,propertiesKey:n,parameter:o,primaryKey:i,mapDB:s}=a;let c={};const d={};d.mapDB=s,d[t(146)]=r,d[t(138)]=i;const p=await w[t(136)](d);try{if(p){c={...p[n],...o};const u={[s[t(138)]]:i},l=u;l[n]=c;const y={};y[t(132)]=s,y[t(146)]=r,y[t(134)]=l,await w.updateStore(y)}else console.warn(r+"为空,请先调用handleData")}catch(u){console[t(135)](u)}return e&&e(c),c}async function Pe(a,e){const t=C,{tableName:r,primaryKey:n,mapDB:o}=a;let i=null;try{const s={};s.mapDB=o,s[t(146)]=r,s[t(138)]=n,await w[t(126)](s)}catch(s){console.error(s)}return e&&e(i),i}const V={};V[Z(139)]=Ie,V[Z(130)]=Be,V[Z(134)]=Te,V[Z(131)]=Pe;var I=U;(function(a,e){for(var t=U,r=a();;)try{var n=-parseInt(t(385))/1+parseInt(t(387))/2+-parseInt(t(389))/3+-parseInt(t(398))/4*(parseInt(t(394))/5)+-parseInt(t(402))/6+-parseInt(t(399))/7+-parseInt(t(386))/8*(-parseInt(t(400))/9);if(n===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(M,363872);var ue={};ue[I(397)]=!1;var ne={};ne[I(384)]=ue,ne[I(392)]={};var pe={};function M(){var a=["default","mapDB-indexeddb-form-schema","663915ecCGKl","primaryKey","stores","unique","12QKZOdu","2103521TxMjSC","1212714qgZAmF","formParams","3534618LLAImJ","DBName","properties","createIndex","464644FTRsMp","128qSoFyx","33606razpoB","DBVersion","168804drPGaG","queryParams","DBStoreName"];return M=function(){return a},M()}pe[I(390)]=ne;function U(a,e){var t=M();return U=function(r,n){r=r-382;var o=t[r];return o},U(a,e)}var se={};se[I(391)]=I(401),se[I(383)]=pe;var j={};j[I(395)]="userId",j[I(382)]=I(393),j[I(388)]=1,j[I(396)]=[se];const Ne={formSchema:j},Ce=V,{handleData:Fe,getData:Ke}=Ce,{formSchema:de}=Ne,$e=async(a,e)=>{var t;return e.parametersType==="url"&&(a={...ae.queryToData((t=e.$route)==null?void 0:t.query),...a}),e.parametersType==="indexDB"&&(a={...await Ke({tableName:"formParams",propertiesKey:e.$route.path||"defQueryParams",primaryKey:e.DBPrimaryKey||"default",mapDB:de}),...a}),a},qe=async(a,e)=>{e.parametersType==="url"&&await e.$router.push({query:ae.paramsToQuery({...a})}),e.parametersType==="indexDB"&&await Fe({tableName:"formParams",propertiesKey:e.$route.path||"defQueryParams",parameter:{...a},primaryKey:e.DBPrimaryKey||"default",mapDB:de})},Le={makeParamsByType:$e,saveParamsByType:qe},Oe={functional:!0,props:{renderFunction:{default:()=>{},type:Function},item:{default:()=>{},type:Object}},render(a,e){const{props:t}=e,{renderFunction:r,item:n}=t;return r(n)}},fe=ae,E=Le,oe=Oe,F=z;(function(a,e){const t=z,r=a();for(;;)try{if(parseInt(t(561))/1+-parseInt(t(558))/2+parseInt(t(521))/3*(parseInt(t(527))/4)+-parseInt(t(506))/5*(parseInt(t(510))/6)+-parseInt(t(550))/7*(parseInt(t(503))/8)+parseInt(t(540))/9+-parseInt(t(546))/10*(-parseInt(t(562))/11)===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(H,819524);const k={};let O=null;const ye=async(a,e)=>{const t=z;!window[t(543)]&&window[t(498)]("您的浏览器不支持IndexedDB的稳定版本。离线数据功能将不可用。Your browser doesn't support a stable version of IndexedDB. offline data feature will not be available.");const{DBName:r="",DBVersion:n=1}=a;let o,i=!1;try{const s=window[t(543)][t(519)](r,n);await new Promise((c,d)=>{const p=t;s[p(551)]=async function(u){const l=p,y=u.target.result,{stores:b=[]}=a;await Promise.all(b[l(509)](async f=>{const h=l,{DBStoreName:m="",properties:_={}}=f;try{const g={};g[h(536)]=a[h(557)];const T=u[h(541)][h(520)][h(554)](m,g);if(Object[h(548)](_)[h(500)]===0){console[h(559)](m+"没有设置默认值");return}for(const v in _)if(_[h(556)][h(515)](_,v)){const S=_[v],x={...S.createIndex};T[h(504)](v,v,x)}}catch(g){console[h(559)](g)}})),o=y,i=!0},s[p(535)]=async function(u){const l=p;if(o=this[l(520)],i){const{stores:y=[]}=a;await Promise[l(528)](y[l(509)](async b=>{const f=l,{DBStoreName:h=""}=b,m=o[f(552)]([h],f(547)),_=m[f(496)](h),g={};g[a[f(557)]]=e,_[f(502)](g);try{await new Promise((T,v)=>{const S=f;m[S(525)]=function(x){const P=S;console[P(513)](P(512),x),v()},m[S(544)]=function(x){T()},m[S(529)]=function(x){const P=S;console[P(513)](P(534),x),v()}})}catch(T){console.warn(f(511),T)}}))}c()},s.onerror=function(u){d(u)}})}catch(s){console[t(513)](s,t(526))}return o};function H(){const a=["transaction","DBName","createObjectStore","close","hasOwnProperty","primaryKey","208156ZfrAJr","warn","delete","1575928bFmnZg","154LBDnQZ","objectStore","数据更新失败","alert","store不存在,请更新schema和DBVersion并重启前端服务","length","openCursor","add","15752fkogxb","createIndex","deleteDB","299045NkkBTh","请传入主键","mapDB","map","102uEoUGM","目前所有数据都在用户ID的主键下面,所以没有主键的话做重新载入页面处理","主键插入中止","error","数据库删除失败","call","continue","update","deleteStore","open","result","66891DVCnfv","get","getDataByKey","数据删除失败","onabort","打开数据库报错,可能是数据库版本不对,或者储存容量不足等原因","52JGzdMb","all","onerror","put","数据更新失败没有request","Database connection closed, reconnecting...","target","主键插入失败","onsuccess","keyPath","数据更新成功","主键查询结果:","传入结构化克隆算法不支持的数据类型可能导致报错","4779333CtWPbr","currentTarget","获取Database缺乏用户信息,请先传入对primaryKey的赋值","indexedDB","oncomplete","事务失败","634540WpNScH","readwrite","keys","getDB","4781SEkDBZ","onupgradeneeded"];return H=function(){return a},H()}function z(a,e){const t=H();return z=function(r,n){return r=r-496,t[r]},z(a,e)}let X=!1;k[F(549)]=async(a,e)=>{const t=F,{mapDB:r,primaryKey:n}=a;return r?n?(X&&await new Promise(async(o,i)=>{const s=()=>{X?setTimeout(()=>{s()},200):o()};s()}),!O&&(X=!0,O=await ye(r,n),O==null||O.addEventListener(t(555),async()=>{console.info(t(532)),O=await ye(r,n)}),X=!1),e&&e(O),O):(console[t(559)](t(542)),!1):(console[t(559)]("必须传入数据库配置信息"),!1)},k[F(523)]=async(a,e)=>{const t=F,{mapDB:r,tableName:n,primaryKey:o}=a,i={};i[t(508)]=r,i[t(557)]=o;const s=await k.getDB(i);if(!s)return;const c=s.transaction([n]),d=c[t(496)](n),p=d[t(522)](o);return new Promise((u,l)=>{const y=t;p.onsuccess=function(b){const f=z;e&&e(n+f(538)+p[f(520)]),u(p[f(520)])},p[y(529)]=function(b){console.error(n+y(545)+b),l()}})},k.updateStore=async(a,e)=>{var t;const r=F,{mapDB:n,tableName:o,updateData:i}=a;!i[n==null?void 0:n[r(557)]]&&console[r(559)](r(507)+n[r(557)]);const s={};s.mapDB=n,s[r(557)]=i[n==null?void 0:n[r(557)]];const c=await k[r(549)](s);if(!c)return;let d=null;try{d=c[r(552)]([o],r(547)).objectStore(o)}catch(y){console[r(513)](r(499),y)}let p=null,u=null;const l=await new Promise((y,b)=>{const f=r,h=d[f(501)](i[n==null?void 0:n[f(557)]]);h[f(535)]=m=>{y(m)},h.onerror=m=>{b(m)}});u=(t=l==null?void 0:l[r(533)])==null?void 0:t[r(520)];try{u&&(u==null?void 0:u.primaryKey)===i[n==null?void 0:n.primaryKey]?p=u[r(517)](i):p=d[r(530)](i)}catch(y){console[r(513)](r(539),y,i)}new Promise((y,b)=>{const f=r;!p&&(console[f(513)](o+f(531)),b()),p[f(535)]=function(h){e&&e(o+f(537)),y()},p[f(529)]=function(h){const m=f;console[m(513)](o+m(497),h),b()}}),u&&u[r(516)]()},k[F(518)]=async(a,e)=>{const t=F,{mapDB:r,tableName:n,primaryKey:o}=a,i={};i[t(508)]=r,i[t(557)]=o;const s=await k.getDB(i);if(!s)return;const c=s[t(552)]([n],t(547))[t(496)](n)[t(560)](o);return new Promise((d,p)=>{const u=t;c[u(535)]=function(l){e&&e(n+"数据删除成功"),d()},c.onerror=function(l){const y=u;console[y(513)](n+y(524)+l),p()}})},k[F(505)]=async(a,e)=>{const{mapDB:t}=a,r=window.indexedDB.deleteDatabase(t.DBName);return new Promise((n,o)=>{const i=z;r[i(535)]=s=>{e&&e(t[i(553)]+"数据库已删除"),n()},r[i(529)]=s=>{const c=i;console[c(513)](t[c(553)]+c(514)+s),o()}})};function K(a,e){const t=Y();return K=function(r,n){return r=r-125,t[r]},K(a,e)}function Y(){const a=["updateData","error","getDataByKey","531aQoQZo","primaryKey","handleData","2kSsgxs","777jFjQPc","1271805RJVSFy","546pnZEJw","3522904vvFeGW","4wGSwDA","tableName","780ChApSf","deleteStore","655364nEjUrb","3705144rIEFqv","updateStore","getData","clearData","mapDB","3003845nIJAzp"];return Y=function(){return a},Y()}const ee=K;(function(a,e){const t=K,r=a();for(;;)try{if(-parseInt(t(140))/1*(-parseInt(t(127))/2)+parseInt(t(142))/3*(parseInt(t(145))/4)+-parseInt(t(133))/5+-parseInt(t(143))/6*(parseInt(t(141))/7)+-parseInt(t(128))/8+parseInt(t(137))/9*(parseInt(t(125))/10)+parseInt(t(144))/11===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(Y,330152);async function ze(a,e){const t=K,{tableName:r,propertiesKey:n,parameter:o,primaryKey:i,mapDB:s}=a;let c=null,d={[s[t(138)]]:i};const p={};p[t(132)]=s,p.tableName=r,p[t(138)]=i;const u=await k[t(136)](p);u&&(d={...u,[s.primaryKey]:i}),d[n]=o;const l={};return l[t(132)]=s,l.tableName=r,l[t(134)]=d,await k[t(129)](l),o&&(c=o),e&&e(c),c}async function Ee(a,e){const t=K,{tableName:r,propertiesKey:n,primaryKey:o,mapDB:i}=a;let s=null;const c={};c[t(132)]=i,c[t(146)]=r,c.primaryKey=o;const d=await k[t(136)](c);return d&&(s=d[n]),e&&e(s),s}async function Re(a,e){const t=K,{tableName:r,propertiesKey:n,parameter:o,primaryKey:i,mapDB:s}=a;let c={};const d={};d.mapDB=s,d[t(146)]=r,d[t(138)]=i;const p=await k[t(136)](d);try{if(p){c={...p[n],...o};const u={[s[t(138)]]:i},l=u;l[n]=c;const y={};y[t(132)]=s,y[t(146)]=r,y[t(134)]=l,await k.updateStore(y)}else console.warn(r+"为空,请先调用handleData")}catch(u){console[t(135)](u)}return e&&e(c),c}async function Ve(a,e){const t=K,{tableName:r,primaryKey:n,mapDB:o}=a;let i=null;try{const s={};s.mapDB=o,s[t(146)]=r,s[t(138)]=n,await k[t(126)](s)}catch(s){console.error(s)}return e&&e(i),i}const A={};A[ee(139)]=ze,A[ee(130)]=Ee,A[ee(134)]=Re,A[ee(131)]=Ve;var B=re;(function(a,e){for(var t=re,r=a();;)try{var n=-parseInt(t(385))/1+parseInt(t(387))/2+-parseInt(t(389))/3+-parseInt(t(398))/4*(parseInt(t(394))/5)+-parseInt(t(402))/6+-parseInt(t(399))/7+-parseInt(t(386))/8*(-parseInt(t(400))/9);if(n===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(te,363872);var he={};he[B(397)]=!1;var ie={};ie[B(384)]=he,ie[B(392)]={};var me={};function te(){var a=["default","mapDB-indexeddb-form-schema","663915ecCGKl","primaryKey","stores","unique","12QKZOdu","2103521TxMjSC","1212714qgZAmF","formParams","3534618LLAImJ","DBName","properties","createIndex","464644FTRsMp","128qSoFyx","33606razpoB","DBVersion","168804drPGaG","queryParams","DBStoreName"];return te=function(){return a},te()}me[B(390)]=ie;function re(a,e){var t=te();return re=function(r,n){r=r-382;var o=t[r];return o},re(a,e)}var ce={};ce[B(391)]=B(401),ce[B(383)]=me;var Q={};Q[B(395)]="userId",Q[B(382)]=B(393),Q[B(388)]=1,Q[B(396)]=[ce];const be={formSchema:Q},_e=A,Pt="",{getData:je}=_e,{formSchema:Ae}=be,Qe={name:"GeneralBasicForm",components:{InputArchive:a=>{const{templateEle:e}=a;return e()},VerificationButton:ke},props:{showSearch:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},formOnly:{type:Boolean,default:!1},getList:{type:Function,default:()=>{}},afterReset:{type:Function,default:()=>{}},formItem:{type:Array,default:()=>[]},size:{type:String,default:""},labelWidth:{type:String,default:"90px"},parametersType:{type:String,default:"url"},DBPrimaryKey:{type:[String,Number],required:!1},formData:{type:Object,default:()=>{}},noInputBlank:{type:Boolean,default:()=>!1},currentPageKey:{type:String,default:"page"},pageSizeKey:{type:String,default:"limit"},defCurrentPage:{type:Number,default:1},defPageSize:{type:Number,default:10},queryWhenReady:{type:Boolean,default:()=>!1}},data(){return{queryParams:this.initQueryParams(),formLoading:this.loading||!1,selectSetting:{placeholder:"请选择",filterable:!0,clearable:!0,style:"width: 200px"},inputSetting:{placeholder:"请输入",style:"width: 200px",clearable:!0},datePackerSetting:{style:"width: 227px","start-placeholder":"开始日期","end-placeholder":"结束日期",type:"daterange"},attrs:{inline:!0,"label-position":"left"}}},watch:{formData:{handler(a,e){JSON.stringify(a)!==JSON.stringify(this.queryParams)&&(this.queryParams={...this.queryParams,...a})},immediate:!0,deep:!0},queryParams:{handler(a){this.$emit("update:formData",{...a})},deep:!0},$attrs:{handler(a){this.attrs={...this.attrs,...a}},immediate:!0,deep:!0},loading(a){this.formLoading!==a&&(this.formLoading=a)},formLoading(a){this.loading!==a&&this.$emit("update:loading",a)}},methods:{async handleQuery(a={}){a.defaultPageFirst??(a.defaultPageFirst=!0);const e={[this.currentPageKey]:this.defCurrentPage};let t={...e,...this.queryParams};t=await E.makeParamsByType(t,this),a.defaultPageFirst&&(t={...t,...e}),await E.saveParamsByType(t,this),this.getList({...t})},async resetQuery(){this.$refs.queryFormRef.resetFields();const a=await E.makeParamsByType({},this),e={[this.currentPageKey]:this.defCurrentPage,[this.pageSizeKey]:(a==null?void 0:a[this.pageSizeKey])||this.defPageSize};await E.saveParamsByType(e,this),this.queryParams={...e},this.afterReset(),this.handleQuery()},initQueryParams(){var e;let a={[this.pageSizeKey]:this.defPageSize};return this.parametersType==="url"&&(a={...a,...fe.queryToData((e=this.$route)==null?void 0:e.query)}),this.parametersType==="indexDB"&&je({tableName:"formParams",propertiesKey:this.$route.path||"defQueryParams",primaryKey:this.DBPrimaryKey||"default",mapDB:Ae},t=>{t&&(this.queryParams={...a,...t}),this.queryWhenReady&&this.$nextTick(()=>{this.handleQuery({defaultPageFirst:!1})})}),this.queryWhenReady&&this.parametersType!=="indexDB"&&this.$nextTick(()=>{this.handleQuery({defaultPageFirst:!1})}),a},currentInputComponent(){return"input-archive"},getItemRules(a){const{type:e,rules:t=[]}=a,r=[...t];return this.noInputBlank&&e==="input"&&r.push({pattern:this.trimRegex,message:"请输入(不能仅输入空格)",trigger:"blur"}),r},getInputSetting(a){const{inputSetting:e,setting:t}=a;return{...this.inputSetting,...e,...t}},defaultFunction(){},getInputEvents(a){return{blur:a.blur||this.defaultFunction,focus:a.focus||this.defaultFunction,change:a.change||this.defaultFunction,input:a.input||this.defaultFunction,clear:a.clear||this.defaultFunction}},getSelectSetting(a){const{selectSetting:e,setting:t}=a;return{...this.selectSetting,...e,...t}},getSelectEvents(a){return{change:a.change||this.defaultFunction,"visible-change":a["visible-change"]||this.defaultFunction,"remove-tag":a["remove-tag"]||this.defaultFunction,"expand-change":a["expand-change"]||this.defaultFunction,clear:a.clear||this.defaultFunction,blur:a.blur||this.defaultFunction,focus:a.focus||this.defaultFunction}},getDatePackerSetting(a){const{datePackerSetting:e,setting:t}=a;return{...this.datePackerSetting,...e,...t}},getDatePackerEvents(a){return{change:a.change||this.defaultFunction,blur:a.blur||this.defaultFunction,focus:a.focus||this.defaultFunction}},getCheckboxGroupSetting(a){const{checkboxGroupSetting:e,setting:t}=a;return{...e,...t}},getCheckboxGroupEvents(a){return{change:a.change||this.defaultFunction}}}};var Ge=function(){var e=this,t=e._self._c;return t("el-form",e._b({directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryFormRef",attrs:{model:e.queryParams,"label-width":e.labelWidth}},"el-form",e.attrs,!1),[e._l(e.formItem,function(r){return t("el-form-item",e._b({key:r.prop,attrs:{rules:e.getItemRules(r)}},"el-form-item",r,!1),[r.type==="input"?t("el-input",e._g(e._b({attrs:{size:e.size},nativeOn:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(r.template,function(n,o){return{key:o,fn:function(){return[n?t(e.currentInputComponent(),{key:o,tag:"component",attrs:{templateEle:n}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(r),!1),e.getInputEvents(r))):r.type==="input-mobile-verification"?t("el-input",e._g(e._b({attrs:{size:e.size},nativeOn:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(r.template,function(n,o){return{key:o,fn:function(){return[n?t(e.currentInputComponent(),{key:o,tag:"component",attrs:{templateEle:n}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(r),!1),e.getInputEvents(r)),[t("template",{slot:"append"},[t("verification-button",{attrs:{verificationSetting:r.verificationSetting,getSmscode:r.getSmscode}})],1)],2):r.type==="select"?t("el-select",e._g(e._b({attrs:{filterable:"",size:e.size},model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-select",e.getSelectSetting(r),!1),e.getSelectEvents(r)),e._l(r.option||[],function(n){return t("el-option",{key:n.key||n.value,attrs:{label:n.label,value:n.value}})}),1):r.type==="cascader"?t("el-cascader",e._g(e._b({attrs:{filterable:"",size:e.size,options:r.options||[]},model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-cascader",e.getSelectSetting(r),!1),e.getSelectEvents(r))):r.type==="date-picker"?t("el-date-picker",e._g(e._b({attrs:{size:e.size},model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-date-picker",e.getDatePackerSetting(r),!1),e.getDatePackerEvents(r))):e._e(),r.type==="input-number"?t("el-input-number",e._g(e._b({attrs:{size:e.size},model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-input-number",e.getInputSetting(r),!1),e.getInputEvents(r))):r.type==="checkbox"?t("el-checkbox-group",e._g(e._b({attrs:{size:e.size},model:{value:e.queryParams[r.prop],callback:function(n){e.$set(e.queryParams,r.prop,n)},expression:"queryParams[item.prop]"}},"el-checkbox-group",e.getCheckboxGroupSetting(r),!1),e.getCheckboxGroupEvents(r)),e._l(r.option||[],function(n){return t("el-checkbox",e._b({key:n.key||n.value||n.label},"el-checkbox",n,!1))}),1):e._e(),/^form-item-slot$/i.test(r.type)?e._t(r.name):e._e()],2)}),e._t("default"),e.formOnly?e._e():t("el-form-item",[t("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:e.size,loading:e.formLoading},on:{click:e.handleQuery}},[e._v("查询")]),t("el-button",{attrs:{icon:"el-icon-refresh",size:e.size},on:{click:e.resetQuery}},[e._v("重置")])],1),e._t("behind-the-button")],2)},We=[],Je=$(Qe,Ge,We,!1,null,"111d2d55",null,null);const Ze=Je.exports,Nt="",Me={name:"InfiniteScrollList",components:{TableColumn:oe},props:{search:{type:Function,required:!0},checkbox:{type:Boolean,required:!1},id:{type:String,required:!0},name:{type:String,required:!1},extra:{type:null,required:!1},defaultSelection:{type:Array,required:!1},height:{type:String,required:!1,default:"272px"}},data(){return{list:[],page:1,ifbottom:!1,checkedList:[],loading:!1}},computed:{selectInfo(){return this.list.filter(a=>this.checkedList.includes(a[this.id]))}},watch:{defaultSelection:{handler(a=[],e=[]){this.updateCheckedList(a)},immediate:!0}},methods:{reset(){this.lowReset(),this.checkedList=[]},updateCheckedList(a){this.checkedList=a.map(e=>typeof e=="object"?e[this.id]:e)},lowReset(){this.page=1,this.list=[],this.ifbottom=!1},async loadList(){if(this.loading||this.ifbottom)return;this.loading=!0;const a=await this.search(this.page);a&&a.length>0?(this.list=[...this.list,...a],this.page+=1):this.ifbottom=!0,this.loading=!1},async refreshList(){this.lowReset(),await this.loadList()}}};var Ue=function(){var e=this,t=e._self._c;return e.checkbox?t("el-checkbox-group",e._b({directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],model:{value:e.checkedList,callback:function(r){e.checkedList=r},expression:"checkedList"}},"el-checkbox-group",e.$attrs,!1),[t("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:e.loadList,expression:"loadList"}],staticClass:"list",style:{height:e.height},attrs:{"infinite-scroll-disabled":e.ifbottom}},e._l(e.list,function(r){return t("li",{key:r[e.id],staticClass:"list-item"},[t("el-checkbox",{staticClass:"checkbox",attrs:{label:r[e.id]}},[e._v(e._s(r[e.name])+" "),e.extra?t("TableColumn",{attrs:{renderFunction:e.extra,item:r}}):e._e()],1)],1)}),0)]):t("ul",e._b({directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:e.loadList,expression:"loadList"}],staticClass:"list",style:{height:e.height},attrs:{"infinite-scroll-disabled":e.ifbottom}},"ul",e.$attrs,!1),e._l(e.list,function(r){return t("li",{key:r[e.id],staticClass:"list-item"},[t("div",{staticClass:"checkbox"},[e._v(" "+e._s(r[e.name])+" "),e.extra?t("TableColumn",{attrs:{renderFunction:e.extra,item:r}}):e._e()],1)])}),0)},He=[],Xe=$(Me,Ue,He,!1,null,"9ac38e10",null,null);const Ye=Xe.exports,Ct="",et={components:{},props:{query:{type:Object,default:()=>({prefCode:sessionStorage.getItem("prefCode")})},routePath:{type:String,default:()=>"/search/searchDetail"},inputstyle:{type:Object,default:()=>({width:"1280px"})},openHref:{type:Boolean,default:()=>!1},size:{type:String,default:()=>"medium"}},data(){var a,e;return{keyWord:((e=(a=this.$route)==null?void 0:a.query)==null?void 0:e.keyWord)||"",attrs:{}}},watch:{$attrs:{handler(a){this.attrs={...this.attrs,...a}},immediate:!0,deep:!0}},methods:{search(){const a={path:this.routePath,query:{...this.query,keyWord:this.keyWord}};if(this.openHref){const e=this.$router.resolve(a);window.open(e.href,"_blank")}else this.$router.push(a)}}};var tt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"search-box"},[t("el-input",e._b({style:{...e.inputstyle},attrs:{size:e.size},nativeOn:{keydown:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"enter",13,r.key,"Enter")?null:e.search.apply(null,arguments)}},model:{value:e.keyWord,callback:function(r){e.keyWord=r},expression:"keyWord"}},"el-input",e.attrs,!1),[t("svg",{staticClass:"el-input__icon",attrs:{slot:"prefix",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},slot:"prefix"},[t("path",{attrs:{d:"M9.51033 10.2186C8.69189 10.8814 7.64943 11.2784 6.51424 11.2784C3.88302 11.2784 1.75 9.14541 1.75 6.51421C1.75 3.88301 3.88302 1.75 6.51424 1.75C9.14545 1.75 11.2785 3.88301 11.2785 6.51421C11.2785 7.64942 10.8814 8.69189 10.2186 9.51034L13.75 13.0417L13.0417 13.75L9.51033 10.2186ZM10.2768 6.51421C10.2768 4.43623 8.59224 2.75168 6.51424 2.75168C4.43623 2.75168 2.75168 4.43623 2.75168 6.51421C2.75168 8.59219 4.43623 10.2767 6.51424 10.2767C8.59224 10.2767 10.2768 8.59219 10.2768 6.51421Z",fill:"#959A9F"}})])])],1)},rt=[],at=$(et,tt,rt,!1,null,"ef706e31",null,null);const nt=at.exports,st={name:"Descriptions",components:{TableColumn:oe},data(){return{attrs:{border:!0,class:"v-descriptions"}}},props:{formItem:{type:Array,default:()=>[]},formData:{type:Object,default:()=>{}}},watch:{$attrs:{handler(a){this.attrs={...this.attrs,...a}},immediate:!0,deep:!0}}};var ot=function(){var e=this,t=e._self._c;return t("el-descriptions",e._b({},"el-descriptions",e.attrs,!1),e._l(e.formItem,function(r,n){return t("el-descriptions-item",e._b({key:r.prop,attrs:{label:r.label}},"el-descriptions-item",r.descriptionsItemProps,!1),[r.render?t("TableColumn",{attrs:{renderFunction:r.render,item:e.formData}}):t("span",[e._v(e._s(e.formData[r.prop]))])],1)}),1)},it=[],ct=$(st,ot,it,!1,null,null,null,null);const lt=ct.exports,Ft="",ut={props:{nodeKey:{type:String,default:"id"},filterable:{type:Boolean,default:!1},dataSource:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]}},watch:{sourceFilterText(a){this.$refs.sourceTree.filter(a)},selectedFilterText(a){this.$refs.selectTree.filter(a)},checkedKeys(a){this.$refs.sourceTree.setCheckedKeys(a),R.nextTick(()=>{this.getSelectedData(),this.$refs.selectTree.setCheckedKeys(a)})}},data(){return{defaultTreeAttributes:{"default-expand-all":!0,"show-checkbox":!0},selectedList:[],sourceFilterText:"",selectedFilterText:""}},methods:{sourceFilterNode(a,e){return a?e.label.indexOf(a)!==-1:!0},getSelectedData(){let a=!0,e;const t=this.$refs.sourceTree.getCheckedNodes(a,e);this.selectedList=t},removeSelectedData(){let a,e;const t=this.$refs.selectTree.getCheckedNodes(a,e),r={};t.forEach(n=>{r[n[this.nodeKey]]=n}),this.selectedList=this.selectedList.filter(n=>!r[n[this.nodeKey]])}}};var pt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tree-box"},[t("div",{staticClass:"left-box"},[e.filterable?t("el-input",{attrs:{placeholder:"输入关键字进行过滤"},model:{value:e.sourceFilterText,callback:function(r){e.sourceFilterText=r},expression:"sourceFilterText"}}):e._e(),t("el-tree",e._b({ref:"sourceTree",attrs:{data:e.dataSource,"filter-node-method":e.sourceFilterNode,nodeKey:e.nodeKey}},"el-tree",{...e.defaultTreeAttributes},!1))],1),t("div",{staticClass:"mid-box"},[t("el-button",{attrs:{icon:"el-icon-arrow-right",circle:""},on:{click:e.getSelectedData}}),t("el-button",{attrs:{icon:"el-icon-arrow-left",circle:""},on:{click:e.removeSelectedData}})],1),t("div",{staticClass:"right-box"},[e.filterable?t("el-input",{attrs:{placeholder:"输入关键字进行过滤"},model:{value:e.selectedFilterText,callback:function(r){e.selectedFilterText=r},expression:"selectedFilterText"}}):e._e(),t("el-tree",e._b({ref:"selectTree",attrs:{data:e.selectedList,"filter-node-method":e.sourceFilterNode,nodeKey:e.nodeKey}},"el-tree",{...e.defaultTreeAttributes},!1))],1)])},dt=[],ft=$(ut,pt,dt,!1,null,"49dbad2a",null,null);const yt=ft.exports,Kt="",{getData:ht}=_e,{formSchema:mt}=be,bt={name:"VTabs",components:{TableColumn:oe},data(){return{activeName:this.activeNameInit()}},props:{tabPanes:{type:Array,default:()=>[]},parametersType:{type:String,default:"url"},DBPrimaryKey:{type:[String,Number],required:!1},activeNameKey:{type:String,default:"activeName"},defActiveName:{type:String},getList:{type:Function,default:()=>{}}},watch:{defActiveName:{handler(a,e){JSON.stringify(a)!==JSON.stringify(this.activeName)&&(this.activeName=a)},immediate:!0},activeName:{handler(a){this.$emit(`update:${this.activeNameKey}`,a)}}},methods:{async handleClick(a,e){const t=await E.makeParamsByType({[this.activeNameKey]:this.activeName},this);await E.saveParamsByType(t,this),this.getList({...t})},activeNameInit(){var t,r,n;let a="";(t=this.tabPanes[0])!=null&&t.name&&(a=(r=this.tabPanes[0])==null?void 0:r.name);const e=fe.queryToData(Number((n=this.$route)==null?void 0:n.query[this.activeNameKey]));return this.parametersType==="url"&&e&&(a=e),this.parametersType==="indexDB"&&ht({tableName:"formParams",propertiesKey:this.$route.path||"defQueryParams",primaryKey:this.DBPrimaryKey||"default",mapDB:mt},o=>{(o==null?void 0:o[this.activeNameKey])&&(this.activeName=o==null?void 0:o[this.activeNameKey])}),this.defActiveName&&(a=this.defActiveName),`${a}`}}};var _t=function(){var e=this,t=e._self._c;return t("el-tabs",e._b({on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(r){e.activeName=r},expression:"activeName"}},"el-tabs",e.$attrs,!1),[e._l(e.tabPanes,function(r){return t("el-tab-pane",e._b({key:r.name},"el-tab-pane",r,!1),[r.render?t("TableColumn",{attrs:{renderFunction:r.render,item:r}}):e._e()],1)}),e._t("default")],2)},gt=[],vt=$(bt,_t,gt,!1,null,"ee818ed7",null,null);const St=vt.exports,wt=Ze,kt=Ye,xt=nt,Dt=lt,It=yt,Bt=St;D.VDescriptions=Dt,D.VGeneralBasicForm=wt,D.VInfiniteScrollList=kt,D.VSearchBox=xt,D.VTabs=Bt,D.VTreeTransfer=It,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.search-box[data-v-ef706e31]{position:absolute;left:50%;top:0;transform:translate(-50%) translateY(-50%)}.search-box[data-v-ef706e31] .el-input{font-size:16px;font-weight:400;line-height:24px}.search-box[data-v-ef706e31] .el-input svg{width:32px;height:100%}.search-box[data-v-ef706e31] .el-input .el-input__prefix{left:24px;font-size:32px}.search-box[data-v-ef706e31] .el-input .el-input__suffix{right:24px;font-size:32px}.search-box[data-v-ef706e31] .el-input .el-input__icon{line-height:60px}.search-box[data-v-ef706e31] .el-input .el-input__inner{padding:14px 24px 14px 72px;height:60px;border-radius:37px;background:#FFF;box-shadow:0 0 8px #2b2e3105,0 6px 8px #2b2e3114;border-color:#fff}.search-box[data-v-ef706e31] .el-input .el-input__inner::placeholder{color:#959a9f}.search-box[data-v-ef706e31] .el-input .el-input__inner:hover{border:1px solid #00B5F2}.tree-box[data-v-49dbad2a]{display:flex}.tree-box .left-box[data-v-49dbad2a]{width:45%}.tree-box .mid-box[data-v-49dbad2a]{flex:auto;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly}.tree-box .mid-box .el-button[data-v-49dbad2a]{margin:0}.tree-box .right-box[data-v-49dbad2a]{width:45%}
|
|
1
|
+
@charset "UTF-8";.list[data-v-9ac38e10]{overflow:auto;padding:0;margin:0}.list .checkbox[data-v-9ac38e10]{width:calc(100% - 32px);padding:0 16px}.search-box[data-v-ef706e31]{position:absolute;left:50%;top:0;transform:translate(-50%) translateY(-50%)}.search-box[data-v-ef706e31] .el-input{font-size:16px;font-weight:400;line-height:24px}.search-box[data-v-ef706e31] .el-input svg{width:32px;height:100%}.search-box[data-v-ef706e31] .el-input .el-input__prefix{left:24px;font-size:32px}.search-box[data-v-ef706e31] .el-input .el-input__suffix{right:24px;font-size:32px}.search-box[data-v-ef706e31] .el-input .el-input__icon{line-height:60px}.search-box[data-v-ef706e31] .el-input .el-input__inner{padding:14px 24px 14px 72px;height:60px;border-radius:37px;background:#FFF;box-shadow:0 0 8px #2b2e3105,0 6px 8px #2b2e3114;border-color:#fff}.search-box[data-v-ef706e31] .el-input .el-input__inner::placeholder{color:#959a9f}.search-box[data-v-ef706e31] .el-input .el-input__inner:hover{border:1px solid #00B5F2}.tree-box[data-v-49dbad2a]{display:flex}.tree-box .left-box[data-v-49dbad2a]{width:45%}.tree-box .mid-box[data-v-49dbad2a]{flex:auto;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly}.tree-box .mid-box .el-button[data-v-49dbad2a]{margin:0}.tree-box .right-box[data-v-49dbad2a]{width:45%}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "general-basic-form",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.umd.cjs",
|
|
6
6
|
"type": "module",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"typings": "./dist/index.d.ts",
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"general-basic-indexdb": "^1.0.3",
|
|
58
|
-
"network-spanner": "^1.2.
|
|
58
|
+
"network-spanner": "^1.2.13"
|
|
59
59
|
},
|
|
60
60
|
"module": "./dist/index.js",
|
|
61
61
|
"exports": {
|