sun-biz 0.0.3-beta.15 → 0.0.3-beta.16
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/DmlButton/api/index.d.ts +13 -0
- package/dist/components/DmlButton/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +217 -55
- package/dist/hooks/use-app-config/types.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +217 -55
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [1-10008-1]根据条件生成DML脚本
|
|
3
|
+
* @param data
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export declare const exportDmlScriptByExample: (params: {
|
|
7
|
+
bizIdTypeCode: string;
|
|
8
|
+
bisIds: string[];
|
|
9
|
+
dataBaseTypeCode: string;
|
|
10
|
+
}) => Promise<[import("@sun-toolkit/request").SunApiResultData<null> | undefined, import("@sun-toolkit/request").SunApiResultData<{
|
|
11
|
+
data: string;
|
|
12
|
+
fileName: string;
|
|
13
|
+
}> | undefined]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DmlButton } from './index.vue';
|
|
@@ -9,3 +9,4 @@ export { AccessInfo } from "./access-info/index.ts";
|
|
|
9
9
|
export { FormDesignRender } from "./form-design-render/index.ts";
|
|
10
10
|
export { CopyTextWithTooltip } from "./copy-text-with-tooltip/index.ts";
|
|
11
11
|
export { DictSelect, FlagSelect, HospitalSelect } from "./biz-select/index.ts";
|
|
12
|
+
export { DmlButton } from "./DmlButton/index.ts";
|
package/dist/components/index.js
CHANGED
|
@@ -913,7 +913,8 @@ const _hoisted_3 = {
|
|
|
913
913
|
let [, result] = await queryDbgridComponentListByExample({
|
|
914
914
|
componentNo: props.componentNo,
|
|
915
915
|
pageNumber: 1,
|
|
916
|
-
pageSize: 1
|
|
916
|
+
pageSize: 1,
|
|
917
|
+
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
|
|
917
918
|
});
|
|
918
919
|
if (result?.success) {
|
|
919
920
|
if (result?.data?.length) {
|
|
@@ -1050,8 +1051,8 @@ const _hoisted_3 = {
|
|
|
1050
1051
|
dialogRef,
|
|
1051
1052
|
exportFileFlag
|
|
1052
1053
|
}); /**
|
|
1053
|
-
|
|
1054
|
-
|
|
1054
|
+
* 左右滚动
|
|
1055
|
+
*/
|
|
1055
1056
|
const scrollToColumn = (columnName)=>{
|
|
1056
1057
|
scrollKeyWord.value = columnName;
|
|
1057
1058
|
let columnIndex = tableColumn.value.findIndex((item)=>item.prop === columnName);
|
|
@@ -1222,7 +1223,7 @@ const _hoisted_3 = {
|
|
|
1222
1223
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1223
1224
|
[
|
|
1224
1225
|
'__scopeId',
|
|
1225
|
-
"data-v-
|
|
1226
|
+
"data-v-b4318bd8"
|
|
1226
1227
|
]
|
|
1227
1228
|
]);
|
|
1228
1229
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -1595,8 +1596,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1595
1596
|
const emit = __emit;
|
|
1596
1597
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
1597
1598
|
/**
|
|
1598
|
-
|
|
1599
|
-
|
|
1599
|
+
*获取参与排序的列表 索引 是否可以拖拽
|
|
1600
|
+
*/ function getDragSortData(newIndex, data, startIndexObj, sortData) {
|
|
1600
1601
|
data.forEach((item, index)=>{
|
|
1601
1602
|
startIndexObj.startIndex += 1;
|
|
1602
1603
|
if (startIndexObj.startIndex > newIndex) return;
|
|
@@ -1610,8 +1611,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1610
1611
|
return sortData;
|
|
1611
1612
|
}
|
|
1612
1613
|
/**
|
|
1613
|
-
|
|
1614
|
-
|
|
1614
|
+
* 获取拖拽排序数据结果
|
|
1615
|
+
*/ function getSortableResult(newIndex, oldIndex) {
|
|
1615
1616
|
let data = [
|
|
1616
1617
|
...state.tableData
|
|
1617
1618
|
];
|
|
@@ -1644,13 +1645,16 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1644
1645
|
return data;
|
|
1645
1646
|
}
|
|
1646
1647
|
/***
|
|
1647
|
-
|
|
1648
|
-
|
|
1648
|
+
* 表格拖拽排序
|
|
1649
|
+
**/ const initDragSort = ()=>{
|
|
1649
1650
|
const tbody = document.querySelector(`#${uuid.value} tbody`);
|
|
1650
1651
|
let initialHTML = ''; //暂不支持跨层级拖拽
|
|
1651
1652
|
if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
1652
1653
|
handle: '.cursor-move',
|
|
1653
1654
|
animation: 300,
|
|
1655
|
+
scroll: true,
|
|
1656
|
+
scrollSensitivity: 80,
|
|
1657
|
+
scrollSpeed: 10,
|
|
1654
1658
|
onEnd (evt) {
|
|
1655
1659
|
const { newIndex, oldIndex } = evt;
|
|
1656
1660
|
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
|
|
@@ -1693,8 +1697,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1693
1697
|
if (props.pagination && props?.fetchData && props.defaultQuery) fetchList();
|
|
1694
1698
|
});
|
|
1695
1699
|
/**
|
|
1696
|
-
|
|
1697
|
-
|
|
1700
|
+
* 获取列表
|
|
1701
|
+
*/ async function fetchList() {
|
|
1698
1702
|
state.loading = true;
|
|
1699
1703
|
let { total = 0, data = [] } = await (props.fetchData && props.fetchData(state.pageInfo)) || {};
|
|
1700
1704
|
state.pageInfo.total = Number(total);
|
|
@@ -1702,8 +1706,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1702
1706
|
state.loading = false;
|
|
1703
1707
|
}
|
|
1704
1708
|
/**
|
|
1705
|
-
|
|
1706
|
-
|
|
1709
|
+
* 分页组件改变 pageNumber 事件
|
|
1710
|
+
*/ const handleSizeChange = (val)=>{
|
|
1707
1711
|
if (props.fetchData) {
|
|
1708
1712
|
state.pageInfo.pageNumber = 1;
|
|
1709
1713
|
state.pageInfo.pageSize = val;
|
|
@@ -1711,8 +1715,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1711
1715
|
} else emit('size-page-change', val);
|
|
1712
1716
|
};
|
|
1713
1717
|
/**
|
|
1714
|
-
|
|
1715
|
-
|
|
1718
|
+
* 分页组件改变 当前页数 事件
|
|
1719
|
+
*/ function changeCurrentPage(val) {
|
|
1716
1720
|
if (props.fetchData) {
|
|
1717
1721
|
state.pageInfo.pageNumber = val;
|
|
1718
1722
|
fetchList();
|
|
@@ -1728,8 +1732,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1728
1732
|
// 分页配置信息
|
|
1729
1733
|
const paginationInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.pageInfo ?? state.pageInfo);
|
|
1730
1734
|
/**
|
|
1731
|
-
|
|
1732
|
-
|
|
1735
|
+
* 支持根据传递的filterObj完成过滤
|
|
1736
|
+
*/ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1733
1737
|
if (Object.keys(props.filterObj).length) return [
|
|
1734
1738
|
...state.tableData
|
|
1735
1739
|
].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
@@ -1772,8 +1776,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1772
1776
|
}
|
|
1773
1777
|
});
|
|
1774
1778
|
/**
|
|
1775
|
-
|
|
1776
|
-
|
|
1779
|
+
* 处理接口和本地的columns
|
|
1780
|
+
*/ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1777
1781
|
if (!props.componentNo) return props.columns;
|
|
1778
1782
|
{
|
|
1779
1783
|
let result = [
|
|
@@ -1800,8 +1804,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1800
1804
|
}
|
|
1801
1805
|
});
|
|
1802
1806
|
/**
|
|
1803
|
-
|
|
1804
|
-
|
|
1807
|
+
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
1808
|
+
*/ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1805
1809
|
let result = [
|
|
1806
1810
|
...commonColumns.value
|
|
1807
1811
|
];
|
|
@@ -3450,6 +3454,7 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
3450
3454
|
*/ DATA_SOURCE_CONTENT_TYPE_CODE["BASE64"] = "BASE64";
|
|
3451
3455
|
return DATA_SOURCE_CONTENT_TYPE_CODE;
|
|
3452
3456
|
}({});
|
|
3457
|
+
// 添加图标导入
|
|
3453
3458
|
/** 用于获取单据 */ const usePrintReceipt = (params, isInit = true)=>{
|
|
3454
3459
|
const menuXReceiptList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
3455
3460
|
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
@@ -3520,56 +3525,96 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
3520
3525
|
/** 设计或预览 */ function useDesignAndPreview(htmlContent, title = "设计", options = {}) {
|
|
3521
3526
|
// 创建一个容器元素
|
|
3522
3527
|
const container = document.createElement("div");
|
|
3528
|
+
// 是否全屏状态
|
|
3529
|
+
const isFullscreen = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
3523
3530
|
// 关闭弹窗的函数
|
|
3524
3531
|
const closeDialog = ()=>{
|
|
3525
3532
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(null, container); // 卸载组件
|
|
3526
3533
|
document.body.removeChild(container); // 移除容器
|
|
3527
3534
|
document.head.removeChild(style); // 移除样式
|
|
3528
3535
|
};
|
|
3536
|
+
// 切换全屏状态
|
|
3537
|
+
const toggleFullscreen = ()=>{
|
|
3538
|
+
isFullscreen.value = !isFullscreen.value;
|
|
3539
|
+
renderDialog();
|
|
3540
|
+
};
|
|
3529
3541
|
// 在渲染前动态创建并插入样式
|
|
3530
3542
|
const style = document.createElement("style");
|
|
3531
3543
|
style.innerHTML = `
|
|
3544
|
+
.custom-dialog__bodyContent {
|
|
3545
|
+
overflow: hidden !important;
|
|
3546
|
+
margin: 0px !important;
|
|
3547
|
+
}
|
|
3532
3548
|
.custom-dialog .el-dialog__headerbtn .el-icon {
|
|
3533
3549
|
width: 48px; /* 设置图标的宽度 */
|
|
3534
3550
|
height: 48px; /* 设置图标的高度 */
|
|
3535
3551
|
}
|
|
3552
|
+
.custom-dialog .el-dialog__header {
|
|
3553
|
+
position: relative;
|
|
3554
|
+
}
|
|
3555
|
+
.custom-dialog .fullscreen-btn {
|
|
3556
|
+
position: absolute;
|
|
3557
|
+
right: 50px;
|
|
3558
|
+
top: 14px;
|
|
3559
|
+
cursor: pointer;
|
|
3560
|
+
font-size: 16px;
|
|
3561
|
+
}
|
|
3536
3562
|
`;
|
|
3537
3563
|
document.head.appendChild(style);
|
|
3538
3564
|
// 使用 h 函数创建弹窗组件
|
|
3539
|
-
const
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3565
|
+
const renderDialog = ()=>{
|
|
3566
|
+
const dialog = (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElDialog, {
|
|
3567
|
+
modelValue: true,
|
|
3568
|
+
title: title,
|
|
3569
|
+
width: isFullscreen.value ? "100%" : "60vw",
|
|
3570
|
+
style: {
|
|
3571
|
+
height: isFullscreen.value ? "100%" : ""
|
|
3572
|
+
},
|
|
3573
|
+
onClose: ()=>{
|
|
3574
|
+
options.onCancel?.(); // 触发取消回调
|
|
3575
|
+
closeDialog();
|
|
3576
|
+
},
|
|
3577
|
+
class: isFullscreen.value ? "custom-dialog custom-dialog__bodyContent" : "custom-dialog"
|
|
3578
|
+
}, {
|
|
3579
|
+
header: ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {}, [
|
|
3580
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("span", {}, title),
|
|
3581
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {
|
|
3582
|
+
class: "fullscreen-btn",
|
|
3583
|
+
onClick: toggleFullscreen
|
|
3584
|
+
}, [
|
|
3585
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon, {}, {
|
|
3586
|
+
default: ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(isFullscreen.value ? __WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.CopyDocument : __WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.FullScreen)
|
|
3587
|
+
})
|
|
3588
|
+
])
|
|
3589
|
+
]),
|
|
3590
|
+
default: ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElScrollbar, {
|
|
3555
3591
|
style: {
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
innerHTML: htmlContent
|
|
3559
|
-
})),
|
|
3560
|
-
footer: options.footer ? options.footer : ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {
|
|
3561
|
-
class: "dialog-footer"
|
|
3562
|
-
}, [
|
|
3563
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton, {
|
|
3564
|
-
onClick: ()=>{
|
|
3565
|
-
options.onCancel?.(); // 触发取消回调
|
|
3566
|
-
closeDialog();
|
|
3592
|
+
height: isFullscreen.value ? "calc(100vh - 136px)" : "60vh",
|
|
3593
|
+
paddingRight: "10px"
|
|
3567
3594
|
}
|
|
3568
|
-
}, ()=>"
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3595
|
+
}, ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {
|
|
3596
|
+
style: {
|
|
3597
|
+
padding: "10px"
|
|
3598
|
+
},
|
|
3599
|
+
innerHTML: htmlContent
|
|
3600
|
+
})),
|
|
3601
|
+
footer: options.footer ? options.footer : ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {
|
|
3602
|
+
class: "dialog-footer",
|
|
3603
|
+
style: {}
|
|
3604
|
+
}, [
|
|
3605
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton, {
|
|
3606
|
+
onClick: ()=>{
|
|
3607
|
+
options.onCancel?.(); // 触发取消回调
|
|
3608
|
+
closeDialog();
|
|
3609
|
+
}
|
|
3610
|
+
}, ()=>"取消")
|
|
3611
|
+
])
|
|
3612
|
+
});
|
|
3613
|
+
// 将弹窗渲染到容器中
|
|
3614
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(dialog, container);
|
|
3615
|
+
};
|
|
3616
|
+
// 初始渲染
|
|
3617
|
+
renderDialog();
|
|
3573
3618
|
// 将容器添加到 body
|
|
3574
3619
|
document.body.appendChild(container);
|
|
3575
3620
|
}
|
|
@@ -5723,6 +5768,123 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
5723
5768
|
});
|
|
5724
5769
|
const access_info_exports_ = access_infovue_type_script_setup_true_lang_ts_name_accessInfo;
|
|
5725
5770
|
/* ESM default export */ const access_info = access_info_exports_;
|
|
5771
|
+
/**
|
|
5772
|
+
* [1-10008-1]根据条件生成DML脚本
|
|
5773
|
+
* @param data
|
|
5774
|
+
* @returns
|
|
5775
|
+
*/ const exportDmlScriptByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/dictCommon/exportDmlScriptByExample', params);
|
|
5776
|
+
//isCloudEnv,true指云端,false其他是用户端(暂定)
|
|
5777
|
+
/* ESM default export */ const DmlButtonvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5778
|
+
__name: 'index',
|
|
5779
|
+
props: {
|
|
5780
|
+
code: {},
|
|
5781
|
+
bizData: {
|
|
5782
|
+
default: ()=>[]
|
|
5783
|
+
},
|
|
5784
|
+
disabled: {
|
|
5785
|
+
type: Boolean,
|
|
5786
|
+
default: true
|
|
5787
|
+
},
|
|
5788
|
+
title: {
|
|
5789
|
+
default: 'MDL'
|
|
5790
|
+
}
|
|
5791
|
+
},
|
|
5792
|
+
emits: [
|
|
5793
|
+
'success'
|
|
5794
|
+
],
|
|
5795
|
+
setup (__props, { emit: __emit }) {
|
|
5796
|
+
const emits = __emit;
|
|
5797
|
+
const { isCloudEnv } = use_app_config([
|
|
5798
|
+
use_app_config_MAIN_APP_CONFIG.IS_CLOUD_ENV
|
|
5799
|
+
]);
|
|
5800
|
+
function useGetDMLList() {
|
|
5801
|
+
const dataSetList = use_fetch_dataset_useFetchDataset([
|
|
5802
|
+
'HBI000.4001'
|
|
5803
|
+
]);
|
|
5804
|
+
const dmlList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>(dataSetList?.value?.['HBI000.4001'] || []).map((item)=>({
|
|
5805
|
+
value: item.dataValueNo,
|
|
5806
|
+
label: item.dataValueCnName
|
|
5807
|
+
})));
|
|
5808
|
+
return dmlList;
|
|
5809
|
+
}
|
|
5810
|
+
const disabledLoad = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
5811
|
+
if (!__props.disabled) return __props.disabled;
|
|
5812
|
+
return 0 === __props.bizData.length || !isCloudEnv;
|
|
5813
|
+
});
|
|
5814
|
+
const dmlList = useGetDMLList();
|
|
5815
|
+
async function clickDropdown(item) {
|
|
5816
|
+
const [, res] = await exportDmlScriptByExample({
|
|
5817
|
+
bizIdTypeCode: __props.code,
|
|
5818
|
+
bisIds: __props.bizData,
|
|
5819
|
+
dataBaseTypeCode: item.value
|
|
5820
|
+
});
|
|
5821
|
+
if (res?.success) {
|
|
5822
|
+
(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.downloadFile)(res?.data);
|
|
5823
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success('导出成功');
|
|
5824
|
+
emits('success');
|
|
5825
|
+
}
|
|
5826
|
+
}
|
|
5827
|
+
return (_ctx, _cache)=>{
|
|
5828
|
+
const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
|
|
5829
|
+
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
5830
|
+
const _component_el_dropdown_item = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-dropdown-item");
|
|
5831
|
+
const _component_el_dropdown_menu = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-dropdown-menu");
|
|
5832
|
+
const _component_el_dropdown = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-dropdown");
|
|
5833
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_dropdown, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
5834
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5835
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
|
|
5836
|
+
type: "primary",
|
|
5837
|
+
disabled: disabledLoad.value
|
|
5838
|
+
}, {
|
|
5839
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5840
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.title) + " ", 1),
|
|
5841
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_icon, {
|
|
5842
|
+
class: "el-icon--right"
|
|
5843
|
+
}, {
|
|
5844
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5845
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.ArrowDown))
|
|
5846
|
+
]),
|
|
5847
|
+
_: 1
|
|
5848
|
+
})
|
|
5849
|
+
]),
|
|
5850
|
+
_: 1
|
|
5851
|
+
}, 8, [
|
|
5852
|
+
"disabled"
|
|
5853
|
+
]),
|
|
5854
|
+
disabledLoad.value ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default", {
|
|
5855
|
+
key: 0
|
|
5856
|
+
})
|
|
5857
|
+
]),
|
|
5858
|
+
_: 2
|
|
5859
|
+
}, [
|
|
5860
|
+
disabledLoad.value ? void 0 : {
|
|
5861
|
+
name: "dropdown",
|
|
5862
|
+
fn: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5863
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_dropdown_menu, null, {
|
|
5864
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5865
|
+
((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)(dmlList), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_dropdown_item, {
|
|
5866
|
+
key: item.value,
|
|
5867
|
+
onClick: ($event)=>clickDropdown(item)
|
|
5868
|
+
}, {
|
|
5869
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5870
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.label), 1)
|
|
5871
|
+
]),
|
|
5872
|
+
_: 2
|
|
5873
|
+
}, 1032, [
|
|
5874
|
+
"onClick"
|
|
5875
|
+
]))), 128))
|
|
5876
|
+
]),
|
|
5877
|
+
_: 1
|
|
5878
|
+
})
|
|
5879
|
+
]),
|
|
5880
|
+
key: "0"
|
|
5881
|
+
}
|
|
5882
|
+
]), 1024);
|
|
5883
|
+
};
|
|
5884
|
+
}
|
|
5885
|
+
});
|
|
5886
|
+
const DmlButton_exports_ = DmlButtonvue_type_script_setup_true_lang_ts;
|
|
5887
|
+
/* ESM default export */ const DmlButton = DmlButton_exports_;
|
|
5726
5888
|
function useTableColumnsConfig(options) {
|
|
5727
5889
|
const { currentRow } = options;
|
|
5728
5890
|
const tableColumns = useColumnConfig({
|
|
@@ -5940,4 +6102,4 @@ const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_4 = {
|
|
|
5940
6102
|
const invoice_exports_ = invoicevue_type_script_setup_true_lang_ts_name_proInvoice;
|
|
5941
6103
|
/* ESM default export */ const invoice = invoice_exports_;
|
|
5942
6104
|
var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
|
|
5943
|
-
export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, Title, convertToSpellNo, convertToWbNo, print, usePrintReceipt, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|
|
6105
|
+
export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, Title, convertToSpellNo, convertToWbNo, print, usePrintReceipt, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|
|
@@ -16,6 +16,7 @@ export type UserInfo = {
|
|
|
16
16
|
userId: string;
|
|
17
17
|
userName: string;
|
|
18
18
|
adminFlag: 0 | 1;
|
|
19
|
+
userTypeCode: string;
|
|
19
20
|
};
|
|
20
21
|
export type PreferenceData = {
|
|
21
22
|
preferId?: string;
|
|
@@ -30,7 +31,7 @@ export interface AppConfigType {
|
|
|
30
31
|
* 系统菜单ID
|
|
31
32
|
*/
|
|
32
33
|
menuId: string;
|
|
33
|
-
|
|
34
|
+
/**
|
|
34
35
|
* 是否为云环境
|
|
35
36
|
*/
|
|
36
37
|
isCloudEnv: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { FormDesignRender } from "./components/form-design-render";
|
|
|
10
10
|
export { ProDialog } from "./components/pro-dialog";
|
|
11
11
|
export { AccessInfo } from "./components/access-info";
|
|
12
12
|
export { ProForm, FormUnit, convertToWbNo, convertToSpellNo, } from "./components/pro-form";
|
|
13
|
+
export { DmlButton } from "./components/DmlButton";
|
|
13
14
|
/** hooks ** */
|
|
14
15
|
export { default as useRequest } from "./hooks/use-request";
|
|
15
16
|
export { default as useAppConfigData, MAIN_APP_CONFIG, } from "./hooks/use-app-config";
|
package/dist/index.js
CHANGED
|
@@ -914,7 +914,8 @@ const _hoisted_3 = {
|
|
|
914
914
|
let [, result] = await queryDbgridComponentListByExample({
|
|
915
915
|
componentNo: props.componentNo,
|
|
916
916
|
pageNumber: 1,
|
|
917
|
-
pageSize: 1
|
|
917
|
+
pageSize: 1,
|
|
918
|
+
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES
|
|
918
919
|
});
|
|
919
920
|
if (result?.success) {
|
|
920
921
|
if (result?.data?.length) {
|
|
@@ -1051,8 +1052,8 @@ const _hoisted_3 = {
|
|
|
1051
1052
|
dialogRef,
|
|
1052
1053
|
exportFileFlag
|
|
1053
1054
|
}); /**
|
|
1054
|
-
|
|
1055
|
-
|
|
1055
|
+
* 左右滚动
|
|
1056
|
+
*/
|
|
1056
1057
|
const scrollToColumn = (columnName)=>{
|
|
1057
1058
|
scrollKeyWord.value = columnName;
|
|
1058
1059
|
let columnIndex = tableColumn.value.findIndex((item)=>item.prop === columnName);
|
|
@@ -1223,7 +1224,7 @@ const _hoisted_3 = {
|
|
|
1223
1224
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1224
1225
|
[
|
|
1225
1226
|
'__scopeId',
|
|
1226
|
-
"data-v-
|
|
1227
|
+
"data-v-b4318bd8"
|
|
1227
1228
|
]
|
|
1228
1229
|
]);
|
|
1229
1230
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -1596,8 +1597,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1596
1597
|
const emit = __emit;
|
|
1597
1598
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
1598
1599
|
/**
|
|
1599
|
-
|
|
1600
|
-
|
|
1600
|
+
*获取参与排序的列表 索引 是否可以拖拽
|
|
1601
|
+
*/ function getDragSortData(newIndex, data, startIndexObj, sortData) {
|
|
1601
1602
|
data.forEach((item, index)=>{
|
|
1602
1603
|
startIndexObj.startIndex += 1;
|
|
1603
1604
|
if (startIndexObj.startIndex > newIndex) return;
|
|
@@ -1611,8 +1612,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1611
1612
|
return sortData;
|
|
1612
1613
|
}
|
|
1613
1614
|
/**
|
|
1614
|
-
|
|
1615
|
-
|
|
1615
|
+
* 获取拖拽排序数据结果
|
|
1616
|
+
*/ function getSortableResult(newIndex, oldIndex) {
|
|
1616
1617
|
let data = [
|
|
1617
1618
|
...state.tableData
|
|
1618
1619
|
];
|
|
@@ -1645,13 +1646,16 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1645
1646
|
return data;
|
|
1646
1647
|
}
|
|
1647
1648
|
/***
|
|
1648
|
-
|
|
1649
|
-
|
|
1649
|
+
* 表格拖拽排序
|
|
1650
|
+
**/ const initDragSort = ()=>{
|
|
1650
1651
|
const tbody = document.querySelector(`#${uuid.value} tbody`);
|
|
1651
1652
|
let initialHTML = ''; //暂不支持跨层级拖拽
|
|
1652
1653
|
if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
1653
1654
|
handle: '.cursor-move',
|
|
1654
1655
|
animation: 300,
|
|
1656
|
+
scroll: true,
|
|
1657
|
+
scrollSensitivity: 80,
|
|
1658
|
+
scrollSpeed: 10,
|
|
1655
1659
|
onEnd (evt) {
|
|
1656
1660
|
const { newIndex, oldIndex } = evt;
|
|
1657
1661
|
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
|
|
@@ -1694,8 +1698,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1694
1698
|
if (props.pagination && props?.fetchData && props.defaultQuery) fetchList();
|
|
1695
1699
|
});
|
|
1696
1700
|
/**
|
|
1697
|
-
|
|
1698
|
-
|
|
1701
|
+
* 获取列表
|
|
1702
|
+
*/ async function fetchList() {
|
|
1699
1703
|
state.loading = true;
|
|
1700
1704
|
let { total = 0, data = [] } = await (props.fetchData && props.fetchData(state.pageInfo)) || {};
|
|
1701
1705
|
state.pageInfo.total = Number(total);
|
|
@@ -1703,8 +1707,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1703
1707
|
state.loading = false;
|
|
1704
1708
|
}
|
|
1705
1709
|
/**
|
|
1706
|
-
|
|
1707
|
-
|
|
1710
|
+
* 分页组件改变 pageNumber 事件
|
|
1711
|
+
*/ const handleSizeChange = (val)=>{
|
|
1708
1712
|
if (props.fetchData) {
|
|
1709
1713
|
state.pageInfo.pageNumber = 1;
|
|
1710
1714
|
state.pageInfo.pageSize = val;
|
|
@@ -1712,8 +1716,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1712
1716
|
} else emit('size-page-change', val);
|
|
1713
1717
|
};
|
|
1714
1718
|
/**
|
|
1715
|
-
|
|
1716
|
-
|
|
1719
|
+
* 分页组件改变 当前页数 事件
|
|
1720
|
+
*/ function changeCurrentPage(val) {
|
|
1717
1721
|
if (props.fetchData) {
|
|
1718
1722
|
state.pageInfo.pageNumber = val;
|
|
1719
1723
|
fetchList();
|
|
@@ -1729,8 +1733,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1729
1733
|
// 分页配置信息
|
|
1730
1734
|
const paginationInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.pageInfo ?? state.pageInfo);
|
|
1731
1735
|
/**
|
|
1732
|
-
|
|
1733
|
-
|
|
1736
|
+
* 支持根据传递的filterObj完成过滤
|
|
1737
|
+
*/ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1734
1738
|
if (Object.keys(props.filterObj).length) return [
|
|
1735
1739
|
...state.tableData
|
|
1736
1740
|
].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
@@ -1773,8 +1777,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1773
1777
|
}
|
|
1774
1778
|
});
|
|
1775
1779
|
/**
|
|
1776
|
-
|
|
1777
|
-
|
|
1780
|
+
* 处理接口和本地的columns
|
|
1781
|
+
*/ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1778
1782
|
if (!props.componentNo) return props.columns;
|
|
1779
1783
|
{
|
|
1780
1784
|
let result = [
|
|
@@ -1801,8 +1805,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1801
1805
|
}
|
|
1802
1806
|
});
|
|
1803
1807
|
/**
|
|
1804
|
-
|
|
1805
|
-
|
|
1808
|
+
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
1809
|
+
*/ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1806
1810
|
let result = [
|
|
1807
1811
|
...commonColumns.value
|
|
1808
1812
|
];
|
|
@@ -3848,6 +3852,7 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
3848
3852
|
*/ DATA_SOURCE_CONTENT_TYPE_CODE["BASE64"] = "BASE64";
|
|
3849
3853
|
return DATA_SOURCE_CONTENT_TYPE_CODE;
|
|
3850
3854
|
}({});
|
|
3855
|
+
// 添加图标导入
|
|
3851
3856
|
/** 用于获取单据 */ const usePrintReceipt = (params, isInit = true)=>{
|
|
3852
3857
|
const menuXReceiptList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
3853
3858
|
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
@@ -3918,56 +3923,96 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
|
|
|
3918
3923
|
/** 设计或预览 */ function useDesignAndPreview(htmlContent, title = "设计", options = {}) {
|
|
3919
3924
|
// 创建一个容器元素
|
|
3920
3925
|
const container = document.createElement("div");
|
|
3926
|
+
// 是否全屏状态
|
|
3927
|
+
const isFullscreen = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
3921
3928
|
// 关闭弹窗的函数
|
|
3922
3929
|
const closeDialog = ()=>{
|
|
3923
3930
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(null, container); // 卸载组件
|
|
3924
3931
|
document.body.removeChild(container); // 移除容器
|
|
3925
3932
|
document.head.removeChild(style); // 移除样式
|
|
3926
3933
|
};
|
|
3934
|
+
// 切换全屏状态
|
|
3935
|
+
const toggleFullscreen = ()=>{
|
|
3936
|
+
isFullscreen.value = !isFullscreen.value;
|
|
3937
|
+
renderDialog();
|
|
3938
|
+
};
|
|
3927
3939
|
// 在渲染前动态创建并插入样式
|
|
3928
3940
|
const style = document.createElement("style");
|
|
3929
3941
|
style.innerHTML = `
|
|
3942
|
+
.custom-dialog__bodyContent {
|
|
3943
|
+
overflow: hidden !important;
|
|
3944
|
+
margin: 0px !important;
|
|
3945
|
+
}
|
|
3930
3946
|
.custom-dialog .el-dialog__headerbtn .el-icon {
|
|
3931
3947
|
width: 48px; /* 设置图标的宽度 */
|
|
3932
3948
|
height: 48px; /* 设置图标的高度 */
|
|
3933
3949
|
}
|
|
3950
|
+
.custom-dialog .el-dialog__header {
|
|
3951
|
+
position: relative;
|
|
3952
|
+
}
|
|
3953
|
+
.custom-dialog .fullscreen-btn {
|
|
3954
|
+
position: absolute;
|
|
3955
|
+
right: 50px;
|
|
3956
|
+
top: 14px;
|
|
3957
|
+
cursor: pointer;
|
|
3958
|
+
font-size: 16px;
|
|
3959
|
+
}
|
|
3934
3960
|
`;
|
|
3935
3961
|
document.head.appendChild(style);
|
|
3936
3962
|
// 使用 h 函数创建弹窗组件
|
|
3937
|
-
const
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3963
|
+
const renderDialog = ()=>{
|
|
3964
|
+
const dialog = (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElDialog, {
|
|
3965
|
+
modelValue: true,
|
|
3966
|
+
title: title,
|
|
3967
|
+
width: isFullscreen.value ? "100%" : "60vw",
|
|
3968
|
+
style: {
|
|
3969
|
+
height: isFullscreen.value ? "100%" : ""
|
|
3970
|
+
},
|
|
3971
|
+
onClose: ()=>{
|
|
3972
|
+
options.onCancel?.(); // 触发取消回调
|
|
3973
|
+
closeDialog();
|
|
3974
|
+
},
|
|
3975
|
+
class: isFullscreen.value ? "custom-dialog custom-dialog__bodyContent" : "custom-dialog"
|
|
3976
|
+
}, {
|
|
3977
|
+
header: ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {}, [
|
|
3978
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("span", {}, title),
|
|
3979
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {
|
|
3980
|
+
class: "fullscreen-btn",
|
|
3981
|
+
onClick: toggleFullscreen
|
|
3982
|
+
}, [
|
|
3983
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon, {}, {
|
|
3984
|
+
default: ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(isFullscreen.value ? __WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.CopyDocument : __WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.FullScreen)
|
|
3985
|
+
})
|
|
3986
|
+
])
|
|
3987
|
+
]),
|
|
3988
|
+
default: ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElScrollbar, {
|
|
3953
3989
|
style: {
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
innerHTML: htmlContent
|
|
3957
|
-
})),
|
|
3958
|
-
footer: options.footer ? options.footer : ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {
|
|
3959
|
-
class: "dialog-footer"
|
|
3960
|
-
}, [
|
|
3961
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton, {
|
|
3962
|
-
onClick: ()=>{
|
|
3963
|
-
options.onCancel?.(); // 触发取消回调
|
|
3964
|
-
closeDialog();
|
|
3990
|
+
height: isFullscreen.value ? "calc(100vh - 136px)" : "60vh",
|
|
3991
|
+
paddingRight: "10px"
|
|
3965
3992
|
}
|
|
3966
|
-
}, ()=>"
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3993
|
+
}, ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {
|
|
3994
|
+
style: {
|
|
3995
|
+
padding: "10px"
|
|
3996
|
+
},
|
|
3997
|
+
innerHTML: htmlContent
|
|
3998
|
+
})),
|
|
3999
|
+
footer: options.footer ? options.footer : ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {
|
|
4000
|
+
class: "dialog-footer",
|
|
4001
|
+
style: {}
|
|
4002
|
+
}, [
|
|
4003
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton, {
|
|
4004
|
+
onClick: ()=>{
|
|
4005
|
+
options.onCancel?.(); // 触发取消回调
|
|
4006
|
+
closeDialog();
|
|
4007
|
+
}
|
|
4008
|
+
}, ()=>"取消")
|
|
4009
|
+
])
|
|
4010
|
+
});
|
|
4011
|
+
// 将弹窗渲染到容器中
|
|
4012
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.render)(dialog, container);
|
|
4013
|
+
};
|
|
4014
|
+
// 初始渲染
|
|
4015
|
+
renderDialog();
|
|
3971
4016
|
// 将容器添加到 body
|
|
3972
4017
|
document.body.appendChild(container);
|
|
3973
4018
|
}
|
|
@@ -5601,6 +5646,123 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
5601
5646
|
});
|
|
5602
5647
|
const access_info_exports_ = access_infovue_type_script_setup_true_lang_ts_name_accessInfo;
|
|
5603
5648
|
/* ESM default export */ const access_info = access_info_exports_;
|
|
5649
|
+
/**
|
|
5650
|
+
* [1-10008-1]根据条件生成DML脚本
|
|
5651
|
+
* @param data
|
|
5652
|
+
* @returns
|
|
5653
|
+
*/ const exportDmlScriptByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/dictCommon/exportDmlScriptByExample', params);
|
|
5654
|
+
//isCloudEnv,true指云端,false其他是用户端(暂定)
|
|
5655
|
+
/* ESM default export */ const DmlButtonvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5656
|
+
__name: 'index',
|
|
5657
|
+
props: {
|
|
5658
|
+
code: {},
|
|
5659
|
+
bizData: {
|
|
5660
|
+
default: ()=>[]
|
|
5661
|
+
},
|
|
5662
|
+
disabled: {
|
|
5663
|
+
type: Boolean,
|
|
5664
|
+
default: true
|
|
5665
|
+
},
|
|
5666
|
+
title: {
|
|
5667
|
+
default: 'MDL'
|
|
5668
|
+
}
|
|
5669
|
+
},
|
|
5670
|
+
emits: [
|
|
5671
|
+
'success'
|
|
5672
|
+
],
|
|
5673
|
+
setup (__props, { emit: __emit }) {
|
|
5674
|
+
const emits = __emit;
|
|
5675
|
+
const { isCloudEnv } = use_app_config([
|
|
5676
|
+
use_app_config_MAIN_APP_CONFIG.IS_CLOUD_ENV
|
|
5677
|
+
]);
|
|
5678
|
+
function useGetDMLList() {
|
|
5679
|
+
const dataSetList = useFetchDataset([
|
|
5680
|
+
'HBI000.4001'
|
|
5681
|
+
]);
|
|
5682
|
+
const dmlList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>(dataSetList?.value?.['HBI000.4001'] || []).map((item)=>({
|
|
5683
|
+
value: item.dataValueNo,
|
|
5684
|
+
label: item.dataValueCnName
|
|
5685
|
+
})));
|
|
5686
|
+
return dmlList;
|
|
5687
|
+
}
|
|
5688
|
+
const disabledLoad = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
5689
|
+
if (!__props.disabled) return __props.disabled;
|
|
5690
|
+
return 0 === __props.bizData.length || !isCloudEnv;
|
|
5691
|
+
});
|
|
5692
|
+
const dmlList = useGetDMLList();
|
|
5693
|
+
async function clickDropdown(item) {
|
|
5694
|
+
const [, res] = await exportDmlScriptByExample({
|
|
5695
|
+
bizIdTypeCode: __props.code,
|
|
5696
|
+
bisIds: __props.bizData,
|
|
5697
|
+
dataBaseTypeCode: item.value
|
|
5698
|
+
});
|
|
5699
|
+
if (res?.success) {
|
|
5700
|
+
(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.downloadFile)(res?.data);
|
|
5701
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success('导出成功');
|
|
5702
|
+
emits('success');
|
|
5703
|
+
}
|
|
5704
|
+
}
|
|
5705
|
+
return (_ctx, _cache)=>{
|
|
5706
|
+
const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
|
|
5707
|
+
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
5708
|
+
const _component_el_dropdown_item = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-dropdown-item");
|
|
5709
|
+
const _component_el_dropdown_menu = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-dropdown-menu");
|
|
5710
|
+
const _component_el_dropdown = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-dropdown");
|
|
5711
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_dropdown, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
5712
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5713
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
|
|
5714
|
+
type: "primary",
|
|
5715
|
+
disabled: disabledLoad.value
|
|
5716
|
+
}, {
|
|
5717
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5718
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.title) + " ", 1),
|
|
5719
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_icon, {
|
|
5720
|
+
class: "el-icon--right"
|
|
5721
|
+
}, {
|
|
5722
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5723
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.ArrowDown))
|
|
5724
|
+
]),
|
|
5725
|
+
_: 1
|
|
5726
|
+
})
|
|
5727
|
+
]),
|
|
5728
|
+
_: 1
|
|
5729
|
+
}, 8, [
|
|
5730
|
+
"disabled"
|
|
5731
|
+
]),
|
|
5732
|
+
disabledLoad.value ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default", {
|
|
5733
|
+
key: 0
|
|
5734
|
+
})
|
|
5735
|
+
]),
|
|
5736
|
+
_: 2
|
|
5737
|
+
}, [
|
|
5738
|
+
disabledLoad.value ? void 0 : {
|
|
5739
|
+
name: "dropdown",
|
|
5740
|
+
fn: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5741
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_dropdown_menu, null, {
|
|
5742
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5743
|
+
((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)(dmlList), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_dropdown_item, {
|
|
5744
|
+
key: item.value,
|
|
5745
|
+
onClick: ($event)=>clickDropdown(item)
|
|
5746
|
+
}, {
|
|
5747
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5748
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.label), 1)
|
|
5749
|
+
]),
|
|
5750
|
+
_: 2
|
|
5751
|
+
}, 1032, [
|
|
5752
|
+
"onClick"
|
|
5753
|
+
]))), 128))
|
|
5754
|
+
]),
|
|
5755
|
+
_: 1
|
|
5756
|
+
})
|
|
5757
|
+
]),
|
|
5758
|
+
key: "0"
|
|
5759
|
+
}
|
|
5760
|
+
]), 1024);
|
|
5761
|
+
};
|
|
5762
|
+
}
|
|
5763
|
+
});
|
|
5764
|
+
const DmlButton_exports_ = DmlButtonvue_type_script_setup_true_lang_ts;
|
|
5765
|
+
/* ESM default export */ const DmlButton = DmlButton_exports_;
|
|
5604
5766
|
/* ESM default export */ const Collapsevue_type_script_setup_true_lang_tsx = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5605
5767
|
__name: 'Collapse',
|
|
5606
5768
|
props: {
|
|
@@ -6338,4 +6500,4 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
|
|
|
6338
6500
|
]);
|
|
6339
6501
|
/* ESM default export */ const form_design_render = form_design_render_exports_;
|
|
6340
6502
|
/** components **/ /** hooks ** */ var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
|
|
6341
|
-
export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, Title, convertToSpellNo, convertToWbNo, debounce, decimalCount, formatDecimalNumber, isNumber, print, use_app_config as useAppConfigData, useColumnConfig, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|
|
6503
|
+
export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, Title, convertToSpellNo, convertToWbNo, debounce, decimalCount, formatDecimalNumber, isNumber, print, use_app_config as useAppConfigData, useColumnConfig, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|