sun-biz 0.0.4-beta.40 → 0.0.4-beta.41

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
@@ -5250,1052 +5250,501 @@ const default_exports_ = defaultvue_type_script_setup_true_lang_ts;
5250
5250
  });
5251
5251
  const pro_avatar_exports_ = pro_avatarvue_type_script_setup_true_lang_ts;
5252
5252
  /* ESM default export */ const pro_avatar = pro_avatar_exports_;
5253
- /**
5254
- * [1-10473-1]根据条件查询标签分组V1(含标签)
5255
- * @param params
5256
- * @returns
5257
- */ const queryTagGroupByExampleV1 = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagGroupByExampleV1', params);
5258
- /**
5259
- * ]根据条件查询标签列表
5260
- * @param params
5261
- * @returns
5262
- */ const queryTagListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagListByExample', params);
5263
- const BACKGROUND_COLOR = 'BACKGROUND_COLOR';
5264
- const FONT_COLOR = 'FONT_COLOR';
5265
- // 工具函数:将标签信息添加到映射中
5266
- const addTagToMap = (map, tag)=>{
5267
- map.set(tag.tagId, {
5268
- tagNameDisplay: tag.tagNameDisplay,
5269
- background: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === BACKGROUND_COLOR)?.cssValue || '',
5270
- color: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === FONT_COLOR)?.cssValue || ''
5271
- });
5253
+ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1 = {
5254
+ class: "border-r border-[#C9C9C9] pr-5 mr-5"
5272
5255
  };
5273
- // 工具函数:将 modelValue 转换为数组
5274
- const getModelValueArray = (value)=>{
5275
- if (!value) return [];
5276
- return Array.isArray(value) ? value : [
5277
- value
5278
- ];
5256
+ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2 = {
5257
+ class: "flex min-w-32 items-start justify-start"
5279
5258
  };
5280
- // 工具函数:创建标签映射
5281
- const createTagsMap = (tableData, extraTagIds)=>{
5282
- const map = new Map();
5283
- // 处理分组标签
5284
- tableData.forEach((group)=>{
5285
- group.tagList.forEach((tag)=>{
5286
- addTagToMap(map, tag);
5287
- });
5288
- });
5289
- // 处理额外标签
5290
- extraTagIds.forEach((tag)=>{
5291
- addTagToMap(map, tag);
5292
- });
5293
- return map;
5259
+ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_3 = {
5260
+ class: "ml-[12px] flex-1"
5294
5261
  };
5295
- // 工具函数:获取选项样式
5296
- const getOptionStyle = (tagId, selectList, allTagsMap)=>selectList.includes(tagId) ? {} : {
5297
- background: allTagsMap.get(tagId)?.background,
5298
- color: allTagsMap.get(tagId)?.color
5299
- };
5300
- // 工具函数:检查选项是否被禁用
5301
- const isOptionDisabled = (tagId, selectList)=>selectList.includes(tagId);
5302
- /* ESM default export */ const SelectDropdownvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5303
- __name: 'SelectDropdown',
5304
- props: {
5305
- modelValue: {},
5306
- hasSelect: {},
5307
- tableData: {},
5308
- extraTagIds: {},
5309
- allTagsMap: {},
5310
- multiple: {
5311
- type: Boolean
5312
- },
5313
- disabled: {
5314
- type: Boolean
5315
- },
5316
- tagSize: {},
5317
- placeholder: {}
5318
- },
5319
- emits: [
5320
- 'update:modelValue',
5321
- 'change',
5322
- 'blur'
5323
- ],
5324
- setup (__props, { emit: __emit }) {
5325
- const props = __props;
5326
- const emit = __emit;
5327
- const selectList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getModelValueArray(props.hasSelect));
5328
- const selectClass = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.multiple ? 'w-60' : 'w-full');
5329
- const innerValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)({
5330
- get: ()=>props.modelValue,
5331
- set: (val)=>emit('update:modelValue', val)
5332
- });
5333
- function handleChange(val) {
5334
- emit('change', val);
5335
- }
5336
- function handleBlur(e) {
5337
- emit('blur', e);
5338
- }
5339
- return (_ctx, _cache)=>{
5340
- const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
5341
- const _component_el_option_group = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option-group");
5342
- const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
5343
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
5344
- modelValue: innerValue.value,
5345
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>innerValue.value = $event),
5346
- multiple: props.multiple ?? true,
5347
- filterable: "",
5348
- clearable: "",
5349
- disabled: props.disabled ?? false,
5350
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(selectClass.value),
5351
- placeholder: props.placeholder ?? '请选择',
5352
- onChange: handleChange,
5353
- onBlur: handleBlur,
5354
- "collapse-tags": "",
5355
- "collapse-tags-tooltip": ""
5356
- }, {
5357
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5358
- ((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)(_ctx.extraTagIds, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
5359
- key: item.tagId,
5360
- style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(getOptionStyle)(item.tagId, selectList.value, props.allTagsMap)),
5361
- disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isOptionDisabled)(item.tagId, selectList.value),
5362
- label: item.tagNameDisplay,
5363
- value: item.tagId
5364
- }, null, 8, [
5365
- "style",
5366
- "disabled",
5367
- "label",
5368
- "value"
5369
- ]))), 128)),
5370
- ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(props.tableData, (group)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option_group, {
5371
- key: group.tagGroupId,
5372
- label: group.tagGroupNameDisplay,
5373
- value: group.tagGroupId
5374
- }, {
5375
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5376
- ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(group.tagList, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
5377
- key: item.tagId,
5378
- style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(getOptionStyle)(item.tagId, selectList.value, props.allTagsMap)),
5379
- disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isOptionDisabled)(item.tagId, selectList.value),
5380
- label: item.tagNameDisplay,
5381
- value: item.tagId
5382
- }, null, 8, [
5383
- "style",
5384
- "disabled",
5385
- "label",
5386
- "value"
5387
- ]))), 128))
5388
- ]),
5389
- _: 2
5390
- }, 1032, [
5391
- "label",
5392
- "value"
5393
- ]))), 128))
5394
- ]),
5395
- _: 1
5396
- }, 8, [
5397
- "modelValue",
5398
- "multiple",
5399
- "disabled",
5400
- "class",
5401
- "placeholder"
5402
- ]);
5403
- };
5404
- }
5405
- });
5406
- const SelectDropdown_exports_ = SelectDropdownvue_type_script_lang_ts_setup_true;
5407
- /* ESM default export */ const SelectDropdown = SelectDropdown_exports_;
5408
- const tag_selectvue_type_script_lang_ts_setup_true_hoisted_1 = {
5409
- class: "flex flex-wrap gap-2"
5262
+ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_4 = {
5263
+ class: "flex-1 flex flex-col gap-3 text-center"
5410
5264
  };
5411
- const SELECT_WIDTH = 15; // rem
5412
- const TAG_MARGIN = 1; // 1rem
5413
- /* ESM default export */ const tag_selectvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5414
- __name: 'index',
5265
+ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_5 = {
5266
+ class: "flex-1 text-center leading-[14px]"
5267
+ };
5268
+ const _hoisted_6 = {
5269
+ class: "min-w-7"
5270
+ };
5271
+ const _hoisted_7 = {
5272
+ class: "min-w-7 ml-2"
5273
+ };
5274
+ const _hoisted_8 = {
5275
+ class: "flex justify-center"
5276
+ };
5277
+ const _hoisted_9 = {
5278
+ key: 0,
5279
+ class: "rounded-full bg-[#00AB44] px-1.5 text-center text-white mt-3 flex-1"
5280
+ };
5281
+ const _hoisted_10 = {
5282
+ class: "mr-2"
5283
+ };
5284
+ const _hoisted_11 = {
5285
+ key: 0,
5286
+ class: "w-full flex"
5287
+ };
5288
+ const _hoisted_12 = {
5289
+ class: "el-text text-[#555]"
5290
+ };
5291
+ const _hoisted_13 = {
5292
+ class: "flex flex-1"
5293
+ };
5294
+ const _hoisted_14 = {
5295
+ key: 2
5296
+ };
5297
+ const _hoisted_15 = {
5298
+ class: "text-[#555]"
5299
+ };
5300
+ const _hoisted_16 = {
5301
+ class: "w-full text-[#555]"
5302
+ };
5303
+ // import DefaultPatient from "../patient-access/images/default_patient.vue";
5304
+ // import ManPatient from "../patient-access/images/man_patient.vue";
5305
+ // import WomanPatient from "../patient-access/images/women_patient.vue";
5306
+ // import TagSelect from "../biz-select/tag-select/index.vue";
5307
+ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5308
+ /* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5309
+ __name: 'BannerInfo',
5415
5310
  props: {
5416
- bizIdTypeCode: {
5417
- default: ''
5418
- },
5419
- bizId: {
5420
- default: ''
5421
- },
5422
- class: {
5423
- default: 'w-full'
5424
- },
5425
- queryExtra: {
5426
- type: Boolean
5427
- },
5428
- tagList: {
5429
- default: ()=>[]
5430
- },
5431
- disabled: {
5432
- type: Boolean,
5433
- default: false
5434
- },
5435
- multiple: {
5311
+ code: {},
5312
+ bizId: {},
5313
+ isBg: {
5436
5314
  type: Boolean,
5437
5315
  default: true
5438
5316
  },
5439
- tagSize: {
5440
- default: 'large'
5441
- }
5317
+ menuId: {}
5442
5318
  },
5443
5319
  emits: [
5444
- 'change'
5320
+ "avatarClick"
5445
5321
  ],
5446
- setup (__props, { emit: __emit }) {
5447
- const emit = __emit;
5448
- const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
5449
- const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
5450
- const props = __props;
5451
- const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tagList || []);
5452
- const extraTagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5453
- const selectValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
5454
- const selectVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5455
- const SelectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5456
- const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5457
- const moreButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5458
- const realMaxNum = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(2);
5459
- // 计算rem到px的转换
5460
- const getRemValue = (rem)=>rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
5461
- // 常量定义
5462
- const MORE_BUTTON_WIDTH = 5 + TAG_MARGIN; // rem
5463
- // 计算所有标签的映射,方便通过tagId查找tagNameDisplay
5464
- const allTagsMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>createTagsMap(tableData.value, extraTagIds.value));
5465
- const calcMaxNum = (wrapperNode)=>{
5466
- if (!wrapperNode || !attrs.modelValue) return;
5467
- const modelValueArray = getModelValueArray(attrs.modelValue);
5468
- if (!modelValueArray.length) {
5469
- realMaxNum.value = 0;
5470
- return;
5471
- }
5472
- // 计算每个标签的宽度
5473
- const tagWidths = modelValueArray.map((item)=>{
5474
- // 为每个标签创建独立的容器
5475
- const tagContainer = document.createElement('div');
5476
- tagContainer.style.position = 'absolute';
5477
- tagContainer.style.visibility = 'hidden';
5478
- document.body.appendChild(tagContainer);
5479
- const vnode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
5480
- closable: !props.disabled,
5481
- size: props.tagSize,
5482
- disableTransitions: true,
5483
- class: 'mr-4'
5484
- }, ()=>allTagsMap.value.get(item)?.tagNameDisplay || item);
5485
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(vnode, tagContainer);
5486
- const width = tagContainer.firstElementChild?.getBoundingClientRect().width || 0;
5487
- document.body.removeChild(tagContainer);
5488
- return width + getRemValue(TAG_MARGIN);
5489
- });
5490
- // 计算可用宽度
5491
- const availableWidth = wrapperNode.offsetWidth - (props.disabled ? 0 : getRemValue(SELECT_WIDTH));
5492
- const totalWidth = tagWidths.reduce((sum, width)=>sum + width, 0);
5493
- // 如果所有标签都能显示,直接显示所有标签
5494
- if (totalWidth <= availableWidth) {
5495
- realMaxNum.value = modelValueArray.length;
5496
- return;
5497
- }
5498
- // 如果放不下所有标签,需要显示更多按钮
5499
- const availableWidthWithMore = availableWidth - getRemValue(MORE_BUTTON_WIDTH);
5500
- // 计算可以显示多少个标签
5501
- let currentWidth = 0;
5502
- let count = 0;
5503
- for (const width of tagWidths)if (currentWidth + width <= availableWidthWithMore) {
5504
- currentWidth += width;
5505
- count++;
5506
- } else break;
5507
- realMaxNum.value = count;
5322
+ setup (__props, { expose: __expose, emit: __emit }) {
5323
+ const emits = __emit;
5324
+ const BIZ_ID_TYPE_CODE_MAP = {
5325
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.PATIENT]: PERSON,
5326
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.REGISTRATION]: PERSON,
5327
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.CHARGE]: PERSON,
5328
+ [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.HOSPITALIZATION]: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE.IENC_ENCOUNTER
5508
5329
  };
5509
- // Methods
5510
- const handleClose = (bizId)=>{
5511
- const currentArray = getModelValueArray(attrs.modelValue);
5512
- const newModelValue = currentArray.filter((id)=>id !== bizId);
5513
- change(props.multiple ? newModelValue : newModelValue[0] || '');
5330
+ const tagBizIdTypeCode = BIZ_ID_TYPE_CODE_MAP[__props.code];
5331
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5332
+ const bannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5333
+ const initBannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5334
+ const isTextOverflowing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5335
+ const firstDisplayWidthRatio = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(1);
5336
+ const tagBizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
5337
+ const tagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5338
+ const inEncounterBizTagList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5339
+ const personBizTagList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5340
+ // const checkPrice = ref(0);
5341
+ const popoverSelector = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5342
+ // 确保布局列数为有效数字
5343
+ const parseLayoutColumns = (value)=>{
5344
+ const parsed = parseInt(value, 10);
5345
+ if (isNaN(parsed)) return 6;
5346
+ return parsed;
5514
5347
  };
5515
- const showSelect = ()=>{
5516
- selectVisible.value = true;
5517
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
5518
- SelectRef.value?.focus();
5348
+ // 计算实际布局列数
5349
+ const layoutColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>parseLayoutColumns(bannerInfo.value?.layoutTypeCode));
5350
+ // 创建CSS类映射的计算属性
5351
+ const getDynamicCssClasses = (comptControlCssList)=>{
5352
+ if (!comptControlCssList?.length) return "";
5353
+ const classes = [];
5354
+ comptControlCssList.forEach(({ cssTypeCode, cssValue })=>{
5355
+ if ("true" === cssValue) switch(cssTypeCode){
5356
+ case "FONT_BOLD":
5357
+ classes.push("font-bold");
5358
+ break;
5359
+ case "FONT_ITALIC":
5360
+ classes.push("italic");
5361
+ break;
5362
+ case "FONT_UNDERLINE":
5363
+ classes.push("underline");
5364
+ break;
5365
+ case "FONT_LINE_THROUGH":
5366
+ classes.push("line-through");
5367
+ break;
5368
+ }
5519
5369
  });
5370
+ return classes.join(" ");
5520
5371
  };
5521
- const handleSelectConfirm = ()=>{
5522
- if (!selectValue.value) {
5523
- selectVisible.value = false;
5524
- return;
5525
- }
5526
- const currentValues = getModelValueArray(attrs.modelValue);
5527
- if (props.multiple) {
5528
- change([
5529
- ...currentValues,
5530
- ...Array.isArray(selectValue.value) ? selectValue.value : [
5531
- selectValue.value
5532
- ]
5533
- ]);
5534
- selectValue.value = [];
5535
- } else {
5536
- change([
5537
- ...currentValues,
5538
- selectValue.value
5539
- ]);
5540
- selectValue.value = '';
5541
- }
5542
- selectVisible.value = false;
5372
+ // 获取颜色样式
5373
+ const getColorStyle = (comptControlCssList)=>{
5374
+ const colorItem = comptControlCssList?.find((item)=>"FONT_COLOR" === item.cssTypeCode);
5375
+ return colorItem?.cssValue ? {
5376
+ color: colorItem.cssValue
5377
+ } : {};
5543
5378
  };
5544
- async function fetchData() {
5545
- if (!props.bizIdTypeCode) return;
5546
- loading.value = true;
5547
- let [, result] = await queryTagGroupByExampleV1({
5548
- bizIdTypeCode: props.bizIdTypeCode,
5549
- bizId: props.bizId,
5550
- enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
5551
- });
5552
- loading.value = false;
5553
- if (result?.success) {
5554
- tableData.value = result.data;
5555
- if (props.queryExtra) fetchExtraTag();
5556
- calcMaxNum(containerRef.value);
5379
+ function setBizId(data) {
5380
+ switch(tagBizIdTypeCode){
5381
+ case PERSON:
5382
+ tagBizId.value = data.personId;
5383
+ break;
5384
+ case __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE.IENC_ENCOUNTER:
5385
+ tagBizId.value = data.inEncounterId;
5386
+ break;
5387
+ default:
5388
+ tagBizId.value = data.personId;
5557
5389
  }
5558
5390
  }
5559
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
5560
- fetchData();
5561
- // 等待所有标签渲染完成
5562
- });
5563
- async function fetchExtraTag() {
5564
- const modelValueArray = getModelValueArray(attrs.modelValue);
5565
- if (modelValueArray.length) {
5566
- let otherTagIds = modelValueArray.filter((item)=>!allTagsMap.value.get(item));
5567
- if (otherTagIds.length) {
5568
- let [, result] = await queryTagListByExample({
5569
- tagIds: otherTagIds
5570
- });
5571
- if (result?.success) extraTagIds.value = result.data;
5391
+ /**
5392
+ * 从banner数据中提取业务标签数据
5393
+ */ function extractBizTagIds(bannerItemList) {
5394
+ // 筛选出 bizTagFlag === 1 的项
5395
+ const bizTagItems = bannerItemList.filter((item)=>item?.bizTagFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
5396
+ // 重置数组
5397
+ inEncounterBizTagList.value = [];
5398
+ personBizTagList.value = [];
5399
+ bizTagItems.forEach((item)=>{
5400
+ if (!item.dataValue) return;
5401
+ try {
5402
+ // 解析 JSON 字符串
5403
+ const parsedData = JSON.parse(item.dataValue);
5404
+ if (Array.isArray(parsedData) && parsedData.length > 0) {
5405
+ // 根据 bindingFieldNo 分类存储完整的数据
5406
+ if ("inEncounterBizTagList" === item.bindingFieldNo) inEncounterBizTagList.value = parsedData;
5407
+ else if ("personBizTagList" === item.bindingFieldNo) personBizTagList.value = parsedData;
5408
+ }
5409
+ } catch (error) {
5410
+ console.error(`Failed to parse ${item.bindingFieldNo}:`, error);
5572
5411
  }
5573
- }
5412
+ });
5413
+ console.log("inEncounterBizTagList:", inEncounterBizTagList.value);
5414
+ console.log("personBizTagList:", personBizTagList.value);
5574
5415
  }
5575
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs.modelValue, ()=>{
5576
- if (props.queryExtra && !loading.value) fetchExtraTag();
5577
- if (!props.multiple) {
5578
- selectValue.value = attrs?.modelValue || '';
5416
+ /** 获取banner配置 */ const queryBannerConfig = async ()=>{
5417
+ loading.value = true;
5418
+ if (!__props.bizId && initBannerInfo.value) {
5419
+ bannerInfo.value = initBannerInfo.value;
5420
+ tagIds.value = [];
5421
+ tagBizId.value = "";
5422
+ loading.value = false;
5579
5423
  return;
5580
5424
  }
5581
- const modelValueArray = getModelValueArray(attrs.modelValue);
5582
- if (modelValueArray.length) // 等待所有标签渲染完成
5583
- {
5584
- if (containerRef.value) calcMaxNum(containerRef.value);
5425
+ const [, res] = await getBannerDataByBizId({
5426
+ menuId: __props.menuId,
5427
+ designFlag: __props.bizId ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
5428
+ bizId: __props.bizId ? __props.bizId : void 0,
5429
+ bizIdTypeCode: BANNER_COMPONENT_CONFIG[__props.code].bizIdTypeCode,
5430
+ componentId: BANNER_COMPONENT_CONFIG[__props.code].componentId
5431
+ });
5432
+ loading.value = false;
5433
+ if (res?.success) {
5434
+ // 提取业务标签ID(bizTagFlag === 1)
5435
+ extractBizTagIds(res?.data?.bannerItemList ?? []);
5436
+ // 保留 displayFlag === 1 或 bizTagFlag === 1 的项用于显示
5437
+ // 如果同时 bizTagFlag === 1 和 displayFlag === 1,bizTagFlag 优先级更高,会按照标签形式显示
5438
+ res.data.bannerItemList = (res?.data?.bannerItemList ?? [])?.filter((item)=>item?.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES || item?.bizTagFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
5439
+ setBizId({
5440
+ personId: res.data?.personId || "",
5441
+ inEncounterId: res.data?.inEncounterId || ""
5442
+ });
5443
+ fetchBizTagListByExample();
5444
+ firstDisplayWidthRatio.value = res.data.bannerItemList[0]?.displayWidthRatio || 1;
5445
+ if (!__props.bizId) initBannerInfo.value = res?.data;
5446
+ bannerInfo.value = res?.data;
5585
5447
  }
5586
- }, {
5587
- immediate: true
5448
+ };
5449
+ // 修改检查文字溢出的逻辑
5450
+ const checkTextOverflow = (event)=>{
5451
+ const target = event.currentTarget;
5452
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
5453
+ isTextOverflowing.value = target.offsetWidth < target.scrollWidth;
5454
+ });
5455
+ };
5456
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>__props.bizId, async ()=>{
5457
+ await queryBannerConfig();
5588
5458
  });
5589
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.tagList, ()=>{
5590
- tableData.value = props.tagList || [];
5459
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(async ()=>{
5460
+ await queryBannerConfig();
5591
5461
  });
5592
5462
  /**
5593
- *
5594
- * @param value 下拉框选择
5595
- */ function change(value) {
5596
- if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
5597
- emit('change', value);
5463
+ * 获取当前的标签
5464
+ */ async function fetchBizTagListByExample() {
5465
+ if (!tagBizId.value || !tagBizIdTypeCode) {
5466
+ tagIds.value = [];
5467
+ return;
5468
+ }
5469
+ let [, result] = await queryBizTagListByExample({
5470
+ bizIdTypeCode: tagBizIdTypeCode,
5471
+ bizId: tagBizId.value
5472
+ });
5473
+ if (result?.success) tagIds.value = (result.data || []).map((item)=>item.tagId);
5598
5474
  }
5599
- // 计算当前显示的标签数组
5600
- const currentTagsArray = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getModelValueArray(attrs.modelValue));
5475
+ __expose({
5476
+ refresh: queryBannerConfig,
5477
+ popoverSelector: popoverSelector
5478
+ });
5601
5479
  return (_ctx, _cache)=>{
5602
- const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
5603
- const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
5604
- const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
5605
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
5606
- ref_key: "containerRef",
5607
- ref: containerRef,
5608
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(props.class)
5480
+ const _component_el_text = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-text");
5481
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
5482
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5483
+ {
5484
+ ['bg-fill-lighter']: _ctx.isBg
5485
+ },
5486
+ "flex px-[10px] py-2 text-base text-black items-center"
5487
+ ]),
5488
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(_ctx.isBg ? "border-top: 1px solid #dfebff" : '')
5609
5489
  }, [
5610
- props.multiple ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
5611
- key: 0
5490
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1, [
5491
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2, [
5492
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
5493
+ class: "cursor-pointer",
5494
+ ref_key: "popoverSelector",
5495
+ ref: popoverSelector,
5496
+ onClick: _cache[0] || (_cache[0] = ($event)=>emits('avatarClick'))
5497
+ }, [
5498
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_avatar), {
5499
+ class: "h-8 w-8 rounded-full",
5500
+ type: bannerInfo.value?.genderCode === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.SEX_CODE).MAN ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(utils_AVATAR_TYPE_CODE).MAN : bannerInfo.value?.genderCode === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.SEX_CODE).WOMAN ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(utils_AVATAR_TYPE_CODE).WOMAN : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(utils_AVATAR_TYPE_CODE).DEFAULT
5501
+ }, null, 8, [
5502
+ "type"
5503
+ ])
5504
+ ], 512),
5505
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_3, [
5506
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_4, [
5507
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
5508
+ class: "text-lg w-full font-bold overflow-hidden text-ellipsis whitespace-nowrap leading-7",
5509
+ onMouseenter: checkTextOverflow
5510
+ }, [
5511
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTooltip), {
5512
+ disabled: !isTextOverflowing.value,
5513
+ content: bannerInfo.value?.personName
5514
+ }, {
5515
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5516
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.personName ?? "--"), 1)
5517
+ ]),
5518
+ _: 1
5519
+ }, 8, [
5520
+ "disabled",
5521
+ "content"
5522
+ ])
5523
+ ], 32),
5524
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_5, [
5525
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_6, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.age ?? "--"), 1),
5526
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_7, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.genderDesc ?? "--"), 1)
5527
+ ])
5528
+ ])
5529
+ ])
5530
+ ]),
5531
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", _hoisted_8, [
5532
+ (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, [
5533
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_10, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.inpatientStatusDesc ?? "--"), 1),
5534
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.inpatientDays ?? "--"), 1)
5535
+ ])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
5536
+ ])
5537
+ ]),
5538
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
5539
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5540
+ "grid gap-2 flex-1",
5541
+ {
5542
+ [`grid-cols-${layoutColumns.value}`]: true
5543
+ }
5544
+ ])
5612
5545
  }, [
5613
- ((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)(currentTagsArray.value.slice(0, realMaxNum.value), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
5614
- key: item,
5615
- style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
5616
- background: allTagsMap.value.get(item)?.background,
5617
- color: allTagsMap.value.get(item)?.color,
5618
- borderColor: allTagsMap.value.get(item)?.color,
5619
- '--el-tag-text-color': allTagsMap.value.get(item)?.color,
5620
- '--el-tag-hover-color': allTagsMap.value.get(item)?.color
5621
- }),
5622
- closable: !props.disabled,
5546
+ ((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", {
5547
+ key: item.formDesignDetailId,
5623
5548
  class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5624
- 'mr-4'
5625
- ]),
5626
- size: props.tagSize,
5627
- "disable-transitions": true,
5628
- onClose: ($event)=>handleClose(item)
5629
- }, {
5630
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5631
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
5632
- ]),
5633
- _: 2
5634
- }, 1032, [
5635
- "style",
5636
- "closable",
5637
- "size",
5638
- "onClose"
5639
- ]))), 128)),
5640
- currentTagsArray.value.length > realMaxNum.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_popover, {
5641
- key: 0,
5642
- placement: "bottom",
5643
- trigger: "hover"
5644
- }, {
5645
- reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5646
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
5647
- ref_key: "moreButtonRef",
5648
- ref: moreButtonRef,
5649
- style: {
5650
- "margin-left": "0"
5651
- },
5652
- class: "mr-4"
5653
- }, {
5654
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5655
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("更多 +" + (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(currentTagsArray.value.length - realMaxNum.value), 1)
5656
- ]),
5657
- _: 1
5658
- }, 512)
5659
- ]),
5660
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5661
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", tag_selectvue_type_script_lang_ts_setup_true_hoisted_1, [
5662
- ((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)(currentTagsArray.value.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), {
5663
- key: item,
5664
- style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
5665
- background: allTagsMap.value.get(item)?.background,
5666
- color: allTagsMap.value.get(item)?.color,
5667
- borderColor: allTagsMap.value.get(item)?.color,
5668
- '--el-tag-text-color': allTagsMap.value.get(item)?.color,
5669
- '--el-tag-hover-color': allTagsMap.value.get(item)?.color
5670
- }),
5671
- closable: !props.disabled,
5672
- size: props.tagSize,
5673
- "disable-transitions": true,
5674
- onClose: ($event)=>handleClose(item)
5549
+ "min-h-6",
5550
+ {
5551
+ 'col-span-full': item.bizTagFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG).YES,
5552
+ [`col-span-${Math.floor(item.displayWidthRatio * Number(layoutColumns.value))}`]: item.bizTagFlag !== (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG).YES
5553
+ }
5554
+ ])
5555
+ }, [
5556
+ item.bizTagFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG).YES ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", _hoisted_11, [
5557
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_12, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.labelNameDisplay) + ":", 1),
5558
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_13, [
5559
+ 'inEncounterBizTagList' === item.bindingFieldNo && inEncounterBizTagList.value.length ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
5560
+ key: 0
5561
+ }, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(inEncounterBizTagList.value, (tag)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
5562
+ key: tag.bizTagId || tag.tagId,
5563
+ class: "mr-2",
5564
+ size: "default"
5675
5565
  }, {
5676
5566
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5677
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
5567
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(tag.tagName), 1)
5678
5568
  ]),
5679
5569
  _: 2
5680
- }, 1032, [
5681
- "style",
5682
- "closable",
5683
- "size",
5684
- "onClose"
5685
- ]))), 128))
5570
+ }, 1024))), 128)) : 'personBizTagList' === item.bindingFieldNo && personBizTagList.value.length ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
5571
+ key: 1
5572
+ }, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(personBizTagList.value, (tag)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
5573
+ key: tag.bizTagId || tag.tagId,
5574
+ class: "mr-2",
5575
+ size: "default"
5576
+ }, {
5577
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5578
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(tag.tagName), 1)
5579
+ ]),
5580
+ _: 2
5581
+ }, 1024))), 128)) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_14, "--"))
5686
5582
  ])
5687
- ]),
5688
- _: 1
5689
- })) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
5690
- selectVisible.value && !props.disabled ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
5691
- key: 1,
5692
- modelValue: selectValue.value,
5693
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectValue.value = $event),
5694
- "table-data": tableData.value,
5695
- extraTagIds: extraTagIds.value,
5696
- "all-tags-map": allTagsMap.value,
5697
- multiple: true,
5698
- disabled: props.disabled,
5699
- "tag-size": props.tagSize,
5700
- "has-select": currentTagsArray.value,
5701
- placeholder: "请选择",
5702
- onChange: _cache[1] || (_cache[1] = ()=>{
5703
- if (!props.multiple) handleSelectConfirm();
5704
- }),
5705
- onBlur: handleSelectConfirm
5706
- }, null, 8, [
5707
- "modelValue",
5708
- "table-data",
5709
- "extraTagIds",
5710
- "all-tags-map",
5711
- "disabled",
5712
- "tag-size",
5713
- "has-select"
5714
- ])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
5715
- selectVisible.value || props.disabled ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_button, {
5716
- key: 2,
5717
- style: {
5718
- "margin-left": "0"
5719
- },
5720
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5721
- "!border-primary",
5722
- {
5723
- 'pointer-events-none': props.disabled
5724
- }
5725
- ]),
5726
- onClick: showSelect
5727
- }, {
5728
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5729
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_icon, null, {
5730
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5731
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.Plus), {
5732
- class: "text-primary"
5733
- })
5583
+ ])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
5584
+ key: 1,
5585
+ class: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
5586
+ onMouseenter: checkTextOverflow
5587
+ }, [
5588
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_15, [
5589
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_text, {
5590
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5591
+ 'text-[#555]',
5592
+ getDynamicCssClasses(item.comptControlCssList)
5734
5593
  ]),
5735
- _: 1
5736
- })
5737
- ]),
5738
- _: 1
5739
- }, 8, [
5740
- "class"
5741
- ]))
5742
- ], 64)) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
5743
- key: 1,
5744
- modelValue: selectValue.value,
5745
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>selectValue.value = $event),
5746
- "table-data": tableData.value,
5747
- extraTagIds: extraTagIds.value,
5748
- "all-tags-map": allTagsMap.value,
5749
- multiple: false,
5750
- disabled: props.disabled,
5751
- "tag-size": props.tagSize,
5752
- placeholder: "请选择标签",
5753
- "has-select": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue,
5754
- onChange: change
5755
- }, null, 8, [
5756
- "modelValue",
5757
- "table-data",
5758
- "extraTagIds",
5759
- "all-tags-map",
5760
- "disabled",
5761
- "tag-size",
5762
- "has-select"
5763
- ]))
5764
- ], 2);
5594
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList)),
5595
+ type: ""
5596
+ }, {
5597
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5598
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.labelNameDisplay) + ":", 1)
5599
+ ]),
5600
+ _: 2
5601
+ }, 1032, [
5602
+ "class",
5603
+ "style"
5604
+ ])
5605
+ ]),
5606
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTooltip), {
5607
+ disabled: !isTextOverflowing.value,
5608
+ content: item.dataValue
5609
+ }, {
5610
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5611
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_16, [
5612
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_text, {
5613
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5614
+ 'text-[#555]',
5615
+ getDynamicCssClasses(item.comptControlCssList)
5616
+ ]),
5617
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList)),
5618
+ type: ""
5619
+ }, {
5620
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5621
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.dataValue || "--"), 1)
5622
+ ]),
5623
+ _: 2
5624
+ }, 1032, [
5625
+ "class",
5626
+ "style"
5627
+ ])
5628
+ ])
5629
+ ]),
5630
+ _: 2
5631
+ }, 1032, [
5632
+ "disabled",
5633
+ "content"
5634
+ ])
5635
+ ], 32))
5636
+ ], 2))), 128))
5637
+ ], 2)
5638
+ ], 6)), [
5639
+ [
5640
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.vLoading),
5641
+ loading.value
5642
+ ]
5643
+ ]);
5765
5644
  };
5766
5645
  }
5767
5646
  });
5768
- const tag_select_exports_ = tag_selectvue_type_script_lang_ts_setup_true;
5769
- /* ESM default export */ const tag_select = tag_select_exports_;
5770
- const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1 = {
5771
- class: "border-r border-[#C9C9C9] pr-5 mr-5"
5772
- };
5773
- const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2 = {
5774
- class: "flex min-w-32 items-start justify-start"
5775
- };
5776
- const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_3 = {
5777
- class: "ml-[12px] flex-1"
5778
- };
5779
- const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_4 = {
5780
- class: "flex-1 flex flex-col gap-3 text-center"
5781
- };
5782
- const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_5 = {
5783
- class: "flex-1 text-center leading-[14px]"
5784
- };
5785
- const _hoisted_6 = {
5786
- class: "min-w-7"
5787
- };
5788
- const _hoisted_7 = {
5789
- class: "min-w-7 ml-2"
5790
- };
5791
- const _hoisted_8 = {
5792
- class: "flex justify-center"
5793
- };
5794
- const _hoisted_9 = {
5795
- key: 0,
5796
- class: "rounded-full bg-[#00AB44] px-1.5 text-center text-white mt-3 flex-1"
5797
- };
5798
- const _hoisted_10 = {
5799
- class: "mr-2"
5800
- };
5801
- const _hoisted_11 = {
5802
- key: 0,
5803
- class: "w-full flex"
5804
- };
5805
- const _hoisted_12 = {
5806
- class: "text-[#555]"
5807
- };
5808
- const _hoisted_13 = {
5809
- class: "flex flex-1"
5810
- };
5811
- const _hoisted_14 = {
5812
- key: 2
5813
- };
5814
- const _hoisted_15 = {
5815
- class: "text-[#555]"
5816
- };
5817
- const _hoisted_16 = {
5818
- class: "w-full text-[#555]"
5819
- };
5820
- const _hoisted_17 = {
5821
- class: "w-full flex"
5822
- };
5823
- const _hoisted_18 = {
5824
- class: "el-text text-[#555]"
5825
- };
5826
- const _hoisted_19 = {
5827
- class: "flex flex-1"
5828
- };
5829
- const _hoisted_20 = {
5830
- key: 1
5831
- };
5832
- // import DefaultPatient from "../patient-access/images/default_patient.vue";
5833
- // import ManPatient from "../patient-access/images/man_patient.vue";
5834
- // import WomanPatient from "../patient-access/images/women_patient.vue";
5835
- const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
5836
- /* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5837
- __name: 'BannerInfo',
5647
+ const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent;
5648
+ /* ESM default export */ const BannerInfo = BannerInfo_exports_;
5649
+ /* ESM default export */ const printTemplatevue_type_script_lang_ts_setup_true_name_printDialog = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
5650
+ __name: 'printTemplate',
5838
5651
  props: {
5839
- code: {},
5840
- bizId: {},
5841
- isBg: {
5842
- type: Boolean,
5843
- default: true
5844
- },
5845
- menuId: {}
5652
+ printTemplateList: {},
5653
+ onTemplateConfirm: {
5654
+ type: Function
5655
+ }
5846
5656
  },
5847
- emits: [
5848
- "avatarClick"
5849
- ],
5850
- setup (__props, { expose: __expose, emit: __emit }) {
5851
- const emits = __emit;
5852
- const BIZ_ID_TYPE_CODE_MAP = {
5853
- [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.PATIENT]: PERSON,
5854
- [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.REGISTRATION]: PERSON,
5855
- [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.CHARGE]: PERSON,
5856
- [__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BANNER_CODE.HOSPITALIZATION]: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE.IENC_ENCOUNTER
5857
- };
5858
- const tagBizIdTypeCode = BIZ_ID_TYPE_CODE_MAP[__props.code];
5859
- const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5860
- const bannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5861
- const initBannerInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5862
- const isTextOverflowing = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5863
- const firstDisplayWidthRatio = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(1);
5864
- const tagBizId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
5865
- const tagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5866
- const inEncounterBizTagList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5867
- const personBizTagList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5868
- // const checkPrice = ref(0);
5869
- const popoverSelector = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5870
- // 确保布局列数为有效数字
5871
- const parseLayoutColumns = (value)=>{
5872
- const parsed = parseInt(value, 10);
5873
- if (isNaN(parsed)) return 6;
5874
- return parsed;
5875
- };
5876
- // 计算实际布局列数
5877
- const layoutColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>parseLayoutColumns(bannerInfo.value?.layoutTypeCode));
5878
- // 创建CSS类映射的计算属性
5879
- const getDynamicCssClasses = (comptControlCssList)=>{
5880
- if (!comptControlCssList?.length) return "";
5881
- const classes = [];
5882
- comptControlCssList.forEach(({ cssTypeCode, cssValue })=>{
5883
- if ("true" === cssValue) switch(cssTypeCode){
5884
- case "FONT_BOLD":
5885
- classes.push("font-bold");
5886
- break;
5887
- case "FONT_ITALIC":
5888
- classes.push("italic");
5889
- break;
5890
- case "FONT_UNDERLINE":
5891
- classes.push("underline");
5892
- break;
5893
- case "FONT_LINE_THROUGH":
5894
- classes.push("line-through");
5895
- break;
5657
+ setup (__props, { expose: __expose }) {
5658
+ const props = __props;
5659
+ const templateModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({
5660
+ templateId: ""
5661
+ });
5662
+ const operation = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
5663
+ const rules = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
5664
+ templateId: [
5665
+ {
5666
+ required: true,
5667
+ message: "请选择打印模板",
5668
+ trigger: [
5669
+ "blur",
5670
+ "change"
5671
+ ]
5896
5672
  }
5673
+ ]
5674
+ });
5675
+ const dialogRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5676
+ const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
5677
+ const printTemplateList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.printTemplateList ?? []);
5678
+ // 打开弹窗
5679
+ const openDialog = async ()=>{
5680
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
5681
+ templateModel.value.templateId = printTemplateList.value?.find((item)=>1 === item.defaultFlag)?.receiptTemplateRuleId ?? "";
5682
+ dialogRef.value?.open();
5897
5683
  });
5898
- return classes.join(" ");
5899
5684
  };
5900
- // 获取颜色样式
5901
- const getColorStyle = (comptControlCssList)=>{
5902
- const colorItem = comptControlCssList?.find((item)=>"FONT_COLOR" === item.cssTypeCode);
5903
- return colorItem?.cssValue ? {
5904
- color: colorItem.cssValue
5905
- } : {};
5685
+ // 提交
5686
+ const handleConfirmSubmit = async ()=>{
5687
+ operation.value = "";
5688
+ await formRef.value?.validate();
5689
+ const printTemplate = printTemplateList.value.find((item)=>item.receiptTemplateRuleId === templateModel.value.templateId);
5690
+ await props.onTemplateConfirm(printTemplate);
5691
+ operation.value = "confirm";
5692
+ return [];
5906
5693
  };
5907
- function setBizId(data) {
5908
- switch(tagBizIdTypeCode){
5909
- case PERSON:
5910
- tagBizId.value = data.personId;
5911
- break;
5912
- case __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.BIZ_ID_TYPE_CODE.IENC_ENCOUNTER:
5913
- tagBizId.value = data.inEncounterId;
5914
- break;
5915
- default:
5916
- tagBizId.value = data.personId;
5917
- }
5918
- }
5919
- /**
5920
- * 从banner数据中提取业务标签数据
5921
- */ function extractBizTagIds(bannerItemList) {
5922
- // 筛选出 bizTagFlag === 1 的项
5923
- const bizTagItems = bannerItemList.filter((item)=>item?.bizTagFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
5924
- // 重置数组
5925
- inEncounterBizTagList.value = [];
5926
- personBizTagList.value = [];
5927
- bizTagItems.forEach((item)=>{
5928
- if (!item.dataValue) return;
5929
- try {
5930
- // 解析 JSON 字符串
5931
- const parsedData = JSON.parse(item.dataValue);
5932
- if (Array.isArray(parsedData) && parsedData.length > 0) {
5933
- // 根据 bindingFieldNo 分类存储完整的数据
5934
- if ("inEncounterBizTagList" === item.bindingFieldNo) inEncounterBizTagList.value = parsedData;
5935
- else if ("personBizTagList" === item.bindingFieldNo) personBizTagList.value = parsedData;
5936
- }
5937
- } catch (error) {
5938
- console.error(`Failed to parse ${item.bindingFieldNo}:`, error);
5939
- }
5940
- });
5941
- console.log("inEncounterBizTagList:", inEncounterBizTagList.value);
5942
- console.log("personBizTagList:", personBizTagList.value);
5943
- }
5944
- /** 获取banner配置 */ const queryBannerConfig = async ()=>{
5945
- loading.value = true;
5946
- if (!__props.bizId && initBannerInfo.value) {
5947
- bannerInfo.value = initBannerInfo.value;
5948
- tagIds.value = [];
5949
- tagBizId.value = "";
5950
- loading.value = false;
5951
- return;
5952
- }
5953
- const [, res] = await getBannerDataByBizId({
5954
- menuId: __props.menuId,
5955
- designFlag: __props.bizId ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
5956
- bizId: __props.bizId ? __props.bizId : void 0,
5957
- bizIdTypeCode: BANNER_COMPONENT_CONFIG[__props.code].bizIdTypeCode,
5958
- componentId: BANNER_COMPONENT_CONFIG[__props.code].componentId
5959
- });
5960
- loading.value = false;
5961
- if (res?.success) {
5962
- // 提取业务标签ID(bizTagFlag === 1)
5963
- extractBizTagIds(res?.data?.bannerItemList ?? []);
5964
- // 保留 displayFlag === 1 或 bizTagFlag === 1 的项用于显示
5965
- res.data.bannerItemList = (res?.data?.bannerItemList ?? [])?.filter((item)=>item?.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES || item?.bizTagFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
5966
- setBizId({
5967
- personId: res.data?.personId || "",
5968
- inEncounterId: res.data?.inEncounterId || ""
5969
- });
5970
- fetchBizTagListByExample();
5971
- firstDisplayWidthRatio.value = res.data.bannerItemList[0]?.displayWidthRatio || 1;
5972
- if (!__props.bizId) initBannerInfo.value = res?.data;
5973
- bannerInfo.value = res?.data;
5974
- }
5975
- };
5976
- // 修改检查文字溢出的逻辑
5977
- const checkTextOverflow = (event)=>{
5978
- const target = event.currentTarget;
5979
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
5980
- isTextOverflowing.value = target.offsetWidth < target.scrollWidth;
5981
- });
5982
- };
5983
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>__props.bizId, async ()=>{
5984
- await queryBannerConfig();
5985
- });
5986
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(async ()=>{
5987
- await queryBannerConfig();
5694
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
5695
+ openDialog();
5988
5696
  });
5989
- /**
5990
- * 获取当前的标签
5991
- */ async function fetchBizTagListByExample() {
5992
- if (!tagBizId.value || !tagBizIdTypeCode) {
5993
- tagIds.value = [];
5994
- return;
5995
- }
5996
- let [, result] = await queryBizTagListByExample({
5997
- bizIdTypeCode: tagBizIdTypeCode,
5998
- bizId: tagBizId.value
5999
- });
6000
- if (result?.success) tagIds.value = (result.data || []).map((item)=>item.tagId);
6001
- }
6002
5697
  __expose({
6003
- refresh: queryBannerConfig,
6004
- popoverSelector: popoverSelector
5698
+ open: openDialog
6005
5699
  });
6006
- return (_ctx, _cache)=>{
6007
- const _component_el_text = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-text");
6008
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
6009
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
6010
- {
6011
- ['bg-fill-lighter']: _ctx.isBg
6012
- },
6013
- "flex px-[10px] py-2 text-base text-black items-center"
6014
- ]),
6015
- style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(_ctx.isBg ? "border-top: 1px solid #dfebff" : '')
6016
- }, [
6017
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1, [
6018
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2, [
6019
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
6020
- class: "cursor-pointer",
6021
- ref_key: "popoverSelector",
6022
- ref: popoverSelector,
6023
- onClick: _cache[0] || (_cache[0] = ($event)=>emits('avatarClick'))
6024
- }, [
6025
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_avatar), {
6026
- class: "h-8 w-8 rounded-full",
6027
- type: bannerInfo.value?.genderCode === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.SEX_CODE).MAN ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(utils_AVATAR_TYPE_CODE).MAN : bannerInfo.value?.genderCode === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.SEX_CODE).WOMAN ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(utils_AVATAR_TYPE_CODE).WOMAN : (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(utils_AVATAR_TYPE_CODE).DEFAULT
6028
- }, null, 8, [
6029
- "type"
6030
- ])
6031
- ], 512),
6032
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_3, [
6033
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_4, [
6034
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
6035
- class: "text-lg w-full font-bold overflow-hidden text-ellipsis whitespace-nowrap leading-7",
6036
- onMouseenter: checkTextOverflow
6037
- }, [
6038
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTooltip), {
6039
- disabled: !isTextOverflowing.value,
6040
- content: bannerInfo.value?.personName
6041
- }, {
6042
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6043
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.personName ?? "--"), 1)
6044
- ]),
6045
- _: 1
6046
- }, 8, [
6047
- "disabled",
6048
- "content"
6049
- ])
6050
- ], 32),
6051
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_5, [
6052
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_6, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.age ?? "--"), 1),
6053
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_7, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.genderDesc ?? "--"), 1)
6054
- ])
6055
- ])
6056
- ])
6057
- ]),
6058
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", _hoisted_8, [
6059
- (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, [
6060
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_10, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.inpatientStatusDesc ?? "--"), 1),
6061
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(bannerInfo.value?.inpatientDays ?? "--"), 1)
6062
- ])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
6063
- ])
6064
- ]),
6065
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
6066
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
6067
- "grid gap-2 flex-1",
6068
- {
6069
- [`grid-cols-${layoutColumns.value}`]: true
6070
- }
6071
- ])
6072
- }, [
6073
- ((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", {
6074
- key: item.formDesignDetailId,
6075
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
6076
- "min-h-6",
6077
- {
6078
- [`col-span-${Math.floor(item.displayWidthRatio * Number(layoutColumns.value))}`]: true
6079
- }
6080
- ])
6081
- }, [
6082
- item.bizTagFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG).YES ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", _hoisted_11, [
6083
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_12, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.labelNameDisplay) + ":", 1),
6084
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_13, [
6085
- 'inEncounterBizTagList' === item.bindingFieldNo && inEncounterBizTagList.value.length ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
6086
- key: 0
6087
- }, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(inEncounterBizTagList.value, (tag)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
6088
- key: tag.bizTagId || tag.tagId,
6089
- class: "mr-2",
6090
- size: "default"
6091
- }, {
6092
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6093
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(tag.tagName), 1)
6094
- ]),
6095
- _: 2
6096
- }, 1024))), 128)) : 'personBizTagList' === item.bindingFieldNo && personBizTagList.value.length ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
6097
- key: 1
6098
- }, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(personBizTagList.value, (tag)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
6099
- key: tag.bizTagId || tag.tagId,
6100
- class: "mr-2",
6101
- size: "default"
6102
- }, {
6103
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6104
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(tag.tagName), 1)
6105
- ]),
6106
- _: 2
6107
- }, 1024))), 128)) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_14, "--"))
6108
- ])
6109
- ])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
6110
- key: 1,
6111
- class: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
6112
- onMouseenter: checkTextOverflow
6113
- }, [
6114
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_15, [
6115
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_text, {
6116
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
6117
- 'text-[#555]',
6118
- getDynamicCssClasses(item.comptControlCssList)
6119
- ]),
6120
- style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList)),
6121
- type: ""
5700
+ return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_dialog), {
5701
+ class: "w-2/5",
5702
+ ref_key: "dialogRef",
5703
+ ref: dialogRef,
5704
+ title: "打印模板",
5705
+ "close-on-click-modal": false,
5706
+ "destroy-on-close": true,
5707
+ "confirm-fn": ()=>handleConfirmSubmit(),
5708
+ "align-center": true,
5709
+ onClose: _cache[1] || (_cache[1] = async ()=>{
5710
+ if (!operation.value || 'cancel' === operation.value) await props.onTemplateConfirm(void 0, 'cancel');
5711
+ }),
5712
+ onCancel: _cache[2] || (_cache[2] = ($event)=>operation.value = 'cancel')
5713
+ }, {
5714
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5715
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElForm), {
5716
+ ref_key: "formRef",
5717
+ ref: formRef,
5718
+ model: templateModel.value,
5719
+ rules: rules,
5720
+ "label-width": "100px"
5721
+ }, {
5722
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
5723
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElFormItem), {
5724
+ label: "打印模板",
5725
+ prop: "templateId",
5726
+ required: ""
6122
5727
  }, {
6123
5728
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6124
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.labelNameDisplay) + ":", 1)
6125
- ]),
6126
- _: 2
6127
- }, 1032, [
6128
- "class",
6129
- "style"
6130
- ])
6131
- ]),
6132
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTooltip), {
6133
- disabled: !isTextOverflowing.value,
6134
- content: item.dataValue
6135
- }, {
6136
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6137
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_16, [
6138
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_text, {
6139
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
6140
- 'text-[#555]',
6141
- getDynamicCssClasses(item.comptControlCssList)
6142
- ]),
6143
- style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(getColorStyle(item.comptControlCssList)),
6144
- type: ""
5729
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElSelect), {
5730
+ class: "w-64",
5731
+ placeholder: "请选择打印模板",
5732
+ modelValue: templateModel.value.templateId,
5733
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>templateModel.value.templateId = $event)
6145
5734
  }, {
6146
5735
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6147
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.dataValue || "--"), 1)
5736
+ ((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)(printTemplateList.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__.ElOption), {
5737
+ key: item.receiptTemplateRuleId,
5738
+ label: item.receiptTemplateName,
5739
+ value: item.receiptTemplateRuleId
5740
+ }, null, 8, [
5741
+ "label",
5742
+ "value"
5743
+ ]))), 128))
6148
5744
  ]),
6149
- _: 2
6150
- }, 1032, [
6151
- "class",
6152
- "style"
6153
- ])
6154
- ])
6155
- ]),
6156
- _: 2
6157
- }, 1032, [
6158
- "disabled",
6159
- "content"
6160
- ])
6161
- ], 32))
6162
- ], 2))), 128)),
6163
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
6164
- class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
6165
- "min-h-6",
6166
- {
6167
- [`col-span-${Number(layoutColumns.value)}`]: true
6168
- }
6169
- ])
6170
- }, [
6171
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", _hoisted_17, [
6172
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_18, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode) === PERSON ? "患者标签:" : "就诊标签:"), 1),
6173
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_19, [
6174
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode) && tagIds.value.length ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(tag_select, {
6175
- key: 0,
6176
- modelValue: tagIds.value,
6177
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>tagIds.value = $event),
6178
- tagSize: "default",
6179
- bizIdTypeCode: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode),
6180
- disabled: true
6181
- }, null, 8, [
6182
- "modelValue",
6183
- "bizIdTypeCode"
6184
- ])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_20, "--"))
6185
- ])
6186
- ])
6187
- ], 2)
6188
- ], 2)
6189
- ], 6)), [
6190
- [
6191
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.vLoading),
6192
- loading.value
6193
- ]
6194
- ]);
6195
- };
6196
- }
6197
- });
6198
- const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent;
6199
- /* ESM default export */ const BannerInfo = BannerInfo_exports_;
6200
- /* ESM default export */ const printTemplatevue_type_script_lang_ts_setup_true_name_printDialog = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
6201
- __name: 'printTemplate',
6202
- props: {
6203
- printTemplateList: {},
6204
- onTemplateConfirm: {
6205
- type: Function
6206
- }
6207
- },
6208
- setup (__props, { expose: __expose }) {
6209
- const props = __props;
6210
- const templateModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({
6211
- templateId: ""
6212
- });
6213
- const operation = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
6214
- const rules = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
6215
- templateId: [
6216
- {
6217
- required: true,
6218
- message: "请选择打印模板",
6219
- trigger: [
6220
- "blur",
6221
- "change"
6222
- ]
6223
- }
6224
- ]
6225
- });
6226
- const dialogRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
6227
- const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
6228
- const printTemplateList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.printTemplateList ?? []);
6229
- // 打开弹窗
6230
- const openDialog = async ()=>{
6231
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
6232
- templateModel.value.templateId = printTemplateList.value?.find((item)=>1 === item.defaultFlag)?.receiptTemplateRuleId ?? "";
6233
- dialogRef.value?.open();
6234
- });
6235
- };
6236
- // 提交
6237
- const handleConfirmSubmit = async ()=>{
6238
- operation.value = "";
6239
- await formRef.value?.validate();
6240
- const printTemplate = printTemplateList.value.find((item)=>item.receiptTemplateRuleId === templateModel.value.templateId);
6241
- await props.onTemplateConfirm(printTemplate);
6242
- operation.value = "confirm";
6243
- return [];
6244
- };
6245
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
6246
- openDialog();
6247
- });
6248
- __expose({
6249
- open: openDialog
6250
- });
6251
- return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_dialog), {
6252
- class: "w-2/5",
6253
- ref_key: "dialogRef",
6254
- ref: dialogRef,
6255
- title: "打印模板",
6256
- "close-on-click-modal": false,
6257
- "destroy-on-close": true,
6258
- "confirm-fn": ()=>handleConfirmSubmit(),
6259
- "align-center": true,
6260
- onClose: _cache[1] || (_cache[1] = async ()=>{
6261
- if (!operation.value || 'cancel' === operation.value) await props.onTemplateConfirm(void 0, 'cancel');
6262
- }),
6263
- onCancel: _cache[2] || (_cache[2] = ($event)=>operation.value = 'cancel')
6264
- }, {
6265
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6266
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElForm), {
6267
- ref_key: "formRef",
6268
- ref: formRef,
6269
- model: templateModel.value,
6270
- rules: rules,
6271
- "label-width": "100px"
6272
- }, {
6273
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6274
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElFormItem), {
6275
- label: "打印模板",
6276
- prop: "templateId",
6277
- required: ""
6278
- }, {
6279
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6280
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElSelect), {
6281
- class: "w-64",
6282
- placeholder: "请选择打印模板",
6283
- modelValue: templateModel.value.templateId,
6284
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>templateModel.value.templateId = $event)
6285
- }, {
6286
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
6287
- ((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)(printTemplateList.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__.ElOption), {
6288
- key: item.receiptTemplateRuleId,
6289
- label: item.receiptTemplateName,
6290
- value: item.receiptTemplateRuleId
6291
- }, null, 8, [
6292
- "label",
6293
- "value"
6294
- ]))), 128))
6295
- ]),
6296
- _: 1
6297
- }, 8, [
6298
- "modelValue"
5745
+ _: 1
5746
+ }, 8, [
5747
+ "modelValue"
6299
5748
  ])
6300
5749
  ]),
6301
5750
  _: 1
@@ -7877,6 +7326,523 @@ const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect_hoi
7877
7326
  });
7878
7327
  const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect;
7879
7328
  /* ESM default export */ const hospital_select = hospital_select_exports_;
7329
+ /**
7330
+ * [1-10473-1]根据条件查询标签分组V1(含标签)
7331
+ * @param params
7332
+ * @returns
7333
+ */ const queryTagGroupByExampleV1 = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagGroupByExampleV1', params);
7334
+ /**
7335
+ * ]根据条件查询标签列表
7336
+ * @param params
7337
+ * @returns
7338
+ */ const queryTagListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagListByExample', params);
7339
+ const BACKGROUND_COLOR = 'BACKGROUND_COLOR';
7340
+ const FONT_COLOR = 'FONT_COLOR';
7341
+ // 工具函数:将标签信息添加到映射中
7342
+ const addTagToMap = (map, tag)=>{
7343
+ map.set(tag.tagId, {
7344
+ tagNameDisplay: tag.tagNameDisplay,
7345
+ background: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === BACKGROUND_COLOR)?.cssValue || '',
7346
+ color: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === FONT_COLOR)?.cssValue || ''
7347
+ });
7348
+ };
7349
+ // 工具函数:将 modelValue 转换为数组
7350
+ const getModelValueArray = (value)=>{
7351
+ if (!value) return [];
7352
+ return Array.isArray(value) ? value : [
7353
+ value
7354
+ ];
7355
+ };
7356
+ // 工具函数:创建标签映射
7357
+ const createTagsMap = (tableData, extraTagIds)=>{
7358
+ const map = new Map();
7359
+ // 处理分组标签
7360
+ tableData.forEach((group)=>{
7361
+ group.tagList.forEach((tag)=>{
7362
+ addTagToMap(map, tag);
7363
+ });
7364
+ });
7365
+ // 处理额外标签
7366
+ extraTagIds.forEach((tag)=>{
7367
+ addTagToMap(map, tag);
7368
+ });
7369
+ return map;
7370
+ };
7371
+ // 工具函数:获取选项样式
7372
+ const getOptionStyle = (tagId, selectList, allTagsMap)=>selectList.includes(tagId) ? {} : {
7373
+ background: allTagsMap.get(tagId)?.background,
7374
+ color: allTagsMap.get(tagId)?.color
7375
+ };
7376
+ // 工具函数:检查选项是否被禁用
7377
+ const isOptionDisabled = (tagId, selectList)=>selectList.includes(tagId);
7378
+ /* ESM default export */ const SelectDropdownvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
7379
+ __name: 'SelectDropdown',
7380
+ props: {
7381
+ modelValue: {},
7382
+ hasSelect: {},
7383
+ tableData: {},
7384
+ extraTagIds: {},
7385
+ allTagsMap: {},
7386
+ multiple: {
7387
+ type: Boolean
7388
+ },
7389
+ disabled: {
7390
+ type: Boolean
7391
+ },
7392
+ tagSize: {},
7393
+ placeholder: {}
7394
+ },
7395
+ emits: [
7396
+ 'update:modelValue',
7397
+ 'change',
7398
+ 'blur'
7399
+ ],
7400
+ setup (__props, { emit: __emit }) {
7401
+ const props = __props;
7402
+ const emit = __emit;
7403
+ const selectList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getModelValueArray(props.hasSelect));
7404
+ const selectClass = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.multiple ? 'w-60' : 'w-full');
7405
+ const innerValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)({
7406
+ get: ()=>props.modelValue,
7407
+ set: (val)=>emit('update:modelValue', val)
7408
+ });
7409
+ function handleChange(val) {
7410
+ emit('change', val);
7411
+ }
7412
+ function handleBlur(e) {
7413
+ emit('blur', e);
7414
+ }
7415
+ return (_ctx, _cache)=>{
7416
+ const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
7417
+ const _component_el_option_group = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option-group");
7418
+ const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
7419
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
7420
+ modelValue: innerValue.value,
7421
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>innerValue.value = $event),
7422
+ multiple: props.multiple ?? true,
7423
+ filterable: "",
7424
+ clearable: "",
7425
+ disabled: props.disabled ?? false,
7426
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(selectClass.value),
7427
+ placeholder: props.placeholder ?? '请选择',
7428
+ onChange: handleChange,
7429
+ onBlur: handleBlur,
7430
+ "collapse-tags": "",
7431
+ "collapse-tags-tooltip": ""
7432
+ }, {
7433
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7434
+ ((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)(_ctx.extraTagIds, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
7435
+ key: item.tagId,
7436
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(getOptionStyle)(item.tagId, selectList.value, props.allTagsMap)),
7437
+ disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isOptionDisabled)(item.tagId, selectList.value),
7438
+ label: item.tagNameDisplay,
7439
+ value: item.tagId
7440
+ }, null, 8, [
7441
+ "style",
7442
+ "disabled",
7443
+ "label",
7444
+ "value"
7445
+ ]))), 128)),
7446
+ ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(props.tableData, (group)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option_group, {
7447
+ key: group.tagGroupId,
7448
+ label: group.tagGroupNameDisplay,
7449
+ value: group.tagGroupId
7450
+ }, {
7451
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7452
+ ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(group.tagList, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
7453
+ key: item.tagId,
7454
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(getOptionStyle)(item.tagId, selectList.value, props.allTagsMap)),
7455
+ disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isOptionDisabled)(item.tagId, selectList.value),
7456
+ label: item.tagNameDisplay,
7457
+ value: item.tagId
7458
+ }, null, 8, [
7459
+ "style",
7460
+ "disabled",
7461
+ "label",
7462
+ "value"
7463
+ ]))), 128))
7464
+ ]),
7465
+ _: 2
7466
+ }, 1032, [
7467
+ "label",
7468
+ "value"
7469
+ ]))), 128))
7470
+ ]),
7471
+ _: 1
7472
+ }, 8, [
7473
+ "modelValue",
7474
+ "multiple",
7475
+ "disabled",
7476
+ "class",
7477
+ "placeholder"
7478
+ ]);
7479
+ };
7480
+ }
7481
+ });
7482
+ const SelectDropdown_exports_ = SelectDropdownvue_type_script_lang_ts_setup_true;
7483
+ /* ESM default export */ const SelectDropdown = SelectDropdown_exports_;
7484
+ const tag_selectvue_type_script_lang_ts_setup_true_hoisted_1 = {
7485
+ class: "flex flex-wrap gap-2"
7486
+ };
7487
+ const SELECT_WIDTH = 15; // rem
7488
+ const TAG_MARGIN = 1; // 1rem
7489
+ /* ESM default export */ const tag_selectvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
7490
+ __name: 'index',
7491
+ props: {
7492
+ bizIdTypeCode: {
7493
+ default: ''
7494
+ },
7495
+ bizId: {
7496
+ default: ''
7497
+ },
7498
+ class: {
7499
+ default: 'w-full'
7500
+ },
7501
+ queryExtra: {
7502
+ type: Boolean
7503
+ },
7504
+ tagList: {
7505
+ default: ()=>[]
7506
+ },
7507
+ disabled: {
7508
+ type: Boolean,
7509
+ default: false
7510
+ },
7511
+ multiple: {
7512
+ type: Boolean,
7513
+ default: true
7514
+ },
7515
+ tagSize: {
7516
+ default: 'large'
7517
+ }
7518
+ },
7519
+ emits: [
7520
+ 'change'
7521
+ ],
7522
+ setup (__props, { emit: __emit }) {
7523
+ const emit = __emit;
7524
+ const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
7525
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
7526
+ const props = __props;
7527
+ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tagList || []);
7528
+ const extraTagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
7529
+ const selectValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
7530
+ const selectVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
7531
+ const SelectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7532
+ const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7533
+ const moreButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
7534
+ const realMaxNum = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(2);
7535
+ // 计算rem到px的转换
7536
+ const getRemValue = (rem)=>rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
7537
+ // 常量定义
7538
+ const MORE_BUTTON_WIDTH = 5 + TAG_MARGIN; // rem
7539
+ // 计算所有标签的映射,方便通过tagId查找tagNameDisplay
7540
+ const allTagsMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>createTagsMap(tableData.value, extraTagIds.value));
7541
+ const calcMaxNum = (wrapperNode)=>{
7542
+ if (!wrapperNode || !attrs.modelValue) return;
7543
+ const modelValueArray = getModelValueArray(attrs.modelValue);
7544
+ if (!modelValueArray.length) {
7545
+ realMaxNum.value = 0;
7546
+ return;
7547
+ }
7548
+ // 计算每个标签的宽度
7549
+ const tagWidths = modelValueArray.map((item)=>{
7550
+ // 为每个标签创建独立的容器
7551
+ const tagContainer = document.createElement('div');
7552
+ tagContainer.style.position = 'absolute';
7553
+ tagContainer.style.visibility = 'hidden';
7554
+ document.body.appendChild(tagContainer);
7555
+ const vnode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
7556
+ closable: !props.disabled,
7557
+ size: props.tagSize,
7558
+ disableTransitions: true,
7559
+ class: 'mr-4'
7560
+ }, ()=>allTagsMap.value.get(item)?.tagNameDisplay || item);
7561
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(vnode, tagContainer);
7562
+ const width = tagContainer.firstElementChild?.getBoundingClientRect().width || 0;
7563
+ document.body.removeChild(tagContainer);
7564
+ return width + getRemValue(TAG_MARGIN);
7565
+ });
7566
+ // 计算可用宽度
7567
+ const availableWidth = wrapperNode.offsetWidth - (props.disabled ? 0 : getRemValue(SELECT_WIDTH));
7568
+ const totalWidth = tagWidths.reduce((sum, width)=>sum + width, 0);
7569
+ // 如果所有标签都能显示,直接显示所有标签
7570
+ if (totalWidth <= availableWidth) {
7571
+ realMaxNum.value = modelValueArray.length;
7572
+ return;
7573
+ }
7574
+ // 如果放不下所有标签,需要显示更多按钮
7575
+ const availableWidthWithMore = availableWidth - getRemValue(MORE_BUTTON_WIDTH);
7576
+ // 计算可以显示多少个标签
7577
+ let currentWidth = 0;
7578
+ let count = 0;
7579
+ for (const width of tagWidths)if (currentWidth + width <= availableWidthWithMore) {
7580
+ currentWidth += width;
7581
+ count++;
7582
+ } else break;
7583
+ realMaxNum.value = count;
7584
+ };
7585
+ // Methods
7586
+ const handleClose = (bizId)=>{
7587
+ const currentArray = getModelValueArray(attrs.modelValue);
7588
+ const newModelValue = currentArray.filter((id)=>id !== bizId);
7589
+ change(props.multiple ? newModelValue : newModelValue[0] || '');
7590
+ };
7591
+ const showSelect = ()=>{
7592
+ selectVisible.value = true;
7593
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
7594
+ SelectRef.value?.focus();
7595
+ });
7596
+ };
7597
+ const handleSelectConfirm = ()=>{
7598
+ if (!selectValue.value) {
7599
+ selectVisible.value = false;
7600
+ return;
7601
+ }
7602
+ const currentValues = getModelValueArray(attrs.modelValue);
7603
+ if (props.multiple) {
7604
+ change([
7605
+ ...currentValues,
7606
+ ...Array.isArray(selectValue.value) ? selectValue.value : [
7607
+ selectValue.value
7608
+ ]
7609
+ ]);
7610
+ selectValue.value = [];
7611
+ } else {
7612
+ change([
7613
+ ...currentValues,
7614
+ selectValue.value
7615
+ ]);
7616
+ selectValue.value = '';
7617
+ }
7618
+ selectVisible.value = false;
7619
+ };
7620
+ async function fetchData() {
7621
+ if (!props.bizIdTypeCode) return;
7622
+ loading.value = true;
7623
+ let [, result] = await queryTagGroupByExampleV1({
7624
+ bizIdTypeCode: props.bizIdTypeCode,
7625
+ bizId: props.bizId,
7626
+ enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
7627
+ });
7628
+ loading.value = false;
7629
+ if (result?.success) {
7630
+ tableData.value = result.data;
7631
+ if (props.queryExtra) fetchExtraTag();
7632
+ calcMaxNum(containerRef.value);
7633
+ }
7634
+ }
7635
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
7636
+ fetchData();
7637
+ // 等待所有标签渲染完成
7638
+ });
7639
+ async function fetchExtraTag() {
7640
+ const modelValueArray = getModelValueArray(attrs.modelValue);
7641
+ if (modelValueArray.length) {
7642
+ let otherTagIds = modelValueArray.filter((item)=>!allTagsMap.value.get(item));
7643
+ if (otherTagIds.length) {
7644
+ let [, result] = await queryTagListByExample({
7645
+ tagIds: otherTagIds
7646
+ });
7647
+ if (result?.success) extraTagIds.value = result.data;
7648
+ }
7649
+ }
7650
+ }
7651
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs.modelValue, ()=>{
7652
+ if (props.queryExtra && !loading.value) fetchExtraTag();
7653
+ if (!props.multiple) {
7654
+ selectValue.value = attrs?.modelValue || '';
7655
+ return;
7656
+ }
7657
+ const modelValueArray = getModelValueArray(attrs.modelValue);
7658
+ if (modelValueArray.length) // 等待所有标签渲染完成
7659
+ {
7660
+ if (containerRef.value) calcMaxNum(containerRef.value);
7661
+ }
7662
+ }, {
7663
+ immediate: true
7664
+ });
7665
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.tagList, ()=>{
7666
+ tableData.value = props.tagList || [];
7667
+ });
7668
+ /**
7669
+ *
7670
+ * @param value 下拉框选择
7671
+ */ function change(value) {
7672
+ if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
7673
+ emit('change', value);
7674
+ }
7675
+ // 计算当前显示的标签数组
7676
+ const currentTagsArray = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getModelValueArray(attrs.modelValue));
7677
+ return (_ctx, _cache)=>{
7678
+ const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
7679
+ const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
7680
+ const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
7681
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
7682
+ ref_key: "containerRef",
7683
+ ref: containerRef,
7684
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(props.class)
7685
+ }, [
7686
+ props.multiple ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
7687
+ key: 0
7688
+ }, [
7689
+ ((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)(currentTagsArray.value.slice(0, realMaxNum.value), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
7690
+ key: item,
7691
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
7692
+ background: allTagsMap.value.get(item)?.background,
7693
+ color: allTagsMap.value.get(item)?.color,
7694
+ borderColor: allTagsMap.value.get(item)?.color,
7695
+ '--el-tag-text-color': allTagsMap.value.get(item)?.color,
7696
+ '--el-tag-hover-color': allTagsMap.value.get(item)?.color
7697
+ }),
7698
+ closable: !props.disabled,
7699
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
7700
+ 'mr-4'
7701
+ ]),
7702
+ size: props.tagSize,
7703
+ "disable-transitions": true,
7704
+ onClose: ($event)=>handleClose(item)
7705
+ }, {
7706
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7707
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
7708
+ ]),
7709
+ _: 2
7710
+ }, 1032, [
7711
+ "style",
7712
+ "closable",
7713
+ "size",
7714
+ "onClose"
7715
+ ]))), 128)),
7716
+ currentTagsArray.value.length > realMaxNum.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_popover, {
7717
+ key: 0,
7718
+ placement: "bottom",
7719
+ trigger: "hover"
7720
+ }, {
7721
+ reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7722
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
7723
+ ref_key: "moreButtonRef",
7724
+ ref: moreButtonRef,
7725
+ style: {
7726
+ "margin-left": "0"
7727
+ },
7728
+ class: "mr-4"
7729
+ }, {
7730
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7731
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("更多 +" + (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(currentTagsArray.value.length - realMaxNum.value), 1)
7732
+ ]),
7733
+ _: 1
7734
+ }, 512)
7735
+ ]),
7736
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7737
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", tag_selectvue_type_script_lang_ts_setup_true_hoisted_1, [
7738
+ ((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)(currentTagsArray.value.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), {
7739
+ key: item,
7740
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
7741
+ background: allTagsMap.value.get(item)?.background,
7742
+ color: allTagsMap.value.get(item)?.color,
7743
+ borderColor: allTagsMap.value.get(item)?.color,
7744
+ '--el-tag-text-color': allTagsMap.value.get(item)?.color,
7745
+ '--el-tag-hover-color': allTagsMap.value.get(item)?.color
7746
+ }),
7747
+ closable: !props.disabled,
7748
+ size: props.tagSize,
7749
+ "disable-transitions": true,
7750
+ onClose: ($event)=>handleClose(item)
7751
+ }, {
7752
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7753
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
7754
+ ]),
7755
+ _: 2
7756
+ }, 1032, [
7757
+ "style",
7758
+ "closable",
7759
+ "size",
7760
+ "onClose"
7761
+ ]))), 128))
7762
+ ])
7763
+ ]),
7764
+ _: 1
7765
+ })) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
7766
+ selectVisible.value && !props.disabled ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
7767
+ key: 1,
7768
+ modelValue: selectValue.value,
7769
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectValue.value = $event),
7770
+ "table-data": tableData.value,
7771
+ extraTagIds: extraTagIds.value,
7772
+ "all-tags-map": allTagsMap.value,
7773
+ multiple: true,
7774
+ disabled: props.disabled,
7775
+ "tag-size": props.tagSize,
7776
+ "has-select": currentTagsArray.value,
7777
+ placeholder: "请选择",
7778
+ onChange: _cache[1] || (_cache[1] = ()=>{
7779
+ if (!props.multiple) handleSelectConfirm();
7780
+ }),
7781
+ onBlur: handleSelectConfirm
7782
+ }, null, 8, [
7783
+ "modelValue",
7784
+ "table-data",
7785
+ "extraTagIds",
7786
+ "all-tags-map",
7787
+ "disabled",
7788
+ "tag-size",
7789
+ "has-select"
7790
+ ])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
7791
+ selectVisible.value || props.disabled ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_button, {
7792
+ key: 2,
7793
+ style: {
7794
+ "margin-left": "0"
7795
+ },
7796
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
7797
+ "!border-primary",
7798
+ {
7799
+ 'pointer-events-none': props.disabled
7800
+ }
7801
+ ]),
7802
+ onClick: showSelect
7803
+ }, {
7804
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7805
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_icon, null, {
7806
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
7807
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.Plus), {
7808
+ class: "text-primary"
7809
+ })
7810
+ ]),
7811
+ _: 1
7812
+ })
7813
+ ]),
7814
+ _: 1
7815
+ }, 8, [
7816
+ "class"
7817
+ ]))
7818
+ ], 64)) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
7819
+ key: 1,
7820
+ modelValue: selectValue.value,
7821
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>selectValue.value = $event),
7822
+ "table-data": tableData.value,
7823
+ extraTagIds: extraTagIds.value,
7824
+ "all-tags-map": allTagsMap.value,
7825
+ multiple: false,
7826
+ disabled: props.disabled,
7827
+ "tag-size": props.tagSize,
7828
+ placeholder: "请选择标签",
7829
+ "has-select": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue,
7830
+ onChange: change
7831
+ }, null, 8, [
7832
+ "modelValue",
7833
+ "table-data",
7834
+ "extraTagIds",
7835
+ "all-tags-map",
7836
+ "disabled",
7837
+ "tag-size",
7838
+ "has-select"
7839
+ ]))
7840
+ ], 2);
7841
+ };
7842
+ }
7843
+ });
7844
+ const tag_select_exports_ = tag_selectvue_type_script_lang_ts_setup_true;
7845
+ /* ESM default export */ const tag_select = tag_select_exports_;
7880
7846
  /**
7881
7847
  * [1-10013-1]根据条件查询用户列表
7882
7848
  * @param params