sun-biz 0.0.4-beta.31 → 0.0.4-beta.32
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 +157 -53
- package/dist/index.js +157 -53
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -361,7 +361,7 @@ function _isSlot(s) {
|
|
|
361
361
|
return 'function' == typeof s || '[object Object]' === Object.prototype.toString.call(s) && !(0, __WEBPACK_EXTERNAL_MODULE_vue__.isVNode)(s);
|
|
362
362
|
}
|
|
363
363
|
const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
364
|
-
name:
|
|
364
|
+
name: "TableColumn",
|
|
365
365
|
props: {
|
|
366
366
|
column: {
|
|
367
367
|
required: true,
|
|
@@ -369,13 +369,13 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
369
369
|
}
|
|
370
370
|
},
|
|
371
371
|
setup (props, { slots }) {
|
|
372
|
-
const enumMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)(
|
|
373
|
-
const hiddenDefaultText = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)(
|
|
372
|
+
const enumMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)("enumMap", (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(new Map())); // 注入数据(带默认值)
|
|
373
|
+
const hiddenDefaultText = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)("hiddenDefaultText"); // 渲染表格数据
|
|
374
374
|
const renderCellData = (item, scope)=>{
|
|
375
375
|
const rawValue = handleRowAccordingToProp(scope.row, item.prop);
|
|
376
376
|
let result = enumMap.value.get(item.prop) && item.isFilterEnum ? filterEnum(rawValue, enumMap.value.get(item.prop), item.fieldNames) : formatValue(rawValue);
|
|
377
|
-
if (item?.autoFormatterNumber) result = formatDecimalNumber(result) ??
|
|
378
|
-
if (hiddenDefaultText &&
|
|
377
|
+
if (item?.autoFormatterNumber) result = formatDecimalNumber(result) ?? "--";
|
|
378
|
+
if (hiddenDefaultText && "--" === result) result = " ";
|
|
379
379
|
return item?.supportCopyAndTips ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(copy_text_with_tooltip, {
|
|
380
380
|
supportTextCopy: item?.supportTextCopy,
|
|
381
381
|
align: "text-center",
|
|
@@ -387,12 +387,12 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
387
387
|
result
|
|
388
388
|
]);
|
|
389
389
|
}; // 获取 tag 类型
|
|
390
|
-
const getTagType = (item, scope)=>filterEnum(handleRowAccordingToProp(scope.row, item.prop), enumMap.value.get(item.prop), item.fieldNames,
|
|
390
|
+
const getTagType = (item, scope)=>filterEnum(handleRowAccordingToProp(scope.row, item.prop), enumMap.value.get(item.prop), item.fieldNames, "tag") || "primary";
|
|
391
391
|
const renderColumn = (column)=>{
|
|
392
392
|
const { label, ...restColumn } = column;
|
|
393
393
|
const columnProps = {
|
|
394
394
|
...restColumn,
|
|
395
|
-
align: column.align ??
|
|
395
|
+
align: column.align ?? "center",
|
|
396
396
|
fixed: column.fixed ?? false,
|
|
397
397
|
showOverflowTooltip: column.showOverflowTooltip ?? column.prop !== OPERATION
|
|
398
398
|
};
|
|
@@ -412,41 +412,56 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
412
412
|
}, [
|
|
413
413
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("*")
|
|
414
414
|
]),
|
|
415
|
-
|
|
415
|
+
"function" == typeof column.label ? column.label() : column.label
|
|
416
416
|
], 2)
|
|
417
417
|
];
|
|
418
418
|
};
|
|
419
419
|
const renderDefault = (scope)=>{
|
|
420
|
-
if (column._children
|
|
421
|
-
//
|
|
422
|
-
if (column.render) {
|
|
420
|
+
if (Array.isArray(column._children) && column._children.length > 0) return column._children.map((child)=>renderColumn(child));
|
|
421
|
+
// Handle custom render function
|
|
422
|
+
if ("function" == typeof column.render) {
|
|
423
423
|
if (column.editable && scope.row.editable) {
|
|
424
|
-
let _slot;
|
|
424
|
+
let _slot; // 计算 propPath
|
|
425
|
+
const getPropPath = ()=>{
|
|
426
|
+
const indexPath = scope.row.indexPath;
|
|
427
|
+
if (!indexPath) return "";
|
|
428
|
+
const parts = indexPath.split("-");
|
|
429
|
+
if (parts.length > 1) return `tableData.${parts[0]}.${scope._self.props.treeProps.children}.${scope.$index}.${column.prop}`;
|
|
430
|
+
// normal table
|
|
431
|
+
return `tableData.${parts[1]}.${column.prop}`;
|
|
432
|
+
}; // 获取校验规则
|
|
433
|
+
const getRules = ()=>{
|
|
434
|
+
if (!column.rules) return [];
|
|
435
|
+
return "function" == typeof column.rules ? column.rules(scope.row) : column.rules;
|
|
436
|
+
};
|
|
425
437
|
return [
|
|
426
438
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-form-item"), {
|
|
427
439
|
style: {
|
|
428
|
-
marginBottom:
|
|
440
|
+
marginBottom: "0"
|
|
429
441
|
},
|
|
430
|
-
prop:
|
|
431
|
-
rules:
|
|
442
|
+
prop: getPropPath(),
|
|
443
|
+
rules: getRules()
|
|
432
444
|
}, _isSlot(_slot = column.render(scope.row, scope.$index)) ? _slot : {
|
|
433
445
|
default: ()=>[
|
|
434
446
|
_slot
|
|
435
447
|
],
|
|
436
448
|
_: 1
|
|
437
449
|
}, 8, [
|
|
450
|
+
"prop",
|
|
438
451
|
"rules"
|
|
439
452
|
])
|
|
440
453
|
];
|
|
441
|
-
}
|
|
454
|
+
} // Non-editable custom render
|
|
442
455
|
return [
|
|
443
456
|
column.render(scope.row, scope.$index)
|
|
444
457
|
];
|
|
445
|
-
} //
|
|
446
|
-
if (column.prop
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
458
|
+
} // Handle slot content
|
|
459
|
+
if (column.prop) {
|
|
460
|
+
const slotName = handleProp(column.prop);
|
|
461
|
+
if (slots?.[slotName]) return [
|
|
462
|
+
slots[slotName](scope)
|
|
463
|
+
];
|
|
464
|
+
} // Handle tag type
|
|
450
465
|
if (column.tag) {
|
|
451
466
|
let _slot2;
|
|
452
467
|
return [
|
|
@@ -461,7 +476,7 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
461
476
|
"type"
|
|
462
477
|
])
|
|
463
478
|
];
|
|
464
|
-
} //
|
|
479
|
+
} // Default render
|
|
465
480
|
return [
|
|
466
481
|
renderCellData(column, scope)
|
|
467
482
|
];
|
|
@@ -2181,9 +2196,9 @@ const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
|
2181
2196
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "empty")
|
|
2182
2197
|
]),
|
|
2183
2198
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2184
|
-
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(props.tableColumns, (item
|
|
2199
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(props.tableColumns, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(RenderColumn, {
|
|
2185
2200
|
"column-obj": item,
|
|
2186
|
-
key:
|
|
2201
|
+
key: item.prop
|
|
2187
2202
|
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
2188
2203
|
_: 2
|
|
2189
2204
|
}, [
|
|
@@ -2412,7 +2427,8 @@ const SELECTION = 'selection';
|
|
|
2412
2427
|
"size-page-change",
|
|
2413
2428
|
"current-page-change",
|
|
2414
2429
|
"sort-change",
|
|
2415
|
-
"scroll"
|
|
2430
|
+
"scroll",
|
|
2431
|
+
"columns-change"
|
|
2416
2432
|
],
|
|
2417
2433
|
setup (__props, { expose: __expose, emit: __emit }) {
|
|
2418
2434
|
const props = __props;
|
|
@@ -2849,6 +2865,12 @@ const SELECTION = 'selection';
|
|
|
2849
2865
|
}
|
|
2850
2866
|
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
2851
2867
|
});
|
|
2868
|
+
// 当 componentNo 存在时,监听 tableColumns 变化,触发 columns-change 事件
|
|
2869
|
+
if (props.componentNo) (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>tableColumns.value, (newColumns)=>{
|
|
2870
|
+
emit('columns-change', newColumns);
|
|
2871
|
+
}, {
|
|
2872
|
+
immediate: true
|
|
2873
|
+
});
|
|
2852
2874
|
/**
|
|
2853
2875
|
*
|
|
2854
2876
|
* 是否展示当前拖拽提示
|
|
@@ -6988,7 +7010,8 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
6988
7010
|
multiSelectFlag: {
|
|
6989
7011
|
type: Boolean
|
|
6990
7012
|
},
|
|
6991
|
-
defaultValue: {}
|
|
7013
|
+
defaultValue: {},
|
|
7014
|
+
selectProps: {}
|
|
6992
7015
|
},
|
|
6993
7016
|
emits: [
|
|
6994
7017
|
'change'
|
|
@@ -7002,6 +7025,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7002
7025
|
const filterKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(''); // 检索值
|
|
7003
7026
|
const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
7004
7027
|
const defaultValueInserted = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
7028
|
+
const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
|
|
7005
7029
|
const getUserList = async (data)=>{
|
|
7006
7030
|
loading.value = true;
|
|
7007
7031
|
const [, res] = await api_queryUserList({
|
|
@@ -7028,13 +7052,11 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7028
7052
|
label: item.userName,
|
|
7029
7053
|
value: item.userId
|
|
7030
7054
|
}));
|
|
7031
|
-
if (defaultList.length)
|
|
7032
|
-
list
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
defaultValueInserted.value = true;
|
|
7037
|
-
}
|
|
7055
|
+
if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
|
|
7056
|
+
...list,
|
|
7057
|
+
...defaultList
|
|
7058
|
+
], 'userId');
|
|
7059
|
+
defaultValueInserted.value = true;
|
|
7038
7060
|
userList.value = list.map((item)=>({
|
|
7039
7061
|
...item,
|
|
7040
7062
|
label: item.userNo ? `${item.label || item.userName}|${item.userNo}` : item.label || item.userName
|
|
@@ -7049,6 +7071,12 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7049
7071
|
deep: true,
|
|
7050
7072
|
immediate: true
|
|
7051
7073
|
});
|
|
7074
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.selectProps, ()=>{
|
|
7075
|
+
selectProps.value = props.selectProps || {};
|
|
7076
|
+
}, {
|
|
7077
|
+
deep: true,
|
|
7078
|
+
immediate: true
|
|
7079
|
+
});
|
|
7052
7080
|
const onChange = (value)=>{
|
|
7053
7081
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
7054
7082
|
if (props.multiSelectFlag) emit('change', value);
|
|
@@ -7069,8 +7097,11 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7069
7097
|
loading.value = false;
|
|
7070
7098
|
}
|
|
7071
7099
|
};
|
|
7100
|
+
const fetchData = async ()=>{
|
|
7101
|
+
await getUserList();
|
|
7102
|
+
};
|
|
7072
7103
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7073
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7104
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
7074
7105
|
if (props.keyWord && selectRef.value) {
|
|
7075
7106
|
const inputEl = selectRef.value?.$el.querySelector('input');
|
|
7076
7107
|
if (inputEl) {
|
|
@@ -7082,17 +7113,19 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7082
7113
|
inputEl.dispatchEvent(event);
|
|
7083
7114
|
}
|
|
7084
7115
|
}
|
|
7116
|
+
await fetchData();
|
|
7085
7117
|
});
|
|
7086
7118
|
});
|
|
7087
7119
|
__expose({
|
|
7088
7120
|
selectRef,
|
|
7089
7121
|
defaultValueInserted,
|
|
7090
|
-
userList
|
|
7122
|
+
userList,
|
|
7123
|
+
fetchData
|
|
7091
7124
|
});
|
|
7092
7125
|
return (_ctx, _cache)=>{
|
|
7093
7126
|
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
7094
7127
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
7095
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
7128
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
7096
7129
|
ref_key: "selectRef",
|
|
7097
7130
|
ref: selectRef,
|
|
7098
7131
|
remote: "",
|
|
@@ -7103,7 +7136,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7103
7136
|
"remote-method": handelRemoteMethod,
|
|
7104
7137
|
onClear: _cache[0] || (_cache[0] = ($event)=>userList.value = []),
|
|
7105
7138
|
onChange: onChange
|
|
7106
|
-
}, {
|
|
7139
|
+
}, selectProps.value), {
|
|
7107
7140
|
label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ label })=>[
|
|
7108
7141
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(label?.split('|')?.[0]), 1)
|
|
7109
7142
|
]),
|
|
@@ -7118,7 +7151,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7118
7151
|
]))), 128))
|
|
7119
7152
|
]),
|
|
7120
7153
|
_: 1
|
|
7121
|
-
},
|
|
7154
|
+
}, 16, [
|
|
7122
7155
|
"loading",
|
|
7123
7156
|
"multiple"
|
|
7124
7157
|
]);
|
|
@@ -7431,8 +7464,11 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7431
7464
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
7432
7465
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
7433
7466
|
});
|
|
7467
|
+
const fetchData = async ()=>{
|
|
7468
|
+
await getBizUnitList();
|
|
7469
|
+
};
|
|
7434
7470
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7435
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7471
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
7436
7472
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
7437
7473
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgNameDisplay);
|
|
7438
7474
|
else {
|
|
@@ -7455,6 +7491,23 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7455
7491
|
inputEl.dispatchEvent(event);
|
|
7456
7492
|
}
|
|
7457
7493
|
}
|
|
7494
|
+
await fetchData();
|
|
7495
|
+
if (attrs?.modelValue && (!props.defaultValue || Array.isArray(props.defaultValue) && !props.defaultValue.length)) {
|
|
7496
|
+
if (props.multiSelectFlag) {
|
|
7497
|
+
const items = bizUnitList.value.filter((item)=>attrs.modelValue?.includes(item.value));
|
|
7498
|
+
selectedValue.value = items.map((item)=>item.label || item.orgNameDisplay);
|
|
7499
|
+
selectedRows.value = items;
|
|
7500
|
+
} else {
|
|
7501
|
+
const item = bizUnitList.value.find((item)=>item.value === attrs?.modelValue);
|
|
7502
|
+
if (item?.label && selectedValue.value !== item.label) {
|
|
7503
|
+
selectedValue.value = item.label;
|
|
7504
|
+
selectedRows.value = [
|
|
7505
|
+
item
|
|
7506
|
+
];
|
|
7507
|
+
}
|
|
7508
|
+
}
|
|
7509
|
+
defaultSetTableSelected.value = false;
|
|
7510
|
+
}
|
|
7458
7511
|
});
|
|
7459
7512
|
});
|
|
7460
7513
|
__expose({
|
|
@@ -7463,7 +7516,8 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7463
7516
|
selectRef,
|
|
7464
7517
|
popoverVisible,
|
|
7465
7518
|
defaultSetTableSelected,
|
|
7466
|
-
bizUnitList
|
|
7519
|
+
bizUnitList,
|
|
7520
|
+
fetchData
|
|
7467
7521
|
});
|
|
7468
7522
|
return (_ctx, _cache)=>{
|
|
7469
7523
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -7842,8 +7896,11 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7842
7896
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
7843
7897
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
7844
7898
|
});
|
|
7899
|
+
const fetchData = async ()=>{
|
|
7900
|
+
await getDepartmentList();
|
|
7901
|
+
};
|
|
7845
7902
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7846
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7903
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
7847
7904
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
7848
7905
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
|
|
7849
7906
|
else {
|
|
@@ -7866,6 +7923,23 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7866
7923
|
inputEl.dispatchEvent(event);
|
|
7867
7924
|
}
|
|
7868
7925
|
}
|
|
7926
|
+
await fetchData();
|
|
7927
|
+
if (attrs?.modelValue && (!props.defaultValue || Array.isArray(props.defaultValue) && !props.defaultValue.length)) {
|
|
7928
|
+
if (props.multiSelectFlag) {
|
|
7929
|
+
const items = departmentList.value.filter((item)=>attrs.modelValue?.includes(item.value));
|
|
7930
|
+
selectedValue.value = items.map((item)=>item.label || item.orgName);
|
|
7931
|
+
selectedRows.value = items;
|
|
7932
|
+
} else {
|
|
7933
|
+
const item = departmentList.value.find((item)=>item.value === attrs?.modelValue);
|
|
7934
|
+
if (item?.label && selectedValue.value !== item.label) {
|
|
7935
|
+
selectedValue.value = item.label;
|
|
7936
|
+
selectedRows.value = [
|
|
7937
|
+
item
|
|
7938
|
+
];
|
|
7939
|
+
}
|
|
7940
|
+
}
|
|
7941
|
+
defaultSetTableSelected.value = false;
|
|
7942
|
+
}
|
|
7869
7943
|
});
|
|
7870
7944
|
});
|
|
7871
7945
|
__expose({
|
|
@@ -7874,7 +7948,8 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7874
7948
|
selectRef,
|
|
7875
7949
|
popoverVisible,
|
|
7876
7950
|
defaultSetTableSelected,
|
|
7877
|
-
departmentList
|
|
7951
|
+
departmentList,
|
|
7952
|
+
fetchData
|
|
7878
7953
|
});
|
|
7879
7954
|
return (_ctx, _cache)=>{
|
|
7880
7955
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -8246,8 +8321,11 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8246
8321
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
8247
8322
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8248
8323
|
});
|
|
8324
|
+
const fetchData = async ()=>{
|
|
8325
|
+
await getWardList();
|
|
8326
|
+
};
|
|
8249
8327
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
8250
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8328
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
8251
8329
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
8252
8330
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
|
|
8253
8331
|
else {
|
|
@@ -8270,6 +8348,23 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8270
8348
|
inputEl.dispatchEvent(event);
|
|
8271
8349
|
}
|
|
8272
8350
|
}
|
|
8351
|
+
await fetchData();
|
|
8352
|
+
if (attrs?.modelValue && (!props.defaultValue || Array.isArray(props.defaultValue) && !props.defaultValue.length)) {
|
|
8353
|
+
if (props.multiSelectFlag) {
|
|
8354
|
+
const items = wardList.value.filter((item)=>attrs.modelValue?.includes(item.value));
|
|
8355
|
+
selectedValue.value = items.map((item)=>item.label || item.orgName);
|
|
8356
|
+
selectedRows.value = items;
|
|
8357
|
+
} else {
|
|
8358
|
+
const item = wardList.value.find((item)=>item.value === attrs?.modelValue);
|
|
8359
|
+
if (item?.label && selectedValue.value !== item.label) {
|
|
8360
|
+
selectedValue.value = item.label;
|
|
8361
|
+
selectedRows.value = [
|
|
8362
|
+
item
|
|
8363
|
+
];
|
|
8364
|
+
}
|
|
8365
|
+
}
|
|
8366
|
+
defaultSetTableSelected.value = false;
|
|
8367
|
+
}
|
|
8273
8368
|
});
|
|
8274
8369
|
});
|
|
8275
8370
|
__expose({
|
|
@@ -8278,7 +8373,8 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8278
8373
|
selectRef,
|
|
8279
8374
|
popoverVisible,
|
|
8280
8375
|
defaultSetTableSelected,
|
|
8281
|
-
wardList
|
|
8376
|
+
wardList,
|
|
8377
|
+
fetchData
|
|
8282
8378
|
});
|
|
8283
8379
|
return (_ctx, _cache)=>{
|
|
8284
8380
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -8547,27 +8643,35 @@ const DICT_SELECT = 'dictSelect';
|
|
|
8547
8643
|
}, {
|
|
8548
8644
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8549
8645
|
bizIdTypeCode: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.bizIdTypeCode
|
|
8550
|
-
}), null, 16)) : 'userSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(user_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
8551
|
-
key: 4
|
|
8646
|
+
}), null, 16)) : 'userSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(user_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8647
|
+
key: 4,
|
|
8648
|
+
ref_key: "componentRef",
|
|
8649
|
+
ref: componentRef
|
|
8552
8650
|
}, {
|
|
8553
8651
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8554
8652
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8555
|
-
})
|
|
8556
|
-
key: 5
|
|
8653
|
+
}), null, 16)) : 'bizUnitSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(biz_unit_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8654
|
+
key: 5,
|
|
8655
|
+
ref_key: "componentRef",
|
|
8656
|
+
ref: componentRef
|
|
8557
8657
|
}, {
|
|
8558
8658
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8559
8659
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8560
|
-
})
|
|
8561
|
-
key: 6
|
|
8660
|
+
}), null, 16)) : 'departmentSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(department_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8661
|
+
key: 6,
|
|
8662
|
+
ref_key: "componentRef",
|
|
8663
|
+
ref: componentRef
|
|
8562
8664
|
}, {
|
|
8563
8665
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8564
8666
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8565
|
-
})
|
|
8566
|
-
key: 7
|
|
8667
|
+
}), null, 16)) : 'wardSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(ward_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8668
|
+
key: 7,
|
|
8669
|
+
ref_key: "componentRef",
|
|
8670
|
+
ref: componentRef
|
|
8567
8671
|
}, {
|
|
8568
8672
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8569
8673
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8570
|
-
})
|
|
8674
|
+
}), null, 16)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component === DICT_SELECT ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(dict_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8571
8675
|
key: 8
|
|
8572
8676
|
}, {
|
|
8573
8677
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs)
|
package/dist/index.js
CHANGED
|
@@ -361,7 +361,7 @@ function _isSlot(s) {
|
|
|
361
361
|
return 'function' == typeof s || '[object Object]' === Object.prototype.toString.call(s) && !(0, __WEBPACK_EXTERNAL_MODULE_vue__.isVNode)(s);
|
|
362
362
|
}
|
|
363
363
|
const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
364
|
-
name:
|
|
364
|
+
name: "TableColumn",
|
|
365
365
|
props: {
|
|
366
366
|
column: {
|
|
367
367
|
required: true,
|
|
@@ -369,13 +369,13 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
369
369
|
}
|
|
370
370
|
},
|
|
371
371
|
setup (props, { slots }) {
|
|
372
|
-
const enumMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)(
|
|
373
|
-
const hiddenDefaultText = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)(
|
|
372
|
+
const enumMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)("enumMap", (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(new Map())); // 注入数据(带默认值)
|
|
373
|
+
const hiddenDefaultText = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)("hiddenDefaultText"); // 渲染表格数据
|
|
374
374
|
const renderCellData = (item, scope)=>{
|
|
375
375
|
const rawValue = handleRowAccordingToProp(scope.row, item.prop);
|
|
376
376
|
let result = enumMap.value.get(item.prop) && item.isFilterEnum ? filterEnum(rawValue, enumMap.value.get(item.prop), item.fieldNames) : formatValue(rawValue);
|
|
377
|
-
if (item?.autoFormatterNumber) result = formatDecimalNumber(result) ??
|
|
378
|
-
if (hiddenDefaultText &&
|
|
377
|
+
if (item?.autoFormatterNumber) result = formatDecimalNumber(result) ?? "--";
|
|
378
|
+
if (hiddenDefaultText && "--" === result) result = " ";
|
|
379
379
|
return item?.supportCopyAndTips ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(copy_text_with_tooltip, {
|
|
380
380
|
supportTextCopy: item?.supportTextCopy,
|
|
381
381
|
align: "text-center",
|
|
@@ -387,12 +387,12 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
387
387
|
result
|
|
388
388
|
]);
|
|
389
389
|
}; // 获取 tag 类型
|
|
390
|
-
const getTagType = (item, scope)=>filterEnum(handleRowAccordingToProp(scope.row, item.prop), enumMap.value.get(item.prop), item.fieldNames,
|
|
390
|
+
const getTagType = (item, scope)=>filterEnum(handleRowAccordingToProp(scope.row, item.prop), enumMap.value.get(item.prop), item.fieldNames, "tag") || "primary";
|
|
391
391
|
const renderColumn = (column)=>{
|
|
392
392
|
const { label, ...restColumn } = column;
|
|
393
393
|
const columnProps = {
|
|
394
394
|
...restColumn,
|
|
395
|
-
align: column.align ??
|
|
395
|
+
align: column.align ?? "center",
|
|
396
396
|
fixed: column.fixed ?? false,
|
|
397
397
|
showOverflowTooltip: column.showOverflowTooltip ?? column.prop !== OPERATION
|
|
398
398
|
};
|
|
@@ -412,41 +412,56 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
412
412
|
}, [
|
|
413
413
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("*")
|
|
414
414
|
]),
|
|
415
|
-
|
|
415
|
+
"function" == typeof column.label ? column.label() : column.label
|
|
416
416
|
], 2)
|
|
417
417
|
];
|
|
418
418
|
};
|
|
419
419
|
const renderDefault = (scope)=>{
|
|
420
|
-
if (column._children
|
|
421
|
-
//
|
|
422
|
-
if (column.render) {
|
|
420
|
+
if (Array.isArray(column._children) && column._children.length > 0) return column._children.map((child)=>renderColumn(child));
|
|
421
|
+
// Handle custom render function
|
|
422
|
+
if ("function" == typeof column.render) {
|
|
423
423
|
if (column.editable && scope.row.editable) {
|
|
424
|
-
let _slot;
|
|
424
|
+
let _slot; // 计算 propPath
|
|
425
|
+
const getPropPath = ()=>{
|
|
426
|
+
const indexPath = scope.row.indexPath;
|
|
427
|
+
if (!indexPath) return "";
|
|
428
|
+
const parts = indexPath.split("-");
|
|
429
|
+
if (parts.length > 1) return `tableData.${parts[0]}.${scope._self.props.treeProps.children}.${scope.$index}.${column.prop}`;
|
|
430
|
+
// normal table
|
|
431
|
+
return `tableData.${parts[1]}.${column.prop}`;
|
|
432
|
+
}; // 获取校验规则
|
|
433
|
+
const getRules = ()=>{
|
|
434
|
+
if (!column.rules) return [];
|
|
435
|
+
return "function" == typeof column.rules ? column.rules(scope.row) : column.rules;
|
|
436
|
+
};
|
|
425
437
|
return [
|
|
426
438
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-form-item"), {
|
|
427
439
|
style: {
|
|
428
|
-
marginBottom:
|
|
440
|
+
marginBottom: "0"
|
|
429
441
|
},
|
|
430
|
-
prop:
|
|
431
|
-
rules:
|
|
442
|
+
prop: getPropPath(),
|
|
443
|
+
rules: getRules()
|
|
432
444
|
}, _isSlot(_slot = column.render(scope.row, scope.$index)) ? _slot : {
|
|
433
445
|
default: ()=>[
|
|
434
446
|
_slot
|
|
435
447
|
],
|
|
436
448
|
_: 1
|
|
437
449
|
}, 8, [
|
|
450
|
+
"prop",
|
|
438
451
|
"rules"
|
|
439
452
|
])
|
|
440
453
|
];
|
|
441
|
-
}
|
|
454
|
+
} // Non-editable custom render
|
|
442
455
|
return [
|
|
443
456
|
column.render(scope.row, scope.$index)
|
|
444
457
|
];
|
|
445
|
-
} //
|
|
446
|
-
if (column.prop
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
458
|
+
} // Handle slot content
|
|
459
|
+
if (column.prop) {
|
|
460
|
+
const slotName = handleProp(column.prop);
|
|
461
|
+
if (slots?.[slotName]) return [
|
|
462
|
+
slots[slotName](scope)
|
|
463
|
+
];
|
|
464
|
+
} // Handle tag type
|
|
450
465
|
if (column.tag) {
|
|
451
466
|
let _slot2;
|
|
452
467
|
return [
|
|
@@ -461,7 +476,7 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
461
476
|
"type"
|
|
462
477
|
])
|
|
463
478
|
];
|
|
464
|
-
} //
|
|
479
|
+
} // Default render
|
|
465
480
|
return [
|
|
466
481
|
renderCellData(column, scope)
|
|
467
482
|
];
|
|
@@ -2217,9 +2232,9 @@ const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
|
2217
2232
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "empty")
|
|
2218
2233
|
]),
|
|
2219
2234
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2220
|
-
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(props.tableColumns, (item
|
|
2235
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(props.tableColumns, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(RenderColumn, {
|
|
2221
2236
|
"column-obj": item,
|
|
2222
|
-
key:
|
|
2237
|
+
key: item.prop
|
|
2223
2238
|
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
2224
2239
|
_: 2
|
|
2225
2240
|
}, [
|
|
@@ -2448,7 +2463,8 @@ const SELECTION = 'selection';
|
|
|
2448
2463
|
"size-page-change",
|
|
2449
2464
|
"current-page-change",
|
|
2450
2465
|
"sort-change",
|
|
2451
|
-
"scroll"
|
|
2466
|
+
"scroll",
|
|
2467
|
+
"columns-change"
|
|
2452
2468
|
],
|
|
2453
2469
|
setup (__props, { expose: __expose, emit: __emit }) {
|
|
2454
2470
|
const props = __props;
|
|
@@ -2885,6 +2901,12 @@ const SELECTION = 'selection';
|
|
|
2885
2901
|
}
|
|
2886
2902
|
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
2887
2903
|
});
|
|
2904
|
+
// 当 componentNo 存在时,监听 tableColumns 变化,触发 columns-change 事件
|
|
2905
|
+
if (props.componentNo) (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>tableColumns.value, (newColumns)=>{
|
|
2906
|
+
emit('columns-change', newColumns);
|
|
2907
|
+
}, {
|
|
2908
|
+
immediate: true
|
|
2909
|
+
});
|
|
2888
2910
|
/**
|
|
2889
2911
|
*
|
|
2890
2912
|
* 是否展示当前拖拽提示
|
|
@@ -7759,7 +7781,8 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7759
7781
|
multiSelectFlag: {
|
|
7760
7782
|
type: Boolean
|
|
7761
7783
|
},
|
|
7762
|
-
defaultValue: {}
|
|
7784
|
+
defaultValue: {},
|
|
7785
|
+
selectProps: {}
|
|
7763
7786
|
},
|
|
7764
7787
|
emits: [
|
|
7765
7788
|
'change'
|
|
@@ -7773,6 +7796,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7773
7796
|
const filterKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(''); // 检索值
|
|
7774
7797
|
const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
7775
7798
|
const defaultValueInserted = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
7799
|
+
const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
|
|
7776
7800
|
const getUserList = async (data)=>{
|
|
7777
7801
|
loading.value = true;
|
|
7778
7802
|
const [, res] = await api_queryUserList({
|
|
@@ -7799,13 +7823,11 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7799
7823
|
label: item.userName,
|
|
7800
7824
|
value: item.userId
|
|
7801
7825
|
}));
|
|
7802
|
-
if (defaultList.length)
|
|
7803
|
-
list
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
defaultValueInserted.value = true;
|
|
7808
|
-
}
|
|
7826
|
+
if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
|
|
7827
|
+
...list,
|
|
7828
|
+
...defaultList
|
|
7829
|
+
], 'userId');
|
|
7830
|
+
defaultValueInserted.value = true;
|
|
7809
7831
|
userList.value = list.map((item)=>({
|
|
7810
7832
|
...item,
|
|
7811
7833
|
label: item.userNo ? `${item.label || item.userName}|${item.userNo}` : item.label || item.userName
|
|
@@ -7820,6 +7842,12 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7820
7842
|
deep: true,
|
|
7821
7843
|
immediate: true
|
|
7822
7844
|
});
|
|
7845
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.selectProps, ()=>{
|
|
7846
|
+
selectProps.value = props.selectProps || {};
|
|
7847
|
+
}, {
|
|
7848
|
+
deep: true,
|
|
7849
|
+
immediate: true
|
|
7850
|
+
});
|
|
7823
7851
|
const onChange = (value)=>{
|
|
7824
7852
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
7825
7853
|
if (props.multiSelectFlag) emit('change', value);
|
|
@@ -7840,8 +7868,11 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7840
7868
|
loading.value = false;
|
|
7841
7869
|
}
|
|
7842
7870
|
};
|
|
7871
|
+
const fetchData = async ()=>{
|
|
7872
|
+
await getUserList();
|
|
7873
|
+
};
|
|
7843
7874
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7844
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7875
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
7845
7876
|
if (props.keyWord && selectRef.value) {
|
|
7846
7877
|
const inputEl = selectRef.value?.$el.querySelector('input');
|
|
7847
7878
|
if (inputEl) {
|
|
@@ -7853,17 +7884,19 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7853
7884
|
inputEl.dispatchEvent(event);
|
|
7854
7885
|
}
|
|
7855
7886
|
}
|
|
7887
|
+
await fetchData();
|
|
7856
7888
|
});
|
|
7857
7889
|
});
|
|
7858
7890
|
__expose({
|
|
7859
7891
|
selectRef,
|
|
7860
7892
|
defaultValueInserted,
|
|
7861
|
-
userList
|
|
7893
|
+
userList,
|
|
7894
|
+
fetchData
|
|
7862
7895
|
});
|
|
7863
7896
|
return (_ctx, _cache)=>{
|
|
7864
7897
|
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
7865
7898
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
7866
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
7899
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
7867
7900
|
ref_key: "selectRef",
|
|
7868
7901
|
ref: selectRef,
|
|
7869
7902
|
remote: "",
|
|
@@ -7874,7 +7907,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7874
7907
|
"remote-method": handelRemoteMethod,
|
|
7875
7908
|
onClear: _cache[0] || (_cache[0] = ($event)=>userList.value = []),
|
|
7876
7909
|
onChange: onChange
|
|
7877
|
-
}, {
|
|
7910
|
+
}, selectProps.value), {
|
|
7878
7911
|
label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ label })=>[
|
|
7879
7912
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(label?.split('|')?.[0]), 1)
|
|
7880
7913
|
]),
|
|
@@ -7889,7 +7922,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7889
7922
|
]))), 128))
|
|
7890
7923
|
]),
|
|
7891
7924
|
_: 1
|
|
7892
|
-
},
|
|
7925
|
+
}, 16, [
|
|
7893
7926
|
"loading",
|
|
7894
7927
|
"multiple"
|
|
7895
7928
|
]);
|
|
@@ -8202,8 +8235,11 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8202
8235
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
8203
8236
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8204
8237
|
});
|
|
8238
|
+
const fetchData = async ()=>{
|
|
8239
|
+
await getBizUnitList();
|
|
8240
|
+
};
|
|
8205
8241
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
8206
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8242
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
8207
8243
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
8208
8244
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgNameDisplay);
|
|
8209
8245
|
else {
|
|
@@ -8226,6 +8262,23 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8226
8262
|
inputEl.dispatchEvent(event);
|
|
8227
8263
|
}
|
|
8228
8264
|
}
|
|
8265
|
+
await fetchData();
|
|
8266
|
+
if (attrs?.modelValue && (!props.defaultValue || Array.isArray(props.defaultValue) && !props.defaultValue.length)) {
|
|
8267
|
+
if (props.multiSelectFlag) {
|
|
8268
|
+
const items = bizUnitList.value.filter((item)=>attrs.modelValue?.includes(item.value));
|
|
8269
|
+
selectedValue.value = items.map((item)=>item.label || item.orgNameDisplay);
|
|
8270
|
+
selectedRows.value = items;
|
|
8271
|
+
} else {
|
|
8272
|
+
const item = bizUnitList.value.find((item)=>item.value === attrs?.modelValue);
|
|
8273
|
+
if (item?.label && selectedValue.value !== item.label) {
|
|
8274
|
+
selectedValue.value = item.label;
|
|
8275
|
+
selectedRows.value = [
|
|
8276
|
+
item
|
|
8277
|
+
];
|
|
8278
|
+
}
|
|
8279
|
+
}
|
|
8280
|
+
defaultSetTableSelected.value = false;
|
|
8281
|
+
}
|
|
8229
8282
|
});
|
|
8230
8283
|
});
|
|
8231
8284
|
__expose({
|
|
@@ -8234,7 +8287,8 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8234
8287
|
selectRef,
|
|
8235
8288
|
popoverVisible,
|
|
8236
8289
|
defaultSetTableSelected,
|
|
8237
|
-
bizUnitList
|
|
8290
|
+
bizUnitList,
|
|
8291
|
+
fetchData
|
|
8238
8292
|
});
|
|
8239
8293
|
return (_ctx, _cache)=>{
|
|
8240
8294
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -8613,8 +8667,11 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8613
8667
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
8614
8668
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8615
8669
|
});
|
|
8670
|
+
const fetchData = async ()=>{
|
|
8671
|
+
await getDepartmentList();
|
|
8672
|
+
};
|
|
8616
8673
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
8617
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8674
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
8618
8675
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
8619
8676
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
|
|
8620
8677
|
else {
|
|
@@ -8637,6 +8694,23 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8637
8694
|
inputEl.dispatchEvent(event);
|
|
8638
8695
|
}
|
|
8639
8696
|
}
|
|
8697
|
+
await fetchData();
|
|
8698
|
+
if (attrs?.modelValue && (!props.defaultValue || Array.isArray(props.defaultValue) && !props.defaultValue.length)) {
|
|
8699
|
+
if (props.multiSelectFlag) {
|
|
8700
|
+
const items = departmentList.value.filter((item)=>attrs.modelValue?.includes(item.value));
|
|
8701
|
+
selectedValue.value = items.map((item)=>item.label || item.orgName);
|
|
8702
|
+
selectedRows.value = items;
|
|
8703
|
+
} else {
|
|
8704
|
+
const item = departmentList.value.find((item)=>item.value === attrs?.modelValue);
|
|
8705
|
+
if (item?.label && selectedValue.value !== item.label) {
|
|
8706
|
+
selectedValue.value = item.label;
|
|
8707
|
+
selectedRows.value = [
|
|
8708
|
+
item
|
|
8709
|
+
];
|
|
8710
|
+
}
|
|
8711
|
+
}
|
|
8712
|
+
defaultSetTableSelected.value = false;
|
|
8713
|
+
}
|
|
8640
8714
|
});
|
|
8641
8715
|
});
|
|
8642
8716
|
__expose({
|
|
@@ -8645,7 +8719,8 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8645
8719
|
selectRef,
|
|
8646
8720
|
popoverVisible,
|
|
8647
8721
|
defaultSetTableSelected,
|
|
8648
|
-
departmentList
|
|
8722
|
+
departmentList,
|
|
8723
|
+
fetchData
|
|
8649
8724
|
});
|
|
8650
8725
|
return (_ctx, _cache)=>{
|
|
8651
8726
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -9017,8 +9092,11 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
9017
9092
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
9018
9093
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
9019
9094
|
});
|
|
9095
|
+
const fetchData = async ()=>{
|
|
9096
|
+
await getWardList();
|
|
9097
|
+
};
|
|
9020
9098
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
9021
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
9099
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
9022
9100
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
9023
9101
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
|
|
9024
9102
|
else {
|
|
@@ -9041,6 +9119,23 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
9041
9119
|
inputEl.dispatchEvent(event);
|
|
9042
9120
|
}
|
|
9043
9121
|
}
|
|
9122
|
+
await fetchData();
|
|
9123
|
+
if (attrs?.modelValue && (!props.defaultValue || Array.isArray(props.defaultValue) && !props.defaultValue.length)) {
|
|
9124
|
+
if (props.multiSelectFlag) {
|
|
9125
|
+
const items = wardList.value.filter((item)=>attrs.modelValue?.includes(item.value));
|
|
9126
|
+
selectedValue.value = items.map((item)=>item.label || item.orgName);
|
|
9127
|
+
selectedRows.value = items;
|
|
9128
|
+
} else {
|
|
9129
|
+
const item = wardList.value.find((item)=>item.value === attrs?.modelValue);
|
|
9130
|
+
if (item?.label && selectedValue.value !== item.label) {
|
|
9131
|
+
selectedValue.value = item.label;
|
|
9132
|
+
selectedRows.value = [
|
|
9133
|
+
item
|
|
9134
|
+
];
|
|
9135
|
+
}
|
|
9136
|
+
}
|
|
9137
|
+
defaultSetTableSelected.value = false;
|
|
9138
|
+
}
|
|
9044
9139
|
});
|
|
9045
9140
|
});
|
|
9046
9141
|
__expose({
|
|
@@ -9049,7 +9144,8 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
9049
9144
|
selectRef,
|
|
9050
9145
|
popoverVisible,
|
|
9051
9146
|
defaultSetTableSelected,
|
|
9052
|
-
wardList
|
|
9147
|
+
wardList,
|
|
9148
|
+
fetchData
|
|
9053
9149
|
});
|
|
9054
9150
|
return (_ctx, _cache)=>{
|
|
9055
9151
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -9210,27 +9306,35 @@ const DICT_SELECT = 'dictSelect';
|
|
|
9210
9306
|
}, {
|
|
9211
9307
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
9212
9308
|
bizIdTypeCode: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.bizIdTypeCode
|
|
9213
|
-
}), null, 16)) : 'userSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(user_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
9214
|
-
key: 4
|
|
9309
|
+
}), null, 16)) : 'userSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(user_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
9310
|
+
key: 4,
|
|
9311
|
+
ref_key: "componentRef",
|
|
9312
|
+
ref: componentRef
|
|
9215
9313
|
}, {
|
|
9216
9314
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
9217
9315
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
9218
|
-
})
|
|
9219
|
-
key: 5
|
|
9316
|
+
}), null, 16)) : 'bizUnitSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(biz_unit_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
9317
|
+
key: 5,
|
|
9318
|
+
ref_key: "componentRef",
|
|
9319
|
+
ref: componentRef
|
|
9220
9320
|
}, {
|
|
9221
9321
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
9222
9322
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
9223
|
-
})
|
|
9224
|
-
key: 6
|
|
9323
|
+
}), null, 16)) : 'departmentSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(department_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
9324
|
+
key: 6,
|
|
9325
|
+
ref_key: "componentRef",
|
|
9326
|
+
ref: componentRef
|
|
9225
9327
|
}, {
|
|
9226
9328
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
9227
9329
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
9228
|
-
})
|
|
9229
|
-
key: 7
|
|
9330
|
+
}), null, 16)) : 'wardSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(ward_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
9331
|
+
key: 7,
|
|
9332
|
+
ref_key: "componentRef",
|
|
9333
|
+
ref: componentRef
|
|
9230
9334
|
}, {
|
|
9231
9335
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
9232
9336
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
9233
|
-
})
|
|
9337
|
+
}), null, 16)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component === DICT_SELECT ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(dict_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
9234
9338
|
key: 8
|
|
9235
9339
|
}, {
|
|
9236
9340
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs)
|