sun-biz 0.0.4-beta.9 → 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.
@@ -7,10 +7,11 @@ import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__ from "@sun-toolkit/en
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 "vue-router";
10
+ import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
10
11
  import * as __WEBPACK_EXTERNAL_MODULE_i18next_vue__ from "i18next-vue";
11
12
  import * as __WEBPACK_EXTERNAL_MODULE_js_pinyin__ from "js-pinyin";
12
13
  var __webpack_modules__ = {
13
- "./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.13_typescript@5.7.3__webpack@5.98.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js": function(__unused_webpack_module, exports) {
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.13_typescript@5.7.3__webpack@5.98.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js
74
- var exportHelper = __webpack_require__("./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.13_typescript@5.7.3__webpack@5.98.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js");
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 ?? 'operation' !== column.prop
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)('/codeSystem/queryDataSetByCodeSystemCodes', params, {
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) {
@@ -565,6 +569,7 @@ function useFetchDataset(codeSystemCodes, enabledFlag) {
565
569
  });
566
570
  return list;
567
571
  }
572
+ /* ESM default export */ const use_fetch_dataset = useFetchDataset;
568
573
  /**
569
574
  * [4-10090-1]根据数据源导出文件
570
575
  * @param params
@@ -600,10 +605,10 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
600
605
  }, [
601
606
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
602
607
  class: `sort-caret ascending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES ? '!border-b-blue-500' : ''}`
603
- }, null),
608
+ }, null, 2),
604
609
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("i", {
605
610
  class: `sort-caret descending ${row.ascendFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO ? '!border-t-blue-500' : ''}`
606
- }, null)
611
+ }, null, 2)
607
612
  ])
608
613
  ], 8, [
609
614
  "onClick"
@@ -931,7 +936,7 @@ const _hoisted_3 = {
931
936
  reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
932
937
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, null, {
933
938
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
934
- _cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("组合排序 ")),
939
+ _cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("组合排序 ", -1)),
935
940
  isSHow.value ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_1, [
936
941
  ((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, {
937
942
  hit: false,
@@ -971,7 +976,10 @@ const _hoisted_3 = {
971
976
  ]))), 128))
972
977
  ]))
973
978
  ]),
974
- _: 1
979
+ _: 1,
980
+ __: [
981
+ 0
982
+ ]
975
983
  })
976
984
  ]),
977
985
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
@@ -987,7 +995,7 @@ const _hoisted_3 = {
987
995
  ]),
988
996
  _: 1
989
997
  }),
990
- _cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("请根据以下规则编辑排序条件 "))
998
+ _cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("请根据以下规则编辑排序条件 ", -1))
991
999
  ]),
992
1000
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(pro_table, {
993
1001
  onDragEnd: handleSortEnd,
@@ -1008,9 +1016,12 @@ const _hoisted_3 = {
1008
1016
  onClick: confirm
1009
1017
  }, {
1010
1018
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[2] || (_cache[2] = [
1011
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 关闭 ")
1019
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 关闭 ", -1)
1012
1020
  ])),
1013
- _: 1
1021
+ _: 1,
1022
+ __: [
1023
+ 2
1024
+ ]
1014
1025
  })
1015
1026
  ])
1016
1027
  ]),
@@ -1047,7 +1058,7 @@ const AdvancedSort_exports_ = AdvancedSortvue_type_script_setup_true_lang_tsx;
1047
1058
  return MAIN_APP_CONFIG;
1048
1059
  }({});
1049
1060
  function useAppConfigData(name) {
1050
- const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)('mainAppConfig');
1061
+ const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)("mainAppConfig");
1051
1062
  if (Array.isArray(name)) return name.reduce((acc, key)=>{
1052
1063
  if (data && key in data) acc[key] = data[key];
1053
1064
  return acc;
@@ -1332,7 +1343,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1332
1343
  default: ()=>[]
1333
1344
  },
1334
1345
  componentNo: {
1335
- default: ''
1346
+ default: ""
1336
1347
  },
1337
1348
  columnsSetting: {
1338
1349
  default: ()=>({
@@ -1351,7 +1362,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1351
1362
  use_app_config_MAIN_APP_CONFIG.USER_INFO
1352
1363
  ]);
1353
1364
  const isAdmin = userInfo?.adminFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES || userInfo?.userJobCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG_STR.NO;
1354
- const componentId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
1365
+ const componentId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
1355
1366
  const fullscreen = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
1356
1367
  const confirmLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
1357
1368
  const applicationLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
@@ -1359,14 +1370,14 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1359
1370
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
1360
1371
  dialogRef.value.open();
1361
1372
  });
1362
- const scrollKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
1363
- const dataSetList = useFetchDataset([
1373
+ const scrollKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
1374
+ const dataSetList = use_fetch_dataset([
1364
1375
  __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE_NAME
1365
1376
  ]);
1366
1377
  const renderDialog = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true); //控制prodialog 是否销毁
1367
1378
  const dbgridTableConfigRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
1368
1379
  const influenceScopeList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>dataSetList?.value?.[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE_NAME] || []);
1369
- const bizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
1380
+ const bizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
1370
1381
  const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
1371
1382
  const serveDbgridComponentSettingList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
1372
1383
  const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
@@ -1380,9 +1391,9 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1380
1391
  ...item,
1381
1392
  minWidth: item.minWidth || item.width,
1382
1393
  sort: index + 1,
1383
- columnClass: 'truncate',
1394
+ columnClass: "truncate",
1384
1395
  render: (row, index)=>{
1385
- if (!item.render) return '我是示例的文案';
1396
+ if (!item.render) return "我是示例的文案";
1386
1397
  {
1387
1398
  let _slot;
1388
1399
  return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton, {
@@ -1417,17 +1428,17 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1417
1428
  });
1418
1429
  if (result?.success) {
1419
1430
  if (result?.data?.length) {
1420
- componentId.value = result.data[0].componentId || '';
1431
+ componentId.value = result.data[0].componentId || "";
1421
1432
  serveDbgridComponentSettingList.value = result.data[0].dbgridComponentSettingList || [];
1422
1433
  if (serveDbgridComponentSettingList.value.length) {
1423
1434
  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;
1424
1435
  else {
1425
1436
  influenceScopeCode.value = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE;
1426
- bizId.value = userInfo?.userId || '';
1437
+ bizId.value = userInfo?.userId || "";
1427
1438
  userList.value = [
1428
1439
  {
1429
- userId: userInfo?.userId || '',
1430
- userName: userInfo?.userName || ''
1440
+ userId: userInfo?.userId || "",
1441
+ userName: userInfo?.userName || ""
1431
1442
  }
1432
1443
  ];
1433
1444
  }
@@ -1439,7 +1450,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1439
1450
  async function fetchUserList(value) {
1440
1451
  const [, res] = await queryUserList({
1441
1452
  enabledFlag: 1,
1442
- hospitalId: currentOrg?.orgId || '',
1453
+ hospitalId: currentOrg?.orgId || "",
1443
1454
  keyWord: value
1444
1455
  });
1445
1456
  if (res?.success) userList.value = res.data || [];
@@ -1497,10 +1508,10 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1497
1508
  function submit(isSave) {
1498
1509
  return new Promise((resolve, reject)=>{
1499
1510
  if (influenceScopeCode.value === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE && !bizId.value) {
1500
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('请选择操作员');
1511
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("请选择操作员");
1501
1512
  return reject([
1502
- '',
1503
- new Error('参数错误')
1513
+ "",
1514
+ new Error("参数错误")
1504
1515
  ]);
1505
1516
  }
1506
1517
  let dbgridComponentSettingList = [];
@@ -1546,16 +1557,16 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1546
1557
  }).then((result)=>{
1547
1558
  let [, data] = result;
1548
1559
  if (data?.success) {
1549
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(isSave ? '保存成功' : '应用成功');
1560
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(isSave ? "保存成功" : "应用成功");
1550
1561
  resolve([]);
1551
1562
  } else reject([
1552
- '',
1553
- new Error('接口错误')
1563
+ "",
1564
+ new Error("接口错误")
1554
1565
  ]);
1555
1566
  }, ()=>{
1556
1567
  reject([
1557
- '',
1558
- new Error('未知错误')
1568
+ "",
1569
+ new Error("未知错误")
1559
1570
  ]);
1560
1571
  });
1561
1572
  });
@@ -1563,18 +1574,18 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1563
1574
  __expose({
1564
1575
  dialogRef
1565
1576
  }); /**
1566
- * 左右滚动
1567
- */
1577
+ * 左右滚动
1578
+ */
1568
1579
  const scrollToColumn = (columnName)=>{
1569
1580
  scrollKeyWord.value = columnName;
1570
1581
  let columnIndex = tableColumn.value.findIndex((item)=>item.prop === columnName);
1571
1582
  if (-1 !== columnIndex) {
1572
1583
  const tableEl = tableRef?.value?.proTableRef?.$el;
1573
- const columns = Array.from(tableEl.querySelectorAll('.el-table__body-wrapper colgroup col'));
1574
- const targetColumnStart = columns.slice(0, columnIndex).reduce((acc, col)=>acc + parseInt(col?.getAttribute('width') || '0'), 0); // 计算将目标列滚动到中间的位置
1584
+ const columns = Array.from(tableEl.querySelectorAll(".el-table__body-wrapper colgroup col"));
1585
+ const targetColumnStart = columns.slice(0, columnIndex).reduce((acc, col)=>acc + parseInt(col?.getAttribute("width") || "0"), 0); // 计算将目标列滚动到中间的位置
1575
1586
  const wrapperWidth = tableRef?.value?.proTableRef?.$el.clientWidth; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1576
1587
  //@ts-expect-error
1577
- const columnWidth = parseInt(columns[columnIndex]?.getAttribute('width'));
1588
+ const columnWidth = parseInt(columns[columnIndex]?.getAttribute("width"));
1578
1589
  const scrollPosition = targetColumnStart - wrapperWidth / 2 + columnWidth / 2;
1579
1590
  tableRef?.value?.proTableRef.setScrollLeft(scrollPosition);
1580
1591
  }
@@ -1583,8 +1594,8 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1583
1594
  let findIndex = sourceData.value.findIndex((item)=>item.prop === columnName);
1584
1595
  const row = dbgridTableConfigRef?.value?.tableRef?.proTableRef?.$el?.querySelector(`.el-table__body-wrapper tbody tr:nth-child(${findIndex + 1})`);
1585
1596
  row?.scrollIntoView({
1586
- behavior: 'smooth',
1587
- block: 'center'
1597
+ behavior: "smooth",
1598
+ block: "center"
1588
1599
  });
1589
1600
  dbgridTableConfigRef?.value?.tableRef?.setCurrentRow(sourceData.value[findIndex]);
1590
1601
  };
@@ -1630,9 +1641,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1630
1641
  onClick: handleCancel
1631
1642
  }, {
1632
1643
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[7] || (_cache[7] = [
1633
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
1644
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消", -1)
1634
1645
  ])),
1635
- _: 1
1646
+ _: 1,
1647
+ __: [
1648
+ 7
1649
+ ]
1636
1650
  }),
1637
1651
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
1638
1652
  type: "primary",
@@ -1644,9 +1658,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1644
1658
  })
1645
1659
  }, {
1646
1660
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[8] || (_cache[8] = [
1647
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用")
1661
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用", -1)
1648
1662
  ])),
1649
- _: 1
1663
+ _: 1,
1664
+ __: [
1665
+ 8
1666
+ ]
1650
1667
  }, 8, [
1651
1668
  "loading",
1652
1669
  "disabled"
@@ -1660,9 +1677,12 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1660
1677
  })
1661
1678
  }, {
1662
1679
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[9] || (_cache[9] = [
1663
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ")
1680
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ", -1)
1664
1681
  ])),
1665
- _: 1
1682
+ _: 1,
1683
+ __: [
1684
+ 9
1685
+ ]
1666
1686
  }, 8, [
1667
1687
  "loading",
1668
1688
  "disabled"
@@ -1824,7 +1844,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1824
1844
  const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
1825
1845
  [
1826
1846
  '__scopeId',
1827
- "data-v-70d357a6"
1847
+ "data-v-48cde4c6"
1828
1848
  ]
1829
1849
  ]);
1830
1850
  /* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
@@ -1857,7 +1877,7 @@ const tableColumnSetting = (options)=>{
1857
1877
  createColumnSetting(options, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.app?._context);
1858
1878
  };
1859
1879
  const TableSettingButtonvue_type_script_setup_true_lang_tsx_hoisted_1 = {
1860
- class: "el-dropdown-link absolute left-3 top-2.5 z-50 cursor-pointer text-blue-600"
1880
+ class: "el-dropdown-link absolute left-3 top-2.5 z-50 cursor-pointer text-primary"
1861
1881
  };
1862
1882
  const FILE_TYPE_CODE = 'FILE_TYPE_CODE';
1863
1883
  const COLUMN_SETTING = 'column-setting';
@@ -1876,7 +1896,7 @@ const EXPORT_FILE = 'export-file';
1876
1896
  'success'
1877
1897
  ],
1878
1898
  setup (__props, { emit: __emit }) {
1879
- const dataSetList = useFetchDataset([
1899
+ const dataSetList = use_fetch_dataset([
1880
1900
  FILE_TYPE_CODE
1881
1901
  ]);
1882
1902
  const props = __props;
@@ -1927,13 +1947,13 @@ const EXPORT_FILE = 'export-file';
1927
1947
  let [, res] = await exportData2File({
1928
1948
  fileTypeCode: value,
1929
1949
  dataSource: JSON.stringify({
1930
- columnList: props.columns.filter((cur)=>cur.prop && cur.label && cur.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES && '操作' !== cur.label).map((item)=>({
1950
+ 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)=>({
1931
1951
  columnIndex: item.prop,
1932
1952
  columnTitle: item.label
1933
1953
  })),
1934
1954
  rowList: props.tableData.map((item, index)=>({
1935
1955
  rowSequenceNo: index,
1936
- rowRecordList: props.columns.filter((col)=>col.prop && col.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES && '操作' !== col.label).map((col)=>{
1956
+ rowRecordList: props.columns.filter((col)=>col.prop && col.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES && col.prop !== OPERATION).map((col)=>{
1937
1957
  let value = item[col.prop];
1938
1958
  if ('function' == typeof col.render) try {
1939
1959
  value = getRenderedContent(col.render, item, value, index) || value;
@@ -2051,7 +2071,7 @@ const EXPORT_FILE = 'export-file';
2051
2071
  })) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", {
2052
2072
  key: 1,
2053
2073
  onClick: openColumnSetting,
2054
- 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-blue-400' : 'cursor-pointer text-blue-600'}`)
2074
+ 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'}`)
2055
2075
  }, [
2056
2076
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), null, {
2057
2077
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
@@ -2066,7 +2086,7 @@ const EXPORT_FILE = 'export-file';
2066
2086
  const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(TableSettingButtonvue_type_script_setup_true_lang_tsx, [
2067
2087
  [
2068
2088
  '__scopeId',
2069
- "data-v-d83c7b5e"
2089
+ "data-v-38d4eddb"
2070
2090
  ]
2071
2091
  ]);
2072
2092
  /* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
@@ -2090,7 +2110,13 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
2090
2110
  rowKey: {},
2091
2111
  tableColumns: {},
2092
2112
  commonColumns: {},
2093
- columnsSetting: {}
2113
+ columnsSetting: {},
2114
+ rowClassName: {
2115
+ type: [
2116
+ Function,
2117
+ String
2118
+ ]
2119
+ }
2094
2120
  },
2095
2121
  emits: [
2096
2122
  'success'
@@ -2100,9 +2126,20 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
2100
2126
  const emits = __emit;
2101
2127
  const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
2102
2128
  const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows() || []);
2129
+ const draggableProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.draggable ? props.tableColumns.filter((col)=>false !== col.isDraggable && col.prop !== OPERATION).map((col)=>col.prop) : []);
2103
2130
  __expose({
2104
2131
  proTableRef
2105
- });
2132
+ }); // 适配器函数,自动兼容两种 rowClassName 写法
2133
+ function rowClassNameAdapter(data) {
2134
+ const fn = props.rowClassName;
2135
+ if (!fn) return '';
2136
+ if ('string' == typeof fn) return fn; // 判断是对象参数还是分参数
2137
+ if (1 === fn.length) return fn({
2138
+ row: data.row,
2139
+ rowIndex: data.rowIndex
2140
+ });
2141
+ return fn(data.row, data.rowIndex);
2142
+ }
2106
2143
  return (_ctx, _cache)=>{
2107
2144
  const _directive_loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("loading");
2108
2145
  return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
@@ -2134,7 +2171,8 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
2134
2171
  },
2135
2172
  class: "min-h-0 flex-1 overflow-auto",
2136
2173
  "row-key": props.rowKey,
2137
- "cell-class-name": ({ column })=>_ctx.draggable && 'operation' !== column.property ? 'cursor-move' : '',
2174
+ "cell-class-name": ({ column })=>draggableProps.value.includes(column.property) ? 'cursor-move' : '',
2175
+ "row-class-name": rowClassNameAdapter,
2138
2176
  border: ""
2139
2177
  }, _ctx.$attrs), {
2140
2178
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
@@ -2261,9 +2299,10 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
2261
2299
  key: 1,
2262
2300
  class: "mt-5 flex items-center justify-between"
2263
2301
  };
2264
- const SELECTION = 'selection';
2265
- // 接受父组件参数,配置默认值
2266
- /* ESM default export */ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
2302
+ const SELECTION = "selection";
2303
+ /**
2304
+ *获取参与排序的列表 索引 是否可以拖拽
2305
+ */ /* ESM default export */ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
2267
2306
  __name: 'index',
2268
2307
  props: {
2269
2308
  columns: {
@@ -2280,7 +2319,7 @@ const SELECTION = 'selection';
2280
2319
  default: void 0
2281
2320
  },
2282
2321
  componentNo: {
2283
- default: ''
2322
+ default: ""
2284
2323
  },
2285
2324
  hiddenDefaultText: {
2286
2325
  type: Boolean,
@@ -2302,6 +2341,7 @@ const SELECTION = 'selection';
2302
2341
  type: Boolean,
2303
2342
  default: false
2304
2343
  },
2344
+ dragGroupName: {},
2305
2345
  editable: {
2306
2346
  type: Boolean,
2307
2347
  default: false
@@ -2311,7 +2351,7 @@ const SELECTION = 'selection';
2311
2351
  default: true
2312
2352
  },
2313
2353
  rowKey: {
2314
- default: 'id'
2354
+ default: "id"
2315
2355
  },
2316
2356
  loading: {
2317
2357
  type: Boolean,
@@ -2329,13 +2369,13 @@ const SELECTION = 'selection';
2329
2369
  default: ()=>({})
2330
2370
  },
2331
2371
  layout: {
2332
- default: 'total, sizes, prev, pager, next'
2372
+ default: "total, sizes, prev, pager, next"
2333
2373
  },
2334
2374
  formDisabled: {
2335
2375
  type: Boolean
2336
2376
  },
2337
2377
  dragTips: {
2338
- default: '温馨提示:您可通过拖动进行排序'
2378
+ default: "温馨提示:您可通过拖动进行排序"
2339
2379
  },
2340
2380
  isShowDragTips: {
2341
2381
  type: Boolean,
@@ -2345,7 +2385,7 @@ const SELECTION = 'selection';
2345
2385
  default: {}
2346
2386
  },
2347
2387
  dragTipsClassName: {
2348
- default: ''
2388
+ default: ""
2349
2389
  }
2350
2390
  },
2351
2391
  emits: [
@@ -2359,7 +2399,7 @@ const SELECTION = 'selection';
2359
2399
  const sortFieldList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(void 0);
2360
2400
  const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
2361
2401
  const showSetting = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
2362
- const componentDesc = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('文件');
2402
+ const componentDesc = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("文件");
2363
2403
  let state = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
2364
2404
  // 表格数据
2365
2405
  tableData: props.data,
@@ -2378,16 +2418,17 @@ const SELECTION = 'selection';
2378
2418
  const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
2379
2419
  // 生成组件唯一id
2380
2420
  const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)());
2421
+ // 新增:Sortable实例引用
2422
+ let sortableInstance = null;
2423
+ const refreshIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
2381
2424
  // 定义 emit 事件
2382
2425
  const emit = __emit;
2383
2426
  const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
2384
2427
  // 提供静态数据
2385
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.provide)('hiddenDefaultText', props.hiddenDefaultText);
2428
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.provide)("hiddenDefaultText", props.hiddenDefaultText);
2386
2429
  const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
2387
2430
  const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>tableRef.value?.proTableRef);
2388
- /**
2389
- *获取参与排序的列表 索引 是否可以拖拽
2390
- */ function getDragSortData(newIndex, data, startIndexObj, sortData) {
2431
+ function getDragSortData(newIndex, data, startIndexObj, sortData, childrenKey) {
2391
2432
  data.forEach((item, index)=>{
2392
2433
  startIndexObj.startIndex += 1;
2393
2434
  if (startIndexObj.startIndex > newIndex) return;
@@ -2396,35 +2437,33 @@ const SELECTION = 'selection';
2396
2437
  sortData.curData = item;
2397
2438
  sortData.result = data;
2398
2439
  }
2399
- if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
2440
+ if (childrenKey && Array.isArray(item[childrenKey])) getDragSortData(newIndex, item[childrenKey], startIndexObj, sortData, childrenKey);
2400
2441
  });
2401
2442
  return sortData;
2402
2443
  }
2403
2444
  /**
2404
- * 获取拖拽排序数据结果
2405
- */ function getSortableResult(newIndex, oldIndex) {
2445
+ * 获取拖拽排序数据结果
2446
+ */ function getSortableResult(newIndex, oldIndex, evt, initialHTML) {
2406
2447
  let data = [
2407
2448
  ...state.tableData
2408
2449
  ];
2409
- if (attrs?.['tree-props']) {
2450
+ // 安全获取childrenKey
2451
+ let childrenKey = getSafeChildrenKeyFromAttrs(attrs);
2452
+ if (childrenKey) {
2410
2453
  let { result, curIndex: newCurIndex, curData: newCurData } = getDragSortData(newIndex, data, {
2411
2454
  startIndex: -1
2412
2455
  }, {
2413
2456
  result: [],
2414
2457
  curIndex: 0,
2415
2458
  curData: {}
2416
- });
2459
+ }, childrenKey);
2417
2460
  let { curIndex: oldCurIndex, curData: oldCurData } = getDragSortData(oldIndex, data, {
2418
2461
  startIndex: -1
2419
2462
  }, {
2420
2463
  result: [],
2421
2464
  curIndex: 0,
2422
2465
  curData: {}
2423
- });
2424
- if (newCurData.belongGroupElementId !== oldCurData.belongGroupElementId) {
2425
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
2426
- return [];
2427
- }
2466
+ }, childrenKey);
2428
2467
  const [removedItem] = result.splice(oldCurIndex, 1);
2429
2468
  result.splice(newCurIndex, 0, removedItem);
2430
2469
  data = result;
@@ -2434,29 +2473,145 @@ const SELECTION = 'selection';
2434
2473
  }
2435
2474
  return data;
2436
2475
  }
2476
+ // 生成每一行的唯一 path
2477
+ function getRowPath(row, data, rowKey, parentPath = "", childrenKey) {
2478
+ for(let i = 0; i < data.length; i++){
2479
+ if (data[i][rowKey] === row[rowKey]) {
2480
+ const currentPath = parentPath ? `${parentPath}-${i}` : `${i}`;
2481
+ return currentPath;
2482
+ }
2483
+ if (childrenKey && Array.isArray(data[i][childrenKey])) {
2484
+ const childPath = getRowPath(row, data[i][childrenKey], rowKey, parentPath ? `${parentPath}-${i}` : `${i}`, childrenKey);
2485
+ if ("" !== childPath) return childPath;
2486
+ }
2487
+ }
2488
+ return "";
2489
+ }
2490
+ // 获取childrenKey的安全写法
2491
+ function getSafeChildrenKeyFromAttrs(attrs) {
2492
+ const treePropsRaw = attrs["tree-props"];
2493
+ const treeProps = "object" == typeof treePropsRaw && null !== treePropsRaw ? treePropsRaw : void 0;
2494
+ if (treeProps && "children" in treeProps) return treeProps.children;
2495
+ }
2496
+ // 兼容外部 row-class-name,自动适配参数类型
2497
+ function rowClassNameWrapper(rowOrParams, rowIndexArg) {
2498
+ let row, rowIndex;
2499
+ if (rowOrParams && "object" == typeof rowOrParams && "row" in rowOrParams && "rowIndex" in rowOrParams) {
2500
+ row = rowOrParams.row;
2501
+ rowIndex = rowOrParams.rowIndex;
2502
+ } else {
2503
+ row = rowOrParams;
2504
+ rowIndex = rowIndexArg;
2505
+ }
2506
+ let externalClass = "";
2507
+ const external = attrs["row-class-name"];
2508
+ if ("function" == typeof external) externalClass = external({
2509
+ row,
2510
+ rowIndex
2511
+ });
2512
+ else if ("string" == typeof external) externalClass = external;
2513
+ let pathClass = "";
2514
+ let childrenKey = getSafeChildrenKeyFromAttrs(attrs);
2515
+ let path = getRowPath(row, state.tableData, props.rowKey, "", childrenKey);
2516
+ pathClass = `row-path-${path}`;
2517
+ return [
2518
+ externalClass,
2519
+ pathClass
2520
+ ].filter(Boolean).join(" ");
2521
+ }
2437
2522
  /***
2438
- * 表格拖拽排序
2439
- **/ const initDragSort = ()=>{
2523
+ * 表格拖拽排序
2524
+ **/ const initDragSort = ()=>{
2440
2525
  const tbodyList = document.querySelectorAll(`#${uuid.value} tbody`);
2441
2526
  const tbody = tbodyList[tbodyList.length - 1];
2442
- let initialHTML = ''; //暂不支持跨层级拖拽
2443
- if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
2444
- handle: '.cursor-move',
2527
+ let initialHTML = "";
2528
+ let crossLevelWarned = false;
2529
+ // 新增:销毁旧的Sortable实例
2530
+ // 新增:销毁旧的Sortable实例
2531
+ if (sortableInstance) {
2532
+ sortableInstance.destroy();
2533
+ sortableInstance = null;
2534
+ }
2535
+ if (tbody) sortableInstance = __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
2536
+ handle: ".cursor-move",
2537
+ group: props.dragGroupName,
2445
2538
  animation: 300,
2446
2539
  scroll: true,
2447
2540
  scrollSensitivity: 80,
2448
2541
  scrollSpeed: 10,
2542
+ onMove (evt) {
2543
+ const draggedPath = evt.dragged?.className.match(/row-path-([\d-]+)/)?.[1] || "";
2544
+ const relatedPath = evt.related?.className.match(/row-path-([\d-]+)/)?.[1] || "";
2545
+ const getParent = (p)=>p.split("-").slice(0, -1).join("-");
2546
+ if (draggedPath && relatedPath && getParent(draggedPath) !== getParent(relatedPath)) {
2547
+ if (!crossLevelWarned) {
2548
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("暂不支持跨层级拖拽配置");
2549
+ crossLevelWarned = true;
2550
+ }
2551
+ return false;
2552
+ }
2553
+ return true;
2554
+ },
2449
2555
  onEnd (evt) {
2450
2556
  const { newIndex, oldIndex } = evt;
2451
- if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
2452
- //获取拖动后的排序
2557
+ if (props.dragGroupName) {
2558
+ emit("drag-end", {
2559
+ crossGroup: evt.from !== evt.to,
2560
+ oldIndex,
2561
+ newIndex
2562
+ });
2563
+ return;
2564
+ }
2565
+ const dragTr = evt.item;
2566
+ const match = dragTr.className.split(" ").find((cls)=>cls.startsWith("row-path-"));
2567
+ const fromPath = match ? match.replace("row-path-", "") : "";
2568
+ let childrenKey = getSafeChildrenKeyFromAttrs(attrs);
2569
+ const getPathByIndex = (targetIndex)=>{
2570
+ let path = "";
2571
+ let count = -1;
2572
+ function dfs(arr, parent) {
2573
+ for(let i = 0; i < arr.length; i++){
2574
+ count++;
2575
+ const curPath = parent ? `${parent}-${i}` : `${i}`;
2576
+ if (count === targetIndex) {
2577
+ path = curPath;
2578
+ return true;
2579
+ }
2580
+ if (childrenKey && Array.isArray(arr[i][childrenKey])) {
2581
+ if (dfs(arr[i][childrenKey], curPath)) return true;
2582
+ }
2583
+ }
2584
+ return false;
2585
+ }
2586
+ dfs(state.tableData, "");
2587
+ return path;
2588
+ };
2589
+ if ("number" != typeof newIndex || "number" != typeof oldIndex || newIndex === oldIndex) return;
2590
+ const newPath = getPathByIndex(newIndex);
2591
+ const oldPath = getPathByIndex(oldIndex);
2592
+ const getParent = (p)=>p.split("-").slice(0, -1).join("-");
2593
+ if (getParent(newPath) !== getParent(oldPath)) // 这里不再需要回退DOM,onMove已阻止
2594
+ return;
2453
2595
  let data = getSortableResult(newIndex, oldIndex);
2454
- if (data.length) emit('drag-end', data);
2455
- else evt.from.innerHTML = initialHTML;
2596
+ if (data.length) {
2597
+ // 严格按用户要求赋值
2598
+ if (childrenKey) {
2599
+ setDataByPath(fromPath, data, childrenKey);
2600
+ refreshIndex.value = refreshIndex.value + 1;
2601
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
2602
+ initDragSort();
2603
+ });
2604
+ }
2605
+ emit("drag-end", data, {
2606
+ fromPath,
2607
+ oldIndex,
2608
+ newIndex
2609
+ });
2610
+ } else evt.from.innerHTML = initialHTML;
2456
2611
  },
2457
2612
  onStart (evt) {
2458
- // 在拖拽开始时,记录当前容器的 HTML
2459
2613
  initialHTML = evt.from.innerHTML;
2614
+ crossLevelWarned = false;
2460
2615
  }
2461
2616
  });
2462
2617
  };
@@ -2466,7 +2621,7 @@ const SELECTION = 'selection';
2466
2621
  });
2467
2622
  async function fetchDbgridComponent() {
2468
2623
  let [, result] = await queryDbgridComponentByExample({
2469
- componentNo: props.componentNo || ''
2624
+ componentNo: props.componentNo || ""
2470
2625
  });
2471
2626
  if (result?.success) {
2472
2627
  exportFileFlag.value = result.data.exportFileFlag;
@@ -2499,8 +2654,8 @@ const SELECTION = 'selection';
2499
2654
  if (props.pagination && props?.fetchData && props.defaultQuery) fetchList();
2500
2655
  });
2501
2656
  /**
2502
- * 获取列表
2503
- */ async function fetchList() {
2657
+ * 获取列表
2658
+ */ async function fetchList() {
2504
2659
  state.loading = true;
2505
2660
  let { total = 0, data = [] } = await (props.fetchData && props.fetchData(state.pageInfo)) || {};
2506
2661
  state.pageInfo.total = Number(total);
@@ -2508,21 +2663,21 @@ const SELECTION = 'selection';
2508
2663
  state.loading = false;
2509
2664
  }
2510
2665
  /**
2511
- * 分页组件改变 pageNumber 事件
2512
- */ const handleSizeChange = (val)=>{
2666
+ * 分页组件改变 pageNumber 事件
2667
+ */ const handleSizeChange = (val)=>{
2513
2668
  if (props.fetchData) {
2514
2669
  state.pageInfo.pageNumber = 1;
2515
2670
  state.pageInfo.pageSize = val;
2516
2671
  fetchList();
2517
- } else emit('size-page-change', val);
2672
+ } else emit("size-page-change", val);
2518
2673
  };
2519
2674
  /**
2520
- * 分页组件改变 当前页数 事件
2521
- */ function changeCurrentPage(val) {
2675
+ * 分页组件改变 当前页数 事件
2676
+ */ function changeCurrentPage(val) {
2522
2677
  if (props.fetchData) {
2523
2678
  state.pageInfo.pageNumber = val;
2524
2679
  fetchList();
2525
- } else emit('current-page-change', val);
2680
+ } else emit("current-page-change", val);
2526
2681
  }
2527
2682
  const selections = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
2528
2683
  // 设置当前行激活态
@@ -2532,8 +2687,8 @@ const SELECTION = 'selection';
2532
2687
  // 分页配置信息
2533
2688
  const paginationInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.pageInfo ?? state.pageInfo);
2534
2689
  /**
2535
- * 支持根据传递的filterObj完成过滤
2536
- */ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2690
+ * 支持根据传递的filterObj完成过滤
2691
+ */ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2537
2692
  let result = [
2538
2693
  ...state.tableData
2539
2694
  ];
@@ -2545,12 +2700,23 @@ const SELECTION = 'selection';
2545
2700
  result = multiFieldSort(result, sortFieldList.value);
2546
2701
  }
2547
2702
  if (Object.keys(props.filterObj).length) return result.filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
2548
- '',
2703
+ "",
2549
2704
  void 0,
2550
2705
  null
2551
2706
  ].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
2552
2707
  return result;
2553
2708
  });
2709
+ // 严格按用户要求递归赋值方法
2710
+ function setDataByPath(path, data, childrenKey) {
2711
+ const indices = path.split("-").map((i)=>Number(i));
2712
+ if (1 === indices.length) {
2713
+ state.tableData = data;
2714
+ return;
2715
+ }
2716
+ let cur = state.tableData;
2717
+ for(let i = 0; i < indices.length - 2; i++)cur = cur[indices[i]][childrenKey];
2718
+ cur[indices[indices.length - 2]][childrenKey] = data;
2719
+ }
2554
2720
  __expose({
2555
2721
  selections,
2556
2722
  tableData,
@@ -2582,18 +2748,19 @@ const SELECTION = 'selection';
2582
2748
  ...initPageInfo
2583
2749
  };
2584
2750
  fetchList();
2585
- }
2751
+ },
2752
+ rowClassName: rowClassNameWrapper
2586
2753
  });
2587
2754
  /**
2588
- * 处理接口和本地的columns
2589
- */ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2755
+ * 处理接口和本地的columns
2756
+ */ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2590
2757
  let propsColumns = [
2591
2758
  ...props.columns
2592
2759
  ];
2593
2760
  if (props.couldSortFieldList && props.couldSortFieldList?.length) propsColumns = propsColumns.map((item)=>{
2594
2761
  let supportSort = !!(props.couldSortFieldList || []).find((cur)=>cur.fieldName === item.prop);
2595
2762
  return {
2596
- sortable: !!supportSort && (props.pagination ? 'custom' : supportSort),
2763
+ sortable: !!supportSort && (props.pagination ? "custom" : supportSort),
2597
2764
  ...item
2598
2765
  };
2599
2766
  });
@@ -2622,8 +2789,8 @@ const SELECTION = 'selection';
2622
2789
  }
2623
2790
  });
2624
2791
  /**
2625
- * 表格渲染存在设置标志的情况 左边宽度加个40px
2626
- */ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2792
+ * 表格渲染存在设置标志的情况 左边宽度加个40px
2793
+ */ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2627
2794
  let result = [
2628
2795
  ...commonColumns.value
2629
2796
  ];
@@ -2644,14 +2811,14 @@ const SELECTION = 'selection';
2644
2811
  return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
2645
2812
  });
2646
2813
  /**
2647
- *
2648
- * 是否展示当前拖拽提示
2649
- */ const draggableTips = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2814
+ *
2815
+ * 是否展示当前拖拽提示
2816
+ */ const draggableTips = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2650
2817
  const isTips = !!props?.draggable && (!!props?.isShowDragTips || false);
2651
2818
  return isTips;
2652
2819
  });
2653
2820
  function sortChange({ column, order, prop }) {
2654
- if (!props.couldSortFieldList?.length) return emit('sort-change', {
2821
+ if (!props.couldSortFieldList?.length) return emit("sort-change", {
2655
2822
  column,
2656
2823
  order,
2657
2824
  prop
@@ -2698,10 +2865,11 @@ const SELECTION = 'selection';
2698
2865
  class: "flex flex-1 flex-col overflow-hidden"
2699
2866
  }, {
2700
2867
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
2701
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
2868
+ ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
2702
2869
  id: uuid.value,
2703
2870
  "export-file-flag": exportFileFlag.value,
2704
2871
  componentDesc: componentDesc.value,
2872
+ key: refreshIndex.value,
2705
2873
  "common-columns": commonColumns.value,
2706
2874
  "component-no": props.componentNo,
2707
2875
  "show-setting": showSetting.value,
@@ -2715,7 +2883,8 @@ const SELECTION = 'selection';
2715
2883
  "row-key": props.rowKey,
2716
2884
  "table-columns": tableColumns.value
2717
2885
  }, _ctx.$attrs, {
2718
- draggable: props.draggable
2886
+ draggable: props.draggable,
2887
+ "row-class-name": rowClassNameWrapper
2719
2888
  }), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
2720
2889
  _: 2
2721
2890
  }, [
@@ -2738,7 +2907,7 @@ const SELECTION = 'selection';
2738
2907
  "row-key",
2739
2908
  "table-columns",
2740
2909
  "draggable"
2741
- ])
2910
+ ]))
2742
2911
  ]),
2743
2912
  _: 3
2744
2913
  }, 8, [
@@ -3404,8 +3573,8 @@ const pro_table_v2_exports_ = pro_table_v2vue_type_script_lang_tsx_setup_true_na
3404
3573
  * 1-10115-1 根据条件查询菜单的检索方式列表(业务态)
3405
3574
  * @param params
3406
3575
  * @returns
3407
- */ const queryPatientAccessConfig = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)("/searchcomponent/queryMenuXSearchTypeByExample", params);
3408
- const queryBizDataList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)("/bizsearch/queryBizDataListByExample", {
3576
+ */ const queryPatientAccessConfig = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/searchcomponent/queryMenuXSearchTypeByExample', params);
3577
+ const queryBizDataList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/bizsearch/queryBizDataListByExample', {
3409
3578
  ...params,
3410
3579
  pageSize: 100,
3411
3580
  pageNumber: 1
@@ -3414,7 +3583,12 @@ const queryBizDataList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_re
3414
3583
  * [4-10073-1] 根据业务标识获取Banner数据
3415
3584
  * @param params
3416
3585
  * @returns
3417
- */ const getBannerDataByBizId = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)("/banner/getBannerDataByBizId", params);
3586
+ */ const getBannerDataByBizId = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/banner/getBannerDataByBizId', params);
3587
+ /**
3588
+ * [1-10475-1]根据条件查询标签列表
3589
+ * @param params
3590
+ * @returns
3591
+ */ const queryBizTagListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/biztag/queryBizTagListByExample', params);
3418
3592
  /* eslint-disable @typescript-eslint/no-explicit-any */ // support refreshDeps & ready
3419
3593
  const useAutoRunPlugin_useAutoRunPlugin = (fetchInstance, { manual, ready = true, refreshDeps = [], refreshDepsAction })=>{
3420
3594
  const hasAutoRun = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
@@ -3526,18 +3700,19 @@ function useSelectByDirectionEvent(options) {
3526
3700
  });
3527
3701
  }
3528
3702
  /* ESM default export */ const use_direction_select = useSelectByDirectionEvent;
3703
+ // import { useTranslation } from "i18next-vue";
3529
3704
  function useFormConfig(options) {
3530
- const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
3705
+ // const { t } = useTranslation();
3531
3706
  const { getData, dataSetCodes } = options;
3532
- const dataSet = useFetchDataset(dataSetCodes);
3533
- const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(t, dataSet));
3707
+ const dataSet = use_fetch_dataset(dataSetCodes);
3708
+ const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.t, dataSet));
3534
3709
  return data;
3535
3710
  }
3536
3711
  function useColumnConfig(options) {
3537
- const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
3712
+ // const { t } = useTranslation();
3538
3713
  const { getData, dataSetCodes } = options;
3539
- const dataSet = useFetchDataset(dataSetCodes);
3540
- const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(t, dataSet));
3714
+ const dataSet = use_fetch_dataset(dataSetCodes);
3715
+ const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.t, dataSet));
3541
3716
  return data;
3542
3717
  }
3543
3718
  /* ESM default export */ const AccessInputvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
@@ -3573,6 +3748,7 @@ function useColumnConfig(options) {
3573
3748
  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)=>({
3574
3749
  ...item,
3575
3750
  label: item.title,
3751
+ minWidth: 110,
3576
3752
  prop: item.dataIndex
3577
3753
  })));
3578
3754
  const setCurrentRow = (row)=>{
@@ -3984,7 +4160,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
3984
4160
  indexTypeCode: data.indexTypeCode
3985
4161
  }
3986
4162
  });
3987
- return res?.data;
4163
+ return res?.data?.bizOutputParam;
3988
4164
  };
3989
4165
  /** 处理检索结果 */ const handleSearchResult = (res, cardInfo)=>{
3990
4166
  // 查询的结果 超过一条 则需要 弹出弹窗让用户选择
@@ -4018,7 +4194,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4018
4194
  columns: res.data.titleAndAttribute,
4019
4195
  data: res.data.data.data ?? []
4020
4196
  };
4021
- handleSearchResult(accessResult.value);
4197
+ handleSearchResult(accessResult.value, cardInfo);
4022
4198
  }
4023
4199
  };
4024
4200
  /**
@@ -4249,186 +4425,726 @@ const BANNER_COMPONENT_CONFIG = {
4249
4425
  /** 住院检索组件的code */ searchCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE.ADMISSION_RECORD
4250
4426
  }
4251
4427
  };
4252
- const default_patientvue_type_script_setup_true_lang_ts_hoisted_1 = [
4428
+ function formatSize(val) {
4429
+ if ('string' == typeof val) return val;
4430
+ if ('number' == typeof val) return `${val}px`;
4431
+ return '48px';
4432
+ }
4433
+ function useAvatarSize(width, height) {
4434
+ const currentWidth = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>formatSize(width));
4435
+ const currentHeight = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>formatSize(height));
4436
+ return {
4437
+ currentWidth,
4438
+ currentHeight
4439
+ };
4440
+ }
4441
+ /**
4442
+ * 头像类型
4443
+ */ var utils_AVATAR_TYPE_CODE = /*#__PURE__*/ function(AVATAR_TYPE_CODE) {
4444
+ /**
4445
+ * 男性
4446
+ */ AVATAR_TYPE_CODE["WOMAN"] = "woman";
4447
+ /**
4448
+ * 女性
4449
+ */ AVATAR_TYPE_CODE["MAN"] = "man";
4450
+ /**
4451
+ * 默认
4452
+ */ AVATAR_TYPE_CODE["DEFAULT"] = "default";
4453
+ return AVATAR_TYPE_CODE;
4454
+ }({});
4455
+ const manvue_type_script_setup_true_lang_ts_hoisted_1 = [
4253
4456
  "width",
4254
4457
  "height"
4255
4458
  ];
4256
- /* ESM default export */ const default_patientvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4257
- __name: 'default_patient',
4459
+ /* ESM default export */ const manvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4460
+ __name: 'man',
4258
4461
  props: {
4259
4462
  width: {},
4260
4463
  height: {}
4261
4464
  },
4262
4465
  setup (__props) {
4263
- const currentWidth = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
4264
- if ("string" == typeof __props.width) return __props.width;
4265
- if ("number" == typeof __props.width) return `${__props.width}px`;
4266
- return "48px"; // 默认值
4267
- });
4268
- const currentHeight = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
4269
- if ("string" == typeof __props.height) return __props.height;
4270
- if ("number" == typeof __props.height) return `${__props.height}px`;
4271
- return "48px"; // 默认值
4272
- });
4466
+ const { currentWidth, currentHeight } = useAvatarSize(__props.width, __props.height);
4273
4467
  return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("svg", {
4274
- width: currentWidth.value,
4275
- height: currentHeight.value,
4468
+ width: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentWidth),
4469
+ height: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentHeight),
4276
4470
  viewBox: "0 0 48 48",
4277
4471
  version: "1.1",
4278
4472
  xmlns: "http://www.w3.org/2000/svg",
4279
4473
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
4280
4474
  }, _cache[0] || (_cache[0] = [
4281
- (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)
4282
- ]), 8, default_patientvue_type_script_setup_true_lang_ts_hoisted_1));
4475
+ (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)
4476
+ ]), 8, manvue_type_script_setup_true_lang_ts_hoisted_1));
4283
4477
  }
4284
4478
  });
4285
- const default_patient_exports_ = default_patientvue_type_script_setup_true_lang_ts;
4286
- /* ESM default export */ const default_patient = default_patient_exports_;
4287
- const man_patientvue_type_script_setup_true_lang_ts_hoisted_1 = [
4479
+ const man_exports_ = manvue_type_script_setup_true_lang_ts;
4480
+ /* ESM default export */ const man = man_exports_;
4481
+ const womenvue_type_script_setup_true_lang_ts_hoisted_1 = [
4288
4482
  "width",
4289
4483
  "height"
4290
4484
  ];
4291
- /* ESM default export */ const man_patientvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4292
- __name: 'man_patient',
4485
+ /* ESM default export */ const womenvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4486
+ __name: 'women',
4293
4487
  props: {
4294
4488
  width: {},
4295
4489
  height: {}
4296
4490
  },
4297
4491
  setup (__props) {
4298
- const currentWidth = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
4299
- if ("string" == typeof __props.width) return __props.width;
4300
- if ("number" == typeof __props.width) return `${__props.width}px`;
4301
- return "48px"; // 默认值
4302
- });
4303
- const currentHeight = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
4304
- if ("string" == typeof __props.height) return __props.height;
4305
- if ("number" == typeof __props.height) return `${__props.height}px`;
4306
- return "48px"; // 默认值
4307
- });
4492
+ const { currentWidth, currentHeight } = useAvatarSize(__props.width, __props.height);
4308
4493
  return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("svg", {
4309
- width: currentWidth.value,
4310
- height: currentHeight.value,
4494
+ width: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentWidth),
4495
+ height: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentHeight),
4311
4496
  viewBox: "0 0 48 48",
4312
4497
  version: "1.1",
4313
4498
  xmlns: "http://www.w3.org/2000/svg",
4314
4499
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
4315
4500
  }, _cache[0] || (_cache[0] = [
4316
- (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)
4317
- ]), 8, man_patientvue_type_script_setup_true_lang_ts_hoisted_1));
4501
+ (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)
4502
+ ]), 8, womenvue_type_script_setup_true_lang_ts_hoisted_1));
4318
4503
  }
4319
4504
  });
4320
- const man_patient_exports_ = man_patientvue_type_script_setup_true_lang_ts;
4321
- /* ESM default export */ const man_patient = man_patient_exports_;
4322
- const women_patientvue_type_script_setup_true_lang_ts_hoisted_1 = [
4505
+ const women_exports_ = womenvue_type_script_setup_true_lang_ts;
4506
+ /* ESM default export */ const women = women_exports_;
4507
+ const defaultvue_type_script_setup_true_lang_ts_hoisted_1 = [
4323
4508
  "width",
4324
4509
  "height"
4325
4510
  ];
4326
- /* ESM default export */ const women_patientvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4327
- __name: 'women_patient',
4511
+ /* ESM default export */ const defaultvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4512
+ __name: 'default',
4328
4513
  props: {
4329
4514
  width: {},
4330
4515
  height: {}
4331
4516
  },
4332
4517
  setup (__props) {
4333
- const currentWidth = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
4334
- if ("string" == typeof __props.width) return __props.width;
4335
- if ("number" == typeof __props.width) return `${__props.width}px`;
4336
- return "48px"; // 默认值
4337
- });
4338
- const currentHeight = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
4339
- if ("string" == typeof __props.height) return __props.height;
4340
- if ("number" == typeof __props.height) return `${__props.height}px`;
4341
- return "48px"; // 默认值
4342
- });
4518
+ const { currentWidth, currentHeight } = useAvatarSize(__props.width, __props.height);
4343
4519
  return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("svg", {
4344
- width: currentWidth.value,
4345
- height: currentHeight.value,
4520
+ width: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentWidth),
4521
+ height: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(currentHeight),
4346
4522
  viewBox: "0 0 48 48",
4347
4523
  version: "1.1",
4348
4524
  xmlns: "http://www.w3.org/2000/svg",
4349
4525
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
4350
4526
  }, _cache[0] || (_cache[0] = [
4351
- (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)
4352
- ]), 8, women_patientvue_type_script_setup_true_lang_ts_hoisted_1));
4527
+ (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)
4528
+ ]), 8, defaultvue_type_script_setup_true_lang_ts_hoisted_1));
4353
4529
  }
4354
4530
  });
4355
- const women_patient_exports_ = women_patientvue_type_script_setup_true_lang_ts;
4356
- /* ESM default export */ const women_patient = women_patient_exports_;
4357
- const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1 = {
4358
- class: "border-r border-[#C9C9C9] pr-5 mr-5"
4359
- };
4360
- const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2 = {
4361
- class: "flex min-w-32 items-start justify-start"
4362
- };
4363
- const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_3 = {
4364
- class: "ml-[12px] flex-1"
4365
- };
4366
- const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_4 = {
4367
- class: "flex-1 flex flex-col gap-3 text-center"
4368
- };
4369
- const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_5 = {
4370
- class: "flex-1 text-center leading-[14px]"
4371
- };
4372
- const _hoisted_6 = {
4373
- class: "min-w-7"
4374
- };
4375
- const _hoisted_7 = {
4376
- class: "min-w-7 ml-2"
4377
- };
4378
- const _hoisted_8 = {
4379
- class: "flex justify-center"
4380
- };
4381
- const _hoisted_9 = {
4382
- key: 0,
4383
- class: "rounded-full bg-[#00AB44] px-1.5 text-center text-white mt-3 flex-1"
4384
- };
4385
- const _hoisted_10 = {
4386
- class: "mr-2"
4387
- };
4388
- const _hoisted_11 = {
4389
- class: "text-[#555]"
4390
- };
4391
- const _hoisted_12 = {
4392
- class: "w-full"
4531
+ const default_exports_ = defaultvue_type_script_setup_true_lang_ts;
4532
+ /* ESM default export */ const composable_default = default_exports_;
4533
+ /* ESM default export */ const pro_avatarvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4534
+ __name: 'index',
4535
+ props: {
4536
+ type: {},
4537
+ width: {},
4538
+ height: {}
4539
+ },
4540
+ setup (__props) {
4541
+ const props = __props;
4542
+ const avatarType = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.type || utils_AVATAR_TYPE_CODE.DEFAULT);
4543
+ const avatarComponent = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
4544
+ if (avatarType.value === utils_AVATAR_TYPE_CODE.MAN) return man;
4545
+ if (avatarType.value === utils_AVATAR_TYPE_CODE.WOMAN) return women;
4546
+ return composable_default;
4547
+ });
4548
+ return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)(avatarComponent.value), {
4549
+ width: props.width,
4550
+ height: props.height
4551
+ }, null, 8, [
4552
+ "width",
4553
+ "height"
4554
+ ]));
4555
+ }
4556
+ });
4557
+ const pro_avatar_exports_ = pro_avatarvue_type_script_setup_true_lang_ts;
4558
+ /* ESM default export */ const pro_avatar = pro_avatar_exports_;
4559
+ /**
4560
+ * [1-10473-1]根据条件查询标签分组V1(含标签)
4561
+ * @param params
4562
+ * @returns
4563
+ */ const queryTagGroupByExampleV1 = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagGroupByExampleV1', params);
4564
+ /* ESM default export */ const SelectDropdownvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4565
+ __name: 'SelectDropdown',
4566
+ props: {
4567
+ modelValue: {},
4568
+ hasSelect: {},
4569
+ tableData: {},
4570
+ allTagsMap: {},
4571
+ multiple: {
4572
+ type: Boolean
4573
+ },
4574
+ disabled: {
4575
+ type: Boolean
4576
+ },
4577
+ tagSize: {},
4578
+ placeholder: {}
4579
+ },
4580
+ emits: [
4581
+ 'update:modelValue',
4582
+ 'change',
4583
+ 'blur'
4584
+ ],
4585
+ setup (__props, { emit: __emit }) {
4586
+ const props = __props;
4587
+ const emit = __emit;
4588
+ const selectList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>Array.isArray(props.hasSelect) ? props.hasSelect : props.hasSelect ? [
4589
+ props.hasSelect
4590
+ ] : []);
4591
+ const selectClass = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.multiple ? 'w-60' : 'w-full');
4592
+ const innerValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)({
4593
+ get: ()=>props.modelValue,
4594
+ set: (val)=>emit('update:modelValue', val)
4595
+ });
4596
+ function handleChange(val) {
4597
+ emit('change', val);
4598
+ }
4599
+ function handleBlur(e) {
4600
+ emit('blur', e);
4601
+ }
4602
+ return (_ctx, _cache)=>{
4603
+ const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
4604
+ const _component_el_option_group = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option-group");
4605
+ const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
4606
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
4607
+ modelValue: innerValue.value,
4608
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>innerValue.value = $event),
4609
+ multiple: props.multiple ?? true,
4610
+ filterable: "",
4611
+ disabled: props.disabled ?? false,
4612
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(selectClass.value),
4613
+ placeholder: props.placeholder ?? '请选择',
4614
+ onChange: handleChange,
4615
+ onBlur: handleBlur,
4616
+ "collapse-tags": "",
4617
+ "collapse-tags-tooltip": ""
4618
+ }, {
4619
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
4620
+ ((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, {
4621
+ key: group.tagGroupId,
4622
+ label: group.tagGroupNameDisplay,
4623
+ value: group.tagGroupId
4624
+ }, {
4625
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
4626
+ ((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, {
4627
+ key: item.tagId,
4628
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)((selectList.value || []).includes(item.tagId) ? {} : {
4629
+ background: _ctx.allTagsMap.get(item.tagId)?.background,
4630
+ color: _ctx.allTagsMap.get(item.tagId)?.color
4631
+ }),
4632
+ disabled: (selectList.value || []).includes(item.tagId),
4633
+ label: item.tagNameDisplay,
4634
+ value: item.tagId
4635
+ }, null, 8, [
4636
+ "style",
4637
+ "disabled",
4638
+ "label",
4639
+ "value"
4640
+ ]))), 128))
4641
+ ]),
4642
+ _: 2
4643
+ }, 1032, [
4644
+ "label",
4645
+ "value"
4646
+ ]))), 128))
4647
+ ]),
4648
+ _: 1
4649
+ }, 8, [
4650
+ "modelValue",
4651
+ "multiple",
4652
+ "disabled",
4653
+ "class",
4654
+ "placeholder"
4655
+ ]);
4656
+ };
4657
+ }
4658
+ });
4659
+ const SelectDropdown_exports_ = SelectDropdownvue_type_script_lang_ts_setup_true;
4660
+ /* ESM default export */ const SelectDropdown = SelectDropdown_exports_;
4661
+ const tag_selectvue_type_script_lang_ts_setup_true_hoisted_1 = {
4662
+ class: "flex flex-wrap gap-2"
4393
4663
  };
4394
- /* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4395
- __name: 'BannerInfo',
4664
+ const BACKGROUND_COLOR = 'BACKGROUND_COLOR';
4665
+ const FONT_COLOR = 'FONT_COLOR';
4666
+ const SELECT_WIDTH = 15; // rem
4667
+ const TAG_MARGIN = 1; // 1rem
4668
+ /* ESM default export */ const tag_selectvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4669
+ __name: 'index',
4396
4670
  props: {
4397
- code: {},
4398
- bizId: {},
4399
- isBg: {
4671
+ bizIdTypeCode: {
4672
+ default: ''
4673
+ },
4674
+ bizId: {
4675
+ default: ''
4676
+ },
4677
+ class: {
4678
+ default: 'w-full'
4679
+ },
4680
+ tagList: {
4681
+ default: ()=>[]
4682
+ },
4683
+ disabled: {
4684
+ type: Boolean,
4685
+ default: false
4686
+ },
4687
+ multiple: {
4400
4688
  type: Boolean,
4401
4689
  default: true
4690
+ },
4691
+ tagSize: {
4692
+ default: 'large'
4402
4693
  }
4403
4694
  },
4404
- setup (__props, { expose: __expose }) {
4405
- const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
4406
- const bannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4407
- const initBannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4408
- const isTextOverflowing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
4409
- // 确保布局列数为有效数字
4410
- const parseLayoutColumns = (value)=>{
4411
- const parsed = parseInt(value, 10);
4412
- if (isNaN(parsed)) return 6;
4413
- return parsed;
4414
- };
4415
- // 计算实际布局列数
4416
- const layoutColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>parseLayoutColumns(bannerInfo.value?.layoutTypeCode));
4417
- /** 获取banner配置 */ const queryBannerConfig = async ()=>{
4418
- loading.value = true;
4419
- if (!__props.bizId && initBannerInfo.value) {
4420
- bannerInfo.value = initBannerInfo.value;
4421
- loading.value = false;
4422
- return;
4423
- }
4695
+ emits: [
4696
+ 'change'
4697
+ ],
4698
+ setup (__props, { emit: __emit }) {
4699
+ const emit = __emit;
4700
+ const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
4701
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
4702
+ const props = __props;
4703
+ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tagList || []);
4704
+ const selectValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
4705
+ const selectVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
4706
+ const SelectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4707
+ const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4708
+ const moreButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4709
+ const realMaxNum = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(2);
4710
+ // 计算rem到px的转换
4711
+ const getRemValue = (rem)=>rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
4712
+ // 常量定义
4713
+ const MORE_BUTTON_WIDTH = 5 + TAG_MARGIN; // rem
4714
+ // 计算所有标签的映射,方便通过tagId查找tagNameDisplay
4715
+ const allTagsMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
4716
+ const map = new Map();
4717
+ tableData.value.forEach((group)=>{
4718
+ group.tagList.forEach((tag)=>{
4719
+ map.set(tag.tagId, {
4720
+ tagNameDisplay: tag.tagNameDisplay,
4721
+ background: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === BACKGROUND_COLOR)?.cssValue || '',
4722
+ color: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === FONT_COLOR)?.cssValue || ''
4723
+ });
4724
+ });
4725
+ });
4726
+ return map;
4727
+ });
4728
+ const calcMaxNum = (wrapperNode)=>{
4729
+ if (!wrapperNode || !attrs.modelValue) return;
4730
+ const modelValue = Array.isArray(attrs.modelValue) ? attrs.modelValue : [
4731
+ attrs.modelValue
4732
+ ];
4733
+ if (!modelValue.length) {
4734
+ realMaxNum.value = 0;
4735
+ return;
4736
+ }
4737
+ // 计算每个标签的宽度
4738
+ const tagWidths = modelValue.map((item)=>{
4739
+ // 为每个标签创建独立的容器
4740
+ const tagContainer = document.createElement('div');
4741
+ tagContainer.style.position = 'absolute';
4742
+ tagContainer.style.visibility = 'hidden';
4743
+ document.body.appendChild(tagContainer);
4744
+ const vnode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
4745
+ closable: !props.disabled,
4746
+ size: props.tagSize,
4747
+ disableTransitions: true,
4748
+ class: 'mr-4'
4749
+ }, ()=>allTagsMap.value.get(item)?.tagNameDisplay || item);
4750
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(vnode, tagContainer);
4751
+ const width = tagContainer.firstElementChild?.getBoundingClientRect().width || 0;
4752
+ document.body.removeChild(tagContainer);
4753
+ return width + getRemValue(TAG_MARGIN);
4754
+ });
4755
+ // 计算可用宽度
4756
+ const availableWidth = wrapperNode.offsetWidth - (props.disabled ? 0 : getRemValue(SELECT_WIDTH));
4757
+ const totalWidth = tagWidths.reduce((sum, width)=>sum + width, 0);
4758
+ // 如果所有标签都能显示,直接显示所有标签
4759
+ if (totalWidth <= availableWidth) {
4760
+ realMaxNum.value = modelValue.length;
4761
+ return;
4762
+ }
4763
+ // 如果放不下所有标签,需要显示更多按钮
4764
+ const availableWidthWithMore = availableWidth - getRemValue(MORE_BUTTON_WIDTH);
4765
+ // 计算可以显示多少个标签
4766
+ let currentWidth = 0;
4767
+ let count = 0;
4768
+ for (const width of tagWidths)if (currentWidth + width <= availableWidthWithMore) {
4769
+ currentWidth += width;
4770
+ count++;
4771
+ } else break;
4772
+ realMaxNum.value = count;
4773
+ };
4774
+ // Methods
4775
+ const handleClose = (bizId)=>{
4776
+ if (Array.isArray(attrs.modelValue)) {
4777
+ const newModelValue = attrs.modelValue.filter((id)=>id !== bizId);
4778
+ change(newModelValue);
4779
+ } else if (attrs.modelValue === bizId) change('');
4780
+ };
4781
+ const showSelect = ()=>{
4782
+ selectVisible.value = true;
4783
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
4784
+ SelectRef.value?.focus();
4785
+ });
4786
+ };
4787
+ const handleSelectConfirm = ()=>{
4788
+ if (!selectValue.value) {
4789
+ selectVisible.value = false;
4790
+ return;
4791
+ }
4792
+ const currentValues = Array.isArray(attrs.modelValue) ? attrs.modelValue : attrs.modelValue ? [
4793
+ attrs.modelValue
4794
+ ] : [];
4795
+ if (props.multiple) {
4796
+ change([
4797
+ ...currentValues,
4798
+ ...selectValue.value
4799
+ ]);
4800
+ selectValue.value = [];
4801
+ } else {
4802
+ change([
4803
+ ...currentValues,
4804
+ selectValue.value
4805
+ ]);
4806
+ selectValue.value = '';
4807
+ }
4808
+ selectVisible.value = false;
4809
+ };
4810
+ async function fetchData() {
4811
+ if (!props.bizIdTypeCode) return;
4812
+ loading.value = true;
4813
+ let [, result] = await queryTagGroupByExampleV1({
4814
+ bizIdTypeCode: props.bizIdTypeCode,
4815
+ bizId: props.bizId,
4816
+ enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
4817
+ });
4818
+ loading.value = false;
4819
+ if (result?.success) {
4820
+ tableData.value = result.data;
4821
+ calcMaxNum(containerRef.value);
4822
+ }
4823
+ }
4824
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
4825
+ fetchData();
4826
+ // 等待所有标签渲染完成
4827
+ });
4828
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs.modelValue, ()=>{
4829
+ if (!props.multiple) {
4830
+ selectValue.value = attrs?.modelValue || '';
4831
+ return;
4832
+ }
4833
+ const modelValue = Array.isArray(attrs.modelValue) ? attrs.modelValue : attrs.modelValue ? [
4834
+ attrs.modelValue
4835
+ ] : [];
4836
+ if (modelValue.length) // 等待所有标签渲染完成
4837
+ {
4838
+ if (containerRef.value) calcMaxNum(containerRef.value);
4839
+ }
4840
+ }, {
4841
+ immediate: true
4842
+ });
4843
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.tagList, ()=>{
4844
+ tableData.value = props.tagList || [];
4845
+ });
4846
+ /**
4847
+ *
4848
+ * @param value 下拉框选择
4849
+ */ function change(value) {
4850
+ if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
4851
+ emit('change', value);
4852
+ }
4853
+ return (_ctx, _cache)=>{
4854
+ const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
4855
+ const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
4856
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
4857
+ ref_key: "containerRef",
4858
+ ref: containerRef,
4859
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(props.class)
4860
+ }, [
4861
+ props.multiple ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
4862
+ key: 0
4863
+ }, [
4864
+ ((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 ? [
4865
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
4866
+ ] : []).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), {
4867
+ key: item,
4868
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
4869
+ background: allTagsMap.value.get(item)?.background,
4870
+ color: allTagsMap.value.get(item)?.color
4871
+ }),
4872
+ closable: !props.disabled,
4873
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
4874
+ 'mr-4'
4875
+ ]),
4876
+ size: props.tagSize,
4877
+ "disable-transitions": true,
4878
+ onClose: ($event)=>handleClose(item)
4879
+ }, {
4880
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
4881
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
4882
+ ]),
4883
+ _: 2
4884
+ }, 1032, [
4885
+ "style",
4886
+ "closable",
4887
+ "size",
4888
+ "onClose"
4889
+ ]))), 128)),
4890
+ (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 ? [
4891
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
4892
+ ] : []).length > realMaxNum.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_popover, {
4893
+ key: 0,
4894
+ placement: "bottom",
4895
+ trigger: "hover"
4896
+ }, {
4897
+ reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
4898
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
4899
+ ref_key: "moreButtonRef",
4900
+ ref: moreButtonRef,
4901
+ style: {
4902
+ "margin-left": "0"
4903
+ },
4904
+ class: "mr-4"
4905
+ }, {
4906
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
4907
+ (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 ? [
4908
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
4909
+ ] : []).length - realMaxNum.value), 1)
4910
+ ]),
4911
+ _: 1
4912
+ }, 512)
4913
+ ]),
4914
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
4915
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", tag_selectvue_type_script_lang_ts_setup_true_hoisted_1, [
4916
+ ((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 ? [
4917
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
4918
+ ] : []).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), {
4919
+ key: item,
4920
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
4921
+ background: allTagsMap.value.get(item)?.background,
4922
+ color: allTagsMap.value.get(item)?.color
4923
+ }),
4924
+ closable: !props.disabled,
4925
+ size: props.tagSize,
4926
+ "disable-transitions": true,
4927
+ onClose: ($event)=>handleClose(item)
4928
+ }, {
4929
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
4930
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
4931
+ ]),
4932
+ _: 2
4933
+ }, 1032, [
4934
+ "style",
4935
+ "closable",
4936
+ "size",
4937
+ "onClose"
4938
+ ]))), 128))
4939
+ ])
4940
+ ]),
4941
+ _: 1
4942
+ })) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
4943
+ selectVisible.value && !props.disabled ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
4944
+ key: 1,
4945
+ modelValue: selectValue.value,
4946
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectValue.value = $event),
4947
+ "table-data": tableData.value,
4948
+ "all-tags-map": allTagsMap.value,
4949
+ multiple: true,
4950
+ disabled: props.disabled,
4951
+ "tag-size": props.tagSize,
4952
+ "has-select": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue,
4953
+ placeholder: "请选择",
4954
+ onChange: _cache[1] || (_cache[1] = ()=>{
4955
+ if (!props.multiple) handleSelectConfirm();
4956
+ }),
4957
+ onBlur: handleSelectConfirm
4958
+ }, null, 8, [
4959
+ "modelValue",
4960
+ "table-data",
4961
+ "all-tags-map",
4962
+ "disabled",
4963
+ "tag-size",
4964
+ "has-select"
4965
+ ])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
4966
+ 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, {
4967
+ key: 2,
4968
+ style: {
4969
+ "margin-left": "0"
4970
+ },
4971
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)({
4972
+ 'pointer-events-none': props.disabled
4973
+ }),
4974
+ onClick: showSelect
4975
+ }, {
4976
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[3] || (_cache[3] = [
4977
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" + ", -1)
4978
+ ])),
4979
+ _: 1,
4980
+ __: [
4981
+ 3
4982
+ ]
4983
+ }, 8, [
4984
+ "class"
4985
+ ]))
4986
+ ], 64)) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
4987
+ key: 1,
4988
+ modelValue: selectValue.value,
4989
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>selectValue.value = $event),
4990
+ "table-data": tableData.value,
4991
+ "all-tags-map": allTagsMap.value,
4992
+ multiple: false,
4993
+ disabled: props.disabled,
4994
+ "tag-size": props.tagSize,
4995
+ placeholder: "请选择标签",
4996
+ "has-select": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue,
4997
+ onChange: change
4998
+ }, null, 8, [
4999
+ "modelValue",
5000
+ "table-data",
5001
+ "all-tags-map",
5002
+ "disabled",
5003
+ "tag-size",
5004
+ "has-select"
5005
+ ]))
5006
+ ], 2);
5007
+ };
5008
+ }
5009
+ });
5010
+ const tag_select_exports_ = tag_selectvue_type_script_lang_ts_setup_true;
5011
+ /* ESM default export */ const tag_select = tag_select_exports_;
5012
+ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1 = {
5013
+ class: "border-r border-[#C9C9C9] pr-5 mr-5"
5014
+ };
5015
+ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2 = {
5016
+ class: "flex min-w-32 items-start justify-start"
5017
+ };
5018
+ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_3 = {
5019
+ class: "ml-[12px] flex-1"
5020
+ };
5021
+ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_4 = {
5022
+ class: "flex-1 flex flex-col gap-3 text-center"
5023
+ };
5024
+ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_5 = {
5025
+ class: "flex-1 text-center leading-[14px]"
5026
+ };
5027
+ const _hoisted_6 = {
5028
+ class: "min-w-7"
5029
+ };
5030
+ const _hoisted_7 = {
5031
+ class: "min-w-7 ml-2"
5032
+ };
5033
+ const _hoisted_8 = {
5034
+ class: "flex justify-center"
5035
+ };
5036
+ const _hoisted_9 = {
5037
+ key: 0,
5038
+ class: "rounded-full bg-[#00AB44] px-1.5 text-center text-white mt-3 flex-1"
5039
+ };
5040
+ const _hoisted_10 = {
5041
+ class: "mr-2"
5042
+ };
5043
+ const _hoisted_11 = {
5044
+ class: "text-[#555]"
5045
+ };
5046
+ const _hoisted_12 = {
5047
+ class: "w-full text-[#555]"
5048
+ };
5049
+ const _hoisted_13 = {
5050
+ class: "w-full flex"
5051
+ };
5052
+ const _hoisted_14 = {
5053
+ class: "text-[#555]"
5054
+ };
5055
+ const _hoisted_15 = {
5056
+ class: "flex-1"
5057
+ };
5058
+ const _hoisted_16 = {
5059
+ key: 1
5060
+ };
5061
+ // import DefaultPatient from "../patient-access/images/default_patient.vue";
5062
+ // import ManPatient from "../patient-access/images/man_patient.vue";
5063
+ // import WomanPatient from "../patient-access/images/women_patient.vue";
5064
+ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5065
+ /* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5066
+ __name: 'BannerInfo',
5067
+ props: {
5068
+ code: {},
5069
+ bizId: {},
5070
+ isBg: {
5071
+ type: Boolean,
5072
+ default: true
5073
+ },
5074
+ menuId: {}
5075
+ },
5076
+ emits: [
5077
+ "avatarClick"
5078
+ ],
5079
+ setup (__props, { expose: __expose, emit: __emit }) {
5080
+ const emits = __emit;
5081
+ const BIZ_ID_TYPE_CODE_MAP = {
5082
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.PATIENT]: PERSON,
5083
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.REGISTRATION]: PERSON,
5084
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.CHARGE]: PERSON,
5085
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.HOSPITALIZATION]: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE.IENC_ENCOUNTER
5086
+ };
5087
+ const tagBizIdTypeCode = BIZ_ID_TYPE_CODE_MAP[__props.code];
5088
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5089
+ const bannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5090
+ const initBannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5091
+ const isTextOverflowing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5092
+ const firstDisplayWidthRatio = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(1);
5093
+ const tagBizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
5094
+ const tagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5095
+ const checkPrice = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
5096
+ const popoverSelector = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5097
+ // 确保布局列数为有效数字
5098
+ const parseLayoutColumns = (value)=>{
5099
+ const parsed = parseInt(value, 10);
5100
+ if (isNaN(parsed)) return 6;
5101
+ return parsed;
5102
+ };
5103
+ // 计算实际布局列数
5104
+ const layoutColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>parseLayoutColumns(bannerInfo.value?.layoutTypeCode));
5105
+ function setBizId(data) {
5106
+ switch(tagBizIdTypeCode){
5107
+ case PERSON:
5108
+ tagBizId.value = data.personId;
5109
+ break;
5110
+ case __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE.IENC_ENCOUNTER:
5111
+ tagBizId.value = data.inEncounterId;
5112
+ break;
5113
+ default:
5114
+ tagBizId.value = data.personId;
5115
+ }
5116
+ }
5117
+ /** 获取banner配置 */ const queryBannerConfig = async ()=>{
5118
+ loading.value = true;
5119
+ if (!__props.bizId && initBannerInfo.value) {
5120
+ bannerInfo.value = initBannerInfo.value;
5121
+ tagIds.value = [];
5122
+ tagBizId.value = "";
5123
+ loading.value = false;
5124
+ return;
5125
+ }
4424
5126
  const [, res] = await getBannerDataByBizId({
5127
+ menuId: __props.menuId,
4425
5128
  bizId: __props.bizId ?? void 0,
4426
5129
  bizIdTypeCode: BANNER_COMPONENT_CONFIG[__props.code].bizIdTypeCode,
4427
5130
  componentId: BANNER_COMPONENT_CONFIG[__props.code].componentId
4428
5131
  });
4429
5132
  loading.value = false;
4430
5133
  if (res?.success) {
5134
+ // 预交金金额
5135
+ const depositBalanceAmt = res.data?.bannerItemList?.find((item)=>"depositBalanceAmt" === item.formCtlNo);
5136
+ // 未结金额
5137
+ const unSettleAmt = res.data?.bannerItemList?.find((item)=>"unSettleAmt" === item.formCtlNo);
5138
+ // 欠费下限金额
5139
+ const arrearageAmt = res.data?.bannerItemList?.find((item)=>"arrearageAmt" === item.formCtlNo);
5140
+ checkPrice.value = Number(depositBalanceAmt?.dataValue) - Number(unSettleAmt?.dataValue) - Number(arrearageAmt?.dataValue);
4431
5141
  res.data.bannerItemList = (res?.data?.bannerItemList ?? [])?.filter((item)=>item?.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
5142
+ setBizId({
5143
+ personId: res.data?.personId || "",
5144
+ inEncounterId: res.data?.inEncounterId || ""
5145
+ });
5146
+ fetchBizTagListByExample();
5147
+ firstDisplayWidthRatio.value = res.data.bannerItemList[0]?.displayWidthRatio || 1;
4432
5148
  if (!__props.bizId) initBannerInfo.value = res?.data;
4433
5149
  bannerInfo.value = res?.data;
4434
5150
  }
@@ -4446,10 +5162,26 @@ const _hoisted_12 = {
4446
5162
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(async ()=>{
4447
5163
  await queryBannerConfig();
4448
5164
  });
5165
+ /**
5166
+ * 获取当前的标签
5167
+ */ async function fetchBizTagListByExample() {
5168
+ if (!tagBizId.value || !tagBizIdTypeCode) {
5169
+ tagIds.value = [];
5170
+ return;
5171
+ }
5172
+ let [, result] = await queryBizTagListByExample({
5173
+ bizIdTypeCode: tagBizIdTypeCode,
5174
+ bizId: tagBizId.value
5175
+ });
5176
+ if (result?.success) tagIds.value = (result.data || []).map((item)=>item.tagId);
5177
+ }
4449
5178
  __expose({
4450
- refresh: queryBannerConfig
5179
+ refresh: queryBannerConfig,
5180
+ popoverSelector: popoverSelector
4451
5181
  });
4452
- return (_ctx, _cache)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
5182
+ return (_ctx, _cache)=>{
5183
+ const _component_el_text = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-text");
5184
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
4453
5185
  class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
4454
5186
  {
4455
5187
  ['bg-fill-lighter']: _ctx.isBg
@@ -4460,22 +5192,19 @@ const _hoisted_12 = {
4460
5192
  }, [
4461
5193
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1, [
4462
5194
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2, [
4463
- bannerInfo.value?.genderCode === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.SEX_CODE).MAN ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(man_patient, {
4464
- key: 0,
4465
- class: "rounded-full",
4466
- width: 32,
4467
- height: 32
4468
- })) : bannerInfo.value?.genderCode === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.SEX_CODE).WOMAN ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(women_patient, {
4469
- key: 1,
4470
- class: "rounded-full",
4471
- width: 32,
4472
- height: 32
4473
- })) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(default_patient, {
4474
- key: 2,
4475
- width: 32,
4476
- height: 32,
4477
- class: "rounded-full"
4478
- })),
5195
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
5196
+ class: "cursor-pointer",
5197
+ ref_key: "popoverSelector",
5198
+ ref: popoverSelector,
5199
+ onClick: _cache[0] || (_cache[0] = ($event)=>emits('avatarClick'))
5200
+ }, [
5201
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_avatar), {
5202
+ class: "h-8 w-8 rounded-full",
5203
+ 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
5204
+ }, null, 8, [
5205
+ "type"
5206
+ ])
5207
+ ], 512),
4479
5208
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_3, [
4480
5209
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_4, [
4481
5210
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
@@ -4519,21 +5248,50 @@ const _hoisted_12 = {
4519
5248
  }, [
4520
5249
  ((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", {
4521
5250
  key: item.formDesignDetailId,
4522
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)({
4523
- [`col-span-${Math.floor(item.displayWidthRatio * Number(layoutColumns.value))}`]: true
4524
- })
5251
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5252
+ "min-h-6",
5253
+ {
5254
+ [`col-span-${Math.floor(item.displayWidthRatio * Number(layoutColumns.value))}`]: true
5255
+ }
5256
+ ])
4525
5257
  }, [
4526
5258
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
4527
5259
  class: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
4528
5260
  onMouseenter: checkTextOverflow
4529
5261
  }, [
4530
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_11, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.labelNameDisplay) + ":", 1),
5262
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_11, [
5263
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_text, {
5264
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)('depositBalanceAmt' === item.formCtlNo && checkPrice.value < 0 ? '' : 'text-[#555]'),
5265
+ type: 'depositBalanceAmt' === item.formCtlNo && checkPrice.value < 0 ? 'danger' : ''
5266
+ }, {
5267
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5268
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.labelNameDisplay) + ":", 1)
5269
+ ]),
5270
+ _: 2
5271
+ }, 1032, [
5272
+ "class",
5273
+ "type"
5274
+ ])
5275
+ ]),
4531
5276
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTooltip), {
4532
5277
  disabled: !isTextOverflowing.value,
4533
5278
  content: item.dataValue
4534
5279
  }, {
4535
5280
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
4536
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_12, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.dataValue || "--"), 1)
5281
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_12, [
5282
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_text, {
5283
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)('depositBalanceAmt' === item.formCtlNo && checkPrice.value < 0 ? '' : 'text-[#555]'),
5284
+ type: 'depositBalanceAmt' === item.formCtlNo && checkPrice.value < 0 ? 'danger' : ''
5285
+ }, {
5286
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5287
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.dataValue || "--"), 1)
5288
+ ]),
5289
+ _: 2
5290
+ }, 1032, [
5291
+ "class",
5292
+ "type"
5293
+ ])
5294
+ ])
4537
5295
  ]),
4538
5296
  _: 2
4539
5297
  }, 1032, [
@@ -4541,7 +5299,32 @@ const _hoisted_12 = {
4541
5299
  "content"
4542
5300
  ])
4543
5301
  ], 32)
4544
- ], 2))), 128))
5302
+ ], 2))), 128)),
5303
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
5304
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5305
+ "min-h-6",
5306
+ {
5307
+ [`col-span-${Number(layoutColumns.value)}`]: true
5308
+ }
5309
+ ])
5310
+ }, [
5311
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", _hoisted_13, [
5312
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_14, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode) === PERSON ? "患者标签:" : "就诊标签"), 1),
5313
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_15, [
5314
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode) && tagIds.value.length ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(tag_select, {
5315
+ key: 0,
5316
+ modelValue: tagIds.value,
5317
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>tagIds.value = $event),
5318
+ tagSize: "default",
5319
+ bizIdTypeCode: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode),
5320
+ disabled: true
5321
+ }, null, 8, [
5322
+ "modelValue",
5323
+ "bizIdTypeCode"
5324
+ ])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_16, "--"))
5325
+ ])
5326
+ ])
5327
+ ], 2)
4545
5328
  ], 2)
4546
5329
  ], 6)), [
4547
5330
  [
@@ -4549,6 +5332,7 @@ const _hoisted_12 = {
4549
5332
  loading.value
4550
5333
  ]
4551
5334
  ]);
5335
+ };
4552
5336
  }
4553
5337
  });
4554
5338
  const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent;
@@ -4941,6 +5725,12 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
4941
5725
  * type 数据源格式类型代码
4942
5726
  * @param [type='BASE64']
4943
5727
  */ function useWebPrint(content, type = constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
5728
+ const isFirefox = navigator.userAgent.includes("Firefox");
5729
+ if (isFirefox) {
5730
+ // Firefox 的特殊处理
5731
+ handleFirefoxPrint(content, type);
5732
+ return;
5733
+ }
4944
5734
  // 创建隐藏的iframe
4945
5735
  const iframe = document.createElement("iframe");
4946
5736
  iframe.style.position = "fixed";
@@ -5085,6 +5875,40 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
5085
5875
  // 将容器添加到 body
5086
5876
  document.body.appendChild(container);
5087
5877
  }
5878
+ async function handleFirefoxPrint(content, type = constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
5879
+ // 创建一个临时 div 用于渲染内容
5880
+ const tempDiv = document.createElement("div");
5881
+ tempDiv.style.position = "fixed";
5882
+ tempDiv.style.right = "0";
5883
+ tempDiv.style.bottom = "0";
5884
+ tempDiv.style.width = "0";
5885
+ tempDiv.style.height = "0";
5886
+ tempDiv.style.overflow = "hidden";
5887
+ document.body.appendChild(tempDiv);
5888
+ // 根据类型填充内容
5889
+ if (type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.H5 || type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.JSON) tempDiv.innerHTML = content;
5890
+ else if (type === constant_DATA_SOURCE_CONTENT_TYPE_CODE.BASE64) {
5891
+ const img = new Image();
5892
+ img.src = content.startsWith("data:image") ? content : `data:image/png;base64,${content}`;
5893
+ tempDiv.appendChild(img);
5894
+ // 等待图片加载
5895
+ await new Promise((resolve)=>{
5896
+ img.onload = resolve;
5897
+ img.onerror = ()=>{
5898
+ tempDiv.innerHTML = "<p>加载失败,请检查数据</p>";
5899
+ resolve(void 0);
5900
+ };
5901
+ });
5902
+ }
5903
+ // 临时显示内容并打印
5904
+ tempDiv.style.width = "100%";
5905
+ tempDiv.style.height = "100%";
5906
+ tempDiv.style.overflow = "visible";
5907
+ // 使用 window.print() 直接打印当前页面
5908
+ window.print();
5909
+ // 打印完成后移除临时元素
5910
+ document.body.removeChild(tempDiv);
5911
+ }
5088
5912
  const createPrint = ()=>{
5089
5913
  /**
5090
5914
  * 打印主步骤
@@ -5152,6 +5976,8 @@ const createPrint = ()=>{
5152
5976
  defaultContext.printParams = params;
5153
5977
  /** 1.查询单据信息 */ await fetchReceiptInfo();
5154
5978
  if (breakPrint) return;
5979
+ /**2.1 是否为不打印*/ whetherPrint();
5980
+ if (breakPrint) return;
5155
5981
  /** 2.弹窗询问 */ if (defaultContext?.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) await dialogAsk();
5156
5982
  if (breakPrint) return;
5157
5983
  /** 3.模版选择 */ await selectPrintTemplateFn();
@@ -5186,6 +6012,21 @@ const createPrint = ()=>{
5186
6012
  };
5187
6013
  };
5188
6014
  /**
6015
+ * 2.1 是否为不打印(2025-9-22 任务号【25720】)
6016
+ */ const whetherPrint = ()=>{
6017
+ const { receiptPrintRuleCode, receiptPrintCategCode, menuXReceiptList } = defaultContext.receiptInfo || {};
6018
+ if (!receiptPrintRuleCode) return;
6019
+ let code = receiptPrintCategCode;
6020
+ if (receiptPrintRuleCode === constant_RECEIPT_PRINT_RULE_CODE.MENU) {
6021
+ const menuReceiptInfo = menuXReceiptList?.find((item)=>item.menuId === defaultContext.printParams?.menuId);
6022
+ code = menuReceiptInfo?.receiptPrintCategCode || receiptPrintCategCode;
6023
+ } else code = receiptPrintCategCode;
6024
+ if (code === constant_RECEIPT_PRINT_CATEG_CODE.NO_PRINT) {
6025
+ breakPrint = true; // 如果是不打印则取消打印
6026
+ return;
6027
+ }
6028
+ };
6029
+ /**
5189
6030
  * 2.弹窗询问
5190
6031
  */ const dialogAsk = async ()=>{
5191
6032
  const { receiptPrintRuleCode, receiptPrintCategCode, redPrintCategCode, receiptNameDisplay, menuXReceiptList } = defaultContext.receiptInfo || {};
@@ -5564,7 +6405,7 @@ const print = async (params)=>{
5564
6405
  class: "min-w-[50px]"
5565
6406
  }, {
5566
6407
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5567
- _cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 打印 ")),
6408
+ _cache[0] || (_cache[0] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 打印 ", -1)),
5568
6409
  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), {
5569
6410
  key: 0,
5570
6411
  class: "el-icon--right"
@@ -5575,7 +6416,10 @@ const print = async (params)=>{
5575
6416
  _: 1
5576
6417
  })) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
5577
6418
  ]),
5578
- _: 1
6419
+ _: 1,
6420
+ __: [
6421
+ 0
6422
+ ]
5579
6423
  }, 8, [
5580
6424
  "type",
5581
6425
  "disabled"
@@ -5659,7 +6503,8 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
5659
6503
  Function
5660
6504
  ]
5661
6505
  },
5662
- filterValues: {}
6506
+ filterValues: {},
6507
+ hospitalId: {}
5663
6508
  },
5664
6509
  emits: [
5665
6510
  'change'
@@ -5696,7 +6541,7 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
5696
6541
  menuId: menuId || '',
5697
6542
  pageNumber: 1,
5698
6543
  pageSize: 100,
5699
- hospitalId: currentOrg?.orgId || '',
6544
+ hospitalId: props?.hospitalId || currentOrg?.orgId || '',
5700
6545
  ...params
5701
6546
  });
5702
6547
  loading.value = false;
@@ -5715,29 +6560,152 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
5715
6560
  let name = (tableData.value.find((item)=>item.value === value) || {})['label'];
5716
6561
  emit('change', value, name);
5717
6562
  }
5718
- const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>(tableData.value || []).filter((item)=>!(props.filterValues || []).includes(item.value) || item.value === attrs.modelValue));
6563
+ const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>(tableData.value || []).filter((item)=>!(props.filterValues || []).includes(item.value) || item.value === attrs.modelValue));
6564
+ return (_ctx, _cache)=>{
6565
+ const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
6566
+ const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
6567
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
6568
+ placeholder: `请选择${props.label}`,
6569
+ loading: loading.value && !tableData.value.length,
6570
+ disabled: props.disabled,
6571
+ remote: true,
6572
+ "remote-show-suffix": "",
6573
+ filterable: true,
6574
+ clearable: true,
6575
+ onChange: change,
6576
+ "remote-method": (value)=>{
6577
+ if (value) (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(inputChange)(value);
6578
+ else fetchData(value);
6579
+ }
6580
+ }, {
6581
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6582
+ ((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, {
6583
+ key: item.value,
6584
+ label: item.label,
6585
+ value: item.value
6586
+ }, null, 8, [
6587
+ "label",
6588
+ "value"
6589
+ ]))), 128))
6590
+ ]),
6591
+ _: 1
6592
+ }, 8, [
6593
+ "placeholder",
6594
+ "loading",
6595
+ "disabled",
6596
+ "remote-method"
6597
+ ]);
6598
+ };
6599
+ }
6600
+ });
6601
+ const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_selectvue_type_script_setup_true_lang_ts, [
6602
+ [
6603
+ '__scopeId',
6604
+ "data-v-6fd68709"
6605
+ ]
6606
+ ]);
6607
+ /* ESM default export */ const dict_select = dict_select_exports_;
6608
+ /* ESM default export */ const flag_selectvue_type_script_setup_true_lang_ts_name_FlagSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
6609
+ __name: 'index',
6610
+ emits: [
6611
+ 'change'
6612
+ ],
6613
+ setup (__props, { emit: __emit }) {
6614
+ const emit = __emit;
6615
+ const ENABLED_FLAG_OPTIONS = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>[
6616
+ {
6617
+ label: '全部',
6618
+ value: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.ALL
6619
+ },
6620
+ {
6621
+ label: '是',
6622
+ value: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
6623
+ },
6624
+ {
6625
+ label: '否',
6626
+ value: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO
6627
+ }
6628
+ ]);
6629
+ const enabledFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
6630
+ const change = (val)=>{
6631
+ emit('change', val);
6632
+ };
6633
+ return (_ctx, _cache)=>{
6634
+ const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
6635
+ const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
6636
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
6637
+ onChange: change,
6638
+ modelValue: enabledFlag.value,
6639
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>enabledFlag.value = $event),
6640
+ placeholder: "请选择"
6641
+ }, {
6642
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6643
+ ((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, {
6644
+ key: item.value,
6645
+ label: item.label,
6646
+ value: item.value
6647
+ }, null, 8, [
6648
+ "label",
6649
+ "value"
6650
+ ]))), 128))
6651
+ ]),
6652
+ _: 1
6653
+ }, 8, [
6654
+ "modelValue"
6655
+ ]);
6656
+ };
6657
+ }
6658
+ });
6659
+ const flag_select_exports_ = flag_selectvue_type_script_setup_true_lang_ts_name_FlagSelect;
6660
+ /* ESM default export */ const flag_select = flag_select_exports_;
6661
+ /* ESM default export */ const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
6662
+ __name: 'index',
6663
+ emits: [
6664
+ 'change'
6665
+ ],
6666
+ setup (__props, { emit: __emit }) {
6667
+ const { currentOrg, hospitalList } = use_app_config([
6668
+ use_app_config_MAIN_APP_CONFIG.CURRENT_ORG,
6669
+ use_app_config_MAIN_APP_CONFIG.HOSPITAL_LIST
6670
+ ]);
6671
+ const isDisabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL);
6672
+ const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
6673
+ const emit = __emit; /**
6674
+ *
6675
+ * @param value 下拉框选择
6676
+ */
6677
+ function change(value) {
6678
+ if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
6679
+ emit('change', value);
6680
+ }
6681
+ let stopWatch; /** 主动触发change */
6682
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
6683
+ stopWatch = (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>currentOrg?.orgId, ()=>{
6684
+ if (attrs?.modelValue) change(attrs.modelValue);
6685
+ else {
6686
+ 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;
6687
+ if (void 0 !== id) change(id);
6688
+ }
6689
+ }, {
6690
+ immediate: true
6691
+ });
6692
+ });
6693
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
6694
+ if (stopWatch) stopWatch();
6695
+ });
5719
6696
  return (_ctx, _cache)=>{
5720
6697
  const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
5721
6698
  const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
5722
6699
  return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
5723
- placeholder: `请选择${props.label}`,
5724
- loading: loading.value && !tableData.value.length,
5725
- disabled: props.disabled,
5726
- remote: true,
5727
- "remote-show-suffix": "",
5728
- filterable: true,
5729
- clearable: true,
5730
6700
  onChange: change,
5731
- "remote-method": (value)=>{
5732
- if (value) (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(inputChange)(value);
5733
- else fetchData(value);
5734
- }
6701
+ placeholder: "Select",
6702
+ disabled: isDisabled.value
5735
6703
  }, {
5736
6704
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5737
- ((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, {
5738
- key: item.value,
5739
- label: item.label,
5740
- value: item.value
6705
+ ((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, {
6706
+ key: item.orgId,
6707
+ label: item.orgName,
6708
+ value: item.orgId
5741
6709
  }, null, 8, [
5742
6710
  "label",
5743
6711
  "value"
@@ -5745,60 +6713,153 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
5745
6713
  ]),
5746
6714
  _: 1
5747
6715
  }, 8, [
5748
- "placeholder",
5749
- "loading",
5750
- "disabled",
5751
- "remote-method"
6716
+ "disabled"
5752
6717
  ]);
5753
6718
  };
5754
6719
  }
5755
6720
  });
5756
- const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_selectvue_type_script_setup_true_lang_ts, [
5757
- [
5758
- '__scopeId',
5759
- "data-v-54094f57"
5760
- ]
5761
- ]);
5762
- /* ESM default export */ const dict_select = dict_select_exports_;
5763
- /* ESM default export */ const flag_selectvue_type_script_setup_true_lang_ts_name_FlagSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
6721
+ const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect;
6722
+ /* ESM default export */ const hospital_select = hospital_select_exports_;
6723
+ /**
6724
+ * [1-10013-1]根据条件查询用户列表
6725
+ * @param params
6726
+ * @returns
6727
+ */ const api_queryUserList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/user/queryUserListByExample', params);
6728
+ /* ESM default export */ const user_selectvue_type_script_setup_true_lang_ts_name_UserSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5764
6729
  __name: 'index',
6730
+ props: {
6731
+ keyWord: {},
6732
+ hospitalId: {},
6733
+ userJobCodes: {},
6734
+ bizUnitId: {},
6735
+ userTypeCode: {},
6736
+ multiSelectFlag: {
6737
+ type: Boolean
6738
+ },
6739
+ defaultValue: {}
6740
+ },
5765
6741
  emits: [
5766
6742
  'change'
5767
6743
  ],
5768
- setup (__props, { emit: __emit }) {
6744
+ setup (__props, { expose: __expose, emit: __emit }) {
6745
+ const props = __props;
6746
+ const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
5769
6747
  const emit = __emit;
5770
- const ENABLED_FLAG_OPTIONS = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>[
5771
- {
5772
- label: '全部',
5773
- value: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.ALL
5774
- },
5775
- {
5776
- label: '是',
5777
- value: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
5778
- },
5779
- {
5780
- label: '否',
5781
- value: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO
6748
+ const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
6749
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
6750
+ const filterKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(''); // 检索值
6751
+ const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
6752
+ const defaultValueInserted = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
6753
+ const getUserList = async (data)=>{
6754
+ loading.value = true;
6755
+ const [, res] = await api_queryUserList({
6756
+ ...data,
6757
+ enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
6758
+ userJobCodes: props.userJobCodes,
6759
+ bizUnitId: props.bizUnitId,
6760
+ userTypeCode: props.userTypeCode,
6761
+ hospitalId: 'all' === props.hospitalId ? void 0 : props.hospitalId,
6762
+ pageNumber: 1,
6763
+ pageSize: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ONE_PAGE_SIZE
6764
+ });
6765
+ loading.value = false;
6766
+ if (res?.success) {
6767
+ let defaultList = [];
6768
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length) // 兼容表单回显时的默认值缺失
6769
+ defaultList = props.defaultValue.map((item)=>({
6770
+ ...item,
6771
+ userId: item.value || item.userId,
6772
+ userName: item.label || item.userName
6773
+ }));
6774
+ let list = (res.data ?? []).map((item)=>({
6775
+ ...item,
6776
+ label: item.userName,
6777
+ value: item.userId
6778
+ }));
6779
+ if (defaultList.length) {
6780
+ list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
6781
+ ...list,
6782
+ ...defaultList
6783
+ ], 'orgId');
6784
+ defaultValueInserted.value = true;
5782
6785
  }
5783
- ]);
5784
- const enabledFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
5785
- const change = (val)=>{
5786
- emit('change', val);
6786
+ userList.value = list.map((item)=>({
6787
+ ...item,
6788
+ label: item.userNo ? `${item.label || item.userName}|${item.userNo}` : item.label || item.userName
6789
+ }));
6790
+ }
6791
+ };
6792
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
6793
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultValueInserted.value) userList.value = [
6794
+ ...props.defaultValue
6795
+ ];
6796
+ }, {
6797
+ deep: true,
6798
+ immediate: true
6799
+ });
6800
+ const onChange = (value)=>{
6801
+ if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
6802
+ if (props.multiSelectFlag) emit('change', value);
6803
+ else {
6804
+ const user = userList.value.find((item)=>item.value === value || item.userId === value);
6805
+ emit('change', value, user);
6806
+ }
6807
+ };
6808
+ const handelRemoteMethod = async (value)=>{
6809
+ filterKeyWord.value = value || '';
6810
+ if (!value && userList.value.length) return;
6811
+ try {
6812
+ loading.value = true;
6813
+ await getUserList({
6814
+ keyWord: value
6815
+ });
6816
+ } finally{
6817
+ loading.value = false;
6818
+ }
5787
6819
  };
6820
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
6821
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
6822
+ if (props.keyWord && selectRef.value) {
6823
+ const inputEl = selectRef.value?.$el.querySelector('input');
6824
+ if (inputEl) {
6825
+ inputEl.value = props.keyWord;
6826
+ // 创建 input 事件模拟用户输入
6827
+ const event = new Event('input', {
6828
+ bubbles: true
6829
+ });
6830
+ inputEl.dispatchEvent(event);
6831
+ }
6832
+ }
6833
+ });
6834
+ });
6835
+ __expose({
6836
+ selectRef,
6837
+ defaultValueInserted,
6838
+ userList
6839
+ });
5788
6840
  return (_ctx, _cache)=>{
5789
6841
  const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
5790
6842
  const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
5791
6843
  return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
5792
- onChange: change,
5793
- modelValue: enabledFlag.value,
5794
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>enabledFlag.value = $event),
5795
- placeholder: "请选择"
6844
+ ref_key: "selectRef",
6845
+ ref: selectRef,
6846
+ remote: "",
6847
+ clearable: "",
6848
+ filterable: "",
6849
+ loading: loading.value,
6850
+ multiple: !!props.multiSelectFlag,
6851
+ "remote-method": handelRemoteMethod,
6852
+ onClear: _cache[0] || (_cache[0] = ($event)=>userList.value = []),
6853
+ onChange: onChange
5796
6854
  }, {
6855
+ label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ label })=>[
6856
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(label?.split('|')?.[0]), 1)
6857
+ ]),
5797
6858
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5798
- ((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, {
5799
- key: item.value,
5800
- label: item.label,
5801
- value: item.value
6859
+ ((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, {
6860
+ key: item.value || item.userId,
6861
+ label: item.label || item.userName,
6862
+ value: item.value || item.userId
5802
6863
  }, null, 8, [
5803
6864
  "label",
5804
6865
  "value"
@@ -5806,372 +6867,1246 @@ const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_sel
5806
6867
  ]),
5807
6868
  _: 1
5808
6869
  }, 8, [
5809
- "modelValue"
6870
+ "loading",
6871
+ "multiple"
5810
6872
  ]);
5811
6873
  };
5812
6874
  }
5813
6875
  });
5814
- const flag_select_exports_ = flag_selectvue_type_script_setup_true_lang_ts_name_FlagSelect;
5815
- /* ESM default export */ const flag_select = flag_select_exports_;
5816
- /* ESM default export */ const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
6876
+ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_UserSelect;
6877
+ /* ESM default export */ const user_select = user_select_exports_;
6878
+ /**
6879
+ * [1-10155-1] 根据条件查询业务单元列表
6880
+ * 是否分页 Y
6881
+ * @param params
6882
+ * @returns
6883
+ */ const queryBizUnitList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryBizUnitListByExample', params);
6884
+ /*
6885
+ 96-10014-1 业务单元选择组件
6886
+ 1、调用“1-10516-1 根据条件查询业务单元列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询业务单元列表
6887
+ 2、展示列包括“组织类型、编码、名称”
6888
+ */ /* ESM default export */ const biz_unit_selectvue_type_script_setup_true_lang_tsx_name_BizUnitSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
6889
+ __name: 'index',
6890
+ props: {
6891
+ keyWord: {},
6892
+ hospitalId: {},
6893
+ orgTypeCodes: {},
6894
+ multiSelectFlag: {
6895
+ type: Boolean
6896
+ },
6897
+ defaultValue: {},
6898
+ encounterTypeCode: {},
6899
+ disabledValueIds: {},
6900
+ deptId: {},
6901
+ tableProps: {},
6902
+ selectProps: {}
6903
+ },
6904
+ emits: [
6905
+ 'change'
6906
+ ],
6907
+ setup (__props, { expose: __expose, emit: __emit }) {
6908
+ const props = __props;
6909
+ const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
6910
+ const emit = __emit;
6911
+ const tableProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tableProps || {
6912
+ maxHeight: 260
6913
+ });
6914
+ const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
6915
+ const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
6916
+ const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
6917
+ const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
6918
+ const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
6919
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
6920
+ const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
6921
+ const currentRowIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
6922
+ const clearing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
6923
+ const bizUnitList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // 业务单元列表
6924
+ const selectedValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // select组件绑定的选中的值
6925
+ const selectedRows = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // table表格选中的值
6926
+ const defaultSetTableSelected = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false); // 传入的默认数据已经绑定到表格中
6927
+ const initComponentData = ()=>{
6928
+ popoverVisible.value = false;
6929
+ bizUnitList.value = [];
6930
+ selectedValue.value = void 0;
6931
+ selectedRows.value = [];
6932
+ handleChange();
6933
+ };
6934
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs?.modelValue, (newVal)=>{
6935
+ if (newVal) {
6936
+ if (!props.multiSelectFlag) {
6937
+ const item = bizUnitList.value.find((item)=>item.value === newVal);
6938
+ if (item?.label && selectedValue.value !== item.label) {
6939
+ selectedValue.value = item.label;
6940
+ selectedRows.value = [
6941
+ item
6942
+ ];
6943
+ }
6944
+ }
6945
+ } else {
6946
+ selectedValue.value = props.multiSelectFlag ? [] : void 0;
6947
+ selectedRows.value = [];
6948
+ }
6949
+ });
6950
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>[
6951
+ props.tableProps,
6952
+ props.selectProps
6953
+ ], ()=>{
6954
+ tableProps.value = props.tableProps || {
6955
+ maxHeight: 260
6956
+ };
6957
+ selectProps.value = props.selectProps || {};
6958
+ }, {
6959
+ deep: true,
6960
+ immediate: true
6961
+ });
6962
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
6963
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultSetTableSelected.value) {
6964
+ const list = props.defaultValue.map((item)=>({
6965
+ ...item,
6966
+ orgId: item.value || item.orgId,
6967
+ orgNameDisplay: item.label || item.orgNameDisplay,
6968
+ value: item.value || item.orgId,
6969
+ label: item.label || item.orgNameDisplay
6970
+ }));
6971
+ bizUnitList.value = [
6972
+ ...list
6973
+ ];
6974
+ }
6975
+ }, {
6976
+ deep: true,
6977
+ immediate: true
6978
+ });
6979
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.orgTypeCodes, (newVal, oldVal)=>{
6980
+ if (newVal && !(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isEqual)(oldVal, newVal)) initComponentData();
6981
+ });
6982
+ const tableConfig = useColumnConfig({
6983
+ getData: (t)=>[
6984
+ {
6985
+ label: t('global:select'),
6986
+ prop: 'indexNo',
6987
+ type: 'selection',
6988
+ isHidden: !props.multiSelectFlag,
6989
+ selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
6990
+ },
6991
+ {
6992
+ label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
6993
+ prop: 'orgTypeDescDisplay',
6994
+ minWidth: 80
6995
+ },
6996
+ {
6997
+ label: t('bizUnitSelect.table.orgNo', '编码'),
6998
+ prop: 'orgNo',
6999
+ minWidth: 80
7000
+ },
7001
+ {
7002
+ label: t('bizUnitSelect.table.orgNameDisplay', '名称'),
7003
+ prop: 'orgNameDisplay',
7004
+ minWidth: 80
7005
+ }
7006
+ ]
7007
+ });
7008
+ const getRowClassName = (data)=>{
7009
+ if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
7010
+ return 'cursor-pointer';
7011
+ };
7012
+ const getBizUnitList = async (data)=>{
7013
+ loading.value = true;
7014
+ const [, res] = await queryBizUnitList({
7015
+ ...data,
7016
+ hospitalId: props.hospitalId,
7017
+ orgTypeCodes: props.orgTypeCodes,
7018
+ enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
7019
+ encounterTypeCode: props.encounterTypeCode,
7020
+ deptId: props.deptId
7021
+ });
7022
+ loading.value = false;
7023
+ if (res?.success) {
7024
+ let defaultList = [];
7025
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !data?.keyWord) defaultList = props.defaultValue.map((item)=>({
7026
+ ...item,
7027
+ orgId: item.value || item.orgId,
7028
+ orgNameDisplay: item.label || item.orgNameDisplay,
7029
+ value: item.value || item.orgId,
7030
+ label: item.label || item.orgNameDisplay
7031
+ }));
7032
+ let list = (res.data ?? []).map((item)=>({
7033
+ ...item,
7034
+ label: item.orgNameDisplay,
7035
+ value: item.orgId
7036
+ }));
7037
+ if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
7038
+ ...list,
7039
+ ...defaultList
7040
+ ], 'orgId');
7041
+ bizUnitList.value = list;
7042
+ currentRowIndex.value = -1;
7043
+ tableRef.value?.eleTable?.setCurrentRow?.(void 0);
7044
+ if (bizUnitList.value.length && props.multiSelectFlag && selectedRows.value?.length && !defaultSetTableSelected.value) {
7045
+ const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
7046
+ tableRef.value?.eleTable?.clearSelection();
7047
+ bizUnitList.value.forEach((item)=>{
7048
+ if (list.some((row)=>row.orgId === item.value || row.value === item.value)) tableRef.value?.eleTable?.toggleRowSelection(item, true);
7049
+ });
7050
+ }
7051
+ defaultSetTableSelected.value = true;
7052
+ }
7053
+ };
7054
+ const handleChange = ()=>{
7055
+ let value = selectedRows.value.map((item)=>item.value || item.orgId);
7056
+ if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
7057
+ if (props.multiSelectFlag) emit('change', value);
7058
+ else {
7059
+ const data = value[0] ? bizUnitList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
7060
+ emit('change', value[0], data);
7061
+ }
7062
+ };
7063
+ const handelRemoteMethod = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(value) {
7064
+ await getBizUnitList({
7065
+ keyWord: value
7066
+ });
7067
+ }, 500); // 键盘事件
7068
+ const handleKeydown = (e)=>{
7069
+ if (!bizUnitList.value.length || !popoverVisible.value) return;
7070
+ if ('ArrowDown' === e.key) {
7071
+ e.preventDefault();
7072
+ if (currentRowIndex.value < bizUnitList.value.length - 1) {
7073
+ currentRowIndex.value++;
7074
+ const row = bizUnitList.value[currentRowIndex.value];
7075
+ tableRef.value.eleTable?.setCurrentRow(row);
7076
+ }
7077
+ } else if ('ArrowUp' === e.key) {
7078
+ e.preventDefault();
7079
+ if (currentRowIndex.value > 0) {
7080
+ currentRowIndex.value--;
7081
+ const row = bizUnitList.value[currentRowIndex.value];
7082
+ tableRef.value.eleTable?.setCurrentRow(row);
7083
+ }
7084
+ } else if ('Enter' === e.key && currentRowIndex.value >= 0) {
7085
+ const row = bizUnitList.value[currentRowIndex.value];
7086
+ if (props.multiSelectFlag) tableRef.value.eleTable?.toggleRowSelection(row);
7087
+ else {
7088
+ setTimeout(()=>{
7089
+ selectRef.value?.blur();
7090
+ }, 30);
7091
+ handleTableRowSelect(row);
7092
+ }
7093
+ }
7094
+ };
7095
+ const handleTagRemove = (tag)=>{
7096
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
7097
+ if (!selectedRows.value.length) return;
7098
+ const index = selectedRows.value?.findIndex((item)=>item.label === tag);
7099
+ if (-1 !== index) {
7100
+ selectedRows.value.splice(index, 1);
7101
+ const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
7102
+ tableRef.value?.eleTable?.clearSelection();
7103
+ list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true));
7104
+ }
7105
+ });
7106
+ };
7107
+ const handleClear = ()=>{
7108
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
7109
+ if (!popoverVisible.value) {
7110
+ clearing.value = true;
7111
+ const inputEl = selectRef.value?.$el?.querySelector('input');
7112
+ if (inputEl) inputEl.blur();
7113
+ }
7114
+ selectedRows.value = [];
7115
+ selectedValue.value = props.multiSelectFlag ? [] : '';
7116
+ tableRef.value?.eleTable?.clearSelection?.();
7117
+ tableRef.value?.eleTable?.setCurrentRow?.(void 0);
7118
+ getBizUnitList();
7119
+ handleChange();
7120
+ });
7121
+ };
7122
+ const handleFocus = ()=>{
7123
+ setTimeout(()=>{
7124
+ if (clearing.value) return;
7125
+ popoverVisible.value = true;
7126
+ }, 100);
7127
+ };
7128
+ const handleBlur = ()=>{
7129
+ if (clearing.value) {
7130
+ setTimeout(()=>{
7131
+ clearing.value = false;
7132
+ }, 150);
7133
+ return;
7134
+ }
7135
+ if (!props.multiSelectFlag) popoverVisible.value = false;
7136
+ };
7137
+ const handleClickOutside = (e)=>{
7138
+ const target = e.target;
7139
+ const selectEl = selectRef.value?.$el;
7140
+ const popoverEl = popoverRef.value?.popperRef?.contentRef;
7141
+ if (!selectEl?.contains(target) && !popoverEl?.contains(target)) popoverVisible.value = false;
7142
+ };
7143
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
7144
+ if (val) {
7145
+ document.addEventListener('keydown', handleKeydown, true);
7146
+ if (props.multiSelectFlag) document.addEventListener('click', handleClickOutside);
7147
+ } else {
7148
+ document.removeEventListener('keydown', handleKeydown, true);
7149
+ if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
7150
+ }
7151
+ });
7152
+ const handleTableRowSelect = (data)=>{
7153
+ if (data) {
7154
+ if (props.disabledValueIds?.length && data.orgId && props.disabledValueIds.includes(data.orgId)) {
7155
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(t('bizUnitSelect.errorTip.disabledRowSelectedTip', '当前数据不可选择!'));
7156
+ return;
7157
+ }
7158
+ }
7159
+ if (props.multiSelectFlag) {
7160
+ tableRef.value?.eleTable?.toggleRowSelection(data);
7161
+ return;
7162
+ }
7163
+ selectedValue.value = data?.label || data?.orgNameDisplay;
7164
+ selectedRows.value = data ? [
7165
+ data
7166
+ ] : [];
7167
+ if (data) popoverVisible.value = false;
7168
+ handleChange();
7169
+ };
7170
+ const handleSelectionChange = (items)=>{
7171
+ selectedRows.value = items;
7172
+ selectedValue.value = items.map((row)=>row.label || row.orgNameDisplay);
7173
+ handleChange();
7174
+ };
7175
+ const handlePopoverShow = ()=>{};
7176
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
7177
+ document.removeEventListener('keydown', handleKeydown, true);
7178
+ if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
7179
+ });
7180
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
7181
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
7182
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
7183
+ if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgNameDisplay);
7184
+ else {
7185
+ const data = props.defaultValue.find((item)=>item.orgId === attrs.modelValue || item.value === attrs.modelValue);
7186
+ selectedValue.value = data?.label || data?.orgNameDisplay;
7187
+ }
7188
+ selectedRows.value = props.defaultValue;
7189
+ defaultSetTableSelected.value = false;
7190
+ } else {
7191
+ selectedValue.value = props.multiSelectFlag ? [] : void 0;
7192
+ selectedRows.value = [];
7193
+ }
7194
+ if (props.keyWord && selectRef.value) {
7195
+ const inputEl = selectRef.value?.$el.querySelector('input');
7196
+ if (inputEl) {
7197
+ inputEl.value = props.keyWord; // 创建 input 事件模拟用户输入
7198
+ const event = new Event('input', {
7199
+ bubbles: true
7200
+ });
7201
+ inputEl.dispatchEvent(event);
7202
+ }
7203
+ }
7204
+ });
7205
+ });
7206
+ __expose({
7207
+ popoverRef,
7208
+ tableRef,
7209
+ selectRef,
7210
+ popoverVisible,
7211
+ defaultSetTableSelected,
7212
+ bizUnitList
7213
+ });
7214
+ return (_ctx, _cache)=>{
7215
+ const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
7216
+ const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
7217
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
7218
+ onKeydown: handleKeydown
7219
+ }, [
7220
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_popover, {
7221
+ visible: popoverVisible.value,
7222
+ ref_key: "popoverRef",
7223
+ ref: popoverRef,
7224
+ width: "1000",
7225
+ trigger: "click",
7226
+ placement: "bottom",
7227
+ onShow: handlePopoverShow
7228
+ }, {
7229
+ reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7230
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_select, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
7231
+ ref_key: "selectRef",
7232
+ ref: selectRef,
7233
+ modelValue: selectedValue.value,
7234
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectedValue.value = $event),
7235
+ placeholder: _ctx.$t('bizUnitSelect.placeholder', '请选择组织'),
7236
+ "collapse-tags": !!props.multiSelectFlag,
7237
+ remote: "",
7238
+ clearable: "",
7239
+ filterable: "",
7240
+ "remote-show-suffix": "",
7241
+ "collapse-tags-tooltip": "",
7242
+ teleported: !popoverVisible.value,
7243
+ "remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
7244
+ multiple: !!props.multiSelectFlag,
7245
+ options: [],
7246
+ "popper-class": popoverVisible.value ? 'hidden' : '',
7247
+ onRemoveTag: handleTagRemove,
7248
+ onFocus: handleFocus,
7249
+ onBlur: handleBlur,
7250
+ onClear: handleClear
7251
+ }, selectProps.value), null, 16, [
7252
+ "modelValue",
7253
+ "placeholder",
7254
+ "collapse-tags",
7255
+ "teleported",
7256
+ "remote-method",
7257
+ "multiple",
7258
+ "popper-class"
7259
+ ])
7260
+ ]),
7261
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7262
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
7263
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
7264
+ height: `${tableProps.value.maxHeight || 260}px`
7265
+ }),
7266
+ class: "w-full overflow-hidden"
7267
+ }, [
7268
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
7269
+ style: {
7270
+ height: "100%"
7271
+ },
7272
+ ref_key: "tableRef",
7273
+ ref: tableRef,
7274
+ "row-key": "orgId",
7275
+ data: bizUnitList.value,
7276
+ loading: loading.value,
7277
+ "highlight-current-row": "",
7278
+ columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
7279
+ "row-class-name": getRowClassName,
7280
+ onRowClick: handleTableRowSelect,
7281
+ onSelectionChange: handleSelectionChange
7282
+ }, tableProps.value), null, 16, [
7283
+ "data",
7284
+ "loading",
7285
+ "columns"
7286
+ ])
7287
+ ], 4)
7288
+ ]),
7289
+ _: 1
7290
+ }, 8, [
7291
+ "visible"
7292
+ ])
7293
+ ], 32);
7294
+ };
7295
+ }
7296
+ });
7297
+ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_setup_true_lang_tsx_name_BizUnitSelect;
7298
+ /* ESM default export */ const biz_unit_select = biz_unit_select_exports_;
7299
+ /**
7300
+ * [1-10154-1] 根据条件查询科室列表(平铺)
7301
+ * 是否分页 N
7302
+ * @param params
7303
+ * @returns
7304
+ */ const queryDepartmentList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryDepartmentListByExample', params);
7305
+ /*
7306
+ 96-10012-1 科室选择组件
7307
+ 1、调用“1-10154-1 根据条件查询科室列表(平铺)”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询科室列表
7308
+ 2、展示列包括“编码、名称、科室类型”"
7309
+ */ /* ESM default export */ const department_selectvue_type_script_setup_true_lang_tsx_name_DepartmentSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5817
7310
  __name: 'index',
7311
+ props: {
7312
+ keyWord: {},
7313
+ hospitalId: {},
7314
+ deptTypeCodes: {},
7315
+ encounterTypeCode: {},
7316
+ multiSelectFlag: {
7317
+ type: Boolean
7318
+ },
7319
+ defaultValue: {},
7320
+ disabledValueIds: {},
7321
+ tableProps: {},
7322
+ selectProps: {}
7323
+ },
5818
7324
  emits: [
5819
7325
  'change'
5820
7326
  ],
5821
- setup (__props, { emit: __emit }) {
5822
- const { currentOrg, hospitalList } = use_app_config([
5823
- use_app_config_MAIN_APP_CONFIG.CURRENT_ORG,
5824
- use_app_config_MAIN_APP_CONFIG.HOSPITAL_LIST
5825
- ]);
5826
- const isDisabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL);
7327
+ setup (__props, { expose: __expose, emit: __emit }) {
7328
+ const props = __props;
5827
7329
  const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
5828
- const emit = __emit; /**
5829
- *
5830
- * @param value 下拉框选择
5831
- */
5832
- function change(value) {
5833
- if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
5834
- emit('change', value);
5835
- }
5836
- let stopWatch; /** 主动触发change */
5837
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
5838
- stopWatch = (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>currentOrg?.orgId, ()=>{
5839
- if (attrs?.modelValue) change(attrs.modelValue);
7330
+ const emit = __emit;
7331
+ const tableProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tableProps || {
7332
+ maxHeight: 260
7333
+ });
7334
+ const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
7335
+ const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
7336
+ const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7337
+ const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7338
+ const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7339
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
7340
+ const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
7341
+ const currentRowIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
7342
+ const clearing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
7343
+ const departmentList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // 科室列表
7344
+ const selectedValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // select组件绑定的选中的值
7345
+ const selectedRows = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // table表格选中的值
7346
+ const defaultSetTableSelected = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false); // 传入的默认数据已经绑定到表格中
7347
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs?.modelValue, (newVal)=>{
7348
+ if (newVal) {
7349
+ if (!props.multiSelectFlag) {
7350
+ const item = departmentList.value.find((item)=>item.value === newVal);
7351
+ if (item?.label && selectedValue.value !== item.label) {
7352
+ selectedValue.value = item.label;
7353
+ selectedRows.value = [
7354
+ item
7355
+ ];
7356
+ }
7357
+ }
7358
+ } else {
7359
+ selectedValue.value = props.multiSelectFlag ? [] : void 0;
7360
+ selectedRows.value = [];
7361
+ }
7362
+ });
7363
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>[
7364
+ props.tableProps,
7365
+ props.selectProps
7366
+ ], ()=>{
7367
+ tableProps.value = props.tableProps || {
7368
+ maxHeight: 260
7369
+ };
7370
+ selectProps.value = props.selectProps || {};
7371
+ }, {
7372
+ deep: true,
7373
+ immediate: true
7374
+ });
7375
+ const tableConfig = useColumnConfig({
7376
+ getData: (t)=>[
7377
+ {
7378
+ label: t('global:select'),
7379
+ prop: 'indexNo',
7380
+ type: 'selection',
7381
+ isHidden: !props.multiSelectFlag,
7382
+ selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
7383
+ },
7384
+ {
7385
+ label: t('departmentSelect.table.orgNo', '科室编码'),
7386
+ prop: 'orgNo',
7387
+ minWidth: 80
7388
+ },
7389
+ {
7390
+ label: t('departmentSelect.table.orgName', '科室名称'),
7391
+ prop: 'orgName',
7392
+ minWidth: 80
7393
+ },
7394
+ {
7395
+ label: t('departmentSelect.table.deptTypeDesc', '科室类型'),
7396
+ prop: 'deptTypeDesc',
7397
+ minWidth: 80
7398
+ }
7399
+ ]
7400
+ });
7401
+ const getRowClassName = (data)=>{
7402
+ if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
7403
+ return 'cursor-pointer';
7404
+ };
7405
+ const getDepartmentList = async (data)=>{
7406
+ loading.value = true;
7407
+ const [, res] = await queryDepartmentList({
7408
+ ...data,
7409
+ enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
7410
+ deptTypeCodes: props.deptTypeCodes,
7411
+ encounterTypeCode: props.encounterTypeCode,
7412
+ hospitalId: props.hospitalId
7413
+ });
7414
+ loading.value = false;
7415
+ if (res?.success) {
7416
+ let defaultList = [];
7417
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !data?.keyWord) defaultList = props.defaultValue.map((item)=>({
7418
+ ...item,
7419
+ orgId: item.value || item.orgId,
7420
+ orgName: item.label || item.orgName,
7421
+ value: item.value || item.orgId,
7422
+ label: item.label || item.orgName
7423
+ }));
7424
+ let list = (res.data ?? []).map((item)=>({
7425
+ ...item,
7426
+ label: item.orgName,
7427
+ value: item.orgId
7428
+ }));
7429
+ if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
7430
+ ...list,
7431
+ ...defaultList
7432
+ ], 'orgId');
7433
+ departmentList.value = list;
7434
+ currentRowIndex.value = -1;
7435
+ tableRef.value?.eleTable?.setCurrentRow?.(void 0);
7436
+ if (departmentList.value.length && props.multiSelectFlag && selectedRows.value?.length && !defaultSetTableSelected.value) {
7437
+ const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
7438
+ tableRef.value?.eleTable?.clearSelection();
7439
+ departmentList.value.forEach((item)=>{
7440
+ if (list.some((row)=>row.orgId === item.value || row.value === item.value)) tableRef.value?.eleTable?.toggleRowSelection(item, true);
7441
+ });
7442
+ }
7443
+ defaultSetTableSelected.value = true;
7444
+ }
7445
+ };
7446
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
7447
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultSetTableSelected.value) {
7448
+ const list = props.defaultValue.map((item)=>({
7449
+ ...item,
7450
+ orgId: item.value || item.orgId,
7451
+ orgName: item.label || item.orgName,
7452
+ value: item.value || item.orgId,
7453
+ label: item.label || item.orgName
7454
+ }));
7455
+ departmentList.value = [
7456
+ ...list
7457
+ ];
7458
+ }
7459
+ }, {
7460
+ deep: true,
7461
+ immediate: true
7462
+ });
7463
+ const handleChange = ()=>{
7464
+ let value = selectedRows.value.map((item)=>item.value || item.orgId);
7465
+ if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
7466
+ if (props.multiSelectFlag) emit('change', value);
7467
+ else {
7468
+ const data = value[0] ? departmentList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
7469
+ emit('change', value[0], data);
7470
+ }
7471
+ };
7472
+ const handelRemoteMethod = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(value) {
7473
+ await getDepartmentList({
7474
+ keyWord: value
7475
+ });
7476
+ }, 500); // 键盘事件
7477
+ const handleKeydown = (e)=>{
7478
+ if (!departmentList.value.length || !popoverVisible.value) return;
7479
+ if ('ArrowDown' === e.key) {
7480
+ e.preventDefault();
7481
+ if (currentRowIndex.value < departmentList.value.length - 1) {
7482
+ currentRowIndex.value++;
7483
+ const row = departmentList.value[currentRowIndex.value];
7484
+ tableRef.value.eleTable?.setCurrentRow(row);
7485
+ }
7486
+ } else if ('ArrowUp' === e.key) {
7487
+ e.preventDefault();
7488
+ if (currentRowIndex.value > 0) {
7489
+ currentRowIndex.value--;
7490
+ const row = departmentList.value[currentRowIndex.value];
7491
+ tableRef.value.eleTable?.setCurrentRow(row);
7492
+ }
7493
+ } else if ('Enter' === e.key && currentRowIndex.value >= 0) {
7494
+ const row = departmentList.value[currentRowIndex.value];
7495
+ if (props.multiSelectFlag) tableRef.value.eleTable?.toggleRowSelection(row);
5840
7496
  else {
5841
- 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;
5842
- if (void 0 !== id) change(id);
7497
+ setTimeout(()=>{
7498
+ selectRef.value?.blur();
7499
+ }, 30);
7500
+ handleTableRowSelect(row);
5843
7501
  }
5844
- }, {
5845
- immediate: true
7502
+ }
7503
+ };
7504
+ const handleTagRemove = (tag)=>{
7505
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
7506
+ if (!selectedRows.value.length) return;
7507
+ const index = selectedRows.value?.findIndex((item)=>item.label === tag);
7508
+ if (-1 !== index) {
7509
+ selectedRows.value.splice(index, 1);
7510
+ const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
7511
+ tableRef.value?.eleTable?.clearSelection();
7512
+ list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true));
7513
+ }
7514
+ });
7515
+ };
7516
+ const handleClear = ()=>{
7517
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
7518
+ if (!popoverVisible.value) {
7519
+ clearing.value = true;
7520
+ const inputEl = selectRef.value?.$el?.querySelector('input');
7521
+ if (inputEl) inputEl.blur();
7522
+ }
7523
+ selectedRows.value = [];
7524
+ selectedValue.value = props.multiSelectFlag ? [] : '';
7525
+ tableRef.value?.eleTable?.clearSelection?.();
7526
+ tableRef.value?.eleTable?.setCurrentRow?.(void 0);
7527
+ getDepartmentList();
7528
+ handleChange();
5846
7529
  });
7530
+ };
7531
+ const handleFocus = ()=>{
7532
+ setTimeout(()=>{
7533
+ if (clearing.value) return;
7534
+ popoverVisible.value = true;
7535
+ }, 100);
7536
+ };
7537
+ const handleBlur = ()=>{
7538
+ if (clearing.value) {
7539
+ setTimeout(()=>{
7540
+ clearing.value = false;
7541
+ }, 150);
7542
+ return;
7543
+ }
7544
+ if (!props.multiSelectFlag) popoverVisible.value = false;
7545
+ };
7546
+ const handleClickOutside = (e)=>{
7547
+ const target = e.target;
7548
+ const selectEl = selectRef.value?.$el;
7549
+ const popoverEl = popoverRef.value?.popperRef?.contentRef;
7550
+ if (!selectEl?.contains(target) && !popoverEl?.contains(target)) popoverVisible.value = false;
7551
+ };
7552
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
7553
+ if (val) {
7554
+ document.addEventListener('keydown', handleKeydown, true);
7555
+ if (props.multiSelectFlag) document.addEventListener('click', handleClickOutside);
7556
+ } else {
7557
+ document.removeEventListener('keydown', handleKeydown, true);
7558
+ if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
7559
+ }
5847
7560
  });
7561
+ const handleTableRowSelect = (data)=>{
7562
+ if (data) {
7563
+ if (props.disabledValueIds?.length && data.orgId && props.disabledValueIds.includes(data.orgId)) {
7564
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(t('departmentSelect.errorTip.disabledRowSelectedTip', '当前数据不可选择!'));
7565
+ return;
7566
+ }
7567
+ }
7568
+ if (props.multiSelectFlag) {
7569
+ tableRef.value?.eleTable?.toggleRowSelection(data);
7570
+ return;
7571
+ }
7572
+ selectedValue.value = data?.label || data?.orgName;
7573
+ selectedRows.value = data ? [
7574
+ data
7575
+ ] : [];
7576
+ if (data) popoverVisible.value = false;
7577
+ handleChange();
7578
+ };
7579
+ const handleSelectionChange = (items)=>{
7580
+ selectedRows.value = items;
7581
+ selectedValue.value = items.map((row)=>row.label || row.orgName);
7582
+ handleChange();
7583
+ };
7584
+ const handlePopoverShow = ()=>{};
5848
7585
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
5849
- if (stopWatch) stopWatch();
7586
+ document.removeEventListener('keydown', handleKeydown, true);
7587
+ if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
7588
+ });
7589
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
7590
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
7591
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
7592
+ if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
7593
+ else {
7594
+ const data = props.defaultValue.find((item)=>item.orgId === attrs.modelValue || item.value === attrs.modelValue);
7595
+ selectedValue.value = data?.label || data?.orgName;
7596
+ }
7597
+ selectedRows.value = props.defaultValue;
7598
+ defaultSetTableSelected.value = false;
7599
+ } else {
7600
+ selectedValue.value = props.multiSelectFlag ? [] : void 0;
7601
+ selectedRows.value = [];
7602
+ }
7603
+ if (props.keyWord && selectRef.value) {
7604
+ const inputEl = selectRef.value?.$el.querySelector('input');
7605
+ if (inputEl) {
7606
+ inputEl.value = props.keyWord; // 创建 input 事件模拟用户输入
7607
+ const event = new Event('input', {
7608
+ bubbles: true
7609
+ });
7610
+ inputEl.dispatchEvent(event);
7611
+ }
7612
+ }
7613
+ });
7614
+ });
7615
+ __expose({
7616
+ popoverRef,
7617
+ tableRef,
7618
+ selectRef,
7619
+ popoverVisible,
7620
+ defaultSetTableSelected,
7621
+ departmentList
5850
7622
  });
5851
7623
  return (_ctx, _cache)=>{
5852
- const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
5853
7624
  const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
5854
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
5855
- onChange: change,
5856
- placeholder: "Select",
5857
- disabled: isDisabled.value
5858
- }, {
5859
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5860
- ((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, {
5861
- key: item.orgId,
5862
- label: item.orgName,
5863
- value: item.orgId
5864
- }, null, 8, [
5865
- "label",
5866
- "value"
5867
- ]))), 128))
5868
- ]),
5869
- _: 1
5870
- }, 8, [
5871
- "disabled"
5872
- ]);
7625
+ const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
7626
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
7627
+ onKeydown: handleKeydown
7628
+ }, [
7629
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_popover, {
7630
+ visible: popoverVisible.value,
7631
+ ref_key: "popoverRef",
7632
+ ref: popoverRef,
7633
+ width: "1000",
7634
+ trigger: "click",
7635
+ placement: "bottom",
7636
+ onShow: handlePopoverShow
7637
+ }, {
7638
+ reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7639
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_select, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
7640
+ ref_key: "selectRef",
7641
+ ref: selectRef,
7642
+ modelValue: selectedValue.value,
7643
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectedValue.value = $event),
7644
+ placeholder: _ctx.$t('departmentSelect.placeholder', '请选择科室'),
7645
+ "collapse-tags": !!props.multiSelectFlag,
7646
+ remote: "",
7647
+ clearable: "",
7648
+ filterable: "",
7649
+ "remote-show-suffix": "",
7650
+ "collapse-tags-tooltip": "",
7651
+ teleported: !popoverVisible.value,
7652
+ "remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
7653
+ multiple: !!props.multiSelectFlag,
7654
+ options: [],
7655
+ "popper-class": popoverVisible.value ? 'hidden' : '',
7656
+ onRemoveTag: handleTagRemove,
7657
+ onFocus: handleFocus,
7658
+ onBlur: handleBlur,
7659
+ onClear: handleClear
7660
+ }, selectProps.value), null, 16, [
7661
+ "modelValue",
7662
+ "placeholder",
7663
+ "collapse-tags",
7664
+ "teleported",
7665
+ "remote-method",
7666
+ "multiple",
7667
+ "popper-class"
7668
+ ])
7669
+ ]),
7670
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7671
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
7672
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
7673
+ height: `${tableProps.value.maxHeight || 260}px`
7674
+ }),
7675
+ class: "w-full overflow-hidden"
7676
+ }, [
7677
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
7678
+ style: {
7679
+ height: "100%"
7680
+ },
7681
+ loading: loading.value,
7682
+ ref_key: "tableRef",
7683
+ ref: tableRef,
7684
+ "row-key": "orgId",
7685
+ "highlight-current-row": "",
7686
+ columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
7687
+ data: departmentList.value,
7688
+ onRowClick: handleTableRowSelect,
7689
+ "row-class-name": getRowClassName,
7690
+ onSelectionChange: handleSelectionChange
7691
+ }, tableProps.value), null, 16, [
7692
+ "loading",
7693
+ "columns",
7694
+ "data"
7695
+ ])
7696
+ ], 4)
7697
+ ]),
7698
+ _: 1
7699
+ }, 8, [
7700
+ "visible"
7701
+ ])
7702
+ ], 32);
5873
7703
  };
5874
7704
  }
5875
7705
  });
5876
- const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect;
5877
- /* ESM default export */ const hospital_select = hospital_select_exports_;
7706
+ const department_select_exports_ = department_selectvue_type_script_setup_true_lang_tsx_name_DepartmentSelect;
7707
+ /* ESM default export */ const department_select = department_select_exports_;
5878
7708
  /**
5879
- * [1-10473-1]根据条件查询标签分组V1(含标签)
7709
+ * [1-10155-1] 根据条件查询病区列表
7710
+ * 是否分页 N
5880
7711
  * @param params
5881
7712
  * @returns
5882
- */ const queryTagGroupByExampleV1 = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagGroupByExampleV1', params);
5883
- const tag_selectvue_type_script_lang_ts_setup_true_hoisted_1 = {
5884
- class: "flex flex-wrap gap-2"
5885
- };
5886
- const SELECT_WIDTH = 15; // rem
5887
- const TAG_MARGIN = 1; // 1rem
5888
- /* ESM default export */ const tag_selectvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
7713
+ */ const queryWardList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryWardListByExample', params);
7714
+ /*
7715
+ 96-10013-1 病区选择组件
7716
+ 1、调用“1-10155-1 根据条件查询病区列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室标识”查询病区列表
7717
+ 2、展示列包括“编码、名称”
7718
+ */ /* ESM default export */ const ward_selectvue_type_script_setup_true_lang_tsx_name_WardSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5889
7719
  __name: 'index',
5890
7720
  props: {
5891
- bizIdTypeCode: {},
5892
- bizId: {},
5893
- disabled: {
7721
+ keyWord: {},
7722
+ hospitalId: {},
7723
+ deptId: {},
7724
+ multiSelectFlag: {
5894
7725
  type: Boolean
5895
- }
7726
+ },
7727
+ defaultValue: {},
7728
+ disabledValueIds: {},
7729
+ tableProps: {},
7730
+ selectProps: {}
5896
7731
  },
5897
7732
  emits: [
5898
7733
  'change'
5899
7734
  ],
5900
- setup (__props, { emit: __emit }) {
5901
- const emit = __emit;
5902
- const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
5903
- const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
7735
+ setup (__props, { expose: __expose, emit: __emit }) {
5904
7736
  const props = __props;
5905
- const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5906
- const selectValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
5907
- const selectVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5908
- const SelectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5909
- const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5910
- const moreButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5911
- const realMaxNum = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(2);
5912
- // 计算rem到px的转换
5913
- const getRemValue = (rem)=>rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
5914
- // 常量定义
5915
- const MORE_BUTTON_WIDTH = 5 + TAG_MARGIN; // rem
5916
- // 计算所有标签的映射,方便通过tagId查找tagNameDisplay
5917
- const allTagsMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
5918
- const map = new Map();
5919
- tableData.value.forEach((group)=>{
5920
- group.tagList.forEach((tag)=>{
5921
- map.set(tag.tagId, tag.tagNameDisplay);
5922
- });
7737
+ const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
7738
+ const emit = __emit;
7739
+ const tableProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tableProps || {
7740
+ maxHeight: 260
7741
+ });
7742
+ const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
7743
+ const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
7744
+ const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7745
+ const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7746
+ const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7747
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
7748
+ const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
7749
+ const currentRowIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
7750
+ const clearing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
7751
+ const wardList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // 病区列表
7752
+ const selectedValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // select组件绑定的选中的值
7753
+ const selectedRows = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // table表格选中的值
7754
+ const defaultSetTableSelected = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false); // 传入的默认数据已经绑定到表格中
7755
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs?.modelValue, (newVal)=>{
7756
+ if (newVal) {
7757
+ if (!props.multiSelectFlag) {
7758
+ const item = wardList.value.find((item)=>item.value === newVal);
7759
+ if (item?.label && selectedValue.value !== item.label) {
7760
+ selectedValue.value = item.label;
7761
+ selectedRows.value = [
7762
+ item
7763
+ ];
7764
+ }
7765
+ }
7766
+ } else {
7767
+ selectedValue.value = props.multiSelectFlag ? [] : void 0;
7768
+ selectedRows.value = [];
7769
+ }
7770
+ });
7771
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>[
7772
+ props.tableProps,
7773
+ props.selectProps
7774
+ ], ()=>{
7775
+ tableProps.value = props.tableProps || {
7776
+ maxHeight: 260
7777
+ };
7778
+ selectProps.value = props.selectProps || {};
7779
+ }, {
7780
+ deep: true,
7781
+ immediate: true
7782
+ });
7783
+ const tableConfig = useColumnConfig({
7784
+ getData: (t)=>[
7785
+ {
7786
+ label: t('global:select'),
7787
+ prop: 'indexNo',
7788
+ type: 'selection',
7789
+ isHidden: !props.multiSelectFlag,
7790
+ selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
7791
+ },
7792
+ {
7793
+ label: t('wardSelect.table.orgNo', '病区编码'),
7794
+ prop: 'orgNo',
7795
+ minWidth: 80
7796
+ },
7797
+ {
7798
+ label: t('wardSelect.table.orgName', '病区名称'),
7799
+ prop: 'orgName',
7800
+ minWidth: 80
7801
+ }
7802
+ ]
7803
+ });
7804
+ const getRowClassName = (data)=>{
7805
+ if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed';
7806
+ return 'cursor-pointer';
7807
+ };
7808
+ const getWardList = async (data)=>{
7809
+ loading.value = true;
7810
+ const [, res] = await queryWardList({
7811
+ ...data,
7812
+ enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
7813
+ deptId: props.deptId,
7814
+ hospitalId: props.hospitalId
5923
7815
  });
5924
- return map;
7816
+ loading.value = false;
7817
+ if (res?.success) {
7818
+ let defaultList = [];
7819
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !data?.keyWord) defaultList = props.defaultValue.map((item)=>({
7820
+ ...item,
7821
+ orgId: item.value || item.orgId,
7822
+ orgName: item.label || item.orgName,
7823
+ value: item.value || item.orgId,
7824
+ label: item.label || item.orgName
7825
+ }));
7826
+ let list = (res.data ?? []).map((item)=>({
7827
+ ...item,
7828
+ label: item.orgName,
7829
+ value: item.orgId
7830
+ }));
7831
+ if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
7832
+ ...list,
7833
+ ...defaultList
7834
+ ], 'orgId');
7835
+ wardList.value = list;
7836
+ currentRowIndex.value = -1;
7837
+ tableRef.value?.eleTable?.setCurrentRow?.(void 0);
7838
+ if (wardList.value.length && props.multiSelectFlag && selectedRows.value?.length && !defaultSetTableSelected.value) {
7839
+ const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
7840
+ tableRef.value?.eleTable?.clearSelection();
7841
+ wardList.value.forEach((item)=>{
7842
+ if (list.some((row)=>row.orgId === item.value || row.value === item.value)) tableRef.value?.eleTable?.toggleRowSelection(item, true);
7843
+ });
7844
+ }
7845
+ defaultSetTableSelected.value = true;
7846
+ }
7847
+ };
7848
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
7849
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultSetTableSelected.value) {
7850
+ const list = props.defaultValue.map((item)=>({
7851
+ ...item,
7852
+ orgId: item.value || item.orgId,
7853
+ orgName: item.label || item.orgName,
7854
+ value: item.value || item.orgId,
7855
+ label: item.label || item.orgName
7856
+ }));
7857
+ wardList.value = [
7858
+ ...list
7859
+ ];
7860
+ }
7861
+ }, {
7862
+ deep: true,
7863
+ immediate: true
5925
7864
  });
5926
- const calcMaxNum = (wrapperNode)=>{
5927
- if (!wrapperNode || !attrs.modelValue) return;
5928
- const modelValue = Array.isArray(attrs.modelValue) ? attrs.modelValue : [
5929
- attrs.modelValue
5930
- ];
5931
- if (!modelValue.length) {
5932
- realMaxNum.value = 0;
5933
- return;
7865
+ const handleChange = ()=>{
7866
+ let value = selectedRows.value.map((item)=>item.value || item.orgId);
7867
+ if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
7868
+ if (props.multiSelectFlag) emit('change', value);
7869
+ else {
7870
+ const data = value[0] ? wardList.value.find((item)=>item.value === value[0] || item.orgId === value[0]) : void 0;
7871
+ emit('change', value[0], data);
5934
7872
  }
5935
- // 计算每个标签的宽度
5936
- const tagWidths = modelValue.map((item)=>{
5937
- // 为每个标签创建独立的容器
5938
- const tagContainer = document.createElement('div');
5939
- tagContainer.style.position = 'absolute';
5940
- tagContainer.style.visibility = 'hidden';
5941
- document.body.appendChild(tagContainer);
5942
- const vnode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
5943
- closable: !props.disabled,
5944
- size: 'large',
5945
- disableTransitions: true,
5946
- class: 'mr-4'
5947
- }, ()=>allTagsMap.value.get(item) || item);
5948
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(vnode, tagContainer);
5949
- const width = tagContainer.firstElementChild?.getBoundingClientRect().width || 0;
5950
- document.body.removeChild(tagContainer);
5951
- return width + getRemValue(TAG_MARGIN);
7873
+ };
7874
+ const handelRemoteMethod = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(value) {
7875
+ await getWardList({
7876
+ keyWord: value
5952
7877
  });
5953
- // 计算可用宽度
5954
- const availableWidth = wrapperNode.offsetWidth - (props.disabled ? 0 : getRemValue(SELECT_WIDTH));
5955
- const totalWidth = tagWidths.reduce((sum, width)=>sum + width, 0);
5956
- // 如果所有标签都能显示,直接显示所有标签
5957
- if (totalWidth <= availableWidth) {
5958
- realMaxNum.value = modelValue.length;
5959
- return;
7878
+ }, 500); // 键盘事件
7879
+ const handleKeydown = (e)=>{
7880
+ if (!wardList.value.length || !popoverVisible.value) return;
7881
+ if ('ArrowDown' === e.key) {
7882
+ e.preventDefault();
7883
+ if (currentRowIndex.value < wardList.value.length - 1) {
7884
+ currentRowIndex.value++;
7885
+ const row = wardList.value[currentRowIndex.value];
7886
+ tableRef.value.eleTable?.setCurrentRow(row);
7887
+ }
7888
+ } else if ('ArrowUp' === e.key) {
7889
+ e.preventDefault();
7890
+ if (currentRowIndex.value > 0) {
7891
+ currentRowIndex.value--;
7892
+ const row = wardList.value[currentRowIndex.value];
7893
+ tableRef.value.eleTable?.setCurrentRow(row);
7894
+ }
7895
+ } else if ('Enter' === e.key && currentRowIndex.value >= 0) {
7896
+ const row = wardList.value[currentRowIndex.value];
7897
+ if (props.multiSelectFlag) tableRef.value.eleTable?.toggleRowSelection(row);
7898
+ else {
7899
+ setTimeout(()=>{
7900
+ selectRef.value?.blur();
7901
+ }, 30);
7902
+ handleTableRowSelect(row);
7903
+ }
5960
7904
  }
5961
- // 如果放不下所有标签,需要显示更多按钮
5962
- const availableWidthWithMore = availableWidth - getRemValue(MORE_BUTTON_WIDTH);
5963
- // 计算可以显示多少个标签
5964
- let currentWidth = 0;
5965
- let count = 0;
5966
- for (const width of tagWidths)if (currentWidth + width <= availableWidthWithMore) {
5967
- currentWidth += width;
5968
- count++;
5969
- } else break;
5970
- realMaxNum.value = count;
5971
7905
  };
5972
- // Methods
5973
- const handleClose = (bizId)=>{
5974
- if (Array.isArray(attrs.modelValue)) {
5975
- const newModelValue = attrs.modelValue.filter((id)=>id !== bizId);
5976
- change(newModelValue);
5977
- } else if (attrs.modelValue === bizId) change('');
7906
+ const handleTagRemove = (tag)=>{
7907
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
7908
+ if (!selectedRows.value.length) return;
7909
+ const index = selectedRows.value?.findIndex((item)=>item.label === tag);
7910
+ if (-1 !== index) {
7911
+ selectedRows.value.splice(index, 1);
7912
+ const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
7913
+ tableRef.value?.eleTable?.clearSelection();
7914
+ list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true));
7915
+ }
7916
+ });
5978
7917
  };
5979
- const showSelect = ()=>{
5980
- selectVisible.value = true;
7918
+ const handleClear = ()=>{
5981
7919
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
5982
- SelectRef.value?.focus();
7920
+ if (!popoverVisible.value) {
7921
+ clearing.value = true;
7922
+ const inputEl = selectRef.value?.$el?.querySelector('input');
7923
+ if (inputEl) inputEl.blur();
7924
+ }
7925
+ selectedRows.value = [];
7926
+ selectedValue.value = props.multiSelectFlag ? [] : '';
7927
+ tableRef.value?.eleTable?.clearSelection?.();
7928
+ tableRef.value?.eleTable?.setCurrentRow?.(void 0);
7929
+ getWardList();
7930
+ handleChange();
5983
7931
  });
5984
7932
  };
5985
- const handleSelectConfirm = ()=>{
5986
- if (!selectValue.value) {
5987
- selectVisible.value = false;
7933
+ const handleFocus = ()=>{
7934
+ setTimeout(()=>{
7935
+ if (clearing.value) return;
7936
+ popoverVisible.value = true;
7937
+ }, 100);
7938
+ };
7939
+ const handleBlur = ()=>{
7940
+ if (clearing.value) {
7941
+ setTimeout(()=>{
7942
+ clearing.value = false;
7943
+ }, 150);
5988
7944
  return;
5989
7945
  }
5990
- const currentValues = Array.isArray(attrs.modelValue) ? attrs.modelValue : attrs.modelValue ? [
5991
- attrs.modelValue
5992
- ] : [];
5993
- change([
5994
- ...currentValues,
5995
- selectValue.value
5996
- ]);
5997
- selectValue.value = '';
5998
- selectVisible.value = false;
7946
+ if (!props.multiSelectFlag) popoverVisible.value = false;
5999
7947
  };
6000
- async function fetchData() {
6001
- loading.value = true;
6002
- let [, result] = await queryTagGroupByExampleV1({
6003
- bizIdTypeCode: props.bizIdTypeCode,
6004
- bizId: props.bizId,
6005
- enabledFlag: 1
6006
- });
6007
- loading.value = false;
6008
- if (result?.success) {
6009
- tableData.value = result.data;
6010
- calcMaxNum(containerRef.value);
7948
+ const handleClickOutside = (e)=>{
7949
+ const target = e.target;
7950
+ const selectEl = selectRef.value?.$el;
7951
+ const popoverEl = popoverRef.value?.popperRef?.contentRef;
7952
+ if (!selectEl?.contains(target) && !popoverEl?.contains(target)) popoverVisible.value = false;
7953
+ };
7954
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
7955
+ if (val) {
7956
+ document.addEventListener('keydown', handleKeydown, true);
7957
+ if (props.multiSelectFlag) document.addEventListener('click', handleClickOutside);
7958
+ } else {
7959
+ document.removeEventListener('keydown', handleKeydown, true);
7960
+ if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
6011
7961
  }
6012
- }
6013
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
6014
- fetchData();
6015
- // 等待所有标签渲染完成
6016
7962
  });
6017
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs.modelValue, ()=>{
6018
- const modelValue = Array.isArray(attrs.modelValue) ? attrs.modelValue : attrs.modelValue ? [
6019
- attrs.modelValue
6020
- ] : [];
6021
- if (modelValue.length) // 等待所有标签渲染完成
6022
- {
6023
- if (containerRef.value) calcMaxNum(containerRef.value);
7963
+ const handleTableRowSelect = (data)=>{
7964
+ if (data) {
7965
+ if (props.disabledValueIds?.length && data.orgId && props.disabledValueIds.includes(data.orgId)) {
7966
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(t('wardSelect.errorTip.disabledRowSelectedTip', '当前数据不可选择!'));
7967
+ return;
7968
+ }
7969
+ }
7970
+ if (props.multiSelectFlag) {
7971
+ tableRef.value?.eleTable?.toggleRowSelection(data);
7972
+ return;
6024
7973
  }
7974
+ selectedValue.value = data?.label || data?.orgName;
7975
+ selectedRows.value = data ? [
7976
+ data
7977
+ ] : [];
7978
+ if (data) popoverVisible.value = false;
7979
+ handleChange();
7980
+ };
7981
+ const handleSelectionChange = (items)=>{
7982
+ selectedRows.value = items;
7983
+ selectedValue.value = items.map((row)=>row.label || row.orgName);
7984
+ handleChange();
7985
+ };
7986
+ const handlePopoverShow = ()=>{};
7987
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
7988
+ document.removeEventListener('keydown', handleKeydown, true);
7989
+ if (props.multiSelectFlag) document.removeEventListener('click', handleClickOutside);
7990
+ });
7991
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
7992
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
7993
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
7994
+ if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgName);
7995
+ else {
7996
+ const data = props.defaultValue.find((item)=>item.orgId === attrs.modelValue || item.value === attrs.modelValue);
7997
+ selectedValue.value = data?.label || data?.orgName;
7998
+ }
7999
+ selectedRows.value = props.defaultValue;
8000
+ defaultSetTableSelected.value = false;
8001
+ } else {
8002
+ selectedValue.value = props.multiSelectFlag ? [] : void 0;
8003
+ selectedRows.value = [];
8004
+ }
8005
+ if (props.keyWord && selectRef.value) {
8006
+ const inputEl = selectRef.value?.$el.querySelector('input');
8007
+ if (inputEl) {
8008
+ inputEl.value = props.keyWord; // 创建 input 事件模拟用户输入
8009
+ const event = new Event('input', {
8010
+ bubbles: true
8011
+ });
8012
+ inputEl.dispatchEvent(event);
8013
+ }
8014
+ }
8015
+ });
8016
+ });
8017
+ __expose({
8018
+ popoverRef,
8019
+ tableRef,
8020
+ selectRef,
8021
+ popoverVisible,
8022
+ defaultSetTableSelected,
8023
+ wardList
6025
8024
  });
6026
- /**
6027
- *
6028
- * @param value 下拉框选择
6029
- */ function change(value) {
6030
- if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
6031
- emit('change', value);
6032
- }
6033
8025
  return (_ctx, _cache)=>{
6034
- const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
6035
- const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
6036
- const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
6037
- const _component_el_option_group = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option-group");
6038
8026
  const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
8027
+ const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
6039
8028
  return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
6040
- ref_key: "containerRef",
6041
- ref: containerRef,
6042
- class: "w-full"
8029
+ onKeydown: handleKeydown
6043
8030
  }, [
6044
- ((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 ? [
6045
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
6046
- ] : []).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), {
6047
- key: item,
6048
- closable: !props.disabled,
6049
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
6050
- 'mr-4'
6051
- ]),
6052
- size: "large",
6053
- "disable-transitions": true,
6054
- onClose: ($event)=>handleClose(item)
6055
- }, {
6056
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6057
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item) || item), 1)
6058
- ]),
6059
- _: 2
6060
- }, 1032, [
6061
- "closable",
6062
- "onClose"
6063
- ]))), 128)),
6064
- (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 ? [
6065
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
6066
- ] : []).length > realMaxNum.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_popover, {
6067
- key: 0,
8031
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_popover, {
8032
+ visible: popoverVisible.value,
8033
+ ref_key: "popoverRef",
8034
+ ref: popoverRef,
8035
+ width: "1000",
8036
+ trigger: "click",
6068
8037
  placement: "bottom",
6069
- trigger: "hover"
8038
+ onShow: handlePopoverShow
6070
8039
  }, {
6071
8040
  reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6072
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
6073
- ref_key: "moreButtonRef",
6074
- ref: moreButtonRef,
6075
- style: {
6076
- "margin-left": "0"
6077
- },
6078
- class: "mr-4"
6079
- }, {
6080
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6081
- (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 ? [
6082
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
6083
- ] : []).length - realMaxNum.value), 1)
6084
- ]),
6085
- _: 1
6086
- }, 512)
6087
- ]),
6088
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6089
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", tag_selectvue_type_script_lang_ts_setup_true_hoisted_1, [
6090
- ((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 ? [
6091
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
6092
- ] : []).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), {
6093
- key: item,
6094
- closable: !props.disabled,
6095
- size: "large",
6096
- "disable-transitions": true,
6097
- onClose: ($event)=>handleClose(item)
6098
- }, {
6099
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6100
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item) || item), 1)
6101
- ]),
6102
- _: 2
6103
- }, 1032, [
6104
- "closable",
6105
- "onClose"
6106
- ]))), 128))
8041
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_select, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
8042
+ ref_key: "selectRef",
8043
+ ref: selectRef,
8044
+ modelValue: selectedValue.value,
8045
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectedValue.value = $event),
8046
+ "collapse-tags": !!props.multiSelectFlag,
8047
+ placeholder: _ctx.$t('wardSelect.placeholder', '请选择病区'),
8048
+ remote: "",
8049
+ clearable: "",
8050
+ filterable: "",
8051
+ "remote-show-suffix": "",
8052
+ "collapse-tags-tooltip": "",
8053
+ teleported: !popoverVisible.value,
8054
+ "remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
8055
+ multiple: !!props.multiSelectFlag,
8056
+ options: [],
8057
+ "popper-class": popoverVisible.value ? 'hidden' : '',
8058
+ onRemoveTag: handleTagRemove,
8059
+ onFocus: handleFocus,
8060
+ onBlur: handleBlur,
8061
+ onClear: handleClear
8062
+ }, selectProps.value), null, 16, [
8063
+ "modelValue",
8064
+ "collapse-tags",
8065
+ "placeholder",
8066
+ "teleported",
8067
+ "remote-method",
8068
+ "multiple",
8069
+ "popper-class"
6107
8070
  ])
6108
8071
  ]),
6109
- _: 1
6110
- })) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
6111
- selectVisible.value && !props.disabled ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
6112
- key: 1,
6113
- ref_key: "SelectRef",
6114
- ref: SelectRef,
6115
- modelValue: selectValue.value,
6116
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectValue.value = $event),
6117
- class: "w-60",
6118
- filterable: "",
6119
- placeholder: _ctx.$t('tagManage.range.select.bizId', '请选择'),
6120
- onChange: handleSelectConfirm,
6121
- onBlur: handleSelectConfirm
6122
- }, {
6123
8072
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6124
- ((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, (group)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option_group, {
6125
- key: group.tagGroupId,
6126
- label: group.tagGroupNameDisplay,
6127
- value: group.tagGroupId
6128
- }, {
6129
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6130
- ((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, {
6131
- key: item.tagId,
6132
- disabled: ((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue || []).includes(item.tagId),
6133
- label: item.tagNameDisplay,
6134
- value: item.tagId
6135
- }, null, 8, [
6136
- "disabled",
6137
- "label",
6138
- "value"
6139
- ]))), 128))
6140
- ]),
6141
- _: 2
6142
- }, 1032, [
6143
- "label",
6144
- "value"
6145
- ]))), 128))
8073
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
8074
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
8075
+ height: `${tableProps.value.maxHeight || 260}px`
8076
+ }),
8077
+ class: "w-full overflow-hidden"
8078
+ }, [
8079
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
8080
+ style: {
8081
+ height: "100%"
8082
+ },
8083
+ ref_key: "tableRef",
8084
+ ref: tableRef,
8085
+ loading: loading.value,
8086
+ "row-key": "orgId",
8087
+ data: wardList.value,
8088
+ "highlight-current-row": "",
8089
+ columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
8090
+ "row-class-name": getRowClassName,
8091
+ onRowClick: handleTableRowSelect,
8092
+ onSelectionChange: handleSelectionChange
8093
+ }, tableProps.value), null, 16, [
8094
+ "loading",
8095
+ "data",
8096
+ "columns"
8097
+ ])
8098
+ ], 4)
6146
8099
  ]),
6147
8100
  _: 1
6148
8101
  }, 8, [
6149
- "modelValue",
6150
- "placeholder"
6151
- ])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
6152
- 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, {
6153
- key: 2,
6154
- style: {
6155
- "margin-left": "0"
6156
- },
6157
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)({
6158
- 'pointer-events-none': props.disabled
6159
- }),
6160
- onClick: showSelect
6161
- }, {
6162
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[1] || (_cache[1] = [
6163
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" + ")
6164
- ])),
6165
- _: 1
6166
- }, 8, [
6167
- "class"
6168
- ]))
6169
- ], 512);
8102
+ "visible"
8103
+ ])
8104
+ ], 32);
6170
8105
  };
6171
8106
  }
6172
8107
  });
6173
- const tag_select_exports_ = tag_selectvue_type_script_lang_ts_setup_true;
6174
- /* ESM default export */ const tag_select = tag_select_exports_;
8108
+ const ward_select_exports_ = ward_selectvue_type_script_setup_true_lang_tsx_name_WardSelect;
8109
+ /* ESM default export */ const ward_select = ward_select_exports_;
6175
8110
  // 获取五笔简码
6176
8111
  const wubiLib = [
6177
8112
  'A鞴鞲鞣鞫鞯鞔鞒鞑鞅靼銎跫綦翳蛩颟鹳鹋鸫鸢慝觐觋贳瓯戡檠迓甙忒弋撖摁廾蘼蘖蘩蘅蘧藿藜藁藓薰薷薹薅薜薮蕹薏薇薨薤蕻蕲蕃瞢蕺蕞蕤蕨蕈蕙蓼蓿蔻蕖蔺蔟蔹蓰蔸甍蔌蓣蓥蒗蒴蒹蒡蓠蒺蒿蓊蓓蒽蓦蓐蓍蓁葭萱蒎蒌葶葩葆萼葸蒉葺蒈蒇葳葙葚葑葜菡菰萦菀菅菪菹菸萃萏菟菔萆萑萸萜菖菽菝萋萘堇菘菥萁菁莼莺莨莞莘荻莸荽莩莶荼莅莜莓莪莠莴莳荸莰荮荭荪荬荩茛荨荥荦茳茺茭荠茗荀荟荃荇荏茯荞莛茱茴茼莒茈荜荛荑茜苕苠茕茔茆茚茑苓苻茌苘苒苴苜茇茏苤苷茉苡芤苎苄芟芪芡芴芩苁苌苋芮芷芘苣苊苈芰芾芸芫芙芗芑芎芄芨芊芏艿艽艹鄞郾邛劐蒯赜匾匮匦叵匚廿茁著芝蒸斟蔗蘸藻葬匝蕴苑芋荧营萤莹英荫茵艺颐医药尧燕雅牙芽鸦薛靴蓄芯薪邪鞋萧巷项匣熙昔芜巫卧蔚萎苇藤萄苔蓑蒜苏斯薯蔬世式甚芍苫莎散萨若蕊茹荣蓉茸戎惹鹊颧区擎芹勤莲荔莉蕾勒劳蓝莱葵匡苦恐苛勘菌巨菊鞠敬警茎荆靳芥藉戒节蕉匠蒋荐茧荚蓟基惑或获荤茄切翘鞘巧蔷其七欺期蒲菩葡莆萍苹匹蓬藕殴鸥欧孽蔫匿慕募幕暮墓某莫蘑摹蔑藐苗蒙萌茂茅莽茫芒蔓落萝芦菱黄荒划花葫菏荷邯菇苟共贡汞巩恭功攻工葛革戈甘芬匪菲芳范藩贰董东蒂荡葱茨臣茶茬草藏苍蔡菜菠鞭蔽蓖苯薄苞靶芭鞍艾蔼',
@@ -6354,17 +8289,37 @@ const DICT_SELECT = 'dictSelect';
6354
8289
  }, {
6355
8290
  ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
6356
8291
  bizIdTypeCode: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.bizIdTypeCode
6357
- }), 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)({
8292
+ }), 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)({
6358
8293
  key: 4
8294
+ }, {
8295
+ ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
8296
+ hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
8297
+ })), 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)({
8298
+ key: 5
8299
+ }, {
8300
+ ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
8301
+ hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
8302
+ })), 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)({
8303
+ key: 6
8304
+ }, {
8305
+ ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
8306
+ hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
8307
+ })), 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)({
8308
+ key: 7
8309
+ }, {
8310
+ ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
8311
+ hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
8312
+ })), 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)({
8313
+ key: 8
6359
8314
  }, {
6360
8315
  ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs)
6361
8316
  })), 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)({
6362
- key: 5,
8317
+ key: 9,
6363
8318
  clearable: ""
6364
8319
  }, {
6365
8320
  ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs)
6366
8321
  }), 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)({
6367
- key: 6,
8322
+ key: 10,
6368
8323
  ref_key: "componentRef",
6369
8324
  ref: componentRef,
6370
8325
  clearable: ""
@@ -6374,7 +8329,7 @@ const DICT_SELECT = 'dictSelect';
6374
8329
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6375
8330
  '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, {
6376
8331
  key: 0
6377
- }, (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'), {
8332
+ }, (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'), {
6378
8333
  key: item.value,
6379
8334
  value: item.value
6380
8335
  }, {
@@ -6406,7 +8361,7 @@ const DICT_SELECT = 'dictSelect';
6406
8361
  ]),
6407
8362
  _: 1
6408
8363
  }, 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)({
6409
- key: 7,
8364
+ key: 11,
6410
8365
  ref_key: "componentRef",
6411
8366
  ref: componentRef,
6412
8367
  clearable: ""
@@ -6503,7 +8458,8 @@ const WB_NO = "wbNo";
6503
8458
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6504
8459
  ((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)({
6505
8460
  key: item.name + index,
6506
- class: item.span || item.isFullWidth ? item.isFullWidth ? 'col-span-full' : `... col-span-${item.span}` : isInlineMode ? 'inline-block' : '',
8461
+ class: item.span || item.isFullWidth ? item.isFullWidth ? 'col-span-full' : `... col-span-${item.span}` : isInlineMode ? 'inline-block' : ''
8462
+ }, {
6507
8463
  ref_for: true
6508
8464
  }, item.formItemProps || {}), [
6509
8465
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_form_item, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
@@ -6511,7 +8467,8 @@ const WB_NO = "wbNo";
6511
8467
  label: 'function' == typeof item.label ? '' : item.label,
6512
8468
  prop: item.name,
6513
8469
  class: item.className,
6514
- style: isInlineMode ? 'margin-right: 16px;' : '',
8470
+ style: isInlineMode ? 'margin-right: 16px;' : ''
8471
+ }, {
6515
8472
  ref_for: true
6516
8473
  }, item.formItemProps || {}), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
6517
8474
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
@@ -6521,7 +8478,8 @@ const WB_NO = "wbNo";
6521
8478
  type: item.type,
6522
8479
  "support-copy-and-tips": item.supportCopyAndTips,
6523
8480
  placeholder: item.placeholder,
6524
- options: item.options,
8481
+ options: item.options
8482
+ }, {
6525
8483
  ref_for: true
6526
8484
  }, item.extraProps || {}, {
6527
8485
  modelValue: formModel[item.name],
@@ -6552,6 +8510,8 @@ const WB_NO = "wbNo";
6552
8510
  ref_for: true,
6553
8511
  ref_key: "itemRefs",
6554
8512
  ref: itemRefs
8513
+ }, {
8514
+ ref_for: true
6555
8515
  }, item.extraProps || {}, {
6556
8516
  modelValue: formModel[item.name],
6557
8517
  "onUpdate:modelValue": ($event)=>formModel[item.name] = $event,
@@ -6594,9 +8554,12 @@ const WB_NO = "wbNo";
6594
8554
  })
6595
8555
  }, {
6596
8556
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[1] || (_cache[1] = [
6597
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("查询")
8557
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("查询", -1)
6598
8558
  ])),
6599
- _: 1
8559
+ _: 1,
8560
+ __: [
8561
+ 1
8562
+ ]
6600
8563
  })) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
6601
8564
  ])
6602
8565
  ]),
@@ -7548,9 +9511,12 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
7548
9511
  onClick: cancel
7549
9512
  }, {
7550
9513
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[0] || (_cache[0] = [
7551
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
9514
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消", -1)
7552
9515
  ])),
7553
- _: 1
9516
+ _: 1,
9517
+ __: [
9518
+ 0
9519
+ ]
7554
9520
  }),
7555
9521
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
7556
9522
  disabled: submitLoading.value || props.propsLoading,
@@ -7559,9 +9525,12 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
7559
9525
  type: "primary"
7560
9526
  }, {
7561
9527
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[1] || (_cache[1] = [
7562
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 保存 ")
9528
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 保存 ", -1)
7563
9529
  ])),
7564
- _: 1
9530
+ _: 1,
9531
+ __: [
9532
+ 1
9533
+ ]
7565
9534
  }, 8, [
7566
9535
  "disabled",
7567
9536
  "loading"
@@ -7610,13 +9579,15 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
7610
9579
  emits: [
7611
9580
  "searchChange",
7612
9581
  "invoiceChange",
7613
- "clear"
9582
+ "clear",
9583
+ "avatarClick"
7614
9584
  ],
7615
9585
  setup (__props, { expose: __expose, emit: __emit }) {
7616
9586
  const emit = __emit;
7617
9587
  const searchRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7618
9588
  const bannerRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7619
9589
  const invoiceRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
9590
+ const oldPatientInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7620
9591
  /** searchCode */ const searchCode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
7621
9592
  if (__props.searchConfig?.code) return __props.searchConfig.code;
7622
9593
  if (__props.code) {
@@ -7631,6 +9602,8 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
7631
9602
  return false;
7632
9603
  });
7633
9604
  /** 检索方法 */ const handleSearchChange = async (data)=>{
9605
+ if ((0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isEqual)(oldPatientInfo.value, data)) bannerRef.value?.refresh();
9606
+ oldPatientInfo.value = data;
7634
9607
  emit("searchChange", data);
7635
9608
  };
7636
9609
  /** 新患者按钮 */ const clearFn = async ()=>{
@@ -7647,6 +9620,7 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
7647
9620
  });
7648
9621
  return (_ctx, _cache)=>{
7649
9622
  const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
9623
+ const _directive_shortcut = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("shortcut");
7650
9624
  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, [
7651
9625
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_2, [
7652
9626
  searchCode.value && _ctx.menuId ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(patient_access), {
@@ -7661,7 +9635,7 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
7661
9635
  "code"
7662
9636
  ])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
7663
9637
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3, [
7664
- _ctx.clearBtn ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_button, {
9638
+ _ctx.clearBtn ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_button, {
7665
9639
  key: 0,
7666
9640
  type: "primary",
7667
9641
  plain: "",
@@ -7671,7 +9645,12 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
7671
9645
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.btnTitle), 1)
7672
9646
  ]),
7673
9647
  _: 1
7674
- })) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
9648
+ })), [
9649
+ [
9650
+ _directive_shortcut,
9651
+ 'Alt+N'
9652
+ ]
9653
+ ]) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
7675
9654
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default"),
7676
9655
  _ctx.invoiceConfig ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(invoice), {
7677
9656
  key: 1,
@@ -7691,7 +9670,8 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
7691
9670
  ref_key: "bannerRef",
7692
9671
  ref: bannerRef,
7693
9672
  code: bannerCode.value,
7694
- "biz-id": _ctx.bannerConfig?.bizId
9673
+ "biz-id": _ctx.bannerConfig?.bizId,
9674
+ onAvatarClick: _cache[0] || (_cache[0] = ($event)=>emit('avatarClick'))
7695
9675
  }, null, 8, [
7696
9676
  "code",
7697
9677
  "biz-id"
@@ -7728,14 +9708,14 @@ const access_info_exports_ = access_infovue_type_script_setup_true_lang_ts_name_
7728
9708
  default: false
7729
9709
  },
7730
9710
  title: {
7731
- default: 'DML'
9711
+ default: "DML"
7732
9712
  },
7733
9713
  mode: {
7734
9714
  default: ()=>"dict"
7735
9715
  }
7736
9716
  },
7737
9717
  emits: [
7738
- 'success'
9718
+ "success"
7739
9719
  ],
7740
9720
  setup (__props, { emit: __emit }) {
7741
9721
  const emits = __emit;
@@ -7743,10 +9723,10 @@ const access_info_exports_ = access_infovue_type_script_setup_true_lang_ts_name_
7743
9723
  use_app_config_MAIN_APP_CONFIG.IS_CLOUD_ENV
7744
9724
  ]);
7745
9725
  function useGetDMLList() {
7746
- const dataSetList = useFetchDataset([
7747
- 'HBI000.4001'
9726
+ const dataSetList = use_fetch_dataset([
9727
+ "HBI000.4001"
7748
9728
  ]);
7749
- const dmlList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>(dataSetList?.value?.['HBI000.4001'] || []).map((item)=>({
9729
+ const dmlList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>(dataSetList?.value?.["HBI000.4001"] || []).map((item)=>({
7750
9730
  value: item.dataValueNo,
7751
9731
  label: item.dataValueCnName
7752
9732
  })));
@@ -7767,8 +9747,8 @@ const access_info_exports_ = access_infovue_type_script_setup_true_lang_ts_name_
7767
9747
  const [, res] = await ("dict" === __props.mode ? exportDmlScriptByExample(params) : exportMdmDmlScriptByExample(params));
7768
9748
  if (res?.success) {
7769
9749
  (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.downloadFile)(res?.data);
7770
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success('导出成功');
7771
- emits('success');
9750
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success("导出成功");
9751
+ emits("success");
7772
9752
  }
7773
9753
  }
7774
9754
  return (_ctx, _cache)=>{
@@ -7955,12 +9935,13 @@ function useUpdateInvoiceFormConfig(options) {
7955
9935
  }
7956
9936
  const currentNo = Number(modelValue.value?.currentNo);
7957
9937
  const endNo = Number(modelValue.value?.endNo);
7958
- const numValue = Number(value); // 如果当前票号和结束票号一致,且调整后票号也一致,直接通过
9938
+ const numValue = Number(value);
9939
+ const validNo = String(currentNo + 1).padStart(modelValue.value?.endNo?.length, "0"); // 如果当前票号和结束票号一致,且调整后票号也一致,直接通过
7959
9940
  if (currentNo === endNo && numValue === currentNo) {
7960
9941
  callback();
7961
9942
  return;
7962
9943
  }
7963
- if (numValue <= currentNo || numValue > endNo) callback(new Error(`调整后票号需在当前票号和结束票号之间!`));
9944
+ if (numValue <= currentNo || numValue > endNo) callback(new Error(`调整后票号需在${validNo}和${modelValue.value?.endNo}之间!`));
7964
9945
  else callback();
7965
9946
  },
7966
9947
  trigger: [
@@ -8158,10 +10139,10 @@ function useUpdateInvoiceFormConfig(options) {
8158
10139
  const updateCurrentNo_exports_ = updateCurrentNovue_type_script_setup_true_lang_ts_name_updateDialog;
8159
10140
  /* ESM default export */ const composables_updateCurrentNo = updateCurrentNo_exports_;
8160
10141
  const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_1 = {
8161
- class: "absolute left-[11px] top-2.5 -translate-x-1/2 -translate-y-1/2 rotate-[-42deg] bg-[#2468da] px-10 text-sm text-white scale-[0.8]"
10142
+ 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]"
8162
10143
  };
8163
10144
  const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_2 = {
8164
- class: "flex items-center justify-between min-w-[200px] text-[#2468DA]"
10145
+ class: "flex items-center justify-between min-w-[200px] text-primary"
8165
10146
  };
8166
10147
  const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_3 = {
8167
10148
  class: "pl-3"
@@ -8298,14 +10279,17 @@ const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_4 = {
8298
10279
  }, {
8299
10280
  reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
8300
10281
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
8301
- class: "relative overflow-hidden bg-[#EAEEFE] rounded",
10282
+ class: "relative overflow-hidden bg-primary-light rounded",
8302
10283
  onClick: handleShow,
8303
10284
  ref_key: "popoverRef",
8304
10285
  ref: popoverRef
8305
10286
  }, [
8306
10287
  (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),
8307
10288
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
8308
- class: "border-[#2468DA] bg-[#EAEEFE]"
10289
+ class: "bg-primary-light",
10290
+ style: {
10291
+ "border-color": "var(--el-color-primary)"
10292
+ }
8309
10293
  }, {
8310
10294
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
8311
10295
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_2, [
@@ -8383,4 +10367,4 @@ const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_4 = {
8383
10367
  const invoice_exports_ = invoicevue_type_script_setup_true_lang_ts_name_proInvoice;
8384
10368
  /* ESM default export */ const invoice = invoice_exports_;
8385
10369
  var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
8386
- 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, 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, print, usePrintReceipt, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
10370
+ 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, 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, convertToSpellNo, convertToWbNo, print, usePrintReceipt, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };