sun-biz 0.0.4-beta.27 → 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 +116 -77
- 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 +124 -80
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -4910,6 +4910,7 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
4910
4910
|
return (_ctx, _cache)=>{
|
|
4911
4911
|
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
4912
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");
|
|
4913
4914
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
4914
4915
|
ref_key: "containerRef",
|
|
4915
4916
|
ref: containerRef,
|
|
@@ -4922,7 +4923,10 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
4922
4923
|
key: item,
|
|
4923
4924
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
4924
4925
|
background: allTagsMap.value.get(item)?.background,
|
|
4925
|
-
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
|
|
4926
4930
|
}),
|
|
4927
4931
|
closable: !props.disabled,
|
|
4928
4932
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
@@ -4968,7 +4972,10 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
4968
4972
|
key: item,
|
|
4969
4973
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
4970
4974
|
background: allTagsMap.value.get(item)?.background,
|
|
4971
|
-
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
|
|
4972
4979
|
}),
|
|
4973
4980
|
closable: !props.disabled,
|
|
4974
4981
|
size: props.tagSize,
|
|
@@ -5024,9 +5031,16 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
5024
5031
|
}),
|
|
5025
5032
|
onClick: showSelect
|
|
5026
5033
|
}, {
|
|
5027
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>
|
|
5028
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
5029
|
-
|
|
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
|
+
]),
|
|
5030
5044
|
_: 1
|
|
5031
5045
|
}, 8, [
|
|
5032
5046
|
"class"
|
|
@@ -5175,7 +5189,8 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5175
5189
|
}
|
|
5176
5190
|
const [, res] = await getBannerDataByBizId({
|
|
5177
5191
|
menuId: __props.menuId,
|
|
5178
|
-
|
|
5192
|
+
designFlag: __props.bizId ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO : void 0,
|
|
5193
|
+
bizId: __props.bizId ? __props.bizId : "0",
|
|
5179
5194
|
bizIdTypeCode: BANNER_COMPONENT_CONFIG[__props.code].bizIdTypeCode,
|
|
5180
5195
|
componentId: BANNER_COMPONENT_CONFIG[__props.code].componentId
|
|
5181
5196
|
});
|
|
@@ -6466,7 +6481,7 @@ const print = async (params)=>{
|
|
|
6466
6481
|
const printReceiptBtn_exports_ = printReceiptBtnvue_type_script_setup_true_lang_ts_name_printReceipt;
|
|
6467
6482
|
/* ESM default export */ const printReceiptBtn = printReceiptBtn_exports_;
|
|
6468
6483
|
const Titlevue_type_script_setup_true_lang_ts_name_sunTitle_hoisted_1 = {
|
|
6469
|
-
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"
|
|
6470
6485
|
};
|
|
6471
6486
|
/* ESM default export */ const Titlevue_type_script_setup_true_lang_ts_name_sunTitle = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
6472
6487
|
__name: 'Title',
|
|
@@ -7031,20 +7046,20 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7031
7046
|
isHidden: !props.multiSelectFlag,
|
|
7032
7047
|
selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
|
|
7033
7048
|
},
|
|
7034
|
-
{
|
|
7035
|
-
label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
|
|
7036
|
-
prop: 'orgTypeDescDisplay',
|
|
7037
|
-
minWidth: 80
|
|
7038
|
-
},
|
|
7039
7049
|
{
|
|
7040
7050
|
label: t('bizUnitSelect.table.orgNo', '编码'),
|
|
7041
7051
|
prop: 'orgNo',
|
|
7042
|
-
minWidth:
|
|
7052
|
+
minWidth: 100
|
|
7043
7053
|
},
|
|
7044
7054
|
{
|
|
7045
7055
|
label: t('bizUnitSelect.table.orgNameDisplay', '名称'),
|
|
7046
7056
|
prop: 'orgNameDisplay',
|
|
7047
|
-
minWidth:
|
|
7057
|
+
minWidth: 200
|
|
7058
|
+
},
|
|
7059
|
+
{
|
|
7060
|
+
label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
|
|
7061
|
+
prop: 'orgTypeDescDisplay',
|
|
7062
|
+
minWidth: 100
|
|
7048
7063
|
}
|
|
7049
7064
|
]
|
|
7050
7065
|
});
|
|
@@ -7099,7 +7114,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7099
7114
|
const handleChange = ()=>{
|
|
7100
7115
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
7101
7116
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
7102
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
7117
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
7103
7118
|
else {
|
|
7104
7119
|
const data = value[0] ? bizUnitList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
7105
7120
|
emit('change', value[0], data);
|
|
@@ -7266,7 +7281,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7266
7281
|
visible: popoverVisible.value,
|
|
7267
7282
|
ref_key: "popoverRef",
|
|
7268
7283
|
ref: popoverRef,
|
|
7269
|
-
width: "
|
|
7284
|
+
width: "auto",
|
|
7270
7285
|
trigger: "click",
|
|
7271
7286
|
placement: "bottom",
|
|
7272
7287
|
onShow: handlePopoverShow
|
|
@@ -7429,17 +7444,17 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7429
7444
|
{
|
|
7430
7445
|
label: t('departmentSelect.table.orgNo', '科室编码'),
|
|
7431
7446
|
prop: 'orgNo',
|
|
7432
|
-
minWidth:
|
|
7447
|
+
minWidth: 100
|
|
7433
7448
|
},
|
|
7434
7449
|
{
|
|
7435
7450
|
label: t('departmentSelect.table.orgName', '科室名称'),
|
|
7436
7451
|
prop: 'orgName',
|
|
7437
|
-
minWidth:
|
|
7452
|
+
minWidth: 200
|
|
7438
7453
|
},
|
|
7439
7454
|
{
|
|
7440
7455
|
label: t('departmentSelect.table.deptTypeDesc', '科室类型'),
|
|
7441
7456
|
prop: 'deptTypeDesc',
|
|
7442
|
-
minWidth:
|
|
7457
|
+
minWidth: 100
|
|
7443
7458
|
}
|
|
7444
7459
|
]
|
|
7445
7460
|
});
|
|
@@ -7510,7 +7525,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7510
7525
|
const handleChange = ()=>{
|
|
7511
7526
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
7512
7527
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
7513
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
7528
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
7514
7529
|
else {
|
|
7515
7530
|
const data = value[0] ? departmentList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
7516
7531
|
emit('change', value[0], data);
|
|
@@ -7677,7 +7692,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7677
7692
|
visible: popoverVisible.value,
|
|
7678
7693
|
ref_key: "popoverRef",
|
|
7679
7694
|
ref: popoverRef,
|
|
7680
|
-
width: "
|
|
7695
|
+
width: "auto",
|
|
7681
7696
|
trigger: "click",
|
|
7682
7697
|
placement: "bottom",
|
|
7683
7698
|
onShow: handlePopoverShow
|
|
@@ -7839,12 +7854,12 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
7839
7854
|
{
|
|
7840
7855
|
label: t('wardSelect.table.orgNo', '病区编码'),
|
|
7841
7856
|
prop: 'orgNo',
|
|
7842
|
-
minWidth:
|
|
7857
|
+
minWidth: 100
|
|
7843
7858
|
},
|
|
7844
7859
|
{
|
|
7845
7860
|
label: t('wardSelect.table.orgName', '病区名称'),
|
|
7846
7861
|
prop: 'orgName',
|
|
7847
|
-
minWidth:
|
|
7862
|
+
minWidth: 200
|
|
7848
7863
|
}
|
|
7849
7864
|
]
|
|
7850
7865
|
});
|
|
@@ -7914,7 +7929,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
7914
7929
|
const handleChange = ()=>{
|
|
7915
7930
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
7916
7931
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
7917
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
7932
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
7918
7933
|
else {
|
|
7919
7934
|
const data = value[0] ? wardList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
7920
7935
|
emit('change', value[0], data);
|
|
@@ -8081,7 +8096,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8081
8096
|
visible: popoverVisible.value,
|
|
8082
8097
|
ref_key: "popoverRef",
|
|
8083
8098
|
ref: popoverRef,
|
|
8084
|
-
width: "
|
|
8099
|
+
width: "auto",
|
|
8085
8100
|
trigger: "click",
|
|
8086
8101
|
placement: "bottom",
|
|
8087
8102
|
onShow: handlePopoverShow
|
|
@@ -10136,60 +10151,75 @@ if ('undefined' != typeof window) {
|
|
|
10136
10151
|
}
|
|
10137
10152
|
// 设置 hotkeys-js 全局 filter,无论焦点在何处都响应快捷键
|
|
10138
10153
|
hotkeys_esm_hotkeys.filter = ()=>true;
|
|
10139
|
-
//
|
|
10140
|
-
function
|
|
10141
|
-
|
|
10142
|
-
|
|
10154
|
+
// 生成浏览器快捷键列表的函数
|
|
10155
|
+
function generateBrowserShortcuts() {
|
|
10156
|
+
const shortcuts = [];
|
|
10157
|
+
// 基础功能键
|
|
10158
|
+
const basicKeys = [
|
|
10143
10159
|
'f1',
|
|
10144
10160
|
'f2',
|
|
10145
10161
|
'f3',
|
|
10146
10162
|
'f6',
|
|
10147
|
-
'f7'
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
'
|
|
10153
|
-
'
|
|
10154
|
-
'
|
|
10155
|
-
'ctrl+shift+m',
|
|
10156
|
-
'ctrl+shift+k',
|
|
10157
|
-
'ctrl+shift+s',
|
|
10158
|
-
'ctrl+shift+o',
|
|
10159
|
-
'ctrl+shift+p',
|
|
10160
|
-
'ctrl+shift+e',
|
|
10161
|
-
'ctrl+shift+f',
|
|
10162
|
-
'ctrl+shift+g',
|
|
10163
|
-
'ctrl+shift+h',
|
|
10164
|
-
'ctrl+shift+t',
|
|
10165
|
-
'ctrl+shift+w',
|
|
10166
|
-
'ctrl+shift+x',
|
|
10167
|
-
'ctrl+shift+y',
|
|
10168
|
-
'ctrl+shift+z',
|
|
10169
|
-
'ctrl+shift+a',
|
|
10170
|
-
'ctrl+shift+b',
|
|
10171
|
-
'ctrl+shift+d',
|
|
10172
|
-
'ctrl+shift+l',
|
|
10173
|
-
'ctrl+shift+n',
|
|
10174
|
-
'ctrl+shift+q',
|
|
10175
|
-
'ctrl+shift+v',
|
|
10176
|
-
'ctrl+shift+1',
|
|
10177
|
-
'ctrl+shift+2',
|
|
10178
|
-
'ctrl+shift+3',
|
|
10179
|
-
'ctrl+shift+4',
|
|
10180
|
-
'ctrl+shift+5',
|
|
10181
|
-
'ctrl+shift+6',
|
|
10182
|
-
'ctrl+shift+7',
|
|
10183
|
-
'ctrl+shift+8',
|
|
10184
|
-
'ctrl+shift+9',
|
|
10185
|
-
'ctrl+shift+0'
|
|
10163
|
+
'f7'
|
|
10164
|
+
];
|
|
10165
|
+
shortcuts.push(...basicKeys);
|
|
10166
|
+
// 基础组合键
|
|
10167
|
+
const basicCombos = [
|
|
10168
|
+
'f',
|
|
10169
|
+
'r',
|
|
10170
|
+
'u'
|
|
10186
10171
|
];
|
|
10187
|
-
|
|
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 绑定阻止函数
|
|
10188
10217
|
browserShortcuts.forEach((shortcut)=>{
|
|
10189
10218
|
hotkeys_esm_hotkeys(shortcut, (event)=>{
|
|
10190
10219
|
// 阻止默认行为
|
|
10191
10220
|
event.preventDefault();
|
|
10192
10221
|
event.stopPropagation();
|
|
10222
|
+
event.stopImmediatePropagation();
|
|
10193
10223
|
return false;
|
|
10194
10224
|
});
|
|
10195
10225
|
});
|
|
@@ -10198,9 +10228,9 @@ function disableBrowserShortcuts() {
|
|
|
10198
10228
|
// 在模块加载时直接禁用浏览器快捷键
|
|
10199
10229
|
disableBrowserShortcuts();
|
|
10200
10230
|
// 从 sessionStorage 获取 preferSetting
|
|
10201
|
-
function getPreferSettingFromStorage() {
|
|
10231
|
+
function getPreferSettingFromStorage(key) {
|
|
10202
10232
|
try {
|
|
10203
|
-
const stored = JSON.parse(sessionStorage.getItem('sun-app'))
|
|
10233
|
+
const stored = JSON.parse(sessionStorage.getItem('sun-app'))[key];
|
|
10204
10234
|
return stored || [];
|
|
10205
10235
|
} catch (error) {
|
|
10206
10236
|
console.warn('从 sessionStorage 获取 preferSetting 失败:', error);
|
|
@@ -10208,8 +10238,8 @@ function getPreferSettingFromStorage() {
|
|
|
10208
10238
|
}
|
|
10209
10239
|
}
|
|
10210
10240
|
// 暴露给外部使用的查找方法
|
|
10211
|
-
function
|
|
10212
|
-
const preferSetting = getPreferSettingFromStorage();
|
|
10241
|
+
function findKeyCommandConfig(commandNo, defaultMenuId, bizId) {
|
|
10242
|
+
const preferSetting = getPreferSettingFromStorage('shortcuts');
|
|
10213
10243
|
// 查找匹配的 commandNo
|
|
10214
10244
|
let commands = preferSetting.filter((item)=>item.commandNo === commandNo);
|
|
10215
10245
|
// 如果提供了默认 menuId,优先使用它进行过滤
|
|
@@ -10219,17 +10249,26 @@ function findKeyboardValue(commandNo, defaultMenuId, bizId) {
|
|
|
10219
10249
|
}
|
|
10220
10250
|
if (0 === commands.length) {
|
|
10221
10251
|
console.warn(`未找到 commandNo: ${commandNo}${defaultMenuId ? `, menuId: ${defaultMenuId}` : ''} 的配置`);
|
|
10222
|
-
return
|
|
10252
|
+
return {
|
|
10253
|
+
keyboardValue: null,
|
|
10254
|
+
menuId: null
|
|
10255
|
+
};
|
|
10223
10256
|
}
|
|
10224
10257
|
// 如果找到多个匹配项,优先使用第一个(可以根据需要调整优先级逻辑)
|
|
10225
10258
|
const command = commands[0];
|
|
10226
10259
|
// 如果提供了 bizId,在 commandDetailList 中查找
|
|
10227
10260
|
if (bizId) {
|
|
10228
10261
|
const detail = command.commandDetailList.find((item)=>item.bizId === bizId);
|
|
10229
|
-
if (detail && detail.keyboardValue) return
|
|
10262
|
+
if (detail && detail.keyboardValue) return {
|
|
10263
|
+
keyboardValue: detail.keyboardValue,
|
|
10264
|
+
menuId: command.menuId || null
|
|
10265
|
+
};
|
|
10230
10266
|
}
|
|
10231
10267
|
// 如果没有找到 detail 或没有提供 bizId,使用 command 的 keyboardValue
|
|
10232
|
-
return
|
|
10268
|
+
return {
|
|
10269
|
+
keyboardValue: command.keyboardValue || null,
|
|
10270
|
+
menuId: command.menuId || null
|
|
10271
|
+
};
|
|
10233
10272
|
}
|
|
10234
10273
|
/* ESM default export */ const keyboard_valuevue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
10235
10274
|
__name: 'index',
|
|
@@ -10242,7 +10281,7 @@ function findKeyboardValue(commandNo, defaultMenuId, bizId) {
|
|
|
10242
10281
|
use_app_config_MAIN_APP_CONFIG.MENU_ID
|
|
10243
10282
|
]);
|
|
10244
10283
|
const props = __props;
|
|
10245
|
-
const value = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>
|
|
10284
|
+
const value = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>findKeyCommandConfig(props.commandNo, menuId, props.bizId)?.keyboardValue);
|
|
10246
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));
|
|
10247
10286
|
}
|
|
10248
10287
|
});
|
|
@@ -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
|
@@ -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);
|
|
@@ -5402,6 +5402,7 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
5402
5402
|
return (_ctx, _cache)=>{
|
|
5403
5403
|
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
5404
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");
|
|
5405
5406
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
5406
5407
|
ref_key: "containerRef",
|
|
5407
5408
|
ref: containerRef,
|
|
@@ -5414,7 +5415,10 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
5414
5415
|
key: item,
|
|
5415
5416
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
5416
5417
|
background: allTagsMap.value.get(item)?.background,
|
|
5417
|
-
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
|
|
5418
5422
|
}),
|
|
5419
5423
|
closable: !props.disabled,
|
|
5420
5424
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
@@ -5460,7 +5464,10 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
5460
5464
|
key: item,
|
|
5461
5465
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
5462
5466
|
background: allTagsMap.value.get(item)?.background,
|
|
5463
|
-
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
|
|
5464
5471
|
}),
|
|
5465
5472
|
closable: !props.disabled,
|
|
5466
5473
|
size: props.tagSize,
|
|
@@ -5516,9 +5523,16 @@ const TAG_MARGIN = 1; // 1rem
|
|
|
5516
5523
|
}),
|
|
5517
5524
|
onClick: showSelect
|
|
5518
5525
|
}, {
|
|
5519
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>
|
|
5520
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
5521
|
-
|
|
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
|
+
]),
|
|
5522
5536
|
_: 1
|
|
5523
5537
|
}, 8, [
|
|
5524
5538
|
"class"
|
|
@@ -5667,7 +5681,8 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5667
5681
|
}
|
|
5668
5682
|
const [, res] = await getBannerDataByBizId({
|
|
5669
5683
|
menuId: __props.menuId,
|
|
5670
|
-
|
|
5684
|
+
designFlag: __props.bizId ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO : void 0,
|
|
5685
|
+
bizId: __props.bizId ? __props.bizId : "0",
|
|
5671
5686
|
bizIdTypeCode: BANNER_COMPONENT_CONFIG[__props.code].bizIdTypeCode,
|
|
5672
5687
|
componentId: BANNER_COMPONENT_CONFIG[__props.code].componentId
|
|
5673
5688
|
});
|
|
@@ -7802,20 +7817,20 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7802
7817
|
isHidden: !props.multiSelectFlag,
|
|
7803
7818
|
selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
|
|
7804
7819
|
},
|
|
7805
|
-
{
|
|
7806
|
-
label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
|
|
7807
|
-
prop: 'orgTypeDescDisplay',
|
|
7808
|
-
minWidth: 80
|
|
7809
|
-
},
|
|
7810
7820
|
{
|
|
7811
7821
|
label: t('bizUnitSelect.table.orgNo', '编码'),
|
|
7812
7822
|
prop: 'orgNo',
|
|
7813
|
-
minWidth:
|
|
7823
|
+
minWidth: 100
|
|
7814
7824
|
},
|
|
7815
7825
|
{
|
|
7816
7826
|
label: t('bizUnitSelect.table.orgNameDisplay', '名称'),
|
|
7817
7827
|
prop: 'orgNameDisplay',
|
|
7818
|
-
minWidth:
|
|
7828
|
+
minWidth: 200
|
|
7829
|
+
},
|
|
7830
|
+
{
|
|
7831
|
+
label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
|
|
7832
|
+
prop: 'orgTypeDescDisplay',
|
|
7833
|
+
minWidth: 100
|
|
7819
7834
|
}
|
|
7820
7835
|
]
|
|
7821
7836
|
});
|
|
@@ -7870,7 +7885,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7870
7885
|
const handleChange = ()=>{
|
|
7871
7886
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
7872
7887
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
7873
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
7888
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
7874
7889
|
else {
|
|
7875
7890
|
const data = value[0] ? bizUnitList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
7876
7891
|
emit('change', value[0], data);
|
|
@@ -8037,7 +8052,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8037
8052
|
visible: popoverVisible.value,
|
|
8038
8053
|
ref_key: "popoverRef",
|
|
8039
8054
|
ref: popoverRef,
|
|
8040
|
-
width: "
|
|
8055
|
+
width: "auto",
|
|
8041
8056
|
trigger: "click",
|
|
8042
8057
|
placement: "bottom",
|
|
8043
8058
|
onShow: handlePopoverShow
|
|
@@ -8200,17 +8215,17 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8200
8215
|
{
|
|
8201
8216
|
label: t('departmentSelect.table.orgNo', '科室编码'),
|
|
8202
8217
|
prop: 'orgNo',
|
|
8203
|
-
minWidth:
|
|
8218
|
+
minWidth: 100
|
|
8204
8219
|
},
|
|
8205
8220
|
{
|
|
8206
8221
|
label: t('departmentSelect.table.orgName', '科室名称'),
|
|
8207
8222
|
prop: 'orgName',
|
|
8208
|
-
minWidth:
|
|
8223
|
+
minWidth: 200
|
|
8209
8224
|
},
|
|
8210
8225
|
{
|
|
8211
8226
|
label: t('departmentSelect.table.deptTypeDesc', '科室类型'),
|
|
8212
8227
|
prop: 'deptTypeDesc',
|
|
8213
|
-
minWidth:
|
|
8228
|
+
minWidth: 100
|
|
8214
8229
|
}
|
|
8215
8230
|
]
|
|
8216
8231
|
});
|
|
@@ -8281,7 +8296,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8281
8296
|
const handleChange = ()=>{
|
|
8282
8297
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
8283
8298
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
8284
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
8299
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
8285
8300
|
else {
|
|
8286
8301
|
const data = value[0] ? departmentList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
8287
8302
|
emit('change', value[0], data);
|
|
@@ -8448,7 +8463,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8448
8463
|
visible: popoverVisible.value,
|
|
8449
8464
|
ref_key: "popoverRef",
|
|
8450
8465
|
ref: popoverRef,
|
|
8451
|
-
width: "
|
|
8466
|
+
width: "auto",
|
|
8452
8467
|
trigger: "click",
|
|
8453
8468
|
placement: "bottom",
|
|
8454
8469
|
onShow: handlePopoverShow
|
|
@@ -8610,12 +8625,12 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8610
8625
|
{
|
|
8611
8626
|
label: t('wardSelect.table.orgNo', '病区编码'),
|
|
8612
8627
|
prop: 'orgNo',
|
|
8613
|
-
minWidth:
|
|
8628
|
+
minWidth: 100
|
|
8614
8629
|
},
|
|
8615
8630
|
{
|
|
8616
8631
|
label: t('wardSelect.table.orgName', '病区名称'),
|
|
8617
8632
|
prop: 'orgName',
|
|
8618
|
-
minWidth:
|
|
8633
|
+
minWidth: 200
|
|
8619
8634
|
}
|
|
8620
8635
|
]
|
|
8621
8636
|
});
|
|
@@ -8685,7 +8700,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8685
8700
|
const handleChange = ()=>{
|
|
8686
8701
|
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
8687
8702
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
8688
|
-
if (props.multiSelectFlag) emit('change', value);
|
|
8703
|
+
if (props.multiSelectFlag) emit('change', value, selectedRows.value);
|
|
8689
8704
|
else {
|
|
8690
8705
|
const data = value[0] ? wardList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
8691
8706
|
emit('change', value[0], data);
|
|
@@ -8852,7 +8867,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8852
8867
|
visible: popoverVisible.value,
|
|
8853
8868
|
ref_key: "popoverRef",
|
|
8854
8869
|
ref: popoverRef,
|
|
8855
|
-
width: "
|
|
8870
|
+
width: "auto",
|
|
8856
8871
|
trigger: "click",
|
|
8857
8872
|
placement: "bottom",
|
|
8858
8873
|
onShow: handlePopoverShow
|
|
@@ -9279,7 +9294,7 @@ const WB_NO = "wbNo";
|
|
|
9279
9294
|
const pro_form_exports_ = pro_formvue_type_script_setup_true_lang_ts_name_ProForm;
|
|
9280
9295
|
/* ESM default export */ const pro_form = pro_form_exports_;
|
|
9281
9296
|
const Titlevue_type_script_setup_true_lang_ts_name_sunTitle_hoisted_1 = {
|
|
9282
|
-
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"
|
|
9283
9298
|
};
|
|
9284
9299
|
/* ESM default export */ const Titlevue_type_script_setup_true_lang_ts_name_sunTitle = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
9285
9300
|
__name: 'Title',
|
|
@@ -10619,62 +10634,78 @@ if ('undefined' != typeof window) {
|
|
|
10619
10634
|
};
|
|
10620
10635
|
window.hotkeys = hotkeys;
|
|
10621
10636
|
}
|
|
10637
|
+
const COMMON_MENU_ID = '1644891388162187264';
|
|
10622
10638
|
// 设置 hotkeys-js 全局 filter,无论焦点在何处都响应快捷键
|
|
10623
10639
|
hotkeys.filter = ()=>true;
|
|
10624
|
-
//
|
|
10625
|
-
function
|
|
10626
|
-
|
|
10627
|
-
|
|
10640
|
+
// 生成浏览器快捷键列表的函数
|
|
10641
|
+
function generateBrowserShortcuts() {
|
|
10642
|
+
const shortcuts = [];
|
|
10643
|
+
// 基础功能键
|
|
10644
|
+
const basicKeys = [
|
|
10628
10645
|
'f1',
|
|
10629
10646
|
'f2',
|
|
10630
10647
|
'f3',
|
|
10631
10648
|
'f6',
|
|
10632
|
-
'f7'
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
'
|
|
10638
|
-
'
|
|
10639
|
-
'
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
'
|
|
10648
|
-
'
|
|
10649
|
-
'
|
|
10650
|
-
'
|
|
10651
|
-
'
|
|
10652
|
-
'
|
|
10653
|
-
'
|
|
10654
|
-
'
|
|
10655
|
-
'
|
|
10656
|
-
'
|
|
10657
|
-
'
|
|
10658
|
-
'
|
|
10659
|
-
'
|
|
10660
|
-
'
|
|
10661
|
-
'
|
|
10662
|
-
'
|
|
10663
|
-
'
|
|
10664
|
-
'
|
|
10665
|
-
'
|
|
10666
|
-
'
|
|
10667
|
-
'
|
|
10668
|
-
'
|
|
10669
|
-
'
|
|
10670
|
-
'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'
|
|
10671
10687
|
];
|
|
10672
|
-
|
|
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 绑定阻止函数
|
|
10673
10703
|
browserShortcuts.forEach((shortcut)=>{
|
|
10674
10704
|
hotkeys(shortcut, (event)=>{
|
|
10675
10705
|
// 阻止默认行为
|
|
10676
10706
|
event.preventDefault();
|
|
10677
10707
|
event.stopPropagation();
|
|
10708
|
+
event.stopImmediatePropagation();
|
|
10678
10709
|
return false;
|
|
10679
10710
|
});
|
|
10680
10711
|
});
|
|
@@ -10683,9 +10714,9 @@ function disableBrowserShortcuts() {
|
|
|
10683
10714
|
// 在模块加载时直接禁用浏览器快捷键
|
|
10684
10715
|
disableBrowserShortcuts();
|
|
10685
10716
|
// 从 sessionStorage 获取 preferSetting
|
|
10686
|
-
function getPreferSettingFromStorage() {
|
|
10717
|
+
function getPreferSettingFromStorage(key) {
|
|
10687
10718
|
try {
|
|
10688
|
-
const stored = JSON.parse(sessionStorage.getItem('sun-app'))
|
|
10719
|
+
const stored = JSON.parse(sessionStorage.getItem('sun-app'))[key];
|
|
10689
10720
|
return stored || [];
|
|
10690
10721
|
} catch (error) {
|
|
10691
10722
|
console.warn('从 sessionStorage 获取 preferSetting 失败:', error);
|
|
@@ -10693,8 +10724,8 @@ function getPreferSettingFromStorage() {
|
|
|
10693
10724
|
}
|
|
10694
10725
|
}
|
|
10695
10726
|
// 暴露给外部使用的查找方法
|
|
10696
|
-
function
|
|
10697
|
-
const preferSetting = getPreferSettingFromStorage();
|
|
10727
|
+
function findKeyCommandConfig(commandNo, defaultMenuId, bizId) {
|
|
10728
|
+
const preferSetting = getPreferSettingFromStorage('shortcuts');
|
|
10698
10729
|
// 查找匹配的 commandNo
|
|
10699
10730
|
let commands = preferSetting.filter((item)=>item.commandNo === commandNo);
|
|
10700
10731
|
// 如果提供了默认 menuId,优先使用它进行过滤
|
|
@@ -10704,17 +10735,26 @@ function findKeyboardValue(commandNo, defaultMenuId, bizId) {
|
|
|
10704
10735
|
}
|
|
10705
10736
|
if (0 === commands.length) {
|
|
10706
10737
|
console.warn(`未找到 commandNo: ${commandNo}${defaultMenuId ? `, menuId: ${defaultMenuId}` : ''} 的配置`);
|
|
10707
|
-
return
|
|
10738
|
+
return {
|
|
10739
|
+
keyboardValue: null,
|
|
10740
|
+
menuId: null
|
|
10741
|
+
};
|
|
10708
10742
|
}
|
|
10709
10743
|
// 如果找到多个匹配项,优先使用第一个(可以根据需要调整优先级逻辑)
|
|
10710
10744
|
const command = commands[0];
|
|
10711
10745
|
// 如果提供了 bizId,在 commandDetailList 中查找
|
|
10712
10746
|
if (bizId) {
|
|
10713
10747
|
const detail = command.commandDetailList.find((item)=>item.bizId === bizId);
|
|
10714
|
-
if (detail && detail.keyboardValue) return
|
|
10748
|
+
if (detail && detail.keyboardValue) return {
|
|
10749
|
+
keyboardValue: detail.keyboardValue,
|
|
10750
|
+
menuId: command.menuId || null
|
|
10751
|
+
};
|
|
10715
10752
|
}
|
|
10716
10753
|
// 如果没有找到 detail 或没有提供 bizId,使用 command 的 keyboardValue
|
|
10717
|
-
return
|
|
10754
|
+
return {
|
|
10755
|
+
keyboardValue: command.keyboardValue || null,
|
|
10756
|
+
menuId: command.menuId || null
|
|
10757
|
+
};
|
|
10718
10758
|
}
|
|
10719
10759
|
// 自动在元素文本中显示快捷键
|
|
10720
10760
|
async function updateElementText(el, keyboardValue) {
|
|
@@ -10728,7 +10768,7 @@ function parseBinding(binding, defaultMenuId) {
|
|
|
10728
10768
|
};
|
|
10729
10769
|
const opts = binding.value;
|
|
10730
10770
|
// 通过 preferSetting 查找 keyboardValue
|
|
10731
|
-
const keyboardValue =
|
|
10771
|
+
const keyboardValue = findKeyCommandConfig(opts.commandNo, defaultMenuId, opts.bizId)?.keyboardValue;
|
|
10732
10772
|
if (!keyboardValue) {
|
|
10733
10773
|
console.warn(`未找到 commandNo: ${opts.commandNo}, menuId: ${defaultMenuId || '未指定'}, bizId: ${opts.bizId || '未指定'} 对应的 keyboardValue`);
|
|
10734
10774
|
return null;
|
|
@@ -10752,6 +10792,10 @@ function createShortcutDirective(menuId) {
|
|
|
10752
10792
|
if (parsed.autoDisplay && parsed.key) updateElementText(el, parsed.key);
|
|
10753
10793
|
// 记录 handler 以便卸载时解绑
|
|
10754
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;
|
|
10755
10799
|
if ('function' == typeof parsed.handler) parsed.handler(e);
|
|
10756
10800
|
else el.click?.();
|
|
10757
10801
|
};
|
|
@@ -10779,7 +10823,7 @@ function createShortcutDirective(menuId) {
|
|
|
10779
10823
|
use_app_config_MAIN_APP_CONFIG.MENU_ID
|
|
10780
10824
|
]);
|
|
10781
10825
|
const props = __props;
|
|
10782
|
-
const value = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>
|
|
10826
|
+
const value = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>findKeyCommandConfig(props.commandNo, menuId, props.bizId)?.keyboardValue);
|
|
10783
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));
|
|
10784
10828
|
}
|
|
10785
10829
|
});
|
|
@@ -11614,4 +11658,4 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
|
|
|
11614
11658
|
]);
|
|
11615
11659
|
/* ESM default export */ const form_design_render = form_design_render_exports_;
|
|
11616
11660
|
/** components **/ /** hooks ** */ var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
|
|
11617
|
-
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 };
|