@web-utils/component 4.0.15 → 4.0.16
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 +13 -15
- package/card/index.mjs +18 -20
- package/carousel/index.mjs +10 -12
- package/chat/index.mjs +45 -56
- package/chunk-file-uploader/index.mjs +36 -378
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/ElementBaseInfo.ZADwixb5.mjs +125 -0
- package/chunks/ElementForm.CQ3PN5qj.mjs +223 -0
- package/chunks/ElementListeners.De_PRuIm.mjs +215 -0
- package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +181 -0
- package/chunks/ElementOtherConfig.B1NfMTYh.mjs +60 -0
- package/chunks/ElementProperties.CosfDrlW.mjs +112 -0
- package/chunks/{ElementTaskConfig.AvBOzAni.mjs → ElementTaskConfig.Bko0kgTp.mjs} +55 -63
- package/chunks/FlowCondition.Y6qEYi1T.mjs +102 -0
- package/chunks/FormTemp.BQxO5IQq.mjs +123 -0
- package/chunks/SignalAndMessage.Bb5PFX0N.mjs +85 -0
- package/chunks/UserTaskListeners.Bv3BDfEI.mjs +169 -0
- package/chunks/{confirmable-mixin.BFZb6pcK.mjs → confirmable-mixin.B2TtLAdk.mjs} +1 -1
- package/chunks/core.0Exl13Mz.mjs +54 -0
- package/chunks/{dataformat.DJoNBlmI.mjs → dataformat.CpqOeGBl.mjs} +6 -6
- package/chunks/{dic.BinnDitI.mjs → dic.Dkl-leRW.mjs} +9 -9
- package/chunks/dictionary.DGt59Ir7.mjs +68 -0
- package/chunks/{event.DSlcqYHL.mjs → event.9aDS6jcw.mjs} +2 -2
- package/chunks/{form-input.BtS_J5a2.mjs → form-input.CvFdwlEV.mjs} +2 -2
- package/chunks/form-item.LWjePsPa.mjs +233 -0
- package/chunks/{index.CIfe3UB3.mjs → index.9OxHjTIE.mjs} +2 -2
- package/chunks/{index.Cn7aq-Et.mjs → index.B2TRddqf.mjs} +8 -8
- package/chunks/{init.xOlFpTyZ.mjs → init.DAsXSoLW.mjs} +2 -2
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{util.DI42t5GU.mjs → util.DqFv_pWg.mjs} +22 -22
- package/chunks/utilSelf.Csq1766E.mjs +48 -0
- package/chunks/utils.DRcxC1Fb.mjs +60 -0
- package/color-picker/index.mjs +22 -101
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/data-box/index.mjs +12 -15
- package/data-card/index.mjs +10 -12
- package/data-card-text/index.mjs +10 -12
- package/data-display/index.mjs +15 -17
- package/data-icons/index.mjs +13 -16
- package/data-imgtext/index.mjs +15 -18
- package/data-operatext/index.mjs +14 -16
- package/data-panel/index.mjs +13 -16
- package/data-pay/index.mjs +16 -20
- package/data-price/index.mjs +14 -16
- package/data-progress/index.mjs +13 -17
- package/data-rotate/index.mjs +12 -15
- package/data-table-picker/index.mjs +15 -18
- package/data-tabs/index.mjs +12 -15
- package/dialog-form/index.mjs +16 -18
- package/dynamic-table/index.mjs +25 -30
- package/editable-progress/index.mjs +9 -11
- package/editable-tree/index.mjs +52 -56
- package/egd-collapse-item/index.mjs +9 -9
- package/element-dialog/index.mjs +22 -23
- package/element-listeners/style.css +1 -0
- package/element-multi-instance/style.css +1 -0
- 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 +10 -11
- package/flow-designer/index.mjs +699 -1973
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +1 -1
- package/flow-viewer/index.mjs +9 -9
- package/form-block/index.mjs +32 -34
- package/form-cascader/index.mjs +23 -24
- package/form-checkbox/index.mjs +16 -17
- package/form-checkbox-group/index.mjs +20 -23
- package/form-date-picker/index.mjs +18 -20
- package/form-holder/index.mjs +13 -14
- package/form-input/index.mjs +14 -15
- package/form-input-cron-expression/index.mjs +19 -22
- package/form-input-email/index.mjs +15 -16
- package/form-input-id-card/index.mjs +12 -13
- package/form-input-number/index.mjs +16 -17
- package/form-input-phone-number/index.mjs +21 -22
- package/form-input-tag/index.mjs +14 -15
- package/form-input-time/index.mjs +14 -15
- package/form-item/index.mjs +140 -3
- package/form-item-group/index.mjs +28 -31
- package/form-radio-group/index.mjs +27 -28
- package/form-select/index.mjs +21 -23
- package/form-switch/index.mjs +16 -17
- package/form-table/index.mjs +16 -17
- package/form-table-plus/index.mjs +21 -22
- package/form-textarea/index.mjs +15 -16
- package/form-tree-select/index.mjs +14 -15
- package/form-tree-select-multiple/index.mjs +14 -15
- package/form-view/index.mjs +35 -39
- package/fy-array/index.mjs +33 -37
- package/fy-cascader/index.mjs +16 -17
- package/fy-checkbox/index.mjs +11 -13
- package/fy-code/index.mjs +10 -10
- package/fy-curd/index.mjs +1128 -1152
- package/fy-date/index.mjs +10 -11
- package/fy-draggable/index.mjs +9 -10
- package/fy-dynamic/index.mjs +22 -25
- package/fy-empty/index.mjs +1 -1
- package/fy-form/index.mjs +638 -15
- package/fy-form-design/index.mjs +1307 -1345
- package/fy-from/crud/zh.d.ts +6 -6
- package/fy-input/index.mjs +12 -14
- package/fy-input-color/index.mjs +13 -15
- package/fy-input-icon/index.mjs +20 -23
- package/fy-input-map/index.mjs +28 -31
- package/fy-input-number/index.mjs +9 -10
- package/fy-input-table/index.mjs +18 -22
- package/fy-input-tree/index.mjs +33 -37
- package/fy-progress/index.mjs +9 -10
- package/fy-radio/index.mjs +15 -16
- package/fy-rate/index.mjs +10 -11
- package/fy-select/index.mjs +25 -29
- package/fy-slider/index.mjs +11 -12
- package/fy-switch/index.mjs +9 -10
- package/fy-tabs/index.mjs +15 -17
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +18 -24
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +74 -76
- package/guide-steps/index.mjs +11 -13
- package/iframe-window/index.mjs +9 -10
- package/image-cropper/index.mjs +28 -30
- package/image-preview/index.mjs +12 -14
- package/index.mjs +72 -72
- package/input-number/index.mjs +13 -14
- package/input-number-range/index.mjs +11 -12
- package/license/index.mjs +1 -1
- package/login/index.mjs +21 -26
- package/nav-bar/index.mjs +9 -10
- package/notice/index.mjs +9 -10
- package/package.json +1 -1
- package/page-index/index.mjs +12 -13
- package/page-index-top/index.mjs +23 -28
- package/page-skeleton/index.mjs +14 -14
- package/page-skeleton-new/index.mjs +8 -9
- package/pageable-table/index.mjs +172 -182
- package/pageable-view/index.mjs +15 -16
- package/picker-table-view/index.mjs +49 -58
- package/present-view/index.mjs +35 -39
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/search/index.mjs +20 -22
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/skeleton-panel/index.mjs +9 -10
- package/split-pane/index.mjs +36 -37
- package/static-pageable-table/index.mjs +11 -13
- package/sub-table/index.mjs +36 -49
- package/sub-table-plus/index.mjs +229 -18
- package/swiper/index.mjs +11 -12
- package/table-column/index.mjs +223 -3
- package/table-view/index.mjs +52 -60
- package/tabs-view/index.mjs +17 -19
- package/tag-render/index.mjs +16 -18
- package/text-ellipsis/index.mjs +9 -10
- package/toolbar/index.mjs +13 -14
- package/toolbar-button/index.mjs +13 -14
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +259 -267
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +21 -24
- package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
- package/chunks/FyForm.DriwCJ7b.mjs +0 -765
- package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
- package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
- package/chunks/TableColumn.BzivvXMF.mjs +0 -337
package/fy-curd/index.mjs
CHANGED
|
@@ -1,318 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import k from "../
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import ie from "element-ui/lib/checkbox";
|
|
13
|
-
import _ from "element-ui/lib/table-column";
|
|
14
|
-
import M from "element-ui/lib/table";
|
|
15
|
-
import { isBlank as u } from "@web-utils/core";
|
|
16
|
-
import ne from "element-ui/lib/pagination";
|
|
17
|
-
import T from "element-ui/lib/card";
|
|
18
|
-
import x from "element-ui/lib/dropdown-item";
|
|
19
|
-
import re from "element-ui/lib/dropdown-menu";
|
|
20
|
-
import se from "element-ui/lib/dropdown";
|
|
21
|
-
import { p as B } from "../chunks/permission.CO31YIkD.mjs";
|
|
22
|
-
import E from "../icon-temp/index.mjs";
|
|
23
|
-
import oe from "../fy-rate/index.mjs";
|
|
24
|
-
import le from "element-ui/lib/link";
|
|
25
|
-
import ae from "element-ui/lib/tooltip";
|
|
26
|
-
import ce from "element-ui/lib/form-item";
|
|
27
|
-
import { s as ue } from "../chunks/dic.BinnDitI.mjs";
|
|
1
|
+
import { p as $ } from "../chunks/packages.ByyangTp.mjs";
|
|
2
|
+
import { p as x } from "../chunks/permission.CO31YIkD.mjs";
|
|
3
|
+
import { i as O } from "../chunks/init.DAsXSoLW.mjs";
|
|
4
|
+
import { g as F, f as k, t as I, c as E } from "../chunks/dataformat.CpqOeGBl.mjs";
|
|
5
|
+
import { o as h, j as C, d as a, u as B, D as b, k as P, i as D, l as T, s as z } from "../chunks/util.DqFv_pWg.mjs";
|
|
6
|
+
import { isBlank as c } from "@web-utils/core";
|
|
7
|
+
import { s as M } from "../chunks/slot.DXIbhGat.mjs";
|
|
8
|
+
import { n as f } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
9
|
+
import { F as L, d as w } from "../chunks/FormTemp.BQxO5IQq.mjs";
|
|
10
|
+
import { s as V } from "../chunks/dic.Dkl-leRW.mjs";
|
|
11
|
+
import R from "../icon-temp/index.mjs";
|
|
28
12
|
import "../icon-temp/style.css";
|
|
29
|
-
|
|
30
|
-
import pe from "element-ui/lib/form";
|
|
31
|
-
import he from "element-ui/lib/tag";
|
|
32
|
-
import me from "../fy-date/index.mjs";
|
|
33
|
-
import { s as fe } from "../chunks/slot.DXIbhGat.mjs";
|
|
34
|
-
import { d as ge, f as _e, t as be, b as ve } from "../chunks/dataformat.DJoNBlmI.mjs";
|
|
35
|
-
import { p as ye } from "../chunks/packages.ByyangTp.mjs";
|
|
36
|
-
import { i as xe } from "../chunks/init.xOlFpTyZ.mjs";
|
|
37
|
-
const $e = {
|
|
38
|
-
name: "DialogFilter",
|
|
39
|
-
inject: ["crud"],
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
box: !1,
|
|
43
|
-
columnObj: {},
|
|
44
|
-
symbolDic: [
|
|
45
|
-
{
|
|
46
|
-
label: "=",
|
|
47
|
-
value: "="
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
label: "≠",
|
|
51
|
-
value: "≠"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
label: "like",
|
|
55
|
-
value: "like"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: ">",
|
|
59
|
-
value: ">"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: "≥",
|
|
63
|
-
value: "≥"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
label: "<",
|
|
67
|
-
value: "<"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
label: "≤",
|
|
71
|
-
value: "≤"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
label: "∈",
|
|
75
|
-
value: "∈"
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
list: [],
|
|
79
|
-
columnOption: {}
|
|
80
|
-
};
|
|
81
|
-
},
|
|
82
|
-
methods: {
|
|
83
|
-
handleShow() {
|
|
84
|
-
this.getColumnOption(), this.box = !0;
|
|
85
|
-
},
|
|
86
|
-
getColumnOption() {
|
|
87
|
-
const t = [];
|
|
88
|
-
c(this.crud.propOption).forEach((i) => {
|
|
89
|
-
i.showColumn !== !1 && t.push(
|
|
90
|
-
Object.assign(i, {
|
|
91
|
-
value: i.prop
|
|
92
|
-
})
|
|
93
|
-
);
|
|
94
|
-
}), this.columnOption = t, this.columnObj = this.columnOption[0];
|
|
95
|
-
},
|
|
96
|
-
handleDelete(t) {
|
|
97
|
-
this.list.splice(t, 1);
|
|
98
|
-
},
|
|
99
|
-
handleClear() {
|
|
100
|
-
this.list = [];
|
|
101
|
-
},
|
|
102
|
-
handleValueClear() {
|
|
103
|
-
this.list.forEach((t) => {
|
|
104
|
-
t.value = "";
|
|
105
|
-
});
|
|
106
|
-
},
|
|
107
|
-
handleSubmit() {
|
|
108
|
-
const t = [];
|
|
109
|
-
this.list.forEach((e) => {
|
|
110
|
-
t.push([e.text, e.symbol, e.value]);
|
|
111
|
-
}), this.crud.$emit("filter", t), this.box = !1;
|
|
112
|
-
},
|
|
113
|
-
handleChange(t) {
|
|
114
|
-
this.list[t].value = "";
|
|
115
|
-
},
|
|
116
|
-
handleAdd() {
|
|
117
|
-
const t = this.columnObj.prop;
|
|
118
|
-
this.list.push({
|
|
119
|
-
text: t,
|
|
120
|
-
value: "",
|
|
121
|
-
symbol: this.symbolDic[0].value
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
var Ce = function() {
|
|
127
|
-
var e = this, i = e._self._c;
|
|
128
|
-
return e.box ? i("div", [i(I, { staticClass: "avue-dialog", class: ["avue-crud__dialog", "avue-crud__filter"], attrs: { "lock-scroll": "", "append-to-body": "", title: "过滤条件", size: e.crud.isMobile ? "100%" : "60%", visible: e.box }, on: { "update:visible": function(n) {
|
|
129
|
-
e.box = n;
|
|
130
|
-
} } }, [i(J, { attrs: { span: 24 } }, [i("div", { staticClass: "avue-crud__filter-menu" }, [i(X, [i(l, { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleAdd } }, [e._v(" 新增条件 ")]), i(l, { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleClear } }, [e._v(" 清空条件 ")]), i(l, { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleValueClear } }, [e._v(" 清空数据 ")])], 1)], 1), e._l(e.list, function(n, r) {
|
|
131
|
-
return i(F, { key: r, staticClass: "avue-crud__filter-item", attrs: { md: 12, xs: 24, sm: 12 } }, [i(k, { staticClass: "avue-crud__filter-label", attrs: { dic: e.columnOption, clearable: !1, size: e.crud.isMediumSize }, on: { change: function(s) {
|
|
132
|
-
return e.handleChange(r);
|
|
133
|
-
} }, model: { value: n.text, callback: function(s) {
|
|
134
|
-
e.$set(n, "text", s);
|
|
135
|
-
}, expression: "column.text" } }), i(k, { staticClass: "avue-crud__filter-symbol", attrs: { dic: e.symbolDic, clearable: !1, size: e.crud.isMediumSize }, model: { value: n.symbol, callback: function(s) {
|
|
136
|
-
e.$set(n, "symbol", s);
|
|
137
|
-
}, expression: "column.symbol" } }), i(q, { staticClass: "avue-crud__filter-value", attrs: { size: e.crud.isMediumSize }, model: { value: n.value, callback: function(s) {
|
|
138
|
-
e.$set(n, "value", s);
|
|
139
|
-
}, expression: "column.value" } }), i(l, { staticClass: "avue-crud__filter-icon", attrs: { type: "danger", size: "mini", circle: "", icon: "el-icon-minus" }, on: { click: function(s) {
|
|
140
|
-
return e.handleDelete(r);
|
|
141
|
-
} } })], 1);
|
|
142
|
-
}), i(F, { staticClass: "avue-form__menu avue-form__menu--right", attrs: { span: 24 } }, [i(l, { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleSubmit } }, [e._v(" 确 定 ")]), i(l, { attrs: { size: e.crud.isMediumSize }, on: { click: function(n) {
|
|
143
|
-
e.box = !1;
|
|
144
|
-
} } }, [e._v(" 取 消 ")])], 1)], 2)], 1)], 1) : e._e();
|
|
145
|
-
}, we = [], Se = /* @__PURE__ */ g(
|
|
146
|
-
$e,
|
|
147
|
-
Ce,
|
|
148
|
-
we,
|
|
149
|
-
!1,
|
|
150
|
-
null,
|
|
151
|
-
null
|
|
152
|
-
);
|
|
153
|
-
const L = Se.exports, Oe = {
|
|
154
|
-
name: "DialogExcel",
|
|
155
|
-
inject: ["crud"],
|
|
156
|
-
data() {
|
|
157
|
-
return {
|
|
158
|
-
option: {},
|
|
159
|
-
columnOption: {},
|
|
160
|
-
box: !1,
|
|
161
|
-
form: {
|
|
162
|
-
name: this.crud.tableOption.title
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
},
|
|
166
|
-
methods: {
|
|
167
|
-
handleShow() {
|
|
168
|
-
this.getColumnOption(), this.getOption(), this.box = !0;
|
|
169
|
-
},
|
|
170
|
-
handleSubmit() {
|
|
171
|
-
this.$Export.excel({
|
|
172
|
-
title: this.form.name,
|
|
173
|
-
columns: this.getColumn(),
|
|
174
|
-
data: this.handleSum()
|
|
175
|
-
}), this.box = !1;
|
|
176
|
-
},
|
|
177
|
-
// 计算统计
|
|
178
|
-
handleSum() {
|
|
179
|
-
const t = this.crud.tableOption, e = this.crud.propOption, i = this.form.type ? this.crud.list : this.crud.tableSelect, n = [];
|
|
180
|
-
return this.form.params.includes("data") && i.forEach((r) => {
|
|
181
|
-
const s = c(r);
|
|
182
|
-
e.forEach((o) => {
|
|
183
|
-
const a = o.parentProp ? (this.crud.cascaderDIC[o.$index] || {})[o.prop] : this.crud.DIC[o.prop];
|
|
184
|
-
s[o.prop] = D(s, o, t, a);
|
|
185
|
-
}), n.push(s);
|
|
186
|
-
}), this.form.params.includes("sum") && t.showSummary && n.push(this.crud.sumsList), n;
|
|
187
|
-
},
|
|
188
|
-
getOption() {
|
|
189
|
-
this.option = {
|
|
190
|
-
submitBtn: !1,
|
|
191
|
-
emptyBtn: !1,
|
|
192
|
-
column: [
|
|
193
|
-
{
|
|
194
|
-
label: "文件名",
|
|
195
|
-
prop: "name",
|
|
196
|
-
span: 24
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
label: "选择数据",
|
|
200
|
-
prop: "type",
|
|
201
|
-
span: 24,
|
|
202
|
-
type: "select",
|
|
203
|
-
dicData: [
|
|
204
|
-
{
|
|
205
|
-
label: "当前数据(当前页全部的数据)",
|
|
206
|
-
value: !0
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
label: "选中的数据(当前页选中的数据)",
|
|
210
|
-
disabled: this.crud.tableOption.selection !== !0,
|
|
211
|
-
value: !1
|
|
212
|
-
}
|
|
213
|
-
]
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
label: "选择字段",
|
|
217
|
-
prop: "prop",
|
|
218
|
-
type: "tree",
|
|
219
|
-
multiple: !0,
|
|
220
|
-
checkStrictly: !0,
|
|
221
|
-
span: 24,
|
|
222
|
-
props: {
|
|
223
|
-
value: "prop"
|
|
224
|
-
},
|
|
225
|
-
dicData: this.columnOption
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
label: "参数设置",
|
|
229
|
-
prop: "params",
|
|
230
|
-
type: "checkbox",
|
|
231
|
-
span: 24,
|
|
232
|
-
value: ["header", "data"].concat(
|
|
233
|
-
(() => {
|
|
234
|
-
const t = [];
|
|
235
|
-
return this.crud.isHeader && t.push("headers"), this.crud.isShowSummary && t.push("sum"), t;
|
|
236
|
-
})()
|
|
237
|
-
),
|
|
238
|
-
dicData: [
|
|
239
|
-
{
|
|
240
|
-
label: "表头",
|
|
241
|
-
disabled: !0,
|
|
242
|
-
value: "header"
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
label: "数据源",
|
|
246
|
-
value: "data"
|
|
247
|
-
}
|
|
248
|
-
].concat(
|
|
249
|
-
(() => {
|
|
250
|
-
const t = [];
|
|
251
|
-
return t.push({
|
|
252
|
-
label: "复杂表头",
|
|
253
|
-
value: "headers",
|
|
254
|
-
disabled: !this.crud.isHeader
|
|
255
|
-
}), t.push({
|
|
256
|
-
label: "合计统计",
|
|
257
|
-
value: "sum",
|
|
258
|
-
disabled: !this.crud.isShowSummary
|
|
259
|
-
}), t;
|
|
260
|
-
})()
|
|
261
|
-
)
|
|
262
|
-
}
|
|
263
|
-
]
|
|
264
|
-
}, this.form.type = this.crud.selectLen === 0;
|
|
265
|
-
},
|
|
266
|
-
getColumnOption() {
|
|
267
|
-
const t = c(this.crud.columnOption), e = [], i = (n = []) => {
|
|
268
|
-
n.forEach((r, s) => {
|
|
269
|
-
const o = r.children;
|
|
270
|
-
o && !Array.isArray(o) ? delete r.children : r.showColumn === !1 ? n.splice(s, 1) : (e.push(r.prop), r.children && i(o));
|
|
271
|
-
});
|
|
272
|
-
};
|
|
273
|
-
i(t), this.columnOption = t, this.form.prop = e;
|
|
274
|
-
},
|
|
275
|
-
getColumn() {
|
|
276
|
-
const t = c(this.columnOption), e = this.$refs.form.getPropRef("prop").$refs.temp.getHalfList();
|
|
277
|
-
if (!this.form.params) return [];
|
|
278
|
-
if (this.form.params.includes("headers")) {
|
|
279
|
-
const i = (n = []) => {
|
|
280
|
-
n.forEach((r, s) => {
|
|
281
|
-
e.includes(r.prop) ? r.children && i(r.children) : n.splice(s, 1);
|
|
282
|
-
});
|
|
283
|
-
};
|
|
284
|
-
return i(t), t;
|
|
285
|
-
} else {
|
|
286
|
-
const i = [], n = (r = []) => {
|
|
287
|
-
r.forEach((s) => {
|
|
288
|
-
s.children ? n(s.children) : e.includes(s.prop) && i.push(s);
|
|
289
|
-
});
|
|
290
|
-
};
|
|
291
|
-
return n(t), i;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
var Be = function() {
|
|
297
|
-
var e = this, i = e._self._c;
|
|
298
|
-
return e.box ? i("div", [i(te, { staticClass: "avue-dialog", attrs: { title: "导出", "lock-scroll": "", visible: e.box, width: e.crud.isMobile ? "100%" : "30%" }, on: { "update:visible": function(n) {
|
|
299
|
-
e.box = n;
|
|
300
|
-
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
301
|
-
return [i("span", { staticClass: "dialog-footer" }, [i(l, { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleSubmit } }, [e._v("确定")]), i(l, { attrs: { size: e.crud.isMediumSize }, on: { click: function(n) {
|
|
302
|
-
e.box = !1;
|
|
303
|
-
} } }, [e._v("取消")])], 1)];
|
|
304
|
-
}, proxy: !0 }], null, !1, 2375905330) }, [i(O, { attrs: { option: e.option }, model: { value: e.form, callback: function(n) {
|
|
305
|
-
e.form = n;
|
|
306
|
-
}, expression: "form" } })], 1)], 1) : e._e();
|
|
307
|
-
}, Fe = [], ke = /* @__PURE__ */ g(
|
|
308
|
-
Oe,
|
|
309
|
-
Be,
|
|
310
|
-
Fe,
|
|
311
|
-
!1,
|
|
312
|
-
null,
|
|
313
|
-
null
|
|
314
|
-
);
|
|
315
|
-
const V = ke.exports, h = {
|
|
13
|
+
const p = {
|
|
316
14
|
menuWidth: 220,
|
|
317
15
|
menuFixed: "right",
|
|
318
16
|
menuXsWidth: 100,
|
|
@@ -381,254 +79,633 @@ const V = ke.exports, h = {
|
|
|
381
79
|
dropRowClass: ".el-table__body-wrapper > table > tbody",
|
|
382
80
|
dropColClass: ".el-table__header-wrapper tr",
|
|
383
81
|
ghostClass: "avue-crud__ghost"
|
|
384
|
-
},
|
|
385
|
-
name: "
|
|
82
|
+
}, A = {
|
|
83
|
+
name: "HeaderSearch",
|
|
84
|
+
mixins: [M],
|
|
386
85
|
inject: ["crud"],
|
|
86
|
+
props: {
|
|
87
|
+
search: Object
|
|
88
|
+
},
|
|
387
89
|
data() {
|
|
388
90
|
return {
|
|
389
|
-
|
|
390
|
-
|
|
91
|
+
show: !1,
|
|
92
|
+
searchIndex: 2,
|
|
93
|
+
searchShow: !0
|
|
391
94
|
};
|
|
392
95
|
},
|
|
393
96
|
computed: {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
97
|
+
searchForm: {
|
|
98
|
+
get() {
|
|
99
|
+
return this.crud.search;
|
|
100
|
+
},
|
|
101
|
+
set(t) {
|
|
102
|
+
this.crud.$emit("update:search", t);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
option() {
|
|
106
|
+
const t = this.crud.option, e = (n = []) => {
|
|
107
|
+
n = a(n);
|
|
108
|
+
const r = [];
|
|
109
|
+
let s = 0;
|
|
110
|
+
return n = n.sort((l, o) => (o.searchOrder || 0) - (l.searchOrder || 0)), n.forEach((l) => {
|
|
111
|
+
if (l.search) {
|
|
112
|
+
const o = s < this.searchIndex, m = {};
|
|
113
|
+
Object.keys(l).forEach((u) => {
|
|
114
|
+
const g = "search";
|
|
115
|
+
if (u !== "searchProp" && u.includes(g)) {
|
|
116
|
+
let d = u.replace(g, "");
|
|
117
|
+
if (d.length === 0) return;
|
|
118
|
+
d = d.replace(d[0], d[0].toLowerCase()), m[d] = l[u];
|
|
119
|
+
}
|
|
120
|
+
}), l = Object.assign(l, m, {
|
|
121
|
+
type: F(l),
|
|
122
|
+
detail: !1,
|
|
123
|
+
dicFlag: l.cascader ? !0 : h(l.dicFlag, !1),
|
|
124
|
+
span: l.searchSpan || t.searchSpan || p.searchSpan,
|
|
125
|
+
control: l.searchControl,
|
|
126
|
+
gutter: l.searchGutter || t.searchGutter || p.searchGutter,
|
|
127
|
+
labelWidth: l.searchLabelWidth || t.searchLabelWidth || p.searchLabelWidth,
|
|
128
|
+
labelPosition: l.searchLabelPosition || t.searchLabelPosition,
|
|
129
|
+
size: l.searchSize || t.searchSize,
|
|
130
|
+
value: l.searchValue,
|
|
131
|
+
rules: l.searchRules,
|
|
132
|
+
row: l.searchRow,
|
|
133
|
+
bind: l.searchBin,
|
|
134
|
+
disabled: l.searchDisabled,
|
|
135
|
+
readonly: l.searchReadonly,
|
|
136
|
+
display: this.isSearchIcon ? this.show ? !0 : o : !0
|
|
137
|
+
}), r.push(l), s = s + 1;
|
|
138
|
+
}
|
|
139
|
+
}), r;
|
|
140
|
+
};
|
|
141
|
+
return ((n) => {
|
|
142
|
+
let r = a(n);
|
|
143
|
+
return r.column = e(this.crud.propOption), r = Object.assign(r, {
|
|
144
|
+
rowKey: t.searchRowKey || "null",
|
|
145
|
+
tabs: !1,
|
|
146
|
+
group: !1,
|
|
147
|
+
printBtn: !1,
|
|
148
|
+
mockBtn: !1,
|
|
149
|
+
filterDic: t.searchFilterDic,
|
|
150
|
+
filterNull: t.searchFilterNull,
|
|
151
|
+
filterParam: t.searchFilterParam,
|
|
152
|
+
enter: t.searchEnter,
|
|
153
|
+
size: t.searchSize,
|
|
154
|
+
submitText: t.searchBtnText || "搜 索",
|
|
155
|
+
submitBtn: h(t.searchBtn, p.searchSubBtn),
|
|
156
|
+
submitIcon: this.crud.getBtnIcon("searchBtn"),
|
|
157
|
+
emptyText: t.emptyBtnText || "清 空",
|
|
158
|
+
emptyBtn: h(t.emptyBtn, p.emptyBtn),
|
|
159
|
+
emptyIcon: this.crud.getBtnIcon("emptyBtn"),
|
|
160
|
+
menuSpan: this.show || !this.isSearchIcon || t.searchMenuSpan < 6 ? t.searchMenuSpan : 6,
|
|
161
|
+
menuPosition: t.searchMenuPosition || "center",
|
|
162
|
+
dicFlag: !1,
|
|
163
|
+
dicData: this.crud.DIC
|
|
164
|
+
}), r;
|
|
165
|
+
})(t);
|
|
166
|
+
},
|
|
167
|
+
isSearchIcon() {
|
|
168
|
+
return h(this.crud.option.searchIcon, this.$AVUE.searchIcon) && this.searchLen > this.searchIndex;
|
|
169
|
+
},
|
|
170
|
+
searchLen() {
|
|
171
|
+
let t = 0;
|
|
172
|
+
return this.crud.propOption.forEach((e) => {
|
|
173
|
+
e.search && t++;
|
|
174
|
+
}), t;
|
|
175
|
+
},
|
|
176
|
+
searchFlag() {
|
|
177
|
+
return !!this.crud.$scopedSlots.search || this.searchLen !== 0;
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
watch: {
|
|
181
|
+
"crud.propOption": {
|
|
182
|
+
handler() {
|
|
183
|
+
this.dataFormat();
|
|
184
|
+
},
|
|
185
|
+
deep: !0
|
|
186
|
+
},
|
|
187
|
+
show() {
|
|
188
|
+
this.crud.getTableHeight();
|
|
189
|
+
},
|
|
190
|
+
searchShow() {
|
|
191
|
+
this.crud.getTableHeight();
|
|
192
|
+
},
|
|
193
|
+
option: {
|
|
194
|
+
immediate: !0,
|
|
195
|
+
deep: !0,
|
|
196
|
+
handler() {
|
|
197
|
+
var t;
|
|
198
|
+
this.searchIndex = ((t = this.option) == null ? void 0 : t.searchIndex) || 2;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
created() {
|
|
203
|
+
this.initFun(), this.dataFormat();
|
|
204
|
+
},
|
|
205
|
+
methods: {
|
|
206
|
+
initFun() {
|
|
207
|
+
["searchReset", "searchChange"].forEach((t) => {
|
|
208
|
+
this.crud[t] = this[t];
|
|
209
|
+
});
|
|
210
|
+
},
|
|
211
|
+
getSlotName(t) {
|
|
212
|
+
return t.replace("Search", "");
|
|
213
|
+
},
|
|
214
|
+
// 搜索回调
|
|
215
|
+
searchChange(t, e) {
|
|
216
|
+
t = C(t), this.crud.propOption.forEach((i) => {
|
|
217
|
+
i.searchProp && (t[i.searchProp] = t[i.prop], delete t[i.prop]);
|
|
218
|
+
}), this.crud.$emit("search-change", t, e);
|
|
219
|
+
},
|
|
220
|
+
// 搜索清空
|
|
221
|
+
resetChange() {
|
|
222
|
+
this.crud.$emit("search-reset", this.searchForm);
|
|
223
|
+
},
|
|
224
|
+
// 搜索清空
|
|
225
|
+
searchReset() {
|
|
226
|
+
this.$refs.form.resetForm();
|
|
227
|
+
},
|
|
228
|
+
handleSearchShow() {
|
|
229
|
+
this.searchShow = !this.searchShow;
|
|
230
|
+
},
|
|
231
|
+
dataFormat() {
|
|
232
|
+
const t = this.crud.option;
|
|
233
|
+
this.searchShow = h(t.searchShow, p.searchShow);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
var H = function() {
|
|
238
|
+
var e = this, i = e._self._c;
|
|
239
|
+
return e.searchFlag ? i("ElCard", { directives: [{ name: "show", rawName: "v-show", value: e.searchShow && e.searchFlag, expression: "searchShow && searchFlag" }], staticClass: "avue-crud__search", attrs: { shadow: e.crud.isCard } }, [e._t("search", null, { row: e.searchForm, search: e.searchForm, size: e.crud.controlSize }), i("FyForm", { ref: "form", attrs: { option: e.option }, on: { submit: e.searchChange, "reset-change": e.resetChange }, scopedSlots: e._u([{ key: "menuForm", fn: function(n) {
|
|
240
|
+
return [e._t(
|
|
241
|
+
"searchMenu",
|
|
242
|
+
null,
|
|
243
|
+
null,
|
|
244
|
+
Object.assign(n, {
|
|
245
|
+
search: e.searchForm,
|
|
246
|
+
row: e.searchForm
|
|
247
|
+
})
|
|
248
|
+
), e.isSearchIcon ? [e.show === !1 ? i("ElButton", { attrs: { type: "text", icon: "el-icon-arrow-down" }, on: { click: function(r) {
|
|
249
|
+
e.show = !0;
|
|
250
|
+
} } }, [e._v(" 展 开 ")]) : e._e(), e.show === !0 ? i("ElButton", { attrs: { type: "text", icon: "el-icon-arrow-up" }, on: { click: function(r) {
|
|
251
|
+
e.show = !1;
|
|
252
|
+
} } }, [e._v(" 收 缩 ")]) : e._e()] : e._e()];
|
|
253
|
+
} }, e._l(e.crud.searchSlot, function(n) {
|
|
254
|
+
return { key: e.getSlotName(n), fn: function(r) {
|
|
255
|
+
return [e._t(
|
|
256
|
+
n,
|
|
257
|
+
null,
|
|
258
|
+
null,
|
|
259
|
+
Object.assign(r, {
|
|
260
|
+
search: e.searchForm,
|
|
261
|
+
row: e.searchForm
|
|
262
|
+
})
|
|
263
|
+
)];
|
|
264
|
+
} };
|
|
265
|
+
})], null, !0), model: { value: e.searchForm, callback: function(n) {
|
|
266
|
+
e.searchForm = n;
|
|
267
|
+
}, expression: "searchForm" } })], 2) : e._e();
|
|
268
|
+
}, N = [], j = /* @__PURE__ */ f(
|
|
269
|
+
A,
|
|
270
|
+
H,
|
|
271
|
+
N,
|
|
272
|
+
!1,
|
|
273
|
+
null,
|
|
274
|
+
null
|
|
275
|
+
);
|
|
276
|
+
const W = j.exports, K = {
|
|
277
|
+
name: "HeaderMenu",
|
|
278
|
+
directives: {
|
|
279
|
+
permission: x
|
|
280
|
+
},
|
|
281
|
+
inject: ["crud"],
|
|
282
|
+
data() {
|
|
283
|
+
return {
|
|
284
|
+
dateCreate: !1,
|
|
285
|
+
pickerOptions: {
|
|
286
|
+
shortcuts: [
|
|
287
|
+
{
|
|
288
|
+
text: "今日",
|
|
289
|
+
onClick(t) {
|
|
290
|
+
const e = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
|
|
291
|
+
i.setTime(i.getTime()), t.$emit("pick", [i, e]);
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
text: "昨日",
|
|
296
|
+
onClick(t) {
|
|
297
|
+
const e = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
|
|
298
|
+
i.setTime(i.getTime() - 3600 * 1e3 * 24 * 1), t.$emit("pick", [i, e]);
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
text: "最近一周",
|
|
303
|
+
onClick(t) {
|
|
304
|
+
const e = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
|
|
305
|
+
i.setTime(i.getTime() - 3600 * 1e3 * 24 * 7), t.$emit("pick", [i, e]);
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
text: "最近一个月",
|
|
310
|
+
onClick(t) {
|
|
311
|
+
const e = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
|
|
312
|
+
i.setTime(i.getTime() - 3600 * 1e3 * 24 * 30), t.$emit("pick", [i, e]);
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
text: "最近三个月",
|
|
317
|
+
onClick(t) {
|
|
318
|
+
const e = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
|
|
319
|
+
i.setTime(i.getTime() - 3600 * 1e3 * 24 * 90), t.$emit("pick", [i, e]);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
config: p
|
|
325
|
+
};
|
|
326
|
+
},
|
|
327
|
+
created() {
|
|
328
|
+
this.initFun();
|
|
329
|
+
},
|
|
330
|
+
methods: {
|
|
331
|
+
optVal: h,
|
|
332
|
+
// 日期组件回调
|
|
333
|
+
dateChange(t) {
|
|
334
|
+
this.dateCreate ? this.crud.$emit("date-change", t) : this.dateCreate = !0;
|
|
335
|
+
},
|
|
336
|
+
initFun() {
|
|
337
|
+
this.crud.rowExcel = this.rowExcel, this.crud.rowPrint = this.rowPrint;
|
|
338
|
+
},
|
|
339
|
+
rowExcel() {
|
|
340
|
+
this.crud.$refs.dialogExcel.handleShow();
|
|
341
|
+
},
|
|
342
|
+
rowPrint() {
|
|
343
|
+
this.$Print(this.crud.$refs.table);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
var U = function() {
|
|
348
|
+
var e = this, i = e._self._c;
|
|
349
|
+
return i("div", { staticClass: "avue-crud__menu" }, [e.optVal(e.crud.tableOption.menuLeft, !0) ? i("div", { staticClass: "avue-crud__left" }, [e.optVal(e.crud.tableOption.addBtn, e.config.addBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("addBtn"), expression: "crud.getPermission('addBtn')" }], attrs: { type: "primary", icon: e.crud.getBtnIcon("addBtn"), size: e.crud.isMediumSize }, on: { click: e.crud.rowAdd } }, [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) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("addRowBtn"), expression: "crud.getPermission('addRowBtn')" }], attrs: { type: "primary", icon: e.crud.getBtnIcon("addBtn"), size: e.crud.isMediumSize }, on: { click: e.crud.rowCellAdd } }, [e.crud.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("addBtn")) + " ")]], 2) : e._e(), e._t("menuLeft", null, { size: e.crud.isMediumSize })], 2) : e._e(), e.optVal(e.crud.tableOption.menuRight, !0) ? i("div", { staticClass: "avue-crud__right" }, [e.optVal(e.crud.tableOption.dateBtn, e.config.dateBtn) ? i("FyDate", { staticStyle: { display: "inline-block", "margin-right": "20px" }, attrs: { type: "datetimerange", "value-format": "yyyy-MM-dd HH:mm:ss", format: "yyyy-MM-dd HH:mm:ss", "picker-options": e.pickerOptions, size: e.crud.isMediumSize }, on: { change: e.dateChange } }) : e._e(), e._t("menuRight", null, { size: e.crud.isMediumSize }), e.optVal(e.crud.tableOption.excelBtn, e.config.excelBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("excelBtn"), expression: "crud.getPermission('excelBtn')" }], attrs: { icon: e.crud.getBtnIcon("excelBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: e.rowExcel } }) : e._e(), e.optVal(e.crud.tableOption.printBtn, e.config.printBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("printBtn"), expression: "crud.getPermission('printBtn')" }], attrs: { icon: e.crud.getBtnIcon("printBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: e.rowPrint } }) : e._e(), e.optVal(e.crud.tableOption.refreshBtn, e.config.refreshBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("refreshBtn"), expression: "crud.getPermission('refreshBtn')" }], attrs: { icon: e.crud.getBtnIcon("refreshBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: e.crud.refreshChange } }) : e._e(), e.optVal(e.crud.tableOption.columnBtn, e.config.columnBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("columnBtn"), expression: "crud.getPermission('columnBtn')" }], attrs: { icon: e.crud.getBtnIcon("columnBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: function(n) {
|
|
350
|
+
return e.crud.$refs.dialogColumn.handleShow();
|
|
351
|
+
} } }) : e._e(), (e.crud.$refs.headerSearch || {}).searchFlag && e.optVal(e.crud.tableOption.searchShowBtn, !0) ? i("ElButton", { attrs: { icon: e.crud.getBtnIcon("searchBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: function(n) {
|
|
352
|
+
return e.crud.$refs.headerSearch.handleSearchShow();
|
|
353
|
+
} } }) : e._e(), e.optVal(e.crud.tableOption.filterBtn, e.config.filterBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("filterBtn"), expression: "crud.getPermission('filterBtn')" }], attrs: { icon: e.crud.getBtnIcon("filterBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: function(n) {
|
|
354
|
+
return e.crud.$refs.dialogFilter.handleShow();
|
|
355
|
+
} } }) : e._e()], 2) : e._e()]);
|
|
356
|
+
}, G = [], q = /* @__PURE__ */ f(
|
|
357
|
+
K,
|
|
358
|
+
U,
|
|
359
|
+
G,
|
|
360
|
+
!1,
|
|
361
|
+
null,
|
|
362
|
+
null
|
|
363
|
+
);
|
|
364
|
+
const X = q.exports, y = {}, J = {
|
|
365
|
+
name: "ColumnSlot",
|
|
366
|
+
components: { IconTemp: R, FormTemp: L },
|
|
367
|
+
inject: ["dynamic", "crud"],
|
|
368
|
+
props: {
|
|
369
|
+
column: Object,
|
|
370
|
+
columnOption: Array
|
|
371
|
+
},
|
|
372
|
+
created() {
|
|
373
|
+
const t = ["getColumnProp", "handleFilterMethod", "handleFilters"];
|
|
374
|
+
Object.keys(this.dynamic).forEach((e) => {
|
|
375
|
+
t.includes(e) && (this[e] = this.dynamic[e]);
|
|
376
|
+
});
|
|
377
|
+
},
|
|
378
|
+
methods: {
|
|
379
|
+
isBlank: c,
|
|
380
|
+
optVal: h,
|
|
381
|
+
uploadFun: B,
|
|
382
|
+
isMediaType(t, e) {
|
|
383
|
+
return D(t, e);
|
|
384
|
+
},
|
|
385
|
+
vaildLabel(t, e, i) {
|
|
386
|
+
if (t.rules && e.$cellEdit)
|
|
387
|
+
return i;
|
|
388
|
+
},
|
|
389
|
+
columnChange(t, e, i) {
|
|
390
|
+
const n = `${i}-${e.prop}`;
|
|
391
|
+
y[n] || (this.handleChange(e, t), typeof e.change == "function" && e.cell === !0 && e.change({ row: t, column: e, index: i, value: t[e.prop] })), y[n] = !0, this.$nextTick(() => {
|
|
392
|
+
y[n] = !1;
|
|
393
|
+
});
|
|
394
|
+
},
|
|
395
|
+
handleChange(t, e) {
|
|
396
|
+
t.cascader && this.$nextTick(() => {
|
|
397
|
+
const i = t.cascader;
|
|
398
|
+
i.forEach((n) => {
|
|
399
|
+
const r = n, s = e[t.prop], l = e.$index, o = this.findObject(this.columnOption, r);
|
|
400
|
+
c(o) || (c(this.crud.cascaderDIC[l]) && this.$set(this.crud.cascaderDIC, l, {}), this.crud.cascaderIndexList.includes(l) && i.forEach((m) => {
|
|
401
|
+
this.$set(this.crud.cascaderDIC[l], m.prop, []), i.forEach((u) => e[u] = "");
|
|
402
|
+
}), !(c(i) || c(s) || c(o)) && V({
|
|
403
|
+
column: o,
|
|
404
|
+
value: s,
|
|
405
|
+
form: e
|
|
406
|
+
}).then((m) => {
|
|
407
|
+
const u = m || [];
|
|
408
|
+
this.crud.cascaderIndexList.includes(l) || this.crud.cascaderIndexList.push(l), this.crud.cascaderDicList[l] || this.$set(this.crud.cascaderDicList, l, {}), this.crud.cascaderDicList[l][r] || this.$set(this.crud.cascaderDicList[l], r, u), this.$set(this.crud.cascaderDIC[l], r, u), !c(u[o.cascaderIndex]) && !c(u) && !c(o.cascaderIndex) && (e[r] = u[o.cascaderIndex][(o.props || {}).value || b.value]);
|
|
409
|
+
}));
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
},
|
|
413
|
+
handleDetail(t, e) {
|
|
414
|
+
const i = e.parentProp ? (this.crud.cascaderDIC[t.$index] || {})[e.prop] : this.crud.DIC[e.prop], n = w(t, e, this.crud.tableOption, i);
|
|
415
|
+
return !c(i) && this.crud.tableOption.filterDic !== !0 && (t[`$${e.prop}`] = n), n;
|
|
416
|
+
},
|
|
417
|
+
corArray(t, e) {
|
|
418
|
+
let i = this.handleDetail(t, e);
|
|
419
|
+
return Array.isArray(i) || (i = c(i) ? [] : i.split(P)), a(i);
|
|
420
|
+
},
|
|
421
|
+
openImg(t, e, i) {
|
|
422
|
+
let n = this.getImgList(t, e);
|
|
423
|
+
n = n.map((r) => ({ thumbUrl: r, url: r, type: e.fileType })), this.$ImagePreview(n, i);
|
|
424
|
+
},
|
|
425
|
+
getImgList(t, e) {
|
|
426
|
+
var s, l;
|
|
427
|
+
const i = ((s = e.propsHttp) == null ? void 0 : s.home) || "", n = ((l = e.props) == null ? void 0 : l.value) || b.value, r = this.corArray(t, e);
|
|
428
|
+
return r.forEach((o, m) => {
|
|
429
|
+
r[m] = i + (o[n] ? o[n] : o);
|
|
430
|
+
}), r;
|
|
423
431
|
}
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
var Q = function() {
|
|
435
|
+
var e = this, i = e._self._c;
|
|
436
|
+
return e.getColumnProp(e.column, "hide") ? i("ElTableColumn", { key: e.column.prop, attrs: { prop: e.column.prop, label: e.column.label, "column-key": e.column.prop, "filter-placement": "bottom-end", filters: e.getColumnProp(e.column, "filters"), "filter-method": e.getColumnProp(e.column, "filterMethod") ? e.handleFilterMethod : void 0, "filter-multiple": e.optVal(e.column.filterMultiple, !0), "show-overflow-tooltip": e.column.overHidden, "min-width": e.column.minWidth, sortable: e.getColumnProp(e.column, "sortable"), "sort-method": e.column.sortMethod, "sort-orders": e.column.sortOrders, "sort-by": e.column.sortBy, resizable: e.column.resizable, "render-header": e.column.renderHeader, align: e.column.align || e.crud.tableOption.align, "header-align": e.column.headerAlign || e.crud.tableOption.headerAlign, width: e.getColumnProp(e.column, "width"), fixed: e.getColumnProp(e.column, "fixed") }, scopedSlots: e._u([{ key: "header", fn: function({ $index: n }) {
|
|
437
|
+
return [e.crud.getSlotName(e.column, "H", e.crud.$scopedSlots) ? e._t(e.crud.getSlotName(e.column, "H"), null, null, { column: e.column, $index: n }) : i("span", [e._v(e._s(e.column.label))])];
|
|
438
|
+
} }, { key: "default", fn: function({ row: n, $index: r }) {
|
|
439
|
+
return [n.$cellEdit && e.column.cell ? i("ElFormItem", { attrs: { prop: e.crud.isTree ? "" : `list.${r}.${e.column.prop}`, label: e.vaildLabel(e.column, n, " "), "label-width": e.vaildLabel(e.column, n, "1px"), rules: e.column.rules } }, [i("ElTooltip", { attrs: { content: (e.crud.listError[`list.${r}.${e.column.prop}`] || {}).msg, disabled: !(e.crud.listError[`list.${r}.${e.column.prop}`] || {}).valid, placement: "top" } }, [e.crud.getSlotName(e.column, "F", e.crud.$scopedSlots) ? e._t(e.crud.getSlotName(e.column, "F"), null, null, {
|
|
440
|
+
row: n,
|
|
441
|
+
dic: e.crud.DIC[e.column.prop],
|
|
442
|
+
size: e.crud.isMediumSize,
|
|
443
|
+
index: r,
|
|
444
|
+
disabled: e.crud.btnDisabledList[r],
|
|
445
|
+
label: e.handleDetail(n, e.column),
|
|
446
|
+
$cell: n.$cellEdit
|
|
447
|
+
}) : i("FormTemp", e._b({ attrs: { column: e.column, size: e.crud.isMediumSize, "table-data": { index: r, row: n, label: e.handleDetail(n, e.column) }, dic: (e.crud.cascaderDIC[r] || {})[e.column.prop] || e.crud.DIC[e.column.prop], props: e.column.props || e.crud.tableOption.props, readonly: e.column.readonly, disabled: e.crud.disabled || e.crud.tableOption.disabled || e.column.disabled || e.crud.btnDisabledList[r], clearable: e.optVal(e.column.clearable, !1), "column-slot": e.crud.mainSlot }, on: { change: function(s) {
|
|
448
|
+
return e.columnChange(n, e.column, r);
|
|
449
|
+
} }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(s) {
|
|
450
|
+
return { key: s, fn: function(l) {
|
|
451
|
+
return [e._t(s, null, null, l)];
|
|
452
|
+
} };
|
|
453
|
+
})], null, !0), model: { value: n[e.column.prop], callback: function(s) {
|
|
454
|
+
e.$set(n, e.column.prop, s);
|
|
455
|
+
}, expression: "row[column.prop]" } }, "FormTemp", e.uploadFun(e.column, e.crud), !1))], 2)], 1) : e.crud.$scopedSlots[e.column.prop] ? e._t(e.column.prop, null, { row: n, index: r, dic: e.crud.DIC[e.column.prop], size: e.crud.isMediumSize, label: e.handleDetail(n, e.column) }) : [["img", "upload"].includes(e.column.type) ? i("span", { staticClass: "avue-crud__img" }, [e._l(e.getImgList(n, e.column), function(s, l) {
|
|
456
|
+
return [e.isMediaType(s, e.column.fileType) ? i(e.isMediaType(s, e.column.fileType), { key: l, tag: "Component", attrs: { src: s }, on: { click: function(o) {
|
|
457
|
+
return o.stopPropagation(), e.openImg(n, e.column, l);
|
|
458
|
+
} } }) : i("i", { key: l, staticClass: "el-icon-document", attrs: { src: s }, on: { click: function(o) {
|
|
459
|
+
return o.stopPropagation(), e.openImg(n, e.column, l);
|
|
460
|
+
} } })];
|
|
461
|
+
})], 2) : e.column.type === "url" ? i("span", e._l(e.corArray(n, e.column), function(s, l) {
|
|
462
|
+
return i("ElLink", { key: l, attrs: { type: "primary", href: s, target: e.column.target || "_blank" } }, [e._v(e._s(s))]);
|
|
463
|
+
}), 1) : e.column.type === "rate" ? i("span", [i("FyRate", { attrs: { disabled: "" }, model: { value: n[e.column.prop], callback: function(s) {
|
|
464
|
+
e.$set(n, e.column.prop, s);
|
|
465
|
+
}, expression: "row[column.prop]" } })], 1) : e.column.type === "color" ? i("i", { staticClass: "avue-crud__color", style: { backgroundColor: n[e.column.prop] } }) : e.column.type === "icon" ? i("IconTemp", { attrs: { text: n[e.column.prop] } }) : e.column.html ? i("span", { domProps: { innerHTML: e._s(e.handleDetail(n, e.column)) } }) : i("span", { domProps: { textContent: e._s(e.handleDetail(n, e.column)) } })]];
|
|
466
|
+
} }], null, !0) }) : e._e();
|
|
467
|
+
}, Y = [], Z = /* @__PURE__ */ f(
|
|
468
|
+
J,
|
|
469
|
+
Q,
|
|
470
|
+
Y,
|
|
471
|
+
!1,
|
|
472
|
+
null,
|
|
473
|
+
null
|
|
474
|
+
);
|
|
475
|
+
const S = Z.exports, ee = {
|
|
476
|
+
name: "ColumnDynamic",
|
|
477
|
+
components: { ColumnSlot: S },
|
|
478
|
+
inject: ["dynamic", "crud"],
|
|
479
|
+
props: {
|
|
480
|
+
columnOption: Object
|
|
481
|
+
},
|
|
482
|
+
created() {
|
|
483
|
+
const t = ["getColumnProp", "handleFilterMethod", "handleFilters"];
|
|
484
|
+
Object.keys(this.dynamic).forEach((e) => {
|
|
485
|
+
t.includes(e) && (this[e] = this.dynamic[e]);
|
|
486
|
+
});
|
|
487
|
+
},
|
|
488
|
+
methods: {
|
|
489
|
+
optVal: h
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
var te = function() {
|
|
493
|
+
var e = this, i = e._self._c;
|
|
494
|
+
return e.getColumnProp(e.columnOption, "hide") ? i("ElTableColumn", { key: e.columnOption.prop, attrs: { prop: e.columnOption.prop, label: e.columnOption.label, "filter-placement": "bottom-end", filters: e.getColumnProp(e.columnOption, "filters"), "filter-method": e.getColumnProp(e.columnOption, "filterMethod") ? e.handleFilterMethod : void 0, "filter-multiple": e.optVal(e.columnOption.filterMultiple, !0), "show-overflow-tooltip": e.columnOption.overHidden, "min-width": e.columnOption.minWidth, sortable: e.getColumnProp(e.columnOption, "sortable"), "render-header": e.columnOption.renderHeader, align: e.columnOption.align || e.crud.tableOption.align, "header-align": e.columnOption.headerAlign || e.crud.tableOption.headerAlign, width: e.getColumnProp(e.columnOption, "width"), fixed: e.getColumnProp(e.columnOption, "fixed") } }, [e._l(e.columnOption.children, function(n) {
|
|
495
|
+
return [n.children && n.children.length > 0 ? i("ColumnDynamic", { key: n.prop, attrs: { "column-option": n }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
|
|
496
|
+
return { key: r, fn: function(s) {
|
|
497
|
+
return [e._t(r, null, null, s)];
|
|
498
|
+
} };
|
|
499
|
+
})], null, !0) }) : i("ColumnSlot", { key: n.prop, attrs: { column: n, "column-option": e.columnOption.children }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
|
|
500
|
+
return { key: r, fn: function(s) {
|
|
501
|
+
return [e._t(r, null, null, s)];
|
|
502
|
+
} };
|
|
503
|
+
})], null, !0) })];
|
|
504
|
+
})], 2) : e._e();
|
|
505
|
+
}, ie = [], ne = /* @__PURE__ */ f(
|
|
506
|
+
ee,
|
|
507
|
+
te,
|
|
508
|
+
ie,
|
|
509
|
+
!1,
|
|
510
|
+
null,
|
|
511
|
+
null
|
|
512
|
+
);
|
|
513
|
+
const re = ne.exports, se = {
|
|
514
|
+
name: "Column",
|
|
515
|
+
components: { ColumnDynamic: re, ColumnSlot: S },
|
|
516
|
+
inject: ["crud"],
|
|
517
|
+
provide() {
|
|
518
|
+
return {
|
|
519
|
+
crud: this.crud,
|
|
520
|
+
dynamic: this
|
|
521
|
+
};
|
|
522
|
+
},
|
|
523
|
+
props: {
|
|
524
|
+
columnOption: Array
|
|
525
|
+
},
|
|
526
|
+
computed: {
|
|
527
|
+
list() {
|
|
528
|
+
let t = [...this.columnOption];
|
|
529
|
+
return t = T(t, "index", (e, i) => {
|
|
530
|
+
var n, r;
|
|
531
|
+
return ((n = this.crud.objectOption[e.prop]) == null ? void 0 : n.index) - ((r = this.crud.objectOption[i.prop]) == null ? void 0 : r.index);
|
|
532
|
+
}), t;
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
methods: {
|
|
536
|
+
// 表格筛选逻辑
|
|
537
|
+
handleFilterMethod(t, e, i) {
|
|
538
|
+
const n = this.columnOption.filter((r) => r.prop === i.property)[0];
|
|
539
|
+
return typeof n.filterMethod == "function" ? n.filterMethod(t, e, n) : e[n.prop] === t;
|
|
540
|
+
},
|
|
541
|
+
// 表格筛选字典
|
|
542
|
+
handleFilters(t, e) {
|
|
543
|
+
if (e !== !0) return;
|
|
544
|
+
const i = this.crud.DIC[t.prop] || [], n = [];
|
|
545
|
+
return c(i) ? this.crud.cellForm.list.forEach((r) => {
|
|
546
|
+
n.map((s) => s.text).includes(r[t.prop]) || n.push({
|
|
547
|
+
text: r[t.prop],
|
|
548
|
+
value: r[t.prop]
|
|
549
|
+
});
|
|
550
|
+
}) : i.forEach((r) => {
|
|
551
|
+
const s = t.props || this.crud.tableOption.props || {};
|
|
552
|
+
n.push({
|
|
553
|
+
text: r[s.label || b.label],
|
|
554
|
+
value: r[s.value || b.value]
|
|
555
|
+
});
|
|
556
|
+
}), n;
|
|
557
|
+
},
|
|
558
|
+
getColumnProp(t, e) {
|
|
559
|
+
const i = this.crud.objectOption[t.prop] || {};
|
|
560
|
+
if (e === "filterMethod") return i == null ? void 0 : i.filters;
|
|
561
|
+
if (this.crud.isMobile && ["fixed"].includes(e)) return !1;
|
|
562
|
+
const n = i == null ? void 0 : i[e];
|
|
563
|
+
if (!(e === "width" && n === 0))
|
|
564
|
+
return e === "filters" ? this.handleFilters(t, n) : e === "hide" ? (i == null ? void 0 : i.hide) !== !0 : n;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
var le = function() {
|
|
569
|
+
var e = this, i = e._self._c;
|
|
570
|
+
return i("div", [e._t("header"), e._l(e.list, function(n) {
|
|
571
|
+
return [n.children && n.children.length > 0 ? i("ColumnDynamic", { key: n.pop, attrs: { "column-option": n }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
|
|
572
|
+
return { key: r, fn: function(s) {
|
|
573
|
+
return [e._t(r, null, null, s)];
|
|
574
|
+
} };
|
|
575
|
+
})], null, !0) }) : i("ColumnSlot", { key: n.prop, attrs: { column: n, "column-option": e.columnOption }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
|
|
576
|
+
return { key: r, fn: function(s) {
|
|
577
|
+
return [e._t(r, null, null, s)];
|
|
578
|
+
} };
|
|
579
|
+
})], null, !0) })];
|
|
580
|
+
}), e._t("footer")], 2);
|
|
581
|
+
}, oe = [], ae = /* @__PURE__ */ f(
|
|
582
|
+
se,
|
|
583
|
+
le,
|
|
584
|
+
oe,
|
|
585
|
+
!1,
|
|
586
|
+
null,
|
|
587
|
+
null
|
|
588
|
+
);
|
|
589
|
+
const ce = ae.exports, ue = {
|
|
590
|
+
name: "ColumnDefault",
|
|
591
|
+
inject: ["crud"],
|
|
592
|
+
data() {
|
|
593
|
+
return {
|
|
594
|
+
config: p
|
|
595
|
+
};
|
|
596
|
+
},
|
|
597
|
+
mounted() {
|
|
598
|
+
this.setSort();
|
|
424
599
|
},
|
|
425
600
|
methods: {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}), this.columnBox = !0, this.$nextTick(() => this.rowDrop());
|
|
601
|
+
optVal: h,
|
|
602
|
+
indexMethod(t) {
|
|
603
|
+
return t + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);
|
|
430
604
|
},
|
|
431
|
-
|
|
432
|
-
|
|
605
|
+
setSort() {
|
|
606
|
+
this.rowDrop(), this.columnDrop();
|
|
433
607
|
},
|
|
434
608
|
rowDrop() {
|
|
435
|
-
const t = this.$refs.table.$el.querySelectorAll(
|
|
436
|
-
this.crud.tableDrop("
|
|
437
|
-
const i = e.oldIndex, n = e.newIndex;
|
|
438
|
-
this.crud.
|
|
609
|
+
const t = this.crud.$refs.table.$el.querySelectorAll(this.config.dropRowClass)[0];
|
|
610
|
+
this.crud.tableDrop("row", t, (e) => {
|
|
611
|
+
const i = e.oldIndex, n = e.newIndex, r = this.crud.list.splice(i, 1)[0];
|
|
612
|
+
this.crud.list.splice(n, 0, r), this.crud.$emit("sortable-change", i, n), this.crud.refreshTable(() => this.rowDrop());
|
|
613
|
+
});
|
|
614
|
+
},
|
|
615
|
+
columnDrop() {
|
|
616
|
+
const t = this.crud.$refs.table.$el.querySelector(this.config.dropColClass);
|
|
617
|
+
let e = 0;
|
|
618
|
+
["selection", "index", "expand"].forEach((i) => {
|
|
619
|
+
this.crud.tableOption[i] && (e += 1);
|
|
620
|
+
}), this.crud.tableDrop("column", t, (i) => {
|
|
621
|
+
this.crud.headerSort(i.oldIndex - e, i.newIndex - e), this.columnDrop();
|
|
439
622
|
});
|
|
440
623
|
}
|
|
441
624
|
}
|
|
442
625
|
};
|
|
443
|
-
var
|
|
626
|
+
var de = function() {
|
|
444
627
|
var e = this, i = e._self._c;
|
|
445
|
-
return
|
|
446
|
-
e.
|
|
447
|
-
} } },
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
e.$set(e.crud.objectOption[s.prop], n.prop, o);
|
|
453
|
-
}, expression: "crud.objectOption[row.prop][item.prop]" } })];
|
|
454
|
-
} }], null, !0) }) : e._e()];
|
|
455
|
-
})], 2)], 1)], 1) : e._e();
|
|
456
|
-
}, De = [], ze = /* @__PURE__ */ g(
|
|
457
|
-
Ie,
|
|
458
|
-
Pe,
|
|
459
|
-
De,
|
|
628
|
+
return i("div", [i("ElTableColumn", { attrs: { width: "1px" } }), e.crud.tableOption.expand ? i("ElTableColumn", { key: "expand", attrs: { type: "expand", width: e.crud.tableOption.expandWidth || e.config.expandWidth, fixed: e.optVal(e.crud.tableOption.expandFixed, e.config.expandFixed), align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n }) {
|
|
629
|
+
return [e._t("expand", null, { row: n, index: n.$index })];
|
|
630
|
+
} }], null, !0) }) : e._e(), e.crud.tableOption.selection ? i("ElTableColumn", { key: "selection", attrs: { fixed: e.optVal(e.crud.tableOption.selectionFixed, e.config.selectionFixed), type: "selection", selectable: e.crud.tableOption.selectable, "reserve-selection": e.optVal(e.crud.tableOption.reserveSelection), width: e.crud.tableOption.selectionWidth || e.config.selectionWidth, align: "center" } }) : e._e(), e.optVal(e.crud.tableOption.index) ? i("ElTableColumn", { key: "index", attrs: { fixed: e.optVal(e.crud.tableOption.indexFixed, e.config.indexFixed), label: e.crud.tableOption.indexLabel || e.config.indexLabel, type: "index", width: e.crud.tableOption.indexWidth || e.config.indexWidth, index: e.indexMethod, align: "center" } }) : e._e()], 1);
|
|
631
|
+
}, pe = [], he = /* @__PURE__ */ f(
|
|
632
|
+
ue,
|
|
633
|
+
de,
|
|
634
|
+
pe,
|
|
460
635
|
!1,
|
|
461
636
|
null,
|
|
462
637
|
null
|
|
463
638
|
);
|
|
464
|
-
const
|
|
465
|
-
name: "
|
|
639
|
+
const me = he.exports, fe = {
|
|
640
|
+
name: "ColumnMenu",
|
|
641
|
+
directives: {
|
|
642
|
+
permission: x
|
|
643
|
+
},
|
|
466
644
|
inject: ["crud"],
|
|
467
645
|
data() {
|
|
468
646
|
return {
|
|
469
|
-
|
|
470
|
-
boxType: "",
|
|
471
|
-
fullscreen: !1,
|
|
472
|
-
size: null,
|
|
473
|
-
boxVisible: !1
|
|
647
|
+
config: p
|
|
474
648
|
};
|
|
475
649
|
},
|
|
476
650
|
computed: {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
return t.boxType = this.boxType, t.column = c(this.crud.propOption), t.menuBtn = !1, this.isAdd ? (t.submitBtn = t.saveBtn, t.submitText = this.crud.menuIcon("saveBtn"), t.submitIcon = this.crud.getBtnIcon("saveBtn")) : this.isEdit ? (t.submitBtn = t.updateBtn, t.submitText = this.crud.menuIcon("updateBtn"), t.submitIcon = this.crud.getBtnIcon("updateBtn")) : this.isView && (t.detail = !0), t.emptyBtn = t.cancelBtn, t.emptyText = this.crud.menuIcon("cancelBtn"), t.emptyIcon = this.crud.getBtnIcon("cancelBtn"), this.crud.isGroup || (t.dicFlag = !1, t.dicData = this.crud.DIC), u(t.dicFlag) || t.column.forEach((e) => {
|
|
480
|
-
e.boxType = this.boxType, e.dicFlag = e.dicFlag || t.dicFlag;
|
|
481
|
-
}), t;
|
|
482
|
-
},
|
|
483
|
-
isView() {
|
|
484
|
-
return this.boxType === "view";
|
|
485
|
-
},
|
|
486
|
-
isAdd() {
|
|
487
|
-
return this.boxType === "add";
|
|
488
|
-
},
|
|
489
|
-
isEdit() {
|
|
490
|
-
return this.boxType === "edit";
|
|
491
|
-
},
|
|
492
|
-
direction() {
|
|
493
|
-
return this.crud.tableOption.dialogDirection;
|
|
494
|
-
},
|
|
495
|
-
width() {
|
|
496
|
-
return m(`${this.crud.tableOption.dialogWidth}`, this.crud.isMobile ? "100%" : `${h.dialogWidth}`);
|
|
497
|
-
},
|
|
498
|
-
dialogType() {
|
|
499
|
-
return this.isDrawer ? "ElDrawer" : "ElementDialog";
|
|
500
|
-
},
|
|
501
|
-
dialogTop() {
|
|
502
|
-
return !this.isDrawer && !this.fullscreen ? this.crud.tableOption.dialogTop : "0";
|
|
503
|
-
},
|
|
504
|
-
isDrawer() {
|
|
505
|
-
return this.crud.tableOption.dialogType === "drawer";
|
|
651
|
+
menuType() {
|
|
652
|
+
return this.crud.tableOption.menuType || this.$AVUE.menuType || "button";
|
|
506
653
|
},
|
|
507
|
-
|
|
508
|
-
return this.
|
|
509
|
-
size: this.fullscreen ? "100%" : this.width,
|
|
510
|
-
direction: this.crud.tableOption.dialogDirection
|
|
511
|
-
} : {
|
|
512
|
-
width: this.width,
|
|
513
|
-
fullscreen: this.fullscreen
|
|
514
|
-
};
|
|
654
|
+
isIconMenu() {
|
|
655
|
+
return this.menuType === "icon";
|
|
515
656
|
},
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
if (!u(this.boxType)) {
|
|
519
|
-
const e = {
|
|
520
|
-
tipStartTitle: "当前表格已选择",
|
|
521
|
-
tipEndTitle: "项",
|
|
522
|
-
editTitle: "编 辑",
|
|
523
|
-
copyTitle: "复 制",
|
|
524
|
-
addTitle: "新 增",
|
|
525
|
-
viewTitle: "查 看",
|
|
526
|
-
filterTitle: "过滤条件",
|
|
527
|
-
showTitle: "列显隐"
|
|
528
|
-
};
|
|
529
|
-
return this.crud.tableOption[`${t}Title`] || e[`${t}Title`];
|
|
530
|
-
}
|
|
531
|
-
return "";
|
|
657
|
+
isTextMenu() {
|
|
658
|
+
return this.menuType === "text";
|
|
532
659
|
},
|
|
533
|
-
|
|
534
|
-
return this.
|
|
660
|
+
isMenu() {
|
|
661
|
+
return this.menuType === "menu";
|
|
535
662
|
}
|
|
536
663
|
},
|
|
537
664
|
methods: {
|
|
538
|
-
optVal:
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
this.$refs.tableForm.submit();
|
|
542
|
-
},
|
|
543
|
-
reset() {
|
|
544
|
-
this.$refs.tableForm.resetForm(!1);
|
|
545
|
-
},
|
|
546
|
-
getSlotName(t) {
|
|
547
|
-
return t.replace("Form", "");
|
|
548
|
-
},
|
|
549
|
-
initFun() {
|
|
550
|
-
["clearValidate", "validate", "resetForm", "validateField"].forEach((t) => {
|
|
551
|
-
this.crud[t] = this.$refs.tableForm[t];
|
|
552
|
-
});
|
|
553
|
-
},
|
|
554
|
-
handleChange() {
|
|
555
|
-
this.crud.setVal();
|
|
556
|
-
},
|
|
557
|
-
handleTabClick(t, e) {
|
|
558
|
-
this.crud.$emit("tab-click", t, e);
|
|
559
|
-
},
|
|
560
|
-
handleFullScreen() {
|
|
561
|
-
this.isDrawer && (u(this.size) ? this.size = "100%" : this.size = ""), this.fullscreen = !this.fullscreen;
|
|
562
|
-
},
|
|
563
|
-
handleError(t) {
|
|
564
|
-
this.crud.$emit("error", t);
|
|
565
|
-
},
|
|
566
|
-
handleSubmit(t, e) {
|
|
567
|
-
this.isAdd ? this.rowSave(e) : this.isEdit && this.rowUpdate(e);
|
|
568
|
-
},
|
|
569
|
-
// 保存
|
|
570
|
-
rowSave(t) {
|
|
571
|
-
this.crud.$emit("row-save", S(this.crud.tableForm, ["$"]), this.closeDialog, t);
|
|
572
|
-
},
|
|
573
|
-
// 更新
|
|
574
|
-
rowUpdate(t) {
|
|
575
|
-
this.crud.$emit("row-update", S(this.crud.tableForm, ["$"]), this.crud.tableIndex, this.closeDialog, t);
|
|
576
|
-
},
|
|
577
|
-
closeDialog(t) {
|
|
578
|
-
t = c(t), t && (() => {
|
|
579
|
-
if (this.isEdit) {
|
|
580
|
-
const { parentList: i, index: n } = this.crud.findData(t[this.crud.rowKey]);
|
|
581
|
-
if (i) {
|
|
582
|
-
const r = i.splice(n, 1)[0];
|
|
583
|
-
t[this.crud.childrenKey] = r[this.crud.childrenKey], i.splice(n, 0, t);
|
|
584
|
-
}
|
|
585
|
-
} else if (this.isAdd) {
|
|
586
|
-
const { item: i } = this.crud.findData(t[this.crud.rowParentKey]);
|
|
587
|
-
i ? (i[this.crud.childrenKey] || this.$set(i, this.crud.childrenKey, []), this.crud.tableOption.lazy && this.$set(i, this.crud.hasChildrenKey, !0), i[this.crud.childrenKey].push(t)) : this.crud.list.push(t);
|
|
588
|
-
}
|
|
589
|
-
})(), this.hide();
|
|
590
|
-
},
|
|
591
|
-
// 隐藏表单
|
|
592
|
-
hide(t) {
|
|
593
|
-
const e = () => {
|
|
594
|
-
t == null || t(), this.crud.tableIndex = -1, this.crud.tableForm = {}, this.crud.setVal(), this.boxVisible = !1;
|
|
595
|
-
};
|
|
596
|
-
typeof this.crud.beforeClose == "function" ? this.crud.beforeClose(e, this.boxType) : e();
|
|
597
|
-
},
|
|
598
|
-
// 显示表单
|
|
599
|
-
show(t) {
|
|
600
|
-
this.boxType = t;
|
|
601
|
-
const e = () => {
|
|
602
|
-
this.fullscreen = this.crud.tableOption.dialogFullscreen, this.boxVisible = !0, this.$nextTick(() => {
|
|
603
|
-
this.initFun();
|
|
604
|
-
});
|
|
605
|
-
};
|
|
606
|
-
typeof this.crud.beforeOpen == "function" ? this.crud.beforeOpen(e, this.boxType) : e();
|
|
665
|
+
optVal: h,
|
|
666
|
+
menuText(t) {
|
|
667
|
+
return ["text", "menu"].includes(this.menuType) ? "text" : t;
|
|
607
668
|
}
|
|
608
669
|
}
|
|
609
670
|
};
|
|
610
|
-
var
|
|
671
|
+
var be = function() {
|
|
611
672
|
var e = this, i = e._self._c;
|
|
612
|
-
return e.
|
|
613
|
-
e.
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
},
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
673
|
+
return e.optVal(e.crud.tableOption.menu, e.config.menu) && e.crud.getPermission("menu") ? i("ElTableColumn", { key: "menu", staticClass: "avue-crud__btn", attrs: { prop: "menu", fixed: e.optVal(e.crud.tableOption.menuFixed, e.config.menuFixed), label: e.crud.tableOption.menuTitle || "操作", align: e.crud.tableOption.menuAlign || e.config.menuAlign, "header-align": e.crud.tableOption.menuHeaderAlign || e.config.menuHeaderAlign, width: e.crud.isMobile ? e.crud.tableOption.menuXsWidth || e.config.menuXsWidth : e.crud.tableOption.menuWidth || e.config.menuWidth }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: r }) {
|
|
674
|
+
return [e.isMenu ? i("ElDropdown", { attrs: { size: e.crud.isMediumSize }, scopedSlots: e._u([{ key: "dropdown", fn: function() {
|
|
675
|
+
return [i("ElDropdownMenu", [e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? i("ElDropdownItem", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("viewBtn", n, r), expression: "crud.getPermission('viewBtn', row, $index)" }], attrs: { icon: e.crud.getBtnIcon("viewBtn") }, nativeOn: { click: function(s) {
|
|
676
|
+
return e.crud.rowView(n, r);
|
|
677
|
+
} } }, [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) ? i("ElDropdownItem", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("editBtn", n, r), expression: "crud.getPermission('editBtn', row, $index)" }], attrs: { icon: e.crud.getBtnIcon("editBtn") }, nativeOn: { click: function(s) {
|
|
678
|
+
return e.crud.rowEdit(n, r);
|
|
679
|
+
} } }, [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? i("ElDropdownItem", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("copyBtn", n, r), expression: "crud.getPermission('copyBtn', row, $index)" }], attrs: { icon: e.crud.getBtnIcon("copyBtn") }, nativeOn: { click: function(s) {
|
|
680
|
+
return e.crud.rowCopy(n);
|
|
681
|
+
} } }, [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) ? i("ElDropdownItem", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("delBtn", n, r), expression: "crud.getPermission('delBtn', row, $index)" }], attrs: { icon: e.crud.getBtnIcon("delBtn") }, nativeOn: { click: function(s) {
|
|
682
|
+
return e.crud.rowDel(n, r);
|
|
683
|
+
} } }, [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]) : e._e(), e._t("menuBtn", null, { row: n, type: e.menuText("primary"), disabled: e.crud.btnDisabled, size: e.crud.isMediumSize, index: r })], 2)];
|
|
684
|
+
}, proxy: !0 }], null, !0) }, [i("ElButton", { attrs: { type: "text", size: e.crud.isMediumSize } }, [e._v(" " + e._s(e.crud.tableOption.menuBtnTitle || "按钮") + " "), i("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 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) && !n.$cellEdit ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("editBtn", n, r), expression: "crud.getPermission('editBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("editBtn"), size: e.crud.isMediumSize, disabled: e.crud.btnDisabledList[r] }, on: { click: function(s) {
|
|
685
|
+
return s.stopPropagation(), e.crud.rowCell(n, r);
|
|
686
|
+
} } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e.optVal(e.crud.tableOption.saveBtn, e.config.saveBtn) && n.$cellEdit ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("saveBtn", n, r), expression: "crud.getPermission('saveBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("saveBtn"), size: e.crud.isMediumSize, disabled: e.crud.btnDisabledList[r] }, on: { click: function(s) {
|
|
687
|
+
return s.stopPropagation(), e.crud.rowCell(n, r);
|
|
688
|
+
} } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("saveBtn")) + " ")]], 2) : e._e(), n.$cellEdit ? i("ElButton", { attrs: { type: e.menuText("danger"), icon: e.crud.getBtnIcon("cancelBtn"), size: e.crud.isMediumSize, disabled: e.crud.btnDisabledList[r] }, on: { click: function(s) {
|
|
689
|
+
return s.stopPropagation(), e.crud.rowCancel(n, r);
|
|
690
|
+
} } }, [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) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("viewBtn", n, r), expression: "crud.getPermission('viewBtn', row, $index)" }], attrs: { type: e.menuText("success"), icon: e.crud.getBtnIcon("viewBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
|
|
691
|
+
return s.stopPropagation(), e.crud.rowView(n, r);
|
|
692
|
+
} } }, [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 ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("editBtn", n, r), expression: "crud.getPermission('editBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("editBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
|
|
693
|
+
return s.stopPropagation(), e.crud.rowEdit(n, r);
|
|
694
|
+
} } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("copyBtn", n, r), expression: "crud.getPermission('copyBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("copyBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
|
|
695
|
+
return s.stopPropagation(), e.crud.rowCopy(n);
|
|
696
|
+
} } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) && !n.$cellEdit ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("delBtn", n, r), expression: "crud.getPermission('delBtn', row, $index)" }], attrs: { type: e.menuText("danger"), icon: e.crud.getBtnIcon("delBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
|
|
697
|
+
return s.stopPropagation(), e.crud.rowDel(n, r);
|
|
698
|
+
} } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]], 2) : e._e()] : e._e(), e._t("menu", null, { row: n, type: e.menuText("primary"), disabled: e.crud.btnDisabled, size: e.crud.isMediumSize, index: r })];
|
|
699
|
+
} }], null, !0) }) : e._e();
|
|
700
|
+
}, ge = [], _e = /* @__PURE__ */ f(
|
|
701
|
+
fe,
|
|
702
|
+
be,
|
|
703
|
+
ge,
|
|
627
704
|
!1,
|
|
628
705
|
null,
|
|
629
706
|
null
|
|
630
707
|
);
|
|
631
|
-
const
|
|
708
|
+
const ve = _e.exports, ye = {
|
|
632
709
|
name: "TablePage",
|
|
633
710
|
inject: ["crud"],
|
|
634
711
|
data() {
|
|
@@ -674,7 +751,7 @@ const A = Le.exports, Ve = {
|
|
|
674
751
|
this.crud.isMobile && (this.defaultPage.layout = "total, sizes, prev, pager, next"), this.pageInit(), this.crud.$emit("on-load", this.defaultPage);
|
|
675
752
|
},
|
|
676
753
|
methods: {
|
|
677
|
-
optVal:
|
|
754
|
+
optVal: h,
|
|
678
755
|
pageInit() {
|
|
679
756
|
this.defaultPage = Object.assign(this.defaultPage, this.crud.page), this.updateValue();
|
|
680
757
|
},
|
|
@@ -689,675 +766,574 @@ const A = Le.exports, Ve = {
|
|
|
689
766
|
prevClick(t) {
|
|
690
767
|
this.crud.$emit("prev-click", t);
|
|
691
768
|
},
|
|
692
|
-
// 页大小回调
|
|
693
|
-
sizeChange(t) {
|
|
694
|
-
this.defaultPage.currentPage = 1, this.defaultPage.pageSize = t, this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("size-change", t);
|
|
695
|
-
},
|
|
696
|
-
// 页码回调
|
|
697
|
-
currentChange(t) {
|
|
698
|
-
this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("current-change", t);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
};
|
|
702
|
-
var Re = function() {
|
|
703
|
-
var e = this, i = e._self._c;
|
|
704
|
-
return e.pageFlag && e.optVal(e.crud.tableOption.page, !0) ? i(T, { staticClass: "avue-pagination", attrs: { shadow: e.crud.isCard } }, [e._t("page"), i(ne, { staticStyle: { "margin-top": "25px" }, attrs: { small: e.crud.size === "mini", disabled: e.defaultPage.disabled, "hide-on-single-page": e.defaultPage.single, "pager-count": e.defaultPage.pagerCount, "current-page": e.defaultPage.currentPage, background: e.defaultPage.background, "page-size": e.defaultPage.pageSize, "page-sizes": e.defaultPage.pageSizes, layout: e.defaultPage.layout, total: e.defaultPage.total }, on: { "update:currentPage": function(n) {
|
|
705
|
-
return e.$set(e.defaultPage, "currentPage", n);
|
|
706
|
-
}, "update:current-page": function(n) {
|
|
707
|
-
return e.$set(e.defaultPage, "currentPage", n);
|
|
708
|
-
}, "size-change": e.sizeChange, "prev-click": e.prevClick, "next-click": e.nextClick, "current-change": e.currentChange } })], 2) : e._e();
|
|
709
|
-
}, Ae = [], He = /* @__PURE__ */ g(
|
|
710
|
-
Ve,
|
|
711
|
-
Re,
|
|
712
|
-
Ae,
|
|
713
|
-
!1,
|
|
714
|
-
null,
|
|
715
|
-
null
|
|
716
|
-
);
|
|
717
|
-
const H = He.exports, Ne = {
|
|
718
|
-
name: "ColumnMenu",
|
|
719
|
-
directives: {
|
|
720
|
-
permission: B
|
|
721
|
-
},
|
|
722
|
-
inject: ["crud"],
|
|
723
|
-
data() {
|
|
724
|
-
return {
|
|
725
|
-
config: h
|
|
726
|
-
};
|
|
727
|
-
},
|
|
728
|
-
computed: {
|
|
729
|
-
menuType() {
|
|
730
|
-
return this.crud.tableOption.menuType || this.$AVUE.menuType || "button";
|
|
731
|
-
},
|
|
732
|
-
isIconMenu() {
|
|
733
|
-
return this.menuType === "icon";
|
|
734
|
-
},
|
|
735
|
-
isTextMenu() {
|
|
736
|
-
return this.menuType === "text";
|
|
737
|
-
},
|
|
738
|
-
isMenu() {
|
|
739
|
-
return this.menuType === "menu";
|
|
740
|
-
}
|
|
741
|
-
},
|
|
742
|
-
methods: {
|
|
743
|
-
optVal: m,
|
|
744
|
-
menuText(t) {
|
|
745
|
-
return ["text", "menu"].includes(this.menuType) ? "text" : t;
|
|
769
|
+
// 页大小回调
|
|
770
|
+
sizeChange(t) {
|
|
771
|
+
this.defaultPage.currentPage = 1, this.defaultPage.pageSize = t, this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("size-change", t);
|
|
772
|
+
},
|
|
773
|
+
// 页码回调
|
|
774
|
+
currentChange(t) {
|
|
775
|
+
this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("current-change", t);
|
|
746
776
|
}
|
|
747
777
|
}
|
|
748
778
|
};
|
|
749
|
-
var
|
|
779
|
+
var Ce = function() {
|
|
750
780
|
var e = this, i = e._self._c;
|
|
751
|
-
return e.optVal(e.crud.tableOption.
|
|
752
|
-
return
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
return e.crud.rowDel(n, r);
|
|
761
|
-
} } }, [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]) : e._e(), e._t("menuBtn", null, { row: n, type: e.menuText("primary"), disabled: e.crud.btnDisabled, size: e.crud.isMediumSize, index: r })], 2)];
|
|
762
|
-
}, proxy: !0 }], null, !0) }, [i(l, { attrs: { type: "text", size: e.crud.isMediumSize } }, [e._v(" " + e._s(e.crud.tableOption.menuBtnTitle || "按钮") + " "), i("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 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) && !n.$cellEdit ? i(l, { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("editBtn", n, r), expression: "crud.getPermission('editBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("editBtn"), size: e.crud.isMediumSize, disabled: e.crud.btnDisabledList[r] }, on: { click: function(s) {
|
|
763
|
-
return s.stopPropagation(), e.crud.rowCell(n, r);
|
|
764
|
-
} } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e.optVal(e.crud.tableOption.saveBtn, e.config.saveBtn) && n.$cellEdit ? i(l, { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("saveBtn", n, r), expression: "crud.getPermission('saveBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("saveBtn"), size: e.crud.isMediumSize, disabled: e.crud.btnDisabledList[r] }, on: { click: function(s) {
|
|
765
|
-
return s.stopPropagation(), e.crud.rowCell(n, r);
|
|
766
|
-
} } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("saveBtn")) + " ")]], 2) : e._e(), n.$cellEdit ? i(l, { attrs: { type: e.menuText("danger"), icon: e.crud.getBtnIcon("cancelBtn"), size: e.crud.isMediumSize, disabled: e.crud.btnDisabledList[r] }, on: { click: function(s) {
|
|
767
|
-
return s.stopPropagation(), e.crud.rowCancel(n, r);
|
|
768
|
-
} } }, [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) ? i(l, { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("viewBtn", n, r), expression: "crud.getPermission('viewBtn', row, $index)" }], attrs: { type: e.menuText("success"), icon: e.crud.getBtnIcon("viewBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
|
|
769
|
-
return s.stopPropagation(), e.crud.rowView(n, r);
|
|
770
|
-
} } }, [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 ? i(l, { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("editBtn", n, r), expression: "crud.getPermission('editBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("editBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
|
|
771
|
-
return s.stopPropagation(), e.crud.rowEdit(n, r);
|
|
772
|
-
} } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? i(l, { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("copyBtn", n, r), expression: "crud.getPermission('copyBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("copyBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
|
|
773
|
-
return s.stopPropagation(), e.crud.rowCopy(n);
|
|
774
|
-
} } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) && !n.$cellEdit ? i(l, { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("delBtn", n, r), expression: "crud.getPermission('delBtn', row, $index)" }], attrs: { type: e.menuText("danger"), icon: e.crud.getBtnIcon("delBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
|
|
775
|
-
return s.stopPropagation(), e.crud.rowDel(n, r);
|
|
776
|
-
} } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]], 2) : e._e()] : e._e(), e._t("menu", null, { row: n, type: e.menuText("primary"), disabled: e.crud.btnDisabled, size: e.crud.isMediumSize, index: r })];
|
|
777
|
-
} }], null, !0) }) : e._e();
|
|
778
|
-
}, We = [], Ke = /* @__PURE__ */ g(
|
|
779
|
-
Ne,
|
|
780
|
-
je,
|
|
781
|
-
We,
|
|
781
|
+
return e.pageFlag && e.optVal(e.crud.tableOption.page, !0) ? i("ElCard", { staticClass: "avue-pagination", attrs: { shadow: e.crud.isCard } }, [e._t("page"), i("ElPagination", { staticStyle: { "margin-top": "25px" }, attrs: { small: e.crud.size === "mini", disabled: e.defaultPage.disabled, "hide-on-single-page": e.defaultPage.single, "pager-count": e.defaultPage.pagerCount, "current-page": e.defaultPage.currentPage, background: e.defaultPage.background, "page-size": e.defaultPage.pageSize, "page-sizes": e.defaultPage.pageSizes, layout: e.defaultPage.layout, total: e.defaultPage.total }, on: { "update:currentPage": function(n) {
|
|
782
|
+
return e.$set(e.defaultPage, "currentPage", n);
|
|
783
|
+
}, "update:current-page": function(n) {
|
|
784
|
+
return e.$set(e.defaultPage, "currentPage", n);
|
|
785
|
+
}, "size-change": e.sizeChange, "prev-click": e.prevClick, "next-click": e.nextClick, "current-change": e.currentChange } })], 2) : e._e();
|
|
786
|
+
}, xe = [], Be = /* @__PURE__ */ f(
|
|
787
|
+
ye,
|
|
788
|
+
Ce,
|
|
789
|
+
xe,
|
|
782
790
|
!1,
|
|
783
791
|
null,
|
|
784
792
|
null
|
|
785
793
|
);
|
|
786
|
-
const
|
|
787
|
-
name: "
|
|
794
|
+
const we = Be.exports, Se = {
|
|
795
|
+
name: "FyDialogForm",
|
|
788
796
|
inject: ["crud"],
|
|
789
797
|
data() {
|
|
790
798
|
return {
|
|
791
|
-
|
|
799
|
+
disabled: !1,
|
|
800
|
+
boxType: "",
|
|
801
|
+
fullscreen: !1,
|
|
802
|
+
size: null,
|
|
803
|
+
boxVisible: !1
|
|
792
804
|
};
|
|
793
805
|
},
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
return t + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);
|
|
806
|
+
computed: {
|
|
807
|
+
option() {
|
|
808
|
+
const t = a(this.crud.tableOption);
|
|
809
|
+
return t.boxType = this.boxType, t.column = a(this.crud.propOption), t.menuBtn = !1, this.isAdd ? (t.submitBtn = t.saveBtn, t.submitText = this.crud.menuIcon("saveBtn"), t.submitIcon = this.crud.getBtnIcon("saveBtn")) : this.isEdit ? (t.submitBtn = t.updateBtn, t.submitText = this.crud.menuIcon("updateBtn"), t.submitIcon = this.crud.getBtnIcon("updateBtn")) : this.isView && (t.detail = !0), t.emptyBtn = t.cancelBtn, t.emptyText = this.crud.menuIcon("cancelBtn"), t.emptyIcon = this.crud.getBtnIcon("cancelBtn"), this.crud.isGroup || (t.dicFlag = !1, t.dicData = this.crud.DIC), c(t.dicFlag) || t.column.forEach((e) => {
|
|
810
|
+
e.boxType = this.boxType, e.dicFlag = e.dicFlag || t.dicFlag;
|
|
811
|
+
}), t;
|
|
801
812
|
},
|
|
802
|
-
|
|
803
|
-
this.
|
|
813
|
+
isView() {
|
|
814
|
+
return this.boxType === "view";
|
|
804
815
|
},
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
this.crud.tableDrop("row", t, (e) => {
|
|
808
|
-
const i = e.oldIndex, n = e.newIndex, r = this.crud.list.splice(i, 1)[0];
|
|
809
|
-
this.crud.list.splice(n, 0, r), this.crud.$emit("sortable-change", i, n), this.crud.refreshTable(() => this.rowDrop());
|
|
810
|
-
});
|
|
816
|
+
isAdd() {
|
|
817
|
+
return this.boxType === "add";
|
|
811
818
|
},
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
});
|
|
819
|
+
isEdit() {
|
|
820
|
+
return this.boxType === "edit";
|
|
821
|
+
},
|
|
822
|
+
direction() {
|
|
823
|
+
return this.crud.tableOption.dialogDirection;
|
|
824
|
+
},
|
|
825
|
+
width() {
|
|
826
|
+
return h(`${this.crud.tableOption.dialogWidth}`, this.crud.isMobile ? "100%" : `${p.dialogWidth}`);
|
|
827
|
+
},
|
|
828
|
+
dialogType() {
|
|
829
|
+
return this.isDrawer ? "ElDrawer" : "ElementDialog";
|
|
830
|
+
},
|
|
831
|
+
dialogTop() {
|
|
832
|
+
return !this.isDrawer && !this.fullscreen ? this.crud.tableOption.dialogTop : "0";
|
|
833
|
+
},
|
|
834
|
+
isDrawer() {
|
|
835
|
+
return this.crud.tableOption.dialogType === "drawer";
|
|
836
|
+
},
|
|
837
|
+
params() {
|
|
838
|
+
return this.isDrawer ? {
|
|
839
|
+
size: this.fullscreen ? "100%" : this.width,
|
|
840
|
+
direction: this.crud.tableOption.dialogDirection
|
|
841
|
+
} : {
|
|
842
|
+
width: this.width,
|
|
843
|
+
fullscreen: this.fullscreen
|
|
844
|
+
};
|
|
845
|
+
},
|
|
846
|
+
dialogTitle() {
|
|
847
|
+
const t = `${this.boxType}`;
|
|
848
|
+
if (!c(this.boxType)) {
|
|
849
|
+
const e = {
|
|
850
|
+
tipStartTitle: "当前表格已选择",
|
|
851
|
+
tipEndTitle: "项",
|
|
852
|
+
editTitle: "编 辑",
|
|
853
|
+
copyTitle: "复 制",
|
|
854
|
+
addTitle: "新 增",
|
|
855
|
+
viewTitle: "查 看",
|
|
856
|
+
filterTitle: "过滤条件",
|
|
857
|
+
showTitle: "列显隐"
|
|
858
|
+
};
|
|
859
|
+
return this.crud.tableOption[`${t}Title`] || e[`${t}Title`];
|
|
860
|
+
}
|
|
861
|
+
return "";
|
|
862
|
+
},
|
|
863
|
+
dialogMenuPosition() {
|
|
864
|
+
return this.crud.option.dialogMenuPosition || "right";
|
|
820
865
|
}
|
|
821
|
-
}
|
|
822
|
-
};
|
|
823
|
-
var Ge = function() {
|
|
824
|
-
var e = this, i = e._self._c;
|
|
825
|
-
return i("div", [i(_, { attrs: { width: "1px" } }), e.crud.tableOption.expand ? i(_, { key: "expand", attrs: { type: "expand", width: e.crud.tableOption.expandWidth || e.config.expandWidth, fixed: e.optVal(e.crud.tableOption.expandFixed, e.config.expandFixed), align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n }) {
|
|
826
|
-
return [e._t("expand", null, { row: n, index: n.$index })];
|
|
827
|
-
} }], null, !0) }) : e._e(), e.crud.tableOption.selection ? i(_, { key: "selection", attrs: { fixed: e.optVal(e.crud.tableOption.selectionFixed, e.config.selectionFixed), type: "selection", selectable: e.crud.tableOption.selectable, "reserve-selection": e.optVal(e.crud.tableOption.reserveSelection), width: e.crud.tableOption.selectionWidth || e.config.selectionWidth, align: "center" } }) : e._e(), e.optVal(e.crud.tableOption.index) ? i(_, { key: "index", attrs: { fixed: e.optVal(e.crud.tableOption.indexFixed, e.config.indexFixed), label: e.crud.tableOption.indexLabel || e.config.indexLabel, type: "index", width: e.crud.tableOption.indexWidth || e.config.indexWidth, index: e.indexMethod, align: "center" } }) : e._e()], 1);
|
|
828
|
-
}, qe = [], Xe = /* @__PURE__ */ g(
|
|
829
|
-
Ue,
|
|
830
|
-
Ge,
|
|
831
|
-
qe,
|
|
832
|
-
!1,
|
|
833
|
-
null,
|
|
834
|
-
null
|
|
835
|
-
);
|
|
836
|
-
const j = Xe.exports, w = {}, Je = {
|
|
837
|
-
name: "ColumnSlot",
|
|
838
|
-
components: { IconTemp: E, FormTemp: z },
|
|
839
|
-
inject: ["dynamic", "crud"],
|
|
840
|
-
props: {
|
|
841
|
-
column: Object,
|
|
842
|
-
columnOption: Array
|
|
843
|
-
},
|
|
844
|
-
created() {
|
|
845
|
-
const t = ["getColumnProp", "handleFilterMethod", "handleFilters"];
|
|
846
|
-
Object.keys(this.dynamic).forEach((e) => {
|
|
847
|
-
t.includes(e) && (this[e] = this.dynamic[e]);
|
|
848
|
-
});
|
|
849
866
|
},
|
|
850
867
|
methods: {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
return Y(t, e);
|
|
868
|
+
optVal: h,
|
|
869
|
+
uploadFun: B,
|
|
870
|
+
submit() {
|
|
871
|
+
this.$refs.tableForm.submit();
|
|
856
872
|
},
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
return i;
|
|
873
|
+
reset() {
|
|
874
|
+
this.$refs.tableForm.resetForm(!1);
|
|
860
875
|
},
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
w[n] || (this.handleChange(e, t), typeof e.change == "function" && e.cell === !0 && e.change({ row: t, column: e, index: i, value: t[e.prop] })), w[n] = !0, this.$nextTick(() => {
|
|
864
|
-
w[n] = !1;
|
|
865
|
-
});
|
|
876
|
+
getSlotName(t) {
|
|
877
|
+
return t.replace("Form", "");
|
|
866
878
|
},
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
i.forEach((n) => {
|
|
871
|
-
const r = n, s = e[t.prop], o = e.$index, a = this.findObject(this.columnOption, r);
|
|
872
|
-
u(a) || (u(this.crud.cascaderDIC[o]) && this.$set(this.crud.cascaderDIC, o, {}), this.crud.cascaderIndexList.includes(o) && i.forEach((f) => {
|
|
873
|
-
this.$set(this.crud.cascaderDIC[o], f.prop, []), i.forEach((d) => e[d] = "");
|
|
874
|
-
}), !(u(i) || u(s) || u(a)) && ue({
|
|
875
|
-
column: a,
|
|
876
|
-
value: s,
|
|
877
|
-
form: e
|
|
878
|
-
}).then((f) => {
|
|
879
|
-
const d = f || [];
|
|
880
|
-
this.crud.cascaderIndexList.includes(o) || this.crud.cascaderIndexList.push(o), this.crud.cascaderDicList[o] || this.$set(this.crud.cascaderDicList, o, {}), this.crud.cascaderDicList[o][r] || this.$set(this.crud.cascaderDicList[o], r, d), this.$set(this.crud.cascaderDIC[o], r, d), !u(d[a.cascaderIndex]) && !u(d) && !u(a.cascaderIndex) && (e[r] = d[a.cascaderIndex][(a.props || {}).value || b.value]);
|
|
881
|
-
}));
|
|
882
|
-
});
|
|
879
|
+
initFun() {
|
|
880
|
+
["clearValidate", "validate", "resetForm", "validateField"].forEach((t) => {
|
|
881
|
+
this.crud[t] = this.$refs.tableForm[t];
|
|
883
882
|
});
|
|
884
883
|
},
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
return !u(i) && this.crud.tableOption.filterDic !== !0 && (t[`$${e.prop}`] = n), n;
|
|
884
|
+
handleChange() {
|
|
885
|
+
this.crud.setVal();
|
|
888
886
|
},
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
return Array.isArray(i) || (i = u(i) ? [] : i.split(Q)), c(i);
|
|
887
|
+
handleTabClick(t, e) {
|
|
888
|
+
this.crud.$emit("tab-click", t, e);
|
|
892
889
|
},
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
n = n.map((r) => ({ thumbUrl: r, url: r, type: e.fileType })), this.$ImagePreview(n, i);
|
|
890
|
+
handleFullScreen() {
|
|
891
|
+
this.isDrawer && (c(this.size) ? this.size = "100%" : this.size = ""), this.fullscreen = !this.fullscreen;
|
|
896
892
|
},
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
)
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
optVal: m
|
|
962
|
-
}
|
|
963
|
-
};
|
|
964
|
-
var tt = function() {
|
|
965
|
-
var e = this, i = e._self._c;
|
|
966
|
-
return e.getColumnProp(e.columnOption, "hide") ? i(_, { key: e.columnOption.prop, attrs: { prop: e.columnOption.prop, label: e.columnOption.label, "filter-placement": "bottom-end", filters: e.getColumnProp(e.columnOption, "filters"), "filter-method": e.getColumnProp(e.columnOption, "filterMethod") ? e.handleFilterMethod : void 0, "filter-multiple": e.optVal(e.columnOption.filterMultiple, !0), "show-overflow-tooltip": e.columnOption.overHidden, "min-width": e.columnOption.minWidth, sortable: e.getColumnProp(e.columnOption, "sortable"), "render-header": e.columnOption.renderHeader, align: e.columnOption.align || e.crud.tableOption.align, "header-align": e.columnOption.headerAlign || e.crud.tableOption.headerAlign, width: e.getColumnProp(e.columnOption, "width"), fixed: e.getColumnProp(e.columnOption, "fixed") } }, [e._l(e.columnOption.children, function(n) {
|
|
967
|
-
return [n.children && n.children.length > 0 ? i("ColumnDynamic", { key: n.prop, attrs: { "column-option": n }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
|
|
968
|
-
return { key: r, fn: function(s) {
|
|
969
|
-
return [e._t(r, null, null, s)];
|
|
970
|
-
} };
|
|
971
|
-
})], null, !0) }) : i($, { key: n.prop, attrs: { column: n, "column-option": e.columnOption.children }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
|
|
972
|
-
return { key: r, fn: function(s) {
|
|
973
|
-
return [e._t(r, null, null, s)];
|
|
974
|
-
} };
|
|
975
|
-
})], null, !0) })];
|
|
976
|
-
})], 2) : e._e();
|
|
977
|
-
}, it = [], nt = /* @__PURE__ */ g(
|
|
978
|
-
et,
|
|
979
|
-
tt,
|
|
980
|
-
it,
|
|
893
|
+
handleError(t) {
|
|
894
|
+
this.crud.$emit("error", t);
|
|
895
|
+
},
|
|
896
|
+
handleSubmit(t, e) {
|
|
897
|
+
this.isAdd ? this.rowSave(e) : this.isEdit && this.rowUpdate(e);
|
|
898
|
+
},
|
|
899
|
+
// 保存
|
|
900
|
+
rowSave(t) {
|
|
901
|
+
this.crud.$emit("row-save", C(this.crud.tableForm, ["$"]), this.closeDialog, t);
|
|
902
|
+
},
|
|
903
|
+
// 更新
|
|
904
|
+
rowUpdate(t) {
|
|
905
|
+
this.crud.$emit("row-update", C(this.crud.tableForm, ["$"]), this.crud.tableIndex, this.closeDialog, t);
|
|
906
|
+
},
|
|
907
|
+
closeDialog(t) {
|
|
908
|
+
t = a(t), t && (() => {
|
|
909
|
+
if (this.isEdit) {
|
|
910
|
+
const { parentList: i, index: n } = this.crud.findData(t[this.crud.rowKey]);
|
|
911
|
+
if (i) {
|
|
912
|
+
const r = i.splice(n, 1)[0];
|
|
913
|
+
t[this.crud.childrenKey] = r[this.crud.childrenKey], i.splice(n, 0, t);
|
|
914
|
+
}
|
|
915
|
+
} else if (this.isAdd) {
|
|
916
|
+
const { item: i } = this.crud.findData(t[this.crud.rowParentKey]);
|
|
917
|
+
i ? (i[this.crud.childrenKey] || this.$set(i, this.crud.childrenKey, []), this.crud.tableOption.lazy && this.$set(i, this.crud.hasChildrenKey, !0), i[this.crud.childrenKey].push(t)) : this.crud.list.push(t);
|
|
918
|
+
}
|
|
919
|
+
})(), this.hide();
|
|
920
|
+
},
|
|
921
|
+
// 隐藏表单
|
|
922
|
+
hide(t) {
|
|
923
|
+
const e = () => {
|
|
924
|
+
t == null || t(), this.crud.tableIndex = -1, this.crud.tableForm = {}, this.crud.setVal(), this.boxVisible = !1;
|
|
925
|
+
};
|
|
926
|
+
typeof this.crud.beforeClose == "function" ? this.crud.beforeClose(e, this.boxType) : e();
|
|
927
|
+
},
|
|
928
|
+
// 显示表单
|
|
929
|
+
show(t) {
|
|
930
|
+
this.boxType = t;
|
|
931
|
+
const e = () => {
|
|
932
|
+
this.fullscreen = this.crud.tableOption.dialogFullscreen, this.boxVisible = !0, this.$nextTick(() => {
|
|
933
|
+
this.initFun();
|
|
934
|
+
});
|
|
935
|
+
};
|
|
936
|
+
typeof this.crud.beforeOpen == "function" ? this.crud.beforeOpen(e, this.boxType) : e();
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
var $e = function() {
|
|
941
|
+
var e = this, i = e._self._c;
|
|
942
|
+
return e.boxVisible ? i(e.dialogType, e._b({ tag: "Component", staticClass: "dialog-form", attrs: { "lock-scroll": "", "show-full-screen": "", "destroy-on-close": e.crud.tableOption.dialogDestroy, "wrapper-closable": e.crud.tableOption.dialogClickModal, direction: e.direction, "custom-class": e.crud.tableOption.dialogCustomClass, "modal-append-to-body": "", "append-to-body": "", top: e.dialogTop, title: e.dialogTitle, "close-on-press-escape": e.crud.tableOption.dialogEscape, "close-on-click-modal": e.optVal(e.crud.tableOption.dialogClickModal, !1), modal: e.crud.tableOption.dialogModal, "show-close": e.crud.tableOption.dialogCloseBtn, visible: e.boxVisible, "before-close": e.hide }, on: { "update:visible": function(n) {
|
|
943
|
+
e.boxVisible = n;
|
|
944
|
+
} } }, "Component", e.params, !1), [i("FyForm", e._b({ ref: "tableForm", attrs: { status: e.disabled, option: e.option }, on: { "update:status": function(n) {
|
|
945
|
+
e.disabled = n;
|
|
946
|
+
}, change: e.handleChange, submit: e.handleSubmit, "reset-change": e.hide, "tab-click": e.handleTabClick, error: e.handleError }, scopedSlots: e._u([e._l(e.crud.formSlot, function(n) {
|
|
947
|
+
return { key: e.getSlotName(n), fn: function(r) {
|
|
948
|
+
return [e._t(n, null, null, Object.assign(r, { type: e.boxType }))];
|
|
949
|
+
} };
|
|
950
|
+
})], null, !0), model: { value: e.crud.tableForm, callback: function(n) {
|
|
951
|
+
e.$set(e.crud, "tableForm", n);
|
|
952
|
+
}, expression: "crud.tableForm" } }, "FyForm", e.uploadFun({}, e.crud), !1)), i("span", { staticClass: "avue-dialog__footer", class: `avue-dialog__footer--${e.dialogMenuPosition}` }, [e.optVal(e.option.submitBtn, !0) && !e.isView ? i("ElButton", { attrs: { loading: e.disabled, size: e.crud.controlSize, icon: e.option.submitIcon, type: "primary" }, on: { click: e.submit } }, [e._v(" " + e._s(e.option.submitText) + " ")]) : e._e(), e.optVal(e.option.emptyBtn, !0) && !e.isView ? i("ElButton", { attrs: { disabled: e.disabled, size: e.crud.controlSize, icon: e.option.emptyIcon }, on: { click: e.reset } }, [e._v(" " + e._s(e.option.emptyText) + " ")]) : e._e(), e._t("menuForm", null, { disabled: e.disabled, size: e.crud.controlSize, type: e.boxType })], 2)], 1) : e._e();
|
|
953
|
+
}, Oe = [], Fe = /* @__PURE__ */ f(
|
|
954
|
+
Se,
|
|
955
|
+
$e,
|
|
956
|
+
Oe,
|
|
981
957
|
!1,
|
|
982
958
|
null,
|
|
983
959
|
null
|
|
984
960
|
);
|
|
985
|
-
const
|
|
986
|
-
name: "
|
|
987
|
-
components: { ColumnDynamic: W, ColumnSlot: $ },
|
|
961
|
+
const ke = Fe.exports, Ie = {
|
|
962
|
+
name: "DialogColumn",
|
|
988
963
|
inject: ["crud"],
|
|
989
|
-
|
|
964
|
+
data() {
|
|
990
965
|
return {
|
|
991
|
-
|
|
992
|
-
|
|
966
|
+
data: [],
|
|
967
|
+
columnBox: !1
|
|
993
968
|
};
|
|
994
969
|
},
|
|
995
|
-
props: {
|
|
996
|
-
columnOption: Array
|
|
997
|
-
},
|
|
998
970
|
computed: {
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
971
|
+
defaultColumn() {
|
|
972
|
+
return [
|
|
973
|
+
{
|
|
974
|
+
label: "隐藏",
|
|
975
|
+
prop: "hide"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
label: "冻结",
|
|
979
|
+
prop: "fixed"
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
label: "过滤",
|
|
983
|
+
prop: "filters"
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
label: "排序",
|
|
987
|
+
prop: "sortable"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
label: "序号",
|
|
991
|
+
prop: "index",
|
|
992
|
+
hide: !0
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
label: "宽度",
|
|
996
|
+
prop: "width",
|
|
997
|
+
hide: !0
|
|
998
|
+
}
|
|
999
|
+
];
|
|
1005
1000
|
}
|
|
1006
1001
|
},
|
|
1007
1002
|
methods: {
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1003
|
+
handleShow() {
|
|
1004
|
+
this.data = [], this.crud.propOption.forEach((t) => {
|
|
1005
|
+
t.showColumn !== !1 && this.data.push(t);
|
|
1006
|
+
}), this.columnBox = !0, this.$nextTick(() => this.rowDrop());
|
|
1012
1007
|
},
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
if (e !== !0) return;
|
|
1016
|
-
const i = this.crud.DIC[t.prop] || [], n = [];
|
|
1017
|
-
return u(i) ? this.crud.cellForm.list.forEach((r) => {
|
|
1018
|
-
n.map((s) => s.text).includes(r[t.prop]) || n.push({
|
|
1019
|
-
text: r[t.prop],
|
|
1020
|
-
value: r[t.prop]
|
|
1021
|
-
});
|
|
1022
|
-
}) : i.forEach((r) => {
|
|
1023
|
-
const s = t.props || this.crud.tableOption.props || {};
|
|
1024
|
-
n.push({
|
|
1025
|
-
text: r[s.label || b.label],
|
|
1026
|
-
value: r[s.value || b.value]
|
|
1027
|
-
});
|
|
1028
|
-
}), n;
|
|
1008
|
+
handleChange(t) {
|
|
1009
|
+
["hide", "filters"].includes(t) && this.crud.refreshTable();
|
|
1029
1010
|
},
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
return e === "filters" ? this.handleFilters(t, n) : e === "hide" ? (i == null ? void 0 : i.hide) !== !0 : n;
|
|
1011
|
+
rowDrop() {
|
|
1012
|
+
const t = this.$refs.table.$el.querySelectorAll(p.dropRowClass)[0];
|
|
1013
|
+
this.crud.tableDrop("column", t, (e) => {
|
|
1014
|
+
const i = e.oldIndex, n = e.newIndex;
|
|
1015
|
+
this.crud.headerSort(i, n), this.crud.refreshTable(() => this.rowDrop());
|
|
1016
|
+
});
|
|
1037
1017
|
}
|
|
1038
1018
|
}
|
|
1039
1019
|
};
|
|
1040
|
-
var
|
|
1020
|
+
var Ee = function() {
|
|
1041
1021
|
var e = this, i = e._self._c;
|
|
1042
|
-
return i("div", [
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
} };
|
|
1051
|
-
}
|
|
1052
|
-
}),
|
|
1053
|
-
},
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1022
|
+
return e.columnBox ? i("div", [i("ElDrawer", { staticClass: "avue-crud__dialog avue-crud__column avue-dialog", attrs: { "lock-scroll": "", "append-to-body": "", title: "列显隐", size: e.crud.isMobile ? "100%" : "40%", visible: e.columnBox }, on: { "update:visible": function(n) {
|
|
1023
|
+
e.columnBox = n;
|
|
1024
|
+
} } }, [i("ElTable", { ref: "table", attrs: { data: e.data, height: "100%", size: "small", border: "" } }, [i("ElTableColumn", { key: "label", attrs: { align: "center", width: "100", "header-align": "center", prop: "label", label: "列名" } }), e._l(e.defaultColumn, function(n, r) {
|
|
1025
|
+
return [n.hide !== !0 ? i("ElTableColumn", { key: r, attrs: { label: n.label, prop: n.prop, align: "center", "header-align": "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: s }) {
|
|
1026
|
+
return [i("ElCheckbox", { on: { change: function(l) {
|
|
1027
|
+
return e.handleChange(n.prop);
|
|
1028
|
+
} }, model: { value: e.crud.objectOption[s.prop][n.prop], callback: function(l) {
|
|
1029
|
+
e.$set(e.crud.objectOption[s.prop], n.prop, l);
|
|
1030
|
+
}, expression: "crud.objectOption[row.prop][item.prop]" } })];
|
|
1031
|
+
} }], null, !0) }) : e._e()];
|
|
1032
|
+
})], 2)], 1)], 1) : e._e();
|
|
1033
|
+
}, Pe = [], De = /* @__PURE__ */ f(
|
|
1034
|
+
Ie,
|
|
1035
|
+
Ee,
|
|
1036
|
+
Pe,
|
|
1057
1037
|
!1,
|
|
1058
1038
|
null,
|
|
1059
1039
|
null
|
|
1060
1040
|
);
|
|
1061
|
-
const
|
|
1062
|
-
name: "
|
|
1063
|
-
directives: {
|
|
1064
|
-
permission: B
|
|
1065
|
-
},
|
|
1041
|
+
const Te = De.exports, ze = {
|
|
1042
|
+
name: "DialogExcel",
|
|
1066
1043
|
inject: ["crud"],
|
|
1067
1044
|
data() {
|
|
1068
1045
|
return {
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1046
|
+
option: {},
|
|
1047
|
+
columnOption: {},
|
|
1048
|
+
box: !1,
|
|
1049
|
+
form: {
|
|
1050
|
+
name: this.crud.tableOption.title
|
|
1051
|
+
}
|
|
1052
|
+
};
|
|
1053
|
+
},
|
|
1054
|
+
methods: {
|
|
1055
|
+
handleShow() {
|
|
1056
|
+
this.getColumnOption(), this.getOption(), this.box = !0;
|
|
1057
|
+
},
|
|
1058
|
+
handleSubmit() {
|
|
1059
|
+
this.$Export.excel({
|
|
1060
|
+
title: this.form.name,
|
|
1061
|
+
columns: this.getColumn(),
|
|
1062
|
+
data: this.handleSum()
|
|
1063
|
+
}), this.box = !1;
|
|
1064
|
+
},
|
|
1065
|
+
// 计算统计
|
|
1066
|
+
handleSum() {
|
|
1067
|
+
const t = this.crud.tableOption, e = this.crud.propOption, i = this.form.type ? this.crud.list : this.crud.tableSelect, n = [];
|
|
1068
|
+
return this.form.params.includes("data") && i.forEach((r) => {
|
|
1069
|
+
const s = a(r);
|
|
1070
|
+
e.forEach((l) => {
|
|
1071
|
+
const o = l.parentProp ? (this.crud.cascaderDIC[l.$index] || {})[l.prop] : this.crud.DIC[l.prop];
|
|
1072
|
+
s[l.prop] = w(s, l, t, o);
|
|
1073
|
+
}), n.push(s);
|
|
1074
|
+
}), this.form.params.includes("sum") && t.showSummary && n.push(this.crud.sumsList), n;
|
|
1075
|
+
},
|
|
1076
|
+
getOption() {
|
|
1077
|
+
this.option = {
|
|
1078
|
+
submitBtn: !1,
|
|
1079
|
+
emptyBtn: !1,
|
|
1080
|
+
column: [
|
|
1079
1081
|
{
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
i.setTime(i.getTime() - 3600 * 1e3 * 24 * 1), t.$emit("pick", [i, e]);
|
|
1084
|
-
}
|
|
1082
|
+
label: "文件名",
|
|
1083
|
+
prop: "name",
|
|
1084
|
+
span: 24
|
|
1085
1085
|
},
|
|
1086
1086
|
{
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1087
|
+
label: "选择数据",
|
|
1088
|
+
prop: "type",
|
|
1089
|
+
span: 24,
|
|
1090
|
+
type: "select",
|
|
1091
|
+
dicData: [
|
|
1092
|
+
{
|
|
1093
|
+
label: "当前数据(当前页全部的数据)",
|
|
1094
|
+
value: !0
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
label: "选中的数据(当前页选中的数据)",
|
|
1098
|
+
disabled: this.crud.tableOption.selection !== !0,
|
|
1099
|
+
value: !1
|
|
1100
|
+
}
|
|
1101
|
+
]
|
|
1092
1102
|
},
|
|
1093
1103
|
{
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1104
|
+
label: "选择字段",
|
|
1105
|
+
prop: "prop",
|
|
1106
|
+
type: "tree",
|
|
1107
|
+
multiple: !0,
|
|
1108
|
+
checkStrictly: !0,
|
|
1109
|
+
span: 24,
|
|
1110
|
+
props: {
|
|
1111
|
+
value: "prop"
|
|
1112
|
+
},
|
|
1113
|
+
dicData: this.columnOption
|
|
1099
1114
|
},
|
|
1100
1115
|
{
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1116
|
+
label: "参数设置",
|
|
1117
|
+
prop: "params",
|
|
1118
|
+
type: "checkbox",
|
|
1119
|
+
span: 24,
|
|
1120
|
+
value: ["header", "data"].concat(
|
|
1121
|
+
(() => {
|
|
1122
|
+
const t = [];
|
|
1123
|
+
return this.crud.isHeader && t.push("headers"), this.crud.isShowSummary && t.push("sum"), t;
|
|
1124
|
+
})()
|
|
1125
|
+
),
|
|
1126
|
+
dicData: [
|
|
1127
|
+
{
|
|
1128
|
+
label: "表头",
|
|
1129
|
+
disabled: !0,
|
|
1130
|
+
value: "header"
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
label: "数据源",
|
|
1134
|
+
value: "data"
|
|
1135
|
+
}
|
|
1136
|
+
].concat(
|
|
1137
|
+
(() => {
|
|
1138
|
+
const t = [];
|
|
1139
|
+
return t.push({
|
|
1140
|
+
label: "复杂表头",
|
|
1141
|
+
value: "headers",
|
|
1142
|
+
disabled: !this.crud.isHeader
|
|
1143
|
+
}), t.push({
|
|
1144
|
+
label: "合计统计",
|
|
1145
|
+
value: "sum",
|
|
1146
|
+
disabled: !this.crud.isShowSummary
|
|
1147
|
+
}), t;
|
|
1148
|
+
})()
|
|
1149
|
+
)
|
|
1150
|
+
}
|
|
1151
|
+
]
|
|
1152
|
+
}, this.form.type = this.crud.selectLen === 0;
|
|
1123
1153
|
},
|
|
1124
|
-
|
|
1125
|
-
this.crud
|
|
1154
|
+
getColumnOption() {
|
|
1155
|
+
const t = a(this.crud.columnOption), e = [], i = (n = []) => {
|
|
1156
|
+
n.forEach((r, s) => {
|
|
1157
|
+
const l = r.children;
|
|
1158
|
+
l && !Array.isArray(l) ? delete r.children : r.showColumn === !1 ? n.splice(s, 1) : (e.push(r.prop), r.children && i(l));
|
|
1159
|
+
});
|
|
1160
|
+
};
|
|
1161
|
+
i(t), this.columnOption = t, this.form.prop = e;
|
|
1126
1162
|
},
|
|
1127
|
-
|
|
1128
|
-
|
|
1163
|
+
getColumn() {
|
|
1164
|
+
const t = a(this.columnOption), e = this.$refs.form.getPropRef("prop").$refs.temp.getHalfList();
|
|
1165
|
+
if (!this.form.params) return [];
|
|
1166
|
+
if (this.form.params.includes("headers")) {
|
|
1167
|
+
const i = (n = []) => {
|
|
1168
|
+
n.forEach((r, s) => {
|
|
1169
|
+
e.includes(r.prop) ? r.children && i(r.children) : n.splice(s, 1);
|
|
1170
|
+
});
|
|
1171
|
+
};
|
|
1172
|
+
return i(t), t;
|
|
1173
|
+
} else {
|
|
1174
|
+
const i = [], n = (r = []) => {
|
|
1175
|
+
r.forEach((s) => {
|
|
1176
|
+
s.children ? n(s.children) : e.includes(s.prop) && i.push(s);
|
|
1177
|
+
});
|
|
1178
|
+
};
|
|
1179
|
+
return n(t), i;
|
|
1180
|
+
}
|
|
1129
1181
|
}
|
|
1130
1182
|
}
|
|
1131
1183
|
};
|
|
1132
|
-
var
|
|
1184
|
+
var Me = function() {
|
|
1133
1185
|
var e = this, i = e._self._c;
|
|
1134
|
-
return
|
|
1135
|
-
|
|
1136
|
-
} }
|
|
1137
|
-
return e.crud
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
} }
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1186
|
+
return e.box ? i("div", [i("ElementDialog", { staticClass: "avue-dialog", attrs: { title: "导出", "lock-scroll": "", visible: e.box, width: e.crud.isMobile ? "100%" : "30%" }, on: { "update:visible": function(n) {
|
|
1187
|
+
e.box = n;
|
|
1188
|
+
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
1189
|
+
return [i("span", { staticClass: "dialog-footer" }, [i("ElButton", { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleSubmit } }, [e._v("确定")]), i("ElButton", { attrs: { size: e.crud.isMediumSize }, on: { click: function(n) {
|
|
1190
|
+
e.box = !1;
|
|
1191
|
+
} } }, [e._v("取消")])], 1)];
|
|
1192
|
+
}, proxy: !0 }], null, !1, 2375905330) }, [i("FyForm", { attrs: { option: e.option }, model: { value: e.form, callback: function(n) {
|
|
1193
|
+
e.form = n;
|
|
1194
|
+
}, expression: "form" } })], 1)], 1) : e._e();
|
|
1195
|
+
}, Le = [], Ve = /* @__PURE__ */ f(
|
|
1196
|
+
ze,
|
|
1197
|
+
Me,
|
|
1198
|
+
Le,
|
|
1145
1199
|
!1,
|
|
1146
1200
|
null,
|
|
1147
1201
|
null
|
|
1148
1202
|
);
|
|
1149
|
-
const
|
|
1150
|
-
name: "
|
|
1151
|
-
mixins: [fe],
|
|
1203
|
+
const Re = Ve.exports, Ae = {
|
|
1204
|
+
name: "DialogFilter",
|
|
1152
1205
|
inject: ["crud"],
|
|
1153
|
-
props: {
|
|
1154
|
-
search: Object
|
|
1155
|
-
},
|
|
1156
1206
|
data() {
|
|
1157
1207
|
return {
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1208
|
+
box: !1,
|
|
1209
|
+
columnObj: {},
|
|
1210
|
+
symbolDic: [
|
|
1211
|
+
{
|
|
1212
|
+
label: "=",
|
|
1213
|
+
value: "="
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
label: "≠",
|
|
1217
|
+
value: "≠"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
label: "like",
|
|
1221
|
+
value: "like"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
label: ">",
|
|
1225
|
+
value: ">"
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
label: "≥",
|
|
1229
|
+
value: "≥"
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
label: "<",
|
|
1233
|
+
value: "<"
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
label: "≤",
|
|
1237
|
+
value: "≤"
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
label: "∈",
|
|
1241
|
+
value: "∈"
|
|
1242
|
+
}
|
|
1243
|
+
],
|
|
1244
|
+
list: [],
|
|
1245
|
+
columnOption: {}
|
|
1161
1246
|
};
|
|
1162
1247
|
},
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
return this.crud.search;
|
|
1167
|
-
},
|
|
1168
|
-
set(t) {
|
|
1169
|
-
this.crud.$emit("update:search", t);
|
|
1170
|
-
}
|
|
1171
|
-
},
|
|
1172
|
-
option() {
|
|
1173
|
-
const t = this.crud.option, e = (n = []) => {
|
|
1174
|
-
n = c(n);
|
|
1175
|
-
const r = [];
|
|
1176
|
-
let s = 0;
|
|
1177
|
-
return n = n.sort((o, a) => (a.searchOrder || 0) - (o.searchOrder || 0)), n.forEach((o) => {
|
|
1178
|
-
if (o.search) {
|
|
1179
|
-
const a = s < this.searchIndex, f = {};
|
|
1180
|
-
Object.keys(o).forEach((d) => {
|
|
1181
|
-
const v = "search";
|
|
1182
|
-
if (d !== "searchProp" && d.includes(v)) {
|
|
1183
|
-
let p = d.replace(v, "");
|
|
1184
|
-
if (p.length === 0) return;
|
|
1185
|
-
p = p.replace(p[0], p[0].toLowerCase()), f[p] = o[d];
|
|
1186
|
-
}
|
|
1187
|
-
}), o = Object.assign(o, f, {
|
|
1188
|
-
type: ge(o),
|
|
1189
|
-
detail: !1,
|
|
1190
|
-
dicFlag: o.cascader ? !0 : m(o.dicFlag, !1),
|
|
1191
|
-
span: o.searchSpan || t.searchSpan || h.searchSpan,
|
|
1192
|
-
control: o.searchControl,
|
|
1193
|
-
gutter: o.searchGutter || t.searchGutter || h.searchGutter,
|
|
1194
|
-
labelWidth: o.searchLabelWidth || t.searchLabelWidth || h.searchLabelWidth,
|
|
1195
|
-
labelPosition: o.searchLabelPosition || t.searchLabelPosition,
|
|
1196
|
-
size: o.searchSize || t.searchSize,
|
|
1197
|
-
value: o.searchValue,
|
|
1198
|
-
rules: o.searchRules,
|
|
1199
|
-
row: o.searchRow,
|
|
1200
|
-
bind: o.searchBin,
|
|
1201
|
-
disabled: o.searchDisabled,
|
|
1202
|
-
readonly: o.searchReadonly,
|
|
1203
|
-
display: this.isSearchIcon ? this.show ? !0 : a : !0
|
|
1204
|
-
}), r.push(o), s = s + 1;
|
|
1205
|
-
}
|
|
1206
|
-
}), r;
|
|
1207
|
-
};
|
|
1208
|
-
return ((n) => {
|
|
1209
|
-
let r = c(n);
|
|
1210
|
-
return r.column = e(this.crud.propOption), r = Object.assign(r, {
|
|
1211
|
-
rowKey: t.searchRowKey || "null",
|
|
1212
|
-
tabs: !1,
|
|
1213
|
-
group: !1,
|
|
1214
|
-
printBtn: !1,
|
|
1215
|
-
mockBtn: !1,
|
|
1216
|
-
filterDic: t.searchFilterDic,
|
|
1217
|
-
filterNull: t.searchFilterNull,
|
|
1218
|
-
filterParam: t.searchFilterParam,
|
|
1219
|
-
enter: t.searchEnter,
|
|
1220
|
-
size: t.searchSize,
|
|
1221
|
-
submitText: t.searchBtnText || "搜 索",
|
|
1222
|
-
submitBtn: m(t.searchBtn, h.searchSubBtn),
|
|
1223
|
-
submitIcon: this.crud.getBtnIcon("searchBtn"),
|
|
1224
|
-
emptyText: t.emptyBtnText || "清 空",
|
|
1225
|
-
emptyBtn: m(t.emptyBtn, h.emptyBtn),
|
|
1226
|
-
emptyIcon: this.crud.getBtnIcon("emptyBtn"),
|
|
1227
|
-
menuSpan: this.show || !this.isSearchIcon || t.searchMenuSpan < 6 ? t.searchMenuSpan : 6,
|
|
1228
|
-
menuPosition: t.searchMenuPosition || "center",
|
|
1229
|
-
dicFlag: !1,
|
|
1230
|
-
dicData: this.crud.DIC
|
|
1231
|
-
}), r;
|
|
1232
|
-
})(t);
|
|
1233
|
-
},
|
|
1234
|
-
isSearchIcon() {
|
|
1235
|
-
return m(this.crud.option.searchIcon, this.$AVUE.searchIcon) && this.searchLen > this.searchIndex;
|
|
1236
|
-
},
|
|
1237
|
-
searchLen() {
|
|
1238
|
-
let t = 0;
|
|
1239
|
-
return this.crud.propOption.forEach((e) => {
|
|
1240
|
-
e.search && t++;
|
|
1241
|
-
}), t;
|
|
1248
|
+
methods: {
|
|
1249
|
+
handleShow() {
|
|
1250
|
+
this.getColumnOption(), this.box = !0;
|
|
1242
1251
|
},
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
},
|
|
1252
|
-
deep: !0
|
|
1252
|
+
getColumnOption() {
|
|
1253
|
+
const t = [];
|
|
1254
|
+
a(this.crud.propOption).forEach((i) => {
|
|
1255
|
+
i.showColumn !== !1 && t.push(
|
|
1256
|
+
Object.assign(i, {
|
|
1257
|
+
value: i.prop
|
|
1258
|
+
})
|
|
1259
|
+
);
|
|
1260
|
+
}), this.columnOption = t, this.columnObj = this.columnOption[0];
|
|
1253
1261
|
},
|
|
1254
|
-
|
|
1255
|
-
this.
|
|
1262
|
+
handleDelete(t) {
|
|
1263
|
+
this.list.splice(t, 1);
|
|
1256
1264
|
},
|
|
1257
|
-
|
|
1258
|
-
this.
|
|
1265
|
+
handleClear() {
|
|
1266
|
+
this.list = [];
|
|
1259
1267
|
},
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
handler() {
|
|
1264
|
-
var t;
|
|
1265
|
-
this.searchIndex = ((t = this.option) == null ? void 0 : t.searchIndex) || 2;
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
},
|
|
1269
|
-
created() {
|
|
1270
|
-
this.initFun(), this.dataFormat();
|
|
1271
|
-
},
|
|
1272
|
-
methods: {
|
|
1273
|
-
initFun() {
|
|
1274
|
-
["searchReset", "searchChange"].forEach((t) => {
|
|
1275
|
-
this.crud[t] = this[t];
|
|
1268
|
+
handleValueClear() {
|
|
1269
|
+
this.list.forEach((t) => {
|
|
1270
|
+
t.value = "";
|
|
1276
1271
|
});
|
|
1277
1272
|
},
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
t = S(t), this.crud.propOption.forEach((i) => {
|
|
1284
|
-
i.searchProp && (t[i.searchProp] = t[i.prop], delete t[i.prop]);
|
|
1285
|
-
}), this.crud.$emit("search-change", t, e);
|
|
1286
|
-
},
|
|
1287
|
-
// 搜索清空
|
|
1288
|
-
resetChange() {
|
|
1289
|
-
this.crud.$emit("search-reset", this.searchForm);
|
|
1290
|
-
},
|
|
1291
|
-
// 搜索清空
|
|
1292
|
-
searchReset() {
|
|
1293
|
-
this.$refs.form.resetForm();
|
|
1273
|
+
handleSubmit() {
|
|
1274
|
+
const t = [];
|
|
1275
|
+
this.list.forEach((e) => {
|
|
1276
|
+
t.push([e.text, e.symbol, e.value]);
|
|
1277
|
+
}), this.crud.$emit("filter", t), this.box = !1;
|
|
1294
1278
|
},
|
|
1295
|
-
|
|
1296
|
-
this.
|
|
1279
|
+
handleChange(t) {
|
|
1280
|
+
this.list[t].value = "";
|
|
1297
1281
|
},
|
|
1298
|
-
|
|
1299
|
-
const t = this.
|
|
1300
|
-
this.
|
|
1282
|
+
handleAdd() {
|
|
1283
|
+
const t = this.columnObj.prop;
|
|
1284
|
+
this.list.push({
|
|
1285
|
+
text: t,
|
|
1286
|
+
value: "",
|
|
1287
|
+
symbol: this.symbolDic[0].value
|
|
1288
|
+
});
|
|
1301
1289
|
}
|
|
1302
1290
|
}
|
|
1303
1291
|
};
|
|
1304
|
-
var
|
|
1292
|
+
var He = function() {
|
|
1305
1293
|
var e = this, i = e._self._c;
|
|
1306
|
-
return e.
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
e
|
|
1317
|
-
} } },
|
|
1318
|
-
e.
|
|
1319
|
-
} } }
|
|
1320
|
-
} }, e.
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
search: e.searchForm,
|
|
1328
|
-
row: e.searchForm
|
|
1329
|
-
})
|
|
1330
|
-
)];
|
|
1331
|
-
} };
|
|
1332
|
-
})], null, !0), model: { value: e.searchForm, callback: function(n) {
|
|
1333
|
-
e.searchForm = n;
|
|
1334
|
-
}, expression: "searchForm" } })], 2) : e._e();
|
|
1335
|
-
}, mt = [], ft = /* @__PURE__ */ g(
|
|
1336
|
-
pt,
|
|
1337
|
-
ht,
|
|
1338
|
-
mt,
|
|
1294
|
+
return e.box ? i("div", [i("ElDrawer", { staticClass: "avue-dialog", class: ["avue-crud__dialog", "avue-crud__filter"], attrs: { "lock-scroll": "", "append-to-body": "", title: "过滤条件", size: e.crud.isMobile ? "100%" : "60%", visible: e.box }, on: { "update:visible": function(n) {
|
|
1295
|
+
e.box = n;
|
|
1296
|
+
} } }, [i("ElRow", { attrs: { span: 24 } }, [i("div", { staticClass: "avue-crud__filter-menu" }, [i("ElButtonGroup", [i("ElButton", { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleAdd } }, [e._v(" 新增条件 ")]), i("ElButton", { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleClear } }, [e._v(" 清空条件 ")]), i("ElButton", { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleValueClear } }, [e._v(" 清空数据 ")])], 1)], 1), e._l(e.list, function(n, r) {
|
|
1297
|
+
return i("ElCol", { key: r, staticClass: "avue-crud__filter-item", attrs: { md: 12, xs: 24, sm: 12 } }, [i("FySelect", { staticClass: "avue-crud__filter-label", attrs: { dic: e.columnOption, clearable: !1, size: e.crud.isMediumSize }, on: { change: function(s) {
|
|
1298
|
+
return e.handleChange(r);
|
|
1299
|
+
} }, model: { value: n.text, callback: function(s) {
|
|
1300
|
+
e.$set(n, "text", s);
|
|
1301
|
+
}, expression: "column.text" } }), i("FySelect", { staticClass: "avue-crud__filter-symbol", attrs: { dic: e.symbolDic, clearable: !1, size: e.crud.isMediumSize }, model: { value: n.symbol, callback: function(s) {
|
|
1302
|
+
e.$set(n, "symbol", s);
|
|
1303
|
+
}, expression: "column.symbol" } }), i("FyInput", { staticClass: "avue-crud__filter-value", attrs: { size: e.crud.isMediumSize }, model: { value: n.value, callback: function(s) {
|
|
1304
|
+
e.$set(n, "value", s);
|
|
1305
|
+
}, expression: "column.value" } }), i("ElButton", { staticClass: "avue-crud__filter-icon", attrs: { type: "danger", size: "mini", circle: "", icon: "el-icon-minus" }, on: { click: function(s) {
|
|
1306
|
+
return e.handleDelete(r);
|
|
1307
|
+
} } })], 1);
|
|
1308
|
+
}), i("ElCol", { staticClass: "avue-form__menu avue-form__menu--right", attrs: { span: 24 } }, [i("ElButton", { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleSubmit } }, [e._v(" 确 定 ")]), i("ElButton", { attrs: { size: e.crud.isMediumSize }, on: { click: function(n) {
|
|
1309
|
+
e.box = !1;
|
|
1310
|
+
} } }, [e._v(" 取 消 ")])], 1)], 2)], 1)], 1) : e._e();
|
|
1311
|
+
}, Ne = [], je = /* @__PURE__ */ f(
|
|
1312
|
+
Ae,
|
|
1313
|
+
He,
|
|
1314
|
+
Ne,
|
|
1339
1315
|
!1,
|
|
1340
1316
|
null,
|
|
1341
1317
|
null
|
|
1342
1318
|
);
|
|
1343
|
-
const
|
|
1319
|
+
const We = je.exports, Ke = {
|
|
1344
1320
|
name: "FyCurd",
|
|
1345
1321
|
components: {
|
|
1346
|
-
DialogFilter:
|
|
1347
|
-
DialogExcel:
|
|
1348
|
-
DialogColumn:
|
|
1349
|
-
FyDialogForm:
|
|
1350
|
-
TablePage:
|
|
1351
|
-
ColumnMenu:
|
|
1352
|
-
ColumnDefault:
|
|
1353
|
-
Column:
|
|
1354
|
-
HeaderMenu:
|
|
1355
|
-
HeaderSearch:
|
|
1322
|
+
DialogFilter: We,
|
|
1323
|
+
DialogExcel: Re,
|
|
1324
|
+
DialogColumn: Te,
|
|
1325
|
+
FyDialogForm: ke,
|
|
1326
|
+
TablePage: we,
|
|
1327
|
+
ColumnMenu: ve,
|
|
1328
|
+
ColumnDefault: me,
|
|
1329
|
+
Column: ce,
|
|
1330
|
+
HeaderMenu: X,
|
|
1331
|
+
HeaderSearch: W
|
|
1356
1332
|
},
|
|
1357
1333
|
directives: {
|
|
1358
|
-
permission:
|
|
1334
|
+
permission: x
|
|
1359
1335
|
},
|
|
1360
|
-
mixins: [
|
|
1336
|
+
mixins: [O],
|
|
1361
1337
|
provide() {
|
|
1362
1338
|
return {
|
|
1363
1339
|
crud: this
|
|
@@ -1418,7 +1394,7 @@ const G = ft.exports, gt = {
|
|
|
1418
1394
|
cellForm: {
|
|
1419
1395
|
list: []
|
|
1420
1396
|
},
|
|
1421
|
-
config:
|
|
1397
|
+
config: p,
|
|
1422
1398
|
list: [],
|
|
1423
1399
|
listError: {},
|
|
1424
1400
|
tableForm: {},
|
|
@@ -1484,7 +1460,7 @@ const G = ft.exports, gt = {
|
|
|
1484
1460
|
Array.isArray(n.children) ? e(n.children) : t.push(n);
|
|
1485
1461
|
});
|
|
1486
1462
|
}
|
|
1487
|
-
return e(this.columnOption), t =
|
|
1463
|
+
return e(this.columnOption), t = E(t), t;
|
|
1488
1464
|
},
|
|
1489
1465
|
isShowSummary() {
|
|
1490
1466
|
return this.option.showSummary;
|
|
@@ -1548,13 +1524,13 @@ const G = ft.exports, gt = {
|
|
|
1548
1524
|
this.dataInit(), this.getTableHeight(), this.refreshTable();
|
|
1549
1525
|
},
|
|
1550
1526
|
methods: {
|
|
1551
|
-
setPx:
|
|
1552
|
-
optVal:
|
|
1527
|
+
setPx: z,
|
|
1528
|
+
optVal: h,
|
|
1553
1529
|
handleValidate(t, e, i) {
|
|
1554
1530
|
this.listError[t] || this.$set(this.listError, t, { valid: !1, msg: "" }), this.listError[t].valid = !e, this.listError[t].msg = i;
|
|
1555
1531
|
},
|
|
1556
1532
|
getPermission(t, e, i) {
|
|
1557
|
-
return typeof this.permission == "function" ? this.permission(t, e, i) :
|
|
1533
|
+
return typeof this.permission == "function" ? this.permission(t, e, i) : c(this.permission[t]) ? !0 : this.permission[t];
|
|
1558
1534
|
},
|
|
1559
1535
|
getTableHeight() {
|
|
1560
1536
|
this.isAutoHeight ? this.$nextTick(() => {
|
|
@@ -1579,18 +1555,18 @@ const G = ft.exports, gt = {
|
|
|
1579
1555
|
});
|
|
1580
1556
|
},
|
|
1581
1557
|
menuIcon(t) {
|
|
1582
|
-
return
|
|
1558
|
+
return h(this.tableOption[`${t}Text`], I(`crud.${t}`));
|
|
1583
1559
|
},
|
|
1584
1560
|
getBtnIcon(t) {
|
|
1585
1561
|
const e = `${t}Icon`;
|
|
1586
|
-
return this.tableOption[e] ||
|
|
1562
|
+
return this.tableOption[e] || p[e];
|
|
1587
1563
|
},
|
|
1588
1564
|
// 对部分表单字段进行校验的方法
|
|
1589
1565
|
validateField(t) {
|
|
1590
1566
|
return this.$refs.dialogForm.$refs.tableForm.validateField(t);
|
|
1591
1567
|
},
|
|
1592
1568
|
selectClear() {
|
|
1593
|
-
this.$emit("selection-clear",
|
|
1569
|
+
this.$emit("selection-clear", a(this.tableSelect)), this.$refs.table.clearSelection();
|
|
1594
1570
|
},
|
|
1595
1571
|
toggleRowSelection(t, e) {
|
|
1596
1572
|
this.$refs.table.toggleRowSelection(t, e);
|
|
@@ -1603,7 +1579,7 @@ const G = ft.exports, gt = {
|
|
|
1603
1579
|
},
|
|
1604
1580
|
dataInit() {
|
|
1605
1581
|
this.list = this.data, this.list.forEach((t, e) => {
|
|
1606
|
-
t.$cellEdit && !this.cascaderFormList[e] && (this.cascaderFormList[e] =
|
|
1582
|
+
t.$cellEdit && !this.cascaderFormList[e] && (this.cascaderFormList[e] = a(t)), this.$set(t, "$cellEdit", t.$cellEdit || !1), this.$set(t, "$index", e);
|
|
1607
1583
|
});
|
|
1608
1584
|
},
|
|
1609
1585
|
// 拖动表头事件
|
|
@@ -1698,8 +1674,8 @@ const G = ft.exports, gt = {
|
|
|
1698
1674
|
},
|
|
1699
1675
|
// 单元格新增
|
|
1700
1676
|
rowCellAdd(t = {}) {
|
|
1701
|
-
const e = this.list.length, i =
|
|
1702
|
-
t =
|
|
1677
|
+
const e = this.list.length, i = k(this.propOption).tableForm;
|
|
1678
|
+
t = a({
|
|
1703
1679
|
$cellEdit: !0,
|
|
1704
1680
|
$index: e,
|
|
1705
1681
|
...i,
|
|
@@ -1708,24 +1684,24 @@ const G = ft.exports, gt = {
|
|
|
1708
1684
|
},
|
|
1709
1685
|
// 行取消
|
|
1710
1686
|
rowCancel(t, e) {
|
|
1711
|
-
|
|
1687
|
+
c(t[this.rowKey]) ? (this.list.splice(e, 1), delete this.cascaderDIC[e]) : (this.cascaderFormList[e].$cellEdit = !1, this.$set(this.cascaderDIC, e, this.cascaderDicList[e]), this.$set(this.list, e, this.cascaderFormList[e])), delete this.cascaderDicList[e], delete this.cascaderFormList[e], this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(e), 1);
|
|
1712
1688
|
},
|
|
1713
1689
|
// 行编辑点击
|
|
1714
1690
|
rowCell(t, e) {
|
|
1715
1691
|
t.$cellEdit ? this.rowCellUpdate(t, e) : this.rowCellEdit(t, e);
|
|
1716
1692
|
},
|
|
1717
1693
|
rowCellUpdate(t, e) {
|
|
1718
|
-
t =
|
|
1694
|
+
t = a(t);
|
|
1719
1695
|
const i = this.validateCellField(e), n = () => {
|
|
1720
1696
|
this.btnDisabledList[e] = !1, this.btnDisabled = !1, this.list[e].$cellEdit = !1, this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(e), 1), delete this.cascaderFormList[e];
|
|
1721
1697
|
}, r = () => {
|
|
1722
1698
|
this.btnDisabledList[e] = !1, this.btnDisabled = !1;
|
|
1723
1699
|
};
|
|
1724
|
-
i && (this.btnDisabledList[e] = !0, this.btnDisabled = !0,
|
|
1700
|
+
i && (this.btnDisabledList[e] = !0, this.btnDisabled = !0, c(t[this.rowKey]) ? this.$emit("row-save", t, n, r) : this.$emit("row-update", t, e, n, r));
|
|
1725
1701
|
},
|
|
1726
1702
|
// 单元格编辑
|
|
1727
1703
|
rowCellEdit(t, e) {
|
|
1728
|
-
t.$cellEdit = !0, this.cascaderFormList[e] =
|
|
1704
|
+
t.$cellEdit = !0, this.cascaderFormList[e] = a(t), this.cascaderDicList[e] = a(this.cascaderDIC[e]);
|
|
1729
1705
|
},
|
|
1730
1706
|
// 对部分表单字段进行校验
|
|
1731
1707
|
validateCellForm() {
|
|
@@ -1763,15 +1739,15 @@ const G = ft.exports, gt = {
|
|
|
1763
1739
|
},
|
|
1764
1740
|
// 编辑
|
|
1765
1741
|
rowEdit(t, e) {
|
|
1766
|
-
this.tableForm =
|
|
1742
|
+
this.tableForm = a(t), this.tableIndex = e, this.setVal(), this.$refs.dialogForm.show("edit");
|
|
1767
1743
|
},
|
|
1768
1744
|
// 复制
|
|
1769
1745
|
rowCopy(t) {
|
|
1770
|
-
this.tableForm =
|
|
1746
|
+
this.tableForm = a(t), delete this.tableForm[this.rowKey], this.tableIndex = -1, this.setVal(), this.$refs.dialogForm.show("add");
|
|
1771
1747
|
},
|
|
1772
1748
|
// 查看
|
|
1773
1749
|
rowView(t, e) {
|
|
1774
|
-
this.tableForm =
|
|
1750
|
+
this.tableForm = a(t), this.tableIndex = e, this.setVal(), this.$refs.dialogForm.show("view");
|
|
1775
1751
|
},
|
|
1776
1752
|
// 删除
|
|
1777
1753
|
rowDel(t, e) {
|
|
@@ -1790,31 +1766,31 @@ const G = ft.exports, gt = {
|
|
|
1790
1766
|
if (typeof this.summaryMethod == "function")
|
|
1791
1767
|
return this.summaryMethod(t);
|
|
1792
1768
|
const { columns: i, data: n } = t, r = [];
|
|
1793
|
-
return i.length > 0 && i.forEach((s,
|
|
1794
|
-
const
|
|
1795
|
-
if (
|
|
1796
|
-
const
|
|
1797
|
-
let
|
|
1798
|
-
switch (
|
|
1769
|
+
return i.length > 0 && i.forEach((s, l) => {
|
|
1770
|
+
const o = this.sumColumnList.find((m) => m.name === s.property);
|
|
1771
|
+
if (o) {
|
|
1772
|
+
const m = o.decimals || 2, u = o.label || "";
|
|
1773
|
+
let g = 1;
|
|
1774
|
+
switch (o.type) {
|
|
1799
1775
|
case "count":
|
|
1800
|
-
r[
|
|
1776
|
+
r[l] = u + n.length;
|
|
1801
1777
|
break;
|
|
1802
1778
|
case "avg":
|
|
1803
|
-
r[
|
|
1804
|
-
const
|
|
1805
|
-
return isNaN(
|
|
1806
|
-
}, 0), r[
|
|
1779
|
+
r[l] = n.map((d) => Number(d[s.property])).reduce((d, _) => {
|
|
1780
|
+
const v = Number(_);
|
|
1781
|
+
return isNaN(v) ? d : (d * (g - 1) + _) / g++;
|
|
1782
|
+
}, 0), r[l] = u + r[l].toFixed(m);
|
|
1807
1783
|
break;
|
|
1808
1784
|
case "sum":
|
|
1809
|
-
r[
|
|
1810
|
-
const
|
|
1811
|
-
return isNaN(
|
|
1812
|
-
}, 0), r[
|
|
1785
|
+
r[l] = n.map((d) => Number(d[s.property])).reduce((d, _) => {
|
|
1786
|
+
const v = Number(_);
|
|
1787
|
+
return isNaN(v) ? d : d + _;
|
|
1788
|
+
}, 0), r[l] = u + r[l].toFixed(m);
|
|
1813
1789
|
break;
|
|
1814
1790
|
}
|
|
1815
|
-
e[s.property] = r[
|
|
1791
|
+
e[s.property] = r[l];
|
|
1816
1792
|
} else
|
|
1817
|
-
r[
|
|
1793
|
+
r[l] = "";
|
|
1818
1794
|
}), this.sumsList = e, r;
|
|
1819
1795
|
},
|
|
1820
1796
|
tableDrop(t, e, i) {
|
|
@@ -1825,12 +1801,12 @@ const G = ft.exports, gt = {
|
|
|
1825
1801
|
return;
|
|
1826
1802
|
}
|
|
1827
1803
|
if (!window.Sortable) {
|
|
1828
|
-
|
|
1804
|
+
$.logs("Sortable");
|
|
1829
1805
|
return;
|
|
1830
1806
|
}
|
|
1831
1807
|
window.Sortable.create(e, {
|
|
1832
|
-
ghostClass:
|
|
1833
|
-
chosenClass:
|
|
1808
|
+
ghostClass: p.ghostClass,
|
|
1809
|
+
chosenClass: p.ghostClass,
|
|
1834
1810
|
animation: 500,
|
|
1835
1811
|
delay: 0,
|
|
1836
1812
|
onEnd: (n) => i(n)
|
|
@@ -1839,10 +1815,10 @@ const G = ft.exports, gt = {
|
|
|
1839
1815
|
findData(t) {
|
|
1840
1816
|
let e = {};
|
|
1841
1817
|
const i = (n, r) => {
|
|
1842
|
-
n.forEach((s,
|
|
1818
|
+
n.forEach((s, l) => {
|
|
1843
1819
|
s[this.rowKey] === t && (e = {
|
|
1844
1820
|
item: s,
|
|
1845
|
-
index:
|
|
1821
|
+
index: l,
|
|
1846
1822
|
parentList: n,
|
|
1847
1823
|
parent: r
|
|
1848
1824
|
}), s[this.childrenKey] && i(s[this.childrenKey], s);
|
|
@@ -1852,9 +1828,9 @@ const G = ft.exports, gt = {
|
|
|
1852
1828
|
}
|
|
1853
1829
|
}
|
|
1854
1830
|
};
|
|
1855
|
-
var
|
|
1831
|
+
var Ue = function() {
|
|
1856
1832
|
var e = this, i = e._self._c;
|
|
1857
|
-
return i("div", { staticClass: "avue-crud avue-crud--card" }, [e.tableOption.title ? i(e.tableOption.titleSize || "h2", { tag: "Component", style: e.tableOption.titleStyle }, [e._v(" " + e._s(e.tableOption.title) + " ")]) : e._e(), i(
|
|
1833
|
+
return i("div", { staticClass: "avue-crud avue-crud--card" }, [e.tableOption.title ? i(e.tableOption.titleSize || "h2", { tag: "Component", style: e.tableOption.titleStyle }, [e._v(" " + e._s(e.tableOption.title) + " ")]) : e._e(), i("HeaderSearch", { ref: "headerSearch", scopedSlots: e._u([{ key: "search", fn: function(n) {
|
|
1858
1834
|
return [e._t("search", null, null, n)];
|
|
1859
1835
|
} }, { key: "searchMenu", fn: function(n) {
|
|
1860
1836
|
return [e._t("searchMenu", null, null, n)];
|
|
@@ -1862,14 +1838,14 @@ var _t = function() {
|
|
|
1862
1838
|
return { key: n, fn: function(r) {
|
|
1863
1839
|
return [e._t(n, null, null, r)];
|
|
1864
1840
|
} };
|
|
1865
|
-
})], null, !0) }), e.optVal(e.tableOption.header, !0) ? i(
|
|
1841
|
+
})], null, !0) }), e.optVal(e.tableOption.header, !0) ? i("HeaderMenu", { ref: "headerMenu", scopedSlots: e._u([{ key: "menuLeft", fn: function(n) {
|
|
1866
1842
|
return [e._t("menuLeft", null, null, n)];
|
|
1867
1843
|
} }, { key: "menuRight", fn: function(n) {
|
|
1868
1844
|
return [e._t("menuRight", null, null, n)];
|
|
1869
|
-
} }], null, !0) }) : e._e(), e.optVal(e.tableOption.tip, e.config.tip) && e.tableOption.selection ? i(
|
|
1870
|
-
return [e.$slots.empty ? e._t("empty") : i(
|
|
1871
|
-
}, proxy: !0 }], null, !0) }, [i(
|
|
1872
|
-
return [i(
|
|
1845
|
+
} }], null, !0) }) : e._e(), e.optVal(e.tableOption.tip, e.config.tip) && e.tableOption.selection ? i("ElTag", { staticClass: "avue-crud__tip" }, [i("span", { staticClass: "avue-crud__tip-name" }, [e._v(" 当前表格已选择 "), i("span", { staticClass: "avue-crud__tip-count" }, [e._v(e._s(e.selectLen))]), e._v(" 项 ")]), e.optVal(e.tableOption.selectClearBtn, e.config.selectClearBtn) && e.tableOption.selection ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.getPermission("selectClearBtn"), expression: "getPermission('selectClearBtn')" }], attrs: { type: "text", size: "small" }, on: { click: e.selectClear } }, [e._v(" 清 空 ")]) : e._e(), e._t("tip")], 2) : e._e(), e._t("header"), i("ElForm", { ref: "cellForm", attrs: { model: e.cellForm, "show-message": !1 }, on: { validate: e.handleValidate } }, [i("ElTable", { directives: [{ name: "loading", rawName: "v-loading", value: e.tableLoading, expression: "tableLoading" }], key: e.reload, ref: "table", class: { "avue-crud--indeterminate": e.optVal(e.tableOption.indeterminate, !1) }, attrs: { data: e.cellForm.list, "row-key": e.rowKey, size: e.$AVUE.tableSize || e.controlSize, lazy: e.optVal(e.tableOption.lazy, !1), load: e.treeLoad, "tree-props": e.treeProps, "expand-row-keys": e.tableOption.expandRowKeys, "default-expand-all": e.tableOption.defaultExpandAll, "highlight-current-row": e.tableOption.highlightCurrentRow, "show-summary": e.tableOption.showSummary, "summary-method": e.tableSummaryMethod, "span-method": e.tableSpanMethod, stripe: e.tableOption.stripe, "show-header": e.tableOption.showHeader, "default-sort": e.tableOption.defaultSort, "row-class-name": e.rowClassName, "cell-class-name": e.cellClassName, "row-style": e.rowStyle, "cell-style": e.cellStyle, fit: e.tableOption.fit, "header-cell-class-name": e.headerCellClassName, "max-height": e.isAutoHeight ? e.tableHeight : e.tableOption.maxHeight, height: e.tableHeight, width: e.setPx(e.tableOption.width, e.config.width), border: e.tableOption.border }, on: { "current-change": e.currentRowChange, "expand-change": e.expandChange, "header-dragend": e.headerDragend, "row-click": e.rowClick, "row-dblclick": e.rowDblclick, "cell-mouse-enter": e.cellMouseEnter, "cell-mouse-leave": e.cellMouseLeave, "cell-click": e.cellClick, "header-click": e.headerClick, "row-contextmenu": e.rowContextmenu, "header-contextmenu": e.headerContextmenu, "cell-dblclick": e.cellDblclick, "filter-change": e.filterChange, "selection-change": e.selectionChange, select: e.select, "select-all": e.selectAll, "sort-change": e.sortChange }, scopedSlots: e._u([{ key: "empty", fn: function() {
|
|
1846
|
+
return [e.$slots.empty ? e._t("empty") : i("ElEmpty", { staticClass: "avue-crud__empty", attrs: { "image-size": 100, description: e.tableOption.emptyText } })];
|
|
1847
|
+
}, proxy: !0 }], null, !0) }, [i("Column", { attrs: { "column-option": e.columnOption }, scopedSlots: e._u([{ key: "header", fn: function() {
|
|
1848
|
+
return [i("ColumnDefault", { ref: "columnDefault", scopedSlots: e._u([{ key: "expand", fn: function({ row: n, index: r }) {
|
|
1873
1849
|
return [e._t("expand", null, { row: n, index: r })];
|
|
1874
1850
|
} }], null, !0) })];
|
|
1875
1851
|
}, proxy: !0 }, e._l(e.mainSlot, function(n) {
|
|
@@ -1877,27 +1853,27 @@ var _t = function() {
|
|
|
1877
1853
|
return [e._t(n, null, null, r)];
|
|
1878
1854
|
} };
|
|
1879
1855
|
}), { key: "footer", fn: function() {
|
|
1880
|
-
return [i(
|
|
1856
|
+
return [i("ColumnMenu", { scopedSlots: e._u([{ key: "menu", fn: function(n) {
|
|
1881
1857
|
return [e._t("menu", null, null, n)];
|
|
1882
1858
|
} }, { key: "menuBtn", fn: function(n) {
|
|
1883
1859
|
return [e._t("menuBtn", null, null, n)];
|
|
1884
1860
|
} }], null, !0) })];
|
|
1885
|
-
}, proxy: !0 }], null, !0) })], 1)], 1), e._t("footer"), i(
|
|
1861
|
+
}, proxy: !0 }], null, !0) })], 1)], 1), e._t("footer"), i("TablePage", { ref: "tablePage" }), i("FyDialogForm", { ref: "dialogForm", scopedSlots: e._u([e._l(e.formSlot, function(n) {
|
|
1886
1862
|
return { key: n, fn: function(r) {
|
|
1887
1863
|
return [e._t(n, null, null, r)];
|
|
1888
1864
|
} };
|
|
1889
1865
|
}), { key: "menuForm", fn: function(n) {
|
|
1890
1866
|
return [e._t("menuForm", null, null, n)];
|
|
1891
|
-
} }], null, !0) }), i(
|
|
1892
|
-
},
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1867
|
+
} }], null, !0) }), i("DialogColumn", { ref: "dialogColumn" }), i("DialogExcel", { ref: "dialogExcel" }), i("DialogFilter", { ref: "dialogFilter" })], 2);
|
|
1868
|
+
}, Ge = [], qe = /* @__PURE__ */ f(
|
|
1869
|
+
Ke,
|
|
1870
|
+
Ue,
|
|
1871
|
+
Ge,
|
|
1896
1872
|
!1,
|
|
1897
1873
|
null,
|
|
1898
1874
|
null
|
|
1899
1875
|
);
|
|
1900
|
-
const
|
|
1876
|
+
const ot = qe.exports;
|
|
1901
1877
|
export {
|
|
1902
|
-
|
|
1878
|
+
ot as default
|
|
1903
1879
|
};
|