vue2-vant-dict 0.0.1
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/.eslintignore +0 -0
- package/.eslintrc.js +162 -0
- package/README.md +422 -0
- package/lib/demo.html +8 -0
- package/lib/vue2-vant-dict.umd.min.js +2 -0
- package/package.json +63 -0
package/.eslintignore
ADDED
|
File without changes
|
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
es6: true,
|
|
5
|
+
node: true,
|
|
6
|
+
},
|
|
7
|
+
extends: ["eslint:recommended", "plugin:vue/essential"],
|
|
8
|
+
globals: {
|
|
9
|
+
Atomics: "readonly",
|
|
10
|
+
SharedArrayBuffer: "readonly",
|
|
11
|
+
},
|
|
12
|
+
parserOptions: {
|
|
13
|
+
ecmaVersion: 2018,
|
|
14
|
+
sourceType: "module",
|
|
15
|
+
},
|
|
16
|
+
plugins: ["vue"],
|
|
17
|
+
parserOptions: {
|
|
18
|
+
parser: "babel-eslint",
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
"arrow-spacing": [
|
|
22
|
+
2,
|
|
23
|
+
{
|
|
24
|
+
// 强制箭头函数的箭头前后使用一致的空格
|
|
25
|
+
before: true,
|
|
26
|
+
after: true,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
"block-spacing": [2, "always"], // 禁止或强制在代码块中开括号前和闭括号后有空格
|
|
30
|
+
"brace-style": [
|
|
31
|
+
2,
|
|
32
|
+
"1tbs",
|
|
33
|
+
{
|
|
34
|
+
// 强制在代码块中使用一致的大括号风格
|
|
35
|
+
allowSingleLine: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
camelcase: [
|
|
39
|
+
0,
|
|
40
|
+
{
|
|
41
|
+
// 强制使用骆驼拼写法命名约定
|
|
42
|
+
properties: "always",
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
"comma-dangle": [2, "never"], // 对象字面量项尾不能有逗号
|
|
46
|
+
"comma-spacing": [
|
|
47
|
+
2,
|
|
48
|
+
{
|
|
49
|
+
// 逗号前后的空格
|
|
50
|
+
before: false,
|
|
51
|
+
after: true,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
"comma-style": [2, "last"], // 逗号风格,换行时在行首还是行尾
|
|
55
|
+
curly: [2, "all"], // 必须使用 if(){} 中的{}
|
|
56
|
+
"dot-location": [2, "property"], // 对象访问符的位置,换行的时候在行首还是行尾
|
|
57
|
+
eqeqeq: [
|
|
58
|
+
2,
|
|
59
|
+
"always",
|
|
60
|
+
{
|
|
61
|
+
null: "ignore",
|
|
62
|
+
},
|
|
63
|
+
], // 必须使用全等
|
|
64
|
+
indent: [1, 2], // 设置为2格缩进
|
|
65
|
+
"key-spacing": [
|
|
66
|
+
2,
|
|
67
|
+
{
|
|
68
|
+
// 强制在对象字面量的属性中键和值之间使用一致的间距
|
|
69
|
+
beforeColon: false,
|
|
70
|
+
afterColon: true,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
"keyword-spacing": [
|
|
74
|
+
2,
|
|
75
|
+
{
|
|
76
|
+
// 强制在关键字前后使用一致的空格
|
|
77
|
+
before: true,
|
|
78
|
+
after: true,
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
"no-cond-assign": 2, // 禁止在条件表达式中使用赋值语句
|
|
82
|
+
"no-const-assign": 2, // 禁止修改const声明的变量
|
|
83
|
+
"no-dupe-args": 2, // 函数参数不能重复
|
|
84
|
+
"no-dupe-keys": 2, // 在创建对象字面量时不允许键重复 {a:1,a:1}
|
|
85
|
+
"no-duplicate-case": 2, // switch中的case标签不能重复
|
|
86
|
+
"no-ex-assign": 2, // 禁止给catch语句中的异常参数赋值
|
|
87
|
+
"no-extra-parens": [2, "functions"], // 禁止非必要的括号
|
|
88
|
+
"no-fallthrough": 2, // 禁止switch穿透
|
|
89
|
+
"no-func-assign": 2, // 禁止重复的函数声明
|
|
90
|
+
"no-inner-declarations": [2, "functions"], // 禁止在块语句中使用声明(变量或函数)
|
|
91
|
+
"no-irregular-whitespace": 2, // 不能有不规则的空格
|
|
92
|
+
"no-lone-blocks": 2, // 禁止不必要的嵌套块
|
|
93
|
+
"no-mixed-spaces-and-tabs": 2, // 禁止混用tab和空格
|
|
94
|
+
"no-multi-spaces": 2, // 不能用多余的空格
|
|
95
|
+
"no-multi-str": 2, // 字符串不能用\换行
|
|
96
|
+
"no-multiple-empty-lines": [
|
|
97
|
+
2,
|
|
98
|
+
{
|
|
99
|
+
// 空行最多不能超过1行
|
|
100
|
+
max: 1,
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
"no-new-object": 2, // 禁止使用new Object()
|
|
104
|
+
"no-new-require": 2, // 禁止使用new require
|
|
105
|
+
"no-new-wrappers": 2, // 禁止使用new创建包装实例,new String new Boolean new Number
|
|
106
|
+
"no-redeclare": 2, // 禁止重复声明变量
|
|
107
|
+
"no-regex-spaces": 2, //禁止在正则表达式字面量中使用多个空格
|
|
108
|
+
"no-return-assign": [2, "except-parens"], // return 语句中不能有赋值表达式
|
|
109
|
+
"no-shadow-restricted-names": 2, // 严格模式中规定的限制标识符不能作为声明时的变量名使用
|
|
110
|
+
"no-spaced-func": 2, // 函数调用时 函数名与()之间不能有空格
|
|
111
|
+
"no-sparse-arrays": 2, // 禁止稀疏数组, [1,,2]
|
|
112
|
+
"no-undef": 1, // 不能有未定义的变量
|
|
113
|
+
"no-unused-vars": [
|
|
114
|
+
2,
|
|
115
|
+
{
|
|
116
|
+
//不能有声明后未被使用的变量或参数
|
|
117
|
+
vars: "all",
|
|
118
|
+
args: "none",
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
"operator-linebreak": [
|
|
122
|
+
2,
|
|
123
|
+
"after",
|
|
124
|
+
{
|
|
125
|
+
// 换行时运算符在行尾还是行首
|
|
126
|
+
overrides: {
|
|
127
|
+
"?": "before",
|
|
128
|
+
":": "before",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
quotes: [
|
|
133
|
+
2,
|
|
134
|
+
"double",
|
|
135
|
+
{
|
|
136
|
+
// 引号类型 `` "" ''
|
|
137
|
+
avoidEscape: true,
|
|
138
|
+
allowTemplateLiterals: true,
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
semi: [
|
|
142
|
+
"error",
|
|
143
|
+
"never", // 改成代码结尾不再加分号,加了分号报错,不加分号不报错
|
|
144
|
+
],
|
|
145
|
+
"space-before-function-paren": [2, "never"], // 函数定义时括号前面要不要有空格
|
|
146
|
+
"space-in-parens": [2, "never"], // 小括号里面要不要有空格
|
|
147
|
+
"space-unary-ops": [
|
|
148
|
+
2,
|
|
149
|
+
{
|
|
150
|
+
// 一元运算符的前/后要不要加空格
|
|
151
|
+
words: true,
|
|
152
|
+
nonwords: false,
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
"use-isnan": 2, // 禁止比较时使用NaN,只能用isNaN()
|
|
156
|
+
"valid-typeof": 2, // 必须使用合法的typeof的值
|
|
157
|
+
"prefer-const": 2, // 首选const
|
|
158
|
+
"no-console": process.env.NODE_ENV === "production" ? 2 : 0, // 生产环境禁止使用console
|
|
159
|
+
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0, // 生产环境禁止使用debugger
|
|
160
|
+
"array-bracket-spacing": [2, "never"], // 是否允许非空数组里面有多余的空格
|
|
161
|
+
},
|
|
162
|
+
};
|
package/README.md
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
# vue2-vant-dict
|
|
2
|
+
|
|
3
|
+
vue2-vant-dict是在vue2框架下对vant组件库的部分组件进行二开,实现更轻松使用字典数据的字典包插件。引入此包后,可轻松实现select下拉选项,radio单选框,checkbox多选框,cascader联级选项,tree树形控件,tree-select树形选项,脱敏表单等组件。拥有多种字典相关方法及日期格式化,脱敏等方法。
|
|
4
|
+
|
|
5
|
+
**示例:实现cascader**
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<van-cascader-dict :field-names="{text: 'areaName', value: 'id', children: 'children'}" @dictChange="handleChange" label="地区(基础用法)" label-width="110px" title="地区选择" input-align="right" dictType="city" placeholder="请选择地区" v-model="value1" ></van-cascader-dict>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**效果如下**
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
**示例2:实现select**
|
|
16
|
+
|
|
17
|
+
```vue
|
|
18
|
+
<van-select-dict @dictChange="handleChange" label="性别(基础用法)" label-width="100px" input-align="right" dictType="AAC004" placeholder="请选择性别" v-model="value1" ></van-select-dict>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
**示例3:实现输入框非编辑时脱敏**
|
|
24
|
+
|
|
25
|
+
```vue
|
|
26
|
+
<template>
|
|
27
|
+
<div>
|
|
28
|
+
<van-field-dict label="姓名" v-model="value1"></van-field-dict>
|
|
29
|
+
<van-field-dict label="证件号码" v-model="value2"></van-field-dict>
|
|
30
|
+
<van-field-dict label="手机号" v-model="value3"></van-field-dict>
|
|
31
|
+
<van-field-dict label="地址" type="textarea" v-model="value4"></van-field-dict>
|
|
32
|
+
|
|
33
|
+
<van-field-dict label="姓名" maskType="name" v-model="value1"></van-field-dict>
|
|
34
|
+
<van-field-dict label="证件号码" maskType="idCard" v-model="value2"></van-field-dict>
|
|
35
|
+
<van-field-dict label="手机号" maskType="mobile" v-model="value3"></van-field-dict>
|
|
36
|
+
<van-field-dict label="地址" type="textarea" maskType="address" v-model="value4"></van-field-dict>
|
|
37
|
+
<van-field-dict label="前三后四" :maskStart="3" :maskEnd="4" v-model="value5"></van-field-dict>
|
|
38
|
+
<van-field-dict label="前三中三后四" :maskStart="3" :maskMiddle="3" :maskEnd="4" v-model="value6"></van-field-dict>
|
|
39
|
+
<van-field-dict label="默认值" defaultVal="恭喜发财" maskType="name" v-model="value7"></van-field-dict>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
export default {
|
|
45
|
+
data() {
|
|
46
|
+
return {
|
|
47
|
+
value1: "沈小布",
|
|
48
|
+
value2: "35062418892031",
|
|
49
|
+
value3: "18859661234",
|
|
50
|
+
value4: "宁夏回族自治区闽宁镇涌泉村芗城路142号",
|
|
51
|
+
value5: "1234567890",
|
|
52
|
+
value6: "13145021314",
|
|
53
|
+
value7: ""
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style>
|
|
60
|
+
|
|
61
|
+
</style>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+

|
|
67
|
+
|
|
68
|
+
一行代码轻松使用,并且解决选项被更换后关闭弹出层后,选项不会复位的问题。
|
|
69
|
+
|
|
70
|
+
**此处主要讲包的配置及准备工作,具体用法可前往[vue2-vant-dict官网](http://xiaobusoft.com/vue2-vant-dict)查看使用文档,[备用官网](https://shenxiaobu.github.io/vue2-vant-dict/),如有问题可前往[问题反馈表格进行记录](https://docs.qq.com/sheet/DVmZQb0hyTk9uc1dY), 也可关注微信公众号【爆米花小布】私信进行反馈**
|
|
71
|
+
|
|
72
|
+
## 使用条件
|
|
73
|
+
|
|
74
|
+
1. vue2中 2.6以上版本
|
|
75
|
+
2. 引入vant相关组件及样式,**由于vant关于vue2版本已经不再更新,但是存在cascader组件禁用无法使用的情况,因此对于需要cascader禁用选项可用的,需将vant组件库更换为 [vant-xiaobu](https://www.npmjs.com/package/vant-xiaobu) 组件库,仅对cascader优化,可放心使用。**
|
|
76
|
+
3. 一个请求字典的接口
|
|
77
|
+
1. 不传参可获取全部字典数据
|
|
78
|
+
2. 返回字典包的版本号(字典数据更改时,更改字典包版本号,用于清除在浏览器上缓存的旧的字典包数据)
|
|
79
|
+
|
|
80
|
+
## 快速开始
|
|
81
|
+
|
|
82
|
+
以下全部已js为示例,且以最完美的形式配合vue2-vant-dict包的使用。
|
|
83
|
+
|
|
84
|
+
#### 后端接口要求
|
|
85
|
+
|
|
86
|
+
1. 获取全局配置接口,配置中包含当前字典版本号。对字典数据进行操作时,需修改字典版本号。
|
|
87
|
+
2. 获取字典数据接口,能接受不传参返回所有字典数据,可接受同时获取多个字典类型数据。并且将当前字典版本号返回,用于判断当前项目使用的字典数据是否是数据库最新版的字典数据。
|
|
88
|
+
|
|
89
|
+
#### 安装包
|
|
90
|
+
|
|
91
|
+
```shell
|
|
92
|
+
npm install vue2-vant-dict
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### 新建配置文件
|
|
96
|
+
|
|
97
|
+
src目录下新建dict-config.js文件,用于配置字典包获取字典的接口,当前字典版本号,数据字典缓存位置等。以下代码列全一点吧, 真实只有 getDictCodeApi 及 version必传
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
//引入请求字典接口
|
|
101
|
+
import {getDictCodeApi} from "@/api/common-api"
|
|
102
|
+
//引入本地缓存数据
|
|
103
|
+
import localDictCodes from "@/assets/data/dict"
|
|
104
|
+
|
|
105
|
+
export default {
|
|
106
|
+
getDictCodeApi: getDictCodeApi, // 获取字典的接口 必传
|
|
107
|
+
version: "0.0.1", // 当前字典版本号 必传 获取全局配置化需 覆盖此版本号数据
|
|
108
|
+
localDictCodes, // 本地字典数据
|
|
109
|
+
versionKey: "xiaobuDictVersion", // 在浏览器缓存的版本号键名 选传 默认值vue3ElementDictVersion
|
|
110
|
+
dictDataKey: "xiaobuDictData", // 在浏览器缓存的字典数据键名 选传 默认值 vue2VantDictData
|
|
111
|
+
query: "type", // 请求字典接口的参数名 选传 默认 dictType
|
|
112
|
+
format: {
|
|
113
|
+
label: "dictLabel",
|
|
114
|
+
value: "dictValue"
|
|
115
|
+
}, // 配置字典值和显示 字段的配置项 需同时配置 不可只配一个 选传 默认值 label 及 value
|
|
116
|
+
formatterDictList: (data, query) => {
|
|
117
|
+
return data.xiaobuDictData
|
|
118
|
+
}, // data为请求字典接口后返回的data数据 格式化返回字典数据,此处return的为字典数据,用于兼容返回的数据结构与默认不一致问题, 选传 默认返回 data.dictData query为请求的字典类型的参数,用于部分接口不按要求,没返回 dictType: [{},{}] 数据结构的形式,此时可利用query自行拼凑成符合的数据格式
|
|
119
|
+
formatterDictVersion: (data) => {
|
|
120
|
+
return data.xiaobuDictVersion
|
|
121
|
+
}, // data为请求字典接口后返回的data数据 格式化返回版本号,用于兼容返回的数据结构与默认不一致问题 默认返回 data.dictVersion 获取到版本号后会 与字典包配置的版本号进行比对
|
|
122
|
+
filterDataFun: (list) => {
|
|
123
|
+
return list.filter(item => item.status === '1')
|
|
124
|
+
}, // 可对返回的字典数据进行过滤 list为某字典类型的数据 选传,默认不过滤 return list
|
|
125
|
+
disabledDataFun: (list) => {
|
|
126
|
+
return list.map(item => {
|
|
127
|
+
...item,
|
|
128
|
+
disabled: item.isDisabled === '1'
|
|
129
|
+
})
|
|
130
|
+
}, // 可对返回的字典数据配置禁用字段 list为某字典类型的数据 选传,默认不过滤 return list
|
|
131
|
+
formatterRequest: (query, dictType) => {
|
|
132
|
+
// ...此处无法举例 以包默认形式展示
|
|
133
|
+
if (!dictType) {
|
|
134
|
+
return { [query]: "" };
|
|
135
|
+
}
|
|
136
|
+
return { [query]: dictType };
|
|
137
|
+
}, // 格式化请求体,用于兼容接口需要的参数格式,默认dictType为空时 获取全部字典数据,接口需要获取多种字典数据时不同后端开发人员可能需要的格式不一样,因此此处可配置成后端开发人员需要的格式。
|
|
138
|
+
|
|
139
|
+
storage: localstorage, //数据缓存的位置 默认 localstorage 可选为 sessionstorage 兼容iframe嵌套项目
|
|
140
|
+
usuallyGetFileds: "", //经常用到的字典数据,一进项目就会对缓存字典中无此类型的字典数据进行请求,此配置项在iframe项目中能发挥更大作用,进页面就一次性将全部字典数据一个接口请求掉,避免同时请求太多字典接口 宣传 默认空 多个字典以 英文逗号隔开 如 sex,personType
|
|
141
|
+
isGetAll: true, // 获取所有字典类型接口 无传值获取所有字典接口,如果无传与真实需要获取全部字典接口的入参不一致 可配置 formatterRequest
|
|
142
|
+
getDictEveryTime: false, // 是否每次进项目都请求 usuallyGetFileds 字典类型的接口 或者获取所有字典类型接口
|
|
143
|
+
treeSetting: {
|
|
144
|
+
labelField: "areaName" //label字段名 默认值id
|
|
145
|
+
parentIdField: "parentId", //父节点唯一标识字段名 默认值 parentId
|
|
146
|
+
childrenField: "children", //子节点标识字段名 默认值 children
|
|
147
|
+
firstId: "0", // 根节点值 默认值 字符串 0
|
|
148
|
+
labelField: "label", //label字段名 默认值 label
|
|
149
|
+
labelArrField: "labelArr", //给对象新增的中文数组字段名 默认值 labelArr 字典包会将数组转化为树形结构数据 并每一项生成 labelArr字段,内容为【爷爷级/父级label,...,自己的label】
|
|
150
|
+
idArrField: "idArr", //给对象新增的id数组字段名 默认值 idArr 字典包会将数组转化为树形结构数据 并每一项生成 labelArr字段,内容为【爷爷级/父级id,...,自己的id】
|
|
151
|
+
levelField: "level", //给对象新增的层级字段名 值为层级
|
|
152
|
+
level: 0, // 给根目录配置的层级 配置根目录层级为 0 级
|
|
153
|
+
leafField: "leaf" //叶子节点标识字段名 值为 true或 false
|
|
154
|
+
} // 对树形数据的配置 选传 字典支持将数组结构转化为树形结构
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 配置
|
|
159
|
+
|
|
160
|
+
src下新建文件dict-config.ts,用于配置字典包相关配置。配置项如下
|
|
161
|
+
|
|
162
|
+
| 字段 | 类型 | 必传 | 说明 | 默认值 |
|
|
163
|
+
| :------------------: | :------: | :--: | :----------------------------------------------------------- | :----------------------------------------------------------: |
|
|
164
|
+
| getDictCodeApi | Promise | 是 | 请求字典接口 | — |
|
|
165
|
+
| version | String | 是 | 当前字典包版本号 必传 | — |
|
|
166
|
+
| localDictCodes | Object | 否 | 本地字典数据 | {} |
|
|
167
|
+
| versionKey | String | 否 | 在浏览器缓存的版本号键名 | vue2VantDictVersion |
|
|
168
|
+
| dictDataKey | String | 否 | 在浏览器缓存的字典数据键名 | vue2VantDictData |
|
|
169
|
+
| query | String | 否 | 请求字典接口的参数名 | dictType |
|
|
170
|
+
| format | Object | 否 | 配置字典值和显示 字段的配置项 需同时配置 不可只配一个 | {label: "label", value: "value"} |
|
|
171
|
+
| formatterDictList | Function | 否 | data为请求字典接口后返回的data数据 格式化返回字典数据,此处return的为字典数据,用于兼容返回的数据结构与默认不一致问题, 选传 默认返回 data.dictData query为请求的字典类型的参数,用于部分接口不按要求,没返回 dictType: [{},{}] 数据结构的形式,此时可利用query自行拼凑成符合的数据格式 | (data) => {return data.dictData} |
|
|
172
|
+
| formatterDictVersion | Function | 否 | data为请求字典接口后返回的data数据 格式化返回版本号,用于兼容返回的数据结构与默认不一致问题 默认返回 data.dictVersion 获取到版本号后会 与字典包配置的版本号进行比对 | (data) => {return data.version} |
|
|
173
|
+
| filterDataFun | Function | 否 | 可对返回的字典数据进行过滤 list为某字典类型的数据 | (list) => {return list} |
|
|
174
|
+
| disabledDataFun | Function | 否 | 可对返回的字典数据配置禁用字段 list为某字典类型的数据 | (list) => {return list} |
|
|
175
|
+
| formatterRequest | Function | 否 | 兼格式化请求体,用于兼容接口需要的参数格式,默认dictType为空时 获取全部字典数据,接口需要获取多种字典数据时不同后端开发人员可能需要的格式不一样,因此此处可配置成后端开发人员需要的格式 | (query, dictType) => {if(!dictType){return { [query]: "" }} return { [query]: dictType }} |
|
|
176
|
+
| storage | storage | 否 | 数据缓存的位置 默认 localstorage 可选为 sessionstorage 兼容 | localstorage |
|
|
177
|
+
| usuallyGetFileds | String | 否 | 经常用到的字典数据,一进项目就会对缓存字典中无此类型的字典数据进行请求,此配置项在iframe项目中能发挥更大作用,进页面就一次性将全部字典数据一个接口请求掉,避免同时请求太多字典接口 宣传 默认空 多个字典以 英文逗号隔开 如 sex,personType | "" |
|
|
178
|
+
| isGetAll | Boolean | 否 | 获取所有字典类型接口 无传值获取所有字典接口,如果无传与真实需要获取全部字典接口的入参不一致 可配置 formatterRequest | false |
|
|
179
|
+
| getDictEveryTime | Boolean | 否 | 是否每次进项目都请求 usuallyGetFileds 字典类型的接口 或者获取所有字典类型接口 | false |
|
|
180
|
+
| treeSetting | Object | 否 | 树形相关数据配置 | 继续阅读文档 |
|
|
181
|
+
|
|
182
|
+
**localDictCodes的格式及字典数据的的格式如下**
|
|
183
|
+
|
|
184
|
+
```ts
|
|
185
|
+
export default {
|
|
186
|
+
SEX: [
|
|
187
|
+
{
|
|
188
|
+
value: "1",
|
|
189
|
+
label: "男"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
value: "2",
|
|
193
|
+
label: "女"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
value: "3",
|
|
197
|
+
label: "未知"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
niceOrBad: [
|
|
201
|
+
{
|
|
202
|
+
"value": "0",
|
|
203
|
+
"label": "好"
|
|
204
|
+
}, {
|
|
205
|
+
"value": "1",
|
|
206
|
+
"label": "差"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
area: [
|
|
210
|
+
{
|
|
211
|
+
"id": "110000",
|
|
212
|
+
"parentId": "0",
|
|
213
|
+
"label": "北京"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"id": "110100",
|
|
217
|
+
"parentId": "0",
|
|
218
|
+
"label": "北京市"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"id": "110101",
|
|
222
|
+
"parentId": "110100",
|
|
223
|
+
"areaName": "东城区"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"id": "110102",
|
|
227
|
+
"parentId": "110100",
|
|
228
|
+
"areaName": "西城区"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"id": "110105",
|
|
232
|
+
"parentId": "110100",
|
|
233
|
+
"areaName": "朝阳区"
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
:::warning
|
|
240
|
+
|
|
241
|
+
localDictCodes本地配置的value及label 以及 树形结构的 label及id须与dict-setting中的一致
|
|
242
|
+
|
|
243
|
+
接口返回的字段的数据也同理
|
|
244
|
+
|
|
245
|
+
:::
|
|
246
|
+
|
|
247
|
+
#### treeSetting配置
|
|
248
|
+
|
|
249
|
+
| 字段 | 类型 | 必传 | 说明 | 默认值 |
|
|
250
|
+
| :-----------: | :------------: | :--: | ------------------------------------------------------------ | :------: |
|
|
251
|
+
| idField | String | 否 | 树形数据值的键名 | id |
|
|
252
|
+
| parentIdField | String | 否 | 父节点的键名 | parentId |
|
|
253
|
+
| childrenField | String | 否 | 生成的树形结构子节点的字段名 | children |
|
|
254
|
+
| firstId | String,Number | 否 | 根节点的值 | “0” |
|
|
255
|
+
| labelField | String | 否 | 显示的值的字段名 | label |
|
|
256
|
+
| labelArrField | String | 否 | 字典包会将数组转化为树形结构数据 并每一项生成 labelArr字段,内容为【爷爷级/父级label,...,自己的label】 | labelArr |
|
|
257
|
+
| idArrField | String | 否 | 字典包会将数组转化为树形结构数据 并每一项生成 labelArr字段,内容为【爷爷级/父级id,...,自己的id】 | idArr |
|
|
258
|
+
| levelField | String | 否 | 给对象新增的层级字段名 | level |
|
|
259
|
+
| level | Number | 否 | 配置根目录的层级 | 0 |
|
|
260
|
+
| leafField | String | 否 | 是否叶子节点的字段名 值为boolean | leaf |
|
|
261
|
+
|
|
262
|
+
#### 在main.js中的使用
|
|
263
|
+
|
|
264
|
+
```ts
|
|
265
|
+
import Vue from "vue"
|
|
266
|
+
import App from "./App.vue"
|
|
267
|
+
// 引入组件库
|
|
268
|
+
import Vant from "vant-xiaobu"
|
|
269
|
+
import "vant-xiaobu/lib/index.css"
|
|
270
|
+
Vue.use(Vant)
|
|
271
|
+
|
|
272
|
+
import router from "@/router"
|
|
273
|
+
import { beforeEachHandler } from "@/router/before-each"
|
|
274
|
+
import afterEachHandler from "@/router/after-each"
|
|
275
|
+
router.beforeEach(beforeEachHandler)
|
|
276
|
+
router.afterEach(afterEachHandler)
|
|
277
|
+
|
|
278
|
+
import {getGlobalConfigApi} from "@/api/module/common-api.js"
|
|
279
|
+
import dictConfig from "@/dict-config.js"
|
|
280
|
+
import vue2VantDict from "vue2-vant-dict"
|
|
281
|
+
|
|
282
|
+
//获取当前版本号
|
|
283
|
+
getGlobalConfigApi().then(data => {
|
|
284
|
+
const {version} = data
|
|
285
|
+
Object.assign(dictConfig, {version})
|
|
286
|
+
Vue.use(vue2VantDict, dictConfig)
|
|
287
|
+
new Vue({
|
|
288
|
+
router,
|
|
289
|
+
render: h => h(App)
|
|
290
|
+
}).$mount("#app")
|
|
291
|
+
})
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
至此已全部配置完成,就可以轻松使用了。
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
### 使用
|
|
300
|
+
|
|
301
|
+
此包拥有组件及方法在此列出来
|
|
302
|
+
|
|
303
|
+
> 组件
|
|
304
|
+
>
|
|
305
|
+
> > van-select-dict 选项组件
|
|
306
|
+
> >
|
|
307
|
+
> > van-tabs-dict tab栏组件
|
|
308
|
+
> >
|
|
309
|
+
> > van-field-dict 输入框组件
|
|
310
|
+
> >
|
|
311
|
+
> > van-calendar-dict 日历选择组件
|
|
312
|
+
> >
|
|
313
|
+
> > van-datetime-dict 日期选择组件
|
|
314
|
+
> >
|
|
315
|
+
> > van-dropdown-item-dict 配合van-dropdown-menu的下拉列表组件
|
|
316
|
+
> >
|
|
317
|
+
> > van-radio-dict 单选框组件
|
|
318
|
+
> >
|
|
319
|
+
> > van-checkbox-dict 复选框组件
|
|
320
|
+
> >
|
|
321
|
+
> > van-cascader-dict 联级选项组件
|
|
322
|
+
> >
|
|
323
|
+
> > van-tree-select-dict 树形选择器组件
|
|
324
|
+
> >
|
|
325
|
+
> > van-button--dict 按钮组件
|
|
326
|
+
> >
|
|
327
|
+
> > van-tag-dict 标签组件
|
|
328
|
+
> >
|
|
329
|
+
>
|
|
330
|
+
> 过滤器:字典过滤方法 函数形式调用 也可使用过滤器方式
|
|
331
|
+
>
|
|
332
|
+
>> getLabelByCodeFilter
|
|
333
|
+
> >
|
|
334
|
+
>> getLabelByCodesFilter
|
|
335
|
+
> >
|
|
336
|
+
> > getCodeByLabelFilter
|
|
337
|
+
> >
|
|
338
|
+
> > getCodeByLabelsFilter
|
|
339
|
+
> >
|
|
340
|
+
> > getTreeLabelByCodeFilter
|
|
341
|
+
> >
|
|
342
|
+
> > getTreeLabelByCodesFilter
|
|
343
|
+
> >
|
|
344
|
+
> > getTreeCodeByLabelFilter
|
|
345
|
+
> >
|
|
346
|
+
> > getTreeCodeByLabelsFilter
|
|
347
|
+
> >
|
|
348
|
+
> > formatDate
|
|
349
|
+
> >
|
|
350
|
+
> > desensitization
|
|
351
|
+
>
|
|
352
|
+
> 方法
|
|
353
|
+
>
|
|
354
|
+
>> 普通方法 函数
|
|
355
|
+
> >
|
|
356
|
+
>> > getDictConfig
|
|
357
|
+
> > >
|
|
358
|
+
> > > getDictConfigByKey
|
|
359
|
+
> >
|
|
360
|
+
> > 字典相关 promise方法
|
|
361
|
+
> >
|
|
362
|
+
> > > getLabelByCode
|
|
363
|
+
> > >
|
|
364
|
+
> > > getLabelByCodes
|
|
365
|
+
> > >
|
|
366
|
+
> > > getCodeByLabel
|
|
367
|
+
> > >
|
|
368
|
+
> > > getCodeByLabels
|
|
369
|
+
> > >
|
|
370
|
+
> > > getTreeLabelByCode
|
|
371
|
+
> > >
|
|
372
|
+
> > > getTreeLabelByCodes
|
|
373
|
+
> > >
|
|
374
|
+
> > > getTreeCodeByLabel
|
|
375
|
+
> > >
|
|
376
|
+
> > > getTreeCodeByLabels
|
|
377
|
+
> >
|
|
378
|
+
> > 日期格式化 函数
|
|
379
|
+
> >
|
|
380
|
+
> > > formatDate
|
|
381
|
+
> > >
|
|
382
|
+
> > > isDate
|
|
383
|
+
> >
|
|
384
|
+
> > 脱敏相关 函数
|
|
385
|
+
> >
|
|
386
|
+
> > > mask
|
|
387
|
+
> > >
|
|
388
|
+
> > > maskAddress
|
|
389
|
+
> > >
|
|
390
|
+
> > > maskIdCard
|
|
391
|
+
> > >
|
|
392
|
+
> > > maskName
|
|
393
|
+
> > >
|
|
394
|
+
> > > maskPhone
|
|
395
|
+
> > >
|
|
396
|
+
> > > desensitization
|
|
397
|
+
> >
|
|
398
|
+
> > 树形结构相关 函数
|
|
399
|
+
> >
|
|
400
|
+
> > > listToTree
|
|
401
|
+
> > >
|
|
402
|
+
> > > getTreeItemByCode
|
|
403
|
+
> > >
|
|
404
|
+
> > > getTreeItemByLabel
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
**此处主要讲包的配置及准备工作,具体用法可前往[vue2-element-dict官网](http://xiaobusoft.com/vue2-element-dict)查看使用文档,[备用官网](https://shenxiaobu.github.io/vue2-element-dict/),如有问题可前往[问题反馈表格进行记录](https://docs.qq.com/sheet/DVmZQb0hyTk9uc1dY), 也可关注微信公众号【爆米花小布】私信进行反馈**
|
|
409
|
+
|
|
410
|
+

|
|
411
|
+
|
|
412
|
+
## 微信赞助
|
|
413
|
+
|
|
414
|
+
开发不易,如果对您有所帮助,可赞助作者,利于官网服务器运营。您的支持,是我继续努力的最大动力。
|
|
415
|
+
|
|
416
|
+

|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
## 更新日志
|
|
421
|
+
### 0.0.0
|
|
422
|
+
vue2-vant-dict最初版本
|
package/lib/demo.html
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(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 n(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(i,a,function(e){return t[e]}.bind(null,a));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"00ee":function(t,e,n){var i=n("b622"),a=i("toStringTag"),r={};r[a]="z",t.exports="[object z]"===String(r)},"04f8":function(t,e,n){var i=n("2d00"),a=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},"06cf":function(t,e,n){var i=n("83ab"),a=n("c65b"),r=n("d1e7"),s=n("5c6c"),o=n("fc6a"),l=n("a04b"),c=n("1a2d"),u=n("0cfb"),d=Object.getOwnPropertyDescriptor;e.f=i?d:function(t,e){if(t=o(t),e=l(e),u)try{return d(t,e)}catch(n){}if(c(t,e))return s(!a(r.f,t,e),t[e])}},"07fa":function(t,e,n){var i=n("50c4");t.exports=function(t){return i(t.length)}},"0834":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"van-field-dict"},[e("van-field",t._g(t._b({ref:"VanFieldDict",on:{focus:t.handleFocus,blur:t.handleBlur}},"van-field",t.$attrs,!1),t.$listeners)),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"},model:{value:t.sValue,callback:function(e){t.sValue=e},expression:"sValue"}},"van-field",t.$attrs,!1)):t._e()],1)},a=[],r=n("e8b7"),s={name:"van-field-dict",props:{defaultVal:{type:String,default:""},maskType:{type:String,validate(t){return["mobile","address","idCard","name"].includes(t)}},maskStart:{type:Number},maskEnd:{type:Number},maskMiddle:{type:Number},maskSymbol:{type:String,default:"*"}},data(){return{sValue:"",showCamouflage:!1}},computed:{desensitization(){return this.maskType||this.maskStart},maskOptions(){const t={};return this.defaultVal&&(t.defaultVal=this.defaultVal),this.maskType&&(t.maskType=this.maskType),this.maskStart&&(t.start=this.maskStart),this.maskEnd&&(t.end=this.maskEnd),this.maskMiddle&&(t.middle=this.maskMiddle),this.maskSymbol&&(t.symbol=this.maskSymbol),t}},created(){this.handleBlur()},methods:{getRef(){return this.$refs.VanFieldDict},handleFocus(){!0!==this.$attrs.readonly&&""!==this.$attrs.readonly&&(this.showCamouflage=!1)},handleBlur(){this.desensitization&&(this.sValue=Object(r["a"])(this.$attrs.value,this.maskOptions),this.showCamouflage=!0)}}},o=s,l=(n("351f"),n("2877")),c=Object(l["a"])(o,i,a,!1,null,"362c2938",null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"083a":function(t,e,n){"use strict";var i=n("0d51"),a=TypeError;t.exports=function(t,e){if(!delete t[e])throw a("Cannot delete property "+i(e)+" of "+i(t))}},"0cfb":function(t,e,n){var i=n("83ab"),a=n("d039"),r=n("cc12");t.exports=!i&&!a((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},"0d26":function(t,e,n){var i=n("e330"),a=Error,r=i("".replace),s=function(t){return String(a(t).stack)}("zxcasd"),o=/\n\s*at [^:]*:[^\n]*/,l=o.test(s);t.exports=function(t,e){if(l&&"string"==typeof t&&!a.prepareStackTrace)while(e--)t=r(t,o,"");return t}},"0d51":function(t,e){var n=String;t.exports=function(t){try{return n(t)}catch(e){return"Object"}}},"0ee5":function(t,e,n){"use strict";n("14d9");var i=n("8bbf"),a=n.n(i),r=n("e74d");const s=a.a.observable({dictConfig:{},dictCodes:{},isGettingDictTypes:[],isGettingAllDictTypes:!1,unfindDictTypes:[]}),o={SET_DICT_SETTING(t){s.dictConfig=t},SET_DICT_CODES(t){s.dictCodes=t},ADD_IS_EGTTING_DICT_TYPES(t){const e=t.split(","),n=[...e,...s.isGettingDictTypes],i=new Set(n);s.isGettingDictTypes=Array.from(i)},REMOVE_IS_EGTTING_DICT_TYPES(t){const e=t.split(","),n=[...new Set(s.isGettingDictTypes)].filter(t=>!new Set(e).has(t));s.isGettingDictTypes=Array.from(n)},SETTING_ISGETTING_ALL_DICT_TYPES(t){s.isGettingAllDictTypes=t},ADD_UNFIND_DICT_TYPES(t){const e=t.split(","),n=[...e,...s.unfindDictTypes],i=new Set(n);s.unfindDictTypes=Array.from(i)},REMOVE_UNFIND_DICT_TYPES(t){const e=t.split(","),n=[...new Set(s.unfindDictTypes)].filter(t=>!new Set(e).has(t));s.unfindDictTypes=Array.from(n)}},l={getDictDataObj(t){return new Promise((e,n)=>{const{storage:i,dictDataKey:a,getDictCodeApi:l,usuallyGetFileds:c,formatterRequest:u,query:d,verssionKey:f,localDictCodes:h,formatterDictList:p,formatterDictVersion:g,isGetAll:v,filterDataFun:y,disabledDataFun:b}=s.dictConfig,m=s.dictCodes||h;if(m[t]&&0!==m[t].length)o.REMOVE_UNFIND_DICT_TYPES(t),o.SET_DICT_CODES(m),e(s.dictCodes);else{if(s.isGettingDictTypes.includes(t)||s.isGettingAllDictTypes)return;if(o.ADD_IS_EGTTING_DICT_TYPES(t),s.unfindDictTypes.includes(t))return void n(`不存在类型为:${t} 的字典字段,请确认后再填写`);o.ADD_UNFIND_DICT_TYPES(t),l(u(d,t)).then(D=>{o.REMOVE_IS_EGTTING_DICT_TYPES(t);const T=g(D),_=i.getItem(f);if(T!==_){let D="";if(v)D="",o.SETTING_ISGETTING_ALL_DICT_TYPES(!0);else{if(c){const e=Object.keys(m),n=c.split(","),i=e.concat(n);i.push(t);const a=Array.from(new Set(i));D=a.join(",")}else{const e=Object.keys(m);e.push(t);const n=Array.from(new Set(e));D=n.join(",")}o.ADD_IS_EGTTING_DICT_TYPES(D)}l(u(d,D)).then(l=>{const c=p(l,t);if(!(c[t]&&c[t].length>0))return void n(`不存在类型为:${t} 的字典字段,请确认后再填写`);o.REMOVE_UNFIND_DICT_TYPES(t);const u=g(l),d=Object.assign(JSON.parse(JSON.stringify(h)),c),v=Object(r["a"])(d,y,b);i.setItem(a,JSON.stringify(v)),i.setItem(f,u),o.SET_DICT_CODES(d),e(s.dictCodes),s.isGettingAllDictTypes?o.SETTING_ISGETTING_ALL_DICT_TYPES(!1):o.REMOVE_IS_EGTTING_DICT_TYPES(D)})}else{const l=p(D,t);if(!(l[t]&&l[t].length>0))return void n(`不存在类型为:${t} 的字典字段,请确认后再填写`);o.REMOVE_UNFIND_DICT_TYPES(t);const c=s.dictCodes||h,u=Object(r["a"])(l,y,b);Object.assign(c,u),i.setItem(a,JSON.stringify(c)),o.SET_DICT_CODES(c),e(s.dictCodes)}})}})}},c={state:s,mutations:o,actions:l};e["a"]=c},"13d2":function(t,e,n){var i=n("e330"),a=n("d039"),r=n("1626"),s=n("1a2d"),o=n("83ab"),l=n("5e77").CONFIGURABLE,c=n("8925"),u=n("69f3"),d=u.enforce,f=u.get,h=String,p=Object.defineProperty,g=i("".slice),v=i("".replace),y=i([].join),b=o&&!a((function(){return 8!==p((function(){}),"length",{value:8}).length})),m=String(String).split("String"),D=t.exports=function(t,e,n){"Symbol("===g(h(e),0,7)&&(e="["+v(h(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||l&&t.name!==e)&&(o?p(t,"name",{value:e,configurable:!0}):t.name=e),b&&n&&s(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?o&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(a){}var i=d(t);return s(i,"source")||(i.source=y(m,"string"==typeof e?e:"")),t};Function.prototype.toString=D((function(){return r(this)&&f(this).source||c(this)}),"toString")},"13d5":function(t,e,n){"use strict";var i=n("23e7"),a=n("d58f").left,r=n("a640"),s=n("2d00"),o=n("605d"),l=!o&&s>79&&s<83,c=l||!r("reduce");i({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,n){"use strict";var i=n("23e7"),a=n("7b0b"),r=n("07fa"),s=n("3a34"),o=n("3511"),l=n("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();i({target:"Array",proto:!0,arity:1,forced:d},{push:function(t){var e=a(this),n=r(e),i=arguments.length;o(n+i);for(var l=0;l<i;l++)e[n]=arguments[l],n++;return s(e,n),n}})},1626:function(t,e,n){var i=n("8ea1"),a=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===a}:function(t){return"function"==typeof t}},"1a2d":function(t,e,n){var i=n("e330"),a=n("7b0b"),r=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return r(a(t),e)}},"1bad":function(t,e,n){var i=n("7993");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("499e").default;a("25a346cc",i,!0,{sourceMap:!1,shadowMode:!1})},"1d80":function(t,e,n){var i=n("7234"),a=TypeError;t.exports=function(t){if(i(t))throw a("Can't call method on "+t);return t}},"23cb":function(t,e,n){var i=n("5926"),a=Math.max,r=Math.min;t.exports=function(t,e){var n=i(t);return n<0?a(n+e,0):r(n,e)}},"23e7":function(t,e,n){var i=n("da84"),a=n("06cf").f,r=n("9112"),s=n("cb2d"),o=n("6374"),l=n("e893"),c=n("94ca");t.exports=function(t,e){var n,u,d,f,h,p,g=t.target,v=t.global,y=t.stat;if(u=v?i:y?i[g]||o(g,{}):(i[g]||{}).prototype,u)for(d in e){if(h=e[d],t.dontCallGetSet?(p=a(u,d),f=p&&p.value):f=u[d],n=c(v?d:g+(y?".":"#")+d,t.forced),!n&&void 0!==f){if(typeof h==typeof f)continue;l(h,f)}(t.sham||f&&f.sham)&&r(h,"sham",!0),s(u,d,h,t)}}},"241c":function(t,e,n){var i=n("ca84"),a=n("7839"),r=a.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},"24fb":function(t,e,n){"use strict";function i(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"===typeof btoa){var r=a(i),s=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[n].concat(s).concat([r]).join("\n")}return[n].join("\n")}function a(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(n," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=i(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"===typeof t&&(t=[[null,t,""]]);var a={};if(i)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(a[s]=!0)}for(var o=0;o<t.length;o++){var l=[].concat(t[o]);i&&a[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},2877:function(t,e,n){"use strict";function i(t,e,n,i,a,r,s,o){var l,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(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(s)},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}}n.d(e,"a",(function(){return i}))},"28bb":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("van-checkbox-group",t._g(t._b({ref:"VanCheckboxGroup",attrs:{value:t.svalue},on:{change:t.handdleChange}},"van-checkbox-group",t.$attrs,!1),t.$listeners),t._l(t.list,(function(n,i){return e("van-checkbox",{key:i,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:n.disabled,name:n[t.dictConfig.format.value]},on:{change:t.handleCheckboxChange,click:t.handleCheckboxClick}},[t._v(" "+t._s(n[t.dictConfig.format.label])+" ")])})),1)},a=[],r=n("0ee5"),s={name:"van-checkbox-dict",data(){return{svalue:this.value||[],result:[],list:[],type:""}},props:{value:{},shape:{type:String,default:"round"},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}},computed:{dictCodes(){return r["a"].state.dictCodes},dictConfig(){return r["a"].state.dictConfig},isGettingAllDictTypes(){return r["a"].state.isGettingAllDictTypes},isGettingDictTypes(){return r["a"].state.isGettingDictTypes}},watch:{isGettingDictTypes(t){t.includes(this.type)||this.getDictionary_option()},isGettingAllDictTypes(t){t||this.getDictionary_option()},value(t){this.svalue=t},svalue(t,e){t!==e&&this.$emit("input",t)}},mounted(){this.getDictionary_option()},methods:{handleCheckboxClick(t){this.$emit("checkboxClick",t)},handleCheckboxChange(t){this.$emit("checkboxChange",t)},async getDictionary_option(){if(!this.dictType)return;let t=[];if("object"===typeof this.dictType){this.type=this.dictType.type,await r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);const{filters:e,filterType:n=this.dictConfig.format.value,reverse:i=!1}=this.dictType,a="string"===typeof e?e.split(","):e;t=i?t.filter(t=>!a.includes(t[n])):t.filter(t=>a.includes(t[n]))}else this.type=this.dictType,await r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);if(this.filterDataFun&&(t=this.filterDataFun(t)),this.disabledDataFun&&(t=this.disabledDataFun(t)),this.disableObj){const{disableValue:e,disableType:n=this.dictConfig.format.value,reverse:i=!1}=this.disableObj,a="string"===typeof e?e.split(","):e;t=i?t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=!a.includes(e[n])||e.disabled,e}):t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=a.includes(e[n])||e.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}}},o=s,l=n("2877"),c=Object(l["a"])(o,i,a,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"2ba4":function(t,e,n){var i=n("40d5"),a=Function.prototype,r=a.apply,s=a.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?s.bind(r):function(){return s.apply(r,arguments)})},"2d00":function(t,e,n){var i,a,r=n("da84"),s=n("342f"),o=r.process,l=r.Deno,c=o&&o.versions||l&&l.version,u=c&&c.v8;u&&(i=u.split("."),a=i[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&s&&(i=s.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/),i&&(a=+i[1]))),t.exports=a},"342f":function(t,e){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3511:function(t,e){var n=TypeError,i=9007199254740991;t.exports=function(t){if(t>i)throw n("Maximum allowed index exceeded");return t}},"351f":function(t,e,n){"use strict";n("6f88")},"3a34":function(t,e,n){"use strict";var i=n("83ab"),a=n("e8b5"),r=TypeError,s=Object.getOwnPropertyDescriptor,o=i&&!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)&&!s(t,"length").writable)throw r("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},"3a9b":function(t,e,n){var i=n("e330");t.exports=i({}.isPrototypeOf)},"3bbe":function(t,e,n){var i=n("1626"),a=String,r=TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw r("Can't set "+a(t)+" as a prototype")}},"3c65":function(t,e,n){"use strict";var i=n("23e7"),a=n("7b0b"),r=n("07fa"),s=n("3a34"),o=n("083a"),l=n("3511"),c=1!==[].unshift(0),u=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}},d=c||!u();i({target:"Array",proto:!0,arity:1,forced:d},{unshift:function(t){var e=a(this),n=r(e),i=arguments.length;if(i){l(n+i);var c=n;while(c--){var u=c+i;c in e?e[u]=e[c]:o(e,u)}for(var d=0;d<i;d++)e[d]=arguments[d]}return s(e,n+i)}})},"40d5":function(t,e,n){var i=n("d039");t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},4362:function(t,e,n){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,i="/";e.cwd=function(){return i},e.chdir=function(e){t||(t=n("df7c")),i=t.resolve(e,i)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},"44ad":function(t,e,n){var i=n("e330"),a=n("d039"),r=n("c6b6"),s=Object,o=i("".split);t.exports=a((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?o(t,""):s(t)}:s},"485a":function(t,e,n){var i=n("c65b"),a=n("1626"),r=n("861d"),s=TypeError;t.exports=function(t,e){var n,o;if("string"===e&&a(n=t.toString)&&!r(o=i(n,t)))return o;if(a(n=t.valueOf)&&!r(o=i(n,t)))return o;if("string"!==e&&a(n=t.toString)&&!r(o=i(n,t)))return o;throw s("Can't convert object to primitive value")}},4943:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return s}));n("14d9"),n("13d5"),n("3c65");const i=(t,e,n)=>{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),n||(n={[a.idField]:a.firstId,[a.levelField]:a.level,[a.labelArrField]:[],[a.idArrField]:[]});for(var r,s=[],o=0;o<t.length;o++)if(t[o][a.parentIdField]===n[a.idField]){var l=t[o];l[a.levelField]=n[a.levelField]+1,l[a.labelArrField]=n[a.labelArrField].concat(l[a.labelField]),l[a.idArrField]=n[a.idArrField].concat(l[a.idField]),r=i(t,e,l),r.length>0?(l[a.childrenField]=r,l[a.leafField]=!1):l[a.leafField]=!0,s.push(l)}return s};function a(t,e,n){const i={idField:"id",parentIdField:"parentId"};Object.assign(i,n);const r=e.find(e=>e[i.idField]===t);return r?a(r[i.parentIdField],e,i).concat([r]):[]}function r(t,e,n){const i={idField:"id",labelField:"label",parentIdField:"parentId"};Object.assign(i,n);const r=e.find(e=>e[i.labelField]===t);return a(r[i.idField],e,i)}const s=(t,e,n)=>{const i={targetField:"id",childrenField:"children"};return Object.assign(i,n),t.reduce((t,a)=>{if(a[i.targetField]===e)t.push(a);else if(a[i.childrenField]&&a[i.childrenField].length){const r=s(a[i.childrenField],e,n);r&&r.length&&t.unshift(a,...r)}return t},[])}},"499e":function(t,e,n){"use strict";function i(t,e){for(var n=[],i={},a=0;a<e.length;a++){var r=e[a],s=r[0],o=r[1],l=r[2],c=r[3],u={id:t+":"+a,css:o,media:l,sourceMap:c};i[s]?i[s].parts.push(u):n.push(i[s]={id:s,parts:[u]})}return n}n.r(e),n.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 r={},s=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,n,a){c=n,d=a||{};var s=i(t,e);return g(s),function(e){for(var n=[],a=0;a<s.length;a++){var o=s[a],l=r[o.id];l.refs--,n.push(l)}e?(s=i(t,e),g(s)):s=[];for(a=0;a<n.length;a++){l=n[a];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete r[l.id]}}}}function g(t){for(var e=0;e<t.length;e++){var n=t[e],i=r[n.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](n.parts[a]);for(;a<n.parts.length;a++)i.parts.push(y(n.parts[a]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{var s=[];for(a=0;a<n.parts.length;a++)s.push(y(n.parts[a]));r[n.id]={id:n.id,refs:1,parts:s}}}}function v(){var t=document.createElement("style");return t.type="text/css",s.appendChild(t),t}function y(t){var e,n,i=document.querySelector("style["+f+'~="'+t.id+'"]');if(i){if(c)return u;i.parentNode.removeChild(i)}if(h){var a=l++;i=o||(o=v()),e=m.bind(null,i,a,!1),n=m.bind(null,i,a,!0)}else i=v(),e=D.bind(null,i),n=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else n()}}var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function m(t,e,n,i){var a=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=b(e,a);else{var r=document.createTextNode(a),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function D(t,e){var n=e.css,i=e.media,a=e.sourceMap;if(i&&t.setAttribute("media",i),d.ssrId&&t.setAttribute(f,e.id),a&&(n+="\n/*# sourceURL="+a.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},"4d64":function(t,e,n){var i=n("fc6a"),a=n("23cb"),r=n("07fa"),s=function(t){return function(e,n,s){var o,l=i(e),c=r(l),u=a(s,c);if(t&&n!=n){while(c>u)if(o=l[u++],o!=o)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},"4d9d":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"van-cascader-dict"},[e("van-field",t._g(t._b({attrs:{readonly:"",clickable:"",value:t.showValue,"is-link":""},on:{click:t.handleClick},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,n){return{key:n,fn:function(e){return[t._t(n,null,null,e)]}}}))],null,!0)},"van-field",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(n,i){return e("template",{slot:i},[t._t(i)],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"},[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}]),model:{value:t.selectValue,callback:function(e){t.selectValue=e},expression:"selectValue"}},"van-cascader",t.$attrs,!1))],1)],1)},a=[],r=n("0ee5"),s=n("4943"),o={name:"van-cascader-dict",data(){return{selectValue:null,svalue:this.value,showValue:"",showPicker:!1,list:[],type:"",selectedOptions:[],tabIndex:null}},props:{value:{},tips:{type:String},minSelectLevel:{type:[Number,String]},maxLevel:{type:[Number,String]},cascaderPlaceholder:{type:String,default:"请选择"},treeData:{type:Array,default:()=>[]},defaultValue:{type:String,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}},computed:{dictCodes(){return r["a"].state.dictCodes},dictConfig(){return r["a"].state.dictConfig},isGettingAllDictTypes(){return r["a"].state.isGettingAllDictTypes},isGettingDictTypes(){return r["a"].state.isGettingDictTypes},endTreeSetting(){var t,e,n,i;const a=null!==(t=this.$attrs.fieldNames)&&void 0!==t?t:{},r={idField:null!==(e=a.value)&&void 0!==e?e:this.dictConfig.treeSetting.idField,labelField:null!==(n=a.text)&&void 0!==n?n:this.dictConfig.treeSetting.labelField,childrenField:null!==(i=a.children)&&void 0!==i?i:this.dictConfig.treeSetting.childrenField},s=Object.assign(this.dictConfig.treeSetting,r);return s},options(){if(this.treeData.length>0)return this.treeData;const t=Object(s["d"])(this.list,this.endTreeSetting),e=JSON.parse(JSON.stringify(t));return this.maxLevel&&this.filterLevel(e,+this.maxLevel),e||[]},setting(){var t,e,n,i;const a=null!==(t=this.$attrs.fieldNames)&&void 0!==t?t:{};return a.value=null!==(e=a.value)&&void 0!==e?e:this.dictConfig.treeSetting.idField,a.text=null!==(n=a.label)&&void 0!==n?n:this.dictConfig.treeSetting.labelField,a.children=null!==(i=a.children)&&void 0!==i?i:this.dictConfig.treeSetting.childrenField,a}},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(s["c"])(t,this.value,this.endTreeSetting);this.showValue=this.setShowValue(e,this.spacer)},value(t){this.svalue=t},svalue(t,e){t!==e&&this.$emit("input",t)}},mounted(){if(0===this.treeData.length&&this.getDictionary_option(),this.treeData.length>0&&this.value){const t=Object(s["c"])(this.treeData,this.value,this.endTreeSetting);this.showValue=this.setShowValue(t,this.spacer)}},methods:{setShowValue(t,e){return t.map(t=>t[this.endTreeSetting.labelField]).join(e)},filterLevel(t,e){for(let n=0;n<t.length;n++){const i=t[n],a=i[this.endTreeSetting.levelField];a!==e?this.filterLevel(i[this.endTreeSetting.childrenField],e):delete i[this.endTreeSetting.childrenField]}},handleFinish(t){this.finish&&this.handleConfirm(t.value),this.$emit("finish",t)},handdleChange(t){this.tabIndex=t.tabIndex,this.selectedOptions=t.selectedOptions,this.$emit("change",t)},handleClose(){this.$emit("close")},handleClick(){!0!==this.$attrs.disabled&&""!==this.$attrs.disabled&&(this.showPicker=!0)},handleConfirm(t){if(!this.selectedOptions[this.tabIndex].disabled)if(this.minSelectLevel&&+this.minSelectLevel>this.tabIndex+1){const t=this.tips||`请选择至少第${this.minSelectLevel}级`;this.$toast(t)}else this.svalue=t,this.showPicker=!1,this.keyValue?this.$emit("dictChange",this.selectedOptions):this.$emit("dictChange",this.svalue),this.showValue=this.setShowValue(this.selectedOptions,this.spacer)},handleCancel(){this.showPicker=!1},async getDictionary_option(){if(!this.dictType)return;let t=[];if("object"===typeof this.dictType){this.type=this.dictType.type,await r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);const{filters:e,filterType:n=this.endTreeSetting.idField,reverse:i=!1}=this.dictType,a="string"===typeof e?e.split(","):e;t=i?t.filter(t=>!a.includes(t[n])):t.filter(t=>a.includes(t[n]))}else this.type=this.dictType,await r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);if(this.filterDataFun&&(t=this.filterDataFun(t)),this.disabledDataFun&&(t=this.disabledDataFun(t)),this.disableObj){const{disableValue:e,disableType:n=this.endTreeSetting.idField,reverse:i=!1}=this.disableObj,a="string"===typeof e?e.split(","):e;t=i?t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=!a.includes(e[n])||e.disabled,e}):t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=a.includes(e[n])||e.disabled,e})}this.list=t},getRef(){return this.$refs.VantCascaderDict}}},l=o,c=(n("d501"),n("2877")),u=Object(c["a"])(l,i,a,!1,null,"4c3d54f9",null),d=u.exports;d.install=function(t){t.component(d.name,d)};e["default"]=d},"4ddc":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("van-button",t._g(t._b({ref:"VanButtonDict",attrs:{type:t.judgeType},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,n){return{key:n,fn:function(e){return[t._t(n,null,null,e)]}}}))],null,!0)},"van-button",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(n,i){return e("template",{slot:i},[t._t(i)],2)})),t._v(" "+t._s(t.GetLabelByCodeFilter(t.value,t.dictType))+" ")],2)},a=[],r=n("8d7f"),s={name:"van-button-dict",props:{value:{type:[String,Number],required:!0},dictType:{type:[String],required:!0},judgeTypeFun:{type:Function,default:()=>{}},type:{type:String,default:"primary"}},data(){return{GetLabelByCodeFilter:r["c"]}},computed:{judgeType(){return this.judgeTypeFun&&this.judgeTypeFun(this.value)||this.type}},methods:{getRef(){return this.$refs.VanButtonDict}}},o=s,l=n("2877"),c=Object(l["a"])(o,i,a,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"4ec3":function(t,e,n){"use strict";n.r(e);var i=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,n){return{key:n,fn:function(e){return[t._t(n,null,null,e)]}}}))],null,!0)},"van-dropdown-item",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(n,i){return e("template",{slot:i},[t._t(i)],2)}))],2)},a=[],r=n("0ee5"),s={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 r["a"].state.dictCodes},dictConfig(){return r["a"].state.dictConfig},isGettingAllDictTypes(){return r["a"].state.isGettingAllDictTypes},isGettingDictTypes(){return r["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 r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);const{filters:e,filterType:n=this.dictConfig.format.value,reverse:i=!1}=this.dictType,a="string"===typeof e?e.split(","):e;t=i?t.filter(t=>!a.includes(t[n])):t.filter(t=>a.includes(t[n]))}else this.type=this.dictType,await r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);if(this.filterDataFun&&(t=this.filterDataFun(t)),this.disabledDataFun&&(t=this.disabledDataFun(t)),this.disableObj){const{disableValue:e,disableType:n=this.dictConfig.format.value,reverse:i=!1}=this.disableObj,a="string"===typeof e?e.split(","):e;t=i?t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=!a.includes(e[n])||e.disabled,e}):t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=a.includes(e[n])||e.disabled,e})}this.list=t},handdleChange(t){this.$emit("dictChange",t)},getRef(){return this.$refs.VanDropdownItemDict}}},o=s,l=n("2877"),c=Object(l["a"])(o,i,a,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"50c4":function(t,e,n){var i=n("5926"),a=Math.min;t.exports=function(t){return t>0?a(i(t),9007199254740991):0}},5692:function(t,e,n){var i=n("c430"),a=n("c6cd");(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.1",mode:i?"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,n){var i=n("d066"),a=n("e330"),r=n("241c"),s=n("7418"),o=n("825a"),l=a([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(o(t)),n=s.f;return n?l(e,n(t)):e}},"577e":function(t,e,n){var i=n("f5df"),a=String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return a(t)}},5926:function(t,e,n){var i=n("b42e");t.exports=function(t){var e=+t;return e!==e||0===e?0:i(e)}},5940:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,".van-field-dict[data-v-362c2938]{position:relative}.van-field-dict .van-cell.van-field.camouflage[data-v-362c2938]{position:absolute;left:0;top:0;pointer-events:none}",""]),t.exports=e},"59ed":function(t,e,n){var i=n("1626"),a=n("0d51"),r=TypeError;t.exports=function(t){if(i(t))return t;throw r(a(t)+" is not a function")}},"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,n){"use strict";n.d(e,"e",(function(){return r})),n.d(e,"g",(function(){return s})),n.d(e,"f",(function(){return o})),n.d(e,"a",(function(){return l})),n.d(e,"c",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"d",(function(){return d}));n("14d9");var i=n("0ee5"),a=n("e74d");const r=(t,e,n)=>new Promise((a,r)=>{const{format:s}=i["a"].state.dictConfig,o=i["a"].state.dictCodes;let l=[];if(o&&o[e]){l=o[e];const i=l.find(e=>e[s.value]===t);a(i?i[s.label]:null!==n&&void 0!==n?n:"")}else if(i["a"].state.isGettingDictTypes.includes(e)||i["a"].state.isGettingAllDictTypes){const o=setInterval(()=>{if(!i["a"].state.isGettingDictTypes.includes(e)&&!i["a"].state.isGettingAllDictTypes){if(clearInterval(o),l=i["a"].state.dictCodes[e],!l)return void r(`不存在类型为:${e} 的字典字段,请确认后再填写`);const c=l.find(e=>e[s.value]===t);a(c?c[s.label]:null!==n&&void 0!==n?n:"")}},1e3)}else i["a"].actions.getDictDataObj(e).then(i=>{if(l=i[e],!l)return void r(`不存在类型为:${e} 的字典字段,请确认后再填写`);const o=l.find(e=>e[s.value]===t);a(o?o[s.label]:null!==n&&void 0!==n?n:"")})});function s(t,e,n,i){const a=[];for(let r=0;r<t.length;r++){const s=e.find(e=>e[n.value]===t[r]);s?a.push(s):a.push({[n.label]:i,[n.value]:t[r]})}return a}const o=(t,e,n)=>{const a={defaultVal:"",formatFun:(t,e)=>t.map(t=>t[e.label]).join(","),spacer:","};return Object.assign(a,n),new Promise((n,r)=>{let o=[];Array.isArray(t)?o=t:"string"===typeof t&&(o=t.split(a.spacer));const{format:l}=i["a"].state.dictConfig,c=i["a"].state.dictCodes;let u=[];if(c&&c[e]){u=c[e];const t=s(o,u,l,a.defaultVal);n(t&&t.length>0?a.formatFun(t,l):a.defaultVal)}else if(i["a"].state.isGettingDictTypes.includes(e)||i["a"].state.isGettingAllDictTypes){const t=setInterval(()=>{if(!i["a"].state.isGettingDictTypes.includes(e)&&!i["a"].state.isGettingAllDictTypes){if(clearInterval(t),u=i["a"].state.dictCodes[e],!u)return void r(`不存在类型为:${e} 的字典字段,请确认后再填写`);const c=s(o,u,l,a.defaultVal);n(c&&c.length>0?a.formatFun(c,l):a.defaultVal)}},1e3)}else i["a"].actions.getDictDataObj(e).then(t=>{if(u=t[e],!u)return void r(`不存在类型为:${e} 的字典字段,请确认后再填写`);const i=s(o,u,l,a.defaultVal);n(i&&i.length>0?a.formatFun(i,l):a.defaultVal)})})},l=(t,e,n)=>new Promise((a,r)=>{const{format:s}=i["a"].state.dictConfig,o=i["a"].state.dictCodes;let l=[];if(o&&o[e]){l=o[e];const i=l.find(e=>e[s.label]===t);a(i?i[s.value]:null!==n&&void 0!==n?n:"")}else if(i["a"].state.isGettingDictTypes.includes(e)||i["a"].state.isGettingAllDictTypes){const o=setInterval(()=>{if(!i["a"].state.isGettingDictTypes.includes(e)&&!i["a"].state.isGettingAllDictTypes){if(clearInterval(o),l=i["a"].state.dictCodes[e],!l)return void r(`不存在类型为:${e} 的字典字段,请确认后再填写`);const c=l.find(e=>e[s.label]===t);a(c?c[s.value]:null!==n&&void 0!==n?n:"")}},1e3)}else i["a"].actions.getDictDataObj(e).then(i=>{if(l=i[e],!l)return void r(`不存在类型为:${e} 的字典字段,请确认后再填写`);const o=l.find(e=>e[s.label]===t);a(o?o[s.value]:null!==n&&void 0!==n?n:"")})});function c(t,e,n,i){const a=[];for(let r=0;r<t.length;r++){const s=e.find(e=>e[n.label]===t[r]);s?a.push(s):a.push({[n.label]:t[r],[n.value]:i})}return a}const u=(t,e,n)=>{const a={defaultVal:"",formatFun:(t,e)=>t.map(t=>t[e.value]).join(","),spacer:","};return Object.assign(a,n),new Promise((n,r)=>{let s=[];Array.isArray(t)?s=t:"string"===typeof t&&(s=t.split(a.spacer));const{format:o}=i["a"].state.dictConfig,l=i["a"].state.dictCodes;let u=[];if(l&&l[e]){u=l[e];const t=c(s,u,o,a.defaultVal);n(t&&t.length>0?a.formatFun(t,o):a.defaultVal)}else if(i["a"].state.isGettingDictTypes.includes(e)||i["a"].state.isGettingAllDictTypes){const t=setInterval(()=>{if(!i["a"].state.isGettingDictTypes.includes(e)&&!i["a"].state.isGettingAllDictTypes){if(clearInterval(t),u=i["a"].state.dictCodes[e],!u)return void r(`不存在类型为:${e} 的字典字段,请确认后再填写`);const l=c(s,u,o,a.defaultVal);n(l&&l.length>0?a.formatFun(l,o):a.defaultVal)}},1e3)}else i["a"].actions.getDictDataObj(e).then(t=>{if(u=t[e],!u)return void r(`不存在类型为:${e} 的字典字段,请确认后再填写`);const i=c(s,u,o,a.defaultVal);n(i&&i.length>0?a.formatFun(i,o):a.defaultVal)})})},d=t=>new Promise((e,n)=>{let r=[],s="";Array.isArray(t)?(s=t.join(","),r=t):"string"===typeof t&&(r=t.split(","));const o=i["a"].state.dictCodes,l=i["a"].state.dictConfig;if(o){const s=[],c={};for(let t=0;t<r.length;t++)o[r[t]]?c[r[t]]=o[r[t]]:s.push(r[t]);s.length>0?(i["a"].mutations.ADD_IS_EGTTING_DICT_TYPES(s.join(",")),l.getDictCodeApi(l.formatterRequest(l.query,s.join(","))).then(r=>{i["a"].mutations.REMOVE_IS_EGTTING_DICT_TYPES(s.join(","));const o=l.formatterDictList(r,t),u=Object(a["a"])(o,l.filterDataFun,l.disabledDataFun),d=JSON.parse(JSON.stringify(u)),f=Object.assign(i["a"].state.dictCodes,d);l.storage.setItem(l.dictDataKey,JSON.stringify(f)),i["a"].mutations.SET_DICT_CODES(f);const h=Object.assign(c,o),p=[];for(const t in h)h[t]&&0!==h[t].length||p.push(t);p.length>0&&n(`不存在类型为:${p.join("、")} 的字典字段,请确认后再填写`),e(u)})):e(c)}else i["a"].mutations.ADD_IS_EGTTING_DICT_TYPES(s),l.getDictCodeApi(l.formatterRequest(l.query,s)).then(n=>{i["a"].mutations.REMOVE_IS_EGTTING_DICT_TYPES(s);const r=l.formatterDictList(n,t),o=Object(a["a"])(r,l.filterDataFun,l.disabledDataFun),c=JSON.parse(JSON.stringify(o)),u=Object.assign(i["a"].state.dictCodes,c);l.storage.setItem(l.dictDataKey,JSON.stringify(u)),i["a"].mutations.SET_DICT_CODES(u),e(o)})})},"5e77":function(t,e,n){var i=n("83ab"),a=n("1a2d"),r=Function.prototype,s=i&&Object.getOwnPropertyDescriptor,o=a(r,"name"),l=o&&"something"===function(){}.name,c=o&&(!i||i&&s(r,"name").configurable);t.exports={EXISTS:o,PROPER:l,CONFIGURABLE:c}},"5e88":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("van-tag",t._g(t._b({ref:"VanTagDict",attrs:{type:t.judgeType},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,n){return{key:n,fn:function(e){return[t._t(n,null,null,e)]}}}))],null,!0)},"van-tag",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(n,i){return e("template",{slot:i},[t._t(i)],2)})),t._v(" "+t._s(t.GetLabelByCodeFilter(t.value,t.dictType))+" ")],2)},a=[],r=n("8d7f"),s={name:"van-tabs-dict",props:{value:{required:!0},dictType:{type:[String],required:!0},judgeTypeFun:{type:Function,default:()=>{}},type:{type:String,default:"primary"}},data(){return{GetLabelByCodeFilter:r["c"]}},computed:{judgeType(){return this.judgeTypeFun&&this.judgeTypeFun(this.value)||this.type}},getRef(){return this.$refs.VanTagDict}},o=s,l=n("2877"),c=Object(l["a"])(o,i,a,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"605d":function(t,e,n){(function(e){var i=n("c6b6");t.exports="undefined"!=typeof e&&"process"==i(e)}).call(this,n("4362"))},6374:function(t,e,n){var i=n("da84"),a=Object.defineProperty;t.exports=function(t,e){try{a(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},"69f3":function(t,e,n){var i,a,r,s=n("cdce"),o=n("da84"),l=n("861d"),c=n("9112"),u=n("1a2d"),d=n("c6cd"),f=n("f772"),h=n("d012"),p="Object already initialized",g=o.TypeError,v=o.WeakMap,y=function(t){return r(t)?a(t):i(t,{})},b=function(t){return function(e){var n;if(!l(e)||(n=a(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}};if(s||d.state){var m=d.state||(d.state=new v);m.get=m.get,m.has=m.has,m.set=m.set,i=function(t,e){if(m.has(t))throw g(p);return e.facade=t,m.set(t,e),e},a=function(t){return m.get(t)||{}},r=function(t){return m.has(t)}}else{var D=f("state");h[D]=!0,i=function(t,e){if(u(t,D))throw g(p);return e.facade=t,c(t,D,e),e},a=function(t){return u(t,D)?t[D]:{}},r=function(t){return u(t,D)}}t.exports={set:i,get:a,has:r,enforce:y,getterFor:b}},"6f19":function(t,e,n){var i=n("9112"),a=n("0d26"),r=n("b980"),s=Error.captureStackTrace;t.exports=function(t,e,n,o){r&&(s?s(t,e):i(t,"stack",a(n,o)))}},"6f88":function(t,e,n){var i=n("5940");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("499e").default;a("0bd6e21d",i,!0,{sourceMap:!1,shadowMode:!1})},7156:function(t,e,n){var i=n("1626"),a=n("861d"),r=n("d2bb");t.exports=function(t,e,n){var s,o;return r&&i(s=e.constructor)&&s!==n&&a(o=s.prototype)&&o!==n.prototype&&r(t,o),t}},7234:function(t,e){t.exports=function(t){return null===t||void 0===t}},7282:function(t,e,n){var i=n("e330"),a=n("59ed");t.exports=function(t,e,n){try{return i(a(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(r){}}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7993:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,".van-cascader-dict[data-v-4c3d54f9] .van-popup .van-cascader .van-cascader__header{padding:0}.van-cascader-dict[data-v-4c3d54f9] .van-popup .van-cascader .van-cascader__header .van-cascader__title{width:100%;display:flex;justify-content:flex-start;align-content:center}.van-cascader-dict[data-v-4c3d54f9] .van-popup .van-cascader .van-cascader__header .van-cascader__title .van-picker__cancel{color:#969799}.van-cascader-dict[data-v-4c3d54f9] .van-popup .van-cascader .van-cascader__header .van-cascader__title .vant_cascader_title{flex-grow:1;text-align:center;font-weight:500;font-size:16px;line-height:20px}.van-cascader-dict[data-v-4c3d54f9] .van-popup .van-cascader .van-cascader__header .van-cascader__title .van-picker__confirm{color:#576b95}",""]),t.exports=e},"7b0b":function(t,e,n){var i=n("1d80"),a=Object;t.exports=function(t){return a(i(t))}},"825a":function(t,e,n){var i=n("861d"),a=String,r=TypeError;t.exports=function(t){if(i(t))return t;throw r(a(t)+" is not an object")}},"83ab":function(t,e,n){var i=n("d039");t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e,n){var i=n("1626"),a=n("8ea1"),r=a.all;t.exports=a.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===r}:function(t){return"object"==typeof t?null!==t:i(t)}},8925:function(t,e,n){var i=n("e330"),a=n("1626"),r=n("c6cd"),s=i(Function.toString);a(r.inspectSource)||(r.inspectSource=function(t){return s(t)}),t.exports=r.inspectSource},"8bbf":function(e,n){e.exports=t},"8d7f":function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return l}));n("d9e2");var i=n("0ee5"),a=n("5dc9");const r=(t,e,n)=>{const{format:a}=i["a"].state.dictConfig,r=i["a"].state.dictCodes;let s=[];if(r&&r[e]){s=r[e];const i=s.find(e=>e[a.value]===t);return i?i[a.label]:null!==n&&void 0!==n?n:""}i["a"].actions.getDictDataObj(e).then(i=>{if(s=i[e],!s)return void new Error(`不存在类型为:${e} 的字典字段,请确认后再填写`);const r=s.find(e=>e[a.value]===t);return r?r[a.label]:null!==n&&void 0!==n?n:""})},s=(t,e,n)=>{const r={defaultVal:"",formatFun:(t,e)=>t.map(t=>t[e.label]).join(","),spacer:","};Object.assign(r,n);let s=[];Array.isArray(t)?s=t:"string"===typeof t&&(s=t.split(r.spacer));const{format:o}=i["a"].state.dictConfig,l=i["a"].state.dictCodes;let c=[];if(l&&l[e]){c=l[e];const t=Object(a["g"])(s,c,o,r.defaultVal);return t&&t.length>0?r.formatFun(t,o):r.defaultVal}i["a"].actions.getDictDataObj(e).then(t=>{if(c=t[e],!c)return void new Error(`不存在类型为:${e} 的字典字段,请确认后再填写`);const n=Object(a["g"])(s,c,o,r.defaultVal);return n&&n.length>0?r.formatFun(n,o):r.defaultVal})},o=(t,e,n)=>{const{format:a}=i["a"].state.dictConfig,r=i["a"].state.dictCodes;let s=[];if(r&&r[e]){s=r[e];const i=s.find(e=>e[a.label]===t);return i?i[a.value]:null!==n&&void 0!==n?n:""}i["a"].actions.getDictDataObj(e).then(i=>{if(s=i[e],!s)return void new Error(`不存在类型为:${e} 的字典字段,请确认后再填写`);const r=s.find(e=>e[a.label]===t);return r?r[a.value]:null!==n&&void 0!==n?n:""})},l=(t,e,n)=>{const r={defaultVal:"",formatFun:(t,e)=>t.map(t=>t[e.value]).join(","),spacer:","};Object.assign(r,n);let s=[];Array.isArray(t)?s=t:"string"===typeof t&&(s=t.split(r.spacer));const{format:o}=i["a"].state.dictConfig,l=i["a"].state.dictCodes;let c=[];if(l&&l[e]){c=l[e];const t=Object(a["c"])(s,c,o,r.defaultVal);return t&&t.length>0?r.formatFun(t,o):r.defaultVal}i["a"].actions.getDictDataObj(e).then(t=>{if(c=t[e],!c)return void new Error(`不存在类型为:${e} 的字典字段,请确认后再填写`);const n=Object(a["c"])(s,c,o,r.defaultVal);return n&&n.length>0?r.formatFun(n,o):r.defaultVal})}},"8ea1":function(t,e){var n="object"==typeof document&&document.all,i="undefined"==typeof n&&void 0!==n;t.exports={all:n,IS_HTMLDDA:i}},"90e3":function(t,e,n){var i=n("e330"),a=0,r=Math.random(),s=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++a+r,36)}},9112:function(t,e,n){var i=n("83ab"),a=n("9bf2"),r=n("5c6c");t.exports=i?function(t,e,n){return a.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},"920c":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"van-select-dict"},[e("van-field",t._g(t._b({attrs:{readonly:"",clickable:"",value:t.showValue,"is-link":""},on:{click:t.handleClick}},"van-field",t.$attrs,!1),t.$listeners)),e("van-popup",{attrs:{round:"",position:"bottom"},model:{value:t.showPicker,callback:function(e){t.showPicker=e},expression:"showPicker"}},[e("van-picker",t._g(t._b({ref:"selectPicker",attrs:{"show-toolbar":"","value-key":t.dictConfig.format.label,columns:t.list},on:{cancel:function(e){t.showPicker=!1},confirm:t.onConfirm}},"van-picker",t.$attrs,!1),t.$listeners))],1)],1)},a=[],r=(n("3c65"),n("0ee5")),s={name:"van-select-dict",data(){return{defaultIndex:"0",showPicker:!1,list:[],svalue:this.value,type:""}},props:{data:{type:Array,default:()=>[]},format:{type:Object,default:()=>({label:"label",value:"value"})},keyValue:{type:Boolean,default:!1},dictType:{type:[String,Object]},value:{},disableObj:{type:Object},filterDataFun:{type:Function},disabledDataFun:{type:Function}},computed:{dictCodes(){return r["a"].state.dictCodes},dictConfig(){return r["a"].state.dictConfig},isGettingAllDictTypes(){return r["a"].state.isGettingAllDictTypes},isGettingDictTypes(){return r["a"].state.isGettingDictTypes},selectItem(){return this.list.find(t=>t[this.dictConfig.format.value]===this.svalue)},showValue(){return this.selectItem?this.selectItem[this.dictConfig.format.label]:""}},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)},showPicker(t){const e=this.list.map(t=>t[this.dictConfig.format.value]).indexOf(this.svalue);this.defaultIndex=-1===e?0:e,this.$nextTick(()=>{this.$refs.selectPicker.setColumnIndex(0,this.defaultIndex)})},data:{handler:function(t){this.list=JSON.parse(JSON.stringify(t)),this.list.length>0&&this.list[0][this.format.value]?this.list=this.list.map(t=>({[this.dictConfig.format.value]:t[this.format.value],[this.dictConfig.format.label]:t[this.format.label]})):this.list=this.list.map(t=>({[this.dictConfig.format.value]:t,[this.dictConfig.format.label]:t})),!0!==this.$attrs.required&&""!==this.$attrs.required&&this.list.unshift({[this.dictConfig.format.value]:"null",[this.dictConfig.format.label]:"请选择"})},immediate:!0}},mounted(){this.data&&0===this.data.length&&this.getDictionary_option()},methods:{getRef(){return this.$refs.selectPicker},handleClick(){!0!==this.$attrs.disabled&&""!==this.$attrs.disabled&&(this.showPicker=!0)},onConfirm(t){if(this.svalue="null"===t[this.dictConfig.format.value]?"":t[this.dictConfig.format.value],this.showPicker=!1,this.keyValue){const e="null"===t[this.dictConfig.format.value]?{[this.dictConfig.format.value]:"",[this.dictConfig.format.label]:""}:t;this.$emit("dictChange",e)}else this.$emit("dictChange",this.svalue)},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 r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);const{filters:e,filterType:n=this.dictConfig.format.value,reverse:i=!1}=this.dictType,a="string"===typeof e?e.split(","):e;t=i?t.filter(t=>!a.includes(t[n])):t.filter(t=>a.includes(t[n]))}else this.type=this.dictType,await r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);if(this.filterDataFun&&(t=this.filterDataFun(t)),this.disabledDataFun&&(t=this.disabledDataFun(t)),this.disableObj){const{disableValue:e,disableType:n=this.dictConfig.format.value,reverse:i=!1}=this.disableObj,a="string"===typeof e?e.split(","):e;t=i?t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=!a.includes(e[n])||e.disabled,e}):t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=a.includes(e[n])||e.disabled,e})}this.list=t,!0!==this.$attrs.required&&""!==this.$attrs.required&&this.list.unshift({[this.dictConfig.format.value]:"null",[this.dictConfig.format.label]:"请选择"})}}},o=s,l=n("2877"),c=Object(l["a"])(o,i,a,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"94ca":function(t,e,n){var i=n("d039"),a=n("1626"),r=/#|\.prototype\./,s=function(t,e){var n=l[o(t)];return n==u||n!=c&&(a(e)?i(e):!!e)},o=s.normalize=function(t){return String(t).replace(r,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s},"97d8":function(t,e,n){"use strict";n("f5c5")},"99bc":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"van-datetime-dict"},[e("van-field",t._g(t._b({attrs:{type:"text",readonly:"",clickable:"",value:t.showValue,"is-link":""},on:{click:t.handleClick},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,n){return{key:n,fn:function(e){return[t._t(n,null,null,e)]}}}))],null,!0)},"van-field",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(n,i){return e("template",{slot:i},[t._t(i)],2)}))],2),e("van-popup",{attrs:{round:"",position:"bottom"},model:{value:t.showPicker,callback:function(e){t.showPicker=e},expression:"showPicker"}},[e("van-datetime-picker",t._b({ref:"datetimePicker",on:{change:t.handleChange,cancel:t.handleCancel,confirm:t.onConfirm},scopedSlots:t._u([{key:"confirm",fn:function(){return[e("div",{staticClass:"slot-btn"},[t.showForver?e("span",{staticClass:"select",on:{click:function(e){return e.stopPropagation(),t.forever.apply(null,arguments)}}},[t._v(t._s(t.showValueLabel))]):t._e(),e("span",[t._v(t._s(t.$attrs.confirmButtonText||"确认"))])])]},proxy:!0}]),model:{value:t.currentDate,callback:function(e){t.currentDate=e},expression:"currentDate"}},"van-datetime-picker",t.$attrs,!1))],1)],1)},a=[],r=n("aa1b"),s={name:"van-datetime-dict",data(){return{showValue:"",showPicker:!1,svalue:this.value,currentDate:null,indexs:null}},props:{showValueLabel:{type:String,default:"永久"},forverValue:{default:"forver"},showForver:{type:Boolean,default:!1},dateFormat:{type:String},defaultVal:{type:String,default:""},value:{}},computed:{},watch:{value(t){this.svalue=t},svalue(t,e){t!==e&&this.$emit("input",t)},showPicker(t){this.indexs?this.$nextTick(()=>{this.$refs.datetimePicker.getPicker().setIndexes(this.indexs)}):t&&this.$nextTick(()=>{setTimeout(()=>{this.indexs=this.$refs.datetimePicker.getPicker().getIndexes()},100)})}},created(){if(this.showForver&&this.value===this.forverValue)this.showValue=this.showValueLabel;else if(this.value&&this.formatValue(this.value),"time"===this.$attrs.type)this.currentDate=this.value;else if("month-day"===this.$attrs.type){const t=((new Date).getFullYear()+"-"+this.value).replace(/-|\./g,"/");this.currentDate=new Date(t)}else if("datehour"===this.$attrs.type){const t=(this.value+":00:00").replace(/-|\./g,"/");this.currentDate=new Date(t)}else{const t=this.value.replace(/-|\./g,"/");this.currentDate=new Date(t)}},methods:{getRef(){return this.$refs.datetimePicker},handleChange(t){this.$emit("change",t)},handleCancel(){this.showPicker=!1,this.$emit("cancel")},handleClick(){!0!==this.$attrs.disabled&&""!==this.$attrs.disabled&&(this.showPicker=!0)},formatValue(t){const e={date:"date","year-month":"month","month-day":"MM-DD",datehour:"YYYY-MM-DD HH"};if("time"===this.$attrs.type)this.svalue=t;else{const n=this.dateFormat||e[this.$attrs.type]||"datetime";this.svalue=Object(r["a"])(t,n,this.defaultVal)}this.showValue=this.svalue},onConfirm(t){this.formatValue(t),this.indexs=this.$refs.datetimePicker.getPicker().getIndexes(),this.showPicker=!1,this.$emit("dictChange",t),this.$emit("confirm",t)},forever(){this.svalue=this.forverValue,this.showValue=this.showValueLabel,this.showPicker=!1,this.$emit("forver",this.forverValue)}}},o=s,l=(n("97d8"),n("2877")),c=Object(l["a"])(o,i,a,!1,null,"38f68745",null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"9bf2":function(t,e,n){var i=n("83ab"),a=n("0cfb"),r=n("aed9"),s=n("825a"),o=n("a04b"),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",h="writable";e.f=i?r?function(t,e,n){if(s(t),e=o(e),s(n),"function"===typeof t&&"prototype"===e&&"value"in n&&h in n&&!n[h]){var i=u(t,e);i&&i[h]&&(t[e]=n.value,n={configurable:f in n?n[f]:i[f],enumerable:d in n?n[d]:i[d],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=o(e),s(n),a)try{return c(t,e,n)}catch(i){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},a04b:function(t,e,n){var i=n("c04e"),a=n("d9b5");t.exports=function(t){var e=i(t,"string");return a(e)?e:e+""}},a466:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("van-tree-select",t._g(t._b({ref:"VantTreeSelectDict",attrs:{"main-active-index":t.currentMainActiveIndex,activeId:t.currentActiveId,items:t.items},on:{"update:mainActiveIndex":function(e){t.currentMainActiveIndex=e},"update:main-active-index":function(e){t.currentMainActiveIndex=e},"update:activeId":function(e){t.currentActiveId=e},"update:active-id":function(e){t.currentActiveId=e}},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,n){return{key:n,fn:function(e){return[t._t(n,null,null,e)]}}}))],null,!0)},"van-tree-select",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(n,i){return e("template",{slot:i},[t._t(i)],2)}))],2)},a=[],r=n("0ee5"),s=n("4943"),o={name:"van-tree-select-dict",data(){return{list:[],type:"",currentMainActiveIndex:this.mainActiveIndex,currentActiveId:this.activeId}},props:{mainActiveIndex:{},activeId:{},maxLevel:{type:[Number,String],default:"2"},treeData:{type:Array,default:()=>[]},dictType:{type:[String,Object]},disableObj:{type:Object},filterDataFun:{type:Function},disabledDataFun:{type:Function}},computed:{dictCodes(){return r["a"].state.dictCodes},dictConfig(){return r["a"].state.dictConfig},isGettingAllDictTypes(){return r["a"].state.isGettingAllDictTypes},isGettingDictTypes(){return r["a"].state.isGettingDictTypes},endTreeSetting(){var t,e,n,i;const a=null!==(t=this.$attrs.fieldNames)&&void 0!==t?t:{},r={idField:null!==(e=a.value)&&void 0!==e?e:this.dictConfig.treeSetting.idField,labelField:null!==(n=a.text)&&void 0!==n?n:this.dictConfig.treeSetting.labelField,childrenField:null!==(i=a.children)&&void 0!==i?i:this.dictConfig.treeSetting.childrenField},s=Object.assign(this.dictConfig.treeSetting,r);return s},items(){if(this.treeData.length>0)return this.treeData;const t=this.dictConfig.treeSetting,e=this.list.map(e=>({id:e[t.idField],text:e[t.labelField],...e})),n={...t};n.idField="id",n.labelField="text";const i=Object(s["d"])(e,n),a=JSON.parse(JSON.stringify(i));return this.maxLevel&&this.filterLevel(a,+this.maxLevel),a||[]}},watch:{isGettingDictTypes(t){t.includes(this.type)||0!==this.treeData.length||this.getDictionary_option()},isGettingAllDictTypes(t){t||0!==this.treeData.length||this.getDictionary_option()},currentActiveId(t){this.$emit("update: activeId",t)},currentMainActiveIndex(t){this.$emit("update: mainActiveIndex",t)}},mounted(){0===this.treeData.length&&this.getDictionary_option()},methods:{getRef(){return this.$refs.VantTreeSelectDict},filterLevel(t,e){for(let n=0;n<t.length;n++){const i=t[n],a=i[this.endTreeSetting.levelField];a!==e?i[this.endTreeSetting.childrenField]&&this.filterLevel(i[this.endTreeSetting.childrenField],e):delete i[this.endTreeSetting.childrenField]}},async getDictionary_option(){if(!this.dictType)return;let t=[];if("object"===typeof this.dictType){this.type=this.dictType.type,await r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);const{filters:e,filterType:n=this.endTreeSetting.idField,reverse:i=!1}=this.dictType,a="string"===typeof e?e.split(","):e;t=i?t.filter(t=>!a.includes(t[n])):t.filter(t=>a.includes(t[n]))}else this.type=this.dictType,await r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);if(this.filterDataFun&&(t=this.filterDataFun(t)),this.disabledDataFun&&(t=this.disabledDataFun(t)),this.disableObj){const{disableValue:e,disableType:n=this.endTreeSetting.idField,reverse:i=!1}=this.disableObj,a="string"===typeof e?e.split(","):e;t=i?t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=!a.includes(e[n])||e.disabled,e}):t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=a.includes(e[n])||e.disabled,e})}this.list=t}}},l=o,c=n("2877"),u=Object(c["a"])(l,i,a,!1,null,"25064986",null),d=u.exports;d.install=function(t){t.component(d.name,d)};e["default"]=d},a537:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,".van-datetime-dict[data-v-38f68745] .slot-btn .select{margin-right:14px}",""]),t.exports=e},a640:function(t,e,n){"use strict";var i=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){return 1},1)}))}},aa1b:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return r}));const i={date:"yyyy-MM-dd",month:"yyyy-MM",datetime:"yyyy-MM-dd hh:mm:ss",time:"hh:mm:ss",year:"yyyy"},a=t=>{t=t.replace("-","/");var e=new Date(t);return!isNaN(e.getTime())},r=(t,e="datetime",n)=>{if(!t||!e)return null!==n&&void 0!==n?n:"";if(Object.keys(i).includes(e)){const t=e;e=i[t]}t instanceof Date||(t="number"===typeof t||a(t)?new Date(t):new Date(Number(t)));const r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,String(t.getFullYear()).substr(4-RegExp.$1.length)));for(const i in r){const t=new RegExp(`(${i})`);t.test(e)&&(e=e.replace(t,1===RegExp.$1.length?r[i]:("00"+r[i]).substr(String(r[i]).length)))}return e}},ab36:function(t,e,n){var i=n("861d"),a=n("9112");t.exports=function(t,e){i(e)&&"cause"in e&&a(t,"cause",e.cause)}},aeb0:function(t,e,n){var i=n("9bf2").f;t.exports=function(t,e,n){n in t||i(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},aed9:function(t,e,n){var i=n("83ab"),a=n("d039");t.exports=i&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},b0ca:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("van-radio-group",t._g(t._b({on:{change:t.handdleChange},model:{value:t.svalue,callback:function(e){t.svalue=e},expression:"svalue"}},"van-radio-group",t.$attrs,!1),t.$listeners),t._l(t.list,(function(n){return e("van-radio",t._g(t._b({key:n[t.dictConfig.format.value],attrs:{disabled:n.disabled,name:n[t.dictConfig.format.value],label:n[t.dictConfig.format.value]}},"van-radio",t.$attrs,!1),t.$listeners),[t._v(t._s(n[t.dictConfig.format.label]))])})),1)},a=[],r=n("0ee5"),s={name:"van-radio-dict",data(){return{list:[],svalue:this.value,type:""}},props:{keyValue:{type:Boolean,default:!1},dictType:{type:[String,Object]},value:{},disableObj:{type:Object},filterDataFun:{type:Function},disabledDataFun:{type:Function}},computed:{dictCodes(){return r["a"].state.dictCodes},dictConfig(){return r["a"].state.dictConfig},isGettingAllDictTypes(){return r["a"].state.isGettingAllDictTypes},isGettingDictTypes(){return r["a"].state.isGettingDictTypes}},watch:{isGettingDictTypes(t){t.includes(this.type)||this.getDictionary_option()},isGettingAllDictTypes(t){t||this.getDictionary_option()},value(t){this.svalue=t},svalue(t,e){t!==e&&this.$emit("input",t)}},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 r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);const{filters:e,filterType:n=this.dictConfig.format.value,reverse:i=!1}=this.dictType,a="string"===typeof e?e.split(","):e;t=i?t.filter(t=>!a.includes(t[n])):t.filter(t=>a.includes(t[n]))}else this.type=this.dictType,await r["a"].actions.getDictDataObj(this.type),t=[].concat(this.dictCodes[this.type]);if(this.filterDataFun&&(t=this.filterDataFun(t)),this.disabledDataFun&&(t=this.disabledDataFun(t)),this.disableObj){const{disableValue:e,disableType:n=this.dictConfig.format.value,reverse:i=!1}=this.disableObj,a="string"===typeof e?e.split(","):e;t=i?t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=!a.includes(e[n])||e.disabled,e}):t.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.disabled=a.includes(e[n])||e.disabled,e})}this.list=t},handdleChange(){this.keyValue?this.$emit("dictChange",this.list.find(t=>t[this.dictConfig.format.value]===this.svalue)):this.$emit("dictChange",this.svalue)}}},o=s,l=n("2877"),c=Object(l["a"])(o,i,a,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},b42e:function(t,e){var n=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?i:n)(e)}},b622:function(t,e,n){var i=n("da84"),a=n("5692"),r=n("1a2d"),s=n("90e3"),o=n("04f8"),l=n("fdbf"),c=i.Symbol,u=a("wks"),d=l?c["for"]||c:c&&c.withoutSetter||s;t.exports=function(t){return r(u,t)||(u[t]=o&&r(c,t)?c[t]:d("Symbol."+t)),u[t]}},b980:function(t,e,n){var i=n("d039"),a=n("5c6c");t.exports=!i((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",a(1,7)),7!==t.stack)}))},c04e:function(t,e,n){var i=n("c65b"),a=n("861d"),r=n("d9b5"),s=n("dc4a"),o=n("485a"),l=n("b622"),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!a(t)||r(t))return t;var n,l=s(t,u);if(l){if(void 0===e&&(e="default"),n=i(l,t,e),!a(n)||r(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),o(t,e)}},c142:function(t,e,n){var i=n("e6de");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("499e").default;a("2485fd8b",i,!0,{sourceMap:!1,shadowMode:!1})},c430:function(t,e){t.exports=!1},c65b:function(t,e,n){var i=n("40d5"),a=Function.prototype.call;t.exports=i?a.bind(a):function(){return a.apply(a,arguments)}},c6b6:function(t,e,n){var i=n("e330"),a=i({}.toString),r=i("".slice);t.exports=function(t){return r(a(t),8,-1)}},c6cd:function(t,e,n){var i=n("da84"),a=n("6374"),r="__core-js_shared__",s=i[r]||a(r,{});t.exports=s},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===typeof window&&(n=window)}t.exports=n},ca84:function(t,e,n){var i=n("e330"),a=n("1a2d"),r=n("fc6a"),s=n("4d64").indexOf,o=n("d012"),l=i([].push);t.exports=function(t,e){var n,i=r(t),c=0,u=[];for(n in i)!a(o,n)&&a(i,n)&&l(u,n);while(e.length>c)a(i,n=e[c++])&&(~s(u,n)||l(u,n));return u}},cb2d:function(t,e,n){var i=n("1626"),a=n("9bf2"),r=n("13d2"),s=n("6374");t.exports=function(t,e,n,o){o||(o={});var l=o.enumerable,c=void 0!==o.name?o.name:e;if(i(n)&&r(n,c,o),o.global)l?t[e]=n:s(e,n);else{try{o.unsafe?t[e]&&(l=!0):delete t[e]}catch(u){}l?t[e]=n:a.f(t,e,{value:n,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return t}},cc12:function(t,e,n){var i=n("da84"),a=n("861d"),r=i.document,s=a(r)&&a(r.createElement);t.exports=function(t){return s?r.createElement(t):{}}},cdce:function(t,e,n){var i=n("da84"),a=n("1626"),r=i.WeakMap;t.exports=a(r)&&/native code/.test(String(r))},cf09:function(t,e,n){var i={"./index.js":"d16c","./van-button-dict/index.js":"4ddc","./van-calendar-dict/index.js":"de28","./van-cascader-dict/index.js":"4d9d","./van-checkbox-dict/index.js":"28bb","./van-datetime-dict/index.js":"99bc","./van-dropdown-item-dict/index.js":"4ec3","./van-field-dict/index.js":"0834","./van-radio-dict/index.js":"b0ca","./van-select-dict/index.js":"920c","./van-tabs-dict/index.js":"5e88","./van-tag-dict/index.js":"eca3","./van-tree-select-dict/index.js":"a466"};function a(t){var e=r(t);return n(e)}function r(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}a.keys=function(){return Object.keys(i)},a.resolve=r,t.exports=a,a.id="cf09"},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,n){var i=n("da84"),a=n("1626"),r=function(t){return a(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?r(i[t]):i[t]&&i[t][e]}},d16c:function(t,e,n){"use strict";n.r(e);n("14d9");const i=[],a=n("cf09");a.keys().forEach(t=>{if(t.startsWith("./index"))return;const e=a(t);i.push(e.default||e)}),e["default"]=i},d1e7:function(t,e,n){"use strict";var i={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,r=a&&!i.call({1:2},1);e.f=r?function(t){var e=a(this,t);return!!e&&e.enumerable}:i},d2bb:function(t,e,n){var i=n("7282"),a=n("825a"),r=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=i(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(s){}return function(n,i){return a(n),r(i),e?t(n,i):n.__proto__=i,n}}():void 0)},d501:function(t,e,n){"use strict";n("1bad")},d58f:function(t,e,n){var i=n("59ed"),a=n("7b0b"),r=n("44ad"),s=n("07fa"),o=TypeError,l=function(t){return function(e,n,l,c){i(n);var u=a(e),d=r(u),f=s(u),h=t?f-1:0,p=t?-1:1;if(l<2)while(1){if(h in d){c=d[h],h+=p;break}if(h+=p,t?h<0:f<=h)throw o("Reduce of empty array with no initial value")}for(;t?h>=0:f>h;h+=p)h in d&&(c=n(c,d[h],h,u));return c}};t.exports={left:l(!1),right:l(!0)}},d9b5:function(t,e,n){var i=n("d066"),a=n("1626"),r=n("3a9b"),s=n("fdbf"),o=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return a(e)&&r(e.prototype,o(t))}},d9e2:function(t,e,n){var i=n("23e7"),a=n("da84"),r=n("2ba4"),s=n("e5cb"),o="WebAssembly",l=a[o],c=7!==Error("e",{cause:7}).cause,u=function(t,e){var n={};n[t]=s(t,e,c),i({global:!0,constructor:!0,arity:1,forced:c},n)},d=function(t,e){if(l&&l[t]){var n={};n[t]=s(o+"."+t,e,c),i({target:o,stat:!0,constructor:!0,arity:1,forced:c},n)}};u("Error",(function(t){return function(e){return r(t,this,arguments)}})),u("EvalError",(function(t){return function(e){return r(t,this,arguments)}})),u("RangeError",(function(t){return function(e){return r(t,this,arguments)}})),u("ReferenceError",(function(t){return function(e){return r(t,this,arguments)}})),u("SyntaxError",(function(t){return function(e){return r(t,this,arguments)}})),u("TypeError",(function(t){return function(e){return r(t,this,arguments)}})),u("URIError",(function(t){return function(e){return r(t,this,arguments)}})),d("CompileError",(function(t){return function(e){return r(t,this,arguments)}})),d("LinkError",(function(t){return function(e){return r(t,this,arguments)}})),d("RuntimeError",(function(t){return function(e){return r(t,this,arguments)}}))},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},dc4a:function(t,e,n){var i=n("59ed"),a=n("7234");t.exports=function(t,e){var n=t[e];return a(n)?void 0:i(n)}},de28:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"van-calendar-dict"},[e("van-field",t._g(t._b({attrs:{type:"text",readonly:"",clickable:"",value:t.showValue,"is-link":""},on:{click:t.handleClick},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,n){return{key:n,fn:function(e){return[t._t(n,null,null,e)]}}}))],null,!0)},"van-field",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(n,i){return e("template",{slot:i},[t._t(i)],2)}))],2),e("van-calendar",t._b({ref:"VantCalendarDict",on:{select:t.select,open:t.open,close:t.close,opened:t.opened,closed:t.closed,unselect:t.unselect,"month-show":t.monthShow,"over-range":t.overRange,"click-subtitle":t.clickSubtitle,confirm:t.onConfirm},model:{value:t.showPicker,callback:function(e){t.showPicker=e},expression:"showPicker"}},"van-calendar",t.$attrs,!1))],1)},a=[],r=(n("14d9"),n("aa1b")),s={name:"van-calendar-dict",data(){return{showValue:"",showPicker:!1,svalue:this.value}},props:{formateShowValue:{type:Function,default:t=>t&&t.length>0?`选择了 ${t.length} 个日期`:""},dateSpacer:{type:String,default:" 至 "},spacer:{type:String,default:"-"},defaultVal:{type:String,default:""},value:{}},watch:{value(t){this.svalue=t},svalue(t,e){t!==e&&this.$emit("input",t)},showPicker(t){t&&this.$nextTick(()=>{if("multiple"===this.$attrs.type)if(this.value&&this.value.length>0){const t=[];for(let e=0;e<this.value.length;e++)t.push(new Date(this.value[e].replace(/-|\./g,"/")));this.$refs.VantCalendarDict.currentDate=t}else this.$refs.VantCalendarDict.currentDate=[];else"range"===this.$attrs.type?this.value&&2===this.value.length?this.$refs.VantCalendarDict.currentDate=[new Date(this.value[0].replace(/-|\./g,"/")),new Date(this.value[1].replace(/-|\./g,"/"))]:this.$refs.VantCalendarDict.currentDate=new Date:this.$refs.VantCalendarDict.currentDate=new Date(this.value.replace(/-|\./g,"/"))})}},created(){"multiple"===this.$attrs.type?(this.showValue=this.formateShowValue(this.value),this.$nextTick(()=>{if(this.value&&this.value.length>0){const t=[];for(let e=0;e<this.value.length;e++)t.push(new Date(this.value[e].replace(/-|\./g,"/")));this.$refs.VantCalendarDict.currentDate=t}else this.$refs.VantCalendarDict.currentDate=[]})):"range"===this.$attrs.type?(this.showValue=this.value&&2===this.value.length?this.value[0].replace(/-|\./g,this.spacer)+this.dateSpacer+this.value[1].replace(/-|\./g,this.spacer):"",this.$nextTick(()=>{2===this.value.length&&(this.$refs.VantCalendarDict.currentDate=[new Date(this.value[0].replace(/-|\./g,"/")),new Date(this.value[1].replace(/-|\./g,"/"))])})):(console.log("🚀 ~ file: index.vue:134 ~ created ~ this.defaultVal:",this.defaultVal),this.showValue=Object(r["a"])(this.value,`yyyy${this.spacer}MM${this.spacer}dd`,this.defaultVal),this.$nextTick(()=>{this.showValue!==this.defaultVal&&(this.$refs.VantCalendarDict.currentDate=new Date(this.value.replace(/-|\./g,"/")))}))},methods:{clickSubtitle(t){this.$emit("click-subtitle",t)},overRange(t){this.$emit("over-range",t)},monthShow(t){this.$emit("month-show",t)},unselect(t){this.$emit("unselect",t)},closed(){this.$emit("closed")},opened(){this.$emit("opened")},close(){this.$emit("close")},open(){this.$emit("open")},select(t){this.$emit("select",t)},handleChange(t){this.$emit("change",t)},handleCancel(){this.$emit("cancel")},handleClick(){!0!==this.$attrs.disabled&&""!==this.$attrs.disabled&&(this.showPicker=!0)},onConfirm(t){if("multiple"===this.$attrs.type){if(t&&t.length>0){const e=[];for(let n=0;n<t.length;n++)e.push(Object(r["a"])(t[n],`yyyy${this.spacer}MM${this.spacer}dd`,this.defaultVal));this.svalue=e}else this.svalue=[];this.showValue=this.formateShowValue(this.svalue)}else"range"===this.$attrs.type?t&&2===t.length?(this.svalue=[Object(r["a"])(t[0],`yyyy${this.spacer}MM${this.spacer}dd`,this.defaultVal),Object(r["a"])(t[1],`yyyy${this.spacer}MM${this.spacer}dd`,this.defaultVal)],this.showValue=this.svalue[0].replace(/-|\./g,this.spacer)+this.dateSpacer+this.svalue[1].replace(/-|\./g,this.spacer)):this.showValue="":(this.svalue=Object(r["a"])(t,`yyyy${this.spacer}MM${this.spacer}dd`,this.defaultVal),this.showValue=this.svalue);this.showPicker=!1,this.$emit("confirm",t)},getRef(){return this.$refs.VantCalendarDict}}},o=s,l=n("2877"),c=Object(l["a"])(o,i,a,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},df7c:function(t,e,n){(function(t){function n(t,e){for(var n=0,i=t.length-1;i>=0;i--){var a=t[i];"."===a?t.splice(i,1):".."===a?(t.splice(i,1),n++):n&&(t.splice(i,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function i(t){"string"!==typeof t&&(t+="");var e,n=0,i=-1,a=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!a){n=e+1;break}}else-1===i&&(a=!1,i=e+1);return-1===i?"":t.slice(n,i)}function a(t,e){if(t.filter)return t.filter(e);for(var n=[],i=0;i<t.length;i++)e(t[i],i,t)&&n.push(t[i]);return n}e.resolve=function(){for(var e="",i=!1,r=arguments.length-1;r>=-1&&!i;r--){var s=r>=0?arguments[r]:t.cwd();if("string"!==typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(e=s+"/"+e,i="/"===s.charAt(0))}return e=n(a(e.split("/"),(function(t){return!!t})),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),s="/"===r(t,-1);return t=n(a(t.split("/"),(function(t){return!!t})),!i).join("/"),t||i||(t="."),t&&s&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(a(t,(function(t,e){if("string"!==typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function i(t){for(var e=0;e<t.length;e++)if(""!==t[e])break;for(var n=t.length-1;n>=0;n--)if(""!==t[n])break;return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var a=i(t.split("/")),r=i(n.split("/")),s=Math.min(a.length,r.length),o=s,l=0;l<s;l++)if(a[l]!==r[l]){o=l;break}var c=[];for(l=o;l<a.length;l++)c.push("..");return c=c.concat(r.slice(o)),c.join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!==typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,a=!0,r=t.length-1;r>=1;--r)if(e=t.charCodeAt(r),47===e){if(!a){i=r;break}}else a=!1;return-1===i?n?"/":".":n&&1===i?"/":t.slice(0,i)},e.basename=function(t,e){var n=i(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!==typeof t&&(t+="");for(var e=-1,n=0,i=-1,a=!0,r=0,s=t.length-1;s>=0;--s){var o=t.charCodeAt(s);if(47!==o)-1===i&&(a=!1,i=s+1),46===o?-1===e?e=s:1!==r&&(r=1):-1!==e&&(r=-1);else if(!a){n=s+1;break}}return-1===e||-1===i||0===r||1===r&&e===i-1&&e===n+1?"":t.slice(e,i)};var r="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("4362"))},e330:function(t,e,n){var i=n("40d5"),a=Function.prototype,r=a.call,s=i&&a.bind.bind(r,r);t.exports=i?s:function(t){return function(){return r.apply(t,arguments)}}},e391:function(t,e,n){var i=n("577e");t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},e5cb:function(t,e,n){"use strict";var i=n("d066"),a=n("1a2d"),r=n("9112"),s=n("3a9b"),o=n("d2bb"),l=n("e893"),c=n("aeb0"),u=n("7156"),d=n("e391"),f=n("ab36"),h=n("6f19"),p=n("83ab"),g=n("c430");t.exports=function(t,e,n,v){var y="stackTraceLimit",b=v?2:1,m=t.split("."),D=m[m.length-1],T=i.apply(null,m);if(T){var _=T.prototype;if(!g&&a(_,"cause")&&delete _.cause,!n)return T;var C=i("Error"),S=e((function(t,e){var n=d(v?e:t,void 0),i=v?new T(t):new T;return void 0!==n&&r(i,"message",n),h(i,S,i.stack,2),this&&s(_,this)&&u(i,this,S),arguments.length>b&&f(i,arguments[b]),i}));if(S.prototype=_,"Error"!==D?o?o(S,C):l(S,C,{name:!0}):p&&y in T&&(c(S,T,y),c(S,T,"prepareStackTrace")),l(S,T),!g)try{_.name!==D&&r(_,"name",D),_.constructor=S}catch(O){}return S}}},e6de:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'.el-cascader__tags .el-tag>span{flex:auto!important}.el-cascader-menu__wrap{height:300px!important}.el-cascader-node__label{flex:none!important;width:100%!important;box-sizing:border-box!important}.el-cascader-node .is-disabled+.el-cascader-node__label{cursor:not-allowed!important}.el-cascader-node__postfix,.el-cascader-node__prefix{top:50%!important;transform:translateY(-50%)!important;line-height:4px!important}.vue-element-dict-tabs .el-tabs__header .el-tabs__nav-wrap,.vue-element-dict-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav-scroll{overflow:unset!important}.vue-element-dict-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav-scroll:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}',""]),t.exports=e},e74d:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));const i=(t,e,n)=>{const i={};for(const a in t)i[a]=n(e(t[a]));return i}},e893:function(t,e,n){var i=n("1a2d"),a=n("56ef"),r=n("06cf"),s=n("9bf2");t.exports=function(t,e,n){for(var o=a(e),l=s.f,c=r.f,u=0;u<o.length;u++){var d=o[u];i(t,d)||n&&i(n,d)||l(t,d,c(e,d))}}},e8b5:function(t,e,n){var i=n("c6b6");t.exports=Array.isArray||function(t){return"Array"==i(t)}},e8b7:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return r})),n.d(e,"f",(function(){return s})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return c}));const i=(t,e)=>{const n={start:1,end:0,symbol:"*"};let i=Object.assign(n,e);if(i||(i={start:1,end:0,symbol:"*"}),i.start<0||i.end<0)return"";const a=t.length;let r="";for(let l=0;l<i.start&&l<a;l++)r+=t.charAt(l);let s="";for(let l=a-1;l>=0&&l>=a-i.end;l--)s=t.charAt(l)+s;const o=i.symbol.repeat(Math.max(i.middle||a-i.start-i.end,0));return r+o+s},a=(t,e="*")=>{if(!t)return"";const n=t.length;if(1===n)return t;const a=t.charAt(0),r=t.charAt(n-1);return i(t.substring(1,n-1),{start:1,symbol:e})?`${a}*${r}`:`${a}${r}`},r=(t,e="*")=>t?i(t,{start:4,end:4,symbol:e}):"",s=(t,e="*")=>t?i(String(t),{start:3,end:4,symbol:e}):"",o=(t,e="*")=>{if(!t)return"";const n=t.trim().split(/\s+/),a=n.length;let r="";for(let s=0;s<a;s++)/^[\u4e00-\u9fa5]+$/.test(n[s])?r+=i(n[s],{start:1,symbol:e}):r+=i(n[s],{start:2,symbol:e}),s<a-1&&(r+=" ");return r},l={mobile:s,name:a,address:o,idCard:r},c=(t,e)=>{if("none"===e.maskType)return t;const n={start:1,end:0,symbol:"*",defaultVal:"",maskType:""};if(Object.assign(n,e),!t)return n.defaultVal;if(n.maskType)return l[n.maskType](t,n.symbol);const a={start:n.start,end:n.end,middle:n.middle,symbol:n.symbol};return i(t,a)}},eca3:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("van-tag",t._g(t._b({ref:"VanTagDict",attrs:{type:t.judgeType},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,n){return{key:n,fn:function(e){return[t._t(n,null,null,e)]}}}))],null,!0)},"van-tag",t.$attrs,!1),t.$listeners),[t._l(t.$slots,(function(n,i){return e("template",{slot:i},[t._t(i)],2)})),t._v(" "+t._s(t.GetLabelByCodeFilter(t.value,t.dictType))+" ")],2)},a=[],r=n("8d7f"),s={name:"van-tag-dict",props:{value:{required:!0},dictType:{type:[String],required:!0},judgeTypeFun:{type:Function,default:()=>{}},type:{type:String,default:"primary"}},data(){return{GetLabelByCodeFilter:r["c"]}},computed:{judgeType(){return this.judgeTypeFun&&this.judgeTypeFun(this.value)||this.type}},getRef(){return this.$refs.VanTagDict}},o=s,l=n("2877"),c=Object(l["a"])(o,i,a,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},f5c5:function(t,e,n){var i=n("a537");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("499e").default;a("47dc3e1a",i,!0,{sourceMap:!1,shadowMode:!1})},f5df:function(t,e,n){var i=n("00ee"),a=n("1626"),r=n("c6b6"),s=n("b622"),o=s("toStringTag"),l=Object,c="Arguments"==r(function(){return arguments}()),u=function(t,e){try{return t[e]}catch(n){}};t.exports=i?r:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=u(e=l(t),o))?n:c?r(e):"Object"==(i=r(e))&&a(e.callee)?"Arguments":i}},f772:function(t,e,n){var i=n("5692"),a=n("90e3"),r=i("keys");t.exports=function(t){return r[t]||(r[t]=a(t))}},fb15:function(t,e,n){"use strict";if(n.r(e),n.d(e,"getDictConfig",(function(){return S})),n.d(e,"getDictConfigByKey",(function(){return O})),n.d(e,"getLabelByCode",(function(){return F})),n.d(e,"getLabelByCodes",(function(){return j})),n.d(e,"getCodeByLabel",(function(){return x})),n.d(e,"getCodeByLabels",(function(){return w})),n.d(e,"getDictObjByDictTypes",(function(){return $})),n.d(e,"getLabelByCodeFilter",(function(){return k})),n.d(e,"getLabelByCodesFilter",(function(){return I})),n.d(e,"getCodeByLabelFilter",(function(){return V})),n.d(e,"getCodeByLabelsFilter",(function(){return E})),n.d(e,"mask",(function(){return A})),n.d(e,"maskAddress",(function(){return G})),n.d(e,"maskIdCard",(function(){return N})),n.d(e,"maskName",(function(){return P})),n.d(e,"maskPhone",(function(){return L})),n.d(e,"desensitization",(function(){return M})),n.d(e,"formatDate",(function(){return B})),n.d(e,"isDate",(function(){return R})),n.d(e,"listToTree",(function(){return J})),n.d(e,"getTreeItemByCode",(function(){return Y})),n.d(e,"getTreeItemByLabel",(function(){return q})),n.d(e,"getTreeLabelByCode",(function(){return U})),n.d(e,"getTreeCodeByLabel",(function(){return z})),n.d(e,"getTreeLabelByCodes",(function(){return K})),n.d(e,"getTreeCodeByLabels",(function(){return H})),n.d(e,"getTreeLabelByCodeFilter",(function(){return W})),n.d(e,"getTreeCodeByLabelFilter",(function(){return X})),n.d(e,"getTreeLabelByCodesFilter",(function(){return Q})),n.d(e,"getTreeCodeByLabelsFilter",(function(){return Z})),"undefined"!==typeof window){var i=window.document.currentScript,a=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}n("14d9");var r=n("0ee5"),s=n("d16c");n("c142");const o=()=>r["a"].state.dictConfig,l=t=>r["a"].state.dictConfig[t];var c=n("5dc9"),u=n("8d7f"),d=n("e8b7"),f=n("aa1b"),h=n("4943");const p=(t,e,n)=>{const i={defaultVal:"",formatFun:(t,e)=>t.map(t=>t[e.labelField]).join(","),treeSetting:{}};return Object.assign(i,n),new Promise((n,a)=>{const{treeSetting:s}=r["a"].state.dictConfig,o=Object.assign(s,i.treeSetting),l=r["a"].state.dictCodes;let c=[];if(l&&l[e]){c=l[e];const a=c.find(e=>e[o.idField]===t);n(a?i.formatFun(Object(h["a"])(a[o.idField],c,o),o):i.defaultVal)}else if(r["a"].state.isGettingDictTypes.includes(e)||r["a"].state.isGettingAllDictTypes){const s=setInterval(()=>{if(!r["a"].state.isGettingDictTypes.includes(e)&&!r["a"].state.isGettingAllDictTypes){if(clearInterval(s),c=r["a"].state.dictCodes[e],!c)return void a(`不存在类型为:${e} 的字典字段,请确认后再填写`);const l=c.find(e=>e[o.idField]===t);n(l?i.formatFun(Object(h["a"])(l[o.idField],c,o),o):i.defaultVal)}},1e3)}else r["a"].actions.getDictDataObj(e).then(r=>{if(c=r[e],!c)return void a(`不存在类型为:${e} 的字典字段,请确认后再填写`);const s=c.find(e=>e[o.idField]===t);n(s?i.formatFun(Object(h["a"])(s[o.idField],c,o),o):i.defaultVal)})})};function g(t,e,n,i,a){const r=[];for(let s=0;s<t.length;s++){const o=e.find(e=>e[a.idField]===t[s]);o?r.push(i(Object(h["a"])(o[a.idField],e,a),a)):r.push(n)}return r}const v=(t,e,n)=>{const i={defaultVal:"",formatFunIn:(t,e)=>t.map(t=>t[e.labelField]).join("/"),treeSetting:{},formatFunOut:t=>t.join(","),spacer:","};return Object.assign(i,n),new Promise((n,a)=>{let s=[];Array.isArray(t)?s=t:"string"===typeof t&&(s=t.split(i.spacer));const{treeSetting:o}=r["a"].state.dictConfig,l=Object.assign(o,i.treeSetting),c=r["a"].state.dictCodes;let u=[];if(c&&c[e]){u=c[e];const t=g(s,u,i.defaultVal,i.formatFunIn,l);n(t&&t.length>0?i.formatFunOut(t):i.defaultVal)}else if(r["a"].state.isGettingDictTypes.includes(e)||r["a"].state.isGettingAllDictTypes){const t=setInterval(()=>{if(!r["a"].state.isGettingDictTypes.includes(e)&&!r["a"].state.isGettingAllDictTypes){if(clearInterval(t),u=r["a"].state.dictCodes[e],!u)return void a(`不存在类型为:${e} 的字典字段,请确认后再填写`);const o=g(s,u,i.defaultVal,i.formatFunIn,l);n(o&&o.length>0?i.formatFunOut(o):i.defaultVal)}},1e3)}else r["a"].actions.getDictDataObj(e).then(t=>{if(u=t[e],!u)return void a(`不存在类型为:${e} 的字典字段,请确认后再填写`);const r=g(s,u,i.defaultVal,i.formatFunIn,l);n(r&&r.length>0?i.formatFunOut(r):i.defaultVal)})})},y=(t,e,n)=>{const i={defaultVal:"",formatFun:(t,e)=>t.map(t=>t[e.idField]).join(","),treeSetting:{}};return Object.assign(i,n),new Promise((n,a)=>{const{treeSetting:s}=r["a"].state.dictConfig,o=Object.assign(s,i.treeSetting),l=r["a"].state.dictCodes;let c=[];if(l&&l[e]){c=l[e];const a=c.find(e=>e[o.labelField]===t);n(a?i.formatFun(Object(h["b"])(a[o.labelField],c,o),o):i.defaultVal)}else if(r["a"].state.isGettingDictTypes.includes(e)||r["a"].state.isGettingAllDictTypes){const s=setInterval(()=>{if(!r["a"].state.isGettingDictTypes.includes(e)&&!r["a"].state.isGettingAllDictTypes){if(clearInterval(s),c=r["a"].state.dictCodes[e],!c)return void a(`不存在类型为:${e} 的字典字段,请确认后再填写`);const l=c.find(e=>e[o.labelField]===t);n(l?i.formatFun(Object(h["b"])(l[o.labelField],c,o),o):i.defaultVal)}},1e3)}else r["a"].actions.getDictDataObj(e).then(r=>{if(c=r[e],!c)return void a(`不存在类型为:${e} 的字典字段,请确认后再填写`);const s=c.find(e=>e[o.labelField]===t);n(s?i.formatFun(Object(h["b"])(s[o.labelField],c,o),o):i.defaultVal)})})};function b(t,e,n,i,a){const r=[];for(let s=0;s<t.length;s++){const o=e.find(e=>e[a.labelField]===t[s]);o?r.push(i(Object(h["b"])(o[a.labelField],e,a),a)):r.push(n)}return r}const m=(t,e,n)=>{const i={defaultVal:"",formatFunIn:(t,e)=>t.map(t=>t[e.idField]).join("/"),treeSetting:{},formatFunOut:t=>t.join(","),spacer:","};return Object.assign(i,n),new Promise((n,a)=>{let s=[];Array.isArray(t)?s=t:"string"===typeof t&&(s=t.split(i.spacer));const{treeSetting:o}=r["a"].state.dictConfig,l=Object.assign(o,i.treeSetting),c=r["a"].state.dictCodes;let u=[];if(c&&c[e]){u=c[e];const t=b(s,u,i.defaultVal,i.formatFunIn,l);n(t&&t.length>0?i.formatFunOut(t):i.defaultVal)}else if(r["a"].state.isGettingDictTypes.includes(e)||r["a"].state.isGettingAllDictTypes){const t=setInterval(()=>{if(!r["a"].state.isGettingDictTypes.includes(e)&&!r["a"].state.isGettingAllDictTypes){if(clearInterval(t),u=r["a"].state.dictCodes[e],!u)return void a(`不存在类型为:${e} 的字典字段,请确认后再填写`);const o=b(s,u,i.defaultVal,i.formatFunIn,l);n(o&&o.length>0?i.formatFunOut(o):i.defaultVal)}},1e3)}else r["a"].actions.getDictDataObj(e).then(t=>{if(u=t[e],!u)return void a(`不存在类型为:${e} 的字典字段,请确认后再填写`);const r=b(s,u,i.defaultVal,i.formatFunIn,l);n(r&&r.length>0?i.formatFunOut(r):i.defaultVal)})})};n("d9e2");const D=(t,e,n)=>{const i={defaultVal:"",formatFun:(t,e)=>t.map(t=>t[e.labelField]).join(","),treeSetting:{}};Object.assign(i,n);const{treeSetting:a}=r["a"].state.dictConfig,s=Object.assign(a,i.treeSetting),o=r["a"].state.dictCodes;let l=[];if(o&&o[e]){l=o[e];const n=l.find(e=>e[s.idField]===t);return n?i.formatFun(Object(h["a"])(n[s.idField],l,s),s):i.defaultVal}r["a"].actions.getDictDataObj(e).then(n=>{if(l=n[e],!l)return new Error(`不存在类型为:${e} 的字典字段,请确认后再填写`);const a=l.find(e=>e[s.idField]===t);return a?i.formatFun(Object(h["a"])(a[s.idField],l,s),s):i.defaultVal})},T=(t,e,n)=>{const i={defaultVal:"",formatFunIn:(t,e)=>t.map(t=>t[e.labelField]).join("/"),treeSetting:{},formatFunOut:t=>t.join(","),spacer:","};Object.assign(i,n);let a=[];Array.isArray(t)?a=t:"string"===typeof t&&(a=t.split(i.spacer));const{treeSetting:s}=r["a"].state.dictConfig,o=Object.assign(s,i.treeSetting),l=r["a"].state.dictCodes;let c=[];if(l&&l[e]){c=l[e];const t=g(a,c,i.defaultVal,i.formatFunIn,o);return t&&t.length>0?i.formatFunOut(t):i.defaultVal}r["a"].actions.getDictDataObj(e).then(t=>{if(c=t[e],!c)return new Error(`不存在类型为:${e} 的字典字段,请确认后再填写`);const n=g(a,c,i.defaultVal,i.formatFunIn,o);return n&&n.length>0?i.formatFunOut(n):i.defaultVal})},_=(t,e,n)=>{const i={defaultVal:"",formatFun:(t,e)=>t.map(t=>t[e.idField]).join(","),treeSetting:{}};Object.assign(i,n);const{treeSetting:a}=r["a"].state.dictConfig,s=Object.assign(a,i.treeSetting),o=r["a"].state.dictCodes;let l=[];if(o&&o[e]){l=o[e];const n=l.find(e=>e[s.labelField]===t);return n?i.formatFun(Object(h["b"])(n[s.labelField],l,s),s):i.defaultVal}r["a"].actions.getDictDataObj(e).then(n=>{if(l=n[e],!l)return new Error(`不存在类型为:${e} 的字典字段,请确认后再填写`);const a=l.find(e=>e[s.labelField]===t);return a?i.formatFun(Object(h["b"])(a[s.labelField],l,s),s):i.defaultVal})},C=(t,e,n)=>{const i={defaultVal:"",formatFunIn:(t,e)=>t.map(t=>t[e.idField]).join("/"),treeSetting:{},formatFunOut:t=>t.join(","),spacer:","};Object.assign(i,n);let a=[];Array.isArray(t)?a=t:"string"===typeof t&&(a=t.split(i.spacer));const{treeSetting:s}=r["a"].state.dictConfig,o=Object.assign(s,i.treeSetting),l=r["a"].state.dictCodes;let c=[];if(l&&l[e]){c=l[e];const t=b(a,c,i.defaultVal,i.formatFunIn,o);return t&&t.length>0?i.formatFunOut(t):i.defaultVal}r["a"].actions.getDictDataObj(e).then(t=>{if(c=t[e],!c)return new Error(`不存在类型为:${e} 的字典字段,请确认后再填写`);const n=b(a,c,i.defaultVal,i.formatFunIn,o);return n&&n.length>0?i.formatFunOut(n):i.defaultVal})};console.log("🚀 ~ file: index.js:3 ~ components:",s["default"]);const S=o,O=l,F=c["e"],j=c["f"],x=c["a"],w=c["b"],$=c["d"],k=u["c"],I=u["d"],V=u["a"],E=u["b"],A=d["b"],G=d["c"],N=d["d"],P=d["e"],L=d["f"],M=d["a"],B=f["a"],R=f["b"],J=h["d"],Y=h["a"],q=h["b"],U=p,z=y,K=v,H=m,W=D,X=_,Q=T,Z=C,tt=[{name:"getLabelByCodeFilter",func:u["c"]},{name:"getLabelByCodesFilter",func:u["d"]},{name:"getCodeByLabelFilter",func:u["a"]},{name:"getCodeByLabelsFilter",func:u["b"]},{name:"getTreeLabelByCodeFilter",func:D},{name:"getTreeCodeByLabelFilter",func:_},{name:"getTreeLabelByCodesFilter",func:T},{name:"getTreeCodeByLabelsFilter",func:C},{name:"formatDate",func:f["a"]},{name:"desensitization",func:d["a"]}];async function et(t){const e=t.storage.getItem(t.dictDataKey),n=t.usuallyGetFileds.split(","),i=[];if(n.length>0)for(let a=0;a<n.length;a++)e[n[a]]||i.push(n[a]);if(!e||t.getDictEveryTime||i.length>0){let e,n;t.isGetAll?(n="",r["a"].mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!0),e=await t.getDictCodeApi(t.formatterRequest(t.query)),r["a"].mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!1)):i.length>0&&(n=i.join(","),r["a"].mutations.ADD_IS_EGTTING_DICT_TYPES(i.join(",")),e=await t.getDictCodeApi(t.formatterRequest(t.query,n)),r["a"].mutations.REMOVE_IS_EGTTING_DICT_TYPES(i.join(",")));const a=t.formatterDictList(e,n),s=t.formatterDictversion(e);t.storage.setItem(t.versionKey,s);const o=Object.assign(JSON.parse(JSON.stringify(t.localDictCodes)),a);r["a"].mutations.SET_DICT_CODES(o),t.storage.setItem(t.dictDataKey,JSON.stringify(o))}}const nt={async install(t,e){console.dir(t);const n={filterDataFun:t=>t,disabledDataFun:t=>t,treeSetting:{idField:"id",parentIdField:"parentId",childrenField:"children",firstId:"0",labelField:"label",labelArrField:"labelArr",idArrField:"idArr",levelField:"level",level:0,leafField:"leaf"},query:"dictType",versionKey:"vue2VantDictVersion",dictDataKey:"vue2VantDictData",format:{value:"value",label:"label"},formatterRequest:(t,e)=>e?{[t]:e}:{[t]:""},formatterDictList:(t,e)=>null===t||void 0===t?void 0:t.dictData,formatterDictVersion:t=>t.version,storage:localStorage,usuallyGetFileds:"",isGetAll:!1,localDictCodes:{},getDictEveryTime:!1};e.treeSetting=Object.assign(n.treeSetting,e.treeSetting);const i=Object.assign(n,e);r["a"].mutations.SET_DICT_SETTING(i);const a=JSON.parse(i.storage.getItem(i.dictDataKey))||{};let o=JSON.parse(JSON.stringify(i.localDictCodes));o=Object.assign(a,o),i.storage.setItem(i.dictDataKey,JSON.stringify(o)),r["a"].mutations.SET_DICT_CODES(o);const l=i.storage.getItem(i.versionKey);i.version!==l&&(i.storage.removeItem(i.dictDataKey),i.storage.setItem(i.versionKey,i.version),i.storage.setItem(i.dictDataKey,JSON.stringify(i.localDictCodes)),r["a"].mutations.SET_DICT_CODES(i.localDictCodes)),(i.isGetAll||i.usuallyGetFileds)&&et(i),s["default"].map(e=>t.component(e.name,e)),tt.map(e=>{t.filter(e.name,e.func)})}};var it=nt;e["default"]=it},fc6a:function(t,e,n){var i=n("44ad"),a=n("1d80");t.exports=function(t){return i(a(t))}},fdbf:function(t,e,n){var i=n("04f8");t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})}));
|
|
2
|
+
//# sourceMappingURL=vue2-vant-dict.umd.min.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vue2-vant-dict",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "vue2字典组件",
|
|
5
|
+
"main": "lib/vue2-vant-dict.umd.min.js",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"vue2-vant-dict",
|
|
8
|
+
"dict",
|
|
9
|
+
"字典",
|
|
10
|
+
"vue字典",
|
|
11
|
+
"shenxiaobu",
|
|
12
|
+
"字典包"
|
|
13
|
+
],
|
|
14
|
+
"author": "shenxiaobu",
|
|
15
|
+
"private": false,
|
|
16
|
+
"scripts": {
|
|
17
|
+
"serve": "vue-cli-service serve",
|
|
18
|
+
"build": "vue-cli-service build",
|
|
19
|
+
"lint": "vue-cli-service lint",
|
|
20
|
+
"lib": "vue-cli-service build --target lib --dest lib packages/index.js"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"vue": ">= 2.6.0"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@vue/cli-plugin-babel": "~4.5.0",
|
|
30
|
+
"@vue/cli-plugin-eslint": "~4.5.0",
|
|
31
|
+
"@vue/cli-service": "~4.5.0",
|
|
32
|
+
"babel-eslint": "^10.1.0",
|
|
33
|
+
"core-js": "^3.6.5",
|
|
34
|
+
"eslint": "^6.7.2",
|
|
35
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
36
|
+
"less": "^4.1.3",
|
|
37
|
+
"less-loader": "^4.1.0",
|
|
38
|
+
"vant": "^2.12.54",
|
|
39
|
+
"vant-xiaobu": "^2.13.0",
|
|
40
|
+
"vue": "^2.6.11",
|
|
41
|
+
"vue-router": "^3.5.3",
|
|
42
|
+
"vue-template-compiler": "^2.6.11"
|
|
43
|
+
},
|
|
44
|
+
"eslintConfig": {
|
|
45
|
+
"root": true,
|
|
46
|
+
"env": {
|
|
47
|
+
"node": true
|
|
48
|
+
},
|
|
49
|
+
"extends": [
|
|
50
|
+
"plugin:vue/essential",
|
|
51
|
+
"eslint:recommended"
|
|
52
|
+
],
|
|
53
|
+
"parserOptions": {
|
|
54
|
+
"parser": "babel-eslint"
|
|
55
|
+
},
|
|
56
|
+
"rules": {}
|
|
57
|
+
},
|
|
58
|
+
"browserslist": [
|
|
59
|
+
"> 1%",
|
|
60
|
+
"last 2 versions",
|
|
61
|
+
"not dead"
|
|
62
|
+
]
|
|
63
|
+
}
|