Commit a9b1e4081a26998eb52c1516b9e7e985998032ef

Authored by 刘汉宸
1 parent 394faf94

feat: 修改Schema组件

examples/router/routes.js
... ... @@ -71,28 +71,28 @@ const _components = [
71 71 group: '方案组件',
72 72 children: [
73 73 {
74   - path: 'scheme-form',
75   - name: 'scheme-form',
76   - meta: { title: 'Scheme Form 表单' },
77   - component: () => import('@/views/docs/component/scheme-form.md'),
  74 + path: 'schema-form',
  75 + name: 'schema-form',
  76 + meta: { title: 'Schema Form 表单' },
  77 + component: () => import('@/views/docs/component/schema-form.md'),
78 78 },
79 79 {
80   - path: 'scheme-filter',
81   - name: 'scheme-filter',
82   - meta: { title: 'Scheme Filter 筛选' },
83   - component: () => import('@/views/docs/component/scheme-filter.md'),
  80 + path: 'schema-filter',
  81 + name: 'schema-filter',
  82 + meta: { title: 'Schema Filter 筛选' },
  83 + component: () => import('@/views/docs/component/schema-filter.md'),
84 84 },
85 85 {
86   - path: 'scheme-table',
87   - name: 'scheme-table',
88   - meta: { title: 'Scheme Table 表格' },
89   - component: () => import('@/views/docs/component/scheme-table.md'),
  86 + path: 'schema-table',
  87 + name: 'schema-table',
  88 + meta: { title: 'Schema Table 表格' },
  89 + component: () => import('@/views/docs/component/schema-table.md'),
90 90 },
91 91 {
92   - path: 'scheme',
93   - name: 'scheme',
94   - meta: { title: 'Scheme 方案' },
95   - component: () => import('@/views/docs/component/scheme.md'),
  92 + path: 'schema',
  93 + name: 'schema',
  94 + meta: { title: 'Schema 方案' },
  95 + component: () => import('@/views/docs/component/schema.md'),
96 96 },
97 97 ],
98 98 },
... ... @@ -134,10 +134,22 @@ const _develops = [
134 134 group: '方案开发',
135 135 children: [
136 136 {
137   - path: 'scheme',
138   - name: 'developScheme',
139   - meta: { title: 'Scheme 方案' },
140   - component: () => import('@/views/docs/develop/scheme/scheme.md'),
  137 + path: 'schema-form',
  138 + name: 'developSchemaForm',
  139 + meta: { title: 'Schema Form 方案表单' },
  140 + component: () => import('@/views/docs/develop/schema/schema-form.md'),
  141 + },
  142 + {
  143 + path: 'schema-table',
  144 + name: 'developSchemaTable',
  145 + meta: { title: 'Schema Table 方案表格' },
  146 + component: () => import('@/views/docs/develop/schema/schema-table.md'),
  147 + },
  148 + {
  149 + path: 'schema-page',
  150 + name: 'developSchemaPage',
  151 + meta: { title: 'Schema Page 方案页面' },
  152 + component: () => import('@/views/docs/develop/schema/schema-page.md'),
141 153 },
142 154 ],
143 155 },
... ...
examples/styles/index.scss
... ... @@ -53,7 +53,7 @@ body {
53 53 }
54 54 }
55 55  
56   -.zee-scheme__view {
  56 +.zee-schema__view {
57 57 .el-form-item {
58 58 font-weight: normal !important;
59 59 margin-bottom: 0 !important;
... ...
examples/views/docs/component/schema-filter.md 0 → 100644
... ... @@ -0,0 +1,184 @@
  1 +# Schema Filter 筛选
  2 +
  3 +根据JSON Schema配置自动生成一个筛选条件表单
  4 +
  5 +## 基础用法
  6 +
  7 +配置`list`属性设置JSON Schema配置列表
  8 +
  9 +::: snippet 通过`list`配置项目
  10 +
  11 +```html
  12 +<template>
  13 + <div>
  14 + <pre class="demo-model">{{ model }}</pre>
  15 + <z-schema-filter v-model="model" :list="list" @search="onSearch" @reset="onReset"></z-schema-filter>
  16 + </div>
  17 +</template>
  18 +
  19 +<script>
  20 +export default {
  21 + data() {
  22 + return {
  23 + model: {},
  24 + list: [
  25 + { type: 'el-input', label: '姓名', key: 'name' },
  26 + { type: 'el-input', label: '年龄', key: 'age' },
  27 + { type: 'el-input', label: '省', key: 'province' },
  28 + { type: 'el-input', label: '市', key: 'city' },
  29 + { type: 'el-input', label: '区', key: 'area' },
  30 + { type: 'el-input', label: '地址', key: 'address' },
  31 + ]
  32 + }
  33 + },
  34 + methods: {
  35 + onSearch(params) {
  36 + console.log(JSON.parse(JSON.stringify(params)));
  37 + },
  38 + onReset() {
  39 + console.log('reset');
  40 + }
  41 + }
  42 +}
  43 +</script>
  44 +```
  45 +
  46 +:::
  47 +
  48 +## 自定义按钮
  49 +
  50 +支持自定义按钮占位及按钮组件
  51 +
  52 +::: snippet 配置`uncollapsedSpan`改变展开时操作区占位,默认值`24`;插槽`operation`自定义按钮内容;
  53 +
  54 +```html
  55 +<template>
  56 + <z-schema-filter v-model="model" :list="list" :uncollapsedSpan="12">
  57 + <template #operation="{ size, handleSearch, handleReset, handleCollapse, showCollapsed, collapsed, loading }">
  58 + <div style="text-align: right;">
  59 + <el-button-group :size="size">
  60 + <el-button type="primary" round @click="handleSearch" :loading="loading" icon="el-icon-search"><span>查询</span></el-button>
  61 + <el-button @click="handleReset"><span>重置</span></el-button>
  62 + <el-button round v-if="showCollapsed" @click="handleCollapse">
  63 + <span>{{ collapsed ? '展开' : '收起' }}</span>
  64 + </el-button>
  65 + </el-button-group>
  66 + </div>
  67 + </template>
  68 + </z-schema-filter>
  69 +</template>
  70 +
  71 +<script>
  72 +export default {
  73 + data() {
  74 + return {
  75 + model: {},
  76 + list: [
  77 + { type: 'el-input', label: '姓名', key: 'name' },
  78 + { type: 'el-input', label: '年龄', key: 'age' },
  79 + { type: 'el-input', label: '省', key: 'province' },
  80 + { type: 'el-input', label: '市', key: 'city' },
  81 + { type: 'el-input', label: '区', key: 'area' },
  82 + { type: 'el-input', label: '地址', key: 'address' },
  83 + ]
  84 + }
  85 + },
  86 +}
  87 +</script>
  88 +```
  89 +
  90 +:::
  91 +
  92 +## 自定义数据项
  93 +
  94 +支持自定义数据项,一般用于通过JSON Schema较难配置出的,较复杂的局部组件
  95 +
  96 +::: snippet 插槽名与数据项`key`相同
  97 +
  98 +```html
  99 +<template>
  100 + <z-schema-filter v-model="model" :list="list">
  101 + <template #name>
  102 + <el-input placeholder="请输入内容" v-model="model.name">
  103 + <el-button slot="append" icon="el-icon-search"></el-button>
  104 + </el-input>
  105 + </template>
  106 + </z-schema-filter>
  107 +</template>
  108 +
  109 +<script>
  110 +export default {
  111 + data() {
  112 + return {
  113 + model: {},
  114 + list: [
  115 + { type: 'el-input', label: '姓名', key: 'name' },
  116 + { type: 'el-input', label: '年龄', key: 'age' },
  117 + { type: 'el-input', label: '省', key: 'province' },
  118 + { type: 'el-input', label: '市', key: 'city' },
  119 + { type: 'el-input', label: '区', key: 'area' },
  120 + { type: 'el-input', label: '地址', key: 'address' },
  121 + ]
  122 + }
  123 + },
  124 +}
  125 +</script>
  126 +```
  127 +
  128 +:::
  129 +
  130 +## 展示数量
  131 +
  132 +默认展示数量为`3`个,可以通过配置而改变
  133 +
  134 +::: snippet 设置`visibleNum`改变默认展示数量的大小,`span`改变每一项的占位数量
  135 +
  136 +```html
  137 +<template>
  138 + <z-schema-filter :list="list" :visibleNum="2" :span="8" size="large"></z-schema-filter>
  139 +</template>
  140 +
  141 +<script>
  142 +export default {
  143 + data() {
  144 + return {
  145 + list: [
  146 + { type: 'el-input', label: '姓名', key: 'name' },
  147 + { type: 'el-input-number', label: '年龄', key: 'age', style: { width: '100%' }, props: { min: 0 } },
  148 + { type: 'el-input', label: '省', key: 'province' },
  149 + { type: 'el-input', label: '市', key: 'city' },
  150 + { type: 'el-input', label: '区', key: 'area' },
  151 + { type: 'el-input', label: '地址', key: 'address' },
  152 + ]
  153 + }
  154 + },
  155 +}
  156 +</script>
  157 +```
  158 +
  159 +:::
  160 +
  161 +## API
  162 +
  163 +## Attribute 属性
  164 +
  165 +参数|说明|类型|可选值|默认值
  166 +-|-|-|-|-
  167 +value | 值 | Object | - | {}
  168 +list | JSON Schema配置项列表 | Array | - | []
  169 +labelWidth | 默认Label宽度 | String | 110px
  170 +size | 大小 | String | - | small
  171 +span | 占位 | Number | - | 24
  172 +uncollapsedSpan | 展开时操作区占位 | Number | - | 24
  173 +visibleNum | 折叠时可视项数量 | Number | - | 3
  174 +loading | 加载状态 | Boolean | - | -
  175 +formProps | 默认el-form配置参数 | Object | - | {}
  176 +params | 自定义附加参数 | Object | - | -
  177 +
  178 +## Events 事件
  179 +
  180 +事件名称|说明|回调参数
  181 +-|-|-
  182 +input | 表单值变化 | model
  183 +search | 查询 | model
  184 +reset | 重置表单 | -
0 185 \ No newline at end of file
... ...
examples/views/docs/component/schema-form.md 0 → 100644
... ... @@ -0,0 +1,280 @@
  1 +# Form 表单
  2 +
  3 +根据JSON Schema配置自动生成表单
  4 +
  5 +## 基础用法
  6 +
  7 +配置`list`属性设置JSON Schema配置列表
  8 +
  9 +<div class="code-snippet-box">
  10 +
  11 +::: snippet `v-model`值动态改变,支持初始化
  12 +
  13 +```html
  14 +<template>
  15 + <div>
  16 + <pre class="demo-model">{{ model }}</pre>
  17 + <z-schema-form v-model="model" :list="list"></z-schema-form>
  18 + </div>
  19 +</template>
  20 +
  21 +<script>
  22 +export default {
  23 + data() {
  24 + return {
  25 + model: { name: '', age: '' },
  26 + list: [
  27 + { type: 'el-input', label: '姓名', key: 'name' },
  28 + { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
  29 + ]
  30 + }
  31 + }
  32 +}
  33 +</script>
  34 +```
  35 +
  36 +:::
  37 +
  38 +::: snippet `span`设置行占位
  39 +
  40 +```html
  41 +<template>
  42 + <z-schema-form v-model="model" :list="list" :span="12"></z-schema-form>
  43 +</template>
  44 +
  45 +<script>
  46 +export default {
  47 + data() {
  48 + return {
  49 + model: { name: '', age: '' },
  50 + list: [
  51 + { type: 'el-input', label: '姓名', key: 'name' },
  52 + { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
  53 + ]
  54 + }
  55 + }
  56 +}
  57 +</script>
  58 +```
  59 +
  60 +:::
  61 +
  62 +::: snippet `label-width`设置标题宽度
  63 +
  64 +```html
  65 +<template>
  66 + <z-schema-form v-model="model" :list="list" label-width="60px"></z-schema-form>
  67 +</template>
  68 +
  69 +<script>
  70 +export default {
  71 + data() {
  72 + return {
  73 + model: { name: '', age: '' },
  74 + list: [
  75 + { type: 'el-input', label: '姓名', key: 'name' },
  76 + { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
  77 + ]
  78 + }
  79 + }
  80 +}
  81 +</script>
  82 +```
  83 +
  84 +:::
  85 +
  86 +</div>
  87 +
  88 +## 表单校验
  89 +
  90 +配置`list`的配置项中的`rules`
  91 +
  92 +<div class="code-snippet-box">
  93 +
  94 +::: snippet `v-model`值动态改变,支持初始化
  95 +
  96 +```html
  97 +<template>
  98 + <div>
  99 + <z-schema-form ref="form" v-model="model" :list="list" :span="12" @validate="onValidate" @reset="onReset"></z-schema-form>
  100 + <el-button size="small" type="primary" @click="submit">提交</el-button>
  101 + <el-button size="small" plain @click="reset">重置</el-button>
  102 + </div>
  103 +</template>
  104 +
  105 +<script>
  106 +export default {
  107 + data() {
  108 + return {
  109 + model: { name: '', age: '' },
  110 + list: [
  111 + { type: 'el-input', label: '姓名', key: 'name', rules: [{ required: true, message: '请输入', trigger: 'change' }] },
  112 + { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
  113 + ]
  114 + }
  115 + },
  116 + methods: {
  117 + onValidate(valid, model) {
  118 + if (valid) {
  119 + console.log(model);
  120 + }
  121 + },
  122 + onReset() {
  123 + Object.keys(this.model).forEach(key => {
  124 + this.model[key] = '';
  125 + });
  126 + },
  127 + submit() {
  128 + this.$refs.form.validate();
  129 + },
  130 + reset() {
  131 + this.$refs.form.reset();
  132 + }
  133 + }
  134 +}
  135 +</script>
  136 +```
  137 +
  138 +:::
  139 +
  140 +</div>
  141 +
  142 +## 表单分组
  143 +
  144 +将表单内容进行分组显示
  145 +
  146 +::: snippet 表单配置项的`group`值设置分组
  147 +
  148 +```html
  149 +<template>
  150 + <div>
  151 + <pre class="demo-model">{{ model }}</pre>
  152 + <z-schema-form v-model="model" :list="list" :span="8" label-width="80px"></z-schema-form>
  153 + </div>
  154 +</template>
  155 +
  156 +<script>
  157 +export default {
  158 + data() {
  159 + return {
  160 + model: { name: '', age: '', company: '', address: '', time: '', salary: '' },
  161 + list: [
  162 + {
  163 + group: { title: '基础信息' },
  164 + list: [
  165 + { type: 'el-input', label: '姓名', key: 'name', rules: [{ required: true, message: '请输入', trigger: 'change' }], span: 12 },
  166 + { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' }, span: 12 },
  167 + ],
  168 + },
  169 + {
  170 + group: { title: '工作信息' },
  171 + list: [
  172 + { type: 'el-input', label: '公司', key: 'company' },
  173 + { type: 'el-input', label: '地址', key: 'address' },
  174 + { type: 'el-input', label: '时限', key: 'time' },
  175 + { type: 'el-input', label: '薪资', key: 'salary' },
  176 + ],
  177 + },
  178 + ]
  179 + }
  180 + },
  181 +}
  182 +</script>
  183 +```
  184 +
  185 +:::
  186 +
  187 +## 自定义渲染
  188 +
  189 +对于一些特殊渲染逻辑的表单项,可以进行自定义渲染
  190 +
  191 +<div class="code-snippet-box">
  192 +
  193 +::: snippet 通过`render`方法渲染
  194 +
  195 +```html
  196 +<template>
  197 + <div>
  198 + <pre class="demo-model">{{ model }}</pre>
  199 + <z-schema-form v-model="model" :list="list" label-width="80px"></z-schema-form>
  200 + </div>
  201 +</template>
  202 +
  203 +<script>
  204 +export default {
  205 + data() {
  206 + return {
  207 + model: { name: '', age: '' },
  208 + list: [
  209 + { type: 'el-input', label: '姓名', key: 'name' },
  210 + { type: 'el-input', label: '年龄', key: 'age', type: (h, { model, config }) => { return h('el-input-number', config, model.age) }, props: { 'controls-position': 'right' } },
  211 + ]
  212 + }
  213 + },
  214 +}
  215 +</script>
  216 +```
  217 +
  218 +:::
  219 +
  220 +::: snippet 通过`slot`插槽渲染
  221 +
  222 +```html
  223 +<template>
  224 + <div>
  225 + <pre class="demo-model">{{ model }}</pre>
  226 + <z-schema-form v-model="model" :list="list" label-width="80px">
  227 + <template slot="name">
  228 + <el-radio v-model="model.name" label="zs">张三</el-radio>
  229 + <el-radio v-model="model.name" label="ls">李四</el-radio>
  230 + </template>
  231 + <template slot="age">
  232 + <el-slider v-model="model.age"></el-slider>
  233 + </template>
  234 + </z-schema-form>
  235 + </div>
  236 +</template>
  237 +
  238 +<script>
  239 +export default {
  240 + data() {
  241 + return {
  242 + model: { name: 'zs', age: 0 },
  243 + list: [
  244 + { type: 'el-input', label: '姓名', key: 'name' },
  245 + { type: 'el-input', label: '年龄', key: 'age' },
  246 + ]
  247 + }
  248 + },
  249 +}
  250 +</script>
  251 +```
  252 +
  253 +:::
  254 +
  255 +</div>
  256 +
  257 +## API
  258 +
  259 +## Attribute 属性
  260 +
  261 +参数|说明|类型|可选值|默认值
  262 +-|-|-|-|-
  263 +value | 值 | Object | - | -
  264 +list | JSON Schema配置项列表 | Array | - | []
  265 +formClass | 表单class | String | - | -
  266 +titleClass | 标题class | String | - | -
  267 +contentClass | 内容class | String | - | -
  268 +itemClass | 表单项class | String | - | -
  269 +groupClass | 表单分组class | String | - | -
  270 +labelWidth | 表单项标题宽度 | String | - | -
  271 +labelPosition | 表单项标题位置 | String | - | top
  272 +size | 大小 | String | - | small
  273 +span | 占位 | Number | - | 24
  274 +
  275 +## Events 事件
  276 +
  277 +事件名称|说明|回调参数
  278 +-|-|-
  279 +input | 表单值变化 | 表单model
  280 +validate | 校验表单 | 是否通过,表单model
0 281 \ No newline at end of file
... ...
examples/views/docs/component/schema-table.md 0 → 100644
... ... @@ -0,0 +1,156 @@
  1 +# Schema Table 表格
  2 +
  3 +根据JSON Schema配置自动生成表格
  4 +
  5 +## 基础用法
  6 +
  7 +配置`list`属性设置JSON Schema配置列表
  8 +
  9 +::: snippet `tableProps`设置表格参数
  10 +
  11 +```html
  12 +<template>
  13 + <z-schema-table v-model="tableData" :list="list" :tableProps="{ border: true }"></z-schema-table>
  14 +</template>
  15 +
  16 +<script>
  17 +export default {
  18 + data() {
  19 + return {
  20 + tableData: [
  21 + { name: '张三', age: 16 },
  22 + { name: '李四', age: 24 }
  23 + ],
  24 + list: [
  25 + { label: '姓名', key: 'name' },
  26 + { label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
  27 + ]
  28 + }
  29 + }
  30 +}
  31 +</script>
  32 +```
  33 +
  34 +:::
  35 +
  36 +## 自定义渲染
  37 +
  38 +配置`list`属性设置JSON Schema配置列表
  39 +
  40 +<div class="code-snippet-box">
  41 +
  42 +::: snippet `render`函数式渲染
  43 +
  44 +```html
  45 +<template>
  46 + <z-schema-table v-model="tableData" :list="list"></z-schema-table>
  47 +</template>
  48 +
  49 +<script>
  50 +export default {
  51 + data() {
  52 + return {
  53 + tableData: [
  54 + { name: '张三', age: 16 },
  55 + { name: '李四', age: 24 }
  56 + ],
  57 + list: [
  58 + { label: '姓名', key: 'name', render: (h, { value }) => { return h('span', { style: { background: 'rgba(255, 0, 0, 0.5)', color: '#fff' } }, value) } },
  59 + { label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
  60 + ]
  61 + }
  62 + }
  63 +}
  64 +</script>
  65 +```
  66 +
  67 +:::
  68 +
  69 +::: snippet `slot`插槽式渲染
  70 +
  71 +```html
  72 +<template>
  73 + <z-schema-table v-model="tableData" :list="list">
  74 + <template #value-age="{ value }">
  75 + <el-tag v-if="value" :type="value > 16 ? 'success' : 'danger'" size="mini" disable-transitions>{{ value }}</el-tag>
  76 + </template>
  77 + </z-schema-table>
  78 +</template>
  79 +
  80 +<script>
  81 +export default {
  82 + data() {
  83 + return {
  84 + tableData: [
  85 + { name: '张三', age: 16 },
  86 + { name: '李四', age: 24 }
  87 + ],
  88 + list: [
  89 + { type: 'el-input', label: '姓名', key: 'name' },
  90 + { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
  91 + ]
  92 + }
  93 + }
  94 +}
  95 +</script>
  96 +```
  97 +
  98 +:::
  99 +
  100 +</div>
  101 +
  102 +## 层级分组
  103 +
  104 +支持`group`分组,兼容form组件,使同一个schema能够同时复用在`table`、`form`上
  105 +
  106 +::: snippet `group`设置分组,其中`key`设置分组对象名称
  107 +
  108 +```html
  109 +<template>
  110 + <z-schema-table v-model="tableData" :list="list" :tableProps="{ border: true }"></z-schema-table>
  111 +</template>
  112 +
  113 +<script>
  114 +export default {
  115 + data() {
  116 + return {
  117 + tableData: [
  118 + { name: '张三', age: 16, location: { city: '上海', address: '青浦区' } },
  119 + { name: '李四', age: 24, location: { city: '北京', address: '朝阳区' } }
  120 + ],
  121 + list: [
  122 + { label: '姓名', key: 'name' },
  123 + { label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
  124 + {
  125 + group: { key: 'location' },
  126 + list: [
  127 + { label: '城市', key: 'city' },
  128 + ]
  129 + },
  130 + { label: '地址', key: 'location.address' },
  131 + ]
  132 + }
  133 + }
  134 +}
  135 +</script>
  136 +```
  137 +
  138 +:::
  139 +
  140 +## API
  141 +
  142 +## Attribute 属性
  143 +
  144 +参数|说明|类型|可选值|默认值
  145 +-|-|-|-|-
  146 +value | 表格数据 | Array | - | -
  147 +list | JSON Schema配置项列表 | Array | - | []
  148 +tableProps | 表格参数 | Object | - | -
  149 +tableEvents | 表格参数 | Object | - | -
  150 +minWidth | 列宽 | Number | - | -
  151 +
  152 +## Events 事件
  153 +
  154 +事件名称|说明|回调参数
  155 +-|-|-
  156 +selection | 表格选中 | 选中项
0 157 \ No newline at end of file
... ...
examples/views/docs/component/schema.md 0 → 100644
... ... @@ -0,0 +1,155 @@
  1 +# Schema 方案
  2 +
  3 +根据JSON Schema配置自动生成一个包含搜索条件、表格、编辑表单、详情表单的页面
  4 +
  5 +## 基础用法
  6 +
  7 +通过配置`JSON Schema`快速生成CURD逻辑
  8 +
  9 +::: snippet 通过`list`配置项目
  10 +
  11 +```html
  12 +<template>
  13 + <z-schema :list="list" :search-api="searchAPI" :get-api="getAPI" :submit-api="submitAPI" :delete-api="deleteAPI" auto real-selection>
  14 + <el-table-column type="selection" align="center" width="40"></el-table-column>
  15 + <template #header>
  16 + <el-tabs v-model="activeName">
  17 + <el-tab-pane label="待执行" name="wait"></el-tab-pane>
  18 + <el-tab-pane label="已执行" name="done"></el-tab-pane>
  19 + </el-tabs>
  20 + </template>
  21 + <template #button="{ size, openDialog }">
  22 + <el-button :size="size" plain>删除</el-button>
  23 + <el-button :size="size" plain @click="openDialog('other', '追加')">追加操作</el-button>
  24 + </template>
  25 + <template #dialog-other="{ model, closeDialog }">
  26 + <el-tag type="success">其它页面</el-tag>
  27 + <el-input
  28 + type="textarea"
  29 + :rows="2"
  30 + placeholder="请输入内容"
  31 + v-model="model.name">
  32 + </el-input>
  33 + <el-button @click="closeDialog">关闭弹出框</el-button>
  34 + </template>
  35 + </z-schema>
  36 +</template>
  37 +
  38 +<script>
  39 +export default {
  40 + data() {
  41 + return {
  42 + activeName: 'wait',
  43 + list: [
  44 + { type: 'el-input', label: '姓名', key: 'name', rules: [{ required: true, message: '请输入', trigger: 'change' }] },
  45 + { type: 'el-input', label: '年龄', key: 'age' },
  46 + ]
  47 + }
  48 + },
  49 + methods: {
  50 + searchAPI(params) {
  51 + console.log(params);
  52 + return new Promise(resolve => {
  53 + setTimeout(() => {
  54 + const list = [
  55 + { id: '0', name: '李饼', age: 32, location: { lat: 0, lng: 0 } },
  56 + { id: '1', name: '陈拾', age: 20 },
  57 + { id: '2', name: '阿里巴巴', age: 24 },
  58 + { id: '3', name: '王七', age: 26 },
  59 + { id: '4', name: '崔倍', age: 27 },
  60 + { id: '5', name: '孙豹', age: 38 },
  61 + { id: '6', name: '庞柏', age: 42 },
  62 + { id: '7', name: '蔡疏', age: 60 },
  63 + { id: '8', name: '卢纳', age: 55 },
  64 + ]
  65 + resolve({
  66 + result: list,
  67 + totalCount: list.length
  68 + });
  69 + }, 1500);
  70 + });
  71 + },
  72 + getAPI(row) {
  73 + return new Promise((resolve, reject) => {
  74 + setTimeout(() => {
  75 + resolve({ ...row, name: `[${row.name}]` });
  76 + }, 1500);
  77 + });
  78 + },
  79 + submitAPI(model, config) {
  80 + console.log(JSON.parse(JSON.stringify(model)));
  81 + console.log(config);
  82 + console.log('start');
  83 + return new Promise((resolve, reject) => {
  84 + setTimeout(() => {
  85 + console.log('done');
  86 + reject();
  87 + }, 1500);
  88 + });
  89 + },
  90 + deleteAPI() {
  91 + return new Promise((resolve, reject) => {
  92 + setTimeout(() => {
  93 + resolve();
  94 + }, 1500);
  95 + });
  96 + }
  97 + }
  98 +}
  99 +</script>
  100 +```
  101 +
  102 +:::
  103 +
  104 +## 内置接口逻辑
  105 +
  106 +如果CURD的接口都是同一路径下,可以使用内置接口逻辑快速对接
  107 +
  108 +::: snippet 通过`url`配置接口路径,`http`设置Promise形式的HTTP请求库
  109 +
  110 +```html
  111 +<template>
  112 + <z-schema ref="schema" :list="list" url="/customer" :http="$http" :alias="{ getUrl: '/getCustomerByCode', getKey: 'code' }" auto real-selection>
  113 + <el-table-column type="selection" align="center" width="40"></el-table-column>
  114 + <template #render-code="{ value, row, openView }">
  115 + <el-link type="primary" @click="openView(row)">{{ value }}</el-link>
  116 + </template>
  117 + <template #view-name="{ value }">
  118 + <el-tag size="mini">{{ value }}</el-tag>
  119 + </template>
  120 + <template #cell-name="{ value }">
  121 + <el-tag size="mini" type="danger">{{ value }}</el-tag>
  122 + </template>
  123 + <template #form-id="{ value }">
  124 + <el-tag size="mini">{{ value }}</el-tag>
  125 + </template>
  126 + </z-schema>
  127 +</template>
  128 +
  129 +<script>
  130 +export default {
  131 + data() {
  132 + return {
  133 + activeName: 'wait',
  134 + list: [
  135 + { type: 'el-input', label: 'ID', key: 'id', props: { disabled: true }, include: 'form', visible: () => this.$refs.schema.dialogType === 'edit' },
  136 + { type: 'el-input', label: '编号', key: 'code' },
  137 + { type: 'el-input', label: '名称', key: 'name' },
  138 + ]
  139 + }
  140 + },
  141 + methods: {
  142 + }
  143 +}
  144 +</script>
  145 +```
  146 +
  147 +:::
  148 +
  149 +## API
  150 +
  151 +## Attribute 属性
  152 +
  153 +参数|说明|类型|可选值|默认值
  154 +-|-|-|-|-
  155 +list | JSON Schema配置项列表 | Array | - | []
... ...
examples/views/docs/component/scheme-filter.md
... ... @@ -1,184 +0,0 @@
1   -# Scheme Filter 筛选
2   -
3   -根据JSON Scheme配置自动生成一个筛选条件表单
4   -
5   -## 基础用法
6   -
7   -配置`list`属性设置JSON Scheme配置列表
8   -
9   -::: snippet 通过`list`配置项目
10   -
11   -```html
12   -<template>
13   - <div>
14   - <pre class="demo-model">{{ model }}</pre>
15   - <z-scheme-filter v-model="model" :list="list" @search="onSearch" @reset="onReset"></z-scheme-filter>
16   - </div>
17   -</template>
18   -
19   -<script>
20   -export default {
21   - data() {
22   - return {
23   - model: {},
24   - list: [
25   - { type: 'el-input', label: '姓名', key: 'name' },
26   - { type: 'el-input', label: '年龄', key: 'age' },
27   - { type: 'el-input', label: '省', key: 'province' },
28   - { type: 'el-input', label: '市', key: 'city' },
29   - { type: 'el-input', label: '区', key: 'area' },
30   - { type: 'el-input', label: '地址', key: 'address' },
31   - ]
32   - }
33   - },
34   - methods: {
35   - onSearch(params) {
36   - console.log(JSON.parse(JSON.stringify(params)));
37   - },
38   - onReset() {
39   - console.log('reset');
40   - }
41   - }
42   -}
43   -</script>
44   -```
45   -
46   -:::
47   -
48   -## 自定义按钮
49   -
50   -支持自定义按钮占位及按钮组件
51   -
52   -::: snippet 配置`uncollapsedSpan`改变展开时操作区占位,默认值`24`;插槽`operation`自定义按钮内容;
53   -
54   -```html
55   -<template>
56   - <z-scheme-filter v-model="model" :list="list" :uncollapsedSpan="12">
57   - <template #operation="{ size, handleSearch, handleReset, handleCollapse, showCollapsed, collapsed, loading }">
58   - <div style="text-align: right;">
59   - <el-button-group :size="size">
60   - <el-button type="primary" round @click="handleSearch" :loading="loading" icon="el-icon-search"><span>查询</span></el-button>
61   - <el-button @click="handleReset"><span>重置</span></el-button>
62   - <el-button round v-if="showCollapsed" @click="handleCollapse">
63   - <span>{{ collapsed ? '展开' : '收起' }}</span>
64   - </el-button>
65   - </el-button-group>
66   - </div>
67   - </template>
68   - </z-scheme-filter>
69   -</template>
70   -
71   -<script>
72   -export default {
73   - data() {
74   - return {
75   - model: {},
76   - list: [
77   - { type: 'el-input', label: '姓名', key: 'name' },
78   - { type: 'el-input', label: '年龄', key: 'age' },
79   - { type: 'el-input', label: '省', key: 'province' },
80   - { type: 'el-input', label: '市', key: 'city' },
81   - { type: 'el-input', label: '区', key: 'area' },
82   - { type: 'el-input', label: '地址', key: 'address' },
83   - ]
84   - }
85   - },
86   -}
87   -</script>
88   -```
89   -
90   -:::
91   -
92   -## 自定义数据项
93   -
94   -支持自定义数据项,一般用于通过JSON Scheme较难配置出的,较复杂的局部组件
95   -
96   -::: snippet 插槽名与数据项`key`相同
97   -
98   -```html
99   -<template>
100   - <z-scheme-filter v-model="model" :list="list">
101   - <template #name>
102   - <el-input placeholder="请输入内容" v-model="model.name">
103   - <el-button slot="append" icon="el-icon-search"></el-button>
104   - </el-input>
105   - </template>
106   - </z-scheme-filter>
107   -</template>
108   -
109   -<script>
110   -export default {
111   - data() {
112   - return {
113   - model: {},
114   - list: [
115   - { type: 'el-input', label: '姓名', key: 'name' },
116   - { type: 'el-input', label: '年龄', key: 'age' },
117   - { type: 'el-input', label: '省', key: 'province' },
118   - { type: 'el-input', label: '市', key: 'city' },
119   - { type: 'el-input', label: '区', key: 'area' },
120   - { type: 'el-input', label: '地址', key: 'address' },
121   - ]
122   - }
123   - },
124   -}
125   -</script>
126   -```
127   -
128   -:::
129   -
130   -## 展示数量
131   -
132   -默认展示数量为`3`个,可以通过配置而改变
133   -
134   -::: snippet 设置`visibleNum`改变默认展示数量的大小,`span`改变每一项的占位数量
135   -
136   -```html
137   -<template>
138   - <z-scheme-filter :list="list" :visibleNum="2" :span="8" size="large"></z-scheme-filter>
139   -</template>
140   -
141   -<script>
142   -export default {
143   - data() {
144   - return {
145   - list: [
146   - { type: 'el-input', label: '姓名', key: 'name' },
147   - { type: 'el-input-number', label: '年龄', key: 'age', style: { width: '100%' }, props: { min: 0 } },
148   - { type: 'el-input', label: '省', key: 'province' },
149   - { type: 'el-input', label: '市', key: 'city' },
150   - { type: 'el-input', label: '区', key: 'area' },
151   - { type: 'el-input', label: '地址', key: 'address' },
152   - ]
153   - }
154   - },
155   -}
156   -</script>
157   -```
158   -
159   -:::
160   -
161   -## API
162   -
163   -## Attribute 属性
164   -
165   -参数|说明|类型|可选值|默认值
166   --|-|-|-|-
167   -value | 值 | Object | - | {}
168   -list | JSON Scheme配置项列表 | Array | - | []
169   -labelWidth | 默认Label宽度 | String | 110px
170   -size | 大小 | String | - | small
171   -span | 占位 | Number | - | 24
172   -uncollapsedSpan | 展开时操作区占位 | Number | - | 24
173   -visibleNum | 折叠时可视项数量 | Number | - | 3
174   -loading | 加载状态 | Boolean | - | -
175   -formProps | 默认el-form配置参数 | Object | - | {}
176   -params | 自定义附加参数 | Object | - | -
177   -
178   -## Events 事件
179   -
180   -事件名称|说明|回调参数
181   --|-|-
182   -input | 表单值变化 | model
183   -search | 查询 | model
184   -reset | 重置表单 | -
185 0 \ No newline at end of file
examples/views/docs/component/scheme-form.md
... ... @@ -1,280 +0,0 @@
1   -# Form 表单
2   -
3   -根据JSON Scheme配置自动生成表单
4   -
5   -## 基础用法
6   -
7   -配置`list`属性设置JSON Scheme配置列表
8   -
9   -<div class="code-snippet-box">
10   -
11   -::: snippet `v-model`值动态改变,支持初始化
12   -
13   -```html
14   -<template>
15   - <div>
16   - <pre class="demo-model">{{ model }}</pre>
17   - <z-scheme-form v-model="model" :list="list"></z-scheme-form>
18   - </div>
19   -</template>
20   -
21   -<script>
22   -export default {
23   - data() {
24   - return {
25   - model: { name: '', age: '' },
26   - list: [
27   - { type: 'el-input', label: '姓名', key: 'name' },
28   - { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
29   - ]
30   - }
31   - }
32   -}
33   -</script>
34   -```
35   -
36   -:::
37   -
38   -::: snippet `span`设置行占位
39   -
40   -```html
41   -<template>
42   - <z-scheme-form v-model="model" :list="list" :span="12"></z-scheme-form>
43   -</template>
44   -
45   -<script>
46   -export default {
47   - data() {
48   - return {
49   - model: { name: '', age: '' },
50   - list: [
51   - { type: 'el-input', label: '姓名', key: 'name' },
52   - { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
53   - ]
54   - }
55   - }
56   -}
57   -</script>
58   -```
59   -
60   -:::
61   -
62   -::: snippet `label-width`设置标题宽度
63   -
64   -```html
65   -<template>
66   - <z-scheme-form v-model="model" :list="list" label-width="60px"></z-scheme-form>
67   -</template>
68   -
69   -<script>
70   -export default {
71   - data() {
72   - return {
73   - model: { name: '', age: '' },
74   - list: [
75   - { type: 'el-input', label: '姓名', key: 'name' },
76   - { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
77   - ]
78   - }
79   - }
80   -}
81   -</script>
82   -```
83   -
84   -:::
85   -
86   -</div>
87   -
88   -## 表单校验
89   -
90   -配置`list`的配置项中的`rules`
91   -
92   -<div class="code-snippet-box">
93   -
94   -::: snippet `v-model`值动态改变,支持初始化
95   -
96   -```html
97   -<template>
98   - <div>
99   - <z-scheme-form ref="form" v-model="model" :list="list" :span="12" @validate="onValidate" @reset="onReset"></z-scheme-form>
100   - <el-button size="small" type="primary" @click="submit">提交</el-button>
101   - <el-button size="small" plain @click="reset">重置</el-button>
102   - </div>
103   -</template>
104   -
105   -<script>
106   -export default {
107   - data() {
108   - return {
109   - model: { name: '', age: '' },
110   - list: [
111   - { type: 'el-input', label: '姓名', key: 'name', rules: [{ required: true, message: '请输入', trigger: 'change' }] },
112   - { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
113   - ]
114   - }
115   - },
116   - methods: {
117   - onValidate(valid, model) {
118   - if (valid) {
119   - console.log(model);
120   - }
121   - },
122   - onReset() {
123   - Object.keys(this.model).forEach(key => {
124   - this.model[key] = '';
125   - });
126   - },
127   - submit() {
128   - this.$refs.form.validate();
129   - },
130   - reset() {
131   - this.$refs.form.reset();
132   - }
133   - }
134   -}
135   -</script>
136   -```
137   -
138   -:::
139   -
140   -</div>
141   -
142   -## 表单分组
143   -
144   -将表单内容进行分组显示
145   -
146   -::: snippet 表单配置项的`group`值设置分组
147   -
148   -```html
149   -<template>
150   - <div>
151   - <pre class="demo-model">{{ model }}</pre>
152   - <z-scheme-form v-model="model" :list="list" :span="8" label-width="80px"></z-scheme-form>
153   - </div>
154   -</template>
155   -
156   -<script>
157   -export default {
158   - data() {
159   - return {
160   - model: { name: '', age: '', company: '', address: '', time: '', salary: '' },
161   - list: [
162   - {
163   - group: { title: '基础信息' },
164   - list: [
165   - { type: 'el-input', label: '姓名', key: 'name', rules: [{ required: true, message: '请输入', trigger: 'change' }], span: 12 },
166   - { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' }, span: 12 },
167   - ],
168   - },
169   - {
170   - group: { title: '工作信息' },
171   - list: [
172   - { type: 'el-input', label: '公司', key: 'company' },
173   - { type: 'el-input', label: '地址', key: 'address' },
174   - { type: 'el-input', label: '时限', key: 'time' },
175   - { type: 'el-input', label: '薪资', key: 'salary' },
176   - ],
177   - },
178   - ]
179   - }
180   - },
181   -}
182   -</script>
183   -```
184   -
185   -:::
186   -
187   -## 自定义渲染
188   -
189   -对于一些特殊渲染逻辑的表单项,可以进行自定义渲染
190   -
191   -<div class="code-snippet-box">
192   -
193   -::: snippet 通过`render`方法渲染
194   -
195   -```html
196   -<template>
197   - <div>
198   - <pre class="demo-model">{{ model }}</pre>
199   - <z-scheme-form v-model="model" :list="list" label-width="80px"></z-scheme-form>
200   - </div>
201   -</template>
202   -
203   -<script>
204   -export default {
205   - data() {
206   - return {
207   - model: { name: '', age: '' },
208   - list: [
209   - { type: 'el-input', label: '姓名', key: 'name' },
210   - { type: 'el-input', label: '年龄', key: 'age', type: (h, { model, config }) => { return h('el-input-number', config, model.age) }, props: { 'controls-position': 'right' } },
211   - ]
212   - }
213   - },
214   -}
215   -</script>
216   -```
217   -
218   -:::
219   -
220   -::: snippet 通过`slot`插槽渲染
221   -
222   -```html
223   -<template>
224   - <div>
225   - <pre class="demo-model">{{ model }}</pre>
226   - <z-scheme-form v-model="model" :list="list" label-width="80px">
227   - <template slot="name">
228   - <el-radio v-model="model.name" label="zs">张三</el-radio>
229   - <el-radio v-model="model.name" label="ls">李四</el-radio>
230   - </template>
231   - <template slot="age">
232   - <el-slider v-model="model.age"></el-slider>
233   - </template>
234   - </z-scheme-form>
235   - </div>
236   -</template>
237   -
238   -<script>
239   -export default {
240   - data() {
241   - return {
242   - model: { name: 'zs', age: 0 },
243   - list: [
244   - { type: 'el-input', label: '姓名', key: 'name' },
245   - { type: 'el-input', label: '年龄', key: 'age' },
246   - ]
247   - }
248   - },
249   -}
250   -</script>
251   -```
252   -
253   -:::
254   -
255   -</div>
256   -
257   -## API
258   -
259   -## Attribute 属性
260   -
261   -参数|说明|类型|可选值|默认值
262   --|-|-|-|-
263   -value | 值 | Object | - | -
264   -list | JSON Scheme配置项列表 | Array | - | []
265   -formClass | 表单class | String | - | -
266   -titleClass | 标题class | String | - | -
267   -contentClass | 内容class | String | - | -
268   -itemClass | 表单项class | String | - | -
269   -groupClass | 表单分组class | String | - | -
270   -labelWidth | 表单项标题宽度 | String | - | -
271   -labelPosition | 表单项标题位置 | String | - | top
272   -size | 大小 | String | - | small
273   -span | 占位 | Number | - | 24
274   -
275   -## Events 事件
276   -
277   -事件名称|说明|回调参数
278   --|-|-
279   -input | 表单值变化 | 表单model
280   -validate | 校验表单 | 是否通过,表单model
281 0 \ No newline at end of file
examples/views/docs/component/scheme-table.md
... ... @@ -1,156 +0,0 @@
1   -# Scheme Table 表格
2   -
3   -根据JSON Scheme配置自动生成表格
4   -
5   -## 基础用法
6   -
7   -配置`list`属性设置JSON Scheme配置列表
8   -
9   -::: snippet `tableProps`设置表格参数
10   -
11   -```html
12   -<template>
13   - <z-scheme-table v-model="tableData" :list="list" :tableProps="{ border: true }"></z-scheme-table>
14   -</template>
15   -
16   -<script>
17   -export default {
18   - data() {
19   - return {
20   - tableData: [
21   - { name: '张三', age: 16 },
22   - { name: '李四', age: 24 }
23   - ],
24   - list: [
25   - { label: '姓名', key: 'name' },
26   - { label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
27   - ]
28   - }
29   - }
30   -}
31   -</script>
32   -```
33   -
34   -:::
35   -
36   -## 自定义渲染
37   -
38   -配置`list`属性设置JSON Scheme配置列表
39   -
40   -<div class="code-snippet-box">
41   -
42   -::: snippet `render`函数式渲染
43   -
44   -```html
45   -<template>
46   - <z-scheme-table v-model="tableData" :list="list"></z-scheme-table>
47   -</template>
48   -
49   -<script>
50   -export default {
51   - data() {
52   - return {
53   - tableData: [
54   - { name: '张三', age: 16 },
55   - { name: '李四', age: 24 }
56   - ],
57   - list: [
58   - { label: '姓名', key: 'name', render: (h, { value }) => { return h('span', { style: { background: 'rgba(255, 0, 0, 0.5)', color: '#fff' } }, value) } },
59   - { label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
60   - ]
61   - }
62   - }
63   -}
64   -</script>
65   -```
66   -
67   -:::
68   -
69   -::: snippet `slot`插槽式渲染
70   -
71   -```html
72   -<template>
73   - <z-scheme-table v-model="tableData" :list="list">
74   - <template #value-age="{ value }">
75   - <el-tag v-if="value" :type="value > 16 ? 'success' : 'danger'" size="mini" disable-transitions>{{ value }}</el-tag>
76   - </template>
77   - </z-scheme-table>
78   -</template>
79   -
80   -<script>
81   -export default {
82   - data() {
83   - return {
84   - tableData: [
85   - { name: '张三', age: 16 },
86   - { name: '李四', age: 24 }
87   - ],
88   - list: [
89   - { type: 'el-input', label: '姓名', key: 'name' },
90   - { type: 'el-input-number', label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
91   - ]
92   - }
93   - }
94   -}
95   -</script>
96   -```
97   -
98   -:::
99   -
100   -</div>
101   -
102   -## 层级分组
103   -
104   -支持`group`分组,兼容form组件,使同一个scheme能够同时复用在`table`、`form`上
105   -
106   -::: snippet `group`设置分组,其中`key`设置分组对象名称
107   -
108   -```html
109   -<template>
110   - <z-scheme-table v-model="tableData" :list="list" :tableProps="{ border: true }"></z-scheme-table>
111   -</template>
112   -
113   -<script>
114   -export default {
115   - data() {
116   - return {
117   - tableData: [
118   - { name: '张三', age: 16, location: { city: '上海', address: '青浦区' } },
119   - { name: '李四', age: 24, location: { city: '北京', address: '朝阳区' } }
120   - ],
121   - list: [
122   - { label: '姓名', key: 'name' },
123   - { label: '年龄', key: 'age', props: { 'controls-position': 'right' } },
124   - {
125   - group: { key: 'location' },
126   - list: [
127   - { label: '城市', key: 'city' },
128   - ]
129   - },
130   - { label: '地址', key: 'location.address' },
131   - ]
132   - }
133   - }
134   -}
135   -</script>
136   -```
137   -
138   -:::
139   -
140   -## API
141   -
142   -## Attribute 属性
143   -
144   -参数|说明|类型|可选值|默认值
145   --|-|-|-|-
146   -value | 表格数据 | Array | - | -
147   -list | JSON Scheme配置项列表 | Array | - | []
148   -tableProps | 表格参数 | Object | - | -
149   -tableEvents | 表格参数 | Object | - | -
150   -minWidth | 列宽 | Number | - | -
151   -
152   -## Events 事件
153   -
154   -事件名称|说明|回调参数
155   --|-|-
156   -selection | 表格选中 | 选中项
157 0 \ No newline at end of file
examples/views/docs/component/scheme.md
... ... @@ -1,155 +0,0 @@
1   -# Scheme 方案
2   -
3   -根据JSON Scheme配置自动生成一个包含搜索条件、表格、编辑表单、详情表单的页面
4   -
5   -## 基础用法
6   -
7   -通过配置`JSON Scheme`快速生成CURD逻辑
8   -
9   -::: snippet 通过`list`配置项目
10   -
11   -```html
12   -<template>
13   - <z-scheme :list="list" :search-api="searchAPI" :get-api="getAPI" :submit-api="submitAPI" :delete-api="deleteAPI" auto real-selection>
14   - <el-table-column type="selection" align="center" width="40"></el-table-column>
15   - <template #header>
16   - <el-tabs v-model="activeName">
17   - <el-tab-pane label="待执行" name="wait"></el-tab-pane>
18   - <el-tab-pane label="已执行" name="done"></el-tab-pane>
19   - </el-tabs>
20   - </template>
21   - <template #button="{ size, openDialog }">
22   - <el-button :size="size" plain>删除</el-button>
23   - <el-button :size="size" plain @click="openDialog('other', '追加')">追加操作</el-button>
24   - </template>
25   - <template #dialog-other="{ model, closeDialog }">
26   - <el-tag type="success">其它页面</el-tag>
27   - <el-input
28   - type="textarea"
29   - :rows="2"
30   - placeholder="请输入内容"
31   - v-model="model.name">
32   - </el-input>
33   - <el-button @click="closeDialog">关闭弹出框</el-button>
34   - </template>
35   - </z-scheme>
36   -</template>
37   -
38   -<script>
39   -export default {
40   - data() {
41   - return {
42   - activeName: 'wait',
43   - list: [
44   - { type: 'el-input', label: '姓名', key: 'name', rules: [{ required: true, message: '请输入', trigger: 'change' }] },
45   - { type: 'el-input', label: '年龄', key: 'age' },
46   - ]
47   - }
48   - },
49   - methods: {
50   - searchAPI(params) {
51   - console.log(params);
52   - return new Promise(resolve => {
53   - setTimeout(() => {
54   - const list = [
55   - { id: '0', name: '李饼', age: 32, location: { lat: 0, lng: 0 } },
56   - { id: '1', name: '陈拾', age: 20 },
57   - { id: '2', name: '阿里巴巴', age: 24 },
58   - { id: '3', name: '王七', age: 26 },
59   - { id: '4', name: '崔倍', age: 27 },
60   - { id: '5', name: '孙豹', age: 38 },
61   - { id: '6', name: '庞柏', age: 42 },
62   - { id: '7', name: '蔡疏', age: 60 },
63   - { id: '8', name: '卢纳', age: 55 },
64   - ]
65   - resolve({
66   - result: list,
67   - totalCount: list.length
68   - });
69   - }, 1500);
70   - });
71   - },
72   - getAPI(row) {
73   - return new Promise((resolve, reject) => {
74   - setTimeout(() => {
75   - resolve({ ...row, name: `[${row.name}]` });
76   - }, 1500);
77   - });
78   - },
79   - submitAPI(model, config) {
80   - console.log(JSON.parse(JSON.stringify(model)));
81   - console.log(config);
82   - console.log('start');
83   - return new Promise((resolve, reject) => {
84   - setTimeout(() => {
85   - console.log('done');
86   - reject();
87   - }, 1500);
88   - });
89   - },
90   - deleteAPI() {
91   - return new Promise((resolve, reject) => {
92   - setTimeout(() => {
93   - resolve();
94   - }, 1500);
95   - });
96   - }
97   - }
98   -}
99   -</script>
100   -```
101   -
102   -:::
103   -
104   -## 内置接口逻辑
105   -
106   -如果CURD的接口都是同一路径下,可以使用内置接口逻辑快速对接
107   -
108   -::: snippet 通过`url`配置接口路径,`http`设置Promise形式的HTTP请求库
109   -
110   -```html
111   -<template>
112   - <z-scheme ref="scheme" :list="list" url="/customer" :http="$http" :alias="{ getUrl: '/getCustomerByCode', getKey: 'code' }" auto real-selection>
113   - <el-table-column type="selection" align="center" width="40"></el-table-column>
114   - <template #render-code="{ value, row, openView }">
115   - <el-link type="primary" @click="openView(row)">{{ value }}</el-link>
116   - </template>
117   - <template #view-name="{ value }">
118   - <el-tag size="mini">{{ value }}</el-tag>
119   - </template>
120   - <template #cell-name="{ value }">
121   - <el-tag size="mini" type="danger">{{ value }}</el-tag>
122   - </template>
123   - <template #form-id="{ value }">
124   - <el-tag size="mini">{{ value }}</el-tag>
125   - </template>
126   - </z-scheme>
127   -</template>
128   -
129   -<script>
130   -export default {
131   - data() {
132   - return {
133   - activeName: 'wait',
134   - list: [
135   - { type: 'el-input', label: 'ID', key: 'id', props: { disabled: true }, include: 'form', visible: () => this.$refs.scheme.dialogType === 'edit' },
136   - { type: 'el-input', label: '编号', key: 'code' },
137   - { type: 'el-input', label: '名称', key: 'name' },
138   - ]
139   - }
140   - },
141   - methods: {
142   - }
143   -}
144   -</script>
145   -```
146   -
147   -:::
148   -
149   -## API
150   -
151   -## Attribute 属性
152   -
153   -参数|说明|类型|可选值|默认值
154   --|-|-|-|-
155   -list | JSON Scheme配置项列表 | Array | - | []
examples/views/docs/develop/schema/schema-form.md 0 → 100644
... ... @@ -0,0 +1,75 @@
  1 +# Schema Form 方案表单
  2 +
  3 +通过配置JSON Schema的方式快速生成一个表单
  4 +
  5 +## 基础用法
  6 +
  7 +::: snippet 预置了许多业务逻辑,避免重复维护相同的业务逻辑
  8 +
  9 +```html
  10 +<template>
  11 + <div>
  12 + <div>{{ form }}</div>
  13 + <z-schema-form v-model="form" :schema="schema" @submit="onSubmit" @cancel="onCancel">
  14 + <template #error-name>
  15 + <div><span>请输入</span><el-tag size="mini">格式正确</el-tag><span>的姓名</span></div>
  16 + </template>
  17 + <template #label-packages>
  18 + <el-tooltip content="详情" placement="top" effect="light">
  19 + <i class="el-icon-question"></i>
  20 + </el-tooltip>
  21 + <span>包裹</span>
  22 + </template>
  23 + </z-schema-form>
  24 + </div>
  25 +</template>
  26 +
  27 +<script>
  28 +export default {
  29 + data() {
  30 + return {
  31 + form: {
  32 + name: '张三',
  33 + age: 27,
  34 + address: '上海市青浦区华新镇纪鹤公路1988号',
  35 + packages: ['零食'],
  36 + info: {
  37 + mobile: '18888888888',
  38 + }
  39 + },
  40 + schema: {
  41 + props: { labelWidth: '70px', size: 'small', span: 12 },
  42 + items: [
  43 + { is: 'el-input', prop: 'name', label: '姓名', rules: [{ required: true, message: '请输入姓名' }] },
  44 + { is: 'el-input-number', prop: 'age', label: '年龄' },
  45 + { is: 'el-input', prop: 'info.mobile', label: '电话' },
  46 + { is: 'el-divider', props: { 'content-position': 'left' }, render: '收货信息', span: 24, labelWidth: '0px' },
  47 + { is: 'el-input', props: { type: 'textarea' }, prop: 'address', label: '住址', span: 24 },
  48 + {
  49 + is: 'el-checkbox-group',
  50 + prop: 'packages',
  51 + label: '包裹',
  52 + children: [
  53 + { is: 'el-checkbox', props: { label: '零食' } },
  54 + { is: 'el-checkbox', props: { label: '手机' } },
  55 + { is: 'el-checkbox', props: { label: '电脑' } },
  56 + ],
  57 + span: 24
  58 + },
  59 + ]
  60 + },
  61 + };
  62 + },
  63 + methods: {
  64 + onSubmit(value) {
  65 + console.log(value);
  66 + },
  67 + onCancel() {
  68 + console.log('cancal');
  69 + }
  70 + }
  71 +};
  72 +</script>
  73 +```
  74 +
  75 +:::
0 76 \ No newline at end of file
... ...
examples/views/docs/develop/schema/schema-page.md 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +# Schema 方案开发
  2 +
  3 +通过配置JSON Schema的方式快速生成一些业务组件
  4 +
  5 +## 基础用法
0 6 \ No newline at end of file
... ...
examples/views/docs/develop/schema/schema-table.md 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +# Schema 方案开发
  2 +
  3 +通过配置JSON Schema的方式快速生成一些业务组件
  4 +
  5 +## 基础用法
0 6 \ No newline at end of file
... ...
examples/views/docs/develop/scheme/scheme.md
... ... @@ -1,5 +0,0 @@
1   -# Scheme 方案开发
2   -
3   -通过配置JSON Scheme的方式快速生成一些业务组件
4   -
5   -## 基础用法
6 0 \ No newline at end of file
lib/zee.css
1   -.el-image-viewer__close{color:#fff;background-color:rgba(0,0,0,.1);-webkit-transition:background-color .3s;transition:background-color .3s}.el-image-viewer__close:hover{background-color:rgba(0,0,0,.8)}.el-image-viewer__actions,.el-image-viewer__next,.el-image-viewer__prev{background-color:rgba(0,0,0,.5);-webkit-transition:background-color .3s;transition:background-color .3s}.el-image-viewer__actions:hover,.el-image-viewer__next:hover,.el-image-viewer__prev:hover{background-color:rgba(0,0,0,.8)}.el-image-viewer__actions{cursor:auto!important}.el-image-viewer__actions-btn{cursor:pointer}.el-image-viewer__img{cursor:-webkit-grab;cursor:grab}.el-image-viewer__img:active{cursor:-webkit-grabbing;cursor:grabbing}.el-image-viewer__indicator{min-width:60px;text-align:center;font-size:14px}.zee-filter__item.hidden{display:none}.zee-filter__button-group{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:right}.zee-form__flex-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.zee-form__group-title{font-weight:700;padding:15px 5px;border-bottom:1px solid #d9d9d9;margin-bottom:15px}.zee-form__group-content{margin:15px 0}.zee-form__footer{padding-top:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.zee-scheme__header{margin-bottom:10px}.zee-scheme__filter{border:1px solid #ebeef5;padding-top:10px;border-radius:4px;margin-bottom:10px}.zee-scheme__action{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;line-height:1}.zee-scheme__action .el-button+.el-button{margin-left:0}.zee-scheme__action .el-button{margin-right:10px;margin-bottom:10px}.zee-scheme__table-operation{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.zee-scheme__table-operation .el-button+.el-button{margin-left:0}.zee-scheme__table-operation .el-button{margin-right:10px;padding-top:6px;padding-bottom:6px}.zee-scheme__dialog-button{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-top:10px}.zee-scheme__dialog-button,.zee-scheme__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.zee-scheme__footer{margin-top:10px;text-align:right;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.zee-scheme__footer .selection-info{word-break:break-all;white-space:nowrap;font-size:12px;color:#606266}.zee-scheme__footer .selection-info .num{color:#000;font-weight:700;padding:0 5px;font-size:16px}.zee-scheme__footer .selection-info .el-button{margin-left:5px}.zee-scheme__footer .el-pagination{-webkit-box-flex:1;-ms-flex:auto;flex:auto}.zee-select .el-input__prefix{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.zee-select .el-input__prefix .el-icon-loading{font-size:16px}.zee-table{width:100%}.z-upload,.z-upload .el-upload-list.el-upload-list--picture-card{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.z-upload .el-upload-list__item-thumbnail--file{height:100%;width:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M176 160h304a472.432 472.432 0 0164 64l128 208a64 64 0 01-64 64H176a64 64 0 01-64-64V224a64 64 0 0164-64z' fill='%23A1CBFE'/%3E%3Cpath d='M176 288h688q64 0 64 64v432q0 64-64 64H176q-64 0-64-64V352q0-64 64-64z' fill='%234799FE'/%3E%3Cpath d='M336 688h368q32 0 32 32t-32 32H336q-32 0-32-32t32-32z' fill='%23FFF'/%3E%3Cpath d='M832 336h16q32 0 32 32v16q0 32-32 32h-16q-32 0-32-32v-16q0-32 32-32z' fill='%23A1CBFE'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;background-size:60%}.z-upload .el-upload-list__item-thumbnail--file.word{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='81' height='81'%3E%3Cpath d='M665.6 0l256 256v716.8a51.2 51.2 0 01-51.2 51.2H153.6a51.2 51.2 0 01-51.2-51.2V51.2A51.2 51.2 0 01153.6 0zM284.16 360.96l94.72 330.24h56.32l64-248.32h2.56l64 248.32h56.32l94.72-330.24h-61.44l-61.44 250.88h-2.56l-64-250.88h-56.32L409.6 611.84h-2.56L345.6 360.96z' fill='%234E97FF'/%3E%3Cpath d='M665.6 0l256 256h-256z' fill='%23A4D2FF'/%3E%3C/svg%3E")}.z-upload .el-upload-list__item-thumbnail--file.excel{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='81' height='81'%3E%3Cpath d='M139.456 0c-8.896 0-22.24 4.48-35.616 13.344-13.344 8.928-13.344 26.72-13.344 35.616v921.6c0 13.376 4.48 26.72 13.344 35.648 13.376 13.344 26.72 17.792 35.616 17.792h752.448c13.344 0 26.688-4.48 35.616-13.344 8.896-8.928 8.896-22.272 8.896-35.616V289.376L651.488 0h-512z' fill='%235ACC9B'/%3E%3Cpath d='M936.416 289.376h-231.52c-13.344 0-26.72-4.448-35.616-13.344-8.896-8.896-13.344-22.272-13.344-35.616V0l280.48 289.376z' fill='%23BDEBD7'/%3E%3Cpath d='M477.824 538.72L362.08 378.432h80.128l75.712 115.776 80.128-115.776h75.68L557.984 538.72l124.64 173.632H598.08L517.952 587.68l-84.608 124.672h-80.16z' fill='%23FFF'/%3E%3C/svg%3E")}.z-upload .el-upload-list__item-thumbnail--file.ppt{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='81' height='81'%3E%3Cpath d='M880.085 1017.43h-736.17a58.539 58.539 0 01-58.582-58.283V58.283C85.333 26.368 111.445 0 143.915 0h513.024l281.728 288.768v670.379c0 32.298-26.112 58.282-58.582 58.282z' fill='%23FF9540'/%3E%3Cpath d='M644.437 0a15.36 15.36 0 00-1.152 6.059v229.888c0 32.554 27.179 59.434 60.928 59.434h234.454v-.384L645.632 0h-1.195z' fill='%23FFF' fill-opacity='.496'/%3E%3Cpath d='M511.403 573.355h-55.51v115.882h-75.178V361.045h137.898c80.086 2.219 121.6 36.608 124.63 103.894 1.152 72.149-42.667 108.373-131.84 108.373zm-6.016-154.368h-49.494v97.92h49.494c38.912-.768 58.922-17.195 60.074-48.982-1.152-31.744-21.162-47.829-60.074-48.938z' fill='%23FFF'/%3E%3C/svg%3E")}.z-upload .el-upload-list__item-thumbnail--file.pdf{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='81' height='81'%3E%3Cpath d='M136.533 0a49.12 49.12 0 00-35.84 15.36C91.307 25.6 85.333 38.4 85.333 51.2v921.6a49.12 49.12 0 0015.36 35.84 50.547 50.547 0 0035.84 15.36h750.933a49.12 49.12 0 0035.84-15.36 50.547 50.547 0 0015.36-35.84V290.133L648.533 0z' fill='%23FF5562'/%3E%3Cpath d='M938.666 290.133H699.733a52.493 52.493 0 01-51.2-51.2V0z' fill='%23FFBBC0'/%3E%3Cpath d='M708.266 865.333c-53.76 0-101.6-92.213-127.146-152-42.667-17.92-89.6-34.133-134.827-45.226-40.106 26.56-107.52 65.76-159.626 65.76-32.427 0-55.467-16.214-64-44.374-6.827-23.04-.854-39.253 5.973-47.786q20.48-28.16 84.48-28.16c34.133 0 77.653 5.973 126.293 17.92a762.026 762.026 0 0091.307-75.094c-12.8-59.733-26.453-156.16 8.533-200.533 17.067-21.333 43.52-28.16 75.094-18.773 34.986 10.24 47.786 31.573 52 47.786 14.506 58.027-52 136.534-97.334 182.667 10.24 40.107 23.04 81.92 39.254 120.32 65.066 28.96 141.813 71.627 150.4 118.56 3.413 16.213-1.707 31.573-14.507 44.373-11.094 9.333-23.04 14.507-35.84 14.507zm-79.36-129.706C661.334 801.333 692 832 708.267 832c2.56 0 5.974-.853 11.094-5.12 5.973-5.973 5.973-10.24 5.12-13.653-3.414-17.067-30.667-45.227-95.573-77.654zm-315.733-87.894c-41.813 0-53.76 10.24-57.173 14.507-.853 1.707-4.267 5.973-.853 17.92 2.56 10.24 9.333 20.48 31.573 20.48 27.307 0 66.56-15.36 112.64-42.667-33.333-6.826-62.293-10.24-86.187-10.24zm168.96-5.12a921.586 921.586 0 0181.92 27.307c-9.333-24.747-17.066-50.347-23.893-75.093-18.773 16.213-38.4 32.426-58.027 47.786zM588 366.933c-9.333 0-16.213 3.414-22.187 10.24-17.92 22.187-19.626 78.507-5.973 150.187 52-55.467 80.213-106.667 73.333-133.973-.853-4.267-4.266-16.214-28.16-23.04A46.413 46.413 0 00588 366.933z' fill='%23FFF'/%3E%3C/svg%3E")}.z-upload .el-upload-list__item-thumbnail--file.zip{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='81' height='81'%3E%3Cpath d='M61.156 685.511h910.222V921.6c0 28.444-24.178 52.622-52.622 52.622H113.778c-28.445 0-52.622-24.178-52.622-52.622V685.511z' fill='%2389D543'/%3E%3Cpath d='M61.156 352.711h910.222v332.8H61.156z' fill='%23FA6A68'/%3E%3Cpath d='M113.778 64h804.978c28.444 0 52.622 24.178 52.622 52.622v236.09H61.156v-236.09C61.156 88.178 85.333 64 113.778 64z' fill='%2360CEF8'/%3E%3Cpath d='M391.111 64H652.8v910.222H391.111z' fill='%23FDB84B'/%3E%3Cpath d='M760.889 442.311v-28.444H270.222v193.422H760.89V442.31zm-35.556 8.533v122.312H305.778V450.844h419.555z' fill='%23FFF'/%3E%3C/svg%3E")}.z-upload .el-upload-list__item-wrapper{position:relative;display:inline-block;margin-right:10px}.z-upload .el-upload-list__item{margin-right:0!important}.z-upload .corner-close{position:absolute;top:0;right:0;-webkit-transform:translateX(50%) translateY(-50%);transform:translateX(50%) translateY(-50%);height:30px;width:30px;min-width:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(248,107,115,.5);color:#fff;border-radius:50%;z-index:20;font-size:16px;cursor:pointer}.z-upload .corner-close:hover{background-color:#f5222d}.z-upload .el-upload--picture-card{line-height:1.5;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.z-upload .el-upload--picture-card,.z-upload .el-upload-list--picture-card .el-upload-list__item-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.z-upload .el-upload-list--picture-card .el-upload-list__item-actions{-ms-flex-pack:distribute;justify-content:space-around}.z-upload .el-upload-list--picture-card .el-upload-list__item-actions .el-upload-list__item-delete,.z-upload .el-upload-list--picture-card .el-upload-list__item-actions .el-upload-list__item-preview{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.z-upload .el-upload-list--picture-card .el-upload-list__item-actions span+span{margin-left:0}.z-upload .el-upload-list--picture-card .el-upload-list__item-actions:after{display:none}.z-upload .el-upload-list--picture-card .el-upload-list__item-actions .block-download,.z-upload .el-upload-list--picture-card .el-upload-list__item-actions .block-preview{height:100%;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer}.z-upload .el-upload-dragger{height:100%;width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border:none;background-color:transparent}.z-upload .el-upload-dragger.is-dragover{border-color:transparent}.z-upload.mini .el-upload--picture-card,.z-upload.mini .el-upload-list--picture-card .el-upload-list__item{height:60px;width:60px}.z-upload.mini .el-upload--picture-card i{font-size:20px}.z-upload.mini .corner-close{height:20px;width:20px;min-width:20px;font-size:12px}.z-upload.small .el-upload--picture-card,.z-upload.small .el-upload-list--picture-card .el-upload-list__item{height:100px;width:100px}.z-upload.small .corner-close{height:24px;width:24px;min-width:24px;font-size:14px}.z-upload .el-upload-list--picture-card .el-upload-list__item-thumbnail{-o-object-fit:cover;object-fit:cover}
2 1 \ No newline at end of file
  2 +.el-image-viewer__close{color:#fff;background-color:rgba(0,0,0,.1);-webkit-transition:background-color .3s;transition:background-color .3s}.el-image-viewer__close:hover{background-color:rgba(0,0,0,.8)}.el-image-viewer__actions,.el-image-viewer__next,.el-image-viewer__prev{background-color:rgba(0,0,0,.5);-webkit-transition:background-color .3s;transition:background-color .3s}.el-image-viewer__actions:hover,.el-image-viewer__next:hover,.el-image-viewer__prev:hover{background-color:rgba(0,0,0,.8)}.el-image-viewer__actions{cursor:auto!important}.el-image-viewer__actions-btn{cursor:pointer}.el-image-viewer__img{cursor:-webkit-grab;cursor:grab}.el-image-viewer__img:active{cursor:-webkit-grabbing;cursor:grabbing}.el-image-viewer__indicator{min-width:60px;text-align:center;font-size:14px}.zee-filter__item.hidden{display:none}.zee-filter__button-group{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:right}.zee-form__flex-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.zee-form__group-title{font-weight:700;padding:15px 5px;border-bottom:1px solid #d9d9d9;margin-bottom:15px}.zee-form__group-content{margin:15px 0}.zee-form__footer{padding-top:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.zee-schema__header{margin-bottom:10px}.zee-schema__filter{border:1px solid #ebeef5;padding-top:10px;border-radius:4px;margin-bottom:10px}.zee-schema__action{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;line-height:1}.zee-schema__action .el-button+.el-button{margin-left:0}.zee-schema__action .el-button{margin-right:10px;margin-bottom:10px}.zee-schema__table-operation{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.zee-schema__table-operation .el-button+.el-button{margin-left:0}.zee-schema__table-operation .el-button{margin-right:10px;padding-top:6px;padding-bottom:6px}.zee-schema__dialog-button{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-top:10px}.zee-schema__dialog-button,.zee-schema__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.zee-schema__footer{margin-top:10px;text-align:right;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.zee-schema__footer .selection-info{word-break:break-all;white-space:nowrap;font-size:12px;color:#606266}.zee-schema__footer .selection-info .num{color:#000;font-weight:700;padding:0 5px;font-size:16px}.zee-schema__footer .selection-info .el-button{margin-left:5px}.zee-schema__footer .el-pagination{-webkit-box-flex:1;-ms-flex:auto;flex:auto}.zee-select .el-input__prefix{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.zee-select .el-input__prefix .el-icon-loading{font-size:16px}.zee-table{width:100%}.z-upload,.z-upload .el-upload-list.el-upload-list--picture-card{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.z-upload .el-upload-list__item-thumbnail--file{height:100%;width:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M176 160h304a472.432 472.432 0 0164 64l128 208a64 64 0 01-64 64H176a64 64 0 01-64-64V224a64 64 0 0164-64z' fill='%23A1CBFE'/%3E%3Cpath d='M176 288h688q64 0 64 64v432q0 64-64 64H176q-64 0-64-64V352q0-64 64-64z' fill='%234799FE'/%3E%3Cpath d='M336 688h368q32 0 32 32t-32 32H336q-32 0-32-32t32-32z' fill='%23FFF'/%3E%3Cpath d='M832 336h16q32 0 32 32v16q0 32-32 32h-16q-32 0-32-32v-16q0-32 32-32z' fill='%23A1CBFE'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;background-size:60%}.z-upload .el-upload-list__item-thumbnail--file.word{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='81' height='81'%3E%3Cpath d='M665.6 0l256 256v716.8a51.2 51.2 0 01-51.2 51.2H153.6a51.2 51.2 0 01-51.2-51.2V51.2A51.2 51.2 0 01153.6 0zM284.16 360.96l94.72 330.24h56.32l64-248.32h2.56l64 248.32h56.32l94.72-330.24h-61.44l-61.44 250.88h-2.56l-64-250.88h-56.32L409.6 611.84h-2.56L345.6 360.96z' fill='%234E97FF'/%3E%3Cpath d='M665.6 0l256 256h-256z' fill='%23A4D2FF'/%3E%3C/svg%3E")}.z-upload .el-upload-list__item-thumbnail--file.excel{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='81' height='81'%3E%3Cpath d='M139.456 0c-8.896 0-22.24 4.48-35.616 13.344-13.344 8.928-13.344 26.72-13.344 35.616v921.6c0 13.376 4.48 26.72 13.344 35.648 13.376 13.344 26.72 17.792 35.616 17.792h752.448c13.344 0 26.688-4.48 35.616-13.344 8.896-8.928 8.896-22.272 8.896-35.616V289.376L651.488 0h-512z' fill='%235ACC9B'/%3E%3Cpath d='M936.416 289.376h-231.52c-13.344 0-26.72-4.448-35.616-13.344-8.896-8.896-13.344-22.272-13.344-35.616V0l280.48 289.376z' fill='%23BDEBD7'/%3E%3Cpath d='M477.824 538.72L362.08 378.432h80.128l75.712 115.776 80.128-115.776h75.68L557.984 538.72l124.64 173.632H598.08L517.952 587.68l-84.608 124.672h-80.16z' fill='%23FFF'/%3E%3C/svg%3E")}.z-upload .el-upload-list__item-thumbnail--file.ppt{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='81' height='81'%3E%3Cpath d='M880.085 1017.43h-736.17a58.539 58.539 0 01-58.582-58.283V58.283C85.333 26.368 111.445 0 143.915 0h513.024l281.728 288.768v670.379c0 32.298-26.112 58.282-58.582 58.282z' fill='%23FF9540'/%3E%3Cpath d='M644.437 0a15.36 15.36 0 00-1.152 6.059v229.888c0 32.554 27.179 59.434 60.928 59.434h234.454v-.384L645.632 0h-1.195z' fill='%23FFF' fill-opacity='.496'/%3E%3Cpath d='M511.403 573.355h-55.51v115.882h-75.178V361.045h137.898c80.086 2.219 121.6 36.608 124.63 103.894 1.152 72.149-42.667 108.373-131.84 108.373zm-6.016-154.368h-49.494v97.92h49.494c38.912-.768 58.922-17.195 60.074-48.982-1.152-31.744-21.162-47.829-60.074-48.938z' fill='%23FFF'/%3E%3C/svg%3E")}.z-upload .el-upload-list__item-thumbnail--file.pdf{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='81' height='81'%3E%3Cpath d='M136.533 0a49.12 49.12 0 00-35.84 15.36C91.307 25.6 85.333 38.4 85.333 51.2v921.6a49.12 49.12 0 0015.36 35.84 50.547 50.547 0 0035.84 15.36h750.933a49.12 49.12 0 0035.84-15.36 50.547 50.547 0 0015.36-35.84V290.133L648.533 0z' fill='%23FF5562'/%3E%3Cpath d='M938.666 290.133H699.733a52.493 52.493 0 01-51.2-51.2V0z' fill='%23FFBBC0'/%3E%3Cpath d='M708.266 865.333c-53.76 0-101.6-92.213-127.146-152-42.667-17.92-89.6-34.133-134.827-45.226-40.106 26.56-107.52 65.76-159.626 65.76-32.427 0-55.467-16.214-64-44.374-6.827-23.04-.854-39.253 5.973-47.786q20.48-28.16 84.48-28.16c34.133 0 77.653 5.973 126.293 17.92a762.026 762.026 0 0091.307-75.094c-12.8-59.733-26.453-156.16 8.533-200.533 17.067-21.333 43.52-28.16 75.094-18.773 34.986 10.24 47.786 31.573 52 47.786 14.506 58.027-52 136.534-97.334 182.667 10.24 40.107 23.04 81.92 39.254 120.32 65.066 28.96 141.813 71.627 150.4 118.56 3.413 16.213-1.707 31.573-14.507 44.373-11.094 9.333-23.04 14.507-35.84 14.507zm-79.36-129.706C661.334 801.333 692 832 708.267 832c2.56 0 5.974-.853 11.094-5.12 5.973-5.973 5.973-10.24 5.12-13.653-3.414-17.067-30.667-45.227-95.573-77.654zm-315.733-87.894c-41.813 0-53.76 10.24-57.173 14.507-.853 1.707-4.267 5.973-.853 17.92 2.56 10.24 9.333 20.48 31.573 20.48 27.307 0 66.56-15.36 112.64-42.667-33.333-6.826-62.293-10.24-86.187-10.24zm168.96-5.12a921.586 921.586 0 0181.92 27.307c-9.333-24.747-17.066-50.347-23.893-75.093-18.773 16.213-38.4 32.426-58.027 47.786zM588 366.933c-9.333 0-16.213 3.414-22.187 10.24-17.92 22.187-19.626 78.507-5.973 150.187 52-55.467 80.213-106.667 73.333-133.973-.853-4.267-4.266-16.214-28.16-23.04A46.413 46.413 0 00588 366.933z' fill='%23FFF'/%3E%3C/svg%3E")}.z-upload .el-upload-list__item-thumbnail--file.zip{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='81' height='81'%3E%3Cpath d='M61.156 685.511h910.222V921.6c0 28.444-24.178 52.622-52.622 52.622H113.778c-28.445 0-52.622-24.178-52.622-52.622V685.511z' fill='%2389D543'/%3E%3Cpath d='M61.156 352.711h910.222v332.8H61.156z' fill='%23FA6A68'/%3E%3Cpath d='M113.778 64h804.978c28.444 0 52.622 24.178 52.622 52.622v236.09H61.156v-236.09C61.156 88.178 85.333 64 113.778 64z' fill='%2360CEF8'/%3E%3Cpath d='M391.111 64H652.8v910.222H391.111z' fill='%23FDB84B'/%3E%3Cpath d='M760.889 442.311v-28.444H270.222v193.422H760.89V442.31zm-35.556 8.533v122.312H305.778V450.844h419.555z' fill='%23FFF'/%3E%3C/svg%3E")}.z-upload .el-upload-list__item-wrapper{position:relative;display:inline-block;margin-right:10px}.z-upload .el-upload-list__item{margin-right:0!important}.z-upload .corner-close{position:absolute;top:0;right:0;-webkit-transform:translateX(50%) translateY(-50%);transform:translateX(50%) translateY(-50%);height:30px;width:30px;min-width:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(248,107,115,.5);color:#fff;border-radius:50%;z-index:20;font-size:16px;cursor:pointer}.z-upload .corner-close:hover{background-color:#f5222d}.z-upload .el-upload--picture-card{line-height:1.5;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.z-upload .el-upload--picture-card,.z-upload .el-upload-list--picture-card .el-upload-list__item-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.z-upload .el-upload-list--picture-card .el-upload-list__item-actions{-ms-flex-pack:distribute;justify-content:space-around}.z-upload .el-upload-list--picture-card .el-upload-list__item-actions .el-upload-list__item-delete,.z-upload .el-upload-list--picture-card .el-upload-list__item-actions .el-upload-list__item-preview{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.z-upload .el-upload-list--picture-card .el-upload-list__item-actions span+span{margin-left:0}.z-upload .el-upload-list--picture-card .el-upload-list__item-actions:after{display:none}.z-upload .el-upload-list--picture-card .el-upload-list__item-actions .block-download,.z-upload .el-upload-list--picture-card .el-upload-list__item-actions .block-preview{height:100%;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer}.z-upload .el-upload-dragger{height:100%;width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border:none;background-color:transparent}.z-upload .el-upload-dragger.is-dragover{border-color:transparent}.z-upload.mini .el-upload--picture-card,.z-upload.mini .el-upload-list--picture-card .el-upload-list__item{height:60px;width:60px}.z-upload.mini .el-upload--picture-card i{font-size:20px}.z-upload.mini .corner-close{height:20px;width:20px;min-width:20px;font-size:12px}.z-upload.small .el-upload--picture-card,.z-upload.small .el-upload-list--picture-card .el-upload-list__item{height:100px;width:100px}.z-upload.small .corner-close{height:24px;width:24px;min-width:24px;font-size:14px}.z-upload .el-upload-list--picture-card .el-upload-list__item-thumbnail{-o-object-fit:cover;object-fit:cover}
3 3 \ No newline at end of file
... ...
lib/zee.js
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["zee"]=e(require("vue")):t["zee"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},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 r=n("b622"),i=r("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},"0366":function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"057f":function(t,e,n){var r=n("fc6a"),i=n("241c").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return i(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?c(t):i(r(t))}},"06cf":function(t,e,n){var r=n("83ab"),i=n("d1e7"),o=n("5c6c"),a=n("fc6a"),c=n("c04e"),s=n("5135"),l=n("0cfb"),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=a(t),e=c(e,!0),l)try{return u(t,e)}catch(n){}if(s(t,e))return o(!i.f.call(t,e),t[e])}},"07ac":function(t,e,n){var r=n("23e7"),i=n("6f53").values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},"0a36":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-form",t._b({ref:"form",staticClass:"zee-form",class:t.formClass,attrs:{size:t.size,model:t.formModel,"label-width":t.labelWidth,"label-position":t.labelPosition||t.labelWidth?"right":"top"}},"el-form",t.formProps,!1),[n("form-render",{attrs:{"title-class":t.titleClass,"content-class":t.contentClass,"item-class":t.itemClass,"col-class":t.colClass,"group-class":t.groupClass,list:t.formList,value:t.model,model:t.model,span:t.span,type:t.type,params:t.params},on:{"item-change":t.onItemChange,"form-item-change":t.onFormItemChange,"item-update":t.onItemUpdate}},[t._l(t.slotKeys,(function(e){return t._t(e,null,{slot:e})}))],2),t.$scopedSlots.footer?n("div",{staticClass:"zee-form__footer"},[t._t("footer",null,{size:t.size,validate:t.validate,reset:t.reset,model:t.model})],2):t._e()],1)},i=[],o=(n("99af"),n("4160"),n("d81d"),n("a9e3"),n("4fad"),n("b64b"),n("d3b7"),n("e6cf"),n("159b"),n("5530")),a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.rowComponent,{tag:"component",staticClass:"zee-form__flex-wrap"},[t._l(t.list,(function(e,r){return[e.group&&e.list?n(t.colComponent,{key:r,tag:"component",class:t.colClassRender(e,r,t.colClass),style:{width:"div"===t.type?"100%":void 0},attrs:{span:"div"===t.type?void 0:e.group.span||24}},[n(t.rowComponent,{tag:"component",staticClass:"zee-form__flex-wrap",class:t.groupClass||"zee-form__group"},[e.group.title?n(t.rowComponent,{tag:"component",class:t.titleClass||"zee-form__group-title",staticStyle:{width:"100%"}},[t._v(" "+t._s(e.group.title||e.group)+" ")]):t._e(),n("form-render",{class:t.contentClass||"zee-form__group-content",attrs:{"title-class":t.titleClass,"item-class":t.itemClass,"content-class":t.contentClass,"group-class":t.groupClass,list:e.list,value:t.value,model:t.itemKey?t.model[t.itemKey]||{}:t.model,itemKey:e.group.key,type:t.type,span:"div"===t.type?void 0:t.span*(24/(e.group.span||24))},on:{"item-change":t.onItemChange,"form-item-change":t.onFormItemChange,"item-update":t.onItemUpdate}})],1)],1):[t.bindItemVisible(e,"visible")?n(t.colComponent,{directives:[{name:"show",rawName:"v-show",value:t.bindItemVisible(e,"show"),expression:"bindItemVisible(item, 'show')"}],key:r,tag:"component",class:t.colClassRender(e,r,t.colClass),style:{width:"div"===t.type&&e.style&&e.style.width.includes("%")?e.style.width:void 0,paddingRight:"10px"},attrs:{span:"div"===t.type?void 0:e.span||t.span}},[n("el-form-item",{class:t.itemClass||"zee-form__item",attrs:{label:e.label,"label-width":e.labelWidth,prop:e.fullKey,rules:t._f("bindItemRulesFilter")(e,t.model)}},[t.$scopedSlots[e.fullKey]?t._t(e.fullKey,null,{value:t.itemValue(e),model1:t.value}):["function"===typeof e.type?n("dynamic-render",{attrs:{render:e.type(t.$createElement,{model:t.value,config:{props:Object.assign({},t.propsFormatter(e.props),{value:t.itemValue(e)}),style:e.style||{width:"100%"},on:Object.assign({},t.bindItemEvent(e),{input:function(n){return t.onInput({value:n,item:e})}})}})}}):n(e.type,t._g(t._b({tag:"component",style:e.style||{width:"100%"},attrs:{value:t.itemValue(e)},on:{input:function(n){return t.onInput({value:n,item:e})}}},"component",t.propsFormatter(e.props),!1),t.bindItemEvent(e)))]],2)],1):t._e()]]}))],2)},c=[],s=n("ade3"),l={functional:!0,render:function(t,e){return e.props.render}},u={name:"FormRender",components:{DynamicRender:l},props:{list:Array,model:Object,value:Object,itemKey:String,titleClass:String,contentClass:String,itemClass:String,colClass:[String,Function],groupClass:String,type:String,span:Number,params:Object},computed:{rowComponent:function(){return"div"===this.type?"div":"el-row"},colComponent:function(){return"div"===this.type?"div":"el-col"}},filters:{bindItemRulesFilter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return t.rules?"function"===typeof t.rules?t.rules(e):t.rules:void 0}},methods:{colClassRender:function(t,e,n){return n instanceof Function?n(t,e):n},itemValue:function(t){if(this.itemKey){var e=this.model[this.itemKey]||{};return e[t.key]}return this.model[t.key]},onInput:function(t){var e=t.value,n=t.item;this.itemKey?this.$emit("item-change",Object(s["a"])({},this.itemKey,Object(o["a"])(Object(o["a"])({},this.model[this.itemKey]),{},Object(s["a"])({},n.key,e)))):this.$emit("item-change",Object(s["a"])({},n.key,e)),this.$emit("form-item-change",Object(s["a"])({},n.fullKey,e))},onItemChange:function(t){this.itemKey?this.$emit("item-change",Object(s["a"])({},this.itemKey,Object(o["a"])(Object(o["a"])({},this.model[this.itemKey]),t))):this.$emit("item-change",t)},onFormItemChange:function(t){this.$emit("form-item-change",t)},onItemUpdate:function(t){this.$emit("item-update",t)},bindItemEvent:function(t){var e=this;return t.on?"function"===typeof t.on?t.on({model:this.value,update:function(t){return e.$emit("item-update",t)}}):t.on:void 0},bindItemVisible:function(t,e){var n=t[e];return"function"===typeof n?n(this.model,this.params||{}):!1!==t[e]},propsFormatter:function(t){return"function"===typeof t?t(this.model,this.params||{}):t||{}}}},f=u,d=n("2877"),p=Object(d["a"])(f,a,c,!1,null,null,null),h=p.exports,v=n("0d12"),m={name:"Form",components:{FormRender:h},props:{value:Object,list:Array,formClass:String,titleClass:String,contentClass:String,itemClass:String,colClass:[String,Function],groupClass:String,labelWidth:String,labelPosition:String,type:String,size:{type:String,default:"small"},span:{type:Number,default:24},formProps:{type:Object,default:function(){return{}}},params:Object},data:function(){return{model:{},formModel:{},formList:[]}},computed:{slotKeys:function(){return Object.keys(this.$scopedSlots)}},watch:{value:{handler:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.model=t,this.setFormModel(t)},immediate:!0},list:{handler:function(t){var e=Object(v["a"])(this.list),n=function t(e,n){e.forEach((function(e){e.group&&e.list?(e.group.key?e.fullKey="".concat(n?"".concat(n,"-").concat(e.group.key):e.group.key):e.fullKey=n||e.key,t(e.list,e.fullKey)):e.fullKey="".concat(n?"".concat(n,"-").concat(e.key):e.key)}))};n(e),this.formList=e},immediate:!0}},methods:{handleInput:function(t){console.log(t)},onItemChange:function(t){this.$emit("input",Object(o["a"])(Object(o["a"])({},this.model),t))},onFormItemChange:function(t){this.formModel=Object(o["a"])(Object(o["a"])({},this.formModel),t)},validate:function(t){var e=this;return new Promise((function(n){e.$refs.form.validate((function(r){return t&&t(r),e.$emit("validate",r,e.model),n(r)}))}))},reset:function(){this.$refs.form.clearValidate(),this.$emit("reset")},setFormModel:function(t){var e={},n=function t(n,r){n.forEach((function(n){n.fullKey="".concat(r?"".concat(r,"-").concat(n.key):n.key),n.value instanceof Object?t(Object.keys(n.value).map((function(t){return{key:t,value:n.value[t]}})),n.fullKey):e[n.fullKey]=n.value}))};n(Object.keys(t).map((function(e){return{key:e,value:t[e]}}))),this.formModel=e},onItemUpdate:function(t){var e=this;this.$nextTick((function(){var n=Object(v["a"])(e.model);Object.entries(t).forEach((function(t){Object(v["c"])(n,t[0],t[1])})),e.$emit("input",n)}))}}},g=m,b=(n("c631"),Object(d["a"])(g,r,i,!1,null,null,null));e["default"]=b.exports},"0cfb":function(t,e,n){var r=n("83ab"),i=n("d039"),o=n("cc12");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0d12":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a}));n("4de4"),n("13d5"),n("a9e3"),n("4d63"),n("ac1f"),n("25f0"),n("1276");var r=n("53ca"),i=function t(e){if("object"!==Object(r["a"])(e))return e;if(!e)return e;if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(e instanceof Function)return e;var n;if(e instanceof Array){n=[];for(var i=0,o=e.length;i<o;i++)n.push(t(e[i]));return n}for(var a in n={},e)Object.prototype.hasOwnProperty.call(e,a)&&("object"!==Object(r["a"])(e[a])?n[a]=e[a]:n[a]=t(e[a]));return n},o=function(t,e){if(void 0===e||"string"===typeof e){if("undefined"!==typeof t&&"string"===typeof e){var n=/[.\[\]'"]/g,r=e.split(n).filter((function(t){return""!==t}));t=r.reduce((function(t,e){return t&&void 0!==t[e]?t[e]:void 0}),t)}return t}},a=function(t,e,n){var r=/[.\[\]'"]/g,i=e.split(r).filter((function(t){return""!==t})),o=i.pop();i.reduce((function(t,e){return(t&&void 0===t[e]||null===t[e])&&(t[e]=isNaN(Number(o))?{}:[]),t[e]}),t)[o]=n}},"0fa5":function(t,e,n){},1148:function(t,e,n){"use strict";var r=n("a691"),i=n("1d80");t.exports="".repeat||function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},1276:function(t,e,n){"use strict";var r=n("d784"),i=n("44e7"),o=n("825a"),a=n("1d80"),c=n("4840"),s=n("8aa5"),l=n("50c4"),u=n("14c3"),f=n("9263"),d=n("d039"),p=[].push,h=Math.min,v=4294967295,m=!d((function(){return!RegExp(v,"y")}));r("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(a(this)),o=void 0===n?v:n>>>0;if(0===o)return[];if(void 0===t)return[r];if(!i(t))return e.call(r,t,o);var c,s,l,u=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,m=new RegExp(t.source,d+"g");while(c=f.call(m,r)){if(s=m.lastIndex,s>h&&(u.push(r.slice(h,c.index)),c.length>1&&c.index<r.length&&p.apply(u,c.slice(1)),l=c[0].length,h=s,u.length>=o))break;m.lastIndex===c.index&&m.lastIndex++}return h===r.length?!l&&m.test("")||u.push(""):u.push(r.slice(h)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=a(this),o=void 0==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var a=n(r,t,this,i,r!==e);if(a.done)return a.value;var f=o(t),d=String(this),p=c(f,RegExp),g=f.unicode,b=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(m?"y":"g"),y=new p(m?f:"^(?:"+f.source+")",b),w=void 0===i?v:i>>>0;if(0===w)return[];if(0===d.length)return null===u(y,d)?[d]:[];var x=0,_=0,S=[];while(_<d.length){y.lastIndex=m?_:0;var O,j=u(y,m?d:d.slice(_));if(null===j||(O=h(l(y.lastIndex+(m?0:_)),d.length))===x)_=s(d,_,g);else{if(S.push(d.slice(x,_)),S.length===w)return S;for(var E=1;E<=j.length-1;E++)if(S.push(j[E]),S.length===w)return S;_=x=O}}return S.push(d.slice(x)),S}]}),!m)},"129f":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},"13d5":function(t,e,n){"use strict";var r=n("23e7"),i=n("d58f").left,o=n("a640"),a=n("ae40"),c=o("reduce"),s=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!s},{reduce:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"142b":function(t,e,n){t.exports={primary:"#f39800",blue:"#2f54eb","blue-light":"#69c0ff","blue-hover":"#e6f7ff",red:"#f5222d",green:"#26aa58","green-light":"#5edd8e",orange:"#ff9852",gray:"#343434",grey:"#8c8c8c",purple:"#722ed1",cyan:"#13c2c2",black:"#000",text:"#314659",border:"#e8e8e8","border-light":"rgba(232,232,232,.2)",background:"#fff"}},"14c3":function(t,e,n){var r=n("c6b6"),i=n("9263");t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var o=n.call(t,e);if("object"!==typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},"159b":function(t,e,n){var r=n("da84"),i=n("fdbc"),o=n("17c2"),a=n("9112");for(var c in i){var s=r[c],l=s&&s.prototype;if(l&&l.forEach!==o)try{a(l,"forEach",o)}catch(u){l.forEach=o}}},"17c2":function(t,e,n){"use strict";var r=n("b727").forEach,i=n("a640"),o=n("ae40"),a=i("forEach"),c=o("forEach");t.exports=a&&c?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,n){var r=n("b622"),i=r("iterator"),o=!1;try{var a=0,c={next:function(){return{done:!!a++}},return:function(){o=!0}};c[i]=function(){return this},Array.from(c,(function(){throw 2}))}catch(s){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var r={};r[i]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(s){}return n}},"1cdc":function(t,e,n){var r=n("342f");t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,n){var r=n("d039"),i=n("b622"),o=n("2d00"),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[],n=e.constructor={};return n[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},2266:function(t,e,n){var r=n("825a"),i=n("e95a"),o=n("50c4"),a=n("0366"),c=n("35a1"),s=n("9bdd"),l=function(t,e){this.stopped=t,this.result=e},u=t.exports=function(t,e,n,u,f){var d,p,h,v,m,g,b,y=a(e,n,u?2:1);if(f)d=t;else{if(p=c(t),"function"!=typeof p)throw TypeError("Target is not iterable");if(i(p)){for(h=0,v=o(t.length);v>h;h++)if(m=u?y(r(b=t[h])[0],b[1]):y(t[h]),m&&m instanceof l)return m;return new l(!1)}d=p.call(t)}g=d.next;while(!(b=g.call(d)).done)if(m=s(d,y,b.value,u),"object"==typeof m&&m&&m instanceof l)return m;return new l(!1)};u.stop=function(t){return new l(!0,t)}},"23cb":function(t,e,n){var r=n("a691"),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},"23e7":function(t,e,n){var r=n("da84"),i=n("06cf").f,o=n("9112"),a=n("6eeb"),c=n("ce4e"),s=n("e893"),l=n("94ca");t.exports=function(t,e){var n,u,f,d,p,h,v=t.target,m=t.global,g=t.stat;if(u=m?r:g?r[v]||c(v,{}):(r[v]||{}).prototype,u)for(f in e){if(p=e[f],t.noTargetGet?(h=i(u,f),d=h&&h.value):d=u[f],n=l(m?f:v+(g?".":"#")+f,t.forced),!n&&void 0!==d){if(typeof p===typeof d)continue;s(p,d)}(t.sham||d&&d.sham)&&o(p,"sham",!0),a(u,f,p,t)}}},"241c":function(t,e,n){var r=n("ca84"),i=n("7839"),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},2532:function(t,e,n){"use strict";var r=n("23e7"),i=n("5a34"),o=n("1d80"),a=n("ab13");r({target:"String",proto:!0,forced:!a("includes")},{includes:function(t){return!!~String(o(this)).indexOf(i(t),arguments.length>1?arguments[1]:void 0)}})},"25f0":function(t,e,n){"use strict";var r=n("6eeb"),i=n("825a"),o=n("d039"),a=n("ad6d"),c="toString",s=RegExp.prototype,l=s[c],u=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),f=l.name!=c;(u||f)&&r(RegExp.prototype,c,(function(){var t=i(this),e=String(t.source),n=t.flags,r=String(void 0===n&&t instanceof RegExp&&!("flags"in s)?a.call(t):n);return"/"+e+"/"+r}),{unsafe:!0})},2626:function(t,e,n){"use strict";var r=n("d066"),i=n("9bf2"),o=n("b622"),a=n("83ab"),c=o("species");t.exports=function(t){var e=r(t),n=i.f;a&&e&&!e[c]&&n(e,c,{configurable:!0,get:function(){return this}})}},2877:function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,c){var s,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),a?(s=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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=s):i&&(s=c?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),s)if(l.functional){l._injectStyles=s;var u=l.render;l.render=function(t,e){return s.call(e),u(t,e)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,s):[s]}return{exports:t,options:l}}n.d(e,"a",(function(){return r}))},2909:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t){if(Array.isArray(t))return r(t)}n.d(e,"a",(function(){return s}));n("a4d3"),n("e01a"),n("d28b"),n("a630"),n("e260"),n("d3b7"),n("3ca3"),n("ddb0");function o(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}n("fb6a"),n("b0c0"),n("25f0");function a(t,e){if(t){if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t){return i(t)||o(t)||a(t)||c()}},"2cf4":function(t,e,n){var r,i,o,a=n("da84"),c=n("d039"),s=n("c6b6"),l=n("0366"),u=n("1be4"),f=n("cc12"),d=n("1cdc"),p=a.location,h=a.setImmediate,v=a.clearImmediate,m=a.process,g=a.MessageChannel,b=a.Dispatch,y=0,w={},x="onreadystatechange",_=function(t){if(w.hasOwnProperty(t)){var e=w[t];delete w[t],e()}},S=function(t){return function(){_(t)}},O=function(t){_(t.data)},j=function(t){a.postMessage(t+"",p.protocol+"//"+p.host)};h&&v||(h=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return w[++y]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(y),y},v=function(t){delete w[t]},"process"==s(m)?r=function(t){m.nextTick(S(t))}:b&&b.now?r=function(t){b.now(S(t))}:g&&!d?(i=new g,o=i.port2,i.port1.onmessage=O,r=l(o.postMessage,o,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||c(j)||"file:"===p.protocol?r=x in f("script")?function(t){u.appendChild(f("script"))[x]=function(){u.removeChild(this),_(t)}}:function(t){setTimeout(S(t),0)}:(r=j,a.addEventListener("message",O,!1))),t.exports={set:h,clear:v}},"2d00":function(t,e,n){var r,i,o=n("da84"),a=n("342f"),c=o.process,s=c&&c.versions,l=s&&s.v8;l?(r=l.split("."),i=r[0]+r[1]):a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(i=r[1]))),t.exports=i&&+i},"32e7":function(t,e,n){t.exports={primary:"#f39800",blue:"#2f54eb","blue-light":"#69c0ff","blue-hover":"#e6f7ff",red:"#f5222d",green:"#26aa58","green-light":"#5edd8e",orange:"#ff9852",gray:"#343434",grey:"#8c8c8c",purple:"#722ed1",cyan:"#13c2c2",black:"#000",text:"#314659",border:"#e8e8e8","border-light":"rgba(232,232,232,.2)",background:"#fff"}},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"35a1":function(t,e,n){var r=n("f5df"),i=n("3f8c"),o=n("b622"),a=o("iterator");t.exports=function(t){if(void 0!=t)return t[a]||t["@@iterator"]||i[r(t)]}},3782:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("z-form",{staticClass:"zee-filter",attrs:{list:t.formattedList,span:t.span,labelWidth:t.labelWidth,colClass:t.colVisibleRender,size:t.size,formProps:t.formProps,params:t.params},model:{value:t.model,callback:function(e){t.model=e},expression:"model"}},[t._l(t.slotKeys,(function(e){return["operation"===e?[t._t(e,null,{slot:e},{size:t.size,handleSearch:t.handleSearch,handleReset:t.handleReset,handleCollapse:t.handleCollapse,showCollapsed:t.showCollapsed,collapsed:t.collapsed,loading:t.loading})]:t._t(e,null,{slot:e})]})),t.slotKeys.includes("operation")?t._e():n("div",{staticClass:"zee-filter__button-group",attrs:{slot:"operation"},slot:"operation"},[n("el-button-group",{attrs:{size:t.size}},[n("el-button",{attrs:{type:"primary",loading:t.loading,icon:"el-icon-search"},on:{click:t.handleSearch}},[n("span",[t._v("查询")])]),n("el-button",{on:{click:t.handleReset}},[n("span",[t._v("重置")])]),t.showCollapsed?n("el-button",{on:{click:t.handleCollapse}},[n("span",[t._v(t._s(t.collapsed?"展开":"收起"))])]):t._e()],1)],1)],2)},i=[],o=(n("99af"),n("a9e3"),n("b64b"),n("2909")),a={name:"Filter",props:{value:Object,list:Array,labelWidth:{type:String,default:"110px"},size:{type:String,default:"small"},span:{type:Number,default:6},collapsedSpan:{type:Number,default:6},uncollapsedSpan:{type:Number,default:24},visibleNum:{type:Number,default:3},loading:Boolean,formProps:{type:Object,default:function(){return{}}},params:Object},data:function(){return{collapsed:!0,model:this.value||{}}},watch:{value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.model=t},model:function(t){this.$emit("input",t)}},computed:{formattedList:function(){return[].concat(Object(o["a"])(this.list),[{key:"operation",label:"",labelWidth:"0px",span:this.collapsed?this.collapsedSpan:this.uncollapsedSpan}])},showCollapsed:function(){var t=this.list,e=this.visibleNum;return t.length>e},slotKeys:function(){return Object.keys(this.$scopedSlots)}},methods:{colVisibleRender:function(t,e){if(this.collapsed){var n=this.visibleNum?this.visibleNum-1:2;return e>n&&e<this.list.length?"zee-filter__item hidden":"zee-filter__item"}return"zee-filter__item"},handleSearch:function(){this.$emit("search",this.model)},handleReset:function(){this.model={},this.$emit("reset")},handleCollapse:function(){this.collapsed=!this.collapsed}}},c=a,s=(n("53aa"),n("2877")),l=Object(s["a"])(c,r,i,!1,null,null,null);e["default"]=l.exports},"37e8":function(t,e,n){var r=n("83ab"),i=n("9bf2"),o=n("825a"),a=n("df75");t.exports=r?Object.defineProperties:function(t,e){o(t);var n,r=a(e),c=r.length,s=0;while(c>s)i.f(t,n=r[s++],e[n]);return t}},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3ca3":function(t,e,n){"use strict";var r=n("6547").charAt,i=n("69f3"),o=n("7dd0"),a="String Iterator",c=i.set,s=i.getterFor(a);o(String,"String",(function(t){c(this,{type:a,string:String(t),index:0})}),(function(){var t,e=s(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},"3f8c":function(t,e){t.exports={}},"408a":function(t,e,n){var r=n("c6b6");t.exports=function(t){if("number"!=typeof t&&"Number"!=r(t))throw TypeError("Incorrect invocation");return+t}},4160:function(t,e,n){"use strict";var r=n("23e7"),i=n("17c2");r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"428f":function(t,e,n){var r=n("da84");t.exports=r},"44ad":function(t,e,n){var r=n("d039"),i=n("c6b6"),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),i=n("7c73"),o=n("9bf2"),a=r("unscopables"),c=Array.prototype;void 0==c[a]&&o.f(c,a,{configurable:!0,value:i(null)}),t.exports=function(t){c[a][t]=!0}},"44de":function(t,e,n){var r=n("da84");t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},"44e7":function(t,e,n){var r=n("861d"),i=n("c6b6"),o=n("b622"),a=o("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==i(t))}},"45fc":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").some,o=n("a640"),a=n("ae40"),c=o("some"),s=a("some");r({target:"Array",proto:!0,forced:!c||!s},{some:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"466d":function(t,e,n){"use strict";var r=n("d784"),i=n("825a"),o=n("50c4"),a=n("1d80"),c=n("8aa5"),s=n("14c3");r("match",1,(function(t,e,n){return[function(e){var n=a(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var a=i(t),l=String(this);if(!a.global)return s(a,l);var u=a.unicode;a.lastIndex=0;var f,d=[],p=0;while(null!==(f=s(a,l))){var h=String(f[0]);d[p]=h,""===h&&(a.lastIndex=c(l,o(a.lastIndex),u)),p++}return 0===p?null:d}]}))},4840:function(t,e,n){var r=n("825a"),i=n("1c0b"),o=n("b622"),a=o("species");t.exports=function(t,e){var n,o=r(t).constructor;return void 0===o||void 0==(n=r(o)[a])?e:i(n)}},4930:function(t,e,n){var r=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},"498a":function(t,e,n){"use strict";var r=n("23e7"),i=n("58a8").trim,o=n("c8d2");r({target:"String",proto:!0,forced:o("trim")},{trim:function(){return i(this)}})},"4d63":function(t,e,n){var r=n("83ab"),i=n("da84"),o=n("94ca"),a=n("7156"),c=n("9bf2").f,s=n("241c").f,l=n("44e7"),u=n("ad6d"),f=n("9f7f"),d=n("6eeb"),p=n("d039"),h=n("69f3").set,v=n("2626"),m=n("b622"),g=m("match"),b=i.RegExp,y=b.prototype,w=/a/g,x=/a/g,_=new b(w)!==w,S=f.UNSUPPORTED_Y,O=r&&o("RegExp",!_||S||p((function(){return x[g]=!1,b(w)!=w||b(x)==x||"/a/i"!=b(w,"i")})));if(O){var j=function(t,e){var n,r=this instanceof j,i=l(t),o=void 0===e;if(!r&&i&&t.constructor===j&&o)return t;_?i&&!o&&(t=t.source):t instanceof j&&(o&&(e=u.call(t)),t=t.source),S&&(n=!!e&&e.indexOf("y")>-1,n&&(e=e.replace(/y/g,"")));var c=a(_?new b(t,e):b(t,e),r?this:y,j);return S&&n&&h(c,{sticky:n}),c},E=function(t){t in j||c(j,t,{configurable:!0,get:function(){return b[t]},set:function(e){b[t]=e}})},C=s(b),k=0;while(C.length>k)E(C[k++]);y.constructor=j,j.prototype=y,d(i,"RegExp",j)}v("RegExp")},"4d64":function(t,e,n){var r=n("fc6a"),i=n("50c4"),o=n("23cb"),a=function(t){return function(e,n,a){var c,s=r(e),l=i(s.length),u=o(a,l);if(t&&n!=n){while(l>u)if(c=s[u++],c!=c)return!0}else for(;l>u;u++)if((t||u in s)&&s[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").filter,o=n("1dde"),a=n("ae40"),c=o("filter"),s=a("filter");r({target:"Array",proto:!0,forced:!c||!s},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(t,e,n){"use strict";var r=n("0366"),i=n("7b0b"),o=n("9bdd"),a=n("e95a"),c=n("50c4"),s=n("8418"),l=n("35a1");t.exports=function(t){var e,n,u,f,d,p,h=i(t),v="function"==typeof this?this:Array,m=arguments.length,g=m>1?arguments[1]:void 0,b=void 0!==g,y=l(h),w=0;if(b&&(g=r(g,m>2?arguments[2]:void 0,2)),void 0==y||v==Array&&a(y))for(e=c(h.length),n=new v(e);e>w;w++)p=b?g(h[w],w):h[w],s(n,w,p);else for(f=y.call(h),d=f.next,n=new v;!(u=d.call(f)).done;w++)p=b?o(f,g,[u.value,w],!0):u.value,s(n,w,p);return n.length=w,n}},"4fad":function(t,e,n){var r=n("23e7"),i=n("6f53").entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},"50c4":function(t,e,n){var r=n("a691"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},5265:function(t,e,n){t.exports={primary:"#f39800",blue:"#2f54eb","blue-light":"#69c0ff","blue-hover":"#e6f7ff",red:"#f5222d",green:"#26aa58","green-light":"#5edd8e",orange:"#ff9852",gray:"#343434",grey:"#8c8c8c",purple:"#722ed1",cyan:"#13c2c2",black:"#000",text:"#314659",border:"#e8e8e8","border-light":"rgba(232,232,232,.2)",background:"#fff"}},5319:function(t,e,n){"use strict";var r=n("d784"),i=n("825a"),o=n("7b0b"),a=n("50c4"),c=n("a691"),s=n("1d80"),l=n("8aa5"),u=n("14c3"),f=Math.max,d=Math.min,p=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g,m=function(t){return void 0===t?t:String(t)};r("replace",2,(function(t,e,n,r){var g=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,b=r.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,r){var i=s(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!g&&b||"string"===typeof r&&-1===r.indexOf(y)){var o=n(e,t,this,r);if(o.done)return o.value}var s=i(t),p=String(this),h="function"===typeof r;h||(r=String(r));var v=s.global;if(v){var x=s.unicode;s.lastIndex=0}var _=[];while(1){var S=u(s,p);if(null===S)break;if(_.push(S),!v)break;var O=String(S[0]);""===O&&(s.lastIndex=l(p,a(s.lastIndex),x))}for(var j="",E=0,C=0;C<_.length;C++){S=_[C];for(var k=String(S[0]),I=f(d(c(S.index),p.length),0),A=[],P=1;P<S.length;P++)A.push(m(S[P]));var L=S.groups;if(h){var T=[k].concat(A,I,p);void 0!==L&&T.push(L);var $=String(r.apply(void 0,T))}else $=w(k,p,I,A,L,r);I>=E&&(j+=p.slice(E,I)+$,E=I+k.length)}return j+p.slice(E)}];function w(t,n,r,i,a,c){var s=r+t.length,l=i.length,u=v;return void 0!==a&&(a=o(a),u=h),e.call(c,u,(function(e,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return e;if(u>l){var f=p(u/10);return 0===f?e:f<=l?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):e}c=i[u-1]}return void 0===c?"":c}))}}))},"53aa":function(t,e,n){"use strict";var r=n("5a90"),i=n.n(r);i.a},"53ca":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n("a4d3"),n("e01a"),n("d28b"),n("e260"),n("d3b7"),n("3ca3"),n("ddb0");function r(t){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}},5423:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-table",t._g(t._b({ref:"table",staticClass:"zee-table",attrs:{data:t.tableData},on:{select:t.onSelect,"select-all":t.onSelectAll,"selection-change":t.onSelectionChange}},"el-table",Object.assign({},{size:t.size},t.tableProps),!1),t.tableEvents),[t._t("default"),t.tableList&&t.tableList.length>0?[t._l(t.tableList,(function(e,r){return[t.bindItemVisible(e.visible)?[t.$scopedSlots[e.keyPath.join("-")]?t._t(e.keyPath.join("-"),null,null,e):n("el-table-column",t._b({key:r,attrs:{prop:e.fullKey||e.key,"min-width":t.minWidth||e.minWidth||e["min-width"]},scopedSlots:t._u([{key:"default",fn:function(r){var i=r.row,o=r.column,a=r.$index;return[n("cell-render",{attrs:{row:i,item:e}},[t.$scopedSlots["value-"+e.keyPath.join("-")]?t._t("value-"+e.keyPath.join("-"),null,{row:i,value:t.$_get(i,e.fullKey),column:o,index:a},e):e.render?n("cell-value-render",{attrs:{row:i,column:o,index:a,item:e}}):t._e()],2)]}}],null,!0)},"el-table-column",Object.assign({},e,{type:void 0}),!1))]:t._e()]}))]:t._e(),t._t("column-append"),t._t("column-end")],2)},i=[],o=(n("99af"),n("7db0"),n("4160"),n("a9e3"),n("ac1f"),n("1276"),n("159b"),n("5530")),a=n("0d12"),c={props:{row:Object,column:Object,index:[Number,String],item:Object},render:function(t){var e=this.row,n=this.column,r=this.index,i=this.item;return"function"===typeof i.render?i.render(t,{row:e,value:Object(a["b"])(e,i.fullKey),$index:r,column:n}):i.render.children instanceof Function?t(i.render.type,{props:i.render.props,attrs:i.render.props,style:i.render.style},i.render.children({row:e,value:Object(a["b"])(e,i.fullKey),$index:r,column:n})):t(i.render.type,{props:i.render.props,attrs:i.render.props,style:i.render.style},i.render.children||Object(a["b"])(e,i.fullKey))}},s={name:"Table",components:{CellRender:{props:{row:Object,item:Object},render:function(t){return this.$scopedSlots.default?t("span",this.$scopedSlots.default()):t("span",Object(a["b"])(this.row,this.item.agentKey||this.item.fullKey))}},CellValueRender:c},props:{value:Array,list:{type:Array,required:!0},tableProps:{type:Object,default:function(){return{}}},tableEvents:Object,minWidth:Number,size:{type:String,default:"small"}},data:function(){return{tableList:[],tableData:[]}},computed:{instance:{get:function(){return this.$refs.table}}},watch:{value:{handler:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tableData=t},immediate:!0},list:{handler:function(t){var e=Object(a["a"])(this.list),n=function t(e,n){e.forEach((function(e){e.group&&e.list?(e.group.key?e.fullKey="".concat(n?"".concat(n,".").concat(e.group.key):e.group.key):e.fullKey=n||e.key,t(e.list,e.fullKey)):e.fullKey="".concat(n?"".concat(n,".").concat(e.key):e.key)}))};n(e);var r=[],i=function t(e){e.forEach((function(e){e.group&&e.list?t(e.list):e.group||e.list||r.push(Object(o["a"])(Object(o["a"])({},e),{},{keyPath:e.fullKey.split(".")}))}))};i(e),this.tableList=r},immediate:!0}},methods:{$_get:a["b"],bindItemVisible:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=t;return"function"===typeof t&&(e=t(this.tableData)),e},onSelect:function(t,e){t.find((function(t){return t.id===e.id}))?this.$emit("selection-change",[e],"check"):this.$emit("selection-change",[e],"uncheck")},onSelectAll:function(t){t&&t.length>0?this.$emit("selection-change",t,"check"):this.$emit("selection-change",this.tableData,"uncheck")},onSelectionChange:function(t){this.$emit("selection",t)},toggleRowSelection:function(t,e){this.$refs.table&&this.$refs.table.toggleRowSelection(t,e)},clearSelection:function(){this.$refs.table&&this.$refs.table.clearSelection()}}},l=s,u=(n("8ffb"),n("2877")),f=Object(u["a"])(l,r,i,!1,null,null,null);e["default"]=f.exports},5530:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));n("a4d3"),n("4de4"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b");var r=n("ade3");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){Object(r["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},5692:function(t,e,n){var r=n("c430"),i=n("c6cd");(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),i=n("241c"),o=n("7418"),a=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},5899:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(t,e,n){var r=n("1d80"),i=n("5899"),o="["+i+"]",a=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),s=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(c,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},"5a34":function(t,e,n){var r=n("44e7");t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},"5a90":function(t,e,n){},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"60da":function(t,e,n){"use strict";var r=n("83ab"),i=n("d039"),o=n("df75"),a=n("7418"),c=n("d1e7"),s=n("7b0b"),l=n("44ad"),u=Object.assign,f=Object.defineProperty;t.exports=!u||i((function(){if(r&&1!==u({b:1},u(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||o(u({},e)).join("")!=i}))?function(t,e){var n=s(t),i=arguments.length,u=1,f=a.f,d=c.f;while(i>u){var p,h=l(arguments[u++]),v=f?o(h).concat(f(h)):o(h),m=v.length,g=0;while(m>g)p=v[g++],r&&!d.call(h,p)||(n[p]=h[p])}return n}:u},6547:function(t,e,n){var r=n("a691"),i=n("1d80"),o=function(t){return function(e,n){var o,a,c=String(i(e)),s=r(n),l=c.length;return s<0||s>=l?t?"":void 0:(o=c.charCodeAt(s),o<55296||o>56319||s+1===l||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):o:t?c.slice(s,s+2):a-56320+(o-55296<<10)+65536)}};t.exports={codeAt:o(!1),charAt:o(!0)}},"65f0":function(t,e,n){var r=n("861d"),i=n("e8b5"),o=n("b622"),a=o("species");t.exports=function(t,e){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?r(n)&&(n=n[a],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"69f3":function(t,e,n){var r,i,o,a=n("7f9a"),c=n("da84"),s=n("861d"),l=n("9112"),u=n("5135"),f=n("f772"),d=n("d012"),p=c.WeakMap,h=function(t){return o(t)?i(t):r(t,{})},v=function(t){return function(e){var n;if(!s(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(a){var m=new p,g=m.get,b=m.has,y=m.set;r=function(t,e){return y.call(m,t,e),e},i=function(t){return g.call(m,t)||{}},o=function(t){return b.call(m,t)}}else{var w=f("state");d[w]=!0,r=function(t,e){return l(t,w,e),e},i=function(t){return u(t,w)?t[w]:{}},o=function(t){return u(t,w)}}t.exports={set:r,get:i,has:o,enforce:h,getterFor:v}},"6eeb":function(t,e,n){var r=n("da84"),i=n("9112"),o=n("5135"),a=n("ce4e"),c=n("8925"),s=n("69f3"),l=s.get,u=s.enforce,f=String(String).split("String");(t.exports=function(t,e,n,c){var s=!!c&&!!c.unsafe,l=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||i(n,"name",e),u(n).source=f.join("string"==typeof e?e:"")),t!==r?(s?!d&&t[e]&&(l=!0):delete t[e],l?t[e]=n:i(t,e,n)):l?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||c(this)}))},"6f53":function(t,e,n){var r=n("83ab"),i=n("df75"),o=n("fc6a"),a=n("d1e7").f,c=function(t){return function(e){var n,c=o(e),s=i(c),l=s.length,u=0,f=[];while(l>u)n=s[u++],r&&!a.call(c,n)||f.push(t?[n,c[n]]:c[n]);return f}};t.exports={entries:c(!0),values:c(!1)}},7156:function(t,e,n){var r=n("861d"),i=n("d2bb");t.exports=function(t,e,n){var o,a;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(t,a),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),i=n("5135"),o=n("e538"),a=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r,i=n("825a"),o=n("37e8"),a=n("7839"),c=n("d012"),s=n("1be4"),l=n("cc12"),u=n("f772"),f=">",d="<",p="prototype",h="script",v=u("IE_PROTO"),m=function(){},g=function(t){return d+h+f+t+d+"/"+h+f},b=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){var t,e=l("iframe"),n="java"+h+":";return e.style.display="none",s.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(g("document.F=Object")),t.close(),t.F},w=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}w=r?b(r):y();var t=a.length;while(t--)delete w[p][a[t]];return w()};c[v]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(m[p]=i(t),n=new m,m[p]=null,n[v]=t):n=w(),void 0===e?n:o(n,e)}},"7db0":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").find,o=n("44d2"),a=n("ae40"),c="find",s=!0,l=a(c);c in[]&&Array(1)[c]((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!l},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(c)},"7dd0":function(t,e,n){"use strict";var r=n("23e7"),i=n("9ed3"),o=n("e163"),a=n("d2bb"),c=n("d44e"),s=n("9112"),l=n("6eeb"),u=n("b622"),f=n("c430"),d=n("3f8c"),p=n("ae93"),h=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,m=u("iterator"),g="keys",b="values",y="entries",w=function(){return this};t.exports=function(t,e,n,u,p,x,_){i(n,e,u);var S,O,j,E=function(t){if(t===p&&P)return P;if(!v&&t in I)return I[t];switch(t){case g:return function(){return new n(this,t)};case b:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this)}},C=e+" Iterator",k=!1,I=t.prototype,A=I[m]||I["@@iterator"]||p&&I[p],P=!v&&A||E(p),L="Array"==e&&I.entries||A;if(L&&(S=o(L.call(new t)),h!==Object.prototype&&S.next&&(f||o(S)===h||(a?a(S,h):"function"!=typeof S[m]&&s(S,m,w)),c(S,C,!0,!0),f&&(d[C]=w))),p==b&&A&&A.name!==b&&(k=!0,P=function(){return A.call(this)}),f&&!_||I[m]===P||s(I,m,P),d[e]=P,p)if(O={values:E(b),keys:x?P:E(g),entries:E(y)},_)for(j in O)(v||k||!(j in I))&&l(I,j,O[j]);else r({target:e,proto:!0,forced:v||k},O);return O}},"7f9a":function(t,e,n){var r=n("da84"),i=n("8925"),o=r.WeakMap;t.exports="function"===typeof o&&/native code/.test(i(o))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("c04e"),i=n("9bf2"),o=n("5c6c");t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},"841c":function(t,e,n){"use strict";var r=n("d784"),i=n("825a"),o=n("1d80"),a=n("129f"),c=n("14c3");r("search",1,(function(t,e,n){return[function(e){var n=o(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var o=i(t),s=String(this),l=o.lastIndex;a(l,0)||(o.lastIndex=0);var u=c(o,s);return a(o.lastIndex,l)||(o.lastIndex=l),null===u?-1:u.index}]}))},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8875:function(t,e,n){var r,i,o;(function(n,a){i=[],r=a,o="function"===typeof r?r.apply(e,i):r,void 0===o||(t.exports=o)})("undefined"!==typeof self&&self,(function(){function t(){const e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,c=o.exec(p.stack)||a.exec(p.stack),s=c&&c[1]||!1,l=c&&c[2]||!1,u=document.location.href.replace(document.location.hash,""),f=document.getElementsByTagName("script");s===u&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=n.replace(r,"$1").trim());for(var d=0;d<f.length;d++){if("interactive"===f[d].readyState)return f[d];if(f[d].src===s)return f[d];if(s===u&&f[d].innerHTML&&f[d].innerHTML.trim()===i)return f[d]}return null}}return t}))},8925:function(t,e,n){var r=n("c6cd"),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},"8aa5":function(t,e,n){"use strict";var r=n("6547").charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"8bbf":function(e,n){e.exports=t},"8ffb":function(t,e,n){"use strict";var r=n("0fa5"),i=n.n(r);i.a},"90e1":function(t,e,n){"use strict";var r=n("32e7"),i=n.n(r);i.a},"90e3":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},9112:function(t,e,n){var r=n("83ab"),i=n("9bf2"),o=n("5c6c");t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9134:function(t,e,n){"use strict";var r=n("b14d"),i=n.n(r);i.a},9263:function(t,e,n){"use strict";var r=n("ad6d"),i=n("9f7f"),o=RegExp.prototype.exec,a=String.prototype.replace,c=o,s=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),l=i.UNSUPPORTED_Y||i.BROKEN_CARET,u=void 0!==/()??/.exec("")[1],f=s||u||l;f&&(c=function(t){var e,n,i,c,f=this,d=l&&f.sticky,p=r.call(f),h=f.source,v=0,m=t;return d&&(p=p.replace("y",""),-1===p.indexOf("g")&&(p+="g"),m=String(t).slice(f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==t[f.lastIndex-1])&&(h="(?: "+h+")",m=" "+m,v++),n=new RegExp("^(?:"+h+")",p)),u&&(n=new RegExp("^"+h+"$(?!\\s)",p)),s&&(e=f.lastIndex),i=o.call(d?n:f,m),d?i?(i.input=i.input.slice(v),i[0]=i[0].slice(v),i.index=f.lastIndex,f.lastIndex+=i[0].length):f.lastIndex=0:s&&i&&(f.lastIndex=f.global?i.index+i[0].length:e),u&&i&&i.length>1&&a.call(i[0],n,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(i[c]=void 0)})),i}),t.exports=c},"93c0":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"zee-scheme"},[t.$scopedSlots.header||t.$slots.header?n("div",{staticClass:"zee-scheme__header"},[t._t("header",null,{filterModel:t.filterModel},t._slotScope)],2):t._e(),t.filter?n("div",{staticClass:"zee-scheme__filter"},[n("z-filter",t._b({attrs:{value:t._filterModel,list:t._f("noRulesFilter")(t.filterList||t.listMap.filter),size:t.size,loading:t.loading,params:t._slotScope},on:{input:t.onFilterInput,search:t.onSearch}},"z-filter",t.filterProps,!1))],1):t._e(),t.action?n("div",{staticClass:"zee-scheme__action"},[t.hadSlot("action")?t._t("action",null,null,t._slotScope):[n("el-button",{attrs:{size:t.size,type:"primary"},on:{click:t.openNew}},[t._v("新增")]),n("el-button",{attrs:{size:t.size,plain:"",disabled:0===t.selection.length},on:{click:function(e){return t.handleDeleteMul(t.selection)}}},[t._v("删除")]),t._t("button",null,null,t._slotScope)]],2):t._e(),n("div",{staticClass:"zee-scheme__table"},[n("z-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",attrs:{list:t.tableList||t.listMap.table,tableProps:Object.assign({},{border:!0,"row-key":"id","highlight-current-row":!0},t.tableProps),size:t.size},on:{"selection-change":t.onTableSelectionChange,selection:t.onTableSelection},scopedSlots:t._u([{key:"column-end",fn:function(){return[t._t("column-end",null,{slot:"column-end"},t._slotScope),t.operation?n("el-table-column",t._b({attrs:{prop:"$operation",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return n("div",{staticClass:"zee-scheme__table-operation"},[t._t("operation-button",null,null,Object.assign({},t._slotScope,{slotScope:e})),n("el-button",{attrs:{type:"text",icon:"el-icon-edit",title:"编辑"},on:{click:function(n){return t.openEdit(e.row)}}}),n("el-popconfirm",{attrs:{confirmButtonText:"确定",cancelButtonText:"取消",title:"确定删除吗?",placement:"top"},on:{confirm:function(n){return t.handleDelete([e.row])}}},[n("el-button",{attrs:{slot:"reference",type:"text",icon:"el-icon-delete",title:"删除"},slot:"reference"})],1),t._t("operation-button-append",null,null,Object.assign({},t._slotScope,{slotScope:e}))],2)}}],null,!0)},"el-table-column",Object.assign({},{width:100,fixed:"right"},t.operationProps),!1)):t._e()]},proxy:!0}],null,!0),model:{value:t.tableData,callback:function(e){t.tableData=e},expression:"tableData"}},[t._t("default"),t._l(t.renderList,(function(e,r){return[t.$scopedSlots["cell-"+e.fullKey]?[n("el-table-column",t._b({key:"table-cell-"+r,attrs:{slot:e.fullKey,prop:e.agentKey||e.key},slot:e.fullKey,scopedSlots:t._u([{key:"default",fn:function(n){var r=n.row,i=n.column,o=n.$index;return[t._t("cell-"+e.fullKey,null,{row:r,value:r[e.key],column:i,index:o},Object.assign({},e,t._slotScope))]}}],null,!0)},"el-table-column",e,!1))]:t.$scopedSlots["render-"+e.fullKey]?[n("el-table-column",t._b({key:"table-render-"+r,attrs:{slot:e.fullKey,prop:e.agentKey||e.key},slot:e.fullKey,scopedSlots:t._u([{key:"default",fn:function(n){var r=n.row,i=n.column,o=n.$index;return[t._t("render-"+e.fullKey,null,{row:r,value:r[e.key],column:i,index:o},Object.assign({},e,t._slotScope))]}}],null,!0)},"el-table-column",e,!1))]:t._e()]})),t._t("column-append",null,{slot:"column-append"},t._slotScope)],2)],1),n("div",{staticClass:"zee-scheme__footer"},[t.selection.length>0?n("div",{staticClass:"selection-info"},[n("span",[t._v("已选中")]),n("span",{staticClass:"num"},[t._v(t._s(t.selection.length))]),n("span",[t._v("项")]),n("el-popconfirm",{attrs:{confirmButtonText:"确定",cancelButtonText:"取消",title:"确定清除吗?",placement:"top"},on:{confirm:t.clearSelection}},[n("el-button",{attrs:{slot:"reference",size:t.size,type:"text"},slot:"reference"},[t._v("清除")])],1)],1):t._e(),t.pagination?n("el-pagination",{attrs:{"current-page":t.currentPage,"page-sizes":t.pageSizes,"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}):t._e()],1),n("el-dialog",t._b({attrs:{visible:t.dialogVisible,title:t.dialogTitle,"destroy-on-close":"","append-to-body":"","lock-scroll":!1,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e},closed:t.onDialogClosed,close:t.onDialogClose}},"el-dialog",t._dialogProps,!1),[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.dialogLoading,expression:"dialogLoading"}]},[t.hadSlot("dialog-title")?t._t("dialog-title",null,{slot:"title",dialogType:t.dialogType},t._slotScope):t._e(),t.dialogRender?[t.hadSlot("dialog-"+t.dialogType)?t._t("dialog-"+t.dialogType,null,{model:t._formModel},t._slotScope):[["new","edit"].includes(t.dialogType)?[n("z-form",t._b({ref:"form",attrs:{value:t._formModel,list:t.formList||t.listMap.form,params:t._slotScope},on:{input:t.onFormInput,validate:t.onFormValidate}},"z-form",Object.assign({},{span:12,"label-width":"110px"},t.formProps),!1),[t._l(t.renderList,(function(e){return[t.$scopedSlots["form-"+e.fullKey]?[t._t("form-"+e.fullKey,null,{slot:e.fullKey,value:t.get(t._formModel,e.fullKey),row:t._formModel,model:t._formModel},t._slotScope)]:t._e()]}))],2)]:[n("z-form",t._b({ref:"form",staticClass:"zee-scheme__view",attrs:{value:t._formModel,list:t._f("noRulesFilter")(t._f("viewTypeFilter")(t.viewList||t.listMap.form)),params:t._slotScope}},"z-form",Object.assign({},{span:12,"label-width":"110px"},t.viewProps),!1),[t._l(t.renderList,(function(e){return[t.$scopedSlots["view-"+e.fullKey]?[t._t("view-"+e.fullKey,null,{slot:e.fullKey,value:t.get(t._formModel,e.fullKey),row:t._formModel,model:t._formModel},t._slotScope)]:t.$scopedSlots["render-"+e.fullKey]?[t._t("render-"+e.fullKey,null,{slot:e.fullKey,value:t.get(t._formModel,e.fullKey),row:t._formModel,model:t._formModel},t._slotScope)]:t._e()]}))],2)]],["new","edit"].includes(t.dialogType)?n("div",{staticClass:"zee-scheme__dialog-button"},[n("el-button",{attrs:{size:t.size,type:"primary",loading:t.submitting},on:{click:t.handleConfirm}},[t._v("确定")]),n("el-button",{attrs:{size:t.size,plain:""},on:{click:t.closeDialog}},[t._v("取消")])],1):t._e()]:t._e()],2)])],1)},i=[],o=(n("99af"),n("4de4"),n("7db0"),n("4160"),n("caad"),n("d81d"),n("d3b7"),n("e6cf"),n("a79d"),n("ac1f"),n("2532"),n("841c"),n("159b"),n("ade3"));n("96cf");function a(t,e,n,r,i,o,a){try{var c=t[o](a),s=c.value}catch(l){return void n(l)}c.done?e(s):Promise.resolve(s).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function c(t){a(o,r,i,c,s,"next",t)}function s(t){a(o,r,i,c,s,"throw",t)}c(void 0)}))}}var s=n("53ca"),l=n("5530"),u=n("0d12"),f=(n("466d"),n("5319"),n("1276"),function(t){return t.replace(/^(\s|\/)+|(\s|\/)+$/g,"")}),d={},p=["tableProps","filterProps","formProps","viewProps","dialogProps","operationProps"];p.forEach((function(t){d[t]={type:Object,default:function(){return{}}}}));var h=["searchApi","submitApi","addApi","modifyApi","getApi","viewApi","deleteApi"];h.forEach((function(t){d[t]={type:Function}}));var v=["filter","action","pagination","operation"];v.forEach((function(t){d[t]={type:Boolean,default:!0}}));var m={name:"Scheme",props:Object(l["a"])(Object(l["a"])({},d),{},{list:Array,filterList:Array,tableList:Array,formList:Array,viewList:Array,size:{type:String,default:"mini"},formModel:Object,filterModel:Object,auto:Boolean,realSelection:Boolean,url:String,http:Function,alias:Object}),data:function(){return{filterForm:{},editForm:{},dialogVisible:!1,dialogRender:!0,dialogType:"none",dialogLoading:!1,dialogTitle:"",dialogPropsHack:{},currentPage:1,pageSize:10,total:0,pageSizes:[10,20,50],tableData:[],submitting:!1,loading:!1,selection:[]}},created:function(){this.auto&&this.search()},filters:{noRulesFilter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=Object(u["a"])(t),n=function t(e){e.forEach((function(e){e.list?t(e.list):delete e.rules}))};return n(e),e},viewTypeFilter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=Object(u["a"])(t),n=function(t){t.forEach((function(t){t.type=function(e,n){var r=n.model,i=n.config;return e("span",i,r[t.key])}}))};return n(e),e}},computed:{listMap:function(){var t=["filter","form","table"],e={filter:[],form:[],table:[]};return this.list.forEach((function(n){var r=n.include,i=void 0===r?t:r,o=n.exclude,a=void 0===o?[]:o,c=[];i instanceof String||"string"===typeof i?c=[i]:i instanceof Array&&"object"===Object(s["a"])(i)&&(c=i);var f=[];a instanceof String||"string"===typeof a?f=t.filter((function(t){return t!==a})):a instanceof Array&&"object"===Object(s["a"])(a)&&(f=t.filter((function(t){return!a.includes(t)})));var d=c.filter((function(t){return f.includes(t)})),p=Object(u["a"])(d);p.forEach((function(t){e[t].push(Object(l["a"])(Object(l["a"])({},n),n[t]||{}))}))})),e},renderList:function(){var t=Object(u["a"])(this.list),e=function t(e,n){e.forEach((function(e){e.group&&e.list?(e.group.key?e.fullKey="".concat(n?"".concat(n,"-").concat(e.group.key):e.group.key):e.fullKey=n||e.key,t(e.list,e.fullKey)):e.fullKey="".concat(n?"".concat(n,"-").concat(e.key):e.key)}))};return e(t),t},_filterModel:function(){return this.filterModel||this.filterForm||{}},_formModel:function(){return this.formModel||this.editForm||{}},_slotScope:function(){return{handleSearch:this.search,openDialog:this.openDialog,closeDialog:this.closeDialog,openView:this.openView,openEdit:this.openEdit,openNew:this.openNew,handleDelete:this.handleDelete,handleDeleteMul:this.handleDeleteMul,size:this.size,dialogType:this.dialogType,selection:this.selection}},_alias:function(){var t=this.alias,e=this.zAlias;return t&&e?Object(l["a"])(Object(l["a"])({},e),t):this.alias||this.zAlias||{}},_dialogProps:function(){return Object(l["a"])(Object(l["a"])({},this.dialogProps),this.dialogPropsHack)}},methods:{get:u["b"],emptyPromise:function(){return new Promise((function(t){return t()}))},toggleRowSelection:function(){var t=this;this.tableData.forEach((function(e){t.selection.find((function(t){return t.id===e.id}))&&t.$refs.table&&t.$refs.table.toggleRowSelection(e)}))},onTableSelectionChange:function(t,e){var n=this;if(this.realSelection)if("check"===e){var r=this.selection||[];t.forEach((function(t){r.find((function(e){return e.id===t.id}))||r.push(t)})),this.selection=r}else"uncheck"===e&&t.forEach((function(t){n.selection=n.selection.filter((function(e){return e.id!==t.id}))}))},onTableSelection:function(t){this.realSelection||(this.selection=t)},clearSelection:function(){this.$refs.table&&this.$refs.table.clearSelection(),this.selection=[]},_searchAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp;return e({url:"".concat(f(this.url),"/").concat(this._alias.pageUrl||"page"),params:t})}},onSearch:function(){this.currentPage=1,this.search()},search:function(){var t=this;return c(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loading=!0,n=Object(l["a"])(Object(l["a"])({},t._filterModel),{},{currentPage:t.currentPage,pageSize:t.pageSize}),r=t.searchApi||t._searchAPI||t.emptyPromise,e.next=5,r(n).then((function(e){var n=e||{};t.tableData=n[t._alias.list||"list"]||[],t.total=n[t._alias.total||"total"]||0,t.$nextTick(t.toggleRowSelection)})).catch((function(){t.$message.error("查询失败")}));case 5:t.loading=!1;case 6:case"end":return e.stop()}}),e)})))()},onFilterInput:function(t){this.filterForm=t||{},this.$emit("update:filterModel",t||{})},onFormInput:function(t){this.editForm=t||{},this.$emit("update:formModel",t||{})},_addAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp;return e({url:"".concat(f(this.url),"/").concat(this._alias.addUrl||"add"),method:"post",data:t})}},_modifyAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp;return e({url:"".concat(f(this.url),"/").concat(this._alias.modifyUrl||"modify"),method:"post",data:t})}},onFormValidate:function(t,e){var n=this;return c(regeneratorRuntime.mark((function r(){var i;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:t&&(n.submitting=!0,i=n.submitApi||n.emptyPromise,"new"===n.dialogType?i=n.addApi||n.submitApi||n._addAPI||n.emptyPromise:"edit"===n.dialogType&&(i=n.modifyApi||n.submitApi||n._modifyAPI||n.emptyPromise),i(e,{type:n.dialogType}).then((function(){n.$message.success("保存成功"),n.closeDialog(),n.search()})).catch((function(){n.$message.error("保存失败")})).finally((function(){n.submitting=!1})));case 1:case"end":return r.stop()}}),r)})))()},handleConfirm:function(){this.$refs.form&&this.$refs.form.validate()},handleCancel:function(){this.closeDialog()},hadSlot:function(t){return!!this.$slots[t]||!!this.$scopedSlots[t]},openNew:function(){this.openDialog("new","新增")},_getAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp,n=this._alias.getKey||this._alias.primaryKey||"id",r=this._alias.result||"result";return e({url:"".concat(f(this.url),"/").concat(this._alias.getUrl||"queryById"),params:Object(o["a"])({},n,t[n])}).then((function(t){return t[r]||{}}))}},openEdit:function(t){var e=this;this.dialogLoading=!0,this.openDialog("edit","编辑");var n=function(){return new Promise((function(e){e(t)}))},r=this.getApi||this._getAPI||n;r(t).then((function(t){e.editForm=t,e.$emit("update:formModel",t||{})})).finally((function(){e.dialogLoading=!1}))},_viewAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp,n=this._alias.viewKey||this._alias.getKey||this._alias.primaryKey||"id",r=this._alias.result||"result";return e({url:"".concat(f(this.url),"/").concat(this._alias.getUrl||"queryById"),params:Object(o["a"])({},n,t[n])}).then((function(t){return t[r]||{}}))}},openView:function(t){var e=this;this.dialogLoading=!0,this.openDialog("view","详情");var n=function(){return new Promise((function(e){e(t)}))},r=this.viewApi||this.getApi||this._viewAPI||this._getAPI||n;r(t).then((function(t){e.editForm=t,e.$emit("update:formModel",t||{})})).finally((function(){e.dialogLoading=!1}))},_deleteAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp;return e({url:"".concat(f(this.url),"/").concat(this._alias.modifyUrl||"delete"),method:"post",data:t})}},handleDelete:function(t){var e=this,n=this.$loading({text:"处理中",spinner:"el-icon-loading",background:"rgba(255, 255, 255, 0.5)"}),r=this.deleteApi||this._deleteAPI||this.emptyPromise,i=this._alias.deleteKey||this._alias.primaryKey||"id",o=t.map((function(t){return t[i]}));r(o).then((function(){e.search(),e.$message.success("删除成功")})).finally((function(){n.close()}))},handleDeleteMul:function(t){var e=this;this.$confirm("是否删除这 [".concat(t.length,"] 项?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.handleDelete(t)})).catch((function(){}))},openDialog:function(t,e,n){this.dialogVisible=!0,this.dialogRender=!0,this.dialogType=t,this.dialogTitle=e,this.dialogPropsHack=n||{},this.$emit("dialog-change",t)},closeDialog:function(){this.dialogVisible=!1},clearEditForm:function(){this.editForm={},this.$emit("update:formModel",{})},onDialogClose:function(){this.dialogType="none",this.dialogRender=!1,this.$emit("dialog-change","none")},onDialogClosed:function(){this.clearEditForm(),this.dialogPropsHack={}},handleSizeChange:function(t){this.pageSize=t,this.currentPage=1,this.$nextTick(this.search)},handleCurrentChange:function(t){this.currentPage=t,this.$nextTick(this.search)}}},g=m,b=(n("9134"),n("2877")),y=Object(b["a"])(g,r,i,!1,null,null,null);e["default"]=y.exports},"94ca":function(t,e,n){var r=n("d039"),i=/#|\.prototype\./,o=function(t,e){var n=c[a(t)];return n==l||n!=s&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=o.data={},s=o.NATIVE="N",l=o.POLYFILL="P";t.exports=o},"96cf":function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),a=new k(r||[]);return o._invoke=O(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}t.wrap=s;var u="suspendedStart",f="suspendedYield",d="executing",p="completed",h={};function v(){}function m(){}function g(){}var b={};b[o]=function(){return this};var y=Object.getPrototypeOf,w=y&&y(y(I([])));w&&w!==n&&r.call(w,o)&&(b=w);var x=g.prototype=v.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function S(t,e){function n(i,o,a,c){var s=l(t[i],t,o);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"===typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;function o(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}this._invoke=o}function O(t,e,n){var r=u;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return A()}n.method=i,n.arg=o;while(1){var a=n.delegate;if(a){var c=j(a,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===u)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=l(t,e,n);if("normal"===s.type){if(r=n.done?p:f,s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}function j(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator["return"]&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var i=l(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,h;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function I(t){if(t){var n=t[o];if(n)return n.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){while(++i<t.length)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:e,done:!0}}return m.prototype=x.constructor=g,g.constructor=m,g[c]=m.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},_(S.prototype),S.prototype[a]=function(){return this},t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(x),x[c]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){while(e.length){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=I,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return c.type="throw",c.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},"99af":function(t,e,n){"use strict";var r=n("23e7"),i=n("d039"),o=n("e8b5"),a=n("861d"),c=n("7b0b"),s=n("50c4"),l=n("8418"),u=n("65f0"),f=n("1dde"),d=n("b622"),p=n("2d00"),h=d("isConcatSpreadable"),v=9007199254740991,m="Maximum allowed index exceeded",g=p>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),b=f("concat"),y=function(t){if(!a(t))return!1;var e=t[h];return void 0!==e?!!e:o(t)},w=!g||!b;r({target:"Array",proto:!0,forced:w},{concat:function(t){var e,n,r,i,o,a=c(this),f=u(a,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(o=-1===e?a:arguments[e],y(o)){if(i=s(o.length),d+i>v)throw TypeError(m);for(n=0;n<i;n++,d++)n in o&&l(f,d,o[n])}else{if(d>=v)throw TypeError(m);l(f,d++,o)}return f.length=d,f}})},"9bdd":function(t,e,n){var r=n("825a");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(a){var o=t["return"];throw void 0!==o&&r(o.call(t)),a}}},"9bf2":function(t,e,n){var r=n("83ab"),i=n("0cfb"),o=n("825a"),a=n("c04e"),c=Object.defineProperty;e.f=r?c:function(t,e,n){if(o(t),e=a(e,!0),o(n),i)try{return c(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"9ed3":function(t,e,n){"use strict";var r=n("ae93").IteratorPrototype,i=n("7c73"),o=n("5c6c"),a=n("d44e"),c=n("3f8c"),s=function(){return this};t.exports=function(t,e,n){var l=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,l,!1,!0),c[l]=s,t}},"9f7f":function(t,e,n){"use strict";var r=n("d039");function i(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},a15b:function(t,e,n){"use strict";var r=n("23e7"),i=n("44ad"),o=n("fc6a"),a=n("a640"),c=[].join,s=i!=Object,l=a("join",",");r({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c.call(o(this),void 0===t?",":t)}})},a230:function(t,e,n){"use strict";var r=n("aa90"),i=n.n(r);i.a},a434:function(t,e,n){"use strict";var r=n("23e7"),i=n("23cb"),o=n("a691"),a=n("50c4"),c=n("7b0b"),s=n("65f0"),l=n("8418"),u=n("1dde"),f=n("ae40"),d=u("splice"),p=f("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,v=Math.min,m=9007199254740991,g="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!d||!p},{splice:function(t,e){var n,r,u,f,d,p,b=c(this),y=a(b.length),w=i(t,y),x=arguments.length;if(0===x?n=r=0:1===x?(n=0,r=y-w):(n=x-2,r=v(h(o(e),0),y-w)),y+n-r>m)throw TypeError(g);for(u=s(b,r),f=0;f<r;f++)d=w+f,d in b&&l(u,f,b[d]);if(u.length=r,n<r){for(f=w;f<y-r;f++)d=f+r,p=f+n,d in b?b[p]=b[d]:delete b[p];for(f=y;f>y-r+n;f--)delete b[f-1]}else if(n>r)for(f=y-r;f>w;f--)d=f+r-1,p=f+n-1,d in b?b[p]=b[d]:delete b[p];for(f=0;f<n;f++)b[f+w]=arguments[f+2];return b.length=y-r+n,u}})},a4d3:function(t,e,n){"use strict";var r=n("23e7"),i=n("da84"),o=n("d066"),a=n("c430"),c=n("83ab"),s=n("4930"),l=n("fdbf"),u=n("d039"),f=n("5135"),d=n("e8b5"),p=n("861d"),h=n("825a"),v=n("7b0b"),m=n("fc6a"),g=n("c04e"),b=n("5c6c"),y=n("7c73"),w=n("df75"),x=n("241c"),_=n("057f"),S=n("7418"),O=n("06cf"),j=n("9bf2"),E=n("d1e7"),C=n("9112"),k=n("6eeb"),I=n("5692"),A=n("f772"),P=n("d012"),L=n("90e3"),T=n("b622"),$=n("e538"),z=n("746f"),R=n("d44e"),F=n("69f3"),M=n("b727").forEach,N=A("hidden"),K="Symbol",D="prototype",V=T("toPrimitive"),B=F.set,U=F.getterFor(K),H=Object[D],q=i.Symbol,G=o("JSON","stringify"),W=O.f,Y=j.f,X=_.f,Q=E.f,J=I("symbols"),Z=I("op-symbols"),tt=I("string-to-symbol-registry"),et=I("symbol-to-string-registry"),nt=I("wks"),rt=i.QObject,it=!rt||!rt[D]||!rt[D].findChild,ot=c&&u((function(){return 7!=y(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=W(H,e);r&&delete H[e],Y(t,e,n),r&&t!==H&&Y(H,e,r)}:Y,at=function(t,e){var n=J[t]=y(q[D]);return B(n,{type:K,tag:t,description:e}),c||(n.description=e),n},ct=l?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof q},st=function(t,e,n){t===H&&st(Z,e,n),h(t);var r=g(e,!0);return h(n),f(J,r)?(n.enumerable?(f(t,N)&&t[N][r]&&(t[N][r]=!1),n=y(n,{enumerable:b(0,!1)})):(f(t,N)||Y(t,N,b(1,{})),t[N][r]=!0),ot(t,r,n)):Y(t,r,n)},lt=function(t,e){h(t);var n=m(e),r=w(n).concat(ht(n));return M(r,(function(e){c&&!ft.call(n,e)||st(t,e,n[e])})),t},ut=function(t,e){return void 0===e?y(t):lt(y(t),e)},ft=function(t){var e=g(t,!0),n=Q.call(this,e);return!(this===H&&f(J,e)&&!f(Z,e))&&(!(n||!f(this,e)||!f(J,e)||f(this,N)&&this[N][e])||n)},dt=function(t,e){var n=m(t),r=g(e,!0);if(n!==H||!f(J,r)||f(Z,r)){var i=W(n,r);return!i||!f(J,r)||f(n,N)&&n[N][r]||(i.enumerable=!0),i}},pt=function(t){var e=X(m(t)),n=[];return M(e,(function(t){f(J,t)||f(P,t)||n.push(t)})),n},ht=function(t){var e=t===H,n=X(e?Z:m(t)),r=[];return M(n,(function(t){!f(J,t)||e&&!f(H,t)||r.push(J[t])})),r};if(s||(q=function(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=L(t),n=function(t){this===H&&n.call(Z,t),f(this,N)&&f(this[N],e)&&(this[N][e]=!1),ot(this,e,b(1,t))};return c&&it&&ot(H,e,{configurable:!0,set:n}),at(e,t)},k(q[D],"toString",(function(){return U(this).tag})),k(q,"withoutSetter",(function(t){return at(L(t),t)})),E.f=ft,j.f=st,O.f=dt,x.f=_.f=pt,S.f=ht,$.f=function(t){return at(T(t),t)},c&&(Y(q[D],"description",{configurable:!0,get:function(){return U(this).description}}),a||k(H,"propertyIsEnumerable",ft,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:q}),M(w(nt),(function(t){z(t)})),r({target:K,stat:!0,forced:!s},{for:function(t){var e=String(t);if(f(tt,e))return tt[e];var n=q(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!ct(t))throw TypeError(t+" is not a symbol");if(f(et,t))return et[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!c},{create:ut,defineProperty:st,defineProperties:lt,getOwnPropertyDescriptor:dt}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:pt,getOwnPropertySymbols:ht}),r({target:"Object",stat:!0,forced:u((function(){S.f(1)}))},{getOwnPropertySymbols:function(t){return S.f(v(t))}}),G){var vt=!s||u((function(){var t=q();return"[null]"!=G([t])||"{}"!=G({a:t})||"{}"!=G(Object(t))}));r({target:"JSON",stat:!0,forced:vt},{stringify:function(t,e,n){var r,i=[t],o=1;while(arguments.length>o)i.push(arguments[o++]);if(r=e,(p(e)||void 0!==t)&&!ct(t))return d(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!ct(e))return e}),i[1]=e,G.apply(null,i)}})}q[D][V]||C(q[D],V,q[D].valueOf),R(q,K),P[N]=!0},a630:function(t,e,n){var r=n("23e7"),i=n("4df4"),o=n("1c7e"),a=!o((function(t){Array.from(t)}));r({target:"Array",stat:!0,forced:a},{from:i})},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},a691:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},a79d:function(t,e,n){"use strict";var r=n("23e7"),i=n("c430"),o=n("fea9"),a=n("d039"),c=n("d066"),s=n("4840"),l=n("cdf9"),u=n("6eeb"),f=!!o&&a((function(){o.prototype["finally"].call({then:function(){}},(function(){}))}));r({target:"Promise",proto:!0,real:!0,forced:f},{finally:function(t){var e=s(this,c("Promise")),n="function"==typeof t;return this.then(n?function(n){return l(e,t()).then((function(){return n}))}:t,n?function(n){return l(e,t()).then((function(){throw n}))}:t)}}),i||"function"!=typeof o||o.prototype["finally"]||u(o.prototype,"finally",c("Promise").prototype["finally"])},a9e3:function(t,e,n){"use strict";var r=n("83ab"),i=n("da84"),o=n("94ca"),a=n("6eeb"),c=n("5135"),s=n("c6b6"),l=n("7156"),u=n("c04e"),f=n("d039"),d=n("7c73"),p=n("241c").f,h=n("06cf").f,v=n("9bf2").f,m=n("58a8").trim,g="Number",b=i[g],y=b.prototype,w=s(d(y))==g,x=function(t){var e,n,r,i,o,a,c,s,l=u(t,!1);if("string"==typeof l&&l.length>2)if(l=m(l),e=l.charCodeAt(0),43===e||45===e){if(n=l.charCodeAt(2),88===n||120===n)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+l}for(o=l.slice(2),a=o.length,c=0;c<a;c++)if(s=o.charCodeAt(c),s<48||s>i)return NaN;return parseInt(o,r)}return+l};if(o(g,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var _,S=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof S&&(w?f((function(){y.valueOf.call(n)})):s(n)!=g)?l(new b(x(e)),n,S):x(e)},O=r?p(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),j=0;O.length>j;j++)c(b,_=O[j])&&!c(S,_)&&v(S,_,h(b,_));S.prototype=y,y.constructor=S,a(i,g,S)}},aa90:function(t,e,n){t.exports={primary:"#f39800",blue:"#2f54eb","blue-light":"#69c0ff","blue-hover":"#e6f7ff",red:"#f5222d",green:"#26aa58","green-light":"#5edd8e",orange:"#ff9852",gray:"#343434",grey:"#8c8c8c",purple:"#722ed1",cyan:"#13c2c2",black:"#000",text:"#314659",border:"#e8e8e8","border-light":"rgba(232,232,232,.2)",background:"#fff"}},ab13:function(t,e,n){var r=n("b622"),i=r("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,"/./"[t](e)}catch(r){}}return!1}},ac1f:function(t,e,n){"use strict";var r=n("23e7"),i=n("9263");r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},ad6d:function(t,e,n){"use strict";var r=n("825a");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},ade3:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},ae40:function(t,e,n){var r=n("83ab"),i=n("d039"),o=n("5135"),a=Object.defineProperty,c={},s=function(t){throw t};t.exports=function(t,e){if(o(c,t))return c[t];e||(e={});var n=[][t],l=!!o(e,"ACCESSORS")&&e.ACCESSORS,u=o(e,0)?e[0]:s,f=o(e,1)?e[1]:void 0;return c[t]=!!n&&!i((function(){if(l&&!r)return!0;var t={length:-1};l?a(t,1,{enumerable:!0,get:s}):t[1]=1,n.call(t,u,f)}))}},ae93:function(t,e,n){"use strict";var r,i,o,a=n("e163"),c=n("9112"),s=n("5135"),l=n("b622"),u=n("c430"),f=l("iterator"),d=!1,p=function(){return this};[].keys&&(o=[].keys(),"next"in o?(i=a(a(o)),i!==Object.prototype&&(r=i)):d=!0),void 0==r&&(r={}),u||s(r,f)||c(r,f,p),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},b041:function(t,e,n){"use strict";var r=n("00ee"),i=n("f5df");t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},b0c0:function(t,e,n){var r=n("83ab"),i=n("9bf2").f,o=Function.prototype,a=o.toString,c=/^\s*function ([^ (]*)/,s="name";r&&!(s in o)&&i(o,s,{configurable:!0,get:function(){try{return a.call(this).match(c)[1]}catch(t){return""}}})},b14d:function(t,e,n){t.exports={primary:"#f39800",blue:"#2f54eb","blue-light":"#69c0ff","blue-hover":"#e6f7ff",red:"#f5222d",green:"#26aa58","green-light":"#5edd8e",orange:"#ff9852",gray:"#343434",grey:"#8c8c8c",purple:"#722ed1",cyan:"#13c2c2",black:"#000",text:"#314659",border:"#e8e8e8","border-light":"rgba(232,232,232,.2)",background:"#fff"}},b575:function(t,e,n){var r,i,o,a,c,s,l,u,f=n("da84"),d=n("06cf").f,p=n("c6b6"),h=n("2cf4").set,v=n("1cdc"),m=f.MutationObserver||f.WebKitMutationObserver,g=f.process,b=f.Promise,y="process"==p(g),w=d(f,"queueMicrotask"),x=w&&w.value;x||(r=function(){var t,e;y&&(t=g.domain)&&t.exit();while(i){e=i.fn,i=i.next;try{e()}catch(n){throw i?a():o=void 0,n}}o=void 0,t&&t.enter()},y?a=function(){g.nextTick(r)}:m&&!v?(c=!0,s=document.createTextNode(""),new m(r).observe(s,{characterData:!0}),a=function(){s.data=c=!c}):b&&b.resolve?(l=b.resolve(void 0),u=l.then,a=function(){u.call(l,r)}):a=function(){h.call(f,r)}),t.exports=x||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,a()),o=e}},b622:function(t,e,n){var r=n("da84"),i=n("5692"),o=n("5135"),a=n("90e3"),c=n("4930"),s=n("fdbf"),l=i("wks"),u=r.Symbol,f=s?u:u&&u.withoutSetter||a;t.exports=function(t){return o(l,t)||(c&&o(u,t)?l[t]=u[t]:l[t]=f("Symbol."+t)),l[t]}},b64b:function(t,e,n){var r=n("23e7"),i=n("7b0b"),o=n("df75"),a=n("d039"),c=a((function(){o(1)}));r({target:"Object",stat:!0,forced:c},{keys:function(t){return o(i(t))}})},b680:function(t,e,n){"use strict";var r=n("23e7"),i=n("a691"),o=n("408a"),a=n("1148"),c=n("d039"),s=1..toFixed,l=Math.floor,u=function(t,e,n){return 0===e?n:e%2===1?u(t,e-1,n*t):u(t*t,e/2,n)},f=function(t){var e=0,n=t;while(n>=4096)e+=12,n/=4096;while(n>=2)e+=1,n/=2;return e},d=s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c((function(){s.call({})}));r({target:"Number",proto:!0,forced:d},{toFixed:function(t){var e,n,r,c,s=o(this),d=i(t),p=[0,0,0,0,0,0],h="",v="0",m=function(t,e){var n=-1,r=e;while(++n<6)r+=t*p[n],p[n]=r%1e7,r=l(r/1e7)},g=function(t){var e=6,n=0;while(--e>=0)n+=p[e],p[e]=l(n/t),n=n%t*1e7},b=function(){var t=6,e="";while(--t>=0)if(""!==e||0===t||0!==p[t]){var n=String(p[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e};if(d<0||d>20)throw RangeError("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return String(s);if(s<0&&(h="-",s=-s),s>1e-21)if(e=f(s*u(2,69,1))-69,n=e<0?s*u(2,-e,1):s/u(2,e,1),n*=4503599627370496,e=52-e,e>0){m(0,n),r=d;while(r>=7)m(1e7,0),r-=7;m(u(10,r,1),0),r=e-1;while(r>=23)g(1<<23),r-=23;g(1<<r),m(1,1),g(2),v=b()}else m(0,n),m(1<<-e,0),v=b()+a.call("0",d);return d>0?(c=v.length,v=h+(c<=d?"0."+a.call("0",d-c)+v:v.slice(0,c-d)+"."+v.slice(c-d))):v=h+v,v}})},b727:function(t,e,n){var r=n("0366"),i=n("44ad"),o=n("7b0b"),a=n("50c4"),c=n("65f0"),s=[].push,l=function(t){var e=1==t,n=2==t,l=3==t,u=4==t,f=6==t,d=5==t||f;return function(p,h,v,m){for(var g,b,y=o(p),w=i(y),x=r(h,v,3),_=a(w.length),S=0,O=m||c,j=e?O(p,_):n?O(p,0):void 0;_>S;S++)if((d||S in w)&&(g=w[S],b=x(g,S,y),t))if(e)j[S]=b;else if(b)switch(t){case 3:return!0;case 5:return g;case 6:return S;case 2:s.call(j,g)}else if(u)return!1;return f?-1:l||u?u:j}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},c04e:function(t,e,n){var r=n("861d");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},c430:function(t,e){t.exports=!1},c631:function(t,e,n){"use strict";var r=n("5265"),i=n.n(r);i.a},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var r=n("da84"),i=n("ce4e"),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},c740:function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").findIndex,o=n("44d2"),a=n("ae40"),c="findIndex",s=!0,l=a(c);c in[]&&Array(1)[c]((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!l},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(c)},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c8d2:function(t,e,n){var r=n("d039"),i=n("5899"),o="​…᠎";t.exports=function(t){return r((function(){return!!i[t]()||o[t]()!=o||i[t].name!==t}))}},c975:function(t,e,n){"use strict";var r=n("23e7"),i=n("4d64").indexOf,o=n("a640"),a=n("ae40"),c=[].indexOf,s=!!c&&1/[1].indexOf(1,-0)<0,l=o("indexOf"),u=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:s||!l||!u},{indexOf:function(t){return s?c.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},ca84:function(t,e,n){var r=n("5135"),i=n("fc6a"),o=n("4d64").indexOf,a=n("d012");t.exports=function(t,e){var n,c=i(t),s=0,l=[];for(n in c)!r(a,n)&&r(c,n)&&l.push(n);while(e.length>s)r(c,n=e[s++])&&(~o(l,n)||l.push(n));return l}},caad:function(t,e,n){"use strict";var r=n("23e7"),i=n("4d64").includes,o=n("44d2"),a=n("ae40"),c=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:!c},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},cc12:function(t,e,n){var r=n("da84"),i=n("861d"),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},cca6:function(t,e,n){var r=n("23e7"),i=n("60da");r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},cdf9:function(t,e,n){var r=n("825a"),i=n("861d"),o=n("f069");t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t),a=n.resolve;return a(e),n.promise}},ce4e:function(t,e,n){var r=n("da84"),i=n("9112");t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},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 r=n("428f"),i=n("da84"),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},d28b:function(t,e,n){var r=n("746f");r("iterator")},d2bb:function(t,e,n){var r=n("825a"),i=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(o){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},d3b7:function(t,e,n){var r=n("00ee"),i=n("6eeb"),o=n("b041");r||i(Object.prototype,"toString",o,{unsafe:!0})},d44e:function(t,e,n){var r=n("9bf2").f,i=n("5135"),o=n("b622"),a=o("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},d58f:function(t,e,n){var r=n("1c0b"),i=n("7b0b"),o=n("44ad"),a=n("50c4"),c=function(t){return function(e,n,c,s){r(n);var l=i(e),u=o(l),f=a(l.length),d=t?f-1:0,p=t?-1:1;if(c<2)while(1){if(d in u){s=u[d],d+=p;break}if(d+=p,t?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;t?d>=0:f>d;d+=p)d in u&&(s=n(s,u[d],d,l));return s}};t.exports={left:c(!1),right:c(!0)}},d784:function(t,e,n){"use strict";n("ac1f");var r=n("6eeb"),i=n("d039"),o=n("b622"),a=n("9263"),c=n("9112"),s=o("species"),l=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),u=function(){return"$0"==="a".replace(/./,"$0")}(),f=o("replace"),d=function(){return!!/./[f]&&""===/./[f]("a","$0")}(),p=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,f){var h=o(t),v=!i((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),m=v&&!i((function(){var e=!1,n=/a/;return"split"===t&&(n={},n.constructor={},n.constructor[s]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return e=!0,null},n[h](""),!e}));if(!v||!m||"replace"===t&&(!l||!u||d)||"split"===t&&!p){var g=/./[h],b=n(h,""[t],(function(t,e,n,r,i){return e.exec===a?v&&!i?{done:!0,value:g.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),y=b[0],w=b[1];r(String.prototype,t,y),r(RegExp.prototype,h,2==e?function(t,e){return w.call(t,this,e)}:function(t){return w.call(t,this)})}f&&c(RegExp.prototype[h],"sham",!0)}},d81d:function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").map,o=n("1dde"),a=n("ae40"),c=o("map"),s=a("map");r({target:"Array",proto:!0,forced:!c||!s},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},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")()}).call(this,n("c8ba"))},dbb4:function(t,e,n){var r=n("23e7"),i=n("83ab"),o=n("56ef"),a=n("fc6a"),c=n("06cf"),s=n("8418");r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){var e,n,r=a(t),i=c.f,l=o(r),u={},f=0;while(l.length>f)n=i(r,e=l[f++]),void 0!==n&&s(u,e,n);return u}})},ddb0:function(t,e,n){var r=n("da84"),i=n("fdbc"),o=n("e260"),a=n("9112"),c=n("b622"),s=c("iterator"),l=c("toStringTag"),u=o.values;for(var f in i){var d=r[f],p=d&&d.prototype;if(p){if(p[s]!==u)try{a(p,s,u)}catch(v){p[s]=u}if(p[l]||a(p,l,f),i[f])for(var h in o)if(p[h]!==o[h])try{a(p,h,o[h])}catch(v){p[h]=o[h]}}}},df75:function(t,e,n){var r=n("ca84"),i=n("7839");t.exports=Object.keys||function(t){return r(t,i)}},e01a:function(t,e,n){"use strict";var r=n("23e7"),i=n("83ab"),o=n("da84"),a=n("5135"),c=n("861d"),s=n("9bf2").f,l=n("e893"),u=o.Symbol;if(i&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var f={},d=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof d?new u(t):void 0===t?u():u(t);return""===t&&(f[e]=!0),e};l(d,u);var p=d.prototype=u.prototype;p.constructor=d;var h=p.toString,v="Symbol(test)"==String(u("test")),m=/^Symbol\((.*)\)[^)]+$/;s(p,"description",{configurable:!0,get:function(){var t=c(this)?this.valueOf():this,e=h.call(t);if(a(f,t))return"";var n=v?e.slice(7,-1):e.replace(m,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:d})}},e163:function(t,e,n){var r=n("5135"),i=n("7b0b"),o=n("f772"),a=n("e177"),c=o("IE_PROTO"),s=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=i(t),r(t,c)?t[c]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},e177:function(t,e,n){var r=n("d039");t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,n){"use strict";var r=n("fc6a"),i=n("44d2"),o=n("3f8c"),a=n("69f3"),c=n("7dd0"),s="Array Iterator",l=a.set,u=a.getterFor(s);t.exports=c(Array,"Array",(function(t,e){l(this,{type:s,target:r(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},e2cc:function(t,e,n){var r=n("6eeb");t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},e439:function(t,e,n){var r=n("23e7"),i=n("d039"),o=n("fc6a"),a=n("06cf").f,c=n("83ab"),s=i((function(){a(1)})),l=!c||s;r({target:"Object",stat:!0,forced:l,sham:!c},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},e538:function(t,e,n){var r=n("b622");e.f=r},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},e6cf:function(t,e,n){"use strict";var r,i,o,a,c=n("23e7"),s=n("c430"),l=n("da84"),u=n("d066"),f=n("fea9"),d=n("6eeb"),p=n("e2cc"),h=n("d44e"),v=n("2626"),m=n("861d"),g=n("1c0b"),b=n("19aa"),y=n("c6b6"),w=n("8925"),x=n("2266"),_=n("1c7e"),S=n("4840"),O=n("2cf4").set,j=n("b575"),E=n("cdf9"),C=n("44de"),k=n("f069"),I=n("e667"),A=n("69f3"),P=n("94ca"),L=n("b622"),T=n("2d00"),$=L("species"),z="Promise",R=A.get,F=A.set,M=A.getterFor(z),N=f,K=l.TypeError,D=l.document,V=l.process,B=u("fetch"),U=k.f,H=U,q="process"==y(V),G=!!(D&&D.createEvent&&l.dispatchEvent),W="unhandledrejection",Y="rejectionhandled",X=0,Q=1,J=2,Z=1,tt=2,et=P(z,(function(){var t=w(N)!==String(N);if(!t){if(66===T)return!0;if(!q&&"function"!=typeof PromiseRejectionEvent)return!0}if(s&&!N.prototype["finally"])return!0;if(T>=51&&/native code/.test(N))return!1;var e=N.resolve(1),n=function(t){t((function(){}),(function(){}))},r=e.constructor={};return r[$]=n,!(e.then((function(){}))instanceof n)})),nt=et||!_((function(t){N.all(t)["catch"]((function(){}))})),rt=function(t){var e;return!(!m(t)||"function"!=typeof(e=t.then))&&e},it=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;j((function(){var i=e.value,o=e.state==Q,a=0;while(r.length>a){var c,s,l,u=r[a++],f=o?u.ok:u.fail,d=u.resolve,p=u.reject,h=u.domain;try{f?(o||(e.rejection===tt&&st(t,e),e.rejection=Z),!0===f?c=i:(h&&h.enter(),c=f(i),h&&(h.exit(),l=!0)),c===u.promise?p(K("Promise-chain cycle")):(s=rt(c))?s.call(c,d,p):d(c)):p(i)}catch(v){h&&!l&&h.exit(),p(v)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&at(t,e)}))}},ot=function(t,e,n){var r,i;G?(r=D.createEvent("Event"),r.promise=e,r.reason=n,r.initEvent(t,!1,!0),l.dispatchEvent(r)):r={promise:e,reason:n},(i=l["on"+t])?i(r):t===W&&C("Unhandled promise rejection",n)},at=function(t,e){O.call(l,(function(){var n,r=e.value,i=ct(e);if(i&&(n=I((function(){q?V.emit("unhandledRejection",r,t):ot(W,t,r)})),e.rejection=q||ct(e)?tt:Z,n.error))throw n.value}))},ct=function(t){return t.rejection!==Z&&!t.parent},st=function(t,e){O.call(l,(function(){q?V.emit("rejectionHandled",t):ot(Y,t,e.value)}))},lt=function(t,e,n,r){return function(i){t(e,n,i,r)}},ut=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=J,it(t,e,!0))},ft=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw K("Promise can't be resolved itself");var i=rt(n);i?j((function(){var r={done:!1};try{i.call(n,lt(ft,t,r,e),lt(ut,t,r,e))}catch(o){ut(t,r,o,e)}})):(e.value=n,e.state=Q,it(t,e,!1))}catch(o){ut(t,{done:!1},o,e)}}};et&&(N=function(t){b(this,N,z),g(t),r.call(this);var e=R(this);try{t(lt(ft,this,e),lt(ut,this,e))}catch(n){ut(this,e,n)}},r=function(t){F(this,{type:z,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:X,value:void 0})},r.prototype=p(N.prototype,{then:function(t,e){var n=M(this),r=U(S(this,N));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=q?V.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=X&&it(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r,e=R(t);this.promise=t,this.resolve=lt(ft,t,e),this.reject=lt(ut,t,e)},k.f=U=function(t){return t===N||t===o?new i(t):H(t)},s||"function"!=typeof f||(a=f.prototype.then,d(f.prototype,"then",(function(t,e){var n=this;return new N((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof B&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return E(N,B.apply(l,arguments))}}))),c({global:!0,wrap:!0,forced:et},{Promise:N}),h(N,z,!1,!0),v(z),o=u(z),c({target:z,stat:!0,forced:et},{reject:function(t){var e=U(this);return e.reject.call(void 0,t),e.promise}}),c({target:z,stat:!0,forced:s||et},{resolve:function(t){return E(s&&this===o?N:this,t)}}),c({target:z,stat:!0,forced:nt},{all:function(t){var e=this,n=U(e),r=n.resolve,i=n.reject,o=I((function(){var n=g(e.resolve),o=[],a=0,c=1;x(t,(function(t){var s=a++,l=!1;o.push(void 0),c++,n.call(e,t).then((function(t){l||(l=!0,o[s]=t,--c||r(o))}),i)})),--c||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=U(e),r=n.reject,i=I((function(){var i=g(e.resolve);x(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},e893:function(t,e,n){var r=n("5135"),i=n("56ef"),o=n("06cf"),a=n("9bf2");t.exports=function(t,e){for(var n=i(e),c=a.f,s=o.f,l=0;l<n.length;l++){var u=n[l];r(t,u)||c(t,u,s(e,u))}}},e8a8:function(t,e,n){var r={"./filter/index.vue":"3782","./form/index.vue":"0a36","./scheme/index.vue":"93c0","./select/index.vue":"e8f4","./table/index.vue":"5423","./upload/index.vue":"ffb9"};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id="e8a8"},e8b5:function(t,e,n){var r=n("c6b6");t.exports=Array.isArray||function(t){return"Array"==r(t)}},e8f4:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-select",t._g(t._b({staticClass:"zee-select",attrs:{disabled:t.disabled,"value-key":t.valueKey,filterable:t.filterable,remote:t.remote,"reserve-keyword":t.reserveKeyword,clearable:t.clearable,placeholder:t.placeholder,"remote-method":t.remoteMethod,loading:t.loading,size:t.size,multiple:t.multiple},model:{value:t.model,callback:function(e){t.model=e},expression:"model"}},"el-select",t.selectProps,!1),t.bindEvents),[t._l(t.optionsCurrent,(function(e){return n("el-option",{key:e.id,attrs:{label:t.labelFormat?t.labelFormat(e):e[t.labelKey],value:t.raw?e:e[t.valueKey],disabled:e.disabled}},[t._t("default",null,{item:e,value:t.model})],2)})),t._t("empty",null,{slot:"empty"}),n("template",{slot:"prefix"},[t.initing?n("i",{staticClass:"el-icon-loading"}):t._t("prefix")],2)],2)},i=[],o=(n("99af"),n("4de4"),n("7db0"),n("4160"),n("caad"),n("13d5"),n("a9e3"),n("b64b"),n("d3b7"),n("e6cf"),n("a79d"),n("2532"),n("498a"),n("159b"),n("ade3")),a=n("2909"),c=n("5530"),s={name:"Select",props:{value:[String,Number,Boolean,Object,Array],placeholder:{type:String,default:"请选择"},options:{type:Array,default:function(){return[]}},labelFormat:Function,labelKey:{type:String,default:"name"},valueKey:{type:String,default:"code"},searchKey:{type:String,default:"query"},size:{type:String,default:"mini"},multiple:Boolean,disabled:Boolean,clearable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},reserveKeyword:{type:Boolean,default:!0},selectProps:Object,raw:Boolean,url:String,http:Function,params:{type:Object,default:function(){return{}}},config:{type:Object,default:function(){return{}}},queryApi:Function,triggerSize:{type:Number,default:0},auto:{type:Boolean,default:!0},update:Boolean,updateOnce:Boolean,beforeQuery:{type:Function,default:function(){return!0}}},data:function(){return{model:this.value,optionsDataSource:this.fixOptions(this.options),optionsCurrent:this.fixOptions(this.options),loading:!1,initing:!1,loaded:!1}},created:function(){this.remote&&this.auto&&(this.initing=!0,this.remoteMethod())},watch:{value:function(t){this.model=t},options:function(t){t&&(this.optionsCurrent=this.fixOptions(this.optionsDataSource))}},computed:{request:function(){return this.http||this.zHttp},remote:function(){return Boolean(this.queryApi||this.url&&(this.http||this.zHttp))},bindEvents:function(){var t=this,e={};return Object.keys(this.$listeners||{}).forEach((function(n){"change"!==n||t.raw?e[n]=function(e){t.$emit(n,e)}:e[n]=function(e){t.$emit(n,e,t.multiple?t.optionsCurrent.reduce((function(n,r){return e.includes(r[t.valueKey])&&n.push(r),n}),[]):t.optionsCurrent.find((function(n){return n[t.valueKey]===e})))}})),Object(c["a"])(Object(c["a"])({},e),{},{"visible-change":function(n){t.remote&&n&&(t.updateOnce?t.loaded||t.remoteMethod():t.update&&t.remoteMethod()),e["visible-change"]&&e["visible-change"](n)}})}},methods:{fixOptions:function(t){var e=this,n=[];this.raw&&(n=this.multiple?this.value&&this.value.length>0?Object(a["a"])(this.value):[]:this.value&&Object.keys(this.value).length>0?[this.value]:[]);var r={},i=[].concat(Object(a["a"])(n),Object(a["a"])(this.options),Object(a["a"])(t)).reduce((function(t,n){return r[n[e.valueKey]]||(r[n[e.valueKey]]=!0,n[e.valueKey]&&n[e.labelKey]&&t.push(n)),t}),[]);return i},remoteMethod:function(){var t,e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=n.trim(),i=this.beforeQuery(r);i?r.length>=this.triggerSize?(this.loading=!0,t=this.queryApi?this.queryApi(r):this.request(Object(c["a"])({url:this.url,method:"get",params:r?Object(c["a"])(Object(o["a"])({},this.searchKey,r),this.params):this.params},this.config)),t.then((function(t){var n=t||{},r=e.fixOptions(n.result);e.optionsDataSource=r,e.optionsCurrent=r})).finally((function(){e.loading=!1,e.initing=!1,e.loaded=!0}))):this.optionsCurrent=this.optionsDataSource.filter((function(t){return t[e.labelKey].includes(n)})):(this.loading=!1,this.initing=!1,this.loaded=!0)}}},l=s,u=(n("a230"),n("2877")),f=Object(u["a"])(l,r,i,!1,null,null,null);e["default"]=f.exports},e95a:function(t,e,n){var r=n("b622"),i=n("3f8c"),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},f069:function(t,e,n){"use strict";var r=n("1c0b"),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},f5df:function(t,e,n){var r=n("00ee"),i=n("c6b6"),o=n("b622"),a=o("toStringTag"),c="Arguments"==i(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(n){}};t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),a))?n:c?i(e):"Object"==(r=i(e))&&"function"==typeof e.callee?"Arguments":r}},f772:function(t,e,n){var r=n("5692"),i=n("90e3"),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},fb15:function(t,e,n){"use strict";if(n.r(e),n.d(e,"ImageViewer",(function(){return b})),"undefined"!==typeof window){var r=window.document.currentScript,i=n("8875");r=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}n("c740"),n("4160"),n("e260"),n("b0c0"),n("cca6"),n("d3b7"),n("07ac"),n("159b"),n("ddb0");var a=n("5530");n("a4d3"),n("c975"),n("b64b");function c(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function s(t,e){if(null==t)return{};var n,r,i=c(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var l=n("8bbf"),u=n.n(l),f=n("fd7f"),d={},p=n("e8a8");p.keys().forEach((function(t){var e=p(t);d[e.default.name]=e.default}));var h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.values(d).forEach((function(n){var r=e.name||"z",i=r+n.name;n.name=i,n.props&&n.props.size&&n.props.size.default&&e.size&&(n.props.size.default=e.size),n.computed?(n.computed.zAlias=function(){return e.alias||{}},n.computed.zHttp=function(){return e.http}):n.computed={zAlias:function(){},zHttp:function(){return e.http}},n.install=function(t){t.component(i,n)},t.component(i,n)})),f["a"].install=function(t){t.component(f["a"].name,f["a"])},t.component(f["a"].name,f["a"])},v=null,m=function(t){v&&(!0===t?document.body.removeChild(v.$el):(v.$el.className="".concat(v.$el.className," viewer-fade-leave-active viewer-fade-leave-to"),setTimeout((function(){document.body.removeChild(v.$el),v=null}),200)))},g=function(t){var e=t.index,n=t.src,r=t.list,i=s(t,["index","src","list"]);v&&m(!0);var o=u.a.extend(f["a"]);v=new o({el:document.createElement("div")}),Object.assign(v,Object(a["a"])(Object(a["a"])({index:n?r.findIndex((function(t){return t===n})):e||0,urlList:r},i),{},{onClose:m})),document.body.appendChild(v.$el)},b=g;b.close=m;var y=Object(a["a"])({install:h},d);e["default"]=y},fb6a:function(t,e,n){"use strict";var r=n("23e7"),i=n("861d"),o=n("e8b5"),a=n("23cb"),c=n("50c4"),s=n("fc6a"),l=n("8418"),u=n("b622"),f=n("1dde"),d=n("ae40"),p=f("slice"),h=d("slice",{ACCESSORS:!0,0:0,1:2}),v=u("species"),m=[].slice,g=Math.max;r({target:"Array",proto:!0,forced:!p||!h},{slice:function(t,e){var n,r,u,f=s(this),d=c(f.length),p=a(t,d),h=a(void 0===e?d:e,d);if(o(f)&&(n=f.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)?i(n)&&(n=n[v],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return m.call(f,p,h);for(r=new(void 0===n?Array:n)(g(h-p,0)),u=0;p<h;p++,u++)p in f&&l(r,u,f[p]);return r.length=u,r}})},fc6a:function(t,e,n){var r=n("44ad"),i=n("1d80");t.exports=function(t){return r(i(t))}},fcf8:function(t,e,n){"use strict";var r=n("142b"),i=n.n(r);i.a},fd7f:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"viewer-fade"}},[n("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":t.zIndex},attrs:{tabindex:"-1"}},[n("div",{staticClass:"el-image-viewer__mask"}),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__close",on:{click:t.hide}},[n("i",{staticClass:"el-icon-circle-close"})]),t.isSingle?t._e():[n("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!t.infinite&&t.isFirst},on:{click:t.prev}},[n("i",{staticClass:"el-icon-arrow-left"})]),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!t.infinite&&t.isLast},on:{click:t.next}},[n("i",{staticClass:"el-icon-arrow-right"})])],n("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[n("div",{staticClass:"el-image-viewer__actions__inner"},[n("i",{staticClass:"el-icon-zoom-out el-image-viewer__actions-btn",on:{click:function(e){return t.handleActions("zoomOut")}}}),n("i",{staticClass:"el-icon-zoom-in el-image-viewer__actions-btn",on:{click:function(e){return t.handleActions("zoomIn")}}}),n("i",{staticClass:"el-image-viewer__actions__divider"}),n("i",{staticClass:"el-image-viewer__actions-btn",class:t.mode.icon,on:{click:t.toggleMode}}),n("i",{staticClass:"el-image-viewer__actions__divider"}),n("i",{staticClass:"el-icon-refresh-left el-image-viewer__actions-btn",on:{click:function(e){return t.handleActions("anticlocelise")}}}),n("i",{staticClass:"el-icon-refresh-right el-image-viewer__actions-btn",on:{click:function(e){return t.handleActions("clocelise")}}}),n("span",{staticClass:"el-image-viewer__indicator"},[t._v(t._s(t.index+1)+" / "+t._s(t.urlList.length))])])]),n("div",{staticClass:"el-image-viewer__canvas"},[t._l(t.urlList,(function(e,r){return[r===t.index?n("img",{key:e,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:t.imgStyle,attrs:{src:t.currentImg},on:{load:t.handleImgLoad,error:t.handleImgError,mousedown:t.handleMouseDown}}):t._e()]}))],2)],2)])},i=[],o=(n("99af"),n("c975"),n("a9e3"),n("b680"),n("b64b"),n("07ac"),n("5530")),a=n("8bbf"),c=n.n(a);const s=c.a.prototype.$isServer,l=(s||Number(document.documentMode),function(){return!s&&document.addEventListener?function(t,e,n){t&&e&&n&&t.addEventListener(e,n,!1)}:function(t,e,n){t&&e&&n&&t.attachEvent("on"+e,n)}}()),u=function(){return!s&&document.removeEventListener?function(t,e,n){t&&e&&t.removeEventListener(e,n,!1)}:function(t,e,n){t&&e&&t.detachEvent("on"+e,n)}}();Object.prototype.hasOwnProperty;const f=function(){return!c.a.prototype.$isServer&&!!window.navigator.userAgent.match(/firefox/i)};function d(t){let e=!1;return function(...n){e||(e=!0,window.requestAnimationFrame(r=>{t.apply(this,n),e=!1}))}}var p={CONTAIN:{name:"contain",icon:"el-icon-full-screen"},ORIGINAL:{name:"original",icon:"el-icon-c-scale-to-original"}},h=f()?"DOMMouseScroll":"mousewheel",v={name:"ElImageViewer",props:{urlList:{type:Array,default:function(){return[]}},zIndex:{type:Number,default:2e3},onSwitch:{type:Function,default:function(){}},onClose:{type:Function,default:function(){}},initialIndex:{type:Number,default:0}},data:function(){return{index:this.initialIndex,isShow:!1,infinite:!0,loading:!1,mode:p.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},computed:{isSingle:function(){return this.urlList.length<=1},isFirst:function(){return 0===this.index},isLast:function(){return this.index===this.urlList.length-1},currentImg:function(){return this.urlList[this.index]},imgStyle:function(){var t=this.transform,e=t.scale,n=t.deg,r=t.offsetX,i=t.offsetY,o=t.enableTransition,a={transform:"scale(".concat(e,") rotate(").concat(n,"deg)"),transition:o?"transform .3s":"","margin-left":"".concat(r,"px"),"margin-top":"".concat(i,"px")};return this.mode===p.CONTAIN&&(a.maxWidth=a.maxHeight="100%"),a}},watch:{index:{handler:function(t){this.reset(),this.onSwitch(t)}},currentImg:function(t){var e=this;this.$nextTick((function(t){var n=e.$refs.img[0];n.complete||(e.loading=!0)}))}},methods:{hide:function(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall:function(){var t=this;this._keyDownHandler=d((function(e){var n=e.keyCode;switch(n){case 27:t.hide();break;case 32:t.toggleMode();break;case 37:t.prev();break;case 38:t.handleActions("zoomIn");break;case 39:t.next();break;case 40:t.handleActions("zoomOut");break}})),this._mouseWheelHandler=d((function(e){var n=e.wheelDelta?e.wheelDelta:-e.detail;n>0?t.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):t.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})})),l(document,"keydown",this._keyDownHandler),l(document,h,this._mouseWheelHandler)},deviceSupportUninstall:function(){u(document,"keydown",this._keyDownHandler),u(document,h,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad:function(t){this.loading=!1},handleImgError:function(t){this.loading=!1,t.target.alt="加载失败"},handleMouseDown:function(t){var e=this;if(!this.loading&&0===t.button){var n=this.transform,r=n.offsetX,i=n.offsetY,o=t.pageX,a=t.pageY;this._dragHandler=d((function(t){e.transform.offsetX=r+t.pageX-o,e.transform.offsetY=i+t.pageY-a})),l(document,"mousemove",this._dragHandler),l(document,"mouseup",(function(t){u(document,"mousemove",e._dragHandler)})),t.preventDefault()}},reset:function(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode:function(){if(!this.loading){var t=Object.keys(p),e=Object.values(p),n=e.indexOf(this.mode),r=(n+1)%t.length;this.mode=p[t[r]],this.reset()}},prev:function(){if(!this.isFirst||this.infinite){var t=this.urlList.length;this.index=(this.index-1+t)%t}},next:function(){if(!this.isLast||this.infinite){var t=this.urlList.length;this.index=(this.index+1)%t}},handleActions:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.loading){var n=Object(o["a"])({zoomRate:.2,rotateDeg:90,enableTransition:!0},e),r=n.zoomRate,i=n.rotateDeg,a=n.enableTransition,c=this.transform;switch(t){case"zoomOut":c.scale>.2&&(c.scale=parseFloat((c.scale-r).toFixed(3)));break;case"zoomIn":c.scale=parseFloat((c.scale+r).toFixed(3));break;case"clocelise":c.deg+=i;break;case"anticlocelise":c.deg-=i;break}c.enableTransition=a}}},mounted:function(){this.deviceSupportInstall(),this.$refs["el-image-viewer__wrapper"].focus()}},m=v,g=(n("90e1"),n("2877")),b=Object(g["a"])(m,r,i,!1,null,null,null);e["a"]=b.exports},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fea9:function(t,e,n){var r=n("da84");t.exports=r.Promise},ffb9:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"z-upload",class:[t.size]},[n("ul",{staticClass:"el-upload-list el-upload-list--picture-card"},[n("drag-field",{attrs:{draggable:t.draggable},on:{change:t.onDragFile},model:{value:t.imageList,callback:function(e){t.imageList=e},expression:"imageList"}},t._l(t.imageList,(function(e,r){return n("div",{key:r,staticClass:"el-upload-list__item-wrapper"},[n("li",{staticClass:"el-upload-list__item"},["all"===t.type?[t.isImage(e)?n("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:e,alt:""}}):n("div",{staticClass:"el-upload-list__item-thumbnail--file",class:t._f("fileTypeFilter")(e),attrs:{alt:""}})]:["image"===t.type?n("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:e,alt:""}}):n("div",{staticClass:"el-upload-list__item-thumbnail--file",class:t._f("fileTypeFilter")(e),attrs:{alt:""}})],t.cornerClose?n("div",{staticClass:"el-upload-list__item-actions"},[t.isImage(e)?n("div",{staticClass:"block-preview",on:{click:function(n){return t.onPreview(e,r)}}},[n("i",{staticClass:"el-icon-view"})]):n("div",{staticClass:"block-download",on:{click:function(n){return t.onDownload(e)}}},[n("i",{staticClass:"el-icon-download"})])]):n("div",{staticClass:"el-upload-list__item-actions"},[t.isImage(e)?n("span",{staticClass:"el-upload-list__item-preview",on:{click:function(n){return t.onPreview(e,r)}}},[n("i",{staticClass:"el-icon-zoom-in"})]):n("span",{staticClass:"el-upload-list__item-preview",on:{click:function(n){return t.onDownload(e)}}},[n("i",{staticClass:"el-icon-download"})]),t.disabled?t._e():n("span",{staticClass:"el-upload-list__item-delete",on:{click:function(n){return t.onRemove(e,r)}}},[n("i",{staticClass:"el-icon-delete"})])])],2),t.cornerClose&&!t.disabled?n("div",{staticClass:"corner-close",on:{click:function(n){return t.onRemove(e,r)}}},[n("i",{staticClass:"el-icon-close"})]):t._e()])})),0),!t.limit||t.imageList.length<t.limit?n("el-upload",{attrs:{action:t.action,data:t.data,name:t.name,headers:t.headers,"file-list":t.fileList,disabled:t.disabled,multiple:t.multiple,limit:t.limit,drag:t.drag,"show-file-list":!1,"list-type":"picture-card","on-exceed":t.onExceed,"on-success":t.onSuccess,"on-error":t.onError,"before-upload":t.onBeforeUpload,"http-request":t.isCustomRequest?t.onHttpRequest:void 0}},[n("i",{staticClass:"el-icon-plus"})]):t._e()],1),t.$scopedSlots["image-viewer"]||t.$slots["image-viewer"]?t._t("image-viewer",null,{show:t.isImageViewerShow,index:t.defaultIndex,list:t.filteredImageList,close:t.closeViewer,open:t.openViewer}):[t.isImageViewerShow?n("el-image-viewer",{attrs:{"initial-index":t.defaultIndex,"on-close":t.closeViewer,"url-list":t.filteredImageList}}):t._e()]],2)},i=[],o=(n("4de4"),n("c740"),n("4160"),n("caad"),n("a15b"),n("45fc"),n("a434"),n("b0c0"),n("a9e3"),n("b64b"),n("ac1f"),n("2532"),n("1276"),n("159b"),n("5530")),a=n("fd7f"),c=[".bmp",".jpg",".png",".tif",".gif",".pcx",".tga",".exif",".fpx",".svg"],s=function(t){return"".concat(/\.[^.]+$/.exec(t)[0]).toLowerCase()},l={name:"Upload",components:{ElImageViewer:a["a"],DragField:{props:{value:Array,draggable:Boolean},render:function(t){var e=this;return this.draggable?t("draggable",{props:{value:this.value},on:{input:function(t){return e.$emit("input",t)},change:function(t){return e.$emit("change",t)}}},this.$slots.default):t("div",this.$slots.default)}}},props:{value:String,disabled:Boolean,multiple:Boolean,limit:Number,drag:Boolean,draggable:Boolean,action:String,headers:{type:Object,default:function(){return{}}},deleteConfirm:Boolean,data:{type:Object,default:function(){return{}}},name:{type:String,default:"file"},responseFilter:Function,beforeUpload:Function,type:{type:String,default:"all"},fileType:String,size:{type:String,default:"large"},http:Function,httpRequest:Function,cornerClose:Boolean},data:function(){return{fileList:[],imageList:[],isImageViewerShow:!1,currentIndex:0}},computed:{isCustomRequest:function(){return Boolean(this.http)||Boolean(this.httpRequest)||Boolean(this.$axios)},filteredImageList:function(){return"all"===this.type?this.imageList.filter((function(t){return c.some((function(e){return"".concat(t).toLowerCase().includes(e)}))})):this.imageList},defaultIndex:function(){if("all"===this.type){var t=this.imageList[this.currentIndex];return this.filteredImageList.findIndex((function(e){return e===t}))}return this.currentIndex}},filters:{fileTypeFilter:function(t){var e=s(t);return[".doc",".docx"].includes(e)?"word":[".xls",".xlsx",".csv"].includes(e)?"excel":[".ppt",".pptx"].includes(e)?"ppt":[".pdf"].includes(e)?"pdf":[".zip",".rar",".7z"].includes(e)?"zip":""}},watch:{value:{handler:function(t){if(t){var e=[],n=[];t.split(",").forEach((function(t){e.push(t),n.push({url:t})})),this.imageList=e,this.fileList=n}else this.fileList=[],this.imageList=[]},immediate:!0}},methods:{isImage:function(t){return c.some((function(e){return"".concat(t).toLowerCase().includes(e)}))},onRemove:function(t,e){var n=this;this.deleteConfirm?this.$confirm("确定删除当前".concat(this.isImage(t)?"图片":"文件","吗?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){n.removeImage(e)})).catch((function(){})):this.removeImage(e)},removeImage:function(t){this.imageList.splice(t,1),this.fileList.splice(t,1),this.$emit("input",this.imageList.join(","))},onPreview:function(t,e){this.currentIndex=e,this.$nextTick(this.openViewer)},openViewer:function(){this.isImageViewerShow=!0},closeViewer:function(){this.isImageViewerShow=!1},onDownload:function(t){window.open(t)},onBeforeUpload:function(t){if("all"===this.type)return!this.beforeUpload||this.beforeUpload(t);var e=s(t.name);if("image"===this.type){if(!"".concat(t.type).toLowerCase().includes("image"))return this.$message.warning("请上传图片"),!1}else if("file"===this.type&&("".concat(t.type).toLowerCase().includes("image")||this.fileType&&!e.includes(this.fileType)))return this.$message.warning("请上传".concat(this.fileType||"","文件")),!1;return!this.beforeUpload||this.beforeUpload(t)},onHttpRequest:function(t){var e=this,n=new FormData;if(t.data&&Object.keys(t.data).forEach((function(e){n.append(e,t.data[e])})),n.append(t.filename,t.file,t.file.name),this.httpRequest)this.httpRequest(Object(o["a"])(Object(o["a"])({},t),{},{formData:n}));else{var r=this.http||this.$axios;r&&r.post&&r.post(t.action,n,{headers:t.headers}).then((function(t){e.onSuccess(t.data)})).catch((function(t){e.onError(t)}))}},onError:function(t){this.$message.error("上传失败, 系统异常!")},onSuccess:function(t){if(t.success){var e=t||{},n=e.result;this.responseFilter?this.imageList.push(this.responseFilter(t)):n&&this.imageList.push(n[0]),this.$emit("input",this.imageList.join(","))}else t.businessException?this.$message.error("上传失败!"+t.message):this.$message.error("上传失败!");this.$emit("upload",t)},onExceed:function(){this.$message.warning("文件个数超出限制!")},onDragFile:function(){this.$emit("input",this.imageList.join(","))}}},u=l,f=(n("fcf8"),n("2877")),d=Object(f["a"])(u,r,i,!1,null,null,null);e["default"]=d.exports}})}));
2 1 \ No newline at end of file
  2 +(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["zee"]=e(require("vue")):t["zee"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},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 r=n("b622"),i=r("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},"0366":function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"057f":function(t,e,n){var r=n("fc6a"),i=n("241c").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return i(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?c(t):i(r(t))}},"06cf":function(t,e,n){var r=n("83ab"),i=n("d1e7"),o=n("5c6c"),a=n("fc6a"),c=n("c04e"),s=n("5135"),l=n("0cfb"),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=a(t),e=c(e,!0),l)try{return u(t,e)}catch(n){}if(s(t,e))return o(!i.f.call(t,e),t[e])}},"07ac":function(t,e,n){var r=n("23e7"),i=n("6f53").values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},"0a36":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-form",t._b({ref:"form",staticClass:"zee-form",class:t.formClass,attrs:{size:t.size,model:t.formModel,"label-width":t.labelWidth,"label-position":t.labelPosition||t.labelWidth?"right":"top"}},"el-form",t.formProps,!1),[n("form-render",{attrs:{"title-class":t.titleClass,"content-class":t.contentClass,"item-class":t.itemClass,"col-class":t.colClass,"group-class":t.groupClass,list:t.formList,value:t.model,model:t.model,span:t.span,type:t.type,params:t.params},on:{"item-change":t.onItemChange,"form-item-change":t.onFormItemChange,"item-update":t.onItemUpdate}},[t._l(t.slotKeys,(function(e){return t._t(e,null,{slot:e})}))],2),t.$scopedSlots.footer?n("div",{staticClass:"zee-form__footer"},[t._t("footer",null,{size:t.size,validate:t.validate,reset:t.reset,model:t.model})],2):t._e()],1)},i=[],o=(n("99af"),n("4160"),n("d81d"),n("a9e3"),n("4fad"),n("b64b"),n("d3b7"),n("e6cf"),n("159b"),n("5530")),a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.rowComponent,{tag:"component",staticClass:"zee-form__flex-wrap"},[t._l(t.list,(function(e,r){return[e.group&&e.list?n(t.colComponent,{key:r,tag:"component",class:t.colClassRender(e,r,t.colClass),style:{width:"div"===t.type?"100%":void 0},attrs:{span:"div"===t.type?void 0:e.group.span||24}},[n(t.rowComponent,{tag:"component",staticClass:"zee-form__flex-wrap",class:t.groupClass||"zee-form__group"},[e.group.title?n(t.rowComponent,{tag:"component",class:t.titleClass||"zee-form__group-title",staticStyle:{width:"100%"}},[t._v(" "+t._s(e.group.title||e.group)+" ")]):t._e(),n("form-render",{class:t.contentClass||"zee-form__group-content",attrs:{"title-class":t.titleClass,"item-class":t.itemClass,"content-class":t.contentClass,"group-class":t.groupClass,list:e.list,value:t.value,model:t.itemKey?t.model[t.itemKey]||{}:t.model,itemKey:e.group.key,type:t.type,span:"div"===t.type?void 0:t.span*(24/(e.group.span||24))},on:{"item-change":t.onItemChange,"form-item-change":t.onFormItemChange,"item-update":t.onItemUpdate}})],1)],1):[t.bindItemVisible(e,"visible")?n(t.colComponent,{directives:[{name:"show",rawName:"v-show",value:t.bindItemVisible(e,"show"),expression:"bindItemVisible(item, 'show')"}],key:r,tag:"component",class:t.colClassRender(e,r,t.colClass),style:{width:"div"===t.type&&e.style&&e.style.width.includes("%")?e.style.width:void 0,paddingRight:"10px"},attrs:{span:"div"===t.type?void 0:e.span||t.span}},[n("el-form-item",{class:t.itemClass||"zee-form__item",attrs:{label:e.label,"label-width":e.labelWidth,prop:e.fullKey,rules:t._f("bindItemRulesFilter")(e,t.model)}},[t.$scopedSlots[e.fullKey]?t._t(e.fullKey,null,{value:t.itemValue(e),model1:t.value}):["function"===typeof e.type?n("dynamic-render",{attrs:{render:e.type(t.$createElement,{model:t.value,config:{props:Object.assign({},t.propsFormatter(e.props),{value:t.itemValue(e)}),style:e.style||{width:"100%"},on:Object.assign({},t.bindItemEvent(e),{input:function(n){return t.onInput({value:n,item:e})}})}})}}):n(e.type,t._g(t._b({tag:"component",style:e.style||{width:"100%"},attrs:{value:t.itemValue(e)},on:{input:function(n){return t.onInput({value:n,item:e})}}},"component",t.propsFormatter(e.props),!1),t.bindItemEvent(e)))]],2)],1):t._e()]]}))],2)},c=[],s=n("ade3"),l={functional:!0,render:function(t,e){return e.props.render}},u={name:"FormRender",components:{DynamicRender:l},props:{list:Array,model:Object,value:Object,itemKey:String,titleClass:String,contentClass:String,itemClass:String,colClass:[String,Function],groupClass:String,type:String,span:Number,params:Object},computed:{rowComponent:function(){return"div"===this.type?"div":"el-row"},colComponent:function(){return"div"===this.type?"div":"el-col"}},filters:{bindItemRulesFilter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return t.rules?"function"===typeof t.rules?t.rules(e):t.rules:void 0}},methods:{colClassRender:function(t,e,n){return n instanceof Function?n(t,e):n},itemValue:function(t){if(this.itemKey){var e=this.model[this.itemKey]||{};return e[t.key]}return this.model[t.key]},onInput:function(t){var e=t.value,n=t.item;this.itemKey?this.$emit("item-change",Object(s["a"])({},this.itemKey,Object(o["a"])(Object(o["a"])({},this.model[this.itemKey]),{},Object(s["a"])({},n.key,e)))):this.$emit("item-change",Object(s["a"])({},n.key,e)),this.$emit("form-item-change",Object(s["a"])({},n.fullKey,e))},onItemChange:function(t){this.itemKey?this.$emit("item-change",Object(s["a"])({},this.itemKey,Object(o["a"])(Object(o["a"])({},this.model[this.itemKey]),t))):this.$emit("item-change",t)},onFormItemChange:function(t){this.$emit("form-item-change",t)},onItemUpdate:function(t){this.$emit("item-update",t)},bindItemEvent:function(t){var e=this;return t.on?"function"===typeof t.on?t.on({model:this.value,update:function(t){return e.$emit("item-update",t)}}):t.on:void 0},bindItemVisible:function(t,e){var n=t[e];return"function"===typeof n?n(this.model,this.params||{}):!1!==t[e]},propsFormatter:function(t){return"function"===typeof t?t(this.model,this.params||{}):t||{}}}},f=u,d=n("2877"),p=Object(d["a"])(f,a,c,!1,null,null,null),h=p.exports,v=n("0d12"),m={name:"Form",components:{FormRender:h},props:{value:Object,list:Array,formClass:String,titleClass:String,contentClass:String,itemClass:String,colClass:[String,Function],groupClass:String,labelWidth:String,labelPosition:String,type:String,size:{type:String,default:"small"},span:{type:Number,default:24},formProps:{type:Object,default:function(){return{}}},params:Object},data:function(){return{model:{},formModel:{},formList:[]}},computed:{slotKeys:function(){return Object.keys(this.$scopedSlots)}},watch:{value:{handler:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.model=t,this.setFormModel(t)},immediate:!0},list:{handler:function(t){var e=Object(v["a"])(this.list),n=function t(e,n){e.forEach((function(e){e.group&&e.list?(e.group.key?e.fullKey="".concat(n?"".concat(n,"-").concat(e.group.key):e.group.key):e.fullKey=n||e.key,t(e.list,e.fullKey)):e.fullKey="".concat(n?"".concat(n,"-").concat(e.key):e.key)}))};n(e),this.formList=e},immediate:!0}},methods:{handleInput:function(t){console.log(t)},onItemChange:function(t){this.$emit("input",Object(o["a"])(Object(o["a"])({},this.model),t))},onFormItemChange:function(t){this.formModel=Object(o["a"])(Object(o["a"])({},this.formModel),t)},validate:function(t){var e=this;return new Promise((function(n){e.$refs.form.validate((function(r){return t&&t(r),e.$emit("validate",r,e.model),n(r)}))}))},reset:function(){this.$refs.form.clearValidate(),this.$emit("reset")},setFormModel:function(t){var e={},n=function t(n,r){n.forEach((function(n){n.fullKey="".concat(r?"".concat(r,"-").concat(n.key):n.key),n.value instanceof Object?t(Object.keys(n.value).map((function(t){return{key:t,value:n.value[t]}})),n.fullKey):e[n.fullKey]=n.value}))};n(Object.keys(t).map((function(e){return{key:e,value:t[e]}}))),this.formModel=e},onItemUpdate:function(t){var e=this;this.$nextTick((function(){var n=Object(v["a"])(e.model);Object.entries(t).forEach((function(t){Object(v["c"])(n,t[0],t[1])})),e.$emit("input",n)}))}}},g=m,b=(n("c631"),Object(d["a"])(g,r,i,!1,null,null,null));e["default"]=b.exports},"0cfb":function(t,e,n){var r=n("83ab"),i=n("d039"),o=n("cc12");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0d12":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a}));n("4de4"),n("13d5"),n("a9e3"),n("4d63"),n("ac1f"),n("25f0"),n("1276");var r=n("53ca"),i=function t(e){if("object"!==Object(r["a"])(e))return e;if(!e)return e;if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(e instanceof Function)return e;var n;if(e instanceof Array){n=[];for(var i=0,o=e.length;i<o;i++)n.push(t(e[i]));return n}for(var a in n={},e)Object.prototype.hasOwnProperty.call(e,a)&&("object"!==Object(r["a"])(e[a])?n[a]=e[a]:n[a]=t(e[a]));return n},o=function(t,e){if(void 0===e||"string"===typeof e){if("undefined"!==typeof t&&"string"===typeof e){var n=/[.\[\]'"]/g,r=e.split(n).filter((function(t){return""!==t}));t=r.reduce((function(t,e){return t&&void 0!==t[e]?t[e]:void 0}),t)}return t}},a=function(t,e,n){var r=/[.\[\]'"]/g,i=e.split(r).filter((function(t){return""!==t})),o=i.pop();i.reduce((function(t,e){return(t&&void 0===t[e]||null===t[e])&&(t[e]=isNaN(Number(o))?{}:[]),t[e]}),t)[o]=n}},"0fa5":function(t,e,n){},1148:function(t,e,n){"use strict";var r=n("a691"),i=n("1d80");t.exports="".repeat||function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},1276:function(t,e,n){"use strict";var r=n("d784"),i=n("44e7"),o=n("825a"),a=n("1d80"),c=n("4840"),s=n("8aa5"),l=n("50c4"),u=n("14c3"),f=n("9263"),d=n("d039"),p=[].push,h=Math.min,v=4294967295,m=!d((function(){return!RegExp(v,"y")}));r("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(a(this)),o=void 0===n?v:n>>>0;if(0===o)return[];if(void 0===t)return[r];if(!i(t))return e.call(r,t,o);var c,s,l,u=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,m=new RegExp(t.source,d+"g");while(c=f.call(m,r)){if(s=m.lastIndex,s>h&&(u.push(r.slice(h,c.index)),c.length>1&&c.index<r.length&&p.apply(u,c.slice(1)),l=c[0].length,h=s,u.length>=o))break;m.lastIndex===c.index&&m.lastIndex++}return h===r.length?!l&&m.test("")||u.push(""):u.push(r.slice(h)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=a(this),o=void 0==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var a=n(r,t,this,i,r!==e);if(a.done)return a.value;var f=o(t),d=String(this),p=c(f,RegExp),g=f.unicode,b=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(m?"y":"g"),y=new p(m?f:"^(?:"+f.source+")",b),w=void 0===i?v:i>>>0;if(0===w)return[];if(0===d.length)return null===u(y,d)?[d]:[];var x=0,_=0,S=[];while(_<d.length){y.lastIndex=m?_:0;var O,j=u(y,m?d:d.slice(_));if(null===j||(O=h(l(y.lastIndex+(m?0:_)),d.length))===x)_=s(d,_,g);else{if(S.push(d.slice(x,_)),S.length===w)return S;for(var E=1;E<=j.length-1;E++)if(S.push(j[E]),S.length===w)return S;_=x=O}}return S.push(d.slice(x)),S}]}),!m)},"129f":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},"13d5":function(t,e,n){"use strict";var r=n("23e7"),i=n("d58f").left,o=n("a640"),a=n("ae40"),c=o("reduce"),s=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!s},{reduce:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"142b":function(t,e,n){t.exports={primary:"#f39800",blue:"#2f54eb","blue-light":"#69c0ff","blue-hover":"#e6f7ff",red:"#f5222d",green:"#26aa58","green-light":"#5edd8e",orange:"#ff9852",gray:"#343434",grey:"#8c8c8c",purple:"#722ed1",cyan:"#13c2c2",black:"#000",text:"#314659",border:"#e8e8e8","border-light":"rgba(232,232,232,.2)",background:"#fff"}},"14c3":function(t,e,n){var r=n("c6b6"),i=n("9263");t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var o=n.call(t,e);if("object"!==typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},"159b":function(t,e,n){var r=n("da84"),i=n("fdbc"),o=n("17c2"),a=n("9112");for(var c in i){var s=r[c],l=s&&s.prototype;if(l&&l.forEach!==o)try{a(l,"forEach",o)}catch(u){l.forEach=o}}},"17c2":function(t,e,n){"use strict";var r=n("b727").forEach,i=n("a640"),o=n("ae40"),a=i("forEach"),c=o("forEach");t.exports=a&&c?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,n){var r=n("b622"),i=r("iterator"),o=!1;try{var a=0,c={next:function(){return{done:!!a++}},return:function(){o=!0}};c[i]=function(){return this},Array.from(c,(function(){throw 2}))}catch(s){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var r={};r[i]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(s){}return n}},"1cdc":function(t,e,n){var r=n("342f");t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,n){var r=n("d039"),i=n("b622"),o=n("2d00"),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[],n=e.constructor={};return n[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},2266:function(t,e,n){var r=n("825a"),i=n("e95a"),o=n("50c4"),a=n("0366"),c=n("35a1"),s=n("9bdd"),l=function(t,e){this.stopped=t,this.result=e},u=t.exports=function(t,e,n,u,f){var d,p,h,v,m,g,b,y=a(e,n,u?2:1);if(f)d=t;else{if(p=c(t),"function"!=typeof p)throw TypeError("Target is not iterable");if(i(p)){for(h=0,v=o(t.length);v>h;h++)if(m=u?y(r(b=t[h])[0],b[1]):y(t[h]),m&&m instanceof l)return m;return new l(!1)}d=p.call(t)}g=d.next;while(!(b=g.call(d)).done)if(m=s(d,y,b.value,u),"object"==typeof m&&m&&m instanceof l)return m;return new l(!1)};u.stop=function(t){return new l(!0,t)}},"23cb":function(t,e,n){var r=n("a691"),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},"23e7":function(t,e,n){var r=n("da84"),i=n("06cf").f,o=n("9112"),a=n("6eeb"),c=n("ce4e"),s=n("e893"),l=n("94ca");t.exports=function(t,e){var n,u,f,d,p,h,v=t.target,m=t.global,g=t.stat;if(u=m?r:g?r[v]||c(v,{}):(r[v]||{}).prototype,u)for(f in e){if(p=e[f],t.noTargetGet?(h=i(u,f),d=h&&h.value):d=u[f],n=l(m?f:v+(g?".":"#")+f,t.forced),!n&&void 0!==d){if(typeof p===typeof d)continue;s(p,d)}(t.sham||d&&d.sham)&&o(p,"sham",!0),a(u,f,p,t)}}},"241c":function(t,e,n){var r=n("ca84"),i=n("7839"),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},2532:function(t,e,n){"use strict";var r=n("23e7"),i=n("5a34"),o=n("1d80"),a=n("ab13");r({target:"String",proto:!0,forced:!a("includes")},{includes:function(t){return!!~String(o(this)).indexOf(i(t),arguments.length>1?arguments[1]:void 0)}})},"25f0":function(t,e,n){"use strict";var r=n("6eeb"),i=n("825a"),o=n("d039"),a=n("ad6d"),c="toString",s=RegExp.prototype,l=s[c],u=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),f=l.name!=c;(u||f)&&r(RegExp.prototype,c,(function(){var t=i(this),e=String(t.source),n=t.flags,r=String(void 0===n&&t instanceof RegExp&&!("flags"in s)?a.call(t):n);return"/"+e+"/"+r}),{unsafe:!0})},2626:function(t,e,n){"use strict";var r=n("d066"),i=n("9bf2"),o=n("b622"),a=n("83ab"),c=o("species");t.exports=function(t){var e=r(t),n=i.f;a&&e&&!e[c]&&n(e,c,{configurable:!0,get:function(){return this}})}},2877:function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,c){var s,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),a?(s=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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=s):i&&(s=c?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),s)if(l.functional){l._injectStyles=s;var u=l.render;l.render=function(t,e){return s.call(e),u(t,e)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,s):[s]}return{exports:t,options:l}}n.d(e,"a",(function(){return r}))},2909:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t){if(Array.isArray(t))return r(t)}n.d(e,"a",(function(){return s}));n("a4d3"),n("e01a"),n("d28b"),n("a630"),n("e260"),n("d3b7"),n("3ca3"),n("ddb0");function o(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}n("fb6a"),n("b0c0"),n("25f0");function a(t,e){if(t){if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t){return i(t)||o(t)||a(t)||c()}},"2cf4":function(t,e,n){var r,i,o,a=n("da84"),c=n("d039"),s=n("c6b6"),l=n("0366"),u=n("1be4"),f=n("cc12"),d=n("1cdc"),p=a.location,h=a.setImmediate,v=a.clearImmediate,m=a.process,g=a.MessageChannel,b=a.Dispatch,y=0,w={},x="onreadystatechange",_=function(t){if(w.hasOwnProperty(t)){var e=w[t];delete w[t],e()}},S=function(t){return function(){_(t)}},O=function(t){_(t.data)},j=function(t){a.postMessage(t+"",p.protocol+"//"+p.host)};h&&v||(h=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return w[++y]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(y),y},v=function(t){delete w[t]},"process"==s(m)?r=function(t){m.nextTick(S(t))}:b&&b.now?r=function(t){b.now(S(t))}:g&&!d?(i=new g,o=i.port2,i.port1.onmessage=O,r=l(o.postMessage,o,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||c(j)||"file:"===p.protocol?r=x in f("script")?function(t){u.appendChild(f("script"))[x]=function(){u.removeChild(this),_(t)}}:function(t){setTimeout(S(t),0)}:(r=j,a.addEventListener("message",O,!1))),t.exports={set:h,clear:v}},"2d00":function(t,e,n){var r,i,o=n("da84"),a=n("342f"),c=o.process,s=c&&c.versions,l=s&&s.v8;l?(r=l.split("."),i=r[0]+r[1]):a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(i=r[1]))),t.exports=i&&+i},"32e7":function(t,e,n){t.exports={primary:"#f39800",blue:"#2f54eb","blue-light":"#69c0ff","blue-hover":"#e6f7ff",red:"#f5222d",green:"#26aa58","green-light":"#5edd8e",orange:"#ff9852",gray:"#343434",grey:"#8c8c8c",purple:"#722ed1",cyan:"#13c2c2",black:"#000",text:"#314659",border:"#e8e8e8","border-light":"rgba(232,232,232,.2)",background:"#fff"}},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"35a1":function(t,e,n){var r=n("f5df"),i=n("3f8c"),o=n("b622"),a=o("iterator");t.exports=function(t){if(void 0!=t)return t[a]||t["@@iterator"]||i[r(t)]}},3782:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("z-form",{staticClass:"zee-filter",attrs:{list:t.formattedList,span:t.span,labelWidth:t.labelWidth,colClass:t.colVisibleRender,size:t.size,formProps:t.formProps,params:t.params},model:{value:t.model,callback:function(e){t.model=e},expression:"model"}},[t._l(t.slotKeys,(function(e){return["operation"===e?[t._t(e,null,{slot:e},{size:t.size,handleSearch:t.handleSearch,handleReset:t.handleReset,handleCollapse:t.handleCollapse,showCollapsed:t.showCollapsed,collapsed:t.collapsed,loading:t.loading})]:t._t(e,null,{slot:e})]})),t.slotKeys.includes("operation")?t._e():n("div",{staticClass:"zee-filter__button-group",attrs:{slot:"operation"},slot:"operation"},[n("el-button-group",{attrs:{size:t.size}},[n("el-button",{attrs:{type:"primary",loading:t.loading,icon:"el-icon-search"},on:{click:t.handleSearch}},[n("span",[t._v("查询")])]),n("el-button",{on:{click:t.handleReset}},[n("span",[t._v("重置")])]),t.showCollapsed?n("el-button",{on:{click:t.handleCollapse}},[n("span",[t._v(t._s(t.collapsed?"展开":"收起"))])]):t._e()],1)],1)],2)},i=[],o=(n("99af"),n("a9e3"),n("b64b"),n("2909")),a={name:"Filter",props:{value:Object,list:Array,labelWidth:{type:String,default:"110px"},size:{type:String,default:"small"},span:{type:Number,default:6},collapsedSpan:{type:Number,default:6},uncollapsedSpan:{type:Number,default:24},visibleNum:{type:Number,default:3},loading:Boolean,formProps:{type:Object,default:function(){return{}}},params:Object},data:function(){return{collapsed:!0,model:this.value||{}}},watch:{value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.model=t},model:function(t){this.$emit("input",t)}},computed:{formattedList:function(){return[].concat(Object(o["a"])(this.list),[{key:"operation",label:"",labelWidth:"0px",span:this.collapsed?this.collapsedSpan:this.uncollapsedSpan}])},showCollapsed:function(){var t=this.list,e=this.visibleNum;return t.length>e},slotKeys:function(){return Object.keys(this.$scopedSlots)}},methods:{colVisibleRender:function(t,e){if(this.collapsed){var n=this.visibleNum?this.visibleNum-1:2;return e>n&&e<this.list.length?"zee-filter__item hidden":"zee-filter__item"}return"zee-filter__item"},handleSearch:function(){this.$emit("search",this.model)},handleReset:function(){this.model={},this.$emit("reset")},handleCollapse:function(){this.collapsed=!this.collapsed}}},c=a,s=(n("53aa"),n("2877")),l=Object(s["a"])(c,r,i,!1,null,null,null);e["default"]=l.exports},"37e8":function(t,e,n){var r=n("83ab"),i=n("9bf2"),o=n("825a"),a=n("df75");t.exports=r?Object.defineProperties:function(t,e){o(t);var n,r=a(e),c=r.length,s=0;while(c>s)i.f(t,n=r[s++],e[n]);return t}},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3ca3":function(t,e,n){"use strict";var r=n("6547").charAt,i=n("69f3"),o=n("7dd0"),a="String Iterator",c=i.set,s=i.getterFor(a);o(String,"String",(function(t){c(this,{type:a,string:String(t),index:0})}),(function(){var t,e=s(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},"3f8c":function(t,e){t.exports={}},"408a":function(t,e,n){var r=n("c6b6");t.exports=function(t){if("number"!=typeof t&&"Number"!=r(t))throw TypeError("Incorrect invocation");return+t}},4160:function(t,e,n){"use strict";var r=n("23e7"),i=n("17c2");r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"428f":function(t,e,n){var r=n("da84");t.exports=r},"44ad":function(t,e,n){var r=n("d039"),i=n("c6b6"),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),i=n("7c73"),o=n("9bf2"),a=r("unscopables"),c=Array.prototype;void 0==c[a]&&o.f(c,a,{configurable:!0,value:i(null)}),t.exports=function(t){c[a][t]=!0}},"44de":function(t,e,n){var r=n("da84");t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},"44e7":function(t,e,n){var r=n("861d"),i=n("c6b6"),o=n("b622"),a=o("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==i(t))}},"45fc":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").some,o=n("a640"),a=n("ae40"),c=o("some"),s=a("some");r({target:"Array",proto:!0,forced:!c||!s},{some:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"466d":function(t,e,n){"use strict";var r=n("d784"),i=n("825a"),o=n("50c4"),a=n("1d80"),c=n("8aa5"),s=n("14c3");r("match",1,(function(t,e,n){return[function(e){var n=a(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var a=i(t),l=String(this);if(!a.global)return s(a,l);var u=a.unicode;a.lastIndex=0;var f,d=[],p=0;while(null!==(f=s(a,l))){var h=String(f[0]);d[p]=h,""===h&&(a.lastIndex=c(l,o(a.lastIndex),u)),p++}return 0===p?null:d}]}))},4840:function(t,e,n){var r=n("825a"),i=n("1c0b"),o=n("b622"),a=o("species");t.exports=function(t,e){var n,o=r(t).constructor;return void 0===o||void 0==(n=r(o)[a])?e:i(n)}},4930:function(t,e,n){var r=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},"498a":function(t,e,n){"use strict";var r=n("23e7"),i=n("58a8").trim,o=n("c8d2");r({target:"String",proto:!0,forced:o("trim")},{trim:function(){return i(this)}})},"4d63":function(t,e,n){var r=n("83ab"),i=n("da84"),o=n("94ca"),a=n("7156"),c=n("9bf2").f,s=n("241c").f,l=n("44e7"),u=n("ad6d"),f=n("9f7f"),d=n("6eeb"),p=n("d039"),h=n("69f3").set,v=n("2626"),m=n("b622"),g=m("match"),b=i.RegExp,y=b.prototype,w=/a/g,x=/a/g,_=new b(w)!==w,S=f.UNSUPPORTED_Y,O=r&&o("RegExp",!_||S||p((function(){return x[g]=!1,b(w)!=w||b(x)==x||"/a/i"!=b(w,"i")})));if(O){var j=function(t,e){var n,r=this instanceof j,i=l(t),o=void 0===e;if(!r&&i&&t.constructor===j&&o)return t;_?i&&!o&&(t=t.source):t instanceof j&&(o&&(e=u.call(t)),t=t.source),S&&(n=!!e&&e.indexOf("y")>-1,n&&(e=e.replace(/y/g,"")));var c=a(_?new b(t,e):b(t,e),r?this:y,j);return S&&n&&h(c,{sticky:n}),c},E=function(t){t in j||c(j,t,{configurable:!0,get:function(){return b[t]},set:function(e){b[t]=e}})},C=s(b),k=0;while(C.length>k)E(C[k++]);y.constructor=j,j.prototype=y,d(i,"RegExp",j)}v("RegExp")},"4d64":function(t,e,n){var r=n("fc6a"),i=n("50c4"),o=n("23cb"),a=function(t){return function(e,n,a){var c,s=r(e),l=i(s.length),u=o(a,l);if(t&&n!=n){while(l>u)if(c=s[u++],c!=c)return!0}else for(;l>u;u++)if((t||u in s)&&s[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").filter,o=n("1dde"),a=n("ae40"),c=o("filter"),s=a("filter");r({target:"Array",proto:!0,forced:!c||!s},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(t,e,n){"use strict";var r=n("0366"),i=n("7b0b"),o=n("9bdd"),a=n("e95a"),c=n("50c4"),s=n("8418"),l=n("35a1");t.exports=function(t){var e,n,u,f,d,p,h=i(t),v="function"==typeof this?this:Array,m=arguments.length,g=m>1?arguments[1]:void 0,b=void 0!==g,y=l(h),w=0;if(b&&(g=r(g,m>2?arguments[2]:void 0,2)),void 0==y||v==Array&&a(y))for(e=c(h.length),n=new v(e);e>w;w++)p=b?g(h[w],w):h[w],s(n,w,p);else for(f=y.call(h),d=f.next,n=new v;!(u=d.call(f)).done;w++)p=b?o(f,g,[u.value,w],!0):u.value,s(n,w,p);return n.length=w,n}},"4fad":function(t,e,n){var r=n("23e7"),i=n("6f53").entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},"50c4":function(t,e,n){var r=n("a691"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},5265:function(t,e,n){t.exports={primary:"#f39800",blue:"#2f54eb","blue-light":"#69c0ff","blue-hover":"#e6f7ff",red:"#f5222d",green:"#26aa58","green-light":"#5edd8e",orange:"#ff9852",gray:"#343434",grey:"#8c8c8c",purple:"#722ed1",cyan:"#13c2c2",black:"#000",text:"#314659",border:"#e8e8e8","border-light":"rgba(232,232,232,.2)",background:"#fff"}},5319:function(t,e,n){"use strict";var r=n("d784"),i=n("825a"),o=n("7b0b"),a=n("50c4"),c=n("a691"),s=n("1d80"),l=n("8aa5"),u=n("14c3"),f=Math.max,d=Math.min,p=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g,m=function(t){return void 0===t?t:String(t)};r("replace",2,(function(t,e,n,r){var g=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,b=r.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,r){var i=s(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!g&&b||"string"===typeof r&&-1===r.indexOf(y)){var o=n(e,t,this,r);if(o.done)return o.value}var s=i(t),p=String(this),h="function"===typeof r;h||(r=String(r));var v=s.global;if(v){var x=s.unicode;s.lastIndex=0}var _=[];while(1){var S=u(s,p);if(null===S)break;if(_.push(S),!v)break;var O=String(S[0]);""===O&&(s.lastIndex=l(p,a(s.lastIndex),x))}for(var j="",E=0,C=0;C<_.length;C++){S=_[C];for(var k=String(S[0]),I=f(d(c(S.index),p.length),0),A=[],P=1;P<S.length;P++)A.push(m(S[P]));var L=S.groups;if(h){var T=[k].concat(A,I,p);void 0!==L&&T.push(L);var $=String(r.apply(void 0,T))}else $=w(k,p,I,A,L,r);I>=E&&(j+=p.slice(E,I)+$,E=I+k.length)}return j+p.slice(E)}];function w(t,n,r,i,a,c){var s=r+t.length,l=i.length,u=v;return void 0!==a&&(a=o(a),u=h),e.call(c,u,(function(e,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return e;if(u>l){var f=p(u/10);return 0===f?e:f<=l?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):e}c=i[u-1]}return void 0===c?"":c}))}}))},"53aa":function(t,e,n){"use strict";var r=n("5a90"),i=n.n(r);i.a},"53ca":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n("a4d3"),n("e01a"),n("d28b"),n("e260"),n("d3b7"),n("3ca3"),n("ddb0");function r(t){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}},5423:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-table",t._g(t._b({ref:"table",staticClass:"zee-table",attrs:{data:t.tableData},on:{select:t.onSelect,"select-all":t.onSelectAll,"selection-change":t.onSelectionChange}},"el-table",Object.assign({},{size:t.size},t.tableProps),!1),t.tableEvents),[t._t("default"),t.tableList&&t.tableList.length>0?[t._l(t.tableList,(function(e,r){return[t.bindItemVisible(e.visible)?[t.$scopedSlots[e.keyPath.join("-")]?t._t(e.keyPath.join("-"),null,null,e):n("el-table-column",t._b({key:r,attrs:{prop:e.fullKey||e.key,"min-width":t.minWidth||e.minWidth||e["min-width"]},scopedSlots:t._u([{key:"default",fn:function(r){var i=r.row,o=r.column,a=r.$index;return[n("cell-render",{attrs:{row:i,item:e}},[t.$scopedSlots["value-"+e.keyPath.join("-")]?t._t("value-"+e.keyPath.join("-"),null,{row:i,value:t.$_get(i,e.fullKey),column:o,index:a},e):e.render?n("cell-value-render",{attrs:{row:i,column:o,index:a,item:e}}):t._e()],2)]}}],null,!0)},"el-table-column",Object.assign({},e,{type:void 0}),!1))]:t._e()]}))]:t._e(),t._t("column-append"),t._t("column-end")],2)},i=[],o=(n("99af"),n("7db0"),n("4160"),n("a9e3"),n("ac1f"),n("1276"),n("159b"),n("5530")),a=n("0d12"),c={props:{row:Object,column:Object,index:[Number,String],item:Object},render:function(t){var e=this.row,n=this.column,r=this.index,i=this.item;return"function"===typeof i.render?i.render(t,{row:e,value:Object(a["b"])(e,i.fullKey),$index:r,column:n}):i.render.children instanceof Function?t(i.render.type,{props:i.render.props,attrs:i.render.props,style:i.render.style},i.render.children({row:e,value:Object(a["b"])(e,i.fullKey),$index:r,column:n})):t(i.render.type,{props:i.render.props,attrs:i.render.props,style:i.render.style},i.render.children||Object(a["b"])(e,i.fullKey))}},s={name:"Table",components:{CellRender:{props:{row:Object,item:Object},render:function(t){return this.$scopedSlots.default?t("span",this.$scopedSlots.default()):t("span",Object(a["b"])(this.row,this.item.agentKey||this.item.fullKey))}},CellValueRender:c},props:{value:Array,list:{type:Array,required:!0},tableProps:{type:Object,default:function(){return{}}},tableEvents:Object,minWidth:Number,size:{type:String,default:"small"}},data:function(){return{tableList:[],tableData:[]}},computed:{instance:{get:function(){return this.$refs.table}}},watch:{value:{handler:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tableData=t},immediate:!0},list:{handler:function(t){var e=Object(a["a"])(this.list),n=function t(e,n){e.forEach((function(e){e.group&&e.list?(e.group.key?e.fullKey="".concat(n?"".concat(n,".").concat(e.group.key):e.group.key):e.fullKey=n||e.key,t(e.list,e.fullKey)):e.fullKey="".concat(n?"".concat(n,".").concat(e.key):e.key)}))};n(e);var r=[],i=function t(e){e.forEach((function(e){e.group&&e.list?t(e.list):e.group||e.list||r.push(Object(o["a"])(Object(o["a"])({},e),{},{keyPath:e.fullKey.split(".")}))}))};i(e),this.tableList=r},immediate:!0}},methods:{$_get:a["b"],bindItemVisible:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=t;return"function"===typeof t&&(e=t(this.tableData)),e},onSelect:function(t,e){t.find((function(t){return t.id===e.id}))?this.$emit("selection-change",[e],"check"):this.$emit("selection-change",[e],"uncheck")},onSelectAll:function(t){t&&t.length>0?this.$emit("selection-change",t,"check"):this.$emit("selection-change",this.tableData,"uncheck")},onSelectionChange:function(t){this.$emit("selection",t)},toggleRowSelection:function(t,e){this.$refs.table&&this.$refs.table.toggleRowSelection(t,e)},clearSelection:function(){this.$refs.table&&this.$refs.table.clearSelection()}}},l=s,u=(n("8ffb"),n("2877")),f=Object(u["a"])(l,r,i,!1,null,null,null);e["default"]=f.exports},5530:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));n("a4d3"),n("4de4"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b");var r=n("ade3");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){Object(r["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},5692:function(t,e,n){var r=n("c430"),i=n("c6cd");(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),i=n("241c"),o=n("7418"),a=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},5899:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(t,e,n){var r=n("1d80"),i=n("5899"),o="["+i+"]",a=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),s=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(c,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},"5a34":function(t,e,n){var r=n("44e7");t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},"5a90":function(t,e,n){},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"60da":function(t,e,n){"use strict";var r=n("83ab"),i=n("d039"),o=n("df75"),a=n("7418"),c=n("d1e7"),s=n("7b0b"),l=n("44ad"),u=Object.assign,f=Object.defineProperty;t.exports=!u||i((function(){if(r&&1!==u({b:1},u(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||o(u({},e)).join("")!=i}))?function(t,e){var n=s(t),i=arguments.length,u=1,f=a.f,d=c.f;while(i>u){var p,h=l(arguments[u++]),v=f?o(h).concat(f(h)):o(h),m=v.length,g=0;while(m>g)p=v[g++],r&&!d.call(h,p)||(n[p]=h[p])}return n}:u},6547:function(t,e,n){var r=n("a691"),i=n("1d80"),o=function(t){return function(e,n){var o,a,c=String(i(e)),s=r(n),l=c.length;return s<0||s>=l?t?"":void 0:(o=c.charCodeAt(s),o<55296||o>56319||s+1===l||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):o:t?c.slice(s,s+2):a-56320+(o-55296<<10)+65536)}};t.exports={codeAt:o(!1),charAt:o(!0)}},"65f0":function(t,e,n){var r=n("861d"),i=n("e8b5"),o=n("b622"),a=o("species");t.exports=function(t,e){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?r(n)&&(n=n[a],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"69f3":function(t,e,n){var r,i,o,a=n("7f9a"),c=n("da84"),s=n("861d"),l=n("9112"),u=n("5135"),f=n("f772"),d=n("d012"),p=c.WeakMap,h=function(t){return o(t)?i(t):r(t,{})},v=function(t){return function(e){var n;if(!s(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(a){var m=new p,g=m.get,b=m.has,y=m.set;r=function(t,e){return y.call(m,t,e),e},i=function(t){return g.call(m,t)||{}},o=function(t){return b.call(m,t)}}else{var w=f("state");d[w]=!0,r=function(t,e){return l(t,w,e),e},i=function(t){return u(t,w)?t[w]:{}},o=function(t){return u(t,w)}}t.exports={set:r,get:i,has:o,enforce:h,getterFor:v}},"6eeb":function(t,e,n){var r=n("da84"),i=n("9112"),o=n("5135"),a=n("ce4e"),c=n("8925"),s=n("69f3"),l=s.get,u=s.enforce,f=String(String).split("String");(t.exports=function(t,e,n,c){var s=!!c&&!!c.unsafe,l=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||i(n,"name",e),u(n).source=f.join("string"==typeof e?e:"")),t!==r?(s?!d&&t[e]&&(l=!0):delete t[e],l?t[e]=n:i(t,e,n)):l?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||c(this)}))},"6f53":function(t,e,n){var r=n("83ab"),i=n("df75"),o=n("fc6a"),a=n("d1e7").f,c=function(t){return function(e){var n,c=o(e),s=i(c),l=s.length,u=0,f=[];while(l>u)n=s[u++],r&&!a.call(c,n)||f.push(t?[n,c[n]]:c[n]);return f}};t.exports={entries:c(!0),values:c(!1)}},7156:function(t,e,n){var r=n("861d"),i=n("d2bb");t.exports=function(t,e,n){var o,a;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(t,a),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),i=n("5135"),o=n("e538"),a=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r,i=n("825a"),o=n("37e8"),a=n("7839"),c=n("d012"),s=n("1be4"),l=n("cc12"),u=n("f772"),f=">",d="<",p="prototype",h="script",v=u("IE_PROTO"),m=function(){},g=function(t){return d+h+f+t+d+"/"+h+f},b=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){var t,e=l("iframe"),n="java"+h+":";return e.style.display="none",s.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(g("document.F=Object")),t.close(),t.F},w=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}w=r?b(r):y();var t=a.length;while(t--)delete w[p][a[t]];return w()};c[v]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(m[p]=i(t),n=new m,m[p]=null,n[v]=t):n=w(),void 0===e?n:o(n,e)}},"7db0":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").find,o=n("44d2"),a=n("ae40"),c="find",s=!0,l=a(c);c in[]&&Array(1)[c]((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!l},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(c)},"7dd0":function(t,e,n){"use strict";var r=n("23e7"),i=n("9ed3"),o=n("e163"),a=n("d2bb"),c=n("d44e"),s=n("9112"),l=n("6eeb"),u=n("b622"),f=n("c430"),d=n("3f8c"),p=n("ae93"),h=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,m=u("iterator"),g="keys",b="values",y="entries",w=function(){return this};t.exports=function(t,e,n,u,p,x,_){i(n,e,u);var S,O,j,E=function(t){if(t===p&&P)return P;if(!v&&t in I)return I[t];switch(t){case g:return function(){return new n(this,t)};case b:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this)}},C=e+" Iterator",k=!1,I=t.prototype,A=I[m]||I["@@iterator"]||p&&I[p],P=!v&&A||E(p),L="Array"==e&&I.entries||A;if(L&&(S=o(L.call(new t)),h!==Object.prototype&&S.next&&(f||o(S)===h||(a?a(S,h):"function"!=typeof S[m]&&s(S,m,w)),c(S,C,!0,!0),f&&(d[C]=w))),p==b&&A&&A.name!==b&&(k=!0,P=function(){return A.call(this)}),f&&!_||I[m]===P||s(I,m,P),d[e]=P,p)if(O={values:E(b),keys:x?P:E(g),entries:E(y)},_)for(j in O)(v||k||!(j in I))&&l(I,j,O[j]);else r({target:e,proto:!0,forced:v||k},O);return O}},"7f9a":function(t,e,n){var r=n("da84"),i=n("8925"),o=r.WeakMap;t.exports="function"===typeof o&&/native code/.test(i(o))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("c04e"),i=n("9bf2"),o=n("5c6c");t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},"841c":function(t,e,n){"use strict";var r=n("d784"),i=n("825a"),o=n("1d80"),a=n("129f"),c=n("14c3");r("search",1,(function(t,e,n){return[function(e){var n=o(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var o=i(t),s=String(this),l=o.lastIndex;a(l,0)||(o.lastIndex=0);var u=c(o,s);return a(o.lastIndex,l)||(o.lastIndex=l),null===u?-1:u.index}]}))},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8875:function(t,e,n){var r,i,o;(function(n,a){i=[],r=a,o="function"===typeof r?r.apply(e,i):r,void 0===o||(t.exports=o)})("undefined"!==typeof self&&self,(function(){function t(){const e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,c=o.exec(p.stack)||a.exec(p.stack),s=c&&c[1]||!1,l=c&&c[2]||!1,u=document.location.href.replace(document.location.hash,""),f=document.getElementsByTagName("script");s===u&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=n.replace(r,"$1").trim());for(var d=0;d<f.length;d++){if("interactive"===f[d].readyState)return f[d];if(f[d].src===s)return f[d];if(s===u&&f[d].innerHTML&&f[d].innerHTML.trim()===i)return f[d]}return null}}return t}))},8925:function(t,e,n){var r=n("c6cd"),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},"8aa5":function(t,e,n){"use strict";var r=n("6547").charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"8bbf":function(e,n){e.exports=t},"8ffb":function(t,e,n){"use strict";var r=n("0fa5"),i=n.n(r);i.a},"90e1":function(t,e,n){"use strict";var r=n("32e7"),i=n.n(r);i.a},"90e3":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},9112:function(t,e,n){var r=n("83ab"),i=n("9bf2"),o=n("5c6c");t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9134:function(t,e,n){"use strict";var r=n("b14d"),i=n.n(r);i.a},9263:function(t,e,n){"use strict";var r=n("ad6d"),i=n("9f7f"),o=RegExp.prototype.exec,a=String.prototype.replace,c=o,s=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),l=i.UNSUPPORTED_Y||i.BROKEN_CARET,u=void 0!==/()??/.exec("")[1],f=s||u||l;f&&(c=function(t){var e,n,i,c,f=this,d=l&&f.sticky,p=r.call(f),h=f.source,v=0,m=t;return d&&(p=p.replace("y",""),-1===p.indexOf("g")&&(p+="g"),m=String(t).slice(f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==t[f.lastIndex-1])&&(h="(?: "+h+")",m=" "+m,v++),n=new RegExp("^(?:"+h+")",p)),u&&(n=new RegExp("^"+h+"$(?!\\s)",p)),s&&(e=f.lastIndex),i=o.call(d?n:f,m),d?i?(i.input=i.input.slice(v),i[0]=i[0].slice(v),i.index=f.lastIndex,f.lastIndex+=i[0].length):f.lastIndex=0:s&&i&&(f.lastIndex=f.global?i.index+i[0].length:e),u&&i&&i.length>1&&a.call(i[0],n,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(i[c]=void 0)})),i}),t.exports=c},"93c0":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"zee-schema"},[t.$scopedSlots.header||t.$slots.header?n("div",{staticClass:"zee-schema__header"},[t._t("header",null,{filterModel:t.filterModel},t._slotScope)],2):t._e(),t.filter?n("div",{staticClass:"zee-schema__filter"},[n("z-filter",t._b({attrs:{value:t._filterModel,list:t._f("noRulesFilter")(t.filterList||t.listMap.filter),size:t.size,loading:t.loading,params:t._slotScope},on:{input:t.onFilterInput,search:t.onSearch}},"z-filter",t.filterProps,!1))],1):t._e(),t.action?n("div",{staticClass:"zee-schema__action"},[t.hadSlot("action")?t._t("action",null,null,t._slotScope):[n("el-button",{attrs:{size:t.size,type:"primary"},on:{click:t.openNew}},[t._v("新增")]),n("el-button",{attrs:{size:t.size,plain:"",disabled:0===t.selection.length},on:{click:function(e){return t.handleDeleteMul(t.selection)}}},[t._v("删除")]),t._t("button",null,null,t._slotScope)]],2):t._e(),n("div",{staticClass:"zee-schema__table"},[n("z-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",attrs:{list:t.tableList||t.listMap.table,tableProps:Object.assign({},{border:!0,"row-key":"id","highlight-current-row":!0},t.tableProps),size:t.size},on:{"selection-change":t.onTableSelectionChange,selection:t.onTableSelection},scopedSlots:t._u([{key:"column-end",fn:function(){return[t._t("column-end",null,{slot:"column-end"},t._slotScope),t.operation?n("el-table-column",t._b({attrs:{prop:"$operation",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return n("div",{staticClass:"zee-schema__table-operation"},[t._t("operation-button",null,null,Object.assign({},t._slotScope,{slotScope:e})),n("el-button",{attrs:{type:"text",icon:"el-icon-edit",title:"编辑"},on:{click:function(n){return t.openEdit(e.row)}}}),n("el-popconfirm",{attrs:{confirmButtonText:"确定",cancelButtonText:"取消",title:"确定删除吗?",placement:"top"},on:{confirm:function(n){return t.handleDelete([e.row])}}},[n("el-button",{attrs:{slot:"reference",type:"text",icon:"el-icon-delete",title:"删除"},slot:"reference"})],1),t._t("operation-button-append",null,null,Object.assign({},t._slotScope,{slotScope:e}))],2)}}],null,!0)},"el-table-column",Object.assign({},{width:100,fixed:"right"},t.operationProps),!1)):t._e()]},proxy:!0}],null,!0),model:{value:t.tableData,callback:function(e){t.tableData=e},expression:"tableData"}},[t._t("default"),t._l(t.renderList,(function(e,r){return[t.$scopedSlots["cell-"+e.fullKey]?[n("el-table-column",t._b({key:"table-cell-"+r,attrs:{slot:e.fullKey,prop:e.agentKey||e.key},slot:e.fullKey,scopedSlots:t._u([{key:"default",fn:function(n){var r=n.row,i=n.column,o=n.$index;return[t._t("cell-"+e.fullKey,null,{row:r,value:r[e.key],column:i,index:o},Object.assign({},e,t._slotScope))]}}],null,!0)},"el-table-column",e,!1))]:t.$scopedSlots["render-"+e.fullKey]?[n("el-table-column",t._b({key:"table-render-"+r,attrs:{slot:e.fullKey,prop:e.agentKey||e.key},slot:e.fullKey,scopedSlots:t._u([{key:"default",fn:function(n){var r=n.row,i=n.column,o=n.$index;return[t._t("render-"+e.fullKey,null,{row:r,value:r[e.key],column:i,index:o},Object.assign({},e,t._slotScope))]}}],null,!0)},"el-table-column",e,!1))]:t._e()]})),t._t("column-append",null,{slot:"column-append"},t._slotScope)],2)],1),n("div",{staticClass:"zee-schema__footer"},[t.selection.length>0?n("div",{staticClass:"selection-info"},[n("span",[t._v("已选中")]),n("span",{staticClass:"num"},[t._v(t._s(t.selection.length))]),n("span",[t._v("项")]),n("el-popconfirm",{attrs:{confirmButtonText:"确定",cancelButtonText:"取消",title:"确定清除吗?",placement:"top"},on:{confirm:t.clearSelection}},[n("el-button",{attrs:{slot:"reference",size:t.size,type:"text"},slot:"reference"},[t._v("清除")])],1)],1):t._e(),t.pagination?n("el-pagination",{attrs:{"current-page":t.currentPage,"page-sizes":t.pageSizes,"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}):t._e()],1),n("el-dialog",t._b({attrs:{visible:t.dialogVisible,title:t.dialogTitle,"destroy-on-close":"","append-to-body":"","lock-scroll":!1,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e},closed:t.onDialogClosed,close:t.onDialogClose}},"el-dialog",t._dialogProps,!1),[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.dialogLoading,expression:"dialogLoading"}]},[t.hadSlot("dialog-title")?t._t("dialog-title",null,{slot:"title",dialogType:t.dialogType},t._slotScope):t._e(),t.dialogRender?[t.hadSlot("dialog-"+t.dialogType)?t._t("dialog-"+t.dialogType,null,{model:t._formModel},t._slotScope):[["new","edit"].includes(t.dialogType)?[n("z-form",t._b({ref:"form",attrs:{value:t._formModel,list:t.formList||t.listMap.form,params:t._slotScope},on:{input:t.onFormInput,validate:t.onFormValidate}},"z-form",Object.assign({},{span:12,"label-width":"110px"},t.formProps),!1),[t._l(t.renderList,(function(e){return[t.$scopedSlots["form-"+e.fullKey]?[t._t("form-"+e.fullKey,null,{slot:e.fullKey,value:t.get(t._formModel,e.fullKey),row:t._formModel,model:t._formModel},t._slotScope)]:t._e()]}))],2)]:[n("z-form",t._b({ref:"form",staticClass:"zee-schema__view",attrs:{value:t._formModel,list:t._f("noRulesFilter")(t._f("viewTypeFilter")(t.viewList||t.listMap.form)),params:t._slotScope}},"z-form",Object.assign({},{span:12,"label-width":"110px"},t.viewProps),!1),[t._l(t.renderList,(function(e){return[t.$scopedSlots["view-"+e.fullKey]?[t._t("view-"+e.fullKey,null,{slot:e.fullKey,value:t.get(t._formModel,e.fullKey),row:t._formModel,model:t._formModel},t._slotScope)]:t.$scopedSlots["render-"+e.fullKey]?[t._t("render-"+e.fullKey,null,{slot:e.fullKey,value:t.get(t._formModel,e.fullKey),row:t._formModel,model:t._formModel},t._slotScope)]:t._e()]}))],2)]],["new","edit"].includes(t.dialogType)?n("div",{staticClass:"zee-schema__dialog-button"},[n("el-button",{attrs:{size:t.size,type:"primary",loading:t.submitting},on:{click:t.handleConfirm}},[t._v("确定")]),n("el-button",{attrs:{size:t.size,plain:""},on:{click:t.closeDialog}},[t._v("取消")])],1):t._e()]:t._e()],2)])],1)},i=[],o=(n("99af"),n("4de4"),n("7db0"),n("4160"),n("caad"),n("d81d"),n("d3b7"),n("e6cf"),n("a79d"),n("ac1f"),n("2532"),n("841c"),n("159b"),n("ade3"));n("96cf");function a(t,e,n,r,i,o,a){try{var c=t[o](a),s=c.value}catch(l){return void n(l)}c.done?e(s):Promise.resolve(s).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function c(t){a(o,r,i,c,s,"next",t)}function s(t){a(o,r,i,c,s,"throw",t)}c(void 0)}))}}var s=n("53ca"),l=n("5530"),u=n("0d12"),f=(n("466d"),n("5319"),n("1276"),function(t){return t.replace(/^(\s|\/)+|(\s|\/)+$/g,"")}),d={},p=["tableProps","filterProps","formProps","viewProps","dialogProps","operationProps"];p.forEach((function(t){d[t]={type:Object,default:function(){return{}}}}));var h=["searchApi","submitApi","addApi","modifyApi","getApi","viewApi","deleteApi"];h.forEach((function(t){d[t]={type:Function}}));var v=["filter","action","pagination","operation"];v.forEach((function(t){d[t]={type:Boolean,default:!0}}));var m={name:"Schema",props:Object(l["a"])(Object(l["a"])({},d),{},{list:Array,filterList:Array,tableList:Array,formList:Array,viewList:Array,size:{type:String,default:"mini"},formModel:Object,filterModel:Object,auto:Boolean,realSelection:Boolean,url:String,http:Function,alias:Object}),data:function(){return{filterForm:{},editForm:{},dialogVisible:!1,dialogRender:!0,dialogType:"none",dialogLoading:!1,dialogTitle:"",dialogPropsHack:{},currentPage:1,pageSize:10,total:0,pageSizes:[10,20,50],tableData:[],submitting:!1,loading:!1,selection:[]}},created:function(){this.auto&&this.search()},filters:{noRulesFilter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=Object(u["a"])(t),n=function t(e){e.forEach((function(e){e.list?t(e.list):delete e.rules}))};return n(e),e},viewTypeFilter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=Object(u["a"])(t),n=function(t){t.forEach((function(t){t.type=function(e,n){var r=n.model,i=n.config;return e("span",i,r[t.key])}}))};return n(e),e}},computed:{listMap:function(){var t=["filter","form","table"],e={filter:[],form:[],table:[]};return this.list.forEach((function(n){var r=n.include,i=void 0===r?t:r,o=n.exclude,a=void 0===o?[]:o,c=[];i instanceof String||"string"===typeof i?c=[i]:i instanceof Array&&"object"===Object(s["a"])(i)&&(c=i);var f=[];a instanceof String||"string"===typeof a?f=t.filter((function(t){return t!==a})):a instanceof Array&&"object"===Object(s["a"])(a)&&(f=t.filter((function(t){return!a.includes(t)})));var d=c.filter((function(t){return f.includes(t)})),p=Object(u["a"])(d);p.forEach((function(t){e[t].push(Object(l["a"])(Object(l["a"])({},n),n[t]||{}))}))})),e},renderList:function(){var t=Object(u["a"])(this.list),e=function t(e,n){e.forEach((function(e){e.group&&e.list?(e.group.key?e.fullKey="".concat(n?"".concat(n,"-").concat(e.group.key):e.group.key):e.fullKey=n||e.key,t(e.list,e.fullKey)):e.fullKey="".concat(n?"".concat(n,"-").concat(e.key):e.key)}))};return e(t),t},_filterModel:function(){return this.filterModel||this.filterForm||{}},_formModel:function(){return this.formModel||this.editForm||{}},_slotScope:function(){return{handleSearch:this.search,openDialog:this.openDialog,closeDialog:this.closeDialog,openView:this.openView,openEdit:this.openEdit,openNew:this.openNew,handleDelete:this.handleDelete,handleDeleteMul:this.handleDeleteMul,size:this.size,dialogType:this.dialogType,selection:this.selection}},_alias:function(){var t=this.alias,e=this.zAlias;return t&&e?Object(l["a"])(Object(l["a"])({},e),t):this.alias||this.zAlias||{}},_dialogProps:function(){return Object(l["a"])(Object(l["a"])({},this.dialogProps),this.dialogPropsHack)}},methods:{get:u["b"],emptyPromise:function(){return new Promise((function(t){return t()}))},toggleRowSelection:function(){var t=this;this.tableData.forEach((function(e){t.selection.find((function(t){return t.id===e.id}))&&t.$refs.table&&t.$refs.table.toggleRowSelection(e)}))},onTableSelectionChange:function(t,e){var n=this;if(this.realSelection)if("check"===e){var r=this.selection||[];t.forEach((function(t){r.find((function(e){return e.id===t.id}))||r.push(t)})),this.selection=r}else"uncheck"===e&&t.forEach((function(t){n.selection=n.selection.filter((function(e){return e.id!==t.id}))}))},onTableSelection:function(t){this.realSelection||(this.selection=t)},clearSelection:function(){this.$refs.table&&this.$refs.table.clearSelection(),this.selection=[]},_searchAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp;return e({url:"".concat(f(this.url),"/").concat(this._alias.pageUrl||"page"),params:t})}},onSearch:function(){this.currentPage=1,this.search()},search:function(){var t=this;return c(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loading=!0,n=Object(l["a"])(Object(l["a"])({},t._filterModel),{},{currentPage:t.currentPage,pageSize:t.pageSize}),r=t.searchApi||t._searchAPI||t.emptyPromise,e.next=5,r(n).then((function(e){var n=e||{};t.tableData=n[t._alias.list||"list"]||[],t.total=n[t._alias.total||"total"]||0,t.$nextTick(t.toggleRowSelection)})).catch((function(){t.$message.error("查询失败")}));case 5:t.loading=!1;case 6:case"end":return e.stop()}}),e)})))()},onFilterInput:function(t){this.filterForm=t||{},this.$emit("update:filterModel",t||{})},onFormInput:function(t){this.editForm=t||{},this.$emit("update:formModel",t||{})},_addAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp;return e({url:"".concat(f(this.url),"/").concat(this._alias.addUrl||"add"),method:"post",data:t})}},_modifyAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp;return e({url:"".concat(f(this.url),"/").concat(this._alias.modifyUrl||"modify"),method:"post",data:t})}},onFormValidate:function(t,e){var n=this;return c(regeneratorRuntime.mark((function r(){var i;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:t&&(n.submitting=!0,i=n.submitApi||n.emptyPromise,"new"===n.dialogType?i=n.addApi||n.submitApi||n._addAPI||n.emptyPromise:"edit"===n.dialogType&&(i=n.modifyApi||n.submitApi||n._modifyAPI||n.emptyPromise),i(e,{type:n.dialogType}).then((function(){n.$message.success("保存成功"),n.closeDialog(),n.search()})).catch((function(){n.$message.error("保存失败")})).finally((function(){n.submitting=!1})));case 1:case"end":return r.stop()}}),r)})))()},handleConfirm:function(){this.$refs.form&&this.$refs.form.validate()},handleCancel:function(){this.closeDialog()},hadSlot:function(t){return!!this.$slots[t]||!!this.$scopedSlots[t]},openNew:function(){this.openDialog("new","新增")},_getAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp,n=this._alias.getKey||this._alias.primaryKey||"id",r=this._alias.result||"result";return e({url:"".concat(f(this.url),"/").concat(this._alias.getUrl||"queryById"),params:Object(o["a"])({},n,t[n])}).then((function(t){return t[r]||{}}))}},openEdit:function(t){var e=this;this.dialogLoading=!0,this.openDialog("edit","编辑");var n=function(){return new Promise((function(e){e(t)}))},r=this.getApi||this._getAPI||n;r(t).then((function(t){e.editForm=t,e.$emit("update:formModel",t||{})})).finally((function(){e.dialogLoading=!1}))},_viewAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp,n=this._alias.viewKey||this._alias.getKey||this._alias.primaryKey||"id",r=this._alias.result||"result";return e({url:"".concat(f(this.url),"/").concat(this._alias.getUrl||"queryById"),params:Object(o["a"])({},n,t[n])}).then((function(t){return t[r]||{}}))}},openView:function(t){var e=this;this.dialogLoading=!0,this.openDialog("view","详情");var n=function(){return new Promise((function(e){e(t)}))},r=this.viewApi||this.getApi||this._viewAPI||this._getAPI||n;r(t).then((function(t){e.editForm=t,e.$emit("update:formModel",t||{})})).finally((function(){e.dialogLoading=!1}))},_deleteAPI:function(t){if(this.url&&(this.http||this.zHttp)){var e=this.http||this.zHttp;return e({url:"".concat(f(this.url),"/").concat(this._alias.modifyUrl||"delete"),method:"post",data:t})}},handleDelete:function(t){var e=this,n=this.$loading({text:"处理中",spinner:"el-icon-loading",background:"rgba(255, 255, 255, 0.5)"}),r=this.deleteApi||this._deleteAPI||this.emptyPromise,i=this._alias.deleteKey||this._alias.primaryKey||"id",o=t.map((function(t){return t[i]}));r(o).then((function(){e.search(),e.$message.success("删除成功")})).finally((function(){n.close()}))},handleDeleteMul:function(t){var e=this;this.$confirm("是否删除这 [".concat(t.length,"] 项?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.handleDelete(t)})).catch((function(){}))},openDialog:function(t,e,n){this.dialogVisible=!0,this.dialogRender=!0,this.dialogType=t,this.dialogTitle=e,this.dialogPropsHack=n||{},this.$emit("dialog-change",t)},closeDialog:function(){this.dialogVisible=!1},clearEditForm:function(){this.editForm={},this.$emit("update:formModel",{})},onDialogClose:function(){this.dialogType="none",this.dialogRender=!1,this.$emit("dialog-change","none")},onDialogClosed:function(){this.clearEditForm(),this.dialogPropsHack={}},handleSizeChange:function(t){this.pageSize=t,this.currentPage=1,this.$nextTick(this.search)},handleCurrentChange:function(t){this.currentPage=t,this.$nextTick(this.search)}}},g=m,b=(n("9134"),n("2877")),y=Object(b["a"])(g,r,i,!1,null,null,null);e["default"]=y.exports},"94ca":function(t,e,n){var r=n("d039"),i=/#|\.prototype\./,o=function(t,e){var n=c[a(t)];return n==l||n!=s&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=o.data={},s=o.NATIVE="N",l=o.POLYFILL="P";t.exports=o},"96cf":function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),a=new k(r||[]);return o._invoke=O(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}t.wrap=s;var u="suspendedStart",f="suspendedYield",d="executing",p="completed",h={};function v(){}function m(){}function g(){}var b={};b[o]=function(){return this};var y=Object.getPrototypeOf,w=y&&y(y(I([])));w&&w!==n&&r.call(w,o)&&(b=w);var x=g.prototype=v.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function S(t,e){function n(i,o,a,c){var s=l(t[i],t,o);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"===typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;function o(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}this._invoke=o}function O(t,e,n){var r=u;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return A()}n.method=i,n.arg=o;while(1){var a=n.delegate;if(a){var c=j(a,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===u)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=l(t,e,n);if("normal"===s.type){if(r=n.done?p:f,s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}function j(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator["return"]&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var i=l(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,h;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function I(t){if(t){var n=t[o];if(n)return n.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){while(++i<t.length)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:e,done:!0}}return m.prototype=x.constructor=g,g.constructor=m,g[c]=m.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},_(S.prototype),S.prototype[a]=function(){return this},t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(x),x[c]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){while(e.length){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=I,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return c.type="throw",c.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},"99af":function(t,e,n){"use strict";var r=n("23e7"),i=n("d039"),o=n("e8b5"),a=n("861d"),c=n("7b0b"),s=n("50c4"),l=n("8418"),u=n("65f0"),f=n("1dde"),d=n("b622"),p=n("2d00"),h=d("isConcatSpreadable"),v=9007199254740991,m="Maximum allowed index exceeded",g=p>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),b=f("concat"),y=function(t){if(!a(t))return!1;var e=t[h];return void 0!==e?!!e:o(t)},w=!g||!b;r({target:"Array",proto:!0,forced:w},{concat:function(t){var e,n,r,i,o,a=c(this),f=u(a,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(o=-1===e?a:arguments[e],y(o)){if(i=s(o.length),d+i>v)throw TypeError(m);for(n=0;n<i;n++,d++)n in o&&l(f,d,o[n])}else{if(d>=v)throw TypeError(m);l(f,d++,o)}return f.length=d,f}})},"9bdd":function(t,e,n){var r=n("825a");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(a){var o=t["return"];throw void 0!==o&&r(o.call(t)),a}}},"9bf2":function(t,e,n){var r=n("83ab"),i=n("0cfb"),o=n("825a"),a=n("c04e"),c=Object.defineProperty;e.f=r?c:function(t,e,n){if(o(t),e=a(e,!0),o(n),i)try{return c(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"9ed3":function(t,e,n){"use strict";var r=n("ae93").IteratorPrototype,i=n("7c73"),o=n("5c6c"),a=n("d44e"),c=n("3f8c"),s=function(){return this};t.exports=function(t,e,n){var l=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,l,!1,!0),c[l]=s,t}},"9f7f":function(t,e,n){"use strict";var r=n("d039");function i(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},a15b:function(t,e,n){"use strict";var r=n("23e7"),i=n("44ad"),o=n("fc6a"),a=n("a640"),c=[].join,s=i!=Object,l=a("join",",");r({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c.call(o(this),void 0===t?",":t)}})},a230:function(t,e,n){"use strict";var r=n("aa90"),i=n.n(r);i.a},a434:function(t,e,n){"use strict";var r=n("23e7"),i=n("23cb"),o=n("a691"),a=n("50c4"),c=n("7b0b"),s=n("65f0"),l=n("8418"),u=n("1dde"),f=n("ae40"),d=u("splice"),p=f("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,v=Math.min,m=9007199254740991,g="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!d||!p},{splice:function(t,e){var n,r,u,f,d,p,b=c(this),y=a(b.length),w=i(t,y),x=arguments.length;if(0===x?n=r=0:1===x?(n=0,r=y-w):(n=x-2,r=v(h(o(e),0),y-w)),y+n-r>m)throw TypeError(g);for(u=s(b,r),f=0;f<r;f++)d=w+f,d in b&&l(u,f,b[d]);if(u.length=r,n<r){for(f=w;f<y-r;f++)d=f+r,p=f+n,d in b?b[p]=b[d]:delete b[p];for(f=y;f>y-r+n;f--)delete b[f-1]}else if(n>r)for(f=y-r;f>w;f--)d=f+r-1,p=f+n-1,d in b?b[p]=b[d]:delete b[p];for(f=0;f<n;f++)b[f+w]=arguments[f+2];return b.length=y-r+n,u}})},a4d3:function(t,e,n){"use strict";var r=n("23e7"),i=n("da84"),o=n("d066"),a=n("c430"),c=n("83ab"),s=n("4930"),l=n("fdbf"),u=n("d039"),f=n("5135"),d=n("e8b5"),p=n("861d"),h=n("825a"),v=n("7b0b"),m=n("fc6a"),g=n("c04e"),b=n("5c6c"),y=n("7c73"),w=n("df75"),x=n("241c"),_=n("057f"),S=n("7418"),O=n("06cf"),j=n("9bf2"),E=n("d1e7"),C=n("9112"),k=n("6eeb"),I=n("5692"),A=n("f772"),P=n("d012"),L=n("90e3"),T=n("b622"),$=n("e538"),z=n("746f"),R=n("d44e"),F=n("69f3"),M=n("b727").forEach,N=A("hidden"),K="Symbol",D="prototype",V=T("toPrimitive"),B=F.set,U=F.getterFor(K),H=Object[D],q=i.Symbol,G=o("JSON","stringify"),W=O.f,Y=j.f,X=_.f,Q=E.f,J=I("symbols"),Z=I("op-symbols"),tt=I("string-to-symbol-registry"),et=I("symbol-to-string-registry"),nt=I("wks"),rt=i.QObject,it=!rt||!rt[D]||!rt[D].findChild,ot=c&&u((function(){return 7!=y(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=W(H,e);r&&delete H[e],Y(t,e,n),r&&t!==H&&Y(H,e,r)}:Y,at=function(t,e){var n=J[t]=y(q[D]);return B(n,{type:K,tag:t,description:e}),c||(n.description=e),n},ct=l?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof q},st=function(t,e,n){t===H&&st(Z,e,n),h(t);var r=g(e,!0);return h(n),f(J,r)?(n.enumerable?(f(t,N)&&t[N][r]&&(t[N][r]=!1),n=y(n,{enumerable:b(0,!1)})):(f(t,N)||Y(t,N,b(1,{})),t[N][r]=!0),ot(t,r,n)):Y(t,r,n)},lt=function(t,e){h(t);var n=m(e),r=w(n).concat(ht(n));return M(r,(function(e){c&&!ft.call(n,e)||st(t,e,n[e])})),t},ut=function(t,e){return void 0===e?y(t):lt(y(t),e)},ft=function(t){var e=g(t,!0),n=Q.call(this,e);return!(this===H&&f(J,e)&&!f(Z,e))&&(!(n||!f(this,e)||!f(J,e)||f(this,N)&&this[N][e])||n)},dt=function(t,e){var n=m(t),r=g(e,!0);if(n!==H||!f(J,r)||f(Z,r)){var i=W(n,r);return!i||!f(J,r)||f(n,N)&&n[N][r]||(i.enumerable=!0),i}},pt=function(t){var e=X(m(t)),n=[];return M(e,(function(t){f(J,t)||f(P,t)||n.push(t)})),n},ht=function(t){var e=t===H,n=X(e?Z:m(t)),r=[];return M(n,(function(t){!f(J,t)||e&&!f(H,t)||r.push(J[t])})),r};if(s||(q=function(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=L(t),n=function(t){this===H&&n.call(Z,t),f(this,N)&&f(this[N],e)&&(this[N][e]=!1),ot(this,e,b(1,t))};return c&&it&&ot(H,e,{configurable:!0,set:n}),at(e,t)},k(q[D],"toString",(function(){return U(this).tag})),k(q,"withoutSetter",(function(t){return at(L(t),t)})),E.f=ft,j.f=st,O.f=dt,x.f=_.f=pt,S.f=ht,$.f=function(t){return at(T(t),t)},c&&(Y(q[D],"description",{configurable:!0,get:function(){return U(this).description}}),a||k(H,"propertyIsEnumerable",ft,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:q}),M(w(nt),(function(t){z(t)})),r({target:K,stat:!0,forced:!s},{for:function(t){var e=String(t);if(f(tt,e))return tt[e];var n=q(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!ct(t))throw TypeError(t+" is not a symbol");if(f(et,t))return et[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!c},{create:ut,defineProperty:st,defineProperties:lt,getOwnPropertyDescriptor:dt}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:pt,getOwnPropertySymbols:ht}),r({target:"Object",stat:!0,forced:u((function(){S.f(1)}))},{getOwnPropertySymbols:function(t){return S.f(v(t))}}),G){var vt=!s||u((function(){var t=q();return"[null]"!=G([t])||"{}"!=G({a:t})||"{}"!=G(Object(t))}));r({target:"JSON",stat:!0,forced:vt},{stringify:function(t,e,n){var r,i=[t],o=1;while(arguments.length>o)i.push(arguments[o++]);if(r=e,(p(e)||void 0!==t)&&!ct(t))return d(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!ct(e))return e}),i[1]=e,G.apply(null,i)}})}q[D][V]||C(q[D],V,q[D].valueOf),R(q,K),P[N]=!0},a630:function(t,e,n){var r=n("23e7"),i=n("4df4"),o=n("1c7e"),a=!o((function(t){Array.from(t)}));r({target:"Array",stat:!0,forced:a},{from:i})},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},a691:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},a79d:function(t,e,n){"use strict";var r=n("23e7"),i=n("c430"),o=n("fea9"),a=n("d039"),c=n("d066"),s=n("4840"),l=n("cdf9"),u=n("6eeb"),f=!!o&&a((function(){o.prototype["finally"].call({then:function(){}},(function(){}))}));r({target:"Promise",proto:!0,real:!0,forced:f},{finally:function(t){var e=s(this,c("Promise")),n="function"==typeof t;return this.then(n?function(n){return l(e,t()).then((function(){return n}))}:t,n?function(n){return l(e,t()).then((function(){throw n}))}:t)}}),i||"function"!=typeof o||o.prototype["finally"]||u(o.prototype,"finally",c("Promise").prototype["finally"])},a9e3:function(t,e,n){"use strict";var r=n("83ab"),i=n("da84"),o=n("94ca"),a=n("6eeb"),c=n("5135"),s=n("c6b6"),l=n("7156"),u=n("c04e"),f=n("d039"),d=n("7c73"),p=n("241c").f,h=n("06cf").f,v=n("9bf2").f,m=n("58a8").trim,g="Number",b=i[g],y=b.prototype,w=s(d(y))==g,x=function(t){var e,n,r,i,o,a,c,s,l=u(t,!1);if("string"==typeof l&&l.length>2)if(l=m(l),e=l.charCodeAt(0),43===e||45===e){if(n=l.charCodeAt(2),88===n||120===n)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+l}for(o=l.slice(2),a=o.length,c=0;c<a;c++)if(s=o.charCodeAt(c),s<48||s>i)return NaN;return parseInt(o,r)}return+l};if(o(g,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var _,S=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof S&&(w?f((function(){y.valueOf.call(n)})):s(n)!=g)?l(new b(x(e)),n,S):x(e)},O=r?p(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),j=0;O.length>j;j++)c(b,_=O[j])&&!c(S,_)&&v(S,_,h(b,_));S.prototype=y,y.constructor=S,a(i,g,S)}},aa90:function(t,e,n){t.exports={primary:"#f39800",blue:"#2f54eb","blue-light":"#69c0ff","blue-hover":"#e6f7ff",red:"#f5222d",green:"#26aa58","green-light":"#5edd8e",orange:"#ff9852",gray:"#343434",grey:"#8c8c8c",purple:"#722ed1",cyan:"#13c2c2",black:"#000",text:"#314659",border:"#e8e8e8","border-light":"rgba(232,232,232,.2)",background:"#fff"}},ab13:function(t,e,n){var r=n("b622"),i=r("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,"/./"[t](e)}catch(r){}}return!1}},ac1f:function(t,e,n){"use strict";var r=n("23e7"),i=n("9263");r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},ad6d:function(t,e,n){"use strict";var r=n("825a");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},ade3:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},ae40:function(t,e,n){var r=n("83ab"),i=n("d039"),o=n("5135"),a=Object.defineProperty,c={},s=function(t){throw t};t.exports=function(t,e){if(o(c,t))return c[t];e||(e={});var n=[][t],l=!!o(e,"ACCESSORS")&&e.ACCESSORS,u=o(e,0)?e[0]:s,f=o(e,1)?e[1]:void 0;return c[t]=!!n&&!i((function(){if(l&&!r)return!0;var t={length:-1};l?a(t,1,{enumerable:!0,get:s}):t[1]=1,n.call(t,u,f)}))}},ae93:function(t,e,n){"use strict";var r,i,o,a=n("e163"),c=n("9112"),s=n("5135"),l=n("b622"),u=n("c430"),f=l("iterator"),d=!1,p=function(){return this};[].keys&&(o=[].keys(),"next"in o?(i=a(a(o)),i!==Object.prototype&&(r=i)):d=!0),void 0==r&&(r={}),u||s(r,f)||c(r,f,p),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},b041:function(t,e,n){"use strict";var r=n("00ee"),i=n("f5df");t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},b0c0:function(t,e,n){var r=n("83ab"),i=n("9bf2").f,o=Function.prototype,a=o.toString,c=/^\s*function ([^ (]*)/,s="name";r&&!(s in o)&&i(o,s,{configurable:!0,get:function(){try{return a.call(this).match(c)[1]}catch(t){return""}}})},b14d:function(t,e,n){t.exports={primary:"#f39800",blue:"#2f54eb","blue-light":"#69c0ff","blue-hover":"#e6f7ff",red:"#f5222d",green:"#26aa58","green-light":"#5edd8e",orange:"#ff9852",gray:"#343434",grey:"#8c8c8c",purple:"#722ed1",cyan:"#13c2c2",black:"#000",text:"#314659",border:"#e8e8e8","border-light":"rgba(232,232,232,.2)",background:"#fff"}},b575:function(t,e,n){var r,i,o,a,c,s,l,u,f=n("da84"),d=n("06cf").f,p=n("c6b6"),h=n("2cf4").set,v=n("1cdc"),m=f.MutationObserver||f.WebKitMutationObserver,g=f.process,b=f.Promise,y="process"==p(g),w=d(f,"queueMicrotask"),x=w&&w.value;x||(r=function(){var t,e;y&&(t=g.domain)&&t.exit();while(i){e=i.fn,i=i.next;try{e()}catch(n){throw i?a():o=void 0,n}}o=void 0,t&&t.enter()},y?a=function(){g.nextTick(r)}:m&&!v?(c=!0,s=document.createTextNode(""),new m(r).observe(s,{characterData:!0}),a=function(){s.data=c=!c}):b&&b.resolve?(l=b.resolve(void 0),u=l.then,a=function(){u.call(l,r)}):a=function(){h.call(f,r)}),t.exports=x||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,a()),o=e}},b622:function(t,e,n){var r=n("da84"),i=n("5692"),o=n("5135"),a=n("90e3"),c=n("4930"),s=n("fdbf"),l=i("wks"),u=r.Symbol,f=s?u:u&&u.withoutSetter||a;t.exports=function(t){return o(l,t)||(c&&o(u,t)?l[t]=u[t]:l[t]=f("Symbol."+t)),l[t]}},b64b:function(t,e,n){var r=n("23e7"),i=n("7b0b"),o=n("df75"),a=n("d039"),c=a((function(){o(1)}));r({target:"Object",stat:!0,forced:c},{keys:function(t){return o(i(t))}})},b680:function(t,e,n){"use strict";var r=n("23e7"),i=n("a691"),o=n("408a"),a=n("1148"),c=n("d039"),s=1..toFixed,l=Math.floor,u=function(t,e,n){return 0===e?n:e%2===1?u(t,e-1,n*t):u(t*t,e/2,n)},f=function(t){var e=0,n=t;while(n>=4096)e+=12,n/=4096;while(n>=2)e+=1,n/=2;return e},d=s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c((function(){s.call({})}));r({target:"Number",proto:!0,forced:d},{toFixed:function(t){var e,n,r,c,s=o(this),d=i(t),p=[0,0,0,0,0,0],h="",v="0",m=function(t,e){var n=-1,r=e;while(++n<6)r+=t*p[n],p[n]=r%1e7,r=l(r/1e7)},g=function(t){var e=6,n=0;while(--e>=0)n+=p[e],p[e]=l(n/t),n=n%t*1e7},b=function(){var t=6,e="";while(--t>=0)if(""!==e||0===t||0!==p[t]){var n=String(p[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e};if(d<0||d>20)throw RangeError("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return String(s);if(s<0&&(h="-",s=-s),s>1e-21)if(e=f(s*u(2,69,1))-69,n=e<0?s*u(2,-e,1):s/u(2,e,1),n*=4503599627370496,e=52-e,e>0){m(0,n),r=d;while(r>=7)m(1e7,0),r-=7;m(u(10,r,1),0),r=e-1;while(r>=23)g(1<<23),r-=23;g(1<<r),m(1,1),g(2),v=b()}else m(0,n),m(1<<-e,0),v=b()+a.call("0",d);return d>0?(c=v.length,v=h+(c<=d?"0."+a.call("0",d-c)+v:v.slice(0,c-d)+"."+v.slice(c-d))):v=h+v,v}})},b727:function(t,e,n){var r=n("0366"),i=n("44ad"),o=n("7b0b"),a=n("50c4"),c=n("65f0"),s=[].push,l=function(t){var e=1==t,n=2==t,l=3==t,u=4==t,f=6==t,d=5==t||f;return function(p,h,v,m){for(var g,b,y=o(p),w=i(y),x=r(h,v,3),_=a(w.length),S=0,O=m||c,j=e?O(p,_):n?O(p,0):void 0;_>S;S++)if((d||S in w)&&(g=w[S],b=x(g,S,y),t))if(e)j[S]=b;else if(b)switch(t){case 3:return!0;case 5:return g;case 6:return S;case 2:s.call(j,g)}else if(u)return!1;return f?-1:l||u?u:j}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},c04e:function(t,e,n){var r=n("861d");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},c430:function(t,e){t.exports=!1},c631:function(t,e,n){"use strict";var r=n("5265"),i=n.n(r);i.a},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var r=n("da84"),i=n("ce4e"),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},c740:function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").findIndex,o=n("44d2"),a=n("ae40"),c="findIndex",s=!0,l=a(c);c in[]&&Array(1)[c]((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!l},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(c)},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c8d2:function(t,e,n){var r=n("d039"),i=n("5899"),o="​…᠎";t.exports=function(t){return r((function(){return!!i[t]()||o[t]()!=o||i[t].name!==t}))}},c975:function(t,e,n){"use strict";var r=n("23e7"),i=n("4d64").indexOf,o=n("a640"),a=n("ae40"),c=[].indexOf,s=!!c&&1/[1].indexOf(1,-0)<0,l=o("indexOf"),u=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:s||!l||!u},{indexOf:function(t){return s?c.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},ca84:function(t,e,n){var r=n("5135"),i=n("fc6a"),o=n("4d64").indexOf,a=n("d012");t.exports=function(t,e){var n,c=i(t),s=0,l=[];for(n in c)!r(a,n)&&r(c,n)&&l.push(n);while(e.length>s)r(c,n=e[s++])&&(~o(l,n)||l.push(n));return l}},caad:function(t,e,n){"use strict";var r=n("23e7"),i=n("4d64").includes,o=n("44d2"),a=n("ae40"),c=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:!c},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},cc12:function(t,e,n){var r=n("da84"),i=n("861d"),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},cca6:function(t,e,n){var r=n("23e7"),i=n("60da");r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},cdf9:function(t,e,n){var r=n("825a"),i=n("861d"),o=n("f069");t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t),a=n.resolve;return a(e),n.promise}},ce4e:function(t,e,n){var r=n("da84"),i=n("9112");t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},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 r=n("428f"),i=n("da84"),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},d28b:function(t,e,n){var r=n("746f");r("iterator")},d2bb:function(t,e,n){var r=n("825a"),i=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(o){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},d3b7:function(t,e,n){var r=n("00ee"),i=n("6eeb"),o=n("b041");r||i(Object.prototype,"toString",o,{unsafe:!0})},d44e:function(t,e,n){var r=n("9bf2").f,i=n("5135"),o=n("b622"),a=o("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},d58f:function(t,e,n){var r=n("1c0b"),i=n("7b0b"),o=n("44ad"),a=n("50c4"),c=function(t){return function(e,n,c,s){r(n);var l=i(e),u=o(l),f=a(l.length),d=t?f-1:0,p=t?-1:1;if(c<2)while(1){if(d in u){s=u[d],d+=p;break}if(d+=p,t?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;t?d>=0:f>d;d+=p)d in u&&(s=n(s,u[d],d,l));return s}};t.exports={left:c(!1),right:c(!0)}},d784:function(t,e,n){"use strict";n("ac1f");var r=n("6eeb"),i=n("d039"),o=n("b622"),a=n("9263"),c=n("9112"),s=o("species"),l=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),u=function(){return"$0"==="a".replace(/./,"$0")}(),f=o("replace"),d=function(){return!!/./[f]&&""===/./[f]("a","$0")}(),p=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,f){var h=o(t),v=!i((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),m=v&&!i((function(){var e=!1,n=/a/;return"split"===t&&(n={},n.constructor={},n.constructor[s]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return e=!0,null},n[h](""),!e}));if(!v||!m||"replace"===t&&(!l||!u||d)||"split"===t&&!p){var g=/./[h],b=n(h,""[t],(function(t,e,n,r,i){return e.exec===a?v&&!i?{done:!0,value:g.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),y=b[0],w=b[1];r(String.prototype,t,y),r(RegExp.prototype,h,2==e?function(t,e){return w.call(t,this,e)}:function(t){return w.call(t,this)})}f&&c(RegExp.prototype[h],"sham",!0)}},d81d:function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").map,o=n("1dde"),a=n("ae40"),c=o("map"),s=a("map");r({target:"Array",proto:!0,forced:!c||!s},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},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")()}).call(this,n("c8ba"))},dbb4:function(t,e,n){var r=n("23e7"),i=n("83ab"),o=n("56ef"),a=n("fc6a"),c=n("06cf"),s=n("8418");r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){var e,n,r=a(t),i=c.f,l=o(r),u={},f=0;while(l.length>f)n=i(r,e=l[f++]),void 0!==n&&s(u,e,n);return u}})},ddb0:function(t,e,n){var r=n("da84"),i=n("fdbc"),o=n("e260"),a=n("9112"),c=n("b622"),s=c("iterator"),l=c("toStringTag"),u=o.values;for(var f in i){var d=r[f],p=d&&d.prototype;if(p){if(p[s]!==u)try{a(p,s,u)}catch(v){p[s]=u}if(p[l]||a(p,l,f),i[f])for(var h in o)if(p[h]!==o[h])try{a(p,h,o[h])}catch(v){p[h]=o[h]}}}},df75:function(t,e,n){var r=n("ca84"),i=n("7839");t.exports=Object.keys||function(t){return r(t,i)}},e01a:function(t,e,n){"use strict";var r=n("23e7"),i=n("83ab"),o=n("da84"),a=n("5135"),c=n("861d"),s=n("9bf2").f,l=n("e893"),u=o.Symbol;if(i&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var f={},d=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof d?new u(t):void 0===t?u():u(t);return""===t&&(f[e]=!0),e};l(d,u);var p=d.prototype=u.prototype;p.constructor=d;var h=p.toString,v="Symbol(test)"==String(u("test")),m=/^Symbol\((.*)\)[^)]+$/;s(p,"description",{configurable:!0,get:function(){var t=c(this)?this.valueOf():this,e=h.call(t);if(a(f,t))return"";var n=v?e.slice(7,-1):e.replace(m,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:d})}},e163:function(t,e,n){var r=n("5135"),i=n("7b0b"),o=n("f772"),a=n("e177"),c=o("IE_PROTO"),s=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=i(t),r(t,c)?t[c]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},e177:function(t,e,n){var r=n("d039");t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,n){"use strict";var r=n("fc6a"),i=n("44d2"),o=n("3f8c"),a=n("69f3"),c=n("7dd0"),s="Array Iterator",l=a.set,u=a.getterFor(s);t.exports=c(Array,"Array",(function(t,e){l(this,{type:s,target:r(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},e2cc:function(t,e,n){var r=n("6eeb");t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},e439:function(t,e,n){var r=n("23e7"),i=n("d039"),o=n("fc6a"),a=n("06cf").f,c=n("83ab"),s=i((function(){a(1)})),l=!c||s;r({target:"Object",stat:!0,forced:l,sham:!c},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},e538:function(t,e,n){var r=n("b622");e.f=r},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},e6cf:function(t,e,n){"use strict";var r,i,o,a,c=n("23e7"),s=n("c430"),l=n("da84"),u=n("d066"),f=n("fea9"),d=n("6eeb"),p=n("e2cc"),h=n("d44e"),v=n("2626"),m=n("861d"),g=n("1c0b"),b=n("19aa"),y=n("c6b6"),w=n("8925"),x=n("2266"),_=n("1c7e"),S=n("4840"),O=n("2cf4").set,j=n("b575"),E=n("cdf9"),C=n("44de"),k=n("f069"),I=n("e667"),A=n("69f3"),P=n("94ca"),L=n("b622"),T=n("2d00"),$=L("species"),z="Promise",R=A.get,F=A.set,M=A.getterFor(z),N=f,K=l.TypeError,D=l.document,V=l.process,B=u("fetch"),U=k.f,H=U,q="process"==y(V),G=!!(D&&D.createEvent&&l.dispatchEvent),W="unhandledrejection",Y="rejectionhandled",X=0,Q=1,J=2,Z=1,tt=2,et=P(z,(function(){var t=w(N)!==String(N);if(!t){if(66===T)return!0;if(!q&&"function"!=typeof PromiseRejectionEvent)return!0}if(s&&!N.prototype["finally"])return!0;if(T>=51&&/native code/.test(N))return!1;var e=N.resolve(1),n=function(t){t((function(){}),(function(){}))},r=e.constructor={};return r[$]=n,!(e.then((function(){}))instanceof n)})),nt=et||!_((function(t){N.all(t)["catch"]((function(){}))})),rt=function(t){var e;return!(!m(t)||"function"!=typeof(e=t.then))&&e},it=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;j((function(){var i=e.value,o=e.state==Q,a=0;while(r.length>a){var c,s,l,u=r[a++],f=o?u.ok:u.fail,d=u.resolve,p=u.reject,h=u.domain;try{f?(o||(e.rejection===tt&&st(t,e),e.rejection=Z),!0===f?c=i:(h&&h.enter(),c=f(i),h&&(h.exit(),l=!0)),c===u.promise?p(K("Promise-chain cycle")):(s=rt(c))?s.call(c,d,p):d(c)):p(i)}catch(v){h&&!l&&h.exit(),p(v)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&at(t,e)}))}},ot=function(t,e,n){var r,i;G?(r=D.createEvent("Event"),r.promise=e,r.reason=n,r.initEvent(t,!1,!0),l.dispatchEvent(r)):r={promise:e,reason:n},(i=l["on"+t])?i(r):t===W&&C("Unhandled promise rejection",n)},at=function(t,e){O.call(l,(function(){var n,r=e.value,i=ct(e);if(i&&(n=I((function(){q?V.emit("unhandledRejection",r,t):ot(W,t,r)})),e.rejection=q||ct(e)?tt:Z,n.error))throw n.value}))},ct=function(t){return t.rejection!==Z&&!t.parent},st=function(t,e){O.call(l,(function(){q?V.emit("rejectionHandled",t):ot(Y,t,e.value)}))},lt=function(t,e,n,r){return function(i){t(e,n,i,r)}},ut=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=J,it(t,e,!0))},ft=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw K("Promise can't be resolved itself");var i=rt(n);i?j((function(){var r={done:!1};try{i.call(n,lt(ft,t,r,e),lt(ut,t,r,e))}catch(o){ut(t,r,o,e)}})):(e.value=n,e.state=Q,it(t,e,!1))}catch(o){ut(t,{done:!1},o,e)}}};et&&(N=function(t){b(this,N,z),g(t),r.call(this);var e=R(this);try{t(lt(ft,this,e),lt(ut,this,e))}catch(n){ut(this,e,n)}},r=function(t){F(this,{type:z,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:X,value:void 0})},r.prototype=p(N.prototype,{then:function(t,e){var n=M(this),r=U(S(this,N));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=q?V.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=X&&it(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r,e=R(t);this.promise=t,this.resolve=lt(ft,t,e),this.reject=lt(ut,t,e)},k.f=U=function(t){return t===N||t===o?new i(t):H(t)},s||"function"!=typeof f||(a=f.prototype.then,d(f.prototype,"then",(function(t,e){var n=this;return new N((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof B&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return E(N,B.apply(l,arguments))}}))),c({global:!0,wrap:!0,forced:et},{Promise:N}),h(N,z,!1,!0),v(z),o=u(z),c({target:z,stat:!0,forced:et},{reject:function(t){var e=U(this);return e.reject.call(void 0,t),e.promise}}),c({target:z,stat:!0,forced:s||et},{resolve:function(t){return E(s&&this===o?N:this,t)}}),c({target:z,stat:!0,forced:nt},{all:function(t){var e=this,n=U(e),r=n.resolve,i=n.reject,o=I((function(){var n=g(e.resolve),o=[],a=0,c=1;x(t,(function(t){var s=a++,l=!1;o.push(void 0),c++,n.call(e,t).then((function(t){l||(l=!0,o[s]=t,--c||r(o))}),i)})),--c||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=U(e),r=n.reject,i=I((function(){var i=g(e.resolve);x(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},e893:function(t,e,n){var r=n("5135"),i=n("56ef"),o=n("06cf"),a=n("9bf2");t.exports=function(t,e){for(var n=i(e),c=a.f,s=o.f,l=0;l<n.length;l++){var u=n[l];r(t,u)||c(t,u,s(e,u))}}},e8a8:function(t,e,n){var r={"./filter/index.vue":"3782","./form/index.vue":"0a36","./schema/index.vue":"93c0","./select/index.vue":"e8f4","./table/index.vue":"5423","./upload/index.vue":"ffb9"};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id="e8a8"},e8b5:function(t,e,n){var r=n("c6b6");t.exports=Array.isArray||function(t){return"Array"==r(t)}},e8f4:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-select",t._g(t._b({staticClass:"zee-select",attrs:{disabled:t.disabled,"value-key":t.valueKey,filterable:t.filterable,remote:t.remote,"reserve-keyword":t.reserveKeyword,clearable:t.clearable,placeholder:t.placeholder,"remote-method":t.remoteMethod,loading:t.loading,size:t.size,multiple:t.multiple},model:{value:t.model,callback:function(e){t.model=e},expression:"model"}},"el-select",t.selectProps,!1),t.bindEvents),[t._l(t.optionsCurrent,(function(e){return n("el-option",{key:e.id,attrs:{label:t.labelFormat?t.labelFormat(e):e[t.labelKey],value:t.raw?e:e[t.valueKey],disabled:e.disabled}},[t._t("default",null,{item:e,value:t.model})],2)})),t._t("empty",null,{slot:"empty"}),n("template",{slot:"prefix"},[t.initing?n("i",{staticClass:"el-icon-loading"}):t._t("prefix")],2)],2)},i=[],o=(n("99af"),n("4de4"),n("7db0"),n("4160"),n("caad"),n("13d5"),n("a9e3"),n("b64b"),n("d3b7"),n("e6cf"),n("a79d"),n("2532"),n("498a"),n("159b"),n("ade3")),a=n("2909"),c=n("5530"),s={name:"Select",props:{value:[String,Number,Boolean,Object,Array],placeholder:{type:String,default:"请选择"},options:{type:Array,default:function(){return[]}},labelFormat:Function,labelKey:{type:String,default:"name"},valueKey:{type:String,default:"code"},searchKey:{type:String,default:"query"},size:{type:String,default:"mini"},multiple:Boolean,disabled:Boolean,clearable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},reserveKeyword:{type:Boolean,default:!0},selectProps:Object,raw:Boolean,url:String,http:Function,params:{type:Object,default:function(){return{}}},config:{type:Object,default:function(){return{}}},queryApi:Function,triggerSize:{type:Number,default:0},auto:{type:Boolean,default:!0},update:Boolean,updateOnce:Boolean,beforeQuery:{type:Function,default:function(){return!0}}},data:function(){return{model:this.value,optionsDataSource:this.fixOptions(this.options),optionsCurrent:this.fixOptions(this.options),loading:!1,initing:!1,loaded:!1}},created:function(){this.remote&&this.auto&&(this.initing=!0,this.remoteMethod())},watch:{value:function(t){this.model=t},options:function(t){t&&(this.optionsCurrent=this.fixOptions(this.optionsDataSource))}},computed:{request:function(){return this.http||this.zHttp},remote:function(){return Boolean(this.queryApi||this.url&&(this.http||this.zHttp))},bindEvents:function(){var t=this,e={};return Object.keys(this.$listeners||{}).forEach((function(n){"change"!==n||t.raw?e[n]=function(e){t.$emit(n,e)}:e[n]=function(e){t.$emit(n,e,t.multiple?t.optionsCurrent.reduce((function(n,r){return e.includes(r[t.valueKey])&&n.push(r),n}),[]):t.optionsCurrent.find((function(n){return n[t.valueKey]===e})))}})),Object(c["a"])(Object(c["a"])({},e),{},{"visible-change":function(n){t.remote&&n&&(t.updateOnce?t.loaded||t.remoteMethod():t.update&&t.remoteMethod()),e["visible-change"]&&e["visible-change"](n)}})}},methods:{fixOptions:function(t){var e=this,n=[];this.raw&&(n=this.multiple?this.value&&this.value.length>0?Object(a["a"])(this.value):[]:this.value&&Object.keys(this.value).length>0?[this.value]:[]);var r={},i=[].concat(Object(a["a"])(n),Object(a["a"])(this.options),Object(a["a"])(t)).reduce((function(t,n){return r[n[e.valueKey]]||(r[n[e.valueKey]]=!0,n[e.valueKey]&&n[e.labelKey]&&t.push(n)),t}),[]);return i},remoteMethod:function(){var t,e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=n.trim(),i=this.beforeQuery(r);i?r.length>=this.triggerSize?(this.loading=!0,t=this.queryApi?this.queryApi(r):this.request(Object(c["a"])({url:this.url,method:"get",params:r?Object(c["a"])(Object(o["a"])({},this.searchKey,r),this.params):this.params},this.config)),t.then((function(t){var n=t||{},r=e.fixOptions(n.result);e.optionsDataSource=r,e.optionsCurrent=r})).finally((function(){e.loading=!1,e.initing=!1,e.loaded=!0}))):this.optionsCurrent=this.optionsDataSource.filter((function(t){return t[e.labelKey].includes(n)})):(this.loading=!1,this.initing=!1,this.loaded=!0)}}},l=s,u=(n("a230"),n("2877")),f=Object(u["a"])(l,r,i,!1,null,null,null);e["default"]=f.exports},e95a:function(t,e,n){var r=n("b622"),i=n("3f8c"),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},f069:function(t,e,n){"use strict";var r=n("1c0b"),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},f5df:function(t,e,n){var r=n("00ee"),i=n("c6b6"),o=n("b622"),a=o("toStringTag"),c="Arguments"==i(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(n){}};t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),a))?n:c?i(e):"Object"==(r=i(e))&&"function"==typeof e.callee?"Arguments":r}},f772:function(t,e,n){var r=n("5692"),i=n("90e3"),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},fb15:function(t,e,n){"use strict";if(n.r(e),n.d(e,"ImageViewer",(function(){return b})),"undefined"!==typeof window){var r=window.document.currentScript,i=n("8875");r=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}n("c740"),n("4160"),n("e260"),n("b0c0"),n("cca6"),n("d3b7"),n("07ac"),n("159b"),n("ddb0");var a=n("5530");n("a4d3"),n("c975"),n("b64b");function c(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function s(t,e){if(null==t)return{};var n,r,i=c(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var l=n("8bbf"),u=n.n(l),f=n("fd7f"),d={},p=n("e8a8");p.keys().forEach((function(t){var e=p(t);d[e.default.name]=e.default}));var h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.values(d).forEach((function(n){var r=e.name||"z",i=r+n.name;n.name=i,n.props&&n.props.size&&n.props.size.default&&e.size&&(n.props.size.default=e.size),n.computed?(n.computed.zAlias=function(){return e.alias||{}},n.computed.zHttp=function(){return e.http}):n.computed={zAlias:function(){},zHttp:function(){return e.http}},n.install=function(t){t.component(i,n)},t.component(i,n)})),f["a"].install=function(t){t.component(f["a"].name,f["a"])},t.component(f["a"].name,f["a"])},v=null,m=function(t){v&&(!0===t?document.body.removeChild(v.$el):(v.$el.className="".concat(v.$el.className," viewer-fade-leave-active viewer-fade-leave-to"),setTimeout((function(){document.body.removeChild(v.$el),v=null}),200)))},g=function(t){var e=t.index,n=t.src,r=t.list,i=s(t,["index","src","list"]);v&&m(!0);var o=u.a.extend(f["a"]);v=new o({el:document.createElement("div")}),Object.assign(v,Object(a["a"])(Object(a["a"])({index:n?r.findIndex((function(t){return t===n})):e||0,urlList:r},i),{},{onClose:m})),document.body.appendChild(v.$el)},b=g;b.close=m;var y=Object(a["a"])({install:h},d);e["default"]=y},fb6a:function(t,e,n){"use strict";var r=n("23e7"),i=n("861d"),o=n("e8b5"),a=n("23cb"),c=n("50c4"),s=n("fc6a"),l=n("8418"),u=n("b622"),f=n("1dde"),d=n("ae40"),p=f("slice"),h=d("slice",{ACCESSORS:!0,0:0,1:2}),v=u("species"),m=[].slice,g=Math.max;r({target:"Array",proto:!0,forced:!p||!h},{slice:function(t,e){var n,r,u,f=s(this),d=c(f.length),p=a(t,d),h=a(void 0===e?d:e,d);if(o(f)&&(n=f.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)?i(n)&&(n=n[v],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return m.call(f,p,h);for(r=new(void 0===n?Array:n)(g(h-p,0)),u=0;p<h;p++,u++)p in f&&l(r,u,f[p]);return r.length=u,r}})},fc6a:function(t,e,n){var r=n("44ad"),i=n("1d80");t.exports=function(t){return r(i(t))}},fcf8:function(t,e,n){"use strict";var r=n("142b"),i=n.n(r);i.a},fd7f:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"viewer-fade"}},[n("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":t.zIndex},attrs:{tabindex:"-1"}},[n("div",{staticClass:"el-image-viewer__mask"}),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__close",on:{click:t.hide}},[n("i",{staticClass:"el-icon-circle-close"})]),t.isSingle?t._e():[n("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!t.infinite&&t.isFirst},on:{click:t.prev}},[n("i",{staticClass:"el-icon-arrow-left"})]),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!t.infinite&&t.isLast},on:{click:t.next}},[n("i",{staticClass:"el-icon-arrow-right"})])],n("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[n("div",{staticClass:"el-image-viewer__actions__inner"},[n("i",{staticClass:"el-icon-zoom-out el-image-viewer__actions-btn",on:{click:function(e){return t.handleActions("zoomOut")}}}),n("i",{staticClass:"el-icon-zoom-in el-image-viewer__actions-btn",on:{click:function(e){return t.handleActions("zoomIn")}}}),n("i",{staticClass:"el-image-viewer__actions__divider"}),n("i",{staticClass:"el-image-viewer__actions-btn",class:t.mode.icon,on:{click:t.toggleMode}}),n("i",{staticClass:"el-image-viewer__actions__divider"}),n("i",{staticClass:"el-icon-refresh-left el-image-viewer__actions-btn",on:{click:function(e){return t.handleActions("anticlocelise")}}}),n("i",{staticClass:"el-icon-refresh-right el-image-viewer__actions-btn",on:{click:function(e){return t.handleActions("clocelise")}}}),n("span",{staticClass:"el-image-viewer__indicator"},[t._v(t._s(t.index+1)+" / "+t._s(t.urlList.length))])])]),n("div",{staticClass:"el-image-viewer__canvas"},[t._l(t.urlList,(function(e,r){return[r===t.index?n("img",{key:e,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:t.imgStyle,attrs:{src:t.currentImg},on:{load:t.handleImgLoad,error:t.handleImgError,mousedown:t.handleMouseDown}}):t._e()]}))],2)],2)])},i=[],o=(n("99af"),n("c975"),n("a9e3"),n("b680"),n("b64b"),n("07ac"),n("5530")),a=n("8bbf"),c=n.n(a);const s=c.a.prototype.$isServer,l=(s||Number(document.documentMode),function(){return!s&&document.addEventListener?function(t,e,n){t&&e&&n&&t.addEventListener(e,n,!1)}:function(t,e,n){t&&e&&n&&t.attachEvent("on"+e,n)}}()),u=function(){return!s&&document.removeEventListener?function(t,e,n){t&&e&&t.removeEventListener(e,n,!1)}:function(t,e,n){t&&e&&t.detachEvent("on"+e,n)}}();Object.prototype.hasOwnProperty;const f=function(){return!c.a.prototype.$isServer&&!!window.navigator.userAgent.match(/firefox/i)};function d(t){let e=!1;return function(...n){e||(e=!0,window.requestAnimationFrame(r=>{t.apply(this,n),e=!1}))}}var p={CONTAIN:{name:"contain",icon:"el-icon-full-screen"},ORIGINAL:{name:"original",icon:"el-icon-c-scale-to-original"}},h=f()?"DOMMouseScroll":"mousewheel",v={name:"ElImageViewer",props:{urlList:{type:Array,default:function(){return[]}},zIndex:{type:Number,default:2e3},onSwitch:{type:Function,default:function(){}},onClose:{type:Function,default:function(){}},initialIndex:{type:Number,default:0}},data:function(){return{index:this.initialIndex,isShow:!1,infinite:!0,loading:!1,mode:p.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},computed:{isSingle:function(){return this.urlList.length<=1},isFirst:function(){return 0===this.index},isLast:function(){return this.index===this.urlList.length-1},currentImg:function(){return this.urlList[this.index]},imgStyle:function(){var t=this.transform,e=t.scale,n=t.deg,r=t.offsetX,i=t.offsetY,o=t.enableTransition,a={transform:"scale(".concat(e,") rotate(").concat(n,"deg)"),transition:o?"transform .3s":"","margin-left":"".concat(r,"px"),"margin-top":"".concat(i,"px")};return this.mode===p.CONTAIN&&(a.maxWidth=a.maxHeight="100%"),a}},watch:{index:{handler:function(t){this.reset(),this.onSwitch(t)}},currentImg:function(t){var e=this;this.$nextTick((function(t){var n=e.$refs.img[0];n.complete||(e.loading=!0)}))}},methods:{hide:function(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall:function(){var t=this;this._keyDownHandler=d((function(e){var n=e.keyCode;switch(n){case 27:t.hide();break;case 32:t.toggleMode();break;case 37:t.prev();break;case 38:t.handleActions("zoomIn");break;case 39:t.next();break;case 40:t.handleActions("zoomOut");break}})),this._mouseWheelHandler=d((function(e){var n=e.wheelDelta?e.wheelDelta:-e.detail;n>0?t.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):t.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})})),l(document,"keydown",this._keyDownHandler),l(document,h,this._mouseWheelHandler)},deviceSupportUninstall:function(){u(document,"keydown",this._keyDownHandler),u(document,h,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad:function(t){this.loading=!1},handleImgError:function(t){this.loading=!1,t.target.alt="加载失败"},handleMouseDown:function(t){var e=this;if(!this.loading&&0===t.button){var n=this.transform,r=n.offsetX,i=n.offsetY,o=t.pageX,a=t.pageY;this._dragHandler=d((function(t){e.transform.offsetX=r+t.pageX-o,e.transform.offsetY=i+t.pageY-a})),l(document,"mousemove",this._dragHandler),l(document,"mouseup",(function(t){u(document,"mousemove",e._dragHandler)})),t.preventDefault()}},reset:function(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode:function(){if(!this.loading){var t=Object.keys(p),e=Object.values(p),n=e.indexOf(this.mode),r=(n+1)%t.length;this.mode=p[t[r]],this.reset()}},prev:function(){if(!this.isFirst||this.infinite){var t=this.urlList.length;this.index=(this.index-1+t)%t}},next:function(){if(!this.isLast||this.infinite){var t=this.urlList.length;this.index=(this.index+1)%t}},handleActions:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.loading){var n=Object(o["a"])({zoomRate:.2,rotateDeg:90,enableTransition:!0},e),r=n.zoomRate,i=n.rotateDeg,a=n.enableTransition,c=this.transform;switch(t){case"zoomOut":c.scale>.2&&(c.scale=parseFloat((c.scale-r).toFixed(3)));break;case"zoomIn":c.scale=parseFloat((c.scale+r).toFixed(3));break;case"clocelise":c.deg+=i;break;case"anticlocelise":c.deg-=i;break}c.enableTransition=a}}},mounted:function(){this.deviceSupportInstall(),this.$refs["el-image-viewer__wrapper"].focus()}},m=v,g=(n("90e1"),n("2877")),b=Object(g["a"])(m,r,i,!1,null,null,null);e["a"]=b.exports},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fea9:function(t,e,n){var r=n("da84");t.exports=r.Promise},ffb9:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"z-upload",class:[t.size]},[n("ul",{staticClass:"el-upload-list el-upload-list--picture-card"},[n("drag-field",{attrs:{draggable:t.draggable},on:{change:t.onDragFile},model:{value:t.imageList,callback:function(e){t.imageList=e},expression:"imageList"}},t._l(t.imageList,(function(e,r){return n("div",{key:r,staticClass:"el-upload-list__item-wrapper"},[n("li",{staticClass:"el-upload-list__item"},["all"===t.type?[t.isImage(e)?n("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:e,alt:""}}):n("div",{staticClass:"el-upload-list__item-thumbnail--file",class:t._f("fileTypeFilter")(e),attrs:{alt:""}})]:["image"===t.type?n("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:e,alt:""}}):n("div",{staticClass:"el-upload-list__item-thumbnail--file",class:t._f("fileTypeFilter")(e),attrs:{alt:""}})],t.cornerClose?n("div",{staticClass:"el-upload-list__item-actions"},[t.isImage(e)?n("div",{staticClass:"block-preview",on:{click:function(n){return t.onPreview(e,r)}}},[n("i",{staticClass:"el-icon-view"})]):n("div",{staticClass:"block-download",on:{click:function(n){return t.onDownload(e)}}},[n("i",{staticClass:"el-icon-download"})])]):n("div",{staticClass:"el-upload-list__item-actions"},[t.isImage(e)?n("span",{staticClass:"el-upload-list__item-preview",on:{click:function(n){return t.onPreview(e,r)}}},[n("i",{staticClass:"el-icon-zoom-in"})]):n("span",{staticClass:"el-upload-list__item-preview",on:{click:function(n){return t.onDownload(e)}}},[n("i",{staticClass:"el-icon-download"})]),t.disabled?t._e():n("span",{staticClass:"el-upload-list__item-delete",on:{click:function(n){return t.onRemove(e,r)}}},[n("i",{staticClass:"el-icon-delete"})])])],2),t.cornerClose&&!t.disabled?n("div",{staticClass:"corner-close",on:{click:function(n){return t.onRemove(e,r)}}},[n("i",{staticClass:"el-icon-close"})]):t._e()])})),0),!t.limit||t.imageList.length<t.limit?n("el-upload",{attrs:{action:t.action,data:t.data,name:t.name,headers:t.headers,"file-list":t.fileList,disabled:t.disabled,multiple:t.multiple,limit:t.limit,drag:t.drag,"show-file-list":!1,"list-type":"picture-card","on-exceed":t.onExceed,"on-success":t.onSuccess,"on-error":t.onError,"before-upload":t.onBeforeUpload,"http-request":t.isCustomRequest?t.onHttpRequest:void 0}},[n("i",{staticClass:"el-icon-plus"})]):t._e()],1),t.$scopedSlots["image-viewer"]||t.$slots["image-viewer"]?t._t("image-viewer",null,{show:t.isImageViewerShow,index:t.defaultIndex,list:t.filteredImageList,close:t.closeViewer,open:t.openViewer}):[t.isImageViewerShow?n("el-image-viewer",{attrs:{"initial-index":t.defaultIndex,"on-close":t.closeViewer,"url-list":t.filteredImageList}}):t._e()]],2)},i=[],o=(n("4de4"),n("c740"),n("4160"),n("caad"),n("a15b"),n("45fc"),n("a434"),n("b0c0"),n("a9e3"),n("b64b"),n("ac1f"),n("2532"),n("1276"),n("159b"),n("5530")),a=n("fd7f"),c=[".bmp",".jpg",".png",".tif",".gif",".pcx",".tga",".exif",".fpx",".svg"],s=function(t){return"".concat(/\.[^.]+$/.exec(t)[0]).toLowerCase()},l={name:"Upload",components:{ElImageViewer:a["a"],DragField:{props:{value:Array,draggable:Boolean},render:function(t){var e=this;return this.draggable?t("draggable",{props:{value:this.value},on:{input:function(t){return e.$emit("input",t)},change:function(t){return e.$emit("change",t)}}},this.$slots.default):t("div",this.$slots.default)}}},props:{value:String,disabled:Boolean,multiple:Boolean,limit:Number,drag:Boolean,draggable:Boolean,action:String,headers:{type:Object,default:function(){return{}}},deleteConfirm:Boolean,data:{type:Object,default:function(){return{}}},name:{type:String,default:"file"},responseFilter:Function,beforeUpload:Function,type:{type:String,default:"all"},fileType:String,size:{type:String,default:"large"},http:Function,httpRequest:Function,cornerClose:Boolean},data:function(){return{fileList:[],imageList:[],isImageViewerShow:!1,currentIndex:0}},computed:{isCustomRequest:function(){return Boolean(this.http)||Boolean(this.httpRequest)||Boolean(this.$axios)},filteredImageList:function(){return"all"===this.type?this.imageList.filter((function(t){return c.some((function(e){return"".concat(t).toLowerCase().includes(e)}))})):this.imageList},defaultIndex:function(){if("all"===this.type){var t=this.imageList[this.currentIndex];return this.filteredImageList.findIndex((function(e){return e===t}))}return this.currentIndex}},filters:{fileTypeFilter:function(t){var e=s(t);return[".doc",".docx"].includes(e)?"word":[".xls",".xlsx",".csv"].includes(e)?"excel":[".ppt",".pptx"].includes(e)?"ppt":[".pdf"].includes(e)?"pdf":[".zip",".rar",".7z"].includes(e)?"zip":""}},watch:{value:{handler:function(t){if(t){var e=[],n=[];t.split(",").forEach((function(t){e.push(t),n.push({url:t})})),this.imageList=e,this.fileList=n}else this.fileList=[],this.imageList=[]},immediate:!0}},methods:{isImage:function(t){return c.some((function(e){return"".concat(t).toLowerCase().includes(e)}))},onRemove:function(t,e){var n=this;this.deleteConfirm?this.$confirm("确定删除当前".concat(this.isImage(t)?"图片":"文件","吗?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){n.removeImage(e)})).catch((function(){})):this.removeImage(e)},removeImage:function(t){this.imageList.splice(t,1),this.fileList.splice(t,1),this.$emit("input",this.imageList.join(","))},onPreview:function(t,e){this.currentIndex=e,this.$nextTick(this.openViewer)},openViewer:function(){this.isImageViewerShow=!0},closeViewer:function(){this.isImageViewerShow=!1},onDownload:function(t){window.open(t)},onBeforeUpload:function(t){if("all"===this.type)return!this.beforeUpload||this.beforeUpload(t);var e=s(t.name);if("image"===this.type){if(!"".concat(t.type).toLowerCase().includes("image"))return this.$message.warning("请上传图片"),!1}else if("file"===this.type&&("".concat(t.type).toLowerCase().includes("image")||this.fileType&&!e.includes(this.fileType)))return this.$message.warning("请上传".concat(this.fileType||"","文件")),!1;return!this.beforeUpload||this.beforeUpload(t)},onHttpRequest:function(t){var e=this,n=new FormData;if(t.data&&Object.keys(t.data).forEach((function(e){n.append(e,t.data[e])})),n.append(t.filename,t.file,t.file.name),this.httpRequest)this.httpRequest(Object(o["a"])(Object(o["a"])({},t),{},{formData:n}));else{var r=this.http||this.$axios;r&&r.post&&r.post(t.action,n,{headers:t.headers}).then((function(t){e.onSuccess(t.data)})).catch((function(t){e.onError(t)}))}},onError:function(t){this.$message.error("上传失败, 系统异常!")},onSuccess:function(t){if(t.success){var e=t||{},n=e.result;this.responseFilter?this.imageList.push(this.responseFilter(t)):n&&this.imageList.push(n[0]),this.$emit("input",this.imageList.join(","))}else t.businessException?this.$message.error("上传失败!"+t.message):this.$message.error("上传失败!");this.$emit("upload",t)},onExceed:function(){this.$message.warning("文件个数超出限制!")},onDragFile:function(){this.$emit("input",this.imageList.join(","))}}},u=l,f=(n("fcf8"),n("2877")),d=Object(f["a"])(u,r,i,!1,null,null,null);e["default"]=d.exports}})}));
3 3 \ No newline at end of file
... ...
packages/form/index.vue
1 1 <template>
2   - <el-form ref="form" :model="model" class="z-form" v-bind="$attrs">
  2 + <el-form ref="form" :model="value || model" class="z-form" v-bind="$attrs">
3 3 <slot v-if="$slots.row" name="row"></slot>
4 4 <el-row v-else v-bind="row">
5 5 <slot></slot>
... ...
packages/schema-filter/index.vue 0 → 100644
... ... @@ -0,0 +1,129 @@
  1 +<template>
  2 + <z-schema-form
  3 + v-model="model"
  4 + class="z-schema-filter"
  5 + :list="formattedList"
  6 + :span="span"
  7 + :labelWidth="labelWidth"
  8 + :colClass="colVisibleRender"
  9 + :size="size"
  10 + :formProps="formProps"
  11 + :params="params"
  12 + >
  13 + <template v-for="key in slotKeys">
  14 + <template v-if="key === 'operation'">
  15 + <slot :name="key" :slot="key" v-bind="{ size, handleSearch, handleReset, handleCollapse, showCollapsed, collapsed, loading }"></slot>
  16 + </template>
  17 + <slot v-else :name="key" :slot="key"></slot>
  18 + </template>
  19 + <div v-if="!slotKeys.includes('operation')" slot="operation" class="z-schema-filter__button-group">
  20 + <el-button-group :size="size">
  21 + <el-button type="primary" @click="handleSearch" :loading="loading" icon="el-icon-search"><span>查询</span></el-button>
  22 + <el-button @click="handleReset"><span>重置</span></el-button>
  23 + <el-button v-if="showCollapsed" @click="handleCollapse">
  24 + <span>{{ collapsed ? '展开' : '收起' }}</span>
  25 + </el-button>
  26 + </el-button-group>
  27 + </div>
  28 + </z-schema-form>
  29 +</template>
  30 +
  31 +<script>
  32 +export default {
  33 + name: 'SchemaFilter',
  34 + props: {
  35 + value: Object,
  36 + list: Array,
  37 + labelWidth: {
  38 + type: String,
  39 + default: '110px',
  40 + },
  41 + size: {
  42 + type: String,
  43 + default: 'small',
  44 + },
  45 + span: {
  46 + type: Number,
  47 + default: 6,
  48 + },
  49 + collapsedSpan: {
  50 + type: Number,
  51 + default: 6,
  52 + },
  53 + uncollapsedSpan: {
  54 + type: Number,
  55 + default: 24,
  56 + },
  57 + visibleNum: {
  58 + type: Number,
  59 + default: 3,
  60 + },
  61 + loading: Boolean,
  62 + formProps: {
  63 + type: Object,
  64 + default: () => ({}),
  65 + },
  66 + params: Object,
  67 + },
  68 + data() {
  69 + return {
  70 + collapsed: true,
  71 + model: this.value || {},
  72 + };
  73 + },
  74 + watch: {
  75 + value(val = {}) {
  76 + this.model = val;
  77 + },
  78 + model(val) {
  79 + this.$emit('input', val);
  80 + },
  81 + },
  82 + computed: {
  83 + formattedList() {
  84 + return [...this.list, { key: 'operation', label: '', labelWidth: '0px', span: this.collapsed ? this.collapsedSpan : this.uncollapsedSpan }];
  85 + },
  86 + showCollapsed() {
  87 + const { list, visibleNum } = this;
  88 + return list.length > visibleNum;
  89 + },
  90 + slotKeys() {
  91 + return Object.keys(this.$scopedSlots);
  92 + },
  93 + },
  94 + methods: {
  95 + // 渲染列表项class
  96 + colVisibleRender(item, index) {
  97 + if (this.collapsed) {
  98 + const visibleNumber = this.visibleNum ? this.visibleNum - 1 : 2;
  99 + return index > visibleNumber && index < this.list.length ? 'z-schema-filter__item hidden' : 'z-schema-filter__item';
  100 + }
  101 + return 'z-schema-filter__item';
  102 + },
  103 + // 搜索
  104 + handleSearch() {
  105 + this.$emit('search', this.model);
  106 + },
  107 + // 重置
  108 + handleReset() {
  109 + this.model = {};
  110 + this.$emit('reset');
  111 + },
  112 + // 折叠
  113 + handleCollapse() {
  114 + this.collapsed = !this.collapsed;
  115 + },
  116 + },
  117 +};
  118 +</script>
  119 +
  120 +<style>
  121 +.z-schema-filter__item.hidden {
  122 + display: none;
  123 +}
  124 +.z-schema-filter__button-group {
  125 + width: 100%;
  126 + box-sizing: border-box;
  127 + text-align: right;
  128 +}
  129 +</style>
... ...
packages/schema-form/index copy.vue 0 → 100644
... ... @@ -0,0 +1,216 @@
  1 +<style lang="scss">
  2 +.z-schema-form {
  3 + &__flex-wrap {
  4 + display: flex;
  5 + flex-wrap: wrap;
  6 + width: 100%;
  7 + }
  8 + &__group-title {
  9 + font-weight: bold;
  10 + padding: 15px 5px;
  11 + border-bottom: 1px solid #d9d9d9;
  12 + margin-bottom: 15px;
  13 + }
  14 + &__group-content {
  15 + margin: 15px 0px;
  16 + }
  17 + &__footer {
  18 + padding-top: 10px;
  19 + display: flex;
  20 + align-items: center;
  21 + justify-content: center;
  22 + }
  23 +}
  24 +</style>
  25 +
  26 +<template>
  27 + <el-form
  28 + ref="form"
  29 + class="z-schema-form"
  30 + :size="size"
  31 + :class="formClass"
  32 + :model="formModel"
  33 + :label-width="labelWidth"
  34 + :label-position="labelPosition || labelWidth ? 'right' : 'top'"
  35 + v-bind="formProps"
  36 + >
  37 + <schema-form-render
  38 + :title-class="titleClass"
  39 + :content-class="contentClass"
  40 + :item-class="itemClass"
  41 + :col-class="colClass"
  42 + :group-class="groupClass"
  43 + :list="formList"
  44 + :value="model"
  45 + :model="model"
  46 + :span="span"
  47 + :type="type"
  48 + :params="params"
  49 + @item-change="onItemChange"
  50 + @form-item-change="onFormItemChange"
  51 + @item-update="onItemUpdate"
  52 + >
  53 + <slot v-for="key in slotKeys" :name="key" :slot="key"></slot>
  54 + </schema-form-render>
  55 + <div v-if="$scopedSlots.footer" class="z-schema-form__footer">
  56 + <slot name="footer" :size="size" :validate="validate" :reset="reset" :model="model"></slot>
  57 + </div>
  58 + </el-form>
  59 +</template>
  60 +
  61 +<script>
  62 +import SchemaFormRender from './schema-form-render';
  63 +import { cloneDeep, set } from '../utils';
  64 +
  65 +export default {
  66 + name: 'SchemaForm',
  67 + components: { SchemaFormRender },
  68 + props: {
  69 + value: Object,
  70 + list: Array,
  71 + formClass: String,
  72 + titleClass: String,
  73 + contentClass: String,
  74 + itemClass: String,
  75 + colClass: [String, Function],
  76 + groupClass: String,
  77 + labelWidth: String,
  78 + labelPosition: String,
  79 + type: String,
  80 + size: {
  81 + type: String,
  82 + default: 'small',
  83 + },
  84 + span: {
  85 + type: Number,
  86 + default: 24,
  87 + },
  88 + formProps: {
  89 + type: Object,
  90 + default: () => ({}),
  91 + },
  92 + params: Object,
  93 + },
  94 + data() {
  95 + return {
  96 + model: {},
  97 + formModel: {},
  98 + formList: [],
  99 + };
  100 + },
  101 + computed: {
  102 + slotKeys() {
  103 + return Object.keys(this.$scopedSlots);
  104 + },
  105 + },
  106 + watch: {
  107 + value: {
  108 + handler(val = {}) {
  109 + this.model = val;
  110 + this.setFormModel(val);
  111 + },
  112 + immediate: true,
  113 + },
  114 + list: {
  115 + handler(val) {
  116 + // 深度克隆传入的列表,避免原始值被修改
  117 + const newList = cloneDeep(this.list);
  118 + // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
  119 + const generateFullKey = (list, parentKey) => {
  120 + list.forEach(item => {
  121 + if (item.group && item.list) {
  122 + if (item.group.key) {
  123 + item.fullKey = `${parentKey ? `${parentKey}-${item.group.key}` : item.group.key}`;
  124 + } else {
  125 + item.fullKey = parentKey || item.key;
  126 + }
  127 + generateFullKey(item.list, item.fullKey);
  128 + } else {
  129 + item.fullKey = `${parentKey ? `${parentKey}-${item.key}` : item.key}`;
  130 + }
  131 + });
  132 + };
  133 + generateFullKey(newList);
  134 + this.formList = newList;
  135 + },
  136 + immediate: true,
  137 + },
  138 + },
  139 + methods: {
  140 + handleInput(value) {
  141 + console.log(value);
  142 + },
  143 + /**
  144 + * @description 表单项值变化
  145 + * @param {Object} item 表单项值对象
  146 + */
  147 + onItemChange(item) {
  148 + this.$emit('input', { ...this.model, ...item });
  149 + },
  150 + /**
  151 + * @description 表单相校验值变化
  152 + * @param {Object} item 表单项校验值对象
  153 + */
  154 + onFormItemChange(item) {
  155 + this.formModel = { ...this.formModel, ...item };
  156 + },
  157 + /**
  158 + * @description 校验表单
  159 + */
  160 + validate(cb) {
  161 + return new Promise(resolve => {
  162 + this.$refs.form.validate(valid => {
  163 + cb && cb(valid);
  164 + this.$emit('validate', valid, this.model);
  165 + return resolve(valid);
  166 + });
  167 + });
  168 + },
  169 + /**
  170 + * @description 重置表单
  171 + */
  172 + reset() {
  173 + this.$refs.form.clearValidate();
  174 + this.$emit('reset');
  175 + },
  176 + /**
  177 + * @description 根据表单值设置表单校验值
  178 + * @param {Object} value 表单值
  179 + */
  180 + setFormModel(value) {
  181 + let formModel = {};
  182 + // 递归深度解析表单值,将表单值扁平化为一层的对象并设置为表单校验值对象
  183 + const setFormModelValue = (list, parentKey) => {
  184 + list.forEach(item => {
  185 + item.fullKey = `${parentKey ? `${parentKey}-${item.key}` : item.key}`;
  186 + if (item.value instanceof Object) {
  187 + setFormModelValue(
  188 + Object.keys(item.value).map(key => ({ key, value: item.value[key] })),
  189 + item.fullKey,
  190 + );
  191 + } else {
  192 + formModel[item.fullKey] = item.value;
  193 + }
  194 + });
  195 + };
  196 + setFormModelValue(Object.keys(value).map(key => ({ key, value: value[key] })));
  197 + this.formModel = formModel;
  198 + },
  199 + /**
  200 + * @description 手动更新某一表单项的值
  201 + * @param {Object} param 需要更新的参数对象或者对象数组 { name => 表单项key,可嵌套; value => 更新的值 }
  202 + * @example { name: 'a.b.c', value: 123 }
  203 + * @example { name: 'd.0.e', value: ['f'] }
  204 + */
  205 + onItemUpdate(param) {
  206 + this.$nextTick(() => {
  207 + const newModel = cloneDeep(this.model);
  208 + Object.entries(param).forEach(entry => {
  209 + set(newModel, entry[0], entry[1]);
  210 + });
  211 + this.$emit('input', newModel);
  212 + });
  213 + },
  214 + },
  215 +};
  216 +</script>
... ...
packages/schema-form/index.vue 0 → 100644
... ... @@ -0,0 +1,143 @@
  1 +<template>
  2 + <z-form ref="form" v-model="model" v-bind="schema.props" v-on="schema.props">
  3 + <template v-for="(item, index) in schema.items">
  4 + <template v-if="item.is">
  5 + <z-form-item v-bind="keywordFilter(item)" :key="index">
  6 + <slot
  7 + v-if="$scopedSlots[item.prop]"
  8 + :name="`${item.prop}`"
  9 + :value="get(model, item.prop)"
  10 + :onInput="value => onComponentInput({ value, item })"
  11 + :props="{ value: get(model, item.prop) }"
  12 + :listeners="{ input: value => onComponentInput({ value, item }) }"
  13 + >
  14 + </slot>
  15 + <component v-else :is="item.is" :value="get(model, item.prop)" @input="value => onComponentInput({ value, item })" v-bind="item.props">
  16 + <template v-if="item.render">
  17 + <dynamic-render
  18 + v-if="typeof item.render === 'function'"
  19 + :render="
  20 + item.render($createElement, {
  21 + model,
  22 + value: get(model, item.prop),
  23 + onInput: value => onComponentInput({ value, item }),
  24 + })
  25 + "
  26 + ></dynamic-render>
  27 + <static-render v-else :render="item.render"></static-render>
  28 + </template>
  29 + <template v-if="item.children">
  30 + <childrens-render :value="item.children"></childrens-render>
  31 + </template>
  32 + </component>
  33 + <slot :name="`label-${item.prop}`" slot="label"></slot>
  34 + <slot :name="`error-${item.prop}`" slot="error"></slot>
  35 + </z-form-item>
  36 + </template>
  37 + <template v-else>
  38 + <z-form-item v-bind="keywordFilter(item)" :key="index">
  39 + <slot :name="item.prop"></slot>
  40 + </z-form-item>
  41 + </template>
  42 + </template>
  43 + <slot v-if="schema.footer !== false" name="footer">
  44 + <z-form-item>
  45 + <el-button type="primary" @click="onSubmit">确定</el-button>
  46 + <el-button plain @click="onCancel">取消</el-button>
  47 + </z-form-item>
  48 + </slot>
  49 + </z-form>
  50 +</template>
  51 +
  52 +<script>
  53 +import { cloneDeep, get, set } from '../utils';
  54 +
  55 +export default {
  56 + name: 'SchemaForm',
  57 + components: {
  58 + DynamicRender: {
  59 + functional: true,
  60 + render(h, context) {
  61 + return context.props.render;
  62 + },
  63 + },
  64 + StaticRender: {
  65 + functional: true,
  66 + render(h, context) {
  67 + return h('span', [context.props.render]);
  68 + },
  69 + },
  70 + ChildrensRender: {
  71 + functional: true,
  72 + render(h, context) {
  73 + return context.props.value.map(item => {
  74 + if (Array.isArray(item.children) && item.children.length > 0) {
  75 + return h('childrens-render', { props: { value: item.children } });
  76 + } else {
  77 + return h(item.is, { ...item });
  78 + }
  79 + });
  80 + },
  81 + },
  82 + },
  83 + props: {
  84 + value: {
  85 + type: Object,
  86 + default() {
  87 + return {};
  88 + },
  89 + },
  90 + schema: {
  91 + type: Object,
  92 + required: true,
  93 + },
  94 + },
  95 + data() {
  96 + return {
  97 + model: this.value,
  98 + originData: {},
  99 + };
  100 + },
  101 + computed: {
  102 + schemaProps() {
  103 + return this.schema.props;
  104 + },
  105 + },
  106 + created() {
  107 + const { originData, ...other } = this._data;
  108 + this.originData = cloneDeep(other);
  109 + },
  110 + watch: {
  111 + value(val = {}) {
  112 + this.model = val;
  113 + },
  114 + model: {
  115 + handler(val) {
  116 + this.$emit('input', val);
  117 + },
  118 + deep: true,
  119 + },
  120 + },
  121 + methods: {
  122 + get,
  123 + keywordFilter(val = {}) {
  124 + const { children, is, ...other } = val;
  125 + return other;
  126 + },
  127 + onComponentInput({ value, item }) {
  128 + set(this.model, item.prop, value);
  129 + },
  130 + onSubmit() {
  131 + this.$refs.form.validate(valid => {
  132 + if (valid) {
  133 + this.$emit('submit', this.model);
  134 + }
  135 + });
  136 + },
  137 + onCancel() {
  138 + this.model = cloneDeep(this.originData).model;
  139 + this.$emit('cancel');
  140 + },
  141 + },
  142 +};
  143 +</script>
... ...
packages/schema-form/schema-form-render.vue 0 → 100644
... ... @@ -0,0 +1,246 @@
  1 +<template>
  2 + <!-- 在row上使用flex,防止表单组件大小不一导致错位 -->
  3 + <component :is="rowComponent" class="z-schema-form__flex-wrap">
  4 + <template v-for="(item, index) in list">
  5 + <!-- 表单项有设置分组时 -->
  6 + <component
  7 + :is="colComponent"
  8 + v-if="item.group && item.list"
  9 + :key="index"
  10 + :span="type === 'div' ? undefined : item.group.span || 24"
  11 + :style="{ width: type === 'div' ? '100%' : undefined }"
  12 + :class="colClassRender(item, index, colClass)"
  13 + >
  14 + <component :is="rowComponent" class="z-schema-form__flex-wrap" :class="groupClass || 'z-schema-form__group'">
  15 + <!-- 表单分组标题 -->
  16 + <component :is="rowComponent" :class="titleClass || 'z-schema-form__group-title'" v-if="item.group.title" style="width: 100%;">
  17 + {{ item.group.title || item.group }}
  18 + </component>
  19 + <!-- 递归本组件 -->
  20 + <schema-form-render
  21 + :title-class="titleClass"
  22 + :item-class="itemClass"
  23 + :content-class="contentClass"
  24 + :group-class="groupClass"
  25 + :class="contentClass || 'z-schema-form__group-content'"
  26 + :list="item.list"
  27 + :value="value"
  28 + :model="itemKey ? model[itemKey] || {} : model"
  29 + :itemKey="item.group.key"
  30 + :type="type"
  31 + @item-change="onItemChange"
  32 + @form-item-change="onFormItemChange"
  33 + @item-update="onItemUpdate"
  34 + :span="type === 'div' ? undefined : span * (24 / (item.group.span || 24))"
  35 + ></schema-form-render>
  36 + </component>
  37 + </component>
  38 + <!-- 正常无分组表单项 -->
  39 + <template v-else>
  40 + <component
  41 + :is="colComponent"
  42 + v-if="bindItemVisible(item, 'visible')"
  43 + v-show="bindItemVisible(item, 'show')"
  44 + :span="type === 'div' ? undefined : item.span || span"
  45 + :key="index"
  46 + :style="{ width: type === 'div' && item.style && item.style.width.includes('%') ? item.style.width : undefined, paddingRight: '10px' }"
  47 + :class="colClassRender(item, index, colClass)"
  48 + >
  49 + <el-form-item :label="item.label" :label-width="item.labelWidth" :prop="item.fullKey" :rules="item | bindItemRulesFilter(model)" :class="itemClass || 'z-schema-form__item'">
  50 + <slot v-if="$scopedSlots[item.fullKey]" :name="item.fullKey" :value="itemValue(item)" :model1="value"></slot>
  51 + <template v-else>
  52 + <!-- 自定义组件 -->
  53 + <dynamic-render
  54 + v-if="typeof item.type === 'function'"
  55 + :render="
  56 + item.type($createElement, {
  57 + model: value,
  58 + config: {
  59 + props: { ...propsFormatter(item.props), value: itemValue(item) },
  60 + style: item.style || { width: '100%' },
  61 + on: {
  62 + ...bindItemEvent(item),
  63 + input: v => onInput({ value: v, item }),
  64 + },
  65 + },
  66 + })
  67 + "
  68 + ></dynamic-render>
  69 + <component
  70 + v-else
  71 + :is="item.type"
  72 + :value="itemValue(item)"
  73 + @input="v => onInput({ value: v, item })"
  74 + v-on="bindItemEvent(item)"
  75 + v-bind="propsFormatter(item.props)"
  76 + :style="item.style || { width: '100%' }"
  77 + ></component>
  78 + </template>
  79 + </el-form-item>
  80 + </component>
  81 + </template>
  82 + </template>
  83 + </component>
  84 +</template>
  85 +
  86 +<script>
  87 +export default {
  88 + name: 'SchemaFormRender',
  89 + components: {
  90 + DynamicRender: {
  91 + functional: true,
  92 + render(h, context) {
  93 + return context.props.render;
  94 + },
  95 + },
  96 + },
  97 + props: {
  98 + list: Array,
  99 + model: Object,
  100 + value: Object,
  101 + itemKey: String,
  102 + titleClass: String,
  103 + contentClass: String,
  104 + itemClass: String,
  105 + colClass: [String, Function],
  106 + groupClass: String,
  107 + type: String,
  108 + span: Number,
  109 + params: Object,
  110 + },
  111 + computed: {
  112 + rowComponent() {
  113 + return this.type === 'div' ? 'div' : 'el-row';
  114 + },
  115 + colComponent() {
  116 + return this.type === 'div' ? 'div' : 'el-col';
  117 + },
  118 + },
  119 + filters: {
  120 + /**
  121 + * @description 绑定表单项规则
  122 + * @param {Object} item 表单项配置
  123 + * @returns {Function} 事件函数
  124 + */
  125 + bindItemRulesFilter(item = {}, model) {
  126 + if (item.rules) {
  127 + if (typeof item.rules === 'function') {
  128 + return item.rules(model);
  129 + } else {
  130 + return item.rules;
  131 + }
  132 + } else {
  133 + return undefined;
  134 + }
  135 + },
  136 + },
  137 + methods: {
  138 + /**
  139 + * @description 渲染col class
  140 + * @param {Object} item 表单项配置
  141 + * @param {Object} index 表单项渲染下标
  142 + * @param {Object} colClass 表单项配置
  143 + * @return {String} col class
  144 + */
  145 + colClassRender(item, index, colClass) {
  146 + if (colClass instanceof Function) {
  147 + return colClass(item, index);
  148 + } else {
  149 + return colClass;
  150 + }
  151 + },
  152 + /**
  153 + * @description 根据表单项的key查询该值
  154 + * @param {Object} item 表单项配置
  155 + * @returns {Any} 返回值
  156 + */
  157 + itemValue(item) {
  158 + if (this.itemKey) {
  159 + // 如果存在itemKey,即当前项位于嵌套分组内,查询分组名下对应key的值
  160 + const groupItem = this.model[this.itemKey] || {};
  161 + return groupItem[item.key];
  162 + } else {
  163 + // 否则即意味着不在分组内,直接查询model下对应key的值
  164 + return this.model[item.key];
  165 + }
  166 + },
  167 + /**
  168 + * @description 组件有值输入时的事件
  169 + * @param {Object} data { value => 组件值; item => 表单项配置 }
  170 + */
  171 + onInput({ value, item }) {
  172 + if (this.itemKey) {
  173 + this.$emit('item-change', { [this.itemKey]: { ...this.model[this.itemKey], [item.key]: value } });
  174 + } else {
  175 + this.$emit('item-change', { [item.key]: value });
  176 + }
  177 + this.$emit('form-item-change', { [item.fullKey]: value });
  178 + },
  179 + /**
  180 + * @description 当表单项有改动时的事件
  181 + * @param {Any} 表单项值
  182 + */
  183 + onItemChange(value) {
  184 + if (this.itemKey) {
  185 + this.$emit('item-change', { [this.itemKey]: { ...this.model[this.itemKey], ...value } });
  186 + } else {
  187 + this.$emit('item-change', value);
  188 + }
  189 + },
  190 + /**
  191 + * @description 当表单项校验值有改动时的事件
  192 + * @param {Any} 表单项校验值
  193 + */
  194 + onFormItemChange(value) {
  195 + this.$emit('form-item-change', value);
  196 + },
  197 + /**
  198 + * @description 当表单项有手动更新时的事件
  199 + * @param {Any} 表单项值
  200 + */
  201 + onItemUpdate(value) {
  202 + this.$emit('item-update', value);
  203 + },
  204 + /**
  205 + * @description 绑定表单项事件
  206 + * @param {Object} item 表单项配置
  207 + * @returns {Function} 事件函数
  208 + */
  209 + bindItemEvent(item) {
  210 + if (item.on) {
  211 + if (typeof item.on === 'function') {
  212 + return item.on({ model: this.value, update: e => this.$emit('item-update', e) });
  213 + } else {
  214 + return item.on;
  215 + }
  216 + } else {
  217 + return undefined;
  218 + }
  219 + },
  220 + /**
  221 + * @description 绑定表单项显示状态
  222 + * @param {Object} item 表单项配置
  223 + * @param {String} type Vue显示类型,可选值:visible、show
  224 + * @returns {Boolean} 显示状态
  225 + */
  226 + bindItemVisible(item, type) {
  227 + const visible = item[type];
  228 + if (typeof visible === 'function') {
  229 + return visible(this.model, this.params || {});
  230 + }
  231 + return item[type] !== false;
  232 + },
  233 + /**
  234 + * @description 格式化props属性
  235 + * @param {Object|Function} props 属性或属性对象
  236 + * @returns {Object} 格式化的属性
  237 + */
  238 + propsFormatter(props) {
  239 + if (typeof props === 'function') {
  240 + return props(this.model, this.params || {});
  241 + }
  242 + return props || {};
  243 + },
  244 + },
  245 +};
  246 +</script>
... ...
packages/schema-table/cell-editable.vue 0 → 100644
... ... @@ -0,0 +1,90 @@
  1 +<style>
  2 +.z-table-cell-editable {
  3 + display: flex;
  4 + align-items: center;
  5 +}
  6 +.z-table-cell-editable .z-table-cell-editable__icon {
  7 + cursor: pointer;
  8 + vertical-align: middle;
  9 + padding-left: 5px;
  10 + fill: #2f54eb;
  11 +}
  12 +</style>
  13 +
  14 +<template>
  15 + <div>
  16 + <!-- 可编辑状态 -->
  17 + <div v-if="editable" class="z-table-cell-editable">
  18 + <component :value="$_get(row, item.fullKey)" :is="item.type" v-bind="item.props" :style="item.style" size="mini" @input="onInput"></component>
  19 + <span v-if="btnVisible !== false" @click="onConfirm">
  20 + <svg class="z-table-cell-editable__icon" viewBox="0 0 1024 1024" width="24" height="24">
  21 + <path d="M235.946667 472.938667l-45.226667 45.312 210.090667 209.514666 432.362666-427.690666-45.013333-45.482667-387.157333 382.976z"></path>
  22 + </svg>
  23 + </span>
  24 + </div>
  25 + <!-- 渲染状态 -->
  26 + <template v-else>
  27 + <!-- 渲染插槽 -->
  28 + <template v-if="$scopedSlots['default']">
  29 + <slot></slot>
  30 + </template>
  31 + <!-- 默认渲染 -->
  32 + <template v-else>
  33 + {{ $_get(row, item.agentKey || item.fullKey) }}
  34 + </template>
  35 + </template>
  36 + </div>
  37 +</template>
  38 +
  39 +<script>
  40 +import { get } from '../utils';
  41 +
  42 +export default {
  43 + name: 'cellEditable',
  44 + props: {
  45 + row: Object,
  46 + item: Object,
  47 + editable: Boolean,
  48 + btnVisible: Boolean,
  49 + },
  50 + data() {
  51 + return {
  52 + oldValue: undefined,
  53 + value: undefined,
  54 + confirm: false,
  55 + };
  56 + },
  57 + watch: {
  58 + editable(val) {
  59 + if (val) {
  60 + this.confirm = false;
  61 + this.oldValue = get(this.row, this.item.agentKey || this.item.fullKey);
  62 + this.value = get(this.row, this.item.agentKey || this.item.fullKey);
  63 + } else {
  64 + if (!this.confirm) {
  65 + this.$emit('cancel', this.emitData);
  66 + }
  67 + }
  68 + },
  69 + },
  70 + computed: {
  71 + emitData() {
  72 + const { oldValue, value, row, item } = this;
  73 + return { oldValue, value, row, key: item.key, fullKey: item.fullKey };
  74 + },
  75 + },
  76 + methods: {
  77 + $_get: get,
  78 + // 组件触发input事件
  79 + onInput(value) {
  80 + this.value = value;
  81 + this.$emit('update', this.emitData);
  82 + },
  83 + // 当点击确认
  84 + onConfirm() {
  85 + this.confirm = true;
  86 + this.$emit('done', this.emitData);
  87 + },
  88 + },
  89 +};
  90 +</script>
... ...
packages/schema-table/cell-value-render.js 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +import { get } from '../utils';
  2 +
  3 +export default {
  4 + props: { row: Object, column: Object, index: [Number, String], item: Object },
  5 + render(h) {
  6 + const { row, column, index, item } = this;
  7 + if (typeof item.render === 'function') {
  8 + return item.render(h, { row, value: get(row, item.fullKey), $index: index, column });
  9 + } else {
  10 + if (item.render.children instanceof Function) {
  11 + return h(
  12 + item.render.type,
  13 + { props: item.render.props, attrs: item.render.props, style: item.render.style },
  14 + item.render.children({ row, value: get(row, item.fullKey), $index: index, column }),
  15 + );
  16 + }
  17 + return h(item.render.type, { props: item.render.props, attrs: item.render.props, style: item.render.style }, item.render.children || get(row, item.fullKey));
  18 + }
  19 + },
  20 +};
... ...
packages/schema-table/editable.vue 0 → 100644
... ... @@ -0,0 +1,319 @@
  1 +<style>
  2 +.z-table {
  3 + width: 100%;
  4 +}
  5 +</style>
  6 +
  7 +<template>
  8 + <div @keyup.enter="tableEditCell = {}">
  9 + <div style="padding-bottom: 10px;">
  10 + <el-button @click="handleNew" size="mini" v-if="!rowEdit">新增</el-button>
  11 + <el-button @click="handleEdit" size="mini" v-if="!rowEditable && tableSelection.length > 0">编辑</el-button>
  12 + <el-button @click="handleSave" size="mini" type="primary" v-if="rowEditable">完成</el-button>
  13 + <el-button @click="handleCancel" size="mini" type="plain" v-if="rowNew && !rowEdit">取消</el-button>
  14 + <el-button @click="handleDelete" size="mini" type="danger" v-if="tableSelection.length > 0">删除</el-button>
  15 + </div>
  16 + <el-table
  17 + class="z-table"
  18 + ref="table"
  19 + :data="tableData"
  20 + v-bind="{ size: 'small', ...tableProps }"
  21 + v-on="tableEvents"
  22 + @cell-dblclick="onCellDblclick"
  23 + @selection-change="onSelectionChange"
  24 + >
  25 + <el-table-column type="selection" :selectable="r => (rowNew ? r.$new : true)"></el-table-column>
  26 + <!-- 默认表格插槽 -->
  27 + <slot name="default"></slot>
  28 + <!-- 根据配置列表生成表格列 -->
  29 + <template v-if="tableList && tableList.length > 0">
  30 + <template v-for="(item, index) in tableList">
  31 + <template v-if="bindItemVisible(item.visible)">
  32 + <!-- 如果有表格列具名插槽 -->
  33 + <slot v-if="$scopedSlots[item.keyPath.join('-')]" :name="item.keyPath.join('-')" v-bind="item"></slot>
  34 + <!-- 默认表格列渲染 -->
  35 + <el-table-column v-else v-bind="item" :prop="item.fullKey || item.key" :key="index" :min-width="minWidth || item.minWidth || item['min-width'] || (editable ? 140 : undefined)">
  36 + <template #default="{ row, column, $index }">
  37 + <cell-editable
  38 + :editable="row.$editable || (editable && tableEditCell.index === row.$index && tableEditCell.key === (item.agentKey || item.fullKey || item.key))"
  39 + :row="row"
  40 + :item="item"
  41 + @update="onCellUpdate"
  42 + @done="onCellUpdateDone"
  43 + @cancel="onCellUpdateCancel"
  44 + :btn-visible="!row.$editable"
  45 + >
  46 + <!-- 如果有表格列值渲染具名插槽 -->
  47 + <slot
  48 + v-if="$scopedSlots[`value-${item.keyPath.join('-')}`]"
  49 + :name="`value-${item.keyPath.join('-')}`"
  50 + v-bind="item"
  51 + :row="row"
  52 + :value="$_get(row, item.fullKey)"
  53 + :column="column"
  54 + :index="$index"
  55 + ></slot>
  56 + <!-- 如果表格列配置了值渲染参数 -->
  57 + <cell-value-render v-else-if="item.render" :row="row" :column="column" :index="$index" :item="item" />
  58 + </cell-editable>
  59 + </template>
  60 + </el-table-column>
  61 + </template>
  62 + </template>
  63 + </template>
  64 + <!-- 已生成列表后的追加列插槽 -->
  65 + <slot name="column-append"></slot>
  66 + <!-- 末尾列插槽 -->
  67 + <slot name="column-end"></slot>
  68 + </el-table>
  69 + </div>
  70 +</template>
  71 +
  72 +<script>
  73 +import { cloneDeep, get, set } from '../utils';
  74 +import CellEditable from './cell-editable';
  75 +import CellValueRender from './cell-value-render';
  76 +
  77 +const listHasKey = (list, name) => {
  78 + let result = false;
  79 + for (const row of list) {
  80 + if (row[name]) {
  81 + result = true;
  82 + break;
  83 + }
  84 + }
  85 + return result;
  86 +};
  87 +
  88 +export default {
  89 + name: 'TableNew',
  90 + components: {
  91 + CellEditable,
  92 + CellValueRender,
  93 + },
  94 + props: {
  95 + // 用于实例化本组件绑定v-model的值
  96 + value: Array,
  97 + // 配置列表
  98 + list: {
  99 + type: Array,
  100 + required: true,
  101 + },
  102 + // 表格参数
  103 + tableProps: {
  104 + type: Object,
  105 + default() {
  106 + return {};
  107 + },
  108 + },
  109 + // 表格事件
  110 + tableEvents: Object,
  111 + // 是否可编辑
  112 + editable: Boolean,
  113 + // 列宽
  114 + minWidth: Number,
  115 + },
  116 + data() {
  117 + return {
  118 + tableList: [], // 表格配置列表
  119 + tableData: [], // 表格数据
  120 + tableRowTemplate: { $editable: true }, // 行数据模板
  121 + tableEditCell: {}, // 正在编辑的单元格
  122 + tableSelection: [], // 表格已选中
  123 + };
  124 + },
  125 + computed: {
  126 + // 表格实体
  127 + instance: {
  128 + get() {
  129 + return this.$refs.table;
  130 + },
  131 + },
  132 + // 行编辑状态
  133 + rowEditable() {
  134 + return listHasKey(this.tableData, '$editable');
  135 + },
  136 + // 存在新行
  137 + rowNew() {
  138 + return listHasKey(this.tableData, '$new');
  139 + },
  140 + // 存在编辑行
  141 + rowEdit() {
  142 + return listHasKey(this.tableData, '$edit');
  143 + },
  144 + },
  145 + watch: {
  146 + value: {
  147 + handler(val = []) {
  148 + this.tableData = val.map((o, i) => {
  149 + return { ...o, $index: i, $editable: undefined, $new: undefined };
  150 + });
  151 + },
  152 + immediate: true,
  153 + },
  154 + list: {
  155 + handler(val) {
  156 + // 深度克隆传入的列表,避免原始值被修改
  157 + const newList = cloneDeep(this.list);
  158 + // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
  159 + const generateFullKey = (list, parentKey) => {
  160 + list.forEach(item => {
  161 + if (item.group && item.list) {
  162 + if (item.group.key) {
  163 + item.fullKey = `${parentKey ? `${parentKey}.${item.group.key}` : item.group.key}`;
  164 + } else {
  165 + item.fullKey = parentKey || item.key;
  166 + }
  167 + generateFullKey(item.list, item.fullKey);
  168 + } else {
  169 + item.fullKey = `${parentKey ? `${parentKey}.${item.key}` : item.key}`;
  170 + }
  171 + });
  172 + };
  173 + // 生成fullKey
  174 + generateFullKey(newList);
  175 + // 创建输出列表
  176 + const result = [];
  177 + const tableRowTemplate = {};
  178 + // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
  179 + const generateFlatList = list => {
  180 + list.forEach(item => {
  181 + if (item.group && item.list) {
  182 + generateFlatList(item.list);
  183 + } else if (!item.group && !item.list) {
  184 + result.push({ ...item, keyPath: item.fullKey.split('.') });
  185 + set(tableRowTemplate, item.fullKey, undefined);
  186 + tableRowTemplate.$editable = true;
  187 + }
  188 + });
  189 + };
  190 + generateFlatList(newList);
  191 + this.tableList = result;
  192 + this.tableRowTemplate = tableRowTemplate;
  193 + },
  194 + immediate: true,
  195 + },
  196 + },
  197 + methods: {
  198 + $_get: get,
  199 + // 处理新增逻辑
  200 + handleNew() {
  201 + const tableData = cloneDeep(this.tableData);
  202 + tableData.push({ ...this.tableRowTemplate, $new: true });
  203 + this.tableEditCell = {};
  204 + this.tableData = tableData.map((o, i) => ({ ...o, $index: i }));
  205 + },
  206 + // 处理编辑逻辑
  207 + handleEdit() {
  208 + const tableData = cloneDeep(this.tableData);
  209 + const selectionIndexArr = this.tableSelection.map(i => i.$index);
  210 + tableData.forEach((r, i) => {
  211 + if (selectionIndexArr.includes(r.$index)) {
  212 + tableData[i].$editable = true;
  213 + tableData[i].$edit = true;
  214 + tableData[i].$new = true;
  215 + }
  216 + });
  217 + this.tableEditCell = {};
  218 + this.tableData = tableData.map((o, i) => ({ ...o, $index: i }));
  219 + },
  220 + // 处理保存逻辑
  221 + handleSave() {
  222 + const tableData = cloneDeep(this.tableData);
  223 + tableData.forEach((r, i) => {
  224 + delete tableData[i].$editable;
  225 + });
  226 + this.tableEditCell = {};
  227 + this.tableData = tableData.map((o, i) => ({ ...o, $index: i }));
  228 + this.$nextTick(() => {
  229 + this.emitTableData(this.tableData);
  230 + this.$emit(
  231 + this.rowEdit ? 'row-edit' : 'row-new',
  232 + this.tableData
  233 + .filter(d => d.$new)
  234 + .map(d => {
  235 + delete d.$new;
  236 + return d;
  237 + }),
  238 + );
  239 + });
  240 + },
  241 + // 处理取消逻辑
  242 + handleCancel() {
  243 + let tableData = cloneDeep(this.tableData);
  244 + tableData = tableData.filter(row => !row.$new);
  245 + this.emitTableData(tableData);
  246 + },
  247 + // 处理删除逻辑
  248 + handleDelete() {
  249 + const tableData = cloneDeep(this.tableData);
  250 + const selectionIndexArr = this.tableSelection.map(i => i.$index);
  251 + if (!this.rowNew && !this.rowEdit) {
  252 + this.$emit('row-delete', this.tableSelection);
  253 + }
  254 + this.tableEditCell = {};
  255 + this.tableData = tableData.filter((d, i) => !selectionIndexArr.includes(i)).map((o, i) => ({ ...o, $index: i }));
  256 + },
  257 + // 更新表格数据
  258 + emitTableData(tableData) {
  259 + if (this.$listeners['input']) {
  260 + this.$emit(
  261 + 'input',
  262 + tableData.map((o, i) => {
  263 + return { ...o, $index: i, $editable: undefined, $new: undefined, $edit: undefined };
  264 + }),
  265 + );
  266 + } else {
  267 + this.tableData = tableData;
  268 + }
  269 + },
  270 + // 绑定表格列显示隐藏状态
  271 + bindItemVisible(visible = true) {
  272 + let result = visible;
  273 + if (typeof visible === 'function') {
  274 + result = visible(this.tableData);
  275 + }
  276 + return result;
  277 + },
  278 + // 双击单元格
  279 + onCellDblclick(row, column, cell, event) {
  280 + if (this.editable && !this.rowNew) {
  281 + this.tableEditCell = { index: row.$index, key: column.property };
  282 + }
  283 + },
  284 + // 编辑表格更新值
  285 + onCellUpdate({ oldValue, value, row, key, fullKey }) {
  286 + this.setCellValue({ value, row, key, fullKey });
  287 + },
  288 + // 编辑表格确认
  289 + onCellUpdateDone({ oldValue, value, row, key, fullKey }) {
  290 + this.tableEditCell = {};
  291 + if (this.$listeners['cell-edit']) {
  292 + const { tableData } = this.setCellValue({ value, row, key, fullKey });
  293 + this.emitTableData(tableData);
  294 + this.$emit('cell-edit', { row, key, fullKey, value });
  295 + }
  296 + },
  297 + // 表格取消编辑
  298 + onCellUpdateCancel({ oldValue, value, row, key, fullKey }) {
  299 + if (row.$new !== true) {
  300 + this.setCellValue({ value: oldValue, row, key, fullKey });
  301 + }
  302 + },
  303 + // 设置表格值
  304 + setCellValue({ value, row, key, fullKey }) {
  305 + const tableData = cloneDeep(this.tableData);
  306 + const tableRow = tableData[row.$index];
  307 + set(tableRow, fullKey, value);
  308 + tableData[row.$index] = tableRow;
  309 + this.$set(this.tableData, row.$index, tableRow);
  310 + return { tableData, tableRow };
  311 + },
  312 + // 表格选中
  313 + onSelectionChange(selection) {
  314 + this.tableSelection = selection;
  315 + this.$emit('selection', selection);
  316 + },
  317 + },
  318 +};
  319 +</script>
... ...
packages/schema-table/index.vue 0 → 100644
... ... @@ -0,0 +1,197 @@
  1 +<style>
  2 +.z-schema-table {
  3 + width: 100%;
  4 +}
  5 +</style>
  6 +
  7 +<template>
  8 + <el-table
  9 + class="z-schema-table"
  10 + ref="table"
  11 + :data="tableData"
  12 + v-bind="{ size, ...tableProps }"
  13 + v-on="tableEvents"
  14 + @select="onSelect"
  15 + @select-all="onSelectAll"
  16 + @selection-change="onSelectionChange"
  17 + >
  18 + <!-- 默认表格插槽 -->
  19 + <slot name="default"></slot>
  20 + <!-- 根据配置列表生成表格列 -->
  21 + <template v-if="tableList && tableList.length > 0">
  22 + <template v-for="(item, index) in tableList">
  23 + <template v-if="bindItemVisible(item.visible)">
  24 + <!-- 如果有表格列具名插槽 -->
  25 + <slot v-if="$scopedSlots[item.keyPath.join('-')]" :name="item.keyPath.join('-')" v-bind="item"></slot>
  26 + <!-- 默认表格列渲染 -->
  27 + <el-table-column v-else v-bind="{ ...item, type: undefined }" :prop="item.fullKey || item.key" :key="index" :min-width="minWidth || item.minWidth || item['min-width']">
  28 + <template #default="{ row, column, $index }">
  29 + <cell-render :row="row" :item="item">
  30 + <!-- 如果有表格列值渲染具名插槽 -->
  31 + <slot
  32 + v-if="$scopedSlots[`value-${item.keyPath.join('-')}`]"
  33 + :name="`value-${item.keyPath.join('-')}`"
  34 + v-bind="item"
  35 + :row="row"
  36 + :value="$_get(row, item.fullKey)"
  37 + :column="column"
  38 + :index="$index"
  39 + ></slot>
  40 + <!-- 如果表格列配置了值渲染参数 -->
  41 + <cell-value-render v-else-if="item.render" :row="row" :column="column" :index="$index" :item="item" />
  42 + </cell-render>
  43 + </template>
  44 + </el-table-column>
  45 + </template>
  46 + </template>
  47 + </template>
  48 + <!-- 已生成列表后的追加列插槽 -->
  49 + <slot name="column-append"></slot>
  50 + <!-- 末尾列插槽 -->
  51 + <slot name="column-end"></slot>
  52 + </el-table>
  53 +</template>
  54 +
  55 +<script>
  56 +import { cloneDeep, get, set } from '../utils';
  57 +import CellValueRender from './cell-value-render';
  58 +
  59 +export default {
  60 + name: 'SchemaTable',
  61 + components: {
  62 + CellRender: {
  63 + props: { row: Object, item: Object },
  64 + render(h) {
  65 + if (this.$scopedSlots.default) {
  66 + return h('span', this.$scopedSlots.default());
  67 + } else {
  68 + return h('span', get(this.row, this.item.agentKey || this.item.fullKey));
  69 + }
  70 + },
  71 + },
  72 + CellValueRender,
  73 + },
  74 + props: {
  75 + // 用于实例化本组件绑定v-model的值
  76 + value: Array,
  77 + // 配置列表
  78 + list: {
  79 + type: Array,
  80 + required: true,
  81 + },
  82 + // 表格参数
  83 + tableProps: {
  84 + type: Object,
  85 + default: () => ({}),
  86 + },
  87 + // 表格事件
  88 + tableEvents: Object,
  89 + // 列宽
  90 + minWidth: Number,
  91 + // 大小
  92 + size: {
  93 + type: String,
  94 + default: 'small',
  95 + },
  96 + },
  97 + data() {
  98 + return {
  99 + tableList: [], // 表格配置列表
  100 + tableData: [], // 表格数据
  101 + };
  102 + },
  103 + computed: {
  104 + // 表格实体
  105 + instance: {
  106 + get() {
  107 + return this.$refs.table;
  108 + },
  109 + },
  110 + },
  111 + watch: {
  112 + value: {
  113 + handler(val = []) {
  114 + this.tableData = val;
  115 + },
  116 + immediate: true,
  117 + },
  118 + list: {
  119 + handler(val) {
  120 + // 深度克隆传入的列表,避免原始值被修改
  121 + const newList = cloneDeep(this.list);
  122 + // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
  123 + const generateFullKey = (list, parentKey) => {
  124 + list.forEach(item => {
  125 + if (item.group && item.list) {
  126 + if (item.group.key) {
  127 + item.fullKey = `${parentKey ? `${parentKey}.${item.group.key}` : item.group.key}`;
  128 + } else {
  129 + item.fullKey = parentKey || item.key;
  130 + }
  131 + generateFullKey(item.list, item.fullKey);
  132 + } else {
  133 + item.fullKey = `${parentKey ? `${parentKey}.${item.key}` : item.key}`;
  134 + }
  135 + });
  136 + };
  137 + // 生成fullKey
  138 + generateFullKey(newList);
  139 + // 创建输出列表
  140 + const result = [];
  141 + // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
  142 + const generateFlatList = list => {
  143 + list.forEach(item => {
  144 + if (item.group && item.list) {
  145 + generateFlatList(item.list);
  146 + } else if (!item.group && !item.list) {
  147 + result.push({ ...item, keyPath: item.fullKey.split('.') });
  148 + }
  149 + });
  150 + };
  151 + generateFlatList(newList);
  152 + this.tableList = result;
  153 + },
  154 + immediate: true,
  155 + },
  156 + },
  157 + methods: {
  158 + $_get: get,
  159 + // 绑定表格列显示隐藏状态
  160 + bindItemVisible(visible = true) {
  161 + let result = visible;
  162 + if (typeof visible === 'function') {
  163 + result = visible(this.tableData);
  164 + }
  165 + return result;
  166 + },
  167 + // 选中单行
  168 + onSelect(selection, row) {
  169 + if (selection.find(i => i.id === row.id)) {
  170 + this.$emit('selection-change', [row], 'check');
  171 + } else {
  172 + this.$emit('selection-change', [row], 'uncheck');
  173 + }
  174 + },
  175 + // 切换全选
  176 + onSelectAll(selection) {
  177 + if (selection && selection.length > 0) {
  178 + this.$emit('selection-change', selection, 'check');
  179 + } else {
  180 + this.$emit('selection-change', this.tableData, 'uncheck');
  181 + }
  182 + },
  183 + // 表格选中
  184 + onSelectionChange(selection) {
  185 + this.$emit('selection', selection);
  186 + },
  187 + // 切换某行选中状态
  188 + toggleRowSelection(row, selected) {
  189 + this.$refs.table && this.$refs.table.toggleRowSelection(row, selected);
  190 + },
  191 + // 清除表格选中
  192 + clearSelection() {
  193 + this.$refs.table && this.$refs.table.clearSelection();
  194 + },
  195 + },
  196 +};
  197 +</script>
... ...
packages/schema/index.scss 0 → 100644
... ... @@ -0,0 +1,72 @@
  1 +.z-schema {
  2 + &__header {
  3 + margin-bottom: 10px;
  4 + }
  5 + &__filter {
  6 + border: 1px solid #ebeef5;
  7 + padding-top: 10px;
  8 + border-radius: 4px;
  9 + margin-bottom: 10px;
  10 + }
  11 + &__action {
  12 + display: flex;
  13 + flex-wrap: wrap;
  14 + align-items: center;
  15 + justify-content: flex-start;
  16 + line-height: 1;
  17 + .el-button + .el-button {
  18 + margin-left: 0;
  19 + }
  20 + .el-button {
  21 + margin-right: 10px;
  22 + margin-bottom: 10px;
  23 + }
  24 + }
  25 + &__table {
  26 + &-operation {
  27 + display: flex;
  28 + flex-wrap: wrap;
  29 + align-items: center;
  30 + justify-content: flex-start;
  31 + .el-button + .el-button {
  32 + margin-left: 0;
  33 + }
  34 + .el-button {
  35 + margin-right: 10px;
  36 + padding-top: 6px;
  37 + padding-bottom: 6px;
  38 + }
  39 + }
  40 + }
  41 + &__dialog-button {
  42 + display: flex;
  43 + align-items: center;
  44 + justify-content: center;
  45 + padding-top: 10px;
  46 + }
  47 + &__footer {
  48 + margin-top: 10px;
  49 + text-align: right;
  50 + display: flex;
  51 + justify-content: space-between;
  52 + align-items: center;
  53 + .selection-info {
  54 + word-break: break-all;
  55 + white-space: nowrap;
  56 + font-size: 12px;
  57 + color: #606266;
  58 + .num {
  59 + color: #000;
  60 + font-weight: bold;
  61 + padding: 0 5px;
  62 + font-size: 16px;
  63 + }
  64 + .el-button {
  65 + margin-left: 5px;
  66 + }
  67 + }
  68 + .el-pagination {
  69 + flex: auto;
  70 + }
  71 + }
  72 +}
0 73 \ No newline at end of file
... ...
packages/schema/index.vue 0 → 100644
... ... @@ -0,0 +1,649 @@
  1 +<style lang="scss">
  2 +@import './index.scss';
  3 +</style>
  4 +
  5 +<template>
  6 + <div class="z-schema">
  7 + <!-- 头部内容 -->
  8 + <div v-if="$scopedSlots.header || $slots.header" class="z-schema__header">
  9 + <slot name="header" :filterModel="filterModel" v-bind="_slotScope"></slot>
  10 + </div>
  11 + <!-- 筛选组件 -->
  12 + <div v-if="filter" class="z-schema__filter">
  13 + <z-schema-filter
  14 + :value="_filterModel"
  15 + :list="filterList || listMap.filter | noRulesFilter"
  16 + :size="size"
  17 + @input="onFilterInput"
  18 + @search="onSearch"
  19 + :loading="loading"
  20 + v-bind="filterProps"
  21 + :params="_slotScope"
  22 + ></z-schema-filter>
  23 + </div>
  24 + <!-- 按钮区 -->
  25 + <div v-if="action" class="z-schema__action">
  26 + <slot v-if="hadSlot('action')" name="action" v-bind="_slotScope"></slot>
  27 + <template v-else>
  28 + <el-button :size="size" type="primary" @click="openNew">新增</el-button>
  29 + <el-button :size="size" plain :disabled="selection.length === 0" @click="handleDeleteMul(selection)">删除</el-button>
  30 + <slot name="button" v-bind="_slotScope"></slot>
  31 + </template>
  32 + </div>
  33 + <!-- 表格内容 -->
  34 + <div class="z-schema__table">
  35 + <z-schema-table
  36 + ref="table"
  37 + v-model="tableData"
  38 + v-loading="loading"
  39 + :list="tableList || listMap.table"
  40 + :tableProps="{ border: true, 'row-key': 'id', 'highlight-current-row': true, ...tableProps }"
  41 + :size="size"
  42 + @selection-change="onTableSelectionChange"
  43 + @selection="onTableSelection"
  44 + >
  45 + <slot></slot>
  46 + <!-- 表格列内容渲染 -->
  47 + <template v-for="(item, index) in renderList">
  48 + <template v-if="$scopedSlots[`cell-${item.fullKey}`]">
  49 + <el-table-column :slot="item.fullKey" v-bind="item" :prop="item.agentKey || item.key" :key="`table-cell-${index}`">
  50 + <template slot-scope="{ row, column, $index }">
  51 + <slot :name="`cell-${item.fullKey}`" v-bind="{ ...item, ..._slotScope }" :row="row" :value="row[item.key]" :column="column" :index="$index"></slot>
  52 + </template>
  53 + </el-table-column>
  54 + </template>
  55 + <template v-else-if="$scopedSlots[`render-${item.fullKey}`]">
  56 + <el-table-column :slot="item.fullKey" v-bind="item" :prop="item.agentKey || item.key" :key="`table-render-${index}`">
  57 + <template slot-scope="{ row, column, $index }">
  58 + <slot :name="`render-${item.fullKey}`" v-bind="{ ...item, ..._slotScope }" :row="row" :value="row[item.key]" :column="column" :index="$index"></slot>
  59 + </template>
  60 + </el-table-column>
  61 + </template>
  62 + </template>
  63 + <slot slot="column-append" name="column-append" v-bind="_slotScope"></slot>
  64 + <!-- 表格尾追加操作列 -->
  65 + <template #column-end>
  66 + <slot slot="column-end" name="column-end" v-bind="_slotScope"></slot>
  67 + <el-table-column v-if="operation" prop="$operation" label="操作" v-bind="{ width: 100, fixed: 'right', ...operationProps }">
  68 + <div class="z-schema__table-operation" slot-scope="slotScope">
  69 + <slot name="operation-button" v-bind="{ ..._slotScope, slotScope }"></slot>
  70 + <el-button type="text" icon="el-icon-edit" title="编辑" @click="openEdit(slotScope.row)"></el-button>
  71 + <el-popconfirm confirmButtonText="确定" cancelButtonText="取消" title="确定删除吗?" placement="top" @confirm="handleDelete([slotScope.row])">
  72 + <el-button slot="reference" type="text" icon="el-icon-delete" title="删除"></el-button>
  73 + </el-popconfirm>
  74 + <slot name="operation-button-append" v-bind="{ ..._slotScope, slotScope }"></slot>
  75 + </div>
  76 + </el-table-column>
  77 + </template>
  78 + </z-schema-table>
  79 + </div>
  80 + <!-- 底部区域 -->
  81 + <div class="z-schema__footer">
  82 + <div v-if="selection.length > 0" class="selection-info">
  83 + <span>已选中</span>
  84 + <span class="num">{{ selection.length }}</span>
  85 + <span>项</span>
  86 + <el-popconfirm confirmButtonText="确定" cancelButtonText="取消" title="确定清除吗?" placement="top" @confirm="clearSelection">
  87 + <el-button slot="reference" :size="size" type="text">清除</el-button>
  88 + </el-popconfirm>
  89 + </div>
  90 + <!-- 分页器 -->
  91 + <el-pagination
  92 + v-if="pagination"
  93 + @size-change="handleSizeChange"
  94 + @current-change="handleCurrentChange"
  95 + :current-page="currentPage"
  96 + :page-sizes="pageSizes"
  97 + :page-size="pageSize"
  98 + layout="total, sizes, prev, pager, next, jumper"
  99 + :total="total"
  100 + >
  101 + </el-pagination>
  102 + </div>
  103 + <!-- 弹出框 -->
  104 + <el-dialog
  105 + :visible.sync="dialogVisible"
  106 + :title="dialogTitle"
  107 + destroy-on-close
  108 + append-to-body
  109 + :lock-scroll="false"
  110 + :close-on-click-modal="false"
  111 + @closed="onDialogClosed"
  112 + @close="onDialogClose"
  113 + v-bind="_dialogProps"
  114 + >
  115 + <div v-loading="dialogLoading">
  116 + <!-- 自定义弹出框标题 -->
  117 + <slot v-if="hadSlot('dialog-title')" slot="title" name="dialog-title" :dialogType="dialogType" v-bind="_slotScope"></slot>
  118 + <template v-if="dialogRender">
  119 + <!-- 自定义弹出框内容 -->
  120 + <slot v-if="hadSlot(`dialog-${dialogType}`)" :name="`dialog-${dialogType}`" :model="_formModel" v-bind="_slotScope"></slot>
  121 + <template v-else>
  122 + <!-- 内置弹出框新增修改表单 -->
  123 + <template v-if="['new', 'edit'].includes(dialogType)">
  124 + <z-form
  125 + ref="form"
  126 + :value="_formModel"
  127 + :list="formList || listMap.form"
  128 + @input="onFormInput"
  129 + @validate="onFormValidate"
  130 + v-bind="{ span: 12, 'label-width': '110px', ...formProps }"
  131 + :params="_slotScope"
  132 + >
  133 + <!-- 表单自定义插槽 -->
  134 + <template v-for="item in renderList">
  135 + <template v-if="$scopedSlots[`form-${item.fullKey}`]">
  136 + <slot :slot="item.fullKey" :name="`form-${item.fullKey}`" :value="get(_formModel, item.fullKey)" :row="_formModel" :model="_formModel" v-bind="_slotScope"></slot>
  137 + </template>
  138 + </template>
  139 + </z-form>
  140 + </template>
  141 + <!-- 内置弹出框详情表单 -->
  142 + <template v-else>
  143 + <z-form
  144 + ref="form"
  145 + class="z-schema__view"
  146 + :value="_formModel"
  147 + :list="viewList || listMap.form | viewTypeFilter | noRulesFilter"
  148 + v-bind="{ span: 12, 'label-width': '110px', ...viewProps }"
  149 + :params="_slotScope"
  150 + >
  151 + <!-- 详情自定义插槽渲染 -->
  152 + <template v-for="item in renderList">
  153 + <template v-if="$scopedSlots[`view-${item.fullKey}`]">
  154 + <slot :slot="item.fullKey" :name="`view-${item.fullKey}`" :value="get(_formModel, item.fullKey)" :row="_formModel" :model="_formModel" v-bind="_slotScope"></slot>
  155 + </template>
  156 + <template v-else-if="$scopedSlots[`render-${item.fullKey}`]">
  157 + <slot :slot="item.fullKey" :name="`render-${item.fullKey}`" :value="get(_formModel, item.fullKey)" :row="_formModel" :model="_formModel" v-bind="_slotScope"></slot>
  158 + </template>
  159 + </template>
  160 + </z-form>
  161 + </template>
  162 + </template>
  163 + <!-- 内置弹出框新增修改按钮 -->
  164 + <div class="z-schema__dialog-button" v-if="['new', 'edit'].includes(dialogType)">
  165 + <el-button :size="size" type="primary" @click="handleConfirm" :loading="submitting">确定</el-button>
  166 + <el-button :size="size" plain @click="closeDialog">取消</el-button>
  167 + </div>
  168 + </template>
  169 + </div>
  170 + </el-dialog>
  171 + </div>
  172 +</template>
  173 +
  174 +<script>
  175 +import { cloneDeep, get } from '../utils';
  176 +import { clear } from '../utils/param';
  177 +
  178 +let propsMap = {};
  179 +const propsKeys = ['tableProps', 'filterProps', 'formProps', 'viewProps', 'dialogProps', 'operationProps'];
  180 +propsKeys.forEach(key => {
  181 + propsMap[key] = {
  182 + type: Object,
  183 + default: () => ({}),
  184 + };
  185 +});
  186 +const apiKeys = ['searchApi', 'submitApi', 'addApi', 'modifyApi', 'getApi', 'viewApi', 'deleteApi'];
  187 +apiKeys.forEach(key => {
  188 + propsMap[key] = {
  189 + type: Function,
  190 + };
  191 +});
  192 +const blockKeys = ['filter', 'action', 'pagination', 'operation'];
  193 +blockKeys.forEach(key => {
  194 + propsMap[key] = {
  195 + type: Boolean,
  196 + default: true,
  197 + };
  198 +});
  199 +
  200 +export default {
  201 + name: 'Schema',
  202 + props: {
  203 + ...propsMap,
  204 + list: Array,
  205 + filterList: Array,
  206 + tableList: Array,
  207 + formList: Array,
  208 + viewList: Array,
  209 + size: {
  210 + type: String,
  211 + default: 'mini',
  212 + },
  213 + formModel: Object,
  214 + filterModel: Object,
  215 + auto: Boolean,
  216 + realSelection: Boolean,
  217 + url: String, // 请求地址
  218 + http: Function, // http库
  219 + alias: Object, // 别名配置
  220 + },
  221 + data() {
  222 + return {
  223 + filterForm: {},
  224 + editForm: {},
  225 + dialogVisible: false,
  226 + dialogRender: true,
  227 + dialogType: 'none',
  228 + dialogLoading: false,
  229 + dialogTitle: '',
  230 + dialogPropsHack: {},
  231 + currentPage: 1,
  232 + pageSize: 10,
  233 + total: 0,
  234 + pageSizes: [10, 20, 50],
  235 + tableData: [],
  236 + submitting: false,
  237 + loading: false,
  238 + selection: [],
  239 + };
  240 + },
  241 + created() {
  242 + if (this.auto) {
  243 + this.search();
  244 + }
  245 + },
  246 + filters: {
  247 + // 无规则过滤器,过滤掉筛选条件表单中的必填规则等
  248 + noRulesFilter(val = []) {
  249 + let list = cloneDeep(val);
  250 + const clearRules = list => {
  251 + list.forEach(item => {
  252 + if (item.list) {
  253 + clearRules(item.list);
  254 + } else {
  255 + delete item.rules;
  256 + }
  257 + });
  258 + };
  259 + clearRules(list);
  260 + return list;
  261 + },
  262 + // 详情类型过滤器
  263 + viewTypeFilter(val = []) {
  264 + let list = cloneDeep(val);
  265 + const clearRules = list => {
  266 + list.forEach(item => {
  267 + item.type = (h, { model, config }) => h('span', config, model[item.key]);
  268 + });
  269 + };
  270 + clearRules(list);
  271 + return list;
  272 + },
  273 + },
  274 + computed: {
  275 + listMap() {
  276 + // 默认作用域
  277 + const LIST_SPACE = ['filter', 'form', 'table'];
  278 + const array = {
  279 + filter: [], // 筛选
  280 + form: [], // 表单
  281 + table: [], // 表格
  282 + };
  283 + this.list.forEach(item => {
  284 + // 可以在列表中通过include或exclude设置当前配置的作用域
  285 + const { include = LIST_SPACE, exclude = [] } = item;
  286 + // 判断include
  287 + let _inclue = [];
  288 + if (include instanceof String || typeof include === 'string') {
  289 + _inclue = [include];
  290 + } else if (include instanceof Array && typeof include === 'object') {
  291 + _inclue = include;
  292 + }
  293 + // 判断exclude转换为include的情况
  294 + let _exclude_include = [];
  295 + if (exclude instanceof String || typeof exclude === 'string') {
  296 + _exclude_include = LIST_SPACE.filter(item => item !== exclude);
  297 + } else if (exclude instanceof Array && typeof exclude === 'object') {
  298 + _exclude_include = LIST_SPACE.filter(item => !exclude.includes(item));
  299 + }
  300 + // 作用域交集
  301 + const _intersection = _inclue.filter(v => _exclude_include.includes(v));
  302 + // 返回改配置项的作用域
  303 + const _list_space = cloneDeep(_intersection);
  304 + // 将配置项按需分配至各作用域下
  305 + _list_space.forEach(name => {
  306 + array[name].push({ ...item, ...(item[name] || {}) });
  307 + });
  308 + });
  309 + return array;
  310 + },
  311 + renderList() {
  312 + // 深度克隆传入的列表,避免原始值被修改
  313 + const newList = cloneDeep(this.list);
  314 + // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
  315 + const generateFullKey = (list, parentKey) => {
  316 + list.forEach(item => {
  317 + if (item.group && item.list) {
  318 + if (item.group.key) {
  319 + item.fullKey = `${parentKey ? `${parentKey}-${item.group.key}` : item.group.key}`;
  320 + } else {
  321 + item.fullKey = parentKey || item.key;
  322 + }
  323 + generateFullKey(item.list, item.fullKey);
  324 + } else {
  325 + item.fullKey = `${parentKey ? `${parentKey}-${item.key}` : item.key}`;
  326 + }
  327 + });
  328 + };
  329 + // 生成fullKey
  330 + generateFullKey(newList);
  331 + return newList;
  332 + },
  333 + _filterModel() {
  334 + return this.filterModel || this.filterForm || {};
  335 + },
  336 + _formModel() {
  337 + return this.formModel || this.editForm || {};
  338 + },
  339 + _slotScope() {
  340 + return {
  341 + handleSearch: this.search,
  342 + openDialog: this.openDialog,
  343 + closeDialog: this.closeDialog,
  344 + openView: this.openView,
  345 + openEdit: this.openEdit,
  346 + openNew: this.openNew,
  347 + handleDelete: this.handleDelete,
  348 + handleDeleteMul: this.handleDeleteMul,
  349 + size: this.size,
  350 + dialogType: this.dialogType,
  351 + selection: this.selection,
  352 + };
  353 + },
  354 + _alias() {
  355 + const alias = this.alias;
  356 + const zAlias = this.zAlias;
  357 + if (alias && zAlias) {
  358 + return { ...zAlias, ...alias };
  359 + }
  360 + return this.alias || this.zAlias || {};
  361 + },
  362 + _dialogProps() {
  363 + return {
  364 + ...this.dialogProps,
  365 + ...this.dialogPropsHack,
  366 + };
  367 + },
  368 + },
  369 + methods: {
  370 + get,
  371 + // 空Promise
  372 + emptyPromise() {
  373 + return new Promise(resolve => resolve());
  374 + },
  375 + // 设置表格选中行
  376 + toggleRowSelection() {
  377 + this.tableData.forEach(row => {
  378 + if (this.selection.find(item => item.id === row.id)) {
  379 + this.$refs.table && this.$refs.table.toggleRowSelection(row);
  380 + }
  381 + });
  382 + },
  383 + // 表格选中状态
  384 + onTableSelectionChange(selection, type) {
  385 + if (this.realSelection) {
  386 + if (type === 'check') {
  387 + const result = this.selection || [];
  388 + selection.forEach(item => {
  389 + if (!result.find(i => i.id === item.id)) {
  390 + result.push(item);
  391 + }
  392 + });
  393 + this.selection = result;
  394 + } else if (type === 'uncheck') {
  395 + selection.forEach(i => {
  396 + this.selection = this.selection.filter(item => item.id !== i.id);
  397 + });
  398 + }
  399 + }
  400 + },
  401 + // 表格选中
  402 + onTableSelection(selection) {
  403 + if (!this.realSelection) {
  404 + this.selection = selection;
  405 + }
  406 + },
  407 + // 清除表格选中
  408 + clearSelection() {
  409 + this.$refs.table && this.$refs.table.clearSelection();
  410 + this.selection = [];
  411 + },
  412 + // 内置搜索接口
  413 + _searchAPI(params) {
  414 + if (this.url && (this.http || this.zHttp)) {
  415 + const _http = this.http || this.zHttp;
  416 + return _http({ url: `${clear(this.url)}/${this._alias.pageUrl || 'page'}`, params });
  417 + }
  418 + return undefined;
  419 + },
  420 + // 重置查询
  421 + onSearch() {
  422 + this.currentPage = 1;
  423 + this.search();
  424 + },
  425 + // 搜索
  426 + async search() {
  427 + this.loading = true;
  428 + const params = {
  429 + ...this._filterModel,
  430 + currentPage: this.currentPage,
  431 + pageSize: this.pageSize,
  432 + };
  433 + const searchAPI = this.searchApi || this._searchAPI || this.emptyPromise;
  434 + await searchAPI(params)
  435 + .then(res => {
  436 + const response = res || {};
  437 + this.tableData = response[this._alias.list || 'list'] || [];
  438 + this.total = response[this._alias.total || 'total'] || 0;
  439 + this.$nextTick(this.toggleRowSelection);
  440 + })
  441 + .catch(() => {
  442 + this.$message.error('查询失败');
  443 + });
  444 + this.loading = false;
  445 + },
  446 + // 更新筛选model
  447 + onFilterInput(val) {
  448 + this.filterForm = val || {};
  449 + this.$emit('update:filterModel', val || {});
  450 + },
  451 + // 更新表单model
  452 + onFormInput(val) {
  453 + this.editForm = val || {};
  454 + this.$emit('update:formModel', val || {});
  455 + },
  456 + // 内置新增保存接口
  457 + _addAPI(data) {
  458 + if (this.url && (this.http || this.zHttp)) {
  459 + const _http = this.http || this.zHttp;
  460 + return _http({ url: `${clear(this.url)}/${this._alias.addUrl || 'add'}`, method: 'post', data });
  461 + }
  462 + return undefined;
  463 + },
  464 + // 内置修改保存接口
  465 + _modifyAPI(data) {
  466 + if (this.url && (this.http || this.zHttp)) {
  467 + const _http = this.http || this.zHttp;
  468 + return _http({ url: `${clear(this.url)}/${this._alias.modifyUrl || 'modify'}`, method: 'post', data });
  469 + }
  470 + return undefined;
  471 + },
  472 + // 表单提交且通过校验
  473 + async onFormValidate(valid, model) {
  474 + if (valid) {
  475 + this.submitting = true;
  476 + let submitAPI = this.submitApi || this.emptyPromise;
  477 + if (this.dialogType === 'new') {
  478 + submitAPI = this.addApi || this.submitApi || this._addAPI || this.emptyPromise;
  479 + } else if (this.dialogType === 'edit') {
  480 + submitAPI = this.modifyApi || this.submitApi || this._modifyAPI || this.emptyPromise;
  481 + }
  482 + submitAPI(model, { type: this.dialogType })
  483 + .then(() => {
  484 + this.$message.success('保存成功');
  485 + this.closeDialog();
  486 + this.search();
  487 + })
  488 + .catch(() => {
  489 + this.$message.error('保存失败');
  490 + })
  491 + .finally(() => {
  492 + this.submitting = false;
  493 + });
  494 + }
  495 + },
  496 + // 表单按钮确定
  497 + handleConfirm() {
  498 + this.$refs.form && this.$refs.form.validate();
  499 + },
  500 + // 表单按钮取消
  501 + handleCancel() {
  502 + this.closeDialog();
  503 + },
  504 + // 查询是否有某个插槽
  505 + hadSlot(name) {
  506 + return !!this.$slots[name] || !!this.$scopedSlots[name];
  507 + },
  508 + // 打开新增弹出框
  509 + openNew() {
  510 + this.openDialog('new', '新增');
  511 + },
  512 + // 内置查询详情接口
  513 + _getAPI(row) {
  514 + if (this.url && (this.http || this.zHttp)) {
  515 + const _http = this.http || this.zHttp;
  516 + const _getKey = this._alias.getKey || this._alias.primaryKey || 'id';
  517 + const _resultKey = this._alias.result || 'result';
  518 + return _http({ url: `${clear(this.url)}/${this._alias.getUrl || 'queryById'}`, params: { [_getKey]: row[_getKey] } }).then(response => response[_resultKey] || {});
  519 + }
  520 + return undefined;
  521 + },
  522 + // 打开编辑弹出框
  523 + openEdit(row) {
  524 + this.dialogLoading = true;
  525 + this.openDialog('edit', '编辑');
  526 + const getRow = () =>
  527 + new Promise(resolve => {
  528 + resolve(row);
  529 + });
  530 + const getAPI = this.getApi || this._getAPI || getRow;
  531 + getAPI(row)
  532 + .then(result => {
  533 + this.editForm = result;
  534 + this.$emit('update:formModel', result || {});
  535 + })
  536 + .finally(() => {
  537 + this.dialogLoading = false;
  538 + });
  539 + },
  540 + // 内置查询详情接口
  541 + _viewAPI(row) {
  542 + if (this.url && (this.http || this.zHttp)) {
  543 + const _http = this.http || this.zHttp;
  544 + const _viewKey = this._alias.viewKey || this._alias.getKey || this._alias.primaryKey || 'id';
  545 + const _resultKey = this._alias.result || 'result';
  546 + return _http({ url: `${clear(this.url)}/${this._alias.getUrl || 'queryById'}`, params: { [_viewKey]: row[_viewKey] } }).then(response => response[_resultKey] || {});
  547 + }
  548 + return undefined;
  549 + },
  550 + // 打开详情弹出框
  551 + openView(row) {
  552 + this.dialogLoading = true;
  553 + this.openDialog('view', '详情');
  554 + const getRow = () =>
  555 + new Promise(resolve => {
  556 + resolve(row);
  557 + });
  558 + const viewAPI = this.viewApi || this.getApi || this._viewAPI || this._getAPI || getRow;
  559 + viewAPI(row)
  560 + .then(result => {
  561 + this.editForm = result;
  562 + this.$emit('update:formModel', result || {});
  563 + })
  564 + .finally(() => {
  565 + this.dialogLoading = false;
  566 + });
  567 + },
  568 + // 内置删除接口
  569 + _deleteAPI(keys) {
  570 + if (this.url && (this.http || this.zHttp)) {
  571 + const _http = this.http || this.zHttp;
  572 + return _http({ url: `${clear(this.url)}/${this._alias.modifyUrl || 'delete'}`, method: 'post', data: keys });
  573 + }
  574 + return undefined;
  575 + },
  576 + // 删除
  577 + handleDelete(selection) {
  578 + const loading = this.$loading({
  579 + text: '处理中',
  580 + spinner: 'el-icon-loading',
  581 + background: 'rgba(255, 255, 255, 0.5)',
  582 + });
  583 + const deleteAPI = this.deleteApi || this._deleteAPI || this.emptyPromise;
  584 + const _deleteKey = this._alias.deleteKey || this._alias.primaryKey || 'id';
  585 + const keys = selection.map(i => i[_deleteKey]);
  586 + deleteAPI(keys)
  587 + .then(() => {
  588 + this.search();
  589 + this.$message.success('删除成功');
  590 + })
  591 + .finally(() => {
  592 + loading.close();
  593 + });
  594 + },
  595 + // 批量删除
  596 + handleDeleteMul(selection) {
  597 + this.$confirm(`是否删除这 [${selection.length}] 项?`, '提示', {
  598 + confirmButtonText: '确定',
  599 + cancelButtonText: '取消',
  600 + type: 'warning',
  601 + })
  602 + .then(() => {
  603 + this.handleDelete(selection);
  604 + })
  605 + .catch(() => {});
  606 + },
  607 + // 打开弹出框
  608 + openDialog(type, title, config) {
  609 + this.dialogVisible = true;
  610 + this.dialogRender = true;
  611 + this.dialogType = type;
  612 + this.dialogTitle = title;
  613 + this.dialogPropsHack = config || {};
  614 + this.$emit('dialog-change', type);
  615 + },
  616 + // 关闭弹出框
  617 + closeDialog() {
  618 + this.dialogVisible = false;
  619 + },
  620 + // 清空表单
  621 + clearEditForm() {
  622 + this.editForm = {};
  623 + this.$emit('update:formModel', {});
  624 + },
  625 + // 弹出框关闭
  626 + onDialogClose() {
  627 + this.dialogType = 'none';
  628 + this.dialogRender = false;
  629 + this.$emit('dialog-change', 'none');
  630 + },
  631 + // 弹出框关闭动画结束
  632 + onDialogClosed() {
  633 + this.clearEditForm();
  634 + this.dialogPropsHack = {};
  635 + },
  636 + // 分页-每页个数
  637 + handleSizeChange(val) {
  638 + this.pageSize = val;
  639 + this.currentPage = 1;
  640 + this.$nextTick(this.search);
  641 + },
  642 + // 分页-当前页数
  643 + handleCurrentChange(val) {
  644 + this.currentPage = val;
  645 + this.$nextTick(this.search);
  646 + },
  647 + },
  648 +};
  649 +</script>
... ...
packages/scheme-filter/index.vue
... ... @@ -1,129 +0,0 @@
1   -<template>
2   - <z-scheme-form
3   - v-model="model"
4   - class="z-scheme-filter"
5   - :list="formattedList"
6   - :span="span"
7   - :labelWidth="labelWidth"
8   - :colClass="colVisibleRender"
9   - :size="size"
10   - :formProps="formProps"
11   - :params="params"
12   - >
13   - <template v-for="key in slotKeys">
14   - <template v-if="key === 'operation'">
15   - <slot :name="key" :slot="key" v-bind="{ size, handleSearch, handleReset, handleCollapse, showCollapsed, collapsed, loading }"></slot>
16   - </template>
17   - <slot v-else :name="key" :slot="key"></slot>
18   - </template>
19   - <div v-if="!slotKeys.includes('operation')" slot="operation" class="z-scheme-filter__button-group">
20   - <el-button-group :size="size">
21   - <el-button type="primary" @click="handleSearch" :loading="loading" icon="el-icon-search"><span>查询</span></el-button>
22   - <el-button @click="handleReset"><span>重置</span></el-button>
23   - <el-button v-if="showCollapsed" @click="handleCollapse">
24   - <span>{{ collapsed ? '展开' : '收起' }}</span>
25   - </el-button>
26   - </el-button-group>
27   - </div>
28   - </z-scheme-form>
29   -</template>
30   -
31   -<script>
32   -export default {
33   - name: 'SchemeFilter',
34   - props: {
35   - value: Object,
36   - list: Array,
37   - labelWidth: {
38   - type: String,
39   - default: '110px',
40   - },
41   - size: {
42   - type: String,
43   - default: 'small',
44   - },
45   - span: {
46   - type: Number,
47   - default: 6,
48   - },
49   - collapsedSpan: {
50   - type: Number,
51   - default: 6,
52   - },
53   - uncollapsedSpan: {
54   - type: Number,
55   - default: 24,
56   - },
57   - visibleNum: {
58   - type: Number,
59   - default: 3,
60   - },
61   - loading: Boolean,
62   - formProps: {
63   - type: Object,
64   - default: () => ({}),
65   - },
66   - params: Object,
67   - },
68   - data() {
69   - return {
70   - collapsed: true,
71   - model: this.value || {},
72   - };
73   - },
74   - watch: {
75   - value(val = {}) {
76   - this.model = val;
77   - },
78   - model(val) {
79   - this.$emit('input', val);
80   - },
81   - },
82   - computed: {
83   - formattedList() {
84   - return [...this.list, { key: 'operation', label: '', labelWidth: '0px', span: this.collapsed ? this.collapsedSpan : this.uncollapsedSpan }];
85   - },
86   - showCollapsed() {
87   - const { list, visibleNum } = this;
88   - return list.length > visibleNum;
89   - },
90   - slotKeys() {
91   - return Object.keys(this.$scopedSlots);
92   - },
93   - },
94   - methods: {
95   - // 渲染列表项class
96   - colVisibleRender(item, index) {
97   - if (this.collapsed) {
98   - const visibleNumber = this.visibleNum ? this.visibleNum - 1 : 2;
99   - return index > visibleNumber && index < this.list.length ? 'z-scheme-filter__item hidden' : 'z-scheme-filter__item';
100   - }
101   - return 'z-scheme-filter__item';
102   - },
103   - // 搜索
104   - handleSearch() {
105   - this.$emit('search', this.model);
106   - },
107   - // 重置
108   - handleReset() {
109   - this.model = {};
110   - this.$emit('reset');
111   - },
112   - // 折叠
113   - handleCollapse() {
114   - this.collapsed = !this.collapsed;
115   - },
116   - },
117   -};
118   -</script>
119   -
120   -<style>
121   -.z-scheme-filter__item.hidden {
122   - display: none;
123   -}
124   -.z-scheme-filter__button-group {
125   - width: 100%;
126   - box-sizing: border-box;
127   - text-align: right;
128   -}
129   -</style>
packages/scheme-form/dynamic-render.js
... ... @@ -1,6 +0,0 @@
1   -export default {
2   - functional: true,
3   - render(h, context) {
4   - return context.props.render;
5   - },
6   -};
packages/scheme-form/index.vue
... ... @@ -1,216 +0,0 @@
1   -<style lang="scss">
2   -.z-scheme-form {
3   - &__flex-wrap {
4   - display: flex;
5   - flex-wrap: wrap;
6   - width: 100%;
7   - }
8   - &__group-title {
9   - font-weight: bold;
10   - padding: 15px 5px;
11   - border-bottom: 1px solid #d9d9d9;
12   - margin-bottom: 15px;
13   - }
14   - &__group-content {
15   - margin: 15px 0px;
16   - }
17   - &__footer {
18   - padding-top: 10px;
19   - display: flex;
20   - align-items: center;
21   - justify-content: center;
22   - }
23   -}
24   -</style>
25   -
26   -<template>
27   - <el-form
28   - ref="form"
29   - class="z-scheme-form"
30   - :size="size"
31   - :class="formClass"
32   - :model="formModel"
33   - :label-width="labelWidth"
34   - :label-position="labelPosition || labelWidth ? 'right' : 'top'"
35   - v-bind="formProps"
36   - >
37   - <scheme-form-render
38   - :title-class="titleClass"
39   - :content-class="contentClass"
40   - :item-class="itemClass"
41   - :col-class="colClass"
42   - :group-class="groupClass"
43   - :list="formList"
44   - :value="model"
45   - :model="model"
46   - :span="span"
47   - :type="type"
48   - :params="params"
49   - @item-change="onItemChange"
50   - @form-item-change="onFormItemChange"
51   - @item-update="onItemUpdate"
52   - >
53   - <slot v-for="key in slotKeys" :name="key" :slot="key"></slot>
54   - </scheme-form-render>
55   - <div v-if="$scopedSlots.footer" class="z-scheme-form__footer">
56   - <slot name="footer" :size="size" :validate="validate" :reset="reset" :model="model"></slot>
57   - </div>
58   - </el-form>
59   -</template>
60   -
61   -<script>
62   -import SchemeFormRender from './scheme-form-render';
63   -import { cloneDeep, set } from '../utils';
64   -
65   -export default {
66   - name: 'SchemeForm',
67   - components: { SchemeFormRender },
68   - props: {
69   - value: Object,
70   - list: Array,
71   - formClass: String,
72   - titleClass: String,
73   - contentClass: String,
74   - itemClass: String,
75   - colClass: [String, Function],
76   - groupClass: String,
77   - labelWidth: String,
78   - labelPosition: String,
79   - type: String,
80   - size: {
81   - type: String,
82   - default: 'small',
83   - },
84   - span: {
85   - type: Number,
86   - default: 24,
87   - },
88   - formProps: {
89   - type: Object,
90   - default: () => ({}),
91   - },
92   - params: Object,
93   - },
94   - data() {
95   - return {
96   - model: {},
97   - formModel: {},
98   - formList: [],
99   - };
100   - },
101   - computed: {
102   - slotKeys() {
103   - return Object.keys(this.$scopedSlots);
104   - },
105   - },
106   - watch: {
107   - value: {
108   - handler(val = {}) {
109   - this.model = val;
110   - this.setFormModel(val);
111   - },
112   - immediate: true,
113   - },
114   - list: {
115   - handler(val) {
116   - // 深度克隆传入的列表,避免原始值被修改
117   - const newList = cloneDeep(this.list);
118   - // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
119   - const generateFullKey = (list, parentKey) => {
120   - list.forEach(item => {
121   - if (item.group && item.list) {
122   - if (item.group.key) {
123   - item.fullKey = `${parentKey ? `${parentKey}-${item.group.key}` : item.group.key}`;
124   - } else {
125   - item.fullKey = parentKey || item.key;
126   - }
127   - generateFullKey(item.list, item.fullKey);
128   - } else {
129   - item.fullKey = `${parentKey ? `${parentKey}-${item.key}` : item.key}`;
130   - }
131   - });
132   - };
133   - generateFullKey(newList);
134   - this.formList = newList;
135   - },
136   - immediate: true,
137   - },
138   - },
139   - methods: {
140   - handleInput(value) {
141   - console.log(value);
142   - },
143   - /**
144   - * @description 表单项值变化
145   - * @param {Object} item 表单项值对象
146   - */
147   - onItemChange(item) {
148   - this.$emit('input', { ...this.model, ...item });
149   - },
150   - /**
151   - * @description 表单相校验值变化
152   - * @param {Object} item 表单项校验值对象
153   - */
154   - onFormItemChange(item) {
155   - this.formModel = { ...this.formModel, ...item };
156   - },
157   - /**
158   - * @description 校验表单
159   - */
160   - validate(cb) {
161   - return new Promise(resolve => {
162   - this.$refs.form.validate(valid => {
163   - cb && cb(valid);
164   - this.$emit('validate', valid, this.model);
165   - return resolve(valid);
166   - });
167   - });
168   - },
169   - /**
170   - * @description 重置表单
171   - */
172   - reset() {
173   - this.$refs.form.clearValidate();
174   - this.$emit('reset');
175   - },
176   - /**
177   - * @description 根据表单值设置表单校验值
178   - * @param {Object} value 表单值
179   - */
180   - setFormModel(value) {
181   - let formModel = {};
182   - // 递归深度解析表单值,将表单值扁平化为一层的对象并设置为表单校验值对象
183   - const setFormModelValue = (list, parentKey) => {
184   - list.forEach(item => {
185   - item.fullKey = `${parentKey ? `${parentKey}-${item.key}` : item.key}`;
186   - if (item.value instanceof Object) {
187   - setFormModelValue(
188   - Object.keys(item.value).map(key => ({ key, value: item.value[key] })),
189   - item.fullKey,
190   - );
191   - } else {
192   - formModel[item.fullKey] = item.value;
193   - }
194   - });
195   - };
196   - setFormModelValue(Object.keys(value).map(key => ({ key, value: value[key] })));
197   - this.formModel = formModel;
198   - },
199   - /**
200   - * @description 手动更新某一表单项的值
201   - * @param {Object} param 需要更新的参数对象或者对象数组 { name => 表单项key,可嵌套; value => 更新的值 }
202   - * @example { name: 'a.b.c', value: 123 }
203   - * @example { name: 'd.0.e', value: ['f'] }
204   - */
205   - onItemUpdate(param) {
206   - this.$nextTick(() => {
207   - const newModel = cloneDeep(this.model);
208   - Object.entries(param).forEach(entry => {
209   - set(newModel, entry[0], entry[1]);
210   - });
211   - this.$emit('input', newModel);
212   - });
213   - },
214   - },
215   -};
216   -</script>
packages/scheme-form/scheme-form-render.vue
... ... @@ -1,241 +0,0 @@
1   -<template>
2   - <!-- 在row上使用flex,防止表单组件大小不一导致错位 -->
3   - <component :is="rowComponent" class="z-scheme-form__flex-wrap">
4   - <template v-for="(item, index) in list">
5   - <!-- 表单项有设置分组时 -->
6   - <component
7   - :is="colComponent"
8   - v-if="item.group && item.list"
9   - :key="index"
10   - :span="type === 'div' ? undefined : item.group.span || 24"
11   - :style="{ width: type === 'div' ? '100%' : undefined }"
12   - :class="colClassRender(item, index, colClass)"
13   - >
14   - <component :is="rowComponent" class="z-scheme-form__flex-wrap" :class="groupClass || 'z-scheme-form__group'">
15   - <!-- 表单分组标题 -->
16   - <component :is="rowComponent" :class="titleClass || 'z-scheme-form__group-title'" v-if="item.group.title" style="width: 100%;">
17   - {{ item.group.title || item.group }}
18   - </component>
19   - <!-- 递归本组件 -->
20   - <scheme-form-render
21   - :title-class="titleClass"
22   - :item-class="itemClass"
23   - :content-class="contentClass"
24   - :group-class="groupClass"
25   - :class="contentClass || 'z-scheme-form__group-content'"
26   - :list="item.list"
27   - :value="value"
28   - :model="itemKey ? model[itemKey] || {} : model"
29   - :itemKey="item.group.key"
30   - :type="type"
31   - @item-change="onItemChange"
32   - @form-item-change="onFormItemChange"
33   - @item-update="onItemUpdate"
34   - :span="type === 'div' ? undefined : span * (24 / (item.group.span || 24))"
35   - ></scheme-form-render>
36   - </component>
37   - </component>
38   - <!-- 正常无分组表单项 -->
39   - <template v-else>
40   - <component
41   - :is="colComponent"
42   - v-if="bindItemVisible(item, 'visible')"
43   - v-show="bindItemVisible(item, 'show')"
44   - :span="type === 'div' ? undefined : item.span || span"
45   - :key="index"
46   - :style="{ width: type === 'div' && item.style && item.style.width.includes('%') ? item.style.width : undefined, paddingRight: '10px' }"
47   - :class="colClassRender(item, index, colClass)"
48   - >
49   - <el-form-item :label="item.label" :label-width="item.labelWidth" :prop="item.fullKey" :rules="item | bindItemRulesFilter(model)" :class="itemClass || 'z-scheme-form__item'">
50   - <slot v-if="$scopedSlots[item.fullKey]" :name="item.fullKey" :value="itemValue(item)" :model1="value"></slot>
51   - <template v-else>
52   - <!-- 自定义组件 -->
53   - <dynamic-render
54   - v-if="typeof item.type === 'function'"
55   - :render="
56   - item.type($createElement, {
57   - model: value,
58   - config: {
59   - props: { ...propsFormatter(item.props), value: itemValue(item) },
60   - style: item.style || { width: '100%' },
61   - on: {
62   - ...bindItemEvent(item),
63   - input: v => onInput({ value: v, item }),
64   - },
65   - },
66   - })
67   - "
68   - ></dynamic-render>
69   - <component
70   - v-else
71   - :is="item.type"
72   - :value="itemValue(item)"
73   - @input="v => onInput({ value: v, item })"
74   - v-on="bindItemEvent(item)"
75   - v-bind="propsFormatter(item.props)"
76   - :style="item.style || { width: '100%' }"
77   - ></component>
78   - </template>
79   - </el-form-item>
80   - </component>
81   - </template>
82   - </template>
83   - </component>
84   -</template>
85   -
86   -<script>
87   -import DynamicRender from './dynamic-render';
88   -
89   -export default {
90   - name: 'SchemeFormRender',
91   - components: { DynamicRender },
92   - props: {
93   - list: Array,
94   - model: Object,
95   - value: Object,
96   - itemKey: String,
97   - titleClass: String,
98   - contentClass: String,
99   - itemClass: String,
100   - colClass: [String, Function],
101   - groupClass: String,
102   - type: String,
103   - span: Number,
104   - params: Object,
105   - },
106   - computed: {
107   - rowComponent() {
108   - return this.type === 'div' ? 'div' : 'el-row';
109   - },
110   - colComponent() {
111   - return this.type === 'div' ? 'div' : 'el-col';
112   - },
113   - },
114   - filters: {
115   - /**
116   - * @description 绑定表单项规则
117   - * @param {Object} item 表单项配置
118   - * @returns {Function} 事件函数
119   - */
120   - bindItemRulesFilter(item = {}, model) {
121   - if (item.rules) {
122   - if (typeof item.rules === 'function') {
123   - return item.rules(model);
124   - } else {
125   - return item.rules;
126   - }
127   - } else {
128   - return undefined;
129   - }
130   - },
131   - },
132   - methods: {
133   - /**
134   - * @description 渲染col class
135   - * @param {Object} item 表单项配置
136   - * @param {Object} index 表单项渲染下标
137   - * @param {Object} colClass 表单项配置
138   - * @return {String} col class
139   - */
140   - colClassRender(item, index, colClass) {
141   - if (colClass instanceof Function) {
142   - return colClass(item, index);
143   - } else {
144   - return colClass;
145   - }
146   - },
147   - /**
148   - * @description 根据表单项的key查询该值
149   - * @param {Object} item 表单项配置
150   - * @returns {Any} 返回值
151   - */
152   - itemValue(item) {
153   - if (this.itemKey) {
154   - // 如果存在itemKey,即当前项位于嵌套分组内,查询分组名下对应key的值
155   - const groupItem = this.model[this.itemKey] || {};
156   - return groupItem[item.key];
157   - } else {
158   - // 否则即意味着不在分组内,直接查询model下对应key的值
159   - return this.model[item.key];
160   - }
161   - },
162   - /**
163   - * @description 组件有值输入时的事件
164   - * @param {Object} data { value => 组件值; item => 表单项配置 }
165   - */
166   - onInput({ value, item }) {
167   - if (this.itemKey) {
168   - this.$emit('item-change', { [this.itemKey]: { ...this.model[this.itemKey], [item.key]: value } });
169   - } else {
170   - this.$emit('item-change', { [item.key]: value });
171   - }
172   - this.$emit('form-item-change', { [item.fullKey]: value });
173   - },
174   - /**
175   - * @description 当表单项有改动时的事件
176   - * @param {Any} 表单项值
177   - */
178   - onItemChange(value) {
179   - if (this.itemKey) {
180   - this.$emit('item-change', { [this.itemKey]: { ...this.model[this.itemKey], ...value } });
181   - } else {
182   - this.$emit('item-change', value);
183   - }
184   - },
185   - /**
186   - * @description 当表单项校验值有改动时的事件
187   - * @param {Any} 表单项校验值
188   - */
189   - onFormItemChange(value) {
190   - this.$emit('form-item-change', value);
191   - },
192   - /**
193   - * @description 当表单项有手动更新时的事件
194   - * @param {Any} 表单项值
195   - */
196   - onItemUpdate(value) {
197   - this.$emit('item-update', value);
198   - },
199   - /**
200   - * @description 绑定表单项事件
201   - * @param {Object} item 表单项配置
202   - * @returns {Function} 事件函数
203   - */
204   - bindItemEvent(item) {
205   - if (item.on) {
206   - if (typeof item.on === 'function') {
207   - return item.on({ model: this.value, update: e => this.$emit('item-update', e) });
208   - } else {
209   - return item.on;
210   - }
211   - } else {
212   - return undefined;
213   - }
214   - },
215   - /**
216   - * @description 绑定表单项显示状态
217   - * @param {Object} item 表单项配置
218   - * @param {String} type Vue显示类型,可选值:visible、show
219   - * @returns {Boolean} 显示状态
220   - */
221   - bindItemVisible(item, type) {
222   - const visible = item[type];
223   - if (typeof visible === 'function') {
224   - return visible(this.model, this.params || {});
225   - }
226   - return item[type] !== false;
227   - },
228   - /**
229   - * @description 格式化props属性
230   - * @param {Object|Function} props 属性或属性对象
231   - * @returns {Object} 格式化的属性
232   - */
233   - propsFormatter(props) {
234   - if (typeof props === 'function') {
235   - return props(this.model, this.params || {});
236   - }
237   - return props || {};
238   - },
239   - },
240   -};
241   -</script>
packages/scheme-table/cell-editable.vue
... ... @@ -1,90 +0,0 @@
1   -<style>
2   -.z-table-cell-editable {
3   - display: flex;
4   - align-items: center;
5   -}
6   -.z-table-cell-editable .z-table-cell-editable__icon {
7   - cursor: pointer;
8   - vertical-align: middle;
9   - padding-left: 5px;
10   - fill: #2f54eb;
11   -}
12   -</style>
13   -
14   -<template>
15   - <div>
16   - <!-- 可编辑状态 -->
17   - <div v-if="editable" class="z-table-cell-editable">
18   - <component :value="$_get(row, item.fullKey)" :is="item.type" v-bind="item.props" :style="item.style" size="mini" @input="onInput"></component>
19   - <span v-if="btnVisible !== false" @click="onConfirm">
20   - <svg class="z-table-cell-editable__icon" viewBox="0 0 1024 1024" width="24" height="24">
21   - <path d="M235.946667 472.938667l-45.226667 45.312 210.090667 209.514666 432.362666-427.690666-45.013333-45.482667-387.157333 382.976z"></path>
22   - </svg>
23   - </span>
24   - </div>
25   - <!-- 渲染状态 -->
26   - <template v-else>
27   - <!-- 渲染插槽 -->
28   - <template v-if="$scopedSlots['default']">
29   - <slot></slot>
30   - </template>
31   - <!-- 默认渲染 -->
32   - <template v-else>
33   - {{ $_get(row, item.agentKey || item.fullKey) }}
34   - </template>
35   - </template>
36   - </div>
37   -</template>
38   -
39   -<script>
40   -import { get } from '../utils';
41   -
42   -export default {
43   - name: 'cellEditable',
44   - props: {
45   - row: Object,
46   - item: Object,
47   - editable: Boolean,
48   - btnVisible: Boolean,
49   - },
50   - data() {
51   - return {
52   - oldValue: undefined,
53   - value: undefined,
54   - confirm: false,
55   - };
56   - },
57   - watch: {
58   - editable(val) {
59   - if (val) {
60   - this.confirm = false;
61   - this.oldValue = get(this.row, this.item.agentKey || this.item.fullKey);
62   - this.value = get(this.row, this.item.agentKey || this.item.fullKey);
63   - } else {
64   - if (!this.confirm) {
65   - this.$emit('cancel', this.emitData);
66   - }
67   - }
68   - },
69   - },
70   - computed: {
71   - emitData() {
72   - const { oldValue, value, row, item } = this;
73   - return { oldValue, value, row, key: item.key, fullKey: item.fullKey };
74   - },
75   - },
76   - methods: {
77   - $_get: get,
78   - // 组件触发input事件
79   - onInput(value) {
80   - this.value = value;
81   - this.$emit('update', this.emitData);
82   - },
83   - // 当点击确认
84   - onConfirm() {
85   - this.confirm = true;
86   - this.$emit('done', this.emitData);
87   - },
88   - },
89   -};
90   -</script>
packages/scheme-table/cell-value-render.js
... ... @@ -1,20 +0,0 @@
1   -import { get } from '../utils';
2   -
3   -export default {
4   - props: { row: Object, column: Object, index: [Number, String], item: Object },
5   - render(h) {
6   - const { row, column, index, item } = this;
7   - if (typeof item.render === 'function') {
8   - return item.render(h, { row, value: get(row, item.fullKey), $index: index, column });
9   - } else {
10   - if (item.render.children instanceof Function) {
11   - return h(
12   - item.render.type,
13   - { props: item.render.props, attrs: item.render.props, style: item.render.style },
14   - item.render.children({ row, value: get(row, item.fullKey), $index: index, column }),
15   - );
16   - }
17   - return h(item.render.type, { props: item.render.props, attrs: item.render.props, style: item.render.style }, item.render.children || get(row, item.fullKey));
18   - }
19   - },
20   -};
packages/scheme-table/editable.vue
... ... @@ -1,319 +0,0 @@
1   -<style>
2   -.z-table {
3   - width: 100%;
4   -}
5   -</style>
6   -
7   -<template>
8   - <div @keyup.enter="tableEditCell = {}">
9   - <div style="padding-bottom: 10px;">
10   - <el-button @click="handleNew" size="mini" v-if="!rowEdit">新增</el-button>
11   - <el-button @click="handleEdit" size="mini" v-if="!rowEditable && tableSelection.length > 0">编辑</el-button>
12   - <el-button @click="handleSave" size="mini" type="primary" v-if="rowEditable">完成</el-button>
13   - <el-button @click="handleCancel" size="mini" type="plain" v-if="rowNew && !rowEdit">取消</el-button>
14   - <el-button @click="handleDelete" size="mini" type="danger" v-if="tableSelection.length > 0">删除</el-button>
15   - </div>
16   - <el-table
17   - class="z-table"
18   - ref="table"
19   - :data="tableData"
20   - v-bind="{ size: 'small', ...tableProps }"
21   - v-on="tableEvents"
22   - @cell-dblclick="onCellDblclick"
23   - @selection-change="onSelectionChange"
24   - >
25   - <el-table-column type="selection" :selectable="r => (rowNew ? r.$new : true)"></el-table-column>
26   - <!-- 默认表格插槽 -->
27   - <slot name="default"></slot>
28   - <!-- 根据配置列表生成表格列 -->
29   - <template v-if="tableList && tableList.length > 0">
30   - <template v-for="(item, index) in tableList">
31   - <template v-if="bindItemVisible(item.visible)">
32   - <!-- 如果有表格列具名插槽 -->
33   - <slot v-if="$scopedSlots[item.keyPath.join('-')]" :name="item.keyPath.join('-')" v-bind="item"></slot>
34   - <!-- 默认表格列渲染 -->
35   - <el-table-column v-else v-bind="item" :prop="item.fullKey || item.key" :key="index" :min-width="minWidth || item.minWidth || item['min-width'] || (editable ? 140 : undefined)">
36   - <template #default="{ row, column, $index }">
37   - <cell-editable
38   - :editable="row.$editable || (editable && tableEditCell.index === row.$index && tableEditCell.key === (item.agentKey || item.fullKey || item.key))"
39   - :row="row"
40   - :item="item"
41   - @update="onCellUpdate"
42   - @done="onCellUpdateDone"
43   - @cancel="onCellUpdateCancel"
44   - :btn-visible="!row.$editable"
45   - >
46   - <!-- 如果有表格列值渲染具名插槽 -->
47   - <slot
48   - v-if="$scopedSlots[`value-${item.keyPath.join('-')}`]"
49   - :name="`value-${item.keyPath.join('-')}`"
50   - v-bind="item"
51   - :row="row"
52   - :value="$_get(row, item.fullKey)"
53   - :column="column"
54   - :index="$index"
55   - ></slot>
56   - <!-- 如果表格列配置了值渲染参数 -->
57   - <cell-value-render v-else-if="item.render" :row="row" :column="column" :index="$index" :item="item" />
58   - </cell-editable>
59   - </template>
60   - </el-table-column>
61   - </template>
62   - </template>
63   - </template>
64   - <!-- 已生成列表后的追加列插槽 -->
65   - <slot name="column-append"></slot>
66   - <!-- 末尾列插槽 -->
67   - <slot name="column-end"></slot>
68   - </el-table>
69   - </div>
70   -</template>
71   -
72   -<script>
73   -import { cloneDeep, get, set } from '../utils';
74   -import CellEditable from './cell-editable';
75   -import CellValueRender from './cell-value-render';
76   -
77   -const listHasKey = (list, name) => {
78   - let result = false;
79   - for (const row of list) {
80   - if (row[name]) {
81   - result = true;
82   - break;
83   - }
84   - }
85   - return result;
86   -};
87   -
88   -export default {
89   - name: 'TableNew',
90   - components: {
91   - CellEditable,
92   - CellValueRender,
93   - },
94   - props: {
95   - // 用于实例化本组件绑定v-model的值
96   - value: Array,
97   - // 配置列表
98   - list: {
99   - type: Array,
100   - required: true,
101   - },
102   - // 表格参数
103   - tableProps: {
104   - type: Object,
105   - default() {
106   - return {};
107   - },
108   - },
109   - // 表格事件
110   - tableEvents: Object,
111   - // 是否可编辑
112   - editable: Boolean,
113   - // 列宽
114   - minWidth: Number,
115   - },
116   - data() {
117   - return {
118   - tableList: [], // 表格配置列表
119   - tableData: [], // 表格数据
120   - tableRowTemplate: { $editable: true }, // 行数据模板
121   - tableEditCell: {}, // 正在编辑的单元格
122   - tableSelection: [], // 表格已选中
123   - };
124   - },
125   - computed: {
126   - // 表格实体
127   - instance: {
128   - get() {
129   - return this.$refs.table;
130   - },
131   - },
132   - // 行编辑状态
133   - rowEditable() {
134   - return listHasKey(this.tableData, '$editable');
135   - },
136   - // 存在新行
137   - rowNew() {
138   - return listHasKey(this.tableData, '$new');
139   - },
140   - // 存在编辑行
141   - rowEdit() {
142   - return listHasKey(this.tableData, '$edit');
143   - },
144   - },
145   - watch: {
146   - value: {
147   - handler(val = []) {
148   - this.tableData = val.map((o, i) => {
149   - return { ...o, $index: i, $editable: undefined, $new: undefined };
150   - });
151   - },
152   - immediate: true,
153   - },
154   - list: {
155   - handler(val) {
156   - // 深度克隆传入的列表,避免原始值被修改
157   - const newList = cloneDeep(this.list);
158   - // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
159   - const generateFullKey = (list, parentKey) => {
160   - list.forEach(item => {
161   - if (item.group && item.list) {
162   - if (item.group.key) {
163   - item.fullKey = `${parentKey ? `${parentKey}.${item.group.key}` : item.group.key}`;
164   - } else {
165   - item.fullKey = parentKey || item.key;
166   - }
167   - generateFullKey(item.list, item.fullKey);
168   - } else {
169   - item.fullKey = `${parentKey ? `${parentKey}.${item.key}` : item.key}`;
170   - }
171   - });
172   - };
173   - // 生成fullKey
174   - generateFullKey(newList);
175   - // 创建输出列表
176   - const result = [];
177   - const tableRowTemplate = {};
178   - // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
179   - const generateFlatList = list => {
180   - list.forEach(item => {
181   - if (item.group && item.list) {
182   - generateFlatList(item.list);
183   - } else if (!item.group && !item.list) {
184   - result.push({ ...item, keyPath: item.fullKey.split('.') });
185   - set(tableRowTemplate, item.fullKey, undefined);
186   - tableRowTemplate.$editable = true;
187   - }
188   - });
189   - };
190   - generateFlatList(newList);
191   - this.tableList = result;
192   - this.tableRowTemplate = tableRowTemplate;
193   - },
194   - immediate: true,
195   - },
196   - },
197   - methods: {
198   - $_get: get,
199   - // 处理新增逻辑
200   - handleNew() {
201   - const tableData = cloneDeep(this.tableData);
202   - tableData.push({ ...this.tableRowTemplate, $new: true });
203   - this.tableEditCell = {};
204   - this.tableData = tableData.map((o, i) => ({ ...o, $index: i }));
205   - },
206   - // 处理编辑逻辑
207   - handleEdit() {
208   - const tableData = cloneDeep(this.tableData);
209   - const selectionIndexArr = this.tableSelection.map(i => i.$index);
210   - tableData.forEach((r, i) => {
211   - if (selectionIndexArr.includes(r.$index)) {
212   - tableData[i].$editable = true;
213   - tableData[i].$edit = true;
214   - tableData[i].$new = true;
215   - }
216   - });
217   - this.tableEditCell = {};
218   - this.tableData = tableData.map((o, i) => ({ ...o, $index: i }));
219   - },
220   - // 处理保存逻辑
221   - handleSave() {
222   - const tableData = cloneDeep(this.tableData);
223   - tableData.forEach((r, i) => {
224   - delete tableData[i].$editable;
225   - });
226   - this.tableEditCell = {};
227   - this.tableData = tableData.map((o, i) => ({ ...o, $index: i }));
228   - this.$nextTick(() => {
229   - this.emitTableData(this.tableData);
230   - this.$emit(
231   - this.rowEdit ? 'row-edit' : 'row-new',
232   - this.tableData
233   - .filter(d => d.$new)
234   - .map(d => {
235   - delete d.$new;
236   - return d;
237   - }),
238   - );
239   - });
240   - },
241   - // 处理取消逻辑
242   - handleCancel() {
243   - let tableData = cloneDeep(this.tableData);
244   - tableData = tableData.filter(row => !row.$new);
245   - this.emitTableData(tableData);
246   - },
247   - // 处理删除逻辑
248   - handleDelete() {
249   - const tableData = cloneDeep(this.tableData);
250   - const selectionIndexArr = this.tableSelection.map(i => i.$index);
251   - if (!this.rowNew && !this.rowEdit) {
252   - this.$emit('row-delete', this.tableSelection);
253   - }
254   - this.tableEditCell = {};
255   - this.tableData = tableData.filter((d, i) => !selectionIndexArr.includes(i)).map((o, i) => ({ ...o, $index: i }));
256   - },
257   - // 更新表格数据
258   - emitTableData(tableData) {
259   - if (this.$listeners['input']) {
260   - this.$emit(
261   - 'input',
262   - tableData.map((o, i) => {
263   - return { ...o, $index: i, $editable: undefined, $new: undefined, $edit: undefined };
264   - }),
265   - );
266   - } else {
267   - this.tableData = tableData;
268   - }
269   - },
270   - // 绑定表格列显示隐藏状态
271   - bindItemVisible(visible = true) {
272   - let result = visible;
273   - if (typeof visible === 'function') {
274   - result = visible(this.tableData);
275   - }
276   - return result;
277   - },
278   - // 双击单元格
279   - onCellDblclick(row, column, cell, event) {
280   - if (this.editable && !this.rowNew) {
281   - this.tableEditCell = { index: row.$index, key: column.property };
282   - }
283   - },
284   - // 编辑表格更新值
285   - onCellUpdate({ oldValue, value, row, key, fullKey }) {
286   - this.setCellValue({ value, row, key, fullKey });
287   - },
288   - // 编辑表格确认
289   - onCellUpdateDone({ oldValue, value, row, key, fullKey }) {
290   - this.tableEditCell = {};
291   - if (this.$listeners['cell-edit']) {
292   - const { tableData } = this.setCellValue({ value, row, key, fullKey });
293   - this.emitTableData(tableData);
294   - this.$emit('cell-edit', { row, key, fullKey, value });
295   - }
296   - },
297   - // 表格取消编辑
298   - onCellUpdateCancel({ oldValue, value, row, key, fullKey }) {
299   - if (row.$new !== true) {
300   - this.setCellValue({ value: oldValue, row, key, fullKey });
301   - }
302   - },
303   - // 设置表格值
304   - setCellValue({ value, row, key, fullKey }) {
305   - const tableData = cloneDeep(this.tableData);
306   - const tableRow = tableData[row.$index];
307   - set(tableRow, fullKey, value);
308   - tableData[row.$index] = tableRow;
309   - this.$set(this.tableData, row.$index, tableRow);
310   - return { tableData, tableRow };
311   - },
312   - // 表格选中
313   - onSelectionChange(selection) {
314   - this.tableSelection = selection;
315   - this.$emit('selection', selection);
316   - },
317   - },
318   -};
319   -</script>
packages/scheme-table/index.vue
... ... @@ -1,197 +0,0 @@
1   -<style>
2   -.z-scheme-table {
3   - width: 100%;
4   -}
5   -</style>
6   -
7   -<template>
8   - <el-table
9   - class="z-scheme-table"
10   - ref="table"
11   - :data="tableData"
12   - v-bind="{ size, ...tableProps }"
13   - v-on="tableEvents"
14   - @select="onSelect"
15   - @select-all="onSelectAll"
16   - @selection-change="onSelectionChange"
17   - >
18   - <!-- 默认表格插槽 -->
19   - <slot name="default"></slot>
20   - <!-- 根据配置列表生成表格列 -->
21   - <template v-if="tableList && tableList.length > 0">
22   - <template v-for="(item, index) in tableList">
23   - <template v-if="bindItemVisible(item.visible)">
24   - <!-- 如果有表格列具名插槽 -->
25   - <slot v-if="$scopedSlots[item.keyPath.join('-')]" :name="item.keyPath.join('-')" v-bind="item"></slot>
26   - <!-- 默认表格列渲染 -->
27   - <el-table-column v-else v-bind="{ ...item, type: undefined }" :prop="item.fullKey || item.key" :key="index" :min-width="minWidth || item.minWidth || item['min-width']">
28   - <template #default="{ row, column, $index }">
29   - <cell-render :row="row" :item="item">
30   - <!-- 如果有表格列值渲染具名插槽 -->
31   - <slot
32   - v-if="$scopedSlots[`value-${item.keyPath.join('-')}`]"
33   - :name="`value-${item.keyPath.join('-')}`"
34   - v-bind="item"
35   - :row="row"
36   - :value="$_get(row, item.fullKey)"
37   - :column="column"
38   - :index="$index"
39   - ></slot>
40   - <!-- 如果表格列配置了值渲染参数 -->
41   - <cell-value-render v-else-if="item.render" :row="row" :column="column" :index="$index" :item="item" />
42   - </cell-render>
43   - </template>
44   - </el-table-column>
45   - </template>
46   - </template>
47   - </template>
48   - <!-- 已生成列表后的追加列插槽 -->
49   - <slot name="column-append"></slot>
50   - <!-- 末尾列插槽 -->
51   - <slot name="column-end"></slot>
52   - </el-table>
53   -</template>
54   -
55   -<script>
56   -import { cloneDeep, get, set } from '../utils';
57   -import CellValueRender from './cell-value-render';
58   -
59   -export default {
60   - name: 'SchemeTable',
61   - components: {
62   - CellRender: {
63   - props: { row: Object, item: Object },
64   - render(h) {
65   - if (this.$scopedSlots.default) {
66   - return h('span', this.$scopedSlots.default());
67   - } else {
68   - return h('span', get(this.row, this.item.agentKey || this.item.fullKey));
69   - }
70   - },
71   - },
72   - CellValueRender,
73   - },
74   - props: {
75   - // 用于实例化本组件绑定v-model的值
76   - value: Array,
77   - // 配置列表
78   - list: {
79   - type: Array,
80   - required: true,
81   - },
82   - // 表格参数
83   - tableProps: {
84   - type: Object,
85   - default: () => ({}),
86   - },
87   - // 表格事件
88   - tableEvents: Object,
89   - // 列宽
90   - minWidth: Number,
91   - // 大小
92   - size: {
93   - type: String,
94   - default: 'small',
95   - },
96   - },
97   - data() {
98   - return {
99   - tableList: [], // 表格配置列表
100   - tableData: [], // 表格数据
101   - };
102   - },
103   - computed: {
104   - // 表格实体
105   - instance: {
106   - get() {
107   - return this.$refs.table;
108   - },
109   - },
110   - },
111   - watch: {
112   - value: {
113   - handler(val = []) {
114   - this.tableData = val;
115   - },
116   - immediate: true,
117   - },
118   - list: {
119   - handler(val) {
120   - // 深度克隆传入的列表,避免原始值被修改
121   - const newList = cloneDeep(this.list);
122   - // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
123   - const generateFullKey = (list, parentKey) => {
124   - list.forEach(item => {
125   - if (item.group && item.list) {
126   - if (item.group.key) {
127   - item.fullKey = `${parentKey ? `${parentKey}.${item.group.key}` : item.group.key}`;
128   - } else {
129   - item.fullKey = parentKey || item.key;
130   - }
131   - generateFullKey(item.list, item.fullKey);
132   - } else {
133   - item.fullKey = `${parentKey ? `${parentKey}.${item.key}` : item.key}`;
134   - }
135   - });
136   - };
137   - // 生成fullKey
138   - generateFullKey(newList);
139   - // 创建输出列表
140   - const result = [];
141   - // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
142   - const generateFlatList = list => {
143   - list.forEach(item => {
144   - if (item.group && item.list) {
145   - generateFlatList(item.list);
146   - } else if (!item.group && !item.list) {
147   - result.push({ ...item, keyPath: item.fullKey.split('.') });
148   - }
149   - });
150   - };
151   - generateFlatList(newList);
152   - this.tableList = result;
153   - },
154   - immediate: true,
155   - },
156   - },
157   - methods: {
158   - $_get: get,
159   - // 绑定表格列显示隐藏状态
160   - bindItemVisible(visible = true) {
161   - let result = visible;
162   - if (typeof visible === 'function') {
163   - result = visible(this.tableData);
164   - }
165   - return result;
166   - },
167   - // 选中单行
168   - onSelect(selection, row) {
169   - if (selection.find(i => i.id === row.id)) {
170   - this.$emit('selection-change', [row], 'check');
171   - } else {
172   - this.$emit('selection-change', [row], 'uncheck');
173   - }
174   - },
175   - // 切换全选
176   - onSelectAll(selection) {
177   - if (selection && selection.length > 0) {
178   - this.$emit('selection-change', selection, 'check');
179   - } else {
180   - this.$emit('selection-change', this.tableData, 'uncheck');
181   - }
182   - },
183   - // 表格选中
184   - onSelectionChange(selection) {
185   - this.$emit('selection', selection);
186   - },
187   - // 切换某行选中状态
188   - toggleRowSelection(row, selected) {
189   - this.$refs.table && this.$refs.table.toggleRowSelection(row, selected);
190   - },
191   - // 清除表格选中
192   - clearSelection() {
193   - this.$refs.table && this.$refs.table.clearSelection();
194   - },
195   - },
196   -};
197   -</script>
packages/scheme/index.scss
... ... @@ -1,72 +0,0 @@
1   -.z-scheme {
2   - &__header {
3   - margin-bottom: 10px;
4   - }
5   - &__filter {
6   - border: 1px solid #ebeef5;
7   - padding-top: 10px;
8   - border-radius: 4px;
9   - margin-bottom: 10px;
10   - }
11   - &__action {
12   - display: flex;
13   - flex-wrap: wrap;
14   - align-items: center;
15   - justify-content: flex-start;
16   - line-height: 1;
17   - .el-button + .el-button {
18   - margin-left: 0;
19   - }
20   - .el-button {
21   - margin-right: 10px;
22   - margin-bottom: 10px;
23   - }
24   - }
25   - &__table {
26   - &-operation {
27   - display: flex;
28   - flex-wrap: wrap;
29   - align-items: center;
30   - justify-content: flex-start;
31   - .el-button + .el-button {
32   - margin-left: 0;
33   - }
34   - .el-button {
35   - margin-right: 10px;
36   - padding-top: 6px;
37   - padding-bottom: 6px;
38   - }
39   - }
40   - }
41   - &__dialog-button {
42   - display: flex;
43   - align-items: center;
44   - justify-content: center;
45   - padding-top: 10px;
46   - }
47   - &__footer {
48   - margin-top: 10px;
49   - text-align: right;
50   - display: flex;
51   - justify-content: space-between;
52   - align-items: center;
53   - .selection-info {
54   - word-break: break-all;
55   - white-space: nowrap;
56   - font-size: 12px;
57   - color: #606266;
58   - .num {
59   - color: #000;
60   - font-weight: bold;
61   - padding: 0 5px;
62   - font-size: 16px;
63   - }
64   - .el-button {
65   - margin-left: 5px;
66   - }
67   - }
68   - .el-pagination {
69   - flex: auto;
70   - }
71   - }
72   -}
73 0 \ No newline at end of file
packages/scheme/index.vue
... ... @@ -1,649 +0,0 @@
1   -<style lang="scss">
2   -@import './index.scss';
3   -</style>
4   -
5   -<template>
6   - <div class="z-scheme">
7   - <!-- 头部内容 -->
8   - <div v-if="$scopedSlots.header || $slots.header" class="z-scheme__header">
9   - <slot name="header" :filterModel="filterModel" v-bind="_slotScope"></slot>
10   - </div>
11   - <!-- 筛选组件 -->
12   - <div v-if="filter" class="z-scheme__filter">
13   - <z-scheme-filter
14   - :value="_filterModel"
15   - :list="filterList || listMap.filter | noRulesFilter"
16   - :size="size"
17   - @input="onFilterInput"
18   - @search="onSearch"
19   - :loading="loading"
20   - v-bind="filterProps"
21   - :params="_slotScope"
22   - ></z-scheme-filter>
23   - </div>
24   - <!-- 按钮区 -->
25   - <div v-if="action" class="z-scheme__action">
26   - <slot v-if="hadSlot('action')" name="action" v-bind="_slotScope"></slot>
27   - <template v-else>
28   - <el-button :size="size" type="primary" @click="openNew">新增</el-button>
29   - <el-button :size="size" plain :disabled="selection.length === 0" @click="handleDeleteMul(selection)">删除</el-button>
30   - <slot name="button" v-bind="_slotScope"></slot>
31   - </template>
32   - </div>
33   - <!-- 表格内容 -->
34   - <div class="z-scheme__table">
35   - <z-scheme-table
36   - ref="table"
37   - v-model="tableData"
38   - v-loading="loading"
39   - :list="tableList || listMap.table"
40   - :tableProps="{ border: true, 'row-key': 'id', 'highlight-current-row': true, ...tableProps }"
41   - :size="size"
42   - @selection-change="onTableSelectionChange"
43   - @selection="onTableSelection"
44   - >
45   - <slot></slot>
46   - <!-- 表格列内容渲染 -->
47   - <template v-for="(item, index) in renderList">
48   - <template v-if="$scopedSlots[`cell-${item.fullKey}`]">
49   - <el-table-column :slot="item.fullKey" v-bind="item" :prop="item.agentKey || item.key" :key="`table-cell-${index}`">
50   - <template slot-scope="{ row, column, $index }">
51   - <slot :name="`cell-${item.fullKey}`" v-bind="{ ...item, ..._slotScope }" :row="row" :value="row[item.key]" :column="column" :index="$index"></slot>
52   - </template>
53   - </el-table-column>
54   - </template>
55   - <template v-else-if="$scopedSlots[`render-${item.fullKey}`]">
56   - <el-table-column :slot="item.fullKey" v-bind="item" :prop="item.agentKey || item.key" :key="`table-render-${index}`">
57   - <template slot-scope="{ row, column, $index }">
58   - <slot :name="`render-${item.fullKey}`" v-bind="{ ...item, ..._slotScope }" :row="row" :value="row[item.key]" :column="column" :index="$index"></slot>
59   - </template>
60   - </el-table-column>
61   - </template>
62   - </template>
63   - <slot slot="column-append" name="column-append" v-bind="_slotScope"></slot>
64   - <!-- 表格尾追加操作列 -->
65   - <template #column-end>
66   - <slot slot="column-end" name="column-end" v-bind="_slotScope"></slot>
67   - <el-table-column v-if="operation" prop="$operation" label="操作" v-bind="{ width: 100, fixed: 'right', ...operationProps }">
68   - <div class="z-scheme__table-operation" slot-scope="slotScope">
69   - <slot name="operation-button" v-bind="{ ..._slotScope, slotScope }"></slot>
70   - <el-button type="text" icon="el-icon-edit" title="编辑" @click="openEdit(slotScope.row)"></el-button>
71   - <el-popconfirm confirmButtonText="确定" cancelButtonText="取消" title="确定删除吗?" placement="top" @confirm="handleDelete([slotScope.row])">
72   - <el-button slot="reference" type="text" icon="el-icon-delete" title="删除"></el-button>
73   - </el-popconfirm>
74   - <slot name="operation-button-append" v-bind="{ ..._slotScope, slotScope }"></slot>
75   - </div>
76   - </el-table-column>
77   - </template>
78   - </z-scheme-table>
79   - </div>
80   - <!-- 底部区域 -->
81   - <div class="z-scheme__footer">
82   - <div v-if="selection.length > 0" class="selection-info">
83   - <span>已选中</span>
84   - <span class="num">{{ selection.length }}</span>
85   - <span>项</span>
86   - <el-popconfirm confirmButtonText="确定" cancelButtonText="取消" title="确定清除吗?" placement="top" @confirm="clearSelection">
87   - <el-button slot="reference" :size="size" type="text">清除</el-button>
88   - </el-popconfirm>
89   - </div>
90   - <!-- 分页器 -->
91   - <el-pagination
92   - v-if="pagination"
93   - @size-change="handleSizeChange"
94   - @current-change="handleCurrentChange"
95   - :current-page="currentPage"
96   - :page-sizes="pageSizes"
97   - :page-size="pageSize"
98   - layout="total, sizes, prev, pager, next, jumper"
99   - :total="total"
100   - >
101   - </el-pagination>
102   - </div>
103   - <!-- 弹出框 -->
104   - <el-dialog
105   - :visible.sync="dialogVisible"
106   - :title="dialogTitle"
107   - destroy-on-close
108   - append-to-body
109   - :lock-scroll="false"
110   - :close-on-click-modal="false"
111   - @closed="onDialogClosed"
112   - @close="onDialogClose"
113   - v-bind="_dialogProps"
114   - >
115   - <div v-loading="dialogLoading">
116   - <!-- 自定义弹出框标题 -->
117   - <slot v-if="hadSlot('dialog-title')" slot="title" name="dialog-title" :dialogType="dialogType" v-bind="_slotScope"></slot>
118   - <template v-if="dialogRender">
119   - <!-- 自定义弹出框内容 -->
120   - <slot v-if="hadSlot(`dialog-${dialogType}`)" :name="`dialog-${dialogType}`" :model="_formModel" v-bind="_slotScope"></slot>
121   - <template v-else>
122   - <!-- 内置弹出框新增修改表单 -->
123   - <template v-if="['new', 'edit'].includes(dialogType)">
124   - <z-form
125   - ref="form"
126   - :value="_formModel"
127   - :list="formList || listMap.form"
128   - @input="onFormInput"
129   - @validate="onFormValidate"
130   - v-bind="{ span: 12, 'label-width': '110px', ...formProps }"
131   - :params="_slotScope"
132   - >
133   - <!-- 表单自定义插槽 -->
134   - <template v-for="item in renderList">
135   - <template v-if="$scopedSlots[`form-${item.fullKey}`]">
136   - <slot :slot="item.fullKey" :name="`form-${item.fullKey}`" :value="get(_formModel, item.fullKey)" :row="_formModel" :model="_formModel" v-bind="_slotScope"></slot>
137   - </template>
138   - </template>
139   - </z-form>
140   - </template>
141   - <!-- 内置弹出框详情表单 -->
142   - <template v-else>
143   - <z-form
144   - ref="form"
145   - class="z-scheme__view"
146   - :value="_formModel"
147   - :list="viewList || listMap.form | viewTypeFilter | noRulesFilter"
148   - v-bind="{ span: 12, 'label-width': '110px', ...viewProps }"
149   - :params="_slotScope"
150   - >
151   - <!-- 详情自定义插槽渲染 -->
152   - <template v-for="item in renderList">
153   - <template v-if="$scopedSlots[`view-${item.fullKey}`]">
154   - <slot :slot="item.fullKey" :name="`view-${item.fullKey}`" :value="get(_formModel, item.fullKey)" :row="_formModel" :model="_formModel" v-bind="_slotScope"></slot>
155   - </template>
156   - <template v-else-if="$scopedSlots[`render-${item.fullKey}`]">
157   - <slot :slot="item.fullKey" :name="`render-${item.fullKey}`" :value="get(_formModel, item.fullKey)" :row="_formModel" :model="_formModel" v-bind="_slotScope"></slot>
158   - </template>
159   - </template>
160   - </z-form>
161   - </template>
162   - </template>
163   - <!-- 内置弹出框新增修改按钮 -->
164   - <div class="z-scheme__dialog-button" v-if="['new', 'edit'].includes(dialogType)">
165   - <el-button :size="size" type="primary" @click="handleConfirm" :loading="submitting">确定</el-button>
166   - <el-button :size="size" plain @click="closeDialog">取消</el-button>
167   - </div>
168   - </template>
169   - </div>
170   - </el-dialog>
171   - </div>
172   -</template>
173   -
174   -<script>
175   -import { cloneDeep, get } from '../utils';
176   -import { clear } from '../utils/param';
177   -
178   -let propsMap = {};
179   -const propsKeys = ['tableProps', 'filterProps', 'formProps', 'viewProps', 'dialogProps', 'operationProps'];
180   -propsKeys.forEach(key => {
181   - propsMap[key] = {
182   - type: Object,
183   - default: () => ({}),
184   - };
185   -});
186   -const apiKeys = ['searchApi', 'submitApi', 'addApi', 'modifyApi', 'getApi', 'viewApi', 'deleteApi'];
187   -apiKeys.forEach(key => {
188   - propsMap[key] = {
189   - type: Function,
190   - };
191   -});
192   -const blockKeys = ['filter', 'action', 'pagination', 'operation'];
193   -blockKeys.forEach(key => {
194   - propsMap[key] = {
195   - type: Boolean,
196   - default: true,
197   - };
198   -});
199   -
200   -export default {
201   - name: 'Scheme',
202   - props: {
203   - ...propsMap,
204   - list: Array,
205   - filterList: Array,
206   - tableList: Array,
207   - formList: Array,
208   - viewList: Array,
209   - size: {
210   - type: String,
211   - default: 'mini',
212   - },
213   - formModel: Object,
214   - filterModel: Object,
215   - auto: Boolean,
216   - realSelection: Boolean,
217   - url: String, // 请求地址
218   - http: Function, // http库
219   - alias: Object, // 别名配置
220   - },
221   - data() {
222   - return {
223   - filterForm: {},
224   - editForm: {},
225   - dialogVisible: false,
226   - dialogRender: true,
227   - dialogType: 'none',
228   - dialogLoading: false,
229   - dialogTitle: '',
230   - dialogPropsHack: {},
231   - currentPage: 1,
232   - pageSize: 10,
233   - total: 0,
234   - pageSizes: [10, 20, 50],
235   - tableData: [],
236   - submitting: false,
237   - loading: false,
238   - selection: [],
239   - };
240   - },
241   - created() {
242   - if (this.auto) {
243   - this.search();
244   - }
245   - },
246   - filters: {
247   - // 无规则过滤器,过滤掉筛选条件表单中的必填规则等
248   - noRulesFilter(val = []) {
249   - let list = cloneDeep(val);
250   - const clearRules = list => {
251   - list.forEach(item => {
252   - if (item.list) {
253   - clearRules(item.list);
254   - } else {
255   - delete item.rules;
256   - }
257   - });
258   - };
259   - clearRules(list);
260   - return list;
261   - },
262   - // 详情类型过滤器
263   - viewTypeFilter(val = []) {
264   - let list = cloneDeep(val);
265   - const clearRules = list => {
266   - list.forEach(item => {
267   - item.type = (h, { model, config }) => h('span', config, model[item.key]);
268   - });
269   - };
270   - clearRules(list);
271   - return list;
272   - },
273   - },
274   - computed: {
275   - listMap() {
276   - // 默认作用域
277   - const LIST_SPACE = ['filter', 'form', 'table'];
278   - const array = {
279   - filter: [], // 筛选
280   - form: [], // 表单
281   - table: [], // 表格
282   - };
283   - this.list.forEach(item => {
284   - // 可以在列表中通过include或exclude设置当前配置的作用域
285   - const { include = LIST_SPACE, exclude = [] } = item;
286   - // 判断include
287   - let _inclue = [];
288   - if (include instanceof String || typeof include === 'string') {
289   - _inclue = [include];
290   - } else if (include instanceof Array && typeof include === 'object') {
291   - _inclue = include;
292   - }
293   - // 判断exclude转换为include的情况
294   - let _exclude_include = [];
295   - if (exclude instanceof String || typeof exclude === 'string') {
296   - _exclude_include = LIST_SPACE.filter(item => item !== exclude);
297   - } else if (exclude instanceof Array && typeof exclude === 'object') {
298   - _exclude_include = LIST_SPACE.filter(item => !exclude.includes(item));
299   - }
300   - // 作用域交集
301   - const _intersection = _inclue.filter(v => _exclude_include.includes(v));
302   - // 返回改配置项的作用域
303   - const _list_space = cloneDeep(_intersection);
304   - // 将配置项按需分配至各作用域下
305   - _list_space.forEach(name => {
306   - array[name].push({ ...item, ...(item[name] || {}) });
307   - });
308   - });
309   - return array;
310   - },
311   - renderList() {
312   - // 深度克隆传入的列表,避免原始值被修改
313   - const newList = cloneDeep(this.list);
314   - // 生成列表值的全路径key,即列表项为对象时,对象内的key与上一级的key合并作为全路径key
315   - const generateFullKey = (list, parentKey) => {
316   - list.forEach(item => {
317   - if (item.group && item.list) {
318   - if (item.group.key) {
319   - item.fullKey = `${parentKey ? `${parentKey}-${item.group.key}` : item.group.key}`;
320   - } else {
321   - item.fullKey = parentKey || item.key;
322   - }
323   - generateFullKey(item.list, item.fullKey);
324   - } else {
325   - item.fullKey = `${parentKey ? `${parentKey}-${item.key}` : item.key}`;
326   - }
327   - });
328   - };
329   - // 生成fullKey
330   - generateFullKey(newList);
331   - return newList;
332   - },
333   - _filterModel() {
334   - return this.filterModel || this.filterForm || {};
335   - },
336   - _formModel() {
337   - return this.formModel || this.editForm || {};
338   - },
339   - _slotScope() {
340   - return {
341   - handleSearch: this.search,
342   - openDialog: this.openDialog,
343   - closeDialog: this.closeDialog,
344   - openView: this.openView,
345   - openEdit: this.openEdit,
346   - openNew: this.openNew,
347   - handleDelete: this.handleDelete,
348   - handleDeleteMul: this.handleDeleteMul,
349   - size: this.size,
350   - dialogType: this.dialogType,
351   - selection: this.selection,
352   - };
353   - },
354   - _alias() {
355   - const alias = this.alias;
356   - const zAlias = this.zAlias;
357   - if (alias && zAlias) {
358   - return { ...zAlias, ...alias };
359   - }
360   - return this.alias || this.zAlias || {};
361   - },
362   - _dialogProps() {
363   - return {
364   - ...this.dialogProps,
365   - ...this.dialogPropsHack,
366   - };
367   - },
368   - },
369   - methods: {
370   - get,
371   - // 空Promise
372   - emptyPromise() {
373   - return new Promise(resolve => resolve());
374   - },
375   - // 设置表格选中行
376   - toggleRowSelection() {
377   - this.tableData.forEach(row => {
378   - if (this.selection.find(item => item.id === row.id)) {
379   - this.$refs.table && this.$refs.table.toggleRowSelection(row);
380   - }
381   - });
382   - },
383   - // 表格选中状态
384   - onTableSelectionChange(selection, type) {
385   - if (this.realSelection) {
386   - if (type === 'check') {
387   - const result = this.selection || [];
388   - selection.forEach(item => {
389   - if (!result.find(i => i.id === item.id)) {
390   - result.push(item);
391   - }
392   - });
393   - this.selection = result;
394   - } else if (type === 'uncheck') {
395   - selection.forEach(i => {
396   - this.selection = this.selection.filter(item => item.id !== i.id);
397   - });
398   - }
399   - }
400   - },
401   - // 表格选中
402   - onTableSelection(selection) {
403   - if (!this.realSelection) {
404   - this.selection = selection;
405   - }
406   - },
407   - // 清除表格选中
408   - clearSelection() {
409   - this.$refs.table && this.$refs.table.clearSelection();
410   - this.selection = [];
411   - },
412   - // 内置搜索接口
413   - _searchAPI(params) {
414   - if (this.url && (this.http || this.zHttp)) {
415   - const _http = this.http || this.zHttp;
416   - return _http({ url: `${clear(this.url)}/${this._alias.pageUrl || 'page'}`, params });
417   - }
418   - return undefined;
419   - },
420   - // 重置查询
421   - onSearch() {
422   - this.currentPage = 1;
423   - this.search();
424   - },
425   - // 搜索
426   - async search() {
427   - this.loading = true;
428   - const params = {
429   - ...this._filterModel,
430   - currentPage: this.currentPage,
431   - pageSize: this.pageSize,
432   - };
433   - const searchAPI = this.searchApi || this._searchAPI || this.emptyPromise;
434   - await searchAPI(params)
435   - .then(res => {
436   - const response = res || {};
437   - this.tableData = response[this._alias.list || 'list'] || [];
438   - this.total = response[this._alias.total || 'total'] || 0;
439   - this.$nextTick(this.toggleRowSelection);
440   - })
441   - .catch(() => {
442   - this.$message.error('查询失败');
443   - });
444   - this.loading = false;
445   - },
446   - // 更新筛选model
447   - onFilterInput(val) {
448   - this.filterForm = val || {};
449   - this.$emit('update:filterModel', val || {});
450   - },
451   - // 更新表单model
452   - onFormInput(val) {
453   - this.editForm = val || {};
454   - this.$emit('update:formModel', val || {});
455   - },
456   - // 内置新增保存接口
457   - _addAPI(data) {
458   - if (this.url && (this.http || this.zHttp)) {
459   - const _http = this.http || this.zHttp;
460   - return _http({ url: `${clear(this.url)}/${this._alias.addUrl || 'add'}`, method: 'post', data });
461   - }
462   - return undefined;
463   - },
464   - // 内置修改保存接口
465   - _modifyAPI(data) {
466   - if (this.url && (this.http || this.zHttp)) {
467   - const _http = this.http || this.zHttp;
468   - return _http({ url: `${clear(this.url)}/${this._alias.modifyUrl || 'modify'}`, method: 'post', data });
469   - }
470   - return undefined;
471   - },
472   - // 表单提交且通过校验
473   - async onFormValidate(valid, model) {
474   - if (valid) {
475   - this.submitting = true;
476   - let submitAPI = this.submitApi || this.emptyPromise;
477   - if (this.dialogType === 'new') {
478   - submitAPI = this.addApi || this.submitApi || this._addAPI || this.emptyPromise;
479   - } else if (this.dialogType === 'edit') {
480   - submitAPI = this.modifyApi || this.submitApi || this._modifyAPI || this.emptyPromise;
481   - }
482   - submitAPI(model, { type: this.dialogType })
483   - .then(() => {
484   - this.$message.success('保存成功');
485   - this.closeDialog();
486   - this.search();
487   - })
488   - .catch(() => {
489   - this.$message.error('保存失败');
490   - })
491   - .finally(() => {
492   - this.submitting = false;
493   - });
494   - }
495   - },
496   - // 表单按钮确定
497   - handleConfirm() {
498   - this.$refs.form && this.$refs.form.validate();
499   - },
500   - // 表单按钮取消
501   - handleCancel() {
502   - this.closeDialog();
503   - },
504   - // 查询是否有某个插槽
505   - hadSlot(name) {
506   - return !!this.$slots[name] || !!this.$scopedSlots[name];
507   - },
508   - // 打开新增弹出框
509   - openNew() {
510   - this.openDialog('new', '新增');
511   - },
512   - // 内置查询详情接口
513   - _getAPI(row) {
514   - if (this.url && (this.http || this.zHttp)) {
515   - const _http = this.http || this.zHttp;
516   - const _getKey = this._alias.getKey || this._alias.primaryKey || 'id';
517   - const _resultKey = this._alias.result || 'result';
518   - return _http({ url: `${clear(this.url)}/${this._alias.getUrl || 'queryById'}`, params: { [_getKey]: row[_getKey] } }).then(response => response[_resultKey] || {});
519   - }
520   - return undefined;
521   - },
522   - // 打开编辑弹出框
523   - openEdit(row) {
524   - this.dialogLoading = true;
525   - this.openDialog('edit', '编辑');
526   - const getRow = () =>
527   - new Promise(resolve => {
528   - resolve(row);
529   - });
530   - const getAPI = this.getApi || this._getAPI || getRow;
531   - getAPI(row)
532   - .then(result => {
533   - this.editForm = result;
534   - this.$emit('update:formModel', result || {});
535   - })
536   - .finally(() => {
537   - this.dialogLoading = false;
538   - });
539   - },
540   - // 内置查询详情接口
541   - _viewAPI(row) {
542   - if (this.url && (this.http || this.zHttp)) {
543   - const _http = this.http || this.zHttp;
544   - const _viewKey = this._alias.viewKey || this._alias.getKey || this._alias.primaryKey || 'id';
545   - const _resultKey = this._alias.result || 'result';
546   - return _http({ url: `${clear(this.url)}/${this._alias.getUrl || 'queryById'}`, params: { [_viewKey]: row[_viewKey] } }).then(response => response[_resultKey] || {});
547   - }
548   - return undefined;
549   - },
550   - // 打开详情弹出框
551   - openView(row) {
552   - this.dialogLoading = true;
553   - this.openDialog('view', '详情');
554   - const getRow = () =>
555   - new Promise(resolve => {
556   - resolve(row);
557   - });
558   - const viewAPI = this.viewApi || this.getApi || this._viewAPI || this._getAPI || getRow;
559   - viewAPI(row)
560   - .then(result => {
561   - this.editForm = result;
562   - this.$emit('update:formModel', result || {});
563   - })
564   - .finally(() => {
565   - this.dialogLoading = false;
566   - });
567   - },
568   - // 内置删除接口
569   - _deleteAPI(keys) {
570   - if (this.url && (this.http || this.zHttp)) {
571   - const _http = this.http || this.zHttp;
572   - return _http({ url: `${clear(this.url)}/${this._alias.modifyUrl || 'delete'}`, method: 'post', data: keys });
573   - }
574   - return undefined;
575   - },
576   - // 删除
577   - handleDelete(selection) {
578   - const loading = this.$loading({
579   - text: '处理中',
580   - spinner: 'el-icon-loading',
581   - background: 'rgba(255, 255, 255, 0.5)',
582   - });
583   - const deleteAPI = this.deleteApi || this._deleteAPI || this.emptyPromise;
584   - const _deleteKey = this._alias.deleteKey || this._alias.primaryKey || 'id';
585   - const keys = selection.map(i => i[_deleteKey]);
586   - deleteAPI(keys)
587   - .then(() => {
588   - this.search();
589   - this.$message.success('删除成功');
590   - })
591   - .finally(() => {
592   - loading.close();
593   - });
594   - },
595   - // 批量删除
596   - handleDeleteMul(selection) {
597   - this.$confirm(`是否删除这 [${selection.length}] 项?`, '提示', {
598   - confirmButtonText: '确定',
599   - cancelButtonText: '取消',
600   - type: 'warning',
601   - })
602   - .then(() => {
603   - this.handleDelete(selection);
604   - })
605   - .catch(() => {});
606   - },
607   - // 打开弹出框
608   - openDialog(type, title, config) {
609   - this.dialogVisible = true;
610   - this.dialogRender = true;
611   - this.dialogType = type;
612   - this.dialogTitle = title;
613   - this.dialogPropsHack = config || {};
614   - this.$emit('dialog-change', type);
615   - },
616   - // 关闭弹出框
617   - closeDialog() {
618   - this.dialogVisible = false;
619   - },
620   - // 清空表单
621   - clearEditForm() {
622   - this.editForm = {};
623   - this.$emit('update:formModel', {});
624   - },
625   - // 弹出框关闭
626   - onDialogClose() {
627   - this.dialogType = 'none';
628   - this.dialogRender = false;
629   - this.$emit('dialog-change', 'none');
630   - },
631   - // 弹出框关闭动画结束
632   - onDialogClosed() {
633   - this.clearEditForm();
634   - this.dialogPropsHack = {};
635   - },
636   - // 分页-每页个数
637   - handleSizeChange(val) {
638   - this.pageSize = val;
639   - this.currentPage = 1;
640   - this.$nextTick(this.search);
641   - },
642   - // 分页-当前页数
643   - handleCurrentChange(val) {
644   - this.currentPage = val;
645   - this.$nextTick(this.search);
646   - },
647   - },
648   -};
649   -</script>