sun-biz 0.0.4-beta.37 → 0.0.4-beta.39
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/components/index.js +172 -33
- package/dist/components/patient-access/api.d.ts +1 -0
- package/dist/components/static/css/index.css +20 -0
- package/dist/components/table-select/composable/useDirectionKey.d.ts +7 -0
- package/dist/components/table-select/index.d.ts +4 -0
- package/dist/components/table-select/types/index.d.ts +95 -0
- package/dist/hooks/index.js +9 -1
- package/dist/hooks/use-editable-table/index.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +545 -33
- package/dist/static/css/index.css +20 -0
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_js_pinyin__ from "js-pinyin";
|
|
|
12
12
|
import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
|
|
13
13
|
import * as __WEBPACK_EXTERNAL_MODULE_i18next_vue__ from "i18next-vue";
|
|
14
14
|
var __webpack_modules__ = {
|
|
15
|
-
"./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.
|
|
15
|
+
"./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.18_typescript@5.9.2__webpack@5.101.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js": function(__unused_webpack_module, exports) {
|
|
16
16
|
// runtime helper for setting properties on components
|
|
17
17
|
// in a tree-shakable way
|
|
18
18
|
exports["default"] = (sfc, props)=>{
|
|
@@ -72,8 +72,8 @@ function __webpack_require__(moduleId) {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
// EXTERNAL MODULE: ./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.
|
|
76
|
-
var exportHelper = __webpack_require__("./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.
|
|
75
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.18_typescript@5.9.2__webpack@5.101.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js
|
|
76
|
+
var exportHelper = __webpack_require__("./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.18_typescript@5.9.2__webpack@5.101.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js");
|
|
77
77
|
const __exports__ = /*#__PURE__*/ (0, exportHelper["default"])(Containervue_type_script_setup_true_lang_tsx, [
|
|
78
78
|
[
|
|
79
79
|
'__scopeId',
|
|
@@ -657,10 +657,10 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
657
657
|
}, [
|
|
658
658
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
|
|
659
659
|
class: `sort-caret ascending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES ? '!border-b-blue-500' : ''}`
|
|
660
|
-
}, null),
|
|
660
|
+
}, null, 2),
|
|
661
661
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
|
|
662
662
|
class: `sort-caret descending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO ? '!border-t-blue-500' : ''}`
|
|
663
|
-
}, null)
|
|
663
|
+
}, null, 2)
|
|
664
664
|
])
|
|
665
665
|
], 8, [
|
|
666
666
|
"onClick"
|
|
@@ -991,7 +991,7 @@ const _hoisted_3 = {
|
|
|
991
991
|
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
992
992
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, null, {
|
|
993
993
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
994
|
-
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("组合排序 ")),
|
|
994
|
+
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("组合排序 ", -1)),
|
|
995
995
|
isSHow.value ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_1, [
|
|
996
996
|
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(tableData.value.filter((item)=>item?.ascendFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG).NO || item?.ascendFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG).YES), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_tag, {
|
|
997
997
|
hit: false,
|
|
@@ -1031,7 +1031,10 @@ const _hoisted_3 = {
|
|
|
1031
1031
|
]))), 128))
|
|
1032
1032
|
]))
|
|
1033
1033
|
]),
|
|
1034
|
-
_: 1
|
|
1034
|
+
_: 1,
|
|
1035
|
+
__: [
|
|
1036
|
+
0
|
|
1037
|
+
]
|
|
1035
1038
|
})
|
|
1036
1039
|
]),
|
|
1037
1040
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -1047,7 +1050,7 @@ const _hoisted_3 = {
|
|
|
1047
1050
|
]),
|
|
1048
1051
|
_: 1
|
|
1049
1052
|
}),
|
|
1050
|
-
_cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("请根据以下规则编辑排序条件 "))
|
|
1053
|
+
_cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("请根据以下规则编辑排序条件 ", -1))
|
|
1051
1054
|
]),
|
|
1052
1055
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(pro_table, {
|
|
1053
1056
|
onDragEnd: handleSortEnd,
|
|
@@ -1068,9 +1071,12 @@ const _hoisted_3 = {
|
|
|
1068
1071
|
onClick: confirm
|
|
1069
1072
|
}, {
|
|
1070
1073
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[2] || (_cache[2] = [
|
|
1071
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 关闭 ")
|
|
1074
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 关闭 ", -1)
|
|
1072
1075
|
])),
|
|
1073
|
-
_: 1
|
|
1076
|
+
_: 1,
|
|
1077
|
+
__: [
|
|
1078
|
+
2
|
|
1079
|
+
]
|
|
1074
1080
|
})
|
|
1075
1081
|
])
|
|
1076
1082
|
]),
|
|
@@ -1688,9 +1694,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1688
1694
|
onClick: handleCancel
|
|
1689
1695
|
}, {
|
|
1690
1696
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[7] || (_cache[7] = [
|
|
1691
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
|
|
1697
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消", -1)
|
|
1692
1698
|
])),
|
|
1693
|
-
_: 1
|
|
1699
|
+
_: 1,
|
|
1700
|
+
__: [
|
|
1701
|
+
7
|
|
1702
|
+
]
|
|
1694
1703
|
}),
|
|
1695
1704
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
1696
1705
|
type: "primary",
|
|
@@ -1702,9 +1711,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1702
1711
|
})
|
|
1703
1712
|
}, {
|
|
1704
1713
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[8] || (_cache[8] = [
|
|
1705
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用")
|
|
1714
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用", -1)
|
|
1706
1715
|
])),
|
|
1707
|
-
_: 1
|
|
1716
|
+
_: 1,
|
|
1717
|
+
__: [
|
|
1718
|
+
8
|
|
1719
|
+
]
|
|
1708
1720
|
}, 8, [
|
|
1709
1721
|
"loading",
|
|
1710
1722
|
"disabled"
|
|
@@ -1718,9 +1730,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1718
1730
|
})
|
|
1719
1731
|
}, {
|
|
1720
1732
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[9] || (_cache[9] = [
|
|
1721
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ")
|
|
1733
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ", -1)
|
|
1722
1734
|
])),
|
|
1723
|
-
_: 1
|
|
1735
|
+
_: 1,
|
|
1736
|
+
__: [
|
|
1737
|
+
9
|
|
1738
|
+
]
|
|
1724
1739
|
}, 8, [
|
|
1725
1740
|
"loading",
|
|
1726
1741
|
"disabled"
|
|
@@ -2820,6 +2835,10 @@ const SELECTION = 'selection';
|
|
|
2820
2835
|
const validateProps = props.columns.filter((item)=>item.rules).map((item)=>`tableData.${index}.${item.prop}`);
|
|
2821
2836
|
return formRef.value.validateField(validateProps, callback);
|
|
2822
2837
|
},
|
|
2838
|
+
clearValidateRow: (index)=>{
|
|
2839
|
+
const validateProps = props.columns.filter((item)=>item.rules).map((item)=>`tableData.${index}.${item.prop}`);
|
|
2840
|
+
return formRef.value.clearValidate(validateProps);
|
|
2841
|
+
},
|
|
2823
2842
|
fetchList: (init = true, initPageInfo = {
|
|
2824
2843
|
pageNumber: 1
|
|
2825
2844
|
})=>{
|
|
@@ -4130,6 +4149,13 @@ function useSelectByDirectionEvent(options) {
|
|
|
4130
4149
|
}
|
|
4131
4150
|
};
|
|
4132
4151
|
/**
|
|
4152
|
+
* 清理行数据验证信息
|
|
4153
|
+
*/ const clearValidateItem = (row)=>{
|
|
4154
|
+
const cacheKey = getRowKey(row);
|
|
4155
|
+
const index = tableData.value.findIndex((item)=>item[cacheKey] === row[cacheKey]);
|
|
4156
|
+
tableRef?.value?.clearValidateRow(index);
|
|
4157
|
+
};
|
|
4158
|
+
/**
|
|
4133
4159
|
* 切换编辑状态
|
|
4134
4160
|
*/ const toggleEdit = async (row)=>{
|
|
4135
4161
|
const cacheKey = getRowKey(row);
|
|
@@ -4200,7 +4226,8 @@ function useSelectByDirectionEvent(options) {
|
|
|
4200
4226
|
delItem,
|
|
4201
4227
|
insertItem,
|
|
4202
4228
|
updateItem,
|
|
4203
|
-
validateItem
|
|
4229
|
+
validateItem,
|
|
4230
|
+
clearValidateItem
|
|
4204
4231
|
};
|
|
4205
4232
|
}
|
|
4206
4233
|
function useDataChangeDetector(sources, options) {
|
|
@@ -4358,7 +4385,7 @@ const icon_combine_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(script,
|
|
|
4358
4385
|
const columns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>__props.accessResult.columns.filter((item)=>item.display === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG_STR.YES).map((item)=>({
|
|
4359
4386
|
...item,
|
|
4360
4387
|
label: item.title,
|
|
4361
|
-
minWidth: 110,
|
|
4388
|
+
minWidth: item?.displayWidth || 110,
|
|
4362
4389
|
prop: item.dataIndex,
|
|
4363
4390
|
...__props.isPatientAccess && 'patientName' === item.dataIndex && {
|
|
4364
4391
|
render: (row)=>row?.patMainRecordId && row?.patientId !== row?.patMainRecordId ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("div", {
|
|
@@ -7167,7 +7194,7 @@ const print = async (params)=>{
|
|
|
7167
7194
|
class: "min-w-[50px]"
|
|
7168
7195
|
}, {
|
|
7169
7196
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7170
|
-
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 打印 ")),
|
|
7197
|
+
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 打印 ", -1)),
|
|
7171
7198
|
showReceipt.value && !_ctx.disabled ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), {
|
|
7172
7199
|
key: 0,
|
|
7173
7200
|
class: "el-icon--right"
|
|
@@ -7178,7 +7205,10 @@ const print = async (params)=>{
|
|
|
7178
7205
|
_: 1
|
|
7179
7206
|
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
7180
7207
|
]),
|
|
7181
|
-
_: 1
|
|
7208
|
+
_: 1,
|
|
7209
|
+
__: [
|
|
7210
|
+
0
|
|
7211
|
+
]
|
|
7182
7212
|
}, 8, [
|
|
7183
7213
|
"type",
|
|
7184
7214
|
"disabled"
|
|
@@ -8088,7 +8118,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8088
8118
|
]
|
|
8089
8119
|
});
|
|
8090
8120
|
const getRowClassName = (data)=>{
|
|
8091
|
-
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
|
|
8121
|
+
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
|
|
8092
8122
|
return 'cursor-pointer';
|
|
8093
8123
|
};
|
|
8094
8124
|
const getBizUnitList = async (data)=>{
|
|
@@ -8504,7 +8534,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8504
8534
|
]
|
|
8505
8535
|
});
|
|
8506
8536
|
const getRowClassName = (data)=>{
|
|
8507
|
-
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
|
|
8537
|
+
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
|
|
8508
8538
|
return 'cursor-pointer';
|
|
8509
8539
|
};
|
|
8510
8540
|
const getDepartmentList = async (data)=>{
|
|
@@ -8930,7 +8960,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8930
8960
|
]
|
|
8931
8961
|
});
|
|
8932
8962
|
const getRowClassName = (data)=>{
|
|
8933
|
-
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
|
|
8963
|
+
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
|
|
8934
8964
|
return 'cursor-pointer';
|
|
8935
8965
|
};
|
|
8936
8966
|
const getWardList = async (data)=>{
|
|
@@ -9509,7 +9539,8 @@ const WB_NO = "wbNo";
|
|
|
9509
9539
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
9510
9540
|
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(configData.value, (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
9511
9541
|
key: item.name + index,
|
|
9512
|
-
class: item.span || item.isFullWidth ? item.isFullWidth ? 'col-span-full' : `... col-span-${item.span}` : isInlineMode ? 'inline-block' : ''
|
|
9542
|
+
class: item.span || item.isFullWidth ? item.isFullWidth ? 'col-span-full' : `... col-span-${item.span}` : isInlineMode ? 'inline-block' : ''
|
|
9543
|
+
}, {
|
|
9513
9544
|
ref_for: true
|
|
9514
9545
|
}, item.formItemProps || {}), [
|
|
9515
9546
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_form_item, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
@@ -9517,7 +9548,8 @@ const WB_NO = "wbNo";
|
|
|
9517
9548
|
label: 'function' == typeof item.label ? '' : item.label,
|
|
9518
9549
|
prop: item.name,
|
|
9519
9550
|
class: item.className,
|
|
9520
|
-
style: isInlineMode ? 'margin-right: 16px;' : ''
|
|
9551
|
+
style: isInlineMode ? 'margin-right: 16px;' : ''
|
|
9552
|
+
}, {
|
|
9521
9553
|
ref_for: true
|
|
9522
9554
|
}, item.formItemProps || {}), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
9523
9555
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -9527,7 +9559,8 @@ const WB_NO = "wbNo";
|
|
|
9527
9559
|
type: item.type,
|
|
9528
9560
|
"support-copy-and-tips": item.supportCopyAndTips,
|
|
9529
9561
|
placeholder: item.placeholder,
|
|
9530
|
-
options: item.options
|
|
9562
|
+
options: item.options
|
|
9563
|
+
}, {
|
|
9531
9564
|
ref_for: true
|
|
9532
9565
|
}, item.extraProps || {}, {
|
|
9533
9566
|
modelValue: formModel[item.name],
|
|
@@ -9558,6 +9591,8 @@ const WB_NO = "wbNo";
|
|
|
9558
9591
|
ref_for: true,
|
|
9559
9592
|
ref_key: "itemRefs",
|
|
9560
9593
|
ref: itemRefs
|
|
9594
|
+
}, {
|
|
9595
|
+
ref_for: true
|
|
9561
9596
|
}, item.extraProps || {}, {
|
|
9562
9597
|
modelValue: formModel[item.name],
|
|
9563
9598
|
"onUpdate:modelValue": ($event)=>formModel[item.name] = $event,
|
|
@@ -9600,9 +9635,12 @@ const WB_NO = "wbNo";
|
|
|
9600
9635
|
})
|
|
9601
9636
|
}, {
|
|
9602
9637
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[1] || (_cache[1] = [
|
|
9603
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("查询")
|
|
9638
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("查询", -1)
|
|
9604
9639
|
])),
|
|
9605
|
-
_: 1
|
|
9640
|
+
_: 1,
|
|
9641
|
+
__: [
|
|
9642
|
+
1
|
|
9643
|
+
]
|
|
9606
9644
|
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
9607
9645
|
])
|
|
9608
9646
|
]),
|
|
@@ -10000,6 +10038,474 @@ const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_4 = {
|
|
|
10000
10038
|
});
|
|
10001
10039
|
const invoice_exports_ = invoicevue_type_script_setup_true_lang_ts_name_proInvoice;
|
|
10002
10040
|
/* ESM default export */ const invoice = invoice_exports_;
|
|
10041
|
+
/**
|
|
10042
|
+
* 方向键监听的 hook
|
|
10043
|
+
* @param hookActive hook是否激活
|
|
10044
|
+
* @returns
|
|
10045
|
+
*/ function useDirectionKey(hookActive, cb) {
|
|
10046
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(hookActive, (v)=>{
|
|
10047
|
+
if (v) document.addEventListener('keydown', cb);
|
|
10048
|
+
else // 移除事件监听
|
|
10049
|
+
window.removeEventListener('keydown', cb);
|
|
10050
|
+
});
|
|
10051
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
10052
|
+
console.log('useDirectionKey onBeforeUnmount');
|
|
10053
|
+
});
|
|
10054
|
+
// return {};
|
|
10055
|
+
}
|
|
10056
|
+
/**
|
|
10057
|
+
* table-select 模式枚举值
|
|
10058
|
+
*/ var types_TableSelectMode = /*#__PURE__*/ function(TableSelectMode) {
|
|
10059
|
+
TableSelectMode["Simple"] = "simple";
|
|
10060
|
+
TableSelectMode["Complex"] = "complex";
|
|
10061
|
+
return TableSelectMode;
|
|
10062
|
+
}({});
|
|
10063
|
+
const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Record_3CPropertyKey_2C_20any_3E_hoisted_1 = {
|
|
10064
|
+
class: "flex h-full flex-col"
|
|
10065
|
+
};
|
|
10066
|
+
const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Record_3CPropertyKey_2C_20any_3E_hoisted_2 = {
|
|
10067
|
+
class: "header flex items-center"
|
|
10068
|
+
};
|
|
10069
|
+
// import { detectOverflow } from '@popperjs/core';
|
|
10070
|
+
/* ESM default export */ const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Record_3CPropertyKey_2C_20any_3E = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
10071
|
+
__name: 'index',
|
|
10072
|
+
props: /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeModels)({
|
|
10073
|
+
mode: {
|
|
10074
|
+
default: 'complex'
|
|
10075
|
+
},
|
|
10076
|
+
columns: {
|
|
10077
|
+
default: ()=>[]
|
|
10078
|
+
},
|
|
10079
|
+
placeholder: {},
|
|
10080
|
+
loading: {
|
|
10081
|
+
type: Boolean,
|
|
10082
|
+
default: false
|
|
10083
|
+
},
|
|
10084
|
+
scrollLoading: {
|
|
10085
|
+
type: Boolean,
|
|
10086
|
+
default: false
|
|
10087
|
+
},
|
|
10088
|
+
immediate: {
|
|
10089
|
+
type: Boolean,
|
|
10090
|
+
default: true
|
|
10091
|
+
},
|
|
10092
|
+
popoverVisible: {
|
|
10093
|
+
type: Boolean,
|
|
10094
|
+
default: false
|
|
10095
|
+
},
|
|
10096
|
+
appendTo: {
|
|
10097
|
+
default: 'body'
|
|
10098
|
+
},
|
|
10099
|
+
multiple: {
|
|
10100
|
+
type: Boolean,
|
|
10101
|
+
default: false
|
|
10102
|
+
},
|
|
10103
|
+
placement: {
|
|
10104
|
+
default: 'bottom-start'
|
|
10105
|
+
},
|
|
10106
|
+
rowKey: {
|
|
10107
|
+
default: ()=>'id'
|
|
10108
|
+
},
|
|
10109
|
+
labelKey: {
|
|
10110
|
+
default: 'label'
|
|
10111
|
+
},
|
|
10112
|
+
componentNo: {
|
|
10113
|
+
default: void 0
|
|
10114
|
+
},
|
|
10115
|
+
currentRowKey: {
|
|
10116
|
+
default: 'id'
|
|
10117
|
+
},
|
|
10118
|
+
size: {
|
|
10119
|
+
default: 'default'
|
|
10120
|
+
},
|
|
10121
|
+
simpleConfig: {
|
|
10122
|
+
default: (props)=>'simple' === props.mode ? {
|
|
10123
|
+
showHeader: false
|
|
10124
|
+
} : {}
|
|
10125
|
+
},
|
|
10126
|
+
complexConfig: {},
|
|
10127
|
+
highlightCurrentRow: {
|
|
10128
|
+
type: Boolean,
|
|
10129
|
+
default: true
|
|
10130
|
+
},
|
|
10131
|
+
data: {
|
|
10132
|
+
default: ()=>[]
|
|
10133
|
+
},
|
|
10134
|
+
remoteMethod: {
|
|
10135
|
+
type: Function,
|
|
10136
|
+
default: void 0
|
|
10137
|
+
}
|
|
10138
|
+
}, {
|
|
10139
|
+
modelValue: {},
|
|
10140
|
+
modelModifiers: {}
|
|
10141
|
+
}),
|
|
10142
|
+
emits: /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeModels)([
|
|
10143
|
+
"nextPage"
|
|
10144
|
+
], [
|
|
10145
|
+
"update:modelValue"
|
|
10146
|
+
]),
|
|
10147
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
10148
|
+
const model = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useModel)(__props, "modelValue");
|
|
10149
|
+
const props = __props;
|
|
10150
|
+
const isSimpleMode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>'simple' === props.mode);
|
|
10151
|
+
const simpleColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
10152
|
+
if (isSimpleMode.value) return props.columns || [];
|
|
10153
|
+
return [];
|
|
10154
|
+
});
|
|
10155
|
+
const complexColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
10156
|
+
if (!isSimpleMode.value) return props.columns || [];
|
|
10157
|
+
return [];
|
|
10158
|
+
});
|
|
10159
|
+
const defaultPopperOptions = {};
|
|
10160
|
+
const emits = __emit;
|
|
10161
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useTemplateRef)('table');
|
|
10162
|
+
const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useTemplateRef)('popoverRef');
|
|
10163
|
+
const inputSearchRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useTemplateRef)('inputSearchRef');
|
|
10164
|
+
const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.popoverVisible);
|
|
10165
|
+
const inputValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
|
|
10166
|
+
const keydownIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(-1);
|
|
10167
|
+
const rowElements = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
10168
|
+
// 此处添加 props.data.length 是为了将 props.data n纳入依赖
|
|
10169
|
+
if (tableRef.value?.proTableRef && props.data.length) {
|
|
10170
|
+
const elRowSelector = '.el-table__body tbody .el-table__row';
|
|
10171
|
+
const rowElements = Array.from((tableRef.value?.proTableRef.$el).querySelectorAll(elRowSelector));
|
|
10172
|
+
console.log(rowElements.length);
|
|
10173
|
+
return rowElements;
|
|
10174
|
+
}
|
|
10175
|
+
return [];
|
|
10176
|
+
});
|
|
10177
|
+
function setCurrentRow() {
|
|
10178
|
+
const option = props.data[keydownIndex.value];
|
|
10179
|
+
if (option) tableRef.value?.proTableRef.setCurrentRow(option);
|
|
10180
|
+
}
|
|
10181
|
+
function scrollToCurrentRow() {
|
|
10182
|
+
if (rowElements.value.length) {
|
|
10183
|
+
const currentRow = rowElements.value[keydownIndex.value];
|
|
10184
|
+
if (currentRow) // 滚动到当前行
|
|
10185
|
+
currentRow.scrollIntoView({
|
|
10186
|
+
behavior: 'smooth',
|
|
10187
|
+
block: 'nearest',
|
|
10188
|
+
inline: 'start'
|
|
10189
|
+
});
|
|
10190
|
+
}
|
|
10191
|
+
}
|
|
10192
|
+
// 键盘事件处理函数
|
|
10193
|
+
const handleKeydown = (e)=>{
|
|
10194
|
+
// 处理键盘事件逻辑
|
|
10195
|
+
if ('Enter' === e.key) handleRowClick(props.data[keydownIndex.value]);
|
|
10196
|
+
else if ('ArrowUp' === e.key) {
|
|
10197
|
+
keydownIndex.value--;
|
|
10198
|
+
keydownIndex.value = Math.max(keydownIndex.value, 0);
|
|
10199
|
+
setCurrentRow();
|
|
10200
|
+
scrollToCurrentRow();
|
|
10201
|
+
} else if ('ArrowDown' === e.key) {
|
|
10202
|
+
keydownIndex.value++;
|
|
10203
|
+
keydownIndex.value = Math.min(keydownIndex.value, props.data.length - 1);
|
|
10204
|
+
setCurrentRow();
|
|
10205
|
+
scrollToCurrentRow();
|
|
10206
|
+
}
|
|
10207
|
+
};
|
|
10208
|
+
if (props.mode === types_TableSelectMode.Complex) useDirectionKey(popoverVisible, handleKeydown);
|
|
10209
|
+
// function setHightLight(row: T) {
|
|
10210
|
+
// tableRef.value?.proTableRef.setCurrentRow(row);
|
|
10211
|
+
// }
|
|
10212
|
+
function cancelHightLight() {
|
|
10213
|
+
tableRef.value?.proTableRef.setCurrentRow(void 0);
|
|
10214
|
+
}
|
|
10215
|
+
/**
|
|
10216
|
+
* 重置
|
|
10217
|
+
*/ function reset() {
|
|
10218
|
+
inputValue.value = '';
|
|
10219
|
+
model.value = void 0;
|
|
10220
|
+
}
|
|
10221
|
+
/**
|
|
10222
|
+
* 聚焦事件
|
|
10223
|
+
*/ function focus() {
|
|
10224
|
+
console.log('table-select focus');
|
|
10225
|
+
toggleVisible();
|
|
10226
|
+
}
|
|
10227
|
+
/**
|
|
10228
|
+
* 点击行
|
|
10229
|
+
* @param row 点击的行
|
|
10230
|
+
*/ function handleRowClick(row) {
|
|
10231
|
+
// 多选
|
|
10232
|
+
if ((0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isArray)(model.value)) {
|
|
10233
|
+
const existedIndex = model.value.findIndex((item)=>item[props.rowKey] === row[props.rowKey]);
|
|
10234
|
+
if (-1 !== existedIndex) {
|
|
10235
|
+
model.value.splice(existedIndex, 1);
|
|
10236
|
+
cancelHightLight();
|
|
10237
|
+
} else model.value.push(row);
|
|
10238
|
+
} else {
|
|
10239
|
+
// 单选
|
|
10240
|
+
const index = props.data.findIndex((item)=>item[props.rowKey] === row[props.rowKey]);
|
|
10241
|
+
if (model.value) {
|
|
10242
|
+
if (row[props.rowKey] === model.value[props.rowKey]) {
|
|
10243
|
+
model.value = void 0;
|
|
10244
|
+
keydownIndex.value = -1;
|
|
10245
|
+
cancelHightLight();
|
|
10246
|
+
} else {
|
|
10247
|
+
model.value = row;
|
|
10248
|
+
keydownIndex.value = index;
|
|
10249
|
+
}
|
|
10250
|
+
} else {
|
|
10251
|
+
model.value = row;
|
|
10252
|
+
keydownIndex.value = index;
|
|
10253
|
+
}
|
|
10254
|
+
// popoverRef.value?.hide();
|
|
10255
|
+
}
|
|
10256
|
+
}
|
|
10257
|
+
/**
|
|
10258
|
+
* 输入框输入
|
|
10259
|
+
* @param v 输入的值
|
|
10260
|
+
*/ function handleInput(v) {
|
|
10261
|
+
(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(()=>{
|
|
10262
|
+
// 存在异步行为,要判断
|
|
10263
|
+
if (props.remoteMethod) props.remoteMethod(v);
|
|
10264
|
+
}, 500)();
|
|
10265
|
+
popoverVisible.value = true;
|
|
10266
|
+
}
|
|
10267
|
+
/**
|
|
10268
|
+
* 处理下拉加载
|
|
10269
|
+
*/ function handleScrollLoad() {
|
|
10270
|
+
emits('nextPage');
|
|
10271
|
+
}
|
|
10272
|
+
function handleClickOutside(e) {
|
|
10273
|
+
if (e.target === inputSearchRef.value?.$el) return;
|
|
10274
|
+
popoverVisible.value = false;
|
|
10275
|
+
}
|
|
10276
|
+
function toggleVisible() {
|
|
10277
|
+
popoverVisible.value = true;
|
|
10278
|
+
}
|
|
10279
|
+
// const originalHeight = ref(0);
|
|
10280
|
+
// @show="handlePopoverShow" @hide="handlePopoverHide
|
|
10281
|
+
/**
|
|
10282
|
+
* popover 显示时处理高度
|
|
10283
|
+
*/ // async function handlePopoverShow() {
|
|
10284
|
+
// await nextTick(); // 等待popover渲染完成
|
|
10285
|
+
// const popoverState = popoverRef.value?.popperRef?.popperInstanceRef?.state; // 获取Popper实例
|
|
10286
|
+
// // 使用detectOverflow检测溢出情况
|
|
10287
|
+
// const overflow = await detectOverflow(popoverState!);
|
|
10288
|
+
// // 当浮动存在溢出的情况时,为容易添加溢出高度手动撑开,同时让容器的父容器主动触发滚动到底部
|
|
10289
|
+
// if (overflow.bottom > 0) {
|
|
10290
|
+
// // appendTo 的元素,可以是传入的 HTMLElement或者是一个 css选择器
|
|
10291
|
+
// const appendToElement =
|
|
10292
|
+
// props.appendTo instanceof HTMLElement
|
|
10293
|
+
// ? props.appendTo
|
|
10294
|
+
// : (document.querySelector(props.appendTo) as HTMLElement);
|
|
10295
|
+
// // 记录原始最小高度
|
|
10296
|
+
// originalHeight.value = appendToElement.offsetHeight || 0;
|
|
10297
|
+
// // 计算需要补充的高度(溢出距离 +安全间距) 弹窗高度需要吗?
|
|
10298
|
+
// // const popoverHeight =
|
|
10299
|
+
// // popoverRef.value?.popperRef?.contentRef?.offsetHeight || 0;
|
|
10300
|
+
// const neededHeight = overflow.bottom + 20; // 20px安全间距
|
|
10301
|
+
// // 调整插入容器的高度
|
|
10302
|
+
// appendToElement.style.height = `${originalHeight.value + neededHeight}px`;
|
|
10303
|
+
// // 将容器滚动到底部
|
|
10304
|
+
// scrollToBottom(appendToElement.parentElement!);
|
|
10305
|
+
// }
|
|
10306
|
+
// }
|
|
10307
|
+
/**
|
|
10308
|
+
* popover 隐藏时恢复高度
|
|
10309
|
+
*/ // async function handlePopoverHide() {
|
|
10310
|
+
// const appendToElement =
|
|
10311
|
+
// props.appendTo instanceof HTMLElement
|
|
10312
|
+
// ? props.appendTo
|
|
10313
|
+
// : (document.querySelector(props.appendTo) as HTMLElement);
|
|
10314
|
+
// appendToElement.style.height = '';
|
|
10315
|
+
// }
|
|
10316
|
+
/**
|
|
10317
|
+
* 线性动画滚动到底部
|
|
10318
|
+
*/ // function scrollToBottom(container: HTMLElement, duration = 200) {
|
|
10319
|
+
// // 目标位置:容器底部
|
|
10320
|
+
// const targetScrollTop = container.scrollHeight - container.clientHeight;
|
|
10321
|
+
// // 起始位置:当前滚动位置
|
|
10322
|
+
// const startScrollTop = container.scrollTop;
|
|
10323
|
+
// // 滚动距离
|
|
10324
|
+
// const distance = targetScrollTop - startScrollTop;
|
|
10325
|
+
// if (distance <= 0) return;
|
|
10326
|
+
// const startTime = performance.now(); // 动画开始时间
|
|
10327
|
+
// // 逐帧更新函数
|
|
10328
|
+
// function updateScroll(currentTime: number) {
|
|
10329
|
+
// // 计算时间比例(0~1)
|
|
10330
|
+
// const elapsed = currentTime - startTime;
|
|
10331
|
+
// const progress = Math.min(elapsed / duration, 1); // 确保不超过1
|
|
10332
|
+
// container.scrollTop = startScrollTop + distance * progress;
|
|
10333
|
+
// // 未完成则继续下一帧
|
|
10334
|
+
// if (progress < 1) {
|
|
10335
|
+
// requestAnimationFrame(updateScroll);
|
|
10336
|
+
// }
|
|
10337
|
+
// }
|
|
10338
|
+
// // 启动动画
|
|
10339
|
+
// requestAnimationFrame(updateScroll);
|
|
10340
|
+
// }
|
|
10341
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watchEffect)(()=>{
|
|
10342
|
+
if (model.value) inputValue.value = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isArray)(model.value) ? '' : model.value.name;
|
|
10343
|
+
});
|
|
10344
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount)(()=>{
|
|
10345
|
+
if (isSimpleMode.value) document.documentElement.style.setProperty('--simple-column-flex', `0 0 ${Math.floor(100 / simpleColumns.value.length)}%`);
|
|
10346
|
+
});
|
|
10347
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
10348
|
+
if (props.immediate && props.remoteMethod) props.remoteMethod();
|
|
10349
|
+
});
|
|
10350
|
+
__expose({
|
|
10351
|
+
reset,
|
|
10352
|
+
focus,
|
|
10353
|
+
tableRef,
|
|
10354
|
+
popoverRef
|
|
10355
|
+
});
|
|
10356
|
+
return (_ctx, _cache)=>{
|
|
10357
|
+
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
10358
|
+
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
10359
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
10360
|
+
'complex' === _ctx.mode ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
10361
|
+
key: 0
|
|
10362
|
+
}, [
|
|
10363
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInput), {
|
|
10364
|
+
class: "input",
|
|
10365
|
+
"prefix-icon": "Search",
|
|
10366
|
+
modelValue: inputValue.value,
|
|
10367
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>inputValue.value = $event),
|
|
10368
|
+
ref_key: "inputSearchRef",
|
|
10369
|
+
ref: inputSearchRef,
|
|
10370
|
+
size: _ctx.size,
|
|
10371
|
+
placeholder: _ctx.$t('global:placeholder.input.template', {
|
|
10372
|
+
content: _ctx.$t('global:search') + _ctx.$t('global:content')
|
|
10373
|
+
}),
|
|
10374
|
+
clearable: "",
|
|
10375
|
+
onKeydownCapture: _cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.withKeys)((0, __WEBPACK_EXTERNAL_MODULE_vue__.withModifiers)(()=>{}, [
|
|
10376
|
+
"prevent"
|
|
10377
|
+
]), [
|
|
10378
|
+
"enter"
|
|
10379
|
+
])),
|
|
10380
|
+
onClickCapture: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withModifiers)(toggleVisible, [
|
|
10381
|
+
"prevent"
|
|
10382
|
+
]),
|
|
10383
|
+
onInput: handleInput,
|
|
10384
|
+
onClear: reset
|
|
10385
|
+
}, null, 8, [
|
|
10386
|
+
"modelValue",
|
|
10387
|
+
"size",
|
|
10388
|
+
"placeholder"
|
|
10389
|
+
]),
|
|
10390
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElPopover), {
|
|
10391
|
+
ref_key: "popoverRef",
|
|
10392
|
+
ref: popoverRef,
|
|
10393
|
+
width: 400,
|
|
10394
|
+
visible: popoverVisible.value,
|
|
10395
|
+
"virtual-ref": inputSearchRef.value,
|
|
10396
|
+
"virtual-triggering": "",
|
|
10397
|
+
"popper-class": "table-select-popover",
|
|
10398
|
+
placement: "bottom-start",
|
|
10399
|
+
"append-to": _ctx.appendTo,
|
|
10400
|
+
"popper-options": defaultPopperOptions
|
|
10401
|
+
}, {
|
|
10402
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
10403
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Record_3CPropertyKey_2C_20any_3E_hoisted_1, [
|
|
10404
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "header"),
|
|
10405
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), {
|
|
10406
|
+
ref: "table",
|
|
10407
|
+
"component-no": _ctx.componentNo,
|
|
10408
|
+
"row-key": _ctx.rowKey,
|
|
10409
|
+
"current-row-key": _ctx.currentRowKey,
|
|
10410
|
+
"highlight-current-row": _ctx.highlightCurrentRow,
|
|
10411
|
+
columns: complexColumns.value,
|
|
10412
|
+
data: _ctx.data,
|
|
10413
|
+
"scroll-load": handleScrollLoad,
|
|
10414
|
+
loading: _ctx.loading,
|
|
10415
|
+
"scroll-loading": _ctx.scrollLoading,
|
|
10416
|
+
onRowClick: handleRowClick
|
|
10417
|
+
}, null, 8, [
|
|
10418
|
+
"component-no",
|
|
10419
|
+
"row-key",
|
|
10420
|
+
"current-row-key",
|
|
10421
|
+
"highlight-current-row",
|
|
10422
|
+
"columns",
|
|
10423
|
+
"data",
|
|
10424
|
+
"loading",
|
|
10425
|
+
"scroll-loading"
|
|
10426
|
+
]),
|
|
10427
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "footer", {
|
|
10428
|
+
remoteMethod: _ctx.remoteMethod
|
|
10429
|
+
})
|
|
10430
|
+
])), [
|
|
10431
|
+
[
|
|
10432
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ClickOutside),
|
|
10433
|
+
handleClickOutside
|
|
10434
|
+
]
|
|
10435
|
+
])
|
|
10436
|
+
]),
|
|
10437
|
+
_: 3
|
|
10438
|
+
}, 8, [
|
|
10439
|
+
"visible",
|
|
10440
|
+
"virtual-ref",
|
|
10441
|
+
"append-to"
|
|
10442
|
+
])
|
|
10443
|
+
], 64)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
10444
|
+
'simple' === props.mode ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
10445
|
+
key: 1,
|
|
10446
|
+
modelValue: model.value,
|
|
10447
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>model.value = $event),
|
|
10448
|
+
clearable: "",
|
|
10449
|
+
"popper-class": "table-select-popover-simple",
|
|
10450
|
+
size: _ctx.size,
|
|
10451
|
+
placeholder: _ctx.$t('global:placeholder.input.template', {
|
|
10452
|
+
content: _ctx.$t('global:search') + _ctx.$t('global:content')
|
|
10453
|
+
}),
|
|
10454
|
+
"value-key": _ctx.rowKey
|
|
10455
|
+
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
10456
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
10457
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default", {}, ()=>[
|
|
10458
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(_ctx.data, (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
|
|
10459
|
+
class: "cell flex items-center",
|
|
10460
|
+
label: item[_ctx.labelKey],
|
|
10461
|
+
value: item
|
|
10462
|
+
}, {
|
|
10463
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
10464
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(simpleColumns.value, (column)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", {
|
|
10465
|
+
key: index
|
|
10466
|
+
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item[column.key]), 1))), 128))
|
|
10467
|
+
]),
|
|
10468
|
+
_: 2
|
|
10469
|
+
}, 1032, [
|
|
10470
|
+
"label",
|
|
10471
|
+
"value"
|
|
10472
|
+
]))), 256))
|
|
10473
|
+
])
|
|
10474
|
+
]),
|
|
10475
|
+
_: 2
|
|
10476
|
+
}, [
|
|
10477
|
+
_ctx.simpleConfig?.showHeader ? {
|
|
10478
|
+
name: "header",
|
|
10479
|
+
fn: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
10480
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "header", {
|
|
10481
|
+
columns: simpleColumns.value
|
|
10482
|
+
}, ()=>[
|
|
10483
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Record_3CPropertyKey_2C_20any_3E_hoisted_2, [
|
|
10484
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(simpleColumns.value, (head, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", {
|
|
10485
|
+
key: index
|
|
10486
|
+
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(head.label), 1))), 128))
|
|
10487
|
+
])
|
|
10488
|
+
])
|
|
10489
|
+
]),
|
|
10490
|
+
key: "0"
|
|
10491
|
+
} : void 0
|
|
10492
|
+
]), 1032, [
|
|
10493
|
+
"modelValue",
|
|
10494
|
+
"size",
|
|
10495
|
+
"placeholder",
|
|
10496
|
+
"value-key"
|
|
10497
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
10498
|
+
], 64);
|
|
10499
|
+
};
|
|
10500
|
+
}
|
|
10501
|
+
});
|
|
10502
|
+
const table_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Record_3CPropertyKey_2C_20any_3E, [
|
|
10503
|
+
[
|
|
10504
|
+
'__scopeId',
|
|
10505
|
+
"data-v-9f70929c"
|
|
10506
|
+
]
|
|
10507
|
+
]);
|
|
10508
|
+
/* ESM default export */ const table_select = table_select_exports_;
|
|
10003
10509
|
const utils_DICT_SELECT = 'dictSelect';
|
|
10004
10510
|
/**
|
|
10005
10511
|
* 集合规则
|
|
@@ -11954,9 +12460,12 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
11954
12460
|
onClick: cancel
|
|
11955
12461
|
}, {
|
|
11956
12462
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[0] || (_cache[0] = [
|
|
11957
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
|
|
12463
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消", -1)
|
|
11958
12464
|
])),
|
|
11959
|
-
_: 1
|
|
12465
|
+
_: 1,
|
|
12466
|
+
__: [
|
|
12467
|
+
0
|
|
12468
|
+
]
|
|
11960
12469
|
}),
|
|
11961
12470
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
|
|
11962
12471
|
disabled: submitLoading.value || props.propsLoading,
|
|
@@ -11965,9 +12474,12 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
11965
12474
|
type: "primary"
|
|
11966
12475
|
}, {
|
|
11967
12476
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[1] || (_cache[1] = [
|
|
11968
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 保存 ")
|
|
12477
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 保存 ", -1)
|
|
11969
12478
|
])),
|
|
11970
|
-
_: 1
|
|
12479
|
+
_: 1,
|
|
12480
|
+
__: [
|
|
12481
|
+
1
|
|
12482
|
+
]
|
|
11971
12483
|
}, 8, [
|
|
11972
12484
|
"disabled",
|
|
11973
12485
|
"loading"
|
|
@@ -11985,4 +12497,4 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
|
|
|
11985
12497
|
]);
|
|
11986
12498
|
/* ESM default export */ const form_design_render = form_design_render_exports_;
|
|
11987
12499
|
/** components **/ /** hooks ** */ var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
|
|
11988
|
-
export { utils_AVATAR_TYPE_CODE as AVATAR_TYPE_CODE, access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, biz_unit_select as BizUnitSelect, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, department_select as DepartmentSelect, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, keyboard_value as KeyboardValue, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_avatar as ProAvatar, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, tag_select as TagSelect, Title, user_select as UserSelect, ward_select as WardSelect, convertToSpellNo, convertToWbNo, createShortcutDirective, debounce, decimalCount, findKeyCommandConfig, formatDecimalNumber, getSystemTime, isNumber, print, queryDataSetByCodeSystemCodes, queryParamListByNos, use_app_config as useAppConfigData, useColumnConfig, useDataChangeDetector, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFetchParams, useFetchSystemTime, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|
|
12500
|
+
export { utils_AVATAR_TYPE_CODE as AVATAR_TYPE_CODE, access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, biz_unit_select as BizUnitSelect, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, department_select as DepartmentSelect, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, keyboard_value as KeyboardValue, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_avatar as ProAvatar, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, table_select as TableSelect, types_TableSelectMode as TableSelectMode, tag_select as TagSelect, Title, user_select as UserSelect, ward_select as WardSelect, convertToSpellNo, convertToWbNo, createShortcutDirective, debounce, decimalCount, findKeyCommandConfig, formatDecimalNumber, getSystemTime, isNumber, print, queryDataSetByCodeSystemCodes, queryParamListByNos, use_app_config as useAppConfigData, useColumnConfig, useDataChangeDetector, useDirectionKey, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFetchParams, useFetchSystemTime, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|