@web-utils/component 2.0.10 → 2.0.12
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/dist/chunks/3d28cc08.js +57 -0
- package/dist/chunks/{41a066be.js → 44b78389.js} +8 -8
- package/dist/chunks/5d33812d.js +147 -0
- package/dist/chunks/{61ad06b2.js → 822300f3.js} +3 -3
- package/dist/chunks/9d848bf6.js +99 -0
- package/dist/chunks/a0bb327b.js +96 -0
- package/dist/chunks/a8891d2c.js +30 -0
- package/dist/chunks/c69d5628.js +248 -0
- package/dist/chunks/de9fe802.js +24 -0
- package/dist/chunks/{5a78e0db.js → e1939731.js} +6 -5
- package/dist/components/address-input/index.js +56 -43
- package/dist/components/address-input/style.css +15 -1
- package/dist/components/aside-menu/index.js +36 -30
- package/dist/components/aside-menu/style.css +9 -1
- package/dist/components/awesome-button/index.js +35 -32
- package/dist/components/base.css +66 -1
- package/dist/components/capsule-tab/index.js +33 -27
- package/dist/components/capsule-tab/style.css +32 -1
- package/dist/components/chunk-file-uploader/index.js +88 -54
- package/dist/components/chunk-file-uploader/style.css +4 -1
- package/dist/components/chunk-file-uploader-button/index.js +31 -25
- package/dist/components/chunk-file-uploader-button/style.css +17 -1
- package/dist/components/chunk-file-uploader-drop/index.js +42 -28
- package/dist/components/chunk-file-uploader-drop/style.css +12 -1
- package/dist/components/chunk-file-uploader-file/index.js +212 -134
- package/dist/components/chunk-file-uploader-file/style.css +125 -1
- package/dist/components/chunk-file-uploader-files/index.js +34 -28
- package/dist/components/chunk-file-uploader-files/style.css +9 -1
- package/dist/components/chunk-file-uploader-list/index.js +35 -29
- package/dist/components/chunk-file-uploader-list/style.css +9 -1
- package/dist/components/chunk-file-uploader-un-support/index.js +38 -30
- package/dist/components/chunk-file-uploader-un-support/style.css +6 -1
- package/dist/components/code-mirror-editor/index.js +181 -153
- package/dist/components/code-mirror-editor/style.css +17 -1
- package/dist/components/color-picker/index.js +68 -49
- package/dist/components/confirm-button/index.js +21 -19
- package/dist/components/confirmable/index.js +19 -18
- package/dist/components/context-menu/index.js +130 -108
- package/dist/components/context-menu/style.css +88 -1
- package/dist/components/custom-scrollbar/index.js +67 -49
- package/dist/components/data-table-picker/index.js +81 -62
- package/dist/components/dynamic-table/index.js +113 -89
- package/dist/components/dynamic-table/style.css +30 -1
- package/dist/components/e-charts/index.js +201 -120
- package/dist/components/e-charts/style.css +10 -1
- package/dist/components/editable-progress/index.js +93 -60
- package/dist/components/editable-progress/style.css +37 -1
- package/dist/components/editable-tree/index.js +638 -423
- package/dist/components/editable-tree/style.css +82 -1
- package/dist/components/egd-collapse/index.js +46 -33
- package/dist/components/egd-collapse-item/index.js +76 -60
- package/dist/components/element-dialog/index.js +147 -95
- package/dist/components/element-dialog/style.css +102 -1
- package/dist/components/empty-view/index.js +34 -28
- package/dist/components/empty-view/style.css +17 -1
- package/dist/components/error-view/index.js +32 -26
- package/dist/components/error-view/style.css +17 -1
- package/dist/components/flex-column/index.js +40 -25
- package/dist/components/flex-item/index.js +57 -29
- package/dist/components/flex-row/index.js +40 -25
- package/dist/components/flex-scroller/index.js +32 -26
- package/dist/components/flex-scroller/style.css +20 -1
- package/dist/components/form-button/index.js +38 -34
- package/dist/components/form-cascader/index.js +81 -71
- package/dist/components/form-checkbox-group/index.js +113 -88
- package/dist/components/form-checkbox-group/style.css +51 -1
- package/dist/components/form-date-picker/index.js +132 -70
- package/dist/components/form-holder/index.js +39 -32
- package/dist/components/form-input/index.js +62 -56
- package/dist/components/form-input-email/index.js +60 -48
- package/dist/components/form-input-id-card/index.js +59 -53
- package/dist/components/form-input-number/index.js +68 -61
- package/dist/components/form-input-number/style.css +12 -1
- package/dist/components/form-input-phone-number/index.js +55 -49
- package/dist/components/form-input-time/index.js +59 -53
- package/dist/components/form-item/index.js +123 -80
- package/dist/components/form-item/style.css +11 -1
- package/dist/components/form-item-config-provider/index.js +26 -25
- package/dist/components/form-item-group/index.js +111 -85
- package/dist/components/form-item-group/style.css +30 -1
- package/dist/components/form-radio-group/index.js +104 -85
- package/dist/components/form-radio-group/style.css +53 -1
- package/dist/components/form-select/index.js +91 -76
- package/dist/components/form-switch/index.js +57 -51
- package/dist/components/form-textarea/index.js +57 -51
- package/dist/components/form-view/index.js +232 -165
- package/dist/components/form-view/style.css +158 -1
- package/dist/components/guide-steps/index.js +58 -44
- package/dist/components/guide-steps/style.css +34 -1
- package/dist/components/icon-card/index.js +35 -29
- package/dist/components/icon-card/style.css +56 -1
- package/dist/components/iframe-window/index.js +35 -29
- package/dist/components/iframe-window/style.css +20 -1
- package/dist/components/image-viewer/index.js +66 -48
- package/dist/components/image-viewer/style.css +21 -1
- package/dist/components/input-number/index.js +193 -127
- package/dist/components/input-number/style.css +15 -1
- package/dist/components/input-number-range/index.js +57 -45
- package/dist/components/input-number-range/style.css +12 -1
- package/dist/components/j-s-x-component/index.js +4 -4
- package/dist/components/keep-view-alive/index.js +120 -73
- package/dist/components/loading-view/index.js +32 -26
- package/dist/components/loading-view/style.css +17 -1
- package/dist/components/nav-bar/index.js +37 -27
- package/dist/components/nav-bar/style.css +17 -1
- package/dist/components/not-implement/index.js +31 -23
- package/dist/components/not-implement/style.css +15 -1
- package/dist/components/page/index.js +28 -22
- package/dist/components/page/style.css +12 -1
- package/dist/components/page-header/index.js +36 -30
- package/dist/components/page-header/style.css +14 -1
- package/dist/components/page-index/index.js +83 -62
- package/dist/components/page-index/style.css +23 -1
- package/dist/components/page-index-top/index.js +68 -53
- package/dist/components/page-skeleton/index.js +37 -31
- package/dist/components/page-skeleton/style.css +23 -1
- package/dist/components/page-skeleton-new/index.js +48 -42
- package/dist/components/page-skeleton-new/style.css +42 -1
- package/dist/components/pageable-table/index.js +253 -186
- package/dist/components/pageable-table/style.css +72 -1
- package/dist/components/pageable-view/index.js +199 -129
- package/dist/components/pageable-view/style.css +69 -1
- package/dist/components/photo-swipe/index.js +151 -110
- package/dist/components/photo-swipe/style.css +20 -1
- package/dist/components/resize-observer/index.js +68 -34
- package/dist/components/resize-observer/style.css +31 -1
- package/dist/components/search-popover/index.js +211 -153
- package/dist/components/search-popover/style.css +93 -1
- package/dist/components/sign-panel/index.js +142 -92
- package/dist/components/sign-panel/style.css +97 -1
- package/dist/components/split-pane/index.js +162 -101
- package/dist/components/split-pane/style.css +100 -1
- package/dist/components/stateful/index.js +34 -31
- package/dist/components/stateful/style.css +33 -1
- package/dist/components/static-pageable-table/index.js +44 -37
- package/dist/components/static-pageable-table/style.css +9 -1
- package/dist/components/swiper/index.js +150 -85
- package/dist/components/swiper/style.css +43 -1
- package/dist/components/tab/index.js +72 -54
- package/dist/components/tab/style.css +122 -1
- package/dist/components/tab-item/index.js +35 -30
- package/dist/components/table-column/index.js +32 -30
- package/dist/components/table-view/index.js +227 -156
- package/dist/components/table-view/style.css +95 -1
- package/dist/components/tag-render/index.js +58 -44
- package/dist/components/tag-render/style.css +33 -1
- package/dist/components/tinymce-editor/index.js +95 -79
- package/dist/components/tinymce-editor/style.css +43 -1
- package/dist/components/tinymce-wrapper/index.js +121 -92
- package/dist/components/tinymce-wrapper/style.css +36 -1
- package/dist/components/toolbar/index.js +84 -63
- package/dist/components/toolbar/style.css +39 -1
- package/dist/components/toolbar-button/index.js +48 -41
- package/dist/components/toolbar-button/style.css +21 -1
- package/dist/components/trigger/index.js +36 -29
- package/dist/components/vue-tags-input/index.js +308 -188
- package/dist/components/vue-tags-input/style.css +682 -1
- package/dist/components/watermark/index.js +37 -25
- package/dist/components/watermark/style.css +11 -1
- package/dist/components/x-dialog/index.js +93 -67
- package/dist/components/x-dialog/style.css +15 -1
- package/dist/index.css +1105 -193
- package/dist/index.es.js +7242 -4789
- package/package.json +2 -2
- package/web-types.json +1 -1
- package/dist/chunks/3a79781b.js +0 -75
- package/dist/chunks/5d4282fb.js +0 -30
- package/dist/chunks/76680a03.js +0 -24
- package/dist/chunks/8c0142e0.js +0 -81
- package/dist/chunks/97652d86.js +0 -26
- package/dist/chunks/b4acd3a6.js +0 -126
- package/dist/chunks/f71045fc.js +0 -184
|
@@ -1,161 +1,185 @@
|
|
|
1
|
-
import { isString
|
|
2
|
-
import { k as
|
|
3
|
-
import { n as
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
1
|
+
import { isString, isArray, trace, warning, merge, toStringArray, isFunction, hasOwn } from "@web-utils/core";
|
|
2
|
+
import { k as fillPath } from "../../chunks/c69d5628.js";
|
|
3
|
+
import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
|
|
4
|
+
var render = function() {
|
|
5
|
+
var _vm = this;
|
|
6
|
+
var _h = _vm.$createElement;
|
|
7
|
+
var _c = _vm._self._c || _h;
|
|
8
|
+
return _c("div", {
|
|
7
9
|
staticClass: "table-view"
|
|
8
|
-
}, [
|
|
10
|
+
}, [_c("Toolbar", _vm._g(_vm._b({
|
|
9
11
|
on: {
|
|
10
|
-
search:
|
|
11
|
-
del:
|
|
12
|
-
create:
|
|
13
|
-
reload:
|
|
14
|
-
imp: function(
|
|
15
|
-
|
|
12
|
+
"search": _vm.toggleSearch,
|
|
13
|
+
"del": _vm.del,
|
|
14
|
+
"create": _vm.create,
|
|
15
|
+
"reload": _vm.reloadTable,
|
|
16
|
+
"imp": function($event) {
|
|
17
|
+
_vm.importDialogVisible = true;
|
|
16
18
|
}
|
|
17
19
|
},
|
|
18
|
-
scopedSlots:
|
|
20
|
+
scopedSlots: _vm._u([{
|
|
19
21
|
key: "default",
|
|
20
22
|
fn: function() {
|
|
21
|
-
return [
|
|
23
|
+
return [_vm._t("toolbar-button")];
|
|
22
24
|
},
|
|
23
|
-
proxy:
|
|
24
|
-
},
|
|
25
|
+
proxy: true
|
|
26
|
+
}, _vm._l(_vm.buttonSlots, function(item) {
|
|
25
27
|
return {
|
|
26
|
-
key:
|
|
28
|
+
key: item,
|
|
27
29
|
fn: function() {
|
|
28
|
-
return [
|
|
30
|
+
return [_vm._t(item)];
|
|
29
31
|
},
|
|
30
|
-
proxy:
|
|
32
|
+
proxy: true
|
|
31
33
|
};
|
|
32
|
-
})], null,
|
|
33
|
-
}, "Toolbar",
|
|
34
|
+
})], null, true)
|
|
35
|
+
}, "Toolbar", _vm.toolbarProps, false), _vm.toolbarListeners)), _c("div", {
|
|
34
36
|
staticClass: "table-view-content-wrapper"
|
|
35
|
-
}, [
|
|
37
|
+
}, [_c("div", {
|
|
36
38
|
staticClass: "table-view-content"
|
|
37
|
-
}, [
|
|
39
|
+
}, [_vm.treeProps.show ? _c("div", {
|
|
38
40
|
ref: "treeScroller",
|
|
39
41
|
staticClass: "table-view-sidebar",
|
|
40
42
|
on: {
|
|
41
|
-
scroll:
|
|
43
|
+
"scroll": _vm.onTreeScroll
|
|
42
44
|
}
|
|
43
|
-
}, [
|
|
45
|
+
}, [_c("div", {
|
|
44
46
|
staticStyle: {
|
|
45
47
|
"font-size": "16px"
|
|
46
48
|
}
|
|
47
|
-
}, [
|
|
49
|
+
}, [_vm._v(" 视图导航 ")]), _c("EditableTree", _vm._g(_vm._b({
|
|
48
50
|
ref: "tree",
|
|
49
51
|
attrs: {
|
|
50
|
-
readonly: ""
|
|
52
|
+
"readonly": ""
|
|
51
53
|
},
|
|
52
|
-
scopedSlots:
|
|
54
|
+
scopedSlots: _vm._u([{
|
|
53
55
|
key: "default",
|
|
54
|
-
fn: function(
|
|
55
|
-
var
|
|
56
|
-
return [
|
|
57
|
-
return [
|
|
56
|
+
fn: function(_ref) {
|
|
57
|
+
var node = _ref.node, data = _ref.data;
|
|
58
|
+
return [_vm._t("tree-node", function() {
|
|
59
|
+
return [_c("span", [_c("i", {
|
|
58
60
|
staticClass: "node-icon",
|
|
59
|
-
class:
|
|
60
|
-
}),
|
|
61
|
-
return [
|
|
61
|
+
class: node.childNodes.length > 0 ? node.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets"
|
|
62
|
+
}), _vm._t("tree-label", function() {
|
|
63
|
+
return [_vm._v(_vm._s(node.label))];
|
|
62
64
|
}, {
|
|
63
|
-
node:
|
|
64
|
-
data:
|
|
65
|
+
"node": node,
|
|
66
|
+
"data": data
|
|
65
67
|
})], 2)];
|
|
66
68
|
}, {
|
|
67
|
-
node:
|
|
68
|
-
data:
|
|
69
|
+
"node": node,
|
|
70
|
+
"data": data
|
|
69
71
|
})];
|
|
70
72
|
}
|
|
71
|
-
}], null,
|
|
72
|
-
}, "EditableTree",
|
|
73
|
+
}], null, true)
|
|
74
|
+
}, "EditableTree", _vm.treeProps, false), _vm.treeListeners))], 1) : _vm._e(), _c("div", {
|
|
73
75
|
staticClass: "table-view-table"
|
|
74
|
-
}, [
|
|
76
|
+
}, [_c("PageableTable", _vm._g(_vm._b({
|
|
75
77
|
ref: "table",
|
|
76
78
|
class: [{
|
|
77
|
-
"border-top":
|
|
78
|
-
"border-bottom":
|
|
79
|
-
"border-left":
|
|
80
|
-
"border-right":
|
|
79
|
+
"border-top": _vm.borderTop,
|
|
80
|
+
"border-bottom": _vm.borderBottom,
|
|
81
|
+
"border-left": _vm.borderLeft || _vm.treeAttrs && _vm.treeAttrs.show,
|
|
82
|
+
"border-right": _vm.borderRight
|
|
81
83
|
}],
|
|
82
84
|
attrs: {
|
|
83
|
-
border:
|
|
85
|
+
"border": _vm.border
|
|
84
86
|
},
|
|
85
87
|
on: {
|
|
86
|
-
"row-dblclick":
|
|
87
|
-
"selection-change":
|
|
88
|
+
"row-dblclick": _vm.rowDbClick,
|
|
89
|
+
"selection-change": _vm.onSelectionChange
|
|
88
90
|
}
|
|
89
|
-
}, "PageableTable",
|
|
91
|
+
}, "PageableTable", _vm.tableProps, false), _vm.tableListeners), [_vm._t("columns")], 2)], 1)]), _vm.toolbarProps.searchable ? _c("div", {
|
|
90
92
|
staticClass: "slide-panel",
|
|
91
93
|
style: {
|
|
92
|
-
right: `${
|
|
93
|
-
width: `${
|
|
94
|
+
right: `${_vm.right}px`,
|
|
95
|
+
width: `${_vm.searchPanelProps.width}px`
|
|
94
96
|
}
|
|
95
|
-
}, [
|
|
97
|
+
}, [_vm._m(0), _c("div", {
|
|
96
98
|
staticClass: "slide-panel-content"
|
|
97
|
-
}, [
|
|
99
|
+
}, [_c("ElForm", {
|
|
98
100
|
ref: "form",
|
|
99
101
|
attrs: {
|
|
100
102
|
"label-position": "right",
|
|
101
|
-
model:
|
|
102
|
-
size: "mini",
|
|
103
|
-
"label-width":
|
|
103
|
+
"model": _vm.searchModel || _vm.searchPanelProps.model,
|
|
104
|
+
"size": "mini",
|
|
105
|
+
"label-width": _vm.labelWidth
|
|
104
106
|
},
|
|
105
107
|
nativeOn: {
|
|
106
|
-
"!submit": function(
|
|
107
|
-
|
|
108
|
+
"!submit": function($event) {
|
|
109
|
+
$event.preventDefault();
|
|
110
|
+
return _vm.onSearchClick.apply(null, arguments);
|
|
108
111
|
}
|
|
109
112
|
}
|
|
110
|
-
}, [
|
|
113
|
+
}, [_c("FormItemConfigProvider", {
|
|
111
114
|
attrs: {
|
|
112
|
-
block: "",
|
|
113
|
-
"wrap-col":
|
|
115
|
+
"block": "",
|
|
116
|
+
"wrap-col": false
|
|
114
117
|
}
|
|
115
|
-
}, [
|
|
118
|
+
}, [_c("ElRow", {
|
|
116
119
|
attrs: {
|
|
117
|
-
gutter: 0
|
|
120
|
+
"gutter": 0
|
|
118
121
|
}
|
|
119
|
-
}, [
|
|
120
|
-
return [
|
|
121
|
-
})], 2)], 1),
|
|
122
|
+
}, [_vm._t("search-form", function() {
|
|
123
|
+
return [_c("p", [_vm._v("请添加搜索条件!")])];
|
|
124
|
+
})], 2)], 1), _c("ElFormItem", {
|
|
122
125
|
attrs: {
|
|
123
126
|
"label-width": "0"
|
|
124
127
|
}
|
|
125
|
-
}, [
|
|
128
|
+
}, [_c("div", {
|
|
126
129
|
staticClass: "slide-panel-actions"
|
|
127
|
-
}, [
|
|
130
|
+
}, [_c("ElButton", {
|
|
128
131
|
attrs: {
|
|
129
|
-
type: "primary",
|
|
132
|
+
"type": "primary",
|
|
130
133
|
"native-type": "submit",
|
|
131
|
-
size: "mini"
|
|
134
|
+
"size": "mini"
|
|
132
135
|
}
|
|
133
|
-
}, [
|
|
136
|
+
}, [_vm._v(" 开始搜索 ")]), _c("ElButton", {
|
|
134
137
|
attrs: {
|
|
135
|
-
size: "mini"
|
|
138
|
+
"size": "mini"
|
|
136
139
|
},
|
|
137
140
|
on: {
|
|
138
|
-
click:
|
|
141
|
+
"click": _vm.onClearClick
|
|
139
142
|
}
|
|
140
|
-
}, [
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
}, [_vm._v(" 清除条件 ")])], 1)])], 1)], 1)]) : _vm._e()]), _vm._t("default")], 2);
|
|
144
|
+
};
|
|
145
|
+
var staticRenderFns = [function() {
|
|
146
|
+
var _vm = this;
|
|
147
|
+
var _h = _vm.$createElement;
|
|
148
|
+
var _c = _vm._self._c || _h;
|
|
149
|
+
return _c("div", {
|
|
144
150
|
staticClass: "slide-panel-line"
|
|
145
|
-
}, [
|
|
151
|
+
}, [_c("div", {
|
|
146
152
|
staticClass: "slide-panel-line-indicator"
|
|
147
153
|
})]);
|
|
148
154
|
}];
|
|
149
|
-
const
|
|
155
|
+
const TableView_vue_vue_type_style_index_0_lang = "";
|
|
156
|
+
const builtInButtons = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "agree", "disagree", "reject", "finish", "cancel", "enable", "exp", "imp", "del", "disabled", "reload", "slot"];
|
|
157
|
+
const __vue2_script = {
|
|
150
158
|
name: "TableView",
|
|
151
159
|
bus: {
|
|
152
|
-
reloadTableView(
|
|
153
|
-
if (this._viewIds)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
160
|
+
reloadTableView(viewId, tree) {
|
|
161
|
+
if (!this._viewIds) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (isString(viewId) || isArray(viewId)) {
|
|
165
|
+
let viewIds = viewId;
|
|
166
|
+
if (isString(viewIds)) {
|
|
167
|
+
viewIds = viewIds.split(",");
|
|
168
|
+
}
|
|
169
|
+
if (this._viewIds.some((value) => viewIds.includes(value))) {
|
|
170
|
+
if (!tree) {
|
|
171
|
+
trace.call(this.$parent || {}, "reloadTable");
|
|
172
|
+
this.reloadTable();
|
|
173
|
+
} else {
|
|
174
|
+
if (this.$refs.tree) {
|
|
175
|
+
trace.call(this.$parent || {}, "reloadTree");
|
|
176
|
+
this.refreshTree();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
} else {
|
|
181
|
+
warning.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
|
|
182
|
+
}
|
|
159
183
|
}
|
|
160
184
|
},
|
|
161
185
|
props: {
|
|
@@ -203,7 +227,7 @@ const w = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
|
|
|
203
227
|
borderRight: Boolean,
|
|
204
228
|
border: {
|
|
205
229
|
type: Boolean,
|
|
206
|
-
default:
|
|
230
|
+
default: true
|
|
207
231
|
},
|
|
208
232
|
labelWidth: {
|
|
209
233
|
type: String,
|
|
@@ -214,93 +238,132 @@ const w = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
|
|
|
214
238
|
}
|
|
215
239
|
},
|
|
216
240
|
data() {
|
|
217
|
-
var
|
|
241
|
+
var _a;
|
|
218
242
|
return {
|
|
219
|
-
importDialogVisible:
|
|
220
|
-
right: -(((
|
|
243
|
+
importDialogVisible: false,
|
|
244
|
+
right: -(((_a = this.searchPanelAttrs) == null ? void 0 : _a.width) || 350),
|
|
221
245
|
selectedRows: []
|
|
222
246
|
};
|
|
223
247
|
},
|
|
224
248
|
computed: {
|
|
225
249
|
buttonSlots() {
|
|
226
|
-
return
|
|
250
|
+
return builtInButtons.filter((value) => this.$scopedSlots[value]);
|
|
227
251
|
},
|
|
228
252
|
toolbarProps() {
|
|
229
|
-
var
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
253
|
+
var _a, _b;
|
|
254
|
+
const defaultProps = {};
|
|
255
|
+
const toolbarAttrs = merge(this.toolbarAttrs, defaultProps);
|
|
256
|
+
let buttons = (toolbarAttrs == null ? void 0 : toolbarAttrs.buttons) || this.$parent.buttons;
|
|
257
|
+
buttons = buttons || [];
|
|
258
|
+
if (!buttons.includes("reload")) {
|
|
259
|
+
buttons = [...buttons, "reload"];
|
|
260
|
+
}
|
|
261
|
+
toolbarAttrs.buttons = buttons;
|
|
262
|
+
toolbarAttrs.buttons = toStringArray(toolbarAttrs.buttons);
|
|
263
|
+
toolbarAttrs.searchable = !!((_b = (_a = this.$scopedSlots)["search-form"]) == null ? void 0 : _b.call(_a));
|
|
264
|
+
return toolbarAttrs;
|
|
233
265
|
},
|
|
234
266
|
treeProps() {
|
|
235
|
-
const
|
|
267
|
+
const defaultProps = {
|
|
236
268
|
treeProps: {
|
|
237
269
|
children: "children",
|
|
238
270
|
label: "label",
|
|
239
|
-
isLeaf: (
|
|
271
|
+
isLeaf: (data) => {
|
|
272
|
+
if (hasOwn(data, "hasChildren")) {
|
|
273
|
+
return !data.hasChildren;
|
|
274
|
+
} else if (hasOwn(data, "hasChild")) {
|
|
275
|
+
return !data.hasChild;
|
|
276
|
+
} else {
|
|
277
|
+
return true;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
240
280
|
},
|
|
241
|
-
show:
|
|
242
|
-
lazy:
|
|
243
|
-
readonly:
|
|
281
|
+
show: false,
|
|
282
|
+
lazy: true,
|
|
283
|
+
readonly: true,
|
|
244
284
|
data: [],
|
|
245
|
-
"expand-first-node":
|
|
246
|
-
"default-expand-all":
|
|
285
|
+
"expand-first-node": false,
|
|
286
|
+
"default-expand-all": false
|
|
247
287
|
};
|
|
248
|
-
return
|
|
288
|
+
return merge(this.treeAttrs, defaultProps);
|
|
249
289
|
},
|
|
250
290
|
tableProps() {
|
|
251
|
-
const
|
|
291
|
+
const api = this.tableAttrs.api || this.$parent.getPage;
|
|
292
|
+
const defaultProps = {
|
|
252
293
|
model: this.searchModel || {},
|
|
253
294
|
height: "auto",
|
|
254
|
-
"highlight-current-row":
|
|
255
|
-
api
|
|
295
|
+
"highlight-current-row": true,
|
|
296
|
+
api
|
|
256
297
|
};
|
|
257
|
-
return
|
|
298
|
+
return merge(this.tableAttrs, defaultProps);
|
|
258
299
|
},
|
|
259
300
|
searchPanelProps() {
|
|
260
|
-
const
|
|
301
|
+
const defaultProps = {
|
|
261
302
|
width: 350,
|
|
262
303
|
model: this.searchModel || {}
|
|
263
304
|
};
|
|
264
|
-
return
|
|
305
|
+
return merge(this.searchPanelAttrs, defaultProps);
|
|
265
306
|
}
|
|
266
307
|
},
|
|
267
308
|
created() {
|
|
268
|
-
this._viewIds = []
|
|
309
|
+
this._viewIds = [];
|
|
310
|
+
if (this.viewId) {
|
|
311
|
+
this._viewIds.push(this.viewId);
|
|
312
|
+
}
|
|
313
|
+
if (!this._viewIds.includes(this.$parent.$options.name)) {
|
|
314
|
+
this._viewIds.push(this.$parent.$options.name);
|
|
315
|
+
}
|
|
269
316
|
},
|
|
270
317
|
async activated() {
|
|
271
|
-
|
|
318
|
+
if (this.$refs.treeScroller) {
|
|
319
|
+
if (this.treeScrollTop) {
|
|
320
|
+
this.$refs.treeScroller.scrollTop = this.treeScrollTop;
|
|
321
|
+
}
|
|
322
|
+
if (this.treeScrollLeft) {
|
|
323
|
+
this.$refs.treeScroller.scrollLeft = this.treeScrollLeft;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
272
326
|
},
|
|
273
327
|
methods: {
|
|
274
328
|
onTreeScroll() {
|
|
275
|
-
this.treeScrollTop = this.$refs.treeScroller.scrollTop
|
|
329
|
+
this.treeScrollTop = this.$refs.treeScroller.scrollTop;
|
|
330
|
+
this.treeScrollLeft = this.$refs.treeScroller.scrollLeft;
|
|
276
331
|
},
|
|
277
332
|
toggleSearch() {
|
|
278
333
|
this.right = this.right === 0 ? -this.searchPanelProps.width : 0;
|
|
279
334
|
},
|
|
280
335
|
async onSearchClick() {
|
|
281
|
-
this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model)
|
|
336
|
+
this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model);
|
|
337
|
+
await this.refreshTable();
|
|
282
338
|
},
|
|
283
339
|
async onClearClick() {
|
|
284
|
-
this.$emit("reset")
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
this
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
340
|
+
this.$emit("reset");
|
|
341
|
+
this.$refs.form.resetFields();
|
|
342
|
+
this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model);
|
|
343
|
+
await this.refreshTable();
|
|
344
|
+
},
|
|
345
|
+
openFrom(row) {
|
|
346
|
+
this.$router.push(fillPath(this.formPath, row));
|
|
347
|
+
},
|
|
348
|
+
rowDbClick(row) {
|
|
349
|
+
var _a;
|
|
350
|
+
if (!((_a = this.tableListeners) == null ? void 0 : _a["row-dblclick"]) && this.formPath) {
|
|
351
|
+
this.openFrom(row);
|
|
352
|
+
}
|
|
292
353
|
},
|
|
293
|
-
onSelectionChange(
|
|
294
|
-
this.selectedRows =
|
|
354
|
+
onSelectionChange(rows) {
|
|
355
|
+
this.selectedRows = rows;
|
|
295
356
|
},
|
|
296
357
|
create() {
|
|
297
|
-
var
|
|
298
|
-
!((
|
|
358
|
+
var _a;
|
|
359
|
+
if (!((_a = this.toolbarListeners) == null ? void 0 : _a.create) && this.formPath) {
|
|
360
|
+
this.openFrom();
|
|
361
|
+
}
|
|
299
362
|
},
|
|
300
363
|
async del() {
|
|
301
|
-
var
|
|
302
|
-
const
|
|
303
|
-
if (!((
|
|
364
|
+
var _a;
|
|
365
|
+
const api = this.deleteApi || this.$parent.del;
|
|
366
|
+
if (!((_a = this.toolbarListeners) == null ? void 0 : _a.del) && isFunction(api)) {
|
|
304
367
|
if (!this.selectedRows.length) {
|
|
305
368
|
this.$message.warning("请选择要删除的记录!");
|
|
306
369
|
return;
|
|
@@ -310,28 +373,34 @@ const w = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
|
|
|
310
373
|
"系统提示",
|
|
311
374
|
{
|
|
312
375
|
type: "warning",
|
|
313
|
-
modal:
|
|
314
|
-
dangerouslyUseHTMLString:
|
|
315
|
-
closeOnClickModal:
|
|
316
|
-
beforeClose: async (
|
|
317
|
-
if (
|
|
376
|
+
modal: true,
|
|
377
|
+
dangerouslyUseHTMLString: true,
|
|
378
|
+
closeOnClickModal: false,
|
|
379
|
+
beforeClose: async (action, instance, done) => {
|
|
380
|
+
if (action === "confirm") {
|
|
318
381
|
try {
|
|
319
|
-
|
|
320
|
-
|
|
382
|
+
instance.confirmButtonLoading = true;
|
|
383
|
+
instance.confirmButtonText = "删除...";
|
|
384
|
+
await api.call(this, this.selectedRows.map((value) => value.id).join(","));
|
|
385
|
+
this.$message.success("删除成功");
|
|
386
|
+
await this.reloadTable();
|
|
387
|
+
await this.refreshTree();
|
|
388
|
+
} catch (_) {
|
|
321
389
|
}
|
|
322
|
-
|
|
390
|
+
}
|
|
391
|
+
done();
|
|
323
392
|
}
|
|
324
393
|
}
|
|
325
|
-
).catch((
|
|
394
|
+
).catch((_) => _);
|
|
326
395
|
}
|
|
327
396
|
},
|
|
328
397
|
reloadTable() {
|
|
329
|
-
var
|
|
330
|
-
(
|
|
398
|
+
var _a;
|
|
399
|
+
(_a = this.$refs.table) == null ? void 0 : _a.reload();
|
|
331
400
|
},
|
|
332
401
|
async refreshTable() {
|
|
333
|
-
var
|
|
334
|
-
await ((
|
|
402
|
+
var _a;
|
|
403
|
+
await ((_a = this.$refs.table) == null ? void 0 : _a.getPage());
|
|
335
404
|
},
|
|
336
405
|
refreshTree() {
|
|
337
406
|
this.$refs.tree.reloadTree();
|
|
@@ -340,24 +409,26 @@ const w = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
|
|
|
340
409
|
return this.searchPanelProps.model;
|
|
341
410
|
}
|
|
342
411
|
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
412
|
+
};
|
|
413
|
+
const __cssModules = {};
|
|
414
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
415
|
+
__vue2_script,
|
|
416
|
+
render,
|
|
417
|
+
staticRenderFns,
|
|
418
|
+
false,
|
|
419
|
+
__vue2_injectStyles,
|
|
350
420
|
null,
|
|
351
421
|
null,
|
|
352
422
|
null
|
|
353
423
|
);
|
|
354
|
-
function
|
|
355
|
-
for (let
|
|
356
|
-
this[
|
|
424
|
+
function __vue2_injectStyles(context) {
|
|
425
|
+
for (let o in __cssModules) {
|
|
426
|
+
this[o] = __cssModules[o];
|
|
427
|
+
}
|
|
357
428
|
}
|
|
358
|
-
const
|
|
359
|
-
return
|
|
429
|
+
const TableView = /* @__PURE__ */ function() {
|
|
430
|
+
return __component__.exports;
|
|
360
431
|
}();
|
|
361
432
|
export {
|
|
362
|
-
|
|
433
|
+
TableView as default
|
|
363
434
|
};
|
|
@@ -1 +1,95 @@
|
|
|
1
|
-
|
|
1
|
+
/* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
|
|
2
|
+
/* 应用头部高度 */
|
|
3
|
+
/* 页面宽度 */
|
|
4
|
+
/* 侧栏宽度 */
|
|
5
|
+
/* 标签高度 */
|
|
6
|
+
/* 页面头部工具条高度 */
|
|
7
|
+
.table-view {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
height: 100%;
|
|
11
|
+
}
|
|
12
|
+
.table-view .el-table--border {
|
|
13
|
+
border: none;
|
|
14
|
+
}
|
|
15
|
+
.table-view .border-top .el-table--border {
|
|
16
|
+
border-top: 1px solid #ebeef5;
|
|
17
|
+
}
|
|
18
|
+
.table-view .border-bottom .el-table--border {
|
|
19
|
+
border-bottom: 1px solid #ebeef5;
|
|
20
|
+
}
|
|
21
|
+
.table-view .border-left .el-table--border, .table-view .border-left .el-pagination {
|
|
22
|
+
border-left: 1px solid #ebeef5;
|
|
23
|
+
}
|
|
24
|
+
.table-view .border-right .el-table--border {
|
|
25
|
+
border-right: 1px solid #ebeef5;
|
|
26
|
+
}
|
|
27
|
+
.table-view .table-view-content-wrapper {
|
|
28
|
+
position: relative;
|
|
29
|
+
flex: 1;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
}
|
|
32
|
+
.table-view .table-view-content {
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
left: 0;
|
|
36
|
+
display: flex;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
background-color: white;
|
|
40
|
+
}
|
|
41
|
+
.table-view .table-view-sidebar {
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
width: 240px;
|
|
44
|
+
height: 100%;
|
|
45
|
+
padding: 10px;
|
|
46
|
+
overflow: auto;
|
|
47
|
+
}
|
|
48
|
+
.table-view .table-view-sidebar .et-tree-wrapper {
|
|
49
|
+
display: table;
|
|
50
|
+
overflow: visible;
|
|
51
|
+
}
|
|
52
|
+
.table-view .table-view-table {
|
|
53
|
+
flex: 1 1 auto;
|
|
54
|
+
height: 100%;
|
|
55
|
+
}
|
|
56
|
+
.table-view .slide-panel {
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 0;
|
|
59
|
+
right: 0;
|
|
60
|
+
bottom: 0;
|
|
61
|
+
z-index: 5;
|
|
62
|
+
display: flex;
|
|
63
|
+
background-color: white;
|
|
64
|
+
transition: right 200ms ease;
|
|
65
|
+
}
|
|
66
|
+
.table-view .slide-panel .slide-panel-line {
|
|
67
|
+
position: relative;
|
|
68
|
+
width: 3px;
|
|
69
|
+
height: 100%;
|
|
70
|
+
background-color: #ddd;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
}
|
|
73
|
+
.table-view .slide-panel .slide-panel-line-indicator {
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 50%;
|
|
76
|
+
left: 0;
|
|
77
|
+
width: 100%;
|
|
78
|
+
height: 50px;
|
|
79
|
+
background-color: #aaa;
|
|
80
|
+
transform: translateY(-50%);
|
|
81
|
+
}
|
|
82
|
+
.table-view .slide-panel .slide-panel-actions {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
margin-top: 10px;
|
|
87
|
+
}
|
|
88
|
+
.table-view .slide-panel .slide-panel-content {
|
|
89
|
+
flex: 1;
|
|
90
|
+
padding: 10px;
|
|
91
|
+
overflow: auto;
|
|
92
|
+
}
|
|
93
|
+
.table-view .slide-panel .slide-panel-content .el-date-editor {
|
|
94
|
+
width: 100%;
|
|
95
|
+
}
|