@weitutech/by-components 1.1.5 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/extension.md +15 -0
- package/docs/form.md +93 -0
- package/docs/table.md +43 -0
- package/lib/by-components.common.js +46 -76
- package/lib/by-components.umd.js +46 -76
- package/lib/by-components.umd.min.js +1 -1
- package/package.json +1 -5
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
### 如需要扩展
|
|
2
|
+
|
|
3
|
+
1. 应从 vex-table 第三方组件库查看是否有相应的功能
|
|
4
|
+
|
|
5
|
+
2. 如需要加入通用实用的表单元素、应该先考虑在组件form中加入、其次是以custom插槽的形式插入
|
|
6
|
+
|
|
7
|
+
### 第三方插件
|
|
8
|
+
|
|
9
|
+
[element-ui](https://element.eleme.cn/#/zh-CN)
|
|
10
|
+
|
|
11
|
+
[vuedraggable](https://www.npmjs.com/package/vuedraggable)
|
|
12
|
+
|
|
13
|
+
[vxe-table](https://vxetable.cn/pluginDocs/table3/#/demo/list)
|
|
14
|
+
|
|
15
|
+
[moment](https://momentjs.cn/)
|
package/docs/form.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
### 类型(没有注册看 Element 的组件使用方法)
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
| 'input'
|
|
5
|
+
| 'inputNumber'
|
|
6
|
+
| 'select'
|
|
7
|
+
| 'treeSelect'
|
|
8
|
+
| 'datepicker'
|
|
9
|
+
| 'cascader'
|
|
10
|
+
| 'switch'
|
|
11
|
+
| 'checkbox'
|
|
12
|
+
| 'radio'
|
|
13
|
+
| 'upload'
|
|
14
|
+
| 'customDatePicker' // 自定义的时间选择器
|
|
15
|
+
| 'search' // 搜索按钮区域
|
|
16
|
+
| 'formButtons' // 表单按钮区域
|
|
17
|
+
| 'custom' // 自定义
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
#### Event
|
|
21
|
+
|
|
22
|
+
| 事件 | 参数 |
|
|
23
|
+
| ------------- | ------------------- |
|
|
24
|
+
| change | context: IFormItems |
|
|
25
|
+
| queryBtnClick | 无 |
|
|
26
|
+
|
|
27
|
+
完整案列见 [表单 by-form](../README.md)
|
|
28
|
+
|
|
29
|
+
#### 表单按钮区域(重置、搜索按钮)
|
|
30
|
+
|
|
31
|
+
- formItem使用'formButtons'类型
|
|
32
|
+
- @submit 触发搜索事件
|
|
33
|
+
- @reset 触发重置事件 (内部已实现重置逻辑,如无需其他逻辑,可不实现)
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
// 示例:
|
|
37
|
+
//formItems中使用示例:
|
|
38
|
+
{
|
|
39
|
+
//重置、搜索 按钮
|
|
40
|
+
type: 'formButtons',
|
|
41
|
+
labelWidth: '10px',
|
|
42
|
+
otherOptions: {
|
|
43
|
+
submit: true, // 是否显示搜索按钮,默认显示
|
|
44
|
+
reset: false, // 是否显示重置按钮,默认显示
|
|
45
|
+
submitText: '搜索', // 搜索按钮文字
|
|
46
|
+
resetText: '重置' // 重置按钮文字
|
|
47
|
+
showSubmitIcon: true, // 是否显示搜索按钮图标,默认显示
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//form使用示例:(by-form & by-page-search组件使用示例)
|
|
52
|
+
<by-form
|
|
53
|
+
ref="BFormRef"
|
|
54
|
+
v-model="formData"
|
|
55
|
+
v-bind="formConfig"
|
|
56
|
+
@submit="handleSubmit"
|
|
57
|
+
@reset="handleReset"
|
|
58
|
+
></by-form>
|
|
59
|
+
|
|
60
|
+
<by-page-search
|
|
61
|
+
v-model="searchQuery"
|
|
62
|
+
:search-form-config="formConfig"
|
|
63
|
+
@change="handleFormChange"
|
|
64
|
+
@submit="handleSubmit"
|
|
65
|
+
@reset="handleReset"
|
|
66
|
+
></by-page-search>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 特殊说明
|
|
70
|
+
|
|
71
|
+
#### 自定义时间选中器'customDatePicker'特别说明
|
|
72
|
+
|
|
73
|
+
自定义时间选中器同时支持时间段方式绑定值 和 单独时间方式绑定值
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
// 时间段方式绑定值
|
|
77
|
+
{
|
|
78
|
+
type: 'customDatePicker',
|
|
79
|
+
field: 'report_time',
|
|
80
|
+
label: '报表时间'
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
// 单独时间方式绑定值
|
|
86
|
+
{
|
|
87
|
+
type: 'customDatePicker',
|
|
88
|
+
field: 'report_time', // 仍然保留原来的字段,保证兼容性
|
|
89
|
+
startTimeField: 'start_time', // 新增开始时间字段
|
|
90
|
+
endTimeField: 'end_time', // 新增结束时间字段
|
|
91
|
+
label: '报表时间'
|
|
92
|
+
}
|
|
93
|
+
```
|
package/docs/table.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
### table
|
|
2
|
+
|
|
3
|
+
#### 列宽缓存
|
|
4
|
+
|
|
5
|
+
- 列宽缓存会根据 name 属性进行缓存; 所以如果业务中表格需要缓存列宽,请务必给table组件设置name属性(类型为String)
|
|
6
|
+
|
|
7
|
+
- name属性值不能重复,最好根据当前业务场景进行命名(如: name='adManage_headline2_account'),能保证不重名即可
|
|
8
|
+
|
|
9
|
+
- 当新增列、删除列时,会实时更新列宽缓存
|
|
10
|
+
|
|
11
|
+
- 注意📢: 一个项目中的name属性千万不能重名、一个项目中的name属性千万不能重名、一个项目中的name属性千万不能重名
|
|
12
|
+
|
|
13
|
+
#### 行高自适应
|
|
14
|
+
|
|
15
|
+
- 如果需要行高自适应,请设置属性::auto-height="true"
|
|
16
|
+
|
|
17
|
+
- 如果某个单元格的内容超出单元格显示,会自动撑高单元格
|
|
18
|
+
|
|
19
|
+
#### 自定义列
|
|
20
|
+
|
|
21
|
+
给table组件设置以下对象
|
|
22
|
+
customColumnConfig: { // 自定义列
|
|
23
|
+
showCustomColumn: true, // 是否显示自定义列
|
|
24
|
+
infoMethod: getCustomTableList, // 回显用的接口
|
|
25
|
+
infoMethodParams: {}, // 回显用的接口参数
|
|
26
|
+
submitMethod: setCustomTableList, // 保存用的接口
|
|
27
|
+
submitMethodParams: {}, // 保存用的接口参数
|
|
28
|
+
slots: ["source_material_count"] // 需要使用插槽的字段集合
|
|
29
|
+
}
|
|
30
|
+
并通过事件Event @setColumn="handleSetColumn" 实现对列的设置
|
|
31
|
+
const handleSetColumn = (columns) => {
|
|
32
|
+
this.gridOptions.columns = [
|
|
33
|
+
{ type: "checkbox", width: 50, fixed: "left" },
|
|
34
|
+
{ type: "seq", width: 50, fixed: "left", title: "序号" },
|
|
35
|
+
...columns,
|
|
36
|
+
{ title: "操作", width: 80, fixed: "right", slots: { default: "operate" }}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#### Event
|
|
41
|
+
|
|
42
|
+
见[第三方插件vxe-table](./extension.md)
|
|
43
|
+
完整案列见 [表格 by-table](../README.md)
|
|
@@ -60423,8 +60423,6 @@ var render = function render() {
|
|
|
60423
60423
|
};
|
|
60424
60424
|
var staticRenderFns = [];
|
|
60425
60425
|
|
|
60426
|
-
;// ./src/components/pager/index.vue?vue&type=template&id=43bb822c
|
|
60427
|
-
|
|
60428
60426
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/pager/index.vue?vue&type=script&lang=js
|
|
60429
60427
|
/* harmony default export */ var pagervue_type_script_lang_js = ({
|
|
60430
60428
|
name: 'BYPager',
|
|
@@ -60606,8 +60604,8 @@ var component = normalizeComponent(
|
|
|
60606
60604
|
)
|
|
60607
60605
|
|
|
60608
60606
|
/* harmony default export */ var pager = (component.exports);
|
|
60609
|
-
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=
|
|
60610
|
-
var
|
|
60607
|
+
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=5e2b3384&scoped=true
|
|
60608
|
+
var tablevue_type_template_id_5e2b3384_scoped_true_render = function render() {
|
|
60611
60609
|
var _vm = this,
|
|
60612
60610
|
_c = _vm._self._c;
|
|
60613
60611
|
return _c('div', [_c('vxe-grid', _vm._g(_vm._b({
|
|
@@ -60654,9 +60652,7 @@ var tablevue_type_template_id_cb534b18_scoped_true_render = function render() {
|
|
|
60654
60652
|
}
|
|
60655
60653
|
}) : _vm._e()], 1);
|
|
60656
60654
|
};
|
|
60657
|
-
var
|
|
60658
|
-
|
|
60659
|
-
;// ./src/components/table/index.vue?vue&type=template&id=cb534b18&scoped=true
|
|
60655
|
+
var tablevue_type_template_id_5e2b3384_scoped_true_staticRenderFns = [];
|
|
60660
60656
|
|
|
60661
60657
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
60662
60658
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -60666,8 +60662,6 @@ var es_iterator_filter = __webpack_require__(2489);
|
|
|
60666
60662
|
var es_iterator_find = __webpack_require__(116);
|
|
60667
60663
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.map.js
|
|
60668
60664
|
var es_iterator_map = __webpack_require__(1701);
|
|
60669
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.some.js
|
|
60670
|
-
var es_iterator_some = __webpack_require__(3579);
|
|
60671
60665
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.difference.v2.js
|
|
60672
60666
|
var es_set_difference_v2 = __webpack_require__(7642);
|
|
60673
60667
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.intersection.v2.js
|
|
@@ -60877,8 +60871,8 @@ var custom_columnvue_type_template_id_1ef83e59_render = function render() {
|
|
|
60877
60871
|
};
|
|
60878
60872
|
var custom_columnvue_type_template_id_1ef83e59_staticRenderFns = [];
|
|
60879
60873
|
|
|
60880
|
-
|
|
60881
|
-
|
|
60874
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.some.js
|
|
60875
|
+
var es_iterator_some = __webpack_require__(3579);
|
|
60882
60876
|
// EXTERNAL MODULE: ./node_modules/vuedraggable/dist/vuedraggable.umd.js
|
|
60883
60877
|
var vuedraggable_umd = __webpack_require__(9135);
|
|
60884
60878
|
var vuedraggable_umd_default = /*#__PURE__*/__webpack_require__.n(vuedraggable_umd);
|
|
@@ -61214,7 +61208,6 @@ var custom_column_component = normalizeComponent(
|
|
|
61214
61208
|
|
|
61215
61209
|
|
|
61216
61210
|
|
|
61217
|
-
|
|
61218
61211
|
/* harmony default export */ var tablevue_type_script_lang_js = ({
|
|
61219
61212
|
name: 'BYTable',
|
|
61220
61213
|
components: {
|
|
@@ -61267,8 +61260,8 @@ var custom_column_component = normalizeComponent(
|
|
|
61267
61260
|
* 'ellipsis':显示省略号
|
|
61268
61261
|
* 'tooltip':超出部分显示省略号,鼠标悬停时显示完整内容
|
|
61269
61262
|
*/
|
|
61270
|
-
showOverflow: this.autoHeight
|
|
61271
|
-
showHeaderOverflow: this.autoHeight ? 'tooltip' : true,
|
|
61263
|
+
showOverflow: !this.autoHeight,
|
|
61264
|
+
// showHeaderOverflow: this.autoHeight ? 'tooltip' : true, //表头不加,要换行显示
|
|
61272
61265
|
height: 550,
|
|
61273
61266
|
align: 'left',
|
|
61274
61267
|
copyFields: [],
|
|
@@ -61328,48 +61321,25 @@ var custom_column_component = normalizeComponent(
|
|
|
61328
61321
|
return columns;
|
|
61329
61322
|
}
|
|
61330
61323
|
|
|
61331
|
-
|
|
61332
|
-
const
|
|
61333
|
-
|
|
61334
|
-
|
|
61335
|
-
|
|
61336
|
-
|
|
61337
|
-
|
|
61324
|
+
// 递归处理多级表头的列宽
|
|
61325
|
+
const processColumnWidth = (columns, cacheColumns) => {
|
|
61326
|
+
return columns.map(column => {
|
|
61327
|
+
if (column.children) {
|
|
61328
|
+
const cacheColumn = cacheColumns.find(col => col.field === column.field);
|
|
61329
|
+
return {
|
|
61330
|
+
...column,
|
|
61331
|
+
width: (cacheColumn === null || cacheColumn === void 0 ? void 0 : cacheColumn.width) || column.width,
|
|
61332
|
+
children: processColumnWidth(column.children, (cacheColumn === null || cacheColumn === void 0 ? void 0 : cacheColumn.children) || [])
|
|
61333
|
+
};
|
|
61334
|
+
}
|
|
61335
|
+
const cacheColumn = cacheColumns.find(col => col.field === column.field);
|
|
61336
|
+
return {
|
|
61337
|
+
...column,
|
|
61338
|
+
width: (cacheColumn === null || cacheColumn === void 0 ? void 0 : cacheColumn.width) || column.width
|
|
61339
|
+
};
|
|
61338
61340
|
});
|
|
61339
|
-
}
|
|
61340
|
-
return columns;
|
|
61341
|
-
},
|
|
61342
|
-
/**
|
|
61343
|
-
* 更新列宽缓存
|
|
61344
|
-
* 比较columns和cacheColumns列宽缓存数据,如果有变动(表头有增加或删除),更新缓存
|
|
61345
|
-
* 如果columns的列在cacheColumns中不存在,则说明是新增的列,将对应的列加入到缓存中
|
|
61346
|
-
* 如果cacheColumns的列在columns中不存在,则说明是删除的列,将对应的列从缓存中删除
|
|
61347
|
-
* @param columns 当前表格列配置
|
|
61348
|
-
* @param cacheColumns 缓存列配置
|
|
61349
|
-
*/
|
|
61350
|
-
compareColumnsAndCols(columns, cacheColumns) {
|
|
61351
|
-
if (!cacheColumns || !this.name) {
|
|
61352
|
-
return undefined;
|
|
61353
|
-
}
|
|
61354
|
-
// 如果columns的列在cacheColumns中不存在,则说明是新增的列,将对应的列加入到缓存中
|
|
61355
|
-
columns.forEach(item => {
|
|
61356
|
-
if (item && item.field && !cacheColumns.some(col => col && col.field === item.field)) {
|
|
61357
|
-
cacheColumns.push({
|
|
61358
|
-
field: item.field,
|
|
61359
|
-
width: item.width
|
|
61360
|
-
});
|
|
61361
|
-
}
|
|
61362
|
-
});
|
|
61363
|
-
|
|
61364
|
-
// ⚠️注意:这里不能执行删除逻辑,否则如果自定义列的话,初始是没有列数据的,会导致原先的缓存数据被清空
|
|
61365
|
-
// 如果cacheColumns的列在columns中不存在,则说明是删除的列,将对应的列从缓存中删除
|
|
61366
|
-
// const newCacheColumns = cacheColumns.filter(
|
|
61367
|
-
// item => item && item.field && columns.some(col => col && col.field === item.field)
|
|
61368
|
-
// )
|
|
61369
|
-
|
|
61370
|
-
// 更新缓存
|
|
61371
|
-
localStorage.setItem(this.name, JSON.stringify(cacheColumns));
|
|
61372
|
-
return cacheColumns;
|
|
61341
|
+
};
|
|
61342
|
+
return processColumnWidth(columns, cacheColumns);
|
|
61373
61343
|
},
|
|
61374
61344
|
handleCellClick(context) {
|
|
61375
61345
|
if (this.options.copyFields.includes(context.column.field)) {
|
|
@@ -61383,10 +61353,24 @@ var custom_column_component = normalizeComponent(
|
|
|
61383
61353
|
if (!this.name) return;
|
|
61384
61354
|
const collectColumn = context.$table.collectColumn;
|
|
61385
61355
|
console.log(collectColumn, 'collectColumn');
|
|
61386
|
-
|
|
61387
|
-
|
|
61388
|
-
|
|
61389
|
-
|
|
61356
|
+
|
|
61357
|
+
// 递归处理多级表头
|
|
61358
|
+
const processColumns = columns => {
|
|
61359
|
+
return columns.filter(col => col.field || col.children).map(col => {
|
|
61360
|
+
if (col.children) {
|
|
61361
|
+
return {
|
|
61362
|
+
field: col.field,
|
|
61363
|
+
width: col.renderWidth,
|
|
61364
|
+
children: processColumns(col.children)
|
|
61365
|
+
};
|
|
61366
|
+
}
|
|
61367
|
+
return {
|
|
61368
|
+
field: col.field,
|
|
61369
|
+
width: col.renderWidth
|
|
61370
|
+
};
|
|
61371
|
+
});
|
|
61372
|
+
};
|
|
61373
|
+
const clos = processColumns(collectColumn);
|
|
61390
61374
|
localStorage.setItem(this.name, JSON.stringify(clos));
|
|
61391
61375
|
},
|
|
61392
61376
|
pageChange(values) {
|
|
@@ -61490,11 +61474,11 @@ var custom_column_component = normalizeComponent(
|
|
|
61490
61474
|
;
|
|
61491
61475
|
var table_component = normalizeComponent(
|
|
61492
61476
|
components_tablevue_type_script_lang_js,
|
|
61493
|
-
|
|
61494
|
-
|
|
61477
|
+
tablevue_type_template_id_5e2b3384_scoped_true_render,
|
|
61478
|
+
tablevue_type_template_id_5e2b3384_scoped_true_staticRenderFns,
|
|
61495
61479
|
false,
|
|
61496
61480
|
null,
|
|
61497
|
-
"
|
|
61481
|
+
"5e2b3384",
|
|
61498
61482
|
null
|
|
61499
61483
|
|
|
61500
61484
|
)
|
|
@@ -61773,8 +61757,6 @@ var formvue_type_template_id_dfd366a4_render = function render() {
|
|
|
61773
61757
|
};
|
|
61774
61758
|
var formvue_type_template_id_dfd366a4_staticRenderFns = [];
|
|
61775
61759
|
|
|
61776
|
-
;// ./src/components/form/form.vue?vue&type=template&id=dfd366a4
|
|
61777
|
-
|
|
61778
61760
|
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/pair-number-input.vue?vue&type=template&id=3344cc16
|
|
61779
61761
|
var pair_number_inputvue_type_template_id_3344cc16_render = function render() {
|
|
61780
61762
|
var _vm = this,
|
|
@@ -61805,8 +61787,6 @@ var pair_number_inputvue_type_template_id_3344cc16_render = function render() {
|
|
|
61805
61787
|
};
|
|
61806
61788
|
var pair_number_inputvue_type_template_id_3344cc16_staticRenderFns = [];
|
|
61807
61789
|
|
|
61808
|
-
;// ./src/components/form/comps/pair-number-input.vue?vue&type=template&id=3344cc16
|
|
61809
|
-
|
|
61810
61790
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/pair-number-input.vue?vue&type=script&lang=js
|
|
61811
61791
|
/* harmony default export */ var pair_number_inputvue_type_script_lang_js = ({
|
|
61812
61792
|
props: {
|
|
@@ -61916,8 +61896,6 @@ var custom_date_pickervue_type_template_id_2b63f178_render = function render() {
|
|
|
61916
61896
|
};
|
|
61917
61897
|
var custom_date_pickervue_type_template_id_2b63f178_staticRenderFns = [];
|
|
61918
61898
|
|
|
61919
|
-
;// ./src/components/form/comps/custom-date-picker.vue?vue&type=template&id=2b63f178
|
|
61920
|
-
|
|
61921
61899
|
// EXTERNAL MODULE: ./node_modules/moment/moment.js
|
|
61922
61900
|
var moment = __webpack_require__(9412);
|
|
61923
61901
|
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
|
|
@@ -62325,8 +62303,6 @@ var page_searchvue_type_template_id_1e091bb7_render = function render() {
|
|
|
62325
62303
|
};
|
|
62326
62304
|
var page_searchvue_type_template_id_1e091bb7_staticRenderFns = [];
|
|
62327
62305
|
|
|
62328
|
-
;// ./src/components/page-search/page-search.vue?vue&type=template&id=1e091bb7
|
|
62329
|
-
|
|
62330
62306
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/page-search/page-search.vue?vue&type=script&lang=js
|
|
62331
62307
|
|
|
62332
62308
|
|
|
@@ -62489,8 +62465,6 @@ var fold_searchvue_type_template_id_828bc332_render = function render() {
|
|
|
62489
62465
|
};
|
|
62490
62466
|
var fold_searchvue_type_template_id_828bc332_staticRenderFns = [];
|
|
62491
62467
|
|
|
62492
|
-
;// ./src/components/fold-search/index.vue?vue&type=template&id=828bc332
|
|
62493
|
-
|
|
62494
62468
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/fold-search/index.vue?vue&type=script&lang=js
|
|
62495
62469
|
/* harmony default export */ var fold_searchvue_type_script_lang_js = ({
|
|
62496
62470
|
data() {
|
|
@@ -62572,8 +62546,6 @@ var selectvue_type_template_id_74ac8720_render = function render() {
|
|
|
62572
62546
|
};
|
|
62573
62547
|
var selectvue_type_template_id_74ac8720_staticRenderFns = [];
|
|
62574
62548
|
|
|
62575
|
-
;// ./src/components/form/comps/select.vue?vue&type=template&id=74ac8720
|
|
62576
|
-
|
|
62577
62549
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/element-ui.common.js
|
|
62578
62550
|
var element_ui_common = __webpack_require__(4927);
|
|
62579
62551
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/select.vue?vue&type=script&lang=js
|
|
@@ -62732,8 +62704,6 @@ var date_picker_rangevue_type_template_id_272893a1_render = function render() {
|
|
|
62732
62704
|
};
|
|
62733
62705
|
var date_picker_rangevue_type_template_id_272893a1_staticRenderFns = [];
|
|
62734
62706
|
|
|
62735
|
-
;// ./src/components/form/comps/date-picker-range.vue?vue&type=template&id=272893a1
|
|
62736
|
-
|
|
62737
62707
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/date-picker-range.vue?vue&type=script&lang=js
|
|
62738
62708
|
|
|
62739
62709
|
|
package/lib/by-components.umd.js
CHANGED
|
@@ -60433,8 +60433,6 @@ var render = function render() {
|
|
|
60433
60433
|
};
|
|
60434
60434
|
var staticRenderFns = [];
|
|
60435
60435
|
|
|
60436
|
-
;// ./src/components/pager/index.vue?vue&type=template&id=43bb822c
|
|
60437
|
-
|
|
60438
60436
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/pager/index.vue?vue&type=script&lang=js
|
|
60439
60437
|
/* harmony default export */ var pagervue_type_script_lang_js = ({
|
|
60440
60438
|
name: 'BYPager',
|
|
@@ -60616,8 +60614,8 @@ var component = normalizeComponent(
|
|
|
60616
60614
|
)
|
|
60617
60615
|
|
|
60618
60616
|
/* harmony default export */ var pager = (component.exports);
|
|
60619
|
-
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=
|
|
60620
|
-
var
|
|
60617
|
+
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=5e2b3384&scoped=true
|
|
60618
|
+
var tablevue_type_template_id_5e2b3384_scoped_true_render = function render() {
|
|
60621
60619
|
var _vm = this,
|
|
60622
60620
|
_c = _vm._self._c;
|
|
60623
60621
|
return _c('div', [_c('vxe-grid', _vm._g(_vm._b({
|
|
@@ -60664,9 +60662,7 @@ var tablevue_type_template_id_cb534b18_scoped_true_render = function render() {
|
|
|
60664
60662
|
}
|
|
60665
60663
|
}) : _vm._e()], 1);
|
|
60666
60664
|
};
|
|
60667
|
-
var
|
|
60668
|
-
|
|
60669
|
-
;// ./src/components/table/index.vue?vue&type=template&id=cb534b18&scoped=true
|
|
60665
|
+
var tablevue_type_template_id_5e2b3384_scoped_true_staticRenderFns = [];
|
|
60670
60666
|
|
|
60671
60667
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
60672
60668
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -60676,8 +60672,6 @@ var es_iterator_filter = __webpack_require__(2489);
|
|
|
60676
60672
|
var es_iterator_find = __webpack_require__(116);
|
|
60677
60673
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.map.js
|
|
60678
60674
|
var es_iterator_map = __webpack_require__(1701);
|
|
60679
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.some.js
|
|
60680
|
-
var es_iterator_some = __webpack_require__(3579);
|
|
60681
60675
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.difference.v2.js
|
|
60682
60676
|
var es_set_difference_v2 = __webpack_require__(7642);
|
|
60683
60677
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.intersection.v2.js
|
|
@@ -60887,8 +60881,8 @@ var custom_columnvue_type_template_id_1ef83e59_render = function render() {
|
|
|
60887
60881
|
};
|
|
60888
60882
|
var custom_columnvue_type_template_id_1ef83e59_staticRenderFns = [];
|
|
60889
60883
|
|
|
60890
|
-
|
|
60891
|
-
|
|
60884
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.some.js
|
|
60885
|
+
var es_iterator_some = __webpack_require__(3579);
|
|
60892
60886
|
// EXTERNAL MODULE: ./node_modules/vuedraggable/dist/vuedraggable.umd.js
|
|
60893
60887
|
var vuedraggable_umd = __webpack_require__(3741);
|
|
60894
60888
|
var vuedraggable_umd_default = /*#__PURE__*/__webpack_require__.n(vuedraggable_umd);
|
|
@@ -61224,7 +61218,6 @@ var custom_column_component = normalizeComponent(
|
|
|
61224
61218
|
|
|
61225
61219
|
|
|
61226
61220
|
|
|
61227
|
-
|
|
61228
61221
|
/* harmony default export */ var tablevue_type_script_lang_js = ({
|
|
61229
61222
|
name: 'BYTable',
|
|
61230
61223
|
components: {
|
|
@@ -61277,8 +61270,8 @@ var custom_column_component = normalizeComponent(
|
|
|
61277
61270
|
* 'ellipsis':显示省略号
|
|
61278
61271
|
* 'tooltip':超出部分显示省略号,鼠标悬停时显示完整内容
|
|
61279
61272
|
*/
|
|
61280
|
-
showOverflow: this.autoHeight
|
|
61281
|
-
showHeaderOverflow: this.autoHeight ? 'tooltip' : true,
|
|
61273
|
+
showOverflow: !this.autoHeight,
|
|
61274
|
+
// showHeaderOverflow: this.autoHeight ? 'tooltip' : true, //表头不加,要换行显示
|
|
61282
61275
|
height: 550,
|
|
61283
61276
|
align: 'left',
|
|
61284
61277
|
copyFields: [],
|
|
@@ -61338,48 +61331,25 @@ var custom_column_component = normalizeComponent(
|
|
|
61338
61331
|
return columns;
|
|
61339
61332
|
}
|
|
61340
61333
|
|
|
61341
|
-
|
|
61342
|
-
const
|
|
61343
|
-
|
|
61344
|
-
|
|
61345
|
-
|
|
61346
|
-
|
|
61347
|
-
|
|
61334
|
+
// 递归处理多级表头的列宽
|
|
61335
|
+
const processColumnWidth = (columns, cacheColumns) => {
|
|
61336
|
+
return columns.map(column => {
|
|
61337
|
+
if (column.children) {
|
|
61338
|
+
const cacheColumn = cacheColumns.find(col => col.field === column.field);
|
|
61339
|
+
return {
|
|
61340
|
+
...column,
|
|
61341
|
+
width: (cacheColumn === null || cacheColumn === void 0 ? void 0 : cacheColumn.width) || column.width,
|
|
61342
|
+
children: processColumnWidth(column.children, (cacheColumn === null || cacheColumn === void 0 ? void 0 : cacheColumn.children) || [])
|
|
61343
|
+
};
|
|
61344
|
+
}
|
|
61345
|
+
const cacheColumn = cacheColumns.find(col => col.field === column.field);
|
|
61346
|
+
return {
|
|
61347
|
+
...column,
|
|
61348
|
+
width: (cacheColumn === null || cacheColumn === void 0 ? void 0 : cacheColumn.width) || column.width
|
|
61349
|
+
};
|
|
61348
61350
|
});
|
|
61349
|
-
}
|
|
61350
|
-
return columns;
|
|
61351
|
-
},
|
|
61352
|
-
/**
|
|
61353
|
-
* 更新列宽缓存
|
|
61354
|
-
* 比较columns和cacheColumns列宽缓存数据,如果有变动(表头有增加或删除),更新缓存
|
|
61355
|
-
* 如果columns的列在cacheColumns中不存在,则说明是新增的列,将对应的列加入到缓存中
|
|
61356
|
-
* 如果cacheColumns的列在columns中不存在,则说明是删除的列,将对应的列从缓存中删除
|
|
61357
|
-
* @param columns 当前表格列配置
|
|
61358
|
-
* @param cacheColumns 缓存列配置
|
|
61359
|
-
*/
|
|
61360
|
-
compareColumnsAndCols(columns, cacheColumns) {
|
|
61361
|
-
if (!cacheColumns || !this.name) {
|
|
61362
|
-
return undefined;
|
|
61363
|
-
}
|
|
61364
|
-
// 如果columns的列在cacheColumns中不存在,则说明是新增的列,将对应的列加入到缓存中
|
|
61365
|
-
columns.forEach(item => {
|
|
61366
|
-
if (item && item.field && !cacheColumns.some(col => col && col.field === item.field)) {
|
|
61367
|
-
cacheColumns.push({
|
|
61368
|
-
field: item.field,
|
|
61369
|
-
width: item.width
|
|
61370
|
-
});
|
|
61371
|
-
}
|
|
61372
|
-
});
|
|
61373
|
-
|
|
61374
|
-
// ⚠️注意:这里不能执行删除逻辑,否则如果自定义列的话,初始是没有列数据的,会导致原先的缓存数据被清空
|
|
61375
|
-
// 如果cacheColumns的列在columns中不存在,则说明是删除的列,将对应的列从缓存中删除
|
|
61376
|
-
// const newCacheColumns = cacheColumns.filter(
|
|
61377
|
-
// item => item && item.field && columns.some(col => col && col.field === item.field)
|
|
61378
|
-
// )
|
|
61379
|
-
|
|
61380
|
-
// 更新缓存
|
|
61381
|
-
localStorage.setItem(this.name, JSON.stringify(cacheColumns));
|
|
61382
|
-
return cacheColumns;
|
|
61351
|
+
};
|
|
61352
|
+
return processColumnWidth(columns, cacheColumns);
|
|
61383
61353
|
},
|
|
61384
61354
|
handleCellClick(context) {
|
|
61385
61355
|
if (this.options.copyFields.includes(context.column.field)) {
|
|
@@ -61393,10 +61363,24 @@ var custom_column_component = normalizeComponent(
|
|
|
61393
61363
|
if (!this.name) return;
|
|
61394
61364
|
const collectColumn = context.$table.collectColumn;
|
|
61395
61365
|
console.log(collectColumn, 'collectColumn');
|
|
61396
|
-
|
|
61397
|
-
|
|
61398
|
-
|
|
61399
|
-
|
|
61366
|
+
|
|
61367
|
+
// 递归处理多级表头
|
|
61368
|
+
const processColumns = columns => {
|
|
61369
|
+
return columns.filter(col => col.field || col.children).map(col => {
|
|
61370
|
+
if (col.children) {
|
|
61371
|
+
return {
|
|
61372
|
+
field: col.field,
|
|
61373
|
+
width: col.renderWidth,
|
|
61374
|
+
children: processColumns(col.children)
|
|
61375
|
+
};
|
|
61376
|
+
}
|
|
61377
|
+
return {
|
|
61378
|
+
field: col.field,
|
|
61379
|
+
width: col.renderWidth
|
|
61380
|
+
};
|
|
61381
|
+
});
|
|
61382
|
+
};
|
|
61383
|
+
const clos = processColumns(collectColumn);
|
|
61400
61384
|
localStorage.setItem(this.name, JSON.stringify(clos));
|
|
61401
61385
|
},
|
|
61402
61386
|
pageChange(values) {
|
|
@@ -61500,11 +61484,11 @@ var custom_column_component = normalizeComponent(
|
|
|
61500
61484
|
;
|
|
61501
61485
|
var table_component = normalizeComponent(
|
|
61502
61486
|
components_tablevue_type_script_lang_js,
|
|
61503
|
-
|
|
61504
|
-
|
|
61487
|
+
tablevue_type_template_id_5e2b3384_scoped_true_render,
|
|
61488
|
+
tablevue_type_template_id_5e2b3384_scoped_true_staticRenderFns,
|
|
61505
61489
|
false,
|
|
61506
61490
|
null,
|
|
61507
|
-
"
|
|
61491
|
+
"5e2b3384",
|
|
61508
61492
|
null
|
|
61509
61493
|
|
|
61510
61494
|
)
|
|
@@ -61783,8 +61767,6 @@ var formvue_type_template_id_dfd366a4_render = function render() {
|
|
|
61783
61767
|
};
|
|
61784
61768
|
var formvue_type_template_id_dfd366a4_staticRenderFns = [];
|
|
61785
61769
|
|
|
61786
|
-
;// ./src/components/form/form.vue?vue&type=template&id=dfd366a4
|
|
61787
|
-
|
|
61788
61770
|
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/pair-number-input.vue?vue&type=template&id=3344cc16
|
|
61789
61771
|
var pair_number_inputvue_type_template_id_3344cc16_render = function render() {
|
|
61790
61772
|
var _vm = this,
|
|
@@ -61815,8 +61797,6 @@ var pair_number_inputvue_type_template_id_3344cc16_render = function render() {
|
|
|
61815
61797
|
};
|
|
61816
61798
|
var pair_number_inputvue_type_template_id_3344cc16_staticRenderFns = [];
|
|
61817
61799
|
|
|
61818
|
-
;// ./src/components/form/comps/pair-number-input.vue?vue&type=template&id=3344cc16
|
|
61819
|
-
|
|
61820
61800
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/pair-number-input.vue?vue&type=script&lang=js
|
|
61821
61801
|
/* harmony default export */ var pair_number_inputvue_type_script_lang_js = ({
|
|
61822
61802
|
props: {
|
|
@@ -61926,8 +61906,6 @@ var custom_date_pickervue_type_template_id_2b63f178_render = function render() {
|
|
|
61926
61906
|
};
|
|
61927
61907
|
var custom_date_pickervue_type_template_id_2b63f178_staticRenderFns = [];
|
|
61928
61908
|
|
|
61929
|
-
;// ./src/components/form/comps/custom-date-picker.vue?vue&type=template&id=2b63f178
|
|
61930
|
-
|
|
61931
61909
|
// EXTERNAL MODULE: ./node_modules/moment/moment.js
|
|
61932
61910
|
var moment = __webpack_require__(9618);
|
|
61933
61911
|
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
|
|
@@ -62335,8 +62313,6 @@ var page_searchvue_type_template_id_1e091bb7_render = function render() {
|
|
|
62335
62313
|
};
|
|
62336
62314
|
var page_searchvue_type_template_id_1e091bb7_staticRenderFns = [];
|
|
62337
62315
|
|
|
62338
|
-
;// ./src/components/page-search/page-search.vue?vue&type=template&id=1e091bb7
|
|
62339
|
-
|
|
62340
62316
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/page-search/page-search.vue?vue&type=script&lang=js
|
|
62341
62317
|
|
|
62342
62318
|
|
|
@@ -62499,8 +62475,6 @@ var fold_searchvue_type_template_id_828bc332_render = function render() {
|
|
|
62499
62475
|
};
|
|
62500
62476
|
var fold_searchvue_type_template_id_828bc332_staticRenderFns = [];
|
|
62501
62477
|
|
|
62502
|
-
;// ./src/components/fold-search/index.vue?vue&type=template&id=828bc332
|
|
62503
|
-
|
|
62504
62478
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/fold-search/index.vue?vue&type=script&lang=js
|
|
62505
62479
|
/* harmony default export */ var fold_searchvue_type_script_lang_js = ({
|
|
62506
62480
|
data() {
|
|
@@ -62582,8 +62556,6 @@ var selectvue_type_template_id_74ac8720_render = function render() {
|
|
|
62582
62556
|
};
|
|
62583
62557
|
var selectvue_type_template_id_74ac8720_staticRenderFns = [];
|
|
62584
62558
|
|
|
62585
|
-
;// ./src/components/form/comps/select.vue?vue&type=template&id=74ac8720
|
|
62586
|
-
|
|
62587
62559
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/element-ui.common.js
|
|
62588
62560
|
var element_ui_common = __webpack_require__(3421);
|
|
62589
62561
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/select.vue?vue&type=script&lang=js
|
|
@@ -62742,8 +62714,6 @@ var date_picker_rangevue_type_template_id_272893a1_render = function render() {
|
|
|
62742
62714
|
};
|
|
62743
62715
|
var date_picker_rangevue_type_template_id_272893a1_staticRenderFns = [];
|
|
62744
62716
|
|
|
62745
|
-
;// ./src/components/form/comps/date-picker-range.vue?vue&type=template&id=272893a1
|
|
62746
|
-
|
|
62747
62717
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/date-picker-range.vue?vue&type=script&lang=js
|
|
62748
62718
|
|
|
62749
62719
|
|
|
@@ -328,4 +328,4 @@ var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e
|
|
|
328
328
|
//! moment.js locale configuration
|
|
329
329
|
var t=e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}});return t}))},9786:function(e,t,n){var i=n(6903),r=n(6791),a=n(3971),s=n(4632),o=n(3066),l="prototype",u=function(e,t,n){var c,d,h,f=e&u.F,p=e&u.G,m=e&u.S,_=e&u.P,v=e&u.B,g=e&u.W,y=p?r:r[t]||(r[t]={}),b=y[l],w=p?i:m?i[t]:(i[t]||{})[l];for(c in p&&(n=t),n)d=!f&&w&&void 0!==w[c],d&&o(y,c)||(h=d?w[c]:n[c],y[c]=p&&"function"!=typeof w[c]?n[c]:v&&d?a(h,i):g&&w[c]==h?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t[l]=e[l],t}(h):_&&"function"==typeof h?a(Function.call,h):h,_&&((y.virtual||(y.virtual={}))[c]=h,e&u.R&&b&&!b[c]&&s(b,c,h)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},9813:function(e,t,n){"use strict";n(4114),n(8111),n(7588),t.__esModule=!0;var i=n(9274),r=s(i),a=n(2172);function s(e){return e&&e.__esModule?e:{default:e}}var o=!1,l=!1,u=void 0,c=function(){if(!r.default.prototype.$isServer){var e=h.modalDom;return e?o=!0:(o=!1,e=document.createElement("div"),h.modalDom=e,e.addEventListener("touchmove",(function(e){e.preventDefault(),e.stopPropagation()})),e.addEventListener("click",(function(){h.doOnModalClick&&h.doOnModalClick()}))),e}},d={},h={modalFade:!0,getInstance:function(e){return d[e]},register:function(e,t){e&&t&&(d[e]=t)},deregister:function(e){e&&(d[e]=null,delete d[e])},nextZIndex:function(){return h.zIndex++},modalStack:[],doOnModalClick:function(){var e=h.modalStack[h.modalStack.length-1];if(e){var t=h.getInstance(e.id);t&&t.closeOnClickModal&&t.close()}},openModal:function(e,t,n,i,s){if(!r.default.prototype.$isServer&&e&&void 0!==t){this.modalFade=s;for(var l=this.modalStack,u=0,d=l.length;u<d;u++){var h=l[u];if(h.id===e)return}var f=c();if((0,a.addClass)(f,"v-modal"),this.modalFade&&!o&&(0,a.addClass)(f,"v-modal-enter"),i){var p=i.trim().split(/\s+/);p.forEach((function(e){return(0,a.addClass)(f,e)}))}setTimeout((function(){(0,a.removeClass)(f,"v-modal-enter")}),200),n&&n.parentNode&&11!==n.parentNode.nodeType?n.parentNode.appendChild(f):document.body.appendChild(f),t&&(f.style.zIndex=t),f.tabIndex=0,f.style.display="",this.modalStack.push({id:e,zIndex:t,modalClass:i})}},closeModal:function(e){var t=this.modalStack,n=c();if(t.length>0){var i=t[t.length-1];if(i.id===e){if(i.modalClass){var r=i.modalClass.trim().split(/\s+/);r.forEach((function(e){return(0,a.removeClass)(n,e)}))}t.pop(),t.length>0&&(n.style.zIndex=t[t.length-1].zIndex)}else for(var s=t.length-1;s>=0;s--)if(t[s].id===e){t.splice(s,1);break}}0===t.length&&(this.modalFade&&(0,a.addClass)(n,"v-modal-leave"),setTimeout((function(){0===t.length&&(n.parentNode&&n.parentNode.removeChild(n),n.style.display="none",h.modalDom=void 0),(0,a.removeClass)(n,"v-modal-leave")}),200))}};Object.defineProperty(h,"zIndex",{configurable:!0,get:function(){return l||(u=u||(r.default.prototype.$ELEMENT||{}).zIndex||2e3,l=!0),u},set:function(e){u=e}});var f=function(){if(!r.default.prototype.$isServer&&h.modalStack.length>0){var e=h.modalStack[h.modalStack.length-1];if(!e)return;var t=h.getInstance(e.id);return t}};r.default.prototype.$isServer||window.addEventListener("keydown",(function(e){if(27===e.keyCode){var t=f();t&&t.closeOnPressEscape&&(t.handleClose?t.handleClose():t.handleAction?t.handleAction("cancel"):t.close())}})),t["default"]=h},9821:function(e,t,n){(function(e,t){t(n(6879))})(0,(function(e){"use strict";
|
|
330
330
|
//! moment.js locale configuration
|
|
331
|
-
function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,i){var r={ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:n?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===i?n?"хвіліна":"хвіліну":"h"===i?n?"гадзіна":"гадзіну":e+" "+t(r[i],+e)}var i=e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:n,mm:n,h:n,hh:n,d:"дзень",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!==2&&e%10!==3||e%100===12||e%100===13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}});return i}))},9979:function(e,t,n){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=78)}({0:function(e,t,n){"use strict";function i(e,t,n,i,r,a,s,o){var l,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=l):r&&(l=o?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:u}}n.d(t,"a",(function(){return i}))},2:function(e,t){e.exports=n(2172)},3:function(e,t){e.exports=n(5294)},5:function(e,t){e.exports=n(9731)},7:function(e,t){e.exports=n(9274)},78:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",[n("transition",{attrs:{name:e.transition},on:{"after-enter":e.handleAfterEnter,"after-leave":e.handleAfterLeave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.disabled&&e.showPopper,expression:"!disabled && showPopper"}],ref:"popper",staticClass:"el-popover el-popper",class:[e.popperClass,e.content&&"el-popover--plain"],style:{width:e.width+"px"},attrs:{role:"tooltip",id:e.tooltipId,"aria-hidden":e.disabled||!e.showPopper?"true":"false"}},[e.title?n("div",{staticClass:"el-popover__title",domProps:{textContent:e._s(e.title)}}):e._e(),e._t("default",[e._v(e._s(e.content))])],2)]),n("span",{ref:"wrapper",staticClass:"el-popover__reference-wrapper"},[e._t("reference")],2)],1)},r=[];i._withStripped=!0;var a=n(5),s=n.n(a),o=n(2),l=n(3),u={name:"ElPopover",mixins:[s.a],props:{trigger:{type:String,default:"click",validator:function(e){return["click","focus","hover","manual"].indexOf(e)>-1}},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:200},title:String,disabled:Boolean,content:String,reference:{},popperClass:String,width:{},visibleArrow:{default:!0},arrowOffset:{type:Number,default:0},transition:{type:String,default:"fade-in-linear"},tabindex:{type:Number,default:0}},computed:{tooltipId:function(){return"el-popover-"+Object(l["generateId"])()}},watch:{showPopper:function(e){this.disabled||(e?this.$emit("show"):this.$emit("hide"))}},mounted:function(){var e=this,t=this.referenceElm=this.reference||this.$refs.reference,n=this.popper||this.$refs.popper;!t&&this.$refs.wrapper.children&&(t=this.referenceElm=this.$refs.wrapper.children[0]),t&&(Object(o["addClass"])(t,"el-popover__reference"),t.setAttribute("aria-describedby",this.tooltipId),t.setAttribute("tabindex",this.tabindex),n.setAttribute("tabindex",0),"click"!==this.trigger&&(Object(o["on"])(t,"focusin",(function(){e.handleFocus();var n=t.__vue__;n&&"function"===typeof n.focus&&n.focus()})),Object(o["on"])(n,"focusin",this.handleFocus),Object(o["on"])(t,"focusout",this.handleBlur),Object(o["on"])(n,"focusout",this.handleBlur)),Object(o["on"])(t,"keydown",this.handleKeydown),Object(o["on"])(t,"click",this.handleClick)),"click"===this.trigger?(Object(o["on"])(t,"click",this.doToggle),Object(o["on"])(document,"click",this.handleDocumentClick)):"hover"===this.trigger?(Object(o["on"])(t,"mouseenter",this.handleMouseEnter),Object(o["on"])(n,"mouseenter",this.handleMouseEnter),Object(o["on"])(t,"mouseleave",this.handleMouseLeave),Object(o["on"])(n,"mouseleave",this.handleMouseLeave)):"focus"===this.trigger&&(this.tabindex<0&&console.warn("[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key"),t.querySelector("input, textarea")?(Object(o["on"])(t,"focusin",this.doShow),Object(o["on"])(t,"focusout",this.doClose)):(Object(o["on"])(t,"mousedown",this.doShow),Object(o["on"])(t,"mouseup",this.doClose)))},beforeDestroy:function(){this.cleanup()},deactivated:function(){this.cleanup()},methods:{doToggle:function(){this.showPopper=!this.showPopper},doShow:function(){this.showPopper=!0},doClose:function(){this.showPopper=!1},handleFocus:function(){Object(o["addClass"])(this.referenceElm,"focusing"),"click"!==this.trigger&&"focus"!==this.trigger||(this.showPopper=!0)},handleClick:function(){Object(o["removeClass"])(this.referenceElm,"focusing")},handleBlur:function(){Object(o["removeClass"])(this.referenceElm,"focusing"),"click"!==this.trigger&&"focus"!==this.trigger||(this.showPopper=!1)},handleMouseEnter:function(){var e=this;clearTimeout(this._timer),this.openDelay?this._timer=setTimeout((function(){e.showPopper=!0}),this.openDelay):this.showPopper=!0},handleKeydown:function(e){27===e.keyCode&&"manual"!==this.trigger&&this.doClose()},handleMouseLeave:function(){var e=this;clearTimeout(this._timer),this.closeDelay?this._timer=setTimeout((function(){e.showPopper=!1}),this.closeDelay):this.showPopper=!1},handleDocumentClick:function(e){var t=this.reference||this.$refs.reference,n=this.popper||this.$refs.popper;!t&&this.$refs.wrapper.children&&(t=this.referenceElm=this.$refs.wrapper.children[0]),this.$el&&t&&!this.$el.contains(e.target)&&!t.contains(e.target)&&n&&!n.contains(e.target)&&(this.showPopper=!1)},handleAfterEnter:function(){this.$emit("after-enter")},handleAfterLeave:function(){this.$emit("after-leave"),this.doDestroy()},cleanup:function(){(this.openDelay||this.closeDelay)&&clearTimeout(this._timer)}},destroyed:function(){var e=this.reference;Object(o["off"])(e,"click",this.doToggle),Object(o["off"])(e,"mouseup",this.doClose),Object(o["off"])(e,"mousedown",this.doShow),Object(o["off"])(e,"focusin",this.doShow),Object(o["off"])(e,"focusout",this.doClose),Object(o["off"])(e,"mousedown",this.doShow),Object(o["off"])(e,"mouseup",this.doClose),Object(o["off"])(e,"mouseleave",this.handleMouseLeave),Object(o["off"])(e,"mouseenter",this.handleMouseEnter),Object(o["off"])(document,"click",this.handleDocumentClick)}},c=u,d=n(0),h=Object(d["a"])(c,i,r,!1,null,null,null);h.options.__file="packages/popover/src/main.vue";var f=h.exports,p=function(e,t,n){var i=t.expression?t.value:t.arg,r=n.context.$refs[i];r&&(Array.isArray(r)?r[0].$refs.reference=e:r.$refs.reference=e)},m={bind:function(e,t,n){p(e,t,n)},inserted:function(e,t,n){p(e,t,n)}},_=n(7),v=n.n(_);v.a.directive("popover",m),f.install=function(e){e.directive("popover",m),e.component(f.name,f)},f.directive=m;t["default"]=f}})}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}!function(){i.amdO={}}(),function(){i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,{a:t}),t}}(),function(){i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){i.p=""}();var r={};return function(){"use strict";if(i.r(r),i.d(r,{default:function(){return qe}}),"undefined"!==typeof window){var e=window.document.currentScript,t=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);t&&(i.p=t[1])}i(8111),i(7588);var n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"pager fixed bottom-0 right-0 w-full flex justify-center items-center z-50",attrs:{id:"pager"}},[t("el-pagination",{attrs:{"current-page":e.pager["page"],"page-size":e.pager["limit"],"page-sizes":e.pageSizes,background:"",layout:"total, prev, pager, next,sizes, jumper",total:e.totalCount},on:{"size-change":t=>e.handleValueChange(t,"limit"),"current-change":t=>e.handleValueChange(t,"page")}})],1)},a=[],s={name:"BYPager",props:{limit:{type:Number,default:15},page:{type:Number,default:1},totalCount:{type:Number,required:!0,default:25},pageSizes:{type:Array,default:()=>[10,15,20,25,30,50,100]}},data(){return{pager:{page:this.page,limit:this.limit}}},watch:{page:{handler:function(e,t){this.pager.page=e},immediate:!0},limit:{handler:function(e,t){this.pager.limit=e},immediate:!0}},mounted(){document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue="跳至",document.getElementsByClassName("el-pagination__jump")[0].childNodes[2].nodeValue=""},methods:{handleValueChange(e,t){if(!e)return;const n={...this.pager,[t]:e,page:"limit"===t?1:e};this.$emit("onChange",n)}}},o=s;function l(e,t,n,i,r,a,s,o){var l,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=l):r&&(l=o?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:u}}var u=l(o,n,a,!1,null,null,null),c=u.exports,d=function(){var e=this,t=e._self._c;return t("div",[t("vxe-grid",e._g(e._b({ref:"xGrid",on:{"cell-click":e.handleCellClick,"resizable-change":e.handleResizableChange},scopedSlots:e._u([e._l(e.slotMap,(function(t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}})),e.options.pagerConfig?{key:"pager",fn:function(){return[t("by-pager",{attrs:{page:e.options.pagerConfig.currentPage,limit:e.options.pagerConfig.pageSize,"total-count":e.options.pagerConfig.total,"page-sizes":e.options.pagerConfig.pageSizes},on:{onChange:e.pageChange}})]},proxy:!0}:null],null,!0)},"vxe-grid",e.options,!1),e.eventListeners)),e.gridOptions.customColumnConfig&&e.gridOptions.customColumnConfig.showCustomColumn?t("CustomColumn",{ref:"CustomColumnRef",attrs:{"info-method":e.gridOptions.customColumnConfig.infoMethod,"submit-method":e.gridOptions.customColumnConfig.submitMethod,"dialog-visible":e.customTableVisible},on:{closeDialog:e.closeCustomColumnDialog,changeTable:e.changeTableFields,changeTableGroup:e.changeTableGroupFields}}):e._e()],1)},h=[],f=(i(4114),i(2489),i(116),i(1701),i(3579),i(7642),i(8004),i(3853),i(5876),i(2475),i(5024),i(1698),function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"custom_column"}},[t("el-dialog",{attrs:{"close-on-click-modal":!1,visible:e.dialogVisible,width:"920px","append-to-body":!0,"show-close":!1,"custom-class":"custom_dialog_class"},on:{close:e.closeDialog},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-row",{staticStyle:{"margin-top":"7px"}},[t("el-button",{staticStyle:{width:"96px"},attrs:{size:"small"},on:{click:e.closeDialog}},[e._v("取消")]),t("el-button",{staticStyle:{width:"96px"},attrs:{size:"small",type:"primary"},on:{click:e.submit}},[e._v("确定")])],1)]},proxy:!0}])},[t("div",{staticClass:"el-dialog-box"},[t("div",{staticClass:"left_box"},[t("div",{staticClass:"box_title"},[e._v("数据指标")]),t("div",{staticClass:"row",staticStyle:{"padding-right":"20px"}},[t("div",{staticClass:"cell"},[t("el-input",{staticStyle:{width:"228px","margin-bottom":"10px"},attrs:{placeholder:"搜索指标",size:"medium","prefix-icon":"el-icon-search"},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1),t("el-button",{attrs:{type:"text"},on:{click:e.selectNone}},[e._v("全不选")])],1),t("div",{staticClass:"left_box_body"},[t("div",{staticClass:"left_nav"},[t("ul",e._l(e.checkBoxMenuBySearch,(function(n,i){return t("li",{key:i,class:{active:e.activeId===i},on:{click:function(t){return e.setHighlight(i)}}},[e._v(" "+e._s(n.label)+" ")])})),0)]),t("div",{staticClass:"left_menu"},e._l(e.checkBoxMenuBySearch,(function(n,i){return t("div",{key:i,ref:"tagItem",refInFor:!0},[t("div",{staticClass:"checkbox_title"},[e._v(" "+e._s(n.label)+" ")]),t("el-row",e._l(n.data,(function(n,i){return t("el-col",{key:i,staticStyle:{"margin-bottom":"3px"},attrs:{span:12}},[t("el-checkbox",{on:{change:function(t){return e.changeCheckbox(n.key,n.type)}},model:{value:n.type,callback:function(t){e.$set(n,"type",t)},expression:"each.type"}},[e._v(" "+e._s(n.label)+" ")])],1)})),1)],1)})),0)])]),t("div",{staticClass:"right_box"},[t("div",{staticClass:"drag_box"},[t("el-row",[t("div",{staticClass:"drag_text_box"},[t("span",{staticClass:"drag_title"},[e._v(e._s(`已选指标(${e.number})`))]),t("span",{staticClass:"recover",on:{click:e.recoverDefault}},[e._v("恢复默认")])])]),t("div",{staticClass:"drag_ul"},[t("draggable",{attrs:{"chosen-class":"chosen","force-fallback":"true",animation:"500"},on:{end:e.onEnd},model:{value:e.draggableMenu,callback:function(t){e.draggableMenu=t},expression:"draggableMenu"}},[t("transition-group",e._l(e.draggableMenu,(function(n){return t("div",{directives:[{name:"show",rawName:"v-show",value:n.type,expression:"col.type"}],key:n.key,class:"sort-cut-off"===n.key?"fixedClass":"drag_li_box"},["sort-cut-off"!==n.key?t("div",[t("i",{staticClass:"el-icon-rank icon-box"}),t("span",{staticClass:"drag_li_text"},[e._v(e._s(n.label))])]):e._e(),"sort-cut-off"!==n.key?t("i",{staticClass:"el-icon-close remove",on:{click:function(t){return e.changeCheckbox(n.key,!1)}}}):e._e()])})),0)],1)],1)],1)])])])],1)}),p=[],m=i(6906),_=i.n(m);const v=e=>{let t;if("object"===typeof e)if(Array.isArray(e)){t=[];for(const n in e)t.push(v(e[n]))}else if(null===e)t=null;else if(e.constructor===RegExp)t=e;else{t={};for(const n in e)t[n]=v(e[n])}else t=e;return t};var g={name:"CustomColumn",components:{draggable:_()},props:{dialogVisible:{type:Boolean,default:!1},infoMethod:{type:Function,required:!0,default:()=>{}},submitMethod:{type:Function,required:!0,default:()=>{}}},data(){return{draggableMenu:[],checkBoxMenu:[],activeId:0,id:void 0,page:"",search:""}},computed:{number(){return this.draggableMenu.filter((e=>e.type&&"sort-cut-off"!==e.key)).length},checkBoxMenuBySearch(){return this.search?this.checkBoxMenu.map((e=>{const t=e.data.filter((e=>e.label.includes(this.search)));return{label:e.label,data:t}})).filter((e=>e.data.length>0)):this.checkBoxMenu}},methods:{deepClone:v,async getCustomTableList(e,t){if(!e)throw new Error("缺少表格列接口路径");{this.columnList=this.deepClone(t),this.page=e||"";const n=[],i=await this.infoMethod({page:e});"[]"!==JSON.stringify(i.data)&&(this.id=i.data.id||void 0,i.data.column.forEach((e=>n.push(...e.data)))),this.initTableList(this.deepClone(t),n)}},initTableList(e,t=[]){const n=e=>{const t=[];if(e.forEach((e=>t.push(...e.data))),t.sort(((e,t)=>e.sort-t.sort)),t.some((e=>e.fixed))){let e=0;for(let n=0;n<=t.length;n++){const i=t[n],r=t[n+1];if("left"===i.fixed&&(!r||!r.fixed)){e=n+1;break}}t.splice(e,0,{type:!0,label:"",key:"sort-cut-off",parent:""})}return t};if(t&&t.length>0)e.forEach((e=>{e.data.forEach((n=>{const i=t.find((e=>e.key===n.key))||{};n.type="true"===i.type||!0===i.type,n.sort=i.sort,n.fixed=i.fixed?i.fixed:n.fixed,n.parent={label:e.label}}))})),this.checkBoxMenu=this.deepClone(e),this.draggableMenu=n(this.checkBoxMenu);else{let t=0;e.forEach((e=>{e.data.forEach((n=>{t++,n.type=!0,n.width=n.width?+n.width:0,n.sort=t,n.parent={label:e.label}}))})),this.checkBoxMenu=this.deepClone(e),this.draggableMenu=n(this.checkBoxMenu)}this.$emit("changeTable",this.draggableMenu.filter((e=>"sort-cut-off"!==e.key)).sort(((e,t)=>e.sort-t.sort))),this.$emit("changeTableGroup",this.checkBoxMenu)},selectNone(){this.checkBoxMenu.forEach((e=>e.data.forEach((e=>e.type=!1)))),this.draggableMenu.forEach((e=>{"sort-cut-off"===e.key?e.type=!0:e.type=!1}))},setHighlight(e){this.activeId=e,this.$refs.tagItem&&this.$refs.tagItem[e].scrollIntoView({behavior:"smooth"})},changeCheckbox(e,t){this.draggableMenu.forEach((n=>{n.key===e&&(n.type=t)})),this.checkBoxMenu.forEach((n=>{n.data.forEach((n=>{n.key===e&&(n.type=t)}))}))},recoverDefault(){this.initTableList(this.deepClone(this.columnList))},onEnd(){let e=!0;this.draggableMenu.forEach(((t,n)=>{"sort-cut-off"===t.key&&(e=!1),e?(t.sort=n+1,t.fixed="left"):(t.sort=n,delete t.fixed)}))},async submit(){const e={column:[],id:this.id,page:this.page};this.draggableMenu.forEach((t=>{if("sort-cut-off"!==t.key){const{parent:n,...i}=t,r=e.column.some((e=>e.label===n.label));r?e.column.forEach((e=>{e.label===n.label&&e.data.push(i)})):e.column.push({label:n.label,data:[i]})}})),await this.submitMethod(e);const t=[];e.column.forEach((e=>{t.push(...e.data)})),this.$emit("changeTable",t.sort(((e,t)=>e.sort-t.sort))),this.$emit("changeTableGroup",e.column),this.closeDialog()},closeDialog(){this.search="",this.activeId=0,this.$emit("closeDialog")}}},y=g,b=l(y,f,p,!1,null,null,null),w=b.exports,k={name:"BYTable",components:{CustomColumn:w},props:{gridOptions:{type:Object,default:()=>{}},name:{type:String,default:""},autoHeight:{type:Boolean,default:!1}},data(){return{events:["keydown","current-change","radio-change","checkbox-change","checkbox-all","checkbox-range-start","checkbox-range-change","checkbox-range-end","cell-dblclick","cell-menu","cell-mouseenter","cell-mouseleave","cell-delete-value","header-cell-click","header-cell-dblclick","header-cell-menu","footer-cell-click","footer-cell-dblclick","footer-cell-menu","clear-merge","sort-change","clear-sort","filter-visible","filter-change","clear-filter","toggle-row-expand","toggle-tree-expand","menu-click","cell-selected","edit-closed","edit-activated","edit-disabled","valid-error","scroll","custom","page-change","form-submit","form-submit-invalid","form-reset","form-collapse","proxy-query","proxy-delete","proxy-save","toolbar-button-click","toolbar-tool-click","zoom"],customTableVisible:!1}},computed:{options(){const{customColumnConfig:e,columns:t,...n}=this.gridOptions,i=this.getColumnsData(t);return{border:!0,resizable:!0,showOverflow:!this.autoHeight||"visible",showHeaderOverflow:!this.autoHeight||"tooltip",height:550,align:"left",copyFields:[],pagerConfig:!1,emptyText:"暂无数据",loadingConfig:{text:"加载中..."},columns:i,...n,resizableConfig:{minWidth:50,...this.gridOptions.resizableConfig},rowConfig:{height:41,isHover:!0,...this.gridOptions.rowConfig},sortConfig:{remote:!0,trigger:"cell",...this.gridOptions.sortConfig}}},slotMap(){var e,t,n;const i=new Set([]),r=null!==(e=null===(t=this.gridOptions)||void 0===t||null===(n=t.customColumnConfig)||void 0===n?void 0:n.slots)&&void 0!==e?e:[];return this.options.columns.forEach((e=>{if(e.slots){const t=Object.values(e.slots);t.forEach((e=>i.add(e)))}})),[...Array.from(i),...r]},eventListeners(){const e={};return this.events.forEach((t=>{e[t]=e=>this.$emit(t,e)})),e}},methods:{getColumnsData(e){if(!this.name)return e;const t=JSON.parse(localStorage.getItem(this.name));if(!t)return e;const n=this.compareColumnsAndCols(e,t);return n&&this.name&&e.forEach((e=>{e.width=(n.find((t=>t.field===e.field))||{}).width||e.width||void 0})),e},compareColumnsAndCols(e,t){if(t&&this.name)return e.forEach((e=>{e&&e.field&&!t.some((t=>t&&t.field===e.field))&&t.push({field:e.field,width:e.width})})),localStorage.setItem(this.name,JSON.stringify(t)),t},handleCellClick(e){if(this.options.copyFields.includes(e.column.field)){const t=e.cell.outerText;this.copy(t)}this.$emit("cell-click",e)},handleResizableChange(e){if(this.$emit("resizable-change",e),!this.name)return;const t=e.$table.collectColumn;console.log(t,"collectColumn");const n=t.filter((e=>e.field)).map((e=>({field:e.field,width:e.renderWidth})));localStorage.setItem(this.name,JSON.stringify(n))},pageChange(e){this.$emit("page-change",e)},copy(e){const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),this.$message({message:"复制成功",type:"success"}),t.remove()},getCustomColumnRef(){return this.$refs.CustomColumnRef},handleOpenCustomColumn(){this.customTableVisible=!0},changeTableFields(e){const t=[];e.forEach((e=>{!t.some((t=>t.field===e.key))&&e.type&&t.push({field:e.key,title:e.label,minWidth:e.minWidth||e.width,maxWidth:e.maxWidth,sortable:"undefined"===typeof e.sortable||JSON.parse(e.sortable),fixed:e.fixed,slots:this.gridOptions.customColumnConfig.slots.includes(e.key)?{default:e.key}:void 0})}));const n=this.getColumnsData(t);this.$emit("setColumn",n)},changeTableGroupFields(e){const t=e=>{const n=[];return e.forEach(((i,r)=>{i.data&&i.data.length>0?(n.push({title:i.label,align:"center",children:t(i.data)}),r<e.length-1&&n.push({title:"",width:5,headerClassName:"group-split",className:"group-split"})):!n.some((e=>e.field===i.key))&&i.type&&n.push({field:i.key,title:i.label,minWidth:i.minWidth||i.width,maxWidth:i.maxWidth,sortable:"undefined"===typeof i.sortable||JSON.parse(i.sortable),fixed:i.fixed,slots:this.gridOptions.customColumnConfig.slots.includes(i.key)?{default:i.key}:void 0})})),n};this.$emit("setGroupColumn",t(e))},closeCustomColumnDialog(){this.customTableVisible=!1}}},M=k,x=l(M,d,h,!1,null,"cb534b18",null),D=x.exports,L=function(){var e=this,t=e._self._c;return t("div",{staticClass:"b-form"},[t("div",{staticClass:"header"},[e._t("header")],2),t("el-form",{ref:"formRef",staticClass:"myForm",attrs:{"label-position":e.labelPosition,rules:e.rules,"label-width":e.labelWidth,inline:e.inline,model:e.value,"label-suffix":":"},nativeOn:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)},reset:function(t){return t.preventDefault(),e.reset.apply(null,arguments)}}},[t("el-row",[e._l(e.formItems,(function(n){var i,r,a;return[n.isHidden?e._e():t("el-col",e._b({directives:[{name:"show",rawName:"v-show",value:e.showFold(n),expression:"showFold(item)"}],key:n.label},"el-col",n.colLayout||e.colLayout,!1),[t("el-form-item",{style:n.itemStyle||e.itemStyle,attrs:{label:n.label||"",rules:n.rules,prop:n.field,"label-width":n.labelWidth||e.labelWidth}},["input"===n.type||"password"===n.type?[t("el-input",e._b({staticStyle:{width:"100%"},attrs:{placeholder:n.placeholder,clearable:"","show-password":"password"===n.type,value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-input",n.otherOptions,!1),[n.otherOptions&&n.otherOptions.isPrefix?e._t("prefix",(function(){return["select"===n.otherOptions.prefixType?t("el-select",{style:{width:"100px"},attrs:{slot:"prepend",value:e.value[`${n.otherOptions.prefixField}`],placeholder:"请选择"},on:{input:function(t){return e.handleValueChange(t,n.otherOptions)}},slot:"prepend"},e._l(n.otherOptions.prefixOption,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1):e._e()]})):e._e(),e._t("suffix"),e._t("prepend"),e._t("append")],2)]:"select"===n.type?[t("by-select",e._b({staticStyle:{width:"100%"},attrs:{value:e.value[`${n.field}`],config:n,clearable:"",filterable:"",size:e.elSize,options:n.options},on:{input:function(t){return e.handleValueChange(t,n)}}},"by-select",n.otherOptions,!1)),e._t(n.field)]:"datepicker"===n.type?[t("el-date-picker",e._b({staticStyle:{width:"100%"},attrs:{placeholder:n.placeholder,value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-date-picker",n.otherOptions,!1))]:"cascader"===n.type?[t("el-cascader",e._b({staticStyle:{width:"100%"},attrs:{placeholder:n.placeholder,options:n.options,clearable:"",filterable:"",value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-cascader",n.otherOptions,!1))]:"switch"===n.type?[t("el-switch",e._b({attrs:{value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-switch",n.otherOptions,!1))]:"radioGroup"===n.type?["button"===n.cGOptions.type?t("el-radio-group",e._b({attrs:{value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-radio-group",n.otherOptions,!1),e._l(n.cGOptions.options,(function(n){return t("el-radio-button",{key:n.value,attrs:{label:n.value,disabled:!!n.disabled}},[e._v(" "+e._s(n.label)+" ")])})),1):e._e(),"checkbox"===n.cGOptions.type?t("el-radio-group",e._b({attrs:{value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-radio-group",n.otherOptions,!1),e._l(n.cGOptions.options,(function(n){return t("el-radio",{key:n.value,attrs:{label:n.value,disabled:!!n.disabled}},[e._v(" "+e._s(n.label)+" ")])})),1):e._e()]:"checkboxGroup"===n.type?["button"===n.cGOptions.type?t("el-checkbox-group",e._b({attrs:{value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-checkbox-group",n.otherOptions,!1),e._l(n.cGOptions.options,(function(n){return t("el-checkbox-button",{key:n.value,attrs:{label:n.value}},[e._v(" "+e._s(n.label)+" ")])})),1):e._e(),"checkbox"===n.cGOptions.type?t("el-checkbox-group",e._b({attrs:{value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-checkbox-group",n.otherOptions,!1),e._l(n.cGOptions.options,(function(n){return t("el-checkbox",{key:n.value,attrs:{label:n.value}},[e._v(" "+e._s(n.label)+" ")])})),1):e._e()]:"text"===n.type?[e._t(n.slotName,(function(){return[t("div",[e._v(e._s(`${n.defaultValue}`))])]}))]:"pairNumberInput"===n.type?[t("PairNumberInput",{attrs:{value:e.value[`${n.field}`],"earliest-placeholder":n.earliestPlaceholder,"latest-placeholder":n.latestPlaceholder},on:{input:function(t){return e.handleValueChange(t,n)}}})]:"customDatePicker"===n.type?[t("CustomDatePicker",e._b({attrs:{value:e.value[`${n.field}`]},on:{input:function(t){return e.handleValueChange(t,n)},"range-change":function(t){return e.handleRangeChange(t,n)}}},"CustomDatePicker",n,!1))]:"custom"===n.type?[e._t(n.field,null,{row:n})]:"search"===n.type?[t("el-button",e._b({attrs:{size:e.elSize||"mini",type:"primary",icon:"el-icon-search"},on:{click:e.handleQueryClick}},"el-button",null!==(i=n.otherOptions)&&void 0!==i?i:{},!1),[e._v(" "+e._s((n.otherOptions||{}).text||"搜索")+" ")])]:"formButtons"===n.type?[n.otherOptions&&!1===n.otherOptions.reset?e._e():t("el-button",e._b({attrs:{"native-type":"reset",size:e.elSize||"mini"}},"el-button",null!==(r=n.otherOptions)&&void 0!==r?r:{},!1),[e._v(" "+e._s((n.otherOptions||{}).resetText||"重置")+" ")]),n.otherOptions&&!1===n.otherOptions.submit?e._e():t("el-button",e._b({attrs:{"native-type":"submit",size:e.elSize||"mini",type:"primary",icon:n.otherOptions&&!1===n.otherOptions.showSubmitIcon?"":"el-icon-search"}},"el-button",null!==(a=n.otherOptions)&&void 0!==a?a:{},!1),[e._v(" "+e._s((n.otherOptions||{}).submitText||"搜索")+" ")])]:e._e()],2)],1)]})),e._t("btn",null,{formData:e.formData})],2)],1),t("div",{staticClass:"footer"},[e._t("footer")],2)],1)},S=[],C=function(){var e=this,t=e._self._c;return t("div",{staticClass:"w-full flex"},[t("el-input",{staticClass:"w-1/2",attrs:{value:e.value[0],placeholder:e.earliestPlaceholder},on:{input:t=>e.handleInput(t,"min"),blur:t=>e.handleBlur(+t.target.value,"min")}}),t("span",[e._v("~")]),t("el-input",{staticClass:"w-1/2",attrs:{value:e.value[1],placeholder:e.latestPlaceholder},on:{input:t=>e.handleInput(t,"max"),blur:t=>e.handleBlur(+t.target.value,"max")}})],1)},T=[],Y={props:{value:{type:Array,required:!0,default:()=>["",0]},earliestPlaceholder:{type:String,default:""},latestPlaceholder:{type:String,default:""}},methods:{handleInput(e,t){if("min"===t){const t=[e.replace(/\D+/,""),this.value[1]];this.$emit("input",t)}else if("max"===t){const t=[this.value[0],e.replace(/\D+/,"")];this.$emit("input",t)}},handleBlur(e,t){if("min"===t){if(e>this.value[1]){const e=[this.value[1],this.value[1]];this.$emit("input",e)}}else if("max"===t&&e<this.value[0]){const e=[this.value[0],this.value[0]];this.$emit("input",e)}}}},O=Y,E=l(O,C,T,!1,null,null,null),j=E.exports,P=function(){var e=this,t=e._self._c;return t("div",{staticClass:"b-picker wrapper"},[t("el-date-picker",e._b({staticStyle:{width:"70%"},attrs:{value:e.value},on:{input:e.handleChange}},"el-date-picker",e.dateOptions,!1)),t("div",{staticClass:"btn"},e._l(e.shortcuts,(function(n){return t("span",{key:n.key,staticClass:"item",class:{item_active:n.key===e.active},on:{click:function(t){return e.handleClick(n)}}},[e._v(" "+e._s(n.label)+" ")])})),0)],1)},$=[],N=i(6879),I=i.n(N),H={props:{value:{type:[Array,String],required:!0,default:()=>[]},otherOption:{type:Object,default:()=>({startPlaceholder:"开始时间",endPlaceholder:"结束时间",type:"daterange",rangeSeparator:"-",size:"mini",active:""})},startTimeField:{type:String,default:""},endTimeField:{type:String,default:""}},data(){return{shortcuts:[{label:"上月",start_time:I()().subtract(1,"months").startOf("month").format("YYYY-MM-DD"),end_time:I()().subtract(1,"months").endOf("month").format("YYYY-MM-DD"),key:"last_month"},{label:"昨天",start_time:I()().subtract(1,"days").format("YYYY-MM-DD"),end_time:I()().subtract(1,"days").format("YYYY-MM-DD"),key:"yesterday"},{label:"今天",start_time:I()().startOf("day").format("YYYY-MM-DD"),end_time:I()().startOf("day").format("YYYY-MM-DD"),key:"today"},{label:"本周",start_time:I()().startOf("week").format("YYYY-MM-DD"),end_time:I()().endOf("week").format("YYYY-MM-DD"),key:"week"},{label:"本月",start_time:I()().startOf("month").format("YYYY-MM-DD"),end_time:I()().endOf("month").format("YYYY-MM-DD"),key:"month"}],active:""}},computed:{dateOptions(){return{startPlaceholder:"开始时间",endPlaceholder:"结束时间",type:"daterange",rangeSeparator:"至",size:"mini",active:"",...this.otherOption}}},watch:{value:{handler(e,t){if(e&&e.length)this.active="",this.shortcuts.forEach((t=>{t.start_time===e[0]&&t.end_time===e[1]&&(this.active=t.key)}));else{this.active=this.dateOptions.active;const e=this.shortcuts.find((e=>e.key===this.dateOptions.active))||{};e.start_time&&e.end_time&&this.handleClick(e)}},immediate:!0}},methods:{handleChange(e){if(e){const t=e.map((e=>I()(e).format("YYYY-MM-DD")));this.$emit("input",t),this.startTimeField&&this.endTimeField&&this.$emit("range-change",{startTime:t[0],endTime:t[1]})}else this.$emit("input",[]),this.startTimeField&&this.endTimeField&&this.$emit("range-change",{startTime:"",endTime:""});this.active=""},handleClick(e){this.active=e.key,this.$emit("input",[e.start_time,e.end_time]),this.startTimeField&&this.endTimeField&&this.$emit("range-change",{startTime:e.start_time,endTime:e.end_time})}}},A=H,F=l(A,P,$,!1,null,null,null),z=F.exports,V={name:"ByForm",components:{PairNumberInput:j,CustomDatePicker:z},props:{value:{type:Object,required:!0},labelPosition:{type:String,default:"right"},formItems:{type:Array,default:()=>[]},flexible:{type:Object,default:()=>({foldField:"none",unfold:!1})},labelWidth:{type:String,default:"100px"},itemStyle:{type:Object,default:()=>({padding:"10px 40px"})},colLayout:{type:Object,default:()=>({xl:4,lg:6,md:6,sm:8,xs:12})},isFlexible:{type:Boolean,default:!0},inline:{type:Boolean,default:!1},rules:{type:Object,default:()=>{}},elSize:{type:String,default:"mini"}},data(){return{formData:this.value,replacementData:void 0,initialValues:{...this.value}}},computed:{showFold(){return e=>!!this.isFlexible||(!this.flexible||!this.flexible.foldField.length||!this.flexible.foldField.includes(e.id)&&!this.flexible.foldField.includes(e.field))}},watch:{value:{handler(e,t){this.formData=e,this.replacementData={...this.replacementData?this.replacementData:{},...e}},deep:!0,immediate:!0}},methods:{validate(e=()=>{}){this.$refs.formRef.validate(((t,n)=>{e(t,n)}))},clearValidate(){this.$refs.formRef.clearValidate()},handleValueChange(e,t){this.replacementData?this.replacementData[t.field]=e:this.replacementData={...this.value,[t.field]:e},this.$emit("change",{...t,value:e}),this.$emit("input",this.replacementData)},handleRangeChange({startTime:e,endTime:t},n){n.startTimeField&&n.endTimeField&&(this.replacementData?(this.replacementData[n.startTimeField]=e,this.replacementData[n.endTimeField]=t):this.replacementData={...this.value,[n.startTimeField]:e,[n.endTimeField]:t},this.$emit("input",this.replacementData))},handleQueryClick(){this.$emit("queryBtnClick")},submit(){this.$refs.formRef.validate((e=>{if(!e)return!1;this.$emit("submit",this.formData)}))},reset(){this.$refs.formRef.resetFields(),this.$emit("input",{...this.initialValues}),this.$emit("reset")}}},W=V,R=l(W,L,S,!1,null,null,null),B=R.exports,q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"b-page-search"},[t("by-form",e._b({attrs:{value:e.formData,"is-flexible":e.unfold},on:{input:e.handleInput,change:e.handleChange,queryBtnClick:e.handleQueryClick,submit:e.submit,reset:e.reset},scopedSlots:e._u([{key:"header",fn:function(){return[e._t("header")]},proxy:!0},{key:"footer",fn:function(){return[e.isShowUnfoldBtn?t("div",{staticClass:"fold"},[t("by-fold-search",{on:{change:e.handleFlexible}})],1):e._e()]},proxy:!0},e._l(e.getCustomItem,(function(t){return{key:t,fn:function(){return[e._t(t)]},proxy:!0}}))],null,!0)},"by-form",e.searchFormConfig,!1))],1)},U=[],G={props:{searchFormConfig:{type:Object,required:!0,default:()=>{}},value:{type:Object,default:()=>{}}},data(){var e,t;return{formItems:null!==(e=null===(t=this.searchFormConfig)||void 0===t?void 0:t.formItems)&&void 0!==e?e:[],formOriginData:{},formData:{},unfold:!1}},computed:{isShowUnfoldBtn(){var e,t,n,i;const r=null!==(e=null===(t=this.searchFormConfig)||void 0===t?void 0:t.formItems)&&void 0!==e?e:[],a=null!==(n=null===(i=this.searchFormConfig)||void 0===i?void 0:i.flexible)&&void 0!==n?n:void 0;return!!a&&r.length>a.foldField.length},getCustomItem(){return this.formItems.filter((e=>"custom"===e.type)).map((e=>e.field))}},watch:{value:{handler(e,t){this.formData=e},deep:!0,immediate:!0}},mounted(){var e,t;this.formOriginData=this.value,this.unfold=null!==(e=null===(t=this.searchFormConfig.flexible)||void 0===t?void 0:t.unfold)&&void 0!==e&&e},methods:{handleResetClick(){this.formData={...this.formOriginData},this.$emit("input",{...this.formOriginData}),this.$emit("resetBtnClick")},handleQueryClick(){this.$emit("queryBtnClick")},handleFlexible(){this.unfold=!this.unfold},handleInput(e){this.formData=e,this.$emit("input",{...this.formData})},handleChange(e){this.$emit("change",e)},submit(){this.$emit("submit",this.formData)},reset(){this.$emit("reset")}}},K=G,J=l(K,q,U,!1,null,null,null),X=J.exports,Z=function(){var e=this,t=e._self._c;return t("div",{staticClass:"drawer_query_btn b-fold-search"},[t("div",{on:{click:e.drawer}},[1==e.show?[t("span",{staticStyle:{color:"#3aa1ff","vertical-align":"middle"}},[e._v("收起")]),e._v(" "),t("img",{staticStyle:{"vertical-align":"middle"},attrs:{src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyBjbGFzcz0iaWNvbiIgd2lkdGg9IjIwMHB4IiBoZWlnaHQ9IjIwMC4wMHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iIzVjYWRmZiIgZD0iTTg3Ny41IDU2NS45bC0zNjcuNi0zNDAtMzY3LjYgMzQwYy0yMi41IDE0LjUtNTIuNSAxNC41LTY3LjUgMC0xNS0yMS43LTE1LTUwLjcgMC02NS4xTDQ5NSAxMTcuNWMwLTcuMiA3LjUtNy4yIDE1LTcuMnM3LjUgMCAxNSA3LjJsNDIwLjIgMzgzLjNjMjIuNSAyMS43IDE1IDUwLjYgMCA2NS4xLTIyLjcgMTQuNS01Mi43IDE0LjUtNjcuNyAwek00OTQuOCA0NTAuMWMwLTcuMiA3LjUtNy4yIDE1LTcuMnMxNSAwIDE1IDcuMkw5NDUgODMzLjRjMjIuNSAyMS43IDE1IDUwLjYgMCA2NS4xLTIyLjUgMTQuNC01Mi41IDE0LjQtNjcuNSAwTDUwOS44IDU1OC42IDE0Mi4yIDkwNS44Yy0yMi41IDE0LjUtNTIuNSAxNC41LTY3LjUgMC0xNS0yMS43LTE1LTUwLjcgMC02NS4xbDQyMC4xLTM5MC42eiBtMCAwIiAvPjwvc3ZnPg==",alt:"收起"}})]:[t("span",{staticStyle:{color:"#3aa1ff","vertical-align":"middle"}},[e._v("展开更多")]),e._v(" "),t("img",{staticStyle:{"vertical-align":"middle"},attrs:{src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyBjbGFzcz0iaWNvbiIgd2lkdGg9IjIwMHB4IiBoZWlnaHQ9IjIwMC4wMHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iIzVjYWRmZiIgZD0iTTE0NS40IDQ2MS4xbDM2Ny42IDM0MCAzNjcuNi0zNDBjMjIuNS0xNC41IDUyLjUtMTQuNSA2Ny41IDAgMTUgMjEuNyAxNSA1MC43IDAgNjUuMUw1MjcuOSA5MDkuNWMwIDcuMi03LjUgNy4yLTE1IDcuMnMtNy41IDAtMTUtNy4yTDc3LjcgNTI2LjJjLTIyLjUtMjEuNy0xNS01MC42IDAtNjUuMSAyMi42LTE0LjUgNTIuNi0xNC41IDY3LjcgMHpNNTI4IDU3Ni45YzAgNy4yLTcuNSA3LjItMTUgNy4ycy0xNSAwLTE1LTcuMkw3Ny44IDE5My42Yy0yMi41LTIxLjctMTUtNTAuNiAwLTY1LjEgMjIuNS0xNC40IDUyLjUtMTQuNCA2Ny41IDBMNTEzIDQ2OC40bDM2Ny42LTM0Ny4yYzIyLjUtMTQuNSA1Mi41LTE0LjUgNjcuNSAwIDE1IDIxLjcgMTUgNTAuNyAwIDY1LjFMNTI4IDU3Ni45eiBtMCAwIiAvPjwvc3ZnPg==",alt:"展开更多"}})]],2)])},Q=[],ee={data(){return{show:!1}},methods:{drawer(e){this.show=!this.show,this.$emit("change",this.show)}}},te=ee,ne=l(te,Z,Q,!1,null,null,null),ie=ne.exports,re=function(){var e=this,t=e._self._c;return t("el-select",e._b({ref:"selection",attrs:{value:e.value,placeholder:e.config.placeholder||"请选择"},on:{change:e.change,"visible-change":e.visibleChange,"remove-tag":e.removeTag,clear:e.clear,blur:e.blur,focus:e.focus}},"el-select",e.$props,!1),["group"===e.config.mode?e._l(e.item.options,(function(n){return t("el-option-group",{key:n[e.config.optionValue||"value"],attrs:{label:n[e.config.optionLabel||"label"]}},e._l(n.options,(function(n){return t("el-option",{key:n[e.config.optionValue||"value"],attrs:{label:n[e.config.optionLabel||"label"],value:n[e.config.optionValue||"value"]}})})),1)})):e._l(e.filterData,(function(n){return t("el-option",{key:n[e.config.optionValue||"value"]+"-"+n[e.config.optionLabel||"label"],attrs:{label:n[e.config.optionLabel||"label"],value:n[e.config.optionValue||"value"]}})}))],2)},ae=[],se=i(7822),oe={name:"BYSelect",props:{...se.Select.props,value:{type:[String,Number,Array]},placeholder:{type:String,default:"请选择"},options:{type:Array,default:()=>[]},config:{type:Object,default:null}},data(){return{searchVal:"",filterData:[]}},watch:{options:{handler(){this.filterData=this.options},deep:!0,immediate:!0}},methods:{change(e){this.$emit("change",1===arguments.length?e:arguments),this.$emit("input",e)},input(e){this.$emit("change",1===arguments.length?e:arguments),this.$emit("input",e)},visibleChange(e){this.$emit("visible-change",1===arguments.length?e:arguments)},removeTag(e){this.$emit("remove-tag",1===arguments.length?e:arguments)},clear(e){this.$emit("clear",1===arguments.length?e:arguments)},blur(e){this.$emit("blur",1===arguments.length?e:arguments)},focus(e){this.multiple&&this.searchNoReset(),this.$emit("blur",1===arguments.length?e:arguments)},searchNoReset(){this.$refs.selection.$refs.input.blur=()=>{this.filterData=this.options},this.$refs.selection.$refs.input.onkeyup=()=>{this.filterData=this.options,this.searchVal=this.$refs.selection.$refs.input.value,this.filterData=this.options.filter((e=>-1!==e[this.config.optionLabel].indexOf(this.searchVal)))}}}},le=oe,ue=l(le,re,ae,!1,null,null,null),ce=ue.exports,de=function(){var e=this,t=e._self._c;return t("div",{staticClass:"b-picker wrapper"},[t("el-date-picker",{staticStyle:{width:"70%"},attrs:{"start-placeholder":e.config.startPlaceholder||"开始时间","end-placeholder":e.config.endPlaceholder||"结束时间","range-separator":e.config.rangeSeparator||"-",size:e.config.size||"mini",type:"daterange"},on:{input:e.handleChange},model:{value:e.value[e.config.field],callback:function(t){e.$set(e.value,e.config.field,t)},expression:"value[config.field]"}}),t("div",{staticClass:"btn"},e._l(e.shortcuts,(function(n){return t("span",{key:n.key,staticClass:"item",class:{item_active:n.key===e.active},on:{click:function(t){return e.handleClick(n)}}},[e._v(" "+e._s(n.label)+" ")])})),0)],1)},he=[],fe={name:"ByDatePickerRange",props:{value:{type:Object,default:null},config:{type:Object,default:null}},data(){return{shortcuts:[{label:"上月",start_time:I()().subtract(1,"months").startOf("month").format("YYYY-MM-DD"),end_time:I()().subtract(1,"months").endOf("month").format("YYYY-MM-DD"),key:"last_month"},{label:"昨天",start_time:I()().subtract(1,"days").format("YYYY-MM-DD"),end_time:I()().subtract(1,"days").format("YYYY-MM-DD"),key:"yesterday"},{label:"今天",start_time:I()().startOf("day").format("YYYY-MM-DD"),end_time:I()().startOf("day").format("YYYY-MM-DD"),key:"today"},{label:"本周",start_time:I()().startOf("week").format("YYYY-MM-DD"),end_time:I()().endOf("week").format("YYYY-MM-DD"),key:"week"},{label:"本月",start_time:I()().startOf("month").format("YYYY-MM-DD"),end_time:I()().endOf("month").format("YYYY-MM-DD"),key:"month"}],active:""}},mounted(){this.active=this.config.active||"today";const e=this.shortcuts.find((e=>e.key===this.active))||{};e.start_time&&e.end_time&&this.handleClick(e)},methods:{handleChange(e){e?this.$emit("input",e.map((e=>I()(e).format("YYYY-MM-DD")))):this.$emit("input",[]),this.active=""},handleClick(e){this.active=e.key,this.value[this.config.field]=[e.start_time,e.end_time],this.$emit("input",[e.start_time,e.end_time])}}},pe=fe,me=l(pe,de,he,!1,null,null,null),_e=me.exports,ve=null,ge=null,ye=null,be="z-index-manage",we=null,ke="z-index-style",Me="m",xe="s",De={m:1e3,s:1e3};function Le(){return ve||"undefined"!==typeof document&&(ve=document),ve}function Se(){return ve&&!ge&&(ge=ve.body||ve.getElementsByTagName("body")[0]),ge}function Ce(){var e=0,t=Le();if(t){var n=Se();if(n)for(var i=n.getElementsByTagName("*"),r=0;r<i.length;r++){var a=i[r];if(a&&a.style&&1===a.nodeType){var s=a.style.zIndex;s&&/^\d+$/.test(s)&&(e=Math.max(e,Number(s)))}}}return e}function Te(){if(!we){var e=Le();e&&(we=e.getElementById(ke),we||(we=e.createElement("style"),we.id=ke,e.getElementsByTagName("head")[0].appendChild(we)))}return we}function Ye(){var e=Te();if(e){var t="--dom-",n="-z-index";e.innerHTML=":root{"+t+"main"+n+":"+$e()+";"+t+"sub"+n+":"+Ae()+"}"}}function Oe(){if(!ye){var e=Le();if(e&&(ye=e.getElementById(be),!ye)){var t=Se();t&&(ye=e.createElement("div"),ye.id=be,ye.style.display="none",t.appendChild(ye),je(De.m),Ie(De.s))}}return ye}function Ee(e){return function(t){if(t){t=Number(t),De[e]=t;var n=Oe();n&&(n.dataset?n.dataset[e]=t+"":n.setAttribute("data-"+e,t+""))}return Ye(),De[e]}}var je=Ee(Me);function Pe(e,t){return function(n){var i,r=Oe();if(r){var a=r.dataset?r.dataset[e]:r.getAttribute("data-"+e);a&&(i=Number(a))}return i||(i=De[e]),n?Number(n)<i?t():n:i}}var $e=Pe(Me,Ne);function Ne(){return je($e()+1)}var Ie=Ee(xe),He=Pe(xe,Fe);function Ae(){return $e()+He()}function Fe(){return Ie(He()+1),Ae()}var ze={setCurrent:je,getCurrent:$e,getNext:Ne,setSubCurrent:Ie,getSubCurrent:Ae,getSubNext:Fe,getMax:Ce};Ye();var Ve=ze;const We={ByPager:c,ByTable:D,ByForm:B,ByPageSearch:X,ByFoldSearch:ie,BySelect:ce,ByDatePickerRange:_e};Ve.setCurrent(99999);const Re=e=>{Object.keys(We).forEach((t=>{e.component(t,We[t])}))};"undefined"!==typeof window&&window.Vue&&Re(window.Vue);var Be={install:Re},qe=Be}(),r}()}));
|
|
331
|
+
function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,i){var r={ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:n?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===i?n?"хвіліна":"хвіліну":"h"===i?n?"гадзіна":"гадзіну":e+" "+t(r[i],+e)}var i=e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:n,mm:n,h:n,hh:n,d:"дзень",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!==2&&e%10!==3||e%100===12||e%100===13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}});return i}))},9979:function(e,t,n){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=78)}({0:function(e,t,n){"use strict";function i(e,t,n,i,r,a,s,o){var l,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=l):r&&(l=o?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:u}}n.d(t,"a",(function(){return i}))},2:function(e,t){e.exports=n(2172)},3:function(e,t){e.exports=n(5294)},5:function(e,t){e.exports=n(9731)},7:function(e,t){e.exports=n(9274)},78:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",[n("transition",{attrs:{name:e.transition},on:{"after-enter":e.handleAfterEnter,"after-leave":e.handleAfterLeave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.disabled&&e.showPopper,expression:"!disabled && showPopper"}],ref:"popper",staticClass:"el-popover el-popper",class:[e.popperClass,e.content&&"el-popover--plain"],style:{width:e.width+"px"},attrs:{role:"tooltip",id:e.tooltipId,"aria-hidden":e.disabled||!e.showPopper?"true":"false"}},[e.title?n("div",{staticClass:"el-popover__title",domProps:{textContent:e._s(e.title)}}):e._e(),e._t("default",[e._v(e._s(e.content))])],2)]),n("span",{ref:"wrapper",staticClass:"el-popover__reference-wrapper"},[e._t("reference")],2)],1)},r=[];i._withStripped=!0;var a=n(5),s=n.n(a),o=n(2),l=n(3),u={name:"ElPopover",mixins:[s.a],props:{trigger:{type:String,default:"click",validator:function(e){return["click","focus","hover","manual"].indexOf(e)>-1}},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:200},title:String,disabled:Boolean,content:String,reference:{},popperClass:String,width:{},visibleArrow:{default:!0},arrowOffset:{type:Number,default:0},transition:{type:String,default:"fade-in-linear"},tabindex:{type:Number,default:0}},computed:{tooltipId:function(){return"el-popover-"+Object(l["generateId"])()}},watch:{showPopper:function(e){this.disabled||(e?this.$emit("show"):this.$emit("hide"))}},mounted:function(){var e=this,t=this.referenceElm=this.reference||this.$refs.reference,n=this.popper||this.$refs.popper;!t&&this.$refs.wrapper.children&&(t=this.referenceElm=this.$refs.wrapper.children[0]),t&&(Object(o["addClass"])(t,"el-popover__reference"),t.setAttribute("aria-describedby",this.tooltipId),t.setAttribute("tabindex",this.tabindex),n.setAttribute("tabindex",0),"click"!==this.trigger&&(Object(o["on"])(t,"focusin",(function(){e.handleFocus();var n=t.__vue__;n&&"function"===typeof n.focus&&n.focus()})),Object(o["on"])(n,"focusin",this.handleFocus),Object(o["on"])(t,"focusout",this.handleBlur),Object(o["on"])(n,"focusout",this.handleBlur)),Object(o["on"])(t,"keydown",this.handleKeydown),Object(o["on"])(t,"click",this.handleClick)),"click"===this.trigger?(Object(o["on"])(t,"click",this.doToggle),Object(o["on"])(document,"click",this.handleDocumentClick)):"hover"===this.trigger?(Object(o["on"])(t,"mouseenter",this.handleMouseEnter),Object(o["on"])(n,"mouseenter",this.handleMouseEnter),Object(o["on"])(t,"mouseleave",this.handleMouseLeave),Object(o["on"])(n,"mouseleave",this.handleMouseLeave)):"focus"===this.trigger&&(this.tabindex<0&&console.warn("[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key"),t.querySelector("input, textarea")?(Object(o["on"])(t,"focusin",this.doShow),Object(o["on"])(t,"focusout",this.doClose)):(Object(o["on"])(t,"mousedown",this.doShow),Object(o["on"])(t,"mouseup",this.doClose)))},beforeDestroy:function(){this.cleanup()},deactivated:function(){this.cleanup()},methods:{doToggle:function(){this.showPopper=!this.showPopper},doShow:function(){this.showPopper=!0},doClose:function(){this.showPopper=!1},handleFocus:function(){Object(o["addClass"])(this.referenceElm,"focusing"),"click"!==this.trigger&&"focus"!==this.trigger||(this.showPopper=!0)},handleClick:function(){Object(o["removeClass"])(this.referenceElm,"focusing")},handleBlur:function(){Object(o["removeClass"])(this.referenceElm,"focusing"),"click"!==this.trigger&&"focus"!==this.trigger||(this.showPopper=!1)},handleMouseEnter:function(){var e=this;clearTimeout(this._timer),this.openDelay?this._timer=setTimeout((function(){e.showPopper=!0}),this.openDelay):this.showPopper=!0},handleKeydown:function(e){27===e.keyCode&&"manual"!==this.trigger&&this.doClose()},handleMouseLeave:function(){var e=this;clearTimeout(this._timer),this.closeDelay?this._timer=setTimeout((function(){e.showPopper=!1}),this.closeDelay):this.showPopper=!1},handleDocumentClick:function(e){var t=this.reference||this.$refs.reference,n=this.popper||this.$refs.popper;!t&&this.$refs.wrapper.children&&(t=this.referenceElm=this.$refs.wrapper.children[0]),this.$el&&t&&!this.$el.contains(e.target)&&!t.contains(e.target)&&n&&!n.contains(e.target)&&(this.showPopper=!1)},handleAfterEnter:function(){this.$emit("after-enter")},handleAfterLeave:function(){this.$emit("after-leave"),this.doDestroy()},cleanup:function(){(this.openDelay||this.closeDelay)&&clearTimeout(this._timer)}},destroyed:function(){var e=this.reference;Object(o["off"])(e,"click",this.doToggle),Object(o["off"])(e,"mouseup",this.doClose),Object(o["off"])(e,"mousedown",this.doShow),Object(o["off"])(e,"focusin",this.doShow),Object(o["off"])(e,"focusout",this.doClose),Object(o["off"])(e,"mousedown",this.doShow),Object(o["off"])(e,"mouseup",this.doClose),Object(o["off"])(e,"mouseleave",this.handleMouseLeave),Object(o["off"])(e,"mouseenter",this.handleMouseEnter),Object(o["off"])(document,"click",this.handleDocumentClick)}},c=u,d=n(0),h=Object(d["a"])(c,i,r,!1,null,null,null);h.options.__file="packages/popover/src/main.vue";var f=h.exports,p=function(e,t,n){var i=t.expression?t.value:t.arg,r=n.context.$refs[i];r&&(Array.isArray(r)?r[0].$refs.reference=e:r.$refs.reference=e)},m={bind:function(e,t,n){p(e,t,n)},inserted:function(e,t,n){p(e,t,n)}},_=n(7),v=n.n(_);v.a.directive("popover",m),f.install=function(e){e.directive("popover",m),e.component(f.name,f)},f.directive=m;t["default"]=f}})}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}!function(){i.amdO={}}(),function(){i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,{a:t}),t}}(),function(){i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){i.p=""}();var r={};return function(){"use strict";if(i.r(r),i.d(r,{default:function(){return qe}}),"undefined"!==typeof window){var e=window.document.currentScript,t=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);t&&(i.p=t[1])}i(8111),i(7588);var n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"pager fixed bottom-0 right-0 w-full flex justify-center items-center z-50",attrs:{id:"pager"}},[t("el-pagination",{attrs:{"current-page":e.pager["page"],"page-size":e.pager["limit"],"page-sizes":e.pageSizes,background:"",layout:"total, prev, pager, next,sizes, jumper",total:e.totalCount},on:{"size-change":t=>e.handleValueChange(t,"limit"),"current-change":t=>e.handleValueChange(t,"page")}})],1)},a=[],s={name:"BYPager",props:{limit:{type:Number,default:15},page:{type:Number,default:1},totalCount:{type:Number,required:!0,default:25},pageSizes:{type:Array,default:()=>[10,15,20,25,30,50,100]}},data(){return{pager:{page:this.page,limit:this.limit}}},watch:{page:{handler:function(e,t){this.pager.page=e},immediate:!0},limit:{handler:function(e,t){this.pager.limit=e},immediate:!0}},mounted(){document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue="跳至",document.getElementsByClassName("el-pagination__jump")[0].childNodes[2].nodeValue=""},methods:{handleValueChange(e,t){if(!e)return;const n={...this.pager,[t]:e,page:"limit"===t?1:e};this.$emit("onChange",n)}}},o=s;function l(e,t,n,i,r,a,s,o){var l,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=l):r&&(l=o?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:u}}var u=l(o,n,a,!1,null,null,null),c=u.exports,d=function(){var e=this,t=e._self._c;return t("div",[t("vxe-grid",e._g(e._b({ref:"xGrid",on:{"cell-click":e.handleCellClick,"resizable-change":e.handleResizableChange},scopedSlots:e._u([e._l(e.slotMap,(function(t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}})),e.options.pagerConfig?{key:"pager",fn:function(){return[t("by-pager",{attrs:{page:e.options.pagerConfig.currentPage,limit:e.options.pagerConfig.pageSize,"total-count":e.options.pagerConfig.total,"page-sizes":e.options.pagerConfig.pageSizes},on:{onChange:e.pageChange}})]},proxy:!0}:null],null,!0)},"vxe-grid",e.options,!1),e.eventListeners)),e.gridOptions.customColumnConfig&&e.gridOptions.customColumnConfig.showCustomColumn?t("CustomColumn",{ref:"CustomColumnRef",attrs:{"info-method":e.gridOptions.customColumnConfig.infoMethod,"submit-method":e.gridOptions.customColumnConfig.submitMethod,"dialog-visible":e.customTableVisible},on:{closeDialog:e.closeCustomColumnDialog,changeTable:e.changeTableFields,changeTableGroup:e.changeTableGroupFields}}):e._e()],1)},h=[],f=(i(4114),i(2489),i(116),i(1701),i(7642),i(8004),i(3853),i(5876),i(2475),i(5024),i(1698),function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"custom_column"}},[t("el-dialog",{attrs:{"close-on-click-modal":!1,visible:e.dialogVisible,width:"920px","append-to-body":!0,"show-close":!1,"custom-class":"custom_dialog_class"},on:{close:e.closeDialog},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-row",{staticStyle:{"margin-top":"7px"}},[t("el-button",{staticStyle:{width:"96px"},attrs:{size:"small"},on:{click:e.closeDialog}},[e._v("取消")]),t("el-button",{staticStyle:{width:"96px"},attrs:{size:"small",type:"primary"},on:{click:e.submit}},[e._v("确定")])],1)]},proxy:!0}])},[t("div",{staticClass:"el-dialog-box"},[t("div",{staticClass:"left_box"},[t("div",{staticClass:"box_title"},[e._v("数据指标")]),t("div",{staticClass:"row",staticStyle:{"padding-right":"20px"}},[t("div",{staticClass:"cell"},[t("el-input",{staticStyle:{width:"228px","margin-bottom":"10px"},attrs:{placeholder:"搜索指标",size:"medium","prefix-icon":"el-icon-search"},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1),t("el-button",{attrs:{type:"text"},on:{click:e.selectNone}},[e._v("全不选")])],1),t("div",{staticClass:"left_box_body"},[t("div",{staticClass:"left_nav"},[t("ul",e._l(e.checkBoxMenuBySearch,(function(n,i){return t("li",{key:i,class:{active:e.activeId===i},on:{click:function(t){return e.setHighlight(i)}}},[e._v(" "+e._s(n.label)+" ")])})),0)]),t("div",{staticClass:"left_menu"},e._l(e.checkBoxMenuBySearch,(function(n,i){return t("div",{key:i,ref:"tagItem",refInFor:!0},[t("div",{staticClass:"checkbox_title"},[e._v(" "+e._s(n.label)+" ")]),t("el-row",e._l(n.data,(function(n,i){return t("el-col",{key:i,staticStyle:{"margin-bottom":"3px"},attrs:{span:12}},[t("el-checkbox",{on:{change:function(t){return e.changeCheckbox(n.key,n.type)}},model:{value:n.type,callback:function(t){e.$set(n,"type",t)},expression:"each.type"}},[e._v(" "+e._s(n.label)+" ")])],1)})),1)],1)})),0)])]),t("div",{staticClass:"right_box"},[t("div",{staticClass:"drag_box"},[t("el-row",[t("div",{staticClass:"drag_text_box"},[t("span",{staticClass:"drag_title"},[e._v(e._s(`已选指标(${e.number})`))]),t("span",{staticClass:"recover",on:{click:e.recoverDefault}},[e._v("恢复默认")])])]),t("div",{staticClass:"drag_ul"},[t("draggable",{attrs:{"chosen-class":"chosen","force-fallback":"true",animation:"500"},on:{end:e.onEnd},model:{value:e.draggableMenu,callback:function(t){e.draggableMenu=t},expression:"draggableMenu"}},[t("transition-group",e._l(e.draggableMenu,(function(n){return t("div",{directives:[{name:"show",rawName:"v-show",value:n.type,expression:"col.type"}],key:n.key,class:"sort-cut-off"===n.key?"fixedClass":"drag_li_box"},["sort-cut-off"!==n.key?t("div",[t("i",{staticClass:"el-icon-rank icon-box"}),t("span",{staticClass:"drag_li_text"},[e._v(e._s(n.label))])]):e._e(),"sort-cut-off"!==n.key?t("i",{staticClass:"el-icon-close remove",on:{click:function(t){return e.changeCheckbox(n.key,!1)}}}):e._e()])})),0)],1)],1)],1)])])])],1)}),p=[],m=(i(3579),i(6906)),_=i.n(m);const v=e=>{let t;if("object"===typeof e)if(Array.isArray(e)){t=[];for(const n in e)t.push(v(e[n]))}else if(null===e)t=null;else if(e.constructor===RegExp)t=e;else{t={};for(const n in e)t[n]=v(e[n])}else t=e;return t};var g={name:"CustomColumn",components:{draggable:_()},props:{dialogVisible:{type:Boolean,default:!1},infoMethod:{type:Function,required:!0,default:()=>{}},submitMethod:{type:Function,required:!0,default:()=>{}}},data(){return{draggableMenu:[],checkBoxMenu:[],activeId:0,id:void 0,page:"",search:""}},computed:{number(){return this.draggableMenu.filter((e=>e.type&&"sort-cut-off"!==e.key)).length},checkBoxMenuBySearch(){return this.search?this.checkBoxMenu.map((e=>{const t=e.data.filter((e=>e.label.includes(this.search)));return{label:e.label,data:t}})).filter((e=>e.data.length>0)):this.checkBoxMenu}},methods:{deepClone:v,async getCustomTableList(e,t){if(!e)throw new Error("缺少表格列接口路径");{this.columnList=this.deepClone(t),this.page=e||"";const n=[],i=await this.infoMethod({page:e});"[]"!==JSON.stringify(i.data)&&(this.id=i.data.id||void 0,i.data.column.forEach((e=>n.push(...e.data)))),this.initTableList(this.deepClone(t),n)}},initTableList(e,t=[]){const n=e=>{const t=[];if(e.forEach((e=>t.push(...e.data))),t.sort(((e,t)=>e.sort-t.sort)),t.some((e=>e.fixed))){let e=0;for(let n=0;n<=t.length;n++){const i=t[n],r=t[n+1];if("left"===i.fixed&&(!r||!r.fixed)){e=n+1;break}}t.splice(e,0,{type:!0,label:"",key:"sort-cut-off",parent:""})}return t};if(t&&t.length>0)e.forEach((e=>{e.data.forEach((n=>{const i=t.find((e=>e.key===n.key))||{};n.type="true"===i.type||!0===i.type,n.sort=i.sort,n.fixed=i.fixed?i.fixed:n.fixed,n.parent={label:e.label}}))})),this.checkBoxMenu=this.deepClone(e),this.draggableMenu=n(this.checkBoxMenu);else{let t=0;e.forEach((e=>{e.data.forEach((n=>{t++,n.type=!0,n.width=n.width?+n.width:0,n.sort=t,n.parent={label:e.label}}))})),this.checkBoxMenu=this.deepClone(e),this.draggableMenu=n(this.checkBoxMenu)}this.$emit("changeTable",this.draggableMenu.filter((e=>"sort-cut-off"!==e.key)).sort(((e,t)=>e.sort-t.sort))),this.$emit("changeTableGroup",this.checkBoxMenu)},selectNone(){this.checkBoxMenu.forEach((e=>e.data.forEach((e=>e.type=!1)))),this.draggableMenu.forEach((e=>{"sort-cut-off"===e.key?e.type=!0:e.type=!1}))},setHighlight(e){this.activeId=e,this.$refs.tagItem&&this.$refs.tagItem[e].scrollIntoView({behavior:"smooth"})},changeCheckbox(e,t){this.draggableMenu.forEach((n=>{n.key===e&&(n.type=t)})),this.checkBoxMenu.forEach((n=>{n.data.forEach((n=>{n.key===e&&(n.type=t)}))}))},recoverDefault(){this.initTableList(this.deepClone(this.columnList))},onEnd(){let e=!0;this.draggableMenu.forEach(((t,n)=>{"sort-cut-off"===t.key&&(e=!1),e?(t.sort=n+1,t.fixed="left"):(t.sort=n,delete t.fixed)}))},async submit(){const e={column:[],id:this.id,page:this.page};this.draggableMenu.forEach((t=>{if("sort-cut-off"!==t.key){const{parent:n,...i}=t,r=e.column.some((e=>e.label===n.label));r?e.column.forEach((e=>{e.label===n.label&&e.data.push(i)})):e.column.push({label:n.label,data:[i]})}})),await this.submitMethod(e);const t=[];e.column.forEach((e=>{t.push(...e.data)})),this.$emit("changeTable",t.sort(((e,t)=>e.sort-t.sort))),this.$emit("changeTableGroup",e.column),this.closeDialog()},closeDialog(){this.search="",this.activeId=0,this.$emit("closeDialog")}}},y=g,b=l(y,f,p,!1,null,null,null),w=b.exports,k={name:"BYTable",components:{CustomColumn:w},props:{gridOptions:{type:Object,default:()=>{}},name:{type:String,default:""},autoHeight:{type:Boolean,default:!1}},data(){return{events:["keydown","current-change","radio-change","checkbox-change","checkbox-all","checkbox-range-start","checkbox-range-change","checkbox-range-end","cell-dblclick","cell-menu","cell-mouseenter","cell-mouseleave","cell-delete-value","header-cell-click","header-cell-dblclick","header-cell-menu","footer-cell-click","footer-cell-dblclick","footer-cell-menu","clear-merge","sort-change","clear-sort","filter-visible","filter-change","clear-filter","toggle-row-expand","toggle-tree-expand","menu-click","cell-selected","edit-closed","edit-activated","edit-disabled","valid-error","scroll","custom","page-change","form-submit","form-submit-invalid","form-reset","form-collapse","proxy-query","proxy-delete","proxy-save","toolbar-button-click","toolbar-tool-click","zoom"],customTableVisible:!1}},computed:{options(){const{customColumnConfig:e,columns:t,...n}=this.gridOptions,i=this.getColumnsData(t);return{border:!0,resizable:!0,showOverflow:!this.autoHeight,height:550,align:"left",copyFields:[],pagerConfig:!1,emptyText:"暂无数据",loadingConfig:{text:"加载中..."},columns:i,...n,resizableConfig:{minWidth:50,...this.gridOptions.resizableConfig},rowConfig:{height:41,isHover:!0,...this.gridOptions.rowConfig},sortConfig:{remote:!0,trigger:"cell",...this.gridOptions.sortConfig}}},slotMap(){var e,t,n;const i=new Set([]),r=null!==(e=null===(t=this.gridOptions)||void 0===t||null===(n=t.customColumnConfig)||void 0===n?void 0:n.slots)&&void 0!==e?e:[];return this.options.columns.forEach((e=>{if(e.slots){const t=Object.values(e.slots);t.forEach((e=>i.add(e)))}})),[...Array.from(i),...r]},eventListeners(){const e={};return this.events.forEach((t=>{e[t]=e=>this.$emit(t,e)})),e}},methods:{getColumnsData(e){if(!this.name)return e;const t=JSON.parse(localStorage.getItem(this.name));if(!t)return e;const n=(e,t)=>e.map((e=>{if(e.children){const i=t.find((t=>t.field===e.field));return{...e,width:(null===i||void 0===i?void 0:i.width)||e.width,children:n(e.children,(null===i||void 0===i?void 0:i.children)||[])}}const i=t.find((t=>t.field===e.field));return{...e,width:(null===i||void 0===i?void 0:i.width)||e.width}}));return n(e,t)},handleCellClick(e){if(this.options.copyFields.includes(e.column.field)){const t=e.cell.outerText;this.copy(t)}this.$emit("cell-click",e)},handleResizableChange(e){if(this.$emit("resizable-change",e),!this.name)return;const t=e.$table.collectColumn;console.log(t,"collectColumn");const n=e=>e.filter((e=>e.field||e.children)).map((e=>e.children?{field:e.field,width:e.renderWidth,children:n(e.children)}:{field:e.field,width:e.renderWidth})),i=n(t);localStorage.setItem(this.name,JSON.stringify(i))},pageChange(e){this.$emit("page-change",e)},copy(e){const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),this.$message({message:"复制成功",type:"success"}),t.remove()},getCustomColumnRef(){return this.$refs.CustomColumnRef},handleOpenCustomColumn(){this.customTableVisible=!0},changeTableFields(e){const t=[];e.forEach((e=>{!t.some((t=>t.field===e.key))&&e.type&&t.push({field:e.key,title:e.label,minWidth:e.minWidth||e.width,maxWidth:e.maxWidth,sortable:"undefined"===typeof e.sortable||JSON.parse(e.sortable),fixed:e.fixed,slots:this.gridOptions.customColumnConfig.slots.includes(e.key)?{default:e.key}:void 0})}));const n=this.getColumnsData(t);this.$emit("setColumn",n)},changeTableGroupFields(e){const t=e=>{const n=[];return e.forEach(((i,r)=>{i.data&&i.data.length>0?(n.push({title:i.label,align:"center",children:t(i.data)}),r<e.length-1&&n.push({title:"",width:5,headerClassName:"group-split",className:"group-split"})):!n.some((e=>e.field===i.key))&&i.type&&n.push({field:i.key,title:i.label,minWidth:i.minWidth||i.width,maxWidth:i.maxWidth,sortable:"undefined"===typeof i.sortable||JSON.parse(i.sortable),fixed:i.fixed,slots:this.gridOptions.customColumnConfig.slots.includes(i.key)?{default:i.key}:void 0})})),n};this.$emit("setGroupColumn",t(e))},closeCustomColumnDialog(){this.customTableVisible=!1}}},M=k,x=l(M,d,h,!1,null,"5e2b3384",null),D=x.exports,L=function(){var e=this,t=e._self._c;return t("div",{staticClass:"b-form"},[t("div",{staticClass:"header"},[e._t("header")],2),t("el-form",{ref:"formRef",staticClass:"myForm",attrs:{"label-position":e.labelPosition,rules:e.rules,"label-width":e.labelWidth,inline:e.inline,model:e.value,"label-suffix":":"},nativeOn:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)},reset:function(t){return t.preventDefault(),e.reset.apply(null,arguments)}}},[t("el-row",[e._l(e.formItems,(function(n){var i,r,a;return[n.isHidden?e._e():t("el-col",e._b({directives:[{name:"show",rawName:"v-show",value:e.showFold(n),expression:"showFold(item)"}],key:n.label},"el-col",n.colLayout||e.colLayout,!1),[t("el-form-item",{style:n.itemStyle||e.itemStyle,attrs:{label:n.label||"",rules:n.rules,prop:n.field,"label-width":n.labelWidth||e.labelWidth}},["input"===n.type||"password"===n.type?[t("el-input",e._b({staticStyle:{width:"100%"},attrs:{placeholder:n.placeholder,clearable:"","show-password":"password"===n.type,value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-input",n.otherOptions,!1),[n.otherOptions&&n.otherOptions.isPrefix?e._t("prefix",(function(){return["select"===n.otherOptions.prefixType?t("el-select",{style:{width:"100px"},attrs:{slot:"prepend",value:e.value[`${n.otherOptions.prefixField}`],placeholder:"请选择"},on:{input:function(t){return e.handleValueChange(t,n.otherOptions)}},slot:"prepend"},e._l(n.otherOptions.prefixOption,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1):e._e()]})):e._e(),e._t("suffix"),e._t("prepend"),e._t("append")],2)]:"select"===n.type?[t("by-select",e._b({staticStyle:{width:"100%"},attrs:{value:e.value[`${n.field}`],config:n,clearable:"",filterable:"",size:e.elSize,options:n.options},on:{input:function(t){return e.handleValueChange(t,n)}}},"by-select",n.otherOptions,!1)),e._t(n.field)]:"datepicker"===n.type?[t("el-date-picker",e._b({staticStyle:{width:"100%"},attrs:{placeholder:n.placeholder,value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-date-picker",n.otherOptions,!1))]:"cascader"===n.type?[t("el-cascader",e._b({staticStyle:{width:"100%"},attrs:{placeholder:n.placeholder,options:n.options,clearable:"",filterable:"",value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-cascader",n.otherOptions,!1))]:"switch"===n.type?[t("el-switch",e._b({attrs:{value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-switch",n.otherOptions,!1))]:"radioGroup"===n.type?["button"===n.cGOptions.type?t("el-radio-group",e._b({attrs:{value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-radio-group",n.otherOptions,!1),e._l(n.cGOptions.options,(function(n){return t("el-radio-button",{key:n.value,attrs:{label:n.value,disabled:!!n.disabled}},[e._v(" "+e._s(n.label)+" ")])})),1):e._e(),"checkbox"===n.cGOptions.type?t("el-radio-group",e._b({attrs:{value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-radio-group",n.otherOptions,!1),e._l(n.cGOptions.options,(function(n){return t("el-radio",{key:n.value,attrs:{label:n.value,disabled:!!n.disabled}},[e._v(" "+e._s(n.label)+" ")])})),1):e._e()]:"checkboxGroup"===n.type?["button"===n.cGOptions.type?t("el-checkbox-group",e._b({attrs:{value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-checkbox-group",n.otherOptions,!1),e._l(n.cGOptions.options,(function(n){return t("el-checkbox-button",{key:n.value,attrs:{label:n.value}},[e._v(" "+e._s(n.label)+" ")])})),1):e._e(),"checkbox"===n.cGOptions.type?t("el-checkbox-group",e._b({attrs:{value:e.value[`${n.field}`],size:e.elSize},on:{input:function(t){return e.handleValueChange(t,n)}}},"el-checkbox-group",n.otherOptions,!1),e._l(n.cGOptions.options,(function(n){return t("el-checkbox",{key:n.value,attrs:{label:n.value}},[e._v(" "+e._s(n.label)+" ")])})),1):e._e()]:"text"===n.type?[e._t(n.slotName,(function(){return[t("div",[e._v(e._s(`${n.defaultValue}`))])]}))]:"pairNumberInput"===n.type?[t("PairNumberInput",{attrs:{value:e.value[`${n.field}`],"earliest-placeholder":n.earliestPlaceholder,"latest-placeholder":n.latestPlaceholder},on:{input:function(t){return e.handleValueChange(t,n)}}})]:"customDatePicker"===n.type?[t("CustomDatePicker",e._b({attrs:{value:e.value[`${n.field}`]},on:{input:function(t){return e.handleValueChange(t,n)},"range-change":function(t){return e.handleRangeChange(t,n)}}},"CustomDatePicker",n,!1))]:"custom"===n.type?[e._t(n.field,null,{row:n})]:"search"===n.type?[t("el-button",e._b({attrs:{size:e.elSize||"mini",type:"primary",icon:"el-icon-search"},on:{click:e.handleQueryClick}},"el-button",null!==(i=n.otherOptions)&&void 0!==i?i:{},!1),[e._v(" "+e._s((n.otherOptions||{}).text||"搜索")+" ")])]:"formButtons"===n.type?[n.otherOptions&&!1===n.otherOptions.reset?e._e():t("el-button",e._b({attrs:{"native-type":"reset",size:e.elSize||"mini"}},"el-button",null!==(r=n.otherOptions)&&void 0!==r?r:{},!1),[e._v(" "+e._s((n.otherOptions||{}).resetText||"重置")+" ")]),n.otherOptions&&!1===n.otherOptions.submit?e._e():t("el-button",e._b({attrs:{"native-type":"submit",size:e.elSize||"mini",type:"primary",icon:n.otherOptions&&!1===n.otherOptions.showSubmitIcon?"":"el-icon-search"}},"el-button",null!==(a=n.otherOptions)&&void 0!==a?a:{},!1),[e._v(" "+e._s((n.otherOptions||{}).submitText||"搜索")+" ")])]:e._e()],2)],1)]})),e._t("btn",null,{formData:e.formData})],2)],1),t("div",{staticClass:"footer"},[e._t("footer")],2)],1)},S=[],C=function(){var e=this,t=e._self._c;return t("div",{staticClass:"w-full flex"},[t("el-input",{staticClass:"w-1/2",attrs:{value:e.value[0],placeholder:e.earliestPlaceholder},on:{input:t=>e.handleInput(t,"min"),blur:t=>e.handleBlur(+t.target.value,"min")}}),t("span",[e._v("~")]),t("el-input",{staticClass:"w-1/2",attrs:{value:e.value[1],placeholder:e.latestPlaceholder},on:{input:t=>e.handleInput(t,"max"),blur:t=>e.handleBlur(+t.target.value,"max")}})],1)},T=[],Y={props:{value:{type:Array,required:!0,default:()=>["",0]},earliestPlaceholder:{type:String,default:""},latestPlaceholder:{type:String,default:""}},methods:{handleInput(e,t){if("min"===t){const t=[e.replace(/\D+/,""),this.value[1]];this.$emit("input",t)}else if("max"===t){const t=[this.value[0],e.replace(/\D+/,"")];this.$emit("input",t)}},handleBlur(e,t){if("min"===t){if(e>this.value[1]){const e=[this.value[1],this.value[1]];this.$emit("input",e)}}else if("max"===t&&e<this.value[0]){const e=[this.value[0],this.value[0]];this.$emit("input",e)}}}},O=Y,E=l(O,C,T,!1,null,null,null),j=E.exports,P=function(){var e=this,t=e._self._c;return t("div",{staticClass:"b-picker wrapper"},[t("el-date-picker",e._b({staticStyle:{width:"70%"},attrs:{value:e.value},on:{input:e.handleChange}},"el-date-picker",e.dateOptions,!1)),t("div",{staticClass:"btn"},e._l(e.shortcuts,(function(n){return t("span",{key:n.key,staticClass:"item",class:{item_active:n.key===e.active},on:{click:function(t){return e.handleClick(n)}}},[e._v(" "+e._s(n.label)+" ")])})),0)],1)},$=[],N=i(6879),I=i.n(N),H={props:{value:{type:[Array,String],required:!0,default:()=>[]},otherOption:{type:Object,default:()=>({startPlaceholder:"开始时间",endPlaceholder:"结束时间",type:"daterange",rangeSeparator:"-",size:"mini",active:""})},startTimeField:{type:String,default:""},endTimeField:{type:String,default:""}},data(){return{shortcuts:[{label:"上月",start_time:I()().subtract(1,"months").startOf("month").format("YYYY-MM-DD"),end_time:I()().subtract(1,"months").endOf("month").format("YYYY-MM-DD"),key:"last_month"},{label:"昨天",start_time:I()().subtract(1,"days").format("YYYY-MM-DD"),end_time:I()().subtract(1,"days").format("YYYY-MM-DD"),key:"yesterday"},{label:"今天",start_time:I()().startOf("day").format("YYYY-MM-DD"),end_time:I()().startOf("day").format("YYYY-MM-DD"),key:"today"},{label:"本周",start_time:I()().startOf("week").format("YYYY-MM-DD"),end_time:I()().endOf("week").format("YYYY-MM-DD"),key:"week"},{label:"本月",start_time:I()().startOf("month").format("YYYY-MM-DD"),end_time:I()().endOf("month").format("YYYY-MM-DD"),key:"month"}],active:""}},computed:{dateOptions(){return{startPlaceholder:"开始时间",endPlaceholder:"结束时间",type:"daterange",rangeSeparator:"至",size:"mini",active:"",...this.otherOption}}},watch:{value:{handler(e,t){if(e&&e.length)this.active="",this.shortcuts.forEach((t=>{t.start_time===e[0]&&t.end_time===e[1]&&(this.active=t.key)}));else{this.active=this.dateOptions.active;const e=this.shortcuts.find((e=>e.key===this.dateOptions.active))||{};e.start_time&&e.end_time&&this.handleClick(e)}},immediate:!0}},methods:{handleChange(e){if(e){const t=e.map((e=>I()(e).format("YYYY-MM-DD")));this.$emit("input",t),this.startTimeField&&this.endTimeField&&this.$emit("range-change",{startTime:t[0],endTime:t[1]})}else this.$emit("input",[]),this.startTimeField&&this.endTimeField&&this.$emit("range-change",{startTime:"",endTime:""});this.active=""},handleClick(e){this.active=e.key,this.$emit("input",[e.start_time,e.end_time]),this.startTimeField&&this.endTimeField&&this.$emit("range-change",{startTime:e.start_time,endTime:e.end_time})}}},A=H,F=l(A,P,$,!1,null,null,null),z=F.exports,V={name:"ByForm",components:{PairNumberInput:j,CustomDatePicker:z},props:{value:{type:Object,required:!0},labelPosition:{type:String,default:"right"},formItems:{type:Array,default:()=>[]},flexible:{type:Object,default:()=>({foldField:"none",unfold:!1})},labelWidth:{type:String,default:"100px"},itemStyle:{type:Object,default:()=>({padding:"10px 40px"})},colLayout:{type:Object,default:()=>({xl:4,lg:6,md:6,sm:8,xs:12})},isFlexible:{type:Boolean,default:!0},inline:{type:Boolean,default:!1},rules:{type:Object,default:()=>{}},elSize:{type:String,default:"mini"}},data(){return{formData:this.value,replacementData:void 0,initialValues:{...this.value}}},computed:{showFold(){return e=>!!this.isFlexible||(!this.flexible||!this.flexible.foldField.length||!this.flexible.foldField.includes(e.id)&&!this.flexible.foldField.includes(e.field))}},watch:{value:{handler(e,t){this.formData=e,this.replacementData={...this.replacementData?this.replacementData:{},...e}},deep:!0,immediate:!0}},methods:{validate(e=()=>{}){this.$refs.formRef.validate(((t,n)=>{e(t,n)}))},clearValidate(){this.$refs.formRef.clearValidate()},handleValueChange(e,t){this.replacementData?this.replacementData[t.field]=e:this.replacementData={...this.value,[t.field]:e},this.$emit("change",{...t,value:e}),this.$emit("input",this.replacementData)},handleRangeChange({startTime:e,endTime:t},n){n.startTimeField&&n.endTimeField&&(this.replacementData?(this.replacementData[n.startTimeField]=e,this.replacementData[n.endTimeField]=t):this.replacementData={...this.value,[n.startTimeField]:e,[n.endTimeField]:t},this.$emit("input",this.replacementData))},handleQueryClick(){this.$emit("queryBtnClick")},submit(){this.$refs.formRef.validate((e=>{if(!e)return!1;this.$emit("submit",this.formData)}))},reset(){this.$refs.formRef.resetFields(),this.$emit("input",{...this.initialValues}),this.$emit("reset")}}},W=V,R=l(W,L,S,!1,null,null,null),B=R.exports,q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"b-page-search"},[t("by-form",e._b({attrs:{value:e.formData,"is-flexible":e.unfold},on:{input:e.handleInput,change:e.handleChange,queryBtnClick:e.handleQueryClick,submit:e.submit,reset:e.reset},scopedSlots:e._u([{key:"header",fn:function(){return[e._t("header")]},proxy:!0},{key:"footer",fn:function(){return[e.isShowUnfoldBtn?t("div",{staticClass:"fold"},[t("by-fold-search",{on:{change:e.handleFlexible}})],1):e._e()]},proxy:!0},e._l(e.getCustomItem,(function(t){return{key:t,fn:function(){return[e._t(t)]},proxy:!0}}))],null,!0)},"by-form",e.searchFormConfig,!1))],1)},U=[],G={props:{searchFormConfig:{type:Object,required:!0,default:()=>{}},value:{type:Object,default:()=>{}}},data(){var e,t;return{formItems:null!==(e=null===(t=this.searchFormConfig)||void 0===t?void 0:t.formItems)&&void 0!==e?e:[],formOriginData:{},formData:{},unfold:!1}},computed:{isShowUnfoldBtn(){var e,t,n,i;const r=null!==(e=null===(t=this.searchFormConfig)||void 0===t?void 0:t.formItems)&&void 0!==e?e:[],a=null!==(n=null===(i=this.searchFormConfig)||void 0===i?void 0:i.flexible)&&void 0!==n?n:void 0;return!!a&&r.length>a.foldField.length},getCustomItem(){return this.formItems.filter((e=>"custom"===e.type)).map((e=>e.field))}},watch:{value:{handler(e,t){this.formData=e},deep:!0,immediate:!0}},mounted(){var e,t;this.formOriginData=this.value,this.unfold=null!==(e=null===(t=this.searchFormConfig.flexible)||void 0===t?void 0:t.unfold)&&void 0!==e&&e},methods:{handleResetClick(){this.formData={...this.formOriginData},this.$emit("input",{...this.formOriginData}),this.$emit("resetBtnClick")},handleQueryClick(){this.$emit("queryBtnClick")},handleFlexible(){this.unfold=!this.unfold},handleInput(e){this.formData=e,this.$emit("input",{...this.formData})},handleChange(e){this.$emit("change",e)},submit(){this.$emit("submit",this.formData)},reset(){this.$emit("reset")}}},K=G,J=l(K,q,U,!1,null,null,null),X=J.exports,Z=function(){var e=this,t=e._self._c;return t("div",{staticClass:"drawer_query_btn b-fold-search"},[t("div",{on:{click:e.drawer}},[1==e.show?[t("span",{staticStyle:{color:"#3aa1ff","vertical-align":"middle"}},[e._v("收起")]),e._v(" "),t("img",{staticStyle:{"vertical-align":"middle"},attrs:{src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyBjbGFzcz0iaWNvbiIgd2lkdGg9IjIwMHB4IiBoZWlnaHQ9IjIwMC4wMHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iIzVjYWRmZiIgZD0iTTg3Ny41IDU2NS45bC0zNjcuNi0zNDAtMzY3LjYgMzQwYy0yMi41IDE0LjUtNTIuNSAxNC41LTY3LjUgMC0xNS0yMS43LTE1LTUwLjcgMC02NS4xTDQ5NSAxMTcuNWMwLTcuMiA3LjUtNy4yIDE1LTcuMnM3LjUgMCAxNSA3LjJsNDIwLjIgMzgzLjNjMjIuNSAyMS43IDE1IDUwLjYgMCA2NS4xLTIyLjcgMTQuNS01Mi43IDE0LjUtNjcuNyAwek00OTQuOCA0NTAuMWMwLTcuMiA3LjUtNy4yIDE1LTcuMnMxNSAwIDE1IDcuMkw5NDUgODMzLjRjMjIuNSAyMS43IDE1IDUwLjYgMCA2NS4xLTIyLjUgMTQuNC01Mi41IDE0LjQtNjcuNSAwTDUwOS44IDU1OC42IDE0Mi4yIDkwNS44Yy0yMi41IDE0LjUtNTIuNSAxNC41LTY3LjUgMC0xNS0yMS43LTE1LTUwLjcgMC02NS4xbDQyMC4xLTM5MC42eiBtMCAwIiAvPjwvc3ZnPg==",alt:"收起"}})]:[t("span",{staticStyle:{color:"#3aa1ff","vertical-align":"middle"}},[e._v("展开更多")]),e._v(" "),t("img",{staticStyle:{"vertical-align":"middle"},attrs:{src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyBjbGFzcz0iaWNvbiIgd2lkdGg9IjIwMHB4IiBoZWlnaHQ9IjIwMC4wMHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iIzVjYWRmZiIgZD0iTTE0NS40IDQ2MS4xbDM2Ny42IDM0MCAzNjcuNi0zNDBjMjIuNS0xNC41IDUyLjUtMTQuNSA2Ny41IDAgMTUgMjEuNyAxNSA1MC43IDAgNjUuMUw1MjcuOSA5MDkuNWMwIDcuMi03LjUgNy4yLTE1IDcuMnMtNy41IDAtMTUtNy4yTDc3LjcgNTI2LjJjLTIyLjUtMjEuNy0xNS01MC42IDAtNjUuMSAyMi42LTE0LjUgNTIuNi0xNC41IDY3LjcgMHpNNTI4IDU3Ni45YzAgNy4yLTcuNSA3LjItMTUgNy4ycy0xNSAwLTE1LTcuMkw3Ny44IDE5My42Yy0yMi41LTIxLjctMTUtNTAuNiAwLTY1LjEgMjIuNS0xNC40IDUyLjUtMTQuNCA2Ny41IDBMNTEzIDQ2OC40bDM2Ny42LTM0Ny4yYzIyLjUtMTQuNSA1Mi41LTE0LjUgNjcuNSAwIDE1IDIxLjcgMTUgNTAuNyAwIDY1LjFMNTI4IDU3Ni45eiBtMCAwIiAvPjwvc3ZnPg==",alt:"展开更多"}})]],2)])},Q=[],ee={data(){return{show:!1}},methods:{drawer(e){this.show=!this.show,this.$emit("change",this.show)}}},te=ee,ne=l(te,Z,Q,!1,null,null,null),ie=ne.exports,re=function(){var e=this,t=e._self._c;return t("el-select",e._b({ref:"selection",attrs:{value:e.value,placeholder:e.config.placeholder||"请选择"},on:{change:e.change,"visible-change":e.visibleChange,"remove-tag":e.removeTag,clear:e.clear,blur:e.blur,focus:e.focus}},"el-select",e.$props,!1),["group"===e.config.mode?e._l(e.item.options,(function(n){return t("el-option-group",{key:n[e.config.optionValue||"value"],attrs:{label:n[e.config.optionLabel||"label"]}},e._l(n.options,(function(n){return t("el-option",{key:n[e.config.optionValue||"value"],attrs:{label:n[e.config.optionLabel||"label"],value:n[e.config.optionValue||"value"]}})})),1)})):e._l(e.filterData,(function(n){return t("el-option",{key:n[e.config.optionValue||"value"]+"-"+n[e.config.optionLabel||"label"],attrs:{label:n[e.config.optionLabel||"label"],value:n[e.config.optionValue||"value"]}})}))],2)},ae=[],se=i(7822),oe={name:"BYSelect",props:{...se.Select.props,value:{type:[String,Number,Array]},placeholder:{type:String,default:"请选择"},options:{type:Array,default:()=>[]},config:{type:Object,default:null}},data(){return{searchVal:"",filterData:[]}},watch:{options:{handler(){this.filterData=this.options},deep:!0,immediate:!0}},methods:{change(e){this.$emit("change",1===arguments.length?e:arguments),this.$emit("input",e)},input(e){this.$emit("change",1===arguments.length?e:arguments),this.$emit("input",e)},visibleChange(e){this.$emit("visible-change",1===arguments.length?e:arguments)},removeTag(e){this.$emit("remove-tag",1===arguments.length?e:arguments)},clear(e){this.$emit("clear",1===arguments.length?e:arguments)},blur(e){this.$emit("blur",1===arguments.length?e:arguments)},focus(e){this.multiple&&this.searchNoReset(),this.$emit("blur",1===arguments.length?e:arguments)},searchNoReset(){this.$refs.selection.$refs.input.blur=()=>{this.filterData=this.options},this.$refs.selection.$refs.input.onkeyup=()=>{this.filterData=this.options,this.searchVal=this.$refs.selection.$refs.input.value,this.filterData=this.options.filter((e=>-1!==e[this.config.optionLabel].indexOf(this.searchVal)))}}}},le=oe,ue=l(le,re,ae,!1,null,null,null),ce=ue.exports,de=function(){var e=this,t=e._self._c;return t("div",{staticClass:"b-picker wrapper"},[t("el-date-picker",{staticStyle:{width:"70%"},attrs:{"start-placeholder":e.config.startPlaceholder||"开始时间","end-placeholder":e.config.endPlaceholder||"结束时间","range-separator":e.config.rangeSeparator||"-",size:e.config.size||"mini",type:"daterange"},on:{input:e.handleChange},model:{value:e.value[e.config.field],callback:function(t){e.$set(e.value,e.config.field,t)},expression:"value[config.field]"}}),t("div",{staticClass:"btn"},e._l(e.shortcuts,(function(n){return t("span",{key:n.key,staticClass:"item",class:{item_active:n.key===e.active},on:{click:function(t){return e.handleClick(n)}}},[e._v(" "+e._s(n.label)+" ")])})),0)],1)},he=[],fe={name:"ByDatePickerRange",props:{value:{type:Object,default:null},config:{type:Object,default:null}},data(){return{shortcuts:[{label:"上月",start_time:I()().subtract(1,"months").startOf("month").format("YYYY-MM-DD"),end_time:I()().subtract(1,"months").endOf("month").format("YYYY-MM-DD"),key:"last_month"},{label:"昨天",start_time:I()().subtract(1,"days").format("YYYY-MM-DD"),end_time:I()().subtract(1,"days").format("YYYY-MM-DD"),key:"yesterday"},{label:"今天",start_time:I()().startOf("day").format("YYYY-MM-DD"),end_time:I()().startOf("day").format("YYYY-MM-DD"),key:"today"},{label:"本周",start_time:I()().startOf("week").format("YYYY-MM-DD"),end_time:I()().endOf("week").format("YYYY-MM-DD"),key:"week"},{label:"本月",start_time:I()().startOf("month").format("YYYY-MM-DD"),end_time:I()().endOf("month").format("YYYY-MM-DD"),key:"month"}],active:""}},mounted(){this.active=this.config.active||"today";const e=this.shortcuts.find((e=>e.key===this.active))||{};e.start_time&&e.end_time&&this.handleClick(e)},methods:{handleChange(e){e?this.$emit("input",e.map((e=>I()(e).format("YYYY-MM-DD")))):this.$emit("input",[]),this.active=""},handleClick(e){this.active=e.key,this.value[this.config.field]=[e.start_time,e.end_time],this.$emit("input",[e.start_time,e.end_time])}}},pe=fe,me=l(pe,de,he,!1,null,null,null),_e=me.exports,ve=null,ge=null,ye=null,be="z-index-manage",we=null,ke="z-index-style",Me="m",xe="s",De={m:1e3,s:1e3};function Le(){return ve||"undefined"!==typeof document&&(ve=document),ve}function Se(){return ve&&!ge&&(ge=ve.body||ve.getElementsByTagName("body")[0]),ge}function Ce(){var e=0,t=Le();if(t){var n=Se();if(n)for(var i=n.getElementsByTagName("*"),r=0;r<i.length;r++){var a=i[r];if(a&&a.style&&1===a.nodeType){var s=a.style.zIndex;s&&/^\d+$/.test(s)&&(e=Math.max(e,Number(s)))}}}return e}function Te(){if(!we){var e=Le();e&&(we=e.getElementById(ke),we||(we=e.createElement("style"),we.id=ke,e.getElementsByTagName("head")[0].appendChild(we)))}return we}function Ye(){var e=Te();if(e){var t="--dom-",n="-z-index";e.innerHTML=":root{"+t+"main"+n+":"+$e()+";"+t+"sub"+n+":"+Ae()+"}"}}function Oe(){if(!ye){var e=Le();if(e&&(ye=e.getElementById(be),!ye)){var t=Se();t&&(ye=e.createElement("div"),ye.id=be,ye.style.display="none",t.appendChild(ye),je(De.m),Ie(De.s))}}return ye}function Ee(e){return function(t){if(t){t=Number(t),De[e]=t;var n=Oe();n&&(n.dataset?n.dataset[e]=t+"":n.setAttribute("data-"+e,t+""))}return Ye(),De[e]}}var je=Ee(Me);function Pe(e,t){return function(n){var i,r=Oe();if(r){var a=r.dataset?r.dataset[e]:r.getAttribute("data-"+e);a&&(i=Number(a))}return i||(i=De[e]),n?Number(n)<i?t():n:i}}var $e=Pe(Me,Ne);function Ne(){return je($e()+1)}var Ie=Ee(xe),He=Pe(xe,Fe);function Ae(){return $e()+He()}function Fe(){return Ie(He()+1),Ae()}var ze={setCurrent:je,getCurrent:$e,getNext:Ne,setSubCurrent:Ie,getSubCurrent:Ae,getSubNext:Fe,getMax:Ce};Ye();var Ve=ze;const We={ByPager:c,ByTable:D,ByForm:B,ByPageSearch:X,ByFoldSearch:ie,BySelect:ce,ByDatePickerRange:_e};Ve.setCurrent(99999);const Re=e=>{Object.keys(We).forEach((t=>{e.component(t,We[t])}))};"undefined"!==typeof window&&window.Vue&&Re(window.Vue);var Be={install:Re},qe=Be}(),r}()}));
|
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weitutech/by-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/by-components.umd.js",
|
|
6
|
-
"sideEffects": [
|
|
7
|
-
"*.vue",
|
|
8
|
-
"*.scss"
|
|
9
|
-
],
|
|
10
6
|
"scripts": {
|
|
11
7
|
"dev": "vue-cli-service serve",
|
|
12
8
|
"build": "npm run build:js && npm run build:css",
|