sun-biz 0.0.4-beta.40 → 0.0.4-beta.42
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/components/index.js +647 -677
- package/dist/index.js +647 -677
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5250,523 +5250,6 @@ 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
|
-
});
|
|
5272
|
-
};
|
|
5273
|
-
// 工具函数:将 modelValue 转换为数组
|
|
5274
|
-
const getModelValueArray = (value)=>{
|
|
5275
|
-
if (!value) return [];
|
|
5276
|
-
return Array.isArray(value) ? value : [
|
|
5277
|
-
value
|
|
5278
|
-
];
|
|
5279
|
-
};
|
|
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;
|
|
5294
|
-
};
|
|
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"
|
|
5410
|
-
};
|
|
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',
|
|
5415
|
-
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: {
|
|
5436
|
-
type: Boolean,
|
|
5437
|
-
default: true
|
|
5438
|
-
},
|
|
5439
|
-
tagSize: {
|
|
5440
|
-
default: 'large'
|
|
5441
|
-
}
|
|
5442
|
-
},
|
|
5443
|
-
emits: [
|
|
5444
|
-
'change'
|
|
5445
|
-
],
|
|
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;
|
|
5508
|
-
};
|
|
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] || '');
|
|
5514
|
-
};
|
|
5515
|
-
const showSelect = ()=>{
|
|
5516
|
-
selectVisible.value = true;
|
|
5517
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
5518
|
-
SelectRef.value?.focus();
|
|
5519
|
-
});
|
|
5520
|
-
};
|
|
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;
|
|
5543
|
-
};
|
|
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);
|
|
5557
|
-
}
|
|
5558
|
-
}
|
|
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;
|
|
5572
|
-
}
|
|
5573
|
-
}
|
|
5574
|
-
}
|
|
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 || '';
|
|
5579
|
-
return;
|
|
5580
|
-
}
|
|
5581
|
-
const modelValueArray = getModelValueArray(attrs.modelValue);
|
|
5582
|
-
if (modelValueArray.length) // 等待所有标签渲染完成
|
|
5583
|
-
{
|
|
5584
|
-
if (containerRef.value) calcMaxNum(containerRef.value);
|
|
5585
|
-
}
|
|
5586
|
-
}, {
|
|
5587
|
-
immediate: true
|
|
5588
|
-
});
|
|
5589
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.tagList, ()=>{
|
|
5590
|
-
tableData.value = props.tagList || [];
|
|
5591
|
-
});
|
|
5592
|
-
/**
|
|
5593
|
-
*
|
|
5594
|
-
* @param value 下拉框选择
|
|
5595
|
-
*/ function change(value) {
|
|
5596
|
-
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
5597
|
-
emit('change', value);
|
|
5598
|
-
}
|
|
5599
|
-
// 计算当前显示的标签数组
|
|
5600
|
-
const currentTagsArray = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getModelValueArray(attrs.modelValue));
|
|
5601
|
-
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)
|
|
5609
|
-
}, [
|
|
5610
|
-
props.multiple ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
5611
|
-
key: 0
|
|
5612
|
-
}, [
|
|
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,
|
|
5623
|
-
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)
|
|
5675
|
-
}, {
|
|
5676
|
-
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)
|
|
5678
|
-
]),
|
|
5679
|
-
_: 2
|
|
5680
|
-
}, 1032, [
|
|
5681
|
-
"style",
|
|
5682
|
-
"closable",
|
|
5683
|
-
"size",
|
|
5684
|
-
"onClose"
|
|
5685
|
-
]))), 128))
|
|
5686
|
-
])
|
|
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
|
-
})
|
|
5734
|
-
]),
|
|
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);
|
|
5765
|
-
};
|
|
5766
|
-
}
|
|
5767
|
-
});
|
|
5768
|
-
const tag_select_exports_ = tag_selectvue_type_script_lang_ts_setup_true;
|
|
5769
|
-
/* ESM default export */ const tag_select = tag_select_exports_;
|
|
5770
5253
|
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1 = {
|
|
5771
5254
|
class: "border-r border-[#C9C9C9] pr-5 mr-5"
|
|
5772
5255
|
};
|
|
@@ -5803,7 +5286,7 @@ const _hoisted_11 = {
|
|
|
5803
5286
|
class: "w-full flex"
|
|
5804
5287
|
};
|
|
5805
5288
|
const _hoisted_12 = {
|
|
5806
|
-
class: "text-[#555]"
|
|
5289
|
+
class: "el-text text-[#555]"
|
|
5807
5290
|
};
|
|
5808
5291
|
const _hoisted_13 = {
|
|
5809
5292
|
class: "flex flex-1"
|
|
@@ -5817,21 +5300,10 @@ const _hoisted_15 = {
|
|
|
5817
5300
|
const _hoisted_16 = {
|
|
5818
5301
|
class: "w-full text-[#555]"
|
|
5819
5302
|
};
|
|
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
5303
|
// import DefaultPatient from "../patient-access/images/default_patient.vue";
|
|
5833
5304
|
// import ManPatient from "../patient-access/images/man_patient.vue";
|
|
5834
5305
|
// import WomanPatient from "../patient-access/images/women_patient.vue";
|
|
5306
|
+
// import TagSelect from "../biz-select/tag-select/index.vue";
|
|
5835
5307
|
const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
5836
5308
|
/* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5837
5309
|
__name: 'BannerInfo',
|
|
@@ -5962,6 +5434,7 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5962
5434
|
// 提取业务标签ID(bizTagFlag === 1)
|
|
5963
5435
|
extractBizTagIds(res?.data?.bannerItemList ?? []);
|
|
5964
5436
|
// 保留 displayFlag === 1 或 bizTagFlag === 1 的项用于显示
|
|
5437
|
+
// 如果同时 bizTagFlag === 1 和 displayFlag === 1,bizTagFlag 优先级更高,会按照标签形式显示
|
|
5965
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);
|
|
5966
5439
|
setBizId({
|
|
5967
5440
|
personId: res.data?.personId || "",
|
|
@@ -6075,7 +5548,8 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
6075
5548
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
6076
5549
|
"min-h-6",
|
|
6077
5550
|
{
|
|
6078
|
-
|
|
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
|
|
6079
5553
|
}
|
|
6080
5554
|
])
|
|
6081
5555
|
}, [
|
|
@@ -6159,32 +5633,7 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
6159
5633
|
"content"
|
|
6160
5634
|
])
|
|
6161
5635
|
], 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)
|
|
5636
|
+
], 2))), 128))
|
|
6188
5637
|
], 2)
|
|
6189
5638
|
], 6)), [
|
|
6190
5639
|
[
|
|
@@ -7775,108 +7224,625 @@ const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_sel
|
|
|
7775
7224
|
]),
|
|
7776
7225
|
_: 1
|
|
7777
7226
|
}, 8, [
|
|
7778
|
-
"modelValue"
|
|
7227
|
+
"modelValue"
|
|
7228
|
+
]);
|
|
7229
|
+
};
|
|
7230
|
+
}
|
|
7231
|
+
});
|
|
7232
|
+
const flag_select_exports_ = flag_selectvue_type_script_setup_true_lang_ts_name_FlagSelect;
|
|
7233
|
+
/* ESM default export */ const flag_select = flag_select_exports_;
|
|
7234
|
+
const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect_hoisted_1 = {
|
|
7235
|
+
key: 0,
|
|
7236
|
+
class: "truncate"
|
|
7237
|
+
};
|
|
7238
|
+
const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect_hoisted_2 = {
|
|
7239
|
+
key: 1
|
|
7240
|
+
};
|
|
7241
|
+
/* ESM default export */ const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
7242
|
+
__name: 'index',
|
|
7243
|
+
emits: [
|
|
7244
|
+
"change"
|
|
7245
|
+
],
|
|
7246
|
+
setup (__props, { emit: __emit }) {
|
|
7247
|
+
const { currentOrg, hospitalList } = use_app_config([
|
|
7248
|
+
use_app_config_MAIN_APP_CONFIG.CURRENT_ORG,
|
|
7249
|
+
use_app_config_MAIN_APP_CONFIG.HOSPITAL_LIST
|
|
7250
|
+
]);
|
|
7251
|
+
const selectedHospitalName = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
7252
|
+
const selectedId = attrs.modelValue || attrs.hospitalId;
|
|
7253
|
+
if (!selectedId) return "";
|
|
7254
|
+
const selectedHospital = hospitalList?.find((item)=>item.orgId === selectedId);
|
|
7255
|
+
return selectedHospital?.orgName || "";
|
|
7256
|
+
});
|
|
7257
|
+
const isDisabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL);
|
|
7258
|
+
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
7259
|
+
const emit = __emit; /**
|
|
7260
|
+
*
|
|
7261
|
+
* @param value 下拉框选择
|
|
7262
|
+
*/
|
|
7263
|
+
function change(value) {
|
|
7264
|
+
if (attrs["onUpdate:modelValue"]) attrs["onUpdate:modelValue"](value);
|
|
7265
|
+
emit("change", value);
|
|
7266
|
+
}
|
|
7267
|
+
let stopWatch; /** 主动触发change */
|
|
7268
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7269
|
+
stopWatch = (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>currentOrg?.orgId, ()=>{
|
|
7270
|
+
if (attrs?.modelValue) change(attrs.modelValue);
|
|
7271
|
+
else {
|
|
7272
|
+
const id = currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL ? currentOrg?.orgId : attrs?.hospitalId === void 0 ? (hospitalList ?? [])[0]?.orgId : attrs?.hospitalId;
|
|
7273
|
+
if (void 0 !== id) change(id);
|
|
7274
|
+
}
|
|
7275
|
+
}, {
|
|
7276
|
+
immediate: true
|
|
7277
|
+
});
|
|
7278
|
+
});
|
|
7279
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
7280
|
+
if (stopWatch) stopWatch();
|
|
7281
|
+
});
|
|
7282
|
+
return (_ctx, _cache)=>{
|
|
7283
|
+
const _component_el_tooltip = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-tooltip");
|
|
7284
|
+
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
7285
|
+
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
7286
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
7287
|
+
onChange: change,
|
|
7288
|
+
placeholder: "Select",
|
|
7289
|
+
disabled: isDisabled.value,
|
|
7290
|
+
style: {
|
|
7291
|
+
width: "250px"
|
|
7292
|
+
}
|
|
7293
|
+
}, {
|
|
7294
|
+
label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7295
|
+
selectedHospitalName.value && selectedHospitalName.value.length > 12 ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect_hoisted_1, [
|
|
7296
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_tooltip, {
|
|
7297
|
+
effect: "dark",
|
|
7298
|
+
content: selectedHospitalName.value,
|
|
7299
|
+
placement: "bottom-start"
|
|
7300
|
+
}, {
|
|
7301
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7302
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(selectedHospitalName.value), 1)
|
|
7303
|
+
]),
|
|
7304
|
+
_: 1
|
|
7305
|
+
}, 8, [
|
|
7306
|
+
"content"
|
|
7307
|
+
])
|
|
7308
|
+
])) : selectedHospitalName.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect_hoisted_2, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(selectedHospitalName.value), 1)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
7309
|
+
]),
|
|
7310
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7311
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(hospitalList) ?? [], (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_option, {
|
|
7312
|
+
key: item.orgId,
|
|
7313
|
+
label: item.orgName,
|
|
7314
|
+
value: item.orgId
|
|
7315
|
+
}, null, 8, [
|
|
7316
|
+
"label",
|
|
7317
|
+
"value"
|
|
7318
|
+
]))), 128))
|
|
7319
|
+
]),
|
|
7320
|
+
_: 1
|
|
7321
|
+
}, 8, [
|
|
7322
|
+
"disabled"
|
|
7323
|
+
]);
|
|
7324
|
+
};
|
|
7325
|
+
}
|
|
7326
|
+
});
|
|
7327
|
+
const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect;
|
|
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"
|
|
7779
7478
|
]);
|
|
7780
7479
|
};
|
|
7781
7480
|
}
|
|
7782
7481
|
});
|
|
7783
|
-
const
|
|
7784
|
-
/* ESM default export */ const
|
|
7785
|
-
const
|
|
7786
|
-
|
|
7787
|
-
class: "truncate"
|
|
7788
|
-
};
|
|
7789
|
-
const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect_hoisted_2 = {
|
|
7790
|
-
key: 1
|
|
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"
|
|
7791
7486
|
};
|
|
7792
|
-
|
|
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)({
|
|
7793
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
|
+
},
|
|
7794
7519
|
emits: [
|
|
7795
|
-
|
|
7520
|
+
'change'
|
|
7796
7521
|
],
|
|
7797
7522
|
setup (__props, { emit: __emit }) {
|
|
7798
|
-
const
|
|
7799
|
-
use_app_config_MAIN_APP_CONFIG.CURRENT_ORG,
|
|
7800
|
-
use_app_config_MAIN_APP_CONFIG.HOSPITAL_LIST
|
|
7801
|
-
]);
|
|
7802
|
-
const selectedHospitalName = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
7803
|
-
const selectedId = attrs.modelValue || attrs.hospitalId;
|
|
7804
|
-
if (!selectedId) return "";
|
|
7805
|
-
const selectedHospital = hospitalList?.find((item)=>item.orgId === selectedId);
|
|
7806
|
-
return selectedHospital?.orgName || "";
|
|
7807
|
-
});
|
|
7808
|
-
const isDisabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL);
|
|
7523
|
+
const emit = __emit;
|
|
7809
7524
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
7810
|
-
const
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
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
|
+
}
|
|
7817
7634
|
}
|
|
7818
|
-
let stopWatch; /** 主动触发change */
|
|
7819
7635
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
else {
|
|
7823
|
-
const id = currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL ? currentOrg?.orgId : attrs?.hospitalId === void 0 ? (hospitalList ?? [])[0]?.orgId : attrs?.hospitalId;
|
|
7824
|
-
if (void 0 !== id) change(id);
|
|
7825
|
-
}
|
|
7826
|
-
}, {
|
|
7827
|
-
immediate: true
|
|
7828
|
-
});
|
|
7829
|
-
});
|
|
7830
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
7831
|
-
if (stopWatch) stopWatch();
|
|
7636
|
+
fetchData();
|
|
7637
|
+
// 等待所有标签渲染完成
|
|
7832
7638
|
});
|
|
7833
|
-
|
|
7834
|
-
const
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
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);
|
|
7875
7841
|
};
|
|
7876
7842
|
}
|
|
7877
7843
|
});
|
|
7878
|
-
const
|
|
7879
|
-
/* ESM default export */ const
|
|
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
|
|
@@ -8050,10 +8016,10 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8050
8016
|
* @returns
|
|
8051
8017
|
*/ const queryBizUnitList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryBizUnitListByExample', params);
|
|
8052
8018
|
/*
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8019
|
+
96-10014-1 业务单元选择组件
|
|
8020
|
+
1、调用“1-10516-1 根据条件查询业务单元列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询业务单元列表
|
|
8021
|
+
2、展示列包括“组织类型、编码、名称”
|
|
8022
|
+
*/ /* ESM default export */ const biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
8057
8023
|
__name: 'index',
|
|
8058
8024
|
props: {
|
|
8059
8025
|
keyWord: {},
|
|
@@ -8270,7 +8236,9 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8270
8236
|
selectedRows.value.splice(index, 1);
|
|
8271
8237
|
const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
|
|
8272
8238
|
tableRef.value?.eleTable?.clearSelection();
|
|
8273
|
-
list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true));
|
|
8239
|
+
list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true)); // 修复:显式调用 handleChange 确保更新事件被触发
|
|
8240
|
+
// 特别是在删除最后一个选项时,table 的 selection-change 可能不会触发
|
|
8241
|
+
handleChange();
|
|
8274
8242
|
}
|
|
8275
8243
|
});
|
|
8276
8244
|
};
|
|
@@ -8409,12 +8377,12 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8409
8377
|
onKeydown: handleKeydown
|
|
8410
8378
|
}, [
|
|
8411
8379
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_popover, {
|
|
8412
|
-
visible: popoverVisible.value,
|
|
8413
8380
|
ref_key: "popoverRef",
|
|
8414
8381
|
ref: popoverRef,
|
|
8415
|
-
|
|
8416
|
-
trigger: "click",
|
|
8382
|
+
visible: popoverVisible.value,
|
|
8417
8383
|
placement: "bottom",
|
|
8384
|
+
trigger: "click",
|
|
8385
|
+
width: "auto",
|
|
8418
8386
|
onShow: handlePopoverShow
|
|
8419
8387
|
}, {
|
|
8420
8388
|
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -8423,30 +8391,31 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8423
8391
|
ref: selectRef,
|
|
8424
8392
|
modelValue: selectedValue.value,
|
|
8425
8393
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectedValue.value = $event),
|
|
8426
|
-
placeholder: _ctx.$t('bizUnitSelect.placeholder', '请选择组织'),
|
|
8427
8394
|
"collapse-tags": !!props.multiSelectFlag,
|
|
8428
|
-
remote: "",
|
|
8429
|
-
clearable: "",
|
|
8430
|
-
filterable: "",
|
|
8431
|
-
"remote-show-suffix": "",
|
|
8432
|
-
"collapse-tags-tooltip": "",
|
|
8433
|
-
teleported: !popoverVisible.value,
|
|
8434
|
-
"remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
|
|
8435
8395
|
multiple: !!props.multiSelectFlag,
|
|
8436
8396
|
options: [],
|
|
8397
|
+
placeholder: _ctx.$t('bizUnitSelect.placeholder', '请选择组织'),
|
|
8437
8398
|
"popper-class": popoverVisible.value ? 'hidden' : '',
|
|
8438
|
-
|
|
8439
|
-
|
|
8399
|
+
"remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
|
|
8400
|
+
teleported: !popoverVisible.value,
|
|
8401
|
+
clearable: "",
|
|
8402
|
+
"collapse-tags-tooltip": "",
|
|
8403
|
+
filterable: "",
|
|
8404
|
+
remote: "",
|
|
8405
|
+
"remote-show-suffix": ""
|
|
8406
|
+
}, selectProps.value, {
|
|
8440
8407
|
onBlur: handleBlur,
|
|
8441
|
-
onClear: handleClear
|
|
8442
|
-
|
|
8408
|
+
onClear: handleClear,
|
|
8409
|
+
onFocus: handleFocus,
|
|
8410
|
+
onRemoveTag: handleTagRemove
|
|
8411
|
+
}), null, 16, [
|
|
8443
8412
|
"modelValue",
|
|
8444
|
-
"placeholder",
|
|
8445
8413
|
"collapse-tags",
|
|
8446
|
-
"teleported",
|
|
8447
|
-
"remote-method",
|
|
8448
8414
|
"multiple",
|
|
8449
|
-
"
|
|
8415
|
+
"placeholder",
|
|
8416
|
+
"popper-class",
|
|
8417
|
+
"remote-method",
|
|
8418
|
+
"teleported"
|
|
8450
8419
|
])
|
|
8451
8420
|
]),
|
|
8452
8421
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -8457,23 +8426,24 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8457
8426
|
class: "w-full overflow-hidden"
|
|
8458
8427
|
}, [
|
|
8459
8428
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
8460
|
-
style: {
|
|
8461
|
-
height: "100%"
|
|
8462
|
-
},
|
|
8463
8429
|
ref_key: "tableRef",
|
|
8464
8430
|
ref: tableRef,
|
|
8465
|
-
|
|
8431
|
+
columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
|
|
8466
8432
|
data: bizUnitList.value,
|
|
8467
8433
|
loading: loading.value,
|
|
8468
|
-
"highlight-current-row": "",
|
|
8469
|
-
columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
|
|
8470
8434
|
"row-class-name": getRowClassName,
|
|
8435
|
+
"highlight-current-row": "",
|
|
8436
|
+
"row-key": "orgId",
|
|
8437
|
+
style: {
|
|
8438
|
+
height: "100%"
|
|
8439
|
+
}
|
|
8440
|
+
}, tableProps.value, {
|
|
8471
8441
|
onRowClick: handleTableRowSelect,
|
|
8472
8442
|
onSelectionChange: handleSelectionChange
|
|
8473
|
-
}
|
|
8443
|
+
}), null, 16, [
|
|
8444
|
+
"columns",
|
|
8474
8445
|
"data",
|
|
8475
|
-
"loading"
|
|
8476
|
-
"columns"
|
|
8446
|
+
"loading"
|
|
8477
8447
|
])
|
|
8478
8448
|
], 4)
|
|
8479
8449
|
]),
|
|
@@ -8485,7 +8455,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
8485
8455
|
};
|
|
8486
8456
|
}
|
|
8487
8457
|
});
|
|
8488
|
-
const biz_unit_select_exports_ =
|
|
8458
|
+
const biz_unit_select_exports_ = biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true;
|
|
8489
8459
|
/* ESM default export */ const biz_unit_select = biz_unit_select_exports_;
|
|
8490
8460
|
/**
|
|
8491
8461
|
* [1-10154-1] 根据条件查询科室列表(平铺)
|