sun-biz 0.0.3-beta.24 → 0.0.3-beta.26
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/biz-select/dict-select/api.d.ts +1 -1
- package/dist/components/form-design-render/utils.d.ts +4 -7
- package/dist/components/index.js +137 -118
- package/dist/components/static/css/index.css +3 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +14 -2
- package/dist/hooks/use-editable-table/index.d.ts +2 -2
- package/dist/hooks/use-fetch-dataset/index.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +204 -173
- package/dist/static/css/index.css +3 -1
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ export declare const queryDictDataListByExample: (params: {
|
|
|
19
19
|
codeSystemNo?: string;
|
|
20
20
|
keyWord?: string;
|
|
21
21
|
hospitalId: string;
|
|
22
|
-
|
|
22
|
+
menuId: string;
|
|
23
23
|
pageNumber: number;
|
|
24
24
|
pageSize: number;
|
|
25
25
|
}) => Promise<[import("@sun-toolkit/request").SunApiResultData<null> | undefined, import("@sun-toolkit/request").SunApiResultData<ReqDictDataListByExample> | undefined]>;
|
|
@@ -40,19 +40,16 @@ export declare function expansionGroup(data: FormDesignDetailInfo[], result?: Fo
|
|
|
40
40
|
*/
|
|
41
41
|
export declare function getComponentType(item: FormDesignDetailInfo): string;
|
|
42
42
|
export declare function getPlaceholder(item: FormDesignDetailInfo): string;
|
|
43
|
-
export declare function getExtraProps(item: FormDesignDetailInfo, dataValueNames?: {
|
|
43
|
+
export declare function getExtraProps(item: FormDesignDetailInfo, parentFormCtlNo: string, afterValueChange: ((key: string, model: unknown, parentFormCtlNo: string) => void) | undefined, dataValueNames?: {
|
|
44
44
|
[key: string]: [];
|
|
45
45
|
}, modelValue?: {
|
|
46
46
|
[key: string]: unknown;
|
|
47
47
|
}): {
|
|
48
|
-
|
|
48
|
+
onBlur: () => void;
|
|
49
49
|
};
|
|
50
|
-
export declare function useGetFromConfigData(result: FormDesignDetailInfo[], layoutTypeCode: number
|
|
50
|
+
export declare function useGetFromConfigData(result: FormDesignDetailInfo[], layoutTypeCode: number): {
|
|
51
51
|
label: string | undefined;
|
|
52
52
|
name: string;
|
|
53
|
-
onModelChange: (value: unknown, model: {
|
|
54
|
-
[key: string]: unknown;
|
|
55
|
-
}) => void;
|
|
56
53
|
component: string;
|
|
57
54
|
placeholder: string;
|
|
58
55
|
defaultValue: {};
|
|
@@ -61,7 +58,7 @@ export declare function useGetFromConfigData(result: FormDesignDetailInfo[], lay
|
|
|
61
58
|
rules: {
|
|
62
59
|
required: boolean;
|
|
63
60
|
message: string;
|
|
64
|
-
trigger: string;
|
|
61
|
+
trigger: string[];
|
|
65
62
|
}[];
|
|
66
63
|
extraProps: {
|
|
67
64
|
[key: string]: unknown;
|
package/dist/components/index.js
CHANGED
|
@@ -1062,7 +1062,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1062
1062
|
componentId.value = result.data[0].componentId || '';
|
|
1063
1063
|
serveDbgridComponentSettingList.value = result.data[0].dbgridComponentSettingList || [];
|
|
1064
1064
|
if (serveDbgridComponentSettingList.value.length) {
|
|
1065
|
-
if (!isAdmin) {
|
|
1065
|
+
if (!isAdmin || userInfo?.userJobCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG_STR.NO) {
|
|
1066
1066
|
influenceScopeCode.value = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE;
|
|
1067
1067
|
bizId.value = userInfo?.userId || '';
|
|
1068
1068
|
userList.value = [
|
|
@@ -1450,7 +1450,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1450
1450
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1451
1451
|
[
|
|
1452
1452
|
'__scopeId',
|
|
1453
|
-
"data-v-
|
|
1453
|
+
"data-v-1e6d29ee"
|
|
1454
1454
|
]
|
|
1455
1455
|
]);
|
|
1456
1456
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -3413,7 +3413,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
|
|
|
3413
3413
|
*/ const getComponentConfig = async ()=>{
|
|
3414
3414
|
loading.value = true;
|
|
3415
3415
|
const [, res] = await queryPatientAccessConfig({
|
|
3416
|
-
|
|
3416
|
+
menuId: __props.menuId,
|
|
3417
3417
|
componentCode: __props.code,
|
|
3418
3418
|
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
|
|
3419
3419
|
});
|
|
@@ -4576,7 +4576,7 @@ const createPrint = ()=>{
|
|
|
4576
4576
|
};
|
|
4577
4577
|
/** 校验参数是否都传了 */ const validateParams = (params)=>{
|
|
4578
4578
|
if (!validateRequired(params?.designFlag, "设计时标志不能为空")) return;
|
|
4579
|
-
if (!validateRequired(params?.
|
|
4579
|
+
if (!validateRequired(params?.menuId, "系统菜单标识不能为空")) return;
|
|
4580
4580
|
if (!validateRequired(params?.receiptId, "单据标识不能为空")) return;
|
|
4581
4581
|
if (!validateRequired(params?.bizIdTypeCode, "业务标识类型代码不能为空")) return;
|
|
4582
4582
|
if (!validateRequired(params?.bizIds, "业务标识集合不能为空")) return;
|
|
@@ -4643,7 +4643,7 @@ const createPrint = ()=>{
|
|
|
4643
4643
|
if (!receiptPrintRuleCode) return;
|
|
4644
4644
|
let code = receiptPrintCategCode;
|
|
4645
4645
|
if (receiptPrintRuleCode === constant_RECEIPT_PRINT_RULE_CODE.MENU) {
|
|
4646
|
-
const menuReceiptInfo = menuXReceiptList?.find((item)=>item.
|
|
4646
|
+
const menuReceiptInfo = menuXReceiptList?.find((item)=>item.menuId === defaultContext.printParams?.menuId);
|
|
4647
4647
|
code = menuReceiptInfo?.receiptPrintCategCode || receiptPrintCategCode;
|
|
4648
4648
|
}
|
|
4649
4649
|
const isConfirmed = await messageBoxAskJudge(code, receiptNameDisplay);
|
|
@@ -4743,7 +4743,7 @@ const createPrint = ()=>{
|
|
|
4743
4743
|
}
|
|
4744
4744
|
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4745
4745
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4746
|
-
menuId: defaultContext?.printParams?.
|
|
4746
|
+
menuId: defaultContext?.printParams?.menuId,
|
|
4747
4747
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV001,
|
|
4748
4748
|
params: {
|
|
4749
4749
|
receiptId: defaultContext?.printParams?.receiptId,
|
|
@@ -4779,7 +4779,7 @@ const createPrint = ()=>{
|
|
|
4779
4779
|
}));
|
|
4780
4780
|
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4781
4781
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4782
|
-
menuId: defaultContext?.printParams?.
|
|
4782
|
+
menuId: defaultContext?.printParams?.menuId,
|
|
4783
4783
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV101,
|
|
4784
4784
|
params: {
|
|
4785
4785
|
invoiceAllotId: defaultContext?.printParams?.invoiceInfo?.invoiceAllotId ?? void 0,
|
|
@@ -4801,7 +4801,7 @@ const createPrint = ()=>{
|
|
|
4801
4801
|
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.REOPEN) {
|
|
4802
4802
|
const [error, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4803
4803
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4804
|
-
menuId: defaultContext?.printParams?.
|
|
4804
|
+
menuId: defaultContext?.printParams?.menuId,
|
|
4805
4805
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV104,
|
|
4806
4806
|
params: {
|
|
4807
4807
|
invoiceAllotId: defaultContext?.printParams?.invoiceInfo?.invoiceAllotId,
|
|
@@ -4818,7 +4818,7 @@ const createPrint = ()=>{
|
|
|
4818
4818
|
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.CHANGE) {
|
|
4819
4819
|
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4820
4820
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4821
|
-
menuId: defaultContext?.printParams?.
|
|
4821
|
+
menuId: defaultContext?.printParams?.menuId,
|
|
4822
4822
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV103,
|
|
4823
4823
|
params: {
|
|
4824
4824
|
invoiceAllotId: defaultContext?.printParams?.invoiceInfo?.invoiceAllotId,
|
|
@@ -4835,7 +4835,7 @@ const createPrint = ()=>{
|
|
|
4835
4835
|
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.RED) {
|
|
4836
4836
|
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4837
4837
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4838
|
-
menuId: defaultContext?.printParams?.
|
|
4838
|
+
menuId: defaultContext?.printParams?.menuId,
|
|
4839
4839
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV102,
|
|
4840
4840
|
params: {
|
|
4841
4841
|
invoiceAllotId: defaultContext?.printParams?.invoiceInfo?.invoiceAllotId,
|
|
@@ -5078,7 +5078,7 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
5078
5078
|
* [1-10098-1]根据条件查询表单设计内容
|
|
5079
5079
|
* @param params
|
|
5080
5080
|
* @returns
|
|
5081
|
-
*/ const queryDictDataListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)(
|
|
5081
|
+
*/ const queryDictDataListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)("/dictCommon/queryDictDataListByExample", params);
|
|
5082
5082
|
/* ESM default export */ const dict_selectvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5083
5083
|
__name: 'index',
|
|
5084
5084
|
props: {
|
|
@@ -5098,7 +5098,7 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
5098
5098
|
}
|
|
5099
5099
|
},
|
|
5100
5100
|
emits: [
|
|
5101
|
-
|
|
5101
|
+
"change"
|
|
5102
5102
|
],
|
|
5103
5103
|
setup (__props, { emit: __emit }) {
|
|
5104
5104
|
const { menuId, currentOrg } = use_app_config([
|
|
@@ -5126,12 +5126,12 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
5126
5126
|
if (props.codeSystemNo) params.codeSystemNo = props.codeSystemNo;
|
|
5127
5127
|
if (props.dataDictionaryId) params.dataDictionaryId = props.dataDictionaryId;
|
|
5128
5128
|
let [, result] = await queryDictDataListByExample({
|
|
5129
|
-
dataSearchBizIdTypeCode: props.dataSearchBizIdTypeCode ||
|
|
5129
|
+
dataSearchBizIdTypeCode: props.dataSearchBizIdTypeCode || "",
|
|
5130
5130
|
keyWord: value,
|
|
5131
|
-
|
|
5131
|
+
menuId: menuId || "",
|
|
5132
5132
|
pageNumber: 1,
|
|
5133
5133
|
pageSize: 100,
|
|
5134
|
-
hospitalId: currentOrg?.orgId ||
|
|
5134
|
+
hospitalId: currentOrg?.orgId || "",
|
|
5135
5135
|
...params
|
|
5136
5136
|
});
|
|
5137
5137
|
loading.value = false;
|
|
@@ -5144,11 +5144,11 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
5144
5144
|
}
|
|
5145
5145
|
}
|
|
5146
5146
|
/**
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
let name = (tableData.value.find((item)=>item.value === value) || {})[
|
|
5151
|
-
emit(
|
|
5147
|
+
*
|
|
5148
|
+
* @param value 下拉框选择
|
|
5149
|
+
*/ function change(value) {
|
|
5150
|
+
let name = (tableData.value.find((item)=>item.value === value) || {})["label"];
|
|
5151
|
+
emit("change", value, name);
|
|
5152
5152
|
}
|
|
5153
5153
|
return (_ctx, _cache)=>{
|
|
5154
5154
|
const _component_el_option = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-option");
|
|
@@ -5190,7 +5190,7 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
5190
5190
|
const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_selectvue_type_script_setup_true_lang_ts, [
|
|
5191
5191
|
[
|
|
5192
5192
|
'__scopeId',
|
|
5193
|
-
"data-v-
|
|
5193
|
+
"data-v-10687e3e"
|
|
5194
5194
|
]
|
|
5195
5195
|
]);
|
|
5196
5196
|
/* ESM default export */ const dict_select = dict_select_exports_;
|
|
@@ -5801,20 +5801,8 @@ const COMMA = ',';
|
|
|
5801
5801
|
}
|
|
5802
5802
|
function getPlaceholder(item) {
|
|
5803
5803
|
return item.hintMsg || `请${item.controlTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.INPUT ? '输入' : '选择'}${item.labelNameDisplay || item.labelName}`;
|
|
5804
|
-
// return (
|
|
5805
|
-
// item.hintMsg ||
|
|
5806
|
-
// t(
|
|
5807
|
-
// `global:placeholder.${
|
|
5808
|
-
// item.controlTypeCode === CONTROL_TYPE_CODE.INPUT ? 'input' : 'select'
|
|
5809
|
-
// }.template`,
|
|
5810
|
-
// {
|
|
5811
|
-
// name: item.labelNameDisplay || item.labelName,
|
|
5812
|
-
// content: item.labelNameDisplay || item.labelName,
|
|
5813
|
-
// }
|
|
5814
|
-
// )
|
|
5815
|
-
// );
|
|
5816
5804
|
}
|
|
5817
|
-
function getExtraProps(item, dataValueNames, modelValue) {
|
|
5805
|
+
function getExtraProps(item, parentFormCtlNo, afterValueChange, dataValueNames, modelValue) {
|
|
5818
5806
|
const initObj = {
|
|
5819
5807
|
defaultValue: item.defaultValue,
|
|
5820
5808
|
defaultValueName: item.defaultValueName
|
|
@@ -5854,17 +5842,17 @@ function getExtraProps(item, dataValueNames, modelValue) {
|
|
|
5854
5842
|
'inactive-value': __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO
|
|
5855
5843
|
};
|
|
5856
5844
|
return {
|
|
5845
|
+
onBlur: ()=>{
|
|
5846
|
+
if (afterValueChange) afterValueChange(item.bindingFieldNo, modelValue, parentFormCtlNo); // 调用函数并传递参数
|
|
5847
|
+
},
|
|
5857
5848
|
...resultObj,
|
|
5858
5849
|
...item.extraProps || {}
|
|
5859
5850
|
};
|
|
5860
5851
|
}
|
|
5861
|
-
function useGetFromConfigData(result, layoutTypeCode
|
|
5852
|
+
function useGetFromConfigData(result, layoutTypeCode) {
|
|
5862
5853
|
return result.map((item)=>({
|
|
5863
5854
|
label: item.labelNameDisplay || item.labelName,
|
|
5864
5855
|
name: item.bindingFieldNo,
|
|
5865
|
-
onModelChange: (value, model)=>{
|
|
5866
|
-
if (afterValueChange) afterValueChange(item.bindingFieldNo, value, model, parentFormCtlNo); // 调用函数并传递参数
|
|
5867
|
-
},
|
|
5868
5856
|
component: getComponentType(item),
|
|
5869
5857
|
placeholder: getPlaceholder(item),
|
|
5870
5858
|
defaultValue: item.defaultValue || '',
|
|
@@ -5874,7 +5862,10 @@ function useGetFromConfigData(result, layoutTypeCode, parentFormCtlNo, afterValu
|
|
|
5874
5862
|
{
|
|
5875
5863
|
required: item.mustInputFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
|
|
5876
5864
|
message: getPlaceholder(item),
|
|
5877
|
-
trigger:
|
|
5865
|
+
trigger: [
|
|
5866
|
+
'blur',
|
|
5867
|
+
'change'
|
|
5868
|
+
]
|
|
5878
5869
|
}
|
|
5879
5870
|
],
|
|
5880
5871
|
extraProps: item.extraProps || {}
|
|
@@ -5962,13 +5953,13 @@ function useGetFromConfigData(result, layoutTypeCode, parentFormCtlNo, afterValu
|
|
|
5962
5953
|
], ()=>{
|
|
5963
5954
|
const { result: initList, hideData: hideObj } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
|
|
5964
5955
|
hideData.value = hideObj; /**
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
const initData = useGetFromConfigData(initList, props.layoutTypeCode
|
|
5956
|
+
* 初次渲染
|
|
5957
|
+
*/
|
|
5958
|
+
const initData = useGetFromConfigData(initList, props.layoutTypeCode);
|
|
5968
5959
|
formData.value = initData.map((item, index)=>({
|
|
5969
5960
|
...item,
|
|
5970
5961
|
labelWidth: 110,
|
|
5971
|
-
extraProps: getExtraProps(initList[index] || {}, props.dataValueNames, modelValue.value)
|
|
5962
|
+
extraProps: getExtraProps(initList[index] || {}, props.designDetailInfo.formCtlNo, afterValueChange, props.dataValueNames, modelValue.value)
|
|
5972
5963
|
}));
|
|
5973
5964
|
}, {
|
|
5974
5965
|
immediate: true,
|
|
@@ -5990,46 +5981,41 @@ function useGetFromConfigData(result, layoutTypeCode, parentFormCtlNo, afterValu
|
|
|
5990
5981
|
},
|
|
5991
5982
|
getCurrentValue: ()=>modelValue.value
|
|
5992
5983
|
});
|
|
5993
|
-
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
data: formData.value
|
|
6009
|
-
}, null, 8, [
|
|
6010
|
-
"modelValue",
|
|
6011
|
-
"disabled",
|
|
6012
|
-
"column",
|
|
6013
|
-
"data"
|
|
6014
|
-
])
|
|
6015
|
-
], 64));
|
|
5984
|
+
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_form), {
|
|
5985
|
+
ref_key: "formRef",
|
|
5986
|
+
ref: formRef,
|
|
5987
|
+
modelValue: modelValue.value,
|
|
5988
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>modelValue.value = $event),
|
|
5989
|
+
class: "mr-2",
|
|
5990
|
+
disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(disabled),
|
|
5991
|
+
column: props.layoutTypeCode,
|
|
5992
|
+
data: formData.value
|
|
5993
|
+
}, null, 8, [
|
|
5994
|
+
"modelValue",
|
|
5995
|
+
"disabled",
|
|
5996
|
+
"column",
|
|
5997
|
+
"data"
|
|
5998
|
+
]));
|
|
6016
5999
|
}
|
|
6017
6000
|
});
|
|
6018
6001
|
const Collapse_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Collapsevue_type_script_setup_true_lang_tsx, [
|
|
6019
6002
|
[
|
|
6020
6003
|
'__scopeId',
|
|
6021
|
-
"data-v-
|
|
6004
|
+
"data-v-359580de"
|
|
6022
6005
|
]
|
|
6023
6006
|
]);
|
|
6024
6007
|
/* ESM default export */ const Collapse = Collapse_exports_;
|
|
6025
6008
|
const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
6026
|
-
class: "mb-
|
|
6009
|
+
class: "relative mb-3 mt-2 overflow-hidden pr-2 pl-2"
|
|
6027
6010
|
};
|
|
6028
6011
|
/* ESM default export */ const Tablevue_type_script_setup_true_lang_tsx = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
6029
6012
|
__name: 'Table',
|
|
6030
6013
|
props: {
|
|
6031
6014
|
designDetailInfo: {},
|
|
6032
|
-
dataValueNames: {
|
|
6015
|
+
dataValueNames: {
|
|
6016
|
+
default: ()=>({})
|
|
6017
|
+
},
|
|
6018
|
+
changeCurData: {}
|
|
6033
6019
|
},
|
|
6034
6020
|
setup (__props, { expose: __expose }) {
|
|
6035
6021
|
const props = __props;
|
|
@@ -6037,10 +6023,11 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
|
6037
6023
|
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
6038
6024
|
const settingList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
6039
6025
|
const disabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)('disabled');
|
|
6026
|
+
const afterValueChange = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)('afterValueChange');
|
|
6040
6027
|
function useGetTableColumnData() {
|
|
6041
6028
|
let { result, hideData: hideObj } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
|
|
6042
6029
|
hideData.value = hideObj;
|
|
6043
|
-
|
|
6030
|
+
let data = result.map((item)=>({
|
|
6044
6031
|
label: item.labelNameDisplay || item.labelName,
|
|
6045
6032
|
prop: item.bindingFieldNo,
|
|
6046
6033
|
editable: true,
|
|
@@ -6057,7 +6044,7 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
|
6057
6044
|
}
|
|
6058
6045
|
],
|
|
6059
6046
|
render: (row)=>{
|
|
6060
|
-
const extraProps = getExtraProps(item, props.dataValueNames, row);
|
|
6047
|
+
const extraProps = getExtraProps(item, props.designDetailInfo.formCtlNo, afterValueChange, props.dataValueNames, row);
|
|
6061
6048
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(FormUnit, {
|
|
6062
6049
|
component: getComponentType(item),
|
|
6063
6050
|
label: item.labelNameDisplay || item.labelName,
|
|
@@ -6067,12 +6054,50 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
|
6067
6054
|
'onUpdate:modelValue': (value)=>{
|
|
6068
6055
|
row[item.bindingFieldNo] = value;
|
|
6069
6056
|
},
|
|
6070
|
-
disabled: extraProps.disabled || disabled
|
|
6057
|
+
disabled: extraProps.disabled || disabled,
|
|
6058
|
+
onChange: ()=>{
|
|
6059
|
+
props.changeCurData({
|
|
6060
|
+
[props.designDetailInfo.bindingFieldNo]: settingList.value
|
|
6061
|
+
});
|
|
6062
|
+
}
|
|
6071
6063
|
});
|
|
6072
6064
|
}
|
|
6073
6065
|
}));
|
|
6066
|
+
return [
|
|
6067
|
+
...data,
|
|
6068
|
+
{
|
|
6069
|
+
label: '操作',
|
|
6070
|
+
prop: 'operation',
|
|
6071
|
+
width: 130,
|
|
6072
|
+
fixed: 'right',
|
|
6073
|
+
defaultValue: '',
|
|
6074
|
+
render: (row, index)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button"), {
|
|
6075
|
+
type: "primary",
|
|
6076
|
+
link: true,
|
|
6077
|
+
onClick: ()=>{
|
|
6078
|
+
onDeleteItem(index);
|
|
6079
|
+
}
|
|
6080
|
+
}, {
|
|
6081
|
+
default: ()=>[
|
|
6082
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon"), null, {
|
|
6083
|
+
default: ()=>[
|
|
6084
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.Delete, null, null)
|
|
6085
|
+
]
|
|
6086
|
+
})
|
|
6087
|
+
]
|
|
6088
|
+
}, 8, [
|
|
6089
|
+
"onClick"
|
|
6090
|
+
])
|
|
6091
|
+
}
|
|
6092
|
+
];
|
|
6074
6093
|
}
|
|
6075
6094
|
const tableColumn = useGetTableColumnData();
|
|
6095
|
+
function onDeleteItem(index) {
|
|
6096
|
+
settingList.value = settingList.value.filter((cur, i)=>index !== i);
|
|
6097
|
+
props.changeCurData({
|
|
6098
|
+
[props.designDetailInfo.bindingFieldNo]: settingList.value
|
|
6099
|
+
});
|
|
6100
|
+
}
|
|
6076
6101
|
function onAddItem() {
|
|
6077
6102
|
let newObj = {
|
|
6078
6103
|
editable: true
|
|
@@ -6081,6 +6106,9 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
|
6081
6106
|
if (item.defaultValue) newObj[item.prop] = item.defaultValue;
|
|
6082
6107
|
});
|
|
6083
6108
|
settingList.value.push(newObj);
|
|
6109
|
+
props.changeCurData({
|
|
6110
|
+
[props.designDetailInfo.bindingFieldNo]: settingList.value
|
|
6111
|
+
});
|
|
6084
6112
|
}
|
|
6085
6113
|
__expose({
|
|
6086
6114
|
submit: async ()=>{
|
|
@@ -6107,12 +6135,6 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
|
6107
6135
|
const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
|
|
6108
6136
|
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
6109
6137
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", Tablevue_type_script_setup_true_lang_tsx_hoisted_1, [
|
|
6110
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(Title), {
|
|
6111
|
-
class: "mb-4",
|
|
6112
|
-
title: props.designDetailInfo.labelName
|
|
6113
|
-
}, null, 8, [
|
|
6114
|
-
"title"
|
|
6115
|
-
]),
|
|
6116
6138
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), {
|
|
6117
6139
|
ref_key: "tableRef",
|
|
6118
6140
|
ref: tableRef,
|
|
@@ -6126,8 +6148,10 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
|
6126
6148
|
]),
|
|
6127
6149
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(disabled) ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_button, {
|
|
6128
6150
|
key: 0,
|
|
6129
|
-
|
|
6130
|
-
|
|
6151
|
+
type: "primary",
|
|
6152
|
+
class: "absolute right-4 top-1.5 z-50",
|
|
6153
|
+
onClick: onAddItem,
|
|
6154
|
+
link: true
|
|
6131
6155
|
}, {
|
|
6132
6156
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
6133
6157
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_icon, null, {
|
|
@@ -6146,7 +6170,7 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
|
6146
6170
|
const form_design_render_composables_Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_script_setup_true_lang_tsx, [
|
|
6147
6171
|
[
|
|
6148
6172
|
'__scopeId',
|
|
6149
|
-
"data-v-
|
|
6173
|
+
"data-v-116d99e2"
|
|
6150
6174
|
]
|
|
6151
6175
|
]);
|
|
6152
6176
|
/* ESM default export */ const form_design_render_composables_Table = form_design_render_composables_Table_exports_;
|
|
@@ -6171,13 +6195,13 @@ const form_design_render_composables_Table_exports_ = /*#__PURE__*/ (0, exportHe
|
|
|
6171
6195
|
], ()=>{
|
|
6172
6196
|
const { result: initList, hideData: hideObj } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
|
|
6173
6197
|
hideData.value = hideObj; /**
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
const initData = useGetFromConfigData(initList, props.layoutTypeCode
|
|
6198
|
+
* 初次渲染
|
|
6199
|
+
*/
|
|
6200
|
+
const initData = useGetFromConfigData(initList, props.layoutTypeCode);
|
|
6177
6201
|
formData.value = initData.map((item, index)=>({
|
|
6178
6202
|
...item,
|
|
6179
6203
|
labelWidth: 110,
|
|
6180
|
-
extraProps: getExtraProps(initList[index] || {}, props.dataValueNames, modelValue.value)
|
|
6204
|
+
extraProps: getExtraProps(initList[index] || {}, props.designDetailInfo.formCtlNo, afterValueChange, props.dataValueNames, modelValue.value)
|
|
6181
6205
|
}));
|
|
6182
6206
|
}, {
|
|
6183
6207
|
immediate: true,
|
|
@@ -6205,35 +6229,27 @@ const form_design_render_composables_Table_exports_ = /*#__PURE__*/ (0, exportHe
|
|
|
6205
6229
|
[props.designDetailInfo.formCtlNo]: modelValue.value
|
|
6206
6230
|
})
|
|
6207
6231
|
});
|
|
6208
|
-
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
data: formData.value
|
|
6224
|
-
}, null, 8, [
|
|
6225
|
-
"disabled",
|
|
6226
|
-
"modelValue",
|
|
6227
|
-
"column",
|
|
6228
|
-
"data"
|
|
6229
|
-
])
|
|
6230
|
-
], 64));
|
|
6232
|
+
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_form), {
|
|
6233
|
+
ref_key: "formRef",
|
|
6234
|
+
ref: formRef,
|
|
6235
|
+
disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(disabled),
|
|
6236
|
+
modelValue: modelValue.value,
|
|
6237
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>modelValue.value = $event),
|
|
6238
|
+
class: "mr-2",
|
|
6239
|
+
column: props.layoutTypeCode,
|
|
6240
|
+
data: formData.value
|
|
6241
|
+
}, null, 8, [
|
|
6242
|
+
"disabled",
|
|
6243
|
+
"modelValue",
|
|
6244
|
+
"column",
|
|
6245
|
+
"data"
|
|
6246
|
+
]));
|
|
6231
6247
|
}
|
|
6232
6248
|
});
|
|
6233
6249
|
const Set_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Setvue_type_script_setup_true_lang_tsx_name_Set, [
|
|
6234
6250
|
[
|
|
6235
6251
|
'__scopeId',
|
|
6236
|
-
"data-v-
|
|
6252
|
+
"data-v-5537cf67"
|
|
6237
6253
|
]
|
|
6238
6254
|
]);
|
|
6239
6255
|
/* ESM default export */ const Set = Set_exports_;
|
|
@@ -6254,13 +6270,13 @@ const Set_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Setvue_type_scri
|
|
|
6254
6270
|
*/
|
|
6255
6271
|
const initData = useGetFromConfigData([
|
|
6256
6272
|
props.designDetailInfo
|
|
6257
|
-
], props.layoutTypeCode
|
|
6273
|
+
], props.layoutTypeCode); /**
|
|
6258
6274
|
* 数据更新后获取对应的name
|
|
6259
6275
|
*/
|
|
6260
6276
|
const formData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>initData.map((item)=>({
|
|
6261
6277
|
...item,
|
|
6262
6278
|
labelWidth: 110,
|
|
6263
|
-
extraProps: getExtraProps(props.designDetailInfo, props.dataValueNames, modelValue.value)
|
|
6279
|
+
extraProps: getExtraProps(props.designDetailInfo, props.designDetailInfo.formCtlNo, afterValueChange, props.dataValueNames, modelValue.value)
|
|
6264
6280
|
})));
|
|
6265
6281
|
__expose({
|
|
6266
6282
|
submit: async ()=>{
|
|
@@ -6283,7 +6299,7 @@ const Set_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Setvue_type_scri
|
|
|
6283
6299
|
disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(disabled),
|
|
6284
6300
|
modelValue: modelValue.value,
|
|
6285
6301
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>modelValue.value = $event),
|
|
6286
|
-
class: "
|
|
6302
|
+
class: "mr-2",
|
|
6287
6303
|
column: props.layoutTypeCode,
|
|
6288
6304
|
data: formData.value
|
|
6289
6305
|
}, null, 8, [
|
|
@@ -6297,7 +6313,7 @@ const Set_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Setvue_type_scri
|
|
|
6297
6313
|
const Other_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Othervue_type_script_setup_true_lang_tsx, [
|
|
6298
6314
|
[
|
|
6299
6315
|
'__scopeId',
|
|
6300
|
-
"data-v-
|
|
6316
|
+
"data-v-605220c2"
|
|
6301
6317
|
]
|
|
6302
6318
|
]);
|
|
6303
6319
|
/* ESM default export */ const Other = Other_exports_;
|
|
@@ -6391,6 +6407,7 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
6391
6407
|
type: Function,
|
|
6392
6408
|
default: ()=>{}
|
|
6393
6409
|
},
|
|
6410
|
+
changeCurData: {},
|
|
6394
6411
|
rules: {
|
|
6395
6412
|
default: ()=>({})
|
|
6396
6413
|
}
|
|
@@ -6439,14 +6456,14 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
6439
6456
|
if (result?.success) dataValueNames.value = result.data || {};
|
|
6440
6457
|
}
|
|
6441
6458
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.provide)('disabled', props.disabled);
|
|
6442
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.provide)('afterValueChange', (name,
|
|
6443
|
-
if (props.afterValueChange) props.afterValueChange(name,
|
|
6459
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.provide)('afterValueChange', (name, model, parentFormCtlNo)=>{
|
|
6460
|
+
if (props.afterValueChange) props.afterValueChange(name, model, parentFormCtlNo);
|
|
6444
6461
|
});
|
|
6445
6462
|
function setValue(data, loading) {
|
|
6446
6463
|
let queryList = [];
|
|
6447
6464
|
configList.value.forEach((item)=>{
|
|
6448
6465
|
if (loading) return;
|
|
6449
|
-
const { result: list } = expansionGroup(item?.subFormControlList || [], []);
|
|
6466
|
+
const { result: list = [] } = expansionGroup(item?.subFormControlList || [], []);
|
|
6450
6467
|
let result = {};
|
|
6451
6468
|
let otherDefaultValue = void 0 === getDefaultValue(data, item.bindingFieldNo) ? item.defaultValue : getDefaultValue(data, item.bindingFieldNo);
|
|
6452
6469
|
switch(item.controlTypeCode){
|
|
@@ -6462,7 +6479,7 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
6462
6479
|
});
|
|
6463
6480
|
break;
|
|
6464
6481
|
case __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.SET:
|
|
6465
|
-
list.forEach((cur)=>{
|
|
6482
|
+
(list || []).forEach((cur)=>{
|
|
6466
6483
|
let defaultValue = void 0 === getDefaultValue(data[item.formCtlNo] || {}, cur.bindingFieldNo) ? cur.defaultValue : getDefaultValue(data[item.formCtlNo] || {}, cur.bindingFieldNo);
|
|
6467
6484
|
result[cur.bindingFieldNo] = defaultValue || void 0;
|
|
6468
6485
|
if (cur.dataSearchBizIdTypeCode) queryList.push({
|
|
@@ -6625,11 +6642,13 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
6625
6642
|
ref: (el)=>setRef(el, item),
|
|
6626
6643
|
"layout-type-code": layoutTypeCode.value,
|
|
6627
6644
|
"data-value-names": dataValueNames.value,
|
|
6645
|
+
"change-cur-data": props.changeCurData,
|
|
6628
6646
|
key: item.formControlId,
|
|
6629
6647
|
"design-detail-info": item
|
|
6630
6648
|
}, null, 8, [
|
|
6631
6649
|
"layout-type-code",
|
|
6632
6650
|
"data-value-names",
|
|
6651
|
+
"change-cur-data",
|
|
6633
6652
|
"design-detail-info"
|
|
6634
6653
|
]))), 128))
|
|
6635
6654
|
]),
|
|
@@ -6672,7 +6691,7 @@ const FIELD_REF = 'fieldRef_'; // 存储动态 ref 的对象
|
|
|
6672
6691
|
const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(form_design_rendervue_type_script_setup_true_lang_tsx_name_FormDesignRender, [
|
|
6673
6692
|
[
|
|
6674
6693
|
'__scopeId',
|
|
6675
|
-
"data-v-
|
|
6694
|
+
"data-v-35271fd4"
|
|
6676
6695
|
]
|
|
6677
6696
|
]);
|
|
6678
6697
|
/* ESM default export */ const form_design_render = form_design_render_exports_;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { default as useRequest } from "./use-request/index.ts";
|
|
|
2
2
|
export { default as useAppConfigData, MAIN_APP_CONFIG, } from "./use-app-config/index.ts";
|
|
3
3
|
export type { PreferenceData } from "./use-app-config/index.ts";
|
|
4
4
|
export { default as useDirectionSelect } from "./use-direction-select/index.ts";
|
|
5
|
-
export { default as useFetchDataset } from "./use-fetch-dataset/index.ts";
|
|
5
|
+
export { default as useFetchDataset, queryDataSetByCodeSystemCodes, type CodeSystem } from "./use-fetch-dataset/index.ts";
|
|
6
6
|
export { default as useEditableTable } from './use-editable-table/index.ts';
|
|
7
7
|
export { useColumnConfig, useFormConfig, } from "./use-column&form-config/index.ts";
|