sun-biz 0.0.4-beta.45 → 0.0.4-beta.46
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 +37 -8
- package/dist/index.js +37 -8
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -7351,9 +7351,9 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7351
7351
|
*/ const queryBizUnitList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryBizUnitListByExample', params);
|
|
7352
7352
|
// 全局事件:用于关闭其他实例的 popover
|
|
7353
7353
|
const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7354
|
+
96-10014-1 业务单元选择组件
|
|
7355
|
+
1、调用“1-10516-1 根据条件查询业务单元列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询业务单元列表
|
|
7356
|
+
2、展示列包括“组织类型、编码、名称”
|
|
7357
7357
|
*/
|
|
7358
7358
|
/* ESM default export */ const biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
7359
7359
|
__name: 'index',
|
|
@@ -7619,16 +7619,44 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
|
|
|
7619
7619
|
const handleClickOutside = (e)=>{
|
|
7620
7620
|
const target = e.target;
|
|
7621
7621
|
const selectEl = selectRef.value?.$el;
|
|
7622
|
-
const popoverEl = popoverRef.value?.popperRef?.contentRef;
|
|
7623
|
-
if (
|
|
7622
|
+
const popoverEl = popoverRef.value?.popperRef?.contentRef; // 检查是否点击了当前组件的元素
|
|
7623
|
+
if (selectEl?.contains(target) || popoverEl?.contains(target)) return;
|
|
7624
|
+
// 检查是否点击了其他 el-select 或其下拉框
|
|
7625
|
+
let element = target;
|
|
7626
|
+
while(element){
|
|
7627
|
+
if (element.classList?.contains('el-select') || element.classList?.contains('el-select-dropdown') || element.classList?.contains('el-popper') || element.classList?.contains('el-picker-panel') || element.classList?.contains('el-date-picker') || element.classList?.contains('el-time-picker')) {
|
|
7628
|
+
popoverVisible.value = false;
|
|
7629
|
+
return;
|
|
7630
|
+
}
|
|
7631
|
+
element = element.parentElement;
|
|
7632
|
+
} // 点击了其他地方,关闭 popover
|
|
7633
|
+
popoverVisible.value = false;
|
|
7634
|
+
}; // 监听 el-select 的 focus 事件来关闭当前 popover
|
|
7635
|
+
const handleGlobalFocusin = (e)=>{
|
|
7636
|
+
if (!popoverVisible.value) return;
|
|
7637
|
+
const target = e.target;
|
|
7638
|
+
const selectEl = selectRef.value?.$el;
|
|
7639
|
+
const popoverEl = popoverRef.value?.popperRef?.contentRef; // 如果焦点移到了其他元素(如其他 el-select),则关闭当前 popover
|
|
7640
|
+
if (!selectEl?.contains(target) && !popoverEl?.contains(target)) {
|
|
7641
|
+
let element = target;
|
|
7642
|
+
while(element){
|
|
7643
|
+
if (element.classList?.contains('el-select') || element.classList?.contains('el-input')) {
|
|
7644
|
+
popoverVisible.value = false;
|
|
7645
|
+
return;
|
|
7646
|
+
}
|
|
7647
|
+
element = element.parentElement;
|
|
7648
|
+
}
|
|
7649
|
+
}
|
|
7624
7650
|
};
|
|
7625
7651
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
|
|
7626
7652
|
if (val) {
|
|
7627
7653
|
document.addEventListener('keydown', handleKeydown, true);
|
|
7628
|
-
|
|
7654
|
+
document.addEventListener('click', handleClickOutside);
|
|
7655
|
+
document.addEventListener('focusin', handleGlobalFocusin, true);
|
|
7629
7656
|
} else {
|
|
7630
7657
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
7631
|
-
|
|
7658
|
+
document.removeEventListener('click', handleClickOutside);
|
|
7659
|
+
document.removeEventListener('focusin', handleGlobalFocusin, true);
|
|
7632
7660
|
}
|
|
7633
7661
|
});
|
|
7634
7662
|
const handleTableRowSelect = (data)=>{
|
|
@@ -7667,7 +7695,8 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
|
|
|
7667
7695
|
};
|
|
7668
7696
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
7669
7697
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
7670
|
-
|
|
7698
|
+
document.removeEventListener('click', handleClickOutside);
|
|
7699
|
+
document.removeEventListener('focusin', handleGlobalFocusin, true);
|
|
7671
7700
|
window.removeEventListener(CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
|
|
7672
7701
|
});
|
|
7673
7702
|
const fetchData = async (data)=>{
|
package/dist/index.js
CHANGED
|
@@ -8027,9 +8027,9 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8027
8027
|
*/ const queryBizUnitList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryBizUnitListByExample', params);
|
|
8028
8028
|
// 全局事件:用于关闭其他实例的 popover
|
|
8029
8029
|
const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8030
|
+
96-10014-1 业务单元选择组件
|
|
8031
|
+
1、调用“1-10516-1 根据条件查询业务单元列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询业务单元列表
|
|
8032
|
+
2、展示列包括“组织类型、编码、名称”
|
|
8033
8033
|
*/
|
|
8034
8034
|
/* ESM default export */ const biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
8035
8035
|
__name: 'index',
|
|
@@ -8295,16 +8295,44 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
|
|
|
8295
8295
|
const handleClickOutside = (e)=>{
|
|
8296
8296
|
const target = e.target;
|
|
8297
8297
|
const selectEl = selectRef.value?.$el;
|
|
8298
|
-
const popoverEl = popoverRef.value?.popperRef?.contentRef;
|
|
8299
|
-
if (
|
|
8298
|
+
const popoverEl = popoverRef.value?.popperRef?.contentRef; // 检查是否点击了当前组件的元素
|
|
8299
|
+
if (selectEl?.contains(target) || popoverEl?.contains(target)) return;
|
|
8300
|
+
// 检查是否点击了其他 el-select 或其下拉框
|
|
8301
|
+
let element = target;
|
|
8302
|
+
while(element){
|
|
8303
|
+
if (element.classList?.contains('el-select') || element.classList?.contains('el-select-dropdown') || element.classList?.contains('el-popper') || element.classList?.contains('el-picker-panel') || element.classList?.contains('el-date-picker') || element.classList?.contains('el-time-picker')) {
|
|
8304
|
+
popoverVisible.value = false;
|
|
8305
|
+
return;
|
|
8306
|
+
}
|
|
8307
|
+
element = element.parentElement;
|
|
8308
|
+
} // 点击了其他地方,关闭 popover
|
|
8309
|
+
popoverVisible.value = false;
|
|
8310
|
+
}; // 监听 el-select 的 focus 事件来关闭当前 popover
|
|
8311
|
+
const handleGlobalFocusin = (e)=>{
|
|
8312
|
+
if (!popoverVisible.value) return;
|
|
8313
|
+
const target = e.target;
|
|
8314
|
+
const selectEl = selectRef.value?.$el;
|
|
8315
|
+
const popoverEl = popoverRef.value?.popperRef?.contentRef; // 如果焦点移到了其他元素(如其他 el-select),则关闭当前 popover
|
|
8316
|
+
if (!selectEl?.contains(target) && !popoverEl?.contains(target)) {
|
|
8317
|
+
let element = target;
|
|
8318
|
+
while(element){
|
|
8319
|
+
if (element.classList?.contains('el-select') || element.classList?.contains('el-input')) {
|
|
8320
|
+
popoverVisible.value = false;
|
|
8321
|
+
return;
|
|
8322
|
+
}
|
|
8323
|
+
element = element.parentElement;
|
|
8324
|
+
}
|
|
8325
|
+
}
|
|
8300
8326
|
};
|
|
8301
8327
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
|
|
8302
8328
|
if (val) {
|
|
8303
8329
|
document.addEventListener('keydown', handleKeydown, true);
|
|
8304
|
-
|
|
8330
|
+
document.addEventListener('click', handleClickOutside);
|
|
8331
|
+
document.addEventListener('focusin', handleGlobalFocusin, true);
|
|
8305
8332
|
} else {
|
|
8306
8333
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
8307
|
-
|
|
8334
|
+
document.removeEventListener('click', handleClickOutside);
|
|
8335
|
+
document.removeEventListener('focusin', handleGlobalFocusin, true);
|
|
8308
8336
|
}
|
|
8309
8337
|
});
|
|
8310
8338
|
const handleTableRowSelect = (data)=>{
|
|
@@ -8343,7 +8371,8 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
|
|
|
8343
8371
|
};
|
|
8344
8372
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
8345
8373
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
8346
|
-
|
|
8374
|
+
document.removeEventListener('click', handleClickOutside);
|
|
8375
|
+
document.removeEventListener('focusin', handleGlobalFocusin, true);
|
|
8347
8376
|
window.removeEventListener(CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
|
|
8348
8377
|
});
|
|
8349
8378
|
const fetchData = async (data)=>{
|