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/components/index.js
CHANGED
|
@@ -4750,523 +4750,6 @@ const default_exports_ = defaultvue_type_script_setup_true_lang_ts;
|
|
|
4750
4750
|
});
|
|
4751
4751
|
const pro_avatar_exports_ = pro_avatarvue_type_script_setup_true_lang_ts;
|
|
4752
4752
|
/* ESM default export */ const pro_avatar = pro_avatar_exports_;
|
|
4753
|
-
/**
|
|
4754
|
-
* [1-10473-1]根据条件查询标签分组V1(含标签)
|
|
4755
|
-
* @param params
|
|
4756
|
-
* @returns
|
|
4757
|
-
*/ const queryTagGroupByExampleV1 = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagGroupByExampleV1', params);
|
|
4758
|
-
/**
|
|
4759
|
-
* ]根据条件查询标签列表
|
|
4760
|
-
* @param params
|
|
4761
|
-
* @returns
|
|
4762
|
-
*/ const queryTagListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagListByExample', params);
|
|
4763
|
-
const BACKGROUND_COLOR = 'BACKGROUND_COLOR';
|
|
4764
|
-
const FONT_COLOR = 'FONT_COLOR';
|
|
4765
|
-
// 工具函数:将标签信息添加到映射中
|
|
4766
|
-
const addTagToMap = (map, tag)=>{
|
|
4767
|
-
map.set(tag.tagId, {
|
|
4768
|
-
tagNameDisplay: tag.tagNameDisplay,
|
|
4769
|
-
background: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === BACKGROUND_COLOR)?.cssValue || '',
|
|
4770
|
-
color: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === FONT_COLOR)?.cssValue || ''
|
|
4771
|
-
});
|
|
4772
|
-
};
|
|
4773
|
-
// 工具函数:将 modelValue 转换为数组
|
|
4774
|
-
const getModelValueArray = (value)=>{
|
|
4775
|
-
if (!value) return [];
|
|
4776
|
-
return Array.isArray(value) ? value : [
|
|
4777
|
-
value
|
|
4778
|
-
];
|
|
4779
|
-
};
|
|
4780
|
-
// 工具函数:创建标签映射
|
|
4781
|
-
const createTagsMap = (tableData, extraTagIds)=>{
|
|
4782
|
-
const map = new Map();
|
|
4783
|
-
// 处理分组标签
|
|
4784
|
-
tableData.forEach((group)=>{
|
|
4785
|
-
group.tagList.forEach((tag)=>{
|
|
4786
|
-
addTagToMap(map, tag);
|
|
4787
|
-
});
|
|
4788
|
-
});
|
|
4789
|
-
// 处理额外标签
|
|
4790
|
-
extraTagIds.forEach((tag)=>{
|
|
4791
|
-
addTagToMap(map, tag);
|
|
4792
|
-
});
|
|
4793
|
-
return map;
|
|
4794
|
-
};
|
|
4795
|
-
// 工具函数:获取选项样式
|
|
4796
|
-
const getOptionStyle = (tagId, selectList, allTagsMap)=>selectList.includes(tagId) ? {} : {
|
|
4797
|
-
background: allTagsMap.get(tagId)?.background,
|
|
4798
|
-
color: allTagsMap.get(tagId)?.color
|
|
4799
|
-
};
|
|
4800
|
-
// 工具函数:检查选项是否被禁用
|
|
4801
|
-
const isOptionDisabled = (tagId, selectList)=>selectList.includes(tagId);
|
|
4802
|
-
/* ESM default export */ const SelectDropdownvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
4803
|
-
__name: 'SelectDropdown',
|
|
4804
|
-
props: {
|
|
4805
|
-
modelValue: {},
|
|
4806
|
-
hasSelect: {},
|
|
4807
|
-
tableData: {},
|
|
4808
|
-
extraTagIds: {},
|
|
4809
|
-
allTagsMap: {},
|
|
4810
|
-
multiple: {
|
|
4811
|
-
type: Boolean
|
|
4812
|
-
},
|
|
4813
|
-
disabled: {
|
|
4814
|
-
type: Boolean
|
|
4815
|
-
},
|
|
4816
|
-
tagSize: {},
|
|
4817
|
-
placeholder: {}
|
|
4818
|
-
},
|
|
4819
|
-
emits: [
|
|
4820
|
-
'update:modelValue',
|
|
4821
|
-
'change',
|
|
4822
|
-
'blur'
|
|
4823
|
-
],
|
|
4824
|
-
setup (__props, { emit: __emit }) {
|
|
4825
|
-
const props = __props;
|
|
4826
|
-
const emit = __emit;
|
|
4827
|
-
const selectList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getModelValueArray(props.hasSelect));
|
|
4828
|
-
const selectClass = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.multiple ? 'w-60' : 'w-full');
|
|
4829
|
-
const innerValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)({
|
|
4830
|
-
get: ()=>props.modelValue,
|
|
4831
|
-
set: (val)=>emit('update:modelValue', val)
|
|
4832
|
-
});
|
|
4833
|
-
function handleChange(val) {
|
|
4834
|
-
emit('change', val);
|
|
4835
|
-
}
|
|
4836
|
-
function handleBlur(e) {
|
|
4837
|
-
emit('blur', e);
|
|
4838
|
-
}
|
|
4839
|
-
return (_ctx, _cache)=>{
|
|
4840
|
-
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
4841
|
-
const _component_el_option_group = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option-group");
|
|
4842
|
-
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
4843
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
4844
|
-
modelValue: innerValue.value,
|
|
4845
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>innerValue.value = $event),
|
|
4846
|
-
multiple: props.multiple ?? true,
|
|
4847
|
-
filterable: "",
|
|
4848
|
-
clearable: "",
|
|
4849
|
-
disabled: props.disabled ?? false,
|
|
4850
|
-
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(selectClass.value),
|
|
4851
|
-
placeholder: props.placeholder ?? '请选择',
|
|
4852
|
-
onChange: handleChange,
|
|
4853
|
-
onBlur: handleBlur,
|
|
4854
|
-
"collapse-tags": "",
|
|
4855
|
-
"collapse-tags-tooltip": ""
|
|
4856
|
-
}, {
|
|
4857
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
4858
|
-
((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, {
|
|
4859
|
-
key: item.tagId,
|
|
4860
|
-
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(getOptionStyle)(item.tagId, selectList.value, props.allTagsMap)),
|
|
4861
|
-
disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isOptionDisabled)(item.tagId, selectList.value),
|
|
4862
|
-
label: item.tagNameDisplay,
|
|
4863
|
-
value: item.tagId
|
|
4864
|
-
}, null, 8, [
|
|
4865
|
-
"style",
|
|
4866
|
-
"disabled",
|
|
4867
|
-
"label",
|
|
4868
|
-
"value"
|
|
4869
|
-
]))), 128)),
|
|
4870
|
-
((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, {
|
|
4871
|
-
key: group.tagGroupId,
|
|
4872
|
-
label: group.tagGroupNameDisplay,
|
|
4873
|
-
value: group.tagGroupId
|
|
4874
|
-
}, {
|
|
4875
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
4876
|
-
((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, {
|
|
4877
|
-
key: item.tagId,
|
|
4878
|
-
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(getOptionStyle)(item.tagId, selectList.value, props.allTagsMap)),
|
|
4879
|
-
disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isOptionDisabled)(item.tagId, selectList.value),
|
|
4880
|
-
label: item.tagNameDisplay,
|
|
4881
|
-
value: item.tagId
|
|
4882
|
-
}, null, 8, [
|
|
4883
|
-
"style",
|
|
4884
|
-
"disabled",
|
|
4885
|
-
"label",
|
|
4886
|
-
"value"
|
|
4887
|
-
]))), 128))
|
|
4888
|
-
]),
|
|
4889
|
-
_: 2
|
|
4890
|
-
}, 1032, [
|
|
4891
|
-
"label",
|
|
4892
|
-
"value"
|
|
4893
|
-
]))), 128))
|
|
4894
|
-
]),
|
|
4895
|
-
_: 1
|
|
4896
|
-
}, 8, [
|
|
4897
|
-
"modelValue",
|
|
4898
|
-
"multiple",
|
|
4899
|
-
"disabled",
|
|
4900
|
-
"class",
|
|
4901
|
-
"placeholder"
|
|
4902
|
-
]);
|
|
4903
|
-
};
|
|
4904
|
-
}
|
|
4905
|
-
});
|
|
4906
|
-
const SelectDropdown_exports_ = SelectDropdownvue_type_script_lang_ts_setup_true;
|
|
4907
|
-
/* ESM default export */ const SelectDropdown = SelectDropdown_exports_;
|
|
4908
|
-
const tag_selectvue_type_script_lang_ts_setup_true_hoisted_1 = {
|
|
4909
|
-
class: "flex flex-wrap gap-2"
|
|
4910
|
-
};
|
|
4911
|
-
const SELECT_WIDTH = 15; // rem
|
|
4912
|
-
const TAG_MARGIN = 1; // 1rem
|
|
4913
|
-
/* ESM default export */ const tag_selectvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
4914
|
-
__name: 'index',
|
|
4915
|
-
props: {
|
|
4916
|
-
bizIdTypeCode: {
|
|
4917
|
-
default: ''
|
|
4918
|
-
},
|
|
4919
|
-
bizId: {
|
|
4920
|
-
default: ''
|
|
4921
|
-
},
|
|
4922
|
-
class: {
|
|
4923
|
-
default: 'w-full'
|
|
4924
|
-
},
|
|
4925
|
-
queryExtra: {
|
|
4926
|
-
type: Boolean
|
|
4927
|
-
},
|
|
4928
|
-
tagList: {
|
|
4929
|
-
default: ()=>[]
|
|
4930
|
-
},
|
|
4931
|
-
disabled: {
|
|
4932
|
-
type: Boolean,
|
|
4933
|
-
default: false
|
|
4934
|
-
},
|
|
4935
|
-
multiple: {
|
|
4936
|
-
type: Boolean,
|
|
4937
|
-
default: true
|
|
4938
|
-
},
|
|
4939
|
-
tagSize: {
|
|
4940
|
-
default: 'large'
|
|
4941
|
-
}
|
|
4942
|
-
},
|
|
4943
|
-
emits: [
|
|
4944
|
-
'change'
|
|
4945
|
-
],
|
|
4946
|
-
setup (__props, { emit: __emit }) {
|
|
4947
|
-
const emit = __emit;
|
|
4948
|
-
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
4949
|
-
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
|
|
4950
|
-
const props = __props;
|
|
4951
|
-
const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tagList || []);
|
|
4952
|
-
const extraTagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
4953
|
-
const selectValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
|
|
4954
|
-
const selectVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
4955
|
-
const SelectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
4956
|
-
const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
4957
|
-
const moreButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
4958
|
-
const realMaxNum = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(2);
|
|
4959
|
-
// 计算rem到px的转换
|
|
4960
|
-
const getRemValue = (rem)=>rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
4961
|
-
// 常量定义
|
|
4962
|
-
const MORE_BUTTON_WIDTH = 5 + TAG_MARGIN; // rem
|
|
4963
|
-
// 计算所有标签的映射,方便通过tagId查找tagNameDisplay
|
|
4964
|
-
const allTagsMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>createTagsMap(tableData.value, extraTagIds.value));
|
|
4965
|
-
const calcMaxNum = (wrapperNode)=>{
|
|
4966
|
-
if (!wrapperNode || !attrs.modelValue) return;
|
|
4967
|
-
const modelValueArray = getModelValueArray(attrs.modelValue);
|
|
4968
|
-
if (!modelValueArray.length) {
|
|
4969
|
-
realMaxNum.value = 0;
|
|
4970
|
-
return;
|
|
4971
|
-
}
|
|
4972
|
-
// 计算每个标签的宽度
|
|
4973
|
-
const tagWidths = modelValueArray.map((item)=>{
|
|
4974
|
-
// 为每个标签创建独立的容器
|
|
4975
|
-
const tagContainer = document.createElement('div');
|
|
4976
|
-
tagContainer.style.position = 'absolute';
|
|
4977
|
-
tagContainer.style.visibility = 'hidden';
|
|
4978
|
-
document.body.appendChild(tagContainer);
|
|
4979
|
-
const vnode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
|
|
4980
|
-
closable: !props.disabled,
|
|
4981
|
-
size: props.tagSize,
|
|
4982
|
-
disableTransitions: true,
|
|
4983
|
-
class: 'mr-4'
|
|
4984
|
-
}, ()=>allTagsMap.value.get(item)?.tagNameDisplay || item);
|
|
4985
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(vnode, tagContainer);
|
|
4986
|
-
const width = tagContainer.firstElementChild?.getBoundingClientRect().width || 0;
|
|
4987
|
-
document.body.removeChild(tagContainer);
|
|
4988
|
-
return width + getRemValue(TAG_MARGIN);
|
|
4989
|
-
});
|
|
4990
|
-
// 计算可用宽度
|
|
4991
|
-
const availableWidth = wrapperNode.offsetWidth - (props.disabled ? 0 : getRemValue(SELECT_WIDTH));
|
|
4992
|
-
const totalWidth = tagWidths.reduce((sum, width)=>sum + width, 0);
|
|
4993
|
-
// 如果所有标签都能显示,直接显示所有标签
|
|
4994
|
-
if (totalWidth <= availableWidth) {
|
|
4995
|
-
realMaxNum.value = modelValueArray.length;
|
|
4996
|
-
return;
|
|
4997
|
-
}
|
|
4998
|
-
// 如果放不下所有标签,需要显示更多按钮
|
|
4999
|
-
const availableWidthWithMore = availableWidth - getRemValue(MORE_BUTTON_WIDTH);
|
|
5000
|
-
// 计算可以显示多少个标签
|
|
5001
|
-
let currentWidth = 0;
|
|
5002
|
-
let count = 0;
|
|
5003
|
-
for (const width of tagWidths)if (currentWidth + width <= availableWidthWithMore) {
|
|
5004
|
-
currentWidth += width;
|
|
5005
|
-
count++;
|
|
5006
|
-
} else break;
|
|
5007
|
-
realMaxNum.value = count;
|
|
5008
|
-
};
|
|
5009
|
-
// Methods
|
|
5010
|
-
const handleClose = (bizId)=>{
|
|
5011
|
-
const currentArray = getModelValueArray(attrs.modelValue);
|
|
5012
|
-
const newModelValue = currentArray.filter((id)=>id !== bizId);
|
|
5013
|
-
change(props.multiple ? newModelValue : newModelValue[0] || '');
|
|
5014
|
-
};
|
|
5015
|
-
const showSelect = ()=>{
|
|
5016
|
-
selectVisible.value = true;
|
|
5017
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
5018
|
-
SelectRef.value?.focus();
|
|
5019
|
-
});
|
|
5020
|
-
};
|
|
5021
|
-
const handleSelectConfirm = ()=>{
|
|
5022
|
-
if (!selectValue.value) {
|
|
5023
|
-
selectVisible.value = false;
|
|
5024
|
-
return;
|
|
5025
|
-
}
|
|
5026
|
-
const currentValues = getModelValueArray(attrs.modelValue);
|
|
5027
|
-
if (props.multiple) {
|
|
5028
|
-
change([
|
|
5029
|
-
...currentValues,
|
|
5030
|
-
...Array.isArray(selectValue.value) ? selectValue.value : [
|
|
5031
|
-
selectValue.value
|
|
5032
|
-
]
|
|
5033
|
-
]);
|
|
5034
|
-
selectValue.value = [];
|
|
5035
|
-
} else {
|
|
5036
|
-
change([
|
|
5037
|
-
...currentValues,
|
|
5038
|
-
selectValue.value
|
|
5039
|
-
]);
|
|
5040
|
-
selectValue.value = '';
|
|
5041
|
-
}
|
|
5042
|
-
selectVisible.value = false;
|
|
5043
|
-
};
|
|
5044
|
-
async function fetchData() {
|
|
5045
|
-
if (!props.bizIdTypeCode) return;
|
|
5046
|
-
loading.value = true;
|
|
5047
|
-
let [, result] = await queryTagGroupByExampleV1({
|
|
5048
|
-
bizIdTypeCode: props.bizIdTypeCode,
|
|
5049
|
-
bizId: props.bizId,
|
|
5050
|
-
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
|
|
5051
|
-
});
|
|
5052
|
-
loading.value = false;
|
|
5053
|
-
if (result?.success) {
|
|
5054
|
-
tableData.value = result.data;
|
|
5055
|
-
if (props.queryExtra) fetchExtraTag();
|
|
5056
|
-
calcMaxNum(containerRef.value);
|
|
5057
|
-
}
|
|
5058
|
-
}
|
|
5059
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
5060
|
-
fetchData();
|
|
5061
|
-
// 等待所有标签渲染完成
|
|
5062
|
-
});
|
|
5063
|
-
async function fetchExtraTag() {
|
|
5064
|
-
const modelValueArray = getModelValueArray(attrs.modelValue);
|
|
5065
|
-
if (modelValueArray.length) {
|
|
5066
|
-
let otherTagIds = modelValueArray.filter((item)=>!allTagsMap.value.get(item));
|
|
5067
|
-
if (otherTagIds.length) {
|
|
5068
|
-
let [, result] = await queryTagListByExample({
|
|
5069
|
-
tagIds: otherTagIds
|
|
5070
|
-
});
|
|
5071
|
-
if (result?.success) extraTagIds.value = result.data;
|
|
5072
|
-
}
|
|
5073
|
-
}
|
|
5074
|
-
}
|
|
5075
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs.modelValue, ()=>{
|
|
5076
|
-
if (props.queryExtra && !loading.value) fetchExtraTag();
|
|
5077
|
-
if (!props.multiple) {
|
|
5078
|
-
selectValue.value = attrs?.modelValue || '';
|
|
5079
|
-
return;
|
|
5080
|
-
}
|
|
5081
|
-
const modelValueArray = getModelValueArray(attrs.modelValue);
|
|
5082
|
-
if (modelValueArray.length) // 等待所有标签渲染完成
|
|
5083
|
-
{
|
|
5084
|
-
if (containerRef.value) calcMaxNum(containerRef.value);
|
|
5085
|
-
}
|
|
5086
|
-
}, {
|
|
5087
|
-
immediate: true
|
|
5088
|
-
});
|
|
5089
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.tagList, ()=>{
|
|
5090
|
-
tableData.value = props.tagList || [];
|
|
5091
|
-
});
|
|
5092
|
-
/**
|
|
5093
|
-
*
|
|
5094
|
-
* @param value 下拉框选择
|
|
5095
|
-
*/ function change(value) {
|
|
5096
|
-
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
5097
|
-
emit('change', value);
|
|
5098
|
-
}
|
|
5099
|
-
// 计算当前显示的标签数组
|
|
5100
|
-
const currentTagsArray = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getModelValueArray(attrs.modelValue));
|
|
5101
|
-
return (_ctx, _cache)=>{
|
|
5102
|
-
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
5103
|
-
const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
|
|
5104
|
-
const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
|
|
5105
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
5106
|
-
ref_key: "containerRef",
|
|
5107
|
-
ref: containerRef,
|
|
5108
|
-
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(props.class)
|
|
5109
|
-
}, [
|
|
5110
|
-
props.multiple ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
5111
|
-
key: 0
|
|
5112
|
-
}, [
|
|
5113
|
-
((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), {
|
|
5114
|
-
key: item,
|
|
5115
|
-
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
5116
|
-
background: allTagsMap.value.get(item)?.background,
|
|
5117
|
-
color: allTagsMap.value.get(item)?.color,
|
|
5118
|
-
borderColor: allTagsMap.value.get(item)?.color,
|
|
5119
|
-
'--el-tag-text-color': allTagsMap.value.get(item)?.color,
|
|
5120
|
-
'--el-tag-hover-color': allTagsMap.value.get(item)?.color
|
|
5121
|
-
}),
|
|
5122
|
-
closable: !props.disabled,
|
|
5123
|
-
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
5124
|
-
'mr-4'
|
|
5125
|
-
]),
|
|
5126
|
-
size: props.tagSize,
|
|
5127
|
-
"disable-transitions": true,
|
|
5128
|
-
onClose: ($event)=>handleClose(item)
|
|
5129
|
-
}, {
|
|
5130
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5131
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
|
|
5132
|
-
]),
|
|
5133
|
-
_: 2
|
|
5134
|
-
}, 1032, [
|
|
5135
|
-
"style",
|
|
5136
|
-
"closable",
|
|
5137
|
-
"size",
|
|
5138
|
-
"onClose"
|
|
5139
|
-
]))), 128)),
|
|
5140
|
-
currentTagsArray.value.length > realMaxNum.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_popover, {
|
|
5141
|
-
key: 0,
|
|
5142
|
-
placement: "bottom",
|
|
5143
|
-
trigger: "hover"
|
|
5144
|
-
}, {
|
|
5145
|
-
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5146
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
|
|
5147
|
-
ref_key: "moreButtonRef",
|
|
5148
|
-
ref: moreButtonRef,
|
|
5149
|
-
style: {
|
|
5150
|
-
"margin-left": "0"
|
|
5151
|
-
},
|
|
5152
|
-
class: "mr-4"
|
|
5153
|
-
}, {
|
|
5154
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5155
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("更多 +" + (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(currentTagsArray.value.length - realMaxNum.value), 1)
|
|
5156
|
-
]),
|
|
5157
|
-
_: 1
|
|
5158
|
-
}, 512)
|
|
5159
|
-
]),
|
|
5160
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5161
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", tag_selectvue_type_script_lang_ts_setup_true_hoisted_1, [
|
|
5162
|
-
((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), {
|
|
5163
|
-
key: item,
|
|
5164
|
-
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
5165
|
-
background: allTagsMap.value.get(item)?.background,
|
|
5166
|
-
color: allTagsMap.value.get(item)?.color,
|
|
5167
|
-
borderColor: allTagsMap.value.get(item)?.color,
|
|
5168
|
-
'--el-tag-text-color': allTagsMap.value.get(item)?.color,
|
|
5169
|
-
'--el-tag-hover-color': allTagsMap.value.get(item)?.color
|
|
5170
|
-
}),
|
|
5171
|
-
closable: !props.disabled,
|
|
5172
|
-
size: props.tagSize,
|
|
5173
|
-
"disable-transitions": true,
|
|
5174
|
-
onClose: ($event)=>handleClose(item)
|
|
5175
|
-
}, {
|
|
5176
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5177
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
|
|
5178
|
-
]),
|
|
5179
|
-
_: 2
|
|
5180
|
-
}, 1032, [
|
|
5181
|
-
"style",
|
|
5182
|
-
"closable",
|
|
5183
|
-
"size",
|
|
5184
|
-
"onClose"
|
|
5185
|
-
]))), 128))
|
|
5186
|
-
])
|
|
5187
|
-
]),
|
|
5188
|
-
_: 1
|
|
5189
|
-
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
5190
|
-
selectVisible.value && !props.disabled ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
|
|
5191
|
-
key: 1,
|
|
5192
|
-
modelValue: selectValue.value,
|
|
5193
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectValue.value = $event),
|
|
5194
|
-
"table-data": tableData.value,
|
|
5195
|
-
extraTagIds: extraTagIds.value,
|
|
5196
|
-
"all-tags-map": allTagsMap.value,
|
|
5197
|
-
multiple: true,
|
|
5198
|
-
disabled: props.disabled,
|
|
5199
|
-
"tag-size": props.tagSize,
|
|
5200
|
-
"has-select": currentTagsArray.value,
|
|
5201
|
-
placeholder: "请选择",
|
|
5202
|
-
onChange: _cache[1] || (_cache[1] = ()=>{
|
|
5203
|
-
if (!props.multiple) handleSelectConfirm();
|
|
5204
|
-
}),
|
|
5205
|
-
onBlur: handleSelectConfirm
|
|
5206
|
-
}, null, 8, [
|
|
5207
|
-
"modelValue",
|
|
5208
|
-
"table-data",
|
|
5209
|
-
"extraTagIds",
|
|
5210
|
-
"all-tags-map",
|
|
5211
|
-
"disabled",
|
|
5212
|
-
"tag-size",
|
|
5213
|
-
"has-select"
|
|
5214
|
-
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
5215
|
-
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, {
|
|
5216
|
-
key: 2,
|
|
5217
|
-
style: {
|
|
5218
|
-
"margin-left": "0"
|
|
5219
|
-
},
|
|
5220
|
-
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
5221
|
-
"!border-primary",
|
|
5222
|
-
{
|
|
5223
|
-
'pointer-events-none': props.disabled
|
|
5224
|
-
}
|
|
5225
|
-
]),
|
|
5226
|
-
onClick: showSelect
|
|
5227
|
-
}, {
|
|
5228
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5229
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_icon, null, {
|
|
5230
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5231
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.Plus), {
|
|
5232
|
-
class: "text-primary"
|
|
5233
|
-
})
|
|
5234
|
-
]),
|
|
5235
|
-
_: 1
|
|
5236
|
-
})
|
|
5237
|
-
]),
|
|
5238
|
-
_: 1
|
|
5239
|
-
}, 8, [
|
|
5240
|
-
"class"
|
|
5241
|
-
]))
|
|
5242
|
-
], 64)) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
|
|
5243
|
-
key: 1,
|
|
5244
|
-
modelValue: selectValue.value,
|
|
5245
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>selectValue.value = $event),
|
|
5246
|
-
"table-data": tableData.value,
|
|
5247
|
-
extraTagIds: extraTagIds.value,
|
|
5248
|
-
"all-tags-map": allTagsMap.value,
|
|
5249
|
-
multiple: false,
|
|
5250
|
-
disabled: props.disabled,
|
|
5251
|
-
"tag-size": props.tagSize,
|
|
5252
|
-
placeholder: "请选择标签",
|
|
5253
|
-
"has-select": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue,
|
|
5254
|
-
onChange: change
|
|
5255
|
-
}, null, 8, [
|
|
5256
|
-
"modelValue",
|
|
5257
|
-
"table-data",
|
|
5258
|
-
"extraTagIds",
|
|
5259
|
-
"all-tags-map",
|
|
5260
|
-
"disabled",
|
|
5261
|
-
"tag-size",
|
|
5262
|
-
"has-select"
|
|
5263
|
-
]))
|
|
5264
|
-
], 2);
|
|
5265
|
-
};
|
|
5266
|
-
}
|
|
5267
|
-
});
|
|
5268
|
-
const tag_select_exports_ = tag_selectvue_type_script_lang_ts_setup_true;
|
|
5269
|
-
/* ESM default export */ const tag_select = tag_select_exports_;
|
|
5270
4753
|
const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1 = {
|
|
5271
4754
|
class: "border-r border-[#C9C9C9] pr-5 mr-5"
|
|
5272
4755
|
};
|
|
@@ -5303,7 +4786,7 @@ const _hoisted_11 = {
|
|
|
5303
4786
|
class: "w-full flex"
|
|
5304
4787
|
};
|
|
5305
4788
|
const _hoisted_12 = {
|
|
5306
|
-
class: "text-[#555]"
|
|
4789
|
+
class: "el-text text-[#555]"
|
|
5307
4790
|
};
|
|
5308
4791
|
const _hoisted_13 = {
|
|
5309
4792
|
class: "flex flex-1"
|
|
@@ -5317,21 +4800,10 @@ const _hoisted_15 = {
|
|
|
5317
4800
|
const _hoisted_16 = {
|
|
5318
4801
|
class: "w-full text-[#555]"
|
|
5319
4802
|
};
|
|
5320
|
-
const _hoisted_17 = {
|
|
5321
|
-
class: "w-full flex"
|
|
5322
|
-
};
|
|
5323
|
-
const _hoisted_18 = {
|
|
5324
|
-
class: "el-text text-[#555]"
|
|
5325
|
-
};
|
|
5326
|
-
const _hoisted_19 = {
|
|
5327
|
-
class: "flex flex-1"
|
|
5328
|
-
};
|
|
5329
|
-
const _hoisted_20 = {
|
|
5330
|
-
key: 1
|
|
5331
|
-
};
|
|
5332
4803
|
// import DefaultPatient from "../patient-access/images/default_patient.vue";
|
|
5333
4804
|
// import ManPatient from "../patient-access/images/man_patient.vue";
|
|
5334
4805
|
// import WomanPatient from "../patient-access/images/women_patient.vue";
|
|
4806
|
+
// import TagSelect from "../biz-select/tag-select/index.vue";
|
|
5335
4807
|
const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
5336
4808
|
/* ESM default export */ const BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5337
4809
|
__name: 'BannerInfo',
|
|
@@ -5462,6 +4934,7 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5462
4934
|
// 提取业务标签ID(bizTagFlag === 1)
|
|
5463
4935
|
extractBizTagIds(res?.data?.bannerItemList ?? []);
|
|
5464
4936
|
// 保留 displayFlag === 1 或 bizTagFlag === 1 的项用于显示
|
|
4937
|
+
// 如果同时 bizTagFlag === 1 和 displayFlag === 1,bizTagFlag 优先级更高,会按照标签形式显示
|
|
5465
4938
|
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);
|
|
5466
4939
|
setBizId({
|
|
5467
4940
|
personId: res.data?.personId || "",
|
|
@@ -5575,7 +5048,8 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5575
5048
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
5576
5049
|
"min-h-6",
|
|
5577
5050
|
{
|
|
5578
|
-
|
|
5051
|
+
'col-span-full': item.bizTagFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG).YES,
|
|
5052
|
+
[`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
|
|
5579
5053
|
}
|
|
5580
5054
|
])
|
|
5581
5055
|
}, [
|
|
@@ -5659,32 +5133,7 @@ const PERSON = "PERSON"; //应该放到BIZ_ID_TYPE_CODE这个里面
|
|
|
5659
5133
|
"content"
|
|
5660
5134
|
])
|
|
5661
5135
|
], 32))
|
|
5662
|
-
], 2))), 128))
|
|
5663
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", {
|
|
5664
|
-
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
5665
|
-
"min-h-6",
|
|
5666
|
-
{
|
|
5667
|
-
[`col-span-${Number(layoutColumns.value)}`]: true
|
|
5668
|
-
}
|
|
5669
|
-
])
|
|
5670
|
-
}, [
|
|
5671
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", _hoisted_17, [
|
|
5672
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_18, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode) === PERSON ? "患者标签:" : "就诊标签:"), 1),
|
|
5673
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", _hoisted_19, [
|
|
5674
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode) && tagIds.value.length ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(tag_select, {
|
|
5675
|
-
key: 0,
|
|
5676
|
-
modelValue: tagIds.value,
|
|
5677
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>tagIds.value = $event),
|
|
5678
|
-
tagSize: "default",
|
|
5679
|
-
bizIdTypeCode: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tagBizIdTypeCode),
|
|
5680
|
-
disabled: true
|
|
5681
|
-
}, null, 8, [
|
|
5682
|
-
"modelValue",
|
|
5683
|
-
"bizIdTypeCode"
|
|
5684
|
-
])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", _hoisted_20, "--"))
|
|
5685
|
-
])
|
|
5686
|
-
])
|
|
5687
|
-
], 2)
|
|
5136
|
+
], 2))), 128))
|
|
5688
5137
|
], 2)
|
|
5689
5138
|
], 6)), [
|
|
5690
5139
|
[
|
|
@@ -7099,108 +6548,625 @@ const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_sel
|
|
|
7099
6548
|
]),
|
|
7100
6549
|
_: 1
|
|
7101
6550
|
}, 8, [
|
|
7102
|
-
"modelValue"
|
|
6551
|
+
"modelValue"
|
|
6552
|
+
]);
|
|
6553
|
+
};
|
|
6554
|
+
}
|
|
6555
|
+
});
|
|
6556
|
+
const flag_select_exports_ = flag_selectvue_type_script_setup_true_lang_ts_name_FlagSelect;
|
|
6557
|
+
/* ESM default export */ const flag_select = flag_select_exports_;
|
|
6558
|
+
const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect_hoisted_1 = {
|
|
6559
|
+
key: 0,
|
|
6560
|
+
class: "truncate"
|
|
6561
|
+
};
|
|
6562
|
+
const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect_hoisted_2 = {
|
|
6563
|
+
key: 1
|
|
6564
|
+
};
|
|
6565
|
+
/* ESM default export */ const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
6566
|
+
__name: 'index',
|
|
6567
|
+
emits: [
|
|
6568
|
+
"change"
|
|
6569
|
+
],
|
|
6570
|
+
setup (__props, { emit: __emit }) {
|
|
6571
|
+
const { currentOrg, hospitalList } = use_app_config([
|
|
6572
|
+
use_app_config_MAIN_APP_CONFIG.CURRENT_ORG,
|
|
6573
|
+
use_app_config_MAIN_APP_CONFIG.HOSPITAL_LIST
|
|
6574
|
+
]);
|
|
6575
|
+
const selectedHospitalName = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
6576
|
+
const selectedId = attrs.modelValue || attrs.hospitalId;
|
|
6577
|
+
if (!selectedId) return "";
|
|
6578
|
+
const selectedHospital = hospitalList?.find((item)=>item.orgId === selectedId);
|
|
6579
|
+
return selectedHospital?.orgName || "";
|
|
6580
|
+
});
|
|
6581
|
+
const isDisabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL);
|
|
6582
|
+
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
6583
|
+
const emit = __emit; /**
|
|
6584
|
+
*
|
|
6585
|
+
* @param value 下拉框选择
|
|
6586
|
+
*/
|
|
6587
|
+
function change(value) {
|
|
6588
|
+
if (attrs["onUpdate:modelValue"]) attrs["onUpdate:modelValue"](value);
|
|
6589
|
+
emit("change", value);
|
|
6590
|
+
}
|
|
6591
|
+
let stopWatch; /** 主动触发change */
|
|
6592
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
6593
|
+
stopWatch = (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>currentOrg?.orgId, ()=>{
|
|
6594
|
+
if (attrs?.modelValue) change(attrs.modelValue);
|
|
6595
|
+
else {
|
|
6596
|
+
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;
|
|
6597
|
+
if (void 0 !== id) change(id);
|
|
6598
|
+
}
|
|
6599
|
+
}, {
|
|
6600
|
+
immediate: true
|
|
6601
|
+
});
|
|
6602
|
+
});
|
|
6603
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
6604
|
+
if (stopWatch) stopWatch();
|
|
6605
|
+
});
|
|
6606
|
+
return (_ctx, _cache)=>{
|
|
6607
|
+
const _component_el_tooltip = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-tooltip");
|
|
6608
|
+
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
6609
|
+
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
6610
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
6611
|
+
onChange: change,
|
|
6612
|
+
placeholder: "Select",
|
|
6613
|
+
disabled: isDisabled.value,
|
|
6614
|
+
style: {
|
|
6615
|
+
width: "250px"
|
|
6616
|
+
}
|
|
6617
|
+
}, {
|
|
6618
|
+
label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6619
|
+
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, [
|
|
6620
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_tooltip, {
|
|
6621
|
+
effect: "dark",
|
|
6622
|
+
content: selectedHospitalName.value,
|
|
6623
|
+
placement: "bottom-start"
|
|
6624
|
+
}, {
|
|
6625
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6626
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(selectedHospitalName.value), 1)
|
|
6627
|
+
]),
|
|
6628
|
+
_: 1
|
|
6629
|
+
}, 8, [
|
|
6630
|
+
"content"
|
|
6631
|
+
])
|
|
6632
|
+
])) : 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)
|
|
6633
|
+
]),
|
|
6634
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6635
|
+
((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, {
|
|
6636
|
+
key: item.orgId,
|
|
6637
|
+
label: item.orgName,
|
|
6638
|
+
value: item.orgId
|
|
6639
|
+
}, null, 8, [
|
|
6640
|
+
"label",
|
|
6641
|
+
"value"
|
|
6642
|
+
]))), 128))
|
|
6643
|
+
]),
|
|
6644
|
+
_: 1
|
|
6645
|
+
}, 8, [
|
|
6646
|
+
"disabled"
|
|
6647
|
+
]);
|
|
6648
|
+
};
|
|
6649
|
+
}
|
|
6650
|
+
});
|
|
6651
|
+
const hospital_select_exports_ = hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect;
|
|
6652
|
+
/* ESM default export */ const hospital_select = hospital_select_exports_;
|
|
6653
|
+
/**
|
|
6654
|
+
* [1-10473-1]根据条件查询标签分组V1(含标签)
|
|
6655
|
+
* @param params
|
|
6656
|
+
* @returns
|
|
6657
|
+
*/ const queryTagGroupByExampleV1 = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagGroupByExampleV1', params);
|
|
6658
|
+
/**
|
|
6659
|
+
* ]根据条件查询标签列表
|
|
6660
|
+
* @param params
|
|
6661
|
+
* @returns
|
|
6662
|
+
*/ const queryTagListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/tag/queryTagListByExample', params);
|
|
6663
|
+
const BACKGROUND_COLOR = 'BACKGROUND_COLOR';
|
|
6664
|
+
const FONT_COLOR = 'FONT_COLOR';
|
|
6665
|
+
// 工具函数:将标签信息添加到映射中
|
|
6666
|
+
const addTagToMap = (map, tag)=>{
|
|
6667
|
+
map.set(tag.tagId, {
|
|
6668
|
+
tagNameDisplay: tag.tagNameDisplay,
|
|
6669
|
+
background: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === BACKGROUND_COLOR)?.cssValue || '',
|
|
6670
|
+
color: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === FONT_COLOR)?.cssValue || ''
|
|
6671
|
+
});
|
|
6672
|
+
};
|
|
6673
|
+
// 工具函数:将 modelValue 转换为数组
|
|
6674
|
+
const getModelValueArray = (value)=>{
|
|
6675
|
+
if (!value) return [];
|
|
6676
|
+
return Array.isArray(value) ? value : [
|
|
6677
|
+
value
|
|
6678
|
+
];
|
|
6679
|
+
};
|
|
6680
|
+
// 工具函数:创建标签映射
|
|
6681
|
+
const createTagsMap = (tableData, extraTagIds)=>{
|
|
6682
|
+
const map = new Map();
|
|
6683
|
+
// 处理分组标签
|
|
6684
|
+
tableData.forEach((group)=>{
|
|
6685
|
+
group.tagList.forEach((tag)=>{
|
|
6686
|
+
addTagToMap(map, tag);
|
|
6687
|
+
});
|
|
6688
|
+
});
|
|
6689
|
+
// 处理额外标签
|
|
6690
|
+
extraTagIds.forEach((tag)=>{
|
|
6691
|
+
addTagToMap(map, tag);
|
|
6692
|
+
});
|
|
6693
|
+
return map;
|
|
6694
|
+
};
|
|
6695
|
+
// 工具函数:获取选项样式
|
|
6696
|
+
const getOptionStyle = (tagId, selectList, allTagsMap)=>selectList.includes(tagId) ? {} : {
|
|
6697
|
+
background: allTagsMap.get(tagId)?.background,
|
|
6698
|
+
color: allTagsMap.get(tagId)?.color
|
|
6699
|
+
};
|
|
6700
|
+
// 工具函数:检查选项是否被禁用
|
|
6701
|
+
const isOptionDisabled = (tagId, selectList)=>selectList.includes(tagId);
|
|
6702
|
+
/* ESM default export */ const SelectDropdownvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
6703
|
+
__name: 'SelectDropdown',
|
|
6704
|
+
props: {
|
|
6705
|
+
modelValue: {},
|
|
6706
|
+
hasSelect: {},
|
|
6707
|
+
tableData: {},
|
|
6708
|
+
extraTagIds: {},
|
|
6709
|
+
allTagsMap: {},
|
|
6710
|
+
multiple: {
|
|
6711
|
+
type: Boolean
|
|
6712
|
+
},
|
|
6713
|
+
disabled: {
|
|
6714
|
+
type: Boolean
|
|
6715
|
+
},
|
|
6716
|
+
tagSize: {},
|
|
6717
|
+
placeholder: {}
|
|
6718
|
+
},
|
|
6719
|
+
emits: [
|
|
6720
|
+
'update:modelValue',
|
|
6721
|
+
'change',
|
|
6722
|
+
'blur'
|
|
6723
|
+
],
|
|
6724
|
+
setup (__props, { emit: __emit }) {
|
|
6725
|
+
const props = __props;
|
|
6726
|
+
const emit = __emit;
|
|
6727
|
+
const selectList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getModelValueArray(props.hasSelect));
|
|
6728
|
+
const selectClass = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.multiple ? 'w-60' : 'w-full');
|
|
6729
|
+
const innerValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)({
|
|
6730
|
+
get: ()=>props.modelValue,
|
|
6731
|
+
set: (val)=>emit('update:modelValue', val)
|
|
6732
|
+
});
|
|
6733
|
+
function handleChange(val) {
|
|
6734
|
+
emit('change', val);
|
|
6735
|
+
}
|
|
6736
|
+
function handleBlur(e) {
|
|
6737
|
+
emit('blur', e);
|
|
6738
|
+
}
|
|
6739
|
+
return (_ctx, _cache)=>{
|
|
6740
|
+
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
6741
|
+
const _component_el_option_group = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option-group");
|
|
6742
|
+
const _component_el_select = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-select");
|
|
6743
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_select, {
|
|
6744
|
+
modelValue: innerValue.value,
|
|
6745
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>innerValue.value = $event),
|
|
6746
|
+
multiple: props.multiple ?? true,
|
|
6747
|
+
filterable: "",
|
|
6748
|
+
clearable: "",
|
|
6749
|
+
disabled: props.disabled ?? false,
|
|
6750
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(selectClass.value),
|
|
6751
|
+
placeholder: props.placeholder ?? '请选择',
|
|
6752
|
+
onChange: handleChange,
|
|
6753
|
+
onBlur: handleBlur,
|
|
6754
|
+
"collapse-tags": "",
|
|
6755
|
+
"collapse-tags-tooltip": ""
|
|
6756
|
+
}, {
|
|
6757
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6758
|
+
((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, {
|
|
6759
|
+
key: item.tagId,
|
|
6760
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(getOptionStyle)(item.tagId, selectList.value, props.allTagsMap)),
|
|
6761
|
+
disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isOptionDisabled)(item.tagId, selectList.value),
|
|
6762
|
+
label: item.tagNameDisplay,
|
|
6763
|
+
value: item.tagId
|
|
6764
|
+
}, null, 8, [
|
|
6765
|
+
"style",
|
|
6766
|
+
"disabled",
|
|
6767
|
+
"label",
|
|
6768
|
+
"value"
|
|
6769
|
+
]))), 128)),
|
|
6770
|
+
((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, {
|
|
6771
|
+
key: group.tagGroupId,
|
|
6772
|
+
label: group.tagGroupNameDisplay,
|
|
6773
|
+
value: group.tagGroupId
|
|
6774
|
+
}, {
|
|
6775
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6776
|
+
((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, {
|
|
6777
|
+
key: item.tagId,
|
|
6778
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(getOptionStyle)(item.tagId, selectList.value, props.allTagsMap)),
|
|
6779
|
+
disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isOptionDisabled)(item.tagId, selectList.value),
|
|
6780
|
+
label: item.tagNameDisplay,
|
|
6781
|
+
value: item.tagId
|
|
6782
|
+
}, null, 8, [
|
|
6783
|
+
"style",
|
|
6784
|
+
"disabled",
|
|
6785
|
+
"label",
|
|
6786
|
+
"value"
|
|
6787
|
+
]))), 128))
|
|
6788
|
+
]),
|
|
6789
|
+
_: 2
|
|
6790
|
+
}, 1032, [
|
|
6791
|
+
"label",
|
|
6792
|
+
"value"
|
|
6793
|
+
]))), 128))
|
|
6794
|
+
]),
|
|
6795
|
+
_: 1
|
|
6796
|
+
}, 8, [
|
|
6797
|
+
"modelValue",
|
|
6798
|
+
"multiple",
|
|
6799
|
+
"disabled",
|
|
6800
|
+
"class",
|
|
6801
|
+
"placeholder"
|
|
7103
6802
|
]);
|
|
7104
6803
|
};
|
|
7105
6804
|
}
|
|
7106
6805
|
});
|
|
7107
|
-
const
|
|
7108
|
-
/* ESM default export */ const
|
|
7109
|
-
const
|
|
7110
|
-
|
|
7111
|
-
class: "truncate"
|
|
7112
|
-
};
|
|
7113
|
-
const hospital_selectvue_type_script_setup_true_lang_tsx_name_HospitalSelect_hoisted_2 = {
|
|
7114
|
-
key: 1
|
|
6806
|
+
const SelectDropdown_exports_ = SelectDropdownvue_type_script_lang_ts_setup_true;
|
|
6807
|
+
/* ESM default export */ const SelectDropdown = SelectDropdown_exports_;
|
|
6808
|
+
const tag_selectvue_type_script_lang_ts_setup_true_hoisted_1 = {
|
|
6809
|
+
class: "flex flex-wrap gap-2"
|
|
7115
6810
|
};
|
|
7116
|
-
|
|
6811
|
+
const SELECT_WIDTH = 15; // rem
|
|
6812
|
+
const TAG_MARGIN = 1; // 1rem
|
|
6813
|
+
/* ESM default export */ const tag_selectvue_type_script_lang_ts_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
7117
6814
|
__name: 'index',
|
|
6815
|
+
props: {
|
|
6816
|
+
bizIdTypeCode: {
|
|
6817
|
+
default: ''
|
|
6818
|
+
},
|
|
6819
|
+
bizId: {
|
|
6820
|
+
default: ''
|
|
6821
|
+
},
|
|
6822
|
+
class: {
|
|
6823
|
+
default: 'w-full'
|
|
6824
|
+
},
|
|
6825
|
+
queryExtra: {
|
|
6826
|
+
type: Boolean
|
|
6827
|
+
},
|
|
6828
|
+
tagList: {
|
|
6829
|
+
default: ()=>[]
|
|
6830
|
+
},
|
|
6831
|
+
disabled: {
|
|
6832
|
+
type: Boolean,
|
|
6833
|
+
default: false
|
|
6834
|
+
},
|
|
6835
|
+
multiple: {
|
|
6836
|
+
type: Boolean,
|
|
6837
|
+
default: true
|
|
6838
|
+
},
|
|
6839
|
+
tagSize: {
|
|
6840
|
+
default: 'large'
|
|
6841
|
+
}
|
|
6842
|
+
},
|
|
7118
6843
|
emits: [
|
|
7119
|
-
|
|
6844
|
+
'change'
|
|
7120
6845
|
],
|
|
7121
6846
|
setup (__props, { emit: __emit }) {
|
|
7122
|
-
const
|
|
7123
|
-
use_app_config_MAIN_APP_CONFIG.CURRENT_ORG,
|
|
7124
|
-
use_app_config_MAIN_APP_CONFIG.HOSPITAL_LIST
|
|
7125
|
-
]);
|
|
7126
|
-
const selectedHospitalName = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
7127
|
-
const selectedId = attrs.modelValue || attrs.hospitalId;
|
|
7128
|
-
if (!selectedId) return "";
|
|
7129
|
-
const selectedHospital = hospitalList?.find((item)=>item.orgId === selectedId);
|
|
7130
|
-
return selectedHospital?.orgName || "";
|
|
7131
|
-
});
|
|
7132
|
-
const isDisabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>currentOrg?.orgTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.HOSPITAL);
|
|
6847
|
+
const emit = __emit;
|
|
7133
6848
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
7134
|
-
const
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
6849
|
+
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
|
|
6850
|
+
const props = __props;
|
|
6851
|
+
const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tagList || []);
|
|
6852
|
+
const extraTagIds = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
6853
|
+
const selectValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
|
|
6854
|
+
const selectVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
6855
|
+
const SelectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
6856
|
+
const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
6857
|
+
const moreButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
6858
|
+
const realMaxNum = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(2);
|
|
6859
|
+
// 计算rem到px的转换
|
|
6860
|
+
const getRemValue = (rem)=>rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
6861
|
+
// 常量定义
|
|
6862
|
+
const MORE_BUTTON_WIDTH = 5 + TAG_MARGIN; // rem
|
|
6863
|
+
// 计算所有标签的映射,方便通过tagId查找tagNameDisplay
|
|
6864
|
+
const allTagsMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>createTagsMap(tableData.value, extraTagIds.value));
|
|
6865
|
+
const calcMaxNum = (wrapperNode)=>{
|
|
6866
|
+
if (!wrapperNode || !attrs.modelValue) return;
|
|
6867
|
+
const modelValueArray = getModelValueArray(attrs.modelValue);
|
|
6868
|
+
if (!modelValueArray.length) {
|
|
6869
|
+
realMaxNum.value = 0;
|
|
6870
|
+
return;
|
|
6871
|
+
}
|
|
6872
|
+
// 计算每个标签的宽度
|
|
6873
|
+
const tagWidths = modelValueArray.map((item)=>{
|
|
6874
|
+
// 为每个标签创建独立的容器
|
|
6875
|
+
const tagContainer = document.createElement('div');
|
|
6876
|
+
tagContainer.style.position = 'absolute';
|
|
6877
|
+
tagContainer.style.visibility = 'hidden';
|
|
6878
|
+
document.body.appendChild(tagContainer);
|
|
6879
|
+
const vnode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
|
|
6880
|
+
closable: !props.disabled,
|
|
6881
|
+
size: props.tagSize,
|
|
6882
|
+
disableTransitions: true,
|
|
6883
|
+
class: 'mr-4'
|
|
6884
|
+
}, ()=>allTagsMap.value.get(item)?.tagNameDisplay || item);
|
|
6885
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(vnode, tagContainer);
|
|
6886
|
+
const width = tagContainer.firstElementChild?.getBoundingClientRect().width || 0;
|
|
6887
|
+
document.body.removeChild(tagContainer);
|
|
6888
|
+
return width + getRemValue(TAG_MARGIN);
|
|
6889
|
+
});
|
|
6890
|
+
// 计算可用宽度
|
|
6891
|
+
const availableWidth = wrapperNode.offsetWidth - (props.disabled ? 0 : getRemValue(SELECT_WIDTH));
|
|
6892
|
+
const totalWidth = tagWidths.reduce((sum, width)=>sum + width, 0);
|
|
6893
|
+
// 如果所有标签都能显示,直接显示所有标签
|
|
6894
|
+
if (totalWidth <= availableWidth) {
|
|
6895
|
+
realMaxNum.value = modelValueArray.length;
|
|
6896
|
+
return;
|
|
6897
|
+
}
|
|
6898
|
+
// 如果放不下所有标签,需要显示更多按钮
|
|
6899
|
+
const availableWidthWithMore = availableWidth - getRemValue(MORE_BUTTON_WIDTH);
|
|
6900
|
+
// 计算可以显示多少个标签
|
|
6901
|
+
let currentWidth = 0;
|
|
6902
|
+
let count = 0;
|
|
6903
|
+
for (const width of tagWidths)if (currentWidth + width <= availableWidthWithMore) {
|
|
6904
|
+
currentWidth += width;
|
|
6905
|
+
count++;
|
|
6906
|
+
} else break;
|
|
6907
|
+
realMaxNum.value = count;
|
|
6908
|
+
};
|
|
6909
|
+
// Methods
|
|
6910
|
+
const handleClose = (bizId)=>{
|
|
6911
|
+
const currentArray = getModelValueArray(attrs.modelValue);
|
|
6912
|
+
const newModelValue = currentArray.filter((id)=>id !== bizId);
|
|
6913
|
+
change(props.multiple ? newModelValue : newModelValue[0] || '');
|
|
6914
|
+
};
|
|
6915
|
+
const showSelect = ()=>{
|
|
6916
|
+
selectVisible.value = true;
|
|
6917
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
6918
|
+
SelectRef.value?.focus();
|
|
6919
|
+
});
|
|
6920
|
+
};
|
|
6921
|
+
const handleSelectConfirm = ()=>{
|
|
6922
|
+
if (!selectValue.value) {
|
|
6923
|
+
selectVisible.value = false;
|
|
6924
|
+
return;
|
|
6925
|
+
}
|
|
6926
|
+
const currentValues = getModelValueArray(attrs.modelValue);
|
|
6927
|
+
if (props.multiple) {
|
|
6928
|
+
change([
|
|
6929
|
+
...currentValues,
|
|
6930
|
+
...Array.isArray(selectValue.value) ? selectValue.value : [
|
|
6931
|
+
selectValue.value
|
|
6932
|
+
]
|
|
6933
|
+
]);
|
|
6934
|
+
selectValue.value = [];
|
|
6935
|
+
} else {
|
|
6936
|
+
change([
|
|
6937
|
+
...currentValues,
|
|
6938
|
+
selectValue.value
|
|
6939
|
+
]);
|
|
6940
|
+
selectValue.value = '';
|
|
6941
|
+
}
|
|
6942
|
+
selectVisible.value = false;
|
|
6943
|
+
};
|
|
6944
|
+
async function fetchData() {
|
|
6945
|
+
if (!props.bizIdTypeCode) return;
|
|
6946
|
+
loading.value = true;
|
|
6947
|
+
let [, result] = await queryTagGroupByExampleV1({
|
|
6948
|
+
bizIdTypeCode: props.bizIdTypeCode,
|
|
6949
|
+
bizId: props.bizId,
|
|
6950
|
+
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
|
|
6951
|
+
});
|
|
6952
|
+
loading.value = false;
|
|
6953
|
+
if (result?.success) {
|
|
6954
|
+
tableData.value = result.data;
|
|
6955
|
+
if (props.queryExtra) fetchExtraTag();
|
|
6956
|
+
calcMaxNum(containerRef.value);
|
|
6957
|
+
}
|
|
7141
6958
|
}
|
|
7142
|
-
let stopWatch; /** 主动触发change */
|
|
7143
6959
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
else {
|
|
7147
|
-
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;
|
|
7148
|
-
if (void 0 !== id) change(id);
|
|
7149
|
-
}
|
|
7150
|
-
}, {
|
|
7151
|
-
immediate: true
|
|
7152
|
-
});
|
|
7153
|
-
});
|
|
7154
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
|
|
7155
|
-
if (stopWatch) stopWatch();
|
|
6960
|
+
fetchData();
|
|
6961
|
+
// 等待所有标签渲染完成
|
|
7156
6962
|
});
|
|
7157
|
-
|
|
7158
|
-
const
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
6963
|
+
async function fetchExtraTag() {
|
|
6964
|
+
const modelValueArray = getModelValueArray(attrs.modelValue);
|
|
6965
|
+
if (modelValueArray.length) {
|
|
6966
|
+
let otherTagIds = modelValueArray.filter((item)=>!allTagsMap.value.get(item));
|
|
6967
|
+
if (otherTagIds.length) {
|
|
6968
|
+
let [, result] = await queryTagListByExample({
|
|
6969
|
+
tagIds: otherTagIds
|
|
6970
|
+
});
|
|
6971
|
+
if (result?.success) extraTagIds.value = result.data;
|
|
6972
|
+
}
|
|
6973
|
+
}
|
|
6974
|
+
}
|
|
6975
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>attrs.modelValue, ()=>{
|
|
6976
|
+
if (props.queryExtra && !loading.value) fetchExtraTag();
|
|
6977
|
+
if (!props.multiple) {
|
|
6978
|
+
selectValue.value = attrs?.modelValue || '';
|
|
6979
|
+
return;
|
|
6980
|
+
}
|
|
6981
|
+
const modelValueArray = getModelValueArray(attrs.modelValue);
|
|
6982
|
+
if (modelValueArray.length) // 等待所有标签渲染完成
|
|
6983
|
+
{
|
|
6984
|
+
if (containerRef.value) calcMaxNum(containerRef.value);
|
|
6985
|
+
}
|
|
6986
|
+
}, {
|
|
6987
|
+
immediate: true
|
|
6988
|
+
});
|
|
6989
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.tagList, ()=>{
|
|
6990
|
+
tableData.value = props.tagList || [];
|
|
6991
|
+
});
|
|
6992
|
+
/**
|
|
6993
|
+
*
|
|
6994
|
+
* @param value 下拉框选择
|
|
6995
|
+
*/ function change(value) {
|
|
6996
|
+
if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](value);
|
|
6997
|
+
emit('change', value);
|
|
6998
|
+
}
|
|
6999
|
+
// 计算当前显示的标签数组
|
|
7000
|
+
const currentTagsArray = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getModelValueArray(attrs.modelValue));
|
|
7001
|
+
return (_ctx, _cache)=>{
|
|
7002
|
+
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
7003
|
+
const _component_el_popover = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-popover");
|
|
7004
|
+
const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
|
|
7005
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
7006
|
+
ref_key: "containerRef",
|
|
7007
|
+
ref: containerRef,
|
|
7008
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(props.class)
|
|
7009
|
+
}, [
|
|
7010
|
+
props.multiple ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
7011
|
+
key: 0
|
|
7012
|
+
}, [
|
|
7013
|
+
((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), {
|
|
7014
|
+
key: item,
|
|
7015
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
7016
|
+
background: allTagsMap.value.get(item)?.background,
|
|
7017
|
+
color: allTagsMap.value.get(item)?.color,
|
|
7018
|
+
borderColor: allTagsMap.value.get(item)?.color,
|
|
7019
|
+
'--el-tag-text-color': allTagsMap.value.get(item)?.color,
|
|
7020
|
+
'--el-tag-hover-color': allTagsMap.value.get(item)?.color
|
|
7021
|
+
}),
|
|
7022
|
+
closable: !props.disabled,
|
|
7023
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
7024
|
+
'mr-4'
|
|
7025
|
+
]),
|
|
7026
|
+
size: props.tagSize,
|
|
7027
|
+
"disable-transitions": true,
|
|
7028
|
+
onClose: ($event)=>handleClose(item)
|
|
7029
|
+
}, {
|
|
7030
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7031
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
|
|
7032
|
+
]),
|
|
7033
|
+
_: 2
|
|
7034
|
+
}, 1032, [
|
|
7035
|
+
"style",
|
|
7036
|
+
"closable",
|
|
7037
|
+
"size",
|
|
7038
|
+
"onClose"
|
|
7039
|
+
]))), 128)),
|
|
7040
|
+
currentTagsArray.value.length > realMaxNum.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_popover, {
|
|
7041
|
+
key: 0,
|
|
7042
|
+
placement: "bottom",
|
|
7043
|
+
trigger: "hover"
|
|
7044
|
+
}, {
|
|
7045
|
+
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7046
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
|
|
7047
|
+
ref_key: "moreButtonRef",
|
|
7048
|
+
ref: moreButtonRef,
|
|
7049
|
+
style: {
|
|
7050
|
+
"margin-left": "0"
|
|
7051
|
+
},
|
|
7052
|
+
class: "mr-4"
|
|
7053
|
+
}, {
|
|
7054
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7055
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("更多 +" + (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(currentTagsArray.value.length - realMaxNum.value), 1)
|
|
7056
|
+
]),
|
|
7057
|
+
_: 1
|
|
7058
|
+
}, 512)
|
|
7059
|
+
]),
|
|
7060
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7061
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", tag_selectvue_type_script_lang_ts_setup_true_hoisted_1, [
|
|
7062
|
+
((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), {
|
|
7063
|
+
key: item,
|
|
7064
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
7065
|
+
background: allTagsMap.value.get(item)?.background,
|
|
7066
|
+
color: allTagsMap.value.get(item)?.color,
|
|
7067
|
+
borderColor: allTagsMap.value.get(item)?.color,
|
|
7068
|
+
'--el-tag-text-color': allTagsMap.value.get(item)?.color,
|
|
7069
|
+
'--el-tag-hover-color': allTagsMap.value.get(item)?.color
|
|
7070
|
+
}),
|
|
7071
|
+
closable: !props.disabled,
|
|
7072
|
+
size: props.tagSize,
|
|
7073
|
+
"disable-transitions": true,
|
|
7074
|
+
onClose: ($event)=>handleClose(item)
|
|
7075
|
+
}, {
|
|
7076
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7077
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(allTagsMap.value.get(item)?.tagNameDisplay || item), 1)
|
|
7078
|
+
]),
|
|
7079
|
+
_: 2
|
|
7080
|
+
}, 1032, [
|
|
7081
|
+
"style",
|
|
7082
|
+
"closable",
|
|
7083
|
+
"size",
|
|
7084
|
+
"onClose"
|
|
7085
|
+
]))), 128))
|
|
7086
|
+
])
|
|
7087
|
+
]),
|
|
7088
|
+
_: 1
|
|
7089
|
+
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
7090
|
+
selectVisible.value && !props.disabled ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
|
|
7091
|
+
key: 1,
|
|
7092
|
+
modelValue: selectValue.value,
|
|
7093
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectValue.value = $event),
|
|
7094
|
+
"table-data": tableData.value,
|
|
7095
|
+
extraTagIds: extraTagIds.value,
|
|
7096
|
+
"all-tags-map": allTagsMap.value,
|
|
7097
|
+
multiple: true,
|
|
7098
|
+
disabled: props.disabled,
|
|
7099
|
+
"tag-size": props.tagSize,
|
|
7100
|
+
"has-select": currentTagsArray.value,
|
|
7101
|
+
placeholder: "请选择",
|
|
7102
|
+
onChange: _cache[1] || (_cache[1] = ()=>{
|
|
7103
|
+
if (!props.multiple) handleSelectConfirm();
|
|
7104
|
+
}),
|
|
7105
|
+
onBlur: handleSelectConfirm
|
|
7106
|
+
}, null, 8, [
|
|
7107
|
+
"modelValue",
|
|
7108
|
+
"table-data",
|
|
7109
|
+
"extraTagIds",
|
|
7110
|
+
"all-tags-map",
|
|
7111
|
+
"disabled",
|
|
7112
|
+
"tag-size",
|
|
7113
|
+
"has-select"
|
|
7114
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
7115
|
+
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, {
|
|
7116
|
+
key: 2,
|
|
7117
|
+
style: {
|
|
7118
|
+
"margin-left": "0"
|
|
7119
|
+
},
|
|
7120
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
7121
|
+
"!border-primary",
|
|
7122
|
+
{
|
|
7123
|
+
'pointer-events-none': props.disabled
|
|
7124
|
+
}
|
|
7125
|
+
]),
|
|
7126
|
+
onClick: showSelect
|
|
7127
|
+
}, {
|
|
7128
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7129
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_icon, null, {
|
|
7130
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
7131
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.Plus), {
|
|
7132
|
+
class: "text-primary"
|
|
7133
|
+
})
|
|
7134
|
+
]),
|
|
7135
|
+
_: 1
|
|
7136
|
+
})
|
|
7137
|
+
]),
|
|
7138
|
+
_: 1
|
|
7139
|
+
}, 8, [
|
|
7140
|
+
"class"
|
|
7141
|
+
]))
|
|
7142
|
+
], 64)) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(SelectDropdown, {
|
|
7143
|
+
key: 1,
|
|
7144
|
+
modelValue: selectValue.value,
|
|
7145
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>selectValue.value = $event),
|
|
7146
|
+
"table-data": tableData.value,
|
|
7147
|
+
extraTagIds: extraTagIds.value,
|
|
7148
|
+
"all-tags-map": allTagsMap.value,
|
|
7149
|
+
multiple: false,
|
|
7150
|
+
disabled: props.disabled,
|
|
7151
|
+
"tag-size": props.tagSize,
|
|
7152
|
+
placeholder: "请选择标签",
|
|
7153
|
+
"has-select": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue,
|
|
7154
|
+
onChange: change
|
|
7155
|
+
}, null, 8, [
|
|
7156
|
+
"modelValue",
|
|
7157
|
+
"table-data",
|
|
7158
|
+
"extraTagIds",
|
|
7159
|
+
"all-tags-map",
|
|
7160
|
+
"disabled",
|
|
7161
|
+
"tag-size",
|
|
7162
|
+
"has-select"
|
|
7163
|
+
]))
|
|
7164
|
+
], 2);
|
|
7199
7165
|
};
|
|
7200
7166
|
}
|
|
7201
7167
|
});
|
|
7202
|
-
const
|
|
7203
|
-
/* ESM default export */ const
|
|
7168
|
+
const tag_select_exports_ = tag_selectvue_type_script_lang_ts_setup_true;
|
|
7169
|
+
/* ESM default export */ const tag_select = tag_select_exports_;
|
|
7204
7170
|
/**
|
|
7205
7171
|
* [1-10013-1]根据条件查询用户列表
|
|
7206
7172
|
* @param params
|
|
@@ -7374,10 +7340,10 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7374
7340
|
* @returns
|
|
7375
7341
|
*/ const queryBizUnitList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/organization/queryBizUnitListByExample', params);
|
|
7376
7342
|
/*
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7343
|
+
96-10014-1 业务单元选择组件
|
|
7344
|
+
1、调用“1-10516-1 根据条件查询业务单元列表”传入“启用标志=1、关键字、医院标识=入参:医院标识、科室类型代码集合、就诊类型代码”查询业务单元列表
|
|
7345
|
+
2、展示列包括“组织类型、编码、名称”
|
|
7346
|
+
*/ /* ESM default export */ const biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
7381
7347
|
__name: 'index',
|
|
7382
7348
|
props: {
|
|
7383
7349
|
keyWord: {},
|
|
@@ -7594,7 +7560,9 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7594
7560
|
selectedRows.value.splice(index, 1);
|
|
7595
7561
|
const list = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.cloneDeep)(selectedRows.value);
|
|
7596
7562
|
tableRef.value?.eleTable?.clearSelection();
|
|
7597
|
-
list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true));
|
|
7563
|
+
list.forEach((row)=>tableRef.value?.eleTable?.toggleRowSelection(row, true)); // 修复:显式调用 handleChange 确保更新事件被触发
|
|
7564
|
+
// 特别是在删除最后一个选项时,table 的 selection-change 可能不会触发
|
|
7565
|
+
handleChange();
|
|
7598
7566
|
}
|
|
7599
7567
|
});
|
|
7600
7568
|
};
|
|
@@ -7733,12 +7701,12 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7733
7701
|
onKeydown: handleKeydown
|
|
7734
7702
|
}, [
|
|
7735
7703
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_popover, {
|
|
7736
|
-
visible: popoverVisible.value,
|
|
7737
7704
|
ref_key: "popoverRef",
|
|
7738
7705
|
ref: popoverRef,
|
|
7739
|
-
|
|
7740
|
-
trigger: "click",
|
|
7706
|
+
visible: popoverVisible.value,
|
|
7741
7707
|
placement: "bottom",
|
|
7708
|
+
trigger: "click",
|
|
7709
|
+
width: "auto",
|
|
7742
7710
|
onShow: handlePopoverShow
|
|
7743
7711
|
}, {
|
|
7744
7712
|
reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -7747,30 +7715,31 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7747
7715
|
ref: selectRef,
|
|
7748
7716
|
modelValue: selectedValue.value,
|
|
7749
7717
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>selectedValue.value = $event),
|
|
7750
|
-
placeholder: _ctx.$t('bizUnitSelect.placeholder', '请选择组织'),
|
|
7751
7718
|
"collapse-tags": !!props.multiSelectFlag,
|
|
7752
|
-
remote: "",
|
|
7753
|
-
clearable: "",
|
|
7754
|
-
filterable: "",
|
|
7755
|
-
"remote-show-suffix": "",
|
|
7756
|
-
"collapse-tags-tooltip": "",
|
|
7757
|
-
teleported: !popoverVisible.value,
|
|
7758
|
-
"remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
|
|
7759
7719
|
multiple: !!props.multiSelectFlag,
|
|
7760
7720
|
options: [],
|
|
7721
|
+
placeholder: _ctx.$t('bizUnitSelect.placeholder', '请选择组织'),
|
|
7761
7722
|
"popper-class": popoverVisible.value ? 'hidden' : '',
|
|
7762
|
-
|
|
7763
|
-
|
|
7723
|
+
"remote-method": (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handelRemoteMethod),
|
|
7724
|
+
teleported: !popoverVisible.value,
|
|
7725
|
+
clearable: "",
|
|
7726
|
+
"collapse-tags-tooltip": "",
|
|
7727
|
+
filterable: "",
|
|
7728
|
+
remote: "",
|
|
7729
|
+
"remote-show-suffix": ""
|
|
7730
|
+
}, selectProps.value, {
|
|
7764
7731
|
onBlur: handleBlur,
|
|
7765
|
-
onClear: handleClear
|
|
7766
|
-
|
|
7732
|
+
onClear: handleClear,
|
|
7733
|
+
onFocus: handleFocus,
|
|
7734
|
+
onRemoveTag: handleTagRemove
|
|
7735
|
+
}), null, 16, [
|
|
7767
7736
|
"modelValue",
|
|
7768
|
-
"placeholder",
|
|
7769
7737
|
"collapse-tags",
|
|
7770
|
-
"teleported",
|
|
7771
|
-
"remote-method",
|
|
7772
7738
|
"multiple",
|
|
7773
|
-
"
|
|
7739
|
+
"placeholder",
|
|
7740
|
+
"popper-class",
|
|
7741
|
+
"remote-method",
|
|
7742
|
+
"teleported"
|
|
7774
7743
|
])
|
|
7775
7744
|
]),
|
|
7776
7745
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -7781,23 +7750,24 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7781
7750
|
class: "w-full overflow-hidden"
|
|
7782
7751
|
}, [
|
|
7783
7752
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
7784
|
-
style: {
|
|
7785
|
-
height: "100%"
|
|
7786
|
-
},
|
|
7787
7753
|
ref_key: "tableRef",
|
|
7788
7754
|
ref: tableRef,
|
|
7789
|
-
|
|
7755
|
+
columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
|
|
7790
7756
|
data: bizUnitList.value,
|
|
7791
7757
|
loading: loading.value,
|
|
7792
|
-
"highlight-current-row": "",
|
|
7793
|
-
columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(tableConfig),
|
|
7794
7758
|
"row-class-name": getRowClassName,
|
|
7759
|
+
"highlight-current-row": "",
|
|
7760
|
+
"row-key": "orgId",
|
|
7761
|
+
style: {
|
|
7762
|
+
height: "100%"
|
|
7763
|
+
}
|
|
7764
|
+
}, tableProps.value, {
|
|
7795
7765
|
onRowClick: handleTableRowSelect,
|
|
7796
7766
|
onSelectionChange: handleSelectionChange
|
|
7797
|
-
}
|
|
7767
|
+
}), null, 16, [
|
|
7768
|
+
"columns",
|
|
7798
7769
|
"data",
|
|
7799
|
-
"loading"
|
|
7800
|
-
"columns"
|
|
7770
|
+
"loading"
|
|
7801
7771
|
])
|
|
7802
7772
|
], 4)
|
|
7803
7773
|
]),
|
|
@@ -7809,7 +7779,7 @@ const user_select_exports_ = user_selectvue_type_script_setup_true_lang_ts_name_
|
|
|
7809
7779
|
};
|
|
7810
7780
|
}
|
|
7811
7781
|
});
|
|
7812
|
-
const biz_unit_select_exports_ =
|
|
7782
|
+
const biz_unit_select_exports_ = biz_unit_selectvue_type_script_lang_tsx_name_BizUnitSelect_setup_true;
|
|
7813
7783
|
/* ESM default export */ const biz_unit_select = biz_unit_select_exports_;
|
|
7814
7784
|
/**
|
|
7815
7785
|
* [1-10154-1] 根据条件查询科室列表(平铺)
|