sun-biz 0.0.4-beta.50 → 0.0.4-beta.52

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
@@ -9,8 +9,8 @@ import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__ from "@sun-toolkit/s
9
9
  import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__ from "@sun-toolkit/micro-app";
10
10
  import * as __WEBPACK_EXTERNAL_MODULE_vue_router__ from "vue-router";
11
11
  import * as __WEBPACK_EXTERNAL_MODULE_js_pinyin__ from "js-pinyin";
12
- import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
13
12
  import * as __WEBPACK_EXTERNAL_MODULE_i18next_vue__ from "i18next-vue";
13
+ import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
14
14
  var __webpack_modules__ = {
15
15
  "./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) {
16
16
  // runtime helper for setting properties on components
@@ -1397,8 +1397,11 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1397
1397
  columns: {
1398
1398
  default: ()=>[]
1399
1399
  },
1400
+ defaultColumns: {
1401
+ default: ()=>[]
1402
+ },
1400
1403
  componentNo: {
1401
- default: ""
1404
+ default: ''
1402
1405
  },
1403
1406
  columnsSetting: {
1404
1407
  default: ()=>({
@@ -1417,7 +1420,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1417
1420
  use_app_config_MAIN_APP_CONFIG.USER_INFO
1418
1421
  ]);
1419
1422
  const isAdmin = userInfo?.adminFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES || userInfo?.userJobCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG_STR.NO;
1420
- const componentId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
1423
+ const componentId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
1421
1424
  const fullscreen = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
1422
1425
  const confirmLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
1423
1426
  const applicationLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
@@ -1425,14 +1428,14 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1425
1428
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
1426
1429
  dialogRef.value.open();
1427
1430
  });
1428
- const scrollKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
1431
+ const scrollKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
1429
1432
  const dataSetList = use_fetch_dataset([
1430
1433
  __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE_NAME
1431
1434
  ]);
1432
1435
  const renderDialog = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true); //控制prodialog 是否销毁
1433
1436
  const dbgridTableConfigRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
1434
1437
  const influenceScopeList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>dataSetList?.value?.[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE_NAME] || []);
1435
- const bizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
1438
+ const bizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
1436
1439
  const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
1437
1440
  const serveDbgridComponentSettingList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
1438
1441
  const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
@@ -1441,14 +1444,14 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1441
1444
  const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
1442
1445
  const sourceData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
1443
1446
  const disabledDraggable = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>!props.columnsSetting?.draggable);
1444
- function initColumns() {
1445
- sourceData.value = props.columns.map((item, index)=>({
1447
+ function setColumns(isDefault = false) {
1448
+ sourceData.value = (isDefault ? props.defaultColumns : props.columns).map((item, index)=>({
1446
1449
  ...item,
1447
1450
  minWidth: item.minWidth || item.width,
1448
1451
  sort: index + 1,
1449
- columnClass: "truncate",
1452
+ columnClass: 'truncate',
1450
1453
  render: (row, index)=>{
1451
- if (!item.render) return "我是示例的文案";
1454
+ if (!item.render) return '我是示例的文案';
1452
1455
  {
1453
1456
  let _slot;
1454
1457
  return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton, {
@@ -1469,7 +1472,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1469
1472
  }));
1470
1473
  }
1471
1474
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.columns, ()=>{
1472
- initColumns();
1475
+ setColumns();
1473
1476
  }, {
1474
1477
  immediate: true
1475
1478
  });
@@ -1483,16 +1486,16 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1483
1486
  });
1484
1487
  if (result?.success) {
1485
1488
  if (result?.data?.length) {
1486
- componentId.value = result.data[0].componentId || "";
1489
+ componentId.value = result.data[0].componentId || '';
1487
1490
  serveDbgridComponentSettingList.value = result.data[0].dbgridComponentSettingList || [];
1488
1491
  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;
1489
1492
  else {
1490
1493
  influenceScopeCode.value = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE;
1491
- bizId.value = userInfo?.userId || "";
1494
+ bizId.value = userInfo?.userId || '';
1492
1495
  userList.value = [
1493
1496
  {
1494
- userId: userInfo?.userId || "",
1495
- userName: userInfo?.userName || ""
1497
+ userId: userInfo?.userId || '',
1498
+ userName: userInfo?.userName || ''
1496
1499
  }
1497
1500
  ];
1498
1501
  }
@@ -1503,7 +1506,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1503
1506
  async function fetchUserList(value) {
1504
1507
  const [, res] = await queryUserList({
1505
1508
  enabledFlag: 1,
1506
- hospitalId: currentOrg?.orgId || "",
1509
+ hospitalId: currentOrg?.orgId || '',
1507
1510
  keyWord: value
1508
1511
  });
1509
1512
  if (res?.success) userList.value = res.data || [];
@@ -1520,10 +1523,21 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1520
1523
  let serverColum = [];
1521
1524
  if (serveDbgridComponentSettingList.value?.length) {
1522
1525
  let findObj = serveDbgridComponentSettingList.value.find((item)=>item.influenceScopeCode === newValues[0] && (item.bizId === newValues[1] || !item.bizId && !newValues[1]));
1523
- serverColum = findObj ? findObj.dbgridSettingValue : serveDbgridComponentSettingList.value.find((item)=>item.influenceScopeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PUBLIC)?.dbgridSettingValue || serveDbgridComponentSettingList.value[0].dbgridSettingValue;
1526
+ if (findObj) serverColum = findObj.dbgridSettingValue;
1527
+ else {
1528
+ let publicValue = serveDbgridComponentSettingList.value.find((item)=>item.influenceScopeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PUBLIC && !item.bizId);
1529
+ if (publicValue) serverColum = publicValue.dbgridSettingValue;
1530
+ else {
1531
+ setColumns(true);
1532
+ return;
1533
+ }
1534
+ }
1535
+ } else {
1536
+ setColumns(true); //执行默认值配置
1537
+ return;
1524
1538
  }
1525
1539
  try {
1526
- serverColum = JSON.parse(serverColum);
1540
+ serverColum = JSON.parse(serverColum) || [];
1527
1541
  } catch (err) {
1528
1542
  serverColum = [];
1529
1543
  console.log(err);
@@ -1559,13 +1573,13 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1559
1573
  return item;
1560
1574
  });
1561
1575
  }
1562
- function submit(isSave) {
1576
+ function submit(isSave, resetDefault = false) {
1563
1577
  return new Promise((resolve, reject)=>{
1564
1578
  if (influenceScopeCode.value === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE && !bizId.value) {
1565
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("请选择操作员");
1579
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('请选择操作员');
1566
1580
  return reject([
1567
- "",
1568
- new Error("参数错误")
1581
+ '',
1582
+ new Error('参数错误')
1569
1583
  ]);
1570
1584
  }
1571
1585
  let dbgridComponentSettingList = [];
@@ -1605,22 +1619,26 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1605
1619
  bizId: influenceScopeCode.value === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE ? bizId.value : void 0
1606
1620
  }
1607
1621
  ];
1622
+ if (resetDefault) dbgridComponentSettingList = dbgridComponentSettingList.filter((item)=>{
1623
+ if (bizId.value) return !(item.bizId === bizId.value && item.influenceScopeCode === influenceScopeCode.value);
1624
+ return item.influenceScopeCode !== influenceScopeCode.value;
1625
+ });
1608
1626
  saveDbgridComponentSetting({
1609
1627
  componentId: componentId.value,
1610
1628
  dbgridComponentSettingList
1611
1629
  }).then((result)=>{
1612
1630
  let [, data] = result;
1613
1631
  if (data?.success) {
1614
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(isSave ? "保存成功" : "应用成功");
1632
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(isSave ? '保存成功' : '应用成功');
1615
1633
  resolve([]);
1616
1634
  } else reject([
1617
- "",
1618
- new Error("接口错误")
1635
+ '',
1636
+ new Error('接口错误')
1619
1637
  ]);
1620
1638
  }, ()=>{
1621
1639
  reject([
1622
- "",
1623
- new Error("未知错误")
1640
+ '',
1641
+ new Error('未知错误')
1624
1642
  ]);
1625
1643
  });
1626
1644
  });
@@ -1635,11 +1653,11 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1635
1653
  let columnIndex = tableColumn.value.findIndex((item)=>item.prop === columnName);
1636
1654
  if (-1 !== columnIndex) {
1637
1655
  const tableEl = tableRef?.value?.proTableRef?.$el;
1638
- const columns = Array.from(tableEl.querySelectorAll(".el-table__body-wrapper colgroup col"));
1639
- const targetColumnStart = columns.slice(0, columnIndex).reduce((acc, col)=>acc + parseInt(col?.getAttribute("width") || "0"), 0); // 计算将目标列滚动到中间的位置
1656
+ const columns = Array.from(tableEl.querySelectorAll('.el-table__body-wrapper colgroup col'));
1657
+ const targetColumnStart = columns.slice(0, columnIndex).reduce((acc, col)=>acc + parseInt(col?.getAttribute('width') || '0'), 0); // 计算将目标列滚动到中间的位置
1640
1658
  const wrapperWidth = tableRef?.value?.proTableRef?.$el.clientWidth; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1641
1659
  //@ts-expect-error
1642
- const columnWidth = parseInt(columns[columnIndex]?.getAttribute("width"));
1660
+ const columnWidth = parseInt(columns[columnIndex]?.getAttribute('width'));
1643
1661
  const scrollPosition = targetColumnStart - wrapperWidth / 2 + columnWidth / 2;
1644
1662
  tableRef?.value?.proTableRef.setScrollLeft(scrollPosition);
1645
1663
  }
@@ -1648,8 +1666,8 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1648
1666
  let findIndex = sourceData.value.findIndex((item)=>item.prop === columnName);
1649
1667
  const row = dbgridTableConfigRef?.value?.tableRef?.proTableRef?.$el?.querySelector(`.el-table__body-wrapper tbody tr:nth-child(${findIndex + 1})`);
1650
1668
  row?.scrollIntoView({
1651
- behavior: "smooth",
1652
- block: "center"
1669
+ behavior: 'smooth',
1670
+ block: 'center'
1653
1671
  });
1654
1672
  dbgridTableConfigRef?.value?.tableRef?.setCurrentRow(sourceData.value[findIndex]);
1655
1673
  };
@@ -1664,11 +1682,11 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1664
1682
  function handleCancel() {
1665
1683
  dialogRef.value.close();
1666
1684
  }
1667
- async function handleConfirm(isSave = true) {
1685
+ async function handleConfirm(isSave = true, resetDefault = false) {
1668
1686
  const loadingRef = isSave ? confirmLoading : applicationLoading;
1669
1687
  loadingRef.value = true;
1670
1688
  try {
1671
- const [err] = await submit(isSave);
1689
+ const [err] = await submit(isSave, resetDefault);
1672
1690
  loadingRef.value = false;
1673
1691
  if (!err) {
1674
1692
  if (isSave) handleCancel();
@@ -1694,12 +1712,27 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1694
1712
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
1695
1713
  onClick: handleCancel
1696
1714
  }, {
1697
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[7] || (_cache[7] = [
1715
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[8] || (_cache[8] = [
1698
1716
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消", -1)
1699
1717
  ])),
1700
1718
  _: 1,
1701
1719
  __: [
1702
- 7
1720
+ 8
1721
+ ]
1722
+ }),
1723
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
1724
+ type: "primary",
1725
+ plain: "",
1726
+ onClick: _cache[4] || (_cache[4] = ()=>{
1727
+ handleConfirm(true, true);
1728
+ })
1729
+ }, {
1730
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[9] || (_cache[9] = [
1731
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("恢复默认", -1)
1732
+ ])),
1733
+ _: 1,
1734
+ __: [
1735
+ 9
1703
1736
  ]
1704
1737
  }),
1705
1738
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
@@ -1707,16 +1740,16 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1707
1740
  loading: applicationLoading.value,
1708
1741
  disabled: applicationLoading.value,
1709
1742
  plain: "",
1710
- onClick: _cache[4] || (_cache[4] = ()=>{
1743
+ onClick: _cache[5] || (_cache[5] = ()=>{
1711
1744
  handleConfirm(false);
1712
1745
  })
1713
1746
  }, {
1714
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[8] || (_cache[8] = [
1747
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[10] || (_cache[10] = [
1715
1748
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用", -1)
1716
1749
  ])),
1717
1750
  _: 1,
1718
1751
  __: [
1719
- 8
1752
+ 10
1720
1753
  ]
1721
1754
  }, 8, [
1722
1755
  "loading",
@@ -1726,16 +1759,16 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1726
1759
  loading: confirmLoading.value,
1727
1760
  type: "primary",
1728
1761
  disabled: confirmLoading.value,
1729
- onClick: _cache[5] || (_cache[5] = ()=>{
1762
+ onClick: _cache[6] || (_cache[6] = ()=>{
1730
1763
  handleConfirm(true);
1731
1764
  })
1732
1765
  }, {
1733
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[9] || (_cache[9] = [
1766
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[11] || (_cache[11] = [
1734
1767
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ", -1)
1735
1768
  ])),
1736
1769
  _: 1,
1737
1770
  __: [
1738
- 9
1771
+ 11
1739
1772
  ]
1740
1773
  }, 8, [
1741
1774
  "loading",
@@ -1777,7 +1810,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1777
1810
  ]),
1778
1811
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", dbgrid_component_settingvue_type_script_setup_true_lang_tsx_hoisted_2, [
1779
1812
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", null, [
1780
- _cache[6] || (_cache[6] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, "影响范围", -1)),
1813
+ _cache[7] || (_cache[7] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, "影响范围", -1)),
1781
1814
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElSelect), {
1782
1815
  disabled: !(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isAdmin),
1783
1816
  class: "ml-6 mr-4 w-52",
@@ -1897,7 +1930,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
1897
1930
  const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
1898
1931
  [
1899
1932
  '__scopeId',
1900
- "data-v-a780c5b2"
1933
+ "data-v-c6055652"
1901
1934
  ]
1902
1935
  ]);
1903
1936
  /* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
@@ -1932,21 +1965,22 @@ const tableColumnSetting = (options)=>{
1932
1965
  const TableSettingButtonvue_type_script_setup_true_lang_tsx_hoisted_1 = {
1933
1966
  class: "el-dropdown-link absolute left-1 top-2 z-50 cursor-pointer text-primary"
1934
1967
  };
1935
- const FILE_TYPE_CODE = "FILE_TYPE_CODE";
1936
- const COLUMN_SETTING = "column-setting";
1937
- const EXPORT_FILE = "export-file";
1968
+ const FILE_TYPE_CODE = 'FILE_TYPE_CODE';
1969
+ const COLUMN_SETTING = 'column-setting';
1970
+ const EXPORT_FILE = 'export-file';
1938
1971
  /* ESM default export */ const TableSettingButtonvue_type_script_setup_true_lang_tsx = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
1939
1972
  __name: 'TableSettingButton',
1940
1973
  props: {
1941
1974
  tableData: {},
1942
1975
  columns: {},
1976
+ defaultColumns: {},
1943
1977
  componentNo: {},
1944
1978
  columnsSetting: {},
1945
1979
  exportFileFlag: {},
1946
1980
  componentDesc: {}
1947
1981
  },
1948
1982
  emits: [
1949
- "success"
1983
+ 'success'
1950
1984
  ],
1951
1985
  setup (__props, { emit: __emit }) {
1952
1986
  const dataSetList = use_fetch_dataset([
@@ -1959,7 +1993,7 @@ const EXPORT_FILE = "export-file";
1959
1993
  let result = [
1960
1994
  {
1961
1995
  value: COLUMN_SETTING,
1962
- label: "表格设置",
1996
+ label: '表格设置',
1963
1997
  children: []
1964
1998
  }
1965
1999
  ];
@@ -1967,13 +2001,13 @@ const EXPORT_FILE = "export-file";
1967
2001
  let list = dataSetList.value?.[FILE_TYPE_CODE] || [];
1968
2002
  if (1 === list.length) result.push({
1969
2003
  value: list[0]?.dataValueNo,
1970
- label: "导出文件",
2004
+ label: '导出文件',
1971
2005
  disabled: !props.tableData.length,
1972
2006
  children: []
1973
2007
  });
1974
2008
  if (list.length > 1) result.push({
1975
2009
  value: EXPORT_FILE,
1976
- label: "导出文件",
2010
+ label: '导出文件',
1977
2011
  disabled: !props.tableData.length,
1978
2012
  children: list.map((item)=>({
1979
2013
  value: item?.dataValueNo,
@@ -1984,15 +2018,15 @@ const EXPORT_FILE = "export-file";
1984
2018
  return result;
1985
2019
  });
1986
2020
  const getRenderedContent = (render, row, index)=>{
1987
- const tempDiv = document.createElement("div");
2021
+ const tempDiv = document.createElement('div');
1988
2022
  const app = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createApp)({
1989
2023
  render () {
1990
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {}, render(row, index));
2024
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)('div', {}, render(row, index));
1991
2025
  }
1992
2026
  });
1993
2027
  app.use(__WEBPACK_EXTERNAL_MODULE_element_sun__["default"]);
1994
2028
  app.mount(tempDiv);
1995
- const content = tempDiv.textContent || "";
2029
+ const content = tempDiv.textContent || '';
1996
2030
  app.unmount();
1997
2031
  return content;
1998
2032
  };
@@ -2008,7 +2042,7 @@ const EXPORT_FILE = "export-file";
2008
2042
  rowSequenceNo: index,
2009
2043
  rowRecordList: props.columns.filter((col)=>col.prop && col.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES && col.prop !== OPERATION).map((col)=>{
2010
2044
  let value = item[col.prop];
2011
- if ("function" == typeof col.render) try {
2045
+ if ('function' == typeof col.render) try {
2012
2046
  value = getRenderedContent(col.render, item, index) || value;
2013
2047
  } catch (error) {
2014
2048
  console.warn(`Render function error for column ${col.prop}:`, error);
@@ -2026,7 +2060,7 @@ const EXPORT_FILE = "export-file";
2026
2060
  fileName: `${props.componentDesc}.xlsx`,
2027
2061
  data: res?.data?.fileString
2028
2062
  });
2029
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success("导出成功");
2063
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success('导出成功');
2030
2064
  }
2031
2065
  }
2032
2066
  function hide() {
@@ -2036,10 +2070,11 @@ const EXPORT_FILE = "export-file";
2036
2070
  if (props.columnsSetting?.disabled) return;
2037
2071
  tableColumnSetting({
2038
2072
  columns: props.columns,
2073
+ defaultColumns: props.defaultColumns,
2039
2074
  componentNo: props.componentNo,
2040
2075
  columnsSetting: props.columnsSetting,
2041
2076
  success: ()=>{
2042
- emit("success");
2077
+ emit('success');
2043
2078
  }
2044
2079
  });
2045
2080
  }
@@ -2139,7 +2174,7 @@ const EXPORT_FILE = "export-file";
2139
2174
  const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(TableSettingButtonvue_type_script_setup_true_lang_tsx, [
2140
2175
  [
2141
2176
  '__scopeId',
2142
- "data-v-0aa25cee"
2177
+ "data-v-a526e56a"
2143
2178
  ]
2144
2179
  ]);
2145
2180
  /* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
@@ -2167,6 +2202,7 @@ const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
2167
2202
  rowKey: {},
2168
2203
  tableColumns: {},
2169
2204
  commonColumns: {},
2205
+ defaultColumns: {},
2170
2206
  columnsSetting: {},
2171
2207
  rowClassName: {
2172
2208
  type: [
@@ -2211,6 +2247,7 @@ const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
2211
2247
  "component-no": props.componentNo,
2212
2248
  "columns-setting": props.columnsSetting,
2213
2249
  columns: _ctx.commonColumns,
2250
+ defaultColumns: _ctx.defaultColumns,
2214
2251
  ref: "tableSettingButtonRef",
2215
2252
  onSuccess: _cache[0] || (_cache[0] = ($event)=>emits('success'))
2216
2253
  }, null, 8, [
@@ -2219,7 +2256,8 @@ const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
2219
2256
  "export-file-flag",
2220
2257
  "component-no",
2221
2258
  "columns-setting",
2222
- "columns"
2259
+ "columns",
2260
+ "defaultColumns"
2223
2261
  ])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
2224
2262
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTable), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
2225
2263
  id: props.id,
@@ -2371,7 +2409,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
2371
2409
  key: 1,
2372
2410
  class: "mt-5 flex items-center justify-between"
2373
2411
  };
2374
- const SELECTION = "selection";
2412
+ const SELECTION = 'selection';
2375
2413
  /**
2376
2414
  *获取参与排序的列表 索引 是否可以拖拽
2377
2415
  */ /* ESM default export */ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
@@ -2397,7 +2435,7 @@ const SELECTION = "selection";
2397
2435
  default: 80
2398
2436
  },
2399
2437
  componentNo: {
2400
- default: ""
2438
+ default: ''
2401
2439
  },
2402
2440
  hiddenDefaultText: {
2403
2441
  type: Boolean,
@@ -2429,7 +2467,7 @@ const SELECTION = "selection";
2429
2467
  default: true
2430
2468
  },
2431
2469
  rowKey: {
2432
- default: "id"
2470
+ default: 'id'
2433
2471
  },
2434
2472
  stripe: {
2435
2473
  type: Boolean,
@@ -2451,13 +2489,13 @@ const SELECTION = "selection";
2451
2489
  default: ()=>({})
2452
2490
  },
2453
2491
  layout: {
2454
- default: "total, sizes, prev, pager, next"
2492
+ default: 'total, sizes, prev, pager, next'
2455
2493
  },
2456
2494
  formDisabled: {
2457
2495
  type: Boolean
2458
2496
  },
2459
2497
  dragTips: {
2460
- default: "温馨提示:您可通过拖动进行排序"
2498
+ default: '温馨提示:您可通过拖动进行排序'
2461
2499
  },
2462
2500
  isShowDragTips: {
2463
2501
  type: Boolean,
@@ -2467,7 +2505,7 @@ const SELECTION = "selection";
2467
2505
  default: {}
2468
2506
  },
2469
2507
  dragTipsClassName: {
2470
- default: ""
2508
+ default: ''
2471
2509
  },
2472
2510
  settingIconWidth: {
2473
2511
  default: 36
@@ -2493,7 +2531,7 @@ const SELECTION = "selection";
2493
2531
  const sortFieldList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(void 0);
2494
2532
  const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
2495
2533
  const showSetting = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
2496
- const componentDesc = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("文件");
2534
+ const componentDesc = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('文件');
2497
2535
  let state = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
2498
2536
  // 表格数据
2499
2537
  tableData: props.data,
@@ -2520,7 +2558,7 @@ const SELECTION = "selection";
2520
2558
  const emit = __emit;
2521
2559
  const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
2522
2560
  // 提供静态数据
2523
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.provide)("hiddenDefaultText", props.hiddenDefaultText);
2561
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.provide)('hiddenDefaultText', props.hiddenDefaultText);
2524
2562
  const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
2525
2563
  const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>tableRef.value?.proTableRef);
2526
2564
  function getDragSortData(newIndex, data, startIndexObj, sortData, childrenKey) {
@@ -2569,7 +2607,7 @@ const SELECTION = "selection";
2569
2607
  return data;
2570
2608
  }
2571
2609
  // 生成每一行的唯一 path
2572
- function getRowPath(row, data, rowKey, parentPath = "", childrenKey) {
2610
+ function getRowPath(row, data, rowKey, parentPath = '', childrenKey) {
2573
2611
  for(let i = 0; i < data.length; i++){
2574
2612
  if (data[i][rowKey] === row[rowKey]) {
2575
2613
  const currentPath = parentPath ? `${parentPath}-${i}` : `${i}`;
@@ -2577,49 +2615,49 @@ const SELECTION = "selection";
2577
2615
  }
2578
2616
  if (childrenKey && Array.isArray(data[i][childrenKey])) {
2579
2617
  const childPath = getRowPath(row, data[i][childrenKey], rowKey, parentPath ? `${parentPath}-${i}` : `${i}`, childrenKey);
2580
- if ("" !== childPath) return childPath;
2618
+ if ('' !== childPath) return childPath;
2581
2619
  }
2582
2620
  }
2583
- return "";
2621
+ return '';
2584
2622
  }
2585
2623
  // 获取childrenKey的安全写法
2586
2624
  function getSafeChildrenKeyFromAttrs(attrs) {
2587
- const treePropsRaw = attrs["tree-props"];
2588
- const treeProps = "object" == typeof treePropsRaw && null !== treePropsRaw ? treePropsRaw : void 0;
2589
- if (treeProps && "children" in treeProps) return treeProps.children;
2625
+ const treePropsRaw = attrs['tree-props'];
2626
+ const treeProps = 'object' == typeof treePropsRaw && null !== treePropsRaw ? treePropsRaw : void 0;
2627
+ if (treeProps && 'children' in treeProps) return treeProps.children;
2590
2628
  }
2591
2629
  // 兼容外部 row-class-name,自动适配参数类型
2592
2630
  function rowClassNameWrapper(rowOrParams, rowIndexArg) {
2593
2631
  let row, rowIndex;
2594
- if (rowOrParams && "object" == typeof rowOrParams && "row" in rowOrParams && "rowIndex" in rowOrParams) {
2632
+ if (rowOrParams && 'object' == typeof rowOrParams && 'row' in rowOrParams && 'rowIndex' in rowOrParams) {
2595
2633
  row = rowOrParams.row;
2596
2634
  rowIndex = rowOrParams.rowIndex;
2597
2635
  } else {
2598
2636
  row = rowOrParams;
2599
2637
  rowIndex = rowIndexArg;
2600
2638
  }
2601
- let externalClass = "";
2602
- const external = attrs["row-class-name"];
2603
- if ("function" == typeof external) externalClass = external({
2639
+ let externalClass = '';
2640
+ const external = attrs['row-class-name'];
2641
+ if ('function' == typeof external) externalClass = external({
2604
2642
  row,
2605
2643
  rowIndex
2606
2644
  });
2607
- else if ("string" == typeof external) externalClass = external;
2608
- let pathClass = "";
2645
+ else if ('string' == typeof external) externalClass = external;
2646
+ let pathClass = '';
2609
2647
  let childrenKey = getSafeChildrenKeyFromAttrs(attrs);
2610
- let path = getRowPath(row, state.tableData, props.rowKey, "", childrenKey);
2648
+ let path = getRowPath(row, state.tableData, props.rowKey, '', childrenKey);
2611
2649
  pathClass = `row-path-${path}`;
2612
2650
  return [
2613
2651
  externalClass,
2614
2652
  pathClass
2615
- ].filter(Boolean).join(" ");
2653
+ ].filter(Boolean).join(' ');
2616
2654
  }
2617
2655
  /***
2618
2656
  * 表格拖拽排序
2619
2657
  **/ const initDragSort = ()=>{
2620
2658
  const tbodyList = document.querySelectorAll(`#${uuid.value} tbody`);
2621
2659
  const tbody = tbodyList[tbodyList.length - 1];
2622
- let initialHTML = "";
2660
+ let initialHTML = '';
2623
2661
  let crossLevelWarned = false;
2624
2662
  // 新增:销毁旧的Sortable实例
2625
2663
  // 新增:销毁旧的Sortable实例
@@ -2628,19 +2666,19 @@ const SELECTION = "selection";
2628
2666
  sortableInstance = null;
2629
2667
  }
2630
2668
  if (tbody) sortableInstance = __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
2631
- handle: ".cursor-move",
2669
+ handle: '.cursor-move',
2632
2670
  group: props.dragGroupName,
2633
2671
  animation: 300,
2634
2672
  scroll: true,
2635
2673
  scrollSensitivity: 80,
2636
2674
  scrollSpeed: 10,
2637
2675
  onMove (evt) {
2638
- const draggedPath = evt.dragged?.className.match(/row-path-([\d-]+)/)?.[1] || "";
2639
- const relatedPath = evt.related?.className.match(/row-path-([\d-]+)/)?.[1] || "";
2640
- const getParent = (p)=>p.split("-").slice(0, -1).join("-");
2676
+ const draggedPath = evt.dragged?.className.match(/row-path-([\d-]+)/)?.[1] || '';
2677
+ const relatedPath = evt.related?.className.match(/row-path-([\d-]+)/)?.[1] || '';
2678
+ const getParent = (p)=>p.split('-').slice(0, -1).join('-');
2641
2679
  if (draggedPath && relatedPath && getParent(draggedPath) !== getParent(relatedPath)) {
2642
2680
  if (!crossLevelWarned) {
2643
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("暂不支持跨层级拖拽配置");
2681
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
2644
2682
  crossLevelWarned = true;
2645
2683
  }
2646
2684
  return false;
@@ -2650,7 +2688,7 @@ const SELECTION = "selection";
2650
2688
  onEnd (evt) {
2651
2689
  const { newIndex, oldIndex } = evt;
2652
2690
  if (props.dragGroupName) {
2653
- emit("drag-end", {
2691
+ emit('drag-end', {
2654
2692
  crossGroup: evt.from !== evt.to,
2655
2693
  oldIndex,
2656
2694
  newIndex
@@ -2658,11 +2696,11 @@ const SELECTION = "selection";
2658
2696
  return;
2659
2697
  }
2660
2698
  const dragTr = evt.item;
2661
- const match = dragTr.className.split(" ").find((cls)=>cls.startsWith("row-path-"));
2662
- const fromPath = match ? match.replace("row-path-", "") : "";
2699
+ const match = dragTr.className.split(' ').find((cls)=>cls.startsWith('row-path-'));
2700
+ const fromPath = match ? match.replace('row-path-', '') : '';
2663
2701
  let childrenKey = getSafeChildrenKeyFromAttrs(attrs);
2664
2702
  const getPathByIndex = (targetIndex)=>{
2665
- let path = "";
2703
+ let path = '';
2666
2704
  let count = -1;
2667
2705
  function dfs(arr, parent) {
2668
2706
  for(let i = 0; i < arr.length; i++){
@@ -2678,13 +2716,13 @@ const SELECTION = "selection";
2678
2716
  }
2679
2717
  return false;
2680
2718
  }
2681
- dfs(state.tableData, "");
2719
+ dfs(state.tableData, '');
2682
2720
  return path;
2683
2721
  };
2684
- if ("number" != typeof newIndex || "number" != typeof oldIndex || newIndex === oldIndex) return;
2722
+ if ('number' != typeof newIndex || 'number' != typeof oldIndex || newIndex === oldIndex) return;
2685
2723
  const newPath = getPathByIndex(newIndex);
2686
2724
  const oldPath = getPathByIndex(oldIndex);
2687
- const getParent = (p)=>p.split("-").slice(0, -1).join("-");
2725
+ const getParent = (p)=>p.split('-').slice(0, -1).join('-');
2688
2726
  if (getParent(newPath) !== getParent(oldPath)) // 这里不再需要回退DOM,onMove已阻止
2689
2727
  return;
2690
2728
  let data = getSortableResult(newIndex, oldIndex);
@@ -2697,7 +2735,7 @@ const SELECTION = "selection";
2697
2735
  initDragSort();
2698
2736
  });
2699
2737
  }
2700
- emit("drag-end", data, {
2738
+ emit('drag-end', data, {
2701
2739
  fromPath,
2702
2740
  oldIndex,
2703
2741
  newIndex
@@ -2716,7 +2754,7 @@ const SELECTION = "selection";
2716
2754
  });
2717
2755
  async function fetchDbgridComponent() {
2718
2756
  let [, result] = await queryDbgridComponentByExample({
2719
- componentNo: props.componentNo || ""
2757
+ componentNo: props.componentNo || ''
2720
2758
  });
2721
2759
  if (result?.success) {
2722
2760
  exportFileFlag.value = result.data.exportFileFlag;
@@ -2731,7 +2769,7 @@ const SELECTION = "selection";
2731
2769
  }));
2732
2770
  proTableRef.value?.clearSort();
2733
2771
  serveColumns.value = column;
2734
- emit("columns-config-change", column);
2772
+ emit('columns-config-change', column);
2735
2773
  } catch (error) {
2736
2774
  console.log(error);
2737
2775
  }
@@ -2765,7 +2803,7 @@ const SELECTION = "selection";
2765
2803
  state.pageInfo.pageNumber = 1;
2766
2804
  state.pageInfo.pageSize = val;
2767
2805
  fetchList();
2768
- } else emit("size-page-change", val);
2806
+ } else emit('size-page-change', val);
2769
2807
  };
2770
2808
  /**
2771
2809
  * 分页组件改变 当前页数 事件
@@ -2773,7 +2811,7 @@ const SELECTION = "selection";
2773
2811
  if (props.fetchData) {
2774
2812
  state.pageInfo.pageNumber = val;
2775
2813
  fetchList();
2776
- } else emit("current-page-change", val);
2814
+ } else emit('current-page-change', val);
2777
2815
  }
2778
2816
  const selections = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
2779
2817
  // 设置当前行激活态
@@ -2796,7 +2834,7 @@ const SELECTION = "selection";
2796
2834
  result = multiFieldSort(result, sortFieldList.value);
2797
2835
  }
2798
2836
  if (Object.keys(props.filterObj).length) return result.filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
2799
- "",
2837
+ '',
2800
2838
  void 0,
2801
2839
  null
2802
2840
  ].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
@@ -2804,7 +2842,7 @@ const SELECTION = "selection";
2804
2842
  });
2805
2843
  // 严格按用户要求递归赋值方法
2806
2844
  function setDataByPath(path, data, childrenKey) {
2807
- const indices = path.split("-").map((i)=>Number(i));
2845
+ const indices = path.split('-').map((i)=>Number(i));
2808
2846
  if (1 === indices.length) {
2809
2847
  state.tableData = data;
2810
2848
  return;
@@ -2851,6 +2889,15 @@ const SELECTION = "selection";
2851
2889
  },
2852
2890
  rowClassName: rowClassNameWrapper
2853
2891
  });
2892
+ const defaultColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2893
+ let result = [
2894
+ ...props.columns
2895
+ ].map((cur)=>({
2896
+ displayFlag: cur.isHidden || cur.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
2897
+ ...cur
2898
+ }));
2899
+ return result;
2900
+ });
2854
2901
  /**
2855
2902
  * 处理接口和本地的columns
2856
2903
  */ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
@@ -2860,16 +2907,15 @@ const SELECTION = "selection";
2860
2907
  if (props.couldSortFieldList && props.couldSortFieldList?.length) propsColumns = propsColumns.map((item)=>{
2861
2908
  let supportSort = !!(props.couldSortFieldList || []).find((cur)=>cur.fieldName === item.prop);
2862
2909
  return {
2863
- sortable: !!supportSort && (props.pagination ? "custom" : supportSort),
2910
+ sortable: !!supportSort && (props.pagination ? 'custom' : supportSort),
2864
2911
  ...item
2865
2912
  };
2866
2913
  });
2867
2914
  if (!(props.componentNo || serveColumns.value?.length)) return propsColumns;
2868
2915
  {
2869
- let result = propsColumns.map((cur)=>({
2870
- displayFlag: cur.isHidden || cur.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
2871
- ...cur
2872
- }));
2916
+ let result = [
2917
+ ...defaultColumns.value
2918
+ ];
2873
2919
  if (serveColumns.value?.length) {
2874
2920
  result = result.map((item, index)=>{
2875
2921
  let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {
@@ -2901,7 +2947,7 @@ const SELECTION = "selection";
2901
2947
  const bottomOffset = scrollHeight - event.scrollTop - clientHeight;
2902
2948
  if (event.scrollTop < oldScrollTop && 0 === bottomOffset) proTableRef.value.setScrollTop(0);
2903
2949
  if (bottomOffset < threshold && event.scrollTop > oldScrollTop) {
2904
- console.log("触发加载更多数据");
2950
+ console.log('触发加载更多数据');
2905
2951
  props.scrollLoad();
2906
2952
  }
2907
2953
  oldScrollTop = event.scrollTop;
@@ -2923,7 +2969,7 @@ const SELECTION = "selection";
2923
2969
  type: SELECTION,
2924
2970
  prop: SELECTION,
2925
2971
  minWidth: 80,
2926
- label: ""
2972
+ label: ''
2927
2973
  },
2928
2974
  ...result
2929
2975
  ];
@@ -2944,7 +2990,7 @@ const SELECTION = "selection";
2944
2990
  return isTips;
2945
2991
  });
2946
2992
  function sortChange({ column, order, prop }) {
2947
- if (!props.couldSortFieldList?.length) return emit("sort-change", {
2993
+ if (!props.couldSortFieldList?.length) return emit('sort-change', {
2948
2994
  column,
2949
2995
  order,
2950
2996
  prop
@@ -3013,7 +3059,8 @@ const SELECTION = "selection";
3013
3059
  ref: tableRef,
3014
3060
  data: tableData.value,
3015
3061
  "row-key": props.rowKey,
3016
- "table-columns": tableColumns.value
3062
+ "table-columns": tableColumns.value,
3063
+ defaultColumns: defaultColumns.value
3017
3064
  }, _ctx.$attrs, {
3018
3065
  draggable: props.draggable,
3019
3066
  "row-class-name": rowClassNameWrapper
@@ -3040,6 +3087,7 @@ const SELECTION = "selection";
3040
3087
  "data",
3041
3088
  "row-key",
3042
3089
  "table-columns",
3090
+ "defaultColumns",
3043
3091
  "draggable"
3044
3092
  ]))
3045
3093
  ]),
@@ -5305,7 +5353,7 @@ const _hoisted_16 = {
5305
5353
  // import ManPatient from "../patient-access/images/man_patient.vue";
5306
5354
  // import WomanPatient from "../patient-access/images/women_patient.vue";
5307
5355
  // import TagSelect from "../biz-select/tag-select/index.vue";
5308
- const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5356
+ const PERSON = 'PERSON'; //应该放到BIZ_ID_TYPE_CODE这个里面
5309
5357
  /* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5310
5358
  __name: 'BannerInfo',
5311
5359
  props: {
@@ -5318,7 +5366,8 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5318
5366
  menuId: {}
5319
5367
  },
5320
5368
  emits: [
5321
- "avatarClick"
5369
+ 'avatarClick',
5370
+ 'bannerInfoChange'
5322
5371
  ],
5323
5372
  setup (__props, { expose: __expose, emit: __emit }) {
5324
5373
  const emits = __emit;
@@ -5334,7 +5383,7 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5334
5383
  const initBannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5335
5384
  const isTextOverflowing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5336
5385
  const firstDisplayWidthRatio = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(1);
5337
- const tagBizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
5386
+ const tagBizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
5338
5387
  const tagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5339
5388
  const inEncounterBizTagList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5340
5389
  const personBizTagList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
@@ -5350,43 +5399,43 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5350
5399
  const layoutColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>parseLayoutColumns(bannerInfo.value?.layoutTypeCode));
5351
5400
  // 创建CSS类映射的计算属性
5352
5401
  const getDynamicCssClasses = (comptControlCssList)=>{
5353
- if (!comptControlCssList?.length) return "";
5402
+ if (!comptControlCssList?.length) return '';
5354
5403
  const classes = [];
5355
5404
  comptControlCssList.forEach(({ cssTypeCode, cssValue })=>{
5356
- if ("true" === cssValue) switch(cssTypeCode){
5357
- case "FONT_BOLD":
5358
- classes.push("font-bold");
5405
+ if ('true' === cssValue) switch(cssTypeCode){
5406
+ case 'FONT_BOLD':
5407
+ classes.push('font-bold');
5359
5408
  break;
5360
- case "FONT_ITALIC":
5361
- classes.push("italic");
5409
+ case 'FONT_ITALIC':
5410
+ classes.push('italic');
5362
5411
  break;
5363
- case "FONT_UNDERLINE":
5364
- classes.push("underline");
5412
+ case 'FONT_UNDERLINE':
5413
+ classes.push('underline');
5365
5414
  break;
5366
- case "FONT_LINE_THROUGH":
5367
- classes.push("line-through");
5415
+ case 'FONT_LINE_THROUGH':
5416
+ classes.push('line-through');
5368
5417
  break;
5369
5418
  }
5370
5419
  });
5371
- return classes.join(" ");
5420
+ return classes.join(' ');
5372
5421
  };
5373
5422
  // 获取颜色样式
5374
5423
  const getColorStyle = (comptControlCssList)=>{
5375
- const colorItem = comptControlCssList?.find((item)=>"FONT_COLOR" === item.cssTypeCode);
5424
+ const colorItem = comptControlCssList?.find((item)=>'FONT_COLOR' === item.cssTypeCode);
5376
5425
  return colorItem?.cssValue ? {
5377
5426
  color: colorItem.cssValue
5378
5427
  } : {};
5379
5428
  };
5380
5429
  /**
5381
- * 格式化数据值,如果listFlag为1,则将数组用逗号分隔
5382
- */ const formatDataValue = (item)=>{
5430
+ * 格式化数据值,如果listFlag为1,则将数组用逗号分隔
5431
+ */ const formatDataValue = (item)=>{
5383
5432
  if (item.listFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && item.dataValue) try {
5384
5433
  const parsedData = JSON.parse(item.dataValue);
5385
- if (Array.isArray(parsedData)) return parsedData.join("");
5434
+ if (Array.isArray(parsedData)) return parsedData.join('');
5386
5435
  } catch (error) {
5387
- console.error("格式化失败", error);
5436
+ console.error('格式化失败', error);
5388
5437
  }
5389
- return item.dataValue || "--";
5438
+ return item.dataValue || '--';
5390
5439
  };
5391
5440
  function setBizId(data) {
5392
5441
  switch(tagBizIdTypeCode){
@@ -5401,8 +5450,8 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5401
5450
  }
5402
5451
  }
5403
5452
  /**
5404
- * 从banner数据中提取业务标签数据
5405
- */ function extractBizTagIds(bannerItemList) {
5453
+ * 从banner数据中提取业务标签数据
5454
+ */ function extractBizTagIds(bannerItemList) {
5406
5455
  // 筛选出 bizTagFlag === 1 的项
5407
5456
  const bizTagItems = bannerItemList.filter((item)=>item?.bizTagFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
5408
5457
  // 重置数组
@@ -5415,23 +5464,24 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5415
5464
  const parsedData = JSON.parse(item.dataValue);
5416
5465
  if (Array.isArray(parsedData) && parsedData.length > 0) {
5417
5466
  // 根据 bindingFieldNo 分类存储完整的数据
5418
- if ("inEncounterBizTagList" === item.bindingFieldNo) inEncounterBizTagList.value = parsedData;
5419
- else if ("personBizTagList" === item.bindingFieldNo) personBizTagList.value = parsedData;
5467
+ if ('inEncounterBizTagList' === item.bindingFieldNo) inEncounterBizTagList.value = parsedData;
5468
+ else if ('personBizTagList' === item.bindingFieldNo) personBizTagList.value = parsedData;
5420
5469
  }
5421
5470
  } catch (error) {
5422
5471
  console.error(`Failed to parse ${item.bindingFieldNo}:`, error);
5423
5472
  }
5424
5473
  });
5425
- console.log("inEncounterBizTagList:", inEncounterBizTagList.value);
5426
- console.log("personBizTagList:", personBizTagList.value);
5474
+ console.log('inEncounterBizTagList:', inEncounterBizTagList.value);
5475
+ console.log('personBizTagList:', personBizTagList.value);
5427
5476
  }
5428
5477
  /** 获取banner配置 */ const queryBannerConfig = async ()=>{
5429
5478
  loading.value = true;
5430
5479
  if (!__props.bizId && initBannerInfo.value) {
5431
5480
  bannerInfo.value = initBannerInfo.value;
5432
5481
  tagIds.value = [];
5433
- tagBizId.value = "";
5482
+ tagBizId.value = '';
5434
5483
  loading.value = false;
5484
+ emits('bannerInfoChange', bannerInfo.value);
5435
5485
  return;
5436
5486
  }
5437
5487
  const [, res] = await getBannerDataByBizId({
@@ -5449,13 +5499,14 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5449
5499
  // 在渲染时,如果某项同时 bizTagFlag === 1,则按照标签形式显示
5450
5500
  res.data.bannerItemList = (res?.data?.bannerItemList ?? [])?.filter((item)=>item?.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
5451
5501
  setBizId({
5452
- personId: res.data?.personId || "",
5453
- inEncounterId: res.data?.inEncounterId || ""
5502
+ personId: res.data?.personId || '',
5503
+ inEncounterId: res.data?.inEncounterId || ''
5454
5504
  });
5455
5505
  fetchBizTagListByExample();
5456
5506
  firstDisplayWidthRatio.value = res.data.bannerItemList[0]?.displayWidthRatio || 1;
5457
5507
  if (!__props.bizId) initBannerInfo.value = res?.data;
5458
5508
  bannerInfo.value = res?.data;
5509
+ emits('bannerInfoChange', bannerInfo.value);
5459
5510
  }
5460
5511
  };
5461
5512
  // 修改检查文字溢出的逻辑
@@ -5472,8 +5523,8 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5472
5523
  await queryBannerConfig();
5473
5524
  });
5474
5525
  /**
5475
- * 获取当前的标签
5476
- */ async function fetchBizTagListByExample() {
5526
+ * 获取当前的标签
5527
+ */ async function fetchBizTagListByExample() {
5477
5528
  if (!tagBizId.value || !tagBizIdTypeCode) {
5478
5529
  tagIds.value = [];
5479
5530
  return;
@@ -5525,7 +5576,7 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5525
5576
  content: bannerInfo.value?.personName
5526
5577
  }, {
5527
5578
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5528
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.personName ?? "--"), 1)
5579
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.personName ?? '--'), 1)
5529
5580
  ]),
5530
5581
  _: 1
5531
5582
  }, 8, [
@@ -5534,16 +5585,16 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5534
5585
  ])
5535
5586
  ], 32),
5536
5587
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_5, [
5537
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_6, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.age ?? "--"), 1),
5538
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_7, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.genderDesc ?? "--"), 1)
5588
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_6, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.age ?? '--'), 1),
5589
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_7, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.genderDesc ?? '--'), 1)
5539
5590
  ])
5540
5591
  ])
5541
5592
  ])
5542
5593
  ]),
5543
5594
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", _hoisted_8, [
5544
5595
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(BANNER_COMPONENT_CONFIG)[_ctx.code].bizIdTypeCode === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE).IENC_ENCOUNTER ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", _hoisted_9, [
5545
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_10, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.inpatientStatusDesc ?? "--"), 1),
5546
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.inpatientDays ?? "--"), 1)
5596
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_10, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.inpatientStatusDesc ?? '--'), 1),
5597
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.inpatientDays ?? '--'), 1)
5547
5598
  ])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
5548
5599
  ])
5549
5600
  ]),
@@ -6679,7 +6730,7 @@ const print = async (params)=>{
6679
6730
  const receiptList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>__props.receiptList);
6680
6731
  const showReceipt = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>receiptList && __props.receiptList.length > 0);
6681
6732
  /** 选择单据 */ const handleCommand = async (item)=>{
6682
- emits("selectItem", item);
6733
+ emits('selectItem', item);
6683
6734
  if (__props.isPrint) await handlePrint(item);
6684
6735
  };
6685
6736
  /** 打印单据 */ const handlePrint = async (item)=>{
@@ -6687,7 +6738,7 @@ const print = async (params)=>{
6687
6738
  ...__props.printParams,
6688
6739
  receiptId: item.receiptId
6689
6740
  });
6690
- res ? emits("success", res) : emits("fail");
6741
+ res ? emits('success', res) : emits('fail');
6691
6742
  };
6692
6743
  __expose({
6693
6744
  print: (item)=>handlePrint(item)
@@ -7854,200 +7905,43 @@ const TAG_MARGIN = 1; // 1rem
7854
7905
  const tag_select_exports_ = tag_selectvue_type_script_lang_ts_setup_true;
7855
7906
  /* ESM default export */ const tag_select = tag_select_exports_;
7856
7907
  /**
7857
- * [1-10013-1]根据条件查询用户列表
7908
+ * [1-10661-1] 根据条件查询用户列表
7858
7909
  * @param params
7859
7910
  * @returns
7860
7911
  */ const api_queryUserList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/user/queryUserSelectListByExample', params, {
7861
7912
  cancel: false
7862
7913
  });
7863
- /* ESM default export */ const user_selectvue_type_script_setup_true_lang_ts_name_UserSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
7864
- __name: 'index',
7865
- props: {
7866
- keyWord: {},
7867
- hospitalId: {},
7868
- userJobCodes: {},
7869
- bizUnitId: {},
7870
- userTypeCode: {},
7871
- multiSelectFlag: {
7872
- type: Boolean
7873
- },
7874
- defaultValue: {},
7875
- selectProps: {}
7876
- },
7877
- emits: [
7878
- 'change'
7879
- ],
7880
- setup (__props, { expose: __expose, emit: __emit }) {
7881
- const props = __props;
7882
- const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
7883
- const emit = __emit;
7884
- const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7885
- const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
7886
- const filterKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(''); // 检索值
7887
- const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
7888
- const defaultValueInserted = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
7889
- const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
7890
- const getUserList = async (data)=>{
7891
- loading.value = true;
7892
- const [, res] = await api_queryUserList({
7893
- ...data,
7894
- enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
7895
- userJobCodes: props.userJobCodes,
7896
- bizUnitId: props.bizUnitId,
7897
- userTypeCode: props.userTypeCode,
7898
- hospitalId: 'all' === props.hospitalId ? void 0 : props.hospitalId,
7899
- pageNumber: 1,
7900
- pageSize: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ONE_PAGE_SIZE
7901
- });
7902
- loading.value = false;
7903
- if (res?.success) {
7904
- let defaultList = [];
7905
- if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length) // 兼容表单回显时的默认值缺失
7906
- defaultList = props.defaultValue.map((item)=>({
7907
- ...item,
7908
- userId: item.value || item.userId,
7909
- userName: item.label || item.userName
7910
- }));
7911
- let list = (res.data ?? []).map((item)=>({
7912
- ...item,
7913
- label: item.userName,
7914
- value: item.userId
7915
- }));
7916
- if (defaultList.length) list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
7917
- ...list,
7918
- ...defaultList
7919
- ], 'userId');
7920
- defaultValueInserted.value = true;
7921
- userList.value = list.map((item)=>({
7922
- ...item,
7923
- label: item.userNo ? `${item.label || item.userName}|${item.userNo}` : item.label || item.userName
7924
- }));
7925
- }
7926
- };
7927
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
7928
- if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultValueInserted.value) userList.value = [
7929
- ...props.defaultValue
7930
- ];
7931
- }, {
7932
- deep: true,
7933
- immediate: true
7934
- });
7935
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.selectProps, ()=>{
7936
- selectProps.value = props.selectProps || {};
7937
- }, {
7938
- deep: true,
7939
- immediate: true
7940
- });
7941
- const onChange = (value)=>{
7942
- if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
7943
- if (props.multiSelectFlag) emit('change', value);
7944
- else {
7945
- const user = userList.value.find((item)=>item.value === value || item.userId === value);
7946
- emit('change', value, user);
7947
- }
7948
- };
7949
- const handelRemoteMethod = async (value)=>{
7950
- if (filterKeyWord.value !== value) filterKeyWord.value = value || '';
7951
- else if (!value && userList.value.length) return;
7952
- try {
7953
- loading.value = true;
7954
- await getUserList({
7955
- keyWord: value
7956
- });
7957
- } finally{
7958
- loading.value = false;
7959
- }
7960
- };
7961
- const fetchData = async (data)=>{
7962
- await getUserList(data);
7963
- };
7964
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
7965
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
7966
- if (props.keyWord && selectRef.value) {
7967
- const inputEl = selectRef.value?.$el.querySelector('input');
7968
- if (inputEl) {
7969
- inputEl.value = props.keyWord;
7970
- // 创建 input 事件模拟用户输入
7971
- const event = new Event('input', {
7972
- bubbles: true
7973
- });
7974
- inputEl.dispatchEvent(event);
7975
- }
7976
- }
7977
- await fetchData();
7978
- });
7979
- });
7980
- __expose({
7981
- selectRef,
7982
- defaultValueInserted,
7983
- userList,
7984
- fetchData
7985
- });
7986
- return (_ctx, _cache)=>{
7987
- const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
7988
- const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
7989
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
7990
- ref_key: "selectRef",
7991
- ref: selectRef,
7992
- remote: "",
7993
- clearable: "",
7994
- filterable: "",
7995
- loading: loading.value,
7996
- multiple: !!props.multiSelectFlag,
7997
- "remote-method": handelRemoteMethod,
7998
- onClear: _cache[0] || (_cache[0] = ($event)=>userList.value = []),
7999
- onChange: onChange
8000
- }, selectProps.value), {
8001
- label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ label })=>[
8002
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(label?.split('|')?.[0]), 1)
8003
- ]),
8004
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
8005
- ((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, {
8006
- key: item.value || item.userId,
8007
- label: item.label || item.userName,
8008
- value: item.value || item.userId
8009
- }, null, 8, [
8010
- "label",
8011
- "value"
8012
- ]))), 128))
8013
- ]),
8014
- _: 1
8015
- }, 16, [
8016
- "loading",
8017
- "multiple"
8018
- ]);
8019
- };
7914
+ const user_selectvue_type_script_lang_tsx_name_UserSelect_setup_true_hoisted_1 = {
7915
+ class: "flex flex-col",
7916
+ style: {
7917
+ "min-width": "500px"
8020
7918
  }
8021
- });
8022
- const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_UserSelect;
8023
- /* ESM default export */ const user_select = user_select_exports_;
8024
- /**
8025
- * [1-10155-1] 根据条件查询业务单元列表
8026
- * 是否分页 Y
8027
- * @param params
8028
- * @returns
8029
- */ const queryBizUnitList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryBizUnitListByExample', params);
7919
+ };
7920
+ const user_selectvue_type_script_lang_tsx_name_UserSelect_setup_true_hoisted_2 = {
7921
+ class: "border-t pt-2 px-2"
7922
+ };
8030
7923
  // 全局事件:用于关闭其他实例的 popover
8031
- const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8032
- 96-10014-1 业务单元选择组件
8033
- 1、调用“1-10516-1 根据条件查询业务单元列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询业务单元列表
8034
- 2、展示列包括“组织类型、编码、名称”
7924
+ const CLOSE_OTHER_POPOVERS_EVENT = 'user-select:close-others'; /*
7925
+ 调用"1-10013-1 根据条件查询用户列表"传入"启用标志=1、关键字、医院标识
7926
+ 入参:医院标识、用户岗位代码集合、服务业务单元标识、用户类别代码"查询用户列表
8035
7927
  */
8036
- /* ESM default export */ const biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
7928
+ /* ESM default export */ const user_selectvue_type_script_lang_tsx_name_UserSelect_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
8037
7929
  __name: 'index',
8038
7930
  props: {
8039
7931
  keyWord: {},
8040
7932
  hospitalId: {},
8041
- orgTypeCodes: {},
7933
+ userJobCodes: {},
7934
+ bizUnitId: {},
7935
+ userTypeCode: {},
8042
7936
  multiSelectFlag: {
8043
7937
  type: Boolean
8044
7938
  },
8045
7939
  defaultValue: {},
8046
- encounterTypeCode: {},
8047
7940
  disabledValueIds: {},
8048
- deptId: {},
8049
7941
  tableProps: {},
8050
- selectProps: {}
7942
+ selectProps: {},
7943
+ onlyEnabledFlag: {},
7944
+ allowSelectDisabledFlag: {}
8051
7945
  },
8052
7946
  emits: [
8053
7947
  'change'
@@ -8069,14 +7963,20 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8069
7963
  const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
8070
7964
  const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
8071
7965
  const currentRowIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
8072
- const clearing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
8073
- const bizUnitList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // 业务单元列表
7966
+ const clearing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false); // 仅查启用:默认为 true
7967
+ const onlyEnabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true); // 根据 onlyEnabledFlag 初始化,只有明确传 FLAG.NO(0) 时才不勾选
7968
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.onlyEnabledFlag, (val)=>{
7969
+ onlyEnabled.value = val !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO;
7970
+ }, {
7971
+ immediate: true
7972
+ });
7973
+ const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // 用户列表
8074
7974
  const selectedValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // select组件绑定的选中的值
8075
7975
  const selectedRows = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // table表格选中的值
8076
7976
  const defaultSetTableSelected = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false); // 传入的默认数据已经绑定到表格中
8077
7977
  const initComponentData = ()=>{
8078
7978
  popoverVisible.value = false;
8079
- bizUnitList.value = [];
7979
+ userList.value = [];
8080
7980
  selectedValue.value = void 0;
8081
7981
  selectedRows.value = [];
8082
7982
  handleChange();
@@ -8084,7 +7984,7 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8084
7984
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs?.modelValue, (newVal)=>{
8085
7985
  if (newVal) {
8086
7986
  if (!props.multiSelectFlag) {
8087
- const item = bizUnitList.value.find((item)=>item.value === newVal);
7987
+ const item = userList.value.find((item)=>item.value === newVal);
8088
7988
  if (item?.label && selectedValue.value !== item.label) {
8089
7989
  selectedValue.value = item.label;
8090
7990
  selectedRows.value = [
@@ -8113,12 +8013,12 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8113
8013
  if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultSetTableSelected.value) {
8114
8014
  const list = props.defaultValue.map((item)=>({
8115
8015
  ...item,
8116
- orgId: item.value || item.orgId,
8117
- orgNameDisplay: item.label || item.orgNameDisplay,
8118
- value: item.value || item.orgId,
8119
- label: item.label || item.orgNameDisplay
8016
+ userId: item.value || item.userId,
8017
+ userName: item.label || item.userName,
8018
+ value: item.value || item.userId,
8019
+ label: item.label || item.userName
8120
8020
  }));
8121
- bizUnitList.value = [
8021
+ userList.value = [
8122
8022
  ...list
8123
8023
  ];
8124
8024
  }
@@ -8126,7 +8026,7 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8126
8026
  deep: true,
8127
8027
  immediate: true
8128
8028
  });
8129
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.orgTypeCodes, (newVal, oldVal)=>{
8029
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.userJobCodes, (newVal, oldVal)=>{
8130
8030
  if (newVal && !(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isEqual)(oldVal, newVal)) initComponentData();
8131
8031
  });
8132
8032
  const tableConfig = useColumnConfig({
@@ -8136,43 +8036,651 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8136
8036
  prop: 'indexNo',
8137
8037
  type: 'selection',
8138
8038
  isHidden: !props.multiSelectFlag,
8139
- selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
8039
+ selectable: (row)=>{
8040
+ if (props.disabledValueIds?.length && row.userId && props.disabledValueIds.includes(row.userId)) return false;
8041
+ // 检查是否允许选择停用数据(默认不允许)
8042
+ if (props.allowSelectDisabledFlag !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && row.enabledFlag !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES) return false;
8043
+ return true;
8044
+ }
8140
8045
  },
8141
8046
  {
8142
- label: t('bizUnitSelect.table.orgNo', '编码'),
8143
- prop: 'orgNo',
8144
- minWidth: 100
8047
+ label: t('userSelect.table.userNo', '用户编码'),
8048
+ prop: 'userNo',
8049
+ minWidth: 120
8145
8050
  },
8146
8051
  {
8147
- label: t('bizUnitSelect.table.orgNameDisplay', '名称'),
8148
- prop: 'orgNameDisplay',
8149
- minWidth: 200
8052
+ label: t('userSelect.table.userName', '用户名称'),
8053
+ prop: 'userName',
8054
+ minWidth: 120
8150
8055
  },
8151
8056
  {
8152
- label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
8153
- prop: 'orgTypeDescDisplay',
8154
- minWidth: 100
8057
+ label: t('userSelect.table.userJobDesc', '用户岗位'),
8058
+ prop: 'userJobDesc',
8059
+ minWidth: 120
8060
+ },
8061
+ {
8062
+ label: t('userSelect.table.enabledFlag', '状态'),
8063
+ prop: 'enabledFlag',
8064
+ minWidth: 80,
8065
+ render: (row)=>{
8066
+ const isDisabled = row.enabledFlag !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES;
8067
+ const statusText = isDisabled ? t('userSelect.status.disabled', '停用') : t('userSelect.status.enabled', '启用'); // 如果不允许选择停用数据且当前记录为停用,显示红色 tooltip(默认不允许)
8068
+ if (props.allowSelectDisabledFlag !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && isDisabled) return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-tooltip"), {
8069
+ content: t('userSelect.errorTip.disabledUserSelectedTip', '已停用不可选!'),
8070
+ placement: "top",
8071
+ effect: "light",
8072
+ "popper-class": "disabled-user-tooltip"
8073
+ }, {
8074
+ default: ()=>[
8075
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", {
8076
+ style: "color: #f56c6c"
8077
+ }, [
8078
+ statusText
8079
+ ])
8080
+ ]
8081
+ }, 8, [
8082
+ "content"
8083
+ ]);
8084
+ return statusText;
8085
+ }
8155
8086
  }
8156
8087
  ]
8157
8088
  });
8158
8089
  const getRowClassName = (data)=>{
8159
- if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
8090
+ if (props.disabledValueIds?.length && data.row.userId && props.disabledValueIds.includes(data.row.userId)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
8091
+ // 检查是否允许选择停用数据(默认不允许)
8092
+ if (props.allowSelectDisabledFlag !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && data.row.enabledFlag !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES) return 'cursor-not-allowed !bg-gray-100 text-gray-300 disabled-row';
8160
8093
  return 'cursor-pointer';
8161
8094
  };
8162
- const getBizUnitList = async (data)=>{
8095
+ const getUserList = async (data)=>{
8163
8096
  loading.value = true;
8164
- const [, res] = await queryBizUnitList({
8097
+ const [, res] = await api_queryUserList({
8165
8098
  ...data,
8166
- hospitalId: props.hospitalId,
8167
- orgTypeCodes: props.orgTypeCodes,
8168
- enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
8169
- encounterTypeCode: props.encounterTypeCode,
8170
- deptId: props.deptId
8171
- });
8172
- loading.value = false;
8173
- if (res?.success) {
8174
- let defaultList = [];
8175
- if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !data?.keyWord) defaultList = props.defaultValue.map((item)=>({
8099
+ hospitalId: 'all' === props.hospitalId ? void 0 : props.hospitalId,
8100
+ userJobCodes: props.userJobCodes,
8101
+ bizUnitId: props.bizUnitId,
8102
+ userTypeCode: props.userTypeCode,
8103
+ enabledFlag: onlyEnabled.value ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES : void 0,
8104
+ pageNumber: 1,
8105
+ pageSize: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ONE_PAGE_SIZE
8106
+ });
8107
+ loading.value = false;
8108
+ if (res?.success) {
8109
+ let list = (res.data ?? []).map((item)=>({
8110
+ ...item,
8111
+ label: item.userName,
8112
+ value: item.userId
8113
+ })); // 保留已选中的项,确保选中状态能正确回显
8114
+ if (selectedRows.value?.length) {
8115
+ const selectedList = selectedRows.value.map((item)=>({
8116
+ ...item,
8117
+ userId: item.value || item.userId,
8118
+ userName: item.label || item.userName,
8119
+ value: item.value || item.userId,
8120
+ label: item.label || item.userName
8121
+ }));
8122
+ list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
8123
+ ...list,
8124
+ ...selectedList
8125
+ ], 'userId');
8126
+ } else if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length) {
8127
+ const defaultList = props.defaultValue.map((item)=>({
8128
+ ...item,
8129
+ userId: item.value || item.userId,
8130
+ userName: item.label || item.userName,
8131
+ value: item.value || item.userId,
8132
+ label: item.label || item.userName
8133
+ }));
8134
+ list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
8135
+ ...list,
8136
+ ...defaultList
8137
+ ], 'userId');
8138
+ }
8139
+ userList.value = list;
8140
+ currentRowIndex.value = -1;
8141
+ tableRef.value?.eleTable?.setCurrentRow?.(void 0);
8142
+ if (userList.value.length && props.multiSelectFlag && selectedRows.value?.length && !defaultSetTableSelected.value) {
8143
+ const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
8144
+ tableRef.value?.eleTable?.clearSelection();
8145
+ userList.value.forEach((item)=>{
8146
+ if (list.some((row)=>row.userId === item.value || row.value === item.value)) tableRef.value?.eleTable?.toggleRowSelection(item, true);
8147
+ });
8148
+ }
8149
+ defaultSetTableSelected.value = true;
8150
+ }
8151
+ const tableSelectedRows = tableRef.value?.eleTable?.getSelectionRows();
8152
+ if (props.multiSelectFlag && !selectedRows.value?.length && tableSelectedRows?.length) tableRef.value?.eleTable?.clearSelection();
8153
+ };
8154
+ const handleChange = ()=>{
8155
+ let value = selectedRows.value.map((item)=>item.value || item.userId);
8156
+ if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
8157
+ if (props.multiSelectFlag) emit('change', value, selectedRows.value);
8158
+ else {
8159
+ const data = value[0] ? userList.value.find((item)=>item.value === value[0] || item.userId === value[0]) : void 0;
8160
+ emit('change', value[0], data);
8161
+ }
8162
+ };
8163
+ const handelRemoteMethod = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(value) {
8164
+ await getUserList({
8165
+ keyWord: value
8166
+ });
8167
+ }, 500); // 滚动到当前选中行
8168
+ const scrollToCurrentRow = ()=>{
8169
+ setTimeout(()=>{
8170
+ if (currentRowIndex.value < 0) return;
8171
+ try {
8172
+ const tableElement = tableRef.value?.eleTable?.$el;
8173
+ if (!tableElement) return; // 查找当前高亮的行
8174
+ const currentRowElement = tableElement.querySelector('.el-table__body tr.current-row');
8175
+ if (!currentRowElement) return; // 使用 scrollIntoView 方法滚动到当前行
8176
+ currentRowElement.scrollIntoView({
8177
+ block: 'nearest',
8178
+ behavior: 'smooth'
8179
+ });
8180
+ } catch (error) {
8181
+ console.error('Error scrolling to current row:', error);
8182
+ }
8183
+ }, 100);
8184
+ }; // 键盘事件
8185
+ const handleKeydown = (e)=>{
8186
+ if (!userList.value.length || !popoverVisible.value) return;
8187
+ if ('ArrowDown' === e.key) {
8188
+ e.preventDefault();
8189
+ if (currentRowIndex.value < userList.value.length - 1) {
8190
+ currentRowIndex.value++;
8191
+ const row = userList.value[currentRowIndex.value];
8192
+ tableRef.value.eleTable?.setCurrentRow(row);
8193
+ scrollToCurrentRow();
8194
+ }
8195
+ } else if ('ArrowUp' === e.key) {
8196
+ e.preventDefault();
8197
+ if (currentRowIndex.value > 0) {
8198
+ currentRowIndex.value--;
8199
+ const row = userList.value[currentRowIndex.value];
8200
+ tableRef.value.eleTable?.setCurrentRow(row);
8201
+ scrollToCurrentRow();
8202
+ }
8203
+ } else if ('Enter' === e.key && currentRowIndex.value >= 0) {
8204
+ const row = userList.value[currentRowIndex.value];
8205
+ if (props.multiSelectFlag) tableRef.value.eleTable?.toggleRowSelection(row);
8206
+ else {
8207
+ setTimeout(()=>{
8208
+ selectRef.value?.blur();
8209
+ }, 30);
8210
+ handleTableRowSelect(row);
8211
+ }
8212
+ }
8213
+ };
8214
+ const handleTagRemove = (tag)=>{
8215
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
8216
+ if (!selectedRows.value.length) return;
8217
+ const index = selectedRows.value?.findIndex((item)=>item.label === tag);
8218
+ if (-1 !== index) {
8219
+ selectedRows.value.splice(index, 1);
8220
+ const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
8221
+ tableRef.value?.eleTable?.clearSelection();
8222
+ list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true)); // 修复:显式调用 handleChange 确保更新事件被触发
8223
+ // 特别是在删除最后一个选项时,table 的 selection-change 可能不会触发
8224
+ handleChange();
8225
+ }
8226
+ });
8227
+ };
8228
+ const handleClear = ()=>{
8229
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
8230
+ if (!popoverVisible.value) {
8231
+ clearing.value = true;
8232
+ const inputEl = selectRef.value?.$el?.querySelector('input');
8233
+ if (inputEl) inputEl.blur();
8234
+ }
8235
+ handleBlur();
8236
+ selectedRows.value = [];
8237
+ selectedValue.value = props.multiSelectFlag ? [] : '';
8238
+ tableRef.value?.eleTable?.clearSelection?.();
8239
+ tableRef.value?.eleTable?.setCurrentRow?.(void 0);
8240
+ getUserList();
8241
+ handleChange();
8242
+ });
8243
+ };
8244
+ const handleFocus = ()=>{
8245
+ setTimeout(()=>{
8246
+ if (clearing.value) return;
8247
+ // 通知其他实例关闭 popover
8248
+ window.dispatchEvent(new CustomEvent(CLOSE_OTHER_POPOVERS_EVENT, {
8249
+ detail: {
8250
+ componentId
8251
+ }
8252
+ }));
8253
+ popoverVisible.value = true;
8254
+ }, 100);
8255
+ };
8256
+ const handleBlur = ()=>{
8257
+ if (clearing.value) {
8258
+ setTimeout(()=>{
8259
+ clearing.value = false;
8260
+ }, 150);
8261
+ return;
8262
+ }
8263
+ if (!props.multiSelectFlag) popoverVisible.value = false;
8264
+ };
8265
+ const handleClickOutside = (e)=>{
8266
+ const target = e.target;
8267
+ const selectEl = selectRef.value?.$el;
8268
+ const popoverEl = popoverRef.value?.popperRef?.contentRef; // 检查是否点击了当前组件的元素
8269
+ if (selectEl?.contains(target) || popoverEl?.contains(target)) return;
8270
+ // 检查是否点击了其他 el-select 或其下拉框
8271
+ let element = target;
8272
+ while(element){
8273
+ if (element.classList?.contains('el-select') || element.classList?.contains('el-select-dropdown') || element.classList?.contains('el-popper') || element.classList?.contains('el-picker-panel') || element.classList?.contains('el-date-picker') || element.classList?.contains('el-time-picker')) {
8274
+ popoverVisible.value = false;
8275
+ return;
8276
+ }
8277
+ element = element.parentElement;
8278
+ } // 点击了其他地方,关闭 popover
8279
+ popoverVisible.value = false;
8280
+ }; // 监听 el-select 的 focus 事件来关闭当前 popover
8281
+ const handleGlobalFocusin = (e)=>{
8282
+ if (!popoverVisible.value) return;
8283
+ const target = e.target;
8284
+ const selectEl = selectRef.value?.$el;
8285
+ const popoverEl = popoverRef.value?.popperRef?.contentRef; // 如果焦点移到了其他元素(如其他 el-select),则关闭当前 popover
8286
+ if (!selectEl?.contains(target) && !popoverEl?.contains(target)) {
8287
+ let element = target;
8288
+ while(element){
8289
+ if (element.classList?.contains('el-select') || element.classList?.contains('el-input')) {
8290
+ popoverVisible.value = false;
8291
+ return;
8292
+ }
8293
+ element = element.parentElement;
8294
+ }
8295
+ }
8296
+ };
8297
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
8298
+ if (val) {
8299
+ document.addEventListener('keydown', handleKeydown, true);
8300
+ document.addEventListener('click', handleClickOutside);
8301
+ document.addEventListener('focusin', handleGlobalFocusin, true);
8302
+ } else {
8303
+ document.removeEventListener('keydown', handleKeydown, true);
8304
+ document.removeEventListener('click', handleClickOutside);
8305
+ document.removeEventListener('focusin', handleGlobalFocusin, true);
8306
+ }
8307
+ });
8308
+ const handleTableRowSelect = (data)=>{
8309
+ if (data) {
8310
+ if (props.disabledValueIds?.length && data.userId && props.disabledValueIds.includes(data.userId)) {
8311
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(t('userSelect.errorTip.disabledRowSelectedTip', '当前数据不可选择!'));
8312
+ return;
8313
+ } // 检查是否允许选择停用数据(默认不允许)
8314
+ if (props.allowSelectDisabledFlag !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && data.enabledFlag !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES) {
8315
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(t('userSelect.errorTip.disabledUserSelectedTip', '已停用不可选!'));
8316
+ return;
8317
+ }
8318
+ }
8319
+ if (props.multiSelectFlag) {
8320
+ tableRef.value?.eleTable?.toggleRowSelection(data);
8321
+ return;
8322
+ }
8323
+ selectedValue.value = data?.label || data?.userName;
8324
+ selectedRows.value = data ? [
8325
+ data
8326
+ ] : [];
8327
+ if (data) popoverVisible.value = false;
8328
+ handleChange();
8329
+ };
8330
+ const handleSelectionChange = (items)=>{
8331
+ selectedRows.value = items;
8332
+ selectedValue.value = items.map((row)=>row.label || row.userName);
8333
+ handleChange();
8334
+ };
8335
+ const handlePopoverShow = ()=>{
8336
+ window.dispatchEvent(new CustomEvent(CLOSE_OTHER_POPOVERS_EVENT, {
8337
+ detail: {
8338
+ componentId
8339
+ }
8340
+ }));
8341
+ }; // 监听其他实例的关闭事件
8342
+ const handleCloseOtherPopovers = (event)=>{
8343
+ const customEvent = event;
8344
+ if (customEvent.detail?.componentId !== componentId) popoverVisible.value = false;
8345
+ }; // 处理仅查启用复选框变化
8346
+ const handleOnlyEnabledChange = async ()=>{
8347
+ await getUserList();
8348
+ };
8349
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
8350
+ document.removeEventListener('keydown', handleKeydown, true);
8351
+ document.removeEventListener('click', handleClickOutside);
8352
+ document.removeEventListener('focusin', handleGlobalFocusin, true);
8353
+ window.removeEventListener(CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
8354
+ });
8355
+ const fetchData = async (data)=>{
8356
+ await getUserList(data);
8357
+ };
8358
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
8359
+ window.addEventListener(CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
8360
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
8361
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
8362
+ if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.userName);
8363
+ else {
8364
+ const data = props.defaultValue.find((item)=>item.userId === attrs.modelValue || item.value === attrs.modelValue);
8365
+ selectedValue.value = data?.label || data?.userName;
8366
+ }
8367
+ selectedRows.value = props.defaultValue;
8368
+ defaultSetTableSelected.value = false;
8369
+ } else {
8370
+ selectedValue.value = props.multiSelectFlag ? [] : void 0;
8371
+ selectedRows.value = [];
8372
+ }
8373
+ if (props.keyWord && selectRef.value) {
8374
+ const inputEl = selectRef.value?.$el.querySelector('input');
8375
+ if (inputEl) {
8376
+ inputEl.value = props.keyWord; // 创建 input 事件模拟用户输入
8377
+ const event = new Event('input', {
8378
+ bubbles: true
8379
+ });
8380
+ inputEl.dispatchEvent(event);
8381
+ }
8382
+ }
8383
+ await fetchData();
8384
+ if (attrs?.modelValue && (!props.defaultValue || Array.isArray(props.defaultValue) && !props.defaultValue.length)) {
8385
+ if (props.multiSelectFlag) {
8386
+ const items = userList.value.filter((item)=>attrs.modelValue?.includes(item.value));
8387
+ selectedValue.value = items.map((item)=>item.label || item.userName);
8388
+ selectedRows.value = items;
8389
+ } else {
8390
+ const item = userList.value.find((item)=>item.value === attrs?.modelValue);
8391
+ if (item?.label && selectedValue.value !== item.label) {
8392
+ selectedValue.value = item.label;
8393
+ selectedRows.value = [
8394
+ item
8395
+ ];
8396
+ }
8397
+ }
8398
+ defaultSetTableSelected.value = false;
8399
+ }
8400
+ });
8401
+ });
8402
+ const onClickOutside = ()=>{
8403
+ handleBlur();
8404
+ };
8405
+ const visibleChange = (val)=>{
8406
+ if (val) handleFocus();
8407
+ };
8408
+ __expose({
8409
+ popoverRef,
8410
+ tableRef,
8411
+ selectRef,
8412
+ popoverVisible,
8413
+ defaultSetTableSelected,
8414
+ userList,
8415
+ fetchData
8416
+ });
8417
+ return (_ctx, _cache)=>{
8418
+ const _component_el_checkbox = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-checkbox");
8419
+ const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
8420
+ const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
8421
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
8422
+ onKeydown: handleKeydown
8423
+ }, [
8424
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_popover, {
8425
+ ref_key: "popoverRef",
8426
+ ref: popoverRef,
8427
+ visible: popoverVisible.value,
8428
+ placement: "bottom",
8429
+ trigger: "click",
8430
+ width: 600,
8431
+ onShow: handlePopoverShow
8432
+ }, {
8433
+ reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
8434
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_select, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
8435
+ ref_key: "selectRef",
8436
+ ref: selectRef,
8437
+ modelValue: selectedValue.value,
8438
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>selectedValue.value = $event),
8439
+ "collapse-tags": !!props.multiSelectFlag,
8440
+ multiple: !!props.multiSelectFlag,
8441
+ options: [],
8442
+ placeholder: "请选择用户",
8443
+ "popper-class": popoverVisible.value ? 'hidden' : '',
8444
+ "remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
8445
+ teleported: !popoverVisible.value,
8446
+ clearable: "",
8447
+ "collapse-tags-tooltip": "",
8448
+ filterable: "",
8449
+ remote: "",
8450
+ "remote-show-suffix": "",
8451
+ loading: loading.value
8452
+ }, selectProps.value, {
8453
+ onVisibleChange: visibleChange,
8454
+ onClear: handleClear,
8455
+ onRemoveTag: handleTagRemove
8456
+ }), null, 16, [
8457
+ "modelValue",
8458
+ "collapse-tags",
8459
+ "multiple",
8460
+ "popper-class",
8461
+ "remote-method",
8462
+ "teleported",
8463
+ "loading"
8464
+ ])
8465
+ ]),
8466
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
8467
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", user_selectvue_type_script_lang_tsx_name_UserSelect_setup_true_hoisted_1, [
8468
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
8469
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
8470
+ height: `${tableProps.value.maxHeight || 260}px`
8471
+ }),
8472
+ class: "w-full overflow-hidden"
8473
+ }, [
8474
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
8475
+ ref_key: "tableRef",
8476
+ ref: tableRef,
8477
+ columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
8478
+ data: userList.value,
8479
+ loading: loading.value,
8480
+ pagination: false,
8481
+ "row-class-name": getRowClassName,
8482
+ "highlight-current-row": "",
8483
+ "row-key": "userId",
8484
+ style: {
8485
+ height: "100%"
8486
+ }
8487
+ }, tableProps.value, {
8488
+ onRowClick: handleTableRowSelect,
8489
+ onSelectionChange: handleSelectionChange
8490
+ }), null, 16, [
8491
+ "columns",
8492
+ "data",
8493
+ "loading"
8494
+ ])
8495
+ ], 4),
8496
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", user_selectvue_type_script_lang_tsx_name_UserSelect_setup_true_hoisted_2, [
8497
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_checkbox, {
8498
+ modelValue: onlyEnabled.value,
8499
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>onlyEnabled.value = $event),
8500
+ disabled: props.onlyEnabledFlag !== (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG).NO,
8501
+ onChange: handleOnlyEnabledChange
8502
+ }, {
8503
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[2] || (_cache[2] = [
8504
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)('仅查启用'), -1)
8505
+ ])),
8506
+ _: 1,
8507
+ __: [
8508
+ 2
8509
+ ]
8510
+ }, 8, [
8511
+ "modelValue",
8512
+ "disabled"
8513
+ ])
8514
+ ])
8515
+ ])), [
8516
+ [
8517
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ClickOutside),
8518
+ onClickOutside
8519
+ ]
8520
+ ])
8521
+ ]),
8522
+ _: 1
8523
+ }, 8, [
8524
+ "visible"
8525
+ ])
8526
+ ], 32);
8527
+ };
8528
+ }
8529
+ });
8530
+ const user_select_exports_ = user_selectvue_type_script_lang_tsx_name_UserSelect_setup_true;
8531
+ /* ESM default export */ const user_select = user_select_exports_;
8532
+ /**
8533
+ * [1-10155-1] 根据条件查询业务单元列表
8534
+ * 是否分页 Y
8535
+ * @param params
8536
+ * @returns
8537
+ */ const queryBizUnitList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryBizUnitListByExample', params);
8538
+ // 全局事件:用于关闭其他实例的 popover
8539
+ const biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true_CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8540
+ 96-10014-1 业务单元选择组件
8541
+ 1、调用“1-10516-1 根据条件查询业务单元列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询业务单元列表
8542
+ 2、展示列包括“组织类型、编码、名称”
8543
+ */
8544
+ /* ESM default export */ const biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
8545
+ __name: 'index',
8546
+ props: {
8547
+ keyWord: {},
8548
+ hospitalId: {},
8549
+ orgTypeCodes: {},
8550
+ multiSelectFlag: {
8551
+ type: Boolean
8552
+ },
8553
+ defaultValue: {},
8554
+ encounterTypeCode: {},
8555
+ disabledValueIds: {},
8556
+ deptId: {},
8557
+ tableProps: {},
8558
+ selectProps: {}
8559
+ },
8560
+ emits: [
8561
+ 'change'
8562
+ ],
8563
+ setup (__props, { expose: __expose, emit: __emit }) {
8564
+ const props = __props;
8565
+ const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
8566
+ const emit = __emit;
8567
+ const tableProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tableProps || {
8568
+ maxHeight: 260
8569
+ });
8570
+ const selectProps = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.selectProps || {});
8571
+ const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
8572
+ const instance = (0, __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance)();
8573
+ const componentId = instance?.uid || Math.random(); // 唯一标识当前组件实例
8574
+ const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
8575
+ const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
8576
+ const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
8577
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
8578
+ const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
8579
+ const currentRowIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
8580
+ const clearing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
8581
+ const bizUnitList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // 业务单元列表
8582
+ const selectedValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // select组件绑定的选中的值
8583
+ const selectedRows = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]); // table表格选中的值
8584
+ const defaultSetTableSelected = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false); // 传入的默认数据已经绑定到表格中
8585
+ const initComponentData = ()=>{
8586
+ popoverVisible.value = false;
8587
+ bizUnitList.value = [];
8588
+ selectedValue.value = void 0;
8589
+ selectedRows.value = [];
8590
+ handleChange();
8591
+ };
8592
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs?.modelValue, (newVal)=>{
8593
+ if (newVal) {
8594
+ if (!props.multiSelectFlag) {
8595
+ const item = bizUnitList.value.find((item)=>item.value === newVal);
8596
+ if (item?.label && selectedValue.value !== item.label) {
8597
+ selectedValue.value = item.label;
8598
+ selectedRows.value = [
8599
+ item
8600
+ ];
8601
+ }
8602
+ }
8603
+ } else {
8604
+ selectedValue.value = props.multiSelectFlag ? [] : void 0;
8605
+ selectedRows.value = [];
8606
+ }
8607
+ });
8608
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>[
8609
+ props.tableProps,
8610
+ props.selectProps
8611
+ ], ()=>{
8612
+ tableProps.value = props.tableProps || {
8613
+ maxHeight: 260
8614
+ };
8615
+ selectProps.value = props.selectProps || {};
8616
+ }, {
8617
+ deep: true,
8618
+ immediate: true
8619
+ });
8620
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
8621
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultSetTableSelected.value) {
8622
+ const list = props.defaultValue.map((item)=>({
8623
+ ...item,
8624
+ orgId: item.value || item.orgId,
8625
+ orgNameDisplay: item.label || item.orgNameDisplay,
8626
+ value: item.value || item.orgId,
8627
+ label: item.label || item.orgNameDisplay
8628
+ }));
8629
+ bizUnitList.value = [
8630
+ ...list
8631
+ ];
8632
+ }
8633
+ }, {
8634
+ deep: true,
8635
+ immediate: true
8636
+ });
8637
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.orgTypeCodes, (newVal, oldVal)=>{
8638
+ if (newVal && !(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isEqual)(oldVal, newVal)) initComponentData();
8639
+ });
8640
+ const tableConfig = useColumnConfig({
8641
+ getData: (t)=>[
8642
+ {
8643
+ label: t('global:select'),
8644
+ prop: 'indexNo',
8645
+ type: 'selection',
8646
+ isHidden: !props.multiSelectFlag,
8647
+ selectable: (row)=>!(props.disabledValueIds?.length && row.orgId && props.disabledValueIds.includes(row.orgId)) && true
8648
+ },
8649
+ {
8650
+ label: t('bizUnitSelect.table.orgNo', '编码'),
8651
+ prop: 'orgNo',
8652
+ minWidth: 100
8653
+ },
8654
+ {
8655
+ label: t('bizUnitSelect.table.orgNameDisplay', '名称'),
8656
+ prop: 'orgNameDisplay',
8657
+ minWidth: 200
8658
+ },
8659
+ {
8660
+ label: t('bizUnitSelect.table.orgTypeDescDisplay', '组织类型'),
8661
+ prop: 'orgTypeDescDisplay',
8662
+ minWidth: 100
8663
+ }
8664
+ ]
8665
+ });
8666
+ const getRowClassName = (data)=>{
8667
+ if (props.disabledValueIds?.length && data.row.orgId && props.disabledValueIds.includes(data.row.orgId)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
8668
+ return 'cursor-pointer';
8669
+ };
8670
+ const getBizUnitList = async (data)=>{
8671
+ loading.value = true;
8672
+ const [, res] = await queryBizUnitList({
8673
+ ...data,
8674
+ hospitalId: props.hospitalId,
8675
+ orgTypeCodes: props.orgTypeCodes,
8676
+ enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
8677
+ encounterTypeCode: props.encounterTypeCode,
8678
+ deptId: props.deptId
8679
+ });
8680
+ loading.value = false;
8681
+ if (res?.success) {
8682
+ let defaultList = [];
8683
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !data?.keyWord) defaultList = props.defaultValue.map((item)=>({
8176
8684
  ...item,
8177
8685
  orgId: item.value || item.orgId,
8178
8686
  orgNameDisplay: item.label || item.orgNameDisplay,
@@ -8297,7 +8805,7 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8297
8805
  setTimeout(()=>{
8298
8806
  if (clearing.value) return;
8299
8807
  // 通知其他实例关闭 popover
8300
- window.dispatchEvent(new CustomEvent(CLOSE_OTHER_POPOVERS_EVENT, {
8808
+ window.dispatchEvent(new CustomEvent(biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true_CLOSE_OTHER_POPOVERS_EVENT, {
8301
8809
  detail: {
8302
8810
  componentId
8303
8811
  }
@@ -8381,7 +8889,7 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8381
8889
  handleChange();
8382
8890
  };
8383
8891
  const handlePopoverShow = ()=>{
8384
- window.dispatchEvent(new CustomEvent(CLOSE_OTHER_POPOVERS_EVENT, {
8892
+ window.dispatchEvent(new CustomEvent(biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true_CLOSE_OTHER_POPOVERS_EVENT, {
8385
8893
  detail: {
8386
8894
  componentId
8387
8895
  }
@@ -8395,13 +8903,13 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8395
8903
  document.removeEventListener('keydown', handleKeydown, true);
8396
8904
  document.removeEventListener('click', handleClickOutside);
8397
8905
  document.removeEventListener('focusin', handleGlobalFocusin, true);
8398
- window.removeEventListener(CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
8906
+ window.removeEventListener(biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true_CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
8399
8907
  });
8400
8908
  const fetchData = async (data)=>{
8401
8909
  await getBizUnitList(data);
8402
8910
  };
8403
8911
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
8404
- window.addEventListener(CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
8912
+ window.addEventListener(biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true_CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
8405
8913
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(async ()=>{
8406
8914
  if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue?.length) {
8407
8915
  if (props.multiSelectFlag) selectedValue.value = props.defaultValue.map((item)=>item.label || item.orgNameDisplay);
@@ -8486,7 +8994,7 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8486
8994
  "collapse-tags": !!props.multiSelectFlag,
8487
8995
  multiple: !!props.multiSelectFlag,
8488
8996
  options: [],
8489
- placeholder: _ctx.$t('bizUnitSelect.placeholder', '请选择组织'),
8997
+ placeholder: "请选择组织",
8490
8998
  "popper-class": popoverVisible.value ? 'hidden' : '',
8491
8999
  "remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
8492
9000
  teleported: !popoverVisible.value,
@@ -8504,7 +9012,6 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'biz-unit-select:close-others'; /*
8504
9012
  "modelValue",
8505
9013
  "collapse-tags",
8506
9014
  "multiple",
8507
- "placeholder",
8508
9015
  "popper-class",
8509
9016
  "remote-method",
8510
9017
  "teleported",
@@ -8952,7 +9459,7 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_lang_tsx_name_Bi
8952
9459
  ref: selectRef,
8953
9460
  modelValue: selectedValue.value,
8954
9461
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectedValue.value = $event),
8955
- placeholder: _ctx.$t('departmentSelect.placeholder', '请选择科室'),
9462
+ placeholder: "请选择科室",
8956
9463
  "collapse-tags": !!props.multiSelectFlag,
8957
9464
  remote: "",
8958
9465
  clearable: "",
@@ -8970,7 +9477,6 @@ const biz_unit_select_exports_ = biz_unit_selectvue_type_script_lang_tsx_name_Bi
8970
9477
  onClear: handleClear
8971
9478
  }, selectProps.value), null, 16, [
8972
9479
  "modelValue",
8973
- "placeholder",
8974
9480
  "collapse-tags",
8975
9481
  "teleported",
8976
9482
  "remote-method",
@@ -9403,7 +9909,7 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
9403
9909
  modelValue: selectedValue.value,
9404
9910
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectedValue.value = $event),
9405
9911
  "collapse-tags": !!props.multiSelectFlag,
9406
- placeholder: _ctx.$t('wardSelect.placeholder', '请选择病区'),
9912
+ placeholder: "请选择病区",
9407
9913
  remote: "",
9408
9914
  clearable: "",
9409
9915
  filterable: "",
@@ -9421,7 +9927,6 @@ const department_select_exports_ = department_selectvue_type_script_setup_true_l
9421
9927
  }, selectProps.value), null, 16, [
9422
9928
  "modelValue",
9423
9929
  "collapse-tags",
9424
- "placeholder",
9425
9930
  "teleported",
9426
9931
  "remote-method",
9427
9932
  "multiple",
@@ -10672,6 +11177,9 @@ const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Recor
10672
11177
  default: ()=>[]
10673
11178
  },
10674
11179
  placeholder: {},
11180
+ disabled: {
11181
+ type: Boolean
11182
+ },
10675
11183
  loading: {
10676
11184
  type: Boolean,
10677
11185
  default: false
@@ -10816,6 +11324,8 @@ const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Recor
10816
11324
  */ function reset() {
10817
11325
  inputValue.value = '';
10818
11326
  model.value = void 0;
11327
+ keydownIndex.value = -1;
11328
+ cancelHightLight();
10819
11329
  }
10820
11330
  /**
10821
11331
  * 聚焦事件
@@ -10840,6 +11350,7 @@ const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Recor
10840
11350
  if (model.value) {
10841
11351
  if (row[props.rowKey] === model.value[props.rowKey]) {
10842
11352
  model.value = void 0;
11353
+ inputValue.value = '';
10843
11354
  keydownIndex.value = -1;
10844
11355
  cancelHightLight();
10845
11356
  } else {
@@ -10847,7 +11358,6 @@ const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Recor
10847
11358
  keydownIndex.value = index;
10848
11359
  }
10849
11360
  } else {
10850
- // debugger;
10851
11361
  model.value = row;
10852
11362
  keydownIndex.value = index;
10853
11363
  }
@@ -10940,6 +11450,11 @@ const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Recor
10940
11450
  // }
10941
11451
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.watchEffect)(()=>{
10942
11452
  if (model.value) inputValue.value = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isArray)(model.value) ? '' : model.value[props.labelKey];
11453
+ if (props.data.length > 0 && model.value && !(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isArray)(model.value)) {
11454
+ const index = props.data.findIndex((item)=>item[props.rowKey] === model.value[props.rowKey]);
11455
+ keydownIndex.value = index;
11456
+ setCurrentRow();
11457
+ }
10943
11458
  });
10944
11459
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount)(()=>{
10945
11460
  if (isSimpleMode.value) document.documentElement.style.setProperty('--simple-column-flex', `0 0 ${Math.floor(100 / simpleColumns.value.length)}%`);
@@ -10971,9 +11486,7 @@ const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Recor
10971
11486
  ref_key: "inputSearchRef",
10972
11487
  ref: inputSearchRef,
10973
11488
  size: _ctx.size,
10974
- placeholder: _ctx.placeholder || _ctx.$t('global:placeholder.input.template', {
10975
- content: _ctx.$t('global:search') + _ctx.$t('global:content')
10976
- }),
11489
+ placeholder: _ctx.placeholder || '请输入检索内容',
10977
11490
  clearable: "",
10978
11491
  onKeydownCapture: _cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.withKeys)((0, __WEBPACK_EXTERNAL_MODULE_vue__.withModifiers)(()=>{}, [
10979
11492
  "prevent"
@@ -11077,9 +11590,7 @@ const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Recor
11077
11590
  clearable: "",
11078
11591
  "popper-class": "table-select-popover-simple",
11079
11592
  size: _ctx.size,
11080
- placeholder: _ctx.$t('global:placeholder.input.template', {
11081
- content: _ctx.$t('global:search') + _ctx.$t('global:content')
11082
- }),
11593
+ placeholder: "请输入检索内容",
11083
11594
  "value-key": _ctx.rowKey
11084
11595
  }, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
11085
11596
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
@@ -11122,7 +11633,6 @@ const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Recor
11122
11633
  ]), 1032, [
11123
11634
  "modelValue",
11124
11635
  "size",
11125
- "placeholder",
11126
11636
  "value-key"
11127
11637
  ])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
11128
11638
  ], 64);
@@ -11132,7 +11642,7 @@ const table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Recor
11132
11642
  const table_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(table_selectvue_type_script_lang_ts_setup_true_generic_T_20extends_20Record_3CPropertyKey_2C_20any_3E, [
11133
11643
  [
11134
11644
  '__scopeId',
11135
- "data-v-34ffe8bb"
11645
+ "data-v-bf6cf296"
11136
11646
  ]
11137
11647
  ]);
11138
11648
  /* ESM default export */ const table_select = table_select_exports_;
@@ -11438,7 +11948,8 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
11438
11948
  'searchChange',
11439
11949
  'invoiceChange',
11440
11950
  'clear',
11441
- 'avatarClick'
11951
+ 'avatarClick',
11952
+ 'bannerInfoChange'
11442
11953
  ],
11443
11954
  setup (__props, { expose: __expose, emit: __emit }) {
11444
11955
  const emit = __emit;
@@ -11531,7 +12042,8 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
11531
12042
  ref: bannerRef,
11532
12043
  code: bannerCode.value,
11533
12044
  "biz-id": _ctx.bannerConfig?.bizId,
11534
- onAvatarClick: _cache[0] || (_cache[0] = ($event)=>emit('avatarClick'))
12045
+ onAvatarClick: _cache[0] || (_cache[0] = ($event)=>emit('avatarClick')),
12046
+ onBannerInfoChange: _cache[1] || (_cache[1] = ($event)=>emit('bannerInfoChange'))
11535
12047
  }, null, 8, [
11536
12048
  "code",
11537
12049
  "biz-id"