sun-biz 0.0.4-beta.10 → 0.0.4-beta.11

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.
@@ -2,4 +2,4 @@ export { default as DictSelect } from './dict-select/index.vue';
2
2
  export { default as FlagSelect } from './flag-select/index.vue';
3
3
  export { default as HospitalSelect } from './hospital-select/index.vue';
4
4
  export { default as TagSelect } from './tag-select/index.vue';
5
- export { default as UserSelect } from './tag-select/index.vue';
5
+ export { default as UserSelect } from './user-select/index.vue';
@@ -8,6 +8,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__ from "@sun-toolkit/s
8
8
  import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__ from "@sun-toolkit/micro-app";
9
9
  import "vue-router";
10
10
  import * as __WEBPACK_EXTERNAL_MODULE_i18next_vue__ from "i18next-vue";
11
+ import * as __WEBPACK_EXTERNAL_MODULE_lodash_unionBy__ from "lodash/unionBy";
11
12
  import * as __WEBPACK_EXTERNAL_MODULE_js_pinyin__ from "js-pinyin";
12
13
  var __webpack_modules__ = {
13
14
  "./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.13_typescript@5.7.3__webpack@5.98.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js": function(__unused_webpack_module, exports) {
@@ -2378,8 +2379,7 @@ const SELECTION = 'selection';
2378
2379
  "drag-end",
2379
2380
  "size-page-change",
2380
2381
  "current-page-change",
2381
- "sort-change",
2382
- "expand-change"
2382
+ "sort-change"
2383
2383
  ],
2384
2384
  setup (__props, { expose: __expose, emit: __emit }) {
2385
2385
  const props = __props;
@@ -4548,10 +4548,18 @@ const TAG_MARGIN = 1; // 1rem
4548
4548
  /* ESM default export */ const tag_selectvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4549
4549
  __name: 'index',
4550
4550
  props: {
4551
- bizIdTypeCode: {},
4552
- bizId: {},
4551
+ bizIdTypeCode: {
4552
+ default: ''
4553
+ },
4554
+ bizId: {
4555
+ default: ''
4556
+ },
4553
4557
  disabled: {
4554
- type: Boolean
4558
+ type: Boolean,
4559
+ default: false
4560
+ },
4561
+ tagSize: {
4562
+ default: 'large'
4555
4563
  }
4556
4564
  },
4557
4565
  emits: [
@@ -4601,7 +4609,7 @@ const TAG_MARGIN = 1; // 1rem
4601
4609
  document.body.appendChild(tagContainer);
4602
4610
  const vnode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
4603
4611
  closable: !props.disabled,
4604
- size: 'large',
4612
+ size: props.tagSize,
4605
4613
  disableTransitions: true,
4606
4614
  class: 'mr-4'
4607
4615
  }, ()=>allTagsMap.value.get(item) || item);
@@ -4709,7 +4717,7 @@ const TAG_MARGIN = 1; // 1rem
4709
4717
  class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
4710
4718
  'mr-4'
4711
4719
  ]),
4712
- size: "large",
4720
+ size: props.tagSize,
4713
4721
  "disable-transitions": true,
4714
4722
  onClose: ($event)=>handleClose(item)
4715
4723
  }, {
@@ -4719,6 +4727,7 @@ const TAG_MARGIN = 1; // 1rem
4719
4727
  _: 2
4720
4728
  }, 1032, [
4721
4729
  "closable",
4730
+ "size",
4722
4731
  "onClose"
4723
4732
  ]))), 128)),
4724
4733
  (Array.isArray((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue) ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue ? [
@@ -4752,7 +4761,7 @@ const TAG_MARGIN = 1; // 1rem
4752
4761
  ] : []).slice(realMaxNum.value), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
4753
4762
  key: item,
4754
4763
  closable: !props.disabled,
4755
- size: "large",
4764
+ size: props.tagSize,
4756
4765
  "disable-transitions": true,
4757
4766
  onClose: ($event)=>handleClose(item)
4758
4767
  }, {
@@ -4762,6 +4771,7 @@ const TAG_MARGIN = 1; // 1rem
4762
4771
  _: 2
4763
4772
  }, 1032, [
4764
4773
  "closable",
4774
+ "size",
4765
4775
  "onClose"
4766
4776
  ]))), 128))
4767
4777
  ])
@@ -4870,7 +4880,7 @@ const _hoisted_12 = {
4870
4880
  class: "w-full"
4871
4881
  };
4872
4882
  const _hoisted_13 = {
4873
- class: "w-full flex overflow-hidden text-ellipsis whitespace-nowrap"
4883
+ class: "w-full flex"
4874
4884
  };
4875
4885
  const _hoisted_14 = {
4876
4886
  class: "flex-1"
@@ -4878,6 +4888,7 @@ const _hoisted_14 = {
4878
4888
  const _hoisted_15 = {
4879
4889
  key: 1
4880
4890
  };
4891
+ const PERSON = 'PERSON'; //应该放到BIZ_ID_TYPE_CODE这个里面
4881
4892
  /* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4882
4893
  __name: 'BannerInfo',
4883
4894
  props: {
@@ -4889,11 +4900,19 @@ const _hoisted_15 = {
4889
4900
  }
4890
4901
  },
4891
4902
  setup (__props, { expose: __expose }) {
4903
+ const BIZ_ID_TYPE_CODE_MAP = {
4904
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.PATIENT]: PERSON,
4905
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.REGISTRATION]: PERSON,
4906
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.CHARGE]: PERSON,
4907
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.HOSPITALIZATION]: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE.IENC_ENCOUNTER
4908
+ };
4909
+ const tagBizIdTypeCode = BIZ_ID_TYPE_CODE_MAP[__props.code];
4892
4910
  const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
4893
4911
  const bannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4894
4912
  const initBannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4895
4913
  const isTextOverflowing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
4896
4914
  const firstDisplayWidthRatio = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(1);
4915
+ const tagBizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
4897
4916
  const tagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
4898
4917
  // 确保布局列数为有效数字
4899
4918
  const parseLayoutColumns = (value)=>{
@@ -4903,11 +4922,24 @@ const _hoisted_15 = {
4903
4922
  };
4904
4923
  // 计算实际布局列数
4905
4924
  const layoutColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>parseLayoutColumns(bannerInfo.value?.layoutTypeCode));
4925
+ function setBizId(data) {
4926
+ switch(tagBizIdTypeCode){
4927
+ case PERSON:
4928
+ tagBizId.value = data.personId;
4929
+ break;
4930
+ case PERSON:
4931
+ tagBizId.value = data.inEncounterId;
4932
+ break;
4933
+ default:
4934
+ tagBizId.value = data.personId;
4935
+ }
4936
+ }
4906
4937
  /** 获取banner配置 */ const queryBannerConfig = async ()=>{
4907
4938
  loading.value = true;
4908
4939
  if (!__props.bizId && initBannerInfo.value) {
4909
4940
  bannerInfo.value = initBannerInfo.value;
4910
- fetchBizTagListByExample(bannerInfo.value.bizIdTypeCode, bannerInfo.value.bizId);
4941
+ tagIds.value = [];
4942
+ tagBizId.value = '';
4911
4943
  loading.value = false;
4912
4944
  return;
4913
4945
  }
@@ -4919,7 +4951,11 @@ const _hoisted_15 = {
4919
4951
  loading.value = false;
4920
4952
  if (res?.success) {
4921
4953
  res.data.bannerItemList = (res?.data?.bannerItemList ?? [])?.filter((item)=>item?.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
4922
- fetchBizTagListByExample(res.data.bizIdTypeCode, res.data.bizId);
4954
+ setBizId({
4955
+ personId: res.data?.personId || '',
4956
+ inEncounterId: res.data?.inEncounterId || ''
4957
+ });
4958
+ fetchBizTagListByExample();
4923
4959
  firstDisplayWidthRatio.value = res.data.bannerItemList[0]?.displayWidthRatio || 1;
4924
4960
  if (!__props.bizId) initBannerInfo.value = res?.data;
4925
4961
  bannerInfo.value = res?.data;
@@ -4940,14 +4976,14 @@ const _hoisted_15 = {
4940
4976
  });
4941
4977
  /**
4942
4978
  * 获取当前的标签
4943
- */ async function fetchBizTagListByExample(bizIdTypeCode, bizId) {
4944
- if (!bizId || !bizIdTypeCode) {
4979
+ */ async function fetchBizTagListByExample() {
4980
+ if (!tagBizId.value || !tagBizIdTypeCode) {
4945
4981
  tagIds.value = [];
4946
4982
  return;
4947
4983
  }
4948
4984
  let [, result] = await queryBizTagListByExample({
4949
- bizIdTypeCode: bizIdTypeCode,
4950
- bizId: bizId
4985
+ bizIdTypeCode: tagBizIdTypeCode,
4986
+ bizId: tagBizId.value
4951
4987
  });
4952
4988
  if (result?.success) tagIds.value = (result.data || []).map((item)=>item.tagId);
4953
4989
  }
@@ -5024,9 +5060,12 @@ const _hoisted_15 = {
5024
5060
  }, [
5025
5061
  ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(bannerInfo.value?.bannerItemList ?? [], (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
5026
5062
  key: item.formDesignDetailId,
5027
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)({
5028
- [`col-span-${Math.floor(item.displayWidthRatio * Number(layoutColumns.value))}`]: true
5029
- })
5063
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5064
+ "min-h-6",
5065
+ {
5066
+ [`col-span-${Math.floor(item.displayWidthRatio * Number(layoutColumns.value))}`]: true
5067
+ }
5068
+ ])
5030
5069
  }, [
5031
5070
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
5032
5071
  class: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
@@ -5048,24 +5087,26 @@ const _hoisted_15 = {
5048
5087
  ], 32)
5049
5088
  ], 2))), 128)),
5050
5089
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
5051
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)({
5052
- [`col-span-${Math.floor(firstDisplayWidthRatio.value * Number(layoutColumns.value))}`]: true
5053
- })
5090
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5091
+ "min-h-6",
5092
+ {
5093
+ [`col-span-${Number(layoutColumns.value)}`]: true
5094
+ }
5095
+ ])
5054
5096
  }, [
5055
5097
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", _hoisted_13, [
5056
5098
  _cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", {
5057
5099
  class: "text-[#555]"
5058
5100
  }, "标签:", -1)),
5059
5101
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_14, [
5060
- bannerInfo.value?.bizId && bannerInfo.value?.bizIdTypeCode ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(tag_select, {
5102
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode) && tagIds.value.length ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(tag_select, {
5061
5103
  key: 0,
5062
- bizId: bannerInfo.value?.bizId,
5063
5104
  modelValue: tagIds.value,
5064
5105
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>tagIds.value = $event),
5065
- bizIdTypeCode: bannerInfo.value?.bizIdTypeCode,
5106
+ tagSize: "default",
5107
+ bizIdTypeCode: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode),
5066
5108
  disabled: true
5067
5109
  }, null, 8, [
5068
- "bizId",
5069
5110
  "modelValue",
5070
5111
  "bizIdTypeCode"
5071
5112
  ])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_15, "--"))
@@ -6405,6 +6446,151 @@ const flag_select_exports_ = flag_selectvue_type_script_setup_true_lang_ts_name_
6405
6446
  });
6406
6447
  const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect;
6407
6448
  /* ESM default export */ const hospital_select = hospital_select_exports_;
6449
+ /**
6450
+ * [1-10013-1]根据条件查询用户列表
6451
+ * @param params
6452
+ * @returns
6453
+ */ const api_queryUserList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/user/queryUserListByExample', params);
6454
+ /* ESM default export */ const user_selectvue_type_script_setup_true_lang_ts_name_UserSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
6455
+ __name: 'index',
6456
+ props: {
6457
+ keyWord: {},
6458
+ hospitalId: {},
6459
+ userJobCodes: {},
6460
+ bizUnitId: {},
6461
+ userTypeCode: {},
6462
+ multiSelectFlag: {
6463
+ type: Boolean
6464
+ },
6465
+ defaultValue: {}
6466
+ },
6467
+ emits: [
6468
+ 'change'
6469
+ ],
6470
+ setup (__props, { expose: __expose, emit: __emit }) {
6471
+ const props = __props;
6472
+ const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
6473
+ const emit = __emit;
6474
+ const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
6475
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
6476
+ const filterKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(''); // 检索值
6477
+ const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
6478
+ const getUserList = async (data)=>{
6479
+ loading.value = true;
6480
+ const [, res] = await api_queryUserList({
6481
+ ...data,
6482
+ enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
6483
+ userJobCodes: props.userJobCodes,
6484
+ bizUnitId: props.bizUnitId,
6485
+ userTypeCode: props.userTypeCode,
6486
+ hospitalId: 'all' === props.hospitalId ? void 0 : props.hospitalId,
6487
+ pageNumber: 1,
6488
+ pageSize: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ONE_PAGE_SIZE
6489
+ });
6490
+ loading.value = false;
6491
+ if (res?.success) {
6492
+ let list = res.data ?? [];
6493
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length) {
6494
+ // 兼容表单回显时的默认值缺失
6495
+ const defaultList = props.defaultValue.map((item)=>({
6496
+ ...item,
6497
+ userId: item.value || item.userId,
6498
+ userName: item.label || item.userName
6499
+ }));
6500
+ list.push(...defaultList);
6501
+ list = (0, __WEBPACK_EXTERNAL_MODULE_lodash_unionBy__["default"])(list, 'userId');
6502
+ }
6503
+ userList.value = list.map((item)=>({
6504
+ ...item,
6505
+ label: item.userNo ? `${item.label || item.userName}|${item.userNo}` : item.label || item.userName
6506
+ }));
6507
+ }
6508
+ };
6509
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props, ()=>{
6510
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length) userList.value = [
6511
+ ...props.defaultValue
6512
+ ];
6513
+ }, {
6514
+ deep: true,
6515
+ immediate: true
6516
+ });
6517
+ const onChange = (value)=>{
6518
+ if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
6519
+ if (props.multiSelectFlag) emit('change', value);
6520
+ else {
6521
+ const user = userList.value.find((item)=>item.value === value || item.userId === value);
6522
+ emit('change', value, user);
6523
+ }
6524
+ };
6525
+ const handelRemoteMethod = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(value) {
6526
+ filterKeyWord.value = value;
6527
+ if (!value && userList.value.length) return;
6528
+ try {
6529
+ loading.value = true;
6530
+ await getUserList({
6531
+ keyWord: value
6532
+ });
6533
+ } finally{
6534
+ loading.value = false;
6535
+ }
6536
+ }, 500);
6537
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
6538
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
6539
+ if (props.keyWord && selectRef.value) {
6540
+ const inputEl = selectRef.value?.$el.querySelector('input');
6541
+ if (inputEl) {
6542
+ inputEl.value = props.keyWord;
6543
+ // 创建 input 事件模拟用户输入
6544
+ const event = new Event('input', {
6545
+ bubbles: true
6546
+ });
6547
+ inputEl.dispatchEvent(event);
6548
+ }
6549
+ }
6550
+ });
6551
+ });
6552
+ __expose({
6553
+ selectRef
6554
+ });
6555
+ return (_ctx, _cache)=>{
6556
+ const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
6557
+ const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
6558
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
6559
+ ref_key: "selectRef",
6560
+ ref: selectRef,
6561
+ remote: "",
6562
+ clearable: "",
6563
+ filterable: "",
6564
+ loading: loading.value,
6565
+ multiple: !!props.multiSelectFlag,
6566
+ "remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
6567
+ onClear: _cache[0] || (_cache[0] = ($event)=>userList.value = []),
6568
+ onChange: onChange
6569
+ }, {
6570
+ label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ label })=>[
6571
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(label?.split('|')?.[0]), 1)
6572
+ ]),
6573
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6574
+ ((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, {
6575
+ key: item.value || item.userId,
6576
+ label: item.label || item.userName,
6577
+ value: item.value || item.userId
6578
+ }, null, 8, [
6579
+ "label",
6580
+ "value"
6581
+ ]))), 128))
6582
+ ]),
6583
+ _: 1
6584
+ }, 8, [
6585
+ "loading",
6586
+ "multiple",
6587
+ "remote-method"
6588
+ ]);
6589
+ };
6590
+ }
6591
+ });
6592
+ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_UserSelect;
6593
+ /* ESM default export */ const user_select = user_select_exports_;
6408
6594
  // 获取五笔简码
6409
6595
  const wubiLib = [
6410
6596
  'A鞴鞲鞣鞫鞯鞔鞒鞑鞅靼銎跫綦翳蛩颟鹳鹋鸫鸢慝觐觋贳瓯戡檠迓甙忒弋撖摁廾蘼蘖蘩蘅蘧藿藜藁藓薰薷薹薅薜薮蕹薏薇薨薤蕻蕲蕃瞢蕺蕞蕤蕨蕈蕙蓼蓿蔻蕖蔺蔟蔹蓰蔸甍蔌蓣蓥蒗蒴蒹蒡蓠蒺蒿蓊蓓蒽蓦蓐蓍蓁葭萱蒎蒌葶葩葆萼葸蒉葺蒈蒇葳葙葚葑葜菡菰萦菀菅菪菹菸萃萏菟菔萆萑萸萜菖菽菝萋萘堇菘菥萁菁莼莺莨莞莘荻莸荽莩莶荼莅莜莓莪莠莴莳荸莰荮荭荪荬荩茛荨荥荦茳茺茭荠茗荀荟荃荇荏茯荞莛茱茴茼莒茈荜荛荑茜苕苠茕茔茆茚茑苓苻茌苘苒苴苜茇茏苤苷茉苡芤苎苄芟芪芡芴芩苁苌苋芮芷芘苣苊苈芰芾芸芫芙芗芑芎芄芨芊芏艿艽艹鄞郾邛劐蒯赜匾匮匦叵匚廿茁著芝蒸斟蔗蘸藻葬匝蕴苑芋荧营萤莹英荫茵艺颐医药尧燕雅牙芽鸦薛靴蓄芯薪邪鞋萧巷项匣熙昔芜巫卧蔚萎苇藤萄苔蓑蒜苏斯薯蔬世式甚芍苫莎散萨若蕊茹荣蓉茸戎惹鹊颧区擎芹勤莲荔莉蕾勒劳蓝莱葵匡苦恐苛勘菌巨菊鞠敬警茎荆靳芥藉戒节蕉匠蒋荐茧荚蓟基惑或获荤茄切翘鞘巧蔷其七欺期蒲菩葡莆萍苹匹蓬藕殴鸥欧孽蔫匿慕募幕暮墓某莫蘑摹蔑藐苗蒙萌茂茅莽茫芒蔓落萝芦菱黄荒划花葫菏荷邯菇苟共贡汞巩恭功攻工葛革戈甘芬匪菲芳范藩贰董东蒂荡葱茨臣茶茬草藏苍蔡菜菠鞭蔽蓖苯薄苞靶芭鞍艾蔼',
@@ -6587,11 +6773,11 @@ const DICT_SELECT = 'dictSelect';
6587
6773
  }, {
6588
6774
  ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
6589
6775
  bizIdTypeCode: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.bizIdTypeCode
6590
- }), null, 16)) : 'userSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tag_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
6776
+ }), null, 16)) : 'userSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(user_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
6591
6777
  key: 4
6592
6778
  }, {
6593
6779
  ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
6594
- bizIdTypeCode: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.bizIdTypeCode
6780
+ hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
6595
6781
  })), null, 16)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component === DICT_SELECT ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(dict_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
6596
6782
  key: 5
6597
6783
  }, {
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__ from "@sun-toolki
9
9
  import * as __WEBPACK_EXTERNAL_MODULE_vue_router__ from "vue-router";
10
10
  import * as __WEBPACK_EXTERNAL_MODULE_i18next_vue__ from "i18next-vue";
11
11
  import * as __WEBPACK_EXTERNAL_MODULE_js_pinyin__ from "js-pinyin";
12
+ import * as __WEBPACK_EXTERNAL_MODULE_lodash_unionBy__ from "lodash/unionBy";
12
13
  var __webpack_modules__ = {
13
14
  "./node_modules/.pnpm/vue-loader@17.4.2_vue@3.5.13_typescript@5.7.3__webpack@5.98.0_esbuild@0.24.2_/node_modules/vue-loader/dist/exportHelper.js": function(__unused_webpack_module, exports) {
14
15
  // runtime helper for setting properties on components
@@ -2379,8 +2380,7 @@ const SELECTION = 'selection';
2379
2380
  "drag-end",
2380
2381
  "size-page-change",
2381
2382
  "current-page-change",
2382
- "sort-change",
2383
- "expand-change"
2383
+ "sort-change"
2384
2384
  ],
2385
2385
  setup (__props, { expose: __expose, emit: __emit }) {
2386
2386
  const props = __props;
@@ -5005,10 +5005,18 @@ const TAG_MARGIN = 1; // 1rem
5005
5005
  /* ESM default export */ const tag_selectvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5006
5006
  __name: 'index',
5007
5007
  props: {
5008
- bizIdTypeCode: {},
5009
- bizId: {},
5008
+ bizIdTypeCode: {
5009
+ default: ''
5010
+ },
5011
+ bizId: {
5012
+ default: ''
5013
+ },
5010
5014
  disabled: {
5011
- type: Boolean
5015
+ type: Boolean,
5016
+ default: false
5017
+ },
5018
+ tagSize: {
5019
+ default: 'large'
5012
5020
  }
5013
5021
  },
5014
5022
  emits: [
@@ -5058,7 +5066,7 @@ const TAG_MARGIN = 1; // 1rem
5058
5066
  document.body.appendChild(tagContainer);
5059
5067
  const vnode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
5060
5068
  closable: !props.disabled,
5061
- size: 'large',
5069
+ size: props.tagSize,
5062
5070
  disableTransitions: true,
5063
5071
  class: 'mr-4'
5064
5072
  }, ()=>allTagsMap.value.get(item) || item);
@@ -5166,7 +5174,7 @@ const TAG_MARGIN = 1; // 1rem
5166
5174
  class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5167
5175
  'mr-4'
5168
5176
  ]),
5169
- size: "large",
5177
+ size: props.tagSize,
5170
5178
  "disable-transitions": true,
5171
5179
  onClose: ($event)=>handleClose(item)
5172
5180
  }, {
@@ -5176,6 +5184,7 @@ const TAG_MARGIN = 1; // 1rem
5176
5184
  _: 2
5177
5185
  }, 1032, [
5178
5186
  "closable",
5187
+ "size",
5179
5188
  "onClose"
5180
5189
  ]))), 128)),
5181
5190
  (Array.isArray((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue) ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue ? [
@@ -5209,7 +5218,7 @@ const TAG_MARGIN = 1; // 1rem
5209
5218
  ] : []).slice(realMaxNum.value), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
5210
5219
  key: item,
5211
5220
  closable: !props.disabled,
5212
- size: "large",
5221
+ size: props.tagSize,
5213
5222
  "disable-transitions": true,
5214
5223
  onClose: ($event)=>handleClose(item)
5215
5224
  }, {
@@ -5219,6 +5228,7 @@ const TAG_MARGIN = 1; // 1rem
5219
5228
  _: 2
5220
5229
  }, 1032, [
5221
5230
  "closable",
5231
+ "size",
5222
5232
  "onClose"
5223
5233
  ]))), 128))
5224
5234
  ])
@@ -5327,7 +5337,7 @@ const _hoisted_12 = {
5327
5337
  class: "w-full"
5328
5338
  };
5329
5339
  const _hoisted_13 = {
5330
- class: "w-full flex overflow-hidden text-ellipsis whitespace-nowrap"
5340
+ class: "w-full flex"
5331
5341
  };
5332
5342
  const _hoisted_14 = {
5333
5343
  class: "flex-1"
@@ -5335,6 +5345,7 @@ const _hoisted_14 = {
5335
5345
  const _hoisted_15 = {
5336
5346
  key: 1
5337
5347
  };
5348
+ const PERSON = 'PERSON'; //应该放到BIZ_ID_TYPE_CODE这个里面
5338
5349
  /* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5339
5350
  __name: 'BannerInfo',
5340
5351
  props: {
@@ -5346,11 +5357,19 @@ const _hoisted_15 = {
5346
5357
  }
5347
5358
  },
5348
5359
  setup (__props, { expose: __expose }) {
5360
+ const BIZ_ID_TYPE_CODE_MAP = {
5361
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.PATIENT]: PERSON,
5362
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.REGISTRATION]: PERSON,
5363
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.CHARGE]: PERSON,
5364
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.HOSPITALIZATION]: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE.IENC_ENCOUNTER
5365
+ };
5366
+ const tagBizIdTypeCode = BIZ_ID_TYPE_CODE_MAP[__props.code];
5349
5367
  const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5350
5368
  const bannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5351
5369
  const initBannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5352
5370
  const isTextOverflowing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5353
5371
  const firstDisplayWidthRatio = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(1);
5372
+ const tagBizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
5354
5373
  const tagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5355
5374
  // 确保布局列数为有效数字
5356
5375
  const parseLayoutColumns = (value)=>{
@@ -5360,11 +5379,24 @@ const _hoisted_15 = {
5360
5379
  };
5361
5380
  // 计算实际布局列数
5362
5381
  const layoutColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>parseLayoutColumns(bannerInfo.value?.layoutTypeCode));
5382
+ function setBizId(data) {
5383
+ switch(tagBizIdTypeCode){
5384
+ case PERSON:
5385
+ tagBizId.value = data.personId;
5386
+ break;
5387
+ case PERSON:
5388
+ tagBizId.value = data.inEncounterId;
5389
+ break;
5390
+ default:
5391
+ tagBizId.value = data.personId;
5392
+ }
5393
+ }
5363
5394
  /** 获取banner配置 */ const queryBannerConfig = async ()=>{
5364
5395
  loading.value = true;
5365
5396
  if (!__props.bizId && initBannerInfo.value) {
5366
5397
  bannerInfo.value = initBannerInfo.value;
5367
- fetchBizTagListByExample(bannerInfo.value.bizIdTypeCode, bannerInfo.value.bizId);
5398
+ tagIds.value = [];
5399
+ tagBizId.value = '';
5368
5400
  loading.value = false;
5369
5401
  return;
5370
5402
  }
@@ -5376,7 +5408,11 @@ const _hoisted_15 = {
5376
5408
  loading.value = false;
5377
5409
  if (res?.success) {
5378
5410
  res.data.bannerItemList = (res?.data?.bannerItemList ?? [])?.filter((item)=>item?.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
5379
- fetchBizTagListByExample(res.data.bizIdTypeCode, res.data.bizId);
5411
+ setBizId({
5412
+ personId: res.data?.personId || '',
5413
+ inEncounterId: res.data?.inEncounterId || ''
5414
+ });
5415
+ fetchBizTagListByExample();
5380
5416
  firstDisplayWidthRatio.value = res.data.bannerItemList[0]?.displayWidthRatio || 1;
5381
5417
  if (!__props.bizId) initBannerInfo.value = res?.data;
5382
5418
  bannerInfo.value = res?.data;
@@ -5397,14 +5433,14 @@ const _hoisted_15 = {
5397
5433
  });
5398
5434
  /**
5399
5435
  * 获取当前的标签
5400
- */ async function fetchBizTagListByExample(bizIdTypeCode, bizId) {
5401
- if (!bizId || !bizIdTypeCode) {
5436
+ */ async function fetchBizTagListByExample() {
5437
+ if (!tagBizId.value || !tagBizIdTypeCode) {
5402
5438
  tagIds.value = [];
5403
5439
  return;
5404
5440
  }
5405
5441
  let [, result] = await queryBizTagListByExample({
5406
- bizIdTypeCode: bizIdTypeCode,
5407
- bizId: bizId
5442
+ bizIdTypeCode: tagBizIdTypeCode,
5443
+ bizId: tagBizId.value
5408
5444
  });
5409
5445
  if (result?.success) tagIds.value = (result.data || []).map((item)=>item.tagId);
5410
5446
  }
@@ -5481,9 +5517,12 @@ const _hoisted_15 = {
5481
5517
  }, [
5482
5518
  ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(bannerInfo.value?.bannerItemList ?? [], (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
5483
5519
  key: item.formDesignDetailId,
5484
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)({
5485
- [`col-span-${Math.floor(item.displayWidthRatio * Number(layoutColumns.value))}`]: true
5486
- })
5520
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5521
+ "min-h-6",
5522
+ {
5523
+ [`col-span-${Math.floor(item.displayWidthRatio * Number(layoutColumns.value))}`]: true
5524
+ }
5525
+ ])
5487
5526
  }, [
5488
5527
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
5489
5528
  class: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
@@ -5505,24 +5544,26 @@ const _hoisted_15 = {
5505
5544
  ], 32)
5506
5545
  ], 2))), 128)),
5507
5546
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
5508
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)({
5509
- [`col-span-${Math.floor(firstDisplayWidthRatio.value * Number(layoutColumns.value))}`]: true
5510
- })
5547
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5548
+ "min-h-6",
5549
+ {
5550
+ [`col-span-${Number(layoutColumns.value)}`]: true
5551
+ }
5552
+ ])
5511
5553
  }, [
5512
5554
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", _hoisted_13, [
5513
5555
  _cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", {
5514
5556
  class: "text-[#555]"
5515
5557
  }, "标签:", -1)),
5516
5558
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_14, [
5517
- bannerInfo.value?.bizId && bannerInfo.value?.bizIdTypeCode ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(tag_select, {
5559
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode) && tagIds.value.length ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(tag_select, {
5518
5560
  key: 0,
5519
- bizId: bannerInfo.value?.bizId,
5520
5561
  modelValue: tagIds.value,
5521
5562
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>tagIds.value = $event),
5522
- bizIdTypeCode: bannerInfo.value?.bizIdTypeCode,
5563
+ tagSize: "default",
5564
+ bizIdTypeCode: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode),
5523
5565
  disabled: true
5524
5566
  }, null, 8, [
5525
- "bizId",
5526
5567
  "modelValue",
5527
5568
  "bizIdTypeCode"
5528
5569
  ])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_15, "--"))
@@ -7141,6 +7182,151 @@ const flag_select_exports_ = flag_selectvue_type_script_setup_true_lang_ts_name_
7141
7182
  });
7142
7183
  const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect;
7143
7184
  /* ESM default export */ const hospital_select = hospital_select_exports_;
7185
+ /**
7186
+ * [1-10013-1]根据条件查询用户列表
7187
+ * @param params
7188
+ * @returns
7189
+ */ const api_queryUserList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/user/queryUserListByExample', params);
7190
+ /* ESM default export */ const user_selectvue_type_script_setup_true_lang_ts_name_UserSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
7191
+ __name: 'index',
7192
+ props: {
7193
+ keyWord: {},
7194
+ hospitalId: {},
7195
+ userJobCodes: {},
7196
+ bizUnitId: {},
7197
+ userTypeCode: {},
7198
+ multiSelectFlag: {
7199
+ type: Boolean
7200
+ },
7201
+ defaultValue: {}
7202
+ },
7203
+ emits: [
7204
+ 'change'
7205
+ ],
7206
+ setup (__props, { expose: __expose, emit: __emit }) {
7207
+ const props = __props;
7208
+ const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
7209
+ const emit = __emit;
7210
+ const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7211
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
7212
+ const filterKeyWord = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(''); // 检索值
7213
+ const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
7214
+ const getUserList = async (data)=>{
7215
+ loading.value = true;
7216
+ const [, res] = await api_queryUserList({
7217
+ ...data,
7218
+ enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
7219
+ userJobCodes: props.userJobCodes,
7220
+ bizUnitId: props.bizUnitId,
7221
+ userTypeCode: props.userTypeCode,
7222
+ hospitalId: 'all' === props.hospitalId ? void 0 : props.hospitalId,
7223
+ pageNumber: 1,
7224
+ pageSize: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ONE_PAGE_SIZE
7225
+ });
7226
+ loading.value = false;
7227
+ if (res?.success) {
7228
+ let list = res.data ?? [];
7229
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length) {
7230
+ // 兼容表单回显时的默认值缺失
7231
+ const defaultList = props.defaultValue.map((item)=>({
7232
+ ...item,
7233
+ userId: item.value || item.userId,
7234
+ userName: item.label || item.userName
7235
+ }));
7236
+ list.push(...defaultList);
7237
+ list = (0, __WEBPACK_EXTERNAL_MODULE_lodash_unionBy__["default"])(list, 'userId');
7238
+ }
7239
+ userList.value = list.map((item)=>({
7240
+ ...item,
7241
+ label: item.userNo ? `${item.label || item.userName}|${item.userNo}` : item.label || item.userName
7242
+ }));
7243
+ }
7244
+ };
7245
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props, ()=>{
7246
+ if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length) userList.value = [
7247
+ ...props.defaultValue
7248
+ ];
7249
+ }, {
7250
+ deep: true,
7251
+ immediate: true
7252
+ });
7253
+ const onChange = (value)=>{
7254
+ if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
7255
+ if (props.multiSelectFlag) emit('change', value);
7256
+ else {
7257
+ const user = userList.value.find((item)=>item.value === value || item.userId === value);
7258
+ emit('change', value, user);
7259
+ }
7260
+ };
7261
+ const handelRemoteMethod = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(value) {
7262
+ filterKeyWord.value = value;
7263
+ if (!value && userList.value.length) return;
7264
+ try {
7265
+ loading.value = true;
7266
+ await getUserList({
7267
+ keyWord: value
7268
+ });
7269
+ } finally{
7270
+ loading.value = false;
7271
+ }
7272
+ }, 500);
7273
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
7274
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
7275
+ if (props.keyWord && selectRef.value) {
7276
+ const inputEl = selectRef.value?.$el.querySelector('input');
7277
+ if (inputEl) {
7278
+ inputEl.value = props.keyWord;
7279
+ // 创建 input 事件模拟用户输入
7280
+ const event = new Event('input', {
7281
+ bubbles: true
7282
+ });
7283
+ inputEl.dispatchEvent(event);
7284
+ }
7285
+ }
7286
+ });
7287
+ });
7288
+ __expose({
7289
+ selectRef
7290
+ });
7291
+ return (_ctx, _cache)=>{
7292
+ const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
7293
+ const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
7294
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
7295
+ ref_key: "selectRef",
7296
+ ref: selectRef,
7297
+ remote: "",
7298
+ clearable: "",
7299
+ filterable: "",
7300
+ loading: loading.value,
7301
+ multiple: !!props.multiSelectFlag,
7302
+ "remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
7303
+ onClear: _cache[0] || (_cache[0] = ($event)=>userList.value = []),
7304
+ onChange: onChange
7305
+ }, {
7306
+ label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ label })=>[
7307
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(label?.split('|')?.[0]), 1)
7308
+ ]),
7309
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7310
+ ((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, {
7311
+ key: item.value || item.userId,
7312
+ label: item.label || item.userName,
7313
+ value: item.value || item.userId
7314
+ }, null, 8, [
7315
+ "label",
7316
+ "value"
7317
+ ]))), 128))
7318
+ ]),
7319
+ _: 1
7320
+ }, 8, [
7321
+ "loading",
7322
+ "multiple",
7323
+ "remote-method"
7324
+ ]);
7325
+ };
7326
+ }
7327
+ });
7328
+ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_UserSelect;
7329
+ /* ESM default export */ const user_select = user_select_exports_;
7144
7330
  const FormUnitvue_type_script_setup_true_lang_ts_name_formUnit_hoisted_1 = {
7145
7331
  key: 1,
7146
7332
  class: "overflow-hidden"
@@ -7215,11 +7401,11 @@ const DICT_SELECT = 'dictSelect';
7215
7401
  }, {
7216
7402
  ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
7217
7403
  bizIdTypeCode: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.bizIdTypeCode
7218
- }), null, 16)) : 'userSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tag_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
7404
+ }), null, 16)) : 'userSelect' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(user_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
7219
7405
  key: 4
7220
7406
  }, {
7221
7407
  ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs),
7222
- bizIdTypeCode: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.bizIdTypeCode
7408
+ hospitalId: __WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.extraProps?.hospitalId
7223
7409
  })), null, 16)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component === DICT_SELECT ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(dict_select), (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
7224
7410
  key: 5
7225
7411
  }, {
@@ -9091,4 +9277,4 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
9091
9277
  return time;
9092
9278
  }
9093
9279
  /** components **/ /** hooks ** */ var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
9094
- export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, tag_select as TagSelect, Title, tag_select as UserSelect, convertToSpellNo, convertToWbNo, debounce, decimalCount, formatDecimalNumber, getSystemTime, isNumber, print, queryDataSetByCodeSystemCodes, use_app_config as useAppConfigData, useColumnConfig, useDataChangeDetector, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFetchSystemTiem, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
9280
+ export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, tag_select as TagSelect, Title, user_select as UserSelect, convertToSpellNo, convertToWbNo, debounce, decimalCount, formatDecimalNumber, getSystemTime, isNumber, print, queryDataSetByCodeSystemCodes, use_app_config as useAppConfigData, useColumnConfig, useDataChangeDetector, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFetchSystemTiem, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sun-biz",
3
- "version": "0.0.4-beta.10",
3
+ "version": "0.0.4-beta.11",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  "src/*",