@yidun/antd-super-table 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1321 -1316
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._ellipsisElement_6fog1_1{width:100%;overflow:hidden;display:flex}._ellipsisElement_6fog1_1 ._elementItem_6fog1_6{min-width:0}._ellipsisElementHasGap_6fog1_10{gap:8px}._flexWrap_6fog1_14{flex-wrap:wrap}._ellipsisTag_6fog1_18{cursor:pointer}._imageEllipsisTag_6fog1_22{line-height:30px;min-width:32px;padding:0;text-align:center}._ellipsisList_6fog1_29{max-width:500px;display:flex;gap:8px;flex-wrap:wrap}._tableCellContent_1chn7_1 ._antTypographyEllipsis_1chn7_1{width:100%}._tableCellContent_1chn7_1 ._draggableIcon_1chn7_4{cursor:grab}._textListItem_1chn7_8{width:100%;margin-bottom:4px}._configBtn_fstz6_1{position:absolute;z-index:999;right:4px;top:8px;background:#fafafa}._tableConfig_fstz6_9{width:260px}._tableConfig_fstz6_9 ._tableConfigHead_fstz6_12{padding:8px}._tableConfig_fstz6_9 ._tableConfigActions_fstz6_15{display:flex;align-items:center;justify-content:space-between;padding:8px;border-bottom:1px solid #d9d9d9}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22{min-height:300px;max-height:60vh;overflow:auto;padding-bottom:12px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._groupTitle_fstz6_28{padding:0 8px;font-size:12px;color:#000000a6;background:#fafafa;line-height:28px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35{max-height:20vh;overflow-y:auto}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39{display:flex;align-items:center;gap:8px;min-height:28px;padding:0 8px;position:relative}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._columnItemContent_fstz6_47{flex:1;cursor:pointer}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._dragIcon_fstz6_51,._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._dragHandle_fstz6_54{cursor:grab}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._fixedActions_fstz6_57{display:none;align-items:center;gap:4px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39:hover ._fixedActions_fstz6_57{display:flex}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._emptyText_fstz6_65{line-height:200px;text-align:center}.pro-table-config-popover .ant-popover-inner-content{padding:0}._dynamicList_1woe5_1{list-style:none;padding:0;margin:0}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6{display:flex;align-items:center;gap:16px;padding:8px;background-color:#fff}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._dynamicListItemContent_1woe5_13{flex:1;min-width:0}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._actionsIcons_1woe5_17{display:flex;align-items:center}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._actionsIcons_1woe5_17 ._dragIcon_1woe5_21{cursor:grab}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6:last-child{border-bottom:none;margin-bottom:16px}._inputGroup_eukv3_1,._inputNumberGroup_149g6_1{width:100%}._inputNumberGroup_149g6_1 ._inputNumberGroupContent_149g6_4{width:100%;display:flex;align-items:center}._inputNumberGroup_149g6_1 ._inputNumber_149g6_1{width:unset!important;flex:1}._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13{border-top-right-radius:0;border-bottom-right-radius:0;border-right-color:transparent}._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13:focus,._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13:hover{border-right-color:#1677ff}._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21{border-top-left-radius:0;border-bottom-left-radius:0;border-left-color:transparent}._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21:focus,._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21:hover{border-left-color:#1677ff}._inputNumberGroup_149g6_1 ._divider_149g6_29{display:inline-block;padding:0 8px;line-height:30px;border-top:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9}._formFieldItem_1imun_1{display:flex;align-items:center;min-width:0}._inputGroup_1imun_7{width:unset}._formFieldItemLabel_1imun_11{padding-left:8px;padding-right:8px;background-color:transparent!important;text-align:center;cursor:default!important;border-right:none!important}._customItemLabel_1imun_20{font-size:14px;padding-right:8px;color:#000000e0}.super-table-input-group{width:100%}.super-table-input-group .super-table-filter-form-item-label+.ant-input,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector,.super-table-input-group .super-table-filter-form-item-label+.ant-picker,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group{border-left-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-picker:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-picker:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group:hover{border-left-color:#1677ff!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input{border-left-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input:hover{border-left-color:#1677ff!important;border-right-color:#1677ff!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector{border-start-start-radius:0!important;border-end-start-radius:0!important;border-left-color:transparent!important;border-right-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector:hover{border-left-color:#1677ff!important;border-right-color:#1677ff!important}.super-table-input-group .input-number-group .ant-input-number:first-child{border-top-left-radius:0;border-bottom-left-radius:0;border-left-color:transparent!important}.super-table-input-group .input-number-group .ant-input-number:first-child:focus,.super-table-input-group .input-number-group .ant-input-number:first-child:hover{border-left-color:#1677ff!important}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1{display:flex;align-items:center;gap:8px;min-width:0}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1 ._fieldSelect_njdgy_7{width:200px}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1 ._fieldComponent_njdgy_10{flex:1;min-width:0}._sceneList_3nrgr_1{max-height:50vh;overflow:auto}._sceneList_3nrgr_1 ._sceneListHead_3nrgr_5{background-color:#fafafa}._sceneList_3nrgr_1 ._sceneListItem_3nrgr_8{border-top:1px solid #d9d9d9;transition:all .3s;background-color:#fff}._sceneList_3nrgr_1 ._sceneListItem_3nrgr_8:hover{background-color:#f9f9f9}._sceneList_3nrgr_1 ._col_3nrgr_16{padding:12px 16px}._dragIcon_3nrgr_20{cursor:grab}._searchParamsWrapper_mo3ie_1{padding:16px;background-color:#fff;margin-bottom:0}._searchParamsWrapper_mo3ie_1._hasActions_mo3ie_6{margin-bottom:16px}._searchParams_mo3ie_1{flex:1}._searchActionsWrapper_mo3ie_14{display:flex;justify-content:flex-end;gap:8px}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1{padding:16px;display:flex;gap:16px;background-color:#fff}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneFormWrapper_1jyjb_7,._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneFormWrapper_1jyjb_7 ._sceneForm_1jyjb_7{flex:1}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneFormWrapper_1jyjb_7 ._sceneForm_1jyjb_7 ._sceneSelect_1jyjb_13{width:240px}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneExtra_1jyjb_16{flex-shrink:0}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19{background:#fff;padding:16px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._toolbar_1jyjb_23{padding-bottom:12px;display:flex;align-items:flex-start;justify-content:flex-end;gap:16px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._toolbar_1jyjb_23 ._actionBtns_1jyjb_30{display:flex;align-items:center;gap:8px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._toolbar_1jyjb_23 ._tableHeadWrapper_1jyjb_35{flex:1}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._tableContent_1jyjb_38{position:relative}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._headerCell_1jyjb_41{display:flex;align-items:center;gap:4px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._headerCell_1jyjb_41 ._headerCellText_1jyjb_46{flex:1}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._headerCell_1jyjb_41 ._headerCellTooltipIcon_1jyjb_49{cursor:pointer}._sceneOpBtnWrapper_1jyjb_53{border-top:1px solid #d9d9d9;padding-top:8px}._sceneOpBtnWrapper_1jyjb_53 ._sceneOpBtn_1jyjb_53{text-align:left}.antd-super-table .ant-table-body{overflow-y:auto!important}.antd-super-table .ant-table-cell{padding:12px!important}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import { h as
|
|
6
|
-
import
|
|
7
|
-
import { DownOutlined as
|
|
8
|
-
import { slice as
|
|
9
|
-
import { useLocalStorage as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { JSONPath as
|
|
13
|
-
import
|
|
14
|
-
import { v5 as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
2
|
+
var Wt = Object.defineProperty;
|
|
3
|
+
var Ut = (n, a, i) => a in n ? Wt(n, a, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[a] = i;
|
|
4
|
+
var Be = (n, a, i) => Ut(n, typeof a != "symbol" ? a + "" : a, i);
|
|
5
|
+
import { h as Y, defineComponent as ie, computed as B, resolveComponent as x, createElementBlock as q, openBlock as b, normalizeClass as d, unref as c, createCommentVNode as A, Fragment as Ie, renderList as nt, normalizeStyle as X, renderSlot as me, createBlock as E, withCtx as m, createVNode as p, createTextVNode as Q, toDisplayString as pe, createElementVNode as D, withMemo as wt, resolveDynamicComponent as Ye, normalizeProps as Xe, mergeProps as le, ref as ee, watchEffect as mt, watch as _e, useAttrs as Gt, reactive as He, toRaw as de, createApp as Qt, onBeforeUnmount as Kt, getCurrentInstance as Jt, markRaw as Zt, shallowRef as Xt, onMounted as en, createSlots as tn, nextTick as nn } from "vue";
|
|
6
|
+
import on, { theme as ln, Form as an, RangePicker as sn, DatePicker as rn, TreeSelect as un, Cascader as cn, Select as dn, InputNumber as mn, Input as pn, Empty as fn, ConfigProvider as yn, message as et } from "ant-design-vue";
|
|
7
|
+
import { DownOutlined as Tt, HolderOutlined as ke, EyeOutlined as gn, SettingOutlined as vn, VerticalAlignBottomOutlined as pt, PushpinOutlined as ft, VerticalAlignTopOutlined as yt, MinusCircleOutlined as gt, PlusOutlined as Ft, UpOutlined as bn, PlusCircleFilled as hn, SettingFilled as _n, FilterFilled as Cn, ReloadOutlined as $n, InfoCircleFilled as Sn } from "@ant-design/icons-vue";
|
|
8
|
+
import { slice as vt, isFunction as Ce, get as Ve, castArray as xe, debounce as st, pick as $e, omit as xt, set as Ae, cloneDeep as tt, sortBy as ot, unionBy as bt, uniqueId as In, merge as kn } from "lodash-es";
|
|
9
|
+
import { useLocalStorage as wn, useStorage as Tn } from "@vueuse/core";
|
|
10
|
+
import Ee from "dayjs";
|
|
11
|
+
import Fn from "sortablejs";
|
|
12
|
+
import { JSONPath as xn } from "jsonpath-plus";
|
|
13
|
+
import Lt from "async-validator";
|
|
14
|
+
import { v5 as Ln } from "uuid";
|
|
15
|
+
import je from "vuedraggable";
|
|
16
|
+
const Pn = {
|
|
17
17
|
// Options.jsx
|
|
18
18
|
items_per_page: "条/页",
|
|
19
19
|
jump_to: "跳至",
|
|
@@ -28,15 +28,15 @@ const xn = {
|
|
|
28
28
|
next_3: "向后 3 页"
|
|
29
29
|
};
|
|
30
30
|
function We() {
|
|
31
|
-
return We = Object.assign ? Object.assign.bind() : function(
|
|
31
|
+
return We = Object.assign ? Object.assign.bind() : function(n) {
|
|
32
32
|
for (var a = 1; a < arguments.length; a++) {
|
|
33
33
|
var i = arguments[a];
|
|
34
|
-
for (var
|
|
34
|
+
for (var t in i) ({}).hasOwnProperty.call(i, t) && (n[t] = i[t]);
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return n;
|
|
37
37
|
}, We.apply(null, arguments);
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const Bn = {
|
|
40
40
|
locale: "zh_CN",
|
|
41
41
|
today: "今天",
|
|
42
42
|
now: "此刻",
|
|
@@ -63,7 +63,7 @@ const Ln = {
|
|
|
63
63
|
nextDecade: "下一年代",
|
|
64
64
|
previousCentury: "上一世纪",
|
|
65
65
|
nextCentury: "下一世纪"
|
|
66
|
-
},
|
|
66
|
+
}, Pt = {
|
|
67
67
|
placeholder: "请选择时间",
|
|
68
68
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
69
69
|
}, lt = {
|
|
@@ -78,15 +78,15 @@ const Ln = {
|
|
|
78
78
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
79
79
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
80
80
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
81
|
-
},
|
|
82
|
-
timePickerLocale: We({},
|
|
81
|
+
}, Bn),
|
|
82
|
+
timePickerLocale: We({}, Pt)
|
|
83
83
|
};
|
|
84
84
|
lt.lang.ok = "确定";
|
|
85
|
-
const
|
|
85
|
+
const se = "${label}不是一个有效的${type}", Bt = {
|
|
86
86
|
locale: "zh-cn",
|
|
87
|
-
Pagination:
|
|
87
|
+
Pagination: Pn,
|
|
88
88
|
DatePicker: lt,
|
|
89
|
-
TimePicker:
|
|
89
|
+
TimePicker: Pt,
|
|
90
90
|
Calendar: lt,
|
|
91
91
|
// locales for all components
|
|
92
92
|
global: {
|
|
@@ -170,19 +170,19 @@ const ae = "${label}不是一个有效的${type}", Lt = {
|
|
|
170
170
|
invalid: "${label}是一个无效日期"
|
|
171
171
|
},
|
|
172
172
|
types: {
|
|
173
|
-
string:
|
|
174
|
-
method:
|
|
175
|
-
array:
|
|
176
|
-
object:
|
|
177
|
-
number:
|
|
178
|
-
date:
|
|
179
|
-
boolean:
|
|
180
|
-
integer:
|
|
181
|
-
float:
|
|
182
|
-
regexp:
|
|
183
|
-
email:
|
|
184
|
-
url:
|
|
185
|
-
hex:
|
|
173
|
+
string: se,
|
|
174
|
+
method: se,
|
|
175
|
+
array: se,
|
|
176
|
+
object: se,
|
|
177
|
+
number: se,
|
|
178
|
+
date: se,
|
|
179
|
+
boolean: se,
|
|
180
|
+
integer: se,
|
|
181
|
+
float: se,
|
|
182
|
+
regexp: se,
|
|
183
|
+
email: se,
|
|
184
|
+
url: se,
|
|
185
|
+
hex: se
|
|
186
186
|
},
|
|
187
187
|
string: {
|
|
188
188
|
len: "${label}须为${len}个字符",
|
|
@@ -216,29 +216,29 @@ const ae = "${label}不是一个有效的${type}", Lt = {
|
|
|
216
216
|
scanned: "已扫描"
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
|
-
var
|
|
220
|
-
function
|
|
221
|
-
return
|
|
222
|
-
(function(i,
|
|
223
|
-
|
|
224
|
-
})(
|
|
225
|
-
function
|
|
226
|
-
return
|
|
219
|
+
var qe = { exports: {} }, Mn = qe.exports, ht;
|
|
220
|
+
function jn() {
|
|
221
|
+
return ht || (ht = 1, function(n, a) {
|
|
222
|
+
(function(i, t) {
|
|
223
|
+
n.exports = t(Ee);
|
|
224
|
+
})(Mn, function(i) {
|
|
225
|
+
function t(f) {
|
|
226
|
+
return f && typeof f == "object" && "default" in f ? f : { default: f };
|
|
227
227
|
}
|
|
228
|
-
var r =
|
|
229
|
-
return u === "W" ?
|
|
230
|
-
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(
|
|
231
|
-
var
|
|
232
|
-
return
|
|
228
|
+
var r = t(i), l = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(f, u) {
|
|
229
|
+
return u === "W" ? f + "周" : f + "日";
|
|
230
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(f, u) {
|
|
231
|
+
var C = 100 * f + u;
|
|
232
|
+
return C < 600 ? "凌晨" : C < 900 ? "早上" : C < 1100 ? "上午" : C < 1300 ? "中午" : C < 1800 ? "下午" : "晚上";
|
|
233
233
|
} };
|
|
234
234
|
return r.default.locale(l, null, !0), l;
|
|
235
235
|
});
|
|
236
|
-
}(
|
|
236
|
+
}(qe)), qe.exports;
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
const { defaultAlgorithm:
|
|
240
|
-
var
|
|
241
|
-
const
|
|
238
|
+
jn();
|
|
239
|
+
const { defaultAlgorithm: An, defaultSeed: En } = ln, te = An(En);
|
|
240
|
+
var be = /* @__PURE__ */ ((n) => (n.order = "_order", n.orderInScene = "_orderInScene", n.defaultValue = "_defaultValue", n.selected = "_selected", n))(be || {});
|
|
241
|
+
const Mt = Object.values(be), H = {
|
|
242
242
|
/** 文本(默认)*/
|
|
243
243
|
text: "text",
|
|
244
244
|
/** 链接 */
|
|
@@ -274,60 +274,60 @@ const Bt = Object.values(ve), H = {
|
|
|
274
274
|
rangePicker: "rangePicker",
|
|
275
275
|
/** 自定义组件 */
|
|
276
276
|
component: "component"
|
|
277
|
-
},
|
|
277
|
+
}, re = {
|
|
278
278
|
/** 新增 */
|
|
279
279
|
create: "create",
|
|
280
280
|
/** 更新 */
|
|
281
281
|
update: "update",
|
|
282
282
|
/** 设置查询条件 */
|
|
283
283
|
search: "search"
|
|
284
|
-
}, at = ["key", "index", "width", "visible", "fixed"],
|
|
284
|
+
}, at = ["key", "index", "width", "visible", "fixed"], ve = (n) => Object.prototype.toString.call(n).slice(8, -1).toLowerCase(), _t = (n) => (On(n), n.map((a, i) => ({
|
|
285
285
|
...a,
|
|
286
286
|
props: a.props ?? {},
|
|
287
287
|
visible: a.visible ?? !0,
|
|
288
288
|
_order: i,
|
|
289
289
|
_defaultValue: a.value
|
|
290
|
-
}))),
|
|
291
|
-
const { content:
|
|
290
|
+
}))), Ct = (n) => (Rn(n), n.map((a, i) => {
|
|
291
|
+
const { content: t, width: r = 120, visible: l = !0, resizable: f = !0, ellipsis: u = !0, component: C } = a;
|
|
292
292
|
return {
|
|
293
293
|
...a,
|
|
294
|
-
dataIndex: typeof
|
|
294
|
+
dataIndex: typeof t == "string" ? t : void 0,
|
|
295
295
|
width: r,
|
|
296
296
|
visible: l,
|
|
297
|
-
resizable:
|
|
297
|
+
resizable: f,
|
|
298
298
|
ellipsis: u,
|
|
299
|
-
component:
|
|
299
|
+
component: C ? Y(C) : void 0,
|
|
300
300
|
index: i
|
|
301
301
|
};
|
|
302
|
-
})),
|
|
303
|
-
const r =
|
|
302
|
+
})), Nn = (n, a, i) => n.sort((t, r) => i.indexOf(t.code) - i.indexOf(r.code)).map((t) => {
|
|
303
|
+
const r = zn(t.value ?? "", null);
|
|
304
304
|
if (r)
|
|
305
305
|
return {
|
|
306
|
-
...
|
|
306
|
+
...t,
|
|
307
307
|
items: r.map((l) => {
|
|
308
308
|
var u;
|
|
309
|
-
const
|
|
310
|
-
return
|
|
309
|
+
const f = a[l.name];
|
|
310
|
+
return f ? f.type !== l.type ? console.warn(`formItem type not match: name = ${l.name}, type = ${l.type}`) : l.type === G.datePicker && l.value ? {
|
|
311
311
|
...l,
|
|
312
|
-
value: l.value ?
|
|
312
|
+
value: l.value ? Ee(l.value) : void 0
|
|
313
313
|
} : l.type === G.rangePicker && ((u = l.value) != null && u.length) ? {
|
|
314
314
|
...l,
|
|
315
|
-
value: l.value.map(
|
|
315
|
+
value: l.value.map(Ee)
|
|
316
316
|
} : l : console.warn(`formItem not exit: name = ${l.name}`);
|
|
317
317
|
}).filter(Boolean)
|
|
318
318
|
};
|
|
319
319
|
}).filter(Boolean);
|
|
320
|
-
function
|
|
321
|
-
console.log("%c[pro-table]:", "color: #f00; padding: 2px 4px; font-weight: bold; font-size: 14px;", ...
|
|
320
|
+
function Se(...n) {
|
|
321
|
+
console.log("%c[pro-table]:", "color: #f00; padding: 2px 4px; font-weight: bold; font-size: 14px;", ...n);
|
|
322
322
|
}
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
new
|
|
323
|
+
const On = (n) => {
|
|
324
|
+
n.forEach((a) => {
|
|
325
|
+
new Lt({
|
|
326
326
|
type: [
|
|
327
327
|
{ required: !0 },
|
|
328
328
|
{
|
|
329
|
-
validator(
|
|
330
|
-
return ["string", "function"].includes(
|
|
329
|
+
validator(t, r, l) {
|
|
330
|
+
return ["string", "function"].includes(ve(r)) ? l() : l(new Error("type must be string or function"));
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
],
|
|
@@ -341,40 +341,40 @@ const En = (t) => {
|
|
|
341
341
|
required: a.type === "component"
|
|
342
342
|
},
|
|
343
343
|
props: {
|
|
344
|
-
validator: (
|
|
344
|
+
validator: (t, r, l) => r && !["object", "function"].includes(ve(r)) ? l(new Error("props must be object or function")) : l()
|
|
345
345
|
}
|
|
346
|
-
}).validate(a, (
|
|
347
|
-
|
|
346
|
+
}).validate(a, (t) => {
|
|
347
|
+
t && console.error(`[pro-table]: defineFormItems error, [${t[0].message}]`, {
|
|
348
348
|
formItem: a,
|
|
349
|
-
errors:
|
|
349
|
+
errors: t
|
|
350
350
|
});
|
|
351
351
|
});
|
|
352
352
|
});
|
|
353
|
-
},
|
|
354
|
-
|
|
355
|
-
new
|
|
353
|
+
}, Rn = (n) => {
|
|
354
|
+
n.forEach((a) => {
|
|
355
|
+
new Lt({
|
|
356
356
|
key: [{ required: !0, type: "string" }],
|
|
357
357
|
type: [
|
|
358
358
|
{
|
|
359
|
-
validator(
|
|
360
|
-
return r ? ["string", "function"].includes(
|
|
359
|
+
validator(t, r, l) {
|
|
360
|
+
return r ? ["string", "function"].includes(ve(r)) ? ve(r) === "string" && !Object.keys(H).includes(r) ? l(new Error(`type must be one of ${Object.keys(H).join(", ")}`)) : l() : l(new Error("type must be string or function")) : l();
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
],
|
|
364
364
|
title: [{ required: !0 }, { type: "string" }],
|
|
365
365
|
titleTooltip: {
|
|
366
|
-
validator(
|
|
367
|
-
return r && !["string", "function"].includes(
|
|
366
|
+
validator(t, r, l) {
|
|
367
|
+
return r && !["string", "function"].includes(ve(r)) ? l(new Error("titleTooltip must be string or function")) : l();
|
|
368
368
|
}
|
|
369
369
|
},
|
|
370
370
|
content: {
|
|
371
|
-
validator(
|
|
372
|
-
return r && !["string", "function"].includes(
|
|
371
|
+
validator(t, r, l) {
|
|
372
|
+
return r && !["string", "function"].includes(ve(r)) ? l(new Error("content must be string or function")) : l();
|
|
373
373
|
}
|
|
374
374
|
},
|
|
375
375
|
tooltip: {
|
|
376
|
-
validator(
|
|
377
|
-
return r && !["string", "boolean", "function"].includes(
|
|
376
|
+
validator(t, r, l) {
|
|
377
|
+
return r && !["string", "boolean", "function"].includes(ve(r)) ? l(new Error("tooltip must be string, boolean, or function")) : l();
|
|
378
378
|
}
|
|
379
379
|
},
|
|
380
380
|
component: {
|
|
@@ -383,45 +383,45 @@ const En = (t) => {
|
|
|
383
383
|
copyable: { type: "boolean" },
|
|
384
384
|
ellipsis: { type: "boolean" },
|
|
385
385
|
props: {
|
|
386
|
-
validator(
|
|
387
|
-
return r && !["object", "function"].includes(
|
|
386
|
+
validator(t, r, l) {
|
|
387
|
+
return r && !["object", "function"].includes(ve(r)) ? l(new Error("props must be object or function")) : l();
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
}).validate(a, (
|
|
391
|
-
|
|
390
|
+
}).validate(a, (t) => {
|
|
391
|
+
t && console.error(`[pro-table]: defineTableColumns error, ${t[0].message}`, {
|
|
392
392
|
column: a,
|
|
393
|
-
errors:
|
|
393
|
+
errors: t
|
|
394
394
|
});
|
|
395
395
|
});
|
|
396
396
|
});
|
|
397
|
-
},
|
|
398
|
-
if (!
|
|
399
|
-
const
|
|
400
|
-
return
|
|
397
|
+
}, Dn = (n, a) => {
|
|
398
|
+
if (!n) return 0;
|
|
399
|
+
const t = document.createElement("canvas").getContext("2d");
|
|
400
|
+
return t ? (t.font = [
|
|
401
401
|
400,
|
|
402
402
|
`${te.fontSize}px`,
|
|
403
403
|
te.fontFamily
|
|
404
|
-
].join(" "), Math.ceil(
|
|
405
|
-
},
|
|
406
|
-
if (
|
|
404
|
+
].join(" "), Math.ceil(t.measureText(n).width)) : 0;
|
|
405
|
+
}, zn = (n, a) => {
|
|
406
|
+
if (n === "" || n === null)
|
|
407
407
|
return a;
|
|
408
408
|
try {
|
|
409
|
-
return JSON.parse(
|
|
409
|
+
return JSON.parse(n);
|
|
410
410
|
} catch (i) {
|
|
411
|
-
return
|
|
412
|
-
jsonString:
|
|
411
|
+
return Se(`[pro-table]: parseJsonSafe error, ${i}`, {
|
|
412
|
+
jsonString: n,
|
|
413
413
|
defaultVal: a
|
|
414
414
|
}), a;
|
|
415
415
|
}
|
|
416
|
-
},
|
|
416
|
+
}, qn = (n) => {
|
|
417
417
|
let a = 0;
|
|
418
|
-
for (let i = 0; i <
|
|
419
|
-
a = (a << 5) - a +
|
|
418
|
+
for (let i = 0; i < n.length; i++)
|
|
419
|
+
a = (a << 5) - a + n.charCodeAt(i), a |= 0;
|
|
420
420
|
return a.toString(16);
|
|
421
|
-
},
|
|
422
|
-
const a =
|
|
423
|
-
return
|
|
424
|
-
},
|
|
421
|
+
}, jt = (n) => {
|
|
422
|
+
const a = qn(n);
|
|
423
|
+
return Ln(a, "1b671a64-40d5-491e-99b0-da01ff1f3341").replace(/-/g, "");
|
|
424
|
+
}, Yn = /* @__PURE__ */ ie({
|
|
425
425
|
__name: "EllipsisElement",
|
|
426
426
|
props: {
|
|
427
427
|
/**
|
|
@@ -487,92 +487,92 @@ const En = (t) => {
|
|
|
487
487
|
default: "hover"
|
|
488
488
|
}
|
|
489
489
|
},
|
|
490
|
-
setup(
|
|
491
|
-
const a =
|
|
492
|
-
() =>
|
|
493
|
-
), l =
|
|
490
|
+
setup(n) {
|
|
491
|
+
const a = n, i = B(() => a.list.map((u) => ve(u) === "object" ? u : { label: u }).map((u, C) => ({ ...u, index: C, __key: u.key ?? `${C}-${String(u.label)}` }))), t = B(() => vt(i.value, 0, a.maxCount)), r = B(
|
|
492
|
+
() => vt(i.value, a.maxCount, i.value.length)
|
|
493
|
+
), l = B(() => r.value.map(({ index: u, disabled: C, label: T, onClick: M }) => ({
|
|
494
494
|
key: u + a.maxCount,
|
|
495
|
-
label:
|
|
496
|
-
disabled:
|
|
497
|
-
onClick: () =>
|
|
498
|
-
}))),
|
|
499
|
-
const u = {}, { maxCount:
|
|
500
|
-
return
|
|
495
|
+
label: T,
|
|
496
|
+
disabled: C,
|
|
497
|
+
onClick: () => M == null ? void 0 : M(a.record)
|
|
498
|
+
}))), f = B(() => {
|
|
499
|
+
const u = {}, { maxCount: C, cellWidth: T, type: M } = a;
|
|
500
|
+
return M === H.text && (u.flex = 1), M === H.link && t.value.length > 1 && (u.maxWidth = `${((T - 50) / T / C * 100).toFixed(2)}%`), u;
|
|
501
501
|
});
|
|
502
|
-
return (u,
|
|
503
|
-
const
|
|
504
|
-
return b(),
|
|
505
|
-
class:
|
|
502
|
+
return (u, C) => {
|
|
503
|
+
const T = x("a-tag"), M = x("a-popover"), k = x("a-button"), s = x("a-menu"), $ = x("a-dropdown");
|
|
504
|
+
return b(), q("div", {
|
|
505
|
+
class: d([
|
|
506
506
|
u.$style.ellipsisElement,
|
|
507
507
|
{
|
|
508
|
-
[u.$style.ellipsisElementHasGap]: ![
|
|
508
|
+
[u.$style.ellipsisElementHasGap]: ![c(H).button, c(H).tag].includes(n.type)
|
|
509
509
|
}
|
|
510
510
|
])
|
|
511
511
|
}, [
|
|
512
|
-
(b(!0),
|
|
513
|
-
key:
|
|
514
|
-
class:
|
|
515
|
-
style: X(
|
|
512
|
+
(b(!0), q(Ie, null, nt(t.value, (F, R) => (b(), q("div", {
|
|
513
|
+
key: F.__key,
|
|
514
|
+
class: d(u.$style.elementItem),
|
|
515
|
+
style: X(f.value)
|
|
516
516
|
}, [
|
|
517
|
-
|
|
518
|
-
item:
|
|
519
|
-
index:
|
|
517
|
+
me(u.$slots, "default", {
|
|
518
|
+
item: F,
|
|
519
|
+
index: R
|
|
520
520
|
})
|
|
521
521
|
], 6))), 128)),
|
|
522
|
-
r.value.length ? (b(),
|
|
523
|
-
|
|
522
|
+
r.value.length ? (b(), q(Ie, { key: 0 }, [
|
|
523
|
+
n.displayType === "popover" ? (b(), E(M, {
|
|
524
524
|
key: 0,
|
|
525
|
-
trigger:
|
|
525
|
+
trigger: n.trigger,
|
|
526
526
|
"overlay-style": { maxWidth: "500px" },
|
|
527
527
|
"destroy-on-close": ""
|
|
528
528
|
}, {
|
|
529
|
-
content:
|
|
530
|
-
|
|
531
|
-
class:
|
|
529
|
+
content: m(() => [
|
|
530
|
+
D("div", {
|
|
531
|
+
class: d(u.$style.ellipsisList)
|
|
532
532
|
}, [
|
|
533
|
-
(b(!0),
|
|
534
|
-
key:
|
|
535
|
-
item:
|
|
536
|
-
index:
|
|
533
|
+
(b(!0), q(Ie, null, nt(r.value, (F, R) => me(u.$slots, "default", {
|
|
534
|
+
key: F.__key,
|
|
535
|
+
item: F,
|
|
536
|
+
index: R + n.maxCount,
|
|
537
537
|
inPopover: !0
|
|
538
538
|
})), 128))
|
|
539
539
|
], 2)
|
|
540
540
|
]),
|
|
541
|
-
default:
|
|
542
|
-
|
|
541
|
+
default: m(() => [
|
|
542
|
+
p(T, {
|
|
543
543
|
size: "mini",
|
|
544
544
|
type: "info",
|
|
545
|
-
class:
|
|
545
|
+
class: d([
|
|
546
546
|
u.$style.ellipsisTag,
|
|
547
547
|
{
|
|
548
|
-
[u.$style.imageEllipsisTag]:
|
|
548
|
+
[u.$style.imageEllipsisTag]: n.type === c(H).image
|
|
549
549
|
}
|
|
550
550
|
])
|
|
551
551
|
}, {
|
|
552
|
-
default:
|
|
553
|
-
Q(
|
|
552
|
+
default: m(() => [
|
|
553
|
+
Q(pe(`+${r.value.length}...`), 1)
|
|
554
554
|
]),
|
|
555
555
|
_: 1
|
|
556
556
|
}, 8, ["class"])
|
|
557
557
|
]),
|
|
558
558
|
_: 3
|
|
559
559
|
}, 8, ["trigger"])) : A("", !0),
|
|
560
|
-
|
|
560
|
+
n.displayType === "dropdown" ? (b(), E($, {
|
|
561
561
|
key: 1,
|
|
562
562
|
"destroy-on-close": "",
|
|
563
|
-
trigger:
|
|
563
|
+
trigger: n.trigger
|
|
564
564
|
}, {
|
|
565
|
-
overlay:
|
|
566
|
-
|
|
565
|
+
overlay: m(() => [
|
|
566
|
+
p(s, { items: l.value }, null, 8, ["items"])
|
|
567
567
|
]),
|
|
568
|
-
default:
|
|
569
|
-
|
|
568
|
+
default: m(() => [
|
|
569
|
+
p(k, {
|
|
570
570
|
type: "link",
|
|
571
571
|
size: "small"
|
|
572
572
|
}, {
|
|
573
|
-
default:
|
|
574
|
-
|
|
575
|
-
|
|
573
|
+
default: m(() => [
|
|
574
|
+
C[0] || (C[0] = Q(" 更多 ")),
|
|
575
|
+
p(c(Tt))
|
|
576
576
|
]),
|
|
577
577
|
_: 1
|
|
578
578
|
})
|
|
@@ -583,22 +583,22 @@ const En = (t) => {
|
|
|
583
583
|
], 2);
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
}),
|
|
587
|
-
ellipsisElement:
|
|
588
|
-
elementItem:
|
|
589
|
-
ellipsisElementHasGap:
|
|
590
|
-
flexWrap:
|
|
591
|
-
ellipsisTag:
|
|
592
|
-
imageEllipsisTag:
|
|
593
|
-
ellipsisList:
|
|
594
|
-
},
|
|
595
|
-
const i =
|
|
596
|
-
for (const [
|
|
597
|
-
i[
|
|
586
|
+
}), Hn = "_ellipsisElement_6fog1_1", Vn = "_elementItem_6fog1_6", Wn = "_ellipsisElementHasGap_6fog1_10", Un = "_flexWrap_6fog1_14", Gn = "_ellipsisTag_6fog1_18", Qn = "_imageEllipsisTag_6fog1_22", Kn = "_ellipsisList_6fog1_29", Jn = {
|
|
587
|
+
ellipsisElement: Hn,
|
|
588
|
+
elementItem: Vn,
|
|
589
|
+
ellipsisElementHasGap: Wn,
|
|
590
|
+
flexWrap: Un,
|
|
591
|
+
ellipsisTag: Gn,
|
|
592
|
+
imageEllipsisTag: Qn,
|
|
593
|
+
ellipsisList: Kn
|
|
594
|
+
}, fe = (n, a) => {
|
|
595
|
+
const i = n.__vccOpts || n;
|
|
596
|
+
for (const [t, r] of a)
|
|
597
|
+
i[t] = r;
|
|
598
598
|
return i;
|
|
599
|
-
},
|
|
600
|
-
$style:
|
|
601
|
-
},
|
|
599
|
+
}, Zn = {
|
|
600
|
+
$style: Jn
|
|
601
|
+
}, Xn = /* @__PURE__ */ fe(Yn, [["__cssModules", Zn]]), eo = { key: 1 }, to = /* @__PURE__ */ ie({
|
|
602
602
|
__name: "TableCellContent",
|
|
603
603
|
props: {
|
|
604
604
|
/**
|
|
@@ -637,140 +637,140 @@ const En = (t) => {
|
|
|
637
637
|
default: !1
|
|
638
638
|
}
|
|
639
639
|
},
|
|
640
|
-
setup(
|
|
641
|
-
const a =
|
|
642
|
-
const { index:
|
|
643
|
-
return
|
|
644
|
-
}), r =
|
|
645
|
-
const { index:
|
|
646
|
-
if (
|
|
647
|
-
return v(
|
|
640
|
+
setup(n) {
|
|
641
|
+
const a = n, i = /* @__PURE__ */ new Map(), t = B(() => {
|
|
642
|
+
const { index: $, record: F, column: R } = a, v = (R == null ? void 0 : R.type) ?? H.text;
|
|
643
|
+
return Ce(v) ? v(F, $) : v;
|
|
644
|
+
}), r = B(() => {
|
|
645
|
+
const { index: $, record: F, column: R } = a, v = R.content;
|
|
646
|
+
if (Ce(v))
|
|
647
|
+
return v(F, $);
|
|
648
648
|
if (typeof v == "string") {
|
|
649
649
|
if (v.startsWith("$")) {
|
|
650
650
|
let N = i.get(v);
|
|
651
651
|
N || (N = /* @__PURE__ */ new WeakMap(), i.set(v, N));
|
|
652
|
-
const
|
|
653
|
-
if (
|
|
654
|
-
const
|
|
655
|
-
return N.set(
|
|
652
|
+
const V = N.get(F);
|
|
653
|
+
if (V !== void 0) return V;
|
|
654
|
+
const z = xn({ path: v, json: F });
|
|
655
|
+
return N.set(F, z), z;
|
|
656
656
|
}
|
|
657
|
-
return Ve(
|
|
657
|
+
return Ve(F, v, "");
|
|
658
658
|
}
|
|
659
659
|
return "";
|
|
660
|
-
}), l =
|
|
661
|
-
const { index:
|
|
662
|
-
if (
|
|
663
|
-
const { props: v = {} } =
|
|
664
|
-
return
|
|
660
|
+
}), l = B(() => xe(r.value)), f = B(() => {
|
|
661
|
+
const { index: $, record: F, column: R } = a;
|
|
662
|
+
if (t.value === H.component) {
|
|
663
|
+
const { props: v = {} } = R;
|
|
664
|
+
return Ce(v) ? v(F, $) : {
|
|
665
665
|
...v,
|
|
666
|
-
index:
|
|
667
|
-
record:
|
|
666
|
+
index: $,
|
|
667
|
+
record: F
|
|
668
668
|
};
|
|
669
669
|
}
|
|
670
670
|
return {};
|
|
671
|
-
}), u =
|
|
672
|
-
const { index:
|
|
671
|
+
}), u = B(() => {
|
|
672
|
+
const { index: $, record: F, column: R } = a, v = R.tooltip ?? [H.text, H.link].includes(t.value);
|
|
673
673
|
if (!v) return "";
|
|
674
|
-
if (
|
|
675
|
-
return v(
|
|
674
|
+
if (Ce(v))
|
|
675
|
+
return v(F, $);
|
|
676
676
|
const N = l.value[0];
|
|
677
677
|
return (N == null ? void 0 : N.label) || N;
|
|
678
|
-
}),
|
|
679
|
-
return (
|
|
680
|
-
var
|
|
681
|
-
const
|
|
682
|
-
return
|
|
678
|
+
}), C = B(() => !(["", void 0, null].includes(r.value) && ![H.component, H.sort].includes(t.value))), T = ($) => typeof $ == "string" && /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test($), M = ($) => a.hasRouter && !T($), k = ($) => M($) ? "router-link" : "a", s = ($, F) => M($) ? { to: $, target: F ?? "_blank" } : { href: $, target: F ?? "_blank" };
|
|
679
|
+
return ($, F) => {
|
|
680
|
+
var z;
|
|
681
|
+
const R = x("a-button"), v = x("a-typography-text"), N = x("a-tag"), V = x("a-image");
|
|
682
|
+
return C.value ? (b(), q("div", {
|
|
683
683
|
key: 0,
|
|
684
|
-
class:
|
|
684
|
+
class: d($.$style.tableCellContent)
|
|
685
685
|
}, [
|
|
686
|
-
|
|
686
|
+
t.value === c(H).sort ? (b(), E(R, {
|
|
687
687
|
key: 0,
|
|
688
688
|
type: "text",
|
|
689
689
|
size: "small",
|
|
690
|
-
icon:
|
|
691
|
-
class:
|
|
690
|
+
icon: Y(c(ke)),
|
|
691
|
+
class: d([$.$style.draggableIcon, "super-table-column-draggable-handle"])
|
|
692
692
|
}, null, 8, ["icon", "class"])) : A("", !0),
|
|
693
|
-
|
|
693
|
+
t.value === c(H).component ? (b(), E(Ye(n.column.component), Xe(le({ key: 1 }, f.value)), null, 16)) : wt([(z = n.column) == null ? void 0 : z.key, n.index, l.value], () => (b(), E(Xn, {
|
|
694
694
|
key: 2,
|
|
695
695
|
list: l.value,
|
|
696
|
-
"max-count":
|
|
697
|
-
record:
|
|
698
|
-
type:
|
|
699
|
-
"cell-width":
|
|
700
|
-
"display-type": [
|
|
696
|
+
"max-count": t.value === c(H).text ? 1 : n.column.maxCount,
|
|
697
|
+
record: n.record,
|
|
698
|
+
type: t.value,
|
|
699
|
+
"cell-width": n.column.width,
|
|
700
|
+
"display-type": [c(H).button].includes(t.value) ? "dropdown" : "popover"
|
|
701
701
|
}, {
|
|
702
|
-
default:
|
|
703
|
-
|
|
704
|
-
|
|
702
|
+
default: m(({ item: h, index: y, inPopover: L }) => [
|
|
703
|
+
t.value === c(H).text ? (b(), q(Ie, { key: 0 }, [
|
|
704
|
+
y === 0 ? (b(), E(v, {
|
|
705
705
|
key: 0,
|
|
706
706
|
ellipsis: { tooltip: u.value },
|
|
707
|
-
content: String(
|
|
708
|
-
class:
|
|
709
|
-
}, null, 8, ["ellipsis", "content", "class"])) : (b(),
|
|
707
|
+
content: String(h.label),
|
|
708
|
+
class: d($.$style.antTypographyEllipsis)
|
|
709
|
+
}, null, 8, ["ellipsis", "content", "class"])) : (b(), q("div", {
|
|
710
710
|
key: 1,
|
|
711
|
-
class:
|
|
712
|
-
},
|
|
711
|
+
class: d($.$style.textListItem)
|
|
712
|
+
}, pe(h.label), 3))
|
|
713
713
|
], 64)) : A("", !0),
|
|
714
|
-
|
|
715
|
-
default:
|
|
716
|
-
|
|
714
|
+
t.value === c(H).link ? (b(), E(Ye(k(h.to)), Xe(le({ key: 1 }, s(h.to, h.target))), {
|
|
715
|
+
default: m(() => [
|
|
716
|
+
n.column.ellipsis ? (b(), E(v, {
|
|
717
717
|
key: 0,
|
|
718
|
-
ellipsis: { tooltip:
|
|
719
|
-
content: String(
|
|
720
|
-
style: X({ color:
|
|
721
|
-
class:
|
|
722
|
-
}, null, 8, ["ellipsis", "content", "style", "class"])) : (b(),
|
|
718
|
+
ellipsis: { tooltip: h.label },
|
|
719
|
+
content: String(h.label),
|
|
720
|
+
style: X({ color: c(te).colorPrimary }),
|
|
721
|
+
class: d($.$style.antTypographyEllipsis)
|
|
722
|
+
}, null, 8, ["ellipsis", "content", "style", "class"])) : (b(), q("span", eo, pe(h.label), 1))
|
|
723
723
|
]),
|
|
724
724
|
_: 2
|
|
725
725
|
}, 1040)) : A("", !0),
|
|
726
|
-
|
|
727
|
-
default:
|
|
728
|
-
Q(
|
|
726
|
+
t.value === c(H).tag ? (b(), E(N, Xe(le({ key: 2 }, h)), {
|
|
727
|
+
default: m(() => [
|
|
728
|
+
Q(pe(h.label), 1)
|
|
729
729
|
]),
|
|
730
730
|
_: 2
|
|
731
731
|
}, 1040)) : A("", !0),
|
|
732
|
-
|
|
732
|
+
t.value === c(H).button ? (b(), E(R, le({
|
|
733
733
|
key: 3,
|
|
734
734
|
type: "link",
|
|
735
735
|
size: "small",
|
|
736
|
-
disabled:
|
|
737
|
-
},
|
|
738
|
-
onClick: (
|
|
739
|
-
var
|
|
740
|
-
return (
|
|
736
|
+
disabled: h.disabled
|
|
737
|
+
}, h.buttonProps, {
|
|
738
|
+
onClick: (J) => {
|
|
739
|
+
var ae;
|
|
740
|
+
return (ae = h.onClick) == null ? void 0 : ae.call(h, n.record, n.index);
|
|
741
741
|
}
|
|
742
742
|
}), {
|
|
743
|
-
default:
|
|
744
|
-
Q(
|
|
743
|
+
default: m(() => [
|
|
744
|
+
Q(pe(h.label), 1)
|
|
745
745
|
]),
|
|
746
746
|
_: 2
|
|
747
747
|
}, 1040, ["disabled", "onClick"])) : A("", !0),
|
|
748
|
-
|
|
748
|
+
t.value === c(H).image ? (b(), E(V, {
|
|
749
749
|
key: 4,
|
|
750
|
-
width:
|
|
751
|
-
height:
|
|
752
|
-
src:
|
|
750
|
+
width: L ? 100 : 32,
|
|
751
|
+
height: L ? 100 : 32,
|
|
752
|
+
src: h.label,
|
|
753
753
|
style: { objectFit: "cover" }
|
|
754
754
|
}, {
|
|
755
|
-
previewMask:
|
|
756
|
-
|
|
755
|
+
previewMask: m(() => [
|
|
756
|
+
p(c(gn))
|
|
757
757
|
]),
|
|
758
758
|
_: 2
|
|
759
759
|
}, 1032, ["width", "height", "src"])) : A("", !0)
|
|
760
760
|
]),
|
|
761
761
|
_: 1
|
|
762
|
-
}, 8, ["list", "max-count", "record", "type", "cell-width", "display-type"])),
|
|
762
|
+
}, 8, ["list", "max-count", "record", "type", "cell-width", "display-type"])), F, 0)
|
|
763
763
|
], 2)) : A("", !0);
|
|
764
764
|
};
|
|
765
765
|
}
|
|
766
|
-
}),
|
|
767
|
-
tableCellContent:
|
|
768
|
-
antTypographyEllipsis:
|
|
769
|
-
draggableIcon:
|
|
770
|
-
textListItem:
|
|
771
|
-
},
|
|
772
|
-
$style:
|
|
773
|
-
},
|
|
766
|
+
}), no = "_tableCellContent_1chn7_1", oo = "_antTypographyEllipsis_1chn7_1", lo = "_draggableIcon_1chn7_4", ao = "_textListItem_1chn7_8", so = {
|
|
767
|
+
tableCellContent: no,
|
|
768
|
+
antTypographyEllipsis: oo,
|
|
769
|
+
draggableIcon: lo,
|
|
770
|
+
textListItem: ao
|
|
771
|
+
}, ro = {
|
|
772
|
+
$style: so
|
|
773
|
+
}, io = /* @__PURE__ */ fe(to, [["__cssModules", ro]]), uo = ie({
|
|
774
774
|
name: "VNodes",
|
|
775
775
|
props: {
|
|
776
776
|
vnodes: {
|
|
@@ -781,7 +781,7 @@ const En = (t) => {
|
|
|
781
781
|
render() {
|
|
782
782
|
return this.vnodes;
|
|
783
783
|
}
|
|
784
|
-
}),
|
|
784
|
+
}), co = /* @__PURE__ */ ie({
|
|
785
785
|
__name: "TableConfig",
|
|
786
786
|
props: {
|
|
787
787
|
/**
|
|
@@ -795,170 +795,170 @@ const En = (t) => {
|
|
|
795
795
|
}
|
|
796
796
|
},
|
|
797
797
|
emits: ["change"],
|
|
798
|
-
setup(
|
|
799
|
-
const i = ee(!1),
|
|
800
|
-
|
|
798
|
+
setup(n, { emit: a }) {
|
|
799
|
+
const i = ee(!1), t = n, r = a, l = ee([]), f = ee([]), u = ee([]), C = ee([]), T = ee(""), M = ee(""), k = () => {
|
|
800
|
+
f.value = l.value.filter((y) => y.fixed === "left"), u.value = l.value.filter((y) => !y.fixed), C.value = l.value.filter((y) => y.fixed === "right");
|
|
801
801
|
};
|
|
802
|
-
|
|
803
|
-
l.value =
|
|
802
|
+
mt(() => {
|
|
803
|
+
l.value = t.columns, k();
|
|
804
804
|
});
|
|
805
|
-
const s = ({ title:
|
|
806
|
-
var
|
|
807
|
-
const
|
|
808
|
-
return
|
|
809
|
-
},
|
|
810
|
-
|
|
811
|
-
}, 300),
|
|
805
|
+
const s = ({ title: y }) => {
|
|
806
|
+
var J;
|
|
807
|
+
const L = (J = M.value) == null ? void 0 : J.trim();
|
|
808
|
+
return L ? y.toLocaleLowerCase().includes(L.toLocaleLowerCase()) : !0;
|
|
809
|
+
}, $ = B(() => l.value.every((y) => !s(y))), F = st((y) => {
|
|
810
|
+
M.value = y.target.value;
|
|
811
|
+
}, 300), R = () => {
|
|
812
812
|
l.value = [
|
|
813
|
-
...
|
|
813
|
+
...f.value,
|
|
814
814
|
...u.value,
|
|
815
|
-
...
|
|
815
|
+
...C.value
|
|
816
816
|
];
|
|
817
817
|
}, v = () => {
|
|
818
|
-
|
|
818
|
+
R(), r(
|
|
819
819
|
"change",
|
|
820
|
-
l.value.map((
|
|
820
|
+
l.value.map((y) => $e(y, at))
|
|
821
821
|
);
|
|
822
|
-
}, N =
|
|
822
|
+
}, N = B({
|
|
823
823
|
get() {
|
|
824
|
-
return l.value.every((
|
|
824
|
+
return l.value.every((y) => y.visible);
|
|
825
825
|
},
|
|
826
|
-
set(
|
|
827
|
-
l.value.forEach((
|
|
828
|
-
|
|
826
|
+
set(y) {
|
|
827
|
+
l.value.forEach((L) => {
|
|
828
|
+
L.visible = y;
|
|
829
829
|
}), v();
|
|
830
830
|
}
|
|
831
|
-
}),
|
|
832
|
-
const
|
|
833
|
-
return
|
|
834
|
-
}),
|
|
831
|
+
}), V = B(() => {
|
|
832
|
+
const y = l.value.filter((L) => L.visible).length;
|
|
833
|
+
return y > 0 && y < l.value.length;
|
|
834
|
+
}), z = () => {
|
|
835
835
|
r("change", []);
|
|
836
|
-
},
|
|
837
|
-
|
|
836
|
+
}, h = (y, L) => {
|
|
837
|
+
y.fixed = L, k(), R(), v();
|
|
838
838
|
};
|
|
839
|
-
return
|
|
840
|
-
i.value || (
|
|
841
|
-
}), (
|
|
842
|
-
const
|
|
843
|
-
return b(), E(
|
|
839
|
+
return mt(() => {
|
|
840
|
+
i.value || (T.value = "", M.value = "");
|
|
841
|
+
}), (y, L) => {
|
|
842
|
+
const J = x("a-button"), ae = x("a-checkbox"), we = x("a-input"), he = x("a-typography-text"), ue = x("a-tooltip"), Le = x("a-popover"), Te = x("a-config-provider");
|
|
843
|
+
return b(), E(Te, { theme: {
|
|
844
844
|
token: {
|
|
845
845
|
borderRadius: 2
|
|
846
846
|
}
|
|
847
847
|
} }, {
|
|
848
|
-
default:
|
|
849
|
-
|
|
848
|
+
default: m(() => [
|
|
849
|
+
p(Le, {
|
|
850
850
|
open: i.value,
|
|
851
|
-
"onUpdate:open":
|
|
851
|
+
"onUpdate:open": L[2] || (L[2] = (P) => i.value = P),
|
|
852
852
|
placement: "bottomRight",
|
|
853
853
|
trigger: "click",
|
|
854
854
|
"overlay-inner-style": { padding: 0 },
|
|
855
855
|
"overlay-class-name": "pro-table-config-popover"
|
|
856
856
|
}, {
|
|
857
|
-
content:
|
|
858
|
-
|
|
859
|
-
class:
|
|
857
|
+
content: m(() => [
|
|
858
|
+
D("div", {
|
|
859
|
+
class: d(y.$style.tableConfig)
|
|
860
860
|
}, [
|
|
861
|
-
|
|
862
|
-
class:
|
|
861
|
+
D("div", {
|
|
862
|
+
class: d(y.$style.tableConfigActions)
|
|
863
863
|
}, [
|
|
864
|
-
|
|
864
|
+
p(ae, {
|
|
865
865
|
checked: N.value,
|
|
866
|
-
"onUpdate:checked":
|
|
867
|
-
indeterminate:
|
|
866
|
+
"onUpdate:checked": L[0] || (L[0] = (P) => N.value = P),
|
|
867
|
+
indeterminate: V.value
|
|
868
868
|
}, {
|
|
869
|
-
default:
|
|
869
|
+
default: m(() => L[3] || (L[3] = [
|
|
870
870
|
Q(" 全选 ")
|
|
871
871
|
])),
|
|
872
872
|
_: 1
|
|
873
873
|
}, 8, ["checked", "indeterminate"]),
|
|
874
|
-
|
|
874
|
+
p(J, {
|
|
875
875
|
type: "link",
|
|
876
876
|
size: "small",
|
|
877
|
-
onClick:
|
|
877
|
+
onClick: z
|
|
878
878
|
}, {
|
|
879
|
-
default:
|
|
879
|
+
default: m(() => L[4] || (L[4] = [
|
|
880
880
|
Q(" 重置 ")
|
|
881
881
|
])),
|
|
882
882
|
_: 1
|
|
883
883
|
})
|
|
884
884
|
], 2),
|
|
885
|
-
|
|
886
|
-
class:
|
|
885
|
+
D("div", {
|
|
886
|
+
class: d(y.$style.tableConfigHead)
|
|
887
887
|
}, [
|
|
888
|
-
|
|
889
|
-
value:
|
|
890
|
-
"onUpdate:value":
|
|
888
|
+
p(we, {
|
|
889
|
+
value: T.value,
|
|
890
|
+
"onUpdate:value": L[1] || (L[1] = (P) => T.value = P),
|
|
891
891
|
placeholder: "搜索标题",
|
|
892
|
-
onChange:
|
|
892
|
+
onChange: c(F)
|
|
893
893
|
}, null, 8, ["value", "onChange"])
|
|
894
894
|
], 2),
|
|
895
|
-
|
|
896
|
-
class:
|
|
895
|
+
D("div", {
|
|
896
|
+
class: d(y.$style.tableConfigContent)
|
|
897
897
|
}, [
|
|
898
|
-
|
|
898
|
+
f.value.some((P) => s(P)) ? (b(), q("div", {
|
|
899
899
|
key: 0,
|
|
900
|
-
class:
|
|
900
|
+
class: d(y.$style.columnGroup)
|
|
901
901
|
}, [
|
|
902
|
-
|
|
903
|
-
class:
|
|
902
|
+
D("div", {
|
|
903
|
+
class: d(y.$style.groupTitle)
|
|
904
904
|
}, "固定在左侧", 2),
|
|
905
|
-
|
|
906
|
-
list:
|
|
905
|
+
p(c(je), {
|
|
906
|
+
list: f.value,
|
|
907
907
|
"item-key": "key",
|
|
908
|
-
class:
|
|
908
|
+
class: d(y.$style.columnList),
|
|
909
909
|
handle: ".table-column-draggable-handle",
|
|
910
|
-
disabled:
|
|
910
|
+
disabled: f.value.length <= 1,
|
|
911
911
|
onEnd: v
|
|
912
912
|
}, {
|
|
913
|
-
item:
|
|
914
|
-
s(
|
|
913
|
+
item: m(({ element: P }) => [
|
|
914
|
+
s(P) ? (b(), q("div", {
|
|
915
915
|
key: 0,
|
|
916
|
-
class:
|
|
917
|
-
style: X({ background:
|
|
916
|
+
class: d(y.$style.columnItem),
|
|
917
|
+
style: X({ background: c(te).colorBgContainer })
|
|
918
918
|
}, [
|
|
919
|
-
|
|
919
|
+
p(J, {
|
|
920
920
|
type: "text",
|
|
921
921
|
size: "small",
|
|
922
|
-
icon:
|
|
923
|
-
style: X({ color:
|
|
924
|
-
class:
|
|
922
|
+
icon: Y(c(ke)),
|
|
923
|
+
style: X({ color: c(te).colorTextQuaternary }),
|
|
924
|
+
class: d(["table-column-draggable-handle", y.$style.dragIcon])
|
|
925
925
|
}, null, 8, ["icon", "style", "class"]),
|
|
926
|
-
|
|
927
|
-
checked:
|
|
928
|
-
"onUpdate:checked": (
|
|
926
|
+
p(ae, {
|
|
927
|
+
checked: P.visible,
|
|
928
|
+
"onUpdate:checked": (ne) => P.visible = ne,
|
|
929
929
|
onChange: v
|
|
930
930
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
931
|
-
|
|
932
|
-
ellipsis: { tooltip:
|
|
933
|
-
content:
|
|
934
|
-
class:
|
|
931
|
+
p(he, {
|
|
932
|
+
ellipsis: { tooltip: P.title },
|
|
933
|
+
content: P.title,
|
|
934
|
+
class: d([y.$style.columnItemContent, y.$style.dragHandle, "table-column-draggable-handle"]),
|
|
935
935
|
onClick: () => {
|
|
936
|
-
|
|
936
|
+
P.visible = !P.visible, v();
|
|
937
937
|
}
|
|
938
938
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
939
|
-
|
|
940
|
-
class:
|
|
939
|
+
D("div", {
|
|
940
|
+
class: d(y.$style.fixedActions)
|
|
941
941
|
}, [
|
|
942
|
-
|
|
943
|
-
default:
|
|
944
|
-
|
|
942
|
+
p(ue, { title: "固定在右侧" }, {
|
|
943
|
+
default: m(() => [
|
|
944
|
+
p(J, {
|
|
945
945
|
type: "text",
|
|
946
946
|
size: "small",
|
|
947
|
-
icon:
|
|
948
|
-
style: X({ color:
|
|
949
|
-
onClick: (
|
|
947
|
+
icon: Y(c(pt)),
|
|
948
|
+
style: X({ color: c(te).colorTextQuaternary }),
|
|
949
|
+
onClick: (ne) => h(P, "right")
|
|
950
950
|
}, null, 8, ["icon", "style", "onClick"])
|
|
951
951
|
]),
|
|
952
952
|
_: 2
|
|
953
953
|
}, 1024),
|
|
954
|
-
|
|
955
|
-
default:
|
|
956
|
-
|
|
954
|
+
p(ue, { title: "取消固定" }, {
|
|
955
|
+
default: m(() => [
|
|
956
|
+
p(J, {
|
|
957
957
|
type: "text",
|
|
958
958
|
size: "small",
|
|
959
|
-
icon:
|
|
960
|
-
style: X({ color:
|
|
961
|
-
onClick: (
|
|
959
|
+
icon: Y(c(ft)),
|
|
960
|
+
style: X({ color: c(te).colorPrimary }),
|
|
961
|
+
onClick: (ne) => h(P, !1)
|
|
962
962
|
}, null, 8, ["icon", "style", "onClick"])
|
|
963
963
|
]),
|
|
964
964
|
_: 2
|
|
@@ -969,70 +969,70 @@ const En = (t) => {
|
|
|
969
969
|
_: 1
|
|
970
970
|
}, 8, ["list", "class", "disabled"])
|
|
971
971
|
], 2)) : A("", !0),
|
|
972
|
-
u.value.some((
|
|
972
|
+
u.value.some((P) => s(P)) ? (b(), q("div", {
|
|
973
973
|
key: 1,
|
|
974
|
-
class:
|
|
974
|
+
class: d(y.$style.columnGroup)
|
|
975
975
|
}, [
|
|
976
|
-
|
|
977
|
-
class:
|
|
976
|
+
D("div", {
|
|
977
|
+
class: d(y.$style.groupTitle)
|
|
978
978
|
}, "不固定", 2),
|
|
979
|
-
|
|
979
|
+
p(c(je), {
|
|
980
980
|
list: u.value,
|
|
981
981
|
"item-key": "key",
|
|
982
|
-
class:
|
|
982
|
+
class: d(y.$style.columnList),
|
|
983
983
|
handle: ".table-column-draggable-handle",
|
|
984
984
|
disabled: u.value.length <= 1,
|
|
985
985
|
onEnd: v
|
|
986
986
|
}, {
|
|
987
|
-
item:
|
|
988
|
-
s(
|
|
987
|
+
item: m(({ element: P }) => [
|
|
988
|
+
s(P) ? (b(), q("div", {
|
|
989
989
|
key: 0,
|
|
990
|
-
class:
|
|
991
|
-
style: X({ background:
|
|
990
|
+
class: d(y.$style.columnItem),
|
|
991
|
+
style: X({ background: c(te).colorBgContainer })
|
|
992
992
|
}, [
|
|
993
|
-
|
|
993
|
+
p(J, {
|
|
994
994
|
type: "text",
|
|
995
995
|
size: "small",
|
|
996
|
-
icon:
|
|
997
|
-
style: X({ color:
|
|
998
|
-
class:
|
|
996
|
+
icon: Y(c(ke)),
|
|
997
|
+
style: X({ color: c(te).colorTextQuaternary }),
|
|
998
|
+
class: d(["table-column-draggable-handle", y.$style.dragIcon])
|
|
999
999
|
}, null, 8, ["icon", "style", "class"]),
|
|
1000
|
-
|
|
1001
|
-
checked:
|
|
1002
|
-
"onUpdate:checked": (
|
|
1000
|
+
p(ae, {
|
|
1001
|
+
checked: P.visible,
|
|
1002
|
+
"onUpdate:checked": (ne) => P.visible = ne,
|
|
1003
1003
|
onChange: v
|
|
1004
1004
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
1005
|
-
|
|
1006
|
-
ellipsis: { tooltip:
|
|
1007
|
-
content:
|
|
1008
|
-
class:
|
|
1005
|
+
p(he, {
|
|
1006
|
+
ellipsis: { tooltip: P.title },
|
|
1007
|
+
content: P.title,
|
|
1008
|
+
class: d([y.$style.columnItemContent, y.$style.dragHandle, "table-column-draggable-handle"]),
|
|
1009
1009
|
onClick: () => {
|
|
1010
|
-
|
|
1010
|
+
P.visible = !P.visible, v();
|
|
1011
1011
|
}
|
|
1012
1012
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
1013
|
-
|
|
1014
|
-
class:
|
|
1013
|
+
D("div", {
|
|
1014
|
+
class: d(y.$style.fixedActions)
|
|
1015
1015
|
}, [
|
|
1016
|
-
|
|
1017
|
-
default:
|
|
1018
|
-
|
|
1016
|
+
p(ue, { title: "固定在左侧" }, {
|
|
1017
|
+
default: m(() => [
|
|
1018
|
+
p(J, {
|
|
1019
1019
|
type: "text",
|
|
1020
1020
|
size: "small",
|
|
1021
|
-
icon:
|
|
1022
|
-
style: X({ color:
|
|
1023
|
-
onClick: (
|
|
1021
|
+
icon: Y(c(yt)),
|
|
1022
|
+
style: X({ color: c(te).colorTextQuaternary }),
|
|
1023
|
+
onClick: (ne) => h(P, "left")
|
|
1024
1024
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1025
1025
|
]),
|
|
1026
1026
|
_: 2
|
|
1027
1027
|
}, 1024),
|
|
1028
|
-
|
|
1029
|
-
default:
|
|
1030
|
-
|
|
1028
|
+
p(ue, { title: "固定在右侧" }, {
|
|
1029
|
+
default: m(() => [
|
|
1030
|
+
p(J, {
|
|
1031
1031
|
type: "text",
|
|
1032
1032
|
size: "small",
|
|
1033
|
-
icon:
|
|
1034
|
-
style: X({ color:
|
|
1035
|
-
onClick: (
|
|
1033
|
+
icon: Y(c(pt)),
|
|
1034
|
+
style: X({ color: c(te).colorTextQuaternary }),
|
|
1035
|
+
onClick: (ne) => h(P, "right")
|
|
1036
1036
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1037
1037
|
]),
|
|
1038
1038
|
_: 2
|
|
@@ -1043,70 +1043,70 @@ const En = (t) => {
|
|
|
1043
1043
|
_: 1
|
|
1044
1044
|
}, 8, ["list", "class", "disabled"])
|
|
1045
1045
|
], 2)) : A("", !0),
|
|
1046
|
-
|
|
1046
|
+
C.value.some((P) => s(P)) ? (b(), q("div", {
|
|
1047
1047
|
key: 2,
|
|
1048
|
-
class:
|
|
1048
|
+
class: d(y.$style.columnGroup)
|
|
1049
1049
|
}, [
|
|
1050
|
-
|
|
1051
|
-
class:
|
|
1050
|
+
D("div", {
|
|
1051
|
+
class: d(y.$style.groupTitle)
|
|
1052
1052
|
}, "固定在右侧", 2),
|
|
1053
|
-
|
|
1054
|
-
list:
|
|
1053
|
+
p(c(je), {
|
|
1054
|
+
list: C.value,
|
|
1055
1055
|
"item-key": "key",
|
|
1056
|
-
class:
|
|
1056
|
+
class: d(y.$style.columnList),
|
|
1057
1057
|
handle: ".table-column-draggable-handle",
|
|
1058
|
-
disabled:
|
|
1058
|
+
disabled: C.value.length <= 1,
|
|
1059
1059
|
onEnd: v
|
|
1060
1060
|
}, {
|
|
1061
|
-
item:
|
|
1062
|
-
s(
|
|
1061
|
+
item: m(({ element: P }) => [
|
|
1062
|
+
s(P) ? (b(), q("div", {
|
|
1063
1063
|
key: 0,
|
|
1064
|
-
class:
|
|
1065
|
-
style: X({ background:
|
|
1064
|
+
class: d(y.$style.columnItem),
|
|
1065
|
+
style: X({ background: c(te).colorBgContainer })
|
|
1066
1066
|
}, [
|
|
1067
|
-
|
|
1067
|
+
p(J, {
|
|
1068
1068
|
type: "text",
|
|
1069
1069
|
size: "small",
|
|
1070
|
-
icon:
|
|
1071
|
-
style: X({ color:
|
|
1072
|
-
class:
|
|
1070
|
+
icon: Y(c(ke)),
|
|
1071
|
+
style: X({ color: c(te).colorTextQuaternary }),
|
|
1072
|
+
class: d(["table-column-draggable-handle", y.$style.dragIcon])
|
|
1073
1073
|
}, null, 8, ["icon", "style", "class"]),
|
|
1074
|
-
|
|
1075
|
-
checked:
|
|
1076
|
-
"onUpdate:checked": (
|
|
1074
|
+
p(ae, {
|
|
1075
|
+
checked: P.visible,
|
|
1076
|
+
"onUpdate:checked": (ne) => P.visible = ne,
|
|
1077
1077
|
onChange: v
|
|
1078
1078
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
1079
|
-
|
|
1080
|
-
ellipsis: { tooltip:
|
|
1081
|
-
content:
|
|
1082
|
-
class:
|
|
1079
|
+
p(he, {
|
|
1080
|
+
ellipsis: { tooltip: P.title },
|
|
1081
|
+
content: P.title,
|
|
1082
|
+
class: d([y.$style.columnItemContent, y.$style.dragHandle, "table-column-draggable-handle"]),
|
|
1083
1083
|
onClick: () => {
|
|
1084
|
-
|
|
1084
|
+
P.visible = !P.visible, v();
|
|
1085
1085
|
}
|
|
1086
1086
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
1087
|
-
|
|
1088
|
-
class:
|
|
1087
|
+
D("div", {
|
|
1088
|
+
class: d(y.$style.fixedActions)
|
|
1089
1089
|
}, [
|
|
1090
|
-
|
|
1091
|
-
default:
|
|
1092
|
-
|
|
1090
|
+
p(ue, { title: "固定在左侧" }, {
|
|
1091
|
+
default: m(() => [
|
|
1092
|
+
p(J, {
|
|
1093
1093
|
type: "text",
|
|
1094
1094
|
size: "small",
|
|
1095
|
-
icon:
|
|
1096
|
-
style: X({ color:
|
|
1097
|
-
onClick: (
|
|
1095
|
+
icon: Y(c(yt)),
|
|
1096
|
+
style: X({ color: c(te).colorTextQuaternary }),
|
|
1097
|
+
onClick: (ne) => h(P, "left")
|
|
1098
1098
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1099
1099
|
]),
|
|
1100
1100
|
_: 2
|
|
1101
1101
|
}, 1024),
|
|
1102
|
-
|
|
1103
|
-
default:
|
|
1104
|
-
|
|
1102
|
+
p(ue, { title: "取消固定" }, {
|
|
1103
|
+
default: m(() => [
|
|
1104
|
+
p(J, {
|
|
1105
1105
|
type: "text",
|
|
1106
1106
|
size: "small",
|
|
1107
|
-
icon:
|
|
1108
|
-
style: X({ color:
|
|
1109
|
-
onClick: (
|
|
1107
|
+
icon: Y(c(ft)),
|
|
1108
|
+
style: X({ color: c(te).colorPrimary }),
|
|
1109
|
+
onClick: (ne) => h(P, !1)
|
|
1110
1110
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1111
1111
|
]),
|
|
1112
1112
|
_: 2
|
|
@@ -1117,19 +1117,19 @@ const En = (t) => {
|
|
|
1117
1117
|
_: 1
|
|
1118
1118
|
}, 8, ["list", "class", "disabled"])
|
|
1119
1119
|
], 2)) : A("", !0),
|
|
1120
|
-
|
|
1120
|
+
$.value ? (b(), q("div", {
|
|
1121
1121
|
key: 3,
|
|
1122
|
-
class:
|
|
1123
|
-
style: X({ color:
|
|
1122
|
+
class: d(y.$style.emptyText),
|
|
1123
|
+
style: X({ color: c(te).colorTextSecondary })
|
|
1124
1124
|
}, " 未找到相关查询项 ", 6)) : A("", !0)
|
|
1125
1125
|
], 2)
|
|
1126
1126
|
], 2)
|
|
1127
1127
|
]),
|
|
1128
|
-
default:
|
|
1129
|
-
|
|
1128
|
+
default: m(() => [
|
|
1129
|
+
p(J, {
|
|
1130
1130
|
type: "text",
|
|
1131
|
-
icon:
|
|
1132
|
-
class:
|
|
1131
|
+
icon: Y(c(vn)),
|
|
1132
|
+
class: d(y.$style.configBtn)
|
|
1133
1133
|
}, null, 8, ["icon", "class"])
|
|
1134
1134
|
]),
|
|
1135
1135
|
_: 1
|
|
@@ -1139,24 +1139,24 @@ const En = (t) => {
|
|
|
1139
1139
|
});
|
|
1140
1140
|
};
|
|
1141
1141
|
}
|
|
1142
|
-
}),
|
|
1143
|
-
configBtn:
|
|
1144
|
-
tableConfig:
|
|
1145
|
-
tableConfigHead:
|
|
1146
|
-
tableConfigActions:
|
|
1147
|
-
tableConfigContent:
|
|
1148
|
-
columnGroup:
|
|
1149
|
-
groupTitle:
|
|
1150
|
-
columnList:
|
|
1151
|
-
columnItem:
|
|
1152
|
-
columnItemContent:
|
|
1153
|
-
dragIcon:
|
|
1154
|
-
dragHandle:
|
|
1155
|
-
fixedActions:
|
|
1156
|
-
emptyText:
|
|
1157
|
-
},
|
|
1158
|
-
$style:
|
|
1159
|
-
},
|
|
1142
|
+
}), mo = "_configBtn_fstz6_1", po = "_tableConfig_fstz6_9", fo = "_tableConfigHead_fstz6_12", yo = "_tableConfigActions_fstz6_15", go = "_tableConfigContent_fstz6_22", vo = "_columnGroup_fstz6_28", bo = "_groupTitle_fstz6_28", ho = "_columnList_fstz6_35", _o = "_columnItem_fstz6_39", Co = "_columnItemContent_fstz6_47", $o = "_dragIcon_fstz6_51", So = "_dragHandle_fstz6_54", Io = "_fixedActions_fstz6_57", ko = "_emptyText_fstz6_65", wo = {
|
|
1143
|
+
configBtn: mo,
|
|
1144
|
+
tableConfig: po,
|
|
1145
|
+
tableConfigHead: fo,
|
|
1146
|
+
tableConfigActions: yo,
|
|
1147
|
+
tableConfigContent: go,
|
|
1148
|
+
columnGroup: vo,
|
|
1149
|
+
groupTitle: bo,
|
|
1150
|
+
columnList: ho,
|
|
1151
|
+
columnItem: _o,
|
|
1152
|
+
columnItemContent: Co,
|
|
1153
|
+
dragIcon: $o,
|
|
1154
|
+
dragHandle: So,
|
|
1155
|
+
fixedActions: Io,
|
|
1156
|
+
emptyText: ko
|
|
1157
|
+
}, To = {
|
|
1158
|
+
$style: wo
|
|
1159
|
+
}, Fo = /* @__PURE__ */ fe(co, [["__cssModules", To]]), xo = /* @__PURE__ */ ie({
|
|
1160
1160
|
__name: "DynamicList",
|
|
1161
1161
|
props: {
|
|
1162
1162
|
/**
|
|
@@ -1214,7 +1214,7 @@ const En = (t) => {
|
|
|
1214
1214
|
deleteButtonProps: {
|
|
1215
1215
|
type: [Object, Function],
|
|
1216
1216
|
default: () => ({
|
|
1217
|
-
icon:
|
|
1217
|
+
icon: Y(gt)
|
|
1218
1218
|
})
|
|
1219
1219
|
},
|
|
1220
1220
|
/**
|
|
@@ -1232,7 +1232,7 @@ const En = (t) => {
|
|
|
1232
1232
|
sortButtonProps: {
|
|
1233
1233
|
type: [Object, Function],
|
|
1234
1234
|
default: () => ({
|
|
1235
|
-
icon:
|
|
1235
|
+
icon: Y(ke)
|
|
1236
1236
|
})
|
|
1237
1237
|
},
|
|
1238
1238
|
/**
|
|
@@ -1259,104 +1259,104 @@ const En = (t) => {
|
|
|
1259
1259
|
*/
|
|
1260
1260
|
getNewItemData: {
|
|
1261
1261
|
type: Function,
|
|
1262
|
-
default: () => (
|
|
1262
|
+
default: () => (n) => n
|
|
1263
1263
|
}
|
|
1264
1264
|
},
|
|
1265
1265
|
emits: ["update:value", "add", "remove", "change"],
|
|
1266
|
-
setup(
|
|
1267
|
-
const i =
|
|
1268
|
-
const
|
|
1269
|
-
return Array.from({ length: 16 }).map(() =>
|
|
1270
|
-
}, u = (
|
|
1271
|
-
var
|
|
1266
|
+
setup(n, { emit: a }) {
|
|
1267
|
+
const i = n, t = a, r = an.useInjectFormItemContext(), l = ee(i.value), f = () => {
|
|
1268
|
+
const T = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
1269
|
+
return Array.from({ length: 16 }).map(() => T[Math.floor(Math.random() * T.length)]).join("");
|
|
1270
|
+
}, u = (T) => {
|
|
1271
|
+
var M;
|
|
1272
1272
|
if (l.value.length < i.maxLength) {
|
|
1273
|
-
const
|
|
1274
|
-
id:
|
|
1275
|
-
...((
|
|
1273
|
+
const k = {
|
|
1274
|
+
id: f(),
|
|
1275
|
+
...((M = i.getNewItemData) == null ? void 0 : M.call(i)) ?? {}
|
|
1276
1276
|
};
|
|
1277
|
-
l.value.splice(
|
|
1277
|
+
l.value.splice(T + 1, 0, k), t("add", k, T + 1);
|
|
1278
1278
|
}
|
|
1279
|
-
},
|
|
1280
|
-
l.value.splice(
|
|
1279
|
+
}, C = (T) => {
|
|
1280
|
+
l.value.splice(T, 1), t("remove", T);
|
|
1281
1281
|
};
|
|
1282
|
-
return
|
|
1282
|
+
return _e(
|
|
1283
1283
|
() => l.value,
|
|
1284
1284
|
() => {
|
|
1285
|
-
|
|
1285
|
+
t("update:value", c(l.value)), t("change", c(l.value)), r.onFieldChange();
|
|
1286
1286
|
},
|
|
1287
1287
|
{
|
|
1288
1288
|
deep: !0,
|
|
1289
1289
|
immediate: !0
|
|
1290
1290
|
}
|
|
1291
|
-
),
|
|
1291
|
+
), _e(
|
|
1292
1292
|
() => i.value,
|
|
1293
1293
|
() => {
|
|
1294
|
-
l.value =
|
|
1294
|
+
l.value = c(i.value);
|
|
1295
1295
|
},
|
|
1296
1296
|
{
|
|
1297
1297
|
deep: !0,
|
|
1298
1298
|
immediate: !0
|
|
1299
1299
|
}
|
|
1300
|
-
), (
|
|
1301
|
-
const
|
|
1302
|
-
return b(),
|
|
1303
|
-
|
|
1300
|
+
), (T, M) => {
|
|
1301
|
+
const k = x("a-button");
|
|
1302
|
+
return b(), q(Ie, null, [
|
|
1303
|
+
p(c(je), {
|
|
1304
1304
|
list: l.value,
|
|
1305
|
-
"item-key":
|
|
1306
|
-
disabled: !
|
|
1305
|
+
"item-key": n.itemKey,
|
|
1306
|
+
disabled: !n.sortable,
|
|
1307
1307
|
handle: ".draggable-icon",
|
|
1308
|
-
class:
|
|
1308
|
+
class: d([T.$style.dynamicList, n.className])
|
|
1309
1309
|
}, {
|
|
1310
|
-
item:
|
|
1311
|
-
|
|
1312
|
-
class:
|
|
1310
|
+
item: m(({ element: s, index: $ }) => [
|
|
1311
|
+
D("div", {
|
|
1312
|
+
class: d([T.$style.dynamicListItem, n.itemClassName])
|
|
1313
1313
|
}, [
|
|
1314
|
-
|
|
1315
|
-
class:
|
|
1314
|
+
D("div", {
|
|
1315
|
+
class: d(T.$style.dynamicListItemContent)
|
|
1316
1316
|
}, [
|
|
1317
|
-
|
|
1317
|
+
me(T.$slots, "default", {
|
|
1318
1318
|
item: s,
|
|
1319
|
-
index:
|
|
1319
|
+
index: $
|
|
1320
1320
|
})
|
|
1321
1321
|
], 2),
|
|
1322
|
-
|
|
1323
|
-
class:
|
|
1322
|
+
D("div", {
|
|
1323
|
+
class: d(T.$style.actionsIcons)
|
|
1324
1324
|
}, [
|
|
1325
|
-
|
|
1325
|
+
p(k, le({
|
|
1326
1326
|
type: "link",
|
|
1327
1327
|
danger: "",
|
|
1328
1328
|
size: "small",
|
|
1329
|
-
icon:
|
|
1330
|
-
},
|
|
1331
|
-
onClick: (
|
|
1329
|
+
icon: Y(c(gt))
|
|
1330
|
+
}, c(Ce)(n.deleteButtonProps) ? n.deleteButtonProps(s, $) : n.deleteButtonProps, {
|
|
1331
|
+
onClick: (F) => C($)
|
|
1332
1332
|
}), {
|
|
1333
|
-
default:
|
|
1334
|
-
Q(
|
|
1333
|
+
default: m(() => [
|
|
1334
|
+
Q(pe(n.deleteButtonText), 1)
|
|
1335
1335
|
]),
|
|
1336
1336
|
_: 2
|
|
1337
1337
|
}, 1040, ["icon", "onClick"]),
|
|
1338
|
-
|
|
1338
|
+
n.sortable ? (b(), E(k, le({
|
|
1339
1339
|
key: 0,
|
|
1340
|
-
class: ["draggable-icon",
|
|
1340
|
+
class: ["draggable-icon", T.$style.dragIcon],
|
|
1341
1341
|
size: "small",
|
|
1342
1342
|
type: "text",
|
|
1343
|
-
icon:
|
|
1344
|
-
},
|
|
1343
|
+
icon: Y(c(ke))
|
|
1344
|
+
}, c(Ce)(n.sortButtonProps) ? n.sortButtonProps(s, $) : n.sortButtonProps), null, 16, ["class", "icon"])) : A("", !0)
|
|
1345
1345
|
], 2)
|
|
1346
1346
|
], 2)
|
|
1347
1347
|
]),
|
|
1348
1348
|
_: 3
|
|
1349
1349
|
}, 8, ["list", "item-key", "disabled", "class"]),
|
|
1350
|
-
|
|
1351
|
-
l.value.length <
|
|
1350
|
+
D("div", null, [
|
|
1351
|
+
l.value.length < n.maxLength ? (b(), E(k, le({
|
|
1352
1352
|
key: 0,
|
|
1353
1353
|
type: "link",
|
|
1354
|
-
icon:
|
|
1355
|
-
},
|
|
1356
|
-
onClick:
|
|
1354
|
+
icon: Y(c(Ft))
|
|
1355
|
+
}, c(Ce)(n.addButtonProps) ? n.addButtonProps() : n.addButtonProps, {
|
|
1356
|
+
onClick: M[0] || (M[0] = (s) => u(l.value.length - 1))
|
|
1357
1357
|
}), {
|
|
1358
|
-
default:
|
|
1359
|
-
Q(
|
|
1358
|
+
default: m(() => [
|
|
1359
|
+
Q(pe(n.addButtonText), 1)
|
|
1360
1360
|
]),
|
|
1361
1361
|
_: 1
|
|
1362
1362
|
}, 16, ["icon"])) : A("", !0)
|
|
@@ -1364,15 +1364,15 @@ const En = (t) => {
|
|
|
1364
1364
|
], 64);
|
|
1365
1365
|
};
|
|
1366
1366
|
}
|
|
1367
|
-
}),
|
|
1368
|
-
dynamicList:
|
|
1369
|
-
dynamicListItem:
|
|
1370
|
-
dynamicListItemContent:
|
|
1371
|
-
actionsIcons:
|
|
1372
|
-
dragIcon:
|
|
1373
|
-
},
|
|
1374
|
-
$style:
|
|
1375
|
-
},
|
|
1367
|
+
}), Lo = "_dynamicList_1woe5_1", Po = "_dynamicListItem_1woe5_6", Bo = "_dynamicListItemContent_1woe5_13", Mo = "_actionsIcons_1woe5_17", jo = "_dragIcon_1woe5_21", Ao = {
|
|
1368
|
+
dynamicList: Lo,
|
|
1369
|
+
dynamicListItem: Po,
|
|
1370
|
+
dynamicListItemContent: Bo,
|
|
1371
|
+
actionsIcons: Mo,
|
|
1372
|
+
dragIcon: jo
|
|
1373
|
+
}, Eo = {
|
|
1374
|
+
$style: Ao
|
|
1375
|
+
}, No = /* @__PURE__ */ fe(xo, [["__cssModules", Eo]]), Oo = /* @__PURE__ */ ie({
|
|
1376
1376
|
__name: "InputGroup",
|
|
1377
1377
|
props: {
|
|
1378
1378
|
/**
|
|
@@ -1401,52 +1401,52 @@ const En = (t) => {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
},
|
|
1403
1403
|
emits: ["update:value", "change"],
|
|
1404
|
-
setup(
|
|
1405
|
-
const i =
|
|
1404
|
+
setup(n, { emit: a }) {
|
|
1405
|
+
const i = n, t = a, r = B({
|
|
1406
1406
|
get() {
|
|
1407
1407
|
return i.value;
|
|
1408
1408
|
},
|
|
1409
|
-
set(
|
|
1410
|
-
|
|
1409
|
+
set(f) {
|
|
1410
|
+
t("update:value", f), t("change", f);
|
|
1411
1411
|
}
|
|
1412
|
-
}), l =
|
|
1413
|
-
var u,
|
|
1414
|
-
const
|
|
1415
|
-
return ((
|
|
1412
|
+
}), l = B(() => {
|
|
1413
|
+
var u, C;
|
|
1414
|
+
const f = i.inModal ? "30%" : "50%";
|
|
1415
|
+
return ((C = (u = i.formItem.addonSelectProps) == null ? void 0 : u.style) == null ? void 0 : C.width) ?? f;
|
|
1416
1416
|
});
|
|
1417
|
-
return (
|
|
1418
|
-
const
|
|
1419
|
-
return b(), E(
|
|
1417
|
+
return (f, u) => {
|
|
1418
|
+
const C = x("a-select"), T = x("a-input"), M = x("a-input-group");
|
|
1419
|
+
return b(), E(M, {
|
|
1420
1420
|
compact: "",
|
|
1421
|
-
class:
|
|
1421
|
+
class: d(f.$style.inputGroup)
|
|
1422
1422
|
}, {
|
|
1423
|
-
default:
|
|
1424
|
-
|
|
1423
|
+
default: m(() => [
|
|
1424
|
+
p(C, le({
|
|
1425
1425
|
value: r.value.select,
|
|
1426
|
-
"onUpdate:value": u[0] || (u[0] = (
|
|
1426
|
+
"onUpdate:value": u[0] || (u[0] = (k) => r.value.select = k),
|
|
1427
1427
|
style: {
|
|
1428
|
-
...
|
|
1428
|
+
...c(Ve)(n.formItem, "addonBeforeProps.style", {}),
|
|
1429
1429
|
width: l.value
|
|
1430
1430
|
}
|
|
1431
|
-
},
|
|
1432
|
-
|
|
1431
|
+
}, c(xt)(n.formItem.addonBeforeProps, ["style"])), null, 16, ["value", "style"]),
|
|
1432
|
+
p(T, le({
|
|
1433
1433
|
value: r.value.value,
|
|
1434
|
-
"onUpdate:value": u[1] || (u[1] = (
|
|
1434
|
+
"onUpdate:value": u[1] || (u[1] = (k) => r.value.value = k),
|
|
1435
1435
|
style: {
|
|
1436
|
-
...
|
|
1436
|
+
...c(Ve)(n.formItem, "props.style", {}),
|
|
1437
1437
|
width: `calc(100% - ${l.value})`
|
|
1438
1438
|
}
|
|
1439
|
-
},
|
|
1439
|
+
}, c($e)(n.formItem, ["props"])), null, 16, ["value", "style"])
|
|
1440
1440
|
]),
|
|
1441
1441
|
_: 1
|
|
1442
1442
|
}, 8, ["class"]);
|
|
1443
1443
|
};
|
|
1444
1444
|
}
|
|
1445
|
-
}),
|
|
1446
|
-
inputGroup:
|
|
1447
|
-
},
|
|
1448
|
-
$style:
|
|
1449
|
-
},
|
|
1445
|
+
}), Ro = "_inputGroup_eukv3_1", Do = {
|
|
1446
|
+
inputGroup: Ro
|
|
1447
|
+
}, zo = {
|
|
1448
|
+
$style: Do
|
|
1449
|
+
}, qo = /* @__PURE__ */ fe(Oo, [["__cssModules", zo]]), De = null, Yo = /* @__PURE__ */ ie({
|
|
1450
1450
|
__name: "InputNumberRange",
|
|
1451
1451
|
props: {
|
|
1452
1452
|
/**
|
|
@@ -1467,64 +1467,64 @@ const En = (t) => {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
},
|
|
1469
1469
|
emits: ["update:value"],
|
|
1470
|
-
setup(
|
|
1471
|
-
const i =
|
|
1470
|
+
setup(n, { emit: a }) {
|
|
1471
|
+
const i = n, t = a, r = B({
|
|
1472
1472
|
get() {
|
|
1473
1473
|
var u;
|
|
1474
|
-
return ((u = i.value) == null ? void 0 : u[0]) ??
|
|
1474
|
+
return ((u = i.value) == null ? void 0 : u[0]) ?? De;
|
|
1475
1475
|
},
|
|
1476
1476
|
set(u) {
|
|
1477
|
-
var
|
|
1478
|
-
|
|
1477
|
+
var C;
|
|
1478
|
+
t("update:value", [u, ((C = i.value) == null ? void 0 : C[1]) ?? De]);
|
|
1479
1479
|
}
|
|
1480
|
-
}), l =
|
|
1480
|
+
}), l = B({
|
|
1481
1481
|
get() {
|
|
1482
1482
|
var u;
|
|
1483
|
-
return ((u = i.value) == null ? void 0 : u[1]) ??
|
|
1483
|
+
return ((u = i.value) == null ? void 0 : u[1]) ?? De;
|
|
1484
1484
|
},
|
|
1485
1485
|
set(u) {
|
|
1486
|
-
var
|
|
1487
|
-
|
|
1486
|
+
var C;
|
|
1487
|
+
t("update:value", [((C = i.value) == null ? void 0 : C[0]) ?? De, u]);
|
|
1488
1488
|
}
|
|
1489
|
-
}),
|
|
1490
|
-
return (u,
|
|
1491
|
-
var
|
|
1492
|
-
const
|
|
1493
|
-
return b(),
|
|
1494
|
-
class:
|
|
1489
|
+
}), f = B(() => xt(i.formItem.props, ["placeholder"]));
|
|
1490
|
+
return (u, C) => {
|
|
1491
|
+
var M, k, s, $;
|
|
1492
|
+
const T = x("a-input-number");
|
|
1493
|
+
return b(), q("div", {
|
|
1494
|
+
class: d([u.$style.inputNumberGroup, "input-number-group"])
|
|
1495
1495
|
}, [
|
|
1496
|
-
|
|
1497
|
-
class:
|
|
1496
|
+
D("div", {
|
|
1497
|
+
class: d(u.$style.inputNumberGroupContent)
|
|
1498
1498
|
}, [
|
|
1499
|
-
|
|
1499
|
+
p(T, le(f.value, {
|
|
1500
1500
|
value: r.value,
|
|
1501
|
-
"onUpdate:value":
|
|
1501
|
+
"onUpdate:value": C[0] || (C[0] = (F) => r.value = F),
|
|
1502
1502
|
class: [u.$style.inputNumber, u.$style.startInputNumber],
|
|
1503
|
-
placeholder: ((
|
|
1503
|
+
placeholder: ((k = c(xe)((M = i.formItem.props) == null ? void 0 : M.placeholder)) == null ? void 0 : k[0]) ?? "请输入"
|
|
1504
1504
|
}), null, 16, ["value", "class", "placeholder"]),
|
|
1505
|
-
|
|
1506
|
-
class:
|
|
1505
|
+
D("span", {
|
|
1506
|
+
class: d(u.$style.divider)
|
|
1507
1507
|
}, "~", 2),
|
|
1508
|
-
|
|
1508
|
+
p(T, le(f.value, {
|
|
1509
1509
|
value: l.value,
|
|
1510
|
-
"onUpdate:value":
|
|
1510
|
+
"onUpdate:value": C[1] || (C[1] = (F) => l.value = F),
|
|
1511
1511
|
class: [u.$style.inputNumber, u.$style.endInputNumber],
|
|
1512
|
-
placeholder: ((
|
|
1512
|
+
placeholder: (($ = c(xe)((s = i.formItem.props) == null ? void 0 : s.placeholder)) == null ? void 0 : $[1]) ?? "请输入"
|
|
1513
1513
|
}), null, 16, ["value", "class", "placeholder"])
|
|
1514
1514
|
], 2)
|
|
1515
1515
|
], 2);
|
|
1516
1516
|
};
|
|
1517
1517
|
}
|
|
1518
|
-
}),
|
|
1519
|
-
inputNumberGroup:
|
|
1520
|
-
inputNumberGroupContent:
|
|
1521
|
-
inputNumber:
|
|
1522
|
-
startInputNumber:
|
|
1523
|
-
endInputNumber:
|
|
1524
|
-
divider:
|
|
1525
|
-
},
|
|
1526
|
-
$style:
|
|
1527
|
-
},
|
|
1518
|
+
}), Ho = "_inputNumberGroup_149g6_1", Vo = "_inputNumberGroupContent_149g6_4", Wo = "_inputNumber_149g6_1", Uo = "_startInputNumber_149g6_13", Go = "_endInputNumber_149g6_21", Qo = "_divider_149g6_29", Ko = {
|
|
1519
|
+
inputNumberGroup: Ho,
|
|
1520
|
+
inputNumberGroupContent: Vo,
|
|
1521
|
+
inputNumber: Wo,
|
|
1522
|
+
startInputNumber: Uo,
|
|
1523
|
+
endInputNumber: Go,
|
|
1524
|
+
divider: Qo
|
|
1525
|
+
}, Jo = {
|
|
1526
|
+
$style: Ko
|
|
1527
|
+
}, Zo = /* @__PURE__ */ fe(Yo, [["__cssModules", Jo]]), Xo = 8, el = /* @__PURE__ */ ie({
|
|
1528
1528
|
__name: "FormFieldItem",
|
|
1529
1529
|
props: {
|
|
1530
1530
|
/**
|
|
@@ -1565,33 +1565,33 @@ const En = (t) => {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
},
|
|
1567
1567
|
emits: ["update:value", "change"],
|
|
1568
|
-
setup(
|
|
1568
|
+
setup(n, { emit: a }) {
|
|
1569
1569
|
const i = {
|
|
1570
|
-
[G.input]:
|
|
1571
|
-
[G.inputGroup]:
|
|
1572
|
-
[G.inputNumber]:
|
|
1573
|
-
[G.inputNumberRange]:
|
|
1574
|
-
[G.select]:
|
|
1575
|
-
[G.cascader]:
|
|
1576
|
-
[G.treeSelect]:
|
|
1577
|
-
[G.datePicker]:
|
|
1578
|
-
[G.rangePicker]:
|
|
1579
|
-
},
|
|
1570
|
+
[G.input]: pn,
|
|
1571
|
+
[G.inputGroup]: qo,
|
|
1572
|
+
[G.inputNumber]: mn,
|
|
1573
|
+
[G.inputNumberRange]: Zo,
|
|
1574
|
+
[G.select]: dn,
|
|
1575
|
+
[G.cascader]: cn,
|
|
1576
|
+
[G.treeSelect]: un,
|
|
1577
|
+
[G.datePicker]: rn,
|
|
1578
|
+
[G.rangePicker]: sn
|
|
1579
|
+
}, t = n, r = a, l = Gt(), f = B({
|
|
1580
1580
|
get() {
|
|
1581
|
-
return
|
|
1581
|
+
return t.value;
|
|
1582
1582
|
},
|
|
1583
1583
|
set(s) {
|
|
1584
1584
|
r("update:value", s), r("change", s);
|
|
1585
1585
|
}
|
|
1586
|
-
}), u =
|
|
1587
|
-
const s =
|
|
1588
|
-
return Math.max(s, 20) +
|
|
1589
|
-
}),
|
|
1590
|
-
const { type: s, component:
|
|
1591
|
-
return s === "component" ?
|
|
1592
|
-
}),
|
|
1593
|
-
var
|
|
1594
|
-
const s =
|
|
1586
|
+
}), u = B(() => !t.inModal && t.formItem.showLabel !== !1), C = B(() => {
|
|
1587
|
+
const s = Dn(t.formItem.label);
|
|
1588
|
+
return Math.max(s, 20) + Xo * 2 + 2;
|
|
1589
|
+
}), T = B(() => {
|
|
1590
|
+
const { type: s, component: $ } = t.formItem;
|
|
1591
|
+
return s === "component" ? $ : i[s];
|
|
1592
|
+
}), M = B(() => {
|
|
1593
|
+
var R;
|
|
1594
|
+
const s = t.formItem, $ = {
|
|
1595
1595
|
[G.input]: {
|
|
1596
1596
|
placeholder: "请输入",
|
|
1597
1597
|
clearable: !0
|
|
@@ -1616,67 +1616,67 @@ const En = (t) => {
|
|
|
1616
1616
|
maxTagTextLength: 40,
|
|
1617
1617
|
maxTagCount: "responsive"
|
|
1618
1618
|
}
|
|
1619
|
-
},
|
|
1619
|
+
}, F = {
|
|
1620
1620
|
...l,
|
|
1621
|
-
|
|
1621
|
+
...$[s.type] ?? {},
|
|
1622
1622
|
...s.props ?? {},
|
|
1623
1623
|
style: {
|
|
1624
|
-
...((
|
|
1624
|
+
...((R = s.props) == null ? void 0 : R.style) ?? {},
|
|
1625
1625
|
width: s.type !== G.component ? "100%" : void 0
|
|
1626
1626
|
},
|
|
1627
|
-
inModal:
|
|
1627
|
+
inModal: t.inModal
|
|
1628
1628
|
};
|
|
1629
|
-
return
|
|
1630
|
-
}),
|
|
1631
|
-
return (s,
|
|
1632
|
-
const
|
|
1633
|
-
return b(),
|
|
1634
|
-
class:
|
|
1629
|
+
return t.inModal || (u.value && Ae(F, "style.width", `calc(100% - ${C.value}px)`), s.type === G.select && Ae(F, "maxTagCount", "responsive")), F;
|
|
1630
|
+
}), k = B(() => t.formItem.modelPropName ?? "value");
|
|
1631
|
+
return (s, $) => {
|
|
1632
|
+
const F = x("a-input"), R = x("a-input-group");
|
|
1633
|
+
return b(), q("div", {
|
|
1634
|
+
class: d(s.$style.formFieldItem)
|
|
1635
1635
|
}, [
|
|
1636
|
-
u.value ? (b(), E(
|
|
1636
|
+
u.value ? (b(), E(R, {
|
|
1637
1637
|
key: 0,
|
|
1638
1638
|
compact: "",
|
|
1639
|
-
class:
|
|
1639
|
+
class: d([s.$style.inputGroup, "super-table-input-group"])
|
|
1640
1640
|
}, {
|
|
1641
|
-
default:
|
|
1642
|
-
|
|
1641
|
+
default: m(() => [
|
|
1642
|
+
n.inModal ? A("", !0) : (b(), E(F, {
|
|
1643
1643
|
key: 0,
|
|
1644
|
-
value:
|
|
1644
|
+
value: n.formItem.label,
|
|
1645
1645
|
disabled: "",
|
|
1646
1646
|
style: X({
|
|
1647
|
-
color:
|
|
1648
|
-
width: `${
|
|
1647
|
+
color: c(te).colorText,
|
|
1648
|
+
width: `${C.value}px`
|
|
1649
1649
|
}),
|
|
1650
|
-
class:
|
|
1650
|
+
class: d([s.$style.formFieldItemLabel, "super-table-filter-form-item-label"])
|
|
1651
1651
|
}, null, 8, ["value", "style", "class"])),
|
|
1652
|
-
|
|
1652
|
+
T.value ? (b(), E(Ye(T.value), le({
|
|
1653
1653
|
key: 1,
|
|
1654
|
-
[
|
|
1655
|
-
["onUpdate:" +
|
|
1656
|
-
},
|
|
1654
|
+
[k.value]: f.value,
|
|
1655
|
+
["onUpdate:" + k.value]: $[0] || ($[0] = (v) => f.value = v)
|
|
1656
|
+
}, M.value), null, 16)) : A("", !0)
|
|
1657
1657
|
]),
|
|
1658
1658
|
_: 1
|
|
1659
|
-
}, 8, ["class"])) : (b(),
|
|
1660
|
-
|
|
1659
|
+
}, 8, ["class"])) : (b(), q(Ie, { key: 1 }, [
|
|
1660
|
+
n.formItem.type === c(G).component && n.formItem.showLabel ? (b(), q("span", {
|
|
1661
1661
|
key: 0,
|
|
1662
|
-
class:
|
|
1663
|
-
},
|
|
1664
|
-
(b(), E(
|
|
1665
|
-
[
|
|
1666
|
-
["onUpdate:" +
|
|
1667
|
-
},
|
|
1662
|
+
class: d(s.$style.customItemLabel)
|
|
1663
|
+
}, pe(n.formItem.label), 3)) : A("", !0),
|
|
1664
|
+
(b(), E(Ye(T.value), le({
|
|
1665
|
+
[k.value]: f.value,
|
|
1666
|
+
["onUpdate:" + k.value]: $[1] || ($[1] = (v) => f.value = v)
|
|
1667
|
+
}, M.value), null, 16))
|
|
1668
1668
|
], 64))
|
|
1669
1669
|
], 2);
|
|
1670
1670
|
};
|
|
1671
1671
|
}
|
|
1672
|
-
}),
|
|
1673
|
-
formFieldItem:
|
|
1674
|
-
inputGroup:
|
|
1675
|
-
formFieldItemLabel:
|
|
1676
|
-
customItemLabel:
|
|
1677
|
-
},
|
|
1678
|
-
$style:
|
|
1679
|
-
},
|
|
1672
|
+
}), tl = "_formFieldItem_1imun_1", nl = "_inputGroup_1imun_7", ol = "_formFieldItemLabel_1imun_11", ll = "_customItemLabel_1imun_20", al = {
|
|
1673
|
+
formFieldItem: tl,
|
|
1674
|
+
inputGroup: nl,
|
|
1675
|
+
formFieldItemLabel: ol,
|
|
1676
|
+
customItemLabel: ll
|
|
1677
|
+
}, sl = {
|
|
1678
|
+
$style: al
|
|
1679
|
+
}, At = /* @__PURE__ */ fe(el, [["__cssModules", sl]]), rl = /* @__PURE__ */ ie({
|
|
1680
1680
|
__name: "SceneConfigModal",
|
|
1681
1681
|
props: {
|
|
1682
1682
|
// 当前编辑的场景
|
|
@@ -1698,7 +1698,7 @@ const En = (t) => {
|
|
|
1698
1698
|
// 弹窗操作类型 新增、更新、设置查询条件
|
|
1699
1699
|
actionType: {
|
|
1700
1700
|
type: String,
|
|
1701
|
-
default:
|
|
1701
|
+
default: re.create
|
|
1702
1702
|
},
|
|
1703
1703
|
// 是否允许新增
|
|
1704
1704
|
allowCreateScene: {
|
|
@@ -1717,31 +1717,31 @@ const En = (t) => {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
},
|
|
1719
1719
|
emits: ["cancel", "search", "form-item-change", "update-form-config"],
|
|
1720
|
-
setup(
|
|
1721
|
-
var
|
|
1722
|
-
const
|
|
1723
|
-
Object.values(l.value).filter(({ visible:
|
|
1724
|
-
|
|
1725
|
-
)), u = ["name", "value", "type"],
|
|
1726
|
-
name: ((
|
|
1727
|
-
items:
|
|
1728
|
-
}),
|
|
1720
|
+
setup(n, { expose: a, emit: i }) {
|
|
1721
|
+
var Ne, Oe;
|
|
1722
|
+
const t = n, r = i, l = ee(tt(t.formConfigMap)), f = B(() => ot(
|
|
1723
|
+
Object.values(l.value).filter(({ visible: S }) => S !== !1),
|
|
1724
|
+
be.order
|
|
1725
|
+
)), u = ["name", "value", "type"], C = f.value.filter((S) => S._selected).map((S) => $e(S, u)), T = ee(!0), M = ee(!1), k = ee(), s = He({
|
|
1726
|
+
name: ((Ne = t.currentScene) == null ? void 0 : Ne.name) ?? "",
|
|
1727
|
+
items: t.actionType === re.search ? C : tt(((Oe = t.currentScene) == null ? void 0 : Oe.items) ?? [])
|
|
1728
|
+
}), $ = B({
|
|
1729
1729
|
get() {
|
|
1730
|
-
const
|
|
1731
|
-
return
|
|
1730
|
+
const S = f.value.filter((_) => !_.fixed);
|
|
1731
|
+
return S.length === 0 ? !1 : S.every((_) => s.items.some((j) => j.name === _.name));
|
|
1732
1732
|
},
|
|
1733
|
-
set(
|
|
1734
|
-
if (
|
|
1735
|
-
const
|
|
1736
|
-
s.items =
|
|
1733
|
+
set(S) {
|
|
1734
|
+
if (S) {
|
|
1735
|
+
const _ = f.value.map((j) => $e(j, u));
|
|
1736
|
+
s.items = bt(s.items, _, "name");
|
|
1737
1737
|
} else {
|
|
1738
|
-
const
|
|
1739
|
-
s.items = s.items.filter((j) =>
|
|
1738
|
+
const _ = f.value.filter((j) => j.fixed).map((j) => j.name);
|
|
1739
|
+
s.items = s.items.filter((j) => _.includes(j.name));
|
|
1740
1740
|
}
|
|
1741
1741
|
}
|
|
1742
|
-
}),
|
|
1743
|
-
(
|
|
1744
|
-
).length),
|
|
1742
|
+
}), F = B(() => f.value.filter(
|
|
1743
|
+
(S) => s.items.some((_) => _.name === S.name)
|
|
1744
|
+
).length), R = B(() => F.value > 0 && F.value < f.value.length), v = He({
|
|
1745
1745
|
name: [
|
|
1746
1746
|
{
|
|
1747
1747
|
required: !0,
|
|
@@ -1760,152 +1760,152 @@ const En = (t) => {
|
|
|
1760
1760
|
type: "array"
|
|
1761
1761
|
}
|
|
1762
1762
|
]
|
|
1763
|
-
}), N =
|
|
1764
|
-
const
|
|
1765
|
-
return
|
|
1766
|
-
},
|
|
1767
|
-
[
|
|
1768
|
-
[
|
|
1769
|
-
[
|
|
1770
|
-
})[
|
|
1771
|
-
const j =
|
|
1772
|
-
j && (
|
|
1773
|
-
},
|
|
1774
|
-
const
|
|
1775
|
-
return [
|
|
1776
|
-
},
|
|
1763
|
+
}), N = B(() => s.items.map(({ name: S }) => S)), V = () => {
|
|
1764
|
+
const S = f.value.find((_) => !N.value.includes(_.name));
|
|
1765
|
+
return S ? $e(tt(S), u) : {};
|
|
1766
|
+
}, z = B(() => ({
|
|
1767
|
+
[re.create]: "新建场景",
|
|
1768
|
+
[re.update]: "更新场景",
|
|
1769
|
+
[re.search]: "高级筛选"
|
|
1770
|
+
})[t.actionType]), h = (S, _) => {
|
|
1771
|
+
const j = t.formConfigMap[_.name];
|
|
1772
|
+
j && (_.type = j.type, _.value = j.value, _.label = j.label, L(_.name, _.value));
|
|
1773
|
+
}, y = (S) => {
|
|
1774
|
+
const _ = t.formConfigMap[S], j = s.items.map((oe) => oe.name), K = f.value.filter((oe) => !j.includes(oe.name));
|
|
1775
|
+
return [_, ...K];
|
|
1776
|
+
}, L = (S, _) => {
|
|
1777
1777
|
const j = s.items.reduce(
|
|
1778
|
-
(
|
|
1778
|
+
(K, oe) => (K[oe.name] = oe.value, K),
|
|
1779
1779
|
{}
|
|
1780
1780
|
);
|
|
1781
|
-
r("form-item-change",
|
|
1782
|
-
},
|
|
1783
|
-
|
|
1784
|
-
},
|
|
1781
|
+
r("form-item-change", S, _, j);
|
|
1782
|
+
}, J = ({ name: S, value: _ }) => {
|
|
1783
|
+
L(S, _);
|
|
1784
|
+
}, ae = async () => {
|
|
1785
1785
|
var j;
|
|
1786
|
-
const
|
|
1787
|
-
const
|
|
1788
|
-
return
|
|
1786
|
+
const S = s.items.map((K, oe) => {
|
|
1787
|
+
const ce = l.value[K.name];
|
|
1788
|
+
return ce && (ce.value = K.value, ce[be.orderInScene] = oe, ce[be.selected] = !0), ce;
|
|
1789
1789
|
}).filter(Boolean);
|
|
1790
|
-
if (
|
|
1791
|
-
r("update-form-config",
|
|
1790
|
+
if (t.actionType === re.search && !M.value) {
|
|
1791
|
+
r("update-form-config", S), r("search", s.items, S), r("cancel");
|
|
1792
1792
|
return;
|
|
1793
1793
|
}
|
|
1794
|
-
await ((j =
|
|
1795
|
-
const
|
|
1796
|
-
|
|
1797
|
-
...
|
|
1798
|
-
...
|
|
1799
|
-
}) : await
|
|
1794
|
+
await ((j = k.value) == null ? void 0 : j.validateFields());
|
|
1795
|
+
const _ = de(s);
|
|
1796
|
+
t.currentScene ? await t.onUpdate({
|
|
1797
|
+
...t.currentScene,
|
|
1798
|
+
..._
|
|
1799
|
+
}) : await t.onCreate(_), r("update-form-config", S), r("cancel");
|
|
1800
1800
|
};
|
|
1801
1801
|
(() => {
|
|
1802
1802
|
if (s.items.length) return;
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1803
|
+
const S = bt(
|
|
1804
|
+
f.value.filter(({ fixed: j, selected: K }) => j || K),
|
|
1805
1805
|
"name"
|
|
1806
1806
|
);
|
|
1807
|
-
if (
|
|
1808
|
-
s.items = ot(
|
|
1807
|
+
if (S.length) {
|
|
1808
|
+
s.items = ot(S, "_order").map((j) => $e(j, u));
|
|
1809
1809
|
return;
|
|
1810
1810
|
}
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1811
|
+
const _ = V();
|
|
1812
|
+
_ && s.items.push(_);
|
|
1813
1813
|
})();
|
|
1814
|
-
const
|
|
1815
|
-
var
|
|
1814
|
+
const he = (S) => {
|
|
1815
|
+
var _;
|
|
1816
1816
|
return {
|
|
1817
|
-
disabled: (
|
|
1817
|
+
disabled: (_ = l.value[S.name]) == null ? void 0 : _.fixed
|
|
1818
1818
|
};
|
|
1819
|
-
},
|
|
1820
|
-
if (
|
|
1821
|
-
return
|
|
1822
|
-
if (!
|
|
1823
|
-
return
|
|
1824
|
-
if (
|
|
1825
|
-
return
|
|
1826
|
-
|
|
1827
|
-
},
|
|
1828
|
-
var
|
|
1829
|
-
return (
|
|
1830
|
-
},
|
|
1831
|
-
const j = s.items.find((
|
|
1832
|
-
j && (j.value =
|
|
1833
|
-
},
|
|
1834
|
-
Object.entries(
|
|
1835
|
-
|
|
1819
|
+
}, ue = (S) => l.value[S], Le = (S, _, j) => {
|
|
1820
|
+
if (Mt.includes(_))
|
|
1821
|
+
return Se("setFormItem error,", `form item with prop "${S}" is readonly`);
|
|
1822
|
+
if (!ue(S))
|
|
1823
|
+
return Se("setFormItem error,", `Cannot find form item with name "${S}"`);
|
|
1824
|
+
if (_ === "visible" && l.value[S].fixed)
|
|
1825
|
+
return Se("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
1826
|
+
Ae(l.value, `${S}.${_}`, j), l.value[S].visible || (s.items = s.items.filter((K) => K.name !== S));
|
|
1827
|
+
}, Te = (S) => {
|
|
1828
|
+
var _;
|
|
1829
|
+
return (_ = s.items.find((j) => j.name === S)) == null ? void 0 : _.value;
|
|
1830
|
+
}, P = (S, _) => {
|
|
1831
|
+
const j = s.items.find((K) => K.name === S);
|
|
1832
|
+
j && (j.value = _);
|
|
1833
|
+
}, ne = (S) => {
|
|
1834
|
+
Object.entries(S).forEach(([_, j]) => {
|
|
1835
|
+
P(_, j);
|
|
1836
1836
|
});
|
|
1837
1837
|
};
|
|
1838
|
-
function
|
|
1839
|
-
return (
|
|
1840
|
-
(j,
|
|
1841
|
-
const
|
|
1842
|
-
return
|
|
1838
|
+
function W(S) {
|
|
1839
|
+
return (S ? xe(S) : s.items.map((j) => j.name)).reduce(
|
|
1840
|
+
(j, K) => {
|
|
1841
|
+
const oe = s.items.find((ce) => ce.name === K);
|
|
1842
|
+
return oe && (j[K] = oe.value), j;
|
|
1843
1843
|
},
|
|
1844
1844
|
{}
|
|
1845
1845
|
);
|
|
1846
1846
|
}
|
|
1847
1847
|
return a({
|
|
1848
|
-
getFormItem:
|
|
1849
|
-
setFormItem:
|
|
1850
|
-
getFormValues:
|
|
1851
|
-
setFormValues:
|
|
1852
|
-
getFormValue:
|
|
1853
|
-
setFormValue:
|
|
1854
|
-
}), (
|
|
1855
|
-
const j =
|
|
1848
|
+
getFormItem: ue,
|
|
1849
|
+
setFormItem: Le,
|
|
1850
|
+
getFormValues: W,
|
|
1851
|
+
setFormValues: ne,
|
|
1852
|
+
getFormValue: Te,
|
|
1853
|
+
setFormValue: P
|
|
1854
|
+
}), (S, _) => {
|
|
1855
|
+
const j = x("a-input"), K = x("a-form-item"), oe = x("a-checkbox"), ce = x("a-space"), Ue = x("a-select"), Fe = x("a-form"), Ge = x("a-modal");
|
|
1856
1856
|
return b(), E(Ge, {
|
|
1857
|
-
open:
|
|
1858
|
-
"onUpdate:open":
|
|
1859
|
-
title:
|
|
1857
|
+
open: T.value,
|
|
1858
|
+
"onUpdate:open": _[4] || (_[4] = (U) => T.value = U),
|
|
1859
|
+
title: z.value,
|
|
1860
1860
|
width: 720,
|
|
1861
1861
|
"body-style": {
|
|
1862
1862
|
maxHeight: "70vh",
|
|
1863
1863
|
overflow: "auto"
|
|
1864
1864
|
},
|
|
1865
|
-
onOk:
|
|
1866
|
-
onCancel:
|
|
1865
|
+
onOk: ae,
|
|
1866
|
+
onCancel: _[5] || (_[5] = (U) => r("cancel"))
|
|
1867
1867
|
}, {
|
|
1868
|
-
default:
|
|
1869
|
-
|
|
1868
|
+
default: m(() => [
|
|
1869
|
+
p(Fe, {
|
|
1870
1870
|
ref_key: "formRef",
|
|
1871
|
-
ref:
|
|
1871
|
+
ref: k,
|
|
1872
1872
|
model: s,
|
|
1873
1873
|
rules: v,
|
|
1874
|
-
class:
|
|
1874
|
+
class: d(S.$style.sceneForm)
|
|
1875
1875
|
}, {
|
|
1876
|
-
default:
|
|
1877
|
-
|
|
1876
|
+
default: m(() => [
|
|
1877
|
+
n.actionType !== c(re).search || M.value ? (b(), E(K, {
|
|
1878
1878
|
key: 0,
|
|
1879
1879
|
label: "场景名称",
|
|
1880
1880
|
name: "name",
|
|
1881
1881
|
"label-col": { span: 24 },
|
|
1882
1882
|
"wrapper-col": { span: 12 }
|
|
1883
1883
|
}, {
|
|
1884
|
-
default:
|
|
1885
|
-
|
|
1884
|
+
default: m(() => [
|
|
1885
|
+
p(j, {
|
|
1886
1886
|
value: s.name,
|
|
1887
|
-
"onUpdate:value":
|
|
1887
|
+
"onUpdate:value": _[0] || (_[0] = (U) => s.name = U),
|
|
1888
1888
|
placeholder: "请输入"
|
|
1889
1889
|
}, null, 8, ["value"])
|
|
1890
1890
|
]),
|
|
1891
1891
|
_: 1
|
|
1892
1892
|
})) : A("", !0),
|
|
1893
|
-
|
|
1893
|
+
p(K, {
|
|
1894
1894
|
name: "items",
|
|
1895
1895
|
"label-col": { span: 24 },
|
|
1896
1896
|
"wrapper-col": { span: 24 }
|
|
1897
1897
|
}, {
|
|
1898
|
-
label:
|
|
1899
|
-
|
|
1900
|
-
default:
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
checked:
|
|
1904
|
-
"onUpdate:checked":
|
|
1905
|
-
indeterminate:
|
|
1898
|
+
label: m(() => [
|
|
1899
|
+
p(ce, null, {
|
|
1900
|
+
default: m(() => [
|
|
1901
|
+
_[6] || (_[6] = D("span", null, "筛选条件", -1)),
|
|
1902
|
+
p(oe, {
|
|
1903
|
+
checked: $.value,
|
|
1904
|
+
"onUpdate:checked": _[1] || (_[1] = (U) => $.value = U),
|
|
1905
|
+
indeterminate: R.value
|
|
1906
1906
|
}, {
|
|
1907
|
-
default:
|
|
1908
|
-
Q(" 全选 (" +
|
|
1907
|
+
default: m(() => [
|
|
1908
|
+
Q(" 全选 (" + pe(F.value) + "/" + pe(f.value.length) + ") ", 1)
|
|
1909
1909
|
]),
|
|
1910
1910
|
_: 1
|
|
1911
1911
|
}, 8, ["checked", "indeterminate"])
|
|
@@ -1913,45 +1913,45 @@ const En = (t) => {
|
|
|
1913
1913
|
_: 1
|
|
1914
1914
|
})
|
|
1915
1915
|
]),
|
|
1916
|
-
default:
|
|
1917
|
-
|
|
1916
|
+
default: m(() => [
|
|
1917
|
+
p(No, {
|
|
1918
1918
|
value: s.items,
|
|
1919
|
-
"onUpdate:value":
|
|
1919
|
+
"onUpdate:value": _[2] || (_[2] = (U) => s.items = U),
|
|
1920
1920
|
"add-button-text": "添加筛选条件",
|
|
1921
|
-
"get-new-item-data":
|
|
1922
|
-
"max-length":
|
|
1923
|
-
"delete-button-props":
|
|
1924
|
-
sortButtonProps:
|
|
1925
|
-
onAdd:
|
|
1921
|
+
"get-new-item-data": V,
|
|
1922
|
+
"max-length": f.value.length,
|
|
1923
|
+
"delete-button-props": he,
|
|
1924
|
+
sortButtonProps: he,
|
|
1925
|
+
onAdd: J
|
|
1926
1926
|
}, {
|
|
1927
|
-
default:
|
|
1928
|
-
var
|
|
1927
|
+
default: m(({ item: U }) => {
|
|
1928
|
+
var Pe;
|
|
1929
1929
|
return [
|
|
1930
|
-
|
|
1931
|
-
class:
|
|
1930
|
+
D("div", {
|
|
1931
|
+
class: d(S.$style.queryFieldItem)
|
|
1932
1932
|
}, [
|
|
1933
|
-
|
|
1933
|
+
p(Ue, {
|
|
1934
1934
|
value: U.name,
|
|
1935
|
-
"onUpdate:value": (
|
|
1935
|
+
"onUpdate:value": (ge) => U.name = ge,
|
|
1936
1936
|
"show-search": "",
|
|
1937
|
-
options:
|
|
1937
|
+
options: y(U.name),
|
|
1938
1938
|
"field-names": { value: "name" },
|
|
1939
1939
|
"option-filter-prop": "label",
|
|
1940
1940
|
placeholder: "请选择要筛选的字段名",
|
|
1941
|
-
disabled: (
|
|
1942
|
-
class:
|
|
1943
|
-
onChange: (
|
|
1941
|
+
disabled: (Pe = l.value[U.name]) == null ? void 0 : Pe.fixed,
|
|
1942
|
+
class: d(S.$style.fieldSelect),
|
|
1943
|
+
onChange: (ge) => h(ge, U)
|
|
1944
1944
|
}, null, 8, ["value", "onUpdate:value", "options", "disabled", "class", "onChange"]),
|
|
1945
|
-
|
|
1946
|
-
class:
|
|
1945
|
+
D("div", {
|
|
1946
|
+
class: d(S.$style.fieldComponent)
|
|
1947
1947
|
}, [
|
|
1948
|
-
U.name ? (b(), E(
|
|
1948
|
+
U.name ? (b(), E(At, {
|
|
1949
1949
|
key: 0,
|
|
1950
1950
|
value: U.value,
|
|
1951
|
-
"onUpdate:value": (
|
|
1951
|
+
"onUpdate:value": (ge) => U.value = ge,
|
|
1952
1952
|
"in-modal": "",
|
|
1953
1953
|
"form-item": l.value[U.name],
|
|
1954
|
-
onChange: (
|
|
1954
|
+
onChange: (ge) => L(U.name, ge)
|
|
1955
1955
|
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) : A("", !0)
|
|
1956
1956
|
], 2)
|
|
1957
1957
|
], 2)
|
|
@@ -1965,12 +1965,12 @@ const En = (t) => {
|
|
|
1965
1965
|
]),
|
|
1966
1966
|
_: 1
|
|
1967
1967
|
}, 8, ["model", "rules", "class"]),
|
|
1968
|
-
|
|
1968
|
+
n.actionType === c(re).search && n.allowCreateScene ? (b(), E(oe, {
|
|
1969
1969
|
key: 0,
|
|
1970
|
-
checked:
|
|
1971
|
-
"onUpdate:checked":
|
|
1970
|
+
checked: M.value,
|
|
1971
|
+
"onUpdate:checked": _[3] || (_[3] = (U) => M.value = U)
|
|
1972
1972
|
}, {
|
|
1973
|
-
default:
|
|
1973
|
+
default: m(() => _[7] || (_[7] = [
|
|
1974
1974
|
Q(" 保存为场景 ")
|
|
1975
1975
|
])),
|
|
1976
1976
|
_: 1
|
|
@@ -1980,14 +1980,14 @@ const En = (t) => {
|
|
|
1980
1980
|
}, 8, ["open", "title"]);
|
|
1981
1981
|
};
|
|
1982
1982
|
}
|
|
1983
|
-
}),
|
|
1984
|
-
sceneForm:
|
|
1985
|
-
queryFieldItem:
|
|
1986
|
-
fieldSelect:
|
|
1987
|
-
fieldComponent:
|
|
1988
|
-
},
|
|
1989
|
-
$style:
|
|
1990
|
-
},
|
|
1983
|
+
}), il = "_sceneForm_njdgy_1", ul = "_queryFieldItem_njdgy_1", cl = "_fieldSelect_njdgy_7", dl = "_fieldComponent_njdgy_10", ml = {
|
|
1984
|
+
sceneForm: il,
|
|
1985
|
+
queryFieldItem: ul,
|
|
1986
|
+
fieldSelect: cl,
|
|
1987
|
+
fieldComponent: dl
|
|
1988
|
+
}, pl = {
|
|
1989
|
+
$style: ml
|
|
1990
|
+
}, fl = /* @__PURE__ */ fe(rl, [["__cssModules", pl]]), yl = /* @__PURE__ */ ie({
|
|
1991
1991
|
__name: "SceneListModal",
|
|
1992
1992
|
props: {
|
|
1993
1993
|
/**
|
|
@@ -2027,51 +2027,51 @@ const En = (t) => {
|
|
|
2027
2027
|
}
|
|
2028
2028
|
},
|
|
2029
2029
|
emits: ["cancel", "create", "update", "delete", "sort"],
|
|
2030
|
-
setup(
|
|
2031
|
-
const i =
|
|
2032
|
-
await i.onDelete(
|
|
2033
|
-
},
|
|
2034
|
-
|
|
2035
|
-
},
|
|
2036
|
-
|
|
2037
|
-
},
|
|
2038
|
-
|
|
2030
|
+
setup(n, { emit: a }) {
|
|
2031
|
+
const i = n, t = a, r = ee(i.list), l = ee(!0), f = () => t("cancel"), u = async (k) => {
|
|
2032
|
+
await i.onDelete(k), r.value = r.value.filter((s) => s.code !== k);
|
|
2033
|
+
}, C = () => {
|
|
2034
|
+
f(), t("create");
|
|
2035
|
+
}, T = (k) => {
|
|
2036
|
+
f(), t("update", k);
|
|
2037
|
+
}, M = () => {
|
|
2038
|
+
t(
|
|
2039
2039
|
"sort",
|
|
2040
|
-
r.value.map(({ code:
|
|
2040
|
+
r.value.map(({ code: k }) => k)
|
|
2041
2041
|
);
|
|
2042
2042
|
};
|
|
2043
|
-
return (
|
|
2044
|
-
const
|
|
2045
|
-
return b(), E(
|
|
2043
|
+
return (k, s) => {
|
|
2044
|
+
const $ = x("a-col"), F = x("a-row"), R = x("a-typography-text"), v = x("a-button"), N = x("a-popconfirm"), V = x("a-empty"), z = x("a-modal");
|
|
2045
|
+
return b(), E(z, {
|
|
2046
2046
|
open: l.value,
|
|
2047
|
-
"onUpdate:open": s[0] || (s[0] = (
|
|
2047
|
+
"onUpdate:open": s[0] || (s[0] = (h) => l.value = h),
|
|
2048
2048
|
title: "场景管理",
|
|
2049
2049
|
width: 720,
|
|
2050
2050
|
footer: null,
|
|
2051
|
-
onCancel:
|
|
2051
|
+
onCancel: f
|
|
2052
2052
|
}, {
|
|
2053
|
-
default:
|
|
2054
|
-
|
|
2055
|
-
class:
|
|
2053
|
+
default: m(() => [
|
|
2054
|
+
D("div", {
|
|
2055
|
+
class: d(k.$style.sceneList)
|
|
2056
2056
|
}, [
|
|
2057
|
-
|
|
2058
|
-
class:
|
|
2057
|
+
p(F, {
|
|
2058
|
+
class: d(k.$style.sceneListHead)
|
|
2059
2059
|
}, {
|
|
2060
|
-
default:
|
|
2061
|
-
|
|
2060
|
+
default: m(() => [
|
|
2061
|
+
p($, {
|
|
2062
2062
|
span: 16,
|
|
2063
|
-
class:
|
|
2063
|
+
class: d(k.$style.col)
|
|
2064
2064
|
}, {
|
|
2065
|
-
default:
|
|
2065
|
+
default: m(() => s[1] || (s[1] = [
|
|
2066
2066
|
Q(" 场景名称 ")
|
|
2067
2067
|
])),
|
|
2068
2068
|
_: 1
|
|
2069
2069
|
}, 8, ["class"]),
|
|
2070
|
-
|
|
2070
|
+
p($, {
|
|
2071
2071
|
span: 8,
|
|
2072
|
-
class:
|
|
2072
|
+
class: d(k.$style.col)
|
|
2073
2073
|
}, {
|
|
2074
|
-
default:
|
|
2074
|
+
default: m(() => s[2] || (s[2] = [
|
|
2075
2075
|
Q(" 操作 ")
|
|
2076
2076
|
])),
|
|
2077
2077
|
_: 1
|
|
@@ -2079,56 +2079,56 @@ const En = (t) => {
|
|
|
2079
2079
|
]),
|
|
2080
2080
|
_: 1
|
|
2081
2081
|
}, 8, ["class"]),
|
|
2082
|
-
r.value.length ? (b(), E(
|
|
2082
|
+
r.value.length ? (b(), E(c(je), {
|
|
2083
2083
|
key: 0,
|
|
2084
2084
|
list: r.value,
|
|
2085
2085
|
"item-key": "id",
|
|
2086
2086
|
handle: ".table-column-draggable-icon",
|
|
2087
|
-
onChange:
|
|
2087
|
+
onChange: M
|
|
2088
2088
|
}, {
|
|
2089
|
-
item:
|
|
2090
|
-
|
|
2091
|
-
class:
|
|
2089
|
+
item: m(({ element: h }) => [
|
|
2090
|
+
p(F, {
|
|
2091
|
+
class: d(k.$style.sceneListItem)
|
|
2092
2092
|
}, {
|
|
2093
|
-
default:
|
|
2094
|
-
|
|
2093
|
+
default: m(() => [
|
|
2094
|
+
p($, {
|
|
2095
2095
|
span: 16,
|
|
2096
|
-
class:
|
|
2096
|
+
class: d(k.$style.col)
|
|
2097
2097
|
}, {
|
|
2098
|
-
default:
|
|
2099
|
-
|
|
2100
|
-
ellipsis: { tooltip:
|
|
2101
|
-
content:
|
|
2098
|
+
default: m(() => [
|
|
2099
|
+
p(R, {
|
|
2100
|
+
ellipsis: { tooltip: h.name },
|
|
2101
|
+
content: h.name
|
|
2102
2102
|
}, null, 8, ["ellipsis", "content"])
|
|
2103
2103
|
]),
|
|
2104
2104
|
_: 2
|
|
2105
2105
|
}, 1032, ["class"]),
|
|
2106
|
-
|
|
2106
|
+
p($, {
|
|
2107
2107
|
span: 8,
|
|
2108
|
-
class:
|
|
2108
|
+
class: d(k.$style.col)
|
|
2109
2109
|
}, {
|
|
2110
|
-
default:
|
|
2111
|
-
|
|
2110
|
+
default: m(() => [
|
|
2111
|
+
p(v, {
|
|
2112
2112
|
type: "link",
|
|
2113
2113
|
size: "small",
|
|
2114
|
-
onClick: (
|
|
2114
|
+
onClick: (y) => T(h)
|
|
2115
2115
|
}, {
|
|
2116
|
-
default:
|
|
2116
|
+
default: m(() => s[3] || (s[3] = [
|
|
2117
2117
|
Q(" 编辑 ")
|
|
2118
2118
|
])),
|
|
2119
2119
|
_: 2
|
|
2120
2120
|
}, 1032, ["onClick"]),
|
|
2121
|
-
|
|
2121
|
+
p(N, {
|
|
2122
2122
|
title: "确定删除?",
|
|
2123
|
-
onConfirm: (
|
|
2123
|
+
onConfirm: (y) => u(h.code)
|
|
2124
2124
|
}, {
|
|
2125
|
-
default:
|
|
2126
|
-
|
|
2125
|
+
default: m(() => [
|
|
2126
|
+
p(v, {
|
|
2127
2127
|
type: "link",
|
|
2128
2128
|
size: "small",
|
|
2129
2129
|
danger: ""
|
|
2130
2130
|
}, {
|
|
2131
|
-
default:
|
|
2131
|
+
default: m(() => s[4] || (s[4] = [
|
|
2132
2132
|
Q(" 删除 ")
|
|
2133
2133
|
])),
|
|
2134
2134
|
_: 1
|
|
@@ -2136,11 +2136,11 @@ const En = (t) => {
|
|
|
2136
2136
|
]),
|
|
2137
2137
|
_: 2
|
|
2138
2138
|
}, 1032, ["onConfirm"]),
|
|
2139
|
-
|
|
2139
|
+
p(v, {
|
|
2140
2140
|
type: "text",
|
|
2141
2141
|
size: "small",
|
|
2142
|
-
icon:
|
|
2143
|
-
class:
|
|
2142
|
+
icon: Y(c(ke)),
|
|
2143
|
+
class: d(["table-column-draggable-icon", k.$style.dragIcon])
|
|
2144
2144
|
}, null, 8, ["icon", "class"])
|
|
2145
2145
|
]),
|
|
2146
2146
|
_: 2
|
|
@@ -2150,18 +2150,18 @@ const En = (t) => {
|
|
|
2150
2150
|
}, 1032, ["class"])
|
|
2151
2151
|
]),
|
|
2152
2152
|
_: 1
|
|
2153
|
-
}, 8, ["list"])) : (b(), E(
|
|
2153
|
+
}, 8, ["list"])) : (b(), E(V, {
|
|
2154
2154
|
key: 1,
|
|
2155
|
-
image:
|
|
2155
|
+
image: c(fn).PRESENTED_IMAGE_SIMPLE
|
|
2156
2156
|
}, null, 8, ["image"]))
|
|
2157
2157
|
], 2),
|
|
2158
|
-
|
|
2158
|
+
n.allowCreateScene ? (b(), E(v, {
|
|
2159
2159
|
key: 0,
|
|
2160
2160
|
type: "link",
|
|
2161
|
-
icon:
|
|
2162
|
-
onClick:
|
|
2161
|
+
icon: Y(c(Ft)),
|
|
2162
|
+
onClick: C
|
|
2163
2163
|
}, {
|
|
2164
|
-
default:
|
|
2164
|
+
default: m(() => s[5] || (s[5] = [
|
|
2165
2165
|
Q(" 新建场景 ")
|
|
2166
2166
|
])),
|
|
2167
2167
|
_: 1
|
|
@@ -2171,15 +2171,15 @@ const En = (t) => {
|
|
|
2171
2171
|
}, 8, ["open"]);
|
|
2172
2172
|
};
|
|
2173
2173
|
}
|
|
2174
|
-
}),
|
|
2175
|
-
sceneList:
|
|
2176
|
-
sceneListHead:
|
|
2177
|
-
sceneListItem:
|
|
2178
|
-
col:
|
|
2179
|
-
dragIcon:
|
|
2180
|
-
},
|
|
2181
|
-
$style:
|
|
2182
|
-
},
|
|
2174
|
+
}), gl = "_sceneList_3nrgr_1", vl = "_sceneListHead_3nrgr_5", bl = "_sceneListItem_3nrgr_8", hl = "_col_3nrgr_16", _l = "_dragIcon_3nrgr_20", Cl = {
|
|
2175
|
+
sceneList: gl,
|
|
2176
|
+
sceneListHead: vl,
|
|
2177
|
+
sceneListItem: bl,
|
|
2178
|
+
col: hl,
|
|
2179
|
+
dragIcon: _l
|
|
2180
|
+
}, $l = {
|
|
2181
|
+
$style: Cl
|
|
2182
|
+
}, Sl = /* @__PURE__ */ fe(yl, [["__cssModules", $l]]), Il = /* @__PURE__ */ ie({
|
|
2183
2183
|
__name: "FormSearchParams",
|
|
2184
2184
|
props: {
|
|
2185
2185
|
/**
|
|
@@ -2224,109 +2224,109 @@ const En = (t) => {
|
|
|
2224
2224
|
}
|
|
2225
2225
|
},
|
|
2226
2226
|
emits: ["form-item-change", "search", "reset"],
|
|
2227
|
-
setup(
|
|
2228
|
-
const i =
|
|
2227
|
+
setup(n, { emit: a }) {
|
|
2228
|
+
const i = n, t = a, r = wn(
|
|
2229
2229
|
`superTable_formSearch_expanded_${i.superTableID}`,
|
|
2230
2230
|
!0
|
|
2231
|
-
), l =
|
|
2232
|
-
Object.values(i.formConfigMap).filter((v) => v[
|
|
2233
|
-
|
|
2234
|
-
)),
|
|
2231
|
+
), l = B(() => ot(
|
|
2232
|
+
Object.values(i.formConfigMap).filter((v) => v[be.selected]),
|
|
2233
|
+
be.orderInScene
|
|
2234
|
+
)), f = B(() => {
|
|
2235
2235
|
const v = [];
|
|
2236
2236
|
let N = 0;
|
|
2237
|
-
for (const
|
|
2238
|
-
const
|
|
2239
|
-
if (N +
|
|
2237
|
+
for (const V of l.value) {
|
|
2238
|
+
const z = (i.formConfigMap[V.name].span ?? 1) * i.formItemColSpan;
|
|
2239
|
+
if (N + z > 24)
|
|
2240
2240
|
break;
|
|
2241
|
-
v.push(
|
|
2241
|
+
v.push(V), N += z;
|
|
2242
2242
|
}
|
|
2243
2243
|
return v;
|
|
2244
|
-
}), u =
|
|
2245
|
-
if (!(!i.enableScene || i.showResetButton ||
|
|
2246
|
-
const
|
|
2247
|
-
return
|
|
2248
|
-
}),
|
|
2249
|
-
|
|
2250
|
-
},
|
|
2244
|
+
}), u = B(() => r.value ? l.value : f.value), C = B(() => i.showExpandButton && l.value.length > f.value.length), T = B(() => {
|
|
2245
|
+
if (!(!i.enableScene || i.showResetButton || C.value)) return 0;
|
|
2246
|
+
const V = 24 - u.value.reduce((h, y) => h + (i.formConfigMap[y.name].span ?? 1) * i.formItemColSpan, 0) % 24, z = i.formItemColSpan;
|
|
2247
|
+
return V >= z ? V : 24;
|
|
2248
|
+
}), M = (v, N) => {
|
|
2249
|
+
t("form-item-change", v, N);
|
|
2250
|
+
}, k = st(M, 500), s = (v, N) => {
|
|
2251
2251
|
[
|
|
2252
2252
|
G.input,
|
|
2253
2253
|
G.inputNumber,
|
|
2254
2254
|
G.inputGroup,
|
|
2255
2255
|
G.inputNumberRange
|
|
2256
|
-
].includes(i.formConfigMap[v].type) ?
|
|
2257
|
-
},
|
|
2258
|
-
|
|
2259
|
-
},
|
|
2260
|
-
|
|
2261
|
-
},
|
|
2256
|
+
].includes(i.formConfigMap[v].type) ? k(v, N) : M(v, N);
|
|
2257
|
+
}, $ = () => {
|
|
2258
|
+
t("search");
|
|
2259
|
+
}, F = () => {
|
|
2260
|
+
t("reset");
|
|
2261
|
+
}, R = () => {
|
|
2262
2262
|
r.value = !r.value;
|
|
2263
2263
|
};
|
|
2264
2264
|
return (v, N) => {
|
|
2265
|
-
const
|
|
2266
|
-
return u.value.length ? (b(),
|
|
2265
|
+
const V = x("a-col"), z = x("a-button"), h = x("a-row");
|
|
2266
|
+
return u.value.length ? (b(), q("div", {
|
|
2267
2267
|
key: 0,
|
|
2268
|
-
class:
|
|
2268
|
+
class: d([
|
|
2269
2269
|
v.$style.searchParamsWrapper,
|
|
2270
2270
|
{
|
|
2271
|
-
[v.$style.hasActions]: !
|
|
2271
|
+
[v.$style.hasActions]: !n.enableScene || n.showResetButton || C.value
|
|
2272
2272
|
}
|
|
2273
2273
|
])
|
|
2274
2274
|
}, [
|
|
2275
|
-
|
|
2275
|
+
p(h, {
|
|
2276
2276
|
gutter: [8, 8],
|
|
2277
|
-
class:
|
|
2277
|
+
class: d(v.$style.searchParams)
|
|
2278
2278
|
}, {
|
|
2279
|
-
default:
|
|
2280
|
-
(b(!0),
|
|
2281
|
-
key:
|
|
2282
|
-
span: (
|
|
2279
|
+
default: m(() => [
|
|
2280
|
+
(b(!0), q(Ie, null, nt(u.value, (y) => (b(), E(V, {
|
|
2281
|
+
key: y.name,
|
|
2282
|
+
span: (n.formConfigMap[y.name].span ?? 1) * n.formItemColSpan
|
|
2283
2283
|
}, {
|
|
2284
|
-
default:
|
|
2285
|
-
|
|
2286
|
-
value:
|
|
2287
|
-
"form-item":
|
|
2288
|
-
onChange: (
|
|
2284
|
+
default: m(() => [
|
|
2285
|
+
p(At, {
|
|
2286
|
+
value: n.formConfigMap[y.name].value,
|
|
2287
|
+
"form-item": n.formConfigMap[y.name],
|
|
2288
|
+
onChange: (L) => s(y.name, L)
|
|
2289
2289
|
}, null, 8, ["value", "form-item", "onChange"])
|
|
2290
2290
|
]),
|
|
2291
2291
|
_: 2
|
|
2292
2292
|
}, 1032, ["span"]))), 128)),
|
|
2293
|
-
!
|
|
2293
|
+
!n.enableScene || n.showResetButton || C.value ? (b(), E(V, {
|
|
2294
2294
|
key: 0,
|
|
2295
|
-
span:
|
|
2296
|
-
class:
|
|
2295
|
+
span: T.value,
|
|
2296
|
+
class: d(v.$style.searchActions)
|
|
2297
2297
|
}, {
|
|
2298
|
-
default:
|
|
2299
|
-
|
|
2300
|
-
class:
|
|
2298
|
+
default: m(() => [
|
|
2299
|
+
D("div", {
|
|
2300
|
+
class: d(v.$style.searchActionsWrapper)
|
|
2301
2301
|
}, [
|
|
2302
|
-
!
|
|
2302
|
+
!n.enableScene && n.showResetButton ? (b(), E(z, {
|
|
2303
2303
|
key: 0,
|
|
2304
|
-
onClick:
|
|
2304
|
+
onClick: F
|
|
2305
2305
|
}, {
|
|
2306
|
-
default:
|
|
2306
|
+
default: m(() => N[0] || (N[0] = [
|
|
2307
2307
|
Q(" 重置 ")
|
|
2308
2308
|
])),
|
|
2309
2309
|
_: 1
|
|
2310
2310
|
})) : A("", !0),
|
|
2311
|
-
|
|
2311
|
+
n.enableScene ? A("", !0) : (b(), E(z, {
|
|
2312
2312
|
key: 1,
|
|
2313
2313
|
type: "primary",
|
|
2314
|
-
loading:
|
|
2315
|
-
onClick:
|
|
2314
|
+
loading: n.loading,
|
|
2315
|
+
onClick: $
|
|
2316
2316
|
}, {
|
|
2317
|
-
default:
|
|
2317
|
+
default: m(() => N[1] || (N[1] = [
|
|
2318
2318
|
Q(" 查询 ")
|
|
2319
2319
|
])),
|
|
2320
2320
|
_: 1
|
|
2321
2321
|
}, 8, ["loading"])),
|
|
2322
|
-
|
|
2322
|
+
C.value ? (b(), E(z, {
|
|
2323
2323
|
key: 2,
|
|
2324
2324
|
type: "link",
|
|
2325
|
-
icon:
|
|
2326
|
-
onClick:
|
|
2325
|
+
icon: c(r) ? Y(c(bn)) : Y(c(Tt)),
|
|
2326
|
+
onClick: R
|
|
2327
2327
|
}, {
|
|
2328
|
-
default:
|
|
2329
|
-
Q(
|
|
2328
|
+
default: m(() => [
|
|
2329
|
+
Q(pe(c(r) ? "收起" : "展开"), 1)
|
|
2330
2330
|
]),
|
|
2331
2331
|
_: 1
|
|
2332
2332
|
}, 8, ["icon"])) : A("", !0)
|
|
@@ -2340,24 +2340,24 @@ const En = (t) => {
|
|
|
2340
2340
|
], 2)) : A("", !0);
|
|
2341
2341
|
};
|
|
2342
2342
|
}
|
|
2343
|
-
}),
|
|
2344
|
-
searchParamsWrapper:
|
|
2345
|
-
hasActions:
|
|
2346
|
-
searchParams:
|
|
2347
|
-
searchActionsWrapper:
|
|
2348
|
-
},
|
|
2349
|
-
$style:
|
|
2350
|
-
},
|
|
2351
|
-
|
|
2352
|
-
function
|
|
2353
|
-
return Array.from(document.body.children).includes(
|
|
2343
|
+
}), kl = "_searchParamsWrapper_mo3ie_1", wl = "_hasActions_mo3ie_6", Tl = "_searchParams_mo3ie_1", Fl = "_searchActionsWrapper_mo3ie_14", xl = {
|
|
2344
|
+
searchParamsWrapper: kl,
|
|
2345
|
+
hasActions: wl,
|
|
2346
|
+
searchParams: Tl,
|
|
2347
|
+
searchActionsWrapper: Fl
|
|
2348
|
+
}, Ll = {
|
|
2349
|
+
$style: xl
|
|
2350
|
+
}, Pl = /* @__PURE__ */ fe(Il, [["__cssModules", Ll]]);
|
|
2351
|
+
Ee.locale("zh-cn");
|
|
2352
|
+
function $t(n) {
|
|
2353
|
+
return Array.from(document.body.children).includes(n);
|
|
2354
2354
|
}
|
|
2355
|
-
class
|
|
2355
|
+
class Bl {
|
|
2356
2356
|
constructor(a = {}) {
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2357
|
+
Be(this, "currents");
|
|
2358
|
+
Be(this, "dialogs");
|
|
2359
|
+
Be(this, "staticDialogs");
|
|
2360
|
+
Be(this, "rootVm");
|
|
2361
2361
|
this.currents = [], this.dialogs = {}, this.staticDialogs = a, this.rootVm = null;
|
|
2362
2362
|
}
|
|
2363
2363
|
// 设置rootVm
|
|
@@ -2366,7 +2366,7 @@ class Ll {
|
|
|
2366
2366
|
}
|
|
2367
2367
|
// 注册dialog
|
|
2368
2368
|
register(a, i) {
|
|
2369
|
-
this.dialogs[a] || (this.dialogs[a] =
|
|
2369
|
+
this.dialogs[a] || (this.dialogs[a] = ie(i));
|
|
2370
2370
|
}
|
|
2371
2371
|
// 注销dialog
|
|
2372
2372
|
unregister(a) {
|
|
@@ -2374,46 +2374,46 @@ class Ll {
|
|
|
2374
2374
|
}
|
|
2375
2375
|
// 打开dialog
|
|
2376
2376
|
open(a, i) {
|
|
2377
|
-
const { props:
|
|
2378
|
-
if (!
|
|
2377
|
+
const { props: t, onCreated: r, onMounted: l } = i || {}, f = this.staticDialogs[a] || this.dialogs[a] || null;
|
|
2378
|
+
if (!f) {
|
|
2379
2379
|
console.error(`Dialog "${a}" is not existing, please register it firstly.`);
|
|
2380
2380
|
return;
|
|
2381
2381
|
}
|
|
2382
|
-
const u = document.createElement("div"),
|
|
2383
|
-
u.setAttribute("id",
|
|
2384
|
-
const
|
|
2382
|
+
const u = document.createElement("div"), C = `dialog_${In()}`;
|
|
2383
|
+
u.setAttribute("id", C), document.body.appendChild(u);
|
|
2384
|
+
const T = Qt({
|
|
2385
2385
|
data() {
|
|
2386
2386
|
return {
|
|
2387
2387
|
open: !0
|
|
2388
2388
|
};
|
|
2389
2389
|
},
|
|
2390
2390
|
render() {
|
|
2391
|
-
return
|
|
2392
|
-
|
|
2391
|
+
return Y(
|
|
2392
|
+
yn,
|
|
2393
2393
|
{
|
|
2394
|
-
key:
|
|
2395
|
-
locale:
|
|
2394
|
+
key: C,
|
|
2395
|
+
locale: Bt
|
|
2396
2396
|
},
|
|
2397
2397
|
() => [
|
|
2398
|
-
|
|
2399
|
-
key:
|
|
2398
|
+
Y(f, {
|
|
2399
|
+
key: C,
|
|
2400
2400
|
destroyOnClose: !0,
|
|
2401
|
-
...
|
|
2401
|
+
...t,
|
|
2402
2402
|
open: this.open,
|
|
2403
2403
|
onCancel: () => {
|
|
2404
|
-
var
|
|
2405
|
-
this.open = !1, (
|
|
2404
|
+
var k;
|
|
2405
|
+
this.open = !1, (k = t == null ? void 0 : t.onCancel) == null || k.call(t);
|
|
2406
2406
|
}
|
|
2407
2407
|
})
|
|
2408
2408
|
]
|
|
2409
2409
|
);
|
|
2410
2410
|
}
|
|
2411
|
-
}).use(
|
|
2412
|
-
r == null || r(
|
|
2413
|
-
const
|
|
2414
|
-
return l == null || l(
|
|
2415
|
-
|
|
2416
|
-
}), this.currents.push(
|
|
2411
|
+
}).use(on);
|
|
2412
|
+
r == null || r(T);
|
|
2413
|
+
const M = T.mount(`#${C}`);
|
|
2414
|
+
return l == null || l(M), M.$watch("open", (k) => {
|
|
2415
|
+
k || this.destroy();
|
|
2416
|
+
}), this.currents.push(T), T;
|
|
2417
2417
|
}
|
|
2418
2418
|
// 关闭dialog
|
|
2419
2419
|
close() {
|
|
@@ -2423,88 +2423,88 @@ class Ll {
|
|
|
2423
2423
|
}
|
|
2424
2424
|
// 销毁dialog
|
|
2425
2425
|
destroy() {
|
|
2426
|
-
var i,
|
|
2426
|
+
var i, t, r;
|
|
2427
2427
|
const a = this.currents.pop();
|
|
2428
2428
|
if (a) {
|
|
2429
|
-
const l =
|
|
2430
|
-
|
|
2429
|
+
const l = $t((i = a._instance) == null ? void 0 : i.vnode.el) ? (t = a._instance) == null ? void 0 : t.vnode.el : (r = a._instance) == null ? void 0 : r.vnode.el.parentElement;
|
|
2430
|
+
$t(l) && document.body.removeChild(l), a.unmount();
|
|
2431
2431
|
}
|
|
2432
2432
|
}
|
|
2433
2433
|
}
|
|
2434
|
-
const
|
|
2435
|
-
function
|
|
2434
|
+
const Me = new Bl();
|
|
2435
|
+
function St(n, a) {
|
|
2436
2436
|
const i = Symbol("dialog");
|
|
2437
|
-
|
|
2438
|
-
function
|
|
2439
|
-
|
|
2437
|
+
Me.register(i, n);
|
|
2438
|
+
function t() {
|
|
2439
|
+
Me.open(i, c(a));
|
|
2440
2440
|
}
|
|
2441
2441
|
function r() {
|
|
2442
|
-
|
|
2442
|
+
Me.close();
|
|
2443
2443
|
}
|
|
2444
|
-
function l(
|
|
2445
|
-
|
|
2444
|
+
function l(f) {
|
|
2445
|
+
Me.open(i, f);
|
|
2446
2446
|
}
|
|
2447
|
-
return
|
|
2448
|
-
|
|
2447
|
+
return Kt(() => {
|
|
2448
|
+
Me.unregister(i);
|
|
2449
2449
|
}), {
|
|
2450
|
-
open:
|
|
2450
|
+
open: t,
|
|
2451
2451
|
close: r,
|
|
2452
2452
|
openByConfig: l
|
|
2453
2453
|
};
|
|
2454
2454
|
}
|
|
2455
|
-
const
|
|
2456
|
-
const { getScenes: a, setScenes: i } =
|
|
2455
|
+
const ze = 2e3, Ml = (n) => {
|
|
2456
|
+
const { getScenes: a, setScenes: i } = n;
|
|
2457
2457
|
return {
|
|
2458
|
-
querySceneList: async (
|
|
2459
|
-
const r = a(), l =
|
|
2458
|
+
querySceneList: async (t) => {
|
|
2459
|
+
const r = a(), l = t.type ? r.filter((f) => f.type === t.type) : r;
|
|
2460
2460
|
return {
|
|
2461
|
-
code:
|
|
2461
|
+
code: ze,
|
|
2462
2462
|
data: l,
|
|
2463
2463
|
msg: "success"
|
|
2464
2464
|
};
|
|
2465
2465
|
},
|
|
2466
|
-
createScene: async (
|
|
2467
|
-
const r = a(), l =
|
|
2468
|
-
return r.push({ ...
|
|
2469
|
-
code:
|
|
2466
|
+
createScene: async (t) => {
|
|
2467
|
+
const r = a(), l = jt(Math.random().toString());
|
|
2468
|
+
return r.push({ ...t, code: l }), i(r), {
|
|
2469
|
+
code: ze,
|
|
2470
2470
|
data: l,
|
|
2471
2471
|
msg: "success"
|
|
2472
2472
|
};
|
|
2473
2473
|
},
|
|
2474
|
-
updateScene: async (
|
|
2475
|
-
const r = a(), l = r.findIndex((
|
|
2474
|
+
updateScene: async (t) => {
|
|
2475
|
+
const r = a(), l = r.findIndex((f) => f.code === t.code);
|
|
2476
2476
|
return l === -1 ? {
|
|
2477
2477
|
code: 404,
|
|
2478
2478
|
data: null,
|
|
2479
2479
|
msg: "Scene not found"
|
|
2480
|
-
} : (r[l] = { ...r[l], ...
|
|
2481
|
-
code:
|
|
2480
|
+
} : (r[l] = { ...r[l], ...t }, i(r), {
|
|
2481
|
+
code: ze,
|
|
2482
2482
|
data: r[l],
|
|
2483
2483
|
msg: "success"
|
|
2484
2484
|
});
|
|
2485
2485
|
},
|
|
2486
|
-
deleteScene: async (
|
|
2487
|
-
const l = a().filter((
|
|
2486
|
+
deleteScene: async (t) => {
|
|
2487
|
+
const l = a().filter((f) => !t.includes(f.code));
|
|
2488
2488
|
return i(l), {
|
|
2489
|
-
code:
|
|
2489
|
+
code: ze,
|
|
2490
2490
|
data: null,
|
|
2491
2491
|
msg: "success"
|
|
2492
2492
|
};
|
|
2493
2493
|
}
|
|
2494
2494
|
};
|
|
2495
|
-
},
|
|
2496
|
-
const
|
|
2495
|
+
}, It = () => {
|
|
2496
|
+
const n = {
|
|
2497
2497
|
code: -1,
|
|
2498
2498
|
data: [],
|
|
2499
2499
|
msg: "场景功能已关闭"
|
|
2500
2500
|
};
|
|
2501
2501
|
return {
|
|
2502
|
-
querySceneList: async () =>
|
|
2503
|
-
createScene: async () =>
|
|
2504
|
-
updateScene: async () =>
|
|
2505
|
-
deleteScene: async () =>
|
|
2502
|
+
querySceneList: async () => n,
|
|
2503
|
+
createScene: async () => n,
|
|
2504
|
+
updateScene: async () => n,
|
|
2505
|
+
deleteScene: async () => n
|
|
2506
2506
|
};
|
|
2507
|
-
},
|
|
2507
|
+
}, jl = ["innerHTML"], Al = /* @__PURE__ */ ie({
|
|
2508
2508
|
__name: "SuperTable",
|
|
2509
2509
|
props: {
|
|
2510
2510
|
/**
|
|
@@ -2563,7 +2563,7 @@ const De = 2e3, Bl = (t) => {
|
|
|
2563
2563
|
/** 转换表格数据 */
|
|
2564
2564
|
formatDataSource: {
|
|
2565
2565
|
type: Function,
|
|
2566
|
-
default: (
|
|
2566
|
+
default: (n) => n
|
|
2567
2567
|
},
|
|
2568
2568
|
/** 可排序 */
|
|
2569
2569
|
sortable: {
|
|
@@ -2635,73 +2635,78 @@ const De = 2e3, Bl = (t) => {
|
|
|
2635
2635
|
}
|
|
2636
2636
|
},
|
|
2637
2637
|
emits: ["sort-change", "row-sort-end", "form-item-change", "scene-change"],
|
|
2638
|
-
setup(
|
|
2639
|
-
var
|
|
2640
|
-
|
|
2641
|
-
const
|
|
2642
|
-
var o, g,
|
|
2643
|
-
const e = (o =
|
|
2644
|
-
return !!((
|
|
2645
|
-
}), u = ee(), { openByConfig:
|
|
2646
|
-
(e, o) => (e[o.key] =
|
|
2638
|
+
setup(n, { expose: a, emit: i }) {
|
|
2639
|
+
var ut, ct;
|
|
2640
|
+
Ee.locale("zh-cn");
|
|
2641
|
+
const t = n, r = i, l = ee(!1), f = B(() => {
|
|
2642
|
+
var o, g, I;
|
|
2643
|
+
const e = (o = Jt()) == null ? void 0 : o.appContext.app;
|
|
2644
|
+
return !!((I = (g = e == null ? void 0 : e.config) == null ? void 0 : g.globalProperties) != null && I.$router);
|
|
2645
|
+
}), u = ee(), { openByConfig: C } = St(fl), { openByConfig: T } = St(Sl), M = Ct(t.columns).reduce(
|
|
2646
|
+
(e, o) => (e[o.key] = $e(o, at), e),
|
|
2647
2647
|
{}
|
|
2648
|
-
),
|
|
2648
|
+
), k = jt([location.hostname, location.pathname, t.sceneType].join("")), s = Tn(`superTable_${k}`, {
|
|
2649
2649
|
pathname: location.pathname,
|
|
2650
2650
|
sceneCode: null,
|
|
2651
2651
|
sceneSort: [],
|
|
2652
2652
|
sceneList: [],
|
|
2653
|
-
columnConfig:
|
|
2654
|
-
}),
|
|
2653
|
+
columnConfig: M
|
|
2654
|
+
}), $ = B(() => t.enableScene ? t.sceneStorageType === "api" ? t.sceneRequest ? t.sceneRequest : (console.error('SuperTable: sceneStorageType 为 "api" 时,必须提供 sceneRequest 配置'), It()) : Ml({
|
|
2655
2655
|
getScenes: () => s.value.sceneList,
|
|
2656
2656
|
setScenes: (e) => {
|
|
2657
2657
|
s.value.sceneList = e;
|
|
2658
2658
|
}
|
|
2659
|
-
}) :
|
|
2659
|
+
}) : It()), F = ee(!1), R = B(() => Object.keys(t.customQueryParams).length > 0), v = ee(!1), N = B(() => {
|
|
2660
|
+
var e;
|
|
2661
|
+
return ((e = t.tableProps) == null ? void 0 : e.pagination) === !1;
|
|
2662
|
+
}), V = st(async () => {
|
|
2660
2663
|
try {
|
|
2661
|
-
|
|
2662
|
-
const { total: e, data: o } = await
|
|
2663
|
-
params:
|
|
2664
|
-
|
|
2665
|
-
|
|
2664
|
+
W.loading = !0;
|
|
2665
|
+
const { total: e, data: o } = await t.request({
|
|
2666
|
+
params: it(),
|
|
2667
|
+
...N.value ? {} : {
|
|
2668
|
+
pageSize: W.pagination.pageSize,
|
|
2669
|
+
pageNum: W.pagination.current
|
|
2670
|
+
}
|
|
2666
2671
|
});
|
|
2667
|
-
|
|
2672
|
+
W.dataSource = o, N.value || (W.pagination.total = e);
|
|
2668
2673
|
} catch (e) {
|
|
2669
|
-
|
|
2674
|
+
W.dataSource = [], console.error(e);
|
|
2670
2675
|
} finally {
|
|
2671
|
-
|
|
2676
|
+
W.loading = !1;
|
|
2672
2677
|
}
|
|
2673
|
-
},
|
|
2674
|
-
|
|
2675
|
-
},
|
|
2676
|
-
for (const o in
|
|
2677
|
-
const g =
|
|
2678
|
-
g.value =
|
|
2678
|
+
}, t.debounceWait), z = () => {
|
|
2679
|
+
t.enableScene && !L.loaded || (N.value || (W.pagination.current = 1), V());
|
|
2680
|
+
}, h = ee({}), y = (e = []) => {
|
|
2681
|
+
for (const o in h.value) {
|
|
2682
|
+
const g = h.value[o], I = e.find((w) => w.name === o);
|
|
2683
|
+
g.value = I ? I.value : g._defaultValue, g[be.selected] = !!I, g[be.orderInScene] = I ? e.findIndex((w) => w.name === (I == null ? void 0 : I.name)) : void 0;
|
|
2679
2684
|
}
|
|
2680
|
-
|
|
2681
|
-
},
|
|
2685
|
+
z();
|
|
2686
|
+
}, L = He({
|
|
2682
2687
|
list: [],
|
|
2683
2688
|
loading: !1,
|
|
2684
2689
|
submiting: !1,
|
|
2685
2690
|
loaded: !1
|
|
2686
|
-
}),
|
|
2691
|
+
}), J = B(() => xe(de(t.defaultScene)).filter(Boolean).map(({ name: o = "默认场景", code: g = "default_scene", items: I }) => ({
|
|
2687
2692
|
name: o,
|
|
2688
2693
|
code: g,
|
|
2689
2694
|
isCustom: !0,
|
|
2690
|
-
items:
|
|
2691
|
-
var
|
|
2695
|
+
items: I.filter((w) => !!h.value[w.name]).map((w) => {
|
|
2696
|
+
var O;
|
|
2692
2697
|
return {
|
|
2693
|
-
name:
|
|
2694
|
-
value:
|
|
2695
|
-
type: (
|
|
2698
|
+
name: w.name,
|
|
2699
|
+
value: w.value ?? h.value[w.name]._defaultValue,
|
|
2700
|
+
type: (O = h.value[w.name]) == null ? void 0 : O.type
|
|
2696
2701
|
};
|
|
2697
2702
|
})
|
|
2698
2703
|
})));
|
|
2699
|
-
|
|
2700
|
-
() =>
|
|
2704
|
+
_e(
|
|
2705
|
+
() => t.formItems,
|
|
2701
2706
|
() => {
|
|
2702
|
-
|
|
2707
|
+
_t(de(t.formItems)).forEach((e) => {
|
|
2703
2708
|
const o = { ...e };
|
|
2704
|
-
o.component && (o.component =
|
|
2709
|
+
o.component && (o.component = Zt(o.component)), h.value[e.name] = kn(de(h.value[e.name]) ?? {}, o);
|
|
2705
2710
|
});
|
|
2706
2711
|
},
|
|
2707
2712
|
{
|
|
@@ -2709,98 +2714,98 @@ const De = 2e3, Bl = (t) => {
|
|
|
2709
2714
|
deep: !0
|
|
2710
2715
|
}
|
|
2711
2716
|
);
|
|
2712
|
-
const
|
|
2717
|
+
const ae = async () => {
|
|
2713
2718
|
try {
|
|
2714
|
-
|
|
2715
|
-
const { code: e, data: o = [], msg: g } = await
|
|
2719
|
+
L.loading = !0;
|
|
2720
|
+
const { code: e, data: o = [], msg: g } = await $.value.querySceneList({ type: k });
|
|
2716
2721
|
if (e === 2e3) {
|
|
2717
|
-
const
|
|
2718
|
-
|
|
2719
|
-
const
|
|
2720
|
-
if (!
|
|
2721
|
-
s.value.sceneCode = null,
|
|
2722
|
-
const
|
|
2723
|
-
var
|
|
2722
|
+
const I = L.list.find((O) => O.code === s.value.sceneCode);
|
|
2723
|
+
L.list = Nn(o, h.value, s.value.sceneSort);
|
|
2724
|
+
const w = L.list.find((O) => O.code === s.value.sceneCode);
|
|
2725
|
+
if (!L.loaded && R.value) {
|
|
2726
|
+
s.value.sceneCode = null, L.loaded = !0;
|
|
2727
|
+
const O = Object.entries(t.customQueryParams).map(([ye, Je]) => {
|
|
2728
|
+
var Re;
|
|
2724
2729
|
return {
|
|
2725
2730
|
name: ye,
|
|
2726
2731
|
value: Je,
|
|
2727
|
-
type: (
|
|
2732
|
+
type: (Re = h.value[ye]) == null ? void 0 : Re.type
|
|
2728
2733
|
};
|
|
2729
2734
|
});
|
|
2730
|
-
|
|
2735
|
+
y(O);
|
|
2731
2736
|
return;
|
|
2732
2737
|
}
|
|
2733
|
-
(!
|
|
2738
|
+
(!L.loaded || I && I.value !== (w == null ? void 0 : w.value)) && y(w == null ? void 0 : w.items), L.loaded = !0;
|
|
2734
2739
|
} else
|
|
2735
2740
|
et.error(g);
|
|
2736
2741
|
} finally {
|
|
2737
|
-
|
|
2742
|
+
L.loading = !1;
|
|
2738
2743
|
}
|
|
2739
|
-
},
|
|
2744
|
+
}, we = ({ code: e, msg: o }) => e === 2e3 ? (et.success("操作成功"), ae(), Promise.resolve(o)) : (et.error(o), Promise.reject(o)), he = async ({ name: e, items: o }) => {
|
|
2740
2745
|
try {
|
|
2741
|
-
const g = await
|
|
2742
|
-
type:
|
|
2746
|
+
const g = await $.value.createScene({
|
|
2747
|
+
type: k,
|
|
2743
2748
|
name: e,
|
|
2744
2749
|
value: JSON.stringify(o),
|
|
2745
2750
|
asPrivate: !0
|
|
2746
2751
|
});
|
|
2747
|
-
s.value.sceneCode = g == null ? void 0 : g.data,
|
|
2752
|
+
s.value.sceneCode = g == null ? void 0 : g.data, we(g);
|
|
2748
2753
|
} catch (g) {
|
|
2749
2754
|
return Promise.reject(g);
|
|
2750
2755
|
}
|
|
2751
|
-
},
|
|
2756
|
+
}, ue = async (e) => {
|
|
2752
2757
|
try {
|
|
2753
|
-
const o = await
|
|
2758
|
+
const o = await $.value.updateScene({
|
|
2754
2759
|
code: e.code,
|
|
2755
2760
|
name: e.name,
|
|
2756
2761
|
value: JSON.stringify(e.items)
|
|
2757
2762
|
});
|
|
2758
|
-
return
|
|
2763
|
+
return we(o);
|
|
2759
2764
|
} catch (o) {
|
|
2760
2765
|
return Promise.reject(o);
|
|
2761
2766
|
}
|
|
2762
|
-
},
|
|
2767
|
+
}, Le = async (e) => {
|
|
2763
2768
|
try {
|
|
2764
|
-
const o = await
|
|
2765
|
-
o.code === 2e3 && (s.value.sceneCode = null, e === s.value.sceneCode && (
|
|
2769
|
+
const o = await $.value.deleteScene([e]);
|
|
2770
|
+
o.code === 2e3 && (s.value.sceneCode = null, e === s.value.sceneCode && (y([]), s.value.sceneCode = void 0)), we(o);
|
|
2766
2771
|
} catch (o) {
|
|
2767
2772
|
return Promise.reject(o);
|
|
2768
2773
|
}
|
|
2769
|
-
},
|
|
2770
|
-
|
|
2771
|
-
() => [s.value.sceneCode,
|
|
2774
|
+
}, Te = B(() => L.list.length < t.maxSceneCount);
|
|
2775
|
+
_e(
|
|
2776
|
+
() => [s.value.sceneCode, L.list],
|
|
2772
2777
|
() => {
|
|
2773
|
-
if (
|
|
2778
|
+
if (R.value && !v.value) {
|
|
2774
2779
|
v.value = !0;
|
|
2775
2780
|
return;
|
|
2776
2781
|
}
|
|
2777
|
-
const e = [...
|
|
2782
|
+
const e = [...J.value, ...L.list].find(
|
|
2778
2783
|
(o) => o.code === s.value.sceneCode
|
|
2779
2784
|
);
|
|
2780
|
-
|
|
2785
|
+
y((e == null ? void 0 : e.items) ?? []);
|
|
2781
2786
|
}
|
|
2782
2787
|
);
|
|
2783
|
-
const
|
|
2784
|
-
...
|
|
2788
|
+
const P = B(() => `super_table_row_${k}`), ne = Xt(), W = He({
|
|
2789
|
+
...t.tableProps,
|
|
2785
2790
|
dataSource: [],
|
|
2786
2791
|
columns: [],
|
|
2787
2792
|
loading: !1,
|
|
2788
2793
|
rowKey: "id",
|
|
2789
|
-
pagination: {
|
|
2794
|
+
pagination: typeof ((ut = t.tableProps) == null ? void 0 : ut.pagination) == "boolean" ? t.tableProps.pagination : {
|
|
2790
2795
|
total: 0,
|
|
2791
2796
|
pageSize: 20,
|
|
2792
2797
|
current: 1,
|
|
2793
2798
|
showQuickJumper: !0,
|
|
2794
2799
|
showSizeChanger: !0,
|
|
2795
2800
|
showTotal: (e) => `共${e}条数据`,
|
|
2796
|
-
...Ve(
|
|
2801
|
+
...Ve(t.tableProps, "pagination", {}),
|
|
2797
2802
|
onShowSizeChange: (e, o) => {
|
|
2798
|
-
var g,
|
|
2799
|
-
((g =
|
|
2803
|
+
var g, I, w, O;
|
|
2804
|
+
((g = t.tableProps) == null ? void 0 : g.pagination) !== !1 && ((O = (w = (I = t.tableProps) == null ? void 0 : I.pagination) == null ? void 0 : w.onShowSizeChange) == null || O.call(w, 1, o));
|
|
2800
2805
|
},
|
|
2801
2806
|
onChange: (e, o) => {
|
|
2802
|
-
var g,
|
|
2803
|
-
|
|
2807
|
+
var g, I, w, O;
|
|
2808
|
+
W.pagination.current = o !== W.pagination.pageSize ? 1 : e, W.pagination.pageSize = o, ((g = t.tableProps) == null ? void 0 : g.pagination) !== !1 && ((O = (w = (I = t.tableProps) == null ? void 0 : I.pagination) == null ? void 0 : w.onChange) == null || O.call(w, e, o)), V();
|
|
2804
2809
|
}
|
|
2805
2810
|
},
|
|
2806
2811
|
tableLayout: "fixed",
|
|
@@ -2808,47 +2813,47 @@ const De = 2e3, Bl = (t) => {
|
|
|
2808
2813
|
x: "100%",
|
|
2809
2814
|
y: Math.max(500, window.innerWidth * 0.8),
|
|
2810
2815
|
scrollToFirstRowOnChange: !0,
|
|
2811
|
-
...((
|
|
2816
|
+
...((ct = t.tableProps) == null ? void 0 : ct.scroll) ?? {}
|
|
2812
2817
|
},
|
|
2813
2818
|
rowClassName: (e, o, g) => {
|
|
2814
|
-
var
|
|
2815
|
-
let
|
|
2816
|
-
const
|
|
2817
|
-
return
|
|
2819
|
+
var O;
|
|
2820
|
+
let I = "";
|
|
2821
|
+
const w = (O = t.tableProps) == null ? void 0 : O.rowClassName;
|
|
2822
|
+
return Ce(w) ? I = w(e, o, g) : typeof w == "string" && (I = w), [I, P.value].join(" ");
|
|
2818
2823
|
}
|
|
2819
|
-
}),
|
|
2824
|
+
}), Ne = B(() => {
|
|
2820
2825
|
try {
|
|
2821
|
-
return
|
|
2826
|
+
return t.formatDataSource(de(W.dataSource));
|
|
2822
2827
|
} catch {
|
|
2823
|
-
return
|
|
2828
|
+
return de(W.dataSource);
|
|
2824
2829
|
}
|
|
2825
|
-
}),
|
|
2826
|
-
const o =
|
|
2830
|
+
}), Oe = (e) => {
|
|
2831
|
+
const o = W.rowKey;
|
|
2827
2832
|
if (typeof o == "string")
|
|
2828
2833
|
return e == null ? void 0 : e[o];
|
|
2829
2834
|
if (typeof o == "function")
|
|
2830
2835
|
return o(e);
|
|
2831
|
-
},
|
|
2836
|
+
}, S = B(() => Ct(t.columns).map((e) => {
|
|
2832
2837
|
const o = s.value.columnConfig[e.key], g = { ...e };
|
|
2833
|
-
return at.forEach((
|
|
2834
|
-
|
|
2838
|
+
return at.forEach((I) => {
|
|
2839
|
+
I !== "key" && (o == null ? void 0 : o[I]) !== void 0 && (g[I] = o[I]);
|
|
2835
2840
|
}), g;
|
|
2836
|
-
})),
|
|
2841
|
+
})), _ = (e, o) => {
|
|
2837
2842
|
s.value.columnConfig[o.key] = {
|
|
2838
2843
|
...s.value.columnConfig[o.key] ?? {},
|
|
2839
2844
|
width: e
|
|
2840
2845
|
};
|
|
2841
|
-
},
|
|
2846
|
+
}, j = (e) => {
|
|
2842
2847
|
e.length === 0 ? s.value.columnConfig = {} : s.value.columnConfig = e.reduce(
|
|
2843
|
-
(o, g,
|
|
2848
|
+
(o, g, I) => (o[g.key] = {
|
|
2844
2849
|
...g,
|
|
2845
|
-
index:
|
|
2850
|
+
index: I
|
|
2846
2851
|
}, o),
|
|
2847
2852
|
{}
|
|
2848
2853
|
);
|
|
2849
2854
|
};
|
|
2850
|
-
|
|
2851
|
-
() => [
|
|
2855
|
+
_e(
|
|
2856
|
+
() => [S.value, t.sortable],
|
|
2852
2857
|
() => {
|
|
2853
2858
|
const e = {
|
|
2854
2859
|
key: H.sort,
|
|
@@ -2856,12 +2861,12 @@ const De = 2e3, Bl = (t) => {
|
|
|
2856
2861
|
title: "",
|
|
2857
2862
|
fixed: "left",
|
|
2858
2863
|
width: 60
|
|
2859
|
-
}, o =
|
|
2860
|
-
|
|
2861
|
-
...
|
|
2864
|
+
}, o = S.value.filter(({ visible: O }) => O), g = o.filter((O) => O.fixed === "left").sort((O, ye) => O.index - ye.index), I = o.filter((O) => !O.fixed).sort((O, ye) => O.index - ye.index), w = o.filter((O) => O.fixed === "right").sort((O, ye) => O.index - ye.index);
|
|
2865
|
+
W.columns = [
|
|
2866
|
+
...t.sortable ? [e] : [],
|
|
2862
2867
|
...g,
|
|
2863
|
-
...
|
|
2864
|
-
...
|
|
2868
|
+
...I,
|
|
2869
|
+
...w
|
|
2865
2870
|
];
|
|
2866
2871
|
},
|
|
2867
2872
|
{
|
|
@@ -2869,10 +2874,10 @@ const De = 2e3, Bl = (t) => {
|
|
|
2869
2874
|
immediate: !0
|
|
2870
2875
|
}
|
|
2871
2876
|
);
|
|
2872
|
-
const
|
|
2877
|
+
const K = () => new Promise((e) => {
|
|
2873
2878
|
const o = () => {
|
|
2874
|
-
var
|
|
2875
|
-
const g = (
|
|
2879
|
+
var I, w;
|
|
2880
|
+
const g = (w = (I = ne.value) == null ? void 0 : I.$el) == null ? void 0 : w.querySelector(".ant-table-tbody");
|
|
2876
2881
|
if (g) {
|
|
2877
2882
|
e(g);
|
|
2878
2883
|
return;
|
|
@@ -2880,9 +2885,9 @@ const De = 2e3, Bl = (t) => {
|
|
|
2880
2885
|
requestAnimationFrame(o);
|
|
2881
2886
|
};
|
|
2882
2887
|
o();
|
|
2883
|
-
}),
|
|
2884
|
-
const e = await
|
|
2885
|
-
e && new
|
|
2888
|
+
}), oe = async () => {
|
|
2889
|
+
const e = await K();
|
|
2890
|
+
e && new Fn(e, {
|
|
2886
2891
|
animation: 150,
|
|
2887
2892
|
handle: ".super-table-column-draggable-handle",
|
|
2888
2893
|
setData: (o) => {
|
|
@@ -2890,233 +2895,233 @@ const De = 2e3, Bl = (t) => {
|
|
|
2890
2895
|
g.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", o.setDragImage(g, 0, 0);
|
|
2891
2896
|
},
|
|
2892
2897
|
onEnd: (o) => {
|
|
2893
|
-
const { oldIndex: g, newIndex:
|
|
2894
|
-
if (g === void 0 ||
|
|
2895
|
-
const
|
|
2896
|
-
|
|
2898
|
+
const { oldIndex: g, newIndex: I } = o;
|
|
2899
|
+
if (g === void 0 || I === void 0) return;
|
|
2900
|
+
const w = de(W.dataSource), [O] = w.splice(g, 1);
|
|
2901
|
+
w.splice(I, 0, O), r("row-sort-end", w);
|
|
2897
2902
|
}
|
|
2898
2903
|
});
|
|
2899
|
-
},
|
|
2900
|
-
|
|
2901
|
-
},
|
|
2902
|
-
for (const e in
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
},
|
|
2906
|
-
|
|
2907
|
-
let g =
|
|
2908
|
-
e ===
|
|
2904
|
+
}, ce = (e, o) => {
|
|
2905
|
+
h.value[e].value = o, r("form-item-change", e, o, de(h.value[e]), Qe, Ke), h.value[e].quiet !== !0 && t.enableScene && z();
|
|
2906
|
+
}, Ue = () => {
|
|
2907
|
+
for (const e in h.value)
|
|
2908
|
+
h.value[e].value = h.value[e]._defaultValue;
|
|
2909
|
+
z();
|
|
2910
|
+
}, Fe = (e, o) => {
|
|
2911
|
+
F.value = !1;
|
|
2912
|
+
let g = de(h.value);
|
|
2913
|
+
e === re.create && (g = _t(t.formItems).reduce((I, w) => (I[w.name] = w, I), {})), C({
|
|
2909
2914
|
props: {
|
|
2910
2915
|
ref: u,
|
|
2911
2916
|
currentScene: o,
|
|
2912
2917
|
actionType: e,
|
|
2913
2918
|
formConfigMap: g,
|
|
2914
|
-
onCreate:
|
|
2915
|
-
onUpdate:
|
|
2916
|
-
onUpdateFormConfig: (
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
+
onCreate: he,
|
|
2920
|
+
onUpdate: ue,
|
|
2921
|
+
onUpdateFormConfig: (I) => {
|
|
2922
|
+
I.forEach((w) => {
|
|
2923
|
+
Ae(h.value, w.name, w);
|
|
2919
2924
|
});
|
|
2920
2925
|
},
|
|
2921
|
-
onSearch: (
|
|
2922
|
-
|
|
2926
|
+
onSearch: (I) => {
|
|
2927
|
+
y(I);
|
|
2923
2928
|
},
|
|
2924
|
-
onFormItemChange(
|
|
2925
|
-
r("form-item-change",
|
|
2929
|
+
onFormItemChange(I, w) {
|
|
2930
|
+
r("form-item-change", I, w, de(h.value[I]), Qe, Ke);
|
|
2926
2931
|
},
|
|
2927
2932
|
onCancel() {
|
|
2928
2933
|
u.value = void 0;
|
|
2929
2934
|
}
|
|
2930
2935
|
}
|
|
2931
2936
|
});
|
|
2932
|
-
},
|
|
2933
|
-
|
|
2937
|
+
}, Ge = () => {
|
|
2938
|
+
F.value = !1, T({
|
|
2934
2939
|
props: {
|
|
2935
|
-
list:
|
|
2936
|
-
allowCreateScene:
|
|
2937
|
-
onCreate: () =>
|
|
2938
|
-
onUpdate: (e) =>
|
|
2939
|
-
onDelete: (e) =>
|
|
2940
|
+
list: L.list,
|
|
2941
|
+
allowCreateScene: c(Te),
|
|
2942
|
+
onCreate: () => Fe(re.create),
|
|
2943
|
+
onUpdate: (e) => Fe(re.update, e),
|
|
2944
|
+
onDelete: (e) => Le(e),
|
|
2940
2945
|
onSort: (e) => {
|
|
2941
|
-
s.value.sceneSort = e,
|
|
2946
|
+
s.value.sceneSort = e, L.list = L.list.sort((o, g) => e.indexOf(o.code) - e.indexOf(g.code));
|
|
2942
2947
|
}
|
|
2943
2948
|
}
|
|
2944
2949
|
});
|
|
2945
|
-
},
|
|
2946
|
-
await
|
|
2947
|
-
const o =
|
|
2950
|
+
}, U = async (e) => {
|
|
2951
|
+
await nn();
|
|
2952
|
+
const o = L.list.find((g) => g.code === e);
|
|
2948
2953
|
r("scene-change", o);
|
|
2949
|
-
},
|
|
2950
|
-
if (
|
|
2951
|
-
return
|
|
2952
|
-
if (!
|
|
2953
|
-
return
|
|
2954
|
-
if (o === "visible" &&
|
|
2955
|
-
return
|
|
2956
|
-
|
|
2957
|
-
},
|
|
2958
|
-
if (!
|
|
2959
|
-
return
|
|
2960
|
-
|
|
2961
|
-
},
|
|
2954
|
+
}, Pe = (e) => h.value[e], ge = (e, o, g) => {
|
|
2955
|
+
if (Mt.includes(o))
|
|
2956
|
+
return Se("setFormItem error,", `form item with prop "${e}" is readonly`);
|
|
2957
|
+
if (!Pe(e))
|
|
2958
|
+
return Se("setFormItem error,", `Cannot find form item with name "${e}"`);
|
|
2959
|
+
if (o === "visible" && h.value[e].fixed)
|
|
2960
|
+
return Se("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
2961
|
+
Ae(h.value, `${e}.${o}`, g);
|
|
2962
|
+
}, rt = (e, o) => {
|
|
2963
|
+
if (!h.value[e])
|
|
2964
|
+
return Se("setFormValue error,", `Cannot find form item with name "${e}"`);
|
|
2965
|
+
h.value[e].value = o;
|
|
2966
|
+
}, Et = (e) => {
|
|
2962
2967
|
Object.entries(e).forEach(([o, g]) => {
|
|
2963
|
-
|
|
2968
|
+
rt(o, g);
|
|
2964
2969
|
});
|
|
2965
|
-
},
|
|
2970
|
+
}, Nt = (e) => {
|
|
2966
2971
|
var o;
|
|
2967
|
-
return (o =
|
|
2968
|
-
},
|
|
2969
|
-
const o = {}, g = e ?
|
|
2970
|
-
for (const
|
|
2971
|
-
const
|
|
2972
|
-
|
|
2972
|
+
return (o = h.value[e]) == null ? void 0 : o.value;
|
|
2973
|
+
}, it = (e) => {
|
|
2974
|
+
const o = {}, g = e ? $e(h.value, xe(e)) : h.value;
|
|
2975
|
+
for (const I in g) {
|
|
2976
|
+
const w = g[I];
|
|
2977
|
+
w._selected && (o[I] = de(w.value));
|
|
2973
2978
|
}
|
|
2974
2979
|
return o;
|
|
2975
|
-
},
|
|
2976
|
-
|
|
2977
|
-
},
|
|
2978
|
-
|
|
2980
|
+
}, Ot = () => W.dataSource, Rt = (e) => {
|
|
2981
|
+
W.dataSource = e;
|
|
2982
|
+
}, Dt = (e, o) => {
|
|
2983
|
+
W.dataSource[e] = o;
|
|
2979
2984
|
}, Qe = {
|
|
2980
2985
|
getFormItem(e) {
|
|
2981
|
-
return u.value ? u.value.getFormItem(e) :
|
|
2986
|
+
return u.value ? u.value.getFormItem(e) : Pe(e);
|
|
2982
2987
|
},
|
|
2983
2988
|
setFormItem(e, o, g) {
|
|
2984
|
-
u.value ? u.value.setFormItem(e, o, g) :
|
|
2989
|
+
u.value ? u.value.setFormItem(e, o, g) : ge(e, o, g);
|
|
2985
2990
|
},
|
|
2986
2991
|
getFormValues(e) {
|
|
2987
|
-
return u.value ? u.value.getFormValues(e) :
|
|
2992
|
+
return u.value ? u.value.getFormValues(e) : it(e);
|
|
2988
2993
|
},
|
|
2989
2994
|
setFormValues(e) {
|
|
2990
|
-
u.value ? u.value.setFormValues(e) :
|
|
2995
|
+
u.value ? u.value.setFormValues(e) : Et(e);
|
|
2991
2996
|
},
|
|
2992
2997
|
getFormValue(e) {
|
|
2993
|
-
return u.value ? u.value.getFormValue(e) :
|
|
2998
|
+
return u.value ? u.value.getFormValue(e) : Nt(e);
|
|
2994
2999
|
},
|
|
2995
3000
|
setFormValue(e, o) {
|
|
2996
|
-
u.value ? u.value.setFormValue(e, o) :
|
|
3001
|
+
u.value ? u.value.setFormValue(e, o) : rt(e, o);
|
|
2997
3002
|
}
|
|
2998
3003
|
}, Ke = {
|
|
2999
|
-
getTableData:
|
|
3000
|
-
setTableData:
|
|
3001
|
-
setTableDataItem:
|
|
3002
|
-
onRefresh:
|
|
3003
|
-
},
|
|
3004
|
+
getTableData: Ot,
|
|
3005
|
+
setTableData: Rt,
|
|
3006
|
+
setTableDataItem: Dt,
|
|
3007
|
+
onRefresh: z
|
|
3008
|
+
}, zt = {
|
|
3004
3009
|
...Qe,
|
|
3005
3010
|
...Ke,
|
|
3006
|
-
onRefresh:
|
|
3011
|
+
onRefresh: z,
|
|
3007
3012
|
isInitialized: l
|
|
3008
3013
|
};
|
|
3009
|
-
a(
|
|
3014
|
+
a(zt), _e(() => [...t.refreshDeps], z, {
|
|
3010
3015
|
deep: !0,
|
|
3011
3016
|
immediate: !0
|
|
3012
|
-
}),
|
|
3013
|
-
() =>
|
|
3017
|
+
}), _e(
|
|
3018
|
+
() => t.enableScene,
|
|
3014
3019
|
(e) => {
|
|
3015
3020
|
if (e)
|
|
3016
|
-
|
|
3021
|
+
ae();
|
|
3017
3022
|
else {
|
|
3018
|
-
const o = Object.values(
|
|
3023
|
+
const o = Object.values(h.value).filter((g) => g.visible !== !1).map((g) => ({
|
|
3019
3024
|
name: g.name,
|
|
3020
3025
|
value: g.value ?? g._defaultValue,
|
|
3021
3026
|
type: g.type
|
|
3022
3027
|
}));
|
|
3023
|
-
|
|
3028
|
+
y(o);
|
|
3024
3029
|
}
|
|
3025
3030
|
},
|
|
3026
3031
|
{
|
|
3027
3032
|
immediate: !0
|
|
3028
3033
|
}
|
|
3029
|
-
),
|
|
3030
|
-
() =>
|
|
3034
|
+
), _e(
|
|
3035
|
+
() => t.sortable,
|
|
3031
3036
|
(e) => {
|
|
3032
|
-
e &&
|
|
3037
|
+
e && oe();
|
|
3033
3038
|
},
|
|
3034
3039
|
{
|
|
3035
3040
|
immediate: !0
|
|
3036
3041
|
}
|
|
3037
|
-
),
|
|
3038
|
-
|
|
3042
|
+
), en(async () => {
|
|
3043
|
+
t.enableScene ? await ae() : V(), l.value = !0;
|
|
3039
3044
|
});
|
|
3040
|
-
const
|
|
3045
|
+
const qt = {
|
|
3041
3046
|
token: {
|
|
3042
3047
|
borderRadius: 2
|
|
3043
3048
|
}
|
|
3044
3049
|
};
|
|
3045
3050
|
return (e, o) => {
|
|
3046
|
-
const g =
|
|
3047
|
-
return b(), E(
|
|
3048
|
-
locale:
|
|
3049
|
-
theme:
|
|
3051
|
+
const g = x("a-form-item"), I = x("a-button"), w = x("a-select"), O = x("a-divider"), ye = x("a-space"), Je = x("a-form"), Re = x("a-typography-text"), Yt = x("a-tooltip"), Ht = x("a-table"), Vt = x("a-config-provider");
|
|
3052
|
+
return b(), E(Vt, {
|
|
3053
|
+
locale: c(Bt),
|
|
3054
|
+
theme: qt
|
|
3050
3055
|
}, {
|
|
3051
|
-
default:
|
|
3052
|
-
|
|
3053
|
-
class:
|
|
3054
|
-
style: X(
|
|
3056
|
+
default: m(() => [
|
|
3057
|
+
D("div", {
|
|
3058
|
+
class: d([e.$style.superTable, "antd-super-table"]),
|
|
3059
|
+
style: X(n.wrapperStyle)
|
|
3055
3060
|
}, [
|
|
3056
|
-
|
|
3057
|
-
class:
|
|
3061
|
+
D("div", {
|
|
3062
|
+
class: d(e.$style.querySection)
|
|
3058
3063
|
}, [
|
|
3059
|
-
|
|
3064
|
+
n.enableScene ? (b(), q("div", {
|
|
3060
3065
|
key: 0,
|
|
3061
|
-
class:
|
|
3066
|
+
class: d(e.$style.sceneHeader)
|
|
3062
3067
|
}, [
|
|
3063
|
-
|
|
3064
|
-
class:
|
|
3068
|
+
D("div", {
|
|
3069
|
+
class: d(e.$style.sceneFormWrapper)
|
|
3065
3070
|
}, [
|
|
3066
|
-
|
|
3071
|
+
p(Je, {
|
|
3067
3072
|
layout: "inline",
|
|
3068
|
-
class:
|
|
3073
|
+
class: d(e.$style.sceneForm)
|
|
3069
3074
|
}, {
|
|
3070
|
-
default:
|
|
3075
|
+
default: m(() => [
|
|
3071
3076
|
e.$slots.sceneAddonBefore ? (b(), E(g, { key: 0 }, {
|
|
3072
|
-
default:
|
|
3073
|
-
|
|
3077
|
+
default: m(() => [
|
|
3078
|
+
me(e.$slots, "sceneAddonBefore")
|
|
3074
3079
|
]),
|
|
3075
3080
|
_: 3
|
|
3076
3081
|
})) : A("", !0),
|
|
3077
|
-
|
|
3078
|
-
default:
|
|
3079
|
-
|
|
3080
|
-
value:
|
|
3081
|
-
"onUpdate:value": o[1] || (o[1] = (Z) =>
|
|
3082
|
-
class:
|
|
3082
|
+
p(g, { label: "场景选择" }, {
|
|
3083
|
+
default: m(() => [
|
|
3084
|
+
p(w, {
|
|
3085
|
+
value: c(s).sceneCode,
|
|
3086
|
+
"onUpdate:value": o[1] || (o[1] = (Z) => c(s).sceneCode = Z),
|
|
3087
|
+
class: d(e.$style.sceneSelect),
|
|
3083
3088
|
placeholder: "请选择",
|
|
3084
3089
|
"allow-clear": "",
|
|
3085
3090
|
"show-search": "",
|
|
3086
3091
|
"option-filter-prop": "name",
|
|
3087
|
-
options: [...
|
|
3092
|
+
options: [...J.value, ...L.list],
|
|
3088
3093
|
"field-names": { value: "code", label: "name" },
|
|
3089
|
-
open:
|
|
3090
|
-
loading:
|
|
3091
|
-
onChange:
|
|
3092
|
-
onDropdownVisibleChange: o[2] || (o[2] = (Z) =>
|
|
3094
|
+
open: F.value,
|
|
3095
|
+
loading: L.loading,
|
|
3096
|
+
onChange: U,
|
|
3097
|
+
onDropdownVisibleChange: o[2] || (o[2] = (Z) => F.value = Z)
|
|
3093
3098
|
}, {
|
|
3094
|
-
dropdownRender:
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
class:
|
|
3099
|
+
dropdownRender: m(({ menuNode: Z }) => [
|
|
3100
|
+
p(c(uo), { vnodes: Z }, null, 8, ["vnodes"]),
|
|
3101
|
+
D("div", {
|
|
3102
|
+
class: d(e.$style.sceneOpBtnWrapper)
|
|
3098
3103
|
}, [
|
|
3099
|
-
|
|
3104
|
+
p(I, {
|
|
3100
3105
|
type: "link",
|
|
3101
3106
|
block: "",
|
|
3102
|
-
icon:
|
|
3103
|
-
class:
|
|
3104
|
-
disabled: !
|
|
3105
|
-
onClick: o[0] || (o[0] = (Ze) =>
|
|
3107
|
+
icon: Y(c(hn)),
|
|
3108
|
+
class: d(e.$style.sceneOpBtn),
|
|
3109
|
+
disabled: !Te.value,
|
|
3110
|
+
onClick: o[0] || (o[0] = (Ze) => Fe(c(re).create))
|
|
3106
3111
|
}, {
|
|
3107
|
-
default:
|
|
3112
|
+
default: m(() => o[5] || (o[5] = [
|
|
3108
3113
|
Q(" 新建场景 ")
|
|
3109
3114
|
])),
|
|
3110
3115
|
_: 1
|
|
3111
3116
|
}, 8, ["icon", "class", "disabled"]),
|
|
3112
|
-
|
|
3117
|
+
p(I, {
|
|
3113
3118
|
type: "link",
|
|
3114
3119
|
block: "",
|
|
3115
|
-
icon:
|
|
3116
|
-
class:
|
|
3117
|
-
onClick:
|
|
3120
|
+
icon: Y(c(_n)),
|
|
3121
|
+
class: d(e.$style.sceneOpBtn),
|
|
3122
|
+
onClick: Ge
|
|
3118
3123
|
}, {
|
|
3119
|
-
default:
|
|
3124
|
+
default: m(() => o[6] || (o[6] = [
|
|
3120
3125
|
Q(" 场景管理 ")
|
|
3121
3126
|
])),
|
|
3122
3127
|
_: 1
|
|
@@ -3128,32 +3133,32 @@ const De = 2e3, Bl = (t) => {
|
|
|
3128
3133
|
]),
|
|
3129
3134
|
_: 1
|
|
3130
3135
|
}),
|
|
3131
|
-
|
|
3132
|
-
default:
|
|
3133
|
-
|
|
3134
|
-
split:
|
|
3135
|
-
|
|
3136
|
+
p(g, null, {
|
|
3137
|
+
default: m(() => [
|
|
3138
|
+
p(ye, null, {
|
|
3139
|
+
split: m(() => [
|
|
3140
|
+
p(O, { type: "vertical" })
|
|
3136
3141
|
]),
|
|
3137
|
-
default:
|
|
3138
|
-
|
|
3142
|
+
default: m(() => [
|
|
3143
|
+
p(I, {
|
|
3139
3144
|
type: "primary",
|
|
3140
|
-
icon:
|
|
3141
|
-
onClick: o[3] || (o[3] = (Z) =>
|
|
3145
|
+
icon: Y(c(Cn)),
|
|
3146
|
+
onClick: o[3] || (o[3] = (Z) => Fe(c(re).search))
|
|
3142
3147
|
}, {
|
|
3143
|
-
default:
|
|
3148
|
+
default: m(() => o[7] || (o[7] = [
|
|
3144
3149
|
Q(" 高级筛选 ")
|
|
3145
3150
|
])),
|
|
3146
3151
|
_: 1
|
|
3147
3152
|
}, 8, ["icon"]),
|
|
3148
|
-
|
|
3153
|
+
n.showRefreshButton ? (b(), E(I, {
|
|
3149
3154
|
key: 0,
|
|
3150
3155
|
type: "primary",
|
|
3151
3156
|
ghost: "",
|
|
3152
|
-
icon:
|
|
3153
|
-
loading:
|
|
3154
|
-
onClick:
|
|
3157
|
+
icon: Y(c($n)),
|
|
3158
|
+
loading: W.loading,
|
|
3159
|
+
onClick: z
|
|
3155
3160
|
}, {
|
|
3156
|
-
default:
|
|
3161
|
+
default: m(() => o[8] || (o[8] = [
|
|
3157
3162
|
Q(" 刷新 ")
|
|
3158
3163
|
])),
|
|
3159
3164
|
_: 1
|
|
@@ -3165,8 +3170,8 @@ const De = 2e3, Bl = (t) => {
|
|
|
3165
3170
|
_: 1
|
|
3166
3171
|
}),
|
|
3167
3172
|
e.$slots.sceneAddonAfter ? (b(), E(g, { key: 1 }, {
|
|
3168
|
-
default:
|
|
3169
|
-
|
|
3173
|
+
default: m(() => [
|
|
3174
|
+
me(e.$slots, "sceneAddonAfter")
|
|
3170
3175
|
]),
|
|
3171
3176
|
_: 3
|
|
3172
3177
|
})) : A("", !0)
|
|
@@ -3174,114 +3179,114 @@ const De = 2e3, Bl = (t) => {
|
|
|
3174
3179
|
_: 3
|
|
3175
3180
|
}, 8, ["class"])
|
|
3176
3181
|
], 2),
|
|
3177
|
-
e.$slots.extra ? (b(),
|
|
3182
|
+
e.$slots.extra ? (b(), q("div", {
|
|
3178
3183
|
key: 0,
|
|
3179
|
-
class:
|
|
3184
|
+
class: d(e.$style.sceneExtra)
|
|
3180
3185
|
}, [
|
|
3181
|
-
|
|
3186
|
+
me(e.$slots, "extra")
|
|
3182
3187
|
], 2)) : A("", !0)
|
|
3183
3188
|
], 2)) : A("", !0),
|
|
3184
|
-
|
|
3185
|
-
"form-config-map":
|
|
3186
|
-
"form-item-col-span":
|
|
3187
|
-
"enable-scene":
|
|
3188
|
-
"show-reset-button":
|
|
3189
|
-
"show-expand-button":
|
|
3190
|
-
loading: !!
|
|
3191
|
-
"super-table-i-d":
|
|
3192
|
-
onFormItemChange:
|
|
3193
|
-
onSearch:
|
|
3194
|
-
onReset:
|
|
3189
|
+
p(Pl, {
|
|
3190
|
+
"form-config-map": h.value,
|
|
3191
|
+
"form-item-col-span": n.formItemColSpan,
|
|
3192
|
+
"enable-scene": n.enableScene,
|
|
3193
|
+
"show-reset-button": n.showResetButton && !n.enableScene,
|
|
3194
|
+
"show-expand-button": n.showExpandButton,
|
|
3195
|
+
loading: !!W.loading,
|
|
3196
|
+
"super-table-i-d": c(k),
|
|
3197
|
+
onFormItemChange: ce,
|
|
3198
|
+
onSearch: z,
|
|
3199
|
+
onReset: Ue
|
|
3195
3200
|
}, null, 8, ["form-config-map", "form-item-col-span", "enable-scene", "show-reset-button", "show-expand-button", "loading", "super-table-i-d"])
|
|
3196
3201
|
], 2),
|
|
3197
|
-
|
|
3198
|
-
class:
|
|
3199
|
-
style: X(
|
|
3202
|
+
D("div", {
|
|
3203
|
+
class: d(e.$style.tableWrapper),
|
|
3204
|
+
style: X(n.tableWrapperStyle)
|
|
3200
3205
|
}, [
|
|
3201
|
-
e.$slots.tableHead || e.$slots.toolBarExtra ? (b(),
|
|
3206
|
+
e.$slots.tableHead || e.$slots.toolBarExtra ? (b(), q("div", {
|
|
3202
3207
|
key: 0,
|
|
3203
|
-
class:
|
|
3208
|
+
class: d(e.$style.toolbar)
|
|
3204
3209
|
}, [
|
|
3205
|
-
|
|
3206
|
-
class:
|
|
3210
|
+
D("div", {
|
|
3211
|
+
class: d(e.$style.tableHeadWrapper)
|
|
3207
3212
|
}, [
|
|
3208
|
-
|
|
3213
|
+
me(e.$slots, "tableHead")
|
|
3209
3214
|
], 2),
|
|
3210
|
-
e.$slots.toolBarExtra ? (b(),
|
|
3215
|
+
e.$slots.toolBarExtra ? (b(), q("div", {
|
|
3211
3216
|
key: 0,
|
|
3212
|
-
class:
|
|
3217
|
+
class: d(e.$style.actionBtns)
|
|
3213
3218
|
}, [
|
|
3214
|
-
|
|
3219
|
+
me(e.$slots, "toolBarExtra")
|
|
3215
3220
|
], 2)) : A("", !0)
|
|
3216
3221
|
], 2)) : A("", !0),
|
|
3217
|
-
|
|
3218
|
-
class:
|
|
3222
|
+
D("div", {
|
|
3223
|
+
class: d(e.$style.tableContent)
|
|
3219
3224
|
}, [
|
|
3220
|
-
|
|
3225
|
+
n.enableTableConfig ? (b(), E(Fo, {
|
|
3221
3226
|
key: 0,
|
|
3222
|
-
columns:
|
|
3223
|
-
onChange:
|
|
3227
|
+
columns: S.value,
|
|
3228
|
+
onChange: j
|
|
3224
3229
|
}, null, 8, ["columns"])) : A("", !0),
|
|
3225
|
-
|
|
3230
|
+
p(Ht, le({
|
|
3226
3231
|
ref_key: "tableRef",
|
|
3227
|
-
ref:
|
|
3232
|
+
ref: ne
|
|
3228
3233
|
}, {
|
|
3229
|
-
...
|
|
3230
|
-
dataSource:
|
|
3231
|
-
}, { onResizeColumn:
|
|
3232
|
-
headerCell:
|
|
3233
|
-
Z.class !== "ant-table-row-expand-icon-cell" ? (b(),
|
|
3234
|
+
...W,
|
|
3235
|
+
dataSource: Ne.value
|
|
3236
|
+
}, { onResizeColumn: _ }), tn({
|
|
3237
|
+
headerCell: m(({ column: Z }) => [
|
|
3238
|
+
Z.class !== "ant-table-row-expand-icon-cell" ? (b(), q("div", {
|
|
3234
3239
|
key: 0,
|
|
3235
|
-
class:
|
|
3240
|
+
class: d(e.$style.headerCell)
|
|
3236
3241
|
}, [
|
|
3237
|
-
|
|
3242
|
+
p(Re, {
|
|
3238
3243
|
ellipsis: { tooltip: Z.title },
|
|
3239
3244
|
content: Z.title,
|
|
3240
|
-
class:
|
|
3245
|
+
class: d(e.$style.headerCellText)
|
|
3241
3246
|
}, null, 8, ["ellipsis", "content", "class"]),
|
|
3242
|
-
Z.titleTooltip ? (b(), E(
|
|
3243
|
-
title:
|
|
3244
|
-
|
|
3247
|
+
Z.titleTooltip ? (b(), E(Yt, { key: 0 }, {
|
|
3248
|
+
title: m(() => [
|
|
3249
|
+
D("span", {
|
|
3245
3250
|
innerHTML: Z.titleTooltip
|
|
3246
|
-
}, null, 8,
|
|
3251
|
+
}, null, 8, jl)
|
|
3247
3252
|
]),
|
|
3248
|
-
default:
|
|
3249
|
-
|
|
3250
|
-
style: X({ color:
|
|
3251
|
-
class:
|
|
3253
|
+
default: m(() => [
|
|
3254
|
+
p(c(Sn), {
|
|
3255
|
+
style: X({ color: c(te).colorTextQuaternary }),
|
|
3256
|
+
class: d(e.$style.headerCellTooltipIcon)
|
|
3252
3257
|
}, null, 8, ["style", "class"])
|
|
3253
3258
|
]),
|
|
3254
3259
|
_: 2
|
|
3255
3260
|
}, 1024)) : A("", !0)
|
|
3256
3261
|
], 2)) : A("", !0)
|
|
3257
3262
|
]),
|
|
3258
|
-
bodyCell:
|
|
3259
|
-
|
|
3263
|
+
bodyCell: m(({ column: Z, record: Ze, index: dt }) => [
|
|
3264
|
+
wt([Oe(Ze), Z == null ? void 0 : Z.key, dt], () => p(io, {
|
|
3260
3265
|
column: Z,
|
|
3261
3266
|
record: Ze,
|
|
3262
|
-
index:
|
|
3263
|
-
hasRouter:
|
|
3267
|
+
index: dt,
|
|
3268
|
+
hasRouter: f.value
|
|
3264
3269
|
}, null, 8, ["column", "record", "index", "hasRouter"]), o, 4)
|
|
3265
3270
|
]),
|
|
3266
|
-
default:
|
|
3267
|
-
e.$slots.expandColumnTitle ?
|
|
3271
|
+
default: m(() => [
|
|
3272
|
+
e.$slots.expandColumnTitle ? me(e.$slots, "expandColumnTitle", { key: 0 }) : A("", !0)
|
|
3268
3273
|
]),
|
|
3269
3274
|
_: 2
|
|
3270
3275
|
}, [
|
|
3271
3276
|
e.$slots.expandedRowRender ? {
|
|
3272
3277
|
name: "expandedRowRender",
|
|
3273
|
-
fn:
|
|
3274
|
-
|
|
3278
|
+
fn: m(({ record: Z }) => [
|
|
3279
|
+
me(e.$slots, "expandedRowRender", { record: Z })
|
|
3275
3280
|
]),
|
|
3276
3281
|
key: "0"
|
|
3277
3282
|
} : void 0
|
|
3278
3283
|
]), 1040)
|
|
3279
3284
|
], 2),
|
|
3280
|
-
e.$slots.tableFoot ? (b(),
|
|
3285
|
+
e.$slots.tableFoot ? (b(), q("div", {
|
|
3281
3286
|
key: 1,
|
|
3282
|
-
class:
|
|
3287
|
+
class: d(e.$style.tableFootWrapper)
|
|
3283
3288
|
}, [
|
|
3284
|
-
|
|
3289
|
+
me(e.$slots, "tableFoot")
|
|
3285
3290
|
], 2)) : A("", !0)
|
|
3286
3291
|
], 6)
|
|
3287
3292
|
], 6)
|
|
@@ -3290,33 +3295,33 @@ const De = 2e3, Bl = (t) => {
|
|
|
3290
3295
|
}, 8, ["locale"]);
|
|
3291
3296
|
};
|
|
3292
3297
|
}
|
|
3293
|
-
}),
|
|
3294
|
-
superTable:
|
|
3295
|
-
querySection:
|
|
3296
|
-
sceneHeader:
|
|
3297
|
-
sceneFormWrapper:
|
|
3298
|
-
sceneForm:
|
|
3299
|
-
sceneSelect:
|
|
3300
|
-
sceneExtra:
|
|
3301
|
-
tableWrapper:
|
|
3302
|
-
toolbar:
|
|
3303
|
-
actionBtns:
|
|
3304
|
-
tableHeadWrapper:
|
|
3305
|
-
tableContent:
|
|
3306
|
-
headerCell:
|
|
3307
|
-
headerCellText:
|
|
3308
|
-
headerCellTooltipIcon:
|
|
3309
|
-
sceneOpBtnWrapper:
|
|
3310
|
-
sceneOpBtn:
|
|
3311
|
-
},
|
|
3312
|
-
$style:
|
|
3313
|
-
},
|
|
3314
|
-
|
|
3315
|
-
|
|
3298
|
+
}), El = "_superTable_1jyjb_1", Nl = "_querySection_1jyjb_1", Ol = "_sceneHeader_1jyjb_1", Rl = "_sceneFormWrapper_1jyjb_7", Dl = "_sceneForm_1jyjb_7", zl = "_sceneSelect_1jyjb_13", ql = "_sceneExtra_1jyjb_16", Yl = "_tableWrapper_1jyjb_19", Hl = "_toolbar_1jyjb_23", Vl = "_actionBtns_1jyjb_30", Wl = "_tableHeadWrapper_1jyjb_35", Ul = "_tableContent_1jyjb_38", Gl = "_headerCell_1jyjb_41", Ql = "_headerCellText_1jyjb_46", Kl = "_headerCellTooltipIcon_1jyjb_49", Jl = "_sceneOpBtnWrapper_1jyjb_53", Zl = "_sceneOpBtn_1jyjb_53", Xl = {
|
|
3299
|
+
superTable: El,
|
|
3300
|
+
querySection: Nl,
|
|
3301
|
+
sceneHeader: Ol,
|
|
3302
|
+
sceneFormWrapper: Rl,
|
|
3303
|
+
sceneForm: Dl,
|
|
3304
|
+
sceneSelect: zl,
|
|
3305
|
+
sceneExtra: ql,
|
|
3306
|
+
tableWrapper: Yl,
|
|
3307
|
+
toolbar: Hl,
|
|
3308
|
+
actionBtns: Vl,
|
|
3309
|
+
tableHeadWrapper: Wl,
|
|
3310
|
+
tableContent: Ul,
|
|
3311
|
+
headerCell: Gl,
|
|
3312
|
+
headerCellText: Ql,
|
|
3313
|
+
headerCellTooltipIcon: Kl,
|
|
3314
|
+
sceneOpBtnWrapper: Jl,
|
|
3315
|
+
sceneOpBtn: Zl
|
|
3316
|
+
}, ea = {
|
|
3317
|
+
$style: Xl
|
|
3318
|
+
}, kt = /* @__PURE__ */ fe(Al, [["__cssModules", ea]]);
|
|
3319
|
+
kt.install = (n) => {
|
|
3320
|
+
n.component("SuperTable", kt);
|
|
3316
3321
|
};
|
|
3317
3322
|
export {
|
|
3318
|
-
|
|
3323
|
+
No as DynamicList,
|
|
3319
3324
|
H as SuperTableColumnTypeEnum,
|
|
3320
3325
|
G as SuperTableFormItemTypeEnum,
|
|
3321
|
-
|
|
3326
|
+
kt as default
|
|
3322
3327
|
};
|