sun-biz 0.0.4-beta.30 → 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 +191 -58
- package/dist/index.js +191 -58
- 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
|
];
|
|
@@ -2076,6 +2091,10 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
2076
2091
|
]
|
|
2077
2092
|
]);
|
|
2078
2093
|
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
2094
|
+
const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
2095
|
+
key: 1,
|
|
2096
|
+
class: "flex items-center justify-center bg-white bg-opacity-80 py-3"
|
|
2097
|
+
};
|
|
2079
2098
|
/* ESM default export */ const Tablevue_type_script_setup_true_lang_tsx_name_Table = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
2080
2099
|
__name: 'Table',
|
|
2081
2100
|
props: {
|
|
@@ -2102,6 +2121,9 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
2102
2121
|
Function,
|
|
2103
2122
|
String
|
|
2104
2123
|
]
|
|
2124
|
+
},
|
|
2125
|
+
scrollLoading: {
|
|
2126
|
+
type: Boolean
|
|
2105
2127
|
}
|
|
2106
2128
|
},
|
|
2107
2129
|
emits: [
|
|
@@ -2161,10 +2183,22 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
2161
2183
|
"row-class-name": rowClassNameAdapter,
|
|
2162
2184
|
border: ""
|
|
2163
2185
|
}, _ctx.$attrs), {
|
|
2186
|
+
append: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2187
|
+
_ctx.$slots.append ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "append", {
|
|
2188
|
+
key: 0
|
|
2189
|
+
}) : props.scrollLoading ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1, _cache[1] || (_cache[1] = [
|
|
2190
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", {
|
|
2191
|
+
class: "text-sm text-gray-500"
|
|
2192
|
+
}, "加载中...", -1)
|
|
2193
|
+
]))) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
2194
|
+
]),
|
|
2195
|
+
empty: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2196
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "empty")
|
|
2197
|
+
]),
|
|
2164
2198
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2165
|
-
((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, {
|
|
2166
2200
|
"column-obj": item,
|
|
2167
|
-
key:
|
|
2201
|
+
key: item.prop
|
|
2168
2202
|
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
2169
2203
|
_: 2
|
|
2170
2204
|
}, [
|
|
@@ -2304,6 +2338,12 @@ const SELECTION = 'selection';
|
|
|
2304
2338
|
pageInfo: {
|
|
2305
2339
|
default: void 0
|
|
2306
2340
|
},
|
|
2341
|
+
scrollLoading: {
|
|
2342
|
+
type: Boolean
|
|
2343
|
+
},
|
|
2344
|
+
scrollThreshold: {
|
|
2345
|
+
default: 80
|
|
2346
|
+
},
|
|
2307
2347
|
componentNo: {
|
|
2308
2348
|
default: ''
|
|
2309
2349
|
},
|
|
@@ -2387,7 +2427,8 @@ const SELECTION = 'selection';
|
|
|
2387
2427
|
"size-page-change",
|
|
2388
2428
|
"current-page-change",
|
|
2389
2429
|
"sort-change",
|
|
2390
|
-
"scroll"
|
|
2430
|
+
"scroll",
|
|
2431
|
+
"columns-change"
|
|
2391
2432
|
],
|
|
2392
2433
|
setup (__props, { expose: __expose, emit: __emit }) {
|
|
2393
2434
|
const props = __props;
|
|
@@ -2416,6 +2457,7 @@ const SELECTION = 'selection';
|
|
|
2416
2457
|
// 新增:Sortable实例引用
|
|
2417
2458
|
let sortableInstance = null;
|
|
2418
2459
|
const refreshIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
|
|
2460
|
+
let oldScrollTop = 0;
|
|
2419
2461
|
// 定义 emit 事件
|
|
2420
2462
|
const emit = __emit;
|
|
2421
2463
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
@@ -2792,11 +2834,12 @@ const SELECTION = 'selection';
|
|
|
2792
2834
|
// 获取表格容器元素
|
|
2793
2835
|
const clientHeight = document.querySelector(`#${uuid.value} .el-table__body-wrapper`)?.clientHeight;
|
|
2794
2836
|
const scrollHeight = document.querySelector(`#${uuid.value} .el-table__body`)?.scrollHeight;
|
|
2795
|
-
const threshold =
|
|
2796
|
-
if (scrollHeight - event.scrollTop - clientHeight < threshold) {
|
|
2837
|
+
const threshold = props.scrollThreshold; // 距离底部80px时触发加载
|
|
2838
|
+
if (scrollHeight - event.scrollTop - clientHeight < threshold && event.scrollTop > oldScrollTop) {
|
|
2797
2839
|
console.log('触发加载更多数据');
|
|
2798
2840
|
props.scrollLoad();
|
|
2799
2841
|
}
|
|
2842
|
+
oldScrollTop = event.scrollTop;
|
|
2800
2843
|
}
|
|
2801
2844
|
let debounceScroll = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(handleTableScroll, 500);
|
|
2802
2845
|
/**
|
|
@@ -2822,6 +2865,12 @@ const SELECTION = 'selection';
|
|
|
2822
2865
|
}
|
|
2823
2866
|
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
2824
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
|
+
});
|
|
2825
2874
|
/**
|
|
2826
2875
|
*
|
|
2827
2876
|
* 是否展示当前拖拽提示
|
|
@@ -2883,6 +2932,7 @@ const SELECTION = 'selection';
|
|
|
2883
2932
|
if (props.scrollLoad) (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(debounceScroll)(event);
|
|
2884
2933
|
emit('scroll', event);
|
|
2885
2934
|
}),
|
|
2935
|
+
"scroll-loading": props.scrollLoading,
|
|
2886
2936
|
"export-file-flag": exportFileFlag.value,
|
|
2887
2937
|
componentDesc: componentDesc.value,
|
|
2888
2938
|
key: refreshIndex.value,
|
|
@@ -2891,7 +2941,7 @@ const SELECTION = 'selection';
|
|
|
2891
2941
|
"show-setting": showSetting.value,
|
|
2892
2942
|
stripe: props.stripe,
|
|
2893
2943
|
"columns-setting": props.columnsSetting,
|
|
2894
|
-
loading: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading,
|
|
2944
|
+
loading: ((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading) && !props.scrollLoading,
|
|
2895
2945
|
onSuccess: fetchDbgridComponent,
|
|
2896
2946
|
onSortChange: sortChange,
|
|
2897
2947
|
ref_key: "tableRef",
|
|
@@ -2913,6 +2963,7 @@ const SELECTION = 'selection';
|
|
|
2913
2963
|
}))
|
|
2914
2964
|
]), 1040, [
|
|
2915
2965
|
"id",
|
|
2966
|
+
"scroll-loading",
|
|
2916
2967
|
"export-file-flag",
|
|
2917
2968
|
"componentDesc",
|
|
2918
2969
|
"common-columns",
|
|
@@ -2953,7 +3004,7 @@ const SELECTION = 'selection';
|
|
|
2953
3004
|
});
|
|
2954
3005
|
const pro_table_exports_ = pro_tablevue_type_script_lang_ts_setup_true_name_ProTable;
|
|
2955
3006
|
/* ESM default export */ const pro_table = pro_table_exports_;
|
|
2956
|
-
const
|
|
3007
|
+
const composables_Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
2957
3008
|
class: "min-h-0 flex-1"
|
|
2958
3009
|
};
|
|
2959
3010
|
/* ESM default export */ const composables_Tablevue_type_script_setup_true_lang_tsx_name_Table = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
@@ -3010,7 +3061,7 @@ const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
|
3010
3061
|
"columns-setting",
|
|
3011
3062
|
"columns"
|
|
3012
3063
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
3013
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div",
|
|
3064
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", composables_Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1, [
|
|
3014
3065
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElAutoResizer), null, {
|
|
3015
3066
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ height, width })=>[
|
|
3016
3067
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)((0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTableV2), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
@@ -6959,7 +7010,8 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
6959
7010
|
multiSelectFlag: {
|
|
6960
7011
|
type: Boolean
|
|
6961
7012
|
},
|
|
6962
|
-
defaultValue: {}
|
|
7013
|
+
defaultValue: {},
|
|
7014
|
+
selectProps: {}
|
|
6963
7015
|
},
|
|
6964
7016
|
emits: [
|
|
6965
7017
|
'change'
|
|
@@ -6973,6 +7025,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
6973
7025
|
const filterKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(''); // 检索值
|
|
6974
7026
|
const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
6975
7027
|
const defaultValueInserted = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
7028
|
+
const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
|
|
6976
7029
|
const getUserList = async (data)=>{
|
|
6977
7030
|
loading.value = true;
|
|
6978
7031
|
const [, res] = await api_queryUserList({
|
|
@@ -6999,13 +7052,11 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
6999
7052
|
label: item.userName,
|
|
7000
7053
|
value: item.userId
|
|
7001
7054
|
}));
|
|
7002
|
-
if (defaultList.length)
|
|
7003
|
-
list
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
defaultValueInserted.value = true;
|
|
7008
|
-
}
|
|
7055
|
+
if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
|
|
7056
|
+
...list,
|
|
7057
|
+
...defaultList
|
|
7058
|
+
], 'userId');
|
|
7059
|
+
defaultValueInserted.value = true;
|
|
7009
7060
|
userList.value = list.map((item)=>({
|
|
7010
7061
|
...item,
|
|
7011
7062
|
label: item.userNo ? `${item.label || item.userName}|${item.userNo}` : item.label || item.userName
|
|
@@ -7020,6 +7071,12 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7020
7071
|
deep: true,
|
|
7021
7072
|
immediate: true
|
|
7022
7073
|
});
|
|
7074
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.selectProps, ()=>{
|
|
7075
|
+
selectProps.value = props.selectProps || {};
|
|
7076
|
+
}, {
|
|
7077
|
+
deep: true,
|
|
7078
|
+
immediate: true
|
|
7079
|
+
});
|
|
7023
7080
|
const onChange = (value)=>{
|
|
7024
7081
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
7025
7082
|
if (props.multiSelectFlag) emit('change', value);
|
|
@@ -7040,8 +7097,11 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7040
7097
|
loading.value = false;
|
|
7041
7098
|
}
|
|
7042
7099
|
};
|
|
7100
|
+
const fetchData = async ()=>{
|
|
7101
|
+
await getUserList();
|
|
7102
|
+
};
|
|
7043
7103
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7044
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7104
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
7045
7105
|
if (props.keyWord && selectRef.value) {
|
|
7046
7106
|
const inputEl = selectRef.value?.$el.querySelector('input');
|
|
7047
7107
|
if (inputEl) {
|
|
@@ -7053,17 +7113,19 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7053
7113
|
inputEl.dispatchEvent(event);
|
|
7054
7114
|
}
|
|
7055
7115
|
}
|
|
7116
|
+
await fetchData();
|
|
7056
7117
|
});
|
|
7057
7118
|
});
|
|
7058
7119
|
__expose({
|
|
7059
7120
|
selectRef,
|
|
7060
7121
|
defaultValueInserted,
|
|
7061
|
-
userList
|
|
7122
|
+
userList,
|
|
7123
|
+
fetchData
|
|
7062
7124
|
});
|
|
7063
7125
|
return (_ctx, _cache)=>{
|
|
7064
7126
|
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
7065
7127
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
7066
|
-
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)({
|
|
7067
7129
|
ref_key: "selectRef",
|
|
7068
7130
|
ref: selectRef,
|
|
7069
7131
|
remote: "",
|
|
@@ -7074,7 +7136,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7074
7136
|
"remote-method": handelRemoteMethod,
|
|
7075
7137
|
onClear: _cache[0] || (_cache[0] = ($event)=>userList.value = []),
|
|
7076
7138
|
onChange: onChange
|
|
7077
|
-
}, {
|
|
7139
|
+
}, selectProps.value), {
|
|
7078
7140
|
label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ label })=>[
|
|
7079
7141
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(label?.split('|')?.[0]), 1)
|
|
7080
7142
|
]),
|
|
@@ -7089,7 +7151,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7089
7151
|
]))), 128))
|
|
7090
7152
|
]),
|
|
7091
7153
|
_: 1
|
|
7092
|
-
},
|
|
7154
|
+
}, 16, [
|
|
7093
7155
|
"loading",
|
|
7094
7156
|
"multiple"
|
|
7095
7157
|
]);
|
|
@@ -7402,8 +7464,11 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7402
7464
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
7403
7465
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
7404
7466
|
});
|
|
7467
|
+
const fetchData = async ()=>{
|
|
7468
|
+
await getBizUnitList();
|
|
7469
|
+
};
|
|
7405
7470
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7406
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7471
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
7407
7472
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
7408
7473
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgNameDisplay);
|
|
7409
7474
|
else {
|
|
@@ -7426,6 +7491,23 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7426
7491
|
inputEl.dispatchEvent(event);
|
|
7427
7492
|
}
|
|
7428
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
|
+
}
|
|
7429
7511
|
});
|
|
7430
7512
|
});
|
|
7431
7513
|
__expose({
|
|
@@ -7434,7 +7516,8 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7434
7516
|
selectRef,
|
|
7435
7517
|
popoverVisible,
|
|
7436
7518
|
defaultSetTableSelected,
|
|
7437
|
-
bizUnitList
|
|
7519
|
+
bizUnitList,
|
|
7520
|
+
fetchData
|
|
7438
7521
|
});
|
|
7439
7522
|
return (_ctx, _cache)=>{
|
|
7440
7523
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -7813,8 +7896,11 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7813
7896
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
7814
7897
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
7815
7898
|
});
|
|
7899
|
+
const fetchData = async ()=>{
|
|
7900
|
+
await getDepartmentList();
|
|
7901
|
+
};
|
|
7816
7902
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7817
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7903
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
7818
7904
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
7819
7905
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
|
|
7820
7906
|
else {
|
|
@@ -7837,6 +7923,23 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7837
7923
|
inputEl.dispatchEvent(event);
|
|
7838
7924
|
}
|
|
7839
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
|
+
}
|
|
7840
7943
|
});
|
|
7841
7944
|
});
|
|
7842
7945
|
__expose({
|
|
@@ -7845,7 +7948,8 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
7845
7948
|
selectRef,
|
|
7846
7949
|
popoverVisible,
|
|
7847
7950
|
defaultSetTableSelected,
|
|
7848
|
-
departmentList
|
|
7951
|
+
departmentList,
|
|
7952
|
+
fetchData
|
|
7849
7953
|
});
|
|
7850
7954
|
return (_ctx, _cache)=>{
|
|
7851
7955
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -8217,8 +8321,11 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8217
8321
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
8218
8322
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8219
8323
|
});
|
|
8324
|
+
const fetchData = async ()=>{
|
|
8325
|
+
await getWardList();
|
|
8326
|
+
};
|
|
8220
8327
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
8221
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8328
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
8222
8329
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
8223
8330
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
|
|
8224
8331
|
else {
|
|
@@ -8241,6 +8348,23 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8241
8348
|
inputEl.dispatchEvent(event);
|
|
8242
8349
|
}
|
|
8243
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
|
+
}
|
|
8244
8368
|
});
|
|
8245
8369
|
});
|
|
8246
8370
|
__expose({
|
|
@@ -8249,7 +8373,8 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8249
8373
|
selectRef,
|
|
8250
8374
|
popoverVisible,
|
|
8251
8375
|
defaultSetTableSelected,
|
|
8252
|
-
wardList
|
|
8376
|
+
wardList,
|
|
8377
|
+
fetchData
|
|
8253
8378
|
});
|
|
8254
8379
|
return (_ctx, _cache)=>{
|
|
8255
8380
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -8518,27 +8643,35 @@ const DICT_SELECT = 'dictSelect';
|
|
|
8518
8643
|
}, {
|
|
8519
8644
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8520
8645
|
bizIdTypeCode: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.bizIdTypeCode
|
|
8521
|
-
}), 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__.
|
|
8522
|
-
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
|
|
8523
8650
|
}, {
|
|
8524
8651
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8525
8652
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8526
|
-
})
|
|
8527
|
-
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
|
|
8528
8657
|
}, {
|
|
8529
8658
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8530
8659
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8531
|
-
})
|
|
8532
|
-
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
|
|
8533
8664
|
}, {
|
|
8534
8665
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8535
8666
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8536
|
-
})
|
|
8537
|
-
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
|
|
8538
8671
|
}, {
|
|
8539
8672
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8540
8673
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8541
|
-
})
|
|
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)({
|
|
8542
8675
|
key: 8
|
|
8543
8676
|
}, {
|
|
8544
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
|
];
|
|
@@ -2112,6 +2127,10 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
2112
2127
|
]
|
|
2113
2128
|
]);
|
|
2114
2129
|
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
2130
|
+
const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
2131
|
+
key: 1,
|
|
2132
|
+
class: "flex items-center justify-center bg-white bg-opacity-80 py-3"
|
|
2133
|
+
};
|
|
2115
2134
|
/* ESM default export */ const Tablevue_type_script_setup_true_lang_tsx_name_Table = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
2116
2135
|
__name: 'Table',
|
|
2117
2136
|
props: {
|
|
@@ -2138,6 +2157,9 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
2138
2157
|
Function,
|
|
2139
2158
|
String
|
|
2140
2159
|
]
|
|
2160
|
+
},
|
|
2161
|
+
scrollLoading: {
|
|
2162
|
+
type: Boolean
|
|
2141
2163
|
}
|
|
2142
2164
|
},
|
|
2143
2165
|
emits: [
|
|
@@ -2197,10 +2219,22 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
2197
2219
|
"row-class-name": rowClassNameAdapter,
|
|
2198
2220
|
border: ""
|
|
2199
2221
|
}, _ctx.$attrs), {
|
|
2222
|
+
append: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2223
|
+
_ctx.$slots.append ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "append", {
|
|
2224
|
+
key: 0
|
|
2225
|
+
}) : props.scrollLoading ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1, _cache[1] || (_cache[1] = [
|
|
2226
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", {
|
|
2227
|
+
class: "text-sm text-gray-500"
|
|
2228
|
+
}, "加载中...", -1)
|
|
2229
|
+
]))) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
2230
|
+
]),
|
|
2231
|
+
empty: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2232
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "empty")
|
|
2233
|
+
]),
|
|
2200
2234
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2201
|
-
((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, {
|
|
2202
2236
|
"column-obj": item,
|
|
2203
|
-
key:
|
|
2237
|
+
key: item.prop
|
|
2204
2238
|
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
2205
2239
|
_: 2
|
|
2206
2240
|
}, [
|
|
@@ -2340,6 +2374,12 @@ const SELECTION = 'selection';
|
|
|
2340
2374
|
pageInfo: {
|
|
2341
2375
|
default: void 0
|
|
2342
2376
|
},
|
|
2377
|
+
scrollLoading: {
|
|
2378
|
+
type: Boolean
|
|
2379
|
+
},
|
|
2380
|
+
scrollThreshold: {
|
|
2381
|
+
default: 80
|
|
2382
|
+
},
|
|
2343
2383
|
componentNo: {
|
|
2344
2384
|
default: ''
|
|
2345
2385
|
},
|
|
@@ -2423,7 +2463,8 @@ const SELECTION = 'selection';
|
|
|
2423
2463
|
"size-page-change",
|
|
2424
2464
|
"current-page-change",
|
|
2425
2465
|
"sort-change",
|
|
2426
|
-
"scroll"
|
|
2466
|
+
"scroll",
|
|
2467
|
+
"columns-change"
|
|
2427
2468
|
],
|
|
2428
2469
|
setup (__props, { expose: __expose, emit: __emit }) {
|
|
2429
2470
|
const props = __props;
|
|
@@ -2452,6 +2493,7 @@ const SELECTION = 'selection';
|
|
|
2452
2493
|
// 新增:Sortable实例引用
|
|
2453
2494
|
let sortableInstance = null;
|
|
2454
2495
|
const refreshIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
|
|
2496
|
+
let oldScrollTop = 0;
|
|
2455
2497
|
// 定义 emit 事件
|
|
2456
2498
|
const emit = __emit;
|
|
2457
2499
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
@@ -2828,11 +2870,12 @@ const SELECTION = 'selection';
|
|
|
2828
2870
|
// 获取表格容器元素
|
|
2829
2871
|
const clientHeight = document.querySelector(`#${uuid.value} .el-table__body-wrapper`)?.clientHeight;
|
|
2830
2872
|
const scrollHeight = document.querySelector(`#${uuid.value} .el-table__body`)?.scrollHeight;
|
|
2831
|
-
const threshold =
|
|
2832
|
-
if (scrollHeight - event.scrollTop - clientHeight < threshold) {
|
|
2873
|
+
const threshold = props.scrollThreshold; // 距离底部80px时触发加载
|
|
2874
|
+
if (scrollHeight - event.scrollTop - clientHeight < threshold && event.scrollTop > oldScrollTop) {
|
|
2833
2875
|
console.log('触发加载更多数据');
|
|
2834
2876
|
props.scrollLoad();
|
|
2835
2877
|
}
|
|
2878
|
+
oldScrollTop = event.scrollTop;
|
|
2836
2879
|
}
|
|
2837
2880
|
let debounceScroll = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(handleTableScroll, 500);
|
|
2838
2881
|
/**
|
|
@@ -2858,6 +2901,12 @@ const SELECTION = 'selection';
|
|
|
2858
2901
|
}
|
|
2859
2902
|
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
2860
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
|
+
});
|
|
2861
2910
|
/**
|
|
2862
2911
|
*
|
|
2863
2912
|
* 是否展示当前拖拽提示
|
|
@@ -2919,6 +2968,7 @@ const SELECTION = 'selection';
|
|
|
2919
2968
|
if (props.scrollLoad) (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(debounceScroll)(event);
|
|
2920
2969
|
emit('scroll', event);
|
|
2921
2970
|
}),
|
|
2971
|
+
"scroll-loading": props.scrollLoading,
|
|
2922
2972
|
"export-file-flag": exportFileFlag.value,
|
|
2923
2973
|
componentDesc: componentDesc.value,
|
|
2924
2974
|
key: refreshIndex.value,
|
|
@@ -2927,7 +2977,7 @@ const SELECTION = 'selection';
|
|
|
2927
2977
|
"show-setting": showSetting.value,
|
|
2928
2978
|
stripe: props.stripe,
|
|
2929
2979
|
"columns-setting": props.columnsSetting,
|
|
2930
|
-
loading: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading,
|
|
2980
|
+
loading: ((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading) && !props.scrollLoading,
|
|
2931
2981
|
onSuccess: fetchDbgridComponent,
|
|
2932
2982
|
onSortChange: sortChange,
|
|
2933
2983
|
ref_key: "tableRef",
|
|
@@ -2949,6 +2999,7 @@ const SELECTION = 'selection';
|
|
|
2949
2999
|
}))
|
|
2950
3000
|
]), 1040, [
|
|
2951
3001
|
"id",
|
|
3002
|
+
"scroll-loading",
|
|
2952
3003
|
"export-file-flag",
|
|
2953
3004
|
"componentDesc",
|
|
2954
3005
|
"common-columns",
|
|
@@ -2989,7 +3040,7 @@ const SELECTION = 'selection';
|
|
|
2989
3040
|
});
|
|
2990
3041
|
const pro_table_exports_ = pro_tablevue_type_script_lang_ts_setup_true_name_ProTable;
|
|
2991
3042
|
/* ESM default export */ const pro_table = pro_table_exports_;
|
|
2992
|
-
const
|
|
3043
|
+
const composables_Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
2993
3044
|
class: "min-h-0 flex-1"
|
|
2994
3045
|
};
|
|
2995
3046
|
/* ESM default export */ const composables_Tablevue_type_script_setup_true_lang_tsx_name_Table = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
@@ -3046,7 +3097,7 @@ const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
|
3046
3097
|
"columns-setting",
|
|
3047
3098
|
"columns"
|
|
3048
3099
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
3049
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div",
|
|
3100
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", composables_Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1, [
|
|
3050
3101
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElAutoResizer), null, {
|
|
3051
3102
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ height, width })=>[
|
|
3052
3103
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)((0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTableV2), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
@@ -7730,7 +7781,8 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7730
7781
|
multiSelectFlag: {
|
|
7731
7782
|
type: Boolean
|
|
7732
7783
|
},
|
|
7733
|
-
defaultValue: {}
|
|
7784
|
+
defaultValue: {},
|
|
7785
|
+
selectProps: {}
|
|
7734
7786
|
},
|
|
7735
7787
|
emits: [
|
|
7736
7788
|
'change'
|
|
@@ -7744,6 +7796,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7744
7796
|
const filterKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(''); // 检索值
|
|
7745
7797
|
const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
7746
7798
|
const defaultValueInserted = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
7799
|
+
const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
|
|
7747
7800
|
const getUserList = async (data)=>{
|
|
7748
7801
|
loading.value = true;
|
|
7749
7802
|
const [, res] = await api_queryUserList({
|
|
@@ -7770,13 +7823,11 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7770
7823
|
label: item.userName,
|
|
7771
7824
|
value: item.userId
|
|
7772
7825
|
}));
|
|
7773
|
-
if (defaultList.length)
|
|
7774
|
-
list
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
defaultValueInserted.value = true;
|
|
7779
|
-
}
|
|
7826
|
+
if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
|
|
7827
|
+
...list,
|
|
7828
|
+
...defaultList
|
|
7829
|
+
], 'userId');
|
|
7830
|
+
defaultValueInserted.value = true;
|
|
7780
7831
|
userList.value = list.map((item)=>({
|
|
7781
7832
|
...item,
|
|
7782
7833
|
label: item.userNo ? `${item.label || item.userName}|${item.userNo}` : item.label || item.userName
|
|
@@ -7791,6 +7842,12 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7791
7842
|
deep: true,
|
|
7792
7843
|
immediate: true
|
|
7793
7844
|
});
|
|
7845
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.selectProps, ()=>{
|
|
7846
|
+
selectProps.value = props.selectProps || {};
|
|
7847
|
+
}, {
|
|
7848
|
+
deep: true,
|
|
7849
|
+
immediate: true
|
|
7850
|
+
});
|
|
7794
7851
|
const onChange = (value)=>{
|
|
7795
7852
|
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
7796
7853
|
if (props.multiSelectFlag) emit('change', value);
|
|
@@ -7811,8 +7868,11 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7811
7868
|
loading.value = false;
|
|
7812
7869
|
}
|
|
7813
7870
|
};
|
|
7871
|
+
const fetchData = async ()=>{
|
|
7872
|
+
await getUserList();
|
|
7873
|
+
};
|
|
7814
7874
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7815
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7875
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
7816
7876
|
if (props.keyWord && selectRef.value) {
|
|
7817
7877
|
const inputEl = selectRef.value?.$el.querySelector('input');
|
|
7818
7878
|
if (inputEl) {
|
|
@@ -7824,17 +7884,19 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7824
7884
|
inputEl.dispatchEvent(event);
|
|
7825
7885
|
}
|
|
7826
7886
|
}
|
|
7887
|
+
await fetchData();
|
|
7827
7888
|
});
|
|
7828
7889
|
});
|
|
7829
7890
|
__expose({
|
|
7830
7891
|
selectRef,
|
|
7831
7892
|
defaultValueInserted,
|
|
7832
|
-
userList
|
|
7893
|
+
userList,
|
|
7894
|
+
fetchData
|
|
7833
7895
|
});
|
|
7834
7896
|
return (_ctx, _cache)=>{
|
|
7835
7897
|
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
7836
7898
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
7837
|
-
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)({
|
|
7838
7900
|
ref_key: "selectRef",
|
|
7839
7901
|
ref: selectRef,
|
|
7840
7902
|
remote: "",
|
|
@@ -7845,7 +7907,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7845
7907
|
"remote-method": handelRemoteMethod,
|
|
7846
7908
|
onClear: _cache[0] || (_cache[0] = ($event)=>userList.value = []),
|
|
7847
7909
|
onChange: onChange
|
|
7848
|
-
}, {
|
|
7910
|
+
}, selectProps.value), {
|
|
7849
7911
|
label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ label })=>[
|
|
7850
7912
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(label?.split('|')?.[0]), 1)
|
|
7851
7913
|
]),
|
|
@@ -7860,7 +7922,7 @@ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_
|
|
|
7860
7922
|
]))), 128))
|
|
7861
7923
|
]),
|
|
7862
7924
|
_: 1
|
|
7863
|
-
},
|
|
7925
|
+
}, 16, [
|
|
7864
7926
|
"loading",
|
|
7865
7927
|
"multiple"
|
|
7866
7928
|
]);
|
|
@@ -8173,8 +8235,11 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8173
8235
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
8174
8236
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8175
8237
|
});
|
|
8238
|
+
const fetchData = async ()=>{
|
|
8239
|
+
await getBizUnitList();
|
|
8240
|
+
};
|
|
8176
8241
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
8177
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8242
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
8178
8243
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
8179
8244
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgNameDisplay);
|
|
8180
8245
|
else {
|
|
@@ -8197,6 +8262,23 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8197
8262
|
inputEl.dispatchEvent(event);
|
|
8198
8263
|
}
|
|
8199
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
|
+
}
|
|
8200
8282
|
});
|
|
8201
8283
|
});
|
|
8202
8284
|
__expose({
|
|
@@ -8205,7 +8287,8 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8205
8287
|
selectRef,
|
|
8206
8288
|
popoverVisible,
|
|
8207
8289
|
defaultSetTableSelected,
|
|
8208
|
-
bizUnitList
|
|
8290
|
+
bizUnitList,
|
|
8291
|
+
fetchData
|
|
8209
8292
|
});
|
|
8210
8293
|
return (_ctx, _cache)=>{
|
|
8211
8294
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -8584,8 +8667,11 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8584
8667
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
8585
8668
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8586
8669
|
});
|
|
8670
|
+
const fetchData = async ()=>{
|
|
8671
|
+
await getDepartmentList();
|
|
8672
|
+
};
|
|
8587
8673
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
8588
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8674
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
8589
8675
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
8590
8676
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
|
|
8591
8677
|
else {
|
|
@@ -8608,6 +8694,23 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8608
8694
|
inputEl.dispatchEvent(event);
|
|
8609
8695
|
}
|
|
8610
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
|
+
}
|
|
8611
8714
|
});
|
|
8612
8715
|
});
|
|
8613
8716
|
__expose({
|
|
@@ -8616,7 +8719,8 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_
|
|
|
8616
8719
|
selectRef,
|
|
8617
8720
|
popoverVisible,
|
|
8618
8721
|
defaultSetTableSelected,
|
|
8619
|
-
departmentList
|
|
8722
|
+
departmentList,
|
|
8723
|
+
fetchData
|
|
8620
8724
|
});
|
|
8621
8725
|
return (_ctx, _cache)=>{
|
|
8622
8726
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -8988,8 +9092,11 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
8988
9092
|
document.removeEventListener('keydown', handleKeydown, true);
|
|
8989
9093
|
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8990
9094
|
});
|
|
9095
|
+
const fetchData = async ()=>{
|
|
9096
|
+
await getWardList();
|
|
9097
|
+
};
|
|
8991
9098
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
8992
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
9099
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
|
|
8993
9100
|
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
8994
9101
|
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
|
|
8995
9102
|
else {
|
|
@@ -9012,6 +9119,23 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
9012
9119
|
inputEl.dispatchEvent(event);
|
|
9013
9120
|
}
|
|
9014
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
|
+
}
|
|
9015
9139
|
});
|
|
9016
9140
|
});
|
|
9017
9141
|
__expose({
|
|
@@ -9020,7 +9144,8 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
|
|
|
9020
9144
|
selectRef,
|
|
9021
9145
|
popoverVisible,
|
|
9022
9146
|
defaultSetTableSelected,
|
|
9023
|
-
wardList
|
|
9147
|
+
wardList,
|
|
9148
|
+
fetchData
|
|
9024
9149
|
});
|
|
9025
9150
|
return (_ctx, _cache)=>{
|
|
9026
9151
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
@@ -9181,27 +9306,35 @@ const DICT_SELECT = 'dictSelect';
|
|
|
9181
9306
|
}, {
|
|
9182
9307
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
9183
9308
|
bizIdTypeCode: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.bizIdTypeCode
|
|
9184
|
-
}), 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__.
|
|
9185
|
-
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
|
|
9186
9313
|
}, {
|
|
9187
9314
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
9188
9315
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
9189
|
-
})
|
|
9190
|
-
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
|
|
9191
9320
|
}, {
|
|
9192
9321
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
9193
9322
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
9194
|
-
})
|
|
9195
|
-
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
|
|
9196
9327
|
}, {
|
|
9197
9328
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
9198
9329
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
9199
|
-
})
|
|
9200
|
-
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
|
|
9201
9334
|
}, {
|
|
9202
9335
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
9203
9336
|
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
9204
|
-
})
|
|
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)({
|
|
9205
9338
|
key: 8
|
|
9206
9339
|
}, {
|
|
9207
9340
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs)
|