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/components/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
|
|
|
12
12
|
import * as __WEBPACK_EXTERNAL_MODULE_i18next_vue__ from "i18next-vue";
|
|
13
13
|
import * as __WEBPACK_EXTERNAL_MODULE_js_pinyin__ from "js-pinyin";
|
|
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',
|
|
@@ -621,10 +621,10 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
621
621
|
}, [
|
|
622
622
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
|
|
623
623
|
class: `sort-caret ascending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES ? '!border-b-blue-500' : ''}`
|
|
624
|
-
}, null),
|
|
624
|
+
}, null, 2),
|
|
625
625
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
|
|
626
626
|
class: `sort-caret descending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO ? '!border-t-blue-500' : ''}`
|
|
627
|
-
}, null)
|
|
627
|
+
}, null, 2)
|
|
628
628
|
])
|
|
629
629
|
], 8, [
|
|
630
630
|
"onClick"
|
|
@@ -955,7 +955,7 @@ const _hoisted_3 = {
|
|
|
955
955
|
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
956
956
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, null, {
|
|
957
957
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
958
|
-
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("组合排序 ")),
|
|
958
|
+
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("组合排序 ", -1)),
|
|
959
959
|
isSHow.value ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_1, [
|
|
960
960
|
((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, {
|
|
961
961
|
hit: false,
|
|
@@ -995,7 +995,10 @@ const _hoisted_3 = {
|
|
|
995
995
|
]))), 128))
|
|
996
996
|
]))
|
|
997
997
|
]),
|
|
998
|
-
_: 1
|
|
998
|
+
_: 1,
|
|
999
|
+
__: [
|
|
1000
|
+
0
|
|
1001
|
+
]
|
|
999
1002
|
})
|
|
1000
1003
|
]),
|
|
1001
1004
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -1011,7 +1014,7 @@ const _hoisted_3 = {
|
|
|
1011
1014
|
]),
|
|
1012
1015
|
_: 1
|
|
1013
1016
|
}),
|
|
1014
|
-
_cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("请根据以下规则编辑排序条件 "))
|
|
1017
|
+
_cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("请根据以下规则编辑排序条件 ", -1))
|
|
1015
1018
|
]),
|
|
1016
1019
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(pro_table, {
|
|
1017
1020
|
onDragEnd: handleSortEnd,
|
|
@@ -1032,9 +1035,12 @@ const _hoisted_3 = {
|
|
|
1032
1035
|
onClick: confirm
|
|
1033
1036
|
}, {
|
|
1034
1037
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[2] || (_cache[2] = [
|
|
1035
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 关闭 ")
|
|
1038
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 关闭 ", -1)
|
|
1036
1039
|
])),
|
|
1037
|
-
_: 1
|
|
1040
|
+
_: 1,
|
|
1041
|
+
__: [
|
|
1042
|
+
2
|
|
1043
|
+
]
|
|
1038
1044
|
})
|
|
1039
1045
|
])
|
|
1040
1046
|
]),
|
|
@@ -1652,9 +1658,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1652
1658
|
onClick: handleCancel
|
|
1653
1659
|
}, {
|
|
1654
1660
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[7] || (_cache[7] = [
|
|
1655
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
|
|
1661
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消", -1)
|
|
1656
1662
|
])),
|
|
1657
|
-
_: 1
|
|
1663
|
+
_: 1,
|
|
1664
|
+
__: [
|
|
1665
|
+
7
|
|
1666
|
+
]
|
|
1658
1667
|
}),
|
|
1659
1668
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
1660
1669
|
type: "primary",
|
|
@@ -1666,9 +1675,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1666
1675
|
})
|
|
1667
1676
|
}, {
|
|
1668
1677
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[8] || (_cache[8] = [
|
|
1669
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用")
|
|
1678
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用", -1)
|
|
1670
1679
|
])),
|
|
1671
|
-
_: 1
|
|
1680
|
+
_: 1,
|
|
1681
|
+
__: [
|
|
1682
|
+
8
|
|
1683
|
+
]
|
|
1672
1684
|
}, 8, [
|
|
1673
1685
|
"loading",
|
|
1674
1686
|
"disabled"
|
|
@@ -1682,9 +1694,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1682
1694
|
})
|
|
1683
1695
|
}, {
|
|
1684
1696
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[9] || (_cache[9] = [
|
|
1685
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ")
|
|
1697
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ", -1)
|
|
1686
1698
|
])),
|
|
1687
|
-
_: 1
|
|
1699
|
+
_: 1,
|
|
1700
|
+
__: [
|
|
1701
|
+
9
|
|
1702
|
+
]
|
|
1688
1703
|
}, 8, [
|
|
1689
1704
|
"loading",
|
|
1690
1705
|
"disabled"
|
|
@@ -2784,6 +2799,10 @@ const SELECTION = 'selection';
|
|
|
2784
2799
|
const validateProps = props.columns.filter((item)=>item.rules).map((item)=>`tableData.${index}.${item.prop}`);
|
|
2785
2800
|
return formRef.value.validateField(validateProps, callback);
|
|
2786
2801
|
},
|
|
2802
|
+
clearValidateRow: (index)=>{
|
|
2803
|
+
const validateProps = props.columns.filter((item)=>item.rules).map((item)=>`tableData.${index}.${item.prop}`);
|
|
2804
|
+
return formRef.value.clearValidate(validateProps);
|
|
2805
|
+
},
|
|
2787
2806
|
fetchList: (init = true, initPageInfo = {
|
|
2788
2807
|
pageNumber: 1
|
|
2789
2808
|
})=>{
|
|
@@ -3822,8 +3841,8 @@ function icon_combinevue_type_template_id_80fc0d0e_render(_ctx, _cache) {
|
|
|
3822
3841
|
], -1)
|
|
3823
3842
|
]));
|
|
3824
3843
|
}
|
|
3825
|
-
const
|
|
3826
|
-
const icon_combine_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(
|
|
3844
|
+
const icon_combine_script = {};
|
|
3845
|
+
const icon_combine_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(icon_combine_script, [
|
|
3827
3846
|
[
|
|
3828
3847
|
'render',
|
|
3829
3848
|
icon_combinevue_type_template_id_80fc0d0e_render
|
|
@@ -3866,7 +3885,7 @@ const icon_combine_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(script,
|
|
|
3866
3885
|
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)=>({
|
|
3867
3886
|
...item,
|
|
3868
3887
|
label: item.title,
|
|
3869
|
-
minWidth: 110,
|
|
3888
|
+
minWidth: item?.displayWidth || 110,
|
|
3870
3889
|
prop: item.dataIndex,
|
|
3871
3890
|
...__props.isPatientAccess && 'patientName' === item.dataIndex && {
|
|
3872
3891
|
render: (row)=>row?.patMainRecordId && row?.patientId !== row?.patMainRecordId ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("div", {
|
|
@@ -6675,7 +6694,7 @@ const print = async (params)=>{
|
|
|
6675
6694
|
class: "min-w-[50px]"
|
|
6676
6695
|
}, {
|
|
6677
6696
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6678
|
-
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 打印 ")),
|
|
6697
|
+
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 打印 ", -1)),
|
|
6679
6698
|
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), {
|
|
6680
6699
|
key: 0,
|
|
6681
6700
|
class: "el-icon--right"
|
|
@@ -6686,7 +6705,10 @@ const print = async (params)=>{
|
|
|
6686
6705
|
_: 1
|
|
6687
6706
|
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
6688
6707
|
]),
|
|
6689
|
-
_: 1
|
|
6708
|
+
_: 1,
|
|
6709
|
+
__: [
|
|
6710
|
+
0
|
|
6711
|
+
]
|
|
6690
6712
|
}, 8, [
|
|
6691
6713
|
"type",
|
|
6692
6714
|
"disabled"
|
|
@@ -6722,6 +6744,109 @@ const print = async (params)=>{
|
|
|
6722
6744
|
});
|
|
6723
6745
|
const printReceiptBtn_exports_ = printReceiptBtnvue_type_script_setup_true_lang_ts_name_printReceipt;
|
|
6724
6746
|
/* ESM default export */ const printReceiptBtn = printReceiptBtn_exports_;
|
|
6747
|
+
/**
|
|
6748
|
+
* 方向键监听的 hook
|
|
6749
|
+
* @param hookActive hook是否激活
|
|
6750
|
+
* @returns
|
|
6751
|
+
*/ function useDirectionKey(hookActive, cb) {
|
|
6752
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(hookActive, (v)=>{
|
|
6753
|
+
if (v) document.addEventListener('keydown', cb);
|
|
6754
|
+
else // 移除事件监听
|
|
6755
|
+
window.removeEventListener('keydown', cb);
|
|
6756
|
+
});
|
|
6757
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
6758
|
+
console.log('useDirectionKey onBeforeUnmount');
|
|
6759
|
+
});
|
|
6760
|
+
// return {};
|
|
6761
|
+
}
|
|
6762
|
+
/**
|
|
6763
|
+
* table-select 模式枚举值
|
|
6764
|
+
*/ var types_TableSelectMode = /*#__PURE__*/ function(TableSelectMode) {
|
|
6765
|
+
TableSelectMode["Simple"] = "simple";
|
|
6766
|
+
TableSelectMode["Complex"] = "complex";
|
|
6767
|
+
return TableSelectMode;
|
|
6768
|
+
}({});
|
|
6769
|
+
const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Record_3CPropertyKey_2C_20any_3E_hoisted_1 = {
|
|
6770
|
+
class: "flex h-full flex-col"
|
|
6771
|
+
};
|
|
6772
|
+
const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Record_3CPropertyKey_2C_20any_3E_hoisted_2 = {
|
|
6773
|
+
class: "header flex items-center"
|
|
6774
|
+
};
|
|
6775
|
+
// import { detectOverflow } from '@popperjs/core';
|
|
6776
|
+
/* ESM default export */ ({
|
|
6777
|
+
mode: {
|
|
6778
|
+
default: 'complex'
|
|
6779
|
+
},
|
|
6780
|
+
columns: {
|
|
6781
|
+
default: ()=>[]
|
|
6782
|
+
},
|
|
6783
|
+
placeholder: {},
|
|
6784
|
+
loading: {
|
|
6785
|
+
type: Boolean,
|
|
6786
|
+
default: false
|
|
6787
|
+
},
|
|
6788
|
+
scrollLoading: {
|
|
6789
|
+
type: Boolean,
|
|
6790
|
+
default: false
|
|
6791
|
+
},
|
|
6792
|
+
immediate: {
|
|
6793
|
+
type: Boolean,
|
|
6794
|
+
default: true
|
|
6795
|
+
},
|
|
6796
|
+
popoverVisible: {
|
|
6797
|
+
type: Boolean,
|
|
6798
|
+
default: false
|
|
6799
|
+
},
|
|
6800
|
+
appendTo: {
|
|
6801
|
+
default: 'body'
|
|
6802
|
+
},
|
|
6803
|
+
multiple: {
|
|
6804
|
+
type: Boolean,
|
|
6805
|
+
default: false
|
|
6806
|
+
},
|
|
6807
|
+
placement: {
|
|
6808
|
+
default: 'bottom-start'
|
|
6809
|
+
},
|
|
6810
|
+
rowKey: {
|
|
6811
|
+
default: ()=>'id'
|
|
6812
|
+
},
|
|
6813
|
+
labelKey: {
|
|
6814
|
+
default: 'label'
|
|
6815
|
+
},
|
|
6816
|
+
componentNo: {
|
|
6817
|
+
default: void 0
|
|
6818
|
+
},
|
|
6819
|
+
currentRowKey: {
|
|
6820
|
+
default: 'id'
|
|
6821
|
+
},
|
|
6822
|
+
size: {
|
|
6823
|
+
default: 'default'
|
|
6824
|
+
},
|
|
6825
|
+
simpleConfig: {
|
|
6826
|
+
default: (props)=>'simple' === props.mode ? {
|
|
6827
|
+
showHeader: false
|
|
6828
|
+
} : {}
|
|
6829
|
+
},
|
|
6830
|
+
complexConfig: {},
|
|
6831
|
+
highlightCurrentRow: {
|
|
6832
|
+
type: Boolean,
|
|
6833
|
+
default: true
|
|
6834
|
+
},
|
|
6835
|
+
data: {
|
|
6836
|
+
default: ()=>[]
|
|
6837
|
+
},
|
|
6838
|
+
remoteMethod: {
|
|
6839
|
+
type: Function,
|
|
6840
|
+
default: void 0
|
|
6841
|
+
}
|
|
6842
|
+
}), ({
|
|
6843
|
+
modelValue: {},
|
|
6844
|
+
modelModifiers: {}
|
|
6845
|
+
}), [
|
|
6846
|
+
"nextPage"
|
|
6847
|
+
], [
|
|
6848
|
+
"update:modelValue"
|
|
6849
|
+
];
|
|
6725
6850
|
const Titlevue_type_script_setup_true_lang_ts_name_sunTitle_hoisted_1 = {
|
|
6726
6851
|
class: "relative pl-3 font-semibold before:absolute before:left-0 before:top-1/2 before:h-2/3 before:w-1 before:-translate-y-1/2 before:bg-primary"
|
|
6727
6852
|
};
|
|
@@ -7317,7 +7442,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7317
7442
|
]
|
|
7318
7443
|
});
|
|
7319
7444
|
const getRowClassName = (data)=>{
|
|
7320
|
-
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
|
|
7445
|
+
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
|
|
7321
7446
|
return 'cursor-pointer';
|
|
7322
7447
|
};
|
|
7323
7448
|
const getBizUnitList = async (data)=>{
|
|
@@ -7733,7 +7858,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7733
7858
|
]
|
|
7734
7859
|
});
|
|
7735
7860
|
const getRowClassName = (data)=>{
|
|
7736
|
-
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
|
|
7861
|
+
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
|
|
7737
7862
|
return 'cursor-pointer';
|
|
7738
7863
|
};
|
|
7739
7864
|
const getDepartmentList = async (data)=>{
|
|
@@ -8159,7 +8284,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8159
8284
|
]
|
|
8160
8285
|
});
|
|
8161
8286
|
const getRowClassName = (data)=>{
|
|
8162
|
-
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
|
|
8287
|
+
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
|
|
8163
8288
|
return 'cursor-pointer';
|
|
8164
8289
|
};
|
|
8165
8290
|
const getWardList = async (data)=>{
|
|
@@ -8846,7 +8971,8 @@ const WB_NO = "wbNo";
|
|
|
8846
8971
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
8847
8972
|
((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)({
|
|
8848
8973
|
key: item.name + index,
|
|
8849
|
-
class: item.span || item.isFullWidth ? item.isFullWidth ? 'col-span-full' : `... col-span-${item.span}` : isInlineMode ? 'inline-block' : ''
|
|
8974
|
+
class: item.span || item.isFullWidth ? item.isFullWidth ? 'col-span-full' : `... col-span-${item.span}` : isInlineMode ? 'inline-block' : ''
|
|
8975
|
+
}, {
|
|
8850
8976
|
ref_for: true
|
|
8851
8977
|
}, item.formItemProps || {}), [
|
|
8852
8978
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_form_item, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
@@ -8854,7 +8980,8 @@ const WB_NO = "wbNo";
|
|
|
8854
8980
|
label: 'function' == typeof item.label ? '' : item.label,
|
|
8855
8981
|
prop: item.name,
|
|
8856
8982
|
class: item.className,
|
|
8857
|
-
style: isInlineMode ? 'margin-right: 16px;' : ''
|
|
8983
|
+
style: isInlineMode ? 'margin-right: 16px;' : ''
|
|
8984
|
+
}, {
|
|
8858
8985
|
ref_for: true
|
|
8859
8986
|
}, item.formItemProps || {}), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
8860
8987
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -8864,7 +8991,8 @@ const WB_NO = "wbNo";
|
|
|
8864
8991
|
type: item.type,
|
|
8865
8992
|
"support-copy-and-tips": item.supportCopyAndTips,
|
|
8866
8993
|
placeholder: item.placeholder,
|
|
8867
|
-
options: item.options
|
|
8994
|
+
options: item.options
|
|
8995
|
+
}, {
|
|
8868
8996
|
ref_for: true
|
|
8869
8997
|
}, item.extraProps || {}, {
|
|
8870
8998
|
modelValue: formModel[item.name],
|
|
@@ -8895,6 +9023,8 @@ const WB_NO = "wbNo";
|
|
|
8895
9023
|
ref_for: true,
|
|
8896
9024
|
ref_key: "itemRefs",
|
|
8897
9025
|
ref: itemRefs
|
|
9026
|
+
}, {
|
|
9027
|
+
ref_for: true
|
|
8898
9028
|
}, item.extraProps || {}, {
|
|
8899
9029
|
modelValue: formModel[item.name],
|
|
8900
9030
|
"onUpdate:modelValue": ($event)=>formModel[item.name] = $event,
|
|
@@ -8937,9 +9067,12 @@ const WB_NO = "wbNo";
|
|
|
8937
9067
|
})
|
|
8938
9068
|
}, {
|
|
8939
9069
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[1] || (_cache[1] = [
|
|
8940
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("查询")
|
|
9070
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("查询", -1)
|
|
8941
9071
|
])),
|
|
8942
|
-
_: 1
|
|
9072
|
+
_: 1,
|
|
9073
|
+
__: [
|
|
9074
|
+
1
|
|
9075
|
+
]
|
|
8943
9076
|
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
8944
9077
|
])
|
|
8945
9078
|
]),
|
|
@@ -9891,9 +10024,12 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
9891
10024
|
onClick: cancel
|
|
9892
10025
|
}, {
|
|
9893
10026
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[0] || (_cache[0] = [
|
|
9894
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
|
|
10027
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消", -1)
|
|
9895
10028
|
])),
|
|
9896
|
-
_: 1
|
|
10029
|
+
_: 1,
|
|
10030
|
+
__: [
|
|
10031
|
+
0
|
|
10032
|
+
]
|
|
9897
10033
|
}),
|
|
9898
10034
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
|
|
9899
10035
|
disabled: submitLoading.value || props.propsLoading,
|
|
@@ -9902,9 +10038,12 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
9902
10038
|
type: "primary"
|
|
9903
10039
|
}, {
|
|
9904
10040
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[1] || (_cache[1] = [
|
|
9905
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 保存 ")
|
|
10041
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 保存 ", -1)
|
|
9906
10042
|
])),
|
|
9907
|
-
_: 1
|
|
10043
|
+
_: 1,
|
|
10044
|
+
__: [
|
|
10045
|
+
1
|
|
10046
|
+
]
|
|
9908
10047
|
}, 8, [
|
|
9909
10048
|
"disabled",
|
|
9910
10049
|
"loading"
|
|
@@ -19,6 +19,26 @@
|
|
|
19
19
|
background-color: #0000 !important;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
.input[data-v-9f70929c] .el-input__inner {
|
|
23
|
+
cursor: pointer !important;
|
|
24
|
+
}
|
|
25
|
+
.table-select-popover[data-v-9f70929c] {
|
|
26
|
+
height: 350px;
|
|
27
|
+
width: auto !important;
|
|
28
|
+
}
|
|
29
|
+
.table-select-popover-simple .header[data-v-9f70929c] {
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
.table-select-popover-simple .header > span[data-v-9f70929c] {
|
|
33
|
+
flex: var(--simple-column-flex);
|
|
34
|
+
}
|
|
35
|
+
.table-select-popover-simple .cell[data-v-9f70929c] {
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
.table-select-popover-simple .cell > span[data-v-9f70929c] {
|
|
39
|
+
flex: var(--simple-column-flex);
|
|
40
|
+
}
|
|
41
|
+
|
|
22
42
|
|
|
23
43
|
|
|
24
44
|
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ComponentSize } from 'element-sun';
|
|
2
|
+
import { ColumnProps } from '@/components/pro-table';
|
|
3
|
+
/**
|
|
4
|
+
* 简易模式 option 类型
|
|
5
|
+
*/
|
|
6
|
+
export interface ISelectSimpleOption<T> {
|
|
7
|
+
label: string;
|
|
8
|
+
value: T;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 简易模式 表头 option 类型
|
|
12
|
+
*/
|
|
13
|
+
export interface ISelectSimpleHeadOption<T> {
|
|
14
|
+
label: string;
|
|
15
|
+
key: keyof T;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* table-select 模式枚举值
|
|
19
|
+
*/
|
|
20
|
+
export declare enum TableSelectMode {
|
|
21
|
+
Simple = "simple",
|
|
22
|
+
Complex = "complex"
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 提取枚举值的类型('simple' | 'complex')
|
|
26
|
+
*/
|
|
27
|
+
export type TableSelectModeType = `${TableSelectMode}`;
|
|
28
|
+
/**
|
|
29
|
+
* 远程加载数据的方法类型
|
|
30
|
+
*/
|
|
31
|
+
type RemoteMethod<T = unknown> = (...args: T[]) => unknown;
|
|
32
|
+
/**
|
|
33
|
+
* 优化后的 table-select 组件 props 类型
|
|
34
|
+
* 采用泛型关联 mode 和 columns 的类型
|
|
35
|
+
*/
|
|
36
|
+
export interface TableSelectProps<T extends Record<PropertyKey, any>> {
|
|
37
|
+
/**
|
|
38
|
+
* 选择模式
|
|
39
|
+
* - 'simple': 简易模式,配合 ISelectSimpleHeadOption 类型的 columns
|
|
40
|
+
* - 'complex': 复杂模式,配合 ColumnProps 类型的 columns
|
|
41
|
+
*/
|
|
42
|
+
mode?: TableSelectModeType;
|
|
43
|
+
/**
|
|
44
|
+
* 列配置,类型由 mode 决定
|
|
45
|
+
* - mode 为 'simple' 时,必须是 ISelectSimpleHeadOption[]
|
|
46
|
+
* - mode 为 'complex' 时,必须是 ColumnProps[]
|
|
47
|
+
*/
|
|
48
|
+
columns?: ISelectSimpleHeadOption<T>[] | ColumnProps[];
|
|
49
|
+
/** 占位符 */
|
|
50
|
+
placeholder?: string;
|
|
51
|
+
/** 是否加载中 */
|
|
52
|
+
loading?: boolean;
|
|
53
|
+
/** 是否滚动加载中 */
|
|
54
|
+
scrollLoading?: boolean;
|
|
55
|
+
/** 是否立即执行加载方法 */
|
|
56
|
+
immediate?: boolean;
|
|
57
|
+
/** 弹窗是否可见 */
|
|
58
|
+
popoverVisible?: boolean;
|
|
59
|
+
/** 弹窗挂载点 */
|
|
60
|
+
appendTo?: string | HTMLElement;
|
|
61
|
+
/** 是否支持多选 */
|
|
62
|
+
multiple?: boolean;
|
|
63
|
+
/** 弹窗位置 */
|
|
64
|
+
placement?: string;
|
|
65
|
+
/** 行数据的唯一标识字段 */
|
|
66
|
+
rowKey?: string & keyof T;
|
|
67
|
+
/** 自定义 label 键名 */
|
|
68
|
+
labelKey?: string;
|
|
69
|
+
/** 表格组件编号 */
|
|
70
|
+
componentNo?: string;
|
|
71
|
+
/** 当前选中行的 key */
|
|
72
|
+
currentRowKey?: string;
|
|
73
|
+
/** 组件尺寸 */
|
|
74
|
+
size?: ComponentSize;
|
|
75
|
+
/** 简易模式配置项 */
|
|
76
|
+
simpleConfig?: ISelectSimpleConfig;
|
|
77
|
+
/** 复杂模式配置项 */
|
|
78
|
+
complexConfig?: ISelectComplexConfig;
|
|
79
|
+
/** 是否高亮当前行 */
|
|
80
|
+
highlightCurrentRow?: boolean;
|
|
81
|
+
/** 表格数据 */
|
|
82
|
+
data: T[];
|
|
83
|
+
/** 远程加载数据的方法 */
|
|
84
|
+
remoteMethod?: RemoteMethod<string | undefined>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 简易模式配置项
|
|
88
|
+
*/
|
|
89
|
+
export interface ISelectSimpleConfig {
|
|
90
|
+
/** 是否显示表头 */
|
|
91
|
+
showHeader?: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface ISelectComplexConfig {
|
|
94
|
+
}
|
|
95
|
+
export {};
|
package/dist/hooks/index.js
CHANGED
|
@@ -525,6 +525,13 @@ function useFetchParams(options) {
|
|
|
525
525
|
}
|
|
526
526
|
};
|
|
527
527
|
/**
|
|
528
|
+
* 清理行数据验证信息
|
|
529
|
+
*/ const clearValidateItem = (row)=>{
|
|
530
|
+
const cacheKey = getRowKey(row);
|
|
531
|
+
const index = tableData.value.findIndex((item)=>item[cacheKey] === row[cacheKey]);
|
|
532
|
+
tableRef?.value?.clearValidateRow(index);
|
|
533
|
+
};
|
|
534
|
+
/**
|
|
528
535
|
* 切换编辑状态
|
|
529
536
|
*/ const toggleEdit = async (row)=>{
|
|
530
537
|
const cacheKey = getRowKey(row);
|
|
@@ -595,7 +602,8 @@ function useFetchParams(options) {
|
|
|
595
602
|
delItem,
|
|
596
603
|
insertItem,
|
|
597
604
|
updateItem,
|
|
598
|
-
validateItem
|
|
605
|
+
validateItem,
|
|
606
|
+
clearValidateItem
|
|
599
607
|
};
|
|
600
608
|
}
|
|
601
609
|
/* ESM default export */ const use_editable_table = useEditableTable;
|
|
@@ -3,6 +3,7 @@ import type { FormInstance } from "element-sun";
|
|
|
3
3
|
export type TableRef = {
|
|
4
4
|
formRef: FormInstance;
|
|
5
5
|
validateRow: (index: number, cb?: (isValid: boolean) => void) => Promise<boolean>;
|
|
6
|
+
clearValidateRow: (index: number) => void;
|
|
6
7
|
} | undefined;
|
|
7
8
|
/**
|
|
8
9
|
* 表格编辑功能
|
|
@@ -25,5 +26,6 @@ export declare function useEditableTable<TData extends {
|
|
|
25
26
|
insertItem: (row: TData, index: number, step?: number) => void;
|
|
26
27
|
updateItem: (row: TData, index?: number) => void;
|
|
27
28
|
validateItem: (row: TData) => Promise<boolean>;
|
|
29
|
+
clearValidateItem: (row: TData) => void;
|
|
28
30
|
};
|
|
29
31
|
export default useEditableTable;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './components/pro-table-v2';
|
|
|
4
4
|
export * from './components/patient-access/index.ts';
|
|
5
5
|
export * from './components/print/index.ts';
|
|
6
6
|
export * from './components/invoice/index.ts';
|
|
7
|
+
export * from './components/table-select';
|
|
7
8
|
export { Title } from './components/title';
|
|
8
9
|
export { DictSelect, FlagSelect, HospitalSelect, TagSelect, UserSelect, BizUnitSelect, DepartmentSelect, WardSelect, } from './components/biz-select';
|
|
9
10
|
export type { TagGroupInfo } from './components/biz-select';
|