sun-biz 0.0.4-beta.43 → 0.0.4-beta.45
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/biz-select/hospital-charge-select/api.d.ts +53 -0
- package/dist/components/biz-select/index.d.ts +2 -0
- package/dist/components/index.js +78 -10
- package/dist/components/static/css/index.css +34 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +460 -11
- package/dist/static/css/index.css +34 -0
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type HospitalChargeQueryParams = {
|
|
2
|
+
keyWord?: string;
|
|
3
|
+
hospitalId: string;
|
|
4
|
+
encounterTypeCode?: string;
|
|
5
|
+
priceAt: string;
|
|
6
|
+
hospitalCommodityIds?: string[];
|
|
7
|
+
};
|
|
8
|
+
export type HospitalChargeItem = {
|
|
9
|
+
hospitalCommodityId: string;
|
|
10
|
+
commodityCategoryId: string;
|
|
11
|
+
commodityCategoryName: string;
|
|
12
|
+
outCommodityCategoryId?: string;
|
|
13
|
+
outCommodityCategoryName?: string;
|
|
14
|
+
inCommodityCategoryId?: string;
|
|
15
|
+
inCommodityCategoryName?: string;
|
|
16
|
+
accCommodityCategoryId?: string;
|
|
17
|
+
accCommodityCategoryName?: string;
|
|
18
|
+
fncCommodityCategoryId?: string;
|
|
19
|
+
fncCommodityCategoryName?: string;
|
|
20
|
+
mrCommodityCategoryId?: string;
|
|
21
|
+
mrCommodityCategoryName?: string;
|
|
22
|
+
commodityId: string;
|
|
23
|
+
commodityNo?: string;
|
|
24
|
+
commodityName: string;
|
|
25
|
+
commodity2ndName?: string;
|
|
26
|
+
commodityExtName?: string;
|
|
27
|
+
commodityNameDisplay: string;
|
|
28
|
+
commoditySpec?: string;
|
|
29
|
+
unitId?: string;
|
|
30
|
+
unitName: string;
|
|
31
|
+
spellNo: string;
|
|
32
|
+
wbNo?: string;
|
|
33
|
+
memo?: string;
|
|
34
|
+
producedByOrgId?: string;
|
|
35
|
+
producedByOrgName?: string;
|
|
36
|
+
chargeItemConnotation?: string;
|
|
37
|
+
enabledFlag: number;
|
|
38
|
+
commodityPriceId: string;
|
|
39
|
+
price: number;
|
|
40
|
+
startAt: string;
|
|
41
|
+
endAt?: string;
|
|
42
|
+
};
|
|
43
|
+
export type HospitalChargeSelection = Partial<HospitalChargeItem> & {
|
|
44
|
+
label?: string;
|
|
45
|
+
value?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* [1-10147-1] 根据条件查询医院的收费项目列表(业务态)
|
|
49
|
+
* 是否分页 Y
|
|
50
|
+
* @param params
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
export declare const queryHospitalChargeItemListByExample: (params: HospitalChargeQueryParams) => Promise<[import("@sun-toolkit/request").SunApiResultData<null> | undefined, import("@sun-toolkit/request").SunApiResultData<HospitalChargeItem[]> | undefined]>;
|
|
@@ -6,4 +6,6 @@ export { default as UserSelect } from './user-select/index.vue';
|
|
|
6
6
|
export { default as BizUnitSelect } from './biz-unit-select/index.vue';
|
|
7
7
|
export { default as DepartmentSelect } from './department-select/index.vue';
|
|
8
8
|
export { default as WardSelect } from './ward-select/index.vue';
|
|
9
|
+
export { default as HospitalChargeSelect } from './hospital-charge-select/index.vue';
|
|
9
10
|
export type { TagGroupInfo } from './tag-select/api.ts';
|
|
11
|
+
export type { HospitalChargeItem, HospitalChargeQueryParams, HospitalChargeSelection } from './hospital-charge-select/api.ts';
|
package/dist/components/index.js
CHANGED
|
@@ -4369,7 +4369,8 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
|
|
|
4369
4369
|
searchValue: inputValue.value,
|
|
4370
4370
|
indexTypeCode: cardInfo?.indexTypeCode ? cardInfo?.indexTypeCode : data.indexTypeCode,
|
|
4371
4371
|
indexNo: data.indexTypeCode && !cardInfo?.indexNo ? inputValue.value : cardInfo?.indexNo,
|
|
4372
|
-
pageNumber: pageNumber.value
|
|
4372
|
+
pageNumber: pageNumber.value,
|
|
4373
|
+
menuId: __props.menuId
|
|
4373
4374
|
});
|
|
4374
4375
|
searchLoading.value = false;
|
|
4375
4376
|
if (res?.data) {
|
|
@@ -4876,6 +4877,17 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
4876
4877
|
color: colorItem.cssValue
|
|
4877
4878
|
} : {};
|
|
4878
4879
|
};
|
|
4880
|
+
/**
|
|
4881
|
+
* 格式化数据值,如果listFlag为1,则将数组用逗号分隔
|
|
4882
|
+
*/ const formatDataValue = (item)=>{
|
|
4883
|
+
if (item.listFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && item.dataValue) try {
|
|
4884
|
+
const parsedData = JSON.parse(item.dataValue);
|
|
4885
|
+
if (Array.isArray(parsedData)) return parsedData.join(",");
|
|
4886
|
+
} catch (error) {
|
|
4887
|
+
console.error("格式化失败", error);
|
|
4888
|
+
}
|
|
4889
|
+
return item.dataValue || "--";
|
|
4890
|
+
};
|
|
4879
4891
|
function setBizId(data) {
|
|
4880
4892
|
switch(tagBizIdTypeCode){
|
|
4881
4893
|
case PERSON:
|
|
@@ -5091,8 +5103,7 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5091
5103
|
'text-[#555]',
|
|
5092
5104
|
getDynamicCssClasses(item.comptControlCssList)
|
|
5093
5105
|
]),
|
|
5094
|
-
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList))
|
|
5095
|
-
type: ""
|
|
5106
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList))
|
|
5096
5107
|
}, {
|
|
5097
5108
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5098
5109
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.labelNameDisplay) + ":", 1)
|
|
@@ -5105,7 +5116,7 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5105
5116
|
]),
|
|
5106
5117
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTooltip), {
|
|
5107
5118
|
disabled: !isTextOverflowing.value,
|
|
5108
|
-
content: item
|
|
5119
|
+
content: formatDataValue(item)
|
|
5109
5120
|
}, {
|
|
5110
5121
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5111
5122
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_16, [
|
|
@@ -5114,11 +5125,10 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5114
5125
|
'text-[#555]',
|
|
5115
5126
|
getDynamicCssClasses(item.comptControlCssList)
|
|
5116
5127
|
]),
|
|
5117
|
-
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList))
|
|
5118
|
-
type: ""
|
|
5128
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList))
|
|
5119
5129
|
}, {
|
|
5120
5130
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5121
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item
|
|
5131
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(formatDataValue(item)), 1)
|
|
5122
5132
|
]),
|
|
5123
5133
|
_: 2
|
|
5124
5134
|
}, 1032, [
|
|
@@ -7339,11 +7349,13 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7339
7349
|
* @param params
|
|
7340
7350
|
* @returns
|
|
7341
7351
|
*/ const queryBizUnitList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryBizUnitListByExample', params);
|
|
7342
|
-
|
|
7352
|
+
// 全局事件:用于关闭其他实例的 popover
|
|
7353
|
+
const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
|
|
7343
7354
|
96-10014-1 业务单元选择组件
|
|
7344
7355
|
1、调用“1-10516-1 根据条件查询业务单元列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询业务单元列表
|
|
7345
7356
|
2、展示列包括“组织类型、编码、名称”
|
|
7346
|
-
*/
|
|
7357
|
+
*/
|
|
7358
|
+
/* ESM default export */ const biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
7347
7359
|
__name: 'index',
|
|
7348
7360
|
props: {
|
|
7349
7361
|
keyWord: {},
|
|
@@ -7371,6 +7383,8 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7371
7383
|
});
|
|
7372
7384
|
const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
|
|
7373
7385
|
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
|
|
7386
|
+
const instance = (0, __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance)();
|
|
7387
|
+
const componentId = instance?.uid || Math.random(); // 唯一标识当前组件实例
|
|
7374
7388
|
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
7375
7389
|
const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
7376
7390
|
const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
@@ -7584,6 +7598,12 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7584
7598
|
const handleFocus = ()=>{
|
|
7585
7599
|
setTimeout(()=>{
|
|
7586
7600
|
if (clearing.value) return;
|
|
7601
|
+
// 通知其他实例关闭 popover
|
|
7602
|
+
window.dispatchEvent(new CustomEvent(CLOSE_OTHER_POPOVERS_EVENT, {
|
|
7603
|
+
detail: {
|
|
7604
|
+
componentId
|
|
7605
|
+
}
|
|
7606
|
+
}));
|
|
7587
7607
|
popoverVisible.value = true;
|
|
7588
7608
|
}, 100);
|
|
7589
7609
|
};
|
|
@@ -7634,15 +7654,27 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7634
7654
|
selectedValue.value = items.map((row)=>row.label || row.orgNameDisplay);
|
|
7635
7655
|
handleChange();
|
|
7636
7656
|
};
|
|
7637
|
-
const handlePopoverShow = ()=>{
|
|
7657
|
+
const handlePopoverShow = ()=>{
|
|
7658
|
+
window.dispatchEvent(new CustomEvent(CLOSE_OTHER_POPOVERS_EVENT, {
|
|
7659
|
+
detail: {
|
|
7660
|
+
componentId
|
|
7661
|
+
}
|
|
7662
|
+
}));
|
|
7663
|
+
}; // 监听其他实例的关闭事件
|
|
7664
|
+
const handleCloseOtherPopovers = (event)=>{
|
|
7665
|
+
const customEvent = event;
|
|
7666
|
+
if (customEvent.detail?.componentId !== componentId) popoverVisible.value = false;
|
|
7667
|
+
};
|
|
7638
7668
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
7639
7669
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
7640
7670
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
7671
|
+
window.removeEventListener(CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
|
|
7641
7672
|
});
|
|
7642
7673
|
const fetchData = async (data)=>{
|
|
7643
7674
|
await getBizUnitList(data);
|
|
7644
7675
|
};
|
|
7645
7676
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7677
|
+
window.addEventListener(CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
|
|
7646
7678
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
7647
7679
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
7648
7680
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgNameDisplay);
|
|
@@ -8638,6 +8670,42 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8638
8670
|
});
|
|
8639
8671
|
const ward_select_exports_ = ward_selectvue_type_script_setup_true_lang_tsx_name_WardSelect;
|
|
8640
8672
|
/* ESM default export */ const ward_select = ward_select_exports_;
|
|
8673
|
+
/**
|
|
8674
|
+
* [1-10147-1] 根据条件查询医院的收费项目列表(业务态)
|
|
8675
|
+
* 是否分页 Y
|
|
8676
|
+
* @param params
|
|
8677
|
+
* @returns
|
|
8678
|
+
*/ const queryHospitalChargeItemListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/chargeItem/queryHospitalChargeItemListByExample', params);
|
|
8679
|
+
const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_hoisted_1 = {
|
|
8680
|
+
class: "hospital-charge-select"
|
|
8681
|
+
};
|
|
8682
|
+
const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_hoisted_2 = {
|
|
8683
|
+
class: "popover-content"
|
|
8684
|
+
};
|
|
8685
|
+
// 全局事件:用于关闭其他实例的 popover
|
|
8686
|
+
const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_CLOSE_OTHER_POPOVERS_EVENT = 'hospital-charge-select:close-others';
|
|
8687
|
+
/* ESM default export */ ({
|
|
8688
|
+
hospitalId: {},
|
|
8689
|
+
encounterTypeCode: {},
|
|
8690
|
+
priceAt: {},
|
|
8691
|
+
size: {
|
|
8692
|
+
default: 'default'
|
|
8693
|
+
},
|
|
8694
|
+
immediate: {
|
|
8695
|
+
type: Boolean,
|
|
8696
|
+
default: false
|
|
8697
|
+
},
|
|
8698
|
+
popoverWidth: {
|
|
8699
|
+
default: 1000
|
|
8700
|
+
}
|
|
8701
|
+
}), ({
|
|
8702
|
+
modelValue: {},
|
|
8703
|
+
modelModifiers: {}
|
|
8704
|
+
}), [
|
|
8705
|
+
"change"
|
|
8706
|
+
], [
|
|
8707
|
+
"update:modelValue"
|
|
8708
|
+
];
|
|
8641
8709
|
// 获取五笔简码
|
|
8642
8710
|
const wubiLib = [
|
|
8643
8711
|
'A鞴鞲鞣鞫鞯鞔鞒鞑鞅靼銎跫綦翳蛩颟鹳鹋鸫鸢慝觐觋贳瓯戡檠迓甙忒弋撖摁廾蘼蘖蘩蘅蘧藿藜藁藓薰薷薹薅薜薮蕹薏薇薨薤蕻蕲蕃瞢蕺蕞蕤蕨蕈蕙蓼蓿蔻蕖蔺蔟蔹蓰蔸甍蔌蓣蓥蒗蒴蒹蒡蓠蒺蒿蓊蓓蒽蓦蓐蓍蓁葭萱蒎蒌葶葩葆萼葸蒉葺蒈蒇葳葙葚葑葜菡菰萦菀菅菪菹菸萃萏菟菔萆萑萸萜菖菽菝萋萘堇菘菥萁菁莼莺莨莞莘荻莸荽莩莶荼莅莜莓莪莠莴莳荸莰荮荭荪荬荩茛荨荥荦茳茺茭荠茗荀荟荃荇荏茯荞莛茱茴茼莒茈荜荛荑茜苕苠茕茔茆茚茑苓苻茌苘苒苴苜茇茏苤苷茉苡芤苎苄芟芪芡芴芩苁苌苋芮芷芘苣苊苈芰芾芸芫芙芗芑芎芄芨芊芏艿艽艹鄞郾邛劐蒯赜匾匮匦叵匚廿茁著芝蒸斟蔗蘸藻葬匝蕴苑芋荧营萤莹英荫茵艺颐医药尧燕雅牙芽鸦薛靴蓄芯薪邪鞋萧巷项匣熙昔芜巫卧蔚萎苇藤萄苔蓑蒜苏斯薯蔬世式甚芍苫莎散萨若蕊茹荣蓉茸戎惹鹊颧区擎芹勤莲荔莉蕾勒劳蓝莱葵匡苦恐苛勘菌巨菊鞠敬警茎荆靳芥藉戒节蕉匠蒋荐茧荚蓟基惑或获荤茄切翘鞘巧蔷其七欺期蒲菩葡莆萍苹匹蓬藕殴鸥欧孽蔫匿慕募幕暮墓某莫蘑摹蔑藐苗蒙萌茂茅莽茫芒蔓落萝芦菱黄荒划花葫菏荷邯菇苟共贡汞巩恭功攻工葛革戈甘芬匪菲芳范藩贰董东蒂荡葱茨臣茶茬草藏苍蔡菜菠鞭蔽蓖苯薄苞靶芭鞍艾蔼',
|
|
@@ -41,6 +41,40 @@
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
+
.hospital-charge-select[data-v-ffb2d000] {
|
|
45
|
+
width: 100%;
|
|
46
|
+
}
|
|
47
|
+
.hospital-charge-select .input[data-v-ffb2d000] .el-input__inner {
|
|
48
|
+
cursor: pointer !important;
|
|
49
|
+
}
|
|
50
|
+
[data-v-ffb2d000] .hospital-charge-select-popover {
|
|
51
|
+
max-height: var(--5aebc6cb);
|
|
52
|
+
padding: 0;
|
|
53
|
+
z-index: 9999 !important;
|
|
54
|
+
}
|
|
55
|
+
[data-v-ffb2d000] .hospital-charge-select-popover .popover-content {
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
max-height: var(--5aebc6cb);
|
|
59
|
+
}
|
|
60
|
+
[data-v-ffb2d000] .hospital-charge-select-popover .el-table__row.cursor-not-allowed {
|
|
61
|
+
color: #c0c4cc;
|
|
62
|
+
cursor: not-allowed !important;
|
|
63
|
+
background-color: #f5f7fa !important;
|
|
64
|
+
}
|
|
65
|
+
[data-v-ffb2d000] .hospital-charge-select-popover .el-table__row.cursor-not-allowed td {
|
|
66
|
+
background-color: #f5f7fa !important;
|
|
67
|
+
}
|
|
68
|
+
[data-v-ffb2d000] .hospital-charge-select-popover .el-table__row.cursor-not-allowed:hover > td {
|
|
69
|
+
background-color: #f5f7fa !important;
|
|
70
|
+
}
|
|
71
|
+
.hospital-charge-select-popover {
|
|
72
|
+
margin-bottom: 8px !important;
|
|
73
|
+
}
|
|
74
|
+
.hospital-charge-select-popover {
|
|
75
|
+
margin-top: 8px !important;
|
|
76
|
+
}
|
|
77
|
+
|
|
44
78
|
|
|
45
79
|
|
|
46
80
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export * from './components/print/index.ts';
|
|
|
6
6
|
export * from './components/invoice/index.ts';
|
|
7
7
|
export * from './components/table-select';
|
|
8
8
|
export { Title } from './components/title';
|
|
9
|
-
export { DictSelect, FlagSelect, HospitalSelect, TagSelect, UserSelect, BizUnitSelect, DepartmentSelect, WardSelect, } from './components/biz-select';
|
|
9
|
+
export { DictSelect, FlagSelect, HospitalSelect, TagSelect, UserSelect, BizUnitSelect, DepartmentSelect, WardSelect, HospitalChargeSelect, } from './components/biz-select';
|
|
10
10
|
export type { TagGroupInfo } from './components/biz-select';
|
|
11
11
|
export { CopyTextWithTooltip } from './components/copy-text-with-tooltip';
|
|
12
12
|
export { FormDesignRender } from './components/form-design-render';
|
package/dist/index.js
CHANGED
|
@@ -4869,7 +4869,8 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
|
|
|
4869
4869
|
searchValue: inputValue.value,
|
|
4870
4870
|
indexTypeCode: cardInfo?.indexTypeCode ? cardInfo?.indexTypeCode : data.indexTypeCode,
|
|
4871
4871
|
indexNo: data.indexTypeCode && !cardInfo?.indexNo ? inputValue.value : cardInfo?.indexNo,
|
|
4872
|
-
pageNumber: pageNumber.value
|
|
4872
|
+
pageNumber: pageNumber.value,
|
|
4873
|
+
menuId: __props.menuId
|
|
4873
4874
|
});
|
|
4874
4875
|
searchLoading.value = false;
|
|
4875
4876
|
if (res?.data) {
|
|
@@ -5376,6 +5377,17 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5376
5377
|
color: colorItem.cssValue
|
|
5377
5378
|
} : {};
|
|
5378
5379
|
};
|
|
5380
|
+
/**
|
|
5381
|
+
* 格式化数据值,如果listFlag为1,则将数组用逗号分隔
|
|
5382
|
+
*/ const formatDataValue = (item)=>{
|
|
5383
|
+
if (item.listFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && item.dataValue) try {
|
|
5384
|
+
const parsedData = JSON.parse(item.dataValue);
|
|
5385
|
+
if (Array.isArray(parsedData)) return parsedData.join(",");
|
|
5386
|
+
} catch (error) {
|
|
5387
|
+
console.error("格式化失败", error);
|
|
5388
|
+
}
|
|
5389
|
+
return item.dataValue || "--";
|
|
5390
|
+
};
|
|
5379
5391
|
function setBizId(data) {
|
|
5380
5392
|
switch(tagBizIdTypeCode){
|
|
5381
5393
|
case PERSON:
|
|
@@ -5591,8 +5603,7 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5591
5603
|
'text-[#555]',
|
|
5592
5604
|
getDynamicCssClasses(item.comptControlCssList)
|
|
5593
5605
|
]),
|
|
5594
|
-
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList))
|
|
5595
|
-
type: ""
|
|
5606
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList))
|
|
5596
5607
|
}, {
|
|
5597
5608
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5598
5609
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.labelNameDisplay) + ":", 1)
|
|
@@ -5605,7 +5616,7 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5605
5616
|
]),
|
|
5606
5617
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTooltip), {
|
|
5607
5618
|
disabled: !isTextOverflowing.value,
|
|
5608
|
-
content: item
|
|
5619
|
+
content: formatDataValue(item)
|
|
5609
5620
|
}, {
|
|
5610
5621
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5611
5622
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_16, [
|
|
@@ -5614,11 +5625,10 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5614
5625
|
'text-[#555]',
|
|
5615
5626
|
getDynamicCssClasses(item.comptControlCssList)
|
|
5616
5627
|
]),
|
|
5617
|
-
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList))
|
|
5618
|
-
type: ""
|
|
5628
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList))
|
|
5619
5629
|
}, {
|
|
5620
5630
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5621
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item
|
|
5631
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(formatDataValue(item)), 1)
|
|
5622
5632
|
]),
|
|
5623
5633
|
_: 2
|
|
5624
5634
|
}, 1032, [
|
|
@@ -8015,11 +8025,13 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8015
8025
|
* @param params
|
|
8016
8026
|
* @returns
|
|
8017
8027
|
*/ const queryBizUnitList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryBizUnitListByExample', params);
|
|
8018
|
-
|
|
8028
|
+
// 全局事件:用于关闭其他实例的 popover
|
|
8029
|
+
const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
|
|
8019
8030
|
96-10014-1 业务单元选择组件
|
|
8020
8031
|
1、调用“1-10516-1 根据条件查询业务单元列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询业务单元列表
|
|
8021
8032
|
2、展示列包括“组织类型、编码、名称”
|
|
8022
|
-
*/
|
|
8033
|
+
*/
|
|
8034
|
+
/* ESM default export */ const biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
8023
8035
|
__name: 'index',
|
|
8024
8036
|
props: {
|
|
8025
8037
|
keyWord: {},
|
|
@@ -8047,6 +8059,8 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8047
8059
|
});
|
|
8048
8060
|
const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
|
|
8049
8061
|
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
|
|
8062
|
+
const instance = (0, __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance)();
|
|
8063
|
+
const componentId = instance?.uid || Math.random(); // 唯一标识当前组件实例
|
|
8050
8064
|
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
8051
8065
|
const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
8052
8066
|
const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
@@ -8260,6 +8274,12 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8260
8274
|
const handleFocus = ()=>{
|
|
8261
8275
|
setTimeout(()=>{
|
|
8262
8276
|
if (clearing.value) return;
|
|
8277
|
+
// 通知其他实例关闭 popover
|
|
8278
|
+
window.dispatchEvent(new CustomEvent(CLOSE_OTHER_POPOVERS_EVENT, {
|
|
8279
|
+
detail: {
|
|
8280
|
+
componentId
|
|
8281
|
+
}
|
|
8282
|
+
}));
|
|
8263
8283
|
popoverVisible.value = true;
|
|
8264
8284
|
}, 100);
|
|
8265
8285
|
};
|
|
@@ -8310,15 +8330,27 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8310
8330
|
selectedValue.value = items.map((row)=>row.label || row.orgNameDisplay);
|
|
8311
8331
|
handleChange();
|
|
8312
8332
|
};
|
|
8313
|
-
const handlePopoverShow = ()=>{
|
|
8333
|
+
const handlePopoverShow = ()=>{
|
|
8334
|
+
window.dispatchEvent(new CustomEvent(CLOSE_OTHER_POPOVERS_EVENT, {
|
|
8335
|
+
detail: {
|
|
8336
|
+
componentId
|
|
8337
|
+
}
|
|
8338
|
+
}));
|
|
8339
|
+
}; // 监听其他实例的关闭事件
|
|
8340
|
+
const handleCloseOtherPopovers = (event)=>{
|
|
8341
|
+
const customEvent = event;
|
|
8342
|
+
if (customEvent.detail?.componentId !== componentId) popoverVisible.value = false;
|
|
8343
|
+
};
|
|
8314
8344
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
8315
8345
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
8316
8346
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8347
|
+
window.removeEventListener(CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
|
|
8317
8348
|
});
|
|
8318
8349
|
const fetchData = async (data)=>{
|
|
8319
8350
|
await getBizUnitList(data);
|
|
8320
8351
|
};
|
|
8321
8352
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
8353
|
+
window.addEventListener(CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
|
|
8322
8354
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
8323
8355
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
8324
8356
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgNameDisplay);
|
|
@@ -9314,6 +9346,423 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
9314
9346
|
});
|
|
9315
9347
|
const ward_select_exports_ = ward_selectvue_type_script_setup_true_lang_tsx_name_WardSelect;
|
|
9316
9348
|
/* ESM default export */ const ward_select = ward_select_exports_;
|
|
9349
|
+
/**
|
|
9350
|
+
* [1-10147-1] 根据条件查询医院的收费项目列表(业务态)
|
|
9351
|
+
* 是否分页 Y
|
|
9352
|
+
* @param params
|
|
9353
|
+
* @returns
|
|
9354
|
+
*/ const queryHospitalChargeItemListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/chargeItem/queryHospitalChargeItemListByExample', params);
|
|
9355
|
+
const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_hoisted_1 = {
|
|
9356
|
+
class: "hospital-charge-select"
|
|
9357
|
+
};
|
|
9358
|
+
const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_hoisted_2 = {
|
|
9359
|
+
class: "popover-content"
|
|
9360
|
+
};
|
|
9361
|
+
// 全局事件:用于关闭其他实例的 popover
|
|
9362
|
+
const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_CLOSE_OTHER_POPOVERS_EVENT = 'hospital-charge-select:close-others';
|
|
9363
|
+
/* ESM default export */ const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
9364
|
+
__name: 'index',
|
|
9365
|
+
props: /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeModels)({
|
|
9366
|
+
hospitalId: {},
|
|
9367
|
+
encounterTypeCode: {},
|
|
9368
|
+
priceAt: {},
|
|
9369
|
+
size: {
|
|
9370
|
+
default: 'default'
|
|
9371
|
+
},
|
|
9372
|
+
immediate: {
|
|
9373
|
+
type: Boolean,
|
|
9374
|
+
default: false
|
|
9375
|
+
},
|
|
9376
|
+
popoverWidth: {
|
|
9377
|
+
default: 1000
|
|
9378
|
+
}
|
|
9379
|
+
}, {
|
|
9380
|
+
modelValue: {},
|
|
9381
|
+
modelModifiers: {}
|
|
9382
|
+
}),
|
|
9383
|
+
emits: /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeModels)([
|
|
9384
|
+
"change"
|
|
9385
|
+
], [
|
|
9386
|
+
"update:modelValue"
|
|
9387
|
+
]),
|
|
9388
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
9389
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.useCssVars)((_ctx)=>({
|
|
9390
|
+
"2f25a0af": dynamicMaxHeight.value + "px"
|
|
9391
|
+
}));
|
|
9392
|
+
const model = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useModel)(__props, "modelValue");
|
|
9393
|
+
const props = __props;
|
|
9394
|
+
const emit = __emit;
|
|
9395
|
+
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
|
|
9396
|
+
const instance = (0, __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance)();
|
|
9397
|
+
const componentId = instance?.uid || Math.random(); // 唯一标识当前组件实例
|
|
9398
|
+
const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
9399
|
+
const inputSearchRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
9400
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
9401
|
+
const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
9402
|
+
const inputValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
|
|
9403
|
+
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
9404
|
+
const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
9405
|
+
const currentRow = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
9406
|
+
const currentRowIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
|
|
9407
|
+
const dynamicMaxHeight = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(300); // 表格列配置
|
|
9408
|
+
const columns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>[
|
|
9409
|
+
{
|
|
9410
|
+
type: 'index',
|
|
9411
|
+
label: '序号',
|
|
9412
|
+
width: 60,
|
|
9413
|
+
align: 'center'
|
|
9414
|
+
},
|
|
9415
|
+
{
|
|
9416
|
+
prop: 'commodityNo',
|
|
9417
|
+
label: '编码',
|
|
9418
|
+
width: 120,
|
|
9419
|
+
showOverflowTooltip: true
|
|
9420
|
+
},
|
|
9421
|
+
{
|
|
9422
|
+
prop: 'commodityNameDisplay',
|
|
9423
|
+
label: '名称',
|
|
9424
|
+
minWidth: 350,
|
|
9425
|
+
showOverflowTooltip: true,
|
|
9426
|
+
render: (row)=>{
|
|
9427
|
+
const hasPrice = null !== row.price && void 0 !== row.price;
|
|
9428
|
+
if (!hasPrice) return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("div", null, [
|
|
9429
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
|
|
9430
|
+
row.commodityNameDisplay
|
|
9431
|
+
]),
|
|
9432
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-text"), {
|
|
9433
|
+
type: "danger",
|
|
9434
|
+
style: "margin-left: 8px;"
|
|
9435
|
+
}, {
|
|
9436
|
+
default: ()=>[
|
|
9437
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon"), null, {
|
|
9438
|
+
default: ()=>[
|
|
9439
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.InfoFilled, null, null)
|
|
9440
|
+
]
|
|
9441
|
+
}),
|
|
9442
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("\u5F53\u524D\u6536\u8D39\u9879\u76EE\u7684\u4EF7\u683C\u6709\u8BEF\uFF0C\u65E0\u6CD5\u9009\u62E9\uFF01")
|
|
9443
|
+
],
|
|
9444
|
+
_: 1
|
|
9445
|
+
})
|
|
9446
|
+
]);
|
|
9447
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
|
|
9448
|
+
row.commodityNameDisplay
|
|
9449
|
+
]);
|
|
9450
|
+
}
|
|
9451
|
+
},
|
|
9452
|
+
{
|
|
9453
|
+
prop: 'commoditySpec',
|
|
9454
|
+
label: '规格',
|
|
9455
|
+
width: 100,
|
|
9456
|
+
showOverflowTooltip: true,
|
|
9457
|
+
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
|
|
9458
|
+
row.commoditySpec || '--'
|
|
9459
|
+
])
|
|
9460
|
+
},
|
|
9461
|
+
{
|
|
9462
|
+
prop: 'price',
|
|
9463
|
+
label: '价格',
|
|
9464
|
+
minWidth: 80,
|
|
9465
|
+
render: (row)=>{
|
|
9466
|
+
const hasPrice = null !== row.price && void 0 !== row.price;
|
|
9467
|
+
if (hasPrice) return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
|
|
9468
|
+
row.price.toFixed(2)
|
|
9469
|
+
]);
|
|
9470
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
|
|
9471
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("--")
|
|
9472
|
+
]);
|
|
9473
|
+
}
|
|
9474
|
+
},
|
|
9475
|
+
{
|
|
9476
|
+
prop: 'unitName',
|
|
9477
|
+
label: '单位',
|
|
9478
|
+
width: 60,
|
|
9479
|
+
align: 'center'
|
|
9480
|
+
}
|
|
9481
|
+
]); // 判断行是否可选择(价格有效才能选择)
|
|
9482
|
+
const isRowSelectable = (row)=>null !== row.price && void 0 !== row.price; // 获取行的class名称(用于置灰不可选择的行)
|
|
9483
|
+
const getRowClassName = ({ row })=>{
|
|
9484
|
+
if (!isRowSelectable(row)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
|
|
9485
|
+
return 'cursor-pointer';
|
|
9486
|
+
}; // 查询收费项目列表
|
|
9487
|
+
const fetchChargeItems = async (keyword)=>{
|
|
9488
|
+
if (!props.hospitalId || !props.priceAt) {
|
|
9489
|
+
console.warn('hospitalId and priceAt are required');
|
|
9490
|
+
return;
|
|
9491
|
+
}
|
|
9492
|
+
loading.value = true;
|
|
9493
|
+
try {
|
|
9494
|
+
const params = {
|
|
9495
|
+
hospitalId: props.hospitalId,
|
|
9496
|
+
priceAt: props.priceAt,
|
|
9497
|
+
keyWord: keyword || void 0,
|
|
9498
|
+
encounterTypeCode: props.encounterTypeCode
|
|
9499
|
+
};
|
|
9500
|
+
const [error, result] = await queryHospitalChargeItemListByExample(params);
|
|
9501
|
+
if (!error && result) {
|
|
9502
|
+
tableData.value = result.data || [];
|
|
9503
|
+
currentRowIndex.value = -1;
|
|
9504
|
+
tableRef.value?.proTableRef?.setCurrentRow?.(void 0);
|
|
9505
|
+
} else tableData.value = [];
|
|
9506
|
+
} catch (error) {
|
|
9507
|
+
console.error('Failed to fetch hospital charge items:', error);
|
|
9508
|
+
tableData.value = [];
|
|
9509
|
+
} finally{
|
|
9510
|
+
loading.value = false;
|
|
9511
|
+
}
|
|
9512
|
+
}; // 处理输入框输入
|
|
9513
|
+
const handleInput = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(v) {
|
|
9514
|
+
await fetchChargeItems(v);
|
|
9515
|
+
popoverVisible.value = true;
|
|
9516
|
+
}, 500); // 处理行点击
|
|
9517
|
+
const handleRowClick = (row)=>{
|
|
9518
|
+
if (!isRowSelectable(row)) {
|
|
9519
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('当前收费项目价格有误,无法选择!');
|
|
9520
|
+
return;
|
|
9521
|
+
} // 如果点击的是当前已选中的行,则取消选择
|
|
9522
|
+
if (currentRow.value && row.hospitalCommodityId === currentRow.value.hospitalCommodityId) {
|
|
9523
|
+
currentRow.value = void 0;
|
|
9524
|
+
model.value = void 0;
|
|
9525
|
+
tableRef.value?.proTableRef?.setCurrentRow(void 0); // 清空时,先 emit 事件再关闭 popover
|
|
9526
|
+
emit('change', void 0);
|
|
9527
|
+
} else {
|
|
9528
|
+
currentRow.value = row;
|
|
9529
|
+
model.value = row; // 选择时,先 emit 事件再关闭 popover
|
|
9530
|
+
emit('change', row);
|
|
9531
|
+
} // 单选模式下选择后关闭popover
|
|
9532
|
+
popoverVisible.value = false;
|
|
9533
|
+
}; // 计算动态最大高度
|
|
9534
|
+
const calculateDynamicMaxHeight = ()=>{
|
|
9535
|
+
const input = inputSearchRef.value?.$el;
|
|
9536
|
+
if (!input) return 300;
|
|
9537
|
+
const inputRect = input.getBoundingClientRect();
|
|
9538
|
+
const viewportHeight = window.innerHeight;
|
|
9539
|
+
const padding = 32; // 上下padding总和
|
|
9540
|
+
// 计算下方和上方的可用空间
|
|
9541
|
+
const spaceBelow = viewportHeight - inputRect.bottom - padding;
|
|
9542
|
+
const spaceAbove = inputRect.top - padding; // 取两者中较大的一个,但不超过400px,不小于200px
|
|
9543
|
+
const availableSpace = Math.max(spaceBelow, spaceAbove);
|
|
9544
|
+
const maxHeight = Math.min(Math.max(availableSpace, 200), 400);
|
|
9545
|
+
dynamicMaxHeight.value = Math.floor(maxHeight);
|
|
9546
|
+
}; // 切换popover显示
|
|
9547
|
+
const toggleVisible = ()=>{
|
|
9548
|
+
window.dispatchEvent(new CustomEvent(hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_CLOSE_OTHER_POPOVERS_EVENT, {
|
|
9549
|
+
detail: {
|
|
9550
|
+
componentId
|
|
9551
|
+
}
|
|
9552
|
+
})); // 计算动态高度
|
|
9553
|
+
calculateDynamicMaxHeight();
|
|
9554
|
+
popoverVisible.value = true;
|
|
9555
|
+
if (popoverVisible.value) fetchChargeItems(inputValue.value);
|
|
9556
|
+
}; // 点击外部关闭popover
|
|
9557
|
+
const handleClickOutside = (e)=>{
|
|
9558
|
+
if (e.target === inputSearchRef.value?.$el) return;
|
|
9559
|
+
popoverVisible.value = false;
|
|
9560
|
+
}; // 重置
|
|
9561
|
+
const reset = ()=>{
|
|
9562
|
+
inputValue.value = '';
|
|
9563
|
+
model.value = void 0;
|
|
9564
|
+
currentRow.value = void 0;
|
|
9565
|
+
tableData.value = [];
|
|
9566
|
+
}; // 清空输入
|
|
9567
|
+
const handleClear = ()=>{
|
|
9568
|
+
reset();
|
|
9569
|
+
emit('change', void 0);
|
|
9570
|
+
}; // 滚动到当前选中行
|
|
9571
|
+
const scrollToCurrentRow = ()=>{
|
|
9572
|
+
setTimeout(()=>{
|
|
9573
|
+
if (currentRowIndex.value < 0) return;
|
|
9574
|
+
try {
|
|
9575
|
+
const tableElement = tableRef.value?.proTableRef?.$el;
|
|
9576
|
+
if (!tableElement) return; // 查找当前高亮的行
|
|
9577
|
+
const currentRowElement = tableElement.querySelector('.el-table__body tr.current-row');
|
|
9578
|
+
if (!currentRowElement) return; // 使用 scrollIntoView 方法滚动到当前行
|
|
9579
|
+
currentRowElement.scrollIntoView({
|
|
9580
|
+
block: 'nearest',
|
|
9581
|
+
behavior: 'smooth'
|
|
9582
|
+
});
|
|
9583
|
+
} catch (error) {
|
|
9584
|
+
console.error('Error scrolling to current row:', error);
|
|
9585
|
+
}
|
|
9586
|
+
}, 100);
|
|
9587
|
+
}; // 键盘事件
|
|
9588
|
+
const handleKeydown = (e)=>{
|
|
9589
|
+
if (!tableData.value.length || !popoverVisible.value) return;
|
|
9590
|
+
if ('ArrowDown' === e.key) {
|
|
9591
|
+
e.preventDefault(); // 向下查找下一个可选择的行
|
|
9592
|
+
let nextIndex = currentRowIndex.value + 1;
|
|
9593
|
+
while(nextIndex < tableData.value.length){
|
|
9594
|
+
if (isRowSelectable(tableData.value[nextIndex])) {
|
|
9595
|
+
currentRowIndex.value = nextIndex;
|
|
9596
|
+
tableRef.value?.proTableRef?.setCurrentRow(tableData.value[nextIndex]);
|
|
9597
|
+
scrollToCurrentRow();
|
|
9598
|
+
break;
|
|
9599
|
+
}
|
|
9600
|
+
nextIndex++;
|
|
9601
|
+
}
|
|
9602
|
+
} else if ('ArrowUp' === e.key) {
|
|
9603
|
+
e.preventDefault(); // 向上查找上一个可选择的行
|
|
9604
|
+
let prevIndex = currentRowIndex.value - 1;
|
|
9605
|
+
while(prevIndex >= 0){
|
|
9606
|
+
if (isRowSelectable(tableData.value[prevIndex])) {
|
|
9607
|
+
currentRowIndex.value = prevIndex;
|
|
9608
|
+
tableRef.value?.proTableRef?.setCurrentRow(tableData.value[prevIndex]);
|
|
9609
|
+
scrollToCurrentRow();
|
|
9610
|
+
break;
|
|
9611
|
+
}
|
|
9612
|
+
prevIndex--;
|
|
9613
|
+
}
|
|
9614
|
+
} else if ('Enter' === e.key && currentRowIndex.value >= 0) {
|
|
9615
|
+
e.preventDefault();
|
|
9616
|
+
const row = tableData.value[currentRowIndex.value];
|
|
9617
|
+
handleRowClick(row);
|
|
9618
|
+
}
|
|
9619
|
+
}; // 监听popover显示状态,管理键盘事件监听器
|
|
9620
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
|
|
9621
|
+
if (val) document.addEventListener('keydown', handleKeydown, true);
|
|
9622
|
+
else document.removeEventListener('keydown', handleKeydown, true);
|
|
9623
|
+
}); // 监听其他实例的关闭事件
|
|
9624
|
+
const handleCloseOtherPopovers = (event)=>{
|
|
9625
|
+
const customEvent = event;
|
|
9626
|
+
if (customEvent.detail?.componentId !== componentId) popoverVisible.value = false;
|
|
9627
|
+
}; // 根据ID获取收费项目详情(用于回显)
|
|
9628
|
+
const fetchItemById = async (hospitalCommodityId)=>{
|
|
9629
|
+
if (!props.hospitalId || !props.priceAt) {
|
|
9630
|
+
console.warn('hospitalId and priceAt are required for fetching item details');
|
|
9631
|
+
return;
|
|
9632
|
+
}
|
|
9633
|
+
try {
|
|
9634
|
+
const params = {
|
|
9635
|
+
hospitalId: props.hospitalId,
|
|
9636
|
+
priceAt: props.priceAt,
|
|
9637
|
+
hospitalCommodityIds: [
|
|
9638
|
+
hospitalCommodityId
|
|
9639
|
+
],
|
|
9640
|
+
encounterTypeCode: props.encounterTypeCode
|
|
9641
|
+
};
|
|
9642
|
+
const [error, result] = await queryHospitalChargeItemListByExample(params);
|
|
9643
|
+
if (!error && result?.data && result.data.length > 0) {
|
|
9644
|
+
const item = result.data[0]; // 更新model为完整数据
|
|
9645
|
+
model.value = item;
|
|
9646
|
+
currentRow.value = item;
|
|
9647
|
+
inputValue.value = item.commodityNameDisplay || '';
|
|
9648
|
+
}
|
|
9649
|
+
} catch (error) {
|
|
9650
|
+
console.error('Failed to fetch hospital charge item by id:', error);
|
|
9651
|
+
}
|
|
9652
|
+
}; // 监听model变化,更新输入框显示
|
|
9653
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>model.value, (newValue)=>{
|
|
9654
|
+
if (newValue) {
|
|
9655
|
+
if (newValue.commodityNameDisplay) {
|
|
9656
|
+
inputValue.value = newValue.commodityNameDisplay;
|
|
9657
|
+
currentRow.value = newValue;
|
|
9658
|
+
} else if (newValue.hospitalCommodityId) fetchItemById(newValue.hospitalCommodityId);
|
|
9659
|
+
} else {
|
|
9660
|
+
inputValue.value = '';
|
|
9661
|
+
currentRow.value = void 0;
|
|
9662
|
+
}
|
|
9663
|
+
}, {
|
|
9664
|
+
immediate: true
|
|
9665
|
+
}); // 监听窗口大小变化和滚动事件,重新计算动态高度
|
|
9666
|
+
const handleResize = ()=>{
|
|
9667
|
+
if (popoverVisible.value) calculateDynamicMaxHeight();
|
|
9668
|
+
}; // 组件挂载时如果immediate为true则立即查询
|
|
9669
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
9670
|
+
window.addEventListener(hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers); // 监听窗口大小变化和滚动
|
|
9671
|
+
window.addEventListener('resize', handleResize);
|
|
9672
|
+
window.addEventListener('scroll', handleResize, true);
|
|
9673
|
+
if (props.immediate) fetchChargeItems();
|
|
9674
|
+
});
|
|
9675
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
9676
|
+
document.removeEventListener('keydown', handleKeydown, true);
|
|
9677
|
+
window.removeEventListener(hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
|
|
9678
|
+
window.removeEventListener('resize', handleResize);
|
|
9679
|
+
window.removeEventListener('scroll', handleResize, true);
|
|
9680
|
+
});
|
|
9681
|
+
__expose({
|
|
9682
|
+
reset,
|
|
9683
|
+
fetchChargeItems,
|
|
9684
|
+
tableRef,
|
|
9685
|
+
popoverRef
|
|
9686
|
+
});
|
|
9687
|
+
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_hoisted_1, [
|
|
9688
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInput), {
|
|
9689
|
+
ref_key: "inputSearchRef",
|
|
9690
|
+
ref: inputSearchRef,
|
|
9691
|
+
modelValue: inputValue.value,
|
|
9692
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>inputValue.value = $event),
|
|
9693
|
+
class: "input",
|
|
9694
|
+
"prefix-icon": "Search",
|
|
9695
|
+
size: _ctx.size,
|
|
9696
|
+
placeholder: "请输入搜索内容",
|
|
9697
|
+
clearable: "",
|
|
9698
|
+
onKeydownCapture: _cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.withKeys)((0, __WEBPACK_EXTERNAL_MODULE_vue__.withModifiers)(()=>{}, [
|
|
9699
|
+
"prevent"
|
|
9700
|
+
]), [
|
|
9701
|
+
"enter"
|
|
9702
|
+
])),
|
|
9703
|
+
onClickCapture: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withModifiers)(toggleVisible, [
|
|
9704
|
+
"prevent"
|
|
9705
|
+
]),
|
|
9706
|
+
onInput: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handleInput),
|
|
9707
|
+
onClear: handleClear
|
|
9708
|
+
}, null, 8, [
|
|
9709
|
+
"modelValue",
|
|
9710
|
+
"size",
|
|
9711
|
+
"onInput"
|
|
9712
|
+
]),
|
|
9713
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElPopover), {
|
|
9714
|
+
ref_key: "popoverRef",
|
|
9715
|
+
ref: popoverRef,
|
|
9716
|
+
width: _ctx.popoverWidth,
|
|
9717
|
+
visible: popoverVisible.value,
|
|
9718
|
+
"virtual-ref": inputSearchRef.value,
|
|
9719
|
+
"virtual-triggering": "",
|
|
9720
|
+
teleported: true,
|
|
9721
|
+
"popper-class": "hospital-charge-select-popover",
|
|
9722
|
+
placement: "top"
|
|
9723
|
+
}, {
|
|
9724
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
9725
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_hoisted_2, [
|
|
9726
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), {
|
|
9727
|
+
ref_key: "tableRef",
|
|
9728
|
+
ref: tableRef,
|
|
9729
|
+
columns: columns.value,
|
|
9730
|
+
data: tableData.value,
|
|
9731
|
+
loading: loading.value,
|
|
9732
|
+
"max-height": dynamicMaxHeight.value,
|
|
9733
|
+
"row-key": 'hospitalCommodityId',
|
|
9734
|
+
"highlight-current-row": true,
|
|
9735
|
+
"row-class-name": getRowClassName,
|
|
9736
|
+
onRowClick: handleRowClick
|
|
9737
|
+
}, null, 8, [
|
|
9738
|
+
"columns",
|
|
9739
|
+
"data",
|
|
9740
|
+
"loading",
|
|
9741
|
+
"max-height"
|
|
9742
|
+
])
|
|
9743
|
+
])), [
|
|
9744
|
+
[
|
|
9745
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ClickOutside),
|
|
9746
|
+
handleClickOutside
|
|
9747
|
+
]
|
|
9748
|
+
])
|
|
9749
|
+
]),
|
|
9750
|
+
_: 1
|
|
9751
|
+
}, 8, [
|
|
9752
|
+
"width",
|
|
9753
|
+
"visible",
|
|
9754
|
+
"virtual-ref"
|
|
9755
|
+
])
|
|
9756
|
+
]));
|
|
9757
|
+
}
|
|
9758
|
+
});
|
|
9759
|
+
const hospital_charge_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect, [
|
|
9760
|
+
[
|
|
9761
|
+
'__scopeId',
|
|
9762
|
+
"data-v-ffb2d000"
|
|
9763
|
+
]
|
|
9764
|
+
]);
|
|
9765
|
+
/* ESM default export */ const hospital_charge_select = hospital_charge_select_exports_;
|
|
9317
9766
|
const FormUnitvue_type_script_setup_true_lang_ts_name_formUnit_hoisted_1 = {
|
|
9318
9767
|
key: 1,
|
|
9319
9768
|
class: "overflow-hidden"
|
|
@@ -12523,4 +12972,4 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
|
|
|
12523
12972
|
]);
|
|
12524
12973
|
/* ESM default export */ const form_design_render = form_design_render_exports_;
|
|
12525
12974
|
/** components **/ /** hooks ** */ var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
|
|
12526
|
-
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 };
|
|
12975
|
+
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_charge_select as HospitalChargeSelect, 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 };
|
|
@@ -21,6 +21,40 @@
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
+
.hospital-charge-select[data-v-ffb2d000] {
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
.hospital-charge-select .input[data-v-ffb2d000] .el-input__inner {
|
|
28
|
+
cursor: pointer !important;
|
|
29
|
+
}
|
|
30
|
+
[data-v-ffb2d000] .hospital-charge-select-popover {
|
|
31
|
+
max-height: var(--5aebc6cb);
|
|
32
|
+
padding: 0;
|
|
33
|
+
z-index: 9999 !important;
|
|
34
|
+
}
|
|
35
|
+
[data-v-ffb2d000] .hospital-charge-select-popover .popover-content {
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
max-height: var(--5aebc6cb);
|
|
39
|
+
}
|
|
40
|
+
[data-v-ffb2d000] .hospital-charge-select-popover .el-table__row.cursor-not-allowed {
|
|
41
|
+
color: #c0c4cc;
|
|
42
|
+
cursor: not-allowed !important;
|
|
43
|
+
background-color: #f5f7fa !important;
|
|
44
|
+
}
|
|
45
|
+
[data-v-ffb2d000] .hospital-charge-select-popover .el-table__row.cursor-not-allowed td {
|
|
46
|
+
background-color: #f5f7fa !important;
|
|
47
|
+
}
|
|
48
|
+
[data-v-ffb2d000] .hospital-charge-select-popover .el-table__row.cursor-not-allowed:hover > td {
|
|
49
|
+
background-color: #f5f7fa !important;
|
|
50
|
+
}
|
|
51
|
+
.hospital-charge-select-popover {
|
|
52
|
+
margin-bottom: 8px !important;
|
|
53
|
+
}
|
|
54
|
+
.hospital-charge-select-popover {
|
|
55
|
+
margin-top: 8px !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
24
58
|
.input[data-v-9f70929c] .el-input__inner {
|
|
25
59
|
cursor: pointer !important;
|
|
26
60
|
}
|