@web-utils/component 4.0.14 → 4.0.15
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 +15 -13
- package/card/index.mjs +20 -18
- package/carousel/index.mjs +12 -10
- package/chat/index.mjs +56 -45
- package/chunk-file-uploader/index.mjs +378 -36
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/{ElementTaskConfig.Bko0kgTp.mjs → ElementTaskConfig.AvBOzAni.mjs} +63 -55
- package/chunks/FormItem.Bhsy_O2B.mjs +372 -0
- package/chunks/FyForm.DriwCJ7b.mjs +765 -0
- package/chunks/SignalAndMessage.BpjOoKhK.mjs +92 -0
- package/chunks/SubTablePlus.BH0IIv3X.mjs +270 -0
- package/chunks/TableColumn.BzivvXMF.mjs +337 -0
- package/chunks/{confirmable-mixin.B2TtLAdk.mjs → confirmable-mixin.BFZb6pcK.mjs} +1 -1
- package/chunks/{dataformat.CpqOeGBl.mjs → dataformat.DJoNBlmI.mjs} +6 -6
- package/chunks/{dic.Dkl-leRW.mjs → dic.BinnDitI.mjs} +9 -9
- package/chunks/{event.9aDS6jcw.mjs → event.DSlcqYHL.mjs} +2 -2
- package/chunks/{form-input.CvFdwlEV.mjs → form-input.BtS_J5a2.mjs} +2 -2
- package/chunks/{index.9OxHjTIE.mjs → index.CIfe3UB3.mjs} +2 -2
- package/chunks/{index.B2TRddqf.mjs → index.Cn7aq-Et.mjs} +8 -8
- package/chunks/{init.DAsXSoLW.mjs → init.xOlFpTyZ.mjs} +2 -2
- package/chunks/{util.DqFv_pWg.mjs → util.DI42t5GU.mjs} +22 -22
- package/color-picker/index.mjs +101 -22
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/data-box/index.mjs +15 -12
- package/data-card/index.mjs +12 -10
- package/data-card-text/index.mjs +12 -10
- package/data-display/index.mjs +17 -15
- package/data-icons/index.mjs +16 -13
- package/data-imgtext/index.mjs +18 -15
- package/data-operatext/index.mjs +16 -14
- package/data-panel/index.mjs +16 -13
- package/data-pay/index.mjs +20 -16
- package/data-price/index.mjs +16 -14
- package/data-progress/index.mjs +17 -13
- package/data-rotate/index.mjs +15 -12
- package/data-table-picker/index.mjs +18 -15
- package/data-tabs/index.mjs +15 -12
- package/dialog-form/index.mjs +18 -16
- package/dynamic-table/index.mjs +30 -25
- package/editable-progress/index.mjs +11 -9
- package/editable-tree/index.mjs +56 -52
- package/egd-collapse-item/index.mjs +9 -9
- package/element-dialog/index.mjs +23 -22
- 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 +11 -10
- package/flow-designer/index.mjs +1973 -699
- 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 +34 -32
- package/form-cascader/index.mjs +24 -23
- package/form-checkbox/index.mjs +17 -16
- package/form-checkbox-group/index.mjs +23 -20
- package/form-date-picker/index.mjs +20 -18
- package/form-holder/index.mjs +14 -13
- package/form-input/index.mjs +15 -14
- package/form-input-cron-expression/index.mjs +22 -19
- package/form-input-email/index.mjs +16 -15
- package/form-input-id-card/index.mjs +13 -12
- package/form-input-number/index.mjs +17 -16
- package/form-input-phone-number/index.mjs +22 -21
- package/form-input-tag/index.mjs +15 -14
- package/form-input-time/index.mjs +15 -14
- package/form-item/index.mjs +3 -140
- package/form-item-group/index.mjs +31 -28
- package/form-radio-group/index.mjs +28 -27
- package/form-select/index.mjs +23 -21
- package/form-switch/index.mjs +17 -16
- package/form-table/index.mjs +17 -16
- package/form-table-plus/index.mjs +22 -21
- package/form-textarea/index.mjs +16 -15
- package/form-tree-select/index.mjs +15 -14
- package/form-tree-select-multiple/index.mjs +15 -14
- package/form-view/index.mjs +39 -35
- package/fy-array/index.mjs +37 -33
- package/fy-cascader/index.mjs +17 -16
- package/fy-checkbox/index.mjs +13 -11
- package/fy-code/index.mjs +10 -10
- package/fy-curd/index.mjs +1147 -1123
- package/fy-date/index.mjs +11 -10
- package/fy-draggable/index.mjs +10 -9
- package/fy-dynamic/index.mjs +25 -22
- package/fy-empty/index.mjs +1 -1
- package/fy-form/index.mjs +15 -638
- package/fy-form-design/index.mjs +1165 -1127
- package/fy-input/index.mjs +14 -12
- package/fy-input-color/index.mjs +15 -13
- package/fy-input-icon/index.mjs +23 -20
- package/fy-input-map/index.mjs +31 -28
- package/fy-input-number/index.mjs +10 -9
- package/fy-input-table/index.mjs +22 -18
- package/fy-input-tree/index.mjs +37 -33
- package/fy-progress/index.mjs +10 -9
- package/fy-radio/index.mjs +16 -15
- package/fy-rate/index.mjs +11 -10
- package/fy-select/index.mjs +29 -25
- package/fy-slider/index.mjs +12 -11
- package/fy-switch/index.mjs +10 -9
- package/fy-tabs/index.mjs +17 -15
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +24 -18
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +76 -74
- package/guide-steps/index.mjs +13 -11
- package/iframe-window/index.mjs +10 -9
- package/image-cropper/index.mjs +30 -28
- package/image-preview/index.mjs +14 -12
- package/index.mjs +72 -72
- package/input-number/index.mjs +14 -13
- package/input-number-range/index.mjs +12 -11
- package/license/index.mjs +1 -1
- package/login/index.mjs +26 -21
- package/nav-bar/index.mjs +10 -9
- package/notice/index.mjs +10 -9
- package/package.json +1 -1
- package/page-index/index.mjs +13 -12
- package/page-index-top/index.mjs +28 -23
- package/page-skeleton/index.mjs +14 -14
- package/page-skeleton-new/index.mjs +9 -8
- package/pageable-table/index.mjs +182 -172
- package/pageable-view/index.mjs +16 -15
- package/picker-table-view/index.mjs +58 -49
- package/present-view/index.mjs +39 -35
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/search/index.mjs +22 -20
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/skeleton-panel/index.mjs +10 -9
- package/split-pane/index.mjs +37 -36
- package/static-pageable-table/index.mjs +13 -11
- package/sub-table/index.mjs +49 -36
- package/sub-table-plus/index.mjs +18 -229
- package/swiper/index.mjs +12 -11
- package/table-column/index.mjs +3 -223
- package/table-view/index.mjs +60 -52
- package/tabs-view/index.mjs +19 -17
- package/tag-render/index.mjs +18 -16
- package/text-ellipsis/index.mjs +10 -9
- package/toolbar/index.mjs +14 -13
- package/toolbar-button/index.mjs +14 -13
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +267 -259
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +24 -21
- package/chunks/ElementBaseInfo.ZADwixb5.mjs +0 -125
- package/chunks/ElementForm.CQ3PN5qj.mjs +0 -223
- package/chunks/ElementListeners.De_PRuIm.mjs +0 -215
- package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +0 -181
- package/chunks/ElementOtherConfig.B1NfMTYh.mjs +0 -60
- package/chunks/ElementProperties.CosfDrlW.mjs +0 -112
- package/chunks/FlowCondition.Y6qEYi1T.mjs +0 -102
- package/chunks/FormTemp.BQxO5IQq.mjs +0 -123
- package/chunks/SignalAndMessage.Bb5PFX0N.mjs +0 -85
- package/chunks/UserTaskListeners.Bv3BDfEI.mjs +0 -169
- package/chunks/core.0Exl13Mz.mjs +0 -54
- package/chunks/dictionary.DGt59Ir7.mjs +0 -68
- package/chunks/form-item.LWjePsPa.mjs +0 -233
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +0 -30
- package/chunks/utilSelf.Csq1766E.mjs +0 -48
- package/chunks/utils.DRcxC1Fb.mjs +0 -60
- package/element-listeners/style.css +0 -1
- package/element-multi-instance/style.css +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import a from "element-ui/lib/input";
|
|
2
|
+
import l from "element-ui/lib/form-item";
|
|
3
|
+
import m from "element-ui/lib/form";
|
|
4
|
+
import n from "element-ui/lib/button";
|
|
5
|
+
import p from "../element-dialog/index.mjs";
|
|
6
|
+
import o from "element-ui/lib/table-column";
|
|
7
|
+
import r from "element-ui/lib/table";
|
|
8
|
+
import { n as d } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
9
|
+
const c = {
|
|
10
|
+
name: "SignalAndMessage",
|
|
11
|
+
props: {
|
|
12
|
+
bpmnInstances: Object
|
|
13
|
+
},
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
signalList: [],
|
|
17
|
+
messageList: [],
|
|
18
|
+
modelVisible: !1,
|
|
19
|
+
modelType: "",
|
|
20
|
+
modelObjectForm: {}
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
computed: {
|
|
24
|
+
modelConfig() {
|
|
25
|
+
return this.modelType === "message" ? { title: "创建消息", idLabel: "消息ID", nameLabel: "消息名称" } : { title: "创建信号", idLabel: "信号ID", nameLabel: "信号名称" };
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
mounted() {
|
|
29
|
+
this.initDataList();
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
initDataList() {
|
|
33
|
+
this.rootElements = this.bpmnInstances.modeler.getDefinitions().rootElements, this.messageIdMap = {}, this.signalIdMap = {}, this.messageList = [], this.signalList = [], this.rootElements.forEach((i) => {
|
|
34
|
+
i.$type === "bpmn:Message" && (this.messageIdMap[i.id] = !0, this.messageList.push({ ...i })), i.$type === "bpmn:Signal" && (this.signalIdMap[i.id] = !0, this.signalList.push({ ...i }));
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
openModel(i) {
|
|
38
|
+
this.modelType = i, this.modelObjectForm = {}, this.modelVisible = !0;
|
|
39
|
+
},
|
|
40
|
+
addNewObject() {
|
|
41
|
+
if (this.modelType === "message") {
|
|
42
|
+
if (this.messageIdMap[this.modelObjectForm.id])
|
|
43
|
+
return this.$message.error("该消息已存在,请修改id后重新保存");
|
|
44
|
+
const i = this.bpmnInstances.moddle.create("bpmn:Message", this.modelObjectForm);
|
|
45
|
+
this.rootElements.push(i);
|
|
46
|
+
} else {
|
|
47
|
+
if (this.signalIdMap[this.modelObjectForm.id])
|
|
48
|
+
return this.$message.error("该信号已存在,请修改id后重新保存");
|
|
49
|
+
const i = this.bpmnInstances.moddle.create("bpmn:Signal", this.modelObjectForm);
|
|
50
|
+
this.rootElements.push(i);
|
|
51
|
+
}
|
|
52
|
+
this.modelVisible = !1, this.initDataList();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var _ = function() {
|
|
57
|
+
var e = this, t = e._self._c;
|
|
58
|
+
return t("div", { staticClass: "panel-tab__content" }, [t("div", { staticClass: "panel-tab__content--title" }, [e._m(0), t(n, { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(s) {
|
|
59
|
+
return e.openModel("message");
|
|
60
|
+
} } }, [e._v("创建新消息")])], 1), t(r, { attrs: { data: e.messageList, size: "mini", border: "" } }, [t(o, { attrs: { type: "index", label: "序号", width: "60px" } }), t(o, { attrs: { label: "消息ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t(o, { attrs: { label: "消息名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("div", { staticClass: "panel-tab__content--title", staticStyle: { "margin-top": "8px", "padding-top": "8px", "border-top": "1px solid #eee" } }, [e._m(1), t(n, { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(s) {
|
|
61
|
+
return e.openModel("signal");
|
|
62
|
+
} } }, [e._v("创建新信号")])], 1), t(r, { attrs: { data: e.signalList, size: "mini", border: "" } }, [t(o, { attrs: { type: "index", label: "序号", width: "60px" } }), t(o, { attrs: { label: "信号ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t(o, { attrs: { label: "信号名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t(p, { staticClass: "flow-dialog", attrs: { visible: e.modelVisible, title: e.modelConfig.title, "close-on-click-modal": !1, width: "400px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(s) {
|
|
63
|
+
e.modelVisible = s;
|
|
64
|
+
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
65
|
+
return [t(n, { attrs: { size: "mini" }, on: { click: function(s) {
|
|
66
|
+
e.modelVisible = !1;
|
|
67
|
+
} } }, [e._v("取 消")]), t(n, { attrs: { size: "mini", type: "primary" }, on: { click: e.addNewObject } }, [e._v("保 存")])];
|
|
68
|
+
}, proxy: !0 }]) }, [t(m, { attrs: { model: e.modelObjectForm, size: "mini", "label-width": "90px" }, nativeOn: { submit: function(s) {
|
|
69
|
+
s.preventDefault();
|
|
70
|
+
} } }, [t(l, { attrs: { label: e.modelConfig.idLabel } }, [t(a, { attrs: { clearable: "" }, model: { value: e.modelObjectForm.id, callback: function(s) {
|
|
71
|
+
e.$set(e.modelObjectForm, "id", s);
|
|
72
|
+
}, expression: "modelObjectForm.id" } })], 1), t(l, { attrs: { label: e.modelConfig.nameLabel } }, [t(a, { attrs: { clearable: "" }, model: { value: e.modelObjectForm.name, callback: function(s) {
|
|
73
|
+
e.$set(e.modelObjectForm, "name", s);
|
|
74
|
+
}, expression: "modelObjectForm.name" } })], 1)], 1)], 1)], 1);
|
|
75
|
+
}, b = [function() {
|
|
76
|
+
var i = this, e = i._self._c;
|
|
77
|
+
return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }), i._v("消息列表")]);
|
|
78
|
+
}, function() {
|
|
79
|
+
var i = this, e = i._self._c;
|
|
80
|
+
return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }), i._v("信号列表")]);
|
|
81
|
+
}], u = /* @__PURE__ */ d(
|
|
82
|
+
c,
|
|
83
|
+
_,
|
|
84
|
+
b,
|
|
85
|
+
!1,
|
|
86
|
+
null,
|
|
87
|
+
null
|
|
88
|
+
);
|
|
89
|
+
const O = u.exports;
|
|
90
|
+
export {
|
|
91
|
+
O as default
|
|
92
|
+
};
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import b from "../confirmable/index.mjs";
|
|
2
|
+
import { T as i, _ as f } from "./TableColumn.BzivvXMF.mjs";
|
|
3
|
+
import h from "../form-input-number/index.mjs";
|
|
4
|
+
import y from "../form-checkbox-group/index.mjs";
|
|
5
|
+
import g from "../form-cascader/index.mjs";
|
|
6
|
+
import _ from "../form-date-picker/index.mjs";
|
|
7
|
+
import I from "../form-select/index.mjs";
|
|
8
|
+
import v from "../form-input-phone-number/index.mjs";
|
|
9
|
+
import $ from "../form-checkbox/index.mjs";
|
|
10
|
+
import C from "../form-input/index.mjs";
|
|
11
|
+
import c from "element-ui/lib/button";
|
|
12
|
+
import A from "../confirm-button/index.mjs";
|
|
13
|
+
import R from "../pageable-table/index.mjs";
|
|
14
|
+
import { findTreeChildren as F, isFunction as k } from "@web-utils/core";
|
|
15
|
+
import { cloneDeep as D } from "@web-utils/integrations/lodash";
|
|
16
|
+
import { n as T } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
17
|
+
const q = {
|
|
18
|
+
props: {
|
|
19
|
+
value: Array,
|
|
20
|
+
prop: String,
|
|
21
|
+
columns: Array,
|
|
22
|
+
descs: Array,
|
|
23
|
+
ascs: Array,
|
|
24
|
+
limit: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 1 / 0
|
|
27
|
+
},
|
|
28
|
+
disabled: Boolean,
|
|
29
|
+
showSummary: Boolean,
|
|
30
|
+
selection: Boolean,
|
|
31
|
+
index: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !0
|
|
34
|
+
},
|
|
35
|
+
selectionWidth: String,
|
|
36
|
+
toolbarMenus: Array,
|
|
37
|
+
handleMenus: Array,
|
|
38
|
+
fetchApi: Function,
|
|
39
|
+
delApi: Function,
|
|
40
|
+
bottomAddButton: Boolean,
|
|
41
|
+
initRow: Function
|
|
42
|
+
}
|
|
43
|
+
}, S = {
|
|
44
|
+
name: "SubTablePlus",
|
|
45
|
+
mixins: [q],
|
|
46
|
+
inject: {
|
|
47
|
+
elForm: {
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
elFormItem: {
|
|
51
|
+
default: ""
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
props: {
|
|
55
|
+
onRowDbClick: Function,
|
|
56
|
+
showMessage: Boolean,
|
|
57
|
+
pageSize: Number
|
|
58
|
+
},
|
|
59
|
+
data() {
|
|
60
|
+
return {
|
|
61
|
+
rows: [],
|
|
62
|
+
selectedRows: []
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
computed: {
|
|
66
|
+
enabled() {
|
|
67
|
+
return !this.inputDisabled;
|
|
68
|
+
},
|
|
69
|
+
hasToolBarMenu() {
|
|
70
|
+
var s;
|
|
71
|
+
return (s = this.toolbarMenus) == null ? void 0 : s.length;
|
|
72
|
+
},
|
|
73
|
+
hasHandleMenus() {
|
|
74
|
+
var s;
|
|
75
|
+
return (s = this.handleMenus) == null ? void 0 : s.length;
|
|
76
|
+
},
|
|
77
|
+
rowProps() {
|
|
78
|
+
const s = {};
|
|
79
|
+
return this.columns && this.columns.map((e) => e.prop).forEach((e) => {
|
|
80
|
+
s[e] = null;
|
|
81
|
+
}), s;
|
|
82
|
+
},
|
|
83
|
+
inputDisabled() {
|
|
84
|
+
return this.disabled || (this.elForm || {}).disabled;
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
watch: {
|
|
88
|
+
value: {
|
|
89
|
+
deep: !0,
|
|
90
|
+
immediate: !0,
|
|
91
|
+
handler(s) {
|
|
92
|
+
this.rows = s || [];
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
rows: {
|
|
96
|
+
deep: !0,
|
|
97
|
+
immediate: !0,
|
|
98
|
+
handler(s) {
|
|
99
|
+
this.$emit("input", s);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
getCellType(s, e) {
|
|
105
|
+
return k(e.getType) ? e.getType(s, e) : e.type;
|
|
106
|
+
},
|
|
107
|
+
getInputAttr(s, e) {
|
|
108
|
+
return e.attrs && e.getAttrs ? { ...e.attrs, ...e.getAttrs(s) } : e.attrs ? e.attrs : e.getAttrs ? e.getAttrs(s) : {};
|
|
109
|
+
},
|
|
110
|
+
isInputDisabled(s, e) {
|
|
111
|
+
var l;
|
|
112
|
+
return (l = e.isDisabled) == null ? void 0 : l.call(e, s);
|
|
113
|
+
},
|
|
114
|
+
onInput(s, e, l) {
|
|
115
|
+
l.setValue ? l.setValue(s, e, l, this.rows) : l.setVal !== !1 && (s[l.prop] = e);
|
|
116
|
+
},
|
|
117
|
+
onBlur(s, e) {
|
|
118
|
+
e.onBlur && e.onBlur(s, e, this.rows);
|
|
119
|
+
},
|
|
120
|
+
onSelectionChange(s) {
|
|
121
|
+
this.selectedRows = s;
|
|
122
|
+
},
|
|
123
|
+
async remove(s, e) {
|
|
124
|
+
try {
|
|
125
|
+
if (this.delApi)
|
|
126
|
+
try {
|
|
127
|
+
await this.delApi([s.id]), this.$message.success("删除成功!"), this.refresh();
|
|
128
|
+
} catch {
|
|
129
|
+
this.$message.error("删除失败!");
|
|
130
|
+
}
|
|
131
|
+
else
|
|
132
|
+
this.rows.splice(e, 1);
|
|
133
|
+
} catch {
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
async add(s, e) {
|
|
137
|
+
var l;
|
|
138
|
+
if (this.fetchApi)
|
|
139
|
+
this.addRow();
|
|
140
|
+
else {
|
|
141
|
+
const p = D(this.rowProps), u = await ((l = this.initRow) == null ? void 0 : l.call(this, p, e));
|
|
142
|
+
e === -1 ? this.rows.push(u || p) : this.rows.splice(e + 1, 0, u || p);
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
addRow() {
|
|
146
|
+
this.$emit("add-row");
|
|
147
|
+
},
|
|
148
|
+
async delRow() {
|
|
149
|
+
if (!this.selectedRows.length) {
|
|
150
|
+
this.$message.warning("请选择要删除的记录!");
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
try {
|
|
154
|
+
if (this.delApi)
|
|
155
|
+
try {
|
|
156
|
+
await this.delApi(this.selectedRows.map((s) => s.id)), this.$message.success("删除成功!"), this.refresh();
|
|
157
|
+
} catch {
|
|
158
|
+
this.$message.error("删除失败!");
|
|
159
|
+
}
|
|
160
|
+
else
|
|
161
|
+
this.$emit(
|
|
162
|
+
"input",
|
|
163
|
+
this.rows.filter((s) => !this.selectedRows.includes(s))
|
|
164
|
+
);
|
|
165
|
+
} catch {
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
refresh() {
|
|
169
|
+
this.$refs.table.getPage();
|
|
170
|
+
},
|
|
171
|
+
getVal(s, e, l) {
|
|
172
|
+
var p, u;
|
|
173
|
+
if (l.type === "select" && ((p = l.attrs) != null && p.options)) {
|
|
174
|
+
const t = l.attrs.options.find((r) => r.value === s[e.property] || r.code === s[e.property]);
|
|
175
|
+
if (t)
|
|
176
|
+
return t.label || t.name;
|
|
177
|
+
}
|
|
178
|
+
if (l.type === "checkbox1")
|
|
179
|
+
return s[e.property] === !0 || s[e.property] === "1" || s[e.property] === "Y" ? "是" : "否";
|
|
180
|
+
if (l.type === "cascader" && ((u = l.attrs) != null && u.options)) {
|
|
181
|
+
const [t] = F(l.attrs.options, (r) => r[l.attrs.valueKey || "value"] === s[e.property]);
|
|
182
|
+
if (t)
|
|
183
|
+
return t[l.attrs.valueKey || "label"];
|
|
184
|
+
}
|
|
185
|
+
return s[e.property];
|
|
186
|
+
},
|
|
187
|
+
reloadTable() {
|
|
188
|
+
var s;
|
|
189
|
+
(s = this.$refs.table) == null || s.reload();
|
|
190
|
+
},
|
|
191
|
+
async refreshTable() {
|
|
192
|
+
var s;
|
|
193
|
+
await ((s = this.$refs.table) == null ? void 0 : s.getPage());
|
|
194
|
+
},
|
|
195
|
+
removeSelectedRows() {
|
|
196
|
+
this.$emit(
|
|
197
|
+
"input",
|
|
198
|
+
this.value.filter((s) => !this.selectedRows.includes(s))
|
|
199
|
+
);
|
|
200
|
+
},
|
|
201
|
+
rowDbClick(...s) {
|
|
202
|
+
var e;
|
|
203
|
+
(e = this.onRowDbClick) == null || e.call(this, ...s);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
var P = function() {
|
|
208
|
+
var p, u;
|
|
209
|
+
var e = this, l = e._self._c;
|
|
210
|
+
return l("div", { class: ["sub-table-plus", { "hide-message": !e.showMessage }] }, [l(R, e._g(e._b({ ref: "table", attrs: { "auto-height": "", data: e.fetchApi ? !1 : e.rows, api: e.fetchApi, "payload-style": "body", "show-summary": e.showSummary, descs: e.descs, ascs: e.ascs, "page-size": e.pageSize, "selection-width": e.selectionWidth, "hide-on-single-page": "", selection: e.selection, index: e.index }, on: { "selection-change": e.onSelectionChange }, scopedSlots: e._u([!e.inputDisabled || e.hasToolBarMenu ? { key: "toolbar", fn: function() {
|
|
211
|
+
return [l("div", { staticClass: "table-header flex-row" }, [e._t("toolbar", function() {
|
|
212
|
+
return [l("div", { staticClass: "flex-item" }, [e._t("toolbar-left", function() {
|
|
213
|
+
var t, r, n;
|
|
214
|
+
return [(t = e.toolbarMenus) != null && t.includes("add") ? l(c, { staticClass: "table-header-button add", attrs: { size: "mini", icon: "el-icon-circle-plus", type: "text" }, on: { click: e.addRow } }, [e._v(" 添加 ")]) : e._e(), (r = e.toolbarMenus) != null && r.includes("delete") ? l(A, { staticClass: "table-header-button remove", attrs: { size: "mini", disabled: e.selectedRows.length <= 0, message: "您确定要删除选中的记录吗?", icon: "el-icon-error", type: "text" }, on: { click: e.delRow } }, [e._v(" 删除 ")]) : e._e(), (n = e.toolbarMenus) != null && n.includes("refresh") ? l(c, { staticClass: "table-header-button refresh", attrs: { size: "mini", icon: "el-icon-refresh-left", type: "text", disabled: !1 }, on: { click: e.refresh } }, [e._v(" 刷新 ")]) : e._e()];
|
|
215
|
+
}, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh }), e._t("toolbar-left-append", null, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh })], 2), l("div", { staticClass: "flex-not-shrink" }, [e._t("toolbar-right", null, { removeSelectedRows: e.removeSelectedRows, selectedRows: e.selectedRows })], 2)];
|
|
216
|
+
}, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh })], 2)];
|
|
217
|
+
}, proxy: !0 } : null, e.bottomAddButton ? { key: "empty", fn: function() {
|
|
218
|
+
return [l("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(t) {
|
|
219
|
+
var r;
|
|
220
|
+
return t.stopPropagation(), e.add(null, ((r = e.value) == null ? void 0 : r.length) ?? 0);
|
|
221
|
+
} } })];
|
|
222
|
+
}, proxy: !0 } : null], null, !0) }, "PageableTable", e.$attrs, !1), e.$listeners), [e._t("columns", function() {
|
|
223
|
+
return [e._l(e.columns, function(t) {
|
|
224
|
+
return [t.label && !t.hide && !t.slot ? l(i, { key: `${t.prop}-${e.enabled}${t.type ? `-${t.type}` : ""}${t.required ? `-${t.required}` : ""}`, attrs: { label: t.label, width: t.width, "dict-type": t.dictType, clickable: t.clickable, align: t.align, prop: t.prop, options: t.options, "show-overflow-tooltip": !t.editable && t.showOverflowTooltip }, scopedSlots: e._u([{ key: "header", fn: function() {
|
|
225
|
+
return [!e.inputDisabled && t.required ? l("span", { staticStyle: { color: "#f56c6c" } }, [e._v("*")]) : e._e(), l("span", { attrs: { title: t.label } }, [e._v(e._s(t.label))])];
|
|
226
|
+
}, proxy: !0 }, { key: "default", fn: function({ row: r, column: n, $index: o }) {
|
|
227
|
+
return [e._t("tag", null, { row: r, column: n, index: o }), e._t(t.prop, function() {
|
|
228
|
+
var d;
|
|
229
|
+
return [e.enabled && t.editable === !0 ? [e.getCellType(r, t) === "input" ? [l(C, e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required }, on: { blur: () => e.onBlur(r, t), input: (a) => e.onInput(r, a, t) } }, "FormInput", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "checkbox1" ? [l($, e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormCheckbox", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "inputPhoneNumber" ? [l(v, e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputPhoneNumber", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "user" ? [t.single ? l("FormInputUser", e._b({ attrs: { id: r[n.idProp || `${n.property}Id`], "wrap-col": !1, name: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required }, on: { "update:id": function(a) {
|
|
230
|
+
return e.$set(r, n.idProp || `${n.property}Id`, a);
|
|
231
|
+
}, "update:name": function(a) {
|
|
232
|
+
return e.$set(r, n.property, a);
|
|
233
|
+
}, input: (a) => e.onInput(r, a, t) } }, "FormInputUser", e.getInputAttr(r, t), !1)) : l("FormInputUser", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputUser", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "department" ? [t.single ? l("FormInputDepartment", e._b({ attrs: { "wrap-col": !1, "ou-type": t.ouType, name: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required }, on: { "update:name": function(a) {
|
|
234
|
+
return e.$set(r, n.property, a);
|
|
235
|
+
}, input: (a) => e.onInput(r, a, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1)) : l("FormInputDepartment", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "select" ? [l(I, e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormSelect", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "datePicker" ? [l(_, e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required, start: r[t.start], end: r[t.end] }, on: { "update:start": function(a) {
|
|
236
|
+
return e.$set(r, t.start, a);
|
|
237
|
+
}, "update:end": function(a) {
|
|
238
|
+
return e.$set(r, t.end, a);
|
|
239
|
+
}, input: (a) => e.onInput(r, a, t) } }, "FormDatePicker", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "cascader" ? [l(g, e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required, "label-key": t.labelKey, "value-key": t.valueKey }, on: { input: (a) => e.onInput(r, a, t) } }, "FormCascader", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "checkbox" ? [l(y, e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormCheckboxGroup", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "number" ? [l(h, e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputNumber", e.getInputAttr(r, t), !1))] : e._e()] : t.dictType || (d = t.options) != null && d.length ? [l(f, { attrs: { "dict-type": t.dictType, "id-as-value": t.idAsValue, "label-as-value": t.labelAsValue, column: n, row: r, options: t.options } })] : [e._v(e._s(e.getVal(r, n, t)))]];
|
|
240
|
+
}, { row: r, column: n, wrapCol: !1, index: o, prop: e.prop ? `${e.prop}[${o}].${t.prop}` : null, required: t.required, editable: t.editable })];
|
|
241
|
+
} }], null, !0) }) : t.slot ? e._t(t.slot) : e._e()];
|
|
242
|
+
})];
|
|
243
|
+
}, { columns: e.columns }), e._t("handle", null, { add: e.add, remove: e.remove }), !e.inputDisabled && e.hasHandleMenus ? l(i, { attrs: { label: "操作", width: "80", align: "center", prop: "menu" }, scopedSlots: e._u([{ key: "header", fn: function({ column: t, $index: r }) {
|
|
244
|
+
return [e._t("handle-column-header", function() {
|
|
245
|
+
return [e._v(" " + e._s(t.label) + " ")];
|
|
246
|
+
}, { column: t, index: r })];
|
|
247
|
+
} }, { key: "default", fn: function({ row: t, $index: r }) {
|
|
248
|
+
var n, o, d;
|
|
249
|
+
return [(n = e.handleMenus) != null && n.includes("add") && ((o = e.value) == null ? void 0 : o.length) < e.limit ? l("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "margin-right": "5px", "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(a) {
|
|
250
|
+
return a.stopPropagation(), e.add(t, r);
|
|
251
|
+
} } }) : e._e(), (d = e.handleMenus) != null && d.includes("delete") ? l(b, { staticClass: "el-icon-error sub-table-handle-button table-button-remove", attrs: { title: "删除", message: "您确定要删除该行吗?" }, on: { click: function(a) {
|
|
252
|
+
return a.stopPropagation(), e.remove(t, r);
|
|
253
|
+
} } }) : e._e()];
|
|
254
|
+
} }], null, !0) }) : e._e()], 2), !e.inputDisabled && e.bottomAddButton && ((p = e.value) == null ? void 0 : p.length) < e.limit && ((u = e.value) == null ? void 0 : u.length) > 0 ? l("div", { staticClass: "flex-row vertical-center horizon-center", staticStyle: { padding: "10px", border: "1px solid #ebeef5", "border-top": "none" } }, [l("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(t) {
|
|
255
|
+
var r;
|
|
256
|
+
return t.stopPropagation(), e.add(null, ((r = e.value) == null ? void 0 : r.length) ?? 0);
|
|
257
|
+
} } })]) : e._e()], 1);
|
|
258
|
+
}, B = [], x = /* @__PURE__ */ T(
|
|
259
|
+
S,
|
|
260
|
+
P,
|
|
261
|
+
B,
|
|
262
|
+
!1,
|
|
263
|
+
null,
|
|
264
|
+
null
|
|
265
|
+
);
|
|
266
|
+
const Q = x.exports;
|
|
267
|
+
export {
|
|
268
|
+
q as S,
|
|
269
|
+
Q as a
|
|
270
|
+
};
|