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