@web-utils/component 3.0.2 → 3.0.4
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/address-input/index.mjs +14 -14
- package/chat/index.mjs +39 -40
- package/chunk-file-uploader/index.mjs +35 -594
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/FormTemp.d079292b.mjs +139 -0
- package/chunks/{dataformat.816df805.mjs → dataformat.e655611c.mjs} +6 -6
- package/chunks/detail.d6f8e347.mjs +29 -0
- package/chunks/{dic.3b4ba802.mjs → dic.eaac0823.mjs} +40 -40
- package/chunks/{event.4377230d.mjs → event.10295951.mjs} +2 -2
- package/chunks/form-input-mixin.78a567bc.mjs +24 -0
- package/chunks/form-item-mixin.57cb2019.mjs +140 -0
- package/chunks/{index.d91bd77a.mjs → index.57f871af.mjs} +7 -7
- package/chunks/{init.f0a03127.mjs → init.47f219b4.mjs} +2 -2
- package/chunks/input-number-mixin.41a066be.mjs +60 -0
- package/chunks/{util.7844e2c2.mjs → util.ae730cde.mjs} +21 -21
- package/count-up/index.mjs +17 -14
- package/data-box/index.mjs +18 -19
- package/data-display/index.mjs +17 -18
- package/data-icons/index.mjs +16 -17
- package/data-panel/index.mjs +20 -21
- package/data-pay/index.mjs +15 -16
- package/data-progress/index.mjs +19 -20
- package/data-rotate/index.mjs +35 -36
- package/data-table-picker/index.mjs +23 -25
- package/data-tabs/index.mjs +15 -16
- package/dialog-form/index.mjs +24 -28
- package/dynamic-table/index.mjs +34 -35
- package/easy-popup/index.mjs +56 -29
- package/editable-tree/index.mjs +485 -134
- package/element-dialog/index.mjs +127 -37
- package/empty-view/index.mjs +31 -13
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow/index.mjs +40 -105
- package/flow-designer/index.mjs +555 -615
- package/flow-node/index.mjs +47 -15
- package/flow-viewer/index.mjs +78 -167
- package/form-cascader/index.mjs +24 -24
- package/form-checkbox-group/index.mjs +35 -79
- package/form-date-picker/index.mjs +22 -22
- package/form-holder/index.mjs +1 -1
- package/form-input/index.mjs +86 -28
- package/form-input-email/index.mjs +18 -18
- package/form-input-id-card/index.mjs +27 -27
- package/form-input-number/index.mjs +59 -219
- package/form-input-phone-number/index.mjs +27 -27
- package/form-input-tag/index.mjs +38 -160
- package/form-input-time/index.mjs +16 -16
- package/form-item/index.mjs +146 -15
- package/form-item-group/index.mjs +164 -14
- package/form-radio-group/index.mjs +41 -41
- package/form-select/index.mjs +20 -20
- package/form-switch/index.mjs +19 -19
- package/form-textarea/index.mjs +29 -29
- package/form-view/index.mjs +42 -46
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +15 -15
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +2821 -210
- package/fy-date/index.mjs +59 -17
- package/fy-draggable/index.mjs +1 -1
- package/fy-dynamic/index.mjs +208 -64
- package/fy-empty/index.mjs +29 -12
- package/fy-form/index.mjs +743 -178
- package/fy-form-design/index.mjs +1013 -1540
- package/fy-input/index.mjs +105 -17
- package/fy-input-color/index.mjs +67 -16
- package/fy-input-icon/index.mjs +119 -23
- package/fy-input-map/index.mjs +14 -15
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +19 -21
- package/fy-input-tree/index.mjs +3 -3
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +50 -16
- package/fy-select/index.mjs +126 -29
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-tabs/index.mjs +51 -15
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +23 -25
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +2 -2
- package/highlight-j-s/index.mjs +29 -19
- package/icon-temp/index.mjs +30 -12
- package/iframe-window/index.mjs +18 -19
- package/image-cropper/index.mjs +22 -23
- package/image-preview/index.mjs +1 -1
- package/input-number/index.mjs +173 -63
- package/license/index.mjs +1 -1
- package/loading-view/index.mjs +33 -15
- package/login/index.mjs +1 -1
- package/nav-bar/index.mjs +31 -15
- package/package.json +1 -1
- package/page/index.mjs +20 -12
- package/page-header/index.mjs +34 -13
- package/page-index-top/index.mjs +53 -100
- package/page-skeleton/index.mjs +35 -18
- package/page-skeleton-new/index.mjs +15 -16
- package/pageable-table/index.mjs +228 -86
- package/pageable-view/index.mjs +1 -1
- package/present-view/index.mjs +71 -75
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +29 -21
- package/search/index.mjs +9 -9
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/split-pane/index.mjs +45 -40
- package/swiper/index.mjs +13 -14
- package/table-view/index.mjs +97 -631
- package/text-ellipsis/index.mjs +1 -1
- package/tinymce-editor/index.mjs +63 -63
- package/toolbar/index.mjs +208 -15
- package/toolbar-button/index.mjs +56 -30
- package/verify/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +118 -49
- package/chunks/CountUp.f1a19f35.mjs +0 -124
- package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +0 -8
- package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +0 -32
- package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +0 -356
- package/chunks/ElementDialog.d8f3105c.mjs +0 -211
- package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +0 -95
- package/chunks/EmptyView.e2430422.mjs +0 -51
- package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +0 -23
- package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +0 -37
- package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +0 -65
- package/chunks/FormItem.2920ac0c.mjs +0 -45
- package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +0 -258
- package/chunks/FormItemGroup.41daddb6.mjs +0 -64
- package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +0 -155
- package/chunks/FyCurd.8acd2983.mjs +0 -548
- package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +0 -2945
- package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +0 -47
- package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +0 -151
- package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +0 -22
- package/chunks/FyForm.0294e494.mjs +0 -439
- package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +0 -737
- package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +0 -93
- package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +0 -56
- package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +0 -158
- package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +0 -39
- package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +0 -102
- package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +0 -41
- package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +0 -15
- package/chunks/IconTemp.42c48e1f.mjs +0 -32
- package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +0 -23
- package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +0 -172
- package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +0 -23
- package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +0 -21
- package/chunks/Page.81f4b8d9.mjs +0 -32
- package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +0 -13
- package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +0 -26
- package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +0 -88
- package/chunks/PageableTable.333cbdc1.mjs +0 -335
- package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +0 -148
- package/chunks/ResizeObserver.60f728f0.mjs +0 -54
- package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +0 -13
- package/chunks/TableColumn.8503272e.mjs +0 -106
- package/chunks/Toolbar.5c539dbb.mjs +0 -24
- package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +0 -275
- package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +0 -31
- package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +0 -74
|
@@ -1,2945 +0,0 @@
|
|
|
1
|
-
import { o as d, f as B, d as f, u as U, v as Z, D as v, i as ee, x as te, b as ne } from "./util.7844e2c2.mjs";
|
|
2
|
-
import a from "element-ui/lib/button";
|
|
3
|
-
import k from "element-ui/lib/col";
|
|
4
|
-
import { p as y, e as x } from "./event.4377230d.mjs";
|
|
5
|
-
import { s as re, r as ie } from "./FyInput.vue_vue_type_template_lang.d2c56811.mjs";
|
|
6
|
-
import { n as u } from "./vueComponentNormalizer.446f5dc4.mjs";
|
|
7
|
-
import { s as q } from "./dic.3b4ba802.mjs";
|
|
8
|
-
import { isBlank as c } from "@web-utils/core";
|
|
9
|
-
import { p as oe } from "./packages.1fc9ccba.mjs";
|
|
10
|
-
import { s as se, r as le } from "./FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs";
|
|
11
|
-
import ae from "element-ui/lib/button-group";
|
|
12
|
-
import ce from "element-ui/lib/row";
|
|
13
|
-
import S from "element-ui/lib/drawer";
|
|
14
|
-
import { F as ue, d as G } from "./FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs";
|
|
15
|
-
import { _ as C } from "./FyForm.0294e494.mjs";
|
|
16
|
-
import { _ as de } from "./ElementDialog.d8f3105c.mjs";
|
|
17
|
-
import pe from "element-ui/lib/checkbox";
|
|
18
|
-
import _ from "element-ui/lib/table-column";
|
|
19
|
-
import X from "element-ui/lib/table";
|
|
20
|
-
import he from "@web-utils/component/element-dialog";
|
|
21
|
-
import "@web-utils/component/element-dialog/style.css";
|
|
22
|
-
import me from "element-ui/lib/pagination";
|
|
23
|
-
import J from "element-ui/lib/card";
|
|
24
|
-
import { p as Q } from "./permission.ce5d2121.mjs";
|
|
25
|
-
import b from "element-ui/lib/dropdown-item";
|
|
26
|
-
import fe from "element-ui/lib/dropdown-menu";
|
|
27
|
-
import _e from "element-ui/lib/dropdown";
|
|
28
|
-
import ge from "@web-utils/component/icon-temp";
|
|
29
|
-
import "@web-utils/component/icon-temp/style.css";
|
|
30
|
-
import { _ as be } from "./IconTemp.42c48e1f.mjs";
|
|
31
|
-
import { s as ve, r as ye } from "./FyRate.vue_vue_type_style_index_0_lang.82174185.mjs";
|
|
32
|
-
import xe from "element-ui/lib/link";
|
|
33
|
-
import we from "element-ui/lib/tooltip";
|
|
34
|
-
import $e from "element-ui/lib/form-item";
|
|
35
|
-
import Be from "element-ui/lib/empty";
|
|
36
|
-
import Se from "element-ui/lib/form";
|
|
37
|
-
import Ce from "element-ui/lib/tag";
|
|
38
|
-
import { s as Oe, r as ke } from "./FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs";
|
|
39
|
-
import { s as Pe } from "./slot.4b391395.mjs";
|
|
40
|
-
import { d as Ie } from "./dataformat.816df805.mjs";
|
|
41
|
-
const m = {
|
|
42
|
-
menuWidth: 220,
|
|
43
|
-
menuFixed: "right",
|
|
44
|
-
menuXsWidth: 100,
|
|
45
|
-
menuAlign: "center",
|
|
46
|
-
menuHeaderAlign: "center",
|
|
47
|
-
headerAlign: "left",
|
|
48
|
-
// 图标
|
|
49
|
-
cancelBtnIcon: "el-icon-circle-close",
|
|
50
|
-
viewBtnIcon: "el-icon-view",
|
|
51
|
-
editBtnIcon: "el-icon-edit",
|
|
52
|
-
copyBtnIcon: "el-icon-document-add",
|
|
53
|
-
addBtnIcon: "el-icon-plus",
|
|
54
|
-
printBtnIcon: "el-icon-printer",
|
|
55
|
-
excelBtnIcon: "el-icon-download",
|
|
56
|
-
delBtnIcon: "el-icon-delete",
|
|
57
|
-
searchBtnIcon: "el-icon-search",
|
|
58
|
-
emptyBtnIcon: "el-icon-delete",
|
|
59
|
-
saveBtnIcon: "el-icon-circle-plus-outline",
|
|
60
|
-
updateBtnIcon: "el-icon-circle-check",
|
|
61
|
-
columnBtnIcon: "el-icon-s-operation",
|
|
62
|
-
filterBtnIcon: "el-icon-tickets",
|
|
63
|
-
refreshBtnIcon: "el-icon-refresh",
|
|
64
|
-
// 显隐
|
|
65
|
-
viewBtn: !1,
|
|
66
|
-
editBtn: !0,
|
|
67
|
-
copyBtn: !1,
|
|
68
|
-
cancelBtn: !0,
|
|
69
|
-
addBtn: !0,
|
|
70
|
-
addRowBtn: !1,
|
|
71
|
-
printBtn: !1,
|
|
72
|
-
excelBtn: !1,
|
|
73
|
-
delBtn: !0,
|
|
74
|
-
cellBtn: !1,
|
|
75
|
-
dateBtn: !1,
|
|
76
|
-
updateBtn: !0,
|
|
77
|
-
saveBtn: !0,
|
|
78
|
-
refreshBtn: !0,
|
|
79
|
-
columnBtn: !0,
|
|
80
|
-
filterBtn: !1,
|
|
81
|
-
queryBtn: !0,
|
|
82
|
-
menuBtn: !1,
|
|
83
|
-
searchBtn: !0,
|
|
84
|
-
clearBtn: !0,
|
|
85
|
-
selectClearBtn: !0,
|
|
86
|
-
searchShow: !0,
|
|
87
|
-
tip: !0,
|
|
88
|
-
dialogWidth: "60%",
|
|
89
|
-
dialogDrag: !1,
|
|
90
|
-
formFullscreen: !1,
|
|
91
|
-
pageBackground: !0,
|
|
92
|
-
page: !0,
|
|
93
|
-
menu: !0,
|
|
94
|
-
indexLabel: "#",
|
|
95
|
-
indexWidth: 50,
|
|
96
|
-
indexFixed: "left",
|
|
97
|
-
selectionWidth: 50,
|
|
98
|
-
selectionFixed: "left",
|
|
99
|
-
expandWidth: 60,
|
|
100
|
-
expandFixed: "left",
|
|
101
|
-
filterMultiple: !0,
|
|
102
|
-
calcHeight: 300,
|
|
103
|
-
width: "100%",
|
|
104
|
-
searchGutter: 20,
|
|
105
|
-
searchLabelWidth: 80,
|
|
106
|
-
searchSpan: 6,
|
|
107
|
-
dropRowClass: ".el-table__body-wrapper > table > tbody",
|
|
108
|
-
dropColClass: ".el-table__header-wrapper tr",
|
|
109
|
-
ghostClass: "avue-crud__ghost"
|
|
110
|
-
};
|
|
111
|
-
var Fe = function() {
|
|
112
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
113
|
-
return e.searchFlag ? t(J, {
|
|
114
|
-
directives: [{
|
|
115
|
-
name: "show",
|
|
116
|
-
rawName: "v-show",
|
|
117
|
-
value: e.searchShow && e.searchFlag,
|
|
118
|
-
expression: "searchShow && searchFlag"
|
|
119
|
-
}],
|
|
120
|
-
staticClass: "avue-crud__search",
|
|
121
|
-
attrs: {
|
|
122
|
-
shadow: e.crud.isCard
|
|
123
|
-
}
|
|
124
|
-
}, [e._t("search", null, {
|
|
125
|
-
row: e.searchForm,
|
|
126
|
-
search: e.searchForm,
|
|
127
|
-
size: e.crud.controlSize
|
|
128
|
-
}), t(C, {
|
|
129
|
-
ref: "form",
|
|
130
|
-
attrs: {
|
|
131
|
-
option: e.option
|
|
132
|
-
},
|
|
133
|
-
on: {
|
|
134
|
-
submit: e.searchChange,
|
|
135
|
-
"reset-change": e.resetChange
|
|
136
|
-
},
|
|
137
|
-
scopedSlots: e._u([{
|
|
138
|
-
key: "menuForm",
|
|
139
|
-
fn: function(r) {
|
|
140
|
-
return [e._t("searchMenu", null, null, Object.assign(r, {
|
|
141
|
-
search: e.searchForm,
|
|
142
|
-
row: e.searchForm
|
|
143
|
-
})), e.isSearchIcon ? [e.show === !1 ? t(a, {
|
|
144
|
-
attrs: {
|
|
145
|
-
type: "text",
|
|
146
|
-
icon: "el-icon-arrow-down"
|
|
147
|
-
},
|
|
148
|
-
on: {
|
|
149
|
-
click: function(i) {
|
|
150
|
-
e.show = !0;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}, [e._v(" 展 开 ")]) : e._e(), e.show === !0 ? t(a, {
|
|
154
|
-
attrs: {
|
|
155
|
-
type: "text",
|
|
156
|
-
icon: "el-icon-arrow-up"
|
|
157
|
-
},
|
|
158
|
-
on: {
|
|
159
|
-
click: function(i) {
|
|
160
|
-
e.show = !1;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}, [e._v(" 收 缩 ")]) : e._e()] : e._e()];
|
|
164
|
-
}
|
|
165
|
-
}, e._l(e.crud.searchSlot, function(r) {
|
|
166
|
-
return {
|
|
167
|
-
key: e.getSlotName(r),
|
|
168
|
-
fn: function(i) {
|
|
169
|
-
return [e._t(r, null, null, Object.assign(i, {
|
|
170
|
-
search: e.searchForm,
|
|
171
|
-
row: e.searchForm
|
|
172
|
-
}))];
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
})], null, !0),
|
|
176
|
-
model: {
|
|
177
|
-
value: e.searchForm,
|
|
178
|
-
callback: function(r) {
|
|
179
|
-
e.searchForm = r;
|
|
180
|
-
},
|
|
181
|
-
expression: "searchForm"
|
|
182
|
-
}
|
|
183
|
-
})], 2) : e._e();
|
|
184
|
-
}, De = [];
|
|
185
|
-
const Me = {
|
|
186
|
-
name: "HeaderSearch",
|
|
187
|
-
mixins: [Pe],
|
|
188
|
-
inject: ["crud"],
|
|
189
|
-
props: {
|
|
190
|
-
search: Object
|
|
191
|
-
},
|
|
192
|
-
data() {
|
|
193
|
-
return {
|
|
194
|
-
show: !1,
|
|
195
|
-
searchIndex: 2,
|
|
196
|
-
searchShow: !0
|
|
197
|
-
};
|
|
198
|
-
},
|
|
199
|
-
computed: {
|
|
200
|
-
searchForm: {
|
|
201
|
-
get() {
|
|
202
|
-
return this.crud.search;
|
|
203
|
-
},
|
|
204
|
-
set(e) {
|
|
205
|
-
this.crud.$emit("update:search", e);
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
option() {
|
|
209
|
-
const e = this.crud.option, n = (r = []) => {
|
|
210
|
-
r = f(r);
|
|
211
|
-
const i = [];
|
|
212
|
-
let s = 0;
|
|
213
|
-
return r = r.sort((o, l) => (l.searchOrder || 0) - (o.searchOrder || 0)), r.forEach((o) => {
|
|
214
|
-
if (o.search) {
|
|
215
|
-
const l = s < this.searchIndex, p = {};
|
|
216
|
-
Object.keys(o).forEach((h) => {
|
|
217
|
-
const O = "search";
|
|
218
|
-
if (h !== "searchProp" && h.includes(O)) {
|
|
219
|
-
let g = h.replace(O, "");
|
|
220
|
-
if (g.length === 0)
|
|
221
|
-
return;
|
|
222
|
-
g = g.replace(g[0], g[0].toLowerCase()), p[g] = o[h];
|
|
223
|
-
}
|
|
224
|
-
}), o = Object.assign(o, p, {
|
|
225
|
-
type: Ie(o),
|
|
226
|
-
detail: !1,
|
|
227
|
-
dicFlag: o.cascader ? !0 : d(o.dicFlag, !1),
|
|
228
|
-
span: o.searchSpan || e.searchSpan || m.searchSpan,
|
|
229
|
-
control: o.searchControl,
|
|
230
|
-
gutter: o.searchGutter || e.searchGutter || m.searchGutter,
|
|
231
|
-
labelWidth: o.searchLabelWidth || e.searchLabelWidth || m.searchLabelWidth,
|
|
232
|
-
labelPosition: o.searchLabelPosition || e.searchLabelPosition,
|
|
233
|
-
size: o.searchSize || e.searchSize,
|
|
234
|
-
value: o.searchValue,
|
|
235
|
-
rules: o.searchRules,
|
|
236
|
-
row: o.searchRow,
|
|
237
|
-
bind: o.searchBin,
|
|
238
|
-
disabled: o.searchDisabled,
|
|
239
|
-
readonly: o.searchReadonly,
|
|
240
|
-
display: this.isSearchIcon ? this.show ? !0 : l : !0
|
|
241
|
-
}), i.push(o), s = s + 1;
|
|
242
|
-
}
|
|
243
|
-
}), i;
|
|
244
|
-
};
|
|
245
|
-
return ((r) => {
|
|
246
|
-
let i = f(r);
|
|
247
|
-
return i.column = n(this.crud.propOption), i = Object.assign(i, {
|
|
248
|
-
rowKey: e.searchRowKey || "null",
|
|
249
|
-
tabs: !1,
|
|
250
|
-
group: !1,
|
|
251
|
-
printBtn: !1,
|
|
252
|
-
mockBtn: !1,
|
|
253
|
-
filterDic: e.searchFilterDic,
|
|
254
|
-
filterNull: e.searchFilterNull,
|
|
255
|
-
filterParam: e.searchFilterParam,
|
|
256
|
-
enter: e.searchEnter,
|
|
257
|
-
size: e.searchSize,
|
|
258
|
-
submitText: e.searchBtnText || "搜 索",
|
|
259
|
-
submitBtn: d(e.searchBtn, m.searchSubBtn),
|
|
260
|
-
submitIcon: this.crud.getBtnIcon("searchBtn"),
|
|
261
|
-
emptyText: e.emptyBtnText || "清 空",
|
|
262
|
-
emptyBtn: d(e.emptyBtn, m.emptyBtn),
|
|
263
|
-
emptyIcon: this.crud.getBtnIcon("emptyBtn"),
|
|
264
|
-
menuSpan: (() => this.show || !this.isSearchIcon || e.searchMenuSpan < 6 ? e.searchMenuSpan : 6)(),
|
|
265
|
-
menuPosition: e.searchMenuPosition || "center",
|
|
266
|
-
dicFlag: !1,
|
|
267
|
-
dicData: this.crud.DIC
|
|
268
|
-
}), i;
|
|
269
|
-
})(e);
|
|
270
|
-
},
|
|
271
|
-
isSearchIcon() {
|
|
272
|
-
return d(this.crud.option.searchIcon, this.$AVUE.searchIcon) && this.searchLen > this.searchIndex;
|
|
273
|
-
},
|
|
274
|
-
searchLen() {
|
|
275
|
-
let e = 0;
|
|
276
|
-
return this.crud.propOption.forEach((n) => {
|
|
277
|
-
n.search && e++;
|
|
278
|
-
}), e;
|
|
279
|
-
},
|
|
280
|
-
searchFlag() {
|
|
281
|
-
return !!this.crud.$scopedSlots.search || this.searchLen !== 0;
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
watch: {
|
|
285
|
-
"crud.propOption": {
|
|
286
|
-
handler() {
|
|
287
|
-
this.dataFormat();
|
|
288
|
-
},
|
|
289
|
-
deep: !0
|
|
290
|
-
},
|
|
291
|
-
show() {
|
|
292
|
-
this.crud.getTableHeight();
|
|
293
|
-
},
|
|
294
|
-
searchShow() {
|
|
295
|
-
this.crud.getTableHeight();
|
|
296
|
-
},
|
|
297
|
-
option: {
|
|
298
|
-
immediate: !0,
|
|
299
|
-
deep: !0,
|
|
300
|
-
handler() {
|
|
301
|
-
var e;
|
|
302
|
-
this.searchIndex = ((e = this.option) == null ? void 0 : e.searchIndex) || 2;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
created() {
|
|
307
|
-
this.initFun(), this.dataFormat();
|
|
308
|
-
},
|
|
309
|
-
methods: {
|
|
310
|
-
initFun() {
|
|
311
|
-
["searchReset", "searchChange"].forEach((e) => {
|
|
312
|
-
this.crud[e] = this[e];
|
|
313
|
-
});
|
|
314
|
-
},
|
|
315
|
-
getSlotName(e) {
|
|
316
|
-
return e.replace("Search", "");
|
|
317
|
-
},
|
|
318
|
-
// 搜索回调
|
|
319
|
-
searchChange(e, n) {
|
|
320
|
-
e = B(e), this.crud.propOption.forEach((t) => {
|
|
321
|
-
t.searchProp && (e[t.searchProp] = e[t.prop], delete e[t.prop]);
|
|
322
|
-
}), this.crud.$emit("search-change", e, n);
|
|
323
|
-
},
|
|
324
|
-
// 搜索清空
|
|
325
|
-
resetChange() {
|
|
326
|
-
this.crud.$emit("search-reset", this.searchForm);
|
|
327
|
-
},
|
|
328
|
-
// 搜索清空
|
|
329
|
-
searchReset() {
|
|
330
|
-
this.$refs.form.resetForm();
|
|
331
|
-
},
|
|
332
|
-
handleSearchShow() {
|
|
333
|
-
this.searchShow = !this.searchShow;
|
|
334
|
-
},
|
|
335
|
-
dataFormat() {
|
|
336
|
-
const e = this.crud.option;
|
|
337
|
-
this.searchShow = d(e.searchShow, m.searchShow);
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}, P = {};
|
|
341
|
-
var ze = /* @__PURE__ */ u(
|
|
342
|
-
Me,
|
|
343
|
-
Fe,
|
|
344
|
-
De,
|
|
345
|
-
!1,
|
|
346
|
-
Te,
|
|
347
|
-
null,
|
|
348
|
-
null,
|
|
349
|
-
null
|
|
350
|
-
);
|
|
351
|
-
function Te(e) {
|
|
352
|
-
for (let n in P)
|
|
353
|
-
this[n] = P[n];
|
|
354
|
-
}
|
|
355
|
-
const Ee = /* @__PURE__ */ function() {
|
|
356
|
-
return ze.exports;
|
|
357
|
-
}(), Ve = {
|
|
358
|
-
name: "FyDate",
|
|
359
|
-
mixins: [y, x],
|
|
360
|
-
props: {
|
|
361
|
-
editable: Boolean,
|
|
362
|
-
unlinkPanels: Boolean,
|
|
363
|
-
startPlaceholder: String,
|
|
364
|
-
endPlaceholder: String,
|
|
365
|
-
rangeSeparator: String,
|
|
366
|
-
defaultValue: [String, Array],
|
|
367
|
-
defaultTime: [String, Array],
|
|
368
|
-
pickerOptions: Object,
|
|
369
|
-
type: {
|
|
370
|
-
type: String,
|
|
371
|
-
default: "date"
|
|
372
|
-
},
|
|
373
|
-
valueFormat: String,
|
|
374
|
-
format: String
|
|
375
|
-
}
|
|
376
|
-
}, I = {};
|
|
377
|
-
var je = /* @__PURE__ */ u(
|
|
378
|
-
Ve,
|
|
379
|
-
ke,
|
|
380
|
-
Oe,
|
|
381
|
-
!1,
|
|
382
|
-
Le,
|
|
383
|
-
null,
|
|
384
|
-
null,
|
|
385
|
-
null
|
|
386
|
-
);
|
|
387
|
-
function Le(e) {
|
|
388
|
-
for (let n in I)
|
|
389
|
-
this[n] = I[n];
|
|
390
|
-
}
|
|
391
|
-
const Re = /* @__PURE__ */ function() {
|
|
392
|
-
return je.exports;
|
|
393
|
-
}();
|
|
394
|
-
var Ae = function() {
|
|
395
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
396
|
-
return t("div", {
|
|
397
|
-
staticClass: "avue-crud__menu"
|
|
398
|
-
}, [e.optVal(e.crud.tableOption.menuLeft, !0) ? t("div", {
|
|
399
|
-
staticClass: "avue-crud__left"
|
|
400
|
-
}, [e.optVal(e.crud.tableOption.addBtn, e.config.addBtn) ? t(a, {
|
|
401
|
-
directives: [{
|
|
402
|
-
name: "permission",
|
|
403
|
-
rawName: "v-permission",
|
|
404
|
-
value: e.crud.getPermission("addBtn"),
|
|
405
|
-
expression: "crud.getPermission('addBtn')"
|
|
406
|
-
}],
|
|
407
|
-
attrs: {
|
|
408
|
-
type: "primary",
|
|
409
|
-
icon: e.crud.getBtnIcon("addBtn"),
|
|
410
|
-
size: e.crud.isMediumSize
|
|
411
|
-
},
|
|
412
|
-
on: {
|
|
413
|
-
click: e.crud.rowAdd
|
|
414
|
-
}
|
|
415
|
-
}, [e.crud.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("addBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.addRowBtn, e.config.addRowBtn) ? t(a, {
|
|
416
|
-
directives: [{
|
|
417
|
-
name: "permission",
|
|
418
|
-
rawName: "v-permission",
|
|
419
|
-
value: e.crud.getPermission("addRowBtn"),
|
|
420
|
-
expression: "crud.getPermission('addRowBtn')"
|
|
421
|
-
}],
|
|
422
|
-
attrs: {
|
|
423
|
-
type: "primary",
|
|
424
|
-
icon: e.crud.getBtnIcon("addBtn"),
|
|
425
|
-
size: e.crud.isMediumSize
|
|
426
|
-
},
|
|
427
|
-
on: {
|
|
428
|
-
click: e.crud.rowCellAdd
|
|
429
|
-
}
|
|
430
|
-
}, [e.crud.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("addBtn")) + " ")]], 2) : e._e(), e._t("menuLeft", null, {
|
|
431
|
-
size: e.crud.isMediumSize
|
|
432
|
-
})], 2) : e._e(), e.optVal(e.crud.tableOption.menuRight, !0) ? t("div", {
|
|
433
|
-
staticClass: "avue-crud__right"
|
|
434
|
-
}, [e.optVal(e.crud.tableOption.dateBtn, e.config.dateBtn) ? t(Re, {
|
|
435
|
-
staticStyle: {
|
|
436
|
-
display: "inline-block",
|
|
437
|
-
"margin-right": "20px"
|
|
438
|
-
},
|
|
439
|
-
attrs: {
|
|
440
|
-
type: "datetimerange",
|
|
441
|
-
"value-format": "yyyy-MM-dd HH:mm:ss",
|
|
442
|
-
format: "yyyy-MM-dd HH:mm:ss",
|
|
443
|
-
"picker-options": e.pickerOptions,
|
|
444
|
-
size: e.crud.isMediumSize
|
|
445
|
-
},
|
|
446
|
-
on: {
|
|
447
|
-
change: e.dateChange
|
|
448
|
-
}
|
|
449
|
-
}) : e._e(), e._t("menuRight", null, {
|
|
450
|
-
size: e.crud.isMediumSize
|
|
451
|
-
}), e.optVal(e.crud.tableOption.excelBtn, e.config.excelBtn) ? t(a, {
|
|
452
|
-
directives: [{
|
|
453
|
-
name: "permission",
|
|
454
|
-
rawName: "v-permission",
|
|
455
|
-
value: e.crud.getPermission("excelBtn"),
|
|
456
|
-
expression: "crud.getPermission('excelBtn')"
|
|
457
|
-
}],
|
|
458
|
-
attrs: {
|
|
459
|
-
icon: e.crud.getBtnIcon("excelBtn"),
|
|
460
|
-
circle: "",
|
|
461
|
-
size: e.crud.isMediumSize
|
|
462
|
-
},
|
|
463
|
-
on: {
|
|
464
|
-
click: e.rowExcel
|
|
465
|
-
}
|
|
466
|
-
}) : e._e(), e.optVal(e.crud.tableOption.printBtn, e.config.printBtn) ? t(a, {
|
|
467
|
-
directives: [{
|
|
468
|
-
name: "permission",
|
|
469
|
-
rawName: "v-permission",
|
|
470
|
-
value: e.crud.getPermission("printBtn"),
|
|
471
|
-
expression: "crud.getPermission('printBtn')"
|
|
472
|
-
}],
|
|
473
|
-
attrs: {
|
|
474
|
-
icon: e.crud.getBtnIcon("printBtn"),
|
|
475
|
-
circle: "",
|
|
476
|
-
size: e.crud.isMediumSize
|
|
477
|
-
},
|
|
478
|
-
on: {
|
|
479
|
-
click: e.rowPrint
|
|
480
|
-
}
|
|
481
|
-
}) : e._e(), e.optVal(e.crud.tableOption.refreshBtn, e.config.refreshBtn) ? t(a, {
|
|
482
|
-
directives: [{
|
|
483
|
-
name: "permission",
|
|
484
|
-
rawName: "v-permission",
|
|
485
|
-
value: e.crud.getPermission("refreshBtn"),
|
|
486
|
-
expression: "crud.getPermission('refreshBtn')"
|
|
487
|
-
}],
|
|
488
|
-
attrs: {
|
|
489
|
-
icon: e.crud.getBtnIcon("refreshBtn"),
|
|
490
|
-
circle: "",
|
|
491
|
-
size: e.crud.isMediumSize
|
|
492
|
-
},
|
|
493
|
-
on: {
|
|
494
|
-
click: e.crud.refreshChange
|
|
495
|
-
}
|
|
496
|
-
}) : e._e(), e.optVal(e.crud.tableOption.columnBtn, e.config.columnBtn) ? t(a, {
|
|
497
|
-
directives: [{
|
|
498
|
-
name: "permission",
|
|
499
|
-
rawName: "v-permission",
|
|
500
|
-
value: e.crud.getPermission("columnBtn"),
|
|
501
|
-
expression: "crud.getPermission('columnBtn')"
|
|
502
|
-
}],
|
|
503
|
-
attrs: {
|
|
504
|
-
icon: e.crud.getBtnIcon("columnBtn"),
|
|
505
|
-
circle: "",
|
|
506
|
-
size: e.crud.isMediumSize
|
|
507
|
-
},
|
|
508
|
-
on: {
|
|
509
|
-
click: function(r) {
|
|
510
|
-
return e.crud.$refs.dialogColumn.handleShow();
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
}) : e._e(), (e.crud.$refs.headerSearch || {}).searchFlag && e.optVal(e.crud.tableOption.searchShowBtn, !0) ? t(a, {
|
|
514
|
-
attrs: {
|
|
515
|
-
icon: e.crud.getBtnIcon("searchBtn"),
|
|
516
|
-
circle: "",
|
|
517
|
-
size: e.crud.isMediumSize
|
|
518
|
-
},
|
|
519
|
-
on: {
|
|
520
|
-
click: function(r) {
|
|
521
|
-
return e.crud.$refs.headerSearch.handleSearchShow();
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}) : e._e(), e.optVal(e.crud.tableOption.filterBtn, e.config.filterBtn) ? t(a, {
|
|
525
|
-
directives: [{
|
|
526
|
-
name: "permission",
|
|
527
|
-
rawName: "v-permission",
|
|
528
|
-
value: e.crud.getPermission("filterBtn"),
|
|
529
|
-
expression: "crud.getPermission('filterBtn')"
|
|
530
|
-
}],
|
|
531
|
-
attrs: {
|
|
532
|
-
icon: e.crud.getBtnIcon("filterBtn"),
|
|
533
|
-
circle: "",
|
|
534
|
-
size: e.crud.isMediumSize
|
|
535
|
-
},
|
|
536
|
-
on: {
|
|
537
|
-
click: function(r) {
|
|
538
|
-
return e.crud.$refs.dialogFilter.handleShow();
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
}) : e._e()], 2) : e._e()]);
|
|
542
|
-
}, Ne = [];
|
|
543
|
-
const He = {
|
|
544
|
-
name: "HeaderMenu",
|
|
545
|
-
directives: {
|
|
546
|
-
permission: Q
|
|
547
|
-
},
|
|
548
|
-
inject: ["crud"],
|
|
549
|
-
data() {
|
|
550
|
-
return {
|
|
551
|
-
dateCreate: !1,
|
|
552
|
-
pickerOptions: {
|
|
553
|
-
shortcuts: [
|
|
554
|
-
{
|
|
555
|
-
text: "今日",
|
|
556
|
-
onClick(e) {
|
|
557
|
-
const n = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
558
|
-
t.setTime(t.getTime()), e.$emit("pick", [t, n]);
|
|
559
|
-
}
|
|
560
|
-
},
|
|
561
|
-
{
|
|
562
|
-
text: "昨日",
|
|
563
|
-
onClick(e) {
|
|
564
|
-
const n = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
565
|
-
t.setTime(t.getTime() - 3600 * 1e3 * 24 * 1), e.$emit("pick", [t, n]);
|
|
566
|
-
}
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
text: "最近一周",
|
|
570
|
-
onClick(e) {
|
|
571
|
-
const n = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
572
|
-
t.setTime(t.getTime() - 3600 * 1e3 * 24 * 7), e.$emit("pick", [t, n]);
|
|
573
|
-
}
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
text: "最近一个月",
|
|
577
|
-
onClick(e) {
|
|
578
|
-
const n = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
579
|
-
t.setTime(t.getTime() - 3600 * 1e3 * 24 * 30), e.$emit("pick", [t, n]);
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
{
|
|
583
|
-
text: "最近三个月",
|
|
584
|
-
onClick(e) {
|
|
585
|
-
const n = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
586
|
-
t.setTime(t.getTime() - 3600 * 1e3 * 24 * 90), e.$emit("pick", [t, n]);
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
]
|
|
590
|
-
},
|
|
591
|
-
config: m
|
|
592
|
-
};
|
|
593
|
-
},
|
|
594
|
-
created() {
|
|
595
|
-
this.initFun();
|
|
596
|
-
},
|
|
597
|
-
methods: {
|
|
598
|
-
optVal: d,
|
|
599
|
-
// 日期组件回调
|
|
600
|
-
dateChange(e) {
|
|
601
|
-
this.dateCreate ? this.crud.$emit("date-change", e) : this.dateCreate = !0;
|
|
602
|
-
},
|
|
603
|
-
initFun() {
|
|
604
|
-
this.crud.rowExcel = this.rowExcel, this.crud.rowPrint = this.rowPrint;
|
|
605
|
-
},
|
|
606
|
-
rowExcel() {
|
|
607
|
-
this.crud.$refs.dialogExcel.handleShow();
|
|
608
|
-
},
|
|
609
|
-
rowPrint() {
|
|
610
|
-
this.$Print(this.crud.$refs.table);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}, F = {};
|
|
614
|
-
var We = /* @__PURE__ */ u(
|
|
615
|
-
He,
|
|
616
|
-
Ae,
|
|
617
|
-
Ne,
|
|
618
|
-
!1,
|
|
619
|
-
Ke,
|
|
620
|
-
null,
|
|
621
|
-
null,
|
|
622
|
-
null
|
|
623
|
-
);
|
|
624
|
-
function Ke(e) {
|
|
625
|
-
for (let n in F)
|
|
626
|
-
this[n] = F[n];
|
|
627
|
-
}
|
|
628
|
-
const Ue = /* @__PURE__ */ function() {
|
|
629
|
-
return We.exports;
|
|
630
|
-
}(), qe = {
|
|
631
|
-
name: "FyRate",
|
|
632
|
-
mixins: [y, x],
|
|
633
|
-
props: {
|
|
634
|
-
allowHalf: Boolean,
|
|
635
|
-
lowThreshold: Number,
|
|
636
|
-
highThreshold: Number,
|
|
637
|
-
disabledVoidColor: String,
|
|
638
|
-
disabledVoidIconClass: String,
|
|
639
|
-
// eslint-disable-next-line vue/no-unused-properties
|
|
640
|
-
value: {
|
|
641
|
-
type: Number,
|
|
642
|
-
default: 0
|
|
643
|
-
},
|
|
644
|
-
colors: {
|
|
645
|
-
type: Array
|
|
646
|
-
},
|
|
647
|
-
max: {
|
|
648
|
-
type: Number,
|
|
649
|
-
default: 5
|
|
650
|
-
},
|
|
651
|
-
iconClasses: {
|
|
652
|
-
type: Array
|
|
653
|
-
},
|
|
654
|
-
texts: {
|
|
655
|
-
type: Array
|
|
656
|
-
},
|
|
657
|
-
scoreTemplate: String,
|
|
658
|
-
showScore: {
|
|
659
|
-
type: Boolean,
|
|
660
|
-
default: !1
|
|
661
|
-
},
|
|
662
|
-
showText: {
|
|
663
|
-
type: Boolean,
|
|
664
|
-
default: !1
|
|
665
|
-
},
|
|
666
|
-
voidIconClass: {
|
|
667
|
-
type: String
|
|
668
|
-
}
|
|
669
|
-
},
|
|
670
|
-
data() {
|
|
671
|
-
return {};
|
|
672
|
-
},
|
|
673
|
-
watch: {},
|
|
674
|
-
created() {
|
|
675
|
-
},
|
|
676
|
-
mounted() {
|
|
677
|
-
},
|
|
678
|
-
methods: {}
|
|
679
|
-
}, D = {};
|
|
680
|
-
var Ge = /* @__PURE__ */ u(
|
|
681
|
-
qe,
|
|
682
|
-
ye,
|
|
683
|
-
ve,
|
|
684
|
-
!1,
|
|
685
|
-
Xe,
|
|
686
|
-
null,
|
|
687
|
-
null,
|
|
688
|
-
null
|
|
689
|
-
);
|
|
690
|
-
function Xe(e) {
|
|
691
|
-
for (let n in D)
|
|
692
|
-
this[n] = D[n];
|
|
693
|
-
}
|
|
694
|
-
const Je = /* @__PURE__ */ function() {
|
|
695
|
-
return Ge.exports;
|
|
696
|
-
}();
|
|
697
|
-
var Qe = function() {
|
|
698
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
699
|
-
return e.getColumnProp(e.column, "hide") ? t(_, {
|
|
700
|
-
key: e.column.prop,
|
|
701
|
-
attrs: {
|
|
702
|
-
prop: e.column.prop,
|
|
703
|
-
label: e.column.label,
|
|
704
|
-
"column-key": e.column.prop,
|
|
705
|
-
"filter-placement": "bottom-end",
|
|
706
|
-
filters: e.getColumnProp(e.column, "filters"),
|
|
707
|
-
"filter-method": e.getColumnProp(e.column, "filterMethod") ? e.handleFilterMethod : void 0,
|
|
708
|
-
"filter-multiple": e.optVal(e.column.filterMultiple, !0),
|
|
709
|
-
"show-overflow-tooltip": e.column.overHidden,
|
|
710
|
-
"min-width": e.column.minWidth,
|
|
711
|
-
sortable: e.getColumnProp(e.column, "sortable"),
|
|
712
|
-
"sort-method": e.column.sortMethod,
|
|
713
|
-
"sort-orders": e.column.sortOrders,
|
|
714
|
-
"sort-by": e.column.sortBy,
|
|
715
|
-
resizable: e.column.resizable,
|
|
716
|
-
"render-header": e.column.renderHeader,
|
|
717
|
-
align: e.column.align || e.crud.tableOption.align,
|
|
718
|
-
"header-align": e.column.headerAlign || e.crud.tableOption.headerAlign,
|
|
719
|
-
width: e.getColumnProp(e.column, "width"),
|
|
720
|
-
fixed: e.getColumnProp(e.column, "fixed")
|
|
721
|
-
},
|
|
722
|
-
scopedSlots: e._u([{
|
|
723
|
-
key: "header",
|
|
724
|
-
fn: function(r) {
|
|
725
|
-
var i = r.$index;
|
|
726
|
-
return [e.crud.getSlotName(e.column, "H", e.crud.$scopedSlots) ? e._t(e.crud.getSlotName(e.column, "H"), null, null, {
|
|
727
|
-
column: e.column,
|
|
728
|
-
$index: i
|
|
729
|
-
}) : t("span", [e._v(e._s(e.column.label))])];
|
|
730
|
-
}
|
|
731
|
-
}, {
|
|
732
|
-
key: "default",
|
|
733
|
-
fn: function(r) {
|
|
734
|
-
var i = r.row, s = r.$index;
|
|
735
|
-
return [i.$cellEdit && e.column.cell ? t($e, {
|
|
736
|
-
attrs: {
|
|
737
|
-
prop: e.crud.isTree ? "" : `list.${s}.${e.column.prop}`,
|
|
738
|
-
label: e.vaildLabel(e.column, i, " "),
|
|
739
|
-
"label-width": e.vaildLabel(e.column, i, "1px"),
|
|
740
|
-
rules: e.column.rules
|
|
741
|
-
}
|
|
742
|
-
}, [t(we, {
|
|
743
|
-
attrs: {
|
|
744
|
-
content: (e.crud.listError[`list.${s}.${e.column.prop}`] || {}).msg,
|
|
745
|
-
disabled: !(e.crud.listError[`list.${s}.${e.column.prop}`] || {}).valid,
|
|
746
|
-
placement: "top"
|
|
747
|
-
}
|
|
748
|
-
}, [e.crud.getSlotName(e.column, "F", e.crud.$scopedSlots) ? e._t(e.crud.getSlotName(e.column, "F"), null, null, {
|
|
749
|
-
row: i,
|
|
750
|
-
dic: e.crud.DIC[e.column.prop],
|
|
751
|
-
size: e.crud.isMediumSize,
|
|
752
|
-
index: s,
|
|
753
|
-
disabled: e.crud.btnDisabledList[s],
|
|
754
|
-
label: e.handleDetail(i, e.column),
|
|
755
|
-
$cell: i.$cellEdit
|
|
756
|
-
}) : t(ue, e._b({
|
|
757
|
-
attrs: {
|
|
758
|
-
column: e.column,
|
|
759
|
-
size: e.crud.isMediumSize,
|
|
760
|
-
"table-data": {
|
|
761
|
-
index: s,
|
|
762
|
-
row: i,
|
|
763
|
-
label: e.handleDetail(i, e.column)
|
|
764
|
-
},
|
|
765
|
-
dic: (e.crud.cascaderDIC[s] || {})[e.column.prop] || e.crud.DIC[e.column.prop],
|
|
766
|
-
props: e.column.props || e.crud.tableOption.props,
|
|
767
|
-
readonly: e.column.readonly,
|
|
768
|
-
disabled: e.crud.disabled || e.crud.tableOption.disabled || e.column.disabled || e.crud.btnDisabledList[s],
|
|
769
|
-
clearable: e.optVal(e.column.clearable, !1),
|
|
770
|
-
"column-slot": e.crud.mainSlot
|
|
771
|
-
},
|
|
772
|
-
on: {
|
|
773
|
-
change: function(o) {
|
|
774
|
-
return e.columnChange(i, e.column, s);
|
|
775
|
-
}
|
|
776
|
-
},
|
|
777
|
-
scopedSlots: e._u([e._l(e.crud.mainSlot, function(o) {
|
|
778
|
-
return {
|
|
779
|
-
key: o,
|
|
780
|
-
fn: function(l) {
|
|
781
|
-
return [e._t(o, null, null, l)];
|
|
782
|
-
}
|
|
783
|
-
};
|
|
784
|
-
})], null, !0),
|
|
785
|
-
model: {
|
|
786
|
-
value: i[e.column.prop],
|
|
787
|
-
callback: function(o) {
|
|
788
|
-
e.$set(i, e.column.prop, o);
|
|
789
|
-
},
|
|
790
|
-
expression: "row[column.prop]"
|
|
791
|
-
}
|
|
792
|
-
}, "FormTemp", e.uploadFun(e.column, e.crud), !1))], 2)], 1) : e.crud.$scopedSlots[e.column.prop] ? e._t(e.column.prop, null, {
|
|
793
|
-
row: i,
|
|
794
|
-
index: s,
|
|
795
|
-
dic: e.crud.DIC[e.column.prop],
|
|
796
|
-
size: e.crud.isMediumSize,
|
|
797
|
-
label: e.handleDetail(i, e.column)
|
|
798
|
-
}) : [["img", "upload"].includes(e.column.type) ? t("span", {
|
|
799
|
-
staticClass: "avue-crud__img"
|
|
800
|
-
}, [e._l(e.getImgList(i, e.column), function(o, l) {
|
|
801
|
-
return [e.isMediaType(o, e.column.fileType) ? t(e.isMediaType(o, e.column.fileType), {
|
|
802
|
-
key: l,
|
|
803
|
-
tag: "Component",
|
|
804
|
-
attrs: {
|
|
805
|
-
src: o
|
|
806
|
-
},
|
|
807
|
-
on: {
|
|
808
|
-
click: function(p) {
|
|
809
|
-
return p.stopPropagation(), e.openImg(i, e.column, l);
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}) : t("i", {
|
|
813
|
-
key: l,
|
|
814
|
-
staticClass: "el-icon-document",
|
|
815
|
-
attrs: {
|
|
816
|
-
src: o
|
|
817
|
-
},
|
|
818
|
-
on: {
|
|
819
|
-
click: function(p) {
|
|
820
|
-
return p.stopPropagation(), e.openImg(i, e.column, l);
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
})];
|
|
824
|
-
})], 2) : e.column.type === "url" ? t("span", e._l(e.corArray(i, e.column), function(o, l) {
|
|
825
|
-
return t(xe, {
|
|
826
|
-
key: l,
|
|
827
|
-
attrs: {
|
|
828
|
-
type: "primary",
|
|
829
|
-
href: o,
|
|
830
|
-
target: e.column.target || "_blank"
|
|
831
|
-
}
|
|
832
|
-
}, [e._v(e._s(o))]);
|
|
833
|
-
}), 1) : e.column.type === "rate" ? t("span", [t(Je, {
|
|
834
|
-
attrs: {
|
|
835
|
-
disabled: ""
|
|
836
|
-
},
|
|
837
|
-
model: {
|
|
838
|
-
value: i[e.column.prop],
|
|
839
|
-
callback: function(o) {
|
|
840
|
-
e.$set(i, e.column.prop, o);
|
|
841
|
-
},
|
|
842
|
-
expression: "row[column.prop]"
|
|
843
|
-
}
|
|
844
|
-
})], 1) : e.column.type === "color" ? t("i", {
|
|
845
|
-
staticClass: "avue-crud__color",
|
|
846
|
-
style: {
|
|
847
|
-
backgroundColor: i[e.column.prop]
|
|
848
|
-
}
|
|
849
|
-
}) : e.column.type === "icon" ? t(be, {
|
|
850
|
-
attrs: {
|
|
851
|
-
text: i[e.column.prop]
|
|
852
|
-
}
|
|
853
|
-
}) : e.column.html ? t("span", {
|
|
854
|
-
domProps: {
|
|
855
|
-
innerHTML: e._s(e.handleDetail(i, e.column))
|
|
856
|
-
}
|
|
857
|
-
}) : t("span", {
|
|
858
|
-
domProps: {
|
|
859
|
-
textContent: e._s(e.handleDetail(i, e.column))
|
|
860
|
-
}
|
|
861
|
-
})]];
|
|
862
|
-
}
|
|
863
|
-
}], null, !0)
|
|
864
|
-
}) : e._e();
|
|
865
|
-
}, Ye = [];
|
|
866
|
-
const $ = {}, Ze = {
|
|
867
|
-
name: "ColumnSlot",
|
|
868
|
-
components: { IconTemp: ge, FormTemp: () => import("./FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs").then((e) => e.c) },
|
|
869
|
-
inject: ["dynamic", "crud"],
|
|
870
|
-
props: {
|
|
871
|
-
column: Object,
|
|
872
|
-
columnOption: Array
|
|
873
|
-
},
|
|
874
|
-
created() {
|
|
875
|
-
const e = ["getColumnProp", "handleFilterMethod", "handleFilters"];
|
|
876
|
-
Object.keys(this.dynamic).forEach((n) => {
|
|
877
|
-
e.includes(n) && (this[n] = this.dynamic[n]);
|
|
878
|
-
});
|
|
879
|
-
},
|
|
880
|
-
methods: {
|
|
881
|
-
isBlank: c,
|
|
882
|
-
optVal: d,
|
|
883
|
-
uploadFun: U,
|
|
884
|
-
isMediaType(e, n) {
|
|
885
|
-
return Z(e, n);
|
|
886
|
-
},
|
|
887
|
-
vaildLabel(e, n, t) {
|
|
888
|
-
if (e.rules && n.$cellEdit)
|
|
889
|
-
return t;
|
|
890
|
-
},
|
|
891
|
-
columnChange(e, n, t) {
|
|
892
|
-
const r = `${t}-${n.prop}`;
|
|
893
|
-
$[r] || (this.handleChange(n, e), typeof n.change == "function" && n.cell === !0 && n.change({ row: e, column: n, index: t, value: e[n.prop] })), $[r] = !0, this.$nextTick(() => {
|
|
894
|
-
$[r] = !1;
|
|
895
|
-
});
|
|
896
|
-
},
|
|
897
|
-
handleChange(e, n) {
|
|
898
|
-
e.cascader && this.$nextTick(() => {
|
|
899
|
-
const t = e.cascader;
|
|
900
|
-
t.forEach((r) => {
|
|
901
|
-
const i = r, s = n[e.prop], o = n.$index, l = this.findObject(this.columnOption, i);
|
|
902
|
-
c(l) || (c(this.crud.cascaderDIC[o]) && this.$set(this.crud.cascaderDIC, o, {}), this.crud.cascaderIndexList.includes(o) && t.forEach((p) => {
|
|
903
|
-
this.$set(this.crud.cascaderDIC[o], p.prop, []), t.forEach((h) => n[h] = "");
|
|
904
|
-
}), !(c(t) || c(s) || c(l)) && q({
|
|
905
|
-
column: l,
|
|
906
|
-
value: s,
|
|
907
|
-
form: n
|
|
908
|
-
}).then((p) => {
|
|
909
|
-
const h = p || [];
|
|
910
|
-
this.crud.cascaderIndexList.includes(o) || this.crud.cascaderIndexList.push(o), this.crud.cascaderDicList[o] || this.$set(this.crud.cascaderDicList, o, {}), this.crud.cascaderDicList[o][i] || this.$set(this.crud.cascaderDicList[o], i, h), this.$set(this.crud.cascaderDIC[o], i, h), !c(h[l.cascaderIndex]) && !c(h) && !c(l.cascaderIndex) && (n[i] = h[l.cascaderIndex][(l.props || {}).value || v.value]);
|
|
911
|
-
}));
|
|
912
|
-
});
|
|
913
|
-
});
|
|
914
|
-
},
|
|
915
|
-
handleDetail(e, n) {
|
|
916
|
-
const t = n.parentProp ? (this.crud.cascaderDIC[e.$index] || {})[n.prop] : this.crud.DIC[n.prop], r = G(e, n, this.crud.tableOption, t);
|
|
917
|
-
return !c(t) && this.crud.tableOption.filterDic !== !0 && (e[`$${n.prop}`] = r), r;
|
|
918
|
-
},
|
|
919
|
-
corArray(e, n) {
|
|
920
|
-
let t = this.handleDetail(e, n);
|
|
921
|
-
return Array.isArray(t) || (t = c(t) ? [] : t.split(ee)), f(t);
|
|
922
|
-
},
|
|
923
|
-
openImg(e, n, t) {
|
|
924
|
-
let r = this.getImgList(e, n);
|
|
925
|
-
r = r.map((i) => ({ thumbUrl: i, url: i, type: n.fileType })), this.$ImagePreview(r, t);
|
|
926
|
-
},
|
|
927
|
-
getImgList(e, n) {
|
|
928
|
-
var s, o;
|
|
929
|
-
const t = ((s = n.propsHttp) == null ? void 0 : s.home) || "", r = ((o = n.props) == null ? void 0 : o.value) || v.value, i = this.corArray(e, n);
|
|
930
|
-
return i.forEach((l, p) => {
|
|
931
|
-
i[p] = t + (l[r] ? l[r] : l);
|
|
932
|
-
}), i;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
}, M = {};
|
|
936
|
-
var et = /* @__PURE__ */ u(
|
|
937
|
-
Ze,
|
|
938
|
-
Qe,
|
|
939
|
-
Ye,
|
|
940
|
-
!1,
|
|
941
|
-
tt,
|
|
942
|
-
null,
|
|
943
|
-
null,
|
|
944
|
-
null
|
|
945
|
-
);
|
|
946
|
-
function tt(e) {
|
|
947
|
-
for (let n in M)
|
|
948
|
-
this[n] = M[n];
|
|
949
|
-
}
|
|
950
|
-
const w = /* @__PURE__ */ function() {
|
|
951
|
-
return et.exports;
|
|
952
|
-
}();
|
|
953
|
-
var nt = function() {
|
|
954
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
955
|
-
return e.getColumnProp(e.columnOption, "hide") ? t(_, {
|
|
956
|
-
key: e.columnOption.prop,
|
|
957
|
-
attrs: {
|
|
958
|
-
prop: e.columnOption.prop,
|
|
959
|
-
label: e.columnOption.label,
|
|
960
|
-
"filter-placement": "bottom-end",
|
|
961
|
-
filters: e.getColumnProp(e.columnOption, "filters"),
|
|
962
|
-
"filter-method": e.getColumnProp(e.columnOption, "filterMethod") ? e.handleFilterMethod : void 0,
|
|
963
|
-
"filter-multiple": e.optVal(e.columnOption.filterMultiple, !0),
|
|
964
|
-
"show-overflow-tooltip": e.columnOption.overHidden,
|
|
965
|
-
"min-width": e.columnOption.minWidth,
|
|
966
|
-
sortable: e.getColumnProp(e.columnOption, "sortable"),
|
|
967
|
-
"render-header": e.columnOption.renderHeader,
|
|
968
|
-
align: e.columnOption.align || e.crud.tableOption.align,
|
|
969
|
-
"header-align": e.columnOption.headerAlign || e.crud.tableOption.headerAlign,
|
|
970
|
-
width: e.getColumnProp(e.columnOption, "width"),
|
|
971
|
-
fixed: e.getColumnProp(e.columnOption, "fixed")
|
|
972
|
-
}
|
|
973
|
-
}, [e._l(e.columnOption.children, function(r) {
|
|
974
|
-
return [r.children && r.children.length > 0 ? t("ColumnDynamic", {
|
|
975
|
-
key: r.prop,
|
|
976
|
-
attrs: {
|
|
977
|
-
"column-option": r
|
|
978
|
-
},
|
|
979
|
-
scopedSlots: e._u([e._l(e.crud.mainSlot, function(i) {
|
|
980
|
-
return {
|
|
981
|
-
key: i,
|
|
982
|
-
fn: function(s) {
|
|
983
|
-
return [e._t(i, null, null, s)];
|
|
984
|
-
}
|
|
985
|
-
};
|
|
986
|
-
})], null, !0)
|
|
987
|
-
}) : t(w, {
|
|
988
|
-
key: r.prop,
|
|
989
|
-
attrs: {
|
|
990
|
-
column: r,
|
|
991
|
-
"column-option": e.columnOption.children
|
|
992
|
-
},
|
|
993
|
-
scopedSlots: e._u([e._l(e.crud.mainSlot, function(i) {
|
|
994
|
-
return {
|
|
995
|
-
key: i,
|
|
996
|
-
fn: function(s) {
|
|
997
|
-
return [e._t(i, null, null, s)];
|
|
998
|
-
}
|
|
999
|
-
};
|
|
1000
|
-
})], null, !0)
|
|
1001
|
-
})];
|
|
1002
|
-
})], 2) : e._e();
|
|
1003
|
-
}, rt = [];
|
|
1004
|
-
const it = {
|
|
1005
|
-
name: "ColumnDynamic",
|
|
1006
|
-
components: { ColumnSlot: w },
|
|
1007
|
-
inject: ["dynamic", "crud"],
|
|
1008
|
-
props: {
|
|
1009
|
-
columnOption: Object
|
|
1010
|
-
},
|
|
1011
|
-
created() {
|
|
1012
|
-
const e = ["getColumnProp", "handleFilterMethod", "handleFilters"];
|
|
1013
|
-
Object.keys(this.dynamic).forEach((n) => {
|
|
1014
|
-
e.includes(n) && (this[n] = this.dynamic[n]);
|
|
1015
|
-
});
|
|
1016
|
-
},
|
|
1017
|
-
methods: {
|
|
1018
|
-
optVal: d
|
|
1019
|
-
}
|
|
1020
|
-
}, z = {};
|
|
1021
|
-
var ot = /* @__PURE__ */ u(
|
|
1022
|
-
it,
|
|
1023
|
-
nt,
|
|
1024
|
-
rt,
|
|
1025
|
-
!1,
|
|
1026
|
-
st,
|
|
1027
|
-
null,
|
|
1028
|
-
null,
|
|
1029
|
-
null
|
|
1030
|
-
);
|
|
1031
|
-
function st(e) {
|
|
1032
|
-
for (let n in z)
|
|
1033
|
-
this[n] = z[n];
|
|
1034
|
-
}
|
|
1035
|
-
const Y = /* @__PURE__ */ function() {
|
|
1036
|
-
return ot.exports;
|
|
1037
|
-
}();
|
|
1038
|
-
var lt = function() {
|
|
1039
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
1040
|
-
return t("div", [e._t("header"), e._l(e.list, function(r) {
|
|
1041
|
-
return [r.children && r.children.length > 0 ? t(Y, {
|
|
1042
|
-
key: r.pop,
|
|
1043
|
-
attrs: {
|
|
1044
|
-
"column-option": r
|
|
1045
|
-
},
|
|
1046
|
-
scopedSlots: e._u([e._l(e.crud.mainSlot, function(i) {
|
|
1047
|
-
return {
|
|
1048
|
-
key: i,
|
|
1049
|
-
fn: function(s) {
|
|
1050
|
-
return [e._t(i, null, null, s)];
|
|
1051
|
-
}
|
|
1052
|
-
};
|
|
1053
|
-
})], null, !0)
|
|
1054
|
-
}) : t(w, {
|
|
1055
|
-
key: r.prop,
|
|
1056
|
-
attrs: {
|
|
1057
|
-
column: r,
|
|
1058
|
-
"column-option": e.columnOption
|
|
1059
|
-
},
|
|
1060
|
-
scopedSlots: e._u([e._l(e.crud.mainSlot, function(i) {
|
|
1061
|
-
return {
|
|
1062
|
-
key: i,
|
|
1063
|
-
fn: function(s) {
|
|
1064
|
-
return [e._t(i, null, null, s)];
|
|
1065
|
-
}
|
|
1066
|
-
};
|
|
1067
|
-
})], null, !0)
|
|
1068
|
-
})];
|
|
1069
|
-
}), e._t("footer")], 2);
|
|
1070
|
-
}, at = [];
|
|
1071
|
-
const ct = {
|
|
1072
|
-
name: "Column",
|
|
1073
|
-
components: { ColumnDynamic: Y, ColumnSlot: w },
|
|
1074
|
-
inject: ["crud"],
|
|
1075
|
-
provide() {
|
|
1076
|
-
return {
|
|
1077
|
-
crud: this.crud,
|
|
1078
|
-
dynamic: this
|
|
1079
|
-
};
|
|
1080
|
-
},
|
|
1081
|
-
props: {
|
|
1082
|
-
columnOption: Array
|
|
1083
|
-
},
|
|
1084
|
-
computed: {
|
|
1085
|
-
list() {
|
|
1086
|
-
let e = [...this.columnOption];
|
|
1087
|
-
return e = te(
|
|
1088
|
-
e,
|
|
1089
|
-
"index",
|
|
1090
|
-
(n, t) => {
|
|
1091
|
-
var r, i;
|
|
1092
|
-
return ((r = this.crud.objectOption[n.prop]) == null ? void 0 : r.index) - ((i = this.crud.objectOption[t.prop]) == null ? void 0 : i.index);
|
|
1093
|
-
}
|
|
1094
|
-
), e;
|
|
1095
|
-
}
|
|
1096
|
-
},
|
|
1097
|
-
methods: {
|
|
1098
|
-
// 表格筛选逻辑
|
|
1099
|
-
handleFilterMethod(e, n, t) {
|
|
1100
|
-
const r = this.columnOption.filter((i) => i.prop === t.property)[0];
|
|
1101
|
-
return typeof r.filterMethod == "function" ? r.filterMethod(e, n, r) : n[r.prop] === e;
|
|
1102
|
-
},
|
|
1103
|
-
// 表格筛选字典
|
|
1104
|
-
handleFilters(e, n) {
|
|
1105
|
-
if (n !== !0)
|
|
1106
|
-
return;
|
|
1107
|
-
const t = this.crud.DIC[e.prop] || [], r = [];
|
|
1108
|
-
return c(t) ? this.crud.cellForm.list.forEach((i) => {
|
|
1109
|
-
r.map((s) => s.text).includes(i[e.prop]) || r.push({
|
|
1110
|
-
text: i[e.prop],
|
|
1111
|
-
value: i[e.prop]
|
|
1112
|
-
});
|
|
1113
|
-
}) : t.forEach((i) => {
|
|
1114
|
-
const s = e.props || this.crud.tableOption.props || {};
|
|
1115
|
-
r.push({
|
|
1116
|
-
text: i[s.label || v.label],
|
|
1117
|
-
value: i[s.value || v.value]
|
|
1118
|
-
});
|
|
1119
|
-
}), r;
|
|
1120
|
-
},
|
|
1121
|
-
getColumnProp(e, n) {
|
|
1122
|
-
const t = this.crud.objectOption[e.prop] || {};
|
|
1123
|
-
if (n === "filterMethod")
|
|
1124
|
-
return t == null ? void 0 : t.filters;
|
|
1125
|
-
if (this.crud.isMobile && ["fixed"].includes(n))
|
|
1126
|
-
return !1;
|
|
1127
|
-
const r = t == null ? void 0 : t[n];
|
|
1128
|
-
if (!(n === "width" && r === 0))
|
|
1129
|
-
return n === "filters" ? this.handleFilters(e, r) : n === "hide" ? (t == null ? void 0 : t.hide) !== !0 : r;
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
}, T = {};
|
|
1133
|
-
var ut = /* @__PURE__ */ u(
|
|
1134
|
-
ct,
|
|
1135
|
-
lt,
|
|
1136
|
-
at,
|
|
1137
|
-
!1,
|
|
1138
|
-
dt,
|
|
1139
|
-
null,
|
|
1140
|
-
null,
|
|
1141
|
-
null
|
|
1142
|
-
);
|
|
1143
|
-
function dt(e) {
|
|
1144
|
-
for (let n in T)
|
|
1145
|
-
this[n] = T[n];
|
|
1146
|
-
}
|
|
1147
|
-
const pt = /* @__PURE__ */ function() {
|
|
1148
|
-
return ut.exports;
|
|
1149
|
-
}();
|
|
1150
|
-
var ht = function() {
|
|
1151
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
1152
|
-
return t("div", [t(_, {
|
|
1153
|
-
attrs: {
|
|
1154
|
-
width: "1px"
|
|
1155
|
-
}
|
|
1156
|
-
}), e.crud.tableOption.expand ? t(_, {
|
|
1157
|
-
key: "expand",
|
|
1158
|
-
attrs: {
|
|
1159
|
-
type: "expand",
|
|
1160
|
-
width: e.crud.tableOption.expandWidth || e.config.expandWidth,
|
|
1161
|
-
fixed: e.optVal(e.crud.tableOption.expandFixed, e.config.expandFixed),
|
|
1162
|
-
align: "center"
|
|
1163
|
-
},
|
|
1164
|
-
scopedSlots: e._u([{
|
|
1165
|
-
key: "default",
|
|
1166
|
-
fn: function(r) {
|
|
1167
|
-
var i = r.row;
|
|
1168
|
-
return [e._t("expand", null, {
|
|
1169
|
-
row: i,
|
|
1170
|
-
index: i.$index
|
|
1171
|
-
})];
|
|
1172
|
-
}
|
|
1173
|
-
}], null, !0)
|
|
1174
|
-
}) : e._e(), e.crud.tableOption.selection ? t(_, {
|
|
1175
|
-
key: "selection",
|
|
1176
|
-
attrs: {
|
|
1177
|
-
fixed: e.optVal(e.crud.tableOption.selectionFixed, e.config.selectionFixed),
|
|
1178
|
-
type: "selection",
|
|
1179
|
-
selectable: e.crud.tableOption.selectable,
|
|
1180
|
-
"reserve-selection": e.optVal(e.crud.tableOption.reserveSelection),
|
|
1181
|
-
width: e.crud.tableOption.selectionWidth || e.config.selectionWidth,
|
|
1182
|
-
align: "center"
|
|
1183
|
-
}
|
|
1184
|
-
}) : e._e(), e.optVal(e.crud.tableOption.index) ? t(_, {
|
|
1185
|
-
key: "index",
|
|
1186
|
-
attrs: {
|
|
1187
|
-
fixed: e.optVal(e.crud.tableOption.indexFixed, e.config.indexFixed),
|
|
1188
|
-
label: e.crud.tableOption.indexLabel || e.config.indexLabel,
|
|
1189
|
-
type: "index",
|
|
1190
|
-
width: e.crud.tableOption.indexWidth || e.config.indexWidth,
|
|
1191
|
-
index: e.indexMethod,
|
|
1192
|
-
align: "center"
|
|
1193
|
-
}
|
|
1194
|
-
}) : e._e()], 1);
|
|
1195
|
-
}, mt = [];
|
|
1196
|
-
const ft = {
|
|
1197
|
-
name: "ColumnDefault",
|
|
1198
|
-
inject: ["crud"],
|
|
1199
|
-
data() {
|
|
1200
|
-
return {
|
|
1201
|
-
config: m
|
|
1202
|
-
};
|
|
1203
|
-
},
|
|
1204
|
-
mounted() {
|
|
1205
|
-
this.setSort();
|
|
1206
|
-
},
|
|
1207
|
-
methods: {
|
|
1208
|
-
optVal: d,
|
|
1209
|
-
indexMethod(e) {
|
|
1210
|
-
return e + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);
|
|
1211
|
-
},
|
|
1212
|
-
setSort() {
|
|
1213
|
-
this.rowDrop(), this.columnDrop();
|
|
1214
|
-
},
|
|
1215
|
-
rowDrop() {
|
|
1216
|
-
const e = this.crud.$refs.table.$el.querySelectorAll(this.config.dropRowClass)[0];
|
|
1217
|
-
this.crud.tableDrop("row", e, (n) => {
|
|
1218
|
-
const t = n.oldIndex, r = n.newIndex, i = this.crud.list.splice(t, 1)[0];
|
|
1219
|
-
this.crud.list.splice(r, 0, i), this.crud.$emit("sortable-change", t, r), this.crud.refreshTable(() => this.rowDrop());
|
|
1220
|
-
});
|
|
1221
|
-
},
|
|
1222
|
-
columnDrop() {
|
|
1223
|
-
const e = this.crud.$refs.table.$el.querySelector(this.config.dropColClass);
|
|
1224
|
-
let n = 0;
|
|
1225
|
-
["selection", "index", "expand"].forEach((t) => {
|
|
1226
|
-
this.crud.tableOption[t] && (n += 1);
|
|
1227
|
-
}), this.crud.tableDrop("column", e, (t) => {
|
|
1228
|
-
this.crud.headerSort(t.oldIndex - n, t.newIndex - n), this.columnDrop();
|
|
1229
|
-
});
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
}, E = {};
|
|
1233
|
-
var _t = /* @__PURE__ */ u(
|
|
1234
|
-
ft,
|
|
1235
|
-
ht,
|
|
1236
|
-
mt,
|
|
1237
|
-
!1,
|
|
1238
|
-
gt,
|
|
1239
|
-
null,
|
|
1240
|
-
null,
|
|
1241
|
-
null
|
|
1242
|
-
);
|
|
1243
|
-
function gt(e) {
|
|
1244
|
-
for (let n in E)
|
|
1245
|
-
this[n] = E[n];
|
|
1246
|
-
}
|
|
1247
|
-
const bt = /* @__PURE__ */ function() {
|
|
1248
|
-
return _t.exports;
|
|
1249
|
-
}();
|
|
1250
|
-
var vt = function() {
|
|
1251
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
1252
|
-
return e.optVal(e.crud.tableOption.menu, e.config.menu) && e.crud.getPermission("menu") ? t(_, {
|
|
1253
|
-
key: "menu",
|
|
1254
|
-
staticClass: "avue-crud__btn",
|
|
1255
|
-
attrs: {
|
|
1256
|
-
prop: "menu",
|
|
1257
|
-
fixed: e.optVal(e.crud.tableOption.menuFixed, e.config.menuFixed),
|
|
1258
|
-
label: e.crud.tableOption.menuTitle || "操作",
|
|
1259
|
-
align: e.crud.tableOption.menuAlign || e.config.menuAlign,
|
|
1260
|
-
"header-align": e.crud.tableOption.menuHeaderAlign || e.config.menuHeaderAlign,
|
|
1261
|
-
width: e.crud.isMobile ? e.crud.tableOption.menuXsWidth || e.config.menuXsWidth : e.crud.tableOption.menuWidth || e.config.menuWidth
|
|
1262
|
-
},
|
|
1263
|
-
scopedSlots: e._u([{
|
|
1264
|
-
key: "default",
|
|
1265
|
-
fn: function(r) {
|
|
1266
|
-
var i = r.row, s = r.$index;
|
|
1267
|
-
return [e.isMenu ? t(_e, {
|
|
1268
|
-
attrs: {
|
|
1269
|
-
size: e.crud.isMediumSize
|
|
1270
|
-
},
|
|
1271
|
-
scopedSlots: e._u([{
|
|
1272
|
-
key: "dropdown",
|
|
1273
|
-
fn: function() {
|
|
1274
|
-
return [t(fe, [e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? t(b, {
|
|
1275
|
-
directives: [{
|
|
1276
|
-
name: "permission",
|
|
1277
|
-
rawName: "v-permission",
|
|
1278
|
-
value: e.crud.getPermission("viewBtn", i, s),
|
|
1279
|
-
expression: "crud.getPermission('viewBtn', row, $index)"
|
|
1280
|
-
}],
|
|
1281
|
-
attrs: {
|
|
1282
|
-
icon: e.crud.getBtnIcon("viewBtn")
|
|
1283
|
-
},
|
|
1284
|
-
nativeOn: {
|
|
1285
|
-
click: function(o) {
|
|
1286
|
-
return e.crud.rowView(i, s);
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
}, [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) ? t(b, {
|
|
1290
|
-
directives: [{
|
|
1291
|
-
name: "permission",
|
|
1292
|
-
rawName: "v-permission",
|
|
1293
|
-
value: e.crud.getPermission("editBtn", i, s),
|
|
1294
|
-
expression: "crud.getPermission('editBtn', row, $index)"
|
|
1295
|
-
}],
|
|
1296
|
-
attrs: {
|
|
1297
|
-
icon: e.crud.getBtnIcon("editBtn")
|
|
1298
|
-
},
|
|
1299
|
-
nativeOn: {
|
|
1300
|
-
click: function(o) {
|
|
1301
|
-
return e.crud.rowEdit(i, s);
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
}, [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? t(b, {
|
|
1305
|
-
directives: [{
|
|
1306
|
-
name: "permission",
|
|
1307
|
-
rawName: "v-permission",
|
|
1308
|
-
value: e.crud.getPermission("copyBtn", i, s),
|
|
1309
|
-
expression: "crud.getPermission('copyBtn', row, $index)"
|
|
1310
|
-
}],
|
|
1311
|
-
attrs: {
|
|
1312
|
-
icon: e.crud.getBtnIcon("copyBtn")
|
|
1313
|
-
},
|
|
1314
|
-
nativeOn: {
|
|
1315
|
-
click: function(o) {
|
|
1316
|
-
return e.crud.rowCopy(i);
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
}, [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) ? t(b, {
|
|
1320
|
-
directives: [{
|
|
1321
|
-
name: "permission",
|
|
1322
|
-
rawName: "v-permission",
|
|
1323
|
-
value: e.crud.getPermission("delBtn", i, s),
|
|
1324
|
-
expression: "crud.getPermission('delBtn', row, $index)"
|
|
1325
|
-
}],
|
|
1326
|
-
attrs: {
|
|
1327
|
-
icon: e.crud.getBtnIcon("delBtn")
|
|
1328
|
-
},
|
|
1329
|
-
nativeOn: {
|
|
1330
|
-
click: function(o) {
|
|
1331
|
-
return e.crud.rowDel(i, s);
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
}, [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]) : e._e(), e._t("menuBtn", null, {
|
|
1335
|
-
row: i,
|
|
1336
|
-
type: e.menuText("primary"),
|
|
1337
|
-
disabled: e.crud.btnDisabled,
|
|
1338
|
-
size: e.crud.isMediumSize,
|
|
1339
|
-
index: s
|
|
1340
|
-
})], 2)];
|
|
1341
|
-
},
|
|
1342
|
-
proxy: !0
|
|
1343
|
-
}], null, !0)
|
|
1344
|
-
}, [t(a, {
|
|
1345
|
-
attrs: {
|
|
1346
|
-
type: "text",
|
|
1347
|
-
size: e.crud.isMediumSize
|
|
1348
|
-
}
|
|
1349
|
-
}, [e._v(" " + e._s(e.crud.tableOption.menuBtnTitle || "按钮") + " "), t("i", {
|
|
1350
|
-
staticClass: "el-icon-arrow-down el-icon--right"
|
|
1351
|
-
})])], 1) : ["button", "text", "icon"].includes(e.menuType) ? [e.optVal(e.crud.tableOption.cellBtn, e.config.cellBtn) ? [e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) && !i.$cellEdit ? t(a, {
|
|
1352
|
-
directives: [{
|
|
1353
|
-
name: "permission",
|
|
1354
|
-
rawName: "v-permission",
|
|
1355
|
-
value: e.crud.getPermission("editBtn", i, s),
|
|
1356
|
-
expression: "crud.getPermission('editBtn', row, $index)"
|
|
1357
|
-
}],
|
|
1358
|
-
attrs: {
|
|
1359
|
-
type: e.menuText("primary"),
|
|
1360
|
-
icon: e.crud.getBtnIcon("editBtn"),
|
|
1361
|
-
size: e.crud.isMediumSize,
|
|
1362
|
-
disabled: e.crud.btnDisabledList[s]
|
|
1363
|
-
},
|
|
1364
|
-
on: {
|
|
1365
|
-
click: function(o) {
|
|
1366
|
-
return o.stopPropagation(), e.crud.rowCell(i, s);
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
}, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e.optVal(e.crud.tableOption.saveBtn, e.config.saveBtn) && i.$cellEdit ? t(a, {
|
|
1370
|
-
directives: [{
|
|
1371
|
-
name: "permission",
|
|
1372
|
-
rawName: "v-permission",
|
|
1373
|
-
value: e.crud.getPermission("saveBtn", i, s),
|
|
1374
|
-
expression: "crud.getPermission('saveBtn', row, $index)"
|
|
1375
|
-
}],
|
|
1376
|
-
attrs: {
|
|
1377
|
-
type: e.menuText("primary"),
|
|
1378
|
-
icon: e.crud.getBtnIcon("saveBtn"),
|
|
1379
|
-
size: e.crud.isMediumSize,
|
|
1380
|
-
disabled: e.crud.btnDisabledList[s]
|
|
1381
|
-
},
|
|
1382
|
-
on: {
|
|
1383
|
-
click: function(o) {
|
|
1384
|
-
return o.stopPropagation(), e.crud.rowCell(i, s);
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
}, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("saveBtn")) + " ")]], 2) : e._e(), i.$cellEdit ? t(a, {
|
|
1388
|
-
attrs: {
|
|
1389
|
-
type: e.menuText("danger"),
|
|
1390
|
-
icon: e.crud.getBtnIcon("cancelBtn"),
|
|
1391
|
-
size: e.crud.isMediumSize,
|
|
1392
|
-
disabled: e.crud.btnDisabledList[s]
|
|
1393
|
-
},
|
|
1394
|
-
on: {
|
|
1395
|
-
click: function(o) {
|
|
1396
|
-
return o.stopPropagation(), e.crud.rowCancel(i, s);
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
}, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("cancelBtn")) + " ")]], 2) : e._e()] : e._e(), e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? t(a, {
|
|
1400
|
-
directives: [{
|
|
1401
|
-
name: "permission",
|
|
1402
|
-
rawName: "v-permission",
|
|
1403
|
-
value: e.crud.getPermission("viewBtn", i, s),
|
|
1404
|
-
expression: "crud.getPermission('viewBtn', row, $index)"
|
|
1405
|
-
}],
|
|
1406
|
-
attrs: {
|
|
1407
|
-
type: e.menuText("success"),
|
|
1408
|
-
icon: e.crud.getBtnIcon("viewBtn"),
|
|
1409
|
-
size: e.crud.isMediumSize,
|
|
1410
|
-
disabled: e.btnDisabled
|
|
1411
|
-
},
|
|
1412
|
-
on: {
|
|
1413
|
-
click: function(o) {
|
|
1414
|
-
return o.stopPropagation(), e.crud.rowView(i, s);
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
}, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) && !e.crud.tableOption.cellBtn ? t(a, {
|
|
1418
|
-
directives: [{
|
|
1419
|
-
name: "permission",
|
|
1420
|
-
rawName: "v-permission",
|
|
1421
|
-
value: e.crud.getPermission("editBtn", i, s),
|
|
1422
|
-
expression: "crud.getPermission('editBtn', row, $index)"
|
|
1423
|
-
}],
|
|
1424
|
-
attrs: {
|
|
1425
|
-
type: e.menuText("primary"),
|
|
1426
|
-
icon: e.crud.getBtnIcon("editBtn"),
|
|
1427
|
-
size: e.crud.isMediumSize,
|
|
1428
|
-
disabled: e.btnDisabled
|
|
1429
|
-
},
|
|
1430
|
-
on: {
|
|
1431
|
-
click: function(o) {
|
|
1432
|
-
return o.stopPropagation(), e.crud.rowEdit(i, s);
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
}, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? t(a, {
|
|
1436
|
-
directives: [{
|
|
1437
|
-
name: "permission",
|
|
1438
|
-
rawName: "v-permission",
|
|
1439
|
-
value: e.crud.getPermission("copyBtn", i, s),
|
|
1440
|
-
expression: "crud.getPermission('copyBtn', row, $index)"
|
|
1441
|
-
}],
|
|
1442
|
-
attrs: {
|
|
1443
|
-
type: e.menuText("primary"),
|
|
1444
|
-
icon: e.crud.getBtnIcon("copyBtn"),
|
|
1445
|
-
size: e.crud.isMediumSize,
|
|
1446
|
-
disabled: e.btnDisabled
|
|
1447
|
-
},
|
|
1448
|
-
on: {
|
|
1449
|
-
click: function(o) {
|
|
1450
|
-
return o.stopPropagation(), e.crud.rowCopy(i);
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
}, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) && !i.$cellEdit ? t(a, {
|
|
1454
|
-
directives: [{
|
|
1455
|
-
name: "permission",
|
|
1456
|
-
rawName: "v-permission",
|
|
1457
|
-
value: e.crud.getPermission("delBtn", i, s),
|
|
1458
|
-
expression: "crud.getPermission('delBtn', row, $index)"
|
|
1459
|
-
}],
|
|
1460
|
-
attrs: {
|
|
1461
|
-
type: e.menuText("danger"),
|
|
1462
|
-
icon: e.crud.getBtnIcon("delBtn"),
|
|
1463
|
-
size: e.crud.isMediumSize,
|
|
1464
|
-
disabled: e.btnDisabled
|
|
1465
|
-
},
|
|
1466
|
-
on: {
|
|
1467
|
-
click: function(o) {
|
|
1468
|
-
return o.stopPropagation(), e.crud.rowDel(i, s);
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
}, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]], 2) : e._e()] : e._e(), e._t("menu", null, {
|
|
1472
|
-
row: i,
|
|
1473
|
-
type: e.menuText("primary"),
|
|
1474
|
-
disabled: e.crud.btnDisabled,
|
|
1475
|
-
size: e.crud.isMediumSize,
|
|
1476
|
-
index: s
|
|
1477
|
-
})];
|
|
1478
|
-
}
|
|
1479
|
-
}], null, !0)
|
|
1480
|
-
}) : e._e();
|
|
1481
|
-
}, yt = [];
|
|
1482
|
-
const xt = {
|
|
1483
|
-
name: "ColumnMenu",
|
|
1484
|
-
directives: {
|
|
1485
|
-
permission: Q
|
|
1486
|
-
},
|
|
1487
|
-
inject: ["crud"],
|
|
1488
|
-
data() {
|
|
1489
|
-
return {
|
|
1490
|
-
config: m
|
|
1491
|
-
};
|
|
1492
|
-
},
|
|
1493
|
-
computed: {
|
|
1494
|
-
menuType() {
|
|
1495
|
-
return this.crud.tableOption.menuType || this.$AVUE.menuType || "button";
|
|
1496
|
-
},
|
|
1497
|
-
isIconMenu() {
|
|
1498
|
-
return this.menuType === "icon";
|
|
1499
|
-
},
|
|
1500
|
-
isTextMenu() {
|
|
1501
|
-
return this.menuType === "text";
|
|
1502
|
-
},
|
|
1503
|
-
isMenu() {
|
|
1504
|
-
return this.menuType === "menu";
|
|
1505
|
-
}
|
|
1506
|
-
},
|
|
1507
|
-
methods: {
|
|
1508
|
-
optVal: d,
|
|
1509
|
-
menuText(e) {
|
|
1510
|
-
return ["text", "menu"].includes(this.menuType) ? "text" : e;
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
}, V = {};
|
|
1514
|
-
var wt = /* @__PURE__ */ u(
|
|
1515
|
-
xt,
|
|
1516
|
-
vt,
|
|
1517
|
-
yt,
|
|
1518
|
-
!1,
|
|
1519
|
-
$t,
|
|
1520
|
-
null,
|
|
1521
|
-
null,
|
|
1522
|
-
null
|
|
1523
|
-
);
|
|
1524
|
-
function $t(e) {
|
|
1525
|
-
for (let n in V)
|
|
1526
|
-
this[n] = V[n];
|
|
1527
|
-
}
|
|
1528
|
-
const Bt = /* @__PURE__ */ function() {
|
|
1529
|
-
return wt.exports;
|
|
1530
|
-
}();
|
|
1531
|
-
var St = function() {
|
|
1532
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
1533
|
-
return e.pageFlag && e.optVal(e.crud.tableOption.page, !0) ? t(J, {
|
|
1534
|
-
staticClass: "avue-pagination",
|
|
1535
|
-
attrs: {
|
|
1536
|
-
shadow: e.crud.isCard
|
|
1537
|
-
}
|
|
1538
|
-
}, [e._t("page"), t(me, {
|
|
1539
|
-
staticStyle: {
|
|
1540
|
-
"margin-top": "25px"
|
|
1541
|
-
},
|
|
1542
|
-
attrs: {
|
|
1543
|
-
small: e.crud.size === "mini",
|
|
1544
|
-
disabled: e.defaultPage.disabled,
|
|
1545
|
-
"hide-on-single-page": e.defaultPage.single,
|
|
1546
|
-
"pager-count": e.defaultPage.pagerCount,
|
|
1547
|
-
"current-page": e.defaultPage.currentPage,
|
|
1548
|
-
background: e.defaultPage.background,
|
|
1549
|
-
"page-size": e.defaultPage.pageSize,
|
|
1550
|
-
"page-sizes": e.defaultPage.pageSizes,
|
|
1551
|
-
layout: e.defaultPage.layout,
|
|
1552
|
-
total: e.defaultPage.total
|
|
1553
|
-
},
|
|
1554
|
-
on: {
|
|
1555
|
-
"update:currentPage": function(r) {
|
|
1556
|
-
return e.$set(e.defaultPage, "currentPage", r);
|
|
1557
|
-
},
|
|
1558
|
-
"update:current-page": function(r) {
|
|
1559
|
-
return e.$set(e.defaultPage, "currentPage", r);
|
|
1560
|
-
},
|
|
1561
|
-
"size-change": e.sizeChange,
|
|
1562
|
-
"prev-click": e.prevClick,
|
|
1563
|
-
"next-click": e.nextClick,
|
|
1564
|
-
"current-change": e.currentChange
|
|
1565
|
-
}
|
|
1566
|
-
})], 2) : e._e();
|
|
1567
|
-
}, Ct = [];
|
|
1568
|
-
const Ot = {
|
|
1569
|
-
name: "TablePage",
|
|
1570
|
-
inject: ["crud"],
|
|
1571
|
-
data() {
|
|
1572
|
-
return {
|
|
1573
|
-
defaultPage: {
|
|
1574
|
-
single: !1,
|
|
1575
|
-
total: 0,
|
|
1576
|
-
// 总页数
|
|
1577
|
-
pagerCount: 7,
|
|
1578
|
-
// 超过多少条隐藏
|
|
1579
|
-
currentPage: 1,
|
|
1580
|
-
// 当前页数
|
|
1581
|
-
pageSize: 10,
|
|
1582
|
-
// 每页显示多少条
|
|
1583
|
-
pageSizes: [10, 20, 30, 40, 50, 100],
|
|
1584
|
-
layout: "total, sizes, prev, pager, next, jumper",
|
|
1585
|
-
background: !0
|
|
1586
|
-
// 背景颜色
|
|
1587
|
-
}
|
|
1588
|
-
};
|
|
1589
|
-
},
|
|
1590
|
-
computed: {
|
|
1591
|
-
pageFlag() {
|
|
1592
|
-
return this.defaultPage.total !== 0;
|
|
1593
|
-
}
|
|
1594
|
-
},
|
|
1595
|
-
watch: {
|
|
1596
|
-
"crud.page": {
|
|
1597
|
-
handler() {
|
|
1598
|
-
this.pageInit();
|
|
1599
|
-
},
|
|
1600
|
-
deep: !0
|
|
1601
|
-
},
|
|
1602
|
-
pageFlag() {
|
|
1603
|
-
this.crud.getTableHeight();
|
|
1604
|
-
},
|
|
1605
|
-
// 如果当前页面删除没数据了调用第一页
|
|
1606
|
-
"defaultPage.total"() {
|
|
1607
|
-
this.defaultPage.total === (this.defaultPage.currentPage - 1) * this.defaultPage.pageSize && this.defaultPage.total !== 0 && (this.defaultPage.currentPage = this.defaultPage.currentPage - 1, this.currentChange(this.defaultPage.currentPage));
|
|
1608
|
-
}
|
|
1609
|
-
},
|
|
1610
|
-
created() {
|
|
1611
|
-
this.crud.isMobile && (this.defaultPage.layout = "total, sizes, prev, pager, next"), this.pageInit(), this.crud.$emit("on-load", this.defaultPage);
|
|
1612
|
-
},
|
|
1613
|
-
methods: {
|
|
1614
|
-
optVal: d,
|
|
1615
|
-
pageInit() {
|
|
1616
|
-
this.defaultPage = Object.assign(this.defaultPage, this.crud.page), this.updateValue();
|
|
1617
|
-
},
|
|
1618
|
-
updateValue() {
|
|
1619
|
-
this.crud.$emit("update:page", this.defaultPage);
|
|
1620
|
-
},
|
|
1621
|
-
// 下一页事件
|
|
1622
|
-
nextClick(e) {
|
|
1623
|
-
this.crud.$emit("next-click", e);
|
|
1624
|
-
},
|
|
1625
|
-
// 上一页事件
|
|
1626
|
-
prevClick(e) {
|
|
1627
|
-
this.crud.$emit("prev-click", e);
|
|
1628
|
-
},
|
|
1629
|
-
// 页大小回调
|
|
1630
|
-
sizeChange(e) {
|
|
1631
|
-
this.defaultPage.currentPage = 1, this.defaultPage.pageSize = e, this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("size-change", e);
|
|
1632
|
-
},
|
|
1633
|
-
// 页码回调
|
|
1634
|
-
currentChange(e) {
|
|
1635
|
-
this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("current-change", e);
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
}, j = {};
|
|
1639
|
-
var kt = /* @__PURE__ */ u(
|
|
1640
|
-
Ot,
|
|
1641
|
-
St,
|
|
1642
|
-
Ct,
|
|
1643
|
-
!1,
|
|
1644
|
-
Pt,
|
|
1645
|
-
null,
|
|
1646
|
-
null,
|
|
1647
|
-
null
|
|
1648
|
-
);
|
|
1649
|
-
function Pt(e) {
|
|
1650
|
-
for (let n in j)
|
|
1651
|
-
this[n] = j[n];
|
|
1652
|
-
}
|
|
1653
|
-
const It = /* @__PURE__ */ function() {
|
|
1654
|
-
return kt.exports;
|
|
1655
|
-
}();
|
|
1656
|
-
var Ft = function() {
|
|
1657
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
1658
|
-
return e.boxVisible ? t(e.dialogType, e._b({
|
|
1659
|
-
tag: "Component",
|
|
1660
|
-
staticClass: "dialog-form",
|
|
1661
|
-
attrs: {
|
|
1662
|
-
"lock-scroll": "",
|
|
1663
|
-
"show-full-screen": "",
|
|
1664
|
-
"destroy-on-close": e.crud.tableOption.dialogDestroy,
|
|
1665
|
-
"wrapper-closable": e.crud.tableOption.dialogClickModal,
|
|
1666
|
-
direction: e.direction,
|
|
1667
|
-
"custom-class": e.crud.tableOption.dialogCustomClass,
|
|
1668
|
-
"modal-append-to-body": "",
|
|
1669
|
-
"append-to-body": "",
|
|
1670
|
-
top: e.dialogTop,
|
|
1671
|
-
title: e.dialogTitle,
|
|
1672
|
-
"close-on-press-escape": e.crud.tableOption.dialogEscape,
|
|
1673
|
-
"close-on-click-modal": e.optVal(e.crud.tableOption.dialogClickModal, !1),
|
|
1674
|
-
modal: e.crud.tableOption.dialogModal,
|
|
1675
|
-
"show-close": e.crud.tableOption.dialogCloseBtn,
|
|
1676
|
-
visible: e.boxVisible,
|
|
1677
|
-
"before-close": e.hide
|
|
1678
|
-
},
|
|
1679
|
-
on: {
|
|
1680
|
-
"update:visible": function(r) {
|
|
1681
|
-
e.boxVisible = r;
|
|
1682
|
-
}
|
|
1683
|
-
}
|
|
1684
|
-
}, "Component", e.params, !1), [t(C, e._b({
|
|
1685
|
-
ref: "tableForm",
|
|
1686
|
-
attrs: {
|
|
1687
|
-
status: e.disabled,
|
|
1688
|
-
option: e.option
|
|
1689
|
-
},
|
|
1690
|
-
on: {
|
|
1691
|
-
"update:status": function(r) {
|
|
1692
|
-
e.disabled = r;
|
|
1693
|
-
},
|
|
1694
|
-
change: e.handleChange,
|
|
1695
|
-
submit: e.handleSubmit,
|
|
1696
|
-
"reset-change": e.hide,
|
|
1697
|
-
"tab-click": e.handleTabClick,
|
|
1698
|
-
error: e.handleError
|
|
1699
|
-
},
|
|
1700
|
-
scopedSlots: e._u([e._l(e.crud.formSlot, function(r) {
|
|
1701
|
-
return {
|
|
1702
|
-
key: e.getSlotName(r),
|
|
1703
|
-
fn: function(i) {
|
|
1704
|
-
return [e._t(r, null, null, Object.assign(i, {
|
|
1705
|
-
type: e.boxType
|
|
1706
|
-
}))];
|
|
1707
|
-
}
|
|
1708
|
-
};
|
|
1709
|
-
})], null, !0),
|
|
1710
|
-
model: {
|
|
1711
|
-
value: e.crud.tableForm,
|
|
1712
|
-
callback: function(r) {
|
|
1713
|
-
e.$set(e.crud, "tableForm", r);
|
|
1714
|
-
},
|
|
1715
|
-
expression: "crud.tableForm"
|
|
1716
|
-
}
|
|
1717
|
-
}, "FyForm", e.uploadFun({}, e.crud), !1)), t("span", {
|
|
1718
|
-
staticClass: "avue-dialog__footer",
|
|
1719
|
-
class: `avue-dialog__footer--${e.dialogMenuPosition}`
|
|
1720
|
-
}, [e.optVal(e.option.submitBtn, !0) && !e.isView ? t(a, {
|
|
1721
|
-
attrs: {
|
|
1722
|
-
loading: e.disabled,
|
|
1723
|
-
size: e.crud.controlSize,
|
|
1724
|
-
icon: e.option.submitIcon,
|
|
1725
|
-
type: "primary"
|
|
1726
|
-
},
|
|
1727
|
-
on: {
|
|
1728
|
-
click: e.submit
|
|
1729
|
-
}
|
|
1730
|
-
}, [e._v(" " + e._s(e.option.submitText) + " ")]) : e._e(), e.optVal(e.option.emptyBtn, !0) && !e.isView ? t(a, {
|
|
1731
|
-
attrs: {
|
|
1732
|
-
disabled: e.disabled,
|
|
1733
|
-
size: e.crud.controlSize,
|
|
1734
|
-
icon: e.option.emptyIcon
|
|
1735
|
-
},
|
|
1736
|
-
on: {
|
|
1737
|
-
click: e.reset
|
|
1738
|
-
}
|
|
1739
|
-
}, [e._v(" " + e._s(e.option.emptyText) + " ")]) : e._e(), e._t("menuForm", null, {
|
|
1740
|
-
disabled: e.disabled,
|
|
1741
|
-
size: e.crud.controlSize,
|
|
1742
|
-
type: e.boxType
|
|
1743
|
-
})], 2)], 1) : e._e();
|
|
1744
|
-
}, Dt = [];
|
|
1745
|
-
const Mt = {
|
|
1746
|
-
name: "FyDialogForm",
|
|
1747
|
-
components: {
|
|
1748
|
-
ElDrawer: S,
|
|
1749
|
-
ElementDialog: he
|
|
1750
|
-
},
|
|
1751
|
-
inject: ["crud"],
|
|
1752
|
-
data() {
|
|
1753
|
-
return {
|
|
1754
|
-
disabled: !1,
|
|
1755
|
-
boxType: "",
|
|
1756
|
-
fullscreen: !1,
|
|
1757
|
-
size: null,
|
|
1758
|
-
boxVisible: !1
|
|
1759
|
-
};
|
|
1760
|
-
},
|
|
1761
|
-
computed: {
|
|
1762
|
-
option() {
|
|
1763
|
-
const e = f(this.crud.tableOption);
|
|
1764
|
-
return e.boxType = this.boxType, e.column = f(this.crud.propOption), e.menuBtn = !1, this.isAdd ? (e.submitBtn = e.saveBtn, e.submitText = this.crud.menuIcon("saveBtn"), e.submitIcon = this.crud.getBtnIcon("saveBtn")) : this.isEdit ? (e.submitBtn = e.updateBtn, e.submitText = this.crud.menuIcon("updateBtn"), e.submitIcon = this.crud.getBtnIcon("updateBtn")) : this.isView && (e.detail = !0), e.emptyBtn = e.cancelBtn, e.emptyText = this.crud.menuIcon("cancelBtn"), e.emptyIcon = this.crud.getBtnIcon("cancelBtn"), this.crud.isGroup || (e.dicFlag = !1, e.dicData = this.crud.DIC), c(e.dicFlag) || e.column.forEach((n) => {
|
|
1765
|
-
n.boxType = this.boxType, n.dicFlag = n.dicFlag || e.dicFlag;
|
|
1766
|
-
}), e;
|
|
1767
|
-
},
|
|
1768
|
-
isView() {
|
|
1769
|
-
return this.boxType === "view";
|
|
1770
|
-
},
|
|
1771
|
-
isAdd() {
|
|
1772
|
-
return this.boxType === "add";
|
|
1773
|
-
},
|
|
1774
|
-
isEdit() {
|
|
1775
|
-
return this.boxType === "edit";
|
|
1776
|
-
},
|
|
1777
|
-
direction() {
|
|
1778
|
-
return this.crud.tableOption.dialogDirection;
|
|
1779
|
-
},
|
|
1780
|
-
width() {
|
|
1781
|
-
return d(`${this.crud.tableOption.dialogWidth}`, this.crud.isMobile ? "100%" : `${m.dialogWidth}`);
|
|
1782
|
-
},
|
|
1783
|
-
dialogType() {
|
|
1784
|
-
return this.isDrawer ? "ElDrawer" : "ElementDialog";
|
|
1785
|
-
},
|
|
1786
|
-
dialogTop() {
|
|
1787
|
-
return !this.isDrawer && !this.fullscreen ? this.crud.tableOption.dialogTop : "0";
|
|
1788
|
-
},
|
|
1789
|
-
isDrawer() {
|
|
1790
|
-
return this.crud.tableOption.dialogType === "drawer";
|
|
1791
|
-
},
|
|
1792
|
-
params() {
|
|
1793
|
-
return this.isDrawer ? {
|
|
1794
|
-
size: this.fullscreen ? "100%" : this.width,
|
|
1795
|
-
direction: this.crud.tableOption.dialogDirection
|
|
1796
|
-
} : {
|
|
1797
|
-
width: this.width,
|
|
1798
|
-
fullscreen: this.fullscreen
|
|
1799
|
-
};
|
|
1800
|
-
},
|
|
1801
|
-
dialogTitle() {
|
|
1802
|
-
const e = `${this.boxType}`;
|
|
1803
|
-
if (!c(this.boxType)) {
|
|
1804
|
-
const n = {
|
|
1805
|
-
tipStartTitle: "当前表格已选择",
|
|
1806
|
-
tipEndTitle: "项",
|
|
1807
|
-
editTitle: "编 辑",
|
|
1808
|
-
copyTitle: "复 制",
|
|
1809
|
-
addTitle: "新 增",
|
|
1810
|
-
viewTitle: "查 看",
|
|
1811
|
-
filterTitle: "过滤条件",
|
|
1812
|
-
showTitle: "列显隐"
|
|
1813
|
-
};
|
|
1814
|
-
return this.crud.tableOption[`${e}Title`] || n[`${e}Title`];
|
|
1815
|
-
}
|
|
1816
|
-
return "";
|
|
1817
|
-
},
|
|
1818
|
-
dialogMenuPosition() {
|
|
1819
|
-
return this.crud.option.dialogMenuPosition || "right";
|
|
1820
|
-
}
|
|
1821
|
-
},
|
|
1822
|
-
methods: {
|
|
1823
|
-
optVal: d,
|
|
1824
|
-
uploadFun: U,
|
|
1825
|
-
submit() {
|
|
1826
|
-
this.$refs.tableForm.submit();
|
|
1827
|
-
},
|
|
1828
|
-
reset() {
|
|
1829
|
-
this.$refs.tableForm.resetForm(!1);
|
|
1830
|
-
},
|
|
1831
|
-
getSlotName(e) {
|
|
1832
|
-
return e.replace("Form", "");
|
|
1833
|
-
},
|
|
1834
|
-
initFun() {
|
|
1835
|
-
["clearValidate", "validate", "resetForm", "validateField"].forEach((e) => {
|
|
1836
|
-
this.crud[e] = this.$refs.tableForm[e];
|
|
1837
|
-
});
|
|
1838
|
-
},
|
|
1839
|
-
handleChange() {
|
|
1840
|
-
this.crud.setVal();
|
|
1841
|
-
},
|
|
1842
|
-
handleTabClick(e, n) {
|
|
1843
|
-
this.crud.$emit("tab-click", e, n);
|
|
1844
|
-
},
|
|
1845
|
-
handleFullScreen() {
|
|
1846
|
-
this.isDrawer && (c(this.size) ? this.size = "100%" : this.size = ""), this.fullscreen = !this.fullscreen;
|
|
1847
|
-
},
|
|
1848
|
-
handleError(e) {
|
|
1849
|
-
this.crud.$emit("error", e);
|
|
1850
|
-
},
|
|
1851
|
-
handleSubmit(e, n) {
|
|
1852
|
-
this.isAdd ? this.rowSave(n) : this.isEdit && this.rowUpdate(n);
|
|
1853
|
-
},
|
|
1854
|
-
// 保存
|
|
1855
|
-
rowSave(e) {
|
|
1856
|
-
this.crud.$emit("row-save", B(this.crud.tableForm, ["$"]), this.closeDialog, e);
|
|
1857
|
-
},
|
|
1858
|
-
// 更新
|
|
1859
|
-
rowUpdate(e) {
|
|
1860
|
-
this.crud.$emit(
|
|
1861
|
-
"row-update",
|
|
1862
|
-
B(this.crud.tableForm, ["$"]),
|
|
1863
|
-
this.crud.tableIndex,
|
|
1864
|
-
this.closeDialog,
|
|
1865
|
-
e
|
|
1866
|
-
);
|
|
1867
|
-
},
|
|
1868
|
-
closeDialog(e) {
|
|
1869
|
-
e = f(e), e && (() => {
|
|
1870
|
-
if (this.isEdit) {
|
|
1871
|
-
const { parentList: t, index: r } = this.crud.findData(e[this.crud.rowKey]);
|
|
1872
|
-
if (t) {
|
|
1873
|
-
const i = t.splice(r, 1)[0];
|
|
1874
|
-
e[this.crud.childrenKey] = i[this.crud.childrenKey], t.splice(r, 0, e);
|
|
1875
|
-
}
|
|
1876
|
-
} else if (this.isAdd) {
|
|
1877
|
-
const { item: t } = this.crud.findData(e[this.crud.rowParentKey]);
|
|
1878
|
-
t ? (t[this.crud.childrenKey] || this.$set(t, this.crud.childrenKey, []), this.crud.tableOption.lazy && this.$set(t, this.crud.hasChildrenKey, !0), t[this.crud.childrenKey].push(e)) : this.crud.list.push(e);
|
|
1879
|
-
}
|
|
1880
|
-
})(), this.hide();
|
|
1881
|
-
},
|
|
1882
|
-
// 隐藏表单
|
|
1883
|
-
hide(e) {
|
|
1884
|
-
const n = () => {
|
|
1885
|
-
e && e(), this.crud.tableIndex = -1, this.crud.tableForm = {}, this.crud.setVal(), this.boxVisible = !1;
|
|
1886
|
-
};
|
|
1887
|
-
typeof this.crud.beforeClose == "function" ? this.crud.beforeClose(n, this.boxType) : n();
|
|
1888
|
-
},
|
|
1889
|
-
// 显示表单
|
|
1890
|
-
show(e) {
|
|
1891
|
-
this.boxType = e;
|
|
1892
|
-
const n = () => {
|
|
1893
|
-
this.fullscreen = this.crud.tableOption.dialogFullscreen, this.boxVisible = !0, this.$nextTick(() => {
|
|
1894
|
-
this.initFun();
|
|
1895
|
-
});
|
|
1896
|
-
};
|
|
1897
|
-
typeof this.crud.beforeOpen == "function" ? this.crud.beforeOpen(n, this.boxType) : n();
|
|
1898
|
-
}
|
|
1899
|
-
}
|
|
1900
|
-
}, L = {};
|
|
1901
|
-
var zt = /* @__PURE__ */ u(
|
|
1902
|
-
Mt,
|
|
1903
|
-
Ft,
|
|
1904
|
-
Dt,
|
|
1905
|
-
!1,
|
|
1906
|
-
Tt,
|
|
1907
|
-
null,
|
|
1908
|
-
null,
|
|
1909
|
-
null
|
|
1910
|
-
);
|
|
1911
|
-
function Tt(e) {
|
|
1912
|
-
for (let n in L)
|
|
1913
|
-
this[n] = L[n];
|
|
1914
|
-
}
|
|
1915
|
-
const Et = /* @__PURE__ */ function() {
|
|
1916
|
-
return zt.exports;
|
|
1917
|
-
}();
|
|
1918
|
-
var Vt = function() {
|
|
1919
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
1920
|
-
return e.columnBox ? t("div", [t(S, {
|
|
1921
|
-
staticClass: "avue-crud__dialog avue-crud__column avue-dialog",
|
|
1922
|
-
attrs: {
|
|
1923
|
-
"lock-scroll": "",
|
|
1924
|
-
"append-to-body": "",
|
|
1925
|
-
title: "列显隐",
|
|
1926
|
-
size: e.crud.isMobile ? "100%" : "40%",
|
|
1927
|
-
visible: e.columnBox
|
|
1928
|
-
},
|
|
1929
|
-
on: {
|
|
1930
|
-
"update:visible": function(r) {
|
|
1931
|
-
e.columnBox = r;
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
}, [t(X, {
|
|
1935
|
-
ref: "table",
|
|
1936
|
-
attrs: {
|
|
1937
|
-
data: e.data,
|
|
1938
|
-
height: "100%",
|
|
1939
|
-
size: "small",
|
|
1940
|
-
border: ""
|
|
1941
|
-
}
|
|
1942
|
-
}, [t(_, {
|
|
1943
|
-
key: "label",
|
|
1944
|
-
attrs: {
|
|
1945
|
-
align: "center",
|
|
1946
|
-
width: "100",
|
|
1947
|
-
"header-align": "center",
|
|
1948
|
-
prop: "label",
|
|
1949
|
-
label: "列名"
|
|
1950
|
-
}
|
|
1951
|
-
}), e._l(e.defaultColumn, function(r, i) {
|
|
1952
|
-
return [r.hide !== !0 ? t(_, {
|
|
1953
|
-
key: i,
|
|
1954
|
-
attrs: {
|
|
1955
|
-
label: r.label,
|
|
1956
|
-
prop: r.prop,
|
|
1957
|
-
align: "center",
|
|
1958
|
-
"header-align": "center"
|
|
1959
|
-
},
|
|
1960
|
-
scopedSlots: e._u([{
|
|
1961
|
-
key: "default",
|
|
1962
|
-
fn: function(s) {
|
|
1963
|
-
var o = s.row;
|
|
1964
|
-
return [t(pe, {
|
|
1965
|
-
on: {
|
|
1966
|
-
change: function(l) {
|
|
1967
|
-
return e.handleChange(r.prop);
|
|
1968
|
-
}
|
|
1969
|
-
},
|
|
1970
|
-
model: {
|
|
1971
|
-
value: e.crud.objectOption[o.prop][r.prop],
|
|
1972
|
-
callback: function(l) {
|
|
1973
|
-
e.$set(e.crud.objectOption[o.prop], r.prop, l);
|
|
1974
|
-
},
|
|
1975
|
-
expression: "crud.objectOption[row.prop][item.prop]"
|
|
1976
|
-
}
|
|
1977
|
-
})];
|
|
1978
|
-
}
|
|
1979
|
-
}], null, !0)
|
|
1980
|
-
}) : e._e()];
|
|
1981
|
-
})], 2)], 1)], 1) : e._e();
|
|
1982
|
-
}, jt = [];
|
|
1983
|
-
const Lt = {
|
|
1984
|
-
name: "DialogColumn",
|
|
1985
|
-
inject: ["crud"],
|
|
1986
|
-
data() {
|
|
1987
|
-
return {
|
|
1988
|
-
data: [],
|
|
1989
|
-
columnBox: !1
|
|
1990
|
-
};
|
|
1991
|
-
},
|
|
1992
|
-
computed: {
|
|
1993
|
-
defaultColumn() {
|
|
1994
|
-
return [
|
|
1995
|
-
{
|
|
1996
|
-
label: "隐藏",
|
|
1997
|
-
prop: "hide"
|
|
1998
|
-
},
|
|
1999
|
-
{
|
|
2000
|
-
label: "冻结",
|
|
2001
|
-
prop: "fixed"
|
|
2002
|
-
},
|
|
2003
|
-
{
|
|
2004
|
-
label: "过滤",
|
|
2005
|
-
prop: "filters"
|
|
2006
|
-
},
|
|
2007
|
-
{
|
|
2008
|
-
label: "排序",
|
|
2009
|
-
prop: "sortable"
|
|
2010
|
-
},
|
|
2011
|
-
{
|
|
2012
|
-
label: "序号",
|
|
2013
|
-
prop: "index",
|
|
2014
|
-
hide: !0
|
|
2015
|
-
},
|
|
2016
|
-
{
|
|
2017
|
-
label: "宽度",
|
|
2018
|
-
prop: "width",
|
|
2019
|
-
hide: !0
|
|
2020
|
-
}
|
|
2021
|
-
];
|
|
2022
|
-
}
|
|
2023
|
-
},
|
|
2024
|
-
methods: {
|
|
2025
|
-
handleShow() {
|
|
2026
|
-
this.data = [], this.crud.propOption.forEach((e) => {
|
|
2027
|
-
e.showColumn !== !1 && this.data.push(e);
|
|
2028
|
-
}), this.columnBox = !0, this.$nextTick(() => this.rowDrop());
|
|
2029
|
-
},
|
|
2030
|
-
handleChange(e) {
|
|
2031
|
-
["hide", "filters"].includes(e) && this.crud.refreshTable();
|
|
2032
|
-
},
|
|
2033
|
-
rowDrop() {
|
|
2034
|
-
const e = this.$refs.table.$el.querySelectorAll(m.dropRowClass)[0];
|
|
2035
|
-
this.crud.tableDrop("column", e, (n) => {
|
|
2036
|
-
const t = n.oldIndex, r = n.newIndex;
|
|
2037
|
-
this.crud.headerSort(t, r), this.crud.refreshTable(() => this.rowDrop());
|
|
2038
|
-
});
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
}, R = {};
|
|
2042
|
-
var Rt = /* @__PURE__ */ u(
|
|
2043
|
-
Lt,
|
|
2044
|
-
Vt,
|
|
2045
|
-
jt,
|
|
2046
|
-
!1,
|
|
2047
|
-
At,
|
|
2048
|
-
null,
|
|
2049
|
-
null,
|
|
2050
|
-
null
|
|
2051
|
-
);
|
|
2052
|
-
function At(e) {
|
|
2053
|
-
for (let n in R)
|
|
2054
|
-
this[n] = R[n];
|
|
2055
|
-
}
|
|
2056
|
-
const Nt = /* @__PURE__ */ function() {
|
|
2057
|
-
return Rt.exports;
|
|
2058
|
-
}();
|
|
2059
|
-
var Ht = function() {
|
|
2060
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
2061
|
-
return e.box ? t("div", [t(de, {
|
|
2062
|
-
staticClass: "avue-dialog",
|
|
2063
|
-
attrs: {
|
|
2064
|
-
title: "导出",
|
|
2065
|
-
"lock-scroll": "",
|
|
2066
|
-
visible: e.box,
|
|
2067
|
-
width: e.crud.isMobile ? "100%" : "30%"
|
|
2068
|
-
},
|
|
2069
|
-
on: {
|
|
2070
|
-
"update:visible": function(r) {
|
|
2071
|
-
e.box = r;
|
|
2072
|
-
}
|
|
2073
|
-
},
|
|
2074
|
-
scopedSlots: e._u([{
|
|
2075
|
-
key: "footer",
|
|
2076
|
-
fn: function() {
|
|
2077
|
-
return [t("span", {
|
|
2078
|
-
staticClass: "dialog-footer"
|
|
2079
|
-
}, [t(a, {
|
|
2080
|
-
attrs: {
|
|
2081
|
-
type: "primary",
|
|
2082
|
-
size: e.crud.isMediumSize
|
|
2083
|
-
},
|
|
2084
|
-
on: {
|
|
2085
|
-
click: e.handleSubmit
|
|
2086
|
-
}
|
|
2087
|
-
}, [e._v("确定")]), t(a, {
|
|
2088
|
-
attrs: {
|
|
2089
|
-
size: e.crud.isMediumSize
|
|
2090
|
-
},
|
|
2091
|
-
on: {
|
|
2092
|
-
click: function(r) {
|
|
2093
|
-
e.box = !1;
|
|
2094
|
-
}
|
|
2095
|
-
}
|
|
2096
|
-
}, [e._v("取消")])], 1)];
|
|
2097
|
-
},
|
|
2098
|
-
proxy: !0
|
|
2099
|
-
}], null, !1, 2375905330)
|
|
2100
|
-
}, [t(C, {
|
|
2101
|
-
attrs: {
|
|
2102
|
-
option: e.option
|
|
2103
|
-
},
|
|
2104
|
-
model: {
|
|
2105
|
-
value: e.form,
|
|
2106
|
-
callback: function(r) {
|
|
2107
|
-
e.form = r;
|
|
2108
|
-
},
|
|
2109
|
-
expression: "form"
|
|
2110
|
-
}
|
|
2111
|
-
})], 1)], 1) : e._e();
|
|
2112
|
-
}, Wt = [];
|
|
2113
|
-
const Kt = {
|
|
2114
|
-
name: "DialogExcel",
|
|
2115
|
-
inject: ["crud"],
|
|
2116
|
-
data() {
|
|
2117
|
-
return {
|
|
2118
|
-
option: {},
|
|
2119
|
-
columnOption: {},
|
|
2120
|
-
box: !1,
|
|
2121
|
-
form: {
|
|
2122
|
-
name: this.crud.tableOption.title
|
|
2123
|
-
}
|
|
2124
|
-
};
|
|
2125
|
-
},
|
|
2126
|
-
methods: {
|
|
2127
|
-
handleShow() {
|
|
2128
|
-
this.getColumnOption(), this.getOption(), this.box = !0;
|
|
2129
|
-
},
|
|
2130
|
-
handleSubmit() {
|
|
2131
|
-
this.$Export.excel({
|
|
2132
|
-
title: this.form.name,
|
|
2133
|
-
columns: this.getColumn(),
|
|
2134
|
-
data: this.handleSum()
|
|
2135
|
-
}), this.box = !1;
|
|
2136
|
-
},
|
|
2137
|
-
// 计算统计
|
|
2138
|
-
handleSum() {
|
|
2139
|
-
const e = this.crud.tableOption, n = this.crud.propOption, t = this.form.type ? this.crud.list : this.crud.tableSelect, r = [];
|
|
2140
|
-
return this.form.params.includes("data") && t.forEach((i) => {
|
|
2141
|
-
const s = f(i);
|
|
2142
|
-
n.forEach((o) => {
|
|
2143
|
-
const l = o.parentProp ? (this.crud.cascaderDIC[o.$index] || {})[o.prop] : this.crud.DIC[o.prop];
|
|
2144
|
-
s[o.prop] = G(s, o, e, l);
|
|
2145
|
-
}), r.push(s);
|
|
2146
|
-
}), this.form.params.includes("sum") && e.showSummary && r.push(this.crud.sumsList), r;
|
|
2147
|
-
},
|
|
2148
|
-
getOption() {
|
|
2149
|
-
this.option = {
|
|
2150
|
-
submitBtn: !1,
|
|
2151
|
-
emptyBtn: !1,
|
|
2152
|
-
column: [
|
|
2153
|
-
{
|
|
2154
|
-
label: "文件名",
|
|
2155
|
-
prop: "name",
|
|
2156
|
-
span: 24
|
|
2157
|
-
},
|
|
2158
|
-
{
|
|
2159
|
-
label: "选择数据",
|
|
2160
|
-
prop: "type",
|
|
2161
|
-
span: 24,
|
|
2162
|
-
type: "select",
|
|
2163
|
-
dicData: [
|
|
2164
|
-
{
|
|
2165
|
-
label: "当前数据(当前页全部的数据)",
|
|
2166
|
-
value: !0
|
|
2167
|
-
},
|
|
2168
|
-
{
|
|
2169
|
-
label: "选中的数据(当前页选中的数据)",
|
|
2170
|
-
disabled: this.crud.tableOption.selection !== !0,
|
|
2171
|
-
value: !1
|
|
2172
|
-
}
|
|
2173
|
-
]
|
|
2174
|
-
},
|
|
2175
|
-
{
|
|
2176
|
-
label: "选择字段",
|
|
2177
|
-
prop: "prop",
|
|
2178
|
-
type: "tree",
|
|
2179
|
-
multiple: !0,
|
|
2180
|
-
checkStrictly: !0,
|
|
2181
|
-
span: 24,
|
|
2182
|
-
props: {
|
|
2183
|
-
value: "prop"
|
|
2184
|
-
},
|
|
2185
|
-
dicData: this.columnOption
|
|
2186
|
-
},
|
|
2187
|
-
{
|
|
2188
|
-
label: "参数设置",
|
|
2189
|
-
prop: "params",
|
|
2190
|
-
type: "checkbox",
|
|
2191
|
-
span: 24,
|
|
2192
|
-
value: ["header", "data"].concat(
|
|
2193
|
-
(() => {
|
|
2194
|
-
const e = [];
|
|
2195
|
-
return this.crud.isHeader && e.push("headers"), this.crud.isShowSummary && e.push("sum"), e;
|
|
2196
|
-
})()
|
|
2197
|
-
),
|
|
2198
|
-
dicData: [
|
|
2199
|
-
{
|
|
2200
|
-
label: "表头",
|
|
2201
|
-
disabled: !0,
|
|
2202
|
-
value: "header"
|
|
2203
|
-
},
|
|
2204
|
-
{
|
|
2205
|
-
label: "数据源",
|
|
2206
|
-
value: "data"
|
|
2207
|
-
}
|
|
2208
|
-
].concat(
|
|
2209
|
-
(() => {
|
|
2210
|
-
const e = [];
|
|
2211
|
-
return e.push({
|
|
2212
|
-
label: "复杂表头",
|
|
2213
|
-
value: "headers",
|
|
2214
|
-
disabled: !this.crud.isHeader
|
|
2215
|
-
}), e.push({
|
|
2216
|
-
label: "合计统计",
|
|
2217
|
-
value: "sum",
|
|
2218
|
-
disabled: !this.crud.isShowSummary
|
|
2219
|
-
}), e;
|
|
2220
|
-
})()
|
|
2221
|
-
)
|
|
2222
|
-
}
|
|
2223
|
-
]
|
|
2224
|
-
}, this.form.type = this.crud.selectLen === 0;
|
|
2225
|
-
},
|
|
2226
|
-
getColumnOption() {
|
|
2227
|
-
const e = f(this.crud.columnOption), n = [], t = (r = []) => {
|
|
2228
|
-
r.forEach((i, s) => {
|
|
2229
|
-
const o = i.children;
|
|
2230
|
-
o && !Array.isArray(o) ? delete i.children : i.showColumn === !1 ? r.splice(s, 1) : (n.push(i.prop), i.children && t(o));
|
|
2231
|
-
});
|
|
2232
|
-
};
|
|
2233
|
-
t(e), this.columnOption = e, this.form.prop = n;
|
|
2234
|
-
},
|
|
2235
|
-
getColumn() {
|
|
2236
|
-
const e = f(this.columnOption), n = this.$refs.form.getPropRef("prop").$refs.temp.getHalfList();
|
|
2237
|
-
if (!this.form.params)
|
|
2238
|
-
return [];
|
|
2239
|
-
if (this.form.params.includes("headers")) {
|
|
2240
|
-
const t = (r = []) => {
|
|
2241
|
-
r.forEach((i, s) => {
|
|
2242
|
-
n.includes(i.prop) ? i.children && t(i.children) : r.splice(s, 1);
|
|
2243
|
-
});
|
|
2244
|
-
};
|
|
2245
|
-
return t(e), e;
|
|
2246
|
-
} else {
|
|
2247
|
-
const t = [], r = (i = []) => {
|
|
2248
|
-
i.forEach((s) => {
|
|
2249
|
-
s.children ? r(s.children) : n.includes(s.prop) && t.push(s);
|
|
2250
|
-
});
|
|
2251
|
-
};
|
|
2252
|
-
return r(e), t;
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
}, A = {};
|
|
2257
|
-
var Ut = /* @__PURE__ */ u(
|
|
2258
|
-
Kt,
|
|
2259
|
-
Ht,
|
|
2260
|
-
Wt,
|
|
2261
|
-
!1,
|
|
2262
|
-
qt,
|
|
2263
|
-
null,
|
|
2264
|
-
null,
|
|
2265
|
-
null
|
|
2266
|
-
);
|
|
2267
|
-
function qt(e) {
|
|
2268
|
-
for (let n in A)
|
|
2269
|
-
this[n] = A[n];
|
|
2270
|
-
}
|
|
2271
|
-
const Gt = /* @__PURE__ */ function() {
|
|
2272
|
-
return Ut.exports;
|
|
2273
|
-
}(), Xt = {
|
|
2274
|
-
name: "FyInput",
|
|
2275
|
-
mixins: [y, x],
|
|
2276
|
-
props: {
|
|
2277
|
-
showPassword: {
|
|
2278
|
-
type: Boolean,
|
|
2279
|
-
default: !0
|
|
2280
|
-
},
|
|
2281
|
-
showWordLimit: {
|
|
2282
|
-
type: Boolean,
|
|
2283
|
-
default: !1
|
|
2284
|
-
},
|
|
2285
|
-
prefixIcon: {
|
|
2286
|
-
type: String
|
|
2287
|
-
},
|
|
2288
|
-
suffixIcon: {
|
|
2289
|
-
type: String
|
|
2290
|
-
},
|
|
2291
|
-
prependClick: {
|
|
2292
|
-
type: Function,
|
|
2293
|
-
default: () => {
|
|
2294
|
-
}
|
|
2295
|
-
},
|
|
2296
|
-
prepend: {
|
|
2297
|
-
type: String
|
|
2298
|
-
},
|
|
2299
|
-
appendClick: {
|
|
2300
|
-
type: Function,
|
|
2301
|
-
default: () => {
|
|
2302
|
-
}
|
|
2303
|
-
},
|
|
2304
|
-
append: {
|
|
2305
|
-
type: String
|
|
2306
|
-
},
|
|
2307
|
-
minlength: {
|
|
2308
|
-
type: Number
|
|
2309
|
-
},
|
|
2310
|
-
maxlength: {
|
|
2311
|
-
type: Number
|
|
2312
|
-
},
|
|
2313
|
-
rows: Number,
|
|
2314
|
-
minRows: {
|
|
2315
|
-
type: Number,
|
|
2316
|
-
default: 5
|
|
2317
|
-
},
|
|
2318
|
-
maxRows: {
|
|
2319
|
-
type: Number,
|
|
2320
|
-
default: 10
|
|
2321
|
-
},
|
|
2322
|
-
autocomplete: {
|
|
2323
|
-
type: String
|
|
2324
|
-
}
|
|
2325
|
-
},
|
|
2326
|
-
computed: {
|
|
2327
|
-
isSearch() {
|
|
2328
|
-
return this.type === "search";
|
|
2329
|
-
},
|
|
2330
|
-
typeParam: function() {
|
|
2331
|
-
return this.type === "textarea" ? "textarea" : this.type === "password" ? "password" : "text";
|
|
2332
|
-
}
|
|
2333
|
-
}
|
|
2334
|
-
}, N = {};
|
|
2335
|
-
var Jt = /* @__PURE__ */ u(
|
|
2336
|
-
Xt,
|
|
2337
|
-
ie,
|
|
2338
|
-
re,
|
|
2339
|
-
!1,
|
|
2340
|
-
Qt,
|
|
2341
|
-
null,
|
|
2342
|
-
null,
|
|
2343
|
-
null
|
|
2344
|
-
);
|
|
2345
|
-
function Qt(e) {
|
|
2346
|
-
for (let n in N)
|
|
2347
|
-
this[n] = N[n];
|
|
2348
|
-
}
|
|
2349
|
-
const Yt = /* @__PURE__ */ function() {
|
|
2350
|
-
return Jt.exports;
|
|
2351
|
-
}(), Zt = {
|
|
2352
|
-
name: "FySelect",
|
|
2353
|
-
mixins: [y, x],
|
|
2354
|
-
props: {
|
|
2355
|
-
loadingText: {
|
|
2356
|
-
type: String
|
|
2357
|
-
},
|
|
2358
|
-
noMatchText: {
|
|
2359
|
-
type: String
|
|
2360
|
-
},
|
|
2361
|
-
noDataText: {
|
|
2362
|
-
type: String
|
|
2363
|
-
},
|
|
2364
|
-
drag: {
|
|
2365
|
-
type: Boolean,
|
|
2366
|
-
default: !1
|
|
2367
|
-
},
|
|
2368
|
-
remote: {
|
|
2369
|
-
type: Boolean,
|
|
2370
|
-
default: !1
|
|
2371
|
-
},
|
|
2372
|
-
tags: {
|
|
2373
|
-
type: Boolean,
|
|
2374
|
-
default: !1
|
|
2375
|
-
},
|
|
2376
|
-
limit: {
|
|
2377
|
-
type: Number,
|
|
2378
|
-
default: 0
|
|
2379
|
-
},
|
|
2380
|
-
filterable: {
|
|
2381
|
-
type: Boolean,
|
|
2382
|
-
default: !1
|
|
2383
|
-
},
|
|
2384
|
-
allowCreate: {
|
|
2385
|
-
type: Boolean,
|
|
2386
|
-
default: !1
|
|
2387
|
-
},
|
|
2388
|
-
defaultFirstOption: {
|
|
2389
|
-
type: Boolean,
|
|
2390
|
-
default: !1
|
|
2391
|
-
},
|
|
2392
|
-
all: {
|
|
2393
|
-
type: Boolean,
|
|
2394
|
-
default: !1
|
|
2395
|
-
},
|
|
2396
|
-
popperAppendToBody: {
|
|
2397
|
-
type: Boolean,
|
|
2398
|
-
default: !0
|
|
2399
|
-
}
|
|
2400
|
-
},
|
|
2401
|
-
data() {
|
|
2402
|
-
return {
|
|
2403
|
-
checkAll: !1,
|
|
2404
|
-
created: !1,
|
|
2405
|
-
netDic: [],
|
|
2406
|
-
loading: !1
|
|
2407
|
-
};
|
|
2408
|
-
},
|
|
2409
|
-
watch: {
|
|
2410
|
-
text(e) {
|
|
2411
|
-
c(e) || this.remote && !this.created && (this.created = !0, this.handleRemoteMethod(this.multiple ? this.text.join(ne) : this.text));
|
|
2412
|
-
},
|
|
2413
|
-
dic: {
|
|
2414
|
-
handler(e) {
|
|
2415
|
-
this.netDic = e;
|
|
2416
|
-
},
|
|
2417
|
-
immediate: !0
|
|
2418
|
-
}
|
|
2419
|
-
},
|
|
2420
|
-
mounted() {
|
|
2421
|
-
this.drag && this.setSort();
|
|
2422
|
-
},
|
|
2423
|
-
methods: {
|
|
2424
|
-
setSort() {
|
|
2425
|
-
if (!window.Sortable) {
|
|
2426
|
-
oe.logs("Sortable");
|
|
2427
|
-
return;
|
|
2428
|
-
}
|
|
2429
|
-
const e = this.$refs.main.$el.querySelectorAll(".el-select__tags > span")[0];
|
|
2430
|
-
window.Sortable.create(e, {
|
|
2431
|
-
animation: 100,
|
|
2432
|
-
onEnd: (n) => {
|
|
2433
|
-
const t = this.value.splice(n.oldIndex, 1)[0];
|
|
2434
|
-
this.value.splice(n.newIndex, 0, t);
|
|
2435
|
-
}
|
|
2436
|
-
});
|
|
2437
|
-
},
|
|
2438
|
-
handleRemoteMethod(e) {
|
|
2439
|
-
this.loading = !0, q({
|
|
2440
|
-
column: this.column,
|
|
2441
|
-
value: e
|
|
2442
|
-
}).then((n) => {
|
|
2443
|
-
this.loading = !1, this.netDic = n;
|
|
2444
|
-
});
|
|
2445
|
-
},
|
|
2446
|
-
selectAll() {
|
|
2447
|
-
this.text = [], this.checkAll && this.netDic.forEach((e) => {
|
|
2448
|
-
this.text.push(e[this.valueKey]);
|
|
2449
|
-
});
|
|
2450
|
-
},
|
|
2451
|
-
changeSelect(e) {
|
|
2452
|
-
this.checkAll = e.length === this.netDic.length;
|
|
2453
|
-
}
|
|
2454
|
-
}
|
|
2455
|
-
}, H = {};
|
|
2456
|
-
var en = /* @__PURE__ */ u(
|
|
2457
|
-
Zt,
|
|
2458
|
-
le,
|
|
2459
|
-
se,
|
|
2460
|
-
!1,
|
|
2461
|
-
tn,
|
|
2462
|
-
null,
|
|
2463
|
-
null,
|
|
2464
|
-
null
|
|
2465
|
-
);
|
|
2466
|
-
function tn(e) {
|
|
2467
|
-
for (let n in H)
|
|
2468
|
-
this[n] = H[n];
|
|
2469
|
-
}
|
|
2470
|
-
const W = /* @__PURE__ */ function() {
|
|
2471
|
-
return en.exports;
|
|
2472
|
-
}();
|
|
2473
|
-
var nn = function() {
|
|
2474
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
2475
|
-
return e.box ? t("div", [t(S, {
|
|
2476
|
-
staticClass: "avue-dialog",
|
|
2477
|
-
class: ["avue-crud__dialog", "avue-crud__filter"],
|
|
2478
|
-
attrs: {
|
|
2479
|
-
"lock-scroll": "",
|
|
2480
|
-
"append-to-body": "",
|
|
2481
|
-
title: "过滤条件",
|
|
2482
|
-
size: e.crud.isMobile ? "100%" : "60%",
|
|
2483
|
-
visible: e.box
|
|
2484
|
-
},
|
|
2485
|
-
on: {
|
|
2486
|
-
"update:visible": function(r) {
|
|
2487
|
-
e.box = r;
|
|
2488
|
-
}
|
|
2489
|
-
}
|
|
2490
|
-
}, [t(ce, {
|
|
2491
|
-
attrs: {
|
|
2492
|
-
span: 24
|
|
2493
|
-
}
|
|
2494
|
-
}, [t("div", {
|
|
2495
|
-
staticClass: "avue-crud__filter-menu"
|
|
2496
|
-
}, [t(ae, [t(a, {
|
|
2497
|
-
attrs: {
|
|
2498
|
-
type: "primary",
|
|
2499
|
-
size: e.crud.isMediumSize
|
|
2500
|
-
},
|
|
2501
|
-
on: {
|
|
2502
|
-
click: e.handleAdd
|
|
2503
|
-
}
|
|
2504
|
-
}, [e._v(" 新增条件 ")]), t(a, {
|
|
2505
|
-
attrs: {
|
|
2506
|
-
type: "primary",
|
|
2507
|
-
size: e.crud.isMediumSize
|
|
2508
|
-
},
|
|
2509
|
-
on: {
|
|
2510
|
-
click: e.handleClear
|
|
2511
|
-
}
|
|
2512
|
-
}, [e._v(" 清空条件 ")]), t(a, {
|
|
2513
|
-
attrs: {
|
|
2514
|
-
type: "primary",
|
|
2515
|
-
size: e.crud.isMediumSize
|
|
2516
|
-
},
|
|
2517
|
-
on: {
|
|
2518
|
-
click: e.handleValueClear
|
|
2519
|
-
}
|
|
2520
|
-
}, [e._v(" 清空数据 ")])], 1)], 1), e._l(e.list, function(r, i) {
|
|
2521
|
-
return t(k, {
|
|
2522
|
-
key: i,
|
|
2523
|
-
staticClass: "avue-crud__filter-item",
|
|
2524
|
-
attrs: {
|
|
2525
|
-
md: 12,
|
|
2526
|
-
xs: 24,
|
|
2527
|
-
sm: 12
|
|
2528
|
-
}
|
|
2529
|
-
}, [t(W, {
|
|
2530
|
-
staticClass: "avue-crud__filter-label",
|
|
2531
|
-
attrs: {
|
|
2532
|
-
dic: e.columnOption,
|
|
2533
|
-
clearable: !1,
|
|
2534
|
-
size: e.crud.isMediumSize
|
|
2535
|
-
},
|
|
2536
|
-
on: {
|
|
2537
|
-
change: function(s) {
|
|
2538
|
-
return e.handleChange(i);
|
|
2539
|
-
}
|
|
2540
|
-
},
|
|
2541
|
-
model: {
|
|
2542
|
-
value: r.text,
|
|
2543
|
-
callback: function(s) {
|
|
2544
|
-
e.$set(r, "text", s);
|
|
2545
|
-
},
|
|
2546
|
-
expression: "column.text"
|
|
2547
|
-
}
|
|
2548
|
-
}), t(W, {
|
|
2549
|
-
staticClass: "avue-crud__filter-symbol",
|
|
2550
|
-
attrs: {
|
|
2551
|
-
dic: e.symbolDic,
|
|
2552
|
-
clearable: !1,
|
|
2553
|
-
size: e.crud.isMediumSize
|
|
2554
|
-
},
|
|
2555
|
-
model: {
|
|
2556
|
-
value: r.symbol,
|
|
2557
|
-
callback: function(s) {
|
|
2558
|
-
e.$set(r, "symbol", s);
|
|
2559
|
-
},
|
|
2560
|
-
expression: "column.symbol"
|
|
2561
|
-
}
|
|
2562
|
-
}), t(Yt, {
|
|
2563
|
-
staticClass: "avue-crud__filter-value",
|
|
2564
|
-
attrs: {
|
|
2565
|
-
size: e.crud.isMediumSize
|
|
2566
|
-
},
|
|
2567
|
-
model: {
|
|
2568
|
-
value: r.value,
|
|
2569
|
-
callback: function(s) {
|
|
2570
|
-
e.$set(r, "value", s);
|
|
2571
|
-
},
|
|
2572
|
-
expression: "column.value"
|
|
2573
|
-
}
|
|
2574
|
-
}), t(a, {
|
|
2575
|
-
staticClass: "avue-crud__filter-icon",
|
|
2576
|
-
attrs: {
|
|
2577
|
-
type: "danger",
|
|
2578
|
-
size: "mini",
|
|
2579
|
-
circle: "",
|
|
2580
|
-
icon: "el-icon-minus"
|
|
2581
|
-
},
|
|
2582
|
-
on: {
|
|
2583
|
-
click: function(s) {
|
|
2584
|
-
return e.handleDelete(i);
|
|
2585
|
-
}
|
|
2586
|
-
}
|
|
2587
|
-
})], 1);
|
|
2588
|
-
}), t(k, {
|
|
2589
|
-
staticClass: "avue-form__menu avue-form__menu--right",
|
|
2590
|
-
attrs: {
|
|
2591
|
-
span: 24
|
|
2592
|
-
}
|
|
2593
|
-
}, [t(a, {
|
|
2594
|
-
attrs: {
|
|
2595
|
-
type: "primary",
|
|
2596
|
-
size: e.crud.isMediumSize
|
|
2597
|
-
},
|
|
2598
|
-
on: {
|
|
2599
|
-
click: e.handleSubmit
|
|
2600
|
-
}
|
|
2601
|
-
}, [e._v(" 确 定 ")]), t(a, {
|
|
2602
|
-
attrs: {
|
|
2603
|
-
size: e.crud.isMediumSize
|
|
2604
|
-
},
|
|
2605
|
-
on: {
|
|
2606
|
-
click: function(r) {
|
|
2607
|
-
e.box = !1;
|
|
2608
|
-
}
|
|
2609
|
-
}
|
|
2610
|
-
}, [e._v(" 取 消 ")])], 1)], 2)], 1)], 1) : e._e();
|
|
2611
|
-
}, rn = [];
|
|
2612
|
-
const on = {
|
|
2613
|
-
name: "DialogFilter",
|
|
2614
|
-
inject: ["crud"],
|
|
2615
|
-
data() {
|
|
2616
|
-
return {
|
|
2617
|
-
box: !1,
|
|
2618
|
-
columnObj: {},
|
|
2619
|
-
symbolDic: [
|
|
2620
|
-
{
|
|
2621
|
-
label: "=",
|
|
2622
|
-
value: "="
|
|
2623
|
-
},
|
|
2624
|
-
{
|
|
2625
|
-
label: "≠",
|
|
2626
|
-
value: "≠"
|
|
2627
|
-
},
|
|
2628
|
-
{
|
|
2629
|
-
label: "like",
|
|
2630
|
-
value: "like"
|
|
2631
|
-
},
|
|
2632
|
-
{
|
|
2633
|
-
label: ">",
|
|
2634
|
-
value: ">"
|
|
2635
|
-
},
|
|
2636
|
-
{
|
|
2637
|
-
label: "≥",
|
|
2638
|
-
value: "≥"
|
|
2639
|
-
},
|
|
2640
|
-
{
|
|
2641
|
-
label: "<",
|
|
2642
|
-
value: "<"
|
|
2643
|
-
},
|
|
2644
|
-
{
|
|
2645
|
-
label: "≤",
|
|
2646
|
-
value: "≤"
|
|
2647
|
-
},
|
|
2648
|
-
{
|
|
2649
|
-
label: "∈",
|
|
2650
|
-
value: "∈"
|
|
2651
|
-
}
|
|
2652
|
-
],
|
|
2653
|
-
list: [],
|
|
2654
|
-
columnOption: {}
|
|
2655
|
-
};
|
|
2656
|
-
},
|
|
2657
|
-
methods: {
|
|
2658
|
-
handleShow() {
|
|
2659
|
-
this.getColumnOption(), this.box = !0;
|
|
2660
|
-
},
|
|
2661
|
-
getColumnOption() {
|
|
2662
|
-
const e = [];
|
|
2663
|
-
f(this.crud.propOption).forEach((t) => {
|
|
2664
|
-
t.showColumn !== !1 && e.push(
|
|
2665
|
-
Object.assign(t, {
|
|
2666
|
-
value: t.prop
|
|
2667
|
-
})
|
|
2668
|
-
);
|
|
2669
|
-
}), this.columnOption = e, this.columnObj = this.columnOption[0];
|
|
2670
|
-
},
|
|
2671
|
-
handleDelete(e) {
|
|
2672
|
-
this.list.splice(e, 1);
|
|
2673
|
-
},
|
|
2674
|
-
handleClear() {
|
|
2675
|
-
this.list = [];
|
|
2676
|
-
},
|
|
2677
|
-
handleValueClear() {
|
|
2678
|
-
this.list.forEach((e) => {
|
|
2679
|
-
e.value = "";
|
|
2680
|
-
});
|
|
2681
|
-
},
|
|
2682
|
-
handleSubmit() {
|
|
2683
|
-
const e = [];
|
|
2684
|
-
this.list.forEach((n) => {
|
|
2685
|
-
e.push([n.text, n.symbol, n.value]);
|
|
2686
|
-
}), this.crud.$emit("filter", e), this.box = !1;
|
|
2687
|
-
},
|
|
2688
|
-
handleChange(e) {
|
|
2689
|
-
this.list[e].value = "";
|
|
2690
|
-
},
|
|
2691
|
-
handleAdd() {
|
|
2692
|
-
const e = this.columnObj.prop;
|
|
2693
|
-
this.list.push({
|
|
2694
|
-
text: e,
|
|
2695
|
-
value: "",
|
|
2696
|
-
symbol: this.symbolDic[0].value
|
|
2697
|
-
});
|
|
2698
|
-
}
|
|
2699
|
-
}
|
|
2700
|
-
}, K = {};
|
|
2701
|
-
var sn = /* @__PURE__ */ u(
|
|
2702
|
-
on,
|
|
2703
|
-
nn,
|
|
2704
|
-
rn,
|
|
2705
|
-
!1,
|
|
2706
|
-
ln,
|
|
2707
|
-
null,
|
|
2708
|
-
null,
|
|
2709
|
-
null
|
|
2710
|
-
);
|
|
2711
|
-
function ln(e) {
|
|
2712
|
-
for (let n in K)
|
|
2713
|
-
this[n] = K[n];
|
|
2714
|
-
}
|
|
2715
|
-
const an = /* @__PURE__ */ function() {
|
|
2716
|
-
return sn.exports;
|
|
2717
|
-
}();
|
|
2718
|
-
var Xn = function() {
|
|
2719
|
-
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
2720
|
-
return t("div", {
|
|
2721
|
-
staticClass: "avue-crud avue-crud--card"
|
|
2722
|
-
}, [e.tableOption.title ? t(e.tableOption.titleSize || "h2", {
|
|
2723
|
-
tag: "Component",
|
|
2724
|
-
style: e.tableOption.titleStyle
|
|
2725
|
-
}, [e._v(" " + e._s(e.tableOption.title) + " ")]) : e._e(), t(Ee, {
|
|
2726
|
-
ref: "headerSearch",
|
|
2727
|
-
scopedSlots: e._u([{
|
|
2728
|
-
key: "search",
|
|
2729
|
-
fn: function(r) {
|
|
2730
|
-
return [e._t("search", null, null, r)];
|
|
2731
|
-
}
|
|
2732
|
-
}, {
|
|
2733
|
-
key: "searchMenu",
|
|
2734
|
-
fn: function(r) {
|
|
2735
|
-
return [e._t("searchMenu", null, null, r)];
|
|
2736
|
-
}
|
|
2737
|
-
}, e._l(e.searchSlot, function(r) {
|
|
2738
|
-
return {
|
|
2739
|
-
key: r,
|
|
2740
|
-
fn: function(i) {
|
|
2741
|
-
return [e._t(r, null, null, i)];
|
|
2742
|
-
}
|
|
2743
|
-
};
|
|
2744
|
-
})], null, !0)
|
|
2745
|
-
}), e.optVal(e.tableOption.header, !0) ? t(Ue, {
|
|
2746
|
-
ref: "headerMenu",
|
|
2747
|
-
scopedSlots: e._u([{
|
|
2748
|
-
key: "menuLeft",
|
|
2749
|
-
fn: function(r) {
|
|
2750
|
-
return [e._t("menuLeft", null, null, r)];
|
|
2751
|
-
}
|
|
2752
|
-
}, {
|
|
2753
|
-
key: "menuRight",
|
|
2754
|
-
fn: function(r) {
|
|
2755
|
-
return [e._t("menuRight", null, null, r)];
|
|
2756
|
-
}
|
|
2757
|
-
}], null, !0)
|
|
2758
|
-
}) : e._e(), e.optVal(e.tableOption.tip, e.config.tip) && e.tableOption.selection ? t(Ce, {
|
|
2759
|
-
staticClass: "avue-crud__tip"
|
|
2760
|
-
}, [t("span", {
|
|
2761
|
-
staticClass: "avue-crud__tip-name"
|
|
2762
|
-
}, [e._v(" 当前表格已选择 "), t("span", {
|
|
2763
|
-
staticClass: "avue-crud__tip-count"
|
|
2764
|
-
}, [e._v(e._s(e.selectLen))]), e._v(" 项 ")]), e.optVal(e.tableOption.selectClearBtn, e.config.selectClearBtn) && e.tableOption.selection ? t(a, {
|
|
2765
|
-
directives: [{
|
|
2766
|
-
name: "permission",
|
|
2767
|
-
rawName: "v-permission",
|
|
2768
|
-
value: e.getPermission("selectClearBtn"),
|
|
2769
|
-
expression: "getPermission('selectClearBtn')"
|
|
2770
|
-
}],
|
|
2771
|
-
attrs: {
|
|
2772
|
-
type: "text",
|
|
2773
|
-
size: "small"
|
|
2774
|
-
},
|
|
2775
|
-
on: {
|
|
2776
|
-
click: e.selectClear
|
|
2777
|
-
}
|
|
2778
|
-
}, [e._v(" 清 空 ")]) : e._e(), e._t("tip")], 2) : e._e(), e._t("header"), t(Se, {
|
|
2779
|
-
ref: "cellForm",
|
|
2780
|
-
attrs: {
|
|
2781
|
-
model: e.cellForm,
|
|
2782
|
-
"show-message": !1
|
|
2783
|
-
},
|
|
2784
|
-
on: {
|
|
2785
|
-
validate: e.handleValidate
|
|
2786
|
-
}
|
|
2787
|
-
}, [t(X, {
|
|
2788
|
-
directives: [{
|
|
2789
|
-
name: "loading",
|
|
2790
|
-
rawName: "v-loading",
|
|
2791
|
-
value: e.tableLoading,
|
|
2792
|
-
expression: "tableLoading"
|
|
2793
|
-
}],
|
|
2794
|
-
key: e.reload,
|
|
2795
|
-
ref: "table",
|
|
2796
|
-
class: {
|
|
2797
|
-
"avue-crud--indeterminate": e.optVal(e.tableOption.indeterminate, !1)
|
|
2798
|
-
},
|
|
2799
|
-
attrs: {
|
|
2800
|
-
data: e.cellForm.list,
|
|
2801
|
-
"row-key": e.rowKey,
|
|
2802
|
-
size: e.$AVUE.tableSize || e.controlSize,
|
|
2803
|
-
lazy: e.optVal(e.tableOption.lazy, !1),
|
|
2804
|
-
load: e.treeLoad,
|
|
2805
|
-
"tree-props": e.treeProps,
|
|
2806
|
-
"expand-row-keys": e.tableOption.expandRowKeys,
|
|
2807
|
-
"default-expand-all": e.tableOption.defaultExpandAll,
|
|
2808
|
-
"highlight-current-row": e.tableOption.highlightCurrentRow,
|
|
2809
|
-
"show-summary": e.tableOption.showSummary,
|
|
2810
|
-
"summary-method": e.tableSummaryMethod,
|
|
2811
|
-
"span-method": e.tableSpanMethod,
|
|
2812
|
-
stripe: e.tableOption.stripe,
|
|
2813
|
-
"show-header": e.tableOption.showHeader,
|
|
2814
|
-
"default-sort": e.tableOption.defaultSort,
|
|
2815
|
-
"row-class-name": e.rowClassName,
|
|
2816
|
-
"cell-class-name": e.cellClassName,
|
|
2817
|
-
"row-style": e.rowStyle,
|
|
2818
|
-
"cell-style": e.cellStyle,
|
|
2819
|
-
fit: e.tableOption.fit,
|
|
2820
|
-
"header-cell-class-name": e.headerCellClassName,
|
|
2821
|
-
"max-height": e.isAutoHeight ? e.tableHeight : e.tableOption.maxHeight,
|
|
2822
|
-
height: e.tableHeight,
|
|
2823
|
-
width: e.setPx(e.tableOption.width, e.config.width),
|
|
2824
|
-
border: e.tableOption.border
|
|
2825
|
-
},
|
|
2826
|
-
on: {
|
|
2827
|
-
"current-change": e.currentRowChange,
|
|
2828
|
-
"expand-change": e.expandChange,
|
|
2829
|
-
"header-dragend": e.headerDragend,
|
|
2830
|
-
"row-click": e.rowClick,
|
|
2831
|
-
"row-dblclick": e.rowDblclick,
|
|
2832
|
-
"cell-mouse-enter": e.cellMouseEnter,
|
|
2833
|
-
"cell-mouse-leave": e.cellMouseLeave,
|
|
2834
|
-
"cell-click": e.cellClick,
|
|
2835
|
-
"header-click": e.headerClick,
|
|
2836
|
-
"row-contextmenu": e.rowContextmenu,
|
|
2837
|
-
"header-contextmenu": e.headerContextmenu,
|
|
2838
|
-
"cell-dblclick": e.cellDblclick,
|
|
2839
|
-
"filter-change": e.filterChange,
|
|
2840
|
-
"selection-change": e.selectionChange,
|
|
2841
|
-
select: e.select,
|
|
2842
|
-
"select-all": e.selectAll,
|
|
2843
|
-
"sort-change": e.sortChange
|
|
2844
|
-
},
|
|
2845
|
-
scopedSlots: e._u([{
|
|
2846
|
-
key: "empty",
|
|
2847
|
-
fn: function() {
|
|
2848
|
-
return [e.$slots.empty ? e._t("empty") : t(Be, {
|
|
2849
|
-
staticClass: "avue-crud__empty",
|
|
2850
|
-
attrs: {
|
|
2851
|
-
"image-size": 100,
|
|
2852
|
-
description: e.tableOption.emptyText
|
|
2853
|
-
}
|
|
2854
|
-
})];
|
|
2855
|
-
},
|
|
2856
|
-
proxy: !0
|
|
2857
|
-
}], null, !0)
|
|
2858
|
-
}, [t(pt, {
|
|
2859
|
-
attrs: {
|
|
2860
|
-
"column-option": e.columnOption
|
|
2861
|
-
},
|
|
2862
|
-
scopedSlots: e._u([{
|
|
2863
|
-
key: "header",
|
|
2864
|
-
fn: function() {
|
|
2865
|
-
return [t(bt, {
|
|
2866
|
-
ref: "columnDefault",
|
|
2867
|
-
scopedSlots: e._u([{
|
|
2868
|
-
key: "expand",
|
|
2869
|
-
fn: function(r) {
|
|
2870
|
-
var i = r.row, s = r.index;
|
|
2871
|
-
return [e._t("expand", null, {
|
|
2872
|
-
row: i,
|
|
2873
|
-
index: s
|
|
2874
|
-
})];
|
|
2875
|
-
}
|
|
2876
|
-
}], null, !0)
|
|
2877
|
-
})];
|
|
2878
|
-
},
|
|
2879
|
-
proxy: !0
|
|
2880
|
-
}, e._l(e.mainSlot, function(r) {
|
|
2881
|
-
return {
|
|
2882
|
-
key: r,
|
|
2883
|
-
fn: function(i) {
|
|
2884
|
-
return [e._t(r, null, null, i)];
|
|
2885
|
-
}
|
|
2886
|
-
};
|
|
2887
|
-
}), {
|
|
2888
|
-
key: "footer",
|
|
2889
|
-
fn: function() {
|
|
2890
|
-
return [t(Bt, {
|
|
2891
|
-
scopedSlots: e._u([{
|
|
2892
|
-
key: "menu",
|
|
2893
|
-
fn: function(r) {
|
|
2894
|
-
return [e._t("menu", null, null, r)];
|
|
2895
|
-
}
|
|
2896
|
-
}, {
|
|
2897
|
-
key: "menuBtn",
|
|
2898
|
-
fn: function(r) {
|
|
2899
|
-
return [e._t("menuBtn", null, null, r)];
|
|
2900
|
-
}
|
|
2901
|
-
}], null, !0)
|
|
2902
|
-
})];
|
|
2903
|
-
},
|
|
2904
|
-
proxy: !0
|
|
2905
|
-
}], null, !0)
|
|
2906
|
-
})], 1)], 1), e._t("footer"), t(It, {
|
|
2907
|
-
ref: "tablePage"
|
|
2908
|
-
}), t(Et, {
|
|
2909
|
-
ref: "dialogForm",
|
|
2910
|
-
scopedSlots: e._u([e._l(e.formSlot, function(r) {
|
|
2911
|
-
return {
|
|
2912
|
-
key: r,
|
|
2913
|
-
fn: function(i) {
|
|
2914
|
-
return [e._t(r, null, null, i)];
|
|
2915
|
-
}
|
|
2916
|
-
};
|
|
2917
|
-
}), {
|
|
2918
|
-
key: "menuForm",
|
|
2919
|
-
fn: function(r) {
|
|
2920
|
-
return [e._t("menuForm", null, null, r)];
|
|
2921
|
-
}
|
|
2922
|
-
}], null, !0)
|
|
2923
|
-
}), t(Nt, {
|
|
2924
|
-
ref: "dialogColumn"
|
|
2925
|
-
}), t(Gt, {
|
|
2926
|
-
ref: "dialogExcel"
|
|
2927
|
-
}), t(an, {
|
|
2928
|
-
ref: "dialogFilter"
|
|
2929
|
-
})], 2);
|
|
2930
|
-
}, Jn = [];
|
|
2931
|
-
export {
|
|
2932
|
-
Bt as C,
|
|
2933
|
-
an as D,
|
|
2934
|
-
Et as F,
|
|
2935
|
-
Ue as H,
|
|
2936
|
-
It as T,
|
|
2937
|
-
Gt as a,
|
|
2938
|
-
Nt as b,
|
|
2939
|
-
bt as c,
|
|
2940
|
-
pt as d,
|
|
2941
|
-
Ee as e,
|
|
2942
|
-
m as f,
|
|
2943
|
-
Xn as r,
|
|
2944
|
-
Jn as s
|
|
2945
|
-
};
|