UNPKG

vue2-vant-dict

Version:

vue2字典组件

1 lines 131 kB
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue2-vant-dict"]=e(require("vue")):t["vue2-vant-dict"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="fb15")}({"00ee":function(t,e,i){var n=i("b622"),a=n("toStringTag"),s={};s[a]="z",t.exports="[object z]"===String(s)},"04f8":function(t,e,i){var n=i("2d00"),a=i("d039");t.exports=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},"06cf":function(t,e,i){var n=i("83ab"),a=i("c65b"),s=i("d1e7"),r=i("5c6c"),o=i("fc6a"),l=i("a04b"),c=i("1a2d"),u=i("0cfb"),d=Object.getOwnPropertyDescriptor;e.f=n?d:function(t,e){if(t=o(t),e=l(e),u)try{return d(t,e)}catch(i){}if(c(t,e))return r(!a(s.f,t,e),t[e])}},"07fa":function(t,e,i){var n=i("50c4");t.exports=function(t){return n(t.length)}},"0834":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"van-field-dict van-cell-dict"},[e("van-field",t._g(t._b({ref:"VanFieldDict",on:{focus:t.handleFocus,blur:t.handleBlur},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,i){return{key:i,fn:function(e){return[t._t(i,null,null,e)]}}}))],null,!0)},"van-field",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(i,n){return e("template",{slot:n},[t._t(n)],2)}))],2),t.desensitization?e("van-field",t._b({directives:[{name:"show",rawName:"v-show",value:t.showCamouflage,expression:"showCamouflage"}],staticClass:"camouflage",attrs:{name:t.$attrs.name&&t.$attrs.name+"Camouflage",rules:[]},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,i){return{key:i,fn:function(e){return[t._t(i,null,null,e)]}}}))],null,!0),model:{value:t.sValue,callback:function(e){t.sValue=e},expression:"sValue"}},"van-field",t.$attrs,!1),[t._l(t.$slots,(function(i,n){return e("template",{slot:n},[t._t(n)],2)}))],2):t._e()],1)},a=[],s=i("e8b7"),r=i("e74d"),o={name:"van-field-dict",props:{isMask:{type:Boolean,default:!0},defaultVal:{type:String,default:""},maskType:{type:String,validate(t){return["mobile","address","idCard","name"].includes(t)}},maskStart:{type:[Number,String]},maskEnd:{type:[Number,String]},maskMiddle:{type:[Number,String]},maskSymbol:{type:String,default:"*"}},data(){return{isFocus:!1,sValue:"",showCamouflage:!1}},inject:{vanForm:{default:null}},computed:{desensitization(){return!!this.maskType||!!this.maskStart||!!this.maskEnd||!!this.maskMiddle},maskOptions(){const t={};return this.defaultVal&&(t.defaultVal=this.defaultVal),this.maskType&&(t.maskType=this.maskType),this.maskStart&&(t.start=Number(this.maskStart)),this.maskEnd&&(t.end=Number(this.maskEnd)),this.maskMiddle&&(t.middle=Number(this.maskMiddle)),this.maskSymbol&&(t.symbol=this.maskSymbol),t},isReadOnly(){const t=!!this.getProp("disabled"),e=!!this.getProp("readonly");return!(!t&&!e)}},watch:{"$attrs.value":{handler:function(t){this.isFocus||(this.isReadOnly?this.isMask?this.handleBlur():this.showCamouflage=!1:this.handleBlur())},immediate:!0},isReadOnly:{handler:function(t){t?this.isMask?this.handleBlur():this.showCamouflage=!1:this.handleBlur()},immediate:!0},isMask(t){t?this.handleBlur():this.showCamouflage=!1}},methods:{getProp:function(t){return Object(r["b"])(this.$attrs[t])?""===this.$attrs[t]||this.$attrs[t]:this.vanForm&&Object(r["b"])(this.vanForm[t])?this.vanForm[t]:void 0},getRef(){return this.$refs.VanFieldDict},handleFocus(){this.isFocus=!0,this.isReadOnly||(this.showCamouflage=!1)},handleBlur(){if(this.isFocus=!1,this.desensitization&&this.isMask){const t=Object(s["a"])(this.$attrs.value,this.maskOptions);this.sValue=t,this.showCamouflage=!0}}}},l=o,c=(i("1e71"),i("2877")),u=Object(c["a"])(l,n,a,!1,null,"60738cdc",null),d=u.exports;d.install=function(t){t.component(d.name,d)};e["default"]=d},"083a":function(t,e,i){"use strict";var n=i("0d51"),a=TypeError;t.exports=function(t,e){if(!delete t[e])throw a("Cannot delete property "+n(e)+" of "+n(t))}},"0cb2":function(t,e,i){var n=i("e330"),a=i("7b0b"),s=Math.floor,r=n("".charAt),o=n("".replace),l=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,i,n,d,f){var h=i+t.length,p=n.length,g=u;return void 0!==d&&(d=a(d),g=c),o(f,g,(function(a,o){var c;switch(r(o,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,i);case"'":return l(e,h);case"<":c=d[l(o,1,-1)];break;default:var u=+o;if(0===u)return a;if(u>p){var f=s(u/10);return 0===f?a:f<=p?void 0===n[f-1]?r(o,1):n[f-1]+r(o,1):a}c=n[u-1]}return void 0===c?"":c}))}},"0cfb":function(t,e,i){var n=i("83ab"),a=i("d039"),s=i("cc12");t.exports=!n&&!a((function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},"0d26":function(t,e,i){var n=i("e330"),a=Error,s=n("".replace),r=function(t){return String(a(t).stack)}("zxcasd"),o=/\n\s*at [^:]*:[^\n]*/,l=o.test(r);t.exports=function(t,e){if(l&&"string"==typeof t&&!a.prepareStackTrace)while(e--)t=s(t,o,"");return t}},"0d51":function(t,e){var i=String;t.exports=function(t){try{return i(t)}catch(e){return"Object"}}},"0ee5":function(t,e,i){"use strict";i("14d9");var n=i("8bbf"),a=i.n(n),s=i("e74d");const r=a.a.observable({dictConfig:{getLoginStatusFunc:()=>!1},dictCodes:{},isGettingDictTypes:[],isGettingAllDictTypes:!1,unfindDictTypes:[]}),o={SET_DICT_SETTING(t){r.dictConfig=t},SET_DICT_CODES(t){r.dictCodes=t},ADD_IS_GETTING_DICT_TYPES(t){const e=t.split(","),i=[...e,...r.isGettingDictTypes],n=new Set(i);r.isGettingDictTypes=Array.from(n)},REMOVE_IS_GETTING_DICT_TYPES(t){const e=t.split(","),i=[...new Set(r.isGettingDictTypes)].filter(t=>!new Set(e).has(t));r.isGettingDictTypes=Array.from(i)},SETTING_ISGETTING_ALL_DICT_TYPES(t){r.isGettingAllDictTypes=t},ADD_UNFIND_DICT_TYPES(t){const e=t.split(","),i=[...e,...r.unfindDictTypes],n=new Set(i);r.unfindDictTypes=Array.from(n)},REMOVE_UNFIND_DICT_TYPES(t){const e=t.split(","),i=[...new Set(r.unfindDictTypes)].filter(t=>!new Set(e).has(t));r.unfindDictTypes=Array.from(i)}},l={getDictDataObj(t){return new Promise((e,i)=>{const{getLoginStatusFunc:n,storage:a,dictDataKey:l,getDictCodeApi:c,format:u,usuallyGetDictTypes:d,formatterRequest:f,query:h,versionKey:p,localDictCodes:g,formatterDictList:m,formatterDictVersion:v,isGetAll:b,filterDataFun:y,disabledDataFun:C}=r.dictConfig;if(!n())return void i("请先登录");const D=r.dictCodes||g;if(D[t]&&0!==D[t].length)o.REMOVE_UNFIND_DICT_TYPES(t),o.SET_DICT_CODES(D),e(r.dictCodes);else{if(r.isGettingDictTypes.includes(t)||r.isGettingAllDictTypes)return;if(o.ADD_IS_GETTING_DICT_TYPES(t),r.unfindDictTypes.includes(t))return void i(`不存在类型为:${t} 的字典字段,请确认后再填写`);o.ADD_UNFIND_DICT_TYPES(t),c(f(h,t)).then(n=>{o.REMOVE_IS_GETTING_DICT_TYPES(t);const T=v(n),_=a.getItem(p);if(T!==_){let n="";if(b)n="",o.SETTING_ISGETTING_ALL_DICT_TYPES(!0);else{if(d){const e=Object.keys(D),i=d.split(","),a=e.concat(i);a.push(t);const s=Array.from(new Set(a));n=s.join(",")}else{const e=Object.keys(D);e.push(t);const i=Array.from(new Set(e));n=i.join(",")}o.ADD_IS_GETTING_DICT_TYPES(n)}c(f(h,n)).then(c=>{const d=m(c,t);if(!(d[t]&&d[t].length>0))return void i(`不存在类型为:${t} 的字典字段,请确认后再填写`);o.REMOVE_UNFIND_DICT_TYPES(t);const f=v(c),h=Object.assign(JSON.parse(JSON.stringify(g)),d),b=Object(s["a"])(h,y,C,null===u||void 0===u?void 0:u.disabled);a.setItem(l,JSON.stringify(b)),a.setItem(p,f),o.SET_DICT_CODES(h),e(r.dictCodes),r.isGettingAllDictTypes?o.SETTING_ISGETTING_ALL_DICT_TYPES(!1):o.REMOVE_IS_GETTING_DICT_TYPES(n)})}else{const c=m(n,t);if(!(c[t]&&c[t].length>0))return void i(`不存在类型为:${t} 的字典字段,请确认后再填写`);o.REMOVE_UNFIND_DICT_TYPES(t);const d=r.dictCodes||g,f=Object(s["a"])(c,y,C,null===u||void 0===u?void 0:u.disabled);Object.assign(d,f),a.setItem(l,JSON.stringify(d)),o.SET_DICT_CODES(d),e(r.dictCodes)}})}})}},c={state:r,mutations:o,actions:l};e["a"]=c},"13d2":function(t,e,i){var n=i("e330"),a=i("d039"),s=i("1626"),r=i("1a2d"),o=i("83ab"),l=i("5e77").CONFIGURABLE,c=i("8925"),u=i("69f3"),d=u.enforce,f=u.get,h=String,p=Object.defineProperty,g=n("".slice),m=n("".replace),v=n([].join),b=o&&!a((function(){return 8!==p((function(){}),"length",{value:8}).length})),y=String(String).split("String"),C=t.exports=function(t,e,i){"Symbol("===g(h(e),0,7)&&(e="["+m(h(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(e="get "+e),i&&i.setter&&(e="set "+e),(!r(t,"name")||l&&t.name!==e)&&(o?p(t,"name",{value:e,configurable:!0}):t.name=e),b&&i&&r(i,"arity")&&t.length!==i.arity&&p(t,"length",{value:i.arity});try{i&&r(i,"constructor")&&i.constructor?o&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(a){}var n=d(t);return r(n,"source")||(n.source=v(y,"string"==typeof e?e:"")),t};Function.prototype.toString=C((function(){return s(this)&&f(this).source||c(this)}),"toString")},"13d5":function(t,e,i){"use strict";var n=i("23e7"),a=i("d58f").left,s=i("a640"),r=i("2d00"),o=i("605d"),l=!o&&r>79&&r<83,c=l||!s("reduce");n({target:"Array",proto:!0,forced:c},{reduce:function(t){var e=arguments.length;return a(this,t,e,e>1?arguments[1]:void 0)}})},"14d9":function(t,e,i){"use strict";var n=i("23e7"),a=i("7b0b"),s=i("07fa"),r=i("3a34"),o=i("3511"),l=i("d039"),c=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),u=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},d=c||!u();n({target:"Array",proto:!0,arity:1,forced:d},{push:function(t){var e=a(this),i=s(e),n=arguments.length;o(i+n);for(var l=0;l<n;l++)e[i]=arguments[l],i++;return r(e,i),i}})},1626:function(t,e,i){var n=i("8ea1"),a=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===a}:function(t){return"function"==typeof t}},"1a2d":function(t,e,i){var n=i("e330"),a=i("7b0b"),s=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(a(t),e)}},"1d80":function(t,e,i){var n=i("7234"),a=TypeError;t.exports=function(t){if(n(t))throw a("Can't call method on "+t);return t}},"1e71":function(t,e,i){"use strict";i("3d32")},"23cb":function(t,e,i){var n=i("5926"),a=Math.max,s=Math.min;t.exports=function(t,e){var i=n(t);return i<0?a(i+e,0):s(i,e)}},"23e7":function(t,e,i){var n=i("da84"),a=i("06cf").f,s=i("9112"),r=i("cb2d"),o=i("6374"),l=i("e893"),c=i("94ca");t.exports=function(t,e){var i,u,d,f,h,p,g=t.target,m=t.global,v=t.stat;if(u=m?n:v?n[g]||o(g,{}):(n[g]||{}).prototype,u)for(d in e){if(h=e[d],t.dontCallGetSet?(p=a(u,d),f=p&&p.value):f=u[d],i=c(m?d:g+(v?".":"#")+d,t.forced),!i&&void 0!==f){if(typeof h==typeof f)continue;l(h,f)}(t.sham||f&&f.sham)&&s(h,"sham",!0),r(u,d,h,t)}}},"241c":function(t,e,i){var n=i("ca84"),a=i("7839"),s=a.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,s)}},"24fb":function(t,e,i){"use strict";function n(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"===typeof btoa){var s=a(n),r=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[i].concat(r).concat([s]).join("\n")}return[i].join("\n")}function a(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(i," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=n(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,n){"string"===typeof t&&(t=[[null,t,""]]);var a={};if(n)for(var s=0;s<this.length;s++){var r=this[s][0];null!=r&&(a[r]=!0)}for(var o=0;o<t.length;o++){var l=[].concat(t[o]);n&&a[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),e.push(l))}},e}},2697:function(t,e,i){var n=i("c351");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("499e").default;a("1daeffe0",n,!0,{sourceMap:!1,shadowMode:!1})},2877:function(t,e,i){"use strict";function n(t,e,i,n,a,s,r,o){var l,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),r?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=l):a&&(l=o?function(){a.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}i.d(e,"a",(function(){return n}))},"28bb":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t._self._c;return e("van-field",t._g(t._b({attrs:{name:"checkbox",readonly:""},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,i){return{key:i,fn:function(e){return[t._t(i,null,null,e)]}}})),{key:"input",fn:function(){return[e("van-checkbox-group",t._g(t._b({ref:"VanCheckboxGroup",attrs:{disabled:!t.isLink,direction:"horizontal",value:t.svalue},on:{change:t.handdleChange}},"van-checkbox-group",t.$attrs,!1),t.$listeners),t._l(t.list,(function(i,n){return e("van-checkbox",{key:n,attrs:{shape:t.shape,"label-disabled":t.labelDisabled,"label-position":t.labelPosition,"icon-size":t.iconSize,"checked-color":t.checkedColor,"bind-group":t.bindGroup,disabled:i[t.dictConfig.format.disabled],name:i[t.dictConfig.format.value]},on:{change:t.handleCheckboxChange,click:t.handleCheckboxClick}},[t._v(" "+t._s(i[t.dictConfig.format.label])+" ")])})),1)]},proxy:!0}],null,!0)},"van-field",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(i,n){return e("template",{slot:n},[t._t(n)],2)}))],2)},a=[],s=i("0ee5"),r=i("e74d"),o={name:"van-checkbox-dict",data(){return{svalue:this.value||[],result:[],list:[],type:""}},props:{data:{type:Array,default:()=>[]},format:{type:Object,default:()=>({label:"label",value:"value",disabled:"disabled"})},value:{},shape:{type:String,validate(t){return["square","round"].includes(t)},default:"square"},labelDisabled:{type:Boolean,default:!1},labelPosition:{type:String,default:"right"},iconSize:{type:[Number,String],default:"20px"},checkedColor:{type:String,default:"#1989fa"},bindGroup:{type:Boolean,default:!0},keyValue:{type:Boolean,default:!1},dictType:{type:[String,Object]},disableObj:{type:Object},filterDataFun:{type:Function},disabledDataFun:{type:Function}},inject:{vanForm:{default:null}},computed:{dictCodes(){return s["a"].state.dictCodes},dictConfig(){return s["a"].state.dictConfig},isGettingAllDictTypes(){return s["a"].state.isGettingAllDictTypes},isGettingDictTypes(){return s["a"].state.isGettingDictTypes},isLink(){const t=!!this.getProp("disabled"),e=!!this.getProp("readonly");return!t&&!e}},watch:{isGettingDictTypes(t){!t.includes(this.type)&&this.data&&0===this.data.length&&this.getDictionary_option()},isGettingAllDictTypes(t){!t&&this.data&&0===this.data.length&&this.getDictionary_option()},value(t){this.svalue=t},svalue(t,e){t!==e&&this.$emit("input",t)},data:{handler:function(t){if(this.list=JSON.parse(JSON.stringify(t)),this.list.length>0){const t=Object.prototype.toString.call(this.list[0]);this.list="[object Object]"===t?this.list.map(t=>({[this.dictConfig.format.value]:t[this.format.value],[this.dictConfig.format.label]:t[this.format.label],[this.dictConfig.format.disabled]:t[this.format.disabled],...t})):this.list.map(t=>({[this.dictConfig.format.value]:t,[this.dictConfig.format.label]:t}))}},immediate:!0}},mounted(){this.data&&0===this.data.length&&this.getDictionary_option()},methods:{getProp:function(t){return Object(r["b"])(this.$attrs[t])?""===this.$attrs[t]||this.$attrs[t]:this.vanForm&&Object(r["b"])(this.vanForm[t])?this.vanForm[t]:void 0},handleCheckboxClick(t){this.$emit("checkboxClick",t)},handleCheckboxChange(t){this.$emit("checkboxChange",t)},async getDictionary_option(){if(!this.dictType||this.data&&this.data.length>0)return;let t=[];if("object"===typeof this.dictType){this.type=this.dictType.type,await s["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);const{filters:e,filterType:i=this.dictConfig.format.value,reverse:n=!1}=this.dictType,a="string"===typeof e?e.split(","):e;t=n?t.filter(t=>!a.includes(t[i])):t.filter(t=>a.includes(t[i]))}else this.type=this.dictType,await s["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);if(this.filterDataFun&&(t=this.filterDataFun(t)),this.disabledDataFun&&(t=t.map(t=>({...t,[this.dictConfig.format.disabled]:t[this.dictConfig.format.disabled]||this.disabledDataFun(t)}))),this.disableObj){const{disableValue:e,disableType:i=this.dictConfig.format.value,reverse:n=!1}=this.disableObj,a="string"===typeof e?e.split(","):e;t=n?t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e[this.dictConfig.format.disabled]=!a.includes(e[i])||e[this.dictConfig.format.disabled],e}):t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e[this.dictConfig.format.disabled]=a.includes(e[i])||e[this.dictConfig.format.disabled],e})}this.list=t},handdleChange(t){if(!this.keyValue)return void this.$emit("dictChange",this.svalue);const e=this.list.filter(t=>this.svalue.includes(t[this.dictConfig.format.value]));this.$emit("dictChange",e)},getRef(){return this.$refs.VanCheckboxGroup}}},l=o,c=i("2877"),u=Object(c["a"])(l,n,a,!1,null,null,null),d=u.exports;d.install=function(t){t.component(d.name,d)};e["default"]=d},"2ba4":function(t,e,i){var n=i("40d5"),a=Function.prototype,s=a.apply,r=a.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?r.bind(s):function(){return r.apply(s,arguments)})},"2d00":function(t,e,i){var n,a,s=i("da84"),r=i("342f"),o=s.process,l=s.Deno,c=o&&o.versions||l&&l.version,u=c&&c.v8;u&&(n=u.split("."),a=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!a&&r&&(n=r.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=r.match(/Chrome\/(\d+)/),n&&(a=+n[1]))),t.exports=a},"31bb":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,".van-field-dict[data-v-60738cdc]{position:relative;[data-v-60738cdc] .van-field__error-message{position:relative;z-index:999999}}.van-field-dict .van-cell.van-field.camouflage[data-v-60738cdc]{position:absolute;left:0;top:0;pointer-events:none}",""]),t.exports=e},"342f":function(t,e){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3511:function(t,e){var i=TypeError,n=9007199254740991;t.exports=function(t){if(t>n)throw i("Maximum allowed index exceeded");return t}},"3a34":function(t,e,i){"use strict";var n=i("83ab"),a=i("e8b5"),s=TypeError,r=Object.getOwnPropertyDescriptor,o=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=o?function(t,e){if(a(t)&&!r(t,"length").writable)throw s("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},"3a9b":function(t,e,i){var n=i("e330");t.exports=n({}.isPrototypeOf)},"3bbe":function(t,e,i){var n=i("1626"),a=String,s=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw s("Can't set "+a(t)+" as a prototype")}},"3c65":function(t,e,i){"use strict";var n=i("23e7"),a=i("7b0b"),s=i("07fa"),r=i("3a34"),o=i("083a"),l=i("3511"),c=1!==[].unshift(0),u=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}},d=c||!u();n({target:"Array",proto:!0,arity:1,forced:d},{unshift:function(t){var e=a(this),i=s(e),n=arguments.length;if(n){l(i+n);var c=i;while(c--){var u=c+n;c in e?e[u]=e[c]:o(e,u)}for(var d=0;d<n;d++)e[d]=arguments[d]}return r(e,i+n)}})},"3d32":function(t,e,i){var n=i("31bb");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("499e").default;a("7ea22a82",n,!0,{sourceMap:!1,shadowMode:!1})},"40d5":function(t,e,i){var n=i("d039");t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},4362:function(t,e,i){e.nextTick=function(t){var e=Array.prototype.slice.call(arguments);e.shift(),setTimeout((function(){t.apply(null,e)}),0)},e.platform=e.arch=e.execPath=e.title="browser",e.pid=1,e.browser=!0,e.env={},e.argv=[],e.binding=function(t){throw new Error("No such module. (Possibly not yet loaded)")},function(){var t,n="/";e.cwd=function(){return n},e.chdir=function(e){t||(t=i("df7c")),n=t.resolve(e,n)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},"44ad":function(t,e,i){var n=i("e330"),a=i("d039"),s=i("c6b6"),r=Object,o=n("".split);t.exports=a((function(){return!r("z").propertyIsEnumerable(0)}))?function(t){return"String"==s(t)?o(t,""):r(t)}:r},"44e7":function(t,e,i){var n=i("861d"),a=i("c6b6"),s=i("b622"),r=s("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[r])?!!e:"RegExp"==a(t))}},4592:function(t,e,i){"use strict";i("2697")},"485a":function(t,e,i){var n=i("c65b"),a=i("1626"),s=i("861d"),r=TypeError;t.exports=function(t,e){var i,o;if("string"===e&&a(i=t.toString)&&!s(o=n(i,t)))return o;if(a(i=t.valueOf)&&!s(o=n(i,t)))return o;if("string"!==e&&a(i=t.toString)&&!s(o=n(i,t)))return o;throw r("Can't convert object to primitive value")}},4943:function(t,e,i){"use strict";i.d(e,"d",(function(){return n})),i.d(e,"a",(function(){return a})),i.d(e,"b",(function(){return s})),i.d(e,"c",(function(){return r}));i("14d9"),i("13d5"),i("3c65");const n=(t,e,i)=>{const a={idField:"id",parentIdField:"parentId",childrenField:"children",firstId:"0",labelField:"label",labelArrField:"labelArr",idArrField:"idArr",levelField:"level",level:0,leafField:"leaf"};Object.assign(a,e),i||(i={[a.idField]:a.firstId,[a.levelField]:a.level,[a.labelArrField]:[],[a.idArrField]:[]});for(var s,r=[],o=0;o<t.length;o++)if(t[o][a.parentIdField]===i[a.idField]){var l=t[o];l[a.levelField]=i[a.levelField]+1,l[a.labelArrField]=i[a.labelArrField].concat(l[a.labelField]),l[a.idArrField]=i[a.idArrField].concat(l[a.idField]),s=n(t,e,l),s.length>0?(l[a.childrenField]=s,l[a.leafField]=!1):l[a.leafField]=!0,r.push(l)}return r};function a(t,e,i){const n={idField:"id",parentIdField:"parentId"};Object.assign(n,i);const s=e.find(e=>e[n.idField]===t);return s?a(s[n.parentIdField],e,n).concat([s]):[]}function s(t,e,i){const n={idField:"id",labelField:"label",parentIdField:"parentId"};Object.assign(n,i);const s=e.find(e=>e[n.labelField]===t);return a(s[n.idField],e,n)}const r=(t,e,i)=>{const n={idField:"id",childrenField:"children"};return Object.assign(n,i),t.reduce((t,a)=>{if(a[n.idField]===e)t.push(a);else if(a[n.childrenField]&&a[n.childrenField].length){const s=r(a[n.childrenField],e,i);s&&s.length&&t.unshift(a,...s)}return t},[])}},"499e":function(t,e,i){"use strict";function n(t,e){for(var i=[],n={},a=0;a<e.length;a++){var s=e[a],r=s[0],o=s[1],l=s[2],c=s[3],u={id:t+":"+a,css:o,media:l,sourceMap:c};n[r]?n[r].parts.push(u):i.push(n[r]={id:r,parts:[u]})}return i}i.r(e),i.d(e,"default",(function(){return p}));var a="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!a)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var s={},r=a&&(document.head||document.getElementsByTagName("head")[0]),o=null,l=0,c=!1,u=function(){},d=null,f="data-vue-ssr-id",h="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t,e,i,a){c=i,d=a||{};var r=n(t,e);return g(r),function(e){for(var i=[],a=0;a<r.length;a++){var o=r[a],l=s[o.id];l.refs--,i.push(l)}e?(r=n(t,e),g(r)):r=[];for(a=0;a<i.length;a++){l=i[a];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete s[l.id]}}}}function g(t){for(var e=0;e<t.length;e++){var i=t[e],n=s[i.id];if(n){n.refs++;for(var a=0;a<n.parts.length;a++)n.parts[a](i.parts[a]);for(;a<i.parts.length;a++)n.parts.push(v(i.parts[a]));n.parts.length>i.parts.length&&(n.parts.length=i.parts.length)}else{var r=[];for(a=0;a<i.parts.length;a++)r.push(v(i.parts[a]));s[i.id]={id:i.id,refs:1,parts:r}}}}function m(){var t=document.createElement("style");return t.type="text/css",r.appendChild(t),t}function v(t){var e,i,n=document.querySelector("style["+f+'~="'+t.id+'"]');if(n){if(c)return u;n.parentNode.removeChild(n)}if(h){var a=l++;n=o||(o=m()),e=y.bind(null,n,a,!1),i=y.bind(null,n,a,!0)}else n=m(),e=C.bind(null,n),i=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else i()}}var b=function(){var t=[];return function(e,i){return t[e]=i,t.filter(Boolean).join("\n")}}();function y(t,e,i,n){var a=i?"":n.css;if(t.styleSheet)t.styleSheet.cssText=b(e,a);else{var s=document.createTextNode(a),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(s,r[e]):t.appendChild(s)}}function C(t,e){var i=e.css,n=e.media,a=e.sourceMap;if(n&&t.setAttribute("media",n),d.ssrId&&t.setAttribute(f,e.id),a&&(i+="\n/*# sourceURL="+a.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),t.styleSheet)t.styleSheet.cssText=i;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}},"4d64":function(t,e,i){var n=i("fc6a"),a=i("23cb"),s=i("07fa"),r=function(t){return function(e,i,r){var o,l=n(e),c=s(l),u=a(r,c);if(t&&i!=i){while(c>u)if(o=l[u++],o!=o)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===i)return t||u||0;return!t&&-1}};t.exports={includes:r(!0),indexOf:r(!1)}},"4d9d":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"van-cascader-dict van-cell-dict"},[e("van-field",t._g(t._b({attrs:{readonly:"",value:t.showValue,"is-link":t.showArrow&&t.isLink},on:{click:t.handleClick},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,i){return{key:i,fn:function(e){return[t._t(i,null,null,e)]}}})),t.isLink?{key:"right-icon",fn:function(){return[t.svalue&&t.clearable?e("van-icon",{attrs:{name:"clear"},on:{click:function(e){return e.stopPropagation(),t.handleClear.apply(null,arguments)}}}):e("van-icon",{directives:[{name:"show",rawName:"v-show",value:!t.showArrow,expression:"!showArrow"}],attrs:{name:"arrow"}})]},proxy:!0}:null],null,!0)},"van-field",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(i,n){return e("template",{slot:n},[t._t(n)],2)}))],2),e("van-popup",{attrs:{round:"",position:"bottom"},model:{value:t.showPicker,callback:function(e){t.showPicker=e},expression:"showPicker"}},[e("van-cascader",t._b({ref:"VantCascaderDict",staticClass:"cascader",attrs:{placeholder:t.cascaderPlaceholder,closeable:!1,"field-names":t.setting,options:t.options},on:{close:t.handleClose,change:t.handdleChange,finish:t.handleFinish},scopedSlots:t._u([{key:"title",fn:function(){return[e("div",{staticClass:"van-picker__cancel",on:{click:t.handleCancel}},[t._v(t._s(t.cancelButtonText))]),e("div",{staticClass:"vant_cascader_title van-ellipsis"},[t._v(t._s(t.$attrs.title))]),e("div",{staticClass:"van-picker__confirm",on:{click:function(e){return t.handleConfirm(t.selectValue)}}},[t._v(t._s(t.confirmButtonText))])]},proxy:!0},{key:"options-top",fn:function(){return[t._t("cascaderOptionsTop")]},proxy:!0},{key:"options-bottom",fn:function(){return[t._t("cascaderOptionsBottom")]},proxy:!0}],null,!0),model:{value:t.selectValue,callback:function(e){t.selectValue=e},expression:"selectValue"}},"van-cascader",t.$attrs,!1))],1)],1)},a=[],s=i("0ee5"),r=i("4943"),o=i("e74d"),l={name:"van-cascader-dict",data(){return{selectValue:null,svalue:this.value,showValue:"",showPicker:!1,list:[],type:"",selectedOptions:[],tabIndex:null}},props:{showArrow:{type:Boolean,default:!0},defaultVal:{type:String,default:""},clearable:{type:Boolean,default:!1},delChildren:{type:Boolean,default:!1},value:{},tips:{type:String},minSelectLevel:{type:[Number,String]},maxLevel:{type:[Number,String]},lastLevel:{type:Boolean,default:!1},cascaderPlaceholder:{type:String,default:"请选择"},treeData:{type:Array,default:()=>[]},spacer:{type:String,default:"/"},finish:{type:Boolean,default:!1},cancelButtonText:{type:String,default:"取消"},confirmButtonText:{type:String,default:"确认"},keyValue:{type:Boolean,default:!1},dictType:{type:[String,Object]},disableObj:{type:Object},filterDataFun:{type:Function},disabledDataFun:{type:Function},showValueFun:{type:Function}},inject:{vanForm:{default:null}},computed:{dictCodes(){return s["a"].state.dictCodes},dictConfig(){return s["a"].state.dictConfig},isGettingAllDictTypes(){return s["a"].state.isGettingAllDictTypes},isGettingDictTypes(){return s["a"].state.isGettingDictTypes},endTreeSetting(){var t,e,i,n;const a=JSON.parse(JSON.stringify(this.dictConfig.treeSetting)),s=null!==(t=this.$attrs.fieldNames)&&void 0!==t?t:{},r={idField:null!==(e=s.idField)&&void 0!==e?e:a.idField,labelField:null!==(i=s.text)&&void 0!==i?i:a.labelField,childrenField:null!==(n=s.children)&&void 0!==n?n:a.childrenField},o=Object.assign(a,r);return o},options(){if(this.treeData.length>0)return this.delChildren&&this.clearChildrenField(this.treeData),this.treeData;const t=this.list.map(t=>({...t,disabled:t[this.dictConfig.format.disabled]})),e=Object(r["d"])(t,this.endTreeSetting),i=JSON.parse(JSON.stringify(e));return this.maxLevel&&this.filterLevel(i,+this.maxLevel),i||[]},setting(){var t,e,i,n;const a=null!==(t=this.$attrs.fieldNames)&&void 0!==t?t:{};return a.value=null!==(e=a.value)&&void 0!==e?e:this.dictConfig.format.value,a.text=null!==(i=a.text)&&void 0!==i?i:this.dictConfig.treeSetting.labelField,a.children=null!==(n=a.children)&&void 0!==n?n:this.dictConfig.treeSetting.childrenField,a},isLink(){const t=!!this.getProp("disabled"),e=!!this.getProp("readonly");return!t&&!e}},watch:{isGettingDictTypes(t){t.includes(this.type)||0!==this.treeData.length||this.getDictionary_option()},isGettingAllDictTypes(t){t||0!==this.treeData.length||this.getDictionary_option()},showPicker(t){t?this.selectValue=this.value:(this.selectValue=null,this.handleClose())},options(t){if(!this.value||0===t.length)return;const e=Object(r["c"])(t,this.value,this.endTreeSetting);this.showValue=this.setShowValue(e,this.spacer)},value:{handler:function(t){if(this.svalue=t,this.options.length>0&&t){const e=Object(r["c"])(this.options,t,this.endTreeSetting);this.showValue=this.setShowValue(e,this.spacer)}else this.showValue=this.defaultVal||""},immediate:!0},svalue(t,e){t!==e&&this.$emit("input",t)}},mounted(){0===this.treeData.length&&this.getDictionary_option()},methods:{getProp:function(t){return Object(o["b"])(this.$attrs[t])?""===this.$attrs[t]||this.$attrs[t]:this.vanForm&&Object(o["b"])(this.vanForm[t])?this.vanForm[t]:void 0},clearChildrenField(t){const e=this.setting;if(t)for(let i=0;i<t.length;i++)t[i][e.children]&&(t[i][e.children].length>0?this.clearChildrenField(t[i][e.children]):delete t[i][e.children])},setShowValue(t,e){return 0===t.length?this.defaultVal||"":this.showValueFun?this.showValueFun(t,e):t.map(t=>t[this.endTreeSetting.labelField]).join(e)},filterLevel(t,e){for(let i=0;i<t.length;i++){const n=t[i],a=n[this.endTreeSetting.levelField];a!==e?this.filterLevel(n[this.endTreeSetting.childrenField],e):delete n[this.endTreeSetting.childrenField]}},handleFinish(t){this.finish&&this.handleConfirm(t.value),setTimeout(()=>{this.$emit("finish",t)},0)},handdleChange(t){this.tabIndex=t.tabIndex,this.selectedOptions=t.selectedOptions,setTimeout(()=>{this.$emit("change",t)},0)},handleClose(){setTimeout(()=>{this.$emit("close")},0)},handleClick(){this.isLink&&(this.showPicker=!0)},handleConfirm(t){var e;if(this.tabIndex||0===this.tabIndex){if(null===(e=this.selectedOptions[this.tabIndex])||void 0===e||!e.disabled){if(t!==this.svalue){const t=this.selectedOptions[this.tabIndex][this.endTreeSetting.childrenField];if(this.lastLevel&&(null===t||void 0===t?void 0:t.length)>0){const t=this.tips||"请选择最后一级选项";return void this.$toast(t)}if(this.minSelectLevel&&+this.minSelectLevel>this.tabIndex+1){const t=this.tips||`请选择至少第${this.minSelectLevel}级`;return void this.$toast(t)}}this.svalue=t,this.showPicker=!1,setTimeout(()=>{this.keyValue?this.$emit("dictChange",this.selectedOptions):this.$emit("dictChange",this.svalue)},0),this.showValue=this.setShowValue(this.selectedOptions,this.spacer)}}else this.showPicker=!1},handleCancel(){this.showPicker=!1},async getDictionary_option(){if(!this.dictType)return;let t=[];if("object"===typeof this.dictType){this.type=this.dictType.type,await s["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);const{filters:e,filterType:i=this.endTreeSetting.idField,reverse:n=!1}=this.dictType,a="string"===typeof e?e.split(","):e;t=n?t.filter(t=>!a.includes(t[i])):t.filter(t=>a.includes(t[i]))}else this.type=this.dictType,await s["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);if(this.filterDataFun&&(t=this.filterDataFun(t)),this.disabledDataFun&&(t=t.map(t=>({...t,[this.dictConfig.format.disabled]:t[this.dictConfig.format.disabled]||this.disabledDataFun(t)}))),this.disableObj){const{disableValue:e,disableType:i=this.endTreeSetting.idField,reverse:n=!1}=this.disableObj,a="string"===typeof e?e.split(","):e;t=n?t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e[this.dictConfig.format.disabled]=!a.includes(e[i])||e[this.dictConfig.format.disabled],e}):t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e[this.dictConfig.format.disabled]=a.includes(e[i])||e[this.dictConfig.format.disabled],e})}this.list=t},getRef(){return this.$refs.VantCascaderDict},handleClear(){this.svalue="",setTimeout(()=>{this.$emit("dictChange",this.value)},0)}}},c=l,u=(i("4592"),i("2877")),d=Object(u["a"])(c,n,a,!1,null,"70b3f008",null),f=d.exports;f.install=function(t){t.component(f.name,f)};e["default"]=f},"4ddc":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t._self._c;return e("van-button",t._g(t._b({ref:"VanButtonDict",attrs:{type:t.judgeType,disabled:t.judgeDisabled,color:t.judgeColor},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,i){return{key:i,fn:function(e){return[t._t(i,null,null,e)]}}}))],null,!0)},"van-button",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(i,n){return e("template",{slot:n},[t._t(n)],2)})),t._v(" "+t._s(t.label)+" ")],2)},a=[],s=i("0ee5"),r=i("5dc9"),o={name:"van-button-dict",props:{value:{type:[String,Number],required:!0},dictType:{type:[String],required:!0},judgeTypeFun:{type:Function},type:{type:String},judgeColorFun:{type:Function},color:{type:String},judgeDisabledFun:{type:Function},disabled:{type:Boolean}},data(){return{dictItem:null,label:""}},watch:{dictType:{handler:function(t){this.getDictItem()},immediate:!0},value:{handler:function(t){this.getDictItem()},immediate:!0}},computed:{dictConfig(){return s["a"].state.dictConfig},judgeType(){return this.judgeTypeFun?this.judgeTypeFun(this.value):this.type?this.type:this.dictItem&&this.dictItem[this.dictConfig.format.type]?this.dictItem[this.dictConfig.format.type]:"primary"},judgeDisabled(){return this.dictItem&&this.dictItem[this.dictConfig.format.disabled]?this.dictItem[this.dictConfig.format.disabled]:this.judgeDisabledFun?this.judgeDisabledFun(this.value):!!this.disabled},judgeColor(){return this.judgeColorFun?this.judgeColorFun(this.value):this.color?this.color:this.dictItem&&this.dictItem[this.dictConfig.format.color]?this.dictItem[this.dictConfig.format.color]:""}},methods:{getDictItem(){this.value&&this.dictType&&Object(r["e"])(this.value,this.dictType).then(t=>{this.dictItem=t,this.label=t[this.dictConfig.format.label]})},getRef(){return this.$refs.VanButtonDict}}},l=o,c=i("2877"),u=Object(c["a"])(l,n,a,!1,null,null,null),d=u.exports;d.install=function(t){t.component(d.name,d)};e["default"]=d},"4ec3":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t._self._c;return e("van-dropdown-item",t._g(t._b({ref:"VanDropdownItemDict",attrs:{options:t.options},on:{change:t.handdleChange},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,i){return{key:i,fn:function(e){return[t._t(i,null,null,e)]}}}))],null,!0)},"van-dropdown-item",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(i,n){return e("template",{slot:n},[t._t(n)],2)}))],2)},a=[],s=i("0ee5"),r={name:"van-dropdown-item-dict",data(){return{list:[],type:""}},props:{keyValue:{type:Boolean,default:!1},dictType:{type:[String,Object]},disableObj:{type:Object},filterDataFun:{type:Function},disabledDataFun:{type:Function}},computed:{dictCodes(){return s["a"].state.dictCodes},dictConfig(){return s["a"].state.dictConfig},isGettingAllDictTypes(){return s["a"].state.isGettingAllDictTypes},isGettingDictTypes(){return s["a"].state.isGettingDictTypes},options(){return this.list.map(t=>({text:t[this.dictConfig.format.label],value:t[this.dictConfig.format.value],icon:t.icon||""}))}},watch:{isGettingDictTypes(t){t.includes(this.type)||this.getDictionary_option()},isGettingAllDictTypes(t){t||this.getDictionary_option()}},mounted(){this.getDictionary_option()},methods:{async getDictionary_option(){if(!this.dictType)return;let t=[];if("object"===typeof this.dictType){this.type=this.dictType.type,await s["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);const{filters:e,filterType:i=this.dictConfig.format.value,reverse:n=!1}=this.dictType,a="string"===typeof e?e.split(","):e;t=n?t.filter(t=>!a.includes(t[i])):t.filter(t=>a.includes(t[i]))}else this.type=this.dictType,await s["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);if(this.filterDataFun&&(t=this.filterDataFun(t)),this.disabledDataFun&&(t=t.map(t=>({...t,[this.dictConfig.format.disabled]:t[this.dictConfig.format.disabled]||this.disabledDataFun(t)}))),this.disableObj){const{disableValue:e,disableType:i=this.dictConfig.format.value,reverse:n=!1}=this.disableObj,a="string"===typeof e?e.split(","):e;t=n?t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e[this.dictConfig.format.disabled]=!a.includes(e[i])||e[this.dictConfig.format.disabled],e}):t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e[this.dictConfig.format.disabled]=a.includes(e[i])||e[this.dictConfig.format.disabled],e})}this.list=t},handdleChange(t){if(!this.keyValue)return void this.$emit("dictChange",t);const e=this.list.find(e=>t===e[this.dictConfig.format.value]);this.$emit("dictChange",e)},getRef(){return this.$refs.VanDropdownItemDict}}},o=r,l=i("2877"),c=Object(l["a"])(o,n,a,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"50c4":function(t,e,i){var n=i("5926"),a=Math.min;t.exports=function(t){return t>0?a(n(t),9007199254740991):0}},5692:function(t,e,i){var n=i("c430"),a=i("c6cd");(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.1",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(t,e,i){var n=i("d066"),a=i("e330"),s=i("241c"),r=i("7418"),o=i("825a"),l=a([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=s.f(o(t)),i=r.f;return i?l(e,i(t)):e}},"577e":function(t,e,i){var n=i("f5df"),a=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return a(t)}},5926:function(t,e,i){var n=i("b42e");t.exports=function(t){var e=+t;return e!==e||0===e?0:n(e)}},"59ed":function(t,e,i){var n=i("1626"),a=i("0d51"),s=TypeError;t.exports=function(t){if(n(t))return t;throw s(a(t)+" is not a function")}},"5b81":function(t,e,i){"use strict";var n=i("23e7"),a=i("c65b"),s=i("e330"),r=i("1d80"),o=i("1626"),l=i("7234"),c=i("44e7"),u=i("577e"),d=i("dc4a"),f=i("90d8"),h=i("0cb2"),p=i("b622"),g=i("c430"),m=p("replace"),v=TypeError,b=s("".indexOf),y=s("".replace),C=s("".slice),D=Math.max,T=function(t,e,i){return i>t.length?-1:""===e?i:b(t,e,i)};n({target:"String",proto:!0},{replaceAll:function(t,e){var i,n,s,p,_,S,k,O,w,F=r(this),j=0,x=0,$="";if(!l(t)){if(i=c(t),i&&(n=u(r(f(t))),!~b(n,"g")))throw v("`.replaceAll` does not allow non-global regexes");if(s=d(t,m),s)return a(s,t,F,e);if(g&&i)return y(u(F),t,e)}p=u(F),_=u(t),S=o(e),S||(e=u(e)),k=_.length,O=D(1,k),j=T(p,_,0);while(-1!==j)w=S?u(e(_,j,p)):h(_,p,j,[],void 0,e),$+=C(p,x,j)+w,x=j+k,j=T(p,_,j+O);return x<p.length&&($+=C(p,x)),$}})},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5dc9":function(t,e,i){"use strict";i.d(e,"f",(function(){return s})),i.d(e,"h",(function(){return r})),i.d(e,"g",(function(){return o})),i.d(e,"a",(function(){return l})),i.d(e,"c",(function(){return c})),i.d(e,"b",(function(){return u})),i.d(e,"d",(function(){return d})),i.d(e,"e",(function(){return f}));i("14d9");var n=i("0ee5"),a=i("e74d");const s=(t,e,i)=>new Promise((a,s)=>{const{format:r}=n["a"].state.dictConfig,o=n["a"].state.dictCodes;let l=[];if(o&&o[e]){l=o[e];const n=l.find(e=>e[r.value]===t);a(n?n[r.label]:null!==i&&void 0!==i?i:"")}else if(n["a"].state.isGettingDictTypes.includes(e)||n["a"].state.isGettingAllDictTypes){const o=setInterval(()=>{if(!n["a"].state.isGettingDictTypes.includes(e)&&!n["a"].state.isGettingAllDictTypes){if(clearInterval(o),l=n["a"].state.dictCodes[e],!l)return void s(`不存在类型为:${e} 的字典字段,请确认后再填写`);const c=l.find(e=>e[r.value]===t);a(c?c[r.label]:null!==i&&void 0!==i?i:"")}},1e3)}else n["a"].actions.getDictDataObj(e).then(n=>{if(l=n[e],!l)return void s(`不存在类型为:${e} 的字典字段,请确认后再填写`);const o=l.find(e=>e[r.value]===t);a(o?o[r.label]:null!==i&&void 0!==i?i:"")})});function r(t,e,i,n,a="--"){const s=[];for(let r=0;r<t.length;r++){const o=e.find(e=>e[i.value]===t[r]);o?s.push(o):s.push({[i.label]:n||t[r]||a,[i.value]:t[r]})}return s}const o=(t,e,i)=>{const a={defaultVal:"",emptyText:"--",formatFun:(t,e)=>t.map(t=>t[e.label]).join(","),spacer:","};return Object.assign(a,i),new Promise((i,s)=>{let o=[];Array.isArray(t)?o=t:"string"===typeof t&&(o=t.split(a.spacer));const{format:l}=n["a"].state.dictConfig,c=n["a"].state.dictCodes;let u=[];if(c&&c[e]){u=c[e];const t=r(o,u,l,a.defaultVal,a.emptyText);i(t&&t.length>0?a.formatFun(t,l):a.defaultVal)}else if(n["a"].state.isGettingDictTypes.includes(e)||n["a"].state.isGettingAllDictTypes){const t=setInterval(()=>{if(!n["a"].state.isGettingDictTypes.includes(e)&&!n["a"].state.isGettingAllDictTypes){if(clearInterval(t),u=n["a"].state.dictCodes[e],!u)return void s(`不存在类型为:${e} 的字典字段,请确认后再填写`);const c=r(o,u,l,a.defaultVal,a.emptyText);i(c&&c.length>0?a.formatFun(c,l):a.defaultVal)}},1e3)}else n["a"].actions.getDictDataObj(e).then(t=>{if(u=t[e],!u)return void s(`不存在类型为:${e} 的字典字段,请确认后再填写`);const n=r(o,u,l,a.defaultVal,a.emptyText);i(n&&n.length>0?a.formatFun(n,l):a.defaultVal)})})},l=(t,e,i)=>new Promise((a,s)=>{const{format:r}=n["a"].state.dictConfig,o=n["a"].state.dictCodes;let l=[];if(o&&o[e]){l=o[e];const n=l.find(e=>e[r.label]===t);a(n?n[r.value]:null!==i&&void 0!==i?i:"")}else if(n["a"].state.isGettingDictTypes.includes(e)||n["a"].state.isGettingAllDictTypes){const o=setInterval(()=>{if(!n["a"].state.isGettingDictTypes.includes(e)&&!n["a"].state.isGettingAllDictTypes){if(clearInterval(o),l=n["a"].state.dictCodes[e],!l)return void s(`不存在类型为:${e} 的字典字段,请确认后再填写`);const c=l.find(e=>e[r.label]===t);a(c?c[r.value]:null!==i&&void 0!==i?i:"")}},1e3)}else n["a"].actions.getDictDataObj(e).then(n=>{if(l=n[e],!l)return void s(`不存在类型为:${e} 的字典字段,请确认后再填写`);const o=l.find(e=>e[r.label]===t);a(o?o[r.value]:null!==i&&void 0!==i?i:"")})});function c(t,e,i,n){const a=[];for(let s=0;s<t.length;s++){const r=e.find(e=>e[i.label]===t[s]);r?a.push(r):a.push({[i.label]:t[s],[i.value]:n})}return a}const u=(t,e,i)=>{const a={defaultVal:"",formatFun:(t,e)=>t.map(t=>t[e.value]).join(","),spacer:","};return Object.assign(a,i),new Promise((i,s)=>{let r=[];Array.isArray(t)?r=t:"string"===typeof t&&(r=t.split(a.spacer));const{format:o}=n["a"].state.dictConfig,l=n["a"].state.dictCodes;let u=[];if(l&&l[e]){u=l[e];const t=c(r,u,o,a.defaultVal);i(t&&t.length>0?a.formatFun(t,o):a.defaultVal)}else if(n["a"].state.isGettingDictTypes.includes(e)||n["a"].state.isGettingAllDictTypes){const t=setInterval(()=>{if(!n["a"].state.isGettingDictTypes.includes(e)&&!n["a"].state.isGettingAllDictTypes){if(clearInterval(t),u=n["a"].state.dictCodes[e],!u)return void s(`不存在类型为:${e} 的字典字段,请确认后再填写`);const l=c(r,u,o,a.defaultVal);i(l&&l.length>0?a.formatFun(l,o):a.defaultVal)}},1e3)}else n["a"].actions.getDictDataObj(e).then(t=>{if(u=t[e],!u)return void s(`不存在类型为:${e} 的字典字段,请确认后再填写`);const n=c(r,u,o,a.defaultVal);i(n&&n.length>0?a.formatFun(n,o):a.defaultVal)})})},d=t=>new Promise((e,i)=>{let s=[],r="";Array.isArray(t)?(r=t.join(","),s=t):"string"===typeof t&&(r=t,s=t.split(","));const o=n["a"].state.dictCodes,l=n["a"].state.dictConfig;if(!o||"{}"===JSON.stringify(o))return n["a"].mutations.ADD_IS_GETTING_DICT_TYPES(r),l.getDictCodeApi(l.formatterRequest(l.query,r)).then(i=>{var s;n["a"].mutations.REMOVE_IS_GETTING_DICT_TYPES(r);const o=l.formatterDictList(i,t),c=Object(a["a"])(o,l.filterDataFun,l.disabledDataFun,null===l||void 0===l||null===(s=l.format)||void 0===s?void 0:s.disabled),u=JSON.parse(JSON.stringify(c)),d=Object.assign(n["a"].state.dictCodes,u);l.storage.setItem(l.dictDataKey,JSON.stringify(d)),n["a"].mutations.SET_DICT_CODES(d),e(c)});{const r=[],c={};for(let t=0;t<s.length;t++)o[s[t]]?c[s[t]]=o[s[t]]:r.push(s[t]);if(r.length>0)return n["a"].mutations.ADD_IS_GETTING_DICT_TYPES(r.join(",")),l.getDictCodeApi(l.formatterRequest(l.query,r.join(","))).then(s=>{var o;n["a"].mutations.REMOVE_IS_GETTING_DICT_TYPES(r.join(","));const u=l.formatterDictList(s,t),d=Object(a["a"])(u,l.filterDataFun,l.disabledDataFun,null===l||void 0===l||null===(o=l.format)||void 0===o?void 0:o.disabled),f=JSON.parse(JSON.stringify(d)),h=Object.assign(n["a"].state.dictCodes,f);l.storage.setItem(l.dictDataKey,JSON.stringify(h)),n["a"].mutations.SET_DICT_CODES(h);const p=Object.assign(c,f),g=[];for(const t in p)p[t]&&0!==p[t].length||g.push(t);g.length>0&&i(`不存在类型为:${g.join("、")} 的字典字段,请确认后再填写`),e(p)});e(c)}}),f=(t,e,i)=>new Promise((a,s)=>{const{format:r}=n["a"].state.dictConfig,o=n["a"].state.dictCodes;let l=[];if(o&&o[e]){l=o[e];const n=l.find(e=>e[r.value]===t);a(n||(null!==i&&void 0!==i?i:""))}else if(n["a"].state.isGettingDictTypes.includes(e)||n["a"].state.isGettingAllDictTypes){const o=setInterval(()=>{if(!n["a"].state.isGettingDictTypes.includes(e)&&!n["a"].state.isGettingAllDictTypes){if(clearInterval(o),l=n["a"].state.dictCodes[e],!l)return void s(`不存在类型为:${e} 的字典字段,请确认后再填写`);const c=l.find(e=>e[r.value]===t);a(c||(null!==i&&void 0!==i?i:""))}},1e3)}else n["a"].actions.getDictDataObj(e).then(n=>{if(l=n[e],!l)return void s(`不存在类型为:${e} 的字典字段,请确认后再填写`);const o=l.find(e=>e[r.value]===t);a(o||(null!==i&&void 0!==i?i:""))})})},"5e77":function(t,e,i){var n=i("83ab"),a=i("1a2d"),s=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,o=a(s,"name"),l=o&&"something"===function(){}.name,c=o&&(!n||n&&r(s,"name").configurable);t.exports={EXISTS:o,PROPER:l,CONFIGURABLE:c}},"5e88":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t._self._c;return e("van-tabs",t._g(t._b({on:{change:t.handdleChange},model:{value:t.svalue,callback:function(e){t.svalue=e},expression:"svalue"}},"van-tabs",t.$attrs,!1),t.$listeners),t._l(t.list,(function(i){return e("van-tab",t._g(t._b({key:i[t.dictConfig.format.value],attrs:{disabled:i[t.dictConfig.format.disabled],name:i[t.dictConfig.format.value],title:i[t.dictConfig.format.label]}},"van-tab",t.$attrs,!1),t.$listeners),[t._t(i[t.dictConfig.format.value])],2)})),1)},a=[],s=i("0ee5"),r={name:"van-tabs-dict",data(){return{list:[],svalue:this.value,type:""}},props:{data:{type:Array,default:()=>[]},format:{type:Object,default:()=>({label:"label",value:"value",disabled:"disabled"})},keyValue:{type:Boolean,default:!1},dictType:{type:[String,Object]},value:{},disableObj:{type:Object},filterDataFun:{type:Function},disabledDataFun:{type:Function}},inject:{vanForm:{default:null}},computed:{dictCodes(){return s["a"].state.dictCodes},dictConfig(){return s["a"].state.dictConfig},isGettingAllDictTypes(){return s["a"].state.isGettingAllDictTypes},isGettingDictTypes(){return s["a"].state.isGettingDictTypes}},watch:{isGettingDictTypes(t){!t.includes(this.type)&&this.data&&0===this.data.length&&this.getDictionary_option()},isGettingAllDictTypes(t){!t&&this.data&&0===this.data.length&&this.getDictionary_option()},value(t){this.svalue=t},svalue(t,e){t!==e&&this.$emit("input",t)},data:{handler:function(t){if(this.list=JSON.parse(JSON.stringify(t)),this.list.length>0){const t=Object.prototype.toString.call(this.list[0]);this.list="[object Object]"===t?this.list.map(t=>({[this.dictConfig.format.value]:t[this.format.value],[this.dictConfig.format.label]:t[this.format.label],[this.dictConfig.format.disabled]:t[this.format.disabled],...t})):this.list.map(t=>({[this.dictConfig.format.value]:t,[this.dictConfig.format.label]:t}))}},immediate:!0}},mounted(){this.data&&0===this.data.length&&this.getDictionary_option()},methods:{getProp:function(t){return!(!this.vanForm||""!==this.vanForm.$options.propsData[t])