sun-biz 0.0.4-beta.8 → 0.0.4-pjw.1
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/biz-select/biz-unit-select/api.d.ts +34 -0
- package/dist/components/biz-select/department-select/api.d.ts +51 -0
- package/dist/components/biz-select/index.d.ts +5 -0
- package/dist/components/biz-select/tag-select/api.d.ts +6 -0
- package/dist/components/biz-select/user-select/api.d.ts +109 -0
- package/dist/components/biz-select/ward-select/api.d.ts +43 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2717 -706
- package/dist/components/patient-access/api.d.ts +10 -1
- package/dist/components/pro-avatar/index.d.ts +2 -0
- package/dist/components/pro-avatar/utils.d.ts +21 -0
- package/dist/components/pro-form/typings/index.d.ts +1 -0
- package/dist/components/pro-table/constant.d.ts +1 -0
- package/dist/components/pro-table/interface/index.d.ts +5 -0
- package/dist/components/static/css/index.css +3 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.js +53 -15
- package/dist/hooks/use-app-config/index.d.ts +2 -2
- package/dist/hooks/use-column&form-config/index.d.ts +5 -5
- package/dist/hooks/use-data-change-detector/index.d.ts +2 -1
- package/dist/hooks/use-fetch-data/index.d.ts +3 -0
- package/dist/hooks/{use-fetch-dataset/index.d.ts → use-fetch-data/use-fetch-dataset.d.ts} +1 -1
- package/dist/hooks/use-fetch-data/use-fetch-params.d.ts +24 -0
- package/dist/hooks/{use-fetch-dataset → use-fetch-data}/use-fetch-time.d.ts +1 -1
- package/dist/index.d.ts +25 -24
- package/dist/index.js +2758 -723
- package/dist/static/css/index.css +3 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -7,10 +7,11 @@ import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__ from "@sun-toolkit/
|
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__ from "@sun-toolkit/shared";
|
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__ from "@sun-toolkit/micro-app";
|
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE_vue_router__ from "vue-router";
|
|
10
|
-
import * as __WEBPACK_EXTERNAL_MODULE_i18next_vue__ from "i18next-vue";
|
|
11
10
|
import * as __WEBPACK_EXTERNAL_MODULE_js_pinyin__ from "js-pinyin";
|
|
11
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
|
|
12
|
+
import * as __WEBPACK_EXTERNAL_MODULE_i18next_vue__ from "i18next-vue";
|
|
12
13
|
var __webpack_modules__ = {
|
|
13
|
-
"./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.
|
|
14
|
+
"./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.18_typescript@5.9.2__webpack@5.101.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js": function(__unused_webpack_module, exports) {
|
|
14
15
|
// runtime helper for setting properties on components
|
|
15
16
|
// in a tree-shakable way
|
|
16
17
|
exports["default"] = (sfc, props)=>{
|
|
@@ -70,8 +71,8 @@ function __webpack_require__(moduleId) {
|
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
|
-
// EXTERNAL MODULE: ./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.
|
|
74
|
-
var exportHelper = __webpack_require__("./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.
|
|
74
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.18_typescript@5.9.2__webpack@5.101.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js
|
|
75
|
+
var exportHelper = __webpack_require__("./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.18_typescript@5.9.2__webpack@5.101.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js");
|
|
75
76
|
const __exports__ = /*#__PURE__*/ (0, exportHelper["default"])(Containervue_type_script_setup_true_lang_tsx, [
|
|
76
77
|
[
|
|
77
78
|
'__scopeId',
|
|
@@ -255,6 +256,7 @@ const copy_text_with_tooltip_exports_ = /*#__PURE__*/ (0, exportHelper["default"
|
|
|
255
256
|
const count = decimalCount(number);
|
|
256
257
|
return Number(number).toFixed(count > len ? count : len);
|
|
257
258
|
}
|
|
259
|
+
const OPERATION = 'operation';
|
|
258
260
|
/**
|
|
259
261
|
* @description: 是否为数组
|
|
260
262
|
*/ function isArray(val) {
|
|
@@ -390,7 +392,7 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
390
392
|
...column,
|
|
391
393
|
align: column.align ?? 'center',
|
|
392
394
|
fixed: column.fixed ?? false,
|
|
393
|
-
showOverflowTooltip: column.showOverflowTooltip ??
|
|
395
|
+
showOverflowTooltip: column.showOverflowTooltip ?? column.prop !== OPERATION
|
|
394
396
|
};
|
|
395
397
|
const renderHeader = (scope)=>{
|
|
396
398
|
if (column.headerRender) return [
|
|
@@ -431,6 +433,7 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
431
433
|
],
|
|
432
434
|
_: 1
|
|
433
435
|
}, 8, [
|
|
436
|
+
"prop",
|
|
434
437
|
"rules"
|
|
435
438
|
])
|
|
436
439
|
];
|
|
@@ -489,6 +492,7 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
489
492
|
return (_ctx, _cache)=>_ctx.columnObj?.type && columnTypes.includes(_ctx.columnObj.type) ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTableColumn), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
490
493
|
key: 0
|
|
491
494
|
}, _ctx.columnObj, {
|
|
495
|
+
key: _ctx.columnObj.type,
|
|
492
496
|
width: _ctx.columnObj.minWidth || _ctx.columnObj.width,
|
|
493
497
|
align: _ctx.columnObj.align ?? 'center',
|
|
494
498
|
"reserve-selection": 'selection' == _ctx.columnObj.type
|
|
@@ -546,7 +550,7 @@ const RenderColumn_exports_ = RenderColumnvue_type_script_lang_ts_setup_true_nam
|
|
|
546
550
|
* [1-10012-1]获取值域列表
|
|
547
551
|
* @param data
|
|
548
552
|
* @returns
|
|
549
|
-
*/ const queryDataSetByCodeSystemCodes = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)(
|
|
553
|
+
*/ const queryDataSetByCodeSystemCodes = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)("/codeSystem/queryDataSetByCodeSystemCodes", params, {
|
|
550
554
|
cancel: false
|
|
551
555
|
});
|
|
552
556
|
function useFetchDataset(codeSystemCodes, enabledFlag) {
|
|
@@ -566,6 +570,42 @@ function useFetchDataset(codeSystemCodes, enabledFlag) {
|
|
|
566
570
|
return list;
|
|
567
571
|
}
|
|
568
572
|
/* ESM default export */ const use_fetch_dataset = useFetchDataset;
|
|
573
|
+
/** 获取系统时间 */ async function getSystemTime() {
|
|
574
|
+
const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/dictCommon/getSysTime');
|
|
575
|
+
if (res?.success) return res.data;
|
|
576
|
+
return (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)();
|
|
577
|
+
}
|
|
578
|
+
/** 获取系统时间 */ function useFetchSystemTime() {
|
|
579
|
+
const time = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
580
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount)(()=>{
|
|
581
|
+
getSystemTime().then((val)=>time.value = val);
|
|
582
|
+
});
|
|
583
|
+
return time;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* [1-10012-1]获取值域列表
|
|
587
|
+
* @param data
|
|
588
|
+
* @returns
|
|
589
|
+
*/ const queryParamListByNos = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)("/parameter/queryParamListByNos", params);
|
|
590
|
+
function useFetchParams(options) {
|
|
591
|
+
const { hospitalId, paramNos, callback } = options;
|
|
592
|
+
const paramsConfig = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({});
|
|
593
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount)(async ()=>{
|
|
594
|
+
if (!hospitalId) return;
|
|
595
|
+
const [, res] = await queryParamListByNos({
|
|
596
|
+
hospitalId,
|
|
597
|
+
paramNos
|
|
598
|
+
});
|
|
599
|
+
if (res?.data) {
|
|
600
|
+
paramsConfig.value = res.data.reduce((acc, cur)=>{
|
|
601
|
+
acc[cur.paramNo] = cur.paramSettingList;
|
|
602
|
+
return acc;
|
|
603
|
+
}, {});
|
|
604
|
+
if (callback) callback(paramsConfig.value);
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
return paramsConfig;
|
|
608
|
+
}
|
|
569
609
|
/**
|
|
570
610
|
* [4-10090-1]根据数据源导出文件
|
|
571
611
|
* @param params
|
|
@@ -601,10 +641,10 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
601
641
|
}, [
|
|
602
642
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
|
|
603
643
|
class: `sort-caret ascending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES ? '!border-b-blue-500' : ''}`
|
|
604
|
-
}, null),
|
|
644
|
+
}, null, 2),
|
|
605
645
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
|
|
606
646
|
class: `sort-caret descending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO ? '!border-t-blue-500' : ''}`
|
|
607
|
-
}, null)
|
|
647
|
+
}, null, 2)
|
|
608
648
|
])
|
|
609
649
|
], 8, [
|
|
610
650
|
"onClick"
|
|
@@ -787,16 +827,39 @@ const _hoisted_3 = {
|
|
|
787
827
|
props.changeSourceData(result);
|
|
788
828
|
}
|
|
789
829
|
function changeInputSort(flag, sort) {
|
|
790
|
-
|
|
830
|
+
const currentRow = tableData.value[flag];
|
|
831
|
+
if (!currentRow) return; // 创建新的排序数组
|
|
832
|
+
let newData = [
|
|
791
833
|
...tableData.value
|
|
834
|
+
]; // 移除当前项
|
|
835
|
+
newData = newData.filter((item)=>item.prop !== currentRow.prop); // 在指定位置插入当前项
|
|
836
|
+
const insertIndex = Math.min(sort - 1, newData.length);
|
|
837
|
+
newData.splice(insertIndex, 0, currentRow); // 重新分配排序值
|
|
838
|
+
newData = newData.map((item, index)=>({
|
|
839
|
+
...item,
|
|
840
|
+
ascendSort: index + 1
|
|
841
|
+
})); // 更新原始数据
|
|
842
|
+
let result = [
|
|
843
|
+
...props.data
|
|
792
844
|
];
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
845
|
+
result = result.map((item)=>{
|
|
846
|
+
let findObj = newData.find((cur)=>cur.prop === item.prop);
|
|
847
|
+
if (findObj) return {
|
|
848
|
+
...item,
|
|
849
|
+
ascendSort: findObj.ascendSort
|
|
850
|
+
};
|
|
851
|
+
return {
|
|
852
|
+
...item
|
|
853
|
+
};
|
|
854
|
+
});
|
|
855
|
+
props.changeSourceData(result);
|
|
856
|
+
}
|
|
857
|
+
const changeSort = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(changeInputSort, 1200);
|
|
858
|
+
function handleSortEnd(data) {
|
|
796
859
|
data = data.map((item, index)=>({
|
|
797
860
|
...item,
|
|
798
861
|
ascendSort: index + 1
|
|
799
|
-
}));
|
|
862
|
+
})); // 更新原始数据中的排序字段
|
|
800
863
|
let result = [
|
|
801
864
|
...props.data
|
|
802
865
|
];
|
|
@@ -812,16 +875,12 @@ const _hoisted_3 = {
|
|
|
812
875
|
});
|
|
813
876
|
props.changeSourceData(result);
|
|
814
877
|
}
|
|
815
|
-
const changeSort = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(changeInputSort, 1200);
|
|
816
|
-
function handleSortEnd() {}
|
|
817
878
|
const columns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getColumn());
|
|
818
879
|
const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
819
|
-
let result =
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
return item;
|
|
824
|
-
});
|
|
880
|
+
let result = [
|
|
881
|
+
...props.data.filter((item)=>item.sortable)
|
|
882
|
+
]; // 按照现有的ascendSort排序,如果没有则按默认顺序
|
|
883
|
+
result.sort((a, b)=>(a?.ascendSort || 999) - (b?.ascendSort || 999));
|
|
825
884
|
return result;
|
|
826
885
|
});
|
|
827
886
|
function changeAscendFlag(name, value, ascendSort) {
|
|
@@ -883,11 +942,11 @@ const _hoisted_3 = {
|
|
|
883
942
|
max: tableData.value.length,
|
|
884
943
|
modelValue: row.ascendSort,
|
|
885
944
|
'onUpdate:modelValue': (value)=>{
|
|
886
|
-
row.ascendSort
|
|
887
|
-
changeSort(index, value);
|
|
945
|
+
if (value && value !== row.ascendSort) changeSort(index, value);
|
|
888
946
|
},
|
|
889
|
-
|
|
890
|
-
|
|
947
|
+
onBlur: (event)=>{
|
|
948
|
+
const value = event.target.value;
|
|
949
|
+
if (value && parseInt(value) !== row.ascendSort) changeInputSort(index, parseInt(value));
|
|
891
950
|
}
|
|
892
951
|
})
|
|
893
952
|
}
|
|
@@ -913,7 +972,7 @@ const _hoisted_3 = {
|
|
|
913
972
|
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
914
973
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, null, {
|
|
915
974
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
916
|
-
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("组合排序 ")),
|
|
975
|
+
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("组合排序 ", -1)),
|
|
917
976
|
isSHow.value ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_1, [
|
|
918
977
|
((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)(tableData.value.filter((item)=>item?.ascendFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG).NO || item?.ascendFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG).YES), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_tag, {
|
|
919
978
|
hit: false,
|
|
@@ -953,7 +1012,10 @@ const _hoisted_3 = {
|
|
|
953
1012
|
]))), 128))
|
|
954
1013
|
]))
|
|
955
1014
|
]),
|
|
956
|
-
_: 1
|
|
1015
|
+
_: 1,
|
|
1016
|
+
__: [
|
|
1017
|
+
0
|
|
1018
|
+
]
|
|
957
1019
|
})
|
|
958
1020
|
]),
|
|
959
1021
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -969,7 +1031,7 @@ const _hoisted_3 = {
|
|
|
969
1031
|
]),
|
|
970
1032
|
_: 1
|
|
971
1033
|
}),
|
|
972
|
-
_cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("请根据以下规则编辑排序条件 "))
|
|
1034
|
+
_cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("请根据以下规则编辑排序条件 ", -1))
|
|
973
1035
|
]),
|
|
974
1036
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(pro_table, {
|
|
975
1037
|
onDragEnd: handleSortEnd,
|
|
@@ -990,9 +1052,12 @@ const _hoisted_3 = {
|
|
|
990
1052
|
onClick: confirm
|
|
991
1053
|
}, {
|
|
992
1054
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[2] || (_cache[2] = [
|
|
993
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 关闭 ")
|
|
1055
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 关闭 ", -1)
|
|
994
1056
|
])),
|
|
995
|
-
_: 1
|
|
1057
|
+
_: 1,
|
|
1058
|
+
__: [
|
|
1059
|
+
2
|
|
1060
|
+
]
|
|
996
1061
|
})
|
|
997
1062
|
])
|
|
998
1063
|
]),
|
|
@@ -1029,7 +1094,7 @@ const AdvancedSort_exports_ = AdvancedSortvue_type_script_setup_true_lang_tsx;
|
|
|
1029
1094
|
return MAIN_APP_CONFIG;
|
|
1030
1095
|
}({});
|
|
1031
1096
|
function useAppConfigData(name) {
|
|
1032
|
-
const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)(
|
|
1097
|
+
const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)("mainAppConfig");
|
|
1033
1098
|
if (Array.isArray(name)) return name.reduce((acc, key)=>{
|
|
1034
1099
|
if (data && key in data) acc[key] = data[key];
|
|
1035
1100
|
return acc;
|
|
@@ -1314,7 +1379,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1314
1379
|
default: ()=>[]
|
|
1315
1380
|
},
|
|
1316
1381
|
componentNo: {
|
|
1317
|
-
default:
|
|
1382
|
+
default: ""
|
|
1318
1383
|
},
|
|
1319
1384
|
columnsSetting: {
|
|
1320
1385
|
default: ()=>({
|
|
@@ -1333,7 +1398,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1333
1398
|
use_app_config_MAIN_APP_CONFIG.USER_INFO
|
|
1334
1399
|
]);
|
|
1335
1400
|
const isAdmin = userInfo?.adminFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES || userInfo?.userJobCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG_STR.NO;
|
|
1336
|
-
const componentId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(
|
|
1401
|
+
const componentId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
|
|
1337
1402
|
const fullscreen = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
|
|
1338
1403
|
const confirmLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
1339
1404
|
const applicationLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
@@ -1341,14 +1406,14 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1341
1406
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
1342
1407
|
dialogRef.value.open();
|
|
1343
1408
|
});
|
|
1344
|
-
const scrollKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(
|
|
1345
|
-
const dataSetList =
|
|
1409
|
+
const scrollKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
|
|
1410
|
+
const dataSetList = use_fetch_dataset([
|
|
1346
1411
|
__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE_NAME
|
|
1347
1412
|
]);
|
|
1348
1413
|
const renderDialog = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true); //控制prodialog 是否销毁
|
|
1349
1414
|
const dbgridTableConfigRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1350
1415
|
const influenceScopeList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>dataSetList?.value?.[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE_NAME] || []);
|
|
1351
|
-
const bizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(
|
|
1416
|
+
const bizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
|
|
1352
1417
|
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1353
1418
|
const serveDbgridComponentSettingList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1354
1419
|
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
|
|
@@ -1362,9 +1427,9 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1362
1427
|
...item,
|
|
1363
1428
|
minWidth: item.minWidth || item.width,
|
|
1364
1429
|
sort: index + 1,
|
|
1365
|
-
columnClass:
|
|
1430
|
+
columnClass: "truncate",
|
|
1366
1431
|
render: (row, index)=>{
|
|
1367
|
-
if (!item.render) return
|
|
1432
|
+
if (!item.render) return "我是示例的文案";
|
|
1368
1433
|
{
|
|
1369
1434
|
let _slot;
|
|
1370
1435
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton, {
|
|
@@ -1399,17 +1464,17 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1399
1464
|
});
|
|
1400
1465
|
if (result?.success) {
|
|
1401
1466
|
if (result?.data?.length) {
|
|
1402
|
-
componentId.value = result.data[0].componentId ||
|
|
1467
|
+
componentId.value = result.data[0].componentId || "";
|
|
1403
1468
|
serveDbgridComponentSettingList.value = result.data[0].dbgridComponentSettingList || [];
|
|
1404
1469
|
if (serveDbgridComponentSettingList.value.length) {
|
|
1405
1470
|
if (isAdmin && userInfo?.userJobCode !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG_STR.NO) influenceScopeCode.value = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PUBLIC;
|
|
1406
1471
|
else {
|
|
1407
1472
|
influenceScopeCode.value = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE;
|
|
1408
|
-
bizId.value = userInfo?.userId ||
|
|
1473
|
+
bizId.value = userInfo?.userId || "";
|
|
1409
1474
|
userList.value = [
|
|
1410
1475
|
{
|
|
1411
|
-
userId: userInfo?.userId ||
|
|
1412
|
-
userName: userInfo?.userName ||
|
|
1476
|
+
userId: userInfo?.userId || "",
|
|
1477
|
+
userName: userInfo?.userName || ""
|
|
1413
1478
|
}
|
|
1414
1479
|
];
|
|
1415
1480
|
}
|
|
@@ -1421,7 +1486,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1421
1486
|
async function fetchUserList(value) {
|
|
1422
1487
|
const [, res] = await queryUserList({
|
|
1423
1488
|
enabledFlag: 1,
|
|
1424
|
-
hospitalId: currentOrg?.orgId ||
|
|
1489
|
+
hospitalId: currentOrg?.orgId || "",
|
|
1425
1490
|
keyWord: value
|
|
1426
1491
|
});
|
|
1427
1492
|
if (res?.success) userList.value = res.data || [];
|
|
@@ -1460,7 +1525,9 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1460
1525
|
const tableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>sourceData.value.map((item)=>({
|
|
1461
1526
|
...item,
|
|
1462
1527
|
isHidden: item.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO,
|
|
1463
|
-
render: ()=>
|
|
1528
|
+
render: ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
|
|
1529
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("--")
|
|
1530
|
+
])
|
|
1464
1531
|
})));
|
|
1465
1532
|
function changeSourceData(data) {
|
|
1466
1533
|
sourceData.value = data;
|
|
@@ -1477,10 +1544,10 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1477
1544
|
function submit(isSave) {
|
|
1478
1545
|
return new Promise((resolve, reject)=>{
|
|
1479
1546
|
if (influenceScopeCode.value === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE && !bizId.value) {
|
|
1480
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(
|
|
1547
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("请选择操作员");
|
|
1481
1548
|
return reject([
|
|
1482
|
-
|
|
1483
|
-
new Error(
|
|
1549
|
+
"",
|
|
1550
|
+
new Error("参数错误")
|
|
1484
1551
|
]);
|
|
1485
1552
|
}
|
|
1486
1553
|
let dbgridComponentSettingList = [];
|
|
@@ -1526,16 +1593,16 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1526
1593
|
}).then((result)=>{
|
|
1527
1594
|
let [, data] = result;
|
|
1528
1595
|
if (data?.success) {
|
|
1529
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(isSave ?
|
|
1596
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(isSave ? "保存成功" : "应用成功");
|
|
1530
1597
|
resolve([]);
|
|
1531
1598
|
} else reject([
|
|
1532
|
-
|
|
1533
|
-
new Error(
|
|
1599
|
+
"",
|
|
1600
|
+
new Error("接口错误")
|
|
1534
1601
|
]);
|
|
1535
1602
|
}, ()=>{
|
|
1536
1603
|
reject([
|
|
1537
|
-
|
|
1538
|
-
new Error(
|
|
1604
|
+
"",
|
|
1605
|
+
new Error("未知错误")
|
|
1539
1606
|
]);
|
|
1540
1607
|
});
|
|
1541
1608
|
});
|
|
@@ -1543,18 +1610,18 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1543
1610
|
__expose({
|
|
1544
1611
|
dialogRef
|
|
1545
1612
|
}); /**
|
|
1546
|
-
|
|
1547
|
-
|
|
1613
|
+
* 左右滚动
|
|
1614
|
+
*/
|
|
1548
1615
|
const scrollToColumn = (columnName)=>{
|
|
1549
1616
|
scrollKeyWord.value = columnName;
|
|
1550
1617
|
let columnIndex = tableColumn.value.findIndex((item)=>item.prop === columnName);
|
|
1551
1618
|
if (-1 !== columnIndex) {
|
|
1552
1619
|
const tableEl = tableRef?.value?.proTableRef?.$el;
|
|
1553
|
-
const columns = Array.from(tableEl.querySelectorAll(
|
|
1554
|
-
const targetColumnStart = columns.slice(0, columnIndex).reduce((acc, col)=>acc + parseInt(col?.getAttribute(
|
|
1620
|
+
const columns = Array.from(tableEl.querySelectorAll(".el-table__body-wrapper colgroup col"));
|
|
1621
|
+
const targetColumnStart = columns.slice(0, columnIndex).reduce((acc, col)=>acc + parseInt(col?.getAttribute("width") || "0"), 0); // 计算将目标列滚动到中间的位置
|
|
1555
1622
|
const wrapperWidth = tableRef?.value?.proTableRef?.$el.clientWidth; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1556
1623
|
//@ts-expect-error
|
|
1557
|
-
const columnWidth = parseInt(columns[columnIndex]?.getAttribute(
|
|
1624
|
+
const columnWidth = parseInt(columns[columnIndex]?.getAttribute("width"));
|
|
1558
1625
|
const scrollPosition = targetColumnStart - wrapperWidth / 2 + columnWidth / 2;
|
|
1559
1626
|
tableRef?.value?.proTableRef.setScrollLeft(scrollPosition);
|
|
1560
1627
|
}
|
|
@@ -1563,8 +1630,8 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1563
1630
|
let findIndex = sourceData.value.findIndex((item)=>item.prop === columnName);
|
|
1564
1631
|
const row = dbgridTableConfigRef?.value?.tableRef?.proTableRef?.$el?.querySelector(`.el-table__body-wrapper tbody tr:nth-child(${findIndex + 1})`);
|
|
1565
1632
|
row?.scrollIntoView({
|
|
1566
|
-
behavior:
|
|
1567
|
-
block:
|
|
1633
|
+
behavior: "smooth",
|
|
1634
|
+
block: "center"
|
|
1568
1635
|
});
|
|
1569
1636
|
dbgridTableConfigRef?.value?.tableRef?.setCurrentRow(sourceData.value[findIndex]);
|
|
1570
1637
|
};
|
|
@@ -1610,9 +1677,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1610
1677
|
onClick: handleCancel
|
|
1611
1678
|
}, {
|
|
1612
1679
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[7] || (_cache[7] = [
|
|
1613
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
|
|
1680
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消", -1)
|
|
1614
1681
|
])),
|
|
1615
|
-
_: 1
|
|
1682
|
+
_: 1,
|
|
1683
|
+
__: [
|
|
1684
|
+
7
|
|
1685
|
+
]
|
|
1616
1686
|
}),
|
|
1617
1687
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
1618
1688
|
type: "primary",
|
|
@@ -1624,9 +1694,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1624
1694
|
})
|
|
1625
1695
|
}, {
|
|
1626
1696
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[8] || (_cache[8] = [
|
|
1627
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用")
|
|
1697
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用", -1)
|
|
1628
1698
|
])),
|
|
1629
|
-
_: 1
|
|
1699
|
+
_: 1,
|
|
1700
|
+
__: [
|
|
1701
|
+
8
|
|
1702
|
+
]
|
|
1630
1703
|
}, 8, [
|
|
1631
1704
|
"loading",
|
|
1632
1705
|
"disabled"
|
|
@@ -1640,9 +1713,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1640
1713
|
})
|
|
1641
1714
|
}, {
|
|
1642
1715
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[9] || (_cache[9] = [
|
|
1643
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ")
|
|
1716
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ", -1)
|
|
1644
1717
|
])),
|
|
1645
|
-
_: 1
|
|
1718
|
+
_: 1,
|
|
1719
|
+
__: [
|
|
1720
|
+
9
|
|
1721
|
+
]
|
|
1646
1722
|
}, 8, [
|
|
1647
1723
|
"loading",
|
|
1648
1724
|
"disabled"
|
|
@@ -1804,7 +1880,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1804
1880
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1805
1881
|
[
|
|
1806
1882
|
'__scopeId',
|
|
1807
|
-
"data-v-
|
|
1883
|
+
"data-v-48cde4c6"
|
|
1808
1884
|
]
|
|
1809
1885
|
]);
|
|
1810
1886
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -1837,7 +1913,7 @@ const tableColumnSetting = (options)=>{
|
|
|
1837
1913
|
createColumnSetting(options, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.app?._context);
|
|
1838
1914
|
};
|
|
1839
1915
|
const TableSettingButtonvue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
1840
|
-
class: "el-dropdown-link absolute left-3 top-2.5 z-50 cursor-pointer text-
|
|
1916
|
+
class: "el-dropdown-link absolute left-3 top-2.5 z-50 cursor-pointer text-primary"
|
|
1841
1917
|
};
|
|
1842
1918
|
const FILE_TYPE_CODE = 'FILE_TYPE_CODE';
|
|
1843
1919
|
const COLUMN_SETTING = 'column-setting';
|
|
@@ -1856,7 +1932,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1856
1932
|
'success'
|
|
1857
1933
|
],
|
|
1858
1934
|
setup (__props, { emit: __emit }) {
|
|
1859
|
-
const dataSetList =
|
|
1935
|
+
const dataSetList = use_fetch_dataset([
|
|
1860
1936
|
FILE_TYPE_CODE
|
|
1861
1937
|
]);
|
|
1862
1938
|
const props = __props;
|
|
@@ -1907,13 +1983,13 @@ const EXPORT_FILE = 'export-file';
|
|
|
1907
1983
|
let [, res] = await exportData2File({
|
|
1908
1984
|
fileTypeCode: value,
|
|
1909
1985
|
dataSource: JSON.stringify({
|
|
1910
|
-
columnList: props.columns.filter((cur)=>cur.prop && cur.label && cur.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES &&
|
|
1986
|
+
columnList: props.columns.filter((cur)=>cur.prop && cur.label && cur.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES && cur.prop !== OPERATION).map((item)=>({
|
|
1911
1987
|
columnIndex: item.prop,
|
|
1912
1988
|
columnTitle: item.label
|
|
1913
1989
|
})),
|
|
1914
1990
|
rowList: props.tableData.map((item, index)=>({
|
|
1915
1991
|
rowSequenceNo: index,
|
|
1916
|
-
rowRecordList: props.columns.filter((col)=>col.prop && col.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES &&
|
|
1992
|
+
rowRecordList: props.columns.filter((col)=>col.prop && col.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES && col.prop !== OPERATION).map((col)=>{
|
|
1917
1993
|
let value = item[col.prop];
|
|
1918
1994
|
if ('function' == typeof col.render) try {
|
|
1919
1995
|
value = getRenderedContent(col.render, item, value, index) || value;
|
|
@@ -2031,7 +2107,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
2031
2107
|
})) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", {
|
|
2032
2108
|
key: 1,
|
|
2033
2109
|
onClick: openColumnSetting,
|
|
2034
|
-
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(`el-dropdown-link absolute left-3 top-2.5 z-50 ${props.columnsSetting?.disabled ? 'cursor-not-allowed text-
|
|
2110
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(`el-dropdown-link absolute left-3 top-2.5 z-50 ${props.columnsSetting?.disabled ? 'cursor-not-allowed text-primary' : 'cursor-pointer text-primary-dark'}`)
|
|
2035
2111
|
}, [
|
|
2036
2112
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), null, {
|
|
2037
2113
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -2046,7 +2122,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
2046
2122
|
const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(TableSettingButtonvue_type_script_setup_true_lang_tsx, [
|
|
2047
2123
|
[
|
|
2048
2124
|
'__scopeId',
|
|
2049
|
-
"data-v-
|
|
2125
|
+
"data-v-38d4eddb"
|
|
2050
2126
|
]
|
|
2051
2127
|
]);
|
|
2052
2128
|
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
@@ -2070,7 +2146,13 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
2070
2146
|
rowKey: {},
|
|
2071
2147
|
tableColumns: {},
|
|
2072
2148
|
commonColumns: {},
|
|
2073
|
-
columnsSetting: {}
|
|
2149
|
+
columnsSetting: {},
|
|
2150
|
+
rowClassName: {
|
|
2151
|
+
type: [
|
|
2152
|
+
Function,
|
|
2153
|
+
String
|
|
2154
|
+
]
|
|
2155
|
+
}
|
|
2074
2156
|
},
|
|
2075
2157
|
emits: [
|
|
2076
2158
|
'success'
|
|
@@ -2080,9 +2162,20 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
2080
2162
|
const emits = __emit;
|
|
2081
2163
|
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
2082
2164
|
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows() || []);
|
|
2165
|
+
const draggableProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.draggable ? props.tableColumns.filter((col)=>false !== col.isDraggable && col.prop !== OPERATION).map((col)=>col.prop) : []);
|
|
2083
2166
|
__expose({
|
|
2084
2167
|
proTableRef
|
|
2085
|
-
});
|
|
2168
|
+
}); // 适配器函数,自动兼容两种 rowClassName 写法
|
|
2169
|
+
function rowClassNameAdapter(data) {
|
|
2170
|
+
const fn = props.rowClassName;
|
|
2171
|
+
if (!fn) return '';
|
|
2172
|
+
if ('string' == typeof fn) return fn; // 判断是对象参数还是分参数
|
|
2173
|
+
if (1 === fn.length) return fn({
|
|
2174
|
+
row: data.row,
|
|
2175
|
+
rowIndex: data.rowIndex
|
|
2176
|
+
});
|
|
2177
|
+
return fn(data.row, data.rowIndex);
|
|
2178
|
+
}
|
|
2086
2179
|
return (_ctx, _cache)=>{
|
|
2087
2180
|
const _directive_loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("loading");
|
|
2088
2181
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
@@ -2114,7 +2207,8 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
2114
2207
|
},
|
|
2115
2208
|
class: "min-h-0 flex-1 overflow-auto",
|
|
2116
2209
|
"row-key": props.rowKey,
|
|
2117
|
-
"cell-class-name": ({ column })=>
|
|
2210
|
+
"cell-class-name": ({ column })=>draggableProps.value.includes(column.property) ? 'cursor-move' : '',
|
|
2211
|
+
"row-class-name": rowClassNameAdapter,
|
|
2118
2212
|
border: ""
|
|
2119
2213
|
}, _ctx.$attrs), {
|
|
2120
2214
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -2241,9 +2335,10 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
2241
2335
|
key: 1,
|
|
2242
2336
|
class: "mt-5 flex items-center justify-between"
|
|
2243
2337
|
};
|
|
2244
|
-
const SELECTION =
|
|
2245
|
-
|
|
2246
|
-
|
|
2338
|
+
const SELECTION = "selection";
|
|
2339
|
+
/**
|
|
2340
|
+
*获取参与排序的列表 索引 是否可以拖拽
|
|
2341
|
+
*/ /* ESM default export */ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
2247
2342
|
__name: 'index',
|
|
2248
2343
|
props: {
|
|
2249
2344
|
columns: {
|
|
@@ -2260,7 +2355,7 @@ const SELECTION = 'selection';
|
|
|
2260
2355
|
default: void 0
|
|
2261
2356
|
},
|
|
2262
2357
|
componentNo: {
|
|
2263
|
-
default:
|
|
2358
|
+
default: ""
|
|
2264
2359
|
},
|
|
2265
2360
|
hiddenDefaultText: {
|
|
2266
2361
|
type: Boolean,
|
|
@@ -2282,6 +2377,7 @@ const SELECTION = 'selection';
|
|
|
2282
2377
|
type: Boolean,
|
|
2283
2378
|
default: false
|
|
2284
2379
|
},
|
|
2380
|
+
dragGroupName: {},
|
|
2285
2381
|
editable: {
|
|
2286
2382
|
type: Boolean,
|
|
2287
2383
|
default: false
|
|
@@ -2291,7 +2387,7 @@ const SELECTION = 'selection';
|
|
|
2291
2387
|
default: true
|
|
2292
2388
|
},
|
|
2293
2389
|
rowKey: {
|
|
2294
|
-
default:
|
|
2390
|
+
default: "id"
|
|
2295
2391
|
},
|
|
2296
2392
|
loading: {
|
|
2297
2393
|
type: Boolean,
|
|
@@ -2309,13 +2405,13 @@ const SELECTION = 'selection';
|
|
|
2309
2405
|
default: ()=>({})
|
|
2310
2406
|
},
|
|
2311
2407
|
layout: {
|
|
2312
|
-
default:
|
|
2408
|
+
default: "total, sizes, prev, pager, next"
|
|
2313
2409
|
},
|
|
2314
2410
|
formDisabled: {
|
|
2315
2411
|
type: Boolean
|
|
2316
2412
|
},
|
|
2317
2413
|
dragTips: {
|
|
2318
|
-
default:
|
|
2414
|
+
default: "温馨提示:您可通过拖动进行排序"
|
|
2319
2415
|
},
|
|
2320
2416
|
isShowDragTips: {
|
|
2321
2417
|
type: Boolean,
|
|
@@ -2325,7 +2421,7 @@ const SELECTION = 'selection';
|
|
|
2325
2421
|
default: {}
|
|
2326
2422
|
},
|
|
2327
2423
|
dragTipsClassName: {
|
|
2328
|
-
default:
|
|
2424
|
+
default: ""
|
|
2329
2425
|
}
|
|
2330
2426
|
},
|
|
2331
2427
|
emits: [
|
|
@@ -2339,7 +2435,7 @@ const SELECTION = 'selection';
|
|
|
2339
2435
|
const sortFieldList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(void 0);
|
|
2340
2436
|
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
|
|
2341
2437
|
const showSetting = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
2342
|
-
const componentDesc = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(
|
|
2438
|
+
const componentDesc = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("文件");
|
|
2343
2439
|
let state = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
|
|
2344
2440
|
// 表格数据
|
|
2345
2441
|
tableData: props.data,
|
|
@@ -2358,16 +2454,17 @@ const SELECTION = 'selection';
|
|
|
2358
2454
|
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
2359
2455
|
// 生成组件唯一id
|
|
2360
2456
|
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)());
|
|
2457
|
+
// 新增:Sortable实例引用
|
|
2458
|
+
let sortableInstance = null;
|
|
2459
|
+
const refreshIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
|
|
2361
2460
|
// 定义 emit 事件
|
|
2362
2461
|
const emit = __emit;
|
|
2363
2462
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
2364
2463
|
// 提供静态数据
|
|
2365
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.provide)(
|
|
2464
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.provide)("hiddenDefaultText", props.hiddenDefaultText);
|
|
2366
2465
|
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
2367
2466
|
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>tableRef.value?.proTableRef);
|
|
2368
|
-
|
|
2369
|
-
*获取参与排序的列表 索引 是否可以拖拽
|
|
2370
|
-
*/ function getDragSortData(newIndex, data, startIndexObj, sortData) {
|
|
2467
|
+
function getDragSortData(newIndex, data, startIndexObj, sortData, childrenKey) {
|
|
2371
2468
|
data.forEach((item, index)=>{
|
|
2372
2469
|
startIndexObj.startIndex += 1;
|
|
2373
2470
|
if (startIndexObj.startIndex > newIndex) return;
|
|
@@ -2376,35 +2473,33 @@ const SELECTION = 'selection';
|
|
|
2376
2473
|
sortData.curData = item;
|
|
2377
2474
|
sortData.result = data;
|
|
2378
2475
|
}
|
|
2379
|
-
if (item
|
|
2476
|
+
if (childrenKey && Array.isArray(item[childrenKey])) getDragSortData(newIndex, item[childrenKey], startIndexObj, sortData, childrenKey);
|
|
2380
2477
|
});
|
|
2381
2478
|
return sortData;
|
|
2382
2479
|
}
|
|
2383
2480
|
/**
|
|
2384
|
-
|
|
2385
|
-
|
|
2481
|
+
* 获取拖拽排序数据结果
|
|
2482
|
+
*/ function getSortableResult(newIndex, oldIndex, evt, initialHTML) {
|
|
2386
2483
|
let data = [
|
|
2387
2484
|
...state.tableData
|
|
2388
2485
|
];
|
|
2389
|
-
|
|
2486
|
+
// 安全获取childrenKey
|
|
2487
|
+
let childrenKey = getSafeChildrenKeyFromAttrs(attrs);
|
|
2488
|
+
if (childrenKey) {
|
|
2390
2489
|
let { result, curIndex: newCurIndex, curData: newCurData } = getDragSortData(newIndex, data, {
|
|
2391
2490
|
startIndex: -1
|
|
2392
2491
|
}, {
|
|
2393
2492
|
result: [],
|
|
2394
2493
|
curIndex: 0,
|
|
2395
2494
|
curData: {}
|
|
2396
|
-
});
|
|
2495
|
+
}, childrenKey);
|
|
2397
2496
|
let { curIndex: oldCurIndex, curData: oldCurData } = getDragSortData(oldIndex, data, {
|
|
2398
2497
|
startIndex: -1
|
|
2399
2498
|
}, {
|
|
2400
2499
|
result: [],
|
|
2401
2500
|
curIndex: 0,
|
|
2402
2501
|
curData: {}
|
|
2403
|
-
});
|
|
2404
|
-
if (newCurData.belongGroupElementId !== oldCurData.belongGroupElementId) {
|
|
2405
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
|
|
2406
|
-
return [];
|
|
2407
|
-
}
|
|
2502
|
+
}, childrenKey);
|
|
2408
2503
|
const [removedItem] = result.splice(oldCurIndex, 1);
|
|
2409
2504
|
result.splice(newCurIndex, 0, removedItem);
|
|
2410
2505
|
data = result;
|
|
@@ -2414,29 +2509,145 @@ const SELECTION = 'selection';
|
|
|
2414
2509
|
}
|
|
2415
2510
|
return data;
|
|
2416
2511
|
}
|
|
2512
|
+
// 生成每一行的唯一 path
|
|
2513
|
+
function getRowPath(row, data, rowKey, parentPath = "", childrenKey) {
|
|
2514
|
+
for(let i = 0; i < data.length; i++){
|
|
2515
|
+
if (data[i][rowKey] === row[rowKey]) {
|
|
2516
|
+
const currentPath = parentPath ? `${parentPath}-${i}` : `${i}`;
|
|
2517
|
+
return currentPath;
|
|
2518
|
+
}
|
|
2519
|
+
if (childrenKey && Array.isArray(data[i][childrenKey])) {
|
|
2520
|
+
const childPath = getRowPath(row, data[i][childrenKey], rowKey, parentPath ? `${parentPath}-${i}` : `${i}`, childrenKey);
|
|
2521
|
+
if ("" !== childPath) return childPath;
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
return "";
|
|
2525
|
+
}
|
|
2526
|
+
// 获取childrenKey的安全写法
|
|
2527
|
+
function getSafeChildrenKeyFromAttrs(attrs) {
|
|
2528
|
+
const treePropsRaw = attrs["tree-props"];
|
|
2529
|
+
const treeProps = "object" == typeof treePropsRaw && null !== treePropsRaw ? treePropsRaw : void 0;
|
|
2530
|
+
if (treeProps && "children" in treeProps) return treeProps.children;
|
|
2531
|
+
}
|
|
2532
|
+
// 兼容外部 row-class-name,自动适配参数类型
|
|
2533
|
+
function rowClassNameWrapper(rowOrParams, rowIndexArg) {
|
|
2534
|
+
let row, rowIndex;
|
|
2535
|
+
if (rowOrParams && "object" == typeof rowOrParams && "row" in rowOrParams && "rowIndex" in rowOrParams) {
|
|
2536
|
+
row = rowOrParams.row;
|
|
2537
|
+
rowIndex = rowOrParams.rowIndex;
|
|
2538
|
+
} else {
|
|
2539
|
+
row = rowOrParams;
|
|
2540
|
+
rowIndex = rowIndexArg;
|
|
2541
|
+
}
|
|
2542
|
+
let externalClass = "";
|
|
2543
|
+
const external = attrs["row-class-name"];
|
|
2544
|
+
if ("function" == typeof external) externalClass = external({
|
|
2545
|
+
row,
|
|
2546
|
+
rowIndex
|
|
2547
|
+
});
|
|
2548
|
+
else if ("string" == typeof external) externalClass = external;
|
|
2549
|
+
let pathClass = "";
|
|
2550
|
+
let childrenKey = getSafeChildrenKeyFromAttrs(attrs);
|
|
2551
|
+
let path = getRowPath(row, state.tableData, props.rowKey, "", childrenKey);
|
|
2552
|
+
pathClass = `row-path-${path}`;
|
|
2553
|
+
return [
|
|
2554
|
+
externalClass,
|
|
2555
|
+
pathClass
|
|
2556
|
+
].filter(Boolean).join(" ");
|
|
2557
|
+
}
|
|
2417
2558
|
/***
|
|
2418
|
-
|
|
2419
|
-
|
|
2559
|
+
* 表格拖拽排序
|
|
2560
|
+
**/ const initDragSort = ()=>{
|
|
2420
2561
|
const tbodyList = document.querySelectorAll(`#${uuid.value} tbody`);
|
|
2421
2562
|
const tbody = tbodyList[tbodyList.length - 1];
|
|
2422
|
-
let initialHTML =
|
|
2423
|
-
|
|
2424
|
-
|
|
2563
|
+
let initialHTML = "";
|
|
2564
|
+
let crossLevelWarned = false;
|
|
2565
|
+
// 新增:销毁旧的Sortable实例
|
|
2566
|
+
// 新增:销毁旧的Sortable实例
|
|
2567
|
+
if (sortableInstance) {
|
|
2568
|
+
sortableInstance.destroy();
|
|
2569
|
+
sortableInstance = null;
|
|
2570
|
+
}
|
|
2571
|
+
if (tbody) sortableInstance = __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
2572
|
+
handle: ".cursor-move",
|
|
2573
|
+
group: props.dragGroupName,
|
|
2425
2574
|
animation: 300,
|
|
2426
2575
|
scroll: true,
|
|
2427
2576
|
scrollSensitivity: 80,
|
|
2428
2577
|
scrollSpeed: 10,
|
|
2578
|
+
onMove (evt) {
|
|
2579
|
+
const draggedPath = evt.dragged?.className.match(/row-path-([\d-]+)/)?.[1] || "";
|
|
2580
|
+
const relatedPath = evt.related?.className.match(/row-path-([\d-]+)/)?.[1] || "";
|
|
2581
|
+
const getParent = (p)=>p.split("-").slice(0, -1).join("-");
|
|
2582
|
+
if (draggedPath && relatedPath && getParent(draggedPath) !== getParent(relatedPath)) {
|
|
2583
|
+
if (!crossLevelWarned) {
|
|
2584
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("暂不支持跨层级拖拽配置");
|
|
2585
|
+
crossLevelWarned = true;
|
|
2586
|
+
}
|
|
2587
|
+
return false;
|
|
2588
|
+
}
|
|
2589
|
+
return true;
|
|
2590
|
+
},
|
|
2429
2591
|
onEnd (evt) {
|
|
2430
2592
|
const { newIndex, oldIndex } = evt;
|
|
2431
|
-
if (
|
|
2432
|
-
|
|
2593
|
+
if (props.dragGroupName) {
|
|
2594
|
+
emit("drag-end", {
|
|
2595
|
+
crossGroup: evt.from !== evt.to,
|
|
2596
|
+
oldIndex,
|
|
2597
|
+
newIndex
|
|
2598
|
+
});
|
|
2599
|
+
return;
|
|
2600
|
+
}
|
|
2601
|
+
const dragTr = evt.item;
|
|
2602
|
+
const match = dragTr.className.split(" ").find((cls)=>cls.startsWith("row-path-"));
|
|
2603
|
+
const fromPath = match ? match.replace("row-path-", "") : "";
|
|
2604
|
+
let childrenKey = getSafeChildrenKeyFromAttrs(attrs);
|
|
2605
|
+
const getPathByIndex = (targetIndex)=>{
|
|
2606
|
+
let path = "";
|
|
2607
|
+
let count = -1;
|
|
2608
|
+
function dfs(arr, parent) {
|
|
2609
|
+
for(let i = 0; i < arr.length; i++){
|
|
2610
|
+
count++;
|
|
2611
|
+
const curPath = parent ? `${parent}-${i}` : `${i}`;
|
|
2612
|
+
if (count === targetIndex) {
|
|
2613
|
+
path = curPath;
|
|
2614
|
+
return true;
|
|
2615
|
+
}
|
|
2616
|
+
if (childrenKey && Array.isArray(arr[i][childrenKey])) {
|
|
2617
|
+
if (dfs(arr[i][childrenKey], curPath)) return true;
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
return false;
|
|
2621
|
+
}
|
|
2622
|
+
dfs(state.tableData, "");
|
|
2623
|
+
return path;
|
|
2624
|
+
};
|
|
2625
|
+
if ("number" != typeof newIndex || "number" != typeof oldIndex || newIndex === oldIndex) return;
|
|
2626
|
+
const newPath = getPathByIndex(newIndex);
|
|
2627
|
+
const oldPath = getPathByIndex(oldIndex);
|
|
2628
|
+
const getParent = (p)=>p.split("-").slice(0, -1).join("-");
|
|
2629
|
+
if (getParent(newPath) !== getParent(oldPath)) // 这里不再需要回退DOM,onMove已阻止
|
|
2630
|
+
return;
|
|
2433
2631
|
let data = getSortableResult(newIndex, oldIndex);
|
|
2434
|
-
if (data.length)
|
|
2435
|
-
|
|
2632
|
+
if (data.length) {
|
|
2633
|
+
// 严格按用户要求赋值
|
|
2634
|
+
if (childrenKey) {
|
|
2635
|
+
setDataByPath(fromPath, data, childrenKey);
|
|
2636
|
+
refreshIndex.value = refreshIndex.value + 1;
|
|
2637
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
2638
|
+
initDragSort();
|
|
2639
|
+
});
|
|
2640
|
+
}
|
|
2641
|
+
emit("drag-end", data, {
|
|
2642
|
+
fromPath,
|
|
2643
|
+
oldIndex,
|
|
2644
|
+
newIndex
|
|
2645
|
+
});
|
|
2646
|
+
} else evt.from.innerHTML = initialHTML;
|
|
2436
2647
|
},
|
|
2437
2648
|
onStart (evt) {
|
|
2438
|
-
// 在拖拽开始时,记录当前容器的 HTML
|
|
2439
2649
|
initialHTML = evt.from.innerHTML;
|
|
2650
|
+
crossLevelWarned = false;
|
|
2440
2651
|
}
|
|
2441
2652
|
});
|
|
2442
2653
|
};
|
|
@@ -2446,7 +2657,7 @@ const SELECTION = 'selection';
|
|
|
2446
2657
|
});
|
|
2447
2658
|
async function fetchDbgridComponent() {
|
|
2448
2659
|
let [, result] = await queryDbgridComponentByExample({
|
|
2449
|
-
componentNo: props.componentNo ||
|
|
2660
|
+
componentNo: props.componentNo || ""
|
|
2450
2661
|
});
|
|
2451
2662
|
if (result?.success) {
|
|
2452
2663
|
exportFileFlag.value = result.data.exportFileFlag;
|
|
@@ -2479,8 +2690,8 @@ const SELECTION = 'selection';
|
|
|
2479
2690
|
if (props.pagination && props?.fetchData && props.defaultQuery) fetchList();
|
|
2480
2691
|
});
|
|
2481
2692
|
/**
|
|
2482
|
-
|
|
2483
|
-
|
|
2693
|
+
* 获取列表
|
|
2694
|
+
*/ async function fetchList() {
|
|
2484
2695
|
state.loading = true;
|
|
2485
2696
|
let { total = 0, data = [] } = await (props.fetchData && props.fetchData(state.pageInfo)) || {};
|
|
2486
2697
|
state.pageInfo.total = Number(total);
|
|
@@ -2488,21 +2699,21 @@ const SELECTION = 'selection';
|
|
|
2488
2699
|
state.loading = false;
|
|
2489
2700
|
}
|
|
2490
2701
|
/**
|
|
2491
|
-
|
|
2492
|
-
|
|
2702
|
+
* 分页组件改变 pageNumber 事件
|
|
2703
|
+
*/ const handleSizeChange = (val)=>{
|
|
2493
2704
|
if (props.fetchData) {
|
|
2494
2705
|
state.pageInfo.pageNumber = 1;
|
|
2495
2706
|
state.pageInfo.pageSize = val;
|
|
2496
2707
|
fetchList();
|
|
2497
|
-
} else emit(
|
|
2708
|
+
} else emit("size-page-change", val);
|
|
2498
2709
|
};
|
|
2499
2710
|
/**
|
|
2500
|
-
|
|
2501
|
-
|
|
2711
|
+
* 分页组件改变 当前页数 事件
|
|
2712
|
+
*/ function changeCurrentPage(val) {
|
|
2502
2713
|
if (props.fetchData) {
|
|
2503
2714
|
state.pageInfo.pageNumber = val;
|
|
2504
2715
|
fetchList();
|
|
2505
|
-
} else emit(
|
|
2716
|
+
} else emit("current-page-change", val);
|
|
2506
2717
|
}
|
|
2507
2718
|
const selections = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
2508
2719
|
// 设置当前行激活态
|
|
@@ -2512,8 +2723,8 @@ const SELECTION = 'selection';
|
|
|
2512
2723
|
// 分页配置信息
|
|
2513
2724
|
const paginationInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.pageInfo ?? state.pageInfo);
|
|
2514
2725
|
/**
|
|
2515
|
-
|
|
2516
|
-
|
|
2726
|
+
* 支持根据传递的filterObj完成过滤
|
|
2727
|
+
*/ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2517
2728
|
let result = [
|
|
2518
2729
|
...state.tableData
|
|
2519
2730
|
];
|
|
@@ -2525,12 +2736,23 @@ const SELECTION = 'selection';
|
|
|
2525
2736
|
result = multiFieldSort(result, sortFieldList.value);
|
|
2526
2737
|
}
|
|
2527
2738
|
if (Object.keys(props.filterObj).length) return result.filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
2528
|
-
|
|
2739
|
+
"",
|
|
2529
2740
|
void 0,
|
|
2530
2741
|
null
|
|
2531
2742
|
].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
|
|
2532
2743
|
return result;
|
|
2533
2744
|
});
|
|
2745
|
+
// 严格按用户要求递归赋值方法
|
|
2746
|
+
function setDataByPath(path, data, childrenKey) {
|
|
2747
|
+
const indices = path.split("-").map((i)=>Number(i));
|
|
2748
|
+
if (1 === indices.length) {
|
|
2749
|
+
state.tableData = data;
|
|
2750
|
+
return;
|
|
2751
|
+
}
|
|
2752
|
+
let cur = state.tableData;
|
|
2753
|
+
for(let i = 0; i < indices.length - 2; i++)cur = cur[indices[i]][childrenKey];
|
|
2754
|
+
cur[indices[indices.length - 2]][childrenKey] = data;
|
|
2755
|
+
}
|
|
2534
2756
|
__expose({
|
|
2535
2757
|
selections,
|
|
2536
2758
|
tableData,
|
|
@@ -2562,18 +2784,19 @@ const SELECTION = 'selection';
|
|
|
2562
2784
|
...initPageInfo
|
|
2563
2785
|
};
|
|
2564
2786
|
fetchList();
|
|
2565
|
-
}
|
|
2787
|
+
},
|
|
2788
|
+
rowClassName: rowClassNameWrapper
|
|
2566
2789
|
});
|
|
2567
2790
|
/**
|
|
2568
|
-
|
|
2569
|
-
|
|
2791
|
+
* 处理接口和本地的columns
|
|
2792
|
+
*/ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2570
2793
|
let propsColumns = [
|
|
2571
2794
|
...props.columns
|
|
2572
2795
|
];
|
|
2573
2796
|
if (props.couldSortFieldList && props.couldSortFieldList?.length) propsColumns = propsColumns.map((item)=>{
|
|
2574
2797
|
let supportSort = !!(props.couldSortFieldList || []).find((cur)=>cur.fieldName === item.prop);
|
|
2575
2798
|
return {
|
|
2576
|
-
sortable: !!supportSort && (props.pagination ?
|
|
2799
|
+
sortable: !!supportSort && (props.pagination ? "custom" : supportSort),
|
|
2577
2800
|
...item
|
|
2578
2801
|
};
|
|
2579
2802
|
});
|
|
@@ -2602,8 +2825,8 @@ const SELECTION = 'selection';
|
|
|
2602
2825
|
}
|
|
2603
2826
|
});
|
|
2604
2827
|
/**
|
|
2605
|
-
|
|
2606
|
-
|
|
2828
|
+
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
2829
|
+
*/ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2607
2830
|
let result = [
|
|
2608
2831
|
...commonColumns.value
|
|
2609
2832
|
];
|
|
@@ -2624,14 +2847,14 @@ const SELECTION = 'selection';
|
|
|
2624
2847
|
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
2625
2848
|
});
|
|
2626
2849
|
/**
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2850
|
+
*
|
|
2851
|
+
* 是否展示当前拖拽提示
|
|
2852
|
+
*/ const draggableTips = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2630
2853
|
const isTips = !!props?.draggable && (!!props?.isShowDragTips || false);
|
|
2631
2854
|
return isTips;
|
|
2632
2855
|
});
|
|
2633
2856
|
function sortChange({ column, order, prop }) {
|
|
2634
|
-
if (!props.couldSortFieldList?.length) return emit(
|
|
2857
|
+
if (!props.couldSortFieldList?.length) return emit("sort-change", {
|
|
2635
2858
|
column,
|
|
2636
2859
|
order,
|
|
2637
2860
|
prop
|
|
@@ -2678,10 +2901,11 @@ const SELECTION = 'selection';
|
|
|
2678
2901
|
class: "flex flex-1 flex-col overflow-hidden"
|
|
2679
2902
|
}, {
|
|
2680
2903
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2681
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
2904
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2682
2905
|
id: uuid.value,
|
|
2683
2906
|
"export-file-flag": exportFileFlag.value,
|
|
2684
2907
|
componentDesc: componentDesc.value,
|
|
2908
|
+
key: refreshIndex.value,
|
|
2685
2909
|
"common-columns": commonColumns.value,
|
|
2686
2910
|
"component-no": props.componentNo,
|
|
2687
2911
|
"show-setting": showSetting.value,
|
|
@@ -2695,7 +2919,8 @@ const SELECTION = 'selection';
|
|
|
2695
2919
|
"row-key": props.rowKey,
|
|
2696
2920
|
"table-columns": tableColumns.value
|
|
2697
2921
|
}, _ctx.$attrs, {
|
|
2698
|
-
draggable: props.draggable
|
|
2922
|
+
draggable: props.draggable,
|
|
2923
|
+
"row-class-name": rowClassNameWrapper
|
|
2699
2924
|
}), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
2700
2925
|
_: 2
|
|
2701
2926
|
}, [
|
|
@@ -2718,7 +2943,7 @@ const SELECTION = 'selection';
|
|
|
2718
2943
|
"row-key",
|
|
2719
2944
|
"table-columns",
|
|
2720
2945
|
"draggable"
|
|
2721
|
-
])
|
|
2946
|
+
]))
|
|
2722
2947
|
]),
|
|
2723
2948
|
_: 3
|
|
2724
2949
|
}, 8, [
|
|
@@ -3384,8 +3609,8 @@ const pro_table_v2_exports_ = pro_table_v2vue_type_script_lang_tsx_setup_true_na
|
|
|
3384
3609
|
* 1-10115-1 根据条件查询菜单的检索方式列表(业务态)
|
|
3385
3610
|
* @param params
|
|
3386
3611
|
* @returns
|
|
3387
|
-
*/ const queryPatientAccessConfig = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)(
|
|
3388
|
-
const queryBizDataList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)(
|
|
3612
|
+
*/ const queryPatientAccessConfig = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/searchcomponent/queryMenuXSearchTypeByExample', params);
|
|
3613
|
+
const queryBizDataList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/bizsearch/queryBizDataListByExample', {
|
|
3389
3614
|
...params,
|
|
3390
3615
|
pageSize: 100,
|
|
3391
3616
|
pageNumber: 1
|
|
@@ -3394,7 +3619,12 @@ const queryBizDataList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_re
|
|
|
3394
3619
|
* [4-10073-1] 根据业务标识获取Banner数据
|
|
3395
3620
|
* @param params
|
|
3396
3621
|
* @returns
|
|
3397
|
-
*/ const getBannerDataByBizId = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)(
|
|
3622
|
+
*/ const getBannerDataByBizId = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/banner/getBannerDataByBizId', params);
|
|
3623
|
+
/**
|
|
3624
|
+
* [1-10475-1]根据条件查询标签列表
|
|
3625
|
+
* @param params
|
|
3626
|
+
* @returns
|
|
3627
|
+
*/ const queryBizTagListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/biztag/queryBizTagListByExample', params);
|
|
3398
3628
|
/* eslint-disable @typescript-eslint/no-explicit-any */ // support refreshDeps & ready
|
|
3399
3629
|
const useAutoRunPlugin = (fetchInstance, { manual, ready = true, refreshDeps = [], refreshDepsAction })=>{
|
|
3400
3630
|
const hasAutoRun = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
@@ -3897,7 +4127,7 @@ function useSelectByDirectionEvent(options) {
|
|
|
3897
4127
|
};
|
|
3898
4128
|
}
|
|
3899
4129
|
function useDataChangeDetector(sources, options) {
|
|
3900
|
-
const confirmMessage = options?.confirmMessage ||
|
|
4130
|
+
const confirmMessage = options?.confirmMessage || "您有未保存的更改,确定要离开吗?";
|
|
3901
4131
|
// 缓存原始数据
|
|
3902
4132
|
const cacheSources = sources.map((s)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(s)));
|
|
3903
4133
|
let clearSourceWatchList = [];
|
|
@@ -3932,13 +4162,14 @@ function useDataChangeDetector(sources, options) {
|
|
|
3932
4162
|
sources.forEach((value, index)=>{
|
|
3933
4163
|
console.log(index, (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(value), cacheSources[index]);
|
|
3934
4164
|
});
|
|
3935
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessageBox.confirm(confirmMessage,
|
|
3936
|
-
confirmButtonText:
|
|
3937
|
-
cancelButtonText:
|
|
3938
|
-
type:
|
|
4165
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessageBox.confirm(confirmMessage, "提示", {
|
|
4166
|
+
confirmButtonText: "确定",
|
|
4167
|
+
cancelButtonText: "取消",
|
|
4168
|
+
type: "warning"
|
|
3939
4169
|
}).then(async ()=>{
|
|
3940
4170
|
next();
|
|
3941
4171
|
}).catch(()=>{
|
|
4172
|
+
if (options?.cancelFn) options.cancelFn();
|
|
3942
4173
|
next(false);
|
|
3943
4174
|
});
|
|
3944
4175
|
return;
|
|
@@ -3961,18 +4192,19 @@ function useDataChangeDetector(sources, options) {
|
|
|
3961
4192
|
}
|
|
3962
4193
|
};
|
|
3963
4194
|
}
|
|
4195
|
+
// import { useTranslation } from "i18next-vue";
|
|
3964
4196
|
function useFormConfig(options) {
|
|
3965
|
-
const { t } =
|
|
4197
|
+
// const { t } = useTranslation();
|
|
3966
4198
|
const { getData, dataSetCodes } = options;
|
|
3967
|
-
const dataSet =
|
|
3968
|
-
const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(t, dataSet));
|
|
4199
|
+
const dataSet = use_fetch_dataset(dataSetCodes);
|
|
4200
|
+
const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.t, dataSet));
|
|
3969
4201
|
return data;
|
|
3970
4202
|
}
|
|
3971
4203
|
function useColumnConfig(options) {
|
|
3972
|
-
const { t } =
|
|
4204
|
+
// const { t } = useTranslation();
|
|
3973
4205
|
const { getData, dataSetCodes } = options;
|
|
3974
|
-
const dataSet =
|
|
3975
|
-
const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(t, dataSet));
|
|
4206
|
+
const dataSet = use_fetch_dataset(dataSetCodes);
|
|
4207
|
+
const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.t, dataSet));
|
|
3976
4208
|
return data;
|
|
3977
4209
|
}
|
|
3978
4210
|
/* ESM default export */ const AccessInputvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
@@ -4008,6 +4240,7 @@ function useColumnConfig(options) {
|
|
|
4008
4240
|
const columns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>__props.accessResult.columns.filter((item)=>item.display === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG_STR.YES).map((item)=>({
|
|
4009
4241
|
...item,
|
|
4010
4242
|
label: item.title,
|
|
4243
|
+
minWidth: 110,
|
|
4011
4244
|
prop: item.dataIndex
|
|
4012
4245
|
})));
|
|
4013
4246
|
const setCurrentRow = (row)=>{
|
|
@@ -4419,7 +4652,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
|
|
|
4419
4652
|
indexTypeCode: data.indexTypeCode
|
|
4420
4653
|
}
|
|
4421
4654
|
});
|
|
4422
|
-
return res?.data;
|
|
4655
|
+
return res?.data?.bizOutputParam;
|
|
4423
4656
|
};
|
|
4424
4657
|
/** 处理检索结果 */ const handleSearchResult = (res, cardInfo)=>{
|
|
4425
4658
|
// 查询的结果 超过一条 则需要 弹出弹窗让用户选择
|
|
@@ -4453,7 +4686,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
|
|
|
4453
4686
|
columns: res.data.titleAndAttribute,
|
|
4454
4687
|
data: res.data.data.data ?? []
|
|
4455
4688
|
};
|
|
4456
|
-
handleSearchResult(accessResult.value);
|
|
4689
|
+
handleSearchResult(accessResult.value, cardInfo);
|
|
4457
4690
|
}
|
|
4458
4691
|
};
|
|
4459
4692
|
/**
|
|
@@ -4684,207 +4917,763 @@ const BANNER_COMPONENT_CONFIG = {
|
|
|
4684
4917
|
/** 住院检索组件的code */ searchCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE.ADMISSION_RECORD
|
|
4685
4918
|
}
|
|
4686
4919
|
};
|
|
4687
|
-
|
|
4920
|
+
function formatSize(val) {
|
|
4921
|
+
if ('string' == typeof val) return val;
|
|
4922
|
+
if ('number' == typeof val) return `${val}px`;
|
|
4923
|
+
return '48px';
|
|
4924
|
+
}
|
|
4925
|
+
function useAvatarSize(width, height) {
|
|
4926
|
+
const currentWidth = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>formatSize(width));
|
|
4927
|
+
const currentHeight = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>formatSize(height));
|
|
4928
|
+
return {
|
|
4929
|
+
currentWidth,
|
|
4930
|
+
currentHeight
|
|
4931
|
+
};
|
|
4932
|
+
}
|
|
4933
|
+
/**
|
|
4934
|
+
* 头像类型
|
|
4935
|
+
*/ var utils_AVATAR_TYPE_CODE = /*#__PURE__*/ function(AVATAR_TYPE_CODE) {
|
|
4936
|
+
/**
|
|
4937
|
+
* 男性
|
|
4938
|
+
*/ AVATAR_TYPE_CODE["WOMAN"] = "woman";
|
|
4939
|
+
/**
|
|
4940
|
+
* 女性
|
|
4941
|
+
*/ AVATAR_TYPE_CODE["MAN"] = "man";
|
|
4942
|
+
/**
|
|
4943
|
+
* 默认
|
|
4944
|
+
*/ AVATAR_TYPE_CODE["DEFAULT"] = "default";
|
|
4945
|
+
return AVATAR_TYPE_CODE;
|
|
4946
|
+
}({});
|
|
4947
|
+
const manvue_type_script_setup_true_lang_ts_hoisted_1 = [
|
|
4688
4948
|
"width",
|
|
4689
4949
|
"height"
|
|
4690
4950
|
];
|
|
4691
|
-
/* ESM default export */ const
|
|
4692
|
-
__name: '
|
|
4951
|
+
/* ESM default export */ const manvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
4952
|
+
__name: 'man',
|
|
4693
4953
|
props: {
|
|
4694
4954
|
width: {},
|
|
4695
4955
|
height: {}
|
|
4696
4956
|
},
|
|
4697
4957
|
setup (__props) {
|
|
4698
|
-
const currentWidth = (
|
|
4699
|
-
if ("string" == typeof __props.width) return __props.width;
|
|
4700
|
-
if ("number" == typeof __props.width) return `${__props.width}px`;
|
|
4701
|
-
return "48px"; // 默认值
|
|
4702
|
-
});
|
|
4703
|
-
const currentHeight = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
4704
|
-
if ("string" == typeof __props.height) return __props.height;
|
|
4705
|
-
if ("number" == typeof __props.height) return `${__props.height}px`;
|
|
4706
|
-
return "48px"; // 默认值
|
|
4707
|
-
});
|
|
4958
|
+
const { currentWidth, currentHeight } = useAvatarSize(__props.width, __props.height);
|
|
4708
4959
|
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("svg", {
|
|
4709
|
-
width: currentWidth
|
|
4710
|
-
height: currentHeight
|
|
4960
|
+
width: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentWidth),
|
|
4961
|
+
height: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentHeight),
|
|
4711
4962
|
viewBox: "0 0 48 48",
|
|
4712
4963
|
version: "1.1",
|
|
4713
4964
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4714
4965
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
4715
4966
|
}, _cache[0] || (_cache[0] = [
|
|
4716
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createStaticVNode)("<defs><path
|
|
4717
|
-
]), 8,
|
|
4967
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createStaticVNode)("<defs><rect id=\"path-1\" x=\"0\" y=\"0\" width=\"48\" height=\"48\"></rect><mask id=\"mask-2\" maskContentUnits=\"userSpaceOnUse\" maskUnits=\"objectBoundingBox\" x=\"0\" y=\"0\" width=\"48\" height=\"48\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask><mask id=\"mask-4\" maskContentUnits=\"userSpaceOnUse\" maskUnits=\"objectBoundingBox\" x=\"0\" y=\"0\" width=\"48\" height=\"48\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask></defs><g id=\"页面-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g id=\"头像\" transform=\"translate(-42.000000, -117.000000)\"><g id=\"男患者\" transform=\"translate(42.000000, 117.000000)\"><mask id=\"mask-3\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask><g id=\"年龄=男-(Background/Mask)\" mask=\"url(#mask-2)\" stroke-width=\"2\" fill=\"#DCEBF9\" stroke-linejoin=\"bevel\" stroke-dasharray=\"0,0\"><use mask=\"url(#mask-4)\" xlink:href=\"#path-1\"></use></g><g id=\"编组\" mask=\"url(#mask-3)\"><g transform=\"translate(-1.411743, 8.578021)\"><path d=\"M19.539856,30.0474823 C21.2975441,32.3003545 23.3186363,34.3148989 25.6031324,36.0911155 C28.4680724,33.5403075 30.4123005,31.5257631 31.4358168,30.0474823 C31.0024567,29.3141253 30.8767889,25.8498667 31.0588134,19.6547065 L20.1176378,19.6547065 C20.4759263,25.6493496 20.2833324,29.1136082 19.539856,30.0474823 Z\" id=\"路径-4\" fill=\"#FDD1C1\"></path><path d=\"M5.14905306,34.127889 C4.49817356,35.4620317 2.78182255,40.5208549 0,49.3043585 L52.2352905,50.3631835 C49.9468828,40.6727688 47.9836164,35.2610039 46.3454911,34.127889 C44.7073659,32.994774 39.6118092,30.9742128 31.0588211,28.0662055 L25.4949168,32.5216499 L20.1176464,28.0662055 C10.7894637,30.7731851 5.79993255,32.7937463 5.14905306,34.127889 Z\" id=\"路径-2\" fill=\"#9DC1EB\"></path><path d=\"M22.554719,36.2455335 L25.7647309,32.4562326 L20.5276802,27.7749457 L18.3529663,28.5948679 L22.554719,36.2455335 Z\" id=\"路径-11\" fill=\"#FFFFFF\"></path><path d=\"M29.7641656,36.2455335 L32.8235474,32.5216476 L27.6482883,27.7749457 L25.4117827,28.7095082 L29.7641656,36.2455335 Z\" id=\"路径-11复制\" fill=\"#FFFFFF\" transform=\"translate(29.117665, 32.010240) scale(1, -1) rotate(-180.000000) translate(-29.117665, -32.010240) \"></path><path d=\"M15.4374821,11.5944405 C16.0833846,11.5107177 16.6657005,11.9448752 17.1844298,12.8969131 C17.2133992,10.124357 17.4993747,8.62538745 18.0423564,8.40000452 C18.856829,8.06193012 20.9045912,7.8289935 22.3732662,8.40000452 C23.8419413,8.97101554 24.9022032,10.3055429 26.8017679,10.3055429 C27.9579904,10.3055429 29.9406801,9.83553477 31.4089417,9.3958699 C32.3528958,9.11320672 33.0842211,8.84308544 33.2466033,8.71846492 C33.2333146,9.4913702 33.3276372,10.7844708 33.5295712,12.5977666 C33.6746791,12.7434716 33.8107459,12.7434716 33.9377716,12.5977666 C34.0779827,12.4369374 34.9743243,12.5261509 35.2941281,12.5977666 C35.408919,12.6234724 35.5207828,9.13376257 35.2449762,7.38931417 C33.6056306,6.76744305 32.9395062,6.85912003 33.2466033,7.66434511 C25.0106049,5.91910992 20.7468737,5.04649232 20.4554096,5.04649232 C20.0182135,5.04649232 16.0188989,2.19920258 15.5636872,4.74189738 C15.1084755,7.28459218 15.109232,10.3055429 15.4374821,11.5944405 Z\" id=\"路径\" fill=\"#6A6E77\"></path><path d=\"M17.556659,11.4131346 C18.5346658,11.8198791 18.1570616,14.179645 17.1990537,15.8209717 C16.2410459,17.4622984 15.792257,18.1468469 14.9174368,18.1467372 C14.3342234,18.1466641 14.0981192,17.3712841 14.2091244,15.820597 C14.2471743,15.0627441 14.5077973,14.200678 14.9909933,13.234399 C15.7157874,11.7849804 16.5786523,11.0063901 17.556659,11.4131346 Z\" id=\"路径-3复制\" fill=\"#FDD1C1\" transform=\"translate(16.155954, 14.726218) scale(1, -1) rotate(173.000000) translate(-16.155954, -14.726218) \"></path><path d=\"M35.8939204,11.4131346 C36.8719272,11.8198791 36.494323,14.179645 35.5363151,15.8209717 C34.5783073,17.4622984 34.1295184,18.1468469 33.2546982,18.1467372 C32.6714848,18.1466641 32.4353806,17.3712841 32.5463858,15.820597 C32.5844357,15.0627441 32.8450587,14.200678 33.3282547,13.234399 C34.0530487,11.7849804 34.9159137,11.0063901 35.8939204,11.4131346 Z\" id=\"路径-3复制-2\" fill=\"#FDD1C1\" transform=\"translate(34.493216, 14.726218) rotate(-7.000000) translate(-34.493216, -14.726218) \"></path><path d=\"M33.9377537,10.5289178 L33.9377537,16.6722207 C33.9377537,21.5221026 30.2393121,25.5716369 25.4093065,26.0102725 L25.4093065,26.0102725 L25.4093065,26.0102725 C20.579301,25.5716369 16.8808594,21.5221026 16.8808594,16.6722207 L16.8808594,10.5289178 C16.8808594,5.81878649 20.6991752,2.00047064 25.4093065,2.00047064 C30.1194378,2.00047064 33.9377537,5.81878649 33.9377537,10.5289178 Z\" id=\"矩形\" fill=\"#FFE6D0\"></path><path d=\"M15.6812227,9.03657485 C19.0651475,10.5538159 21.6222636,8.28013896 23.5550388,8.65835671 C25.4878141,9.03657446 29.7945013,11.0906622 31.4357952,11.0906622 C33.0770892,11.0906622 33.522772,9.73469298 33.9377294,9.37986995 C33.9244408,10.2410287 33.7883739,11.4313115 33.529529,12.9507184 C33.8904319,12.4957557 34.0708833,12.1401021 34.0708833,11.8837575 C34.0708833,7.81901115 35.2813553,8.20972731 35.2440915,7.46930179 C35.0060596,2.73963604 34.3339134,2.73963604 30.9172992,1.41648627 C27.500685,0.093336494 24.5817812,-0.433907428 21.1765077,0.403970658 C17.7316204,1.25159589 16.3625201,2.91818007 15.6812227,4.29897183 C15.3508121,4.96861802 15.3057823,8.86823969 15.6812227,9.03657485 Z\" id=\"路径\" fill=\"#6A6E77\" transform=\"translate(25.330597, 6.475359) scale(-1, 1) translate(-25.330597, -6.475359) \"></path></g></g></g></g></g>", 2)
|
|
4968
|
+
]), 8, manvue_type_script_setup_true_lang_ts_hoisted_1));
|
|
4718
4969
|
}
|
|
4719
4970
|
});
|
|
4720
|
-
const
|
|
4721
|
-
/* ESM default export */ const
|
|
4722
|
-
const
|
|
4971
|
+
const man_exports_ = manvue_type_script_setup_true_lang_ts;
|
|
4972
|
+
/* ESM default export */ const man = man_exports_;
|
|
4973
|
+
const womenvue_type_script_setup_true_lang_ts_hoisted_1 = [
|
|
4723
4974
|
"width",
|
|
4724
4975
|
"height"
|
|
4725
4976
|
];
|
|
4726
|
-
/* ESM default export */ const
|
|
4727
|
-
__name: '
|
|
4977
|
+
/* ESM default export */ const womenvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
4978
|
+
__name: 'women',
|
|
4728
4979
|
props: {
|
|
4729
4980
|
width: {},
|
|
4730
4981
|
height: {}
|
|
4731
4982
|
},
|
|
4732
4983
|
setup (__props) {
|
|
4733
|
-
const currentWidth = (
|
|
4734
|
-
if ("string" == typeof __props.width) return __props.width;
|
|
4735
|
-
if ("number" == typeof __props.width) return `${__props.width}px`;
|
|
4736
|
-
return "48px"; // 默认值
|
|
4737
|
-
});
|
|
4738
|
-
const currentHeight = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
4739
|
-
if ("string" == typeof __props.height) return __props.height;
|
|
4740
|
-
if ("number" == typeof __props.height) return `${__props.height}px`;
|
|
4741
|
-
return "48px"; // 默认值
|
|
4742
|
-
});
|
|
4984
|
+
const { currentWidth, currentHeight } = useAvatarSize(__props.width, __props.height);
|
|
4743
4985
|
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("svg", {
|
|
4744
|
-
width: currentWidth
|
|
4745
|
-
height: currentHeight
|
|
4986
|
+
width: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentWidth),
|
|
4987
|
+
height: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentHeight),
|
|
4746
4988
|
viewBox: "0 0 48 48",
|
|
4747
4989
|
version: "1.1",
|
|
4748
4990
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4749
4991
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
4750
4992
|
}, _cache[0] || (_cache[0] = [
|
|
4751
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createStaticVNode)("<defs><rect id=\"path-1\" x=\"0\" y=\"0\" width=\"48\" height=\"48\"></rect><mask id=\"mask-2\" maskContentUnits=\"userSpaceOnUse\" maskUnits=\"objectBoundingBox\" x=\"0\" y=\"0\" width=\"48\" height=\"48\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask><mask id=\"mask-4\" maskContentUnits=\"userSpaceOnUse\" maskUnits=\"objectBoundingBox\" x=\"0\" y=\"0\" width=\"48\" height=\"48\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask></defs><g id=\"页面-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g id=\"头像\" transform=\"translate(-
|
|
4752
|
-
]), 8,
|
|
4993
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createStaticVNode)("<defs><rect id=\"path-1\" x=\"0\" y=\"0\" width=\"48\" height=\"48\"></rect><mask id=\"mask-2\" maskContentUnits=\"userSpaceOnUse\" maskUnits=\"objectBoundingBox\" x=\"0\" y=\"0\" width=\"48\" height=\"48\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask><mask id=\"mask-4\" maskContentUnits=\"userSpaceOnUse\" maskUnits=\"objectBoundingBox\" x=\"0\" y=\"0\" width=\"48\" height=\"48\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask></defs><g id=\"页面-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g id=\"头像\" transform=\"translate(-130.000000, -117.000000)\"><g id=\"女患者\" transform=\"translate(130.000000, 117.000000)\"><mask id=\"mask-3\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask><g id=\"年龄=女-(Background/Mask)\" mask=\"url(#mask-2)\" stroke-width=\"2\" fill=\"#FCE7F0\" stroke-linejoin=\"bevel\" stroke-dasharray=\"0,0\"><use mask=\"url(#mask-4)\" xlink:href=\"#path-1\"></use></g><g id=\"编组\" mask=\"url(#mask-3)\"><g transform=\"translate(-1.411743, 7.517029)\"><path d=\"M32.4117432,1.98297119 C28.3150644,-0.689630985 22.4781547,-0.632149577 18.4117432,1.98294485 C15.850035,3.62100053 14.2283276,6.78040767 13.1309257,9.58540821 C12.1015037,12.1923409 11.6372605,14.9881153 11.7688973,17.7878437 C12.0216292,23.4084806 11.4117432,29.0457649 11.4117432,34.6891022 C11.4117432,34.8843262 11.4117432,35.1082993 11.5630797,35.2323952 C11.6982077,35.3171761 11.8599194,35.3489815 12.0170891,35.3216858 C14.380965,35.1900231 16.4739487,34.7814201 18.756103,34.4015656 C21.601229,33.9293958 24.6688201,34.0640855 27.5487537,33.8839951 C29.2633961,33.784113 31.0658122,33.5071668 32.7804546,33.5813217 C33.3267794,33.6055356 38.1105268,34.3152988 38.1317139,34.610405 C37.6746777,28.3511286 37.9985378,22.1766028 37.9213562,15.9218664 C37.8593082,10.8990088 36.9488111,4.94311261 32.4117432,1.98297119 Z\" id=\"Path\" fill=\"#6A6E77\" fill-rule=\"nonzero\"></path><path d=\"M19.9117432,28.9829712 C19.8029955,29.810802 19.7775764,30.8098762 19.539856,31.1084747 C21.2975441,33.361347 23.3186364,35.3758912 25.6031327,37.1521072 C28.4680725,34.6012998 30.4123005,32.5867556 31.4358168,31.1084747 C31.0024567,30.3751177 30.8767891,26.9108589 31.058814,20.7156982 L20.1176378,20.7156982 C20.2479871,24.19004 20.1793556,26.9457976 19.9117432,28.9829712 Z\" id=\"路径-4\" fill=\"#FDD1C1\" fill-rule=\"evenodd\"></path><path d=\"M5.1490531,35.1888199 C4.49817363,36.5229626 2.7818226,41.5817858 0,50.3652897 L52.2352905,51.4241142 C49.9468818,41.7336996 47.9836148,36.3219349 46.3454895,35.1888199 C44.7073642,34.0557049 39.611808,32.0351437 31.0588207,29.1271362 C30.6274357,32.0974325 28.7728011,33.5825806 25.4949169,33.5825806 C22.4387452,33.5825806 20.5776873,32.0493774 19.9117432,28.9829712 C10.7208292,31.786061 5.79993256,33.8546772 5.1490531,35.1888199 Z\" id=\"路径-2\" fill=\"#E9A9D2\" fill-rule=\"evenodd\"></path><path d=\"M31.1971865,28.9829712 C31.6834437,28.9829712 33.6294901,29.5343028 34.3456192,30.4244784 C36.8399134,33.5249807 33.7578571,35.9829712 31.1971855,35.9829712 C27.966253,35.9829712 26.1036394,34.6273296 25.3877754,33.4386492 C24.6719115,34.627815 23.1426761,35.9829712 19.9117436,35.9829712 C17.3510721,35.9829712 14.4362248,33.4386492 16.4117463,30.9829712 C17.1278754,30.0927956 18.9117484,28.9829712 19.9117484,28.9829712 C20.9117503,32.4829712 22.7562027,32.736654 25.3790264,32.8452811 C28.9344084,32.6897225 29.9117451,32.4829712 31.1971865,28.9829712 Z\" id=\"Combined-Shape\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path><path d=\"M17.556659,12.4740653 C18.5346658,12.8808099 18.1570616,15.2405757 17.1990537,16.8819024 C16.2410459,18.5232291 15.792257,19.2077777 14.9174368,19.207668 C14.3342234,19.2075949 14.0981192,18.4322148 14.2091244,16.8815278 C14.2471743,16.1236748 14.5077973,15.2616088 14.9909933,14.2953297 C15.7157874,12.8459112 16.5786523,12.0673208 17.556659,12.4740653 Z\" id=\"路径-3复制\" fill=\"#FDD1C1\" fill-rule=\"evenodd\" transform=\"translate(16.155954, 15.787149) scale(1, -1) rotate(173.000000) translate(-16.155954, -15.787149) \"></path><path d=\"M35.8939204,12.4740653 C36.8719272,12.8808099 36.494323,15.2405757 35.5363151,16.8819024 C34.5783073,18.5232291 34.1295184,19.2077777 33.2546982,19.207668 C32.6714848,19.2075949 32.4353806,18.4322148 32.5463858,16.8815278 C32.5844357,16.1236748 32.8450587,15.2616088 33.3282547,14.2953297 C34.0530487,12.8459112 34.9159137,12.0673208 35.8939204,12.4740653 Z\" id=\"路径-3复制-2\" fill=\"#FDD1C1\" fill-rule=\"evenodd\" transform=\"translate(34.493216, 15.787149) rotate(-7.000000) translate(-34.493216, -15.787149) \"></path><path d=\"M33.9377537,11.5898485 L33.9377537,17.7331514 C33.9377537,22.5830333 30.2393121,26.6325677 25.4093065,27.0712032 L25.4093065,27.0712032 L25.4093065,27.0712032 C20.579301,26.6325677 16.8808594,22.5830333 16.8808594,17.7331514 L16.8808594,11.5898485 C16.8808594,6.87971722 20.6991752,3.06140137 25.4093065,3.06140137 C30.1194378,3.06140137 33.9377537,6.87971722 33.9377537,11.5898485 Z\" id=\"矩形\" fill=\"#FFE6DC\" fill-rule=\"evenodd\"></path><path d=\"M24.6733503,11.6913671 C22.024538,13.5903753 19.9624601,14.3568758 16.9117494,14.9829712 C16.4117432,10.9829712 16.5155237,6.0384028 20.4117494,3.98291373 C22.5285108,2.84913337 27.0318227,1.99650967 29.4117489,2.78245926 C29.3460476,3.48205054 29.2376083,4.17663479 29.0870829,4.86204338 C28.4720778,7.62988853 27.1290796,9.98033571 24.6733503,11.6913671 Z\" id=\"Path\" fill=\"#6A6E77\" fill-rule=\"nonzero\"></path><path d=\"M29.835444,10.923974 C27.3903863,12.6647315 25.5253999,12.4089894 22.7093591,12.9829102 C22.2093315,11.4829102 22.3155814,9.07035065 23.209374,7.48291016 C24.2223651,5.72223103 24.8806003,4.81518441 26.6537957,3.88621545 C28.6077293,2.84691679 32.0124958,2.03702128 34.2093506,2.75747502 C34.1487033,3.39876699 34.048605,4.03546923 33.9096584,4.66376042 C33.3419615,7.20095181 32.1022711,9.35552847 29.835444,10.923974 Z\" id=\"Path\" fill=\"#6A6E77\" fill-rule=\"nonzero\" transform=\"translate(28.310537, 7.732910) scale(1, -1) rotate(-180.000000) translate(-28.310537, -7.732910) \"></path></g></g></g></g></g>", 2)
|
|
4994
|
+
]), 8, womenvue_type_script_setup_true_lang_ts_hoisted_1));
|
|
4753
4995
|
}
|
|
4754
4996
|
});
|
|
4755
|
-
const
|
|
4756
|
-
/* ESM default export */ const
|
|
4757
|
-
const
|
|
4997
|
+
const women_exports_ = womenvue_type_script_setup_true_lang_ts;
|
|
4998
|
+
/* ESM default export */ const women = women_exports_;
|
|
4999
|
+
const defaultvue_type_script_setup_true_lang_ts_hoisted_1 = [
|
|
4758
5000
|
"width",
|
|
4759
5001
|
"height"
|
|
4760
5002
|
];
|
|
4761
|
-
/* ESM default export */ const
|
|
4762
|
-
__name: '
|
|
5003
|
+
/* ESM default export */ const defaultvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5004
|
+
__name: 'default',
|
|
4763
5005
|
props: {
|
|
4764
5006
|
width: {},
|
|
4765
5007
|
height: {}
|
|
4766
5008
|
},
|
|
4767
5009
|
setup (__props) {
|
|
4768
|
-
const currentWidth = (
|
|
4769
|
-
if ("string" == typeof __props.width) return __props.width;
|
|
4770
|
-
if ("number" == typeof __props.width) return `${__props.width}px`;
|
|
4771
|
-
return "48px"; // 默认值
|
|
4772
|
-
});
|
|
4773
|
-
const currentHeight = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
4774
|
-
if ("string" == typeof __props.height) return __props.height;
|
|
4775
|
-
if ("number" == typeof __props.height) return `${__props.height}px`;
|
|
4776
|
-
return "48px"; // 默认值
|
|
4777
|
-
});
|
|
5010
|
+
const { currentWidth, currentHeight } = useAvatarSize(__props.width, __props.height);
|
|
4778
5011
|
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("svg", {
|
|
4779
|
-
width: currentWidth
|
|
4780
|
-
height: currentHeight
|
|
5012
|
+
width: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentWidth),
|
|
5013
|
+
height: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentHeight),
|
|
4781
5014
|
viewBox: "0 0 48 48",
|
|
4782
5015
|
version: "1.1",
|
|
4783
5016
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4784
5017
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
4785
5018
|
}, _cache[0] || (_cache[0] = [
|
|
4786
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createStaticVNode)("<defs><
|
|
4787
|
-
]), 8,
|
|
5019
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createStaticVNode)("<defs><path d=\"M24,48 C37.254834,48 48,37.254834 48,24 C48,10.745166 37.254834,0 24,0 C10.745166,0 0,10.745166 0,24 C0,37.254834 10.745166,48 24,48 Z\" id=\"path-1\"></path><mask id=\"mask-2\" maskContentUnits=\"userSpaceOnUse\" maskUnits=\"objectBoundingBox\" x=\"0\" y=\"0\" width=\"48\" height=\"48\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask></defs><g id=\"页面-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g id=\"头像\" transform=\"translate(-226.000000, -117.000000)\"><g id=\"默认\" transform=\"translate(226.000000, 117.000000)\"><path d=\"M24,40 C32.836556,40 40,32.836556 40,24 C40,15.163444 32.836556,8 24,8 C15.163444,8 8,15.163444 8,24 C8,32.836556 15.163444,40 24,40 Z\" id=\"Ellipse-103\" fill=\"#70B0ED\"></path><path d=\"M40.9705649,7.02943832 C45.4714385,11.5303119 48,17.6348038 48,24 C48,30.3651962 45.4714385,36.4696913 40.9705649,40.9705649 C36.4696913,45.4714385 30.3651962,48 24,48 C17.6348038,48 11.5303119,45.4714385 7.02943832,40.9705649 C2.52856472,36.4696913 0,30.3651962 0,24 C0,17.6348038 2.52856472,11.5303119 7.02943832,7.02943832 C11.5303119,2.52856472 17.6348038,0 24,0 C30.3651962,0 36.4696913,2.52856472 40.9705649,7.02943832 Z M21,25.5 C18.613054,25.5 16.3238672,26.448212 14.6360398,28.1360395 C12.9482123,29.823867 12,32.1130506 12,34.5 L36,34.5 L35.9849989,33.9719988 C35.8503218,31.6803201 34.8450201,29.5267267 33.1747819,27.9518511 C31.5045437,26.3769755 29.2956342,25.4998708 27,25.5 L21,25.5 Z M19.7573588,12.2573601 C18.6321404,13.3825785 18,14.9087023 18,16.5 C18,18.0913004 18.6321404,19.6174252 19.7573588,20.7426436 C20.8825772,21.867862 22.408701,22.5 24,22.5 C25.591299,22.5 27.1174228,21.867862 28.2426412,20.7426436 C29.3678596,19.6174252 30,18.0913004 30,16.5 C30,14.9087023 29.3678596,13.3825785 28.2426412,12.2573601 C27.1174228,11.1321417 25.591299,10.5 24,10.5 C22.408701,10.5 20.8825772,11.1321417 19.7573588,12.2573601 Z\" id=\"Vector\" fill=\"#DCEBF9\"></path><use id=\"Ellipse-104\" mask=\"url(#mask-2)\" stroke-width=\"2\" stroke-dasharray=\"0,0\" xlink:href=\"#path-1\"></use></g></g></g>", 2)
|
|
5020
|
+
]), 8, defaultvue_type_script_setup_true_lang_ts_hoisted_1));
|
|
4788
5021
|
}
|
|
4789
5022
|
});
|
|
4790
|
-
const
|
|
4791
|
-
/* ESM default export */ const
|
|
4792
|
-
const
|
|
4793
|
-
|
|
4794
|
-
};
|
|
4795
|
-
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2 = {
|
|
4796
|
-
class: "flex min-w-32 items-start justify-start"
|
|
4797
|
-
};
|
|
4798
|
-
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_3 = {
|
|
4799
|
-
class: "ml-[12px] flex-1"
|
|
4800
|
-
};
|
|
4801
|
-
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_4 = {
|
|
4802
|
-
class: "flex-1 flex flex-col gap-3 text-center"
|
|
4803
|
-
};
|
|
4804
|
-
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_5 = {
|
|
4805
|
-
class: "flex-1 text-center leading-[14px]"
|
|
4806
|
-
};
|
|
4807
|
-
const _hoisted_6 = {
|
|
4808
|
-
class: "min-w-7"
|
|
4809
|
-
};
|
|
4810
|
-
const _hoisted_7 = {
|
|
4811
|
-
class: "min-w-7 ml-2"
|
|
4812
|
-
};
|
|
4813
|
-
const _hoisted_8 = {
|
|
4814
|
-
class: "flex justify-center"
|
|
4815
|
-
};
|
|
4816
|
-
const _hoisted_9 = {
|
|
4817
|
-
key: 0,
|
|
4818
|
-
class: "rounded-full bg-[#00AB44] px-1.5 text-center text-white mt-3 flex-1"
|
|
4819
|
-
};
|
|
4820
|
-
const _hoisted_10 = {
|
|
4821
|
-
class: "mr-2"
|
|
4822
|
-
};
|
|
4823
|
-
const _hoisted_11 = {
|
|
4824
|
-
class: "text-[#555]"
|
|
4825
|
-
};
|
|
4826
|
-
const _hoisted_12 = {
|
|
4827
|
-
class: "w-full"
|
|
4828
|
-
};
|
|
4829
|
-
/* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
4830
|
-
__name: 'BannerInfo',
|
|
5023
|
+
const default_exports_ = defaultvue_type_script_setup_true_lang_ts;
|
|
5024
|
+
/* ESM default export */ const composable_default = default_exports_;
|
|
5025
|
+
/* ESM default export */ const pro_avatarvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5026
|
+
__name: 'index',
|
|
4831
5027
|
props: {
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
type: Boolean,
|
|
4836
|
-
default: true
|
|
4837
|
-
}
|
|
5028
|
+
type: {},
|
|
5029
|
+
width: {},
|
|
5030
|
+
height: {}
|
|
4838
5031
|
},
|
|
4839
|
-
setup (__props
|
|
4840
|
-
const
|
|
4841
|
-
const
|
|
4842
|
-
const
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
const parsed = parseInt(value, 10);
|
|
4847
|
-
if (isNaN(parsed)) return 6;
|
|
4848
|
-
return parsed;
|
|
4849
|
-
};
|
|
4850
|
-
// 计算实际布局列数
|
|
4851
|
-
const layoutColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>parseLayoutColumns(bannerInfo.value?.layoutTypeCode));
|
|
4852
|
-
/** 获取banner配置 */ const queryBannerConfig = async ()=>{
|
|
4853
|
-
loading.value = true;
|
|
4854
|
-
if (!__props.bizId && initBannerInfo.value) {
|
|
4855
|
-
bannerInfo.value = initBannerInfo.value;
|
|
4856
|
-
loading.value = false;
|
|
4857
|
-
return;
|
|
4858
|
-
}
|
|
4859
|
-
const [, res] = await getBannerDataByBizId({
|
|
4860
|
-
bizId: __props.bizId ?? void 0,
|
|
4861
|
-
bizIdTypeCode: BANNER_COMPONENT_CONFIG[__props.code].bizIdTypeCode,
|
|
4862
|
-
componentId: BANNER_COMPONENT_CONFIG[__props.code].componentId
|
|
4863
|
-
});
|
|
4864
|
-
loading.value = false;
|
|
4865
|
-
if (res?.success) {
|
|
4866
|
-
res.data.bannerItemList = (res?.data?.bannerItemList ?? [])?.filter((item)=>item?.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
|
|
4867
|
-
if (!__props.bizId) initBannerInfo.value = res?.data;
|
|
4868
|
-
bannerInfo.value = res?.data;
|
|
4869
|
-
}
|
|
4870
|
-
};
|
|
4871
|
-
// 修改检查文字溢出的逻辑
|
|
4872
|
-
const checkTextOverflow = (event)=>{
|
|
4873
|
-
const target = event.currentTarget;
|
|
4874
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
4875
|
-
isTextOverflowing.value = target.offsetWidth < target.scrollWidth;
|
|
4876
|
-
});
|
|
4877
|
-
};
|
|
4878
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>__props.bizId, async ()=>{
|
|
4879
|
-
await queryBannerConfig();
|
|
4880
|
-
});
|
|
4881
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(async ()=>{
|
|
4882
|
-
await queryBannerConfig();
|
|
4883
|
-
});
|
|
4884
|
-
__expose({
|
|
4885
|
-
refresh: queryBannerConfig
|
|
5032
|
+
setup (__props) {
|
|
5033
|
+
const props = __props;
|
|
5034
|
+
const avatarType = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.type || utils_AVATAR_TYPE_CODE.DEFAULT);
|
|
5035
|
+
const avatarComponent = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
5036
|
+
if (avatarType.value === utils_AVATAR_TYPE_CODE.MAN) return man;
|
|
5037
|
+
if (avatarType.value === utils_AVATAR_TYPE_CODE.WOMAN) return women;
|
|
5038
|
+
return composable_default;
|
|
4886
5039
|
});
|
|
4887
|
-
return (_ctx, _cache)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
5040
|
+
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)(avatarComponent.value), {
|
|
5041
|
+
width: props.width,
|
|
5042
|
+
height: props.height
|
|
5043
|
+
}, null, 8, [
|
|
5044
|
+
"width",
|
|
5045
|
+
"height"
|
|
5046
|
+
]));
|
|
5047
|
+
}
|
|
5048
|
+
});
|
|
5049
|
+
const pro_avatar_exports_ = pro_avatarvue_type_script_setup_true_lang_ts;
|
|
5050
|
+
/* ESM default export */ const pro_avatar = pro_avatar_exports_;
|
|
5051
|
+
/**
|
|
5052
|
+
* [1-10473-1]根据条件查询标签分组V1(含标签)
|
|
5053
|
+
* @param params
|
|
5054
|
+
* @returns
|
|
5055
|
+
*/ const queryTagGroupByExampleV1 = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagGroupByExampleV1', params);
|
|
5056
|
+
/* ESM default export */ const SelectDropdownvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5057
|
+
__name: 'SelectDropdown',
|
|
5058
|
+
props: {
|
|
5059
|
+
modelValue: {},
|
|
5060
|
+
hasSelect: {},
|
|
5061
|
+
tableData: {},
|
|
5062
|
+
allTagsMap: {},
|
|
5063
|
+
multiple: {
|
|
5064
|
+
type: Boolean
|
|
5065
|
+
},
|
|
5066
|
+
disabled: {
|
|
5067
|
+
type: Boolean
|
|
5068
|
+
},
|
|
5069
|
+
tagSize: {},
|
|
5070
|
+
placeholder: {}
|
|
5071
|
+
},
|
|
5072
|
+
emits: [
|
|
5073
|
+
'update:modelValue',
|
|
5074
|
+
'change',
|
|
5075
|
+
'blur'
|
|
5076
|
+
],
|
|
5077
|
+
setup (__props, { emit: __emit }) {
|
|
5078
|
+
const props = __props;
|
|
5079
|
+
const emit = __emit;
|
|
5080
|
+
const selectList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>Array.isArray(props.hasSelect) ? props.hasSelect : props.hasSelect ? [
|
|
5081
|
+
props.hasSelect
|
|
5082
|
+
] : []);
|
|
5083
|
+
const selectClass = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.multiple ? 'w-60' : 'w-full');
|
|
5084
|
+
const innerValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)({
|
|
5085
|
+
get: ()=>props.modelValue,
|
|
5086
|
+
set: (val)=>emit('update:modelValue', val)
|
|
5087
|
+
});
|
|
5088
|
+
function handleChange(val) {
|
|
5089
|
+
emit('change', val);
|
|
5090
|
+
}
|
|
5091
|
+
function handleBlur(e) {
|
|
5092
|
+
emit('blur', e);
|
|
5093
|
+
}
|
|
5094
|
+
return (_ctx, _cache)=>{
|
|
5095
|
+
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
5096
|
+
const _component_el_option_group = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option-group");
|
|
5097
|
+
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
5098
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
5099
|
+
modelValue: innerValue.value,
|
|
5100
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>innerValue.value = $event),
|
|
5101
|
+
multiple: props.multiple ?? true,
|
|
5102
|
+
filterable: "",
|
|
5103
|
+
disabled: props.disabled ?? false,
|
|
5104
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(selectClass.value),
|
|
5105
|
+
placeholder: props.placeholder ?? '请选择',
|
|
5106
|
+
onChange: handleChange,
|
|
5107
|
+
onBlur: handleBlur,
|
|
5108
|
+
"collapse-tags": "",
|
|
5109
|
+
"collapse-tags-tooltip": ""
|
|
5110
|
+
}, {
|
|
5111
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5112
|
+
((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.tableData, (group)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option_group, {
|
|
5113
|
+
key: group.tagGroupId,
|
|
5114
|
+
label: group.tagGroupNameDisplay,
|
|
5115
|
+
value: group.tagGroupId
|
|
5116
|
+
}, {
|
|
5117
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5118
|
+
((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)(group.tagList, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
|
|
5119
|
+
key: item.tagId,
|
|
5120
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)((selectList.value || []).includes(item.tagId) ? {} : {
|
|
5121
|
+
background: _ctx.allTagsMap.get(item.tagId)?.background,
|
|
5122
|
+
color: _ctx.allTagsMap.get(item.tagId)?.color
|
|
5123
|
+
}),
|
|
5124
|
+
disabled: (selectList.value || []).includes(item.tagId),
|
|
5125
|
+
label: item.tagNameDisplay,
|
|
5126
|
+
value: item.tagId
|
|
5127
|
+
}, null, 8, [
|
|
5128
|
+
"style",
|
|
5129
|
+
"disabled",
|
|
5130
|
+
"label",
|
|
5131
|
+
"value"
|
|
5132
|
+
]))), 128))
|
|
5133
|
+
]),
|
|
5134
|
+
_: 2
|
|
5135
|
+
}, 1032, [
|
|
5136
|
+
"label",
|
|
5137
|
+
"value"
|
|
5138
|
+
]))), 128))
|
|
5139
|
+
]),
|
|
5140
|
+
_: 1
|
|
5141
|
+
}, 8, [
|
|
5142
|
+
"modelValue",
|
|
5143
|
+
"multiple",
|
|
5144
|
+
"disabled",
|
|
5145
|
+
"class",
|
|
5146
|
+
"placeholder"
|
|
5147
|
+
]);
|
|
5148
|
+
};
|
|
5149
|
+
}
|
|
5150
|
+
});
|
|
5151
|
+
const SelectDropdown_exports_ = SelectDropdownvue_type_script_lang_ts_setup_true;
|
|
5152
|
+
/* ESM default export */ const SelectDropdown = SelectDropdown_exports_;
|
|
5153
|
+
const tag_selectvue_type_script_lang_ts_setup_true_hoisted_1 = {
|
|
5154
|
+
class: "flex flex-wrap gap-2"
|
|
5155
|
+
};
|
|
5156
|
+
const BACKGROUND_COLOR = 'BACKGROUND_COLOR';
|
|
5157
|
+
const FONT_COLOR = 'FONT_COLOR';
|
|
5158
|
+
const SELECT_WIDTH = 15; // rem
|
|
5159
|
+
const TAG_MARGIN = 1; // 1rem
|
|
5160
|
+
/* ESM default export */ const tag_selectvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5161
|
+
__name: 'index',
|
|
5162
|
+
props: {
|
|
5163
|
+
bizIdTypeCode: {
|
|
5164
|
+
default: ''
|
|
5165
|
+
},
|
|
5166
|
+
bizId: {
|
|
5167
|
+
default: ''
|
|
5168
|
+
},
|
|
5169
|
+
class: {
|
|
5170
|
+
default: 'w-full'
|
|
5171
|
+
},
|
|
5172
|
+
tagList: {
|
|
5173
|
+
default: ()=>[]
|
|
5174
|
+
},
|
|
5175
|
+
disabled: {
|
|
5176
|
+
type: Boolean,
|
|
5177
|
+
default: false
|
|
5178
|
+
},
|
|
5179
|
+
multiple: {
|
|
5180
|
+
type: Boolean,
|
|
5181
|
+
default: true
|
|
5182
|
+
},
|
|
5183
|
+
tagSize: {
|
|
5184
|
+
default: 'large'
|
|
5185
|
+
}
|
|
5186
|
+
},
|
|
5187
|
+
emits: [
|
|
5188
|
+
'change'
|
|
5189
|
+
],
|
|
5190
|
+
setup (__props, { emit: __emit }) {
|
|
5191
|
+
const emit = __emit;
|
|
5192
|
+
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
5193
|
+
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
|
|
5194
|
+
const props = __props;
|
|
5195
|
+
const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tagList || []);
|
|
5196
|
+
const selectValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
|
|
5197
|
+
const selectVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
5198
|
+
const SelectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
5199
|
+
const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
5200
|
+
const moreButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
5201
|
+
const realMaxNum = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(2);
|
|
5202
|
+
// 计算rem到px的转换
|
|
5203
|
+
const getRemValue = (rem)=>rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
5204
|
+
// 常量定义
|
|
5205
|
+
const MORE_BUTTON_WIDTH = 5 + TAG_MARGIN; // rem
|
|
5206
|
+
// 计算所有标签的映射,方便通过tagId查找tagNameDisplay
|
|
5207
|
+
const allTagsMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
5208
|
+
const map = new Map();
|
|
5209
|
+
tableData.value.forEach((group)=>{
|
|
5210
|
+
group.tagList.forEach((tag)=>{
|
|
5211
|
+
map.set(tag.tagId, {
|
|
5212
|
+
tagNameDisplay: tag.tagNameDisplay,
|
|
5213
|
+
background: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === BACKGROUND_COLOR)?.cssValue || '',
|
|
5214
|
+
color: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === FONT_COLOR)?.cssValue || ''
|
|
5215
|
+
});
|
|
5216
|
+
});
|
|
5217
|
+
});
|
|
5218
|
+
return map;
|
|
5219
|
+
});
|
|
5220
|
+
const calcMaxNum = (wrapperNode)=>{
|
|
5221
|
+
if (!wrapperNode || !attrs.modelValue) return;
|
|
5222
|
+
const modelValue = Array.isArray(attrs.modelValue) ? attrs.modelValue : [
|
|
5223
|
+
attrs.modelValue
|
|
5224
|
+
];
|
|
5225
|
+
if (!modelValue.length) {
|
|
5226
|
+
realMaxNum.value = 0;
|
|
5227
|
+
return;
|
|
5228
|
+
}
|
|
5229
|
+
// 计算每个标签的宽度
|
|
5230
|
+
const tagWidths = modelValue.map((item)=>{
|
|
5231
|
+
// 为每个标签创建独立的容器
|
|
5232
|
+
const tagContainer = document.createElement('div');
|
|
5233
|
+
tagContainer.style.position = 'absolute';
|
|
5234
|
+
tagContainer.style.visibility = 'hidden';
|
|
5235
|
+
document.body.appendChild(tagContainer);
|
|
5236
|
+
const vnode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
|
|
5237
|
+
closable: !props.disabled,
|
|
5238
|
+
size: props.tagSize,
|
|
5239
|
+
disableTransitions: true,
|
|
5240
|
+
class: 'mr-4'
|
|
5241
|
+
}, ()=>allTagsMap.value.get(item)?.tagNameDisplay || item);
|
|
5242
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(vnode, tagContainer);
|
|
5243
|
+
const width = tagContainer.firstElementChild?.getBoundingClientRect().width || 0;
|
|
5244
|
+
document.body.removeChild(tagContainer);
|
|
5245
|
+
return width + getRemValue(TAG_MARGIN);
|
|
5246
|
+
});
|
|
5247
|
+
// 计算可用宽度
|
|
5248
|
+
const availableWidth = wrapperNode.offsetWidth - (props.disabled ? 0 : getRemValue(SELECT_WIDTH));
|
|
5249
|
+
const totalWidth = tagWidths.reduce((sum, width)=>sum + width, 0);
|
|
5250
|
+
// 如果所有标签都能显示,直接显示所有标签
|
|
5251
|
+
if (totalWidth <= availableWidth) {
|
|
5252
|
+
realMaxNum.value = modelValue.length;
|
|
5253
|
+
return;
|
|
5254
|
+
}
|
|
5255
|
+
// 如果放不下所有标签,需要显示更多按钮
|
|
5256
|
+
const availableWidthWithMore = availableWidth - getRemValue(MORE_BUTTON_WIDTH);
|
|
5257
|
+
// 计算可以显示多少个标签
|
|
5258
|
+
let currentWidth = 0;
|
|
5259
|
+
let count = 0;
|
|
5260
|
+
for (const width of tagWidths)if (currentWidth + width <= availableWidthWithMore) {
|
|
5261
|
+
currentWidth += width;
|
|
5262
|
+
count++;
|
|
5263
|
+
} else break;
|
|
5264
|
+
realMaxNum.value = count;
|
|
5265
|
+
};
|
|
5266
|
+
// Methods
|
|
5267
|
+
const handleClose = (bizId)=>{
|
|
5268
|
+
if (Array.isArray(attrs.modelValue)) {
|
|
5269
|
+
const newModelValue = attrs.modelValue.filter((id)=>id !== bizId);
|
|
5270
|
+
change(newModelValue);
|
|
5271
|
+
} else if (attrs.modelValue === bizId) change('');
|
|
5272
|
+
};
|
|
5273
|
+
const showSelect = ()=>{
|
|
5274
|
+
selectVisible.value = true;
|
|
5275
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
5276
|
+
SelectRef.value?.focus();
|
|
5277
|
+
});
|
|
5278
|
+
};
|
|
5279
|
+
const handleSelectConfirm = ()=>{
|
|
5280
|
+
if (!selectValue.value) {
|
|
5281
|
+
selectVisible.value = false;
|
|
5282
|
+
return;
|
|
5283
|
+
}
|
|
5284
|
+
const currentValues = Array.isArray(attrs.modelValue) ? attrs.modelValue : attrs.modelValue ? [
|
|
5285
|
+
attrs.modelValue
|
|
5286
|
+
] : [];
|
|
5287
|
+
if (props.multiple) {
|
|
5288
|
+
change([
|
|
5289
|
+
...currentValues,
|
|
5290
|
+
...selectValue.value
|
|
5291
|
+
]);
|
|
5292
|
+
selectValue.value = [];
|
|
5293
|
+
} else {
|
|
5294
|
+
change([
|
|
5295
|
+
...currentValues,
|
|
5296
|
+
selectValue.value
|
|
5297
|
+
]);
|
|
5298
|
+
selectValue.value = '';
|
|
5299
|
+
}
|
|
5300
|
+
selectVisible.value = false;
|
|
5301
|
+
};
|
|
5302
|
+
async function fetchData() {
|
|
5303
|
+
if (!props.bizIdTypeCode) return;
|
|
5304
|
+
loading.value = true;
|
|
5305
|
+
let [, result] = await queryTagGroupByExampleV1({
|
|
5306
|
+
bizIdTypeCode: props.bizIdTypeCode,
|
|
5307
|
+
bizId: props.bizId,
|
|
5308
|
+
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
|
|
5309
|
+
});
|
|
5310
|
+
loading.value = false;
|
|
5311
|
+
if (result?.success) {
|
|
5312
|
+
tableData.value = result.data;
|
|
5313
|
+
calcMaxNum(containerRef.value);
|
|
5314
|
+
}
|
|
5315
|
+
}
|
|
5316
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
5317
|
+
fetchData();
|
|
5318
|
+
// 等待所有标签渲染完成
|
|
5319
|
+
});
|
|
5320
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs.modelValue, ()=>{
|
|
5321
|
+
if (!props.multiple) {
|
|
5322
|
+
selectValue.value = attrs?.modelValue || '';
|
|
5323
|
+
return;
|
|
5324
|
+
}
|
|
5325
|
+
const modelValue = Array.isArray(attrs.modelValue) ? attrs.modelValue : attrs.modelValue ? [
|
|
5326
|
+
attrs.modelValue
|
|
5327
|
+
] : [];
|
|
5328
|
+
if (modelValue.length) // 等待所有标签渲染完成
|
|
5329
|
+
{
|
|
5330
|
+
if (containerRef.value) calcMaxNum(containerRef.value);
|
|
5331
|
+
}
|
|
5332
|
+
}, {
|
|
5333
|
+
immediate: true
|
|
5334
|
+
});
|
|
5335
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.tagList, ()=>{
|
|
5336
|
+
tableData.value = props.tagList || [];
|
|
5337
|
+
});
|
|
5338
|
+
/**
|
|
5339
|
+
*
|
|
5340
|
+
* @param value 下拉框选择
|
|
5341
|
+
*/ function change(value) {
|
|
5342
|
+
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
5343
|
+
emit('change', value);
|
|
5344
|
+
}
|
|
5345
|
+
return (_ctx, _cache)=>{
|
|
5346
|
+
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
5347
|
+
const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
|
|
5348
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
5349
|
+
ref_key: "containerRef",
|
|
5350
|
+
ref: containerRef,
|
|
5351
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(props.class)
|
|
5352
|
+
}, [
|
|
5353
|
+
props.multiple ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
5354
|
+
key: 0
|
|
5355
|
+
}, [
|
|
5356
|
+
((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)((Array.isArray((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue) ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue ? [
|
|
5357
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
|
|
5358
|
+
] : []).slice(0, realMaxNum.value), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
|
|
5359
|
+
key: item,
|
|
5360
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
5361
|
+
background: allTagsMap.value.get(item)?.background,
|
|
5362
|
+
color: allTagsMap.value.get(item)?.color
|
|
5363
|
+
}),
|
|
5364
|
+
closable: !props.disabled,
|
|
5365
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
5366
|
+
'mr-4'
|
|
5367
|
+
]),
|
|
5368
|
+
size: props.tagSize,
|
|
5369
|
+
"disable-transitions": true,
|
|
5370
|
+
onClose: ($event)=>handleClose(item)
|
|
5371
|
+
}, {
|
|
5372
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5373
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
|
|
5374
|
+
]),
|
|
5375
|
+
_: 2
|
|
5376
|
+
}, 1032, [
|
|
5377
|
+
"style",
|
|
5378
|
+
"closable",
|
|
5379
|
+
"size",
|
|
5380
|
+
"onClose"
|
|
5381
|
+
]))), 128)),
|
|
5382
|
+
(Array.isArray((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue) ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue ? [
|
|
5383
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
|
|
5384
|
+
] : []).length > realMaxNum.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_popover, {
|
|
5385
|
+
key: 0,
|
|
5386
|
+
placement: "bottom",
|
|
5387
|
+
trigger: "hover"
|
|
5388
|
+
}, {
|
|
5389
|
+
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5390
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
|
|
5391
|
+
ref_key: "moreButtonRef",
|
|
5392
|
+
ref: moreButtonRef,
|
|
5393
|
+
style: {
|
|
5394
|
+
"margin-left": "0"
|
|
5395
|
+
},
|
|
5396
|
+
class: "mr-4"
|
|
5397
|
+
}, {
|
|
5398
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5399
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("更多 +" + (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)((Array.isArray((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue) ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue ? [
|
|
5400
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
|
|
5401
|
+
] : []).length - realMaxNum.value), 1)
|
|
5402
|
+
]),
|
|
5403
|
+
_: 1
|
|
5404
|
+
}, 512)
|
|
5405
|
+
]),
|
|
5406
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5407
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", tag_selectvue_type_script_lang_ts_setup_true_hoisted_1, [
|
|
5408
|
+
((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)((Array.isArray((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue) ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue ? [
|
|
5409
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
|
|
5410
|
+
] : []).slice(realMaxNum.value), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
|
|
5411
|
+
key: item,
|
|
5412
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
5413
|
+
background: allTagsMap.value.get(item)?.background,
|
|
5414
|
+
color: allTagsMap.value.get(item)?.color
|
|
5415
|
+
}),
|
|
5416
|
+
closable: !props.disabled,
|
|
5417
|
+
size: props.tagSize,
|
|
5418
|
+
"disable-transitions": true,
|
|
5419
|
+
onClose: ($event)=>handleClose(item)
|
|
5420
|
+
}, {
|
|
5421
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5422
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
|
|
5423
|
+
]),
|
|
5424
|
+
_: 2
|
|
5425
|
+
}, 1032, [
|
|
5426
|
+
"style",
|
|
5427
|
+
"closable",
|
|
5428
|
+
"size",
|
|
5429
|
+
"onClose"
|
|
5430
|
+
]))), 128))
|
|
5431
|
+
])
|
|
5432
|
+
]),
|
|
5433
|
+
_: 1
|
|
5434
|
+
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
5435
|
+
selectVisible.value && !props.disabled ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
|
|
5436
|
+
key: 1,
|
|
5437
|
+
modelValue: selectValue.value,
|
|
5438
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectValue.value = $event),
|
|
5439
|
+
"table-data": tableData.value,
|
|
5440
|
+
"all-tags-map": allTagsMap.value,
|
|
5441
|
+
multiple: true,
|
|
5442
|
+
disabled: props.disabled,
|
|
5443
|
+
"tag-size": props.tagSize,
|
|
5444
|
+
"has-select": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue,
|
|
5445
|
+
placeholder: "请选择",
|
|
5446
|
+
onChange: _cache[1] || (_cache[1] = ()=>{
|
|
5447
|
+
if (!props.multiple) handleSelectConfirm();
|
|
5448
|
+
}),
|
|
5449
|
+
onBlur: handleSelectConfirm
|
|
5450
|
+
}, null, 8, [
|
|
5451
|
+
"modelValue",
|
|
5452
|
+
"table-data",
|
|
5453
|
+
"all-tags-map",
|
|
5454
|
+
"disabled",
|
|
5455
|
+
"tag-size",
|
|
5456
|
+
"has-select"
|
|
5457
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
5458
|
+
selectVisible.value || props.disabled ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_button, {
|
|
5459
|
+
key: 2,
|
|
5460
|
+
style: {
|
|
5461
|
+
"margin-left": "0"
|
|
5462
|
+
},
|
|
5463
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)({
|
|
5464
|
+
'pointer-events-none': props.disabled
|
|
5465
|
+
}),
|
|
5466
|
+
onClick: showSelect
|
|
5467
|
+
}, {
|
|
5468
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[3] || (_cache[3] = [
|
|
5469
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" + ", -1)
|
|
5470
|
+
])),
|
|
5471
|
+
_: 1,
|
|
5472
|
+
__: [
|
|
5473
|
+
3
|
|
5474
|
+
]
|
|
5475
|
+
}, 8, [
|
|
5476
|
+
"class"
|
|
5477
|
+
]))
|
|
5478
|
+
], 64)) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
|
|
5479
|
+
key: 1,
|
|
5480
|
+
modelValue: selectValue.value,
|
|
5481
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>selectValue.value = $event),
|
|
5482
|
+
"table-data": tableData.value,
|
|
5483
|
+
"all-tags-map": allTagsMap.value,
|
|
5484
|
+
multiple: false,
|
|
5485
|
+
disabled: props.disabled,
|
|
5486
|
+
"tag-size": props.tagSize,
|
|
5487
|
+
placeholder: "请选择标签",
|
|
5488
|
+
"has-select": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue,
|
|
5489
|
+
onChange: change
|
|
5490
|
+
}, null, 8, [
|
|
5491
|
+
"modelValue",
|
|
5492
|
+
"table-data",
|
|
5493
|
+
"all-tags-map",
|
|
5494
|
+
"disabled",
|
|
5495
|
+
"tag-size",
|
|
5496
|
+
"has-select"
|
|
5497
|
+
]))
|
|
5498
|
+
], 2);
|
|
5499
|
+
};
|
|
5500
|
+
}
|
|
5501
|
+
});
|
|
5502
|
+
const tag_select_exports_ = tag_selectvue_type_script_lang_ts_setup_true;
|
|
5503
|
+
/* ESM default export */ const tag_select = tag_select_exports_;
|
|
5504
|
+
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1 = {
|
|
5505
|
+
class: "border-r border-[#C9C9C9] pr-5 mr-5"
|
|
5506
|
+
};
|
|
5507
|
+
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2 = {
|
|
5508
|
+
class: "flex min-w-32 items-start justify-start"
|
|
5509
|
+
};
|
|
5510
|
+
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_3 = {
|
|
5511
|
+
class: "ml-[12px] flex-1"
|
|
5512
|
+
};
|
|
5513
|
+
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_4 = {
|
|
5514
|
+
class: "flex-1 flex flex-col gap-3 text-center"
|
|
5515
|
+
};
|
|
5516
|
+
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_5 = {
|
|
5517
|
+
class: "flex-1 text-center leading-[14px]"
|
|
5518
|
+
};
|
|
5519
|
+
const _hoisted_6 = {
|
|
5520
|
+
class: "min-w-7"
|
|
5521
|
+
};
|
|
5522
|
+
const _hoisted_7 = {
|
|
5523
|
+
class: "min-w-7 ml-2"
|
|
5524
|
+
};
|
|
5525
|
+
const _hoisted_8 = {
|
|
5526
|
+
class: "flex justify-center"
|
|
5527
|
+
};
|
|
5528
|
+
const _hoisted_9 = {
|
|
5529
|
+
key: 0,
|
|
5530
|
+
class: "rounded-full bg-[#00AB44] px-1.5 text-center text-white mt-3 flex-1"
|
|
5531
|
+
};
|
|
5532
|
+
const _hoisted_10 = {
|
|
5533
|
+
class: "mr-2"
|
|
5534
|
+
};
|
|
5535
|
+
const _hoisted_11 = {
|
|
5536
|
+
class: "text-[#555]"
|
|
5537
|
+
};
|
|
5538
|
+
const _hoisted_12 = {
|
|
5539
|
+
class: "w-full text-[#555]"
|
|
5540
|
+
};
|
|
5541
|
+
const _hoisted_13 = {
|
|
5542
|
+
class: "w-full flex"
|
|
5543
|
+
};
|
|
5544
|
+
const _hoisted_14 = {
|
|
5545
|
+
class: "text-[#555]"
|
|
5546
|
+
};
|
|
5547
|
+
const _hoisted_15 = {
|
|
5548
|
+
class: "flex-1"
|
|
5549
|
+
};
|
|
5550
|
+
const _hoisted_16 = {
|
|
5551
|
+
key: 1
|
|
5552
|
+
};
|
|
5553
|
+
// import DefaultPatient from "../patient-access/images/default_patient.vue";
|
|
5554
|
+
// import ManPatient from "../patient-access/images/man_patient.vue";
|
|
5555
|
+
// import WomanPatient from "../patient-access/images/women_patient.vue";
|
|
5556
|
+
const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
5557
|
+
/* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5558
|
+
__name: 'BannerInfo',
|
|
5559
|
+
props: {
|
|
5560
|
+
code: {},
|
|
5561
|
+
bizId: {},
|
|
5562
|
+
isBg: {
|
|
5563
|
+
type: Boolean,
|
|
5564
|
+
default: true
|
|
5565
|
+
},
|
|
5566
|
+
menuId: {}
|
|
5567
|
+
},
|
|
5568
|
+
emits: [
|
|
5569
|
+
"avatarClick"
|
|
5570
|
+
],
|
|
5571
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
5572
|
+
const emits = __emit;
|
|
5573
|
+
const BIZ_ID_TYPE_CODE_MAP = {
|
|
5574
|
+
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.PATIENT]: PERSON,
|
|
5575
|
+
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.REGISTRATION]: PERSON,
|
|
5576
|
+
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.CHARGE]: PERSON,
|
|
5577
|
+
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.HOSPITALIZATION]: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE.IENC_ENCOUNTER
|
|
5578
|
+
};
|
|
5579
|
+
const tagBizIdTypeCode = BIZ_ID_TYPE_CODE_MAP[__props.code];
|
|
5580
|
+
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
5581
|
+
const bannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
5582
|
+
const initBannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
5583
|
+
const isTextOverflowing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
5584
|
+
const firstDisplayWidthRatio = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(1);
|
|
5585
|
+
const tagBizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
|
|
5586
|
+
const tagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
5587
|
+
const checkPrice = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
|
|
5588
|
+
const popoverSelector = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
5589
|
+
// 确保布局列数为有效数字
|
|
5590
|
+
const parseLayoutColumns = (value)=>{
|
|
5591
|
+
const parsed = parseInt(value, 10);
|
|
5592
|
+
if (isNaN(parsed)) return 6;
|
|
5593
|
+
return parsed;
|
|
5594
|
+
};
|
|
5595
|
+
// 计算实际布局列数
|
|
5596
|
+
const layoutColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>parseLayoutColumns(bannerInfo.value?.layoutTypeCode));
|
|
5597
|
+
function setBizId(data) {
|
|
5598
|
+
switch(tagBizIdTypeCode){
|
|
5599
|
+
case PERSON:
|
|
5600
|
+
tagBizId.value = data.personId;
|
|
5601
|
+
break;
|
|
5602
|
+
case __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE.IENC_ENCOUNTER:
|
|
5603
|
+
tagBizId.value = data.inEncounterId;
|
|
5604
|
+
break;
|
|
5605
|
+
default:
|
|
5606
|
+
tagBizId.value = data.personId;
|
|
5607
|
+
}
|
|
5608
|
+
}
|
|
5609
|
+
/** 获取banner配置 */ const queryBannerConfig = async ()=>{
|
|
5610
|
+
loading.value = true;
|
|
5611
|
+
if (!__props.bizId && initBannerInfo.value) {
|
|
5612
|
+
bannerInfo.value = initBannerInfo.value;
|
|
5613
|
+
tagIds.value = [];
|
|
5614
|
+
tagBizId.value = "";
|
|
5615
|
+
loading.value = false;
|
|
5616
|
+
return;
|
|
5617
|
+
}
|
|
5618
|
+
const [, res] = await getBannerDataByBizId({
|
|
5619
|
+
menuId: __props.menuId,
|
|
5620
|
+
bizId: __props.bizId ?? void 0,
|
|
5621
|
+
bizIdTypeCode: BANNER_COMPONENT_CONFIG[__props.code].bizIdTypeCode,
|
|
5622
|
+
componentId: BANNER_COMPONENT_CONFIG[__props.code].componentId
|
|
5623
|
+
});
|
|
5624
|
+
loading.value = false;
|
|
5625
|
+
if (res?.success) {
|
|
5626
|
+
// 预交金金额
|
|
5627
|
+
const depositBalanceAmt = res.data?.bannerItemList?.find((item)=>"depositBalanceAmt" === item.formCtlNo);
|
|
5628
|
+
// 未结金额
|
|
5629
|
+
const unSettleAmt = res.data?.bannerItemList?.find((item)=>"unSettleAmt" === item.formCtlNo);
|
|
5630
|
+
// 欠费下限金额
|
|
5631
|
+
const arrearageAmt = res.data?.bannerItemList?.find((item)=>"arrearageAmt" === item.formCtlNo);
|
|
5632
|
+
checkPrice.value = Number(depositBalanceAmt?.dataValue) - Number(unSettleAmt?.dataValue) - Number(arrearageAmt?.dataValue);
|
|
5633
|
+
res.data.bannerItemList = (res?.data?.bannerItemList ?? [])?.filter((item)=>item?.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
|
|
5634
|
+
setBizId({
|
|
5635
|
+
personId: res.data?.personId || "",
|
|
5636
|
+
inEncounterId: res.data?.inEncounterId || ""
|
|
5637
|
+
});
|
|
5638
|
+
fetchBizTagListByExample();
|
|
5639
|
+
firstDisplayWidthRatio.value = res.data.bannerItemList[0]?.displayWidthRatio || 1;
|
|
5640
|
+
if (!__props.bizId) initBannerInfo.value = res?.data;
|
|
5641
|
+
bannerInfo.value = res?.data;
|
|
5642
|
+
}
|
|
5643
|
+
};
|
|
5644
|
+
// 修改检查文字溢出的逻辑
|
|
5645
|
+
const checkTextOverflow = (event)=>{
|
|
5646
|
+
const target = event.currentTarget;
|
|
5647
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
5648
|
+
isTextOverflowing.value = target.offsetWidth < target.scrollWidth;
|
|
5649
|
+
});
|
|
5650
|
+
};
|
|
5651
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>__props.bizId, async ()=>{
|
|
5652
|
+
await queryBannerConfig();
|
|
5653
|
+
});
|
|
5654
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(async ()=>{
|
|
5655
|
+
await queryBannerConfig();
|
|
5656
|
+
});
|
|
5657
|
+
/**
|
|
5658
|
+
* 获取当前的标签
|
|
5659
|
+
*/ async function fetchBizTagListByExample() {
|
|
5660
|
+
if (!tagBizId.value || !tagBizIdTypeCode) {
|
|
5661
|
+
tagIds.value = [];
|
|
5662
|
+
return;
|
|
5663
|
+
}
|
|
5664
|
+
let [, result] = await queryBizTagListByExample({
|
|
5665
|
+
bizIdTypeCode: tagBizIdTypeCode,
|
|
5666
|
+
bizId: tagBizId.value
|
|
5667
|
+
});
|
|
5668
|
+
if (result?.success) tagIds.value = (result.data || []).map((item)=>item.tagId);
|
|
5669
|
+
}
|
|
5670
|
+
__expose({
|
|
5671
|
+
refresh: queryBannerConfig,
|
|
5672
|
+
popoverSelector: popoverSelector
|
|
5673
|
+
});
|
|
5674
|
+
return (_ctx, _cache)=>{
|
|
5675
|
+
const _component_el_text = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-text");
|
|
5676
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
4888
5677
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
4889
5678
|
{
|
|
4890
5679
|
['bg-fill-lighter']: _ctx.isBg
|
|
@@ -4895,22 +5684,19 @@ const _hoisted_12 = {
|
|
|
4895
5684
|
}, [
|
|
4896
5685
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1, [
|
|
4897
5686
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2, [
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
}
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
height: 32,
|
|
4912
|
-
class: "rounded-full"
|
|
4913
|
-
})),
|
|
5687
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
|
|
5688
|
+
class: "cursor-pointer",
|
|
5689
|
+
ref_key: "popoverSelector",
|
|
5690
|
+
ref: popoverSelector,
|
|
5691
|
+
onClick: _cache[0] || (_cache[0] = ($event)=>emits('avatarClick'))
|
|
5692
|
+
}, [
|
|
5693
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_avatar), {
|
|
5694
|
+
class: "h-8 w-8 rounded-full",
|
|
5695
|
+
type: bannerInfo.value?.genderCode === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.SEX_CODE).MAN ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(utils_AVATAR_TYPE_CODE).MAN : bannerInfo.value?.genderCode === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.SEX_CODE).WOMAN ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(utils_AVATAR_TYPE_CODE).WOMAN : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(utils_AVATAR_TYPE_CODE).DEFAULT
|
|
5696
|
+
}, null, 8, [
|
|
5697
|
+
"type"
|
|
5698
|
+
])
|
|
5699
|
+
], 512),
|
|
4914
5700
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_3, [
|
|
4915
5701
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_4, [
|
|
4916
5702
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
|
|
@@ -4954,21 +5740,50 @@ const _hoisted_12 = {
|
|
|
4954
5740
|
}, [
|
|
4955
5741
|
((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)(bannerInfo.value?.bannerItemList ?? [], (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
4956
5742
|
key: item.formDesignDetailId,
|
|
4957
|
-
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(
|
|
4958
|
-
|
|
4959
|
-
|
|
5743
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
5744
|
+
"min-h-6",
|
|
5745
|
+
{
|
|
5746
|
+
[`col-span-${Math.floor(item.displayWidthRatio * Number(layoutColumns.value))}`]: true
|
|
5747
|
+
}
|
|
5748
|
+
])
|
|
4960
5749
|
}, [
|
|
4961
5750
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
|
|
4962
5751
|
class: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
|
|
4963
5752
|
onMouseenter: checkTextOverflow
|
|
4964
5753
|
}, [
|
|
4965
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_11,
|
|
5754
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_11, [
|
|
5755
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_text, {
|
|
5756
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)('depositBalanceAmt' === item.formCtlNo && checkPrice.value < 0 ? '' : 'text-[#555]'),
|
|
5757
|
+
type: 'depositBalanceAmt' === item.formCtlNo && checkPrice.value < 0 ? 'danger' : ''
|
|
5758
|
+
}, {
|
|
5759
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5760
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.labelNameDisplay) + ":", 1)
|
|
5761
|
+
]),
|
|
5762
|
+
_: 2
|
|
5763
|
+
}, 1032, [
|
|
5764
|
+
"class",
|
|
5765
|
+
"type"
|
|
5766
|
+
])
|
|
5767
|
+
]),
|
|
4966
5768
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTooltip), {
|
|
4967
5769
|
disabled: !isTextOverflowing.value,
|
|
4968
5770
|
content: item.dataValue
|
|
4969
5771
|
}, {
|
|
4970
5772
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
4971
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_12,
|
|
5773
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_12, [
|
|
5774
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_text, {
|
|
5775
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)('depositBalanceAmt' === item.formCtlNo && checkPrice.value < 0 ? '' : 'text-[#555]'),
|
|
5776
|
+
type: 'depositBalanceAmt' === item.formCtlNo && checkPrice.value < 0 ? 'danger' : ''
|
|
5777
|
+
}, {
|
|
5778
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5779
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.dataValue || "--"), 1)
|
|
5780
|
+
]),
|
|
5781
|
+
_: 2
|
|
5782
|
+
}, 1032, [
|
|
5783
|
+
"class",
|
|
5784
|
+
"type"
|
|
5785
|
+
])
|
|
5786
|
+
])
|
|
4972
5787
|
]),
|
|
4973
5788
|
_: 2
|
|
4974
5789
|
}, 1032, [
|
|
@@ -4976,7 +5791,32 @@ const _hoisted_12 = {
|
|
|
4976
5791
|
"content"
|
|
4977
5792
|
])
|
|
4978
5793
|
], 32)
|
|
4979
|
-
], 2))), 128))
|
|
5794
|
+
], 2))), 128)),
|
|
5795
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
|
|
5796
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
5797
|
+
"min-h-6",
|
|
5798
|
+
{
|
|
5799
|
+
[`col-span-${Number(layoutColumns.value)}`]: true
|
|
5800
|
+
}
|
|
5801
|
+
])
|
|
5802
|
+
}, [
|
|
5803
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", _hoisted_13, [
|
|
5804
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_14, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode) === PERSON ? "患者标签:" : "就诊标签"), 1),
|
|
5805
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_15, [
|
|
5806
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode) && tagIds.value.length ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(tag_select, {
|
|
5807
|
+
key: 0,
|
|
5808
|
+
modelValue: tagIds.value,
|
|
5809
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>tagIds.value = $event),
|
|
5810
|
+
tagSize: "default",
|
|
5811
|
+
bizIdTypeCode: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode),
|
|
5812
|
+
disabled: true
|
|
5813
|
+
}, null, 8, [
|
|
5814
|
+
"modelValue",
|
|
5815
|
+
"bizIdTypeCode"
|
|
5816
|
+
])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_16, "--"))
|
|
5817
|
+
])
|
|
5818
|
+
])
|
|
5819
|
+
], 2)
|
|
4980
5820
|
], 2)
|
|
4981
5821
|
], 6)), [
|
|
4982
5822
|
[
|
|
@@ -4984,6 +5824,7 @@ const _hoisted_12 = {
|
|
|
4984
5824
|
loading.value
|
|
4985
5825
|
]
|
|
4986
5826
|
]);
|
|
5827
|
+
};
|
|
4987
5828
|
}
|
|
4988
5829
|
});
|
|
4989
5830
|
const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent;
|
|
@@ -5186,7 +6027,7 @@ const pluginMainRequest = async (methodName, params)=>{
|
|
|
5186
6027
|
const result = await Api.PluginMain[methodName](paramsJson);
|
|
5187
6028
|
const { ...res } = JSON.parse(result);
|
|
5188
6029
|
// console.log("params", params);
|
|
5189
|
-
|
|
6030
|
+
console.log("出参", JSON.parse(result));
|
|
5190
6031
|
if (!res.success) __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error(res.errorMessage);
|
|
5191
6032
|
return [
|
|
5192
6033
|
res.success ? void 0 : res,
|
|
@@ -5376,6 +6217,12 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
5376
6217
|
* type 数据源格式类型代码
|
|
5377
6218
|
* @param [type='BASE64']
|
|
5378
6219
|
*/ function useWebPrint(content, type = constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
|
|
6220
|
+
const isFirefox = navigator.userAgent.includes("Firefox");
|
|
6221
|
+
if (isFirefox) {
|
|
6222
|
+
// Firefox 的特殊处理
|
|
6223
|
+
handleFirefoxPrint(content, type);
|
|
6224
|
+
return;
|
|
6225
|
+
}
|
|
5379
6226
|
// 创建隐藏的iframe
|
|
5380
6227
|
const iframe = document.createElement("iframe");
|
|
5381
6228
|
iframe.style.position = "fixed";
|
|
@@ -5520,6 +6367,40 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
5520
6367
|
// 将容器添加到 body
|
|
5521
6368
|
document.body.appendChild(container);
|
|
5522
6369
|
}
|
|
6370
|
+
async function handleFirefoxPrint(content, type = constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
|
|
6371
|
+
// 创建一个临时 div 用于渲染内容
|
|
6372
|
+
const tempDiv = document.createElement("div");
|
|
6373
|
+
tempDiv.style.position = "fixed";
|
|
6374
|
+
tempDiv.style.right = "0";
|
|
6375
|
+
tempDiv.style.bottom = "0";
|
|
6376
|
+
tempDiv.style.width = "0";
|
|
6377
|
+
tempDiv.style.height = "0";
|
|
6378
|
+
tempDiv.style.overflow = "hidden";
|
|
6379
|
+
document.body.appendChild(tempDiv);
|
|
6380
|
+
// 根据类型填充内容
|
|
6381
|
+
if (type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.H5 || type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.JSON) tempDiv.innerHTML = content;
|
|
6382
|
+
else if (type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
|
|
6383
|
+
const img = new Image();
|
|
6384
|
+
img.src = content.startsWith("data:image") ? content : `data:image/png;base64,${content}`;
|
|
6385
|
+
tempDiv.appendChild(img);
|
|
6386
|
+
// 等待图片加载
|
|
6387
|
+
await new Promise((resolve)=>{
|
|
6388
|
+
img.onload = resolve;
|
|
6389
|
+
img.onerror = ()=>{
|
|
6390
|
+
tempDiv.innerHTML = "<p>加载失败,请检查数据</p>";
|
|
6391
|
+
resolve(void 0);
|
|
6392
|
+
};
|
|
6393
|
+
});
|
|
6394
|
+
}
|
|
6395
|
+
// 临时显示内容并打印
|
|
6396
|
+
tempDiv.style.width = "100%";
|
|
6397
|
+
tempDiv.style.height = "100%";
|
|
6398
|
+
tempDiv.style.overflow = "visible";
|
|
6399
|
+
// 使用 window.print() 直接打印当前页面
|
|
6400
|
+
window.print();
|
|
6401
|
+
// 打印完成后移除临时元素
|
|
6402
|
+
document.body.removeChild(tempDiv);
|
|
6403
|
+
}
|
|
5523
6404
|
const createPrint = ()=>{
|
|
5524
6405
|
/**
|
|
5525
6406
|
* 打印主步骤
|
|
@@ -5587,6 +6468,8 @@ const createPrint = ()=>{
|
|
|
5587
6468
|
defaultContext.printParams = params;
|
|
5588
6469
|
/** 1.查询单据信息 */ await fetchReceiptInfo();
|
|
5589
6470
|
if (breakPrint) return;
|
|
6471
|
+
/**2.1 是否为不打印*/ whetherPrint();
|
|
6472
|
+
if (breakPrint) return;
|
|
5590
6473
|
/** 2.弹窗询问 */ if (defaultContext?.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) await dialogAsk();
|
|
5591
6474
|
if (breakPrint) return;
|
|
5592
6475
|
/** 3.模版选择 */ await selectPrintTemplateFn();
|
|
@@ -5621,6 +6504,21 @@ const createPrint = ()=>{
|
|
|
5621
6504
|
};
|
|
5622
6505
|
};
|
|
5623
6506
|
/**
|
|
6507
|
+
* 2.1 是否为不打印(2025-9-22 任务号【25720】)
|
|
6508
|
+
*/ const whetherPrint = ()=>{
|
|
6509
|
+
const { receiptPrintRuleCode, receiptPrintCategCode, menuXReceiptList } = defaultContext.receiptInfo || {};
|
|
6510
|
+
if (!receiptPrintRuleCode) return;
|
|
6511
|
+
let code = receiptPrintCategCode;
|
|
6512
|
+
if (receiptPrintRuleCode === constant_RECEIPT_PRINT_RULE_CODE.MENU) {
|
|
6513
|
+
const menuReceiptInfo = menuXReceiptList?.find((item)=>item.menuId === defaultContext.printParams?.menuId);
|
|
6514
|
+
code = menuReceiptInfo?.receiptPrintCategCode || receiptPrintCategCode;
|
|
6515
|
+
} else code = receiptPrintCategCode;
|
|
6516
|
+
if (code === constant_RECEIPT_PRINT_CATEG_CODE.NO_PRINT) {
|
|
6517
|
+
breakPrint = true; // 如果是不打印则取消打印
|
|
6518
|
+
return;
|
|
6519
|
+
}
|
|
6520
|
+
};
|
|
6521
|
+
/**
|
|
5624
6522
|
* 2.弹窗询问
|
|
5625
6523
|
*/ const dialogAsk = async ()=>{
|
|
5626
6524
|
const { receiptPrintRuleCode, receiptPrintCategCode, redPrintCategCode, receiptNameDisplay, menuXReceiptList } = defaultContext.receiptInfo || {};
|
|
@@ -5999,7 +6897,7 @@ const print = async (params)=>{
|
|
|
5999
6897
|
class: "min-w-[50px]"
|
|
6000
6898
|
}, {
|
|
6001
6899
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6002
|
-
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 打印 ")),
|
|
6900
|
+
_cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 打印 ", -1)),
|
|
6003
6901
|
showReceipt.value && !_ctx.disabled ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), {
|
|
6004
6902
|
key: 0,
|
|
6005
6903
|
class: "el-icon--right"
|
|
@@ -6010,7 +6908,10 @@ const print = async (params)=>{
|
|
|
6010
6908
|
_: 1
|
|
6011
6909
|
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
6012
6910
|
]),
|
|
6013
|
-
_: 1
|
|
6911
|
+
_: 1,
|
|
6912
|
+
__: [
|
|
6913
|
+
0
|
|
6914
|
+
]
|
|
6014
6915
|
}, 8, [
|
|
6015
6916
|
"type",
|
|
6016
6917
|
"disabled"
|
|
@@ -6170,7 +7071,12 @@ function useUpdateInvoiceFormConfig(options) {
|
|
|
6170
7071
|
const currentNo = Number(modelValue.value?.currentNo);
|
|
6171
7072
|
const endNo = Number(modelValue.value?.endNo);
|
|
6172
7073
|
const numValue = Number(value);
|
|
6173
|
-
|
|
7074
|
+
const validNo = String(currentNo + 1).padStart(modelValue.value?.endNo?.length, "0"); // 如果当前票号和结束票号一致,且调整后票号也一致,直接通过
|
|
7075
|
+
if (currentNo === endNo && numValue === currentNo) {
|
|
7076
|
+
callback();
|
|
7077
|
+
return;
|
|
7078
|
+
}
|
|
7079
|
+
if (numValue <= currentNo || numValue > endNo) callback(new Error(`调整后票号需在${validNo}和${modelValue.value?.endNo}之间!`));
|
|
6174
7080
|
else callback();
|
|
6175
7081
|
},
|
|
6176
7082
|
trigger: [
|
|
@@ -6368,7 +7274,8 @@ function getFormRules(formConfigData) {
|
|
|
6368
7274
|
Function
|
|
6369
7275
|
]
|
|
6370
7276
|
},
|
|
6371
|
-
filterValues: {}
|
|
7277
|
+
filterValues: {},
|
|
7278
|
+
hospitalId: {}
|
|
6372
7279
|
},
|
|
6373
7280
|
emits: [
|
|
6374
7281
|
'change'
|
|
@@ -6405,7 +7312,7 @@ function getFormRules(formConfigData) {
|
|
|
6405
7312
|
menuId: menuId || '',
|
|
6406
7313
|
pageNumber: 1,
|
|
6407
7314
|
pageSize: 100,
|
|
6408
|
-
hospitalId: currentOrg?.orgId || '',
|
|
7315
|
+
hospitalId: props?.hospitalId || currentOrg?.orgId || '',
|
|
6409
7316
|
...params
|
|
6410
7317
|
});
|
|
6411
7318
|
loading.value = false;
|
|
@@ -6443,10 +7350,133 @@ function getFormRules(formConfigData) {
|
|
|
6443
7350
|
}
|
|
6444
7351
|
}, {
|
|
6445
7352
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6446
|
-
((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)(data.value, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
|
|
6447
|
-
key: item.value,
|
|
6448
|
-
label: item.label,
|
|
6449
|
-
value: item.value
|
|
7353
|
+
((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)(data.value, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
|
|
7354
|
+
key: item.value,
|
|
7355
|
+
label: item.label,
|
|
7356
|
+
value: item.value
|
|
7357
|
+
}, null, 8, [
|
|
7358
|
+
"label",
|
|
7359
|
+
"value"
|
|
7360
|
+
]))), 128))
|
|
7361
|
+
]),
|
|
7362
|
+
_: 1
|
|
7363
|
+
}, 8, [
|
|
7364
|
+
"placeholder",
|
|
7365
|
+
"loading",
|
|
7366
|
+
"disabled",
|
|
7367
|
+
"remote-method"
|
|
7368
|
+
]);
|
|
7369
|
+
};
|
|
7370
|
+
}
|
|
7371
|
+
});
|
|
7372
|
+
const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_selectvue_type_script_setup_true_lang_ts, [
|
|
7373
|
+
[
|
|
7374
|
+
'__scopeId',
|
|
7375
|
+
"data-v-6fd68709"
|
|
7376
|
+
]
|
|
7377
|
+
]);
|
|
7378
|
+
/* ESM default export */ const dict_select = dict_select_exports_;
|
|
7379
|
+
/* ESM default export */ const flag_selectvue_type_script_setup_true_lang_ts_name_FlagSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
7380
|
+
__name: 'index',
|
|
7381
|
+
emits: [
|
|
7382
|
+
'change'
|
|
7383
|
+
],
|
|
7384
|
+
setup (__props, { emit: __emit }) {
|
|
7385
|
+
const emit = __emit;
|
|
7386
|
+
const ENABLED_FLAG_OPTIONS = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>[
|
|
7387
|
+
{
|
|
7388
|
+
label: '全部',
|
|
7389
|
+
value: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.ALL
|
|
7390
|
+
},
|
|
7391
|
+
{
|
|
7392
|
+
label: '是',
|
|
7393
|
+
value: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
|
|
7394
|
+
},
|
|
7395
|
+
{
|
|
7396
|
+
label: '否',
|
|
7397
|
+
value: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO
|
|
7398
|
+
}
|
|
7399
|
+
]);
|
|
7400
|
+
const enabledFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
|
|
7401
|
+
const change = (val)=>{
|
|
7402
|
+
emit('change', val);
|
|
7403
|
+
};
|
|
7404
|
+
return (_ctx, _cache)=>{
|
|
7405
|
+
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
7406
|
+
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
7407
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
7408
|
+
onChange: change,
|
|
7409
|
+
modelValue: enabledFlag.value,
|
|
7410
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>enabledFlag.value = $event),
|
|
7411
|
+
placeholder: "请选择"
|
|
7412
|
+
}, {
|
|
7413
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7414
|
+
((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)(ENABLED_FLAG_OPTIONS.value, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
|
|
7415
|
+
key: item.value,
|
|
7416
|
+
label: item.label,
|
|
7417
|
+
value: item.value
|
|
7418
|
+
}, null, 8, [
|
|
7419
|
+
"label",
|
|
7420
|
+
"value"
|
|
7421
|
+
]))), 128))
|
|
7422
|
+
]),
|
|
7423
|
+
_: 1
|
|
7424
|
+
}, 8, [
|
|
7425
|
+
"modelValue"
|
|
7426
|
+
]);
|
|
7427
|
+
};
|
|
7428
|
+
}
|
|
7429
|
+
});
|
|
7430
|
+
const flag_select_exports_ = flag_selectvue_type_script_setup_true_lang_ts_name_FlagSelect;
|
|
7431
|
+
/* ESM default export */ const flag_select = flag_select_exports_;
|
|
7432
|
+
/* ESM default export */ const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
7433
|
+
__name: 'index',
|
|
7434
|
+
emits: [
|
|
7435
|
+
'change'
|
|
7436
|
+
],
|
|
7437
|
+
setup (__props, { emit: __emit }) {
|
|
7438
|
+
const { currentOrg, hospitalList } = use_app_config([
|
|
7439
|
+
use_app_config_MAIN_APP_CONFIG.CURRENT_ORG,
|
|
7440
|
+
use_app_config_MAIN_APP_CONFIG.HOSPITAL_LIST
|
|
7441
|
+
]);
|
|
7442
|
+
const isDisabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL);
|
|
7443
|
+
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
7444
|
+
const emit = __emit; /**
|
|
7445
|
+
*
|
|
7446
|
+
* @param value 下拉框选择
|
|
7447
|
+
*/
|
|
7448
|
+
function change(value) {
|
|
7449
|
+
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
7450
|
+
emit('change', value);
|
|
7451
|
+
}
|
|
7452
|
+
let stopWatch; /** 主动触发change */
|
|
7453
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7454
|
+
stopWatch = (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>currentOrg?.orgId, ()=>{
|
|
7455
|
+
if (attrs?.modelValue) change(attrs.modelValue);
|
|
7456
|
+
else {
|
|
7457
|
+
const id = currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL ? currentOrg?.orgId : attrs?.hospitalId === void 0 ? (hospitalList ?? [])[0]?.orgId : attrs?.hospitalId;
|
|
7458
|
+
if (void 0 !== id) change(id);
|
|
7459
|
+
}
|
|
7460
|
+
}, {
|
|
7461
|
+
immediate: true
|
|
7462
|
+
});
|
|
7463
|
+
});
|
|
7464
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
7465
|
+
if (stopWatch) stopWatch();
|
|
7466
|
+
});
|
|
7467
|
+
return (_ctx, _cache)=>{
|
|
7468
|
+
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
7469
|
+
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
7470
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
7471
|
+
onChange: change,
|
|
7472
|
+
placeholder: "Select",
|
|
7473
|
+
disabled: isDisabled.value
|
|
7474
|
+
}, {
|
|
7475
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7476
|
+
((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)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(hospitalList) ?? [], (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
|
|
7477
|
+
key: item.orgId,
|
|
7478
|
+
label: item.orgName,
|
|
7479
|
+
value: item.orgId
|
|
6450
7480
|
}, null, 8, [
|
|
6451
7481
|
"label",
|
|
6452
7482
|
"value"
|
|
@@ -6454,60 +7484,153 @@ function getFormRules(formConfigData) {
|
|
|
6454
7484
|
]),
|
|
6455
7485
|
_: 1
|
|
6456
7486
|
}, 8, [
|
|
6457
|
-
"
|
|
6458
|
-
"loading",
|
|
6459
|
-
"disabled",
|
|
6460
|
-
"remote-method"
|
|
7487
|
+
"disabled"
|
|
6461
7488
|
]);
|
|
6462
7489
|
};
|
|
6463
7490
|
}
|
|
6464
7491
|
});
|
|
6465
|
-
const
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
/* ESM default export */ const
|
|
7492
|
+
const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect;
|
|
7493
|
+
/* ESM default export */ const hospital_select = hospital_select_exports_;
|
|
7494
|
+
/**
|
|
7495
|
+
* [1-10013-1]根据条件查询用户列表
|
|
7496
|
+
* @param params
|
|
7497
|
+
* @returns
|
|
7498
|
+
*/ const api_queryUserList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/user/queryUserListByExample', params);
|
|
7499
|
+
/* ESM default export */ const user_selectvue_type_script_setup_true_lang_ts_name_UserSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
6473
7500
|
__name: 'index',
|
|
7501
|
+
props: {
|
|
7502
|
+
keyWord: {},
|
|
7503
|
+
hospitalId: {},
|
|
7504
|
+
userJobCodes: {},
|
|
7505
|
+
bizUnitId: {},
|
|
7506
|
+
userTypeCode: {},
|
|
7507
|
+
multiSelectFlag: {
|
|
7508
|
+
type: Boolean
|
|
7509
|
+
},
|
|
7510
|
+
defaultValue: {}
|
|
7511
|
+
},
|
|
6474
7512
|
emits: [
|
|
6475
7513
|
'change'
|
|
6476
7514
|
],
|
|
6477
|
-
setup (__props, { emit: __emit }) {
|
|
7515
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
7516
|
+
const props = __props;
|
|
7517
|
+
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
6478
7518
|
const emit = __emit;
|
|
6479
|
-
const
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
7519
|
+
const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
7520
|
+
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
7521
|
+
const filterKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(''); // 检索值
|
|
7522
|
+
const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
7523
|
+
const defaultValueInserted = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
7524
|
+
const getUserList = async (data)=>{
|
|
7525
|
+
loading.value = true;
|
|
7526
|
+
const [, res] = await api_queryUserList({
|
|
7527
|
+
...data,
|
|
7528
|
+
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
|
|
7529
|
+
userJobCodes: props.userJobCodes,
|
|
7530
|
+
bizUnitId: props.bizUnitId,
|
|
7531
|
+
userTypeCode: props.userTypeCode,
|
|
7532
|
+
hospitalId: 'all' === props.hospitalId ? void 0 : props.hospitalId,
|
|
7533
|
+
pageNumber: 1,
|
|
7534
|
+
pageSize: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ONE_PAGE_SIZE
|
|
7535
|
+
});
|
|
7536
|
+
loading.value = false;
|
|
7537
|
+
if (res?.success) {
|
|
7538
|
+
let defaultList = [];
|
|
7539
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length) // 兼容表单回显时的默认值缺失
|
|
7540
|
+
defaultList = props.defaultValue.map((item)=>({
|
|
7541
|
+
...item,
|
|
7542
|
+
userId: item.value || item.userId,
|
|
7543
|
+
userName: item.label || item.userName
|
|
7544
|
+
}));
|
|
7545
|
+
let list = (res.data ?? []).map((item)=>({
|
|
7546
|
+
...item,
|
|
7547
|
+
label: item.userName,
|
|
7548
|
+
value: item.userId
|
|
7549
|
+
}));
|
|
7550
|
+
if (defaultList.length) {
|
|
7551
|
+
list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
|
|
7552
|
+
...list,
|
|
7553
|
+
...defaultList
|
|
7554
|
+
], 'orgId');
|
|
7555
|
+
defaultValueInserted.value = true;
|
|
6491
7556
|
}
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
7557
|
+
userList.value = list.map((item)=>({
|
|
7558
|
+
...item,
|
|
7559
|
+
label: item.userNo ? `${item.label || item.userName}|${item.userNo}` : item.label || item.userName
|
|
7560
|
+
}));
|
|
7561
|
+
}
|
|
7562
|
+
};
|
|
7563
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
|
|
7564
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultValueInserted.value) userList.value = [
|
|
7565
|
+
...props.defaultValue
|
|
7566
|
+
];
|
|
7567
|
+
}, {
|
|
7568
|
+
deep: true,
|
|
7569
|
+
immediate: true
|
|
7570
|
+
});
|
|
7571
|
+
const onChange = (value)=>{
|
|
7572
|
+
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
7573
|
+
if (props.multiSelectFlag) emit('change', value);
|
|
7574
|
+
else {
|
|
7575
|
+
const user = userList.value.find((item)=>item.value === value || item.userId === value);
|
|
7576
|
+
emit('change', value, user);
|
|
7577
|
+
}
|
|
7578
|
+
};
|
|
7579
|
+
const handelRemoteMethod = async (value)=>{
|
|
7580
|
+
filterKeyWord.value = value || '';
|
|
7581
|
+
if (!value && userList.value.length) return;
|
|
7582
|
+
try {
|
|
7583
|
+
loading.value = true;
|
|
7584
|
+
await getUserList({
|
|
7585
|
+
keyWord: value
|
|
7586
|
+
});
|
|
7587
|
+
} finally{
|
|
7588
|
+
loading.value = false;
|
|
7589
|
+
}
|
|
6496
7590
|
};
|
|
7591
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7592
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7593
|
+
if (props.keyWord && selectRef.value) {
|
|
7594
|
+
const inputEl = selectRef.value?.$el.querySelector('input');
|
|
7595
|
+
if (inputEl) {
|
|
7596
|
+
inputEl.value = props.keyWord;
|
|
7597
|
+
// 创建 input 事件模拟用户输入
|
|
7598
|
+
const event = new Event('input', {
|
|
7599
|
+
bubbles: true
|
|
7600
|
+
});
|
|
7601
|
+
inputEl.dispatchEvent(event);
|
|
7602
|
+
}
|
|
7603
|
+
}
|
|
7604
|
+
});
|
|
7605
|
+
});
|
|
7606
|
+
__expose({
|
|
7607
|
+
selectRef,
|
|
7608
|
+
defaultValueInserted,
|
|
7609
|
+
userList
|
|
7610
|
+
});
|
|
6497
7611
|
return (_ctx, _cache)=>{
|
|
6498
7612
|
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
6499
7613
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
6500
7614
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
7615
|
+
ref_key: "selectRef",
|
|
7616
|
+
ref: selectRef,
|
|
7617
|
+
remote: "",
|
|
7618
|
+
clearable: "",
|
|
7619
|
+
filterable: "",
|
|
7620
|
+
loading: loading.value,
|
|
7621
|
+
multiple: !!props.multiSelectFlag,
|
|
7622
|
+
"remote-method": handelRemoteMethod,
|
|
7623
|
+
onClear: _cache[0] || (_cache[0] = ($event)=>userList.value = []),
|
|
7624
|
+
onChange: onChange
|
|
6505
7625
|
}, {
|
|
7626
|
+
label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ label })=>[
|
|
7627
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(label?.split('|')?.[0]), 1)
|
|
7628
|
+
]),
|
|
6506
7629
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6507
|
-
((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)(
|
|
6508
|
-
key: item.value,
|
|
6509
|
-
label: item.label,
|
|
6510
|
-
value: item.value
|
|
7630
|
+
((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)(userList.value, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
|
|
7631
|
+
key: item.value || item.userId,
|
|
7632
|
+
label: item.label || item.userName,
|
|
7633
|
+
value: item.value || item.userId
|
|
6511
7634
|
}, null, 8, [
|
|
6512
7635
|
"label",
|
|
6513
7636
|
"value"
|
|
@@ -6515,372 +7638,1246 @@ const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_sel
|
|
|
6515
7638
|
]),
|
|
6516
7639
|
_: 1
|
|
6517
7640
|
}, 8, [
|
|
6518
|
-
"
|
|
7641
|
+
"loading",
|
|
7642
|
+
"multiple"
|
|
6519
7643
|
]);
|
|
6520
7644
|
};
|
|
6521
7645
|
}
|
|
6522
7646
|
});
|
|
6523
|
-
const
|
|
6524
|
-
/* ESM default export */ const
|
|
6525
|
-
|
|
7647
|
+
const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_UserSelect;
|
|
7648
|
+
/* ESM default export */ const user_select = user_select_exports_;
|
|
7649
|
+
/**
|
|
7650
|
+
* [1-10155-1] 根据条件查询业务单元列表
|
|
7651
|
+
* 是否分页 Y
|
|
7652
|
+
* @param params
|
|
7653
|
+
* @returns
|
|
7654
|
+
*/ const queryBizUnitList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryBizUnitListByExample', params);
|
|
7655
|
+
/*
|
|
7656
|
+
96-10014-1 业务单元选择组件
|
|
7657
|
+
1、调用“1-10516-1 根据条件查询业务单元列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询业务单元列表
|
|
7658
|
+
2、展示列包括“组织类型、编码、名称”
|
|
7659
|
+
*/ /* ESM default export */ const biz_unit_selectvue_type_script_setup_true_lang_tsx_name_BizUnitSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
7660
|
+
__name: 'index',
|
|
7661
|
+
props: {
|
|
7662
|
+
keyWord: {},
|
|
7663
|
+
hospitalId: {},
|
|
7664
|
+
orgTypeCodes: {},
|
|
7665
|
+
multiSelectFlag: {
|
|
7666
|
+
type: Boolean
|
|
7667
|
+
},
|
|
7668
|
+
defaultValue: {},
|
|
7669
|
+
encounterTypeCode: {},
|
|
7670
|
+
disabledValueIds: {},
|
|
7671
|
+
deptId: {},
|
|
7672
|
+
tableProps: {},
|
|
7673
|
+
selectProps: {}
|
|
7674
|
+
},
|
|
7675
|
+
emits: [
|
|
7676
|
+
'change'
|
|
7677
|
+
],
|
|
7678
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
7679
|
+
const props = __props;
|
|
7680
|
+
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
7681
|
+
const emit = __emit;
|
|
7682
|
+
const tableProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tableProps || {
|
|
7683
|
+
maxHeight: 260
|
|
7684
|
+
});
|
|
7685
|
+
const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
|
|
7686
|
+
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
|
|
7687
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
7688
|
+
const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
7689
|
+
const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
7690
|
+
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
7691
|
+
const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
7692
|
+
const currentRowIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
|
|
7693
|
+
const clearing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
7694
|
+
const bizUnitList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // 业务单元列表
|
|
7695
|
+
const selectedValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // select组件绑定的选中的值
|
|
7696
|
+
const selectedRows = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // table表格选中的值
|
|
7697
|
+
const defaultSetTableSelected = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false); // 传入的默认数据已经绑定到表格中
|
|
7698
|
+
const initComponentData = ()=>{
|
|
7699
|
+
popoverVisible.value = false;
|
|
7700
|
+
bizUnitList.value = [];
|
|
7701
|
+
selectedValue.value = void 0;
|
|
7702
|
+
selectedRows.value = [];
|
|
7703
|
+
handleChange();
|
|
7704
|
+
};
|
|
7705
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs?.modelValue, (newVal)=>{
|
|
7706
|
+
if (newVal) {
|
|
7707
|
+
if (!props.multiSelectFlag) {
|
|
7708
|
+
const item = bizUnitList.value.find((item)=>item.value === newVal);
|
|
7709
|
+
if (item?.label && selectedValue.value !== item.label) {
|
|
7710
|
+
selectedValue.value = item.label;
|
|
7711
|
+
selectedRows.value = [
|
|
7712
|
+
item
|
|
7713
|
+
];
|
|
7714
|
+
}
|
|
7715
|
+
}
|
|
7716
|
+
} else {
|
|
7717
|
+
selectedValue.value = props.multiSelectFlag ? [] : void 0;
|
|
7718
|
+
selectedRows.value = [];
|
|
7719
|
+
}
|
|
7720
|
+
});
|
|
7721
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>[
|
|
7722
|
+
props.tableProps,
|
|
7723
|
+
props.selectProps
|
|
7724
|
+
], ()=>{
|
|
7725
|
+
tableProps.value = props.tableProps || {
|
|
7726
|
+
maxHeight: 260
|
|
7727
|
+
};
|
|
7728
|
+
selectProps.value = props.selectProps || {};
|
|
7729
|
+
}, {
|
|
7730
|
+
deep: true,
|
|
7731
|
+
immediate: true
|
|
7732
|
+
});
|
|
7733
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
|
|
7734
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultSetTableSelected.value) {
|
|
7735
|
+
const list = props.defaultValue.map((item)=>({
|
|
7736
|
+
...item,
|
|
7737
|
+
orgId: item.value || item.orgId,
|
|
7738
|
+
orgNameDisplay: item.label || item.orgNameDisplay,
|
|
7739
|
+
value: item.value || item.orgId,
|
|
7740
|
+
label: item.label || item.orgNameDisplay
|
|
7741
|
+
}));
|
|
7742
|
+
bizUnitList.value = [
|
|
7743
|
+
...list
|
|
7744
|
+
];
|
|
7745
|
+
}
|
|
7746
|
+
}, {
|
|
7747
|
+
deep: true,
|
|
7748
|
+
immediate: true
|
|
7749
|
+
});
|
|
7750
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.orgTypeCodes, (newVal, oldVal)=>{
|
|
7751
|
+
if (newVal && !(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isEqual)(oldVal, newVal)) initComponentData();
|
|
7752
|
+
});
|
|
7753
|
+
const tableConfig = useColumnConfig({
|
|
7754
|
+
getData: (t)=>[
|
|
7755
|
+
{
|
|
7756
|
+
label: t('global:select'),
|
|
7757
|
+
prop: 'indexNo',
|
|
7758
|
+
type: 'selection',
|
|
7759
|
+
isHidden: !props.multiSelectFlag,
|
|
7760
|
+
selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
|
|
7761
|
+
},
|
|
7762
|
+
{
|
|
7763
|
+
label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
|
|
7764
|
+
prop: 'orgTypeDescDisplay',
|
|
7765
|
+
minWidth: 80
|
|
7766
|
+
},
|
|
7767
|
+
{
|
|
7768
|
+
label: t('bizUnitSelect.table.orgNo', '编码'),
|
|
7769
|
+
prop: 'orgNo',
|
|
7770
|
+
minWidth: 80
|
|
7771
|
+
},
|
|
7772
|
+
{
|
|
7773
|
+
label: t('bizUnitSelect.table.orgNameDisplay', '名称'),
|
|
7774
|
+
prop: 'orgNameDisplay',
|
|
7775
|
+
minWidth: 80
|
|
7776
|
+
}
|
|
7777
|
+
]
|
|
7778
|
+
});
|
|
7779
|
+
const getRowClassName = (data)=>{
|
|
7780
|
+
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
|
|
7781
|
+
return 'cursor-pointer';
|
|
7782
|
+
};
|
|
7783
|
+
const getBizUnitList = async (data)=>{
|
|
7784
|
+
loading.value = true;
|
|
7785
|
+
const [, res] = await queryBizUnitList({
|
|
7786
|
+
...data,
|
|
7787
|
+
hospitalId: props.hospitalId,
|
|
7788
|
+
orgTypeCodes: props.orgTypeCodes,
|
|
7789
|
+
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
|
|
7790
|
+
encounterTypeCode: props.encounterTypeCode,
|
|
7791
|
+
deptId: props.deptId
|
|
7792
|
+
});
|
|
7793
|
+
loading.value = false;
|
|
7794
|
+
if (res?.success) {
|
|
7795
|
+
let defaultList = [];
|
|
7796
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !data?.keyWord) defaultList = props.defaultValue.map((item)=>({
|
|
7797
|
+
...item,
|
|
7798
|
+
orgId: item.value || item.orgId,
|
|
7799
|
+
orgNameDisplay: item.label || item.orgNameDisplay,
|
|
7800
|
+
value: item.value || item.orgId,
|
|
7801
|
+
label: item.label || item.orgNameDisplay
|
|
7802
|
+
}));
|
|
7803
|
+
let list = (res.data ?? []).map((item)=>({
|
|
7804
|
+
...item,
|
|
7805
|
+
label: item.orgNameDisplay,
|
|
7806
|
+
value: item.orgId
|
|
7807
|
+
}));
|
|
7808
|
+
if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
|
|
7809
|
+
...list,
|
|
7810
|
+
...defaultList
|
|
7811
|
+
], 'orgId');
|
|
7812
|
+
bizUnitList.value = list;
|
|
7813
|
+
currentRowIndex.value = -1;
|
|
7814
|
+
tableRef.value?.eleTable?.setCurrentRow?.(void 0);
|
|
7815
|
+
if (bizUnitList.value.length && props.multiSelectFlag && selectedRows.value?.length && !defaultSetTableSelected.value) {
|
|
7816
|
+
const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
|
|
7817
|
+
tableRef.value?.eleTable?.clearSelection();
|
|
7818
|
+
bizUnitList.value.forEach((item)=>{
|
|
7819
|
+
if (list.some((row)=>row.orgId === item.value || row.value === item.value)) tableRef.value?.eleTable?.toggleRowSelection(item, true);
|
|
7820
|
+
});
|
|
7821
|
+
}
|
|
7822
|
+
defaultSetTableSelected.value = true;
|
|
7823
|
+
}
|
|
7824
|
+
};
|
|
7825
|
+
const handleChange = ()=>{
|
|
7826
|
+
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
7827
|
+
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
7828
|
+
if (props.multiSelectFlag) emit('change', value);
|
|
7829
|
+
else {
|
|
7830
|
+
const data = value[0] ? bizUnitList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
7831
|
+
emit('change', value[0], data);
|
|
7832
|
+
}
|
|
7833
|
+
};
|
|
7834
|
+
const handelRemoteMethod = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(value) {
|
|
7835
|
+
await getBizUnitList({
|
|
7836
|
+
keyWord: value
|
|
7837
|
+
});
|
|
7838
|
+
}, 500); // 键盘事件
|
|
7839
|
+
const handleKeydown = (e)=>{
|
|
7840
|
+
if (!bizUnitList.value.length || !popoverVisible.value) return;
|
|
7841
|
+
if ('ArrowDown' === e.key) {
|
|
7842
|
+
e.preventDefault();
|
|
7843
|
+
if (currentRowIndex.value < bizUnitList.value.length - 1) {
|
|
7844
|
+
currentRowIndex.value++;
|
|
7845
|
+
const row = bizUnitList.value[currentRowIndex.value];
|
|
7846
|
+
tableRef.value.eleTable?.setCurrentRow(row);
|
|
7847
|
+
}
|
|
7848
|
+
} else if ('ArrowUp' === e.key) {
|
|
7849
|
+
e.preventDefault();
|
|
7850
|
+
if (currentRowIndex.value > 0) {
|
|
7851
|
+
currentRowIndex.value--;
|
|
7852
|
+
const row = bizUnitList.value[currentRowIndex.value];
|
|
7853
|
+
tableRef.value.eleTable?.setCurrentRow(row);
|
|
7854
|
+
}
|
|
7855
|
+
} else if ('Enter' === e.key && currentRowIndex.value >= 0) {
|
|
7856
|
+
const row = bizUnitList.value[currentRowIndex.value];
|
|
7857
|
+
if (props.multiSelectFlag) tableRef.value.eleTable?.toggleRowSelection(row);
|
|
7858
|
+
else {
|
|
7859
|
+
setTimeout(()=>{
|
|
7860
|
+
selectRef.value?.blur();
|
|
7861
|
+
}, 30);
|
|
7862
|
+
handleTableRowSelect(row);
|
|
7863
|
+
}
|
|
7864
|
+
}
|
|
7865
|
+
};
|
|
7866
|
+
const handleTagRemove = (tag)=>{
|
|
7867
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7868
|
+
if (!selectedRows.value.length) return;
|
|
7869
|
+
const index = selectedRows.value?.findIndex((item)=>item.label === tag);
|
|
7870
|
+
if (-1 !== index) {
|
|
7871
|
+
selectedRows.value.splice(index, 1);
|
|
7872
|
+
const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
|
|
7873
|
+
tableRef.value?.eleTable?.clearSelection();
|
|
7874
|
+
list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true));
|
|
7875
|
+
}
|
|
7876
|
+
});
|
|
7877
|
+
};
|
|
7878
|
+
const handleClear = ()=>{
|
|
7879
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7880
|
+
if (!popoverVisible.value) {
|
|
7881
|
+
clearing.value = true;
|
|
7882
|
+
const inputEl = selectRef.value?.$el?.querySelector('input');
|
|
7883
|
+
if (inputEl) inputEl.blur();
|
|
7884
|
+
}
|
|
7885
|
+
selectedRows.value = [];
|
|
7886
|
+
selectedValue.value = props.multiSelectFlag ? [] : '';
|
|
7887
|
+
tableRef.value?.eleTable?.clearSelection?.();
|
|
7888
|
+
tableRef.value?.eleTable?.setCurrentRow?.(void 0);
|
|
7889
|
+
getBizUnitList();
|
|
7890
|
+
handleChange();
|
|
7891
|
+
});
|
|
7892
|
+
};
|
|
7893
|
+
const handleFocus = ()=>{
|
|
7894
|
+
setTimeout(()=>{
|
|
7895
|
+
if (clearing.value) return;
|
|
7896
|
+
popoverVisible.value = true;
|
|
7897
|
+
}, 100);
|
|
7898
|
+
};
|
|
7899
|
+
const handleBlur = ()=>{
|
|
7900
|
+
if (clearing.value) {
|
|
7901
|
+
setTimeout(()=>{
|
|
7902
|
+
clearing.value = false;
|
|
7903
|
+
}, 150);
|
|
7904
|
+
return;
|
|
7905
|
+
}
|
|
7906
|
+
if (!props.multiSelectFlag) popoverVisible.value = false;
|
|
7907
|
+
};
|
|
7908
|
+
const handleClickOutside = (e)=>{
|
|
7909
|
+
const target = e.target;
|
|
7910
|
+
const selectEl = selectRef.value?.$el;
|
|
7911
|
+
const popoverEl = popoverRef.value?.popperRef?.contentRef;
|
|
7912
|
+
if (!selectEl?.contains(target) && !popoverEl?.contains(target)) popoverVisible.value = false;
|
|
7913
|
+
};
|
|
7914
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
|
|
7915
|
+
if (val) {
|
|
7916
|
+
document.addEventListener('keydown', handleKeydown, true);
|
|
7917
|
+
if (props.multiSelectFlag) document.addEventListener('click', handleClickOutside);
|
|
7918
|
+
} else {
|
|
7919
|
+
document.removeEventListener('keydown', handleKeydown, true);
|
|
7920
|
+
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
7921
|
+
}
|
|
7922
|
+
});
|
|
7923
|
+
const handleTableRowSelect = (data)=>{
|
|
7924
|
+
if (data) {
|
|
7925
|
+
if (props.disabledValueIds?.length && data.orgId && props.disabledValueIds.includes(data.orgId)) {
|
|
7926
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(t('bizUnitSelect.errorTip.disabledRowSelectedTip', '当前数据不可选择!'));
|
|
7927
|
+
return;
|
|
7928
|
+
}
|
|
7929
|
+
}
|
|
7930
|
+
if (props.multiSelectFlag) {
|
|
7931
|
+
tableRef.value?.eleTable?.toggleRowSelection(data);
|
|
7932
|
+
return;
|
|
7933
|
+
}
|
|
7934
|
+
selectedValue.value = data?.label || data?.orgNameDisplay;
|
|
7935
|
+
selectedRows.value = data ? [
|
|
7936
|
+
data
|
|
7937
|
+
] : [];
|
|
7938
|
+
if (data) popoverVisible.value = false;
|
|
7939
|
+
handleChange();
|
|
7940
|
+
};
|
|
7941
|
+
const handleSelectionChange = (items)=>{
|
|
7942
|
+
selectedRows.value = items;
|
|
7943
|
+
selectedValue.value = items.map((row)=>row.label || row.orgNameDisplay);
|
|
7944
|
+
handleChange();
|
|
7945
|
+
};
|
|
7946
|
+
const handlePopoverShow = ()=>{};
|
|
7947
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
7948
|
+
document.removeEventListener('keydown', handleKeydown, true);
|
|
7949
|
+
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
7950
|
+
});
|
|
7951
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7952
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
7953
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
7954
|
+
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgNameDisplay);
|
|
7955
|
+
else {
|
|
7956
|
+
const data = props.defaultValue.find((item)=>item.orgId === attrs.modelValue || item.value === attrs.modelValue);
|
|
7957
|
+
selectedValue.value = data?.label || data?.orgNameDisplay;
|
|
7958
|
+
}
|
|
7959
|
+
selectedRows.value = props.defaultValue;
|
|
7960
|
+
defaultSetTableSelected.value = false;
|
|
7961
|
+
} else {
|
|
7962
|
+
selectedValue.value = props.multiSelectFlag ? [] : void 0;
|
|
7963
|
+
selectedRows.value = [];
|
|
7964
|
+
}
|
|
7965
|
+
if (props.keyWord && selectRef.value) {
|
|
7966
|
+
const inputEl = selectRef.value?.$el.querySelector('input');
|
|
7967
|
+
if (inputEl) {
|
|
7968
|
+
inputEl.value = props.keyWord; // 创建 input 事件模拟用户输入
|
|
7969
|
+
const event = new Event('input', {
|
|
7970
|
+
bubbles: true
|
|
7971
|
+
});
|
|
7972
|
+
inputEl.dispatchEvent(event);
|
|
7973
|
+
}
|
|
7974
|
+
}
|
|
7975
|
+
});
|
|
7976
|
+
});
|
|
7977
|
+
__expose({
|
|
7978
|
+
popoverRef,
|
|
7979
|
+
tableRef,
|
|
7980
|
+
selectRef,
|
|
7981
|
+
popoverVisible,
|
|
7982
|
+
defaultSetTableSelected,
|
|
7983
|
+
bizUnitList
|
|
7984
|
+
});
|
|
7985
|
+
return (_ctx, _cache)=>{
|
|
7986
|
+
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
7987
|
+
const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
|
|
7988
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
7989
|
+
onKeydown: handleKeydown
|
|
7990
|
+
}, [
|
|
7991
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_popover, {
|
|
7992
|
+
visible: popoverVisible.value,
|
|
7993
|
+
ref_key: "popoverRef",
|
|
7994
|
+
ref: popoverRef,
|
|
7995
|
+
width: "1000",
|
|
7996
|
+
trigger: "click",
|
|
7997
|
+
placement: "bottom",
|
|
7998
|
+
onShow: handlePopoverShow
|
|
7999
|
+
}, {
|
|
8000
|
+
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
8001
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_select, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8002
|
+
ref_key: "selectRef",
|
|
8003
|
+
ref: selectRef,
|
|
8004
|
+
modelValue: selectedValue.value,
|
|
8005
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectedValue.value = $event),
|
|
8006
|
+
placeholder: _ctx.$t('bizUnitSelect.placeholder', '请选择组织'),
|
|
8007
|
+
"collapse-tags": !!props.multiSelectFlag,
|
|
8008
|
+
remote: "",
|
|
8009
|
+
clearable: "",
|
|
8010
|
+
filterable: "",
|
|
8011
|
+
"remote-show-suffix": "",
|
|
8012
|
+
"collapse-tags-tooltip": "",
|
|
8013
|
+
teleported: !popoverVisible.value,
|
|
8014
|
+
"remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
|
|
8015
|
+
multiple: !!props.multiSelectFlag,
|
|
8016
|
+
options: [],
|
|
8017
|
+
"popper-class": popoverVisible.value ? 'hidden' : '',
|
|
8018
|
+
onRemoveTag: handleTagRemove,
|
|
8019
|
+
onFocus: handleFocus,
|
|
8020
|
+
onBlur: handleBlur,
|
|
8021
|
+
onClear: handleClear
|
|
8022
|
+
}, selectProps.value), null, 16, [
|
|
8023
|
+
"modelValue",
|
|
8024
|
+
"placeholder",
|
|
8025
|
+
"collapse-tags",
|
|
8026
|
+
"teleported",
|
|
8027
|
+
"remote-method",
|
|
8028
|
+
"multiple",
|
|
8029
|
+
"popper-class"
|
|
8030
|
+
])
|
|
8031
|
+
]),
|
|
8032
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
8033
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
|
|
8034
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
8035
|
+
height: `${tableProps.value.maxHeight || 260}px`
|
|
8036
|
+
}),
|
|
8037
|
+
class: "w-full overflow-hidden"
|
|
8038
|
+
}, [
|
|
8039
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8040
|
+
style: {
|
|
8041
|
+
height: "100%"
|
|
8042
|
+
},
|
|
8043
|
+
ref_key: "tableRef",
|
|
8044
|
+
ref: tableRef,
|
|
8045
|
+
"row-key": "orgId",
|
|
8046
|
+
data: bizUnitList.value,
|
|
8047
|
+
loading: loading.value,
|
|
8048
|
+
"highlight-current-row": "",
|
|
8049
|
+
columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
|
|
8050
|
+
"row-class-name": getRowClassName,
|
|
8051
|
+
onRowClick: handleTableRowSelect,
|
|
8052
|
+
onSelectionChange: handleSelectionChange
|
|
8053
|
+
}, tableProps.value), null, 16, [
|
|
8054
|
+
"data",
|
|
8055
|
+
"loading",
|
|
8056
|
+
"columns"
|
|
8057
|
+
])
|
|
8058
|
+
], 4)
|
|
8059
|
+
]),
|
|
8060
|
+
_: 1
|
|
8061
|
+
}, 8, [
|
|
8062
|
+
"visible"
|
|
8063
|
+
])
|
|
8064
|
+
], 32);
|
|
8065
|
+
};
|
|
8066
|
+
}
|
|
8067
|
+
});
|
|
8068
|
+
const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_tsx_name_BizUnitSelect;
|
|
8069
|
+
/* ESM default export */ const biz_unit_select = biz_unit_select_exports_;
|
|
8070
|
+
/**
|
|
8071
|
+
* [1-10154-1] 根据条件查询科室列表(平铺)
|
|
8072
|
+
* 是否分页 N
|
|
8073
|
+
* @param params
|
|
8074
|
+
* @returns
|
|
8075
|
+
*/ const queryDepartmentList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryDepartmentListByExample', params);
|
|
8076
|
+
/*
|
|
8077
|
+
96-10012-1 科室选择组件
|
|
8078
|
+
1、调用“1-10154-1 根据条件查询科室列表(平铺)”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询科室列表
|
|
8079
|
+
2、展示列包括“编码、名称、科室类型”"
|
|
8080
|
+
*/ /* ESM default export */ const department_selectvue_type_script_setup_true_lang_tsx_name_DepartmentSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
6526
8081
|
__name: 'index',
|
|
8082
|
+
props: {
|
|
8083
|
+
keyWord: {},
|
|
8084
|
+
hospitalId: {},
|
|
8085
|
+
deptTypeCodes: {},
|
|
8086
|
+
encounterTypeCode: {},
|
|
8087
|
+
multiSelectFlag: {
|
|
8088
|
+
type: Boolean
|
|
8089
|
+
},
|
|
8090
|
+
defaultValue: {},
|
|
8091
|
+
disabledValueIds: {},
|
|
8092
|
+
tableProps: {},
|
|
8093
|
+
selectProps: {}
|
|
8094
|
+
},
|
|
6527
8095
|
emits: [
|
|
6528
8096
|
'change'
|
|
6529
8097
|
],
|
|
6530
|
-
setup (__props, { emit: __emit }) {
|
|
6531
|
-
const
|
|
6532
|
-
use_app_config_MAIN_APP_CONFIG.CURRENT_ORG,
|
|
6533
|
-
use_app_config_MAIN_APP_CONFIG.HOSPITAL_LIST
|
|
6534
|
-
]);
|
|
6535
|
-
const isDisabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL);
|
|
8098
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
8099
|
+
const props = __props;
|
|
6536
8100
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
6537
|
-
const emit = __emit;
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
6547
|
-
|
|
6548
|
-
|
|
8101
|
+
const emit = __emit;
|
|
8102
|
+
const tableProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tableProps || {
|
|
8103
|
+
maxHeight: 260
|
|
8104
|
+
});
|
|
8105
|
+
const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
|
|
8106
|
+
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
|
|
8107
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
8108
|
+
const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
8109
|
+
const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
8110
|
+
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
8111
|
+
const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
8112
|
+
const currentRowIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
|
|
8113
|
+
const clearing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
8114
|
+
const departmentList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // 科室列表
|
|
8115
|
+
const selectedValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // select组件绑定的选中的值
|
|
8116
|
+
const selectedRows = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // table表格选中的值
|
|
8117
|
+
const defaultSetTableSelected = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false); // 传入的默认数据已经绑定到表格中
|
|
8118
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs?.modelValue, (newVal)=>{
|
|
8119
|
+
if (newVal) {
|
|
8120
|
+
if (!props.multiSelectFlag) {
|
|
8121
|
+
const item = departmentList.value.find((item)=>item.value === newVal);
|
|
8122
|
+
if (item?.label && selectedValue.value !== item.label) {
|
|
8123
|
+
selectedValue.value = item.label;
|
|
8124
|
+
selectedRows.value = [
|
|
8125
|
+
item
|
|
8126
|
+
];
|
|
8127
|
+
}
|
|
8128
|
+
}
|
|
8129
|
+
} else {
|
|
8130
|
+
selectedValue.value = props.multiSelectFlag ? [] : void 0;
|
|
8131
|
+
selectedRows.value = [];
|
|
8132
|
+
}
|
|
8133
|
+
});
|
|
8134
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>[
|
|
8135
|
+
props.tableProps,
|
|
8136
|
+
props.selectProps
|
|
8137
|
+
], ()=>{
|
|
8138
|
+
tableProps.value = props.tableProps || {
|
|
8139
|
+
maxHeight: 260
|
|
8140
|
+
};
|
|
8141
|
+
selectProps.value = props.selectProps || {};
|
|
8142
|
+
}, {
|
|
8143
|
+
deep: true,
|
|
8144
|
+
immediate: true
|
|
8145
|
+
});
|
|
8146
|
+
const tableConfig = useColumnConfig({
|
|
8147
|
+
getData: (t)=>[
|
|
8148
|
+
{
|
|
8149
|
+
label: t('global:select'),
|
|
8150
|
+
prop: 'indexNo',
|
|
8151
|
+
type: 'selection',
|
|
8152
|
+
isHidden: !props.multiSelectFlag,
|
|
8153
|
+
selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
|
|
8154
|
+
},
|
|
8155
|
+
{
|
|
8156
|
+
label: t('departmentSelect.table.orgNo', '科室编码'),
|
|
8157
|
+
prop: 'orgNo',
|
|
8158
|
+
minWidth: 80
|
|
8159
|
+
},
|
|
8160
|
+
{
|
|
8161
|
+
label: t('departmentSelect.table.orgName', '科室名称'),
|
|
8162
|
+
prop: 'orgName',
|
|
8163
|
+
minWidth: 80
|
|
8164
|
+
},
|
|
8165
|
+
{
|
|
8166
|
+
label: t('departmentSelect.table.deptTypeDesc', '科室类型'),
|
|
8167
|
+
prop: 'deptTypeDesc',
|
|
8168
|
+
minWidth: 80
|
|
8169
|
+
}
|
|
8170
|
+
]
|
|
8171
|
+
});
|
|
8172
|
+
const getRowClassName = (data)=>{
|
|
8173
|
+
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
|
|
8174
|
+
return 'cursor-pointer';
|
|
8175
|
+
};
|
|
8176
|
+
const getDepartmentList = async (data)=>{
|
|
8177
|
+
loading.value = true;
|
|
8178
|
+
const [, res] = await queryDepartmentList({
|
|
8179
|
+
...data,
|
|
8180
|
+
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
|
|
8181
|
+
deptTypeCodes: props.deptTypeCodes,
|
|
8182
|
+
encounterTypeCode: props.encounterTypeCode,
|
|
8183
|
+
hospitalId: props.hospitalId
|
|
8184
|
+
});
|
|
8185
|
+
loading.value = false;
|
|
8186
|
+
if (res?.success) {
|
|
8187
|
+
let defaultList = [];
|
|
8188
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !data?.keyWord) defaultList = props.defaultValue.map((item)=>({
|
|
8189
|
+
...item,
|
|
8190
|
+
orgId: item.value || item.orgId,
|
|
8191
|
+
orgName: item.label || item.orgName,
|
|
8192
|
+
value: item.value || item.orgId,
|
|
8193
|
+
label: item.label || item.orgName
|
|
8194
|
+
}));
|
|
8195
|
+
let list = (res.data ?? []).map((item)=>({
|
|
8196
|
+
...item,
|
|
8197
|
+
label: item.orgName,
|
|
8198
|
+
value: item.orgId
|
|
8199
|
+
}));
|
|
8200
|
+
if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
|
|
8201
|
+
...list,
|
|
8202
|
+
...defaultList
|
|
8203
|
+
], 'orgId');
|
|
8204
|
+
departmentList.value = list;
|
|
8205
|
+
currentRowIndex.value = -1;
|
|
8206
|
+
tableRef.value?.eleTable?.setCurrentRow?.(void 0);
|
|
8207
|
+
if (departmentList.value.length && props.multiSelectFlag && selectedRows.value?.length && !defaultSetTableSelected.value) {
|
|
8208
|
+
const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
|
|
8209
|
+
tableRef.value?.eleTable?.clearSelection();
|
|
8210
|
+
departmentList.value.forEach((item)=>{
|
|
8211
|
+
if (list.some((row)=>row.orgId === item.value || row.value === item.value)) tableRef.value?.eleTable?.toggleRowSelection(item, true);
|
|
8212
|
+
});
|
|
8213
|
+
}
|
|
8214
|
+
defaultSetTableSelected.value = true;
|
|
8215
|
+
}
|
|
8216
|
+
};
|
|
8217
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
|
|
8218
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultSetTableSelected.value) {
|
|
8219
|
+
const list = props.defaultValue.map((item)=>({
|
|
8220
|
+
...item,
|
|
8221
|
+
orgId: item.value || item.orgId,
|
|
8222
|
+
orgName: item.label || item.orgName,
|
|
8223
|
+
value: item.value || item.orgId,
|
|
8224
|
+
label: item.label || item.orgName
|
|
8225
|
+
}));
|
|
8226
|
+
departmentList.value = [
|
|
8227
|
+
...list
|
|
8228
|
+
];
|
|
8229
|
+
}
|
|
8230
|
+
}, {
|
|
8231
|
+
deep: true,
|
|
8232
|
+
immediate: true
|
|
8233
|
+
});
|
|
8234
|
+
const handleChange = ()=>{
|
|
8235
|
+
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
8236
|
+
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
8237
|
+
if (props.multiSelectFlag) emit('change', value);
|
|
8238
|
+
else {
|
|
8239
|
+
const data = value[0] ? departmentList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
8240
|
+
emit('change', value[0], data);
|
|
8241
|
+
}
|
|
8242
|
+
};
|
|
8243
|
+
const handelRemoteMethod = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(value) {
|
|
8244
|
+
await getDepartmentList({
|
|
8245
|
+
keyWord: value
|
|
8246
|
+
});
|
|
8247
|
+
}, 500); // 键盘事件
|
|
8248
|
+
const handleKeydown = (e)=>{
|
|
8249
|
+
if (!departmentList.value.length || !popoverVisible.value) return;
|
|
8250
|
+
if ('ArrowDown' === e.key) {
|
|
8251
|
+
e.preventDefault();
|
|
8252
|
+
if (currentRowIndex.value < departmentList.value.length - 1) {
|
|
8253
|
+
currentRowIndex.value++;
|
|
8254
|
+
const row = departmentList.value[currentRowIndex.value];
|
|
8255
|
+
tableRef.value.eleTable?.setCurrentRow(row);
|
|
8256
|
+
}
|
|
8257
|
+
} else if ('ArrowUp' === e.key) {
|
|
8258
|
+
e.preventDefault();
|
|
8259
|
+
if (currentRowIndex.value > 0) {
|
|
8260
|
+
currentRowIndex.value--;
|
|
8261
|
+
const row = departmentList.value[currentRowIndex.value];
|
|
8262
|
+
tableRef.value.eleTable?.setCurrentRow(row);
|
|
8263
|
+
}
|
|
8264
|
+
} else if ('Enter' === e.key && currentRowIndex.value >= 0) {
|
|
8265
|
+
const row = departmentList.value[currentRowIndex.value];
|
|
8266
|
+
if (props.multiSelectFlag) tableRef.value.eleTable?.toggleRowSelection(row);
|
|
6549
8267
|
else {
|
|
6550
|
-
|
|
6551
|
-
|
|
8268
|
+
setTimeout(()=>{
|
|
8269
|
+
selectRef.value?.blur();
|
|
8270
|
+
}, 30);
|
|
8271
|
+
handleTableRowSelect(row);
|
|
6552
8272
|
}
|
|
6553
|
-
}
|
|
6554
|
-
|
|
8273
|
+
}
|
|
8274
|
+
};
|
|
8275
|
+
const handleTagRemove = (tag)=>{
|
|
8276
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8277
|
+
if (!selectedRows.value.length) return;
|
|
8278
|
+
const index = selectedRows.value?.findIndex((item)=>item.label === tag);
|
|
8279
|
+
if (-1 !== index) {
|
|
8280
|
+
selectedRows.value.splice(index, 1);
|
|
8281
|
+
const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
|
|
8282
|
+
tableRef.value?.eleTable?.clearSelection();
|
|
8283
|
+
list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true));
|
|
8284
|
+
}
|
|
8285
|
+
});
|
|
8286
|
+
};
|
|
8287
|
+
const handleClear = ()=>{
|
|
8288
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8289
|
+
if (!popoverVisible.value) {
|
|
8290
|
+
clearing.value = true;
|
|
8291
|
+
const inputEl = selectRef.value?.$el?.querySelector('input');
|
|
8292
|
+
if (inputEl) inputEl.blur();
|
|
8293
|
+
}
|
|
8294
|
+
selectedRows.value = [];
|
|
8295
|
+
selectedValue.value = props.multiSelectFlag ? [] : '';
|
|
8296
|
+
tableRef.value?.eleTable?.clearSelection?.();
|
|
8297
|
+
tableRef.value?.eleTable?.setCurrentRow?.(void 0);
|
|
8298
|
+
getDepartmentList();
|
|
8299
|
+
handleChange();
|
|
6555
8300
|
});
|
|
8301
|
+
};
|
|
8302
|
+
const handleFocus = ()=>{
|
|
8303
|
+
setTimeout(()=>{
|
|
8304
|
+
if (clearing.value) return;
|
|
8305
|
+
popoverVisible.value = true;
|
|
8306
|
+
}, 100);
|
|
8307
|
+
};
|
|
8308
|
+
const handleBlur = ()=>{
|
|
8309
|
+
if (clearing.value) {
|
|
8310
|
+
setTimeout(()=>{
|
|
8311
|
+
clearing.value = false;
|
|
8312
|
+
}, 150);
|
|
8313
|
+
return;
|
|
8314
|
+
}
|
|
8315
|
+
if (!props.multiSelectFlag) popoverVisible.value = false;
|
|
8316
|
+
};
|
|
8317
|
+
const handleClickOutside = (e)=>{
|
|
8318
|
+
const target = e.target;
|
|
8319
|
+
const selectEl = selectRef.value?.$el;
|
|
8320
|
+
const popoverEl = popoverRef.value?.popperRef?.contentRef;
|
|
8321
|
+
if (!selectEl?.contains(target) && !popoverEl?.contains(target)) popoverVisible.value = false;
|
|
8322
|
+
};
|
|
8323
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
|
|
8324
|
+
if (val) {
|
|
8325
|
+
document.addEventListener('keydown', handleKeydown, true);
|
|
8326
|
+
if (props.multiSelectFlag) document.addEventListener('click', handleClickOutside);
|
|
8327
|
+
} else {
|
|
8328
|
+
document.removeEventListener('keydown', handleKeydown, true);
|
|
8329
|
+
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8330
|
+
}
|
|
6556
8331
|
});
|
|
8332
|
+
const handleTableRowSelect = (data)=>{
|
|
8333
|
+
if (data) {
|
|
8334
|
+
if (props.disabledValueIds?.length && data.orgId && props.disabledValueIds.includes(data.orgId)) {
|
|
8335
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(t('departmentSelect.errorTip.disabledRowSelectedTip', '当前数据不可选择!'));
|
|
8336
|
+
return;
|
|
8337
|
+
}
|
|
8338
|
+
}
|
|
8339
|
+
if (props.multiSelectFlag) {
|
|
8340
|
+
tableRef.value?.eleTable?.toggleRowSelection(data);
|
|
8341
|
+
return;
|
|
8342
|
+
}
|
|
8343
|
+
selectedValue.value = data?.label || data?.orgName;
|
|
8344
|
+
selectedRows.value = data ? [
|
|
8345
|
+
data
|
|
8346
|
+
] : [];
|
|
8347
|
+
if (data) popoverVisible.value = false;
|
|
8348
|
+
handleChange();
|
|
8349
|
+
};
|
|
8350
|
+
const handleSelectionChange = (items)=>{
|
|
8351
|
+
selectedRows.value = items;
|
|
8352
|
+
selectedValue.value = items.map((row)=>row.label || row.orgName);
|
|
8353
|
+
handleChange();
|
|
8354
|
+
};
|
|
8355
|
+
const handlePopoverShow = ()=>{};
|
|
6557
8356
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
6558
|
-
|
|
8357
|
+
document.removeEventListener('keydown', handleKeydown, true);
|
|
8358
|
+
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8359
|
+
});
|
|
8360
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
8361
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8362
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
8363
|
+
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
|
|
8364
|
+
else {
|
|
8365
|
+
const data = props.defaultValue.find((item)=>item.orgId === attrs.modelValue || item.value === attrs.modelValue);
|
|
8366
|
+
selectedValue.value = data?.label || data?.orgName;
|
|
8367
|
+
}
|
|
8368
|
+
selectedRows.value = props.defaultValue;
|
|
8369
|
+
defaultSetTableSelected.value = false;
|
|
8370
|
+
} else {
|
|
8371
|
+
selectedValue.value = props.multiSelectFlag ? [] : void 0;
|
|
8372
|
+
selectedRows.value = [];
|
|
8373
|
+
}
|
|
8374
|
+
if (props.keyWord && selectRef.value) {
|
|
8375
|
+
const inputEl = selectRef.value?.$el.querySelector('input');
|
|
8376
|
+
if (inputEl) {
|
|
8377
|
+
inputEl.value = props.keyWord; // 创建 input 事件模拟用户输入
|
|
8378
|
+
const event = new Event('input', {
|
|
8379
|
+
bubbles: true
|
|
8380
|
+
});
|
|
8381
|
+
inputEl.dispatchEvent(event);
|
|
8382
|
+
}
|
|
8383
|
+
}
|
|
8384
|
+
});
|
|
8385
|
+
});
|
|
8386
|
+
__expose({
|
|
8387
|
+
popoverRef,
|
|
8388
|
+
tableRef,
|
|
8389
|
+
selectRef,
|
|
8390
|
+
popoverVisible,
|
|
8391
|
+
defaultSetTableSelected,
|
|
8392
|
+
departmentList
|
|
6559
8393
|
});
|
|
6560
8394
|
return (_ctx, _cache)=>{
|
|
6561
|
-
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
6562
8395
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
8396
|
+
const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
|
|
8397
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
8398
|
+
onKeydown: handleKeydown
|
|
8399
|
+
}, [
|
|
8400
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_popover, {
|
|
8401
|
+
visible: popoverVisible.value,
|
|
8402
|
+
ref_key: "popoverRef",
|
|
8403
|
+
ref: popoverRef,
|
|
8404
|
+
width: "1000",
|
|
8405
|
+
trigger: "click",
|
|
8406
|
+
placement: "bottom",
|
|
8407
|
+
onShow: handlePopoverShow
|
|
8408
|
+
}, {
|
|
8409
|
+
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
8410
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_select, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8411
|
+
ref_key: "selectRef",
|
|
8412
|
+
ref: selectRef,
|
|
8413
|
+
modelValue: selectedValue.value,
|
|
8414
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectedValue.value = $event),
|
|
8415
|
+
placeholder: _ctx.$t('departmentSelect.placeholder', '请选择科室'),
|
|
8416
|
+
"collapse-tags": !!props.multiSelectFlag,
|
|
8417
|
+
remote: "",
|
|
8418
|
+
clearable: "",
|
|
8419
|
+
filterable: "",
|
|
8420
|
+
"remote-show-suffix": "",
|
|
8421
|
+
"collapse-tags-tooltip": "",
|
|
8422
|
+
teleported: !popoverVisible.value,
|
|
8423
|
+
"remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
|
|
8424
|
+
multiple: !!props.multiSelectFlag,
|
|
8425
|
+
options: [],
|
|
8426
|
+
"popper-class": popoverVisible.value ? 'hidden' : '',
|
|
8427
|
+
onRemoveTag: handleTagRemove,
|
|
8428
|
+
onFocus: handleFocus,
|
|
8429
|
+
onBlur: handleBlur,
|
|
8430
|
+
onClear: handleClear
|
|
8431
|
+
}, selectProps.value), null, 16, [
|
|
8432
|
+
"modelValue",
|
|
8433
|
+
"placeholder",
|
|
8434
|
+
"collapse-tags",
|
|
8435
|
+
"teleported",
|
|
8436
|
+
"remote-method",
|
|
8437
|
+
"multiple",
|
|
8438
|
+
"popper-class"
|
|
8439
|
+
])
|
|
8440
|
+
]),
|
|
8441
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
8442
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
|
|
8443
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
8444
|
+
height: `${tableProps.value.maxHeight || 260}px`
|
|
8445
|
+
}),
|
|
8446
|
+
class: "w-full overflow-hidden"
|
|
8447
|
+
}, [
|
|
8448
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8449
|
+
style: {
|
|
8450
|
+
height: "100%"
|
|
8451
|
+
},
|
|
8452
|
+
loading: loading.value,
|
|
8453
|
+
ref_key: "tableRef",
|
|
8454
|
+
ref: tableRef,
|
|
8455
|
+
"row-key": "orgId",
|
|
8456
|
+
"highlight-current-row": "",
|
|
8457
|
+
columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
|
|
8458
|
+
data: departmentList.value,
|
|
8459
|
+
onRowClick: handleTableRowSelect,
|
|
8460
|
+
"row-class-name": getRowClassName,
|
|
8461
|
+
onSelectionChange: handleSelectionChange
|
|
8462
|
+
}, tableProps.value), null, 16, [
|
|
8463
|
+
"loading",
|
|
8464
|
+
"columns",
|
|
8465
|
+
"data"
|
|
8466
|
+
])
|
|
8467
|
+
], 4)
|
|
8468
|
+
]),
|
|
8469
|
+
_: 1
|
|
8470
|
+
}, 8, [
|
|
8471
|
+
"visible"
|
|
8472
|
+
])
|
|
8473
|
+
], 32);
|
|
6582
8474
|
};
|
|
6583
8475
|
}
|
|
6584
8476
|
});
|
|
6585
|
-
const
|
|
6586
|
-
/* ESM default export */ const
|
|
8477
|
+
const department_select_exports_ = department_selectvue_type_script_setup_true_lang_tsx_name_DepartmentSelect;
|
|
8478
|
+
/* ESM default export */ const department_select = department_select_exports_;
|
|
6587
8479
|
/**
|
|
6588
|
-
* [1-
|
|
8480
|
+
* [1-10155-1] 根据条件查询病区列表
|
|
8481
|
+
* 是否分页 N
|
|
6589
8482
|
* @param params
|
|
6590
8483
|
* @returns
|
|
6591
|
-
*/ const
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
const
|
|
6597
|
-
/* ESM default export */ const tag_selectvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
8484
|
+
*/ const queryWardList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryWardListByExample', params);
|
|
8485
|
+
/*
|
|
8486
|
+
96-10013-1 病区选择组件
|
|
8487
|
+
1、调用“1-10155-1 根据条件查询病区列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室标识”查询病区列表
|
|
8488
|
+
2、展示列包括“编码、名称”
|
|
8489
|
+
*/ /* ESM default export */ const ward_selectvue_type_script_setup_true_lang_tsx_name_WardSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
6598
8490
|
__name: 'index',
|
|
6599
8491
|
props: {
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
8492
|
+
keyWord: {},
|
|
8493
|
+
hospitalId: {},
|
|
8494
|
+
deptId: {},
|
|
8495
|
+
multiSelectFlag: {
|
|
6603
8496
|
type: Boolean
|
|
6604
|
-
}
|
|
8497
|
+
},
|
|
8498
|
+
defaultValue: {},
|
|
8499
|
+
disabledValueIds: {},
|
|
8500
|
+
tableProps: {},
|
|
8501
|
+
selectProps: {}
|
|
6605
8502
|
},
|
|
6606
8503
|
emits: [
|
|
6607
8504
|
'change'
|
|
6608
8505
|
],
|
|
6609
|
-
setup (__props, { emit: __emit }) {
|
|
6610
|
-
const emit = __emit;
|
|
6611
|
-
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
6612
|
-
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
|
|
8506
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
6613
8507
|
const props = __props;
|
|
6614
|
-
const
|
|
6615
|
-
const
|
|
6616
|
-
const
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
const
|
|
6620
|
-
const
|
|
6621
|
-
|
|
6622
|
-
const
|
|
6623
|
-
|
|
6624
|
-
const
|
|
6625
|
-
|
|
6626
|
-
const
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
8508
|
+
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
8509
|
+
const emit = __emit;
|
|
8510
|
+
const tableProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tableProps || {
|
|
8511
|
+
maxHeight: 260
|
|
8512
|
+
});
|
|
8513
|
+
const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
|
|
8514
|
+
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
|
|
8515
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
8516
|
+
const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
8517
|
+
const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
8518
|
+
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
8519
|
+
const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
8520
|
+
const currentRowIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
|
|
8521
|
+
const clearing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
8522
|
+
const wardList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // 病区列表
|
|
8523
|
+
const selectedValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // select组件绑定的选中的值
|
|
8524
|
+
const selectedRows = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // table表格选中的值
|
|
8525
|
+
const defaultSetTableSelected = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false); // 传入的默认数据已经绑定到表格中
|
|
8526
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs?.modelValue, (newVal)=>{
|
|
8527
|
+
if (newVal) {
|
|
8528
|
+
if (!props.multiSelectFlag) {
|
|
8529
|
+
const item = wardList.value.find((item)=>item.value === newVal);
|
|
8530
|
+
if (item?.label && selectedValue.value !== item.label) {
|
|
8531
|
+
selectedValue.value = item.label;
|
|
8532
|
+
selectedRows.value = [
|
|
8533
|
+
item
|
|
8534
|
+
];
|
|
8535
|
+
}
|
|
8536
|
+
}
|
|
8537
|
+
} else {
|
|
8538
|
+
selectedValue.value = props.multiSelectFlag ? [] : void 0;
|
|
8539
|
+
selectedRows.value = [];
|
|
8540
|
+
}
|
|
8541
|
+
});
|
|
8542
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>[
|
|
8543
|
+
props.tableProps,
|
|
8544
|
+
props.selectProps
|
|
8545
|
+
], ()=>{
|
|
8546
|
+
tableProps.value = props.tableProps || {
|
|
8547
|
+
maxHeight: 260
|
|
8548
|
+
};
|
|
8549
|
+
selectProps.value = props.selectProps || {};
|
|
8550
|
+
}, {
|
|
8551
|
+
deep: true,
|
|
8552
|
+
immediate: true
|
|
8553
|
+
});
|
|
8554
|
+
const tableConfig = useColumnConfig({
|
|
8555
|
+
getData: (t)=>[
|
|
8556
|
+
{
|
|
8557
|
+
label: t('global:select'),
|
|
8558
|
+
prop: 'indexNo',
|
|
8559
|
+
type: 'selection',
|
|
8560
|
+
isHidden: !props.multiSelectFlag,
|
|
8561
|
+
selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
|
|
8562
|
+
},
|
|
8563
|
+
{
|
|
8564
|
+
label: t('wardSelect.table.orgNo', '病区编码'),
|
|
8565
|
+
prop: 'orgNo',
|
|
8566
|
+
minWidth: 80
|
|
8567
|
+
},
|
|
8568
|
+
{
|
|
8569
|
+
label: t('wardSelect.table.orgName', '病区名称'),
|
|
8570
|
+
prop: 'orgName',
|
|
8571
|
+
minWidth: 80
|
|
8572
|
+
}
|
|
8573
|
+
]
|
|
8574
|
+
});
|
|
8575
|
+
const getRowClassName = (data)=>{
|
|
8576
|
+
if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
|
|
8577
|
+
return 'cursor-pointer';
|
|
8578
|
+
};
|
|
8579
|
+
const getWardList = async (data)=>{
|
|
8580
|
+
loading.value = true;
|
|
8581
|
+
const [, res] = await queryWardList({
|
|
8582
|
+
...data,
|
|
8583
|
+
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
|
|
8584
|
+
deptId: props.deptId,
|
|
8585
|
+
hospitalId: props.hospitalId
|
|
6632
8586
|
});
|
|
6633
|
-
|
|
8587
|
+
loading.value = false;
|
|
8588
|
+
if (res?.success) {
|
|
8589
|
+
let defaultList = [];
|
|
8590
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !data?.keyWord) defaultList = props.defaultValue.map((item)=>({
|
|
8591
|
+
...item,
|
|
8592
|
+
orgId: item.value || item.orgId,
|
|
8593
|
+
orgName: item.label || item.orgName,
|
|
8594
|
+
value: item.value || item.orgId,
|
|
8595
|
+
label: item.label || item.orgName
|
|
8596
|
+
}));
|
|
8597
|
+
let list = (res.data ?? []).map((item)=>({
|
|
8598
|
+
...item,
|
|
8599
|
+
label: item.orgName,
|
|
8600
|
+
value: item.orgId
|
|
8601
|
+
}));
|
|
8602
|
+
if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
|
|
8603
|
+
...list,
|
|
8604
|
+
...defaultList
|
|
8605
|
+
], 'orgId');
|
|
8606
|
+
wardList.value = list;
|
|
8607
|
+
currentRowIndex.value = -1;
|
|
8608
|
+
tableRef.value?.eleTable?.setCurrentRow?.(void 0);
|
|
8609
|
+
if (wardList.value.length && props.multiSelectFlag && selectedRows.value?.length && !defaultSetTableSelected.value) {
|
|
8610
|
+
const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
|
|
8611
|
+
tableRef.value?.eleTable?.clearSelection();
|
|
8612
|
+
wardList.value.forEach((item)=>{
|
|
8613
|
+
if (list.some((row)=>row.orgId === item.value || row.value === item.value)) tableRef.value?.eleTable?.toggleRowSelection(item, true);
|
|
8614
|
+
});
|
|
8615
|
+
}
|
|
8616
|
+
defaultSetTableSelected.value = true;
|
|
8617
|
+
}
|
|
8618
|
+
};
|
|
8619
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
|
|
8620
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultSetTableSelected.value) {
|
|
8621
|
+
const list = props.defaultValue.map((item)=>({
|
|
8622
|
+
...item,
|
|
8623
|
+
orgId: item.value || item.orgId,
|
|
8624
|
+
orgName: item.label || item.orgName,
|
|
8625
|
+
value: item.value || item.orgId,
|
|
8626
|
+
label: item.label || item.orgName
|
|
8627
|
+
}));
|
|
8628
|
+
wardList.value = [
|
|
8629
|
+
...list
|
|
8630
|
+
];
|
|
8631
|
+
}
|
|
8632
|
+
}, {
|
|
8633
|
+
deep: true,
|
|
8634
|
+
immediate: true
|
|
6634
8635
|
});
|
|
6635
|
-
const
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
return;
|
|
8636
|
+
const handleChange = ()=>{
|
|
8637
|
+
let value = selectedRows.value.map((item)=>item.value || item.orgId);
|
|
8638
|
+
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
|
|
8639
|
+
if (props.multiSelectFlag) emit('change', value);
|
|
8640
|
+
else {
|
|
8641
|
+
const data = value[0] ? wardList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
|
|
8642
|
+
emit('change', value[0], data);
|
|
6643
8643
|
}
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
tagContainer.style.position = 'absolute';
|
|
6649
|
-
tagContainer.style.visibility = 'hidden';
|
|
6650
|
-
document.body.appendChild(tagContainer);
|
|
6651
|
-
const vnode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
|
|
6652
|
-
closable: !props.disabled,
|
|
6653
|
-
size: 'large',
|
|
6654
|
-
disableTransitions: true,
|
|
6655
|
-
class: 'mr-4'
|
|
6656
|
-
}, ()=>allTagsMap.value.get(item) || item);
|
|
6657
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(vnode, tagContainer);
|
|
6658
|
-
const width = tagContainer.firstElementChild?.getBoundingClientRect().width || 0;
|
|
6659
|
-
document.body.removeChild(tagContainer);
|
|
6660
|
-
return width + getRemValue(TAG_MARGIN);
|
|
8644
|
+
};
|
|
8645
|
+
const handelRemoteMethod = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(value) {
|
|
8646
|
+
await getWardList({
|
|
8647
|
+
keyWord: value
|
|
6661
8648
|
});
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
8649
|
+
}, 500); // 键盘事件
|
|
8650
|
+
const handleKeydown = (e)=>{
|
|
8651
|
+
if (!wardList.value.length || !popoverVisible.value) return;
|
|
8652
|
+
if ('ArrowDown' === e.key) {
|
|
8653
|
+
e.preventDefault();
|
|
8654
|
+
if (currentRowIndex.value < wardList.value.length - 1) {
|
|
8655
|
+
currentRowIndex.value++;
|
|
8656
|
+
const row = wardList.value[currentRowIndex.value];
|
|
8657
|
+
tableRef.value.eleTable?.setCurrentRow(row);
|
|
8658
|
+
}
|
|
8659
|
+
} else if ('ArrowUp' === e.key) {
|
|
8660
|
+
e.preventDefault();
|
|
8661
|
+
if (currentRowIndex.value > 0) {
|
|
8662
|
+
currentRowIndex.value--;
|
|
8663
|
+
const row = wardList.value[currentRowIndex.value];
|
|
8664
|
+
tableRef.value.eleTable?.setCurrentRow(row);
|
|
8665
|
+
}
|
|
8666
|
+
} else if ('Enter' === e.key && currentRowIndex.value >= 0) {
|
|
8667
|
+
const row = wardList.value[currentRowIndex.value];
|
|
8668
|
+
if (props.multiSelectFlag) tableRef.value.eleTable?.toggleRowSelection(row);
|
|
8669
|
+
else {
|
|
8670
|
+
setTimeout(()=>{
|
|
8671
|
+
selectRef.value?.blur();
|
|
8672
|
+
}, 30);
|
|
8673
|
+
handleTableRowSelect(row);
|
|
8674
|
+
}
|
|
6669
8675
|
}
|
|
6670
|
-
// 如果放不下所有标签,需要显示更多按钮
|
|
6671
|
-
const availableWidthWithMore = availableWidth - getRemValue(MORE_BUTTON_WIDTH);
|
|
6672
|
-
// 计算可以显示多少个标签
|
|
6673
|
-
let currentWidth = 0;
|
|
6674
|
-
let count = 0;
|
|
6675
|
-
for (const width of tagWidths)if (currentWidth + width <= availableWidthWithMore) {
|
|
6676
|
-
currentWidth += width;
|
|
6677
|
-
count++;
|
|
6678
|
-
} else break;
|
|
6679
|
-
realMaxNum.value = count;
|
|
6680
8676
|
};
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
const
|
|
6685
|
-
|
|
6686
|
-
|
|
8677
|
+
const handleTagRemove = (tag)=>{
|
|
8678
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8679
|
+
if (!selectedRows.value.length) return;
|
|
8680
|
+
const index = selectedRows.value?.findIndex((item)=>item.label === tag);
|
|
8681
|
+
if (-1 !== index) {
|
|
8682
|
+
selectedRows.value.splice(index, 1);
|
|
8683
|
+
const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
|
|
8684
|
+
tableRef.value?.eleTable?.clearSelection();
|
|
8685
|
+
list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true));
|
|
8686
|
+
}
|
|
8687
|
+
});
|
|
6687
8688
|
};
|
|
6688
|
-
const
|
|
6689
|
-
selectVisible.value = true;
|
|
8689
|
+
const handleClear = ()=>{
|
|
6690
8690
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
6691
|
-
|
|
8691
|
+
if (!popoverVisible.value) {
|
|
8692
|
+
clearing.value = true;
|
|
8693
|
+
const inputEl = selectRef.value?.$el?.querySelector('input');
|
|
8694
|
+
if (inputEl) inputEl.blur();
|
|
8695
|
+
}
|
|
8696
|
+
selectedRows.value = [];
|
|
8697
|
+
selectedValue.value = props.multiSelectFlag ? [] : '';
|
|
8698
|
+
tableRef.value?.eleTable?.clearSelection?.();
|
|
8699
|
+
tableRef.value?.eleTable?.setCurrentRow?.(void 0);
|
|
8700
|
+
getWardList();
|
|
8701
|
+
handleChange();
|
|
6692
8702
|
});
|
|
6693
8703
|
};
|
|
6694
|
-
const
|
|
6695
|
-
|
|
6696
|
-
|
|
8704
|
+
const handleFocus = ()=>{
|
|
8705
|
+
setTimeout(()=>{
|
|
8706
|
+
if (clearing.value) return;
|
|
8707
|
+
popoverVisible.value = true;
|
|
8708
|
+
}, 100);
|
|
8709
|
+
};
|
|
8710
|
+
const handleBlur = ()=>{
|
|
8711
|
+
if (clearing.value) {
|
|
8712
|
+
setTimeout(()=>{
|
|
8713
|
+
clearing.value = false;
|
|
8714
|
+
}, 150);
|
|
6697
8715
|
return;
|
|
6698
8716
|
}
|
|
6699
|
-
|
|
6700
|
-
attrs.modelValue
|
|
6701
|
-
] : [];
|
|
6702
|
-
change([
|
|
6703
|
-
...currentValues,
|
|
6704
|
-
selectValue.value
|
|
6705
|
-
]);
|
|
6706
|
-
selectValue.value = '';
|
|
6707
|
-
selectVisible.value = false;
|
|
8717
|
+
if (!props.multiSelectFlag) popoverVisible.value = false;
|
|
6708
8718
|
};
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
8719
|
+
const handleClickOutside = (e)=>{
|
|
8720
|
+
const target = e.target;
|
|
8721
|
+
const selectEl = selectRef.value?.$el;
|
|
8722
|
+
const popoverEl = popoverRef.value?.popperRef?.contentRef;
|
|
8723
|
+
if (!selectEl?.contains(target) && !popoverEl?.contains(target)) popoverVisible.value = false;
|
|
8724
|
+
};
|
|
8725
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
|
|
8726
|
+
if (val) {
|
|
8727
|
+
document.addEventListener('keydown', handleKeydown, true);
|
|
8728
|
+
if (props.multiSelectFlag) document.addEventListener('click', handleClickOutside);
|
|
8729
|
+
} else {
|
|
8730
|
+
document.removeEventListener('keydown', handleKeydown, true);
|
|
8731
|
+
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
6720
8732
|
}
|
|
6721
|
-
}
|
|
6722
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
6723
|
-
fetchData();
|
|
6724
|
-
// 等待所有标签渲染完成
|
|
6725
8733
|
});
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
8734
|
+
const handleTableRowSelect = (data)=>{
|
|
8735
|
+
if (data) {
|
|
8736
|
+
if (props.disabledValueIds?.length && data.orgId && props.disabledValueIds.includes(data.orgId)) {
|
|
8737
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(t('wardSelect.errorTip.disabledRowSelectedTip', '当前数据不可选择!'));
|
|
8738
|
+
return;
|
|
8739
|
+
}
|
|
8740
|
+
}
|
|
8741
|
+
if (props.multiSelectFlag) {
|
|
8742
|
+
tableRef.value?.eleTable?.toggleRowSelection(data);
|
|
8743
|
+
return;
|
|
6733
8744
|
}
|
|
8745
|
+
selectedValue.value = data?.label || data?.orgName;
|
|
8746
|
+
selectedRows.value = data ? [
|
|
8747
|
+
data
|
|
8748
|
+
] : [];
|
|
8749
|
+
if (data) popoverVisible.value = false;
|
|
8750
|
+
handleChange();
|
|
8751
|
+
};
|
|
8752
|
+
const handleSelectionChange = (items)=>{
|
|
8753
|
+
selectedRows.value = items;
|
|
8754
|
+
selectedValue.value = items.map((row)=>row.label || row.orgName);
|
|
8755
|
+
handleChange();
|
|
8756
|
+
};
|
|
8757
|
+
const handlePopoverShow = ()=>{};
|
|
8758
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
8759
|
+
document.removeEventListener('keydown', handleKeydown, true);
|
|
8760
|
+
if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
|
|
8761
|
+
});
|
|
8762
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
8763
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
8764
|
+
if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
|
|
8765
|
+
if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
|
|
8766
|
+
else {
|
|
8767
|
+
const data = props.defaultValue.find((item)=>item.orgId === attrs.modelValue || item.value === attrs.modelValue);
|
|
8768
|
+
selectedValue.value = data?.label || data?.orgName;
|
|
8769
|
+
}
|
|
8770
|
+
selectedRows.value = props.defaultValue;
|
|
8771
|
+
defaultSetTableSelected.value = false;
|
|
8772
|
+
} else {
|
|
8773
|
+
selectedValue.value = props.multiSelectFlag ? [] : void 0;
|
|
8774
|
+
selectedRows.value = [];
|
|
8775
|
+
}
|
|
8776
|
+
if (props.keyWord && selectRef.value) {
|
|
8777
|
+
const inputEl = selectRef.value?.$el.querySelector('input');
|
|
8778
|
+
if (inputEl) {
|
|
8779
|
+
inputEl.value = props.keyWord; // 创建 input 事件模拟用户输入
|
|
8780
|
+
const event = new Event('input', {
|
|
8781
|
+
bubbles: true
|
|
8782
|
+
});
|
|
8783
|
+
inputEl.dispatchEvent(event);
|
|
8784
|
+
}
|
|
8785
|
+
}
|
|
8786
|
+
});
|
|
8787
|
+
});
|
|
8788
|
+
__expose({
|
|
8789
|
+
popoverRef,
|
|
8790
|
+
tableRef,
|
|
8791
|
+
selectRef,
|
|
8792
|
+
popoverVisible,
|
|
8793
|
+
defaultSetTableSelected,
|
|
8794
|
+
wardList
|
|
6734
8795
|
});
|
|
6735
|
-
/**
|
|
6736
|
-
*
|
|
6737
|
-
* @param value 下拉框选择
|
|
6738
|
-
*/ function change(value) {
|
|
6739
|
-
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
6740
|
-
emit('change', value);
|
|
6741
|
-
}
|
|
6742
8796
|
return (_ctx, _cache)=>{
|
|
6743
|
-
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
6744
|
-
const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
|
|
6745
|
-
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
6746
|
-
const _component_el_option_group = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option-group");
|
|
6747
8797
|
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
8798
|
+
const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
|
|
6748
8799
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
6749
|
-
|
|
6750
|
-
ref: containerRef,
|
|
6751
|
-
class: "w-full"
|
|
8800
|
+
onKeydown: handleKeydown
|
|
6752
8801
|
}, [
|
|
6753
|
-
(
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
'mr-4'
|
|
6760
|
-
]),
|
|
6761
|
-
size: "large",
|
|
6762
|
-
"disable-transitions": true,
|
|
6763
|
-
onClose: ($event)=>handleClose(item)
|
|
6764
|
-
}, {
|
|
6765
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6766
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item) || item), 1)
|
|
6767
|
-
]),
|
|
6768
|
-
_: 2
|
|
6769
|
-
}, 1032, [
|
|
6770
|
-
"closable",
|
|
6771
|
-
"onClose"
|
|
6772
|
-
]))), 128)),
|
|
6773
|
-
(Array.isArray((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue) ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue ? [
|
|
6774
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
|
|
6775
|
-
] : []).length > realMaxNum.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_popover, {
|
|
6776
|
-
key: 0,
|
|
8802
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_popover, {
|
|
8803
|
+
visible: popoverVisible.value,
|
|
8804
|
+
ref_key: "popoverRef",
|
|
8805
|
+
ref: popoverRef,
|
|
8806
|
+
width: "1000",
|
|
8807
|
+
trigger: "click",
|
|
6777
8808
|
placement: "bottom",
|
|
6778
|
-
|
|
8809
|
+
onShow: handlePopoverShow
|
|
6779
8810
|
}, {
|
|
6780
8811
|
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6781
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(
|
|
6782
|
-
ref_key: "
|
|
6783
|
-
ref:
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
]),
|
|
6811
|
-
_: 2
|
|
6812
|
-
}, 1032, [
|
|
6813
|
-
"closable",
|
|
6814
|
-
"onClose"
|
|
6815
|
-
]))), 128))
|
|
8812
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_select, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8813
|
+
ref_key: "selectRef",
|
|
8814
|
+
ref: selectRef,
|
|
8815
|
+
modelValue: selectedValue.value,
|
|
8816
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectedValue.value = $event),
|
|
8817
|
+
"collapse-tags": !!props.multiSelectFlag,
|
|
8818
|
+
placeholder: _ctx.$t('wardSelect.placeholder', '请选择病区'),
|
|
8819
|
+
remote: "",
|
|
8820
|
+
clearable: "",
|
|
8821
|
+
filterable: "",
|
|
8822
|
+
"remote-show-suffix": "",
|
|
8823
|
+
"collapse-tags-tooltip": "",
|
|
8824
|
+
teleported: !popoverVisible.value,
|
|
8825
|
+
"remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
|
|
8826
|
+
multiple: !!props.multiSelectFlag,
|
|
8827
|
+
options: [],
|
|
8828
|
+
"popper-class": popoverVisible.value ? 'hidden' : '',
|
|
8829
|
+
onRemoveTag: handleTagRemove,
|
|
8830
|
+
onFocus: handleFocus,
|
|
8831
|
+
onBlur: handleBlur,
|
|
8832
|
+
onClear: handleClear
|
|
8833
|
+
}, selectProps.value), null, 16, [
|
|
8834
|
+
"modelValue",
|
|
8835
|
+
"collapse-tags",
|
|
8836
|
+
"placeholder",
|
|
8837
|
+
"teleported",
|
|
8838
|
+
"remote-method",
|
|
8839
|
+
"multiple",
|
|
8840
|
+
"popper-class"
|
|
6816
8841
|
])
|
|
6817
8842
|
]),
|
|
6818
|
-
_: 1
|
|
6819
|
-
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
6820
|
-
selectVisible.value && !props.disabled ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
6821
|
-
key: 1,
|
|
6822
|
-
ref_key: "SelectRef",
|
|
6823
|
-
ref: SelectRef,
|
|
6824
|
-
modelValue: selectValue.value,
|
|
6825
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectValue.value = $event),
|
|
6826
|
-
class: "w-60",
|
|
6827
|
-
filterable: "",
|
|
6828
|
-
placeholder: _ctx.$t('tagManage.range.select.bizId', '请选择'),
|
|
6829
|
-
onChange: handleSelectConfirm,
|
|
6830
|
-
onBlur: handleSelectConfirm
|
|
6831
|
-
}, {
|
|
6832
8843
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6833
|
-
(
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
8844
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
|
|
8845
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
8846
|
+
height: `${tableProps.value.maxHeight || 260}px`
|
|
8847
|
+
}),
|
|
8848
|
+
class: "w-full overflow-hidden"
|
|
8849
|
+
}, [
|
|
8850
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8851
|
+
style: {
|
|
8852
|
+
height: "100%"
|
|
8853
|
+
},
|
|
8854
|
+
ref_key: "tableRef",
|
|
8855
|
+
ref: tableRef,
|
|
8856
|
+
loading: loading.value,
|
|
8857
|
+
"row-key": "orgId",
|
|
8858
|
+
data: wardList.value,
|
|
8859
|
+
"highlight-current-row": "",
|
|
8860
|
+
columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
|
|
8861
|
+
"row-class-name": getRowClassName,
|
|
8862
|
+
onRowClick: handleTableRowSelect,
|
|
8863
|
+
onSelectionChange: handleSelectionChange
|
|
8864
|
+
}, tableProps.value), null, 16, [
|
|
8865
|
+
"loading",
|
|
8866
|
+
"data",
|
|
8867
|
+
"columns"
|
|
8868
|
+
])
|
|
8869
|
+
], 4)
|
|
6855
8870
|
]),
|
|
6856
8871
|
_: 1
|
|
6857
8872
|
}, 8, [
|
|
6858
|
-
"
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
selectVisible.value || props.disabled ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_button, {
|
|
6862
|
-
key: 2,
|
|
6863
|
-
style: {
|
|
6864
|
-
"margin-left": "0"
|
|
6865
|
-
},
|
|
6866
|
-
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)({
|
|
6867
|
-
'pointer-events-none': props.disabled
|
|
6868
|
-
}),
|
|
6869
|
-
onClick: showSelect
|
|
6870
|
-
}, {
|
|
6871
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[1] || (_cache[1] = [
|
|
6872
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" + ")
|
|
6873
|
-
])),
|
|
6874
|
-
_: 1
|
|
6875
|
-
}, 8, [
|
|
6876
|
-
"class"
|
|
6877
|
-
]))
|
|
6878
|
-
], 512);
|
|
8873
|
+
"visible"
|
|
8874
|
+
])
|
|
8875
|
+
], 32);
|
|
6879
8876
|
};
|
|
6880
8877
|
}
|
|
6881
8878
|
});
|
|
6882
|
-
const
|
|
6883
|
-
/* ESM default export */ const
|
|
8879
|
+
const ward_select_exports_ = ward_selectvue_type_script_setup_true_lang_tsx_name_WardSelect;
|
|
8880
|
+
/* ESM default export */ const ward_select = ward_select_exports_;
|
|
6884
8881
|
const FormUnitvue_type_script_setup_true_lang_ts_name_formUnit_hoisted_1 = {
|
|
6885
8882
|
key: 1,
|
|
6886
8883
|
class: "overflow-hidden"
|
|
@@ -6955,17 +8952,37 @@ const DICT_SELECT = 'dictSelect';
|
|
|
6955
8952
|
}, {
|
|
6956
8953
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
6957
8954
|
bizIdTypeCode: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.bizIdTypeCode
|
|
6958
|
-
}), null, 16)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component
|
|
8955
|
+
}), 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__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
6959
8956
|
key: 4
|
|
8957
|
+
}, {
|
|
8958
|
+
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8959
|
+
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8960
|
+
})), 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__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8961
|
+
key: 5
|
|
8962
|
+
}, {
|
|
8963
|
+
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8964
|
+
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8965
|
+
})), 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__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8966
|
+
key: 6
|
|
8967
|
+
}, {
|
|
8968
|
+
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8969
|
+
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8970
|
+
})), 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__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8971
|
+
key: 7
|
|
8972
|
+
}, {
|
|
8973
|
+
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
|
|
8974
|
+
hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
|
|
8975
|
+
})), 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)({
|
|
8976
|
+
key: 8
|
|
6960
8977
|
}, {
|
|
6961
8978
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs)
|
|
6962
8979
|
})), null, 16)) : 'flagSelect' === (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)(flag_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
6963
|
-
key:
|
|
8980
|
+
key: 9,
|
|
6964
8981
|
clearable: ""
|
|
6965
8982
|
}, {
|
|
6966
8983
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs)
|
|
6967
8984
|
}), null, 16)) : 'checkbox' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component || 'checkbox-group' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component || 'radio-group' === (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__.resolveDynamicComponent)(`el-${(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component}`), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
6968
|
-
key:
|
|
8985
|
+
key: 10,
|
|
6969
8986
|
ref_key: "componentRef",
|
|
6970
8987
|
ref: componentRef,
|
|
6971
8988
|
clearable: ""
|
|
@@ -6975,7 +8992,7 @@ const DICT_SELECT = 'dictSelect';
|
|
|
6975
8992
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6976
8993
|
'radio-group' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
6977
8994
|
key: 0
|
|
6978
|
-
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).options, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)('el-radio'), {
|
|
8995
|
+
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).options, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)(__WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.radioComponent || 'el-radio'), {
|
|
6979
8996
|
key: item.value,
|
|
6980
8997
|
value: item.value
|
|
6981
8998
|
}, {
|
|
@@ -7007,7 +9024,7 @@ const DICT_SELECT = 'dictSelect';
|
|
|
7007
9024
|
]),
|
|
7008
9025
|
_: 1
|
|
7009
9026
|
}, 16)) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)(`el-${(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component}`), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
7010
|
-
key:
|
|
9027
|
+
key: 11,
|
|
7011
9028
|
ref_key: "componentRef",
|
|
7012
9029
|
ref: componentRef,
|
|
7013
9030
|
clearable: ""
|
|
@@ -7104,7 +9121,8 @@ const WB_NO = "wbNo";
|
|
|
7104
9121
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7105
9122
|
((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)(configData.value, (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
7106
9123
|
key: item.name + index,
|
|
7107
|
-
class: item.span || item.isFullWidth ? item.isFullWidth ? 'col-span-full' : `... col-span-${item.span}` : isInlineMode ? 'inline-block' : ''
|
|
9124
|
+
class: item.span || item.isFullWidth ? item.isFullWidth ? 'col-span-full' : `... col-span-${item.span}` : isInlineMode ? 'inline-block' : ''
|
|
9125
|
+
}, {
|
|
7108
9126
|
ref_for: true
|
|
7109
9127
|
}, item.formItemProps || {}), [
|
|
7110
9128
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_form_item, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
@@ -7112,7 +9130,8 @@ const WB_NO = "wbNo";
|
|
|
7112
9130
|
label: 'function' == typeof item.label ? '' : item.label,
|
|
7113
9131
|
prop: item.name,
|
|
7114
9132
|
class: item.className,
|
|
7115
|
-
style: isInlineMode ? 'margin-right: 16px;' : ''
|
|
9133
|
+
style: isInlineMode ? 'margin-right: 16px;' : ''
|
|
9134
|
+
}, {
|
|
7116
9135
|
ref_for: true
|
|
7117
9136
|
}, item.formItemProps || {}), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
7118
9137
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -7122,7 +9141,8 @@ const WB_NO = "wbNo";
|
|
|
7122
9141
|
type: item.type,
|
|
7123
9142
|
"support-copy-and-tips": item.supportCopyAndTips,
|
|
7124
9143
|
placeholder: item.placeholder,
|
|
7125
|
-
options: item.options
|
|
9144
|
+
options: item.options
|
|
9145
|
+
}, {
|
|
7126
9146
|
ref_for: true
|
|
7127
9147
|
}, item.extraProps || {}, {
|
|
7128
9148
|
modelValue: formModel[item.name],
|
|
@@ -7153,6 +9173,8 @@ const WB_NO = "wbNo";
|
|
|
7153
9173
|
ref_for: true,
|
|
7154
9174
|
ref_key: "itemRefs",
|
|
7155
9175
|
ref: itemRefs
|
|
9176
|
+
}, {
|
|
9177
|
+
ref_for: true
|
|
7156
9178
|
}, item.extraProps || {}, {
|
|
7157
9179
|
modelValue: formModel[item.name],
|
|
7158
9180
|
"onUpdate:modelValue": ($event)=>formModel[item.name] = $event,
|
|
@@ -7195,9 +9217,12 @@ const WB_NO = "wbNo";
|
|
|
7195
9217
|
})
|
|
7196
9218
|
}, {
|
|
7197
9219
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[1] || (_cache[1] = [
|
|
7198
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("查询")
|
|
9220
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("查询", -1)
|
|
7199
9221
|
])),
|
|
7200
|
-
_: 1
|
|
9222
|
+
_: 1,
|
|
9223
|
+
__: [
|
|
9224
|
+
1
|
|
9225
|
+
]
|
|
7201
9226
|
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
7202
9227
|
])
|
|
7203
9228
|
]),
|
|
@@ -7293,7 +9318,9 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
7293
9318
|
};
|
|
7294
9319
|
/** 提交 */ const confirmFn = async ()=>{
|
|
7295
9320
|
const isValid = await formRef.value.ref.validate();
|
|
9321
|
+
const isEndNo = updateModel.value?.currentNo === modelValue.value?.currentNo && modelValue.value?.currentNo === modelValue.value?.endNo;
|
|
7296
9322
|
if (!isValid) return [];
|
|
9323
|
+
if (isEndNo) __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error("无可用票号,无法修改");
|
|
7297
9324
|
const params = {
|
|
7298
9325
|
invoiceAllotId: originData.value?.invoiceAllotId,
|
|
7299
9326
|
currentNo: updateModel.value?.currentNo,
|
|
@@ -7366,10 +9393,10 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
7366
9393
|
const updateCurrentNo_exports_ = updateCurrentNovue_type_script_setup_true_lang_ts_name_updateDialog;
|
|
7367
9394
|
/* ESM default export */ const composables_updateCurrentNo = updateCurrentNo_exports_;
|
|
7368
9395
|
const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_1 = {
|
|
7369
|
-
class: "absolute left-[11px] top-2.5 -translate-x-1/2 -translate-y-1/2 rotate-[-42deg] bg-
|
|
9396
|
+
class: "absolute left-[11px] top-2.5 -translate-x-1/2 -translate-y-1/2 rotate-[-42deg] bg-primary px-10 text-sm text-white scale-[0.8]"
|
|
7370
9397
|
};
|
|
7371
9398
|
const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_2 = {
|
|
7372
|
-
class: "flex items-center justify-between min-w-[200px] text-
|
|
9399
|
+
class: "flex items-center justify-between min-w-[200px] text-primary"
|
|
7373
9400
|
};
|
|
7374
9401
|
const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_3 = {
|
|
7375
9402
|
class: "pl-3"
|
|
@@ -7506,14 +9533,17 @@ const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_4 = {
|
|
|
7506
9533
|
}, {
|
|
7507
9534
|
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7508
9535
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
|
|
7509
|
-
class: "relative overflow-hidden bg-
|
|
9536
|
+
class: "relative overflow-hidden bg-primary-light rounded",
|
|
7510
9537
|
onClick: handleShow,
|
|
7511
9538
|
ref_key: "popoverRef",
|
|
7512
9539
|
ref: popoverRef
|
|
7513
9540
|
}, [
|
|
7514
9541
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_1, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(currentRow.value?.invoiceMediaTypeDesc ?? "--"), 1),
|
|
7515
9542
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
|
|
7516
|
-
class: "
|
|
9543
|
+
class: "bg-primary-light",
|
|
9544
|
+
style: {
|
|
9545
|
+
"border-color": "var(--el-color-primary)"
|
|
9546
|
+
}
|
|
7517
9547
|
}, {
|
|
7518
9548
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7519
9549
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_2, [
|
|
@@ -7891,13 +9921,15 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
7891
9921
|
emits: [
|
|
7892
9922
|
"searchChange",
|
|
7893
9923
|
"invoiceChange",
|
|
7894
|
-
"clear"
|
|
9924
|
+
"clear",
|
|
9925
|
+
"avatarClick"
|
|
7895
9926
|
],
|
|
7896
9927
|
setup (__props, { expose: __expose, emit: __emit }) {
|
|
7897
9928
|
const emit = __emit;
|
|
7898
9929
|
const searchRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
7899
9930
|
const bannerRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
7900
9931
|
const invoiceRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
9932
|
+
const oldPatientInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
7901
9933
|
/** searchCode */ const searchCode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
7902
9934
|
if (__props.searchConfig?.code) return __props.searchConfig.code;
|
|
7903
9935
|
if (__props.code) {
|
|
@@ -7912,6 +9944,8 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
7912
9944
|
return false;
|
|
7913
9945
|
});
|
|
7914
9946
|
/** 检索方法 */ const handleSearchChange = async (data)=>{
|
|
9947
|
+
if ((0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isEqual)(oldPatientInfo.value, data)) bannerRef.value?.refresh();
|
|
9948
|
+
oldPatientInfo.value = data;
|
|
7915
9949
|
emit("searchChange", data);
|
|
7916
9950
|
};
|
|
7917
9951
|
/** 新患者按钮 */ const clearFn = async ()=>{
|
|
@@ -7928,6 +9962,7 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
7928
9962
|
});
|
|
7929
9963
|
return (_ctx, _cache)=>{
|
|
7930
9964
|
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
9965
|
+
const _directive_shortcut = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("shortcut");
|
|
7931
9966
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_1, [
|
|
7932
9967
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_2, [
|
|
7933
9968
|
searchCode.value && _ctx.menuId ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(patient_access), {
|
|
@@ -7942,9 +9977,25 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
7942
9977
|
"code"
|
|
7943
9978
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
7944
9979
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3, [
|
|
9980
|
+
_ctx.clearBtn ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_button, {
|
|
9981
|
+
key: 0,
|
|
9982
|
+
type: "primary",
|
|
9983
|
+
plain: "",
|
|
9984
|
+
onClick: clearFn
|
|
9985
|
+
}, {
|
|
9986
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
9987
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.btnTitle), 1)
|
|
9988
|
+
]),
|
|
9989
|
+
_: 1
|
|
9990
|
+
})), [
|
|
9991
|
+
[
|
|
9992
|
+
_directive_shortcut,
|
|
9993
|
+
'Alt+N'
|
|
9994
|
+
]
|
|
9995
|
+
]) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
7945
9996
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default"),
|
|
7946
9997
|
_ctx.invoiceConfig ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(invoice), {
|
|
7947
|
-
key:
|
|
9998
|
+
key: 1,
|
|
7948
9999
|
ref_key: "invoiceRef",
|
|
7949
10000
|
ref: invoiceRef,
|
|
7950
10001
|
"menu-id": _ctx.menuId,
|
|
@@ -7953,18 +10004,7 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
7953
10004
|
}, null, 8, [
|
|
7954
10005
|
"menu-id",
|
|
7955
10006
|
"invoice-usage-code"
|
|
7956
|
-
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
7957
|
-
_ctx.clearBtn ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_button, {
|
|
7958
|
-
key: 1,
|
|
7959
|
-
type: "primary",
|
|
7960
|
-
plain: "",
|
|
7961
|
-
onClick: clearFn
|
|
7962
|
-
}, {
|
|
7963
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7964
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.btnTitle), 1)
|
|
7965
|
-
]),
|
|
7966
|
-
_: 1
|
|
7967
|
-
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
10007
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
7968
10008
|
])
|
|
7969
10009
|
]),
|
|
7970
10010
|
_ctx.showBanner && bannerCode.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(BannerInfo), {
|
|
@@ -7972,7 +10012,8 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
7972
10012
|
ref_key: "bannerRef",
|
|
7973
10013
|
ref: bannerRef,
|
|
7974
10014
|
code: bannerCode.value,
|
|
7975
|
-
"biz-id": _ctx.bannerConfig?.bizId
|
|
10015
|
+
"biz-id": _ctx.bannerConfig?.bizId,
|
|
10016
|
+
onAvatarClick: _cache[0] || (_cache[0] = ($event)=>emit('avatarClick'))
|
|
7976
10017
|
}, null, 8, [
|
|
7977
10018
|
"code",
|
|
7978
10019
|
"biz-id"
|
|
@@ -8009,14 +10050,14 @@ const access_info_exports_ = access_infovue_type_script_setup_true_lang_ts_name_
|
|
|
8009
10050
|
default: false
|
|
8010
10051
|
},
|
|
8011
10052
|
title: {
|
|
8012
|
-
default:
|
|
10053
|
+
default: "DML"
|
|
8013
10054
|
},
|
|
8014
10055
|
mode: {
|
|
8015
10056
|
default: ()=>"dict"
|
|
8016
10057
|
}
|
|
8017
10058
|
},
|
|
8018
10059
|
emits: [
|
|
8019
|
-
|
|
10060
|
+
"success"
|
|
8020
10061
|
],
|
|
8021
10062
|
setup (__props, { emit: __emit }) {
|
|
8022
10063
|
const emits = __emit;
|
|
@@ -8024,10 +10065,10 @@ const access_info_exports_ = access_infovue_type_script_setup_true_lang_ts_name_
|
|
|
8024
10065
|
use_app_config_MAIN_APP_CONFIG.IS_CLOUD_ENV
|
|
8025
10066
|
]);
|
|
8026
10067
|
function useGetDMLList() {
|
|
8027
|
-
const dataSetList =
|
|
8028
|
-
|
|
10068
|
+
const dataSetList = use_fetch_dataset([
|
|
10069
|
+
"HBI000.4001"
|
|
8029
10070
|
]);
|
|
8030
|
-
const dmlList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>(dataSetList?.value?.[
|
|
10071
|
+
const dmlList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>(dataSetList?.value?.["HBI000.4001"] || []).map((item)=>({
|
|
8031
10072
|
value: item.dataValueNo,
|
|
8032
10073
|
label: item.dataValueCnName
|
|
8033
10074
|
})));
|
|
@@ -8048,8 +10089,8 @@ const access_info_exports_ = access_infovue_type_script_setup_true_lang_ts_name_
|
|
|
8048
10089
|
const [, res] = await ("dict" === __props.mode ? exportDmlScriptByExample(params) : exportMdmDmlScriptByExample(params));
|
|
8049
10090
|
if (res?.success) {
|
|
8050
10091
|
(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.downloadFile)(res?.data);
|
|
8051
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(
|
|
8052
|
-
emits(
|
|
10092
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success("导出成功");
|
|
10093
|
+
emits("success");
|
|
8053
10094
|
}
|
|
8054
10095
|
}
|
|
8055
10096
|
return (_ctx, _cache)=>{
|
|
@@ -8781,9 +10822,12 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
8781
10822
|
onClick: cancel
|
|
8782
10823
|
}, {
|
|
8783
10824
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[0] || (_cache[0] = [
|
|
8784
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
|
|
10825
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消", -1)
|
|
8785
10826
|
])),
|
|
8786
|
-
_: 1
|
|
10827
|
+
_: 1,
|
|
10828
|
+
__: [
|
|
10829
|
+
0
|
|
10830
|
+
]
|
|
8787
10831
|
}),
|
|
8788
10832
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
|
|
8789
10833
|
disabled: submitLoading.value || props.propsLoading,
|
|
@@ -8792,9 +10836,12 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
8792
10836
|
type: "primary"
|
|
8793
10837
|
}, {
|
|
8794
10838
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[1] || (_cache[1] = [
|
|
8795
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 保存 ")
|
|
10839
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 保存 ", -1)
|
|
8796
10840
|
])),
|
|
8797
|
-
_: 1
|
|
10841
|
+
_: 1,
|
|
10842
|
+
__: [
|
|
10843
|
+
1
|
|
10844
|
+
]
|
|
8798
10845
|
}, 8, [
|
|
8799
10846
|
"disabled",
|
|
8800
10847
|
"loading"
|
|
@@ -8811,17 +10858,5 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
|
|
|
8811
10858
|
]
|
|
8812
10859
|
]);
|
|
8813
10860
|
/* ESM default export */ const form_design_render = form_design_render_exports_;
|
|
8814
|
-
/** 获取系统时间 */ async function getSystemTime() {
|
|
8815
|
-
const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)("/dictCommon/getSysTime");
|
|
8816
|
-
if (res?.success) return res.data;
|
|
8817
|
-
return (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)();
|
|
8818
|
-
}
|
|
8819
|
-
/** 获取系统时间 */ function useFetchSystemTiem() {
|
|
8820
|
-
const time = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
8821
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount)(()=>{
|
|
8822
|
-
getSystemTime().then((val)=>time.value = val);
|
|
8823
|
-
});
|
|
8824
|
-
return time;
|
|
8825
|
-
}
|
|
8826
10861
|
/** components **/ /** hooks ** */ var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
|
|
8827
|
-
export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, tag_select as TagSelect, Title, convertToSpellNo, convertToWbNo, debounce, decimalCount, formatDecimalNumber, getSystemTime, isNumber, print, queryDataSetByCodeSystemCodes, use_app_config as useAppConfigData, useColumnConfig, useDataChangeDetector, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset,
|
|
10862
|
+
export { utils_AVATAR_TYPE_CODE as AVATAR_TYPE_CODE, access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, biz_unit_select as BizUnitSelect, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, department_select as DepartmentSelect, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_avatar as ProAvatar, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, tag_select as TagSelect, Title, user_select as UserSelect, ward_select as WardSelect, convertToSpellNo, convertToWbNo, debounce, decimalCount, formatDecimalNumber, getSystemTime, isNumber, print, queryDataSetByCodeSystemCodes, queryParamListByNos, use_app_config as useAppConfigData, useColumnConfig, useDataChangeDetector, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFetchParams, useFetchSystemTime, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|