sun-biz 0.0.4-beta.26 → 0.0.4-beta.28
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 +170 -150
- package/dist/components/print/hooks/index.d.ts +1 -0
- package/dist/directives/index.d.ts +1 -1
- package/dist/directives/shortcut.d.ts +4 -1
- package/dist/hooks/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +178 -153
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -580,11 +580,11 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
580
580
|
const changeSort = debounce(changeInputSort, 1200);
|
|
581
581
|
return [
|
|
582
582
|
{
|
|
583
|
-
label:
|
|
584
|
-
prop:
|
|
583
|
+
label: "列名称",
|
|
584
|
+
prop: "label",
|
|
585
585
|
minWidth: 170,
|
|
586
586
|
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("div", {
|
|
587
|
-
class:
|
|
587
|
+
class: "cursor-pointer",
|
|
588
588
|
onClick: (event)=>{
|
|
589
589
|
event.stopPropagation();
|
|
590
590
|
switch(row.ascendFlag){
|
|
@@ -604,10 +604,10 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
604
604
|
class: "caret-wrapper"
|
|
605
605
|
}, [
|
|
606
606
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
|
|
607
|
-
class: `sort-caret ascending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES ?
|
|
607
|
+
class: `sort-caret ascending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES ? "!border-b-blue-500" : ""}`
|
|
608
608
|
}, null),
|
|
609
609
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
|
|
610
|
-
class: `sort-caret descending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO ?
|
|
610
|
+
class: `sort-caret descending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO ? "!border-t-blue-500" : ""}`
|
|
611
611
|
}, null)
|
|
612
612
|
])
|
|
613
613
|
], 8, [
|
|
@@ -615,53 +615,54 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
615
615
|
])
|
|
616
616
|
},
|
|
617
617
|
{
|
|
618
|
-
label:
|
|
619
|
-
prop:
|
|
618
|
+
label: "属性",
|
|
619
|
+
prop: "prop",
|
|
620
620
|
supportCopyAndTips: true,
|
|
621
621
|
minWidth: 170
|
|
622
622
|
},
|
|
623
623
|
{
|
|
624
|
-
label:
|
|
625
|
-
prop:
|
|
624
|
+
label: "显示标志",
|
|
625
|
+
prop: "displayFlag",
|
|
626
626
|
minWidth: 170,
|
|
627
627
|
editable: true,
|
|
628
628
|
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElCheckbox, {
|
|
629
|
-
class:
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
size:
|
|
629
|
+
class: "w-full justify-center",
|
|
630
|
+
"true-value": 1,
|
|
631
|
+
"false-value": 0,
|
|
632
|
+
size: "small",
|
|
633
633
|
modelValue: row.displayFlag,
|
|
634
|
-
|
|
634
|
+
"onUpdate:modelValue": (value)=>row.displayFlag = value
|
|
635
635
|
})
|
|
636
636
|
},
|
|
637
637
|
{
|
|
638
|
-
label:
|
|
639
|
-
prop:
|
|
638
|
+
label: "列宽 (最小值)",
|
|
639
|
+
prop: "minWidth",
|
|
640
640
|
minWidth: 170,
|
|
641
641
|
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInputNumber, {
|
|
642
642
|
maxLength: 16,
|
|
643
643
|
min: 0,
|
|
644
|
+
precision: 0,
|
|
644
645
|
modelValue: row.minWidth,
|
|
645
|
-
|
|
646
|
-
size:
|
|
647
|
-
placeholder:
|
|
646
|
+
"onUpdate:modelValue": (value)=>row.minWidth = value,
|
|
647
|
+
size: "small",
|
|
648
|
+
placeholder: "请输入列宽 (最小值)"
|
|
648
649
|
})
|
|
649
650
|
},
|
|
650
651
|
{
|
|
651
|
-
label:
|
|
652
|
-
prop:
|
|
652
|
+
label: "列排序",
|
|
653
|
+
prop: "sort",
|
|
653
654
|
minWidth: 170,
|
|
654
655
|
render: (row, index)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInputNumber, {
|
|
655
656
|
max: length,
|
|
656
657
|
min: 0,
|
|
657
658
|
modelValue: row.sort,
|
|
658
659
|
disabled: disabledDraggable.value,
|
|
659
|
-
|
|
660
|
+
"onUpdate:modelValue": (value)=>row.sort = value,
|
|
660
661
|
onInput: (sort)=>{
|
|
661
662
|
changeSort(index, sort);
|
|
662
663
|
},
|
|
663
|
-
size:
|
|
664
|
-
placeholder:
|
|
664
|
+
size: "small",
|
|
665
|
+
placeholder: "请输入排序"
|
|
665
666
|
})
|
|
666
667
|
}
|
|
667
668
|
];
|
|
@@ -1689,7 +1690,6 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1689
1690
|
}),
|
|
1690
1691
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", null, [
|
|
1691
1692
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(pro_table, {
|
|
1692
|
-
disabled: "",
|
|
1693
1693
|
"columns-setting": {
|
|
1694
1694
|
disabled: true
|
|
1695
1695
|
},
|
|
@@ -1829,7 +1829,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1829
1829
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1830
1830
|
[
|
|
1831
1831
|
'__scopeId',
|
|
1832
|
-
"data-v-
|
|
1832
|
+
"data-v-c49e91ea"
|
|
1833
1833
|
]
|
|
1834
1834
|
]);
|
|
1835
1835
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -4654,6 +4654,7 @@ const isOptionDisabled = (tagId, selectList)=>selectList.includes(tagId);
|
|
|
4654
4654
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>innerValue.value = $event),
|
|
4655
4655
|
multiple: props.multiple ?? true,
|
|
4656
4656
|
filterable: "",
|
|
4657
|
+
clearable: "",
|
|
4657
4658
|
disabled: props.disabled ?? false,
|
|
4658
4659
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(selectClass.value),
|
|
4659
4660
|
placeholder: props.placeholder ?? '请选择',
|
|
@@ -4909,6 +4910,7 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
4909
4910
|
return (_ctx, _cache)=>{
|
|
4910
4911
|
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
4911
4912
|
const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
|
|
4913
|
+
const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
|
|
4912
4914
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
4913
4915
|
ref_key: "containerRef",
|
|
4914
4916
|
ref: containerRef,
|
|
@@ -4921,7 +4923,10 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
4921
4923
|
key: item,
|
|
4922
4924
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
4923
4925
|
background: allTagsMap.value.get(item)?.background,
|
|
4924
|
-
color: allTagsMap.value.get(item)?.color
|
|
4926
|
+
color: allTagsMap.value.get(item)?.color,
|
|
4927
|
+
borderColor: allTagsMap.value.get(item)?.color,
|
|
4928
|
+
'--el-tag-text-color': allTagsMap.value.get(item)?.color,
|
|
4929
|
+
'--el-tag-hover-color': allTagsMap.value.get(item)?.color
|
|
4925
4930
|
}),
|
|
4926
4931
|
closable: !props.disabled,
|
|
4927
4932
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
@@ -4967,7 +4972,10 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
4967
4972
|
key: item,
|
|
4968
4973
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
4969
4974
|
background: allTagsMap.value.get(item)?.background,
|
|
4970
|
-
color: allTagsMap.value.get(item)?.color
|
|
4975
|
+
color: allTagsMap.value.get(item)?.color,
|
|
4976
|
+
borderColor: allTagsMap.value.get(item)?.color,
|
|
4977
|
+
'--el-tag-text-color': allTagsMap.value.get(item)?.color,
|
|
4978
|
+
'--el-tag-hover-color': allTagsMap.value.get(item)?.color
|
|
4971
4979
|
}),
|
|
4972
4980
|
closable: !props.disabled,
|
|
4973
4981
|
size: props.tagSize,
|
|
@@ -5023,9 +5031,16 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
5023
5031
|
}),
|
|
5024
5032
|
onClick: showSelect
|
|
5025
5033
|
}, {
|
|
5026
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>
|
|
5027
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
5028
|
-
|
|
5034
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5035
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_icon, null, {
|
|
5036
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5037
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.Plus), {
|
|
5038
|
+
class: "text-primary"
|
|
5039
|
+
})
|
|
5040
|
+
]),
|
|
5041
|
+
_: 1
|
|
5042
|
+
})
|
|
5043
|
+
]),
|
|
5029
5044
|
_: 1
|
|
5030
5045
|
}, 8, [
|
|
5031
5046
|
"class"
|
|
@@ -5174,7 +5189,8 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5174
5189
|
}
|
|
5175
5190
|
const [, res] = await getBannerDataByBizId({
|
|
5176
5191
|
menuId: __props.menuId,
|
|
5177
|
-
|
|
5192
|
+
designFlag: __props.bizId ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO : void 0,
|
|
5193
|
+
bizId: __props.bizId ? __props.bizId : "0",
|
|
5178
5194
|
bizIdTypeCode: BANNER_COMPONENT_CONFIG[__props.code].bizIdTypeCode,
|
|
5179
5195
|
componentId: BANNER_COMPONENT_CONFIG[__props.code].componentId
|
|
5180
5196
|
});
|
|
@@ -5774,12 +5790,6 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
5774
5790
|
* type 数据源格式类型代码
|
|
5775
5791
|
* @param [type='BASE64']
|
|
5776
5792
|
*/ function useWebPrint(content, type = constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
|
|
5777
|
-
const isFirefox = navigator.userAgent.includes("Firefox");
|
|
5778
|
-
if (isFirefox) {
|
|
5779
|
-
// Firefox 的特殊处理
|
|
5780
|
-
handleFirefoxPrint(content, type);
|
|
5781
|
-
return;
|
|
5782
|
-
}
|
|
5783
5793
|
// 创建隐藏的iframe
|
|
5784
5794
|
const iframe = document.createElement("iframe");
|
|
5785
5795
|
iframe.style.position = "fixed";
|
|
@@ -5790,9 +5800,28 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
5790
5800
|
iframe.style.border = "0";
|
|
5791
5801
|
iframe.style.visibility = "hidden"; // 添加这行确保iframe完全隐藏
|
|
5792
5802
|
document.body.appendChild(iframe);
|
|
5803
|
+
// 动态添加打印样式
|
|
5804
|
+
const style = document.createElement("style");
|
|
5805
|
+
style.innerHTML = `
|
|
5806
|
+
@page {
|
|
5807
|
+
margin: 0; /* 移除页边距 */
|
|
5808
|
+
size: auto; /* 使用默认纸张大小 */
|
|
5809
|
+
}
|
|
5810
|
+
@media print {
|
|
5811
|
+
body {
|
|
5812
|
+
margin: 0;
|
|
5813
|
+
padding: 0;
|
|
5814
|
+
}
|
|
5815
|
+
img {
|
|
5816
|
+
max-width: 100%;
|
|
5817
|
+
height: auto;
|
|
5818
|
+
}
|
|
5819
|
+
}
|
|
5820
|
+
`;
|
|
5793
5821
|
// 等待iframe加载完成
|
|
5794
5822
|
iframe.onload = async ()=>{
|
|
5795
5823
|
const iframeDoc = iframe.contentDocument || iframe.contentWindow?.document;
|
|
5824
|
+
iframeDoc.head.appendChild(style);
|
|
5796
5825
|
// 根据类型处理内容
|
|
5797
5826
|
if (type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.H5 || type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.JSON) {
|
|
5798
5827
|
iframeDoc.body.innerHTML = content;
|
|
@@ -5815,13 +5844,14 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
5815
5844
|
// const url = URL.createObjectURL(blob);
|
|
5816
5845
|
// iframeDoc.body.innerHTML = `<embed src="${url}" type="application/pdf" width="100%" height="100%">`;
|
|
5817
5846
|
// }
|
|
5818
|
-
|
|
5819
|
-
await
|
|
5847
|
+
// 确保内容完全渲染
|
|
5848
|
+
await new Promise((resolve)=>setTimeout(resolve, 100));
|
|
5849
|
+
// 触发打印
|
|
5850
|
+
iframe.contentWindow?.focus();
|
|
5851
|
+
iframe.contentWindow?.print();
|
|
5820
5852
|
// 打印完成后移除iframe
|
|
5821
|
-
|
|
5853
|
+
document.body.removeChild(iframe);
|
|
5822
5854
|
};
|
|
5823
|
-
// 最后添加到DOM
|
|
5824
|
-
document.body.appendChild(iframe);
|
|
5825
5855
|
// 强制触发加载
|
|
5826
5856
|
iframe.src = "about:blank";
|
|
5827
5857
|
}
|
|
@@ -5923,41 +5953,7 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
5923
5953
|
renderDialog();
|
|
5924
5954
|
// 将容器添加到 body
|
|
5925
5955
|
document.body.appendChild(container);
|
|
5926
|
-
}
|
|
5927
|
-
async function handleFirefoxPrint(content, type = constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
|
|
5928
|
-
// 创建一个临时 div 用于渲染内容
|
|
5929
|
-
const tempDiv = document.createElement("div");
|
|
5930
|
-
tempDiv.style.position = "fixed";
|
|
5931
|
-
tempDiv.style.right = "0";
|
|
5932
|
-
tempDiv.style.bottom = "0";
|
|
5933
|
-
tempDiv.style.width = "0";
|
|
5934
|
-
tempDiv.style.height = "0";
|
|
5935
|
-
tempDiv.style.overflow = "hidden";
|
|
5936
|
-
document.body.appendChild(tempDiv);
|
|
5937
|
-
// 根据类型填充内容
|
|
5938
|
-
if (type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.H5 || type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.JSON) tempDiv.innerHTML = content;
|
|
5939
|
-
else if (type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
|
|
5940
|
-
const img = new Image();
|
|
5941
|
-
img.src = content.startsWith("data:image") ? content : `data:image/png;base64,${content}`;
|
|
5942
|
-
tempDiv.appendChild(img);
|
|
5943
|
-
// 等待图片加载
|
|
5944
|
-
await new Promise((resolve)=>{
|
|
5945
|
-
img.onload = resolve;
|
|
5946
|
-
img.onerror = ()=>{
|
|
5947
|
-
tempDiv.innerHTML = "<p>加载失败,请检查数据</p>";
|
|
5948
|
-
resolve(void 0);
|
|
5949
|
-
};
|
|
5950
|
-
});
|
|
5951
|
-
}
|
|
5952
|
-
// 临时显示内容并打印
|
|
5953
|
-
tempDiv.style.width = "100%";
|
|
5954
|
-
tempDiv.style.height = "100%";
|
|
5955
|
-
tempDiv.style.overflow = "visible";
|
|
5956
|
-
// 使用 window.print() 直接打印当前页面
|
|
5957
|
-
window.print();
|
|
5958
|
-
// 打印完成后移除临时元素
|
|
5959
|
-
document.body.removeChild(tempDiv);
|
|
5960
|
-
}
|
|
5956
|
+
} /** 此处忽略修改之后已经支持了火狐,不需要判断了 */ // async function handleFirefoxPrint(
|
|
5961
5957
|
const createPrint = ()=>{
|
|
5962
5958
|
/**
|
|
5963
5959
|
* 打印主步骤
|
|
@@ -6485,7 +6481,7 @@ const print = async (params)=>{
|
|
|
6485
6481
|
const printReceiptBtn_exports_ = printReceiptBtnvue_type_script_setup_true_lang_ts_name_printReceipt;
|
|
6486
6482
|
/* ESM default export */ const printReceiptBtn = printReceiptBtn_exports_;
|
|
6487
6483
|
const Titlevue_type_script_setup_true_lang_ts_name_sunTitle_hoisted_1 = {
|
|
6488
|
-
class: "relative pl-4 before:absolute before:left-0 before:top-
|
|
6484
|
+
class: "relative pl-4 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"
|
|
6489
6485
|
};
|
|
6490
6486
|
/* ESM default export */ const Titlevue_type_script_setup_true_lang_ts_name_sunTitle = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
6491
6487
|
__name: 'Title',
|
|
@@ -7050,20 +7046,20 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7050
7046
|
isHidden: !props.multiSelectFlag,
|
|
7051
7047
|
selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
|
|
7052
7048
|
},
|
|
7053
|
-
{
|
|
7054
|
-
label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
|
|
7055
|
-
prop: 'orgTypeDescDisplay',
|
|
7056
|
-
minWidth: 80
|
|
7057
|
-
},
|
|
7058
7049
|
{
|
|
7059
7050
|
label: t('bizUnitSelect.table.orgNo', '编码'),
|
|
7060
7051
|
prop: 'orgNo',
|
|
7061
|
-
minWidth:
|
|
7052
|
+
minWidth: 100
|
|
7062
7053
|
},
|
|
7063
7054
|
{
|
|
7064
7055
|
label: t('bizUnitSelect.table.orgNameDisplay', '名称'),
|
|
7065
7056
|
prop: 'orgNameDisplay',
|
|
7066
|
-
minWidth:
|
|
7057
|
+
minWidth: 200
|
|
7058
|
+
},
|
|
7059
|
+
{
|
|
7060
|
+
label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
|
|
7061
|
+
prop: 'orgTypeDescDisplay',
|
|
7062
|
+
minWidth: 100
|
|
7067
7063
|
}
|
|
7068
7064
|
]
|
|
7069
7065
|
});
|
|
@@ -7118,7 +7114,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7118
7114
|
const handleChange = ()=>{
|
|
7119
7115
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
7120
7116
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
7121
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
7117
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
7122
7118
|
else {
|
|
7123
7119
|
const data = value[0] ? bizUnitList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
7124
7120
|
emit('change', value[0], data);
|
|
@@ -7285,7 +7281,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7285
7281
|
visible: popoverVisible.value,
|
|
7286
7282
|
ref_key: "popoverRef",
|
|
7287
7283
|
ref: popoverRef,
|
|
7288
|
-
width: "
|
|
7284
|
+
width: "auto",
|
|
7289
7285
|
trigger: "click",
|
|
7290
7286
|
placement: "bottom",
|
|
7291
7287
|
onShow: handlePopoverShow
|
|
@@ -7448,17 +7444,17 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7448
7444
|
{
|
|
7449
7445
|
label: t('departmentSelect.table.orgNo', '科室编码'),
|
|
7450
7446
|
prop: 'orgNo',
|
|
7451
|
-
minWidth:
|
|
7447
|
+
minWidth: 100
|
|
7452
7448
|
},
|
|
7453
7449
|
{
|
|
7454
7450
|
label: t('departmentSelect.table.orgName', '科室名称'),
|
|
7455
7451
|
prop: 'orgName',
|
|
7456
|
-
minWidth:
|
|
7452
|
+
minWidth: 200
|
|
7457
7453
|
},
|
|
7458
7454
|
{
|
|
7459
7455
|
label: t('departmentSelect.table.deptTypeDesc', '科室类型'),
|
|
7460
7456
|
prop: 'deptTypeDesc',
|
|
7461
|
-
minWidth:
|
|
7457
|
+
minWidth: 100
|
|
7462
7458
|
}
|
|
7463
7459
|
]
|
|
7464
7460
|
});
|
|
@@ -7529,7 +7525,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7529
7525
|
const handleChange = ()=>{
|
|
7530
7526
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
7531
7527
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
7532
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
7528
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
7533
7529
|
else {
|
|
7534
7530
|
const data = value[0] ? departmentList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
7535
7531
|
emit('change', value[0], data);
|
|
@@ -7696,7 +7692,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7696
7692
|
visible: popoverVisible.value,
|
|
7697
7693
|
ref_key: "popoverRef",
|
|
7698
7694
|
ref: popoverRef,
|
|
7699
|
-
width: "
|
|
7695
|
+
width: "auto",
|
|
7700
7696
|
trigger: "click",
|
|
7701
7697
|
placement: "bottom",
|
|
7702
7698
|
onShow: handlePopoverShow
|
|
@@ -7858,12 +7854,12 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
7858
7854
|
{
|
|
7859
7855
|
label: t('wardSelect.table.orgNo', '病区编码'),
|
|
7860
7856
|
prop: 'orgNo',
|
|
7861
|
-
minWidth:
|
|
7857
|
+
minWidth: 100
|
|
7862
7858
|
},
|
|
7863
7859
|
{
|
|
7864
7860
|
label: t('wardSelect.table.orgName', '病区名称'),
|
|
7865
7861
|
prop: 'orgName',
|
|
7866
|
-
minWidth:
|
|
7862
|
+
minWidth: 200
|
|
7867
7863
|
}
|
|
7868
7864
|
]
|
|
7869
7865
|
});
|
|
@@ -7933,7 +7929,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
7933
7929
|
const handleChange = ()=>{
|
|
7934
7930
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
7935
7931
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
7936
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
7932
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
7937
7933
|
else {
|
|
7938
7934
|
const data = value[0] ? wardList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
7939
7935
|
emit('change', value[0], data);
|
|
@@ -8100,7 +8096,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8100
8096
|
visible: popoverVisible.value,
|
|
8101
8097
|
ref_key: "popoverRef",
|
|
8102
8098
|
ref: popoverRef,
|
|
8103
|
-
width: "
|
|
8099
|
+
width: "auto",
|
|
8104
8100
|
trigger: "click",
|
|
8105
8101
|
placement: "bottom",
|
|
8106
8102
|
onShow: handlePopoverShow
|
|
@@ -10155,60 +10151,75 @@ if ('undefined' != typeof window) {
|
|
|
10155
10151
|
}
|
|
10156
10152
|
// 设置 hotkeys-js 全局 filter,无论焦点在何处都响应快捷键
|
|
10157
10153
|
hotkeys_esm_hotkeys.filter = ()=>true;
|
|
10158
|
-
//
|
|
10159
|
-
function
|
|
10160
|
-
|
|
10161
|
-
|
|
10154
|
+
// 生成浏览器快捷键列表的函数
|
|
10155
|
+
function generateBrowserShortcuts() {
|
|
10156
|
+
const shortcuts = [];
|
|
10157
|
+
// 基础功能键
|
|
10158
|
+
const basicKeys = [
|
|
10162
10159
|
'f1',
|
|
10163
10160
|
'f2',
|
|
10164
10161
|
'f3',
|
|
10165
10162
|
'f6',
|
|
10166
|
-
'f7'
|
|
10167
|
-
'ctrl+f',
|
|
10168
|
-
'ctrl+r',
|
|
10169
|
-
'ctrl+shift+r',
|
|
10170
|
-
'ctrl+u',
|
|
10171
|
-
'ctrl+shift+i',
|
|
10172
|
-
'ctrl+shift+c',
|
|
10173
|
-
'ctrl+shift+j',
|
|
10174
|
-
'ctrl+shift+m',
|
|
10175
|
-
'ctrl+shift+k',
|
|
10176
|
-
'ctrl+shift+s',
|
|
10177
|
-
'ctrl+shift+o',
|
|
10178
|
-
'ctrl+shift+p',
|
|
10179
|
-
'ctrl+shift+e',
|
|
10180
|
-
'ctrl+shift+f',
|
|
10181
|
-
'ctrl+shift+g',
|
|
10182
|
-
'ctrl+shift+h',
|
|
10183
|
-
'ctrl+shift+t',
|
|
10184
|
-
'ctrl+shift+w',
|
|
10185
|
-
'ctrl+shift+x',
|
|
10186
|
-
'ctrl+shift+y',
|
|
10187
|
-
'ctrl+shift+z',
|
|
10188
|
-
'ctrl+shift+a',
|
|
10189
|
-
'ctrl+shift+b',
|
|
10190
|
-
'ctrl+shift+d',
|
|
10191
|
-
'ctrl+shift+l',
|
|
10192
|
-
'ctrl+shift+n',
|
|
10193
|
-
'ctrl+shift+q',
|
|
10194
|
-
'ctrl+shift+v',
|
|
10195
|
-
'ctrl+shift+1',
|
|
10196
|
-
'ctrl+shift+2',
|
|
10197
|
-
'ctrl+shift+3',
|
|
10198
|
-
'ctrl+shift+4',
|
|
10199
|
-
'ctrl+shift+5',
|
|
10200
|
-
'ctrl+shift+6',
|
|
10201
|
-
'ctrl+shift+7',
|
|
10202
|
-
'ctrl+shift+8',
|
|
10203
|
-
'ctrl+shift+9',
|
|
10204
|
-
'ctrl+shift+0'
|
|
10163
|
+
'f7'
|
|
10205
10164
|
];
|
|
10206
|
-
|
|
10165
|
+
shortcuts.push(...basicKeys);
|
|
10166
|
+
// 基础组合键
|
|
10167
|
+
const basicCombos = [
|
|
10168
|
+
'f',
|
|
10169
|
+
'r',
|
|
10170
|
+
'u'
|
|
10171
|
+
];
|
|
10172
|
+
basicCombos.forEach((key)=>{
|
|
10173
|
+
shortcuts.push(`ctrl+${key}`);
|
|
10174
|
+
shortcuts.push(`cmd+${key}`);
|
|
10175
|
+
});
|
|
10176
|
+
// 开发者工具相关快捷键
|
|
10177
|
+
const devToolsKeys = [
|
|
10178
|
+
'i',
|
|
10179
|
+
'j',
|
|
10180
|
+
'm',
|
|
10181
|
+
'k',
|
|
10182
|
+
's',
|
|
10183
|
+
'o',
|
|
10184
|
+
'p',
|
|
10185
|
+
'e',
|
|
10186
|
+
'f',
|
|
10187
|
+
'g',
|
|
10188
|
+
'h',
|
|
10189
|
+
't',
|
|
10190
|
+
'w',
|
|
10191
|
+
'x',
|
|
10192
|
+
'y',
|
|
10193
|
+
'z',
|
|
10194
|
+
'a',
|
|
10195
|
+
'b',
|
|
10196
|
+
'd',
|
|
10197
|
+
'l',
|
|
10198
|
+
'n',
|
|
10199
|
+
'q',
|
|
10200
|
+
'v'
|
|
10201
|
+
];
|
|
10202
|
+
devToolsKeys.forEach((key)=>{
|
|
10203
|
+
shortcuts.push(`ctrl+shift+${key}`);
|
|
10204
|
+
shortcuts.push(`cmd+shift+${key}`);
|
|
10205
|
+
});
|
|
10206
|
+
// 数字面板快捷键
|
|
10207
|
+
for(let i = 0; i <= 9; i++){
|
|
10208
|
+
shortcuts.push(`ctrl+shift+${i}`);
|
|
10209
|
+
shortcuts.push(`cmd+shift+${i}`);
|
|
10210
|
+
}
|
|
10211
|
+
return shortcuts;
|
|
10212
|
+
}
|
|
10213
|
+
// 禁用浏览器默认快捷键的函数
|
|
10214
|
+
function disableBrowserShortcuts() {
|
|
10215
|
+
const browserShortcuts = generateBrowserShortcuts();
|
|
10216
|
+
// 方法1: 使用 hotkeys-js 绑定阻止函数
|
|
10207
10217
|
browserShortcuts.forEach((shortcut)=>{
|
|
10208
10218
|
hotkeys_esm_hotkeys(shortcut, (event)=>{
|
|
10209
10219
|
// 阻止默认行为
|
|
10210
10220
|
event.preventDefault();
|
|
10211
10221
|
event.stopPropagation();
|
|
10222
|
+
event.stopImmediatePropagation();
|
|
10212
10223
|
return false;
|
|
10213
10224
|
});
|
|
10214
10225
|
});
|
|
@@ -10217,9 +10228,9 @@ function disableBrowserShortcuts() {
|
|
|
10217
10228
|
// 在模块加载时直接禁用浏览器快捷键
|
|
10218
10229
|
disableBrowserShortcuts();
|
|
10219
10230
|
// 从 sessionStorage 获取 preferSetting
|
|
10220
|
-
function getPreferSettingFromStorage() {
|
|
10231
|
+
function getPreferSettingFromStorage(key) {
|
|
10221
10232
|
try {
|
|
10222
|
-
const stored = JSON.parse(sessionStorage.getItem('sun-app'))
|
|
10233
|
+
const stored = JSON.parse(sessionStorage.getItem('sun-app'))[key];
|
|
10223
10234
|
return stored || [];
|
|
10224
10235
|
} catch (error) {
|
|
10225
10236
|
console.warn('从 sessionStorage 获取 preferSetting 失败:', error);
|
|
@@ -10227,8 +10238,8 @@ function getPreferSettingFromStorage() {
|
|
|
10227
10238
|
}
|
|
10228
10239
|
}
|
|
10229
10240
|
// 暴露给外部使用的查找方法
|
|
10230
|
-
function
|
|
10231
|
-
const preferSetting = getPreferSettingFromStorage();
|
|
10241
|
+
function findKeyCommandConfig(commandNo, defaultMenuId, bizId) {
|
|
10242
|
+
const preferSetting = getPreferSettingFromStorage('shortcuts');
|
|
10232
10243
|
// 查找匹配的 commandNo
|
|
10233
10244
|
let commands = preferSetting.filter((item)=>item.commandNo === commandNo);
|
|
10234
10245
|
// 如果提供了默认 menuId,优先使用它进行过滤
|
|
@@ -10238,17 +10249,26 @@ function findKeyboardValue(commandNo, defaultMenuId, bizId) {
|
|
|
10238
10249
|
}
|
|
10239
10250
|
if (0 === commands.length) {
|
|
10240
10251
|
console.warn(`未找到 commandNo: ${commandNo}${defaultMenuId ? `, menuId: ${defaultMenuId}` : ''} 的配置`);
|
|
10241
|
-
return
|
|
10252
|
+
return {
|
|
10253
|
+
keyboardValue: null,
|
|
10254
|
+
menuId: null
|
|
10255
|
+
};
|
|
10242
10256
|
}
|
|
10243
10257
|
// 如果找到多个匹配项,优先使用第一个(可以根据需要调整优先级逻辑)
|
|
10244
10258
|
const command = commands[0];
|
|
10245
10259
|
// 如果提供了 bizId,在 commandDetailList 中查找
|
|
10246
10260
|
if (bizId) {
|
|
10247
10261
|
const detail = command.commandDetailList.find((item)=>item.bizId === bizId);
|
|
10248
|
-
if (detail && detail.keyboardValue) return
|
|
10262
|
+
if (detail && detail.keyboardValue) return {
|
|
10263
|
+
keyboardValue: detail.keyboardValue,
|
|
10264
|
+
menuId: command.menuId || null
|
|
10265
|
+
};
|
|
10249
10266
|
}
|
|
10250
10267
|
// 如果没有找到 detail 或没有提供 bizId,使用 command 的 keyboardValue
|
|
10251
|
-
return
|
|
10268
|
+
return {
|
|
10269
|
+
keyboardValue: command.keyboardValue || null,
|
|
10270
|
+
menuId: command.menuId || null
|
|
10271
|
+
};
|
|
10252
10272
|
}
|
|
10253
10273
|
/* ESM default export */ const keyboard_valuevue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
10254
10274
|
__name: 'index',
|
|
@@ -10261,7 +10281,7 @@ function findKeyboardValue(commandNo, defaultMenuId, bizId) {
|
|
|
10261
10281
|
use_app_config_MAIN_APP_CONFIG.MENU_ID
|
|
10262
10282
|
]);
|
|
10263
10283
|
const props = __props;
|
|
10264
|
-
const value = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>
|
|
10284
|
+
const value = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>findKeyCommandConfig(props.commandNo, menuId, props.bizId)?.keyboardValue);
|
|
10265
10285
|
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(value.value ? `(${value.value})` : ''), 1));
|
|
10266
10286
|
}
|
|
10267
10287
|
});
|
|
@@ -10369,7 +10389,7 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
10369
10389
|
[
|
|
10370
10390
|
_directive_shortcut,
|
|
10371
10391
|
{
|
|
10372
|
-
commandNo: '
|
|
10392
|
+
commandNo: 'JSZJ:XHZ'
|
|
10373
10393
|
}
|
|
10374
10394
|
]
|
|
10375
10395
|
]) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createShortcutDirective,
|
|
1
|
+
export { createShortcutDirective, findKeyCommandConfig, type ShortcutOptions, } from './shortcut.ts';
|
|
@@ -5,6 +5,9 @@ export interface ShortcutOptions {
|
|
|
5
5
|
handler?: (e: KeyboardEvent) => void;
|
|
6
6
|
autoDisplay?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function findKeyCommandConfig(commandNo: string, defaultMenuId?: string, bizId?: string): {
|
|
9
|
+
keyboardValue: string | null;
|
|
10
|
+
menuId: string | null;
|
|
11
|
+
};
|
|
9
12
|
declare function createShortcutDirective(menuId?: string): ObjectDirective;
|
|
10
13
|
export { createShortcutDirective };
|
package/dist/hooks/index.js
CHANGED
|
@@ -549,7 +549,7 @@ function useFetchParams(options) {
|
|
|
549
549
|
* @param row
|
|
550
550
|
*/ const cancelEdit = (row, index, deleteWithoutId = true)=>{
|
|
551
551
|
const targetData = cachedEditData[row[getRowKey(row)]];
|
|
552
|
-
if ((row?.[id] || cancelToDelete || !deleteWithoutId) && targetData) Object.keys(
|
|
552
|
+
if ((row?.[id] || cancelToDelete || !deleteWithoutId) && targetData) Object.keys(targetData).forEach((key)=>{
|
|
553
553
|
row[key] = targetData[key];
|
|
554
554
|
});
|
|
555
555
|
else tableData.value.splice(index, 1);
|
package/dist/index.d.ts
CHANGED
|
@@ -25,5 +25,5 @@ export type { TableRef } from './hooks/use-editable-table';
|
|
|
25
25
|
export * from './hooks/use-fetch-data/index.ts';
|
|
26
26
|
export { useColumnConfig, useFormConfig } from './hooks/use-column&form-config';
|
|
27
27
|
export { useDataChangeDetector } from './hooks/use-data-change-detector';
|
|
28
|
-
export { createShortcutDirective,
|
|
28
|
+
export { createShortcutDirective, findKeyCommandConfig, type ShortcutOptions, } from './directives/index.ts';
|
|
29
29
|
export { debounce, isNumber, decimalCount, formatDecimalNumber } from './utils';
|
package/dist/index.js
CHANGED
|
@@ -616,11 +616,11 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
616
616
|
const changeSort = debounce(changeInputSort, 1200);
|
|
617
617
|
return [
|
|
618
618
|
{
|
|
619
|
-
label:
|
|
620
|
-
prop:
|
|
619
|
+
label: "列名称",
|
|
620
|
+
prop: "label",
|
|
621
621
|
minWidth: 170,
|
|
622
622
|
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("div", {
|
|
623
|
-
class:
|
|
623
|
+
class: "cursor-pointer",
|
|
624
624
|
onClick: (event)=>{
|
|
625
625
|
event.stopPropagation();
|
|
626
626
|
switch(row.ascendFlag){
|
|
@@ -640,10 +640,10 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
640
640
|
class: "caret-wrapper"
|
|
641
641
|
}, [
|
|
642
642
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
|
|
643
|
-
class: `sort-caret ascending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES ?
|
|
643
|
+
class: `sort-caret ascending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES ? "!border-b-blue-500" : ""}`
|
|
644
644
|
}, null),
|
|
645
645
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
|
|
646
|
-
class: `sort-caret descending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO ?
|
|
646
|
+
class: `sort-caret descending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO ? "!border-t-blue-500" : ""}`
|
|
647
647
|
}, null)
|
|
648
648
|
])
|
|
649
649
|
], 8, [
|
|
@@ -651,53 +651,54 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
651
651
|
])
|
|
652
652
|
},
|
|
653
653
|
{
|
|
654
|
-
label:
|
|
655
|
-
prop:
|
|
654
|
+
label: "属性",
|
|
655
|
+
prop: "prop",
|
|
656
656
|
supportCopyAndTips: true,
|
|
657
657
|
minWidth: 170
|
|
658
658
|
},
|
|
659
659
|
{
|
|
660
|
-
label:
|
|
661
|
-
prop:
|
|
660
|
+
label: "显示标志",
|
|
661
|
+
prop: "displayFlag",
|
|
662
662
|
minWidth: 170,
|
|
663
663
|
editable: true,
|
|
664
664
|
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElCheckbox, {
|
|
665
|
-
class:
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
size:
|
|
665
|
+
class: "w-full justify-center",
|
|
666
|
+
"true-value": 1,
|
|
667
|
+
"false-value": 0,
|
|
668
|
+
size: "small",
|
|
669
669
|
modelValue: row.displayFlag,
|
|
670
|
-
|
|
670
|
+
"onUpdate:modelValue": (value)=>row.displayFlag = value
|
|
671
671
|
})
|
|
672
672
|
},
|
|
673
673
|
{
|
|
674
|
-
label:
|
|
675
|
-
prop:
|
|
674
|
+
label: "列宽 (最小值)",
|
|
675
|
+
prop: "minWidth",
|
|
676
676
|
minWidth: 170,
|
|
677
677
|
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInputNumber, {
|
|
678
678
|
maxLength: 16,
|
|
679
679
|
min: 0,
|
|
680
|
+
precision: 0,
|
|
680
681
|
modelValue: row.minWidth,
|
|
681
|
-
|
|
682
|
-
size:
|
|
683
|
-
placeholder:
|
|
682
|
+
"onUpdate:modelValue": (value)=>row.minWidth = value,
|
|
683
|
+
size: "small",
|
|
684
|
+
placeholder: "请输入列宽 (最小值)"
|
|
684
685
|
})
|
|
685
686
|
},
|
|
686
687
|
{
|
|
687
|
-
label:
|
|
688
|
-
prop:
|
|
688
|
+
label: "列排序",
|
|
689
|
+
prop: "sort",
|
|
689
690
|
minWidth: 170,
|
|
690
691
|
render: (row, index)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInputNumber, {
|
|
691
692
|
max: length,
|
|
692
693
|
min: 0,
|
|
693
694
|
modelValue: row.sort,
|
|
694
695
|
disabled: disabledDraggable.value,
|
|
695
|
-
|
|
696
|
+
"onUpdate:modelValue": (value)=>row.sort = value,
|
|
696
697
|
onInput: (sort)=>{
|
|
697
698
|
changeSort(index, sort);
|
|
698
699
|
},
|
|
699
|
-
size:
|
|
700
|
-
placeholder:
|
|
700
|
+
size: "small",
|
|
701
|
+
placeholder: "请输入排序"
|
|
701
702
|
})
|
|
702
703
|
}
|
|
703
704
|
];
|
|
@@ -1725,7 +1726,6 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1725
1726
|
}),
|
|
1726
1727
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", null, [
|
|
1727
1728
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(pro_table, {
|
|
1728
|
-
disabled: "",
|
|
1729
1729
|
"columns-setting": {
|
|
1730
1730
|
disabled: true
|
|
1731
1731
|
},
|
|
@@ -1865,7 +1865,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1865
1865
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1866
1866
|
[
|
|
1867
1867
|
'__scopeId',
|
|
1868
|
-
"data-v-
|
|
1868
|
+
"data-v-c49e91ea"
|
|
1869
1869
|
]
|
|
1870
1870
|
]);
|
|
1871
1871
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -4068,7 +4068,7 @@ function useSelectByDirectionEvent(options) {
|
|
|
4068
4068
|
* @param row
|
|
4069
4069
|
*/ const cancelEdit = (row, index, deleteWithoutId = true)=>{
|
|
4070
4070
|
const targetData = cachedEditData[row[getRowKey(row)]];
|
|
4071
|
-
if ((row?.[id] || cancelToDelete || !deleteWithoutId) && targetData) Object.keys(
|
|
4071
|
+
if ((row?.[id] || cancelToDelete || !deleteWithoutId) && targetData) Object.keys(targetData).forEach((key)=>{
|
|
4072
4072
|
row[key] = targetData[key];
|
|
4073
4073
|
});
|
|
4074
4074
|
else tableData.value.splice(index, 1);
|
|
@@ -5146,6 +5146,7 @@ const isOptionDisabled = (tagId, selectList)=>selectList.includes(tagId);
|
|
|
5146
5146
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>innerValue.value = $event),
|
|
5147
5147
|
multiple: props.multiple ?? true,
|
|
5148
5148
|
filterable: "",
|
|
5149
|
+
clearable: "",
|
|
5149
5150
|
disabled: props.disabled ?? false,
|
|
5150
5151
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(selectClass.value),
|
|
5151
5152
|
placeholder: props.placeholder ?? '请选择',
|
|
@@ -5401,6 +5402,7 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
5401
5402
|
return (_ctx, _cache)=>{
|
|
5402
5403
|
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
5403
5404
|
const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
|
|
5405
|
+
const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
|
|
5404
5406
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
5405
5407
|
ref_key: "containerRef",
|
|
5406
5408
|
ref: containerRef,
|
|
@@ -5413,7 +5415,10 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
5413
5415
|
key: item,
|
|
5414
5416
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
5415
5417
|
background: allTagsMap.value.get(item)?.background,
|
|
5416
|
-
color: allTagsMap.value.get(item)?.color
|
|
5418
|
+
color: allTagsMap.value.get(item)?.color,
|
|
5419
|
+
borderColor: allTagsMap.value.get(item)?.color,
|
|
5420
|
+
'--el-tag-text-color': allTagsMap.value.get(item)?.color,
|
|
5421
|
+
'--el-tag-hover-color': allTagsMap.value.get(item)?.color
|
|
5417
5422
|
}),
|
|
5418
5423
|
closable: !props.disabled,
|
|
5419
5424
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
@@ -5459,7 +5464,10 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
5459
5464
|
key: item,
|
|
5460
5465
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
5461
5466
|
background: allTagsMap.value.get(item)?.background,
|
|
5462
|
-
color: allTagsMap.value.get(item)?.color
|
|
5467
|
+
color: allTagsMap.value.get(item)?.color,
|
|
5468
|
+
borderColor: allTagsMap.value.get(item)?.color,
|
|
5469
|
+
'--el-tag-text-color': allTagsMap.value.get(item)?.color,
|
|
5470
|
+
'--el-tag-hover-color': allTagsMap.value.get(item)?.color
|
|
5463
5471
|
}),
|
|
5464
5472
|
closable: !props.disabled,
|
|
5465
5473
|
size: props.tagSize,
|
|
@@ -5515,9 +5523,16 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
5515
5523
|
}),
|
|
5516
5524
|
onClick: showSelect
|
|
5517
5525
|
}, {
|
|
5518
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>
|
|
5519
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
5520
|
-
|
|
5526
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5527
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_icon, null, {
|
|
5528
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5529
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.Plus), {
|
|
5530
|
+
class: "text-primary"
|
|
5531
|
+
})
|
|
5532
|
+
]),
|
|
5533
|
+
_: 1
|
|
5534
|
+
})
|
|
5535
|
+
]),
|
|
5521
5536
|
_: 1
|
|
5522
5537
|
}, 8, [
|
|
5523
5538
|
"class"
|
|
@@ -5666,7 +5681,8 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5666
5681
|
}
|
|
5667
5682
|
const [, res] = await getBannerDataByBizId({
|
|
5668
5683
|
menuId: __props.menuId,
|
|
5669
|
-
|
|
5684
|
+
designFlag: __props.bizId ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO : void 0,
|
|
5685
|
+
bizId: __props.bizId ? __props.bizId : "0",
|
|
5670
5686
|
bizIdTypeCode: BANNER_COMPONENT_CONFIG[__props.code].bizIdTypeCode,
|
|
5671
5687
|
componentId: BANNER_COMPONENT_CONFIG[__props.code].componentId
|
|
5672
5688
|
});
|
|
@@ -6266,12 +6282,6 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
6266
6282
|
* type 数据源格式类型代码
|
|
6267
6283
|
* @param [type='BASE64']
|
|
6268
6284
|
*/ function useWebPrint(content, type = constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
|
|
6269
|
-
const isFirefox = navigator.userAgent.includes("Firefox");
|
|
6270
|
-
if (isFirefox) {
|
|
6271
|
-
// Firefox 的特殊处理
|
|
6272
|
-
handleFirefoxPrint(content, type);
|
|
6273
|
-
return;
|
|
6274
|
-
}
|
|
6275
6285
|
// 创建隐藏的iframe
|
|
6276
6286
|
const iframe = document.createElement("iframe");
|
|
6277
6287
|
iframe.style.position = "fixed";
|
|
@@ -6282,9 +6292,28 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
6282
6292
|
iframe.style.border = "0";
|
|
6283
6293
|
iframe.style.visibility = "hidden"; // 添加这行确保iframe完全隐藏
|
|
6284
6294
|
document.body.appendChild(iframe);
|
|
6295
|
+
// 动态添加打印样式
|
|
6296
|
+
const style = document.createElement("style");
|
|
6297
|
+
style.innerHTML = `
|
|
6298
|
+
@page {
|
|
6299
|
+
margin: 0; /* 移除页边距 */
|
|
6300
|
+
size: auto; /* 使用默认纸张大小 */
|
|
6301
|
+
}
|
|
6302
|
+
@media print {
|
|
6303
|
+
body {
|
|
6304
|
+
margin: 0;
|
|
6305
|
+
padding: 0;
|
|
6306
|
+
}
|
|
6307
|
+
img {
|
|
6308
|
+
max-width: 100%;
|
|
6309
|
+
height: auto;
|
|
6310
|
+
}
|
|
6311
|
+
}
|
|
6312
|
+
`;
|
|
6285
6313
|
// 等待iframe加载完成
|
|
6286
6314
|
iframe.onload = async ()=>{
|
|
6287
6315
|
const iframeDoc = iframe.contentDocument || iframe.contentWindow?.document;
|
|
6316
|
+
iframeDoc.head.appendChild(style);
|
|
6288
6317
|
// 根据类型处理内容
|
|
6289
6318
|
if (type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.H5 || type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.JSON) {
|
|
6290
6319
|
iframeDoc.body.innerHTML = content;
|
|
@@ -6307,13 +6336,14 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
6307
6336
|
// const url = URL.createObjectURL(blob);
|
|
6308
6337
|
// iframeDoc.body.innerHTML = `<embed src="${url}" type="application/pdf" width="100%" height="100%">`;
|
|
6309
6338
|
// }
|
|
6310
|
-
|
|
6311
|
-
await
|
|
6339
|
+
// 确保内容完全渲染
|
|
6340
|
+
await new Promise((resolve)=>setTimeout(resolve, 100));
|
|
6341
|
+
// 触发打印
|
|
6342
|
+
iframe.contentWindow?.focus();
|
|
6343
|
+
iframe.contentWindow?.print();
|
|
6312
6344
|
// 打印完成后移除iframe
|
|
6313
|
-
|
|
6345
|
+
document.body.removeChild(iframe);
|
|
6314
6346
|
};
|
|
6315
|
-
// 最后添加到DOM
|
|
6316
|
-
document.body.appendChild(iframe);
|
|
6317
6347
|
// 强制触发加载
|
|
6318
6348
|
iframe.src = "about:blank";
|
|
6319
6349
|
}
|
|
@@ -6415,41 +6445,7 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
6415
6445
|
renderDialog();
|
|
6416
6446
|
// 将容器添加到 body
|
|
6417
6447
|
document.body.appendChild(container);
|
|
6418
|
-
}
|
|
6419
|
-
async function handleFirefoxPrint(content, type = constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
|
|
6420
|
-
// 创建一个临时 div 用于渲染内容
|
|
6421
|
-
const tempDiv = document.createElement("div");
|
|
6422
|
-
tempDiv.style.position = "fixed";
|
|
6423
|
-
tempDiv.style.right = "0";
|
|
6424
|
-
tempDiv.style.bottom = "0";
|
|
6425
|
-
tempDiv.style.width = "0";
|
|
6426
|
-
tempDiv.style.height = "0";
|
|
6427
|
-
tempDiv.style.overflow = "hidden";
|
|
6428
|
-
document.body.appendChild(tempDiv);
|
|
6429
|
-
// 根据类型填充内容
|
|
6430
|
-
if (type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.H5 || type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.JSON) tempDiv.innerHTML = content;
|
|
6431
|
-
else if (type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
|
|
6432
|
-
const img = new Image();
|
|
6433
|
-
img.src = content.startsWith("data:image") ? content : `data:image/png;base64,${content}`;
|
|
6434
|
-
tempDiv.appendChild(img);
|
|
6435
|
-
// 等待图片加载
|
|
6436
|
-
await new Promise((resolve)=>{
|
|
6437
|
-
img.onload = resolve;
|
|
6438
|
-
img.onerror = ()=>{
|
|
6439
|
-
tempDiv.innerHTML = "<p>加载失败,请检查数据</p>";
|
|
6440
|
-
resolve(void 0);
|
|
6441
|
-
};
|
|
6442
|
-
});
|
|
6443
|
-
}
|
|
6444
|
-
// 临时显示内容并打印
|
|
6445
|
-
tempDiv.style.width = "100%";
|
|
6446
|
-
tempDiv.style.height = "100%";
|
|
6447
|
-
tempDiv.style.overflow = "visible";
|
|
6448
|
-
// 使用 window.print() 直接打印当前页面
|
|
6449
|
-
window.print();
|
|
6450
|
-
// 打印完成后移除临时元素
|
|
6451
|
-
document.body.removeChild(tempDiv);
|
|
6452
|
-
}
|
|
6448
|
+
} /** 此处忽略修改之后已经支持了火狐,不需要判断了 */ // async function handleFirefoxPrint(
|
|
6453
6449
|
const createPrint = ()=>{
|
|
6454
6450
|
/**
|
|
6455
6451
|
* 打印主步骤
|
|
@@ -7821,20 +7817,20 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7821
7817
|
isHidden: !props.multiSelectFlag,
|
|
7822
7818
|
selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
|
|
7823
7819
|
},
|
|
7824
|
-
{
|
|
7825
|
-
label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
|
|
7826
|
-
prop: 'orgTypeDescDisplay',
|
|
7827
|
-
minWidth: 80
|
|
7828
|
-
},
|
|
7829
7820
|
{
|
|
7830
7821
|
label: t('bizUnitSelect.table.orgNo', '编码'),
|
|
7831
7822
|
prop: 'orgNo',
|
|
7832
|
-
minWidth:
|
|
7823
|
+
minWidth: 100
|
|
7833
7824
|
},
|
|
7834
7825
|
{
|
|
7835
7826
|
label: t('bizUnitSelect.table.orgNameDisplay', '名称'),
|
|
7836
7827
|
prop: 'orgNameDisplay',
|
|
7837
|
-
minWidth:
|
|
7828
|
+
minWidth: 200
|
|
7829
|
+
},
|
|
7830
|
+
{
|
|
7831
|
+
label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
|
|
7832
|
+
prop: 'orgTypeDescDisplay',
|
|
7833
|
+
minWidth: 100
|
|
7838
7834
|
}
|
|
7839
7835
|
]
|
|
7840
7836
|
});
|
|
@@ -7889,7 +7885,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7889
7885
|
const handleChange = ()=>{
|
|
7890
7886
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
7891
7887
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
7892
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
7888
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
7893
7889
|
else {
|
|
7894
7890
|
const data = value[0] ? bizUnitList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
7895
7891
|
emit('change', value[0], data);
|
|
@@ -8056,7 +8052,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8056
8052
|
visible: popoverVisible.value,
|
|
8057
8053
|
ref_key: "popoverRef",
|
|
8058
8054
|
ref: popoverRef,
|
|
8059
|
-
width: "
|
|
8055
|
+
width: "auto",
|
|
8060
8056
|
trigger: "click",
|
|
8061
8057
|
placement: "bottom",
|
|
8062
8058
|
onShow: handlePopoverShow
|
|
@@ -8219,17 +8215,17 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8219
8215
|
{
|
|
8220
8216
|
label: t('departmentSelect.table.orgNo', '科室编码'),
|
|
8221
8217
|
prop: 'orgNo',
|
|
8222
|
-
minWidth:
|
|
8218
|
+
minWidth: 100
|
|
8223
8219
|
},
|
|
8224
8220
|
{
|
|
8225
8221
|
label: t('departmentSelect.table.orgName', '科室名称'),
|
|
8226
8222
|
prop: 'orgName',
|
|
8227
|
-
minWidth:
|
|
8223
|
+
minWidth: 200
|
|
8228
8224
|
},
|
|
8229
8225
|
{
|
|
8230
8226
|
label: t('departmentSelect.table.deptTypeDesc', '科室类型'),
|
|
8231
8227
|
prop: 'deptTypeDesc',
|
|
8232
|
-
minWidth:
|
|
8228
|
+
minWidth: 100
|
|
8233
8229
|
}
|
|
8234
8230
|
]
|
|
8235
8231
|
});
|
|
@@ -8300,7 +8296,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8300
8296
|
const handleChange = ()=>{
|
|
8301
8297
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
8302
8298
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
8303
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
8299
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
8304
8300
|
else {
|
|
8305
8301
|
const data = value[0] ? departmentList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
8306
8302
|
emit('change', value[0], data);
|
|
@@ -8467,7 +8463,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8467
8463
|
visible: popoverVisible.value,
|
|
8468
8464
|
ref_key: "popoverRef",
|
|
8469
8465
|
ref: popoverRef,
|
|
8470
|
-
width: "
|
|
8466
|
+
width: "auto",
|
|
8471
8467
|
trigger: "click",
|
|
8472
8468
|
placement: "bottom",
|
|
8473
8469
|
onShow: handlePopoverShow
|
|
@@ -8629,12 +8625,12 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8629
8625
|
{
|
|
8630
8626
|
label: t('wardSelect.table.orgNo', '病区编码'),
|
|
8631
8627
|
prop: 'orgNo',
|
|
8632
|
-
minWidth:
|
|
8628
|
+
minWidth: 100
|
|
8633
8629
|
},
|
|
8634
8630
|
{
|
|
8635
8631
|
label: t('wardSelect.table.orgName', '病区名称'),
|
|
8636
8632
|
prop: 'orgName',
|
|
8637
|
-
minWidth:
|
|
8633
|
+
minWidth: 200
|
|
8638
8634
|
}
|
|
8639
8635
|
]
|
|
8640
8636
|
});
|
|
@@ -8704,7 +8700,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8704
8700
|
const handleChange = ()=>{
|
|
8705
8701
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
8706
8702
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
8707
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
8703
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
8708
8704
|
else {
|
|
8709
8705
|
const data = value[0] ? wardList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
8710
8706
|
emit('change', value[0], data);
|
|
@@ -8871,7 +8867,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8871
8867
|
visible: popoverVisible.value,
|
|
8872
8868
|
ref_key: "popoverRef",
|
|
8873
8869
|
ref: popoverRef,
|
|
8874
|
-
width: "
|
|
8870
|
+
width: "auto",
|
|
8875
8871
|
trigger: "click",
|
|
8876
8872
|
placement: "bottom",
|
|
8877
8873
|
onShow: handlePopoverShow
|
|
@@ -9298,7 +9294,7 @@ const WB_NO = "wbNo";
|
|
|
9298
9294
|
const pro_form_exports_ = pro_formvue_type_script_setup_true_lang_ts_name_ProForm;
|
|
9299
9295
|
/* ESM default export */ const pro_form = pro_form_exports_;
|
|
9300
9296
|
const Titlevue_type_script_setup_true_lang_ts_name_sunTitle_hoisted_1 = {
|
|
9301
|
-
class: "relative pl-4 before:absolute before:left-0 before:top-
|
|
9297
|
+
class: "relative pl-4 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"
|
|
9302
9298
|
};
|
|
9303
9299
|
/* ESM default export */ const Titlevue_type_script_setup_true_lang_ts_name_sunTitle = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
9304
9300
|
__name: 'Title',
|
|
@@ -10051,7 +10047,7 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
10051
10047
|
[
|
|
10052
10048
|
_directive_shortcut,
|
|
10053
10049
|
{
|
|
10054
|
-
commandNo: '
|
|
10050
|
+
commandNo: 'JSZJ:XHZ'
|
|
10055
10051
|
}
|
|
10056
10052
|
]
|
|
10057
10053
|
]) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
@@ -10638,62 +10634,78 @@ if ('undefined' != typeof window) {
|
|
|
10638
10634
|
};
|
|
10639
10635
|
window.hotkeys = hotkeys;
|
|
10640
10636
|
}
|
|
10637
|
+
const COMMON_MENU_ID = '1644891388162187264';
|
|
10641
10638
|
// 设置 hotkeys-js 全局 filter,无论焦点在何处都响应快捷键
|
|
10642
10639
|
hotkeys.filter = ()=>true;
|
|
10643
|
-
//
|
|
10644
|
-
function
|
|
10645
|
-
|
|
10646
|
-
|
|
10640
|
+
// 生成浏览器快捷键列表的函数
|
|
10641
|
+
function generateBrowserShortcuts() {
|
|
10642
|
+
const shortcuts = [];
|
|
10643
|
+
// 基础功能键
|
|
10644
|
+
const basicKeys = [
|
|
10647
10645
|
'f1',
|
|
10648
10646
|
'f2',
|
|
10649
10647
|
'f3',
|
|
10650
10648
|
'f6',
|
|
10651
|
-
'f7'
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
'
|
|
10657
|
-
'
|
|
10658
|
-
'
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
'
|
|
10667
|
-
'
|
|
10668
|
-
'
|
|
10669
|
-
'
|
|
10670
|
-
'
|
|
10671
|
-
'
|
|
10672
|
-
'
|
|
10673
|
-
'
|
|
10674
|
-
'
|
|
10675
|
-
'
|
|
10676
|
-
'
|
|
10677
|
-
'
|
|
10678
|
-
'
|
|
10679
|
-
'
|
|
10680
|
-
'
|
|
10681
|
-
'
|
|
10682
|
-
'
|
|
10683
|
-
'
|
|
10684
|
-
'
|
|
10685
|
-
'
|
|
10686
|
-
'
|
|
10687
|
-
'
|
|
10688
|
-
'
|
|
10689
|
-
'ctrl+shift+0'
|
|
10649
|
+
'f7'
|
|
10650
|
+
];
|
|
10651
|
+
shortcuts.push(...basicKeys);
|
|
10652
|
+
// 基础组合键
|
|
10653
|
+
const basicCombos = [
|
|
10654
|
+
'f',
|
|
10655
|
+
'r',
|
|
10656
|
+
'u'
|
|
10657
|
+
];
|
|
10658
|
+
basicCombos.forEach((key)=>{
|
|
10659
|
+
shortcuts.push(`ctrl+${key}`);
|
|
10660
|
+
shortcuts.push(`cmd+${key}`);
|
|
10661
|
+
});
|
|
10662
|
+
// 开发者工具相关快捷键
|
|
10663
|
+
const devToolsKeys = [
|
|
10664
|
+
'i',
|
|
10665
|
+
'j',
|
|
10666
|
+
'm',
|
|
10667
|
+
'k',
|
|
10668
|
+
's',
|
|
10669
|
+
'o',
|
|
10670
|
+
'p',
|
|
10671
|
+
'e',
|
|
10672
|
+
'f',
|
|
10673
|
+
'g',
|
|
10674
|
+
'h',
|
|
10675
|
+
't',
|
|
10676
|
+
'w',
|
|
10677
|
+
'x',
|
|
10678
|
+
'y',
|
|
10679
|
+
'z',
|
|
10680
|
+
'a',
|
|
10681
|
+
'b',
|
|
10682
|
+
'd',
|
|
10683
|
+
'l',
|
|
10684
|
+
'n',
|
|
10685
|
+
'q',
|
|
10686
|
+
'v'
|
|
10690
10687
|
];
|
|
10691
|
-
|
|
10688
|
+
devToolsKeys.forEach((key)=>{
|
|
10689
|
+
shortcuts.push(`ctrl+shift+${key}`);
|
|
10690
|
+
shortcuts.push(`cmd+shift+${key}`);
|
|
10691
|
+
});
|
|
10692
|
+
// 数字面板快捷键
|
|
10693
|
+
for(let i = 0; i <= 9; i++){
|
|
10694
|
+
shortcuts.push(`ctrl+shift+${i}`);
|
|
10695
|
+
shortcuts.push(`cmd+shift+${i}`);
|
|
10696
|
+
}
|
|
10697
|
+
return shortcuts;
|
|
10698
|
+
}
|
|
10699
|
+
// 禁用浏览器默认快捷键的函数
|
|
10700
|
+
function disableBrowserShortcuts() {
|
|
10701
|
+
const browserShortcuts = generateBrowserShortcuts();
|
|
10702
|
+
// 方法1: 使用 hotkeys-js 绑定阻止函数
|
|
10692
10703
|
browserShortcuts.forEach((shortcut)=>{
|
|
10693
10704
|
hotkeys(shortcut, (event)=>{
|
|
10694
10705
|
// 阻止默认行为
|
|
10695
10706
|
event.preventDefault();
|
|
10696
10707
|
event.stopPropagation();
|
|
10708
|
+
event.stopImmediatePropagation();
|
|
10697
10709
|
return false;
|
|
10698
10710
|
});
|
|
10699
10711
|
});
|
|
@@ -10702,9 +10714,9 @@ function disableBrowserShortcuts() {
|
|
|
10702
10714
|
// 在模块加载时直接禁用浏览器快捷键
|
|
10703
10715
|
disableBrowserShortcuts();
|
|
10704
10716
|
// 从 sessionStorage 获取 preferSetting
|
|
10705
|
-
function getPreferSettingFromStorage() {
|
|
10717
|
+
function getPreferSettingFromStorage(key) {
|
|
10706
10718
|
try {
|
|
10707
|
-
const stored = JSON.parse(sessionStorage.getItem('sun-app'))
|
|
10719
|
+
const stored = JSON.parse(sessionStorage.getItem('sun-app'))[key];
|
|
10708
10720
|
return stored || [];
|
|
10709
10721
|
} catch (error) {
|
|
10710
10722
|
console.warn('从 sessionStorage 获取 preferSetting 失败:', error);
|
|
@@ -10712,8 +10724,8 @@ function getPreferSettingFromStorage() {
|
|
|
10712
10724
|
}
|
|
10713
10725
|
}
|
|
10714
10726
|
// 暴露给外部使用的查找方法
|
|
10715
|
-
function
|
|
10716
|
-
const preferSetting = getPreferSettingFromStorage();
|
|
10727
|
+
function findKeyCommandConfig(commandNo, defaultMenuId, bizId) {
|
|
10728
|
+
const preferSetting = getPreferSettingFromStorage('shortcuts');
|
|
10717
10729
|
// 查找匹配的 commandNo
|
|
10718
10730
|
let commands = preferSetting.filter((item)=>item.commandNo === commandNo);
|
|
10719
10731
|
// 如果提供了默认 menuId,优先使用它进行过滤
|
|
@@ -10723,17 +10735,26 @@ function findKeyboardValue(commandNo, defaultMenuId, bizId) {
|
|
|
10723
10735
|
}
|
|
10724
10736
|
if (0 === commands.length) {
|
|
10725
10737
|
console.warn(`未找到 commandNo: ${commandNo}${defaultMenuId ? `, menuId: ${defaultMenuId}` : ''} 的配置`);
|
|
10726
|
-
return
|
|
10738
|
+
return {
|
|
10739
|
+
keyboardValue: null,
|
|
10740
|
+
menuId: null
|
|
10741
|
+
};
|
|
10727
10742
|
}
|
|
10728
10743
|
// 如果找到多个匹配项,优先使用第一个(可以根据需要调整优先级逻辑)
|
|
10729
10744
|
const command = commands[0];
|
|
10730
10745
|
// 如果提供了 bizId,在 commandDetailList 中查找
|
|
10731
10746
|
if (bizId) {
|
|
10732
10747
|
const detail = command.commandDetailList.find((item)=>item.bizId === bizId);
|
|
10733
|
-
if (detail && detail.keyboardValue) return
|
|
10748
|
+
if (detail && detail.keyboardValue) return {
|
|
10749
|
+
keyboardValue: detail.keyboardValue,
|
|
10750
|
+
menuId: command.menuId || null
|
|
10751
|
+
};
|
|
10734
10752
|
}
|
|
10735
10753
|
// 如果没有找到 detail 或没有提供 bizId,使用 command 的 keyboardValue
|
|
10736
|
-
return
|
|
10754
|
+
return {
|
|
10755
|
+
keyboardValue: command.keyboardValue || null,
|
|
10756
|
+
menuId: command.menuId || null
|
|
10757
|
+
};
|
|
10737
10758
|
}
|
|
10738
10759
|
// 自动在元素文本中显示快捷键
|
|
10739
10760
|
async function updateElementText(el, keyboardValue) {
|
|
@@ -10747,7 +10768,7 @@ function parseBinding(binding, defaultMenuId) {
|
|
|
10747
10768
|
};
|
|
10748
10769
|
const opts = binding.value;
|
|
10749
10770
|
// 通过 preferSetting 查找 keyboardValue
|
|
10750
|
-
const keyboardValue =
|
|
10771
|
+
const keyboardValue = findKeyCommandConfig(opts.commandNo, defaultMenuId, opts.bizId)?.keyboardValue;
|
|
10751
10772
|
if (!keyboardValue) {
|
|
10752
10773
|
console.warn(`未找到 commandNo: ${opts.commandNo}, menuId: ${defaultMenuId || '未指定'}, bizId: ${opts.bizId || '未指定'} 对应的 keyboardValue`);
|
|
10753
10774
|
return null;
|
|
@@ -10771,6 +10792,10 @@ function createShortcutDirective(menuId) {
|
|
|
10771
10792
|
if (parsed.autoDisplay && parsed.key) updateElementText(el, parsed.key);
|
|
10772
10793
|
// 记录 handler 以便卸载时解绑
|
|
10773
10794
|
const handler = (e)=>{
|
|
10795
|
+
const currentMenuId = getPreferSettingFromStorage('activeMenuItem')?.menuId;
|
|
10796
|
+
const opts = binding.value;
|
|
10797
|
+
const configMenuId = findKeyCommandConfig(opts.commandNo, menuId, opts.bizId)?.menuId;
|
|
10798
|
+
if (configMenuId !== COMMON_MENU_ID && menuId !== currentMenuId) return;
|
|
10774
10799
|
if ('function' == typeof parsed.handler) parsed.handler(e);
|
|
10775
10800
|
else el.click?.();
|
|
10776
10801
|
};
|
|
@@ -10798,7 +10823,7 @@ function createShortcutDirective(menuId) {
|
|
|
10798
10823
|
use_app_config_MAIN_APP_CONFIG.MENU_ID
|
|
10799
10824
|
]);
|
|
10800
10825
|
const props = __props;
|
|
10801
|
-
const value = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>
|
|
10826
|
+
const value = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>findKeyCommandConfig(props.commandNo, menuId, props.bizId)?.keyboardValue);
|
|
10802
10827
|
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(value.value ? `(${value.value})` : ''), 1));
|
|
10803
10828
|
}
|
|
10804
10829
|
});
|
|
@@ -11633,4 +11658,4 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
|
|
|
11633
11658
|
]);
|
|
11634
11659
|
/* ESM default export */ const form_design_render = form_design_render_exports_;
|
|
11635
11660
|
/** components **/ /** hooks ** */ var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
|
|
11636
|
-
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,
|
|
11661
|
+
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 };
|