@luck-design-biz/luckda 1.0.2-2 → 1.0.2-20
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/es/components/Builder/index.js +13 -10
- package/es/components/ComplexItem/index.js +5 -3
- package/es/components/ComplexItem/service.js +6 -3
- package/es/components/LDActions/index.js +1 -0
- package/es/components/LdAutoForm/index.js +5 -4
- package/es/components/LdCard/index.js +10 -8
- package/es/components/LdCom/index.js +3 -2
- package/es/components/LdFormList/index.js +10 -7
- package/es/components/LdGrid/index.js +11 -12
- package/es/components/LdGridForm/index.js +5 -4
- package/es/helper/FromItems.js +64 -5
- package/es/helper/action.js +2 -0
- package/es/helper/ldBuilder.js +5 -4
- package/es/helper/ldComBuild.js +16 -11
- package/es/locales/zh-CN.js +61 -6
- package/es/lowcode/constants/api-url.js +359 -190
- package/es/lowcode/constants/event-topics.js +4 -0
- package/es/lowcode/constants/index.js +5 -4
- package/es/lowcode/engine/meta/box.props.default.json +1 -1
- package/es/lowcode/engine/meta/box.props.json +1 -1
- package/es/lowcode/engine/meta/cardlist.props.json +3 -5
- package/es/lowcode/engine/meta/components-list.json +6 -0
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -1
- package/es/lowcode/engine/meta/dialog.props.json +24 -4
- package/es/lowcode/engine/meta/drawer.props.json +1 -1
- package/es/lowcode/engine/meta/fielddate.props.default.json +1 -0
- package/es/lowcode/engine/meta/fielddate.props.json +48 -1
- package/es/lowcode/engine/meta/fieldeditor.props.json +0 -1
- package/es/lowcode/engine/meta/fieldgroup.props.json +0 -1
- package/es/lowcode/engine/meta/fieldyear.props.json +0 -1
- package/es/lowcode/engine/meta/form.props.json +3 -19
- package/es/lowcode/engine/meta/grouptree.props.json +0 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +5 -0
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -2
- package/es/lowcode/engine/meta/jsx.props.json +4 -3
- package/es/lowcode/engine/meta/layout.props.default.json +1 -1
- package/es/lowcode/engine/meta/layout.props.json +1 -1
- package/es/lowcode/engine/meta/proxy.props.default.json +15 -0
- package/es/lowcode/engine/meta/proxy.props.json +66 -0
- package/es/lowcode/engine/meta/section.props.json +2 -2
- package/es/lowcode/engine/meta/table.props.json +0 -7
- package/es/lowcode/engine/meta/tabs.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.json +1 -5
- package/es/lowcode/engine/provider/ContextProvider/index.js +45 -9
- package/es/lowcode/engine/provider/ContextProvider/router.js +21 -1
- package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +36 -30
- package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +11 -5
- package/es/lowcode/engine/provider/ContextProvider/useTodo.js +2 -4
- package/es/lowcode/engine/provider/EventBusProvider.js +14 -4
- package/es/lowcode/engine/provider/PageProxyProvider.js +95 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +10 -12
- package/es/lowcode/engine/tools/helper.js +25 -1
- package/es/lowcode/engine/tools/initDS.js +4 -4
- package/es/lowcode/painter/Design.js +1 -0
- package/es/lowcode/painter/DesignOperator.js +135 -27
- package/es/lowcode/painter/DesignToolbar.js +102 -188
- package/es/lowcode/painter/History.js +300 -0
- package/es/lowcode/painter/Panel.js +1 -1
- package/es/lowcode/painter/Ribbon.js +37 -1
- package/es/lowcode/painter/components/AdvancePanel.js +55 -51
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +10 -3
- package/es/lowcode/painter/components/TipIcon.js +12 -4
- package/es/lowcode/painter/components/TreeEditor.js +76 -8
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +10 -6
- package/es/lowcode/painter/components/code-editor/DiffEditor.js +41 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/es/lowcode/painter/components/field-setting/SettingUI.js +56 -5
- package/es/lowcode/painter/components/field-setting/index.js +24 -1
- package/es/lowcode/painter/components/shortcut-modal/KeyIcon.js +11 -0
- package/es/lowcode/painter/components/shortcut-modal/index.js +208 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +10 -19
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +4 -1
- package/es/lowcode/painter/panel-section/ConditionCheck.js +70 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +6 -3
- package/es/lowcode/painter/panel-section/DialogSize.js +76 -0
- package/es/lowcode/painter/panel-section/DialogWidthHeight.js +60 -0
- package/es/lowcode/painter/panel-section/FieldsSetting.js +1 -1
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +2 -2
- package/es/lowcode/painter/panel-section/JSEditor/ToolBar.js +174 -0
- package/es/lowcode/painter/panel-section/JSEditor/index.js +181 -0
- package/es/lowcode/painter/panel-section/JSEditor/index.less +4 -0
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +7 -2
- package/es/lowcode/painter/panel-section/ProxyLinker.js +137 -0
- package/es/lowcode/painter/panel-section/ProxyParams.js +28 -0
- package/es/lowcode/painter/panel-section/ProxyParamsSetter.js +240 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +37 -26
- package/es/lowcode/painter/style/action-bind-modal.less +1 -1
- package/es/lowcode/painter/style/components.less +1 -1
- package/es/lowcode/painter/style/history.less +46 -0
- package/es/lowcode/painter/style/outline.less +1 -1
- package/es/lowcode/painter/style/panel-item.less +1 -0
- package/es/lowcode/preview/DebugTool.js +78 -0
- package/es/lowcode/preview/DebugToolDetail.js +103 -0
- package/es/lowcode/preview/index.js +10 -17
- package/es/lowcode/preview/useDebugSettings.js +62 -0
- package/es/lowcode/view/Canvas.js +5 -1
- package/es/lowcode/view/ErrorBoundary.js +80 -0
- package/es/lowcode/view/Page.js +11 -6
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +4 -2
- package/es/lowcode/view/lc-components/Box/index.less +2 -2
- package/es/lowcode/view/lc-components/Box/meta.json +1 -1
- package/es/lowcode/view/lc-components/CardList/index.js +3 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +3 -5
- package/es/lowcode/view/lc-components/Dialog/index.js +13 -5
- package/es/lowcode/view/lc-components/Dialog/meta.json +24 -4
- package/es/lowcode/view/lc-components/Drawer/index.js +5 -3
- package/es/lowcode/view/lc-components/Drawer/meta.json +1 -1
- package/es/lowcode/view/lc-components/FieldDate/meta.json +48 -1
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +0 -1
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +0 -1
- package/es/lowcode/view/lc-components/FieldYear/meta.json +0 -1
- package/es/lowcode/view/lc-components/Form/index.js +15 -19
- package/es/lowcode/view/lc-components/Form/meta.json +3 -19
- package/es/lowcode/view/lc-components/GroupTree/meta.json +0 -1
- package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +32 -16
- package/es/lowcode/view/lc-components/JSX/meta.json +4 -3
- package/es/lowcode/view/lc-components/Layout/meta.json +1 -1
- package/es/lowcode/view/lc-components/PageLayout/index.js +1 -1
- package/es/lowcode/view/lc-components/Proxy/FunctionDesign.js +17 -0
- package/es/lowcode/view/lc-components/Proxy/FunctionLive.js +23 -0
- package/es/lowcode/view/lc-components/Proxy/FunctionPreview.js +23 -0
- package/es/lowcode/view/lc-components/Proxy/index.js +42 -0
- package/es/lowcode/view/lc-components/Proxy/index.less +5 -0
- package/es/lowcode/view/lc-components/Proxy/meta.json +66 -0
- package/es/lowcode/view/lc-components/Section/meta.json +2 -2
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +16 -13
- package/es/lowcode/view/lc-components/Table/index.js +11 -3
- package/es/lowcode/view/lc-components/Table/meta.json +0 -7
- package/es/lowcode/view/lc-components/Tabs/index.js +6 -2
- package/es/lowcode/view/lc-components/Tabs/meta.json +1 -1
- package/es/lowcode/view/lc-components/Tree/index.js +3 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +1 -5
- package/es/lowcode/view/lc-components/Wrapper.js +9 -1
- package/es/upload/FilesWall/index.js +16 -6
- package/es/upload/Form/gridForm.js +16 -6
- package/es/upload/FormItem/index.js +16 -4
- package/es/utils/action.js +3 -2
- package/es/utils/form.js +4 -3
- package/es/utils/grid.js +10 -2
- package/lib/components/Builder/index.js +13 -10
- package/lib/components/ComplexItem/index.js +5 -3
- package/lib/components/ComplexItem/service.js +6 -3
- package/lib/components/LDActions/index.js +1 -0
- package/lib/components/LdAutoForm/index.js +3 -2
- package/lib/components/LdCard/index.js +10 -8
- package/lib/components/LdCom/index.js +3 -2
- package/lib/components/LdFormList/index.js +9 -6
- package/lib/components/LdGrid/index.js +11 -12
- package/lib/components/LdGridForm/index.js +3 -2
- package/lib/helper/FromItems.js +64 -5
- package/lib/helper/action.js +2 -0
- package/lib/helper/ldBuilder.js +4 -4
- package/lib/helper/ldComBuild.js +14 -9
- package/lib/locales/zh-CN.js +61 -6
- package/lib/lowcode/constants/api-url.js +360 -190
- package/lib/lowcode/constants/event-topics.js +5 -1
- package/lib/lowcode/constants/index.js +6 -5
- package/lib/lowcode/engine/meta/box.props.default.json +1 -1
- package/lib/lowcode/engine/meta/box.props.json +1 -1
- package/lib/lowcode/engine/meta/cardlist.props.json +3 -5
- package/lib/lowcode/engine/meta/components-list.json +6 -0
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -1
- package/lib/lowcode/engine/meta/dialog.props.json +24 -4
- package/lib/lowcode/engine/meta/drawer.props.json +1 -1
- package/lib/lowcode/engine/meta/fielddate.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +48 -1
- package/lib/lowcode/engine/meta/fieldeditor.props.json +0 -1
- package/lib/lowcode/engine/meta/fieldgroup.props.json +0 -1
- package/lib/lowcode/engine/meta/fieldyear.props.json +0 -1
- package/lib/lowcode/engine/meta/form.props.json +3 -19
- package/lib/lowcode/engine/meta/grouptree.props.json +0 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +5 -0
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -2
- package/lib/lowcode/engine/meta/jsx.props.json +4 -3
- package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.json +1 -1
- package/lib/lowcode/engine/meta/proxy.props.default.json +15 -0
- package/lib/lowcode/engine/meta/proxy.props.json +66 -0
- package/lib/lowcode/engine/meta/section.props.json +2 -2
- package/lib/lowcode/engine/meta/table.props.json +0 -7
- package/lib/lowcode/engine/meta/tabs.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.json +1 -5
- package/lib/lowcode/engine/provider/ContextProvider/index.js +50 -13
- package/lib/lowcode/engine/provider/ContextProvider/router.js +22 -1
- package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +37 -31
- package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +10 -4
- package/lib/lowcode/engine/provider/ContextProvider/useTodo.js +1 -3
- package/lib/lowcode/engine/provider/EventBusProvider.js +14 -4
- package/lib/lowcode/engine/provider/PageProxyProvider.js +103 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +10 -12
- package/lib/lowcode/engine/tools/helper.js +25 -0
- package/lib/lowcode/engine/tools/initDS.js +4 -4
- package/lib/lowcode/painter/Design.js +1 -0
- package/lib/lowcode/painter/DesignOperator.js +132 -24
- package/lib/lowcode/painter/DesignToolbar.js +98 -184
- package/lib/lowcode/painter/History.js +308 -0
- package/lib/lowcode/painter/Panel.js +1 -1
- package/lib/lowcode/painter/Ribbon.js +37 -1
- package/lib/lowcode/painter/components/AdvancePanel.js +53 -49
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +10 -3
- package/lib/lowcode/painter/components/TipIcon.js +12 -4
- package/lib/lowcode/painter/components/TreeEditor.js +76 -8
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +10 -6
- package/lib/lowcode/painter/components/code-editor/DiffEditor.js +49 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +55 -4
- package/lib/lowcode/painter/components/field-setting/index.js +24 -1
- package/lib/lowcode/painter/components/shortcut-modal/KeyIcon.js +18 -0
- package/lib/lowcode/painter/components/shortcut-modal/index.js +215 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +9 -18
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +4 -1
- package/lib/lowcode/painter/panel-section/ConditionCheck.js +78 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +6 -3
- package/lib/lowcode/painter/panel-section/DialogSize.js +83 -0
- package/lib/lowcode/painter/panel-section/DialogWidthHeight.js +67 -0
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +1 -1
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/JSEditor/ToolBar.js +181 -0
- package/lib/lowcode/painter/panel-section/JSEditor/index.js +189 -0
- package/lib/lowcode/painter/panel-section/JSEditor/index.less +4 -0
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +7 -2
- package/lib/lowcode/painter/panel-section/ProxyLinker.js +145 -0
- package/lib/lowcode/painter/panel-section/ProxyParams.js +35 -0
- package/lib/lowcode/painter/panel-section/ProxyParamsSetter.js +248 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +37 -26
- package/lib/lowcode/painter/style/action-bind-modal.less +1 -1
- package/lib/lowcode/painter/style/components.less +1 -1
- package/lib/lowcode/painter/style/history.less +46 -0
- package/lib/lowcode/painter/style/outline.less +1 -1
- package/lib/lowcode/painter/style/panel-item.less +1 -0
- package/lib/lowcode/preview/DebugTool.js +86 -0
- package/lib/lowcode/preview/DebugToolDetail.js +111 -0
- package/lib/lowcode/preview/index.js +10 -18
- package/lib/lowcode/preview/useDebugSettings.js +69 -0
- package/lib/lowcode/view/Canvas.js +5 -1
- package/lib/lowcode/view/ErrorBoundary.js +88 -0
- package/lib/lowcode/view/Page.js +12 -7
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +4 -2
- package/lib/lowcode/view/lc-components/Box/index.less +2 -2
- package/lib/lowcode/view/lc-components/Box/meta.json +1 -1
- package/lib/lowcode/view/lc-components/CardList/index.js +3 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +3 -5
- package/lib/lowcode/view/lc-components/Dialog/index.js +11 -3
- package/lib/lowcode/view/lc-components/Dialog/meta.json +24 -4
- package/lib/lowcode/view/lc-components/Drawer/index.js +3 -1
- package/lib/lowcode/view/lc-components/Drawer/meta.json +1 -1
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +48 -1
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +0 -1
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +0 -1
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Form/index.js +15 -19
- package/lib/lowcode/view/lc-components/Form/meta.json +3 -19
- package/lib/lowcode/view/lc-components/GroupTree/meta.json +0 -1
- package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +33 -16
- package/lib/lowcode/view/lc-components/JSX/meta.json +4 -3
- package/lib/lowcode/view/lc-components/Layout/meta.json +1 -1
- package/lib/lowcode/view/lc-components/PageLayout/index.js +1 -1
- package/lib/lowcode/view/lc-components/Proxy/FunctionDesign.js +24 -0
- package/lib/lowcode/view/lc-components/Proxy/FunctionLive.js +30 -0
- package/lib/lowcode/view/lc-components/Proxy/FunctionPreview.js +30 -0
- package/lib/lowcode/view/lc-components/Proxy/index.js +50 -0
- package/lib/lowcode/view/lc-components/Proxy/index.less +5 -0
- package/lib/lowcode/view/lc-components/Proxy/meta.json +66 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +16 -13
- package/lib/lowcode/view/lc-components/Table/index.js +11 -3
- package/lib/lowcode/view/lc-components/Table/meta.json +0 -7
- package/lib/lowcode/view/lc-components/Tabs/index.js +5 -1
- package/lib/lowcode/view/lc-components/Tabs/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Tree/index.js +3 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +1 -5
- package/lib/lowcode/view/lc-components/Wrapper.js +8 -0
- package/lib/upload/FilesWall/index.js +13 -3
- package/lib/upload/Form/gridForm.js +13 -3
- package/lib/upload/FormItem/index.js +15 -3
- package/lib/utils/action.js +6 -0
- package/lib/utils/form.js +3 -2
- package/lib/utils/grid.js +11 -3
- package/package.json +1 -2
- package/es/lowcode/painter/panel-section/JSEditor.js +0 -49
- package/es/lowcode/view/errorBoundary.js +0 -61
- package/lib/lowcode/painter/panel-section/JSEditor.js +0 -57
- package/lib/lowcode/view/errorBoundary.js +0 -69
|
@@ -54,7 +54,7 @@ export var ImportUploadPop = function ImportUploadPop(_ref) {
|
|
|
54
54
|
moduleCode: moduleCode,
|
|
55
55
|
behaviorKey: behaviorKey,
|
|
56
56
|
templateId: templateId,
|
|
57
|
-
reportType:
|
|
57
|
+
reportType: 'import'
|
|
58
58
|
};
|
|
59
59
|
getFindexcelstate(_fetchExcelStatePrefix, _fetchExcelStateParams).then(function (response) {
|
|
60
60
|
if (response.code === 1) {
|
|
@@ -147,7 +147,7 @@ export var ImportUploadPop = function ImportUploadPop(_ref) {
|
|
|
147
147
|
};
|
|
148
148
|
}();
|
|
149
149
|
return /*#__PURE__*/React.createElement(PopWindow, {
|
|
150
|
-
title:
|
|
150
|
+
title: '上传excel文件',
|
|
151
151
|
mode: "modal",
|
|
152
152
|
size: "mini",
|
|
153
153
|
visible: visible,
|
|
@@ -184,11 +184,14 @@ export var ImportUploadPop = function ImportUploadPop(_ref) {
|
|
|
184
184
|
accept: '.xls,.xlsx,.xlt,.xlsm',
|
|
185
185
|
name: 'fileObj',
|
|
186
186
|
beforeUpload: function beforeUpload(file) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
return new Promise(function (resolve, reject) {
|
|
188
|
+
var suffix = lowerCase(last(split(file.name, '.')));
|
|
189
|
+
if (!includes(['xls', 'xlsx', 'xlt', 'xlsm'], suffix)) {
|
|
190
|
+
reject(new Error('禁止上传的文件类型'));
|
|
191
|
+
} else {
|
|
192
|
+
resolve(true);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
192
195
|
}
|
|
193
196
|
}
|
|
194
197
|
})), templateUrl && /*#__PURE__*/React.createElement(DownloadLink, null, /*#__PURE__*/React.createElement("a", {
|
|
@@ -248,7 +251,7 @@ export var TopExport = function TopExport(_ref5) {
|
|
|
248
251
|
var _fetchExcelStateParams = {
|
|
249
252
|
moduleCode: moduleCode,
|
|
250
253
|
behaviorKey: behaviorKey,
|
|
251
|
-
reportType:
|
|
254
|
+
reportType: 'export'
|
|
252
255
|
};
|
|
253
256
|
getFindexcelstate(_fetchExcelStatePrefix, _fetchExcelStateParams).then(function (response) {
|
|
254
257
|
if (response.code === 1) {
|
|
@@ -299,7 +302,7 @@ export var TopExport = function TopExport(_ref5) {
|
|
|
299
302
|
_exportExcelParams = {
|
|
300
303
|
moduleCode: moduleCode,
|
|
301
304
|
behaviorKey: behaviorKey,
|
|
302
|
-
reportType:
|
|
305
|
+
reportType: 'export'
|
|
303
306
|
};
|
|
304
307
|
_exportExcelPrefix = "/".concat(strategy);
|
|
305
308
|
_context2.next = 10;
|
|
@@ -330,14 +333,14 @@ export var TopExport = function TopExport(_ref5) {
|
|
|
330
333
|
labels.push(column.colDef.headerName);
|
|
331
334
|
fieldInfo.push({
|
|
332
335
|
width: column.actualWidth,
|
|
333
|
-
fieldNm: column.colId
|
|
336
|
+
fieldNm: column.colDef.exportField || column.colId
|
|
334
337
|
});
|
|
335
338
|
}
|
|
336
339
|
});
|
|
337
340
|
defaultExcelParams = {
|
|
338
|
-
bgColor:
|
|
341
|
+
bgColor: '#69b1ff',
|
|
339
342
|
dataUrl: "".concat(window.location.origin, "/api").concat(apiUrl).concat(joiner, "token=").concat(window.cookie.get(window.appConfig.authSaveKey)),
|
|
340
|
-
excelName:
|
|
343
|
+
excelName: 'download.xls',
|
|
341
344
|
fieldInfo: fieldInfo,
|
|
342
345
|
islock: false,
|
|
343
346
|
labels: labels === null || labels === void 0 ? void 0 : labels.join(),
|
|
@@ -345,7 +348,7 @@ export var TopExport = function TopExport(_ref5) {
|
|
|
345
348
|
};
|
|
346
349
|
_exportExcelParams2 = _objectSpread({
|
|
347
350
|
moduleCode: moduleCode,
|
|
348
|
-
reportType:
|
|
351
|
+
reportType: 'export'
|
|
349
352
|
}, defaultExcelParams);
|
|
350
353
|
_exportExcelPrefix2 = "/".concat(strategy);
|
|
351
354
|
_context2.next = 23;
|
|
@@ -4,14 +4,16 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
5
5
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
6
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
7
|
-
var _excluded = ["render"];
|
|
7
|
+
var _excluded = ["render", "dateFormat"];
|
|
8
8
|
import React, { useRef, useImperativeHandle, forwardRef, useCallback } from 'react';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import { useMemoizedFn, useCreation, useRequest, useUnmount } from 'ahooks';
|
|
11
11
|
import { isNil, isString, keyBy } from 'lodash';
|
|
12
12
|
import classNames from 'classnames';
|
|
13
|
+
import moment from 'moment';
|
|
13
14
|
import { Modal, recheck } from '@luck-design-biz/base';
|
|
14
15
|
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
16
|
+
import { usePageProxyContext } from "../../../engine/provider/PageProxyProvider";
|
|
15
17
|
import Wrapper from "../Wrapper";
|
|
16
18
|
import { LdGrid, LDActions } from "../../../../index";
|
|
17
19
|
import TopFilter from "./components/TopFilter";
|
|
@@ -63,6 +65,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
63
65
|
onGridReady = _ref.onGridReady,
|
|
64
66
|
advance = _ref.advance;
|
|
65
67
|
var ctx = useContext();
|
|
68
|
+
var ppCtx = usePageProxyContext();
|
|
66
69
|
var apiRef = useRef();
|
|
67
70
|
var wrapperRef = useRef();
|
|
68
71
|
var instanceRef = useCombinedRefs(ref);
|
|
@@ -275,7 +278,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
275
278
|
labels.push(column.colDef.headerName);
|
|
276
279
|
fieldInfo.push({
|
|
277
280
|
width: column.actualWidth,
|
|
278
|
-
fieldNm: column.colId
|
|
281
|
+
fieldNm: column.colDef.exportField || column.colId
|
|
279
282
|
});
|
|
280
283
|
}
|
|
281
284
|
});
|
|
@@ -386,6 +389,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
386
389
|
var colsMap = keyBy(cols, 'field');
|
|
387
390
|
var _cols = isNil(fields) ? cols : fields.map(function (_ref4) {
|
|
388
391
|
var render = _ref4.render,
|
|
392
|
+
dateFormat = _ref4.dateFormat,
|
|
389
393
|
_field = _objectWithoutProperties(_ref4, _excluded);
|
|
390
394
|
return _objectSpread(_objectSpread({}, colsMap[_field.field]), {}, {
|
|
391
395
|
render: render ? function (v, d, i, p) {
|
|
@@ -395,6 +399,8 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
395
399
|
rowIndex: i,
|
|
396
400
|
params: p
|
|
397
401
|
}, render.replace(/(function\s*\w*\s*)\([^)]*\)(\s*{)/, '$1()$2'));
|
|
402
|
+
} : dateFormat ? function (v) {
|
|
403
|
+
return moment(v).format(dateFormat);
|
|
398
404
|
} : null
|
|
399
405
|
}, _field);
|
|
400
406
|
});
|
|
@@ -567,7 +573,9 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
567
573
|
wrapperProps: _wrapperProps,
|
|
568
574
|
width: width,
|
|
569
575
|
height: height,
|
|
570
|
-
|
|
576
|
+
pageProxy: ppCtx
|
|
577
|
+
// _loading={ctx.loading}
|
|
578
|
+
,
|
|
571
579
|
bordered: bordered,
|
|
572
580
|
className: classNames(_defineProperty({}, className, !!className)),
|
|
573
581
|
ldId: id,
|
|
@@ -182,7 +182,6 @@
|
|
|
182
182
|
"name": "默认选中行",
|
|
183
183
|
"type": "_JSEditor",
|
|
184
184
|
"defaultCode": "function getRowDefaultSelected(data, node) { \n return false; \n}",
|
|
185
|
-
"mustConfirm": true,
|
|
186
185
|
"wrapper": "collapse",
|
|
187
186
|
"wrapperProps": {
|
|
188
187
|
"suppressIcon": true
|
|
@@ -193,7 +192,6 @@
|
|
|
193
192
|
"name": "行是否可选",
|
|
194
193
|
"type": "_JSEditor",
|
|
195
194
|
"defaultCode": "function getRowSelectable(data, node) { \n return true; \n}",
|
|
196
|
-
"mustConfirm": true,
|
|
197
195
|
"wrapper": "collapse",
|
|
198
196
|
"wrapperProps": {
|
|
199
197
|
"suppressIcon": true
|
|
@@ -322,7 +320,6 @@
|
|
|
322
320
|
"name": "格式化数据",
|
|
323
321
|
"type": "_JSEditor",
|
|
324
322
|
"defaultCode": "function formatDataSource(list, detail) { \n return []; \n}",
|
|
325
|
-
"mustConfirm": true,
|
|
326
323
|
"wrapper": "collapse",
|
|
327
324
|
"wrapperProps": {
|
|
328
325
|
"suppressIcon": true
|
|
@@ -333,7 +330,6 @@
|
|
|
333
330
|
"name": "构建树层级",
|
|
334
331
|
"type": "_JSEditor",
|
|
335
332
|
"defaultCode": "function getDataPath(data) { \n return []; \n}",
|
|
336
|
-
"mustConfirm": true,
|
|
337
333
|
"wrapper": "collapse",
|
|
338
334
|
"wrapperProps": {
|
|
339
335
|
"suppressIcon": true
|
|
@@ -345,7 +341,6 @@
|
|
|
345
341
|
"desc": "自定义某些表格列",
|
|
346
342
|
"type": "_JSEditor",
|
|
347
343
|
"defaultCode": "function columnsRewrite(columns) { \n return columns; \n}",
|
|
348
|
-
"mustConfirm": true,
|
|
349
344
|
"wrapper": "collapse",
|
|
350
345
|
"wrapperProps": {
|
|
351
346
|
"suppressIcon": true
|
|
@@ -357,7 +352,6 @@
|
|
|
357
352
|
"desc": "完全自定义所有表格列,优先级大于columnsRewrite",
|
|
358
353
|
"type": "_JSEditor",
|
|
359
354
|
"defaultCode": "function columnsReset(columns) { \n return columns; \n}",
|
|
360
|
-
"mustConfirm": true,
|
|
361
355
|
"wrapper": "collapse",
|
|
362
356
|
"wrapperProps": {
|
|
363
357
|
"suppressIcon": true
|
|
@@ -368,7 +362,6 @@
|
|
|
368
362
|
"name": "model参数",
|
|
369
363
|
"type": "_JSEditor",
|
|
370
364
|
"defaultCode": "function getModelParams() { \n return {}; \n}",
|
|
371
|
-
"mustConfirm": true,
|
|
372
365
|
"wrapper": "collapse",
|
|
373
366
|
"wrapperProps": {
|
|
374
367
|
"suppressIcon": true
|
|
@@ -6,9 +6,10 @@ import { useMemoizedFn, useCreation } from 'ahooks';
|
|
|
6
6
|
import { isNil } from 'lodash';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { Tabs } from 'luck-design/antd';
|
|
9
|
-
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
9
|
+
import { useContext, useRemoteSource } from "../../../engine/provider/ContextProvider";
|
|
10
10
|
import Wrapper from "../Wrapper";
|
|
11
11
|
import RuntimeComp from "../JSX/RuntimeComp";
|
|
12
|
+
import { usePageProxyContext } from "../../../engine/provider/PageProxyProvider";
|
|
12
13
|
import { omitBadProps } from "../../../engine/tools/helper";
|
|
13
14
|
import defaultMeta from "../../../engine/meta/tabs.props.default.json";
|
|
14
15
|
var StyledTabs = styled(Tabs).withConfig({
|
|
@@ -32,10 +33,13 @@ var LCTabs = function LCTabs(_ref) {
|
|
|
32
33
|
var ref = useRef();
|
|
33
34
|
var apiRef = useRef();
|
|
34
35
|
var ctx = useContext();
|
|
36
|
+
var _useRemoteSource = useRemoteSource(),
|
|
37
|
+
module = _useRemoteSource.module;
|
|
38
|
+
var ppCtx = usePageProxyContext();
|
|
35
39
|
var _items = useCreation(function () {
|
|
36
40
|
return items.filter(function (_ref2) {
|
|
37
41
|
var serial = _ref2.serial;
|
|
38
|
-
return isNil(serial) || ctx.want(serial);
|
|
42
|
+
return isNil(serial) || ctx.want(serial, module[(ppCtx === null || ppCtx === void 0 ? void 0 : ppCtx.proxyCode) || 'master'].resources);
|
|
39
43
|
});
|
|
40
44
|
}, [items]);
|
|
41
45
|
var _useState = useState(function () {
|
|
@@ -11,6 +11,7 @@ import { isNil, keyBy } from 'lodash';
|
|
|
11
11
|
import { Modal, recheck, IconFont } from '@luck-design-biz/base';
|
|
12
12
|
import { suid } from '@luck-design-biz/base/utils';
|
|
13
13
|
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
14
|
+
import { usePageProxyContext } from "../../../engine/provider/PageProxyProvider";
|
|
14
15
|
import Wrapper from "../Wrapper";
|
|
15
16
|
import { LdTree } from "../../../../index";
|
|
16
17
|
import useCombinedRefs from "../../../engine/tools/useCombinedRefs";
|
|
@@ -44,6 +45,7 @@ var LCTree = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
44
45
|
defaultSelect = _ref.defaultSelect,
|
|
45
46
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
46
47
|
var ctx = useContext();
|
|
48
|
+
var ppCtx = usePageProxyContext();
|
|
47
49
|
var apiRef = useRef();
|
|
48
50
|
var wrapperRef = useRef();
|
|
49
51
|
var instanceRef = useCombinedRefs(ref);
|
|
@@ -160,6 +162,7 @@ var LCTree = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
160
162
|
ref: instanceRef,
|
|
161
163
|
wrapper: wrapperRef,
|
|
162
164
|
wrapperProps: _wrapperProps,
|
|
165
|
+
pageProxy: ppCtx,
|
|
163
166
|
className: classNames(styles['lc-component-tree'], _defineProperty({}, className, !!className)),
|
|
164
167
|
dataSetKey: dataset === null || dataset === void 0 ? void 0 : dataset.code,
|
|
165
168
|
showLine: showLine,
|
|
@@ -204,7 +204,6 @@
|
|
|
204
204
|
"desc": "返回默认选中的数据主键",
|
|
205
205
|
"type": "_JSEditor",
|
|
206
206
|
"defaultCode": "function defaultSelect(treeData) { \n return null; \n}",
|
|
207
|
-
"mustConfirm": true,
|
|
208
207
|
"wrapper": "collapse",
|
|
209
208
|
"wrapperProps": {
|
|
210
209
|
"suppressIcon": true
|
|
@@ -265,7 +264,6 @@
|
|
|
265
264
|
"name": "节点是否有复选框",
|
|
266
265
|
"type": "_JSEditor",
|
|
267
266
|
"defaultCode": "function treeNodeCheckable(item) { \n return true; \n}",
|
|
268
|
-
"mustConfirm": true,
|
|
269
267
|
"wrapper": "collapse",
|
|
270
268
|
"wrapperProps": {
|
|
271
269
|
"suppressIcon": true
|
|
@@ -276,7 +274,6 @@
|
|
|
276
274
|
"name": "节点复选框是否禁用",
|
|
277
275
|
"type": "_JSEditor",
|
|
278
276
|
"defaultCode": "function treeNodeDisableCheckbox(item) { \n return false; \n}",
|
|
279
|
-
"mustConfirm": true,
|
|
280
277
|
"wrapper": "collapse",
|
|
281
278
|
"wrapperProps": {
|
|
282
279
|
"suppressIcon": true
|
|
@@ -287,7 +284,6 @@
|
|
|
287
284
|
"name": "节点是否禁用",
|
|
288
285
|
"type": "_JSEditor",
|
|
289
286
|
"defaultCode": "function treeNodeDisable(item) { \n return false; \n}",
|
|
290
|
-
"mustConfirm": true,
|
|
291
287
|
"wrapper": "collapse",
|
|
292
288
|
"wrapperProps": {
|
|
293
289
|
"suppressIcon": true
|
|
@@ -298,7 +294,7 @@
|
|
|
298
294
|
"name": "节点定制渲染",
|
|
299
295
|
"type": "_JSEditor",
|
|
300
296
|
"defaultCode": "function onTreeNodeRender(title, item) { \n return title; \n}",
|
|
301
|
-
"
|
|
297
|
+
"isjsx": true,
|
|
302
298
|
"wrapper": "collapse",
|
|
303
299
|
"wrapperProps": {
|
|
304
300
|
"suppressIcon": true
|
|
@@ -4,7 +4,8 @@ import React, { useEffect } from 'react';
|
|
|
4
4
|
import { useLatest, useCreation } from 'ahooks';
|
|
5
5
|
import { omit } from 'lodash';
|
|
6
6
|
import { useContext, useGet, modifyNode, getLevelNodes as _getLevelNodes, getSelfAndParent } from "../../engine/provider/ContextProvider";
|
|
7
|
-
import {
|
|
7
|
+
import { usePageProxyContext } from "../../engine/provider/PageProxyProvider";
|
|
8
|
+
import { LC_COMPONENT_UNIT_KEY, LC_COMPONENT_UNIT, RUNTIME, LC_PAGEPROXY_KEY } from "../../constants";
|
|
8
9
|
import DragDropWrapper from "../../painter/components/DragDrop/DragDropWrapper";
|
|
9
10
|
var LCWrapper = function LCWrapper(_ref) {
|
|
10
11
|
var id = _ref.id,
|
|
@@ -13,6 +14,7 @@ var LCWrapper = function LCWrapper(_ref) {
|
|
|
13
14
|
getTargetDom = _ref.getTargetDom,
|
|
14
15
|
api = _ref.api;
|
|
15
16
|
var ctx = useContext();
|
|
17
|
+
var ppCtx = usePageProxyContext();
|
|
16
18
|
var selfData = useGet({
|
|
17
19
|
id: id
|
|
18
20
|
});
|
|
@@ -35,6 +37,7 @@ var LCWrapper = function LCWrapper(_ref) {
|
|
|
35
37
|
ctx._register(id, new Proxy({
|
|
36
38
|
id: id,
|
|
37
39
|
meta: omit(meta, ['props', 'css', 'advance']),
|
|
40
|
+
$pp: ppCtx,
|
|
38
41
|
set: function set(prop, value, toDom) {
|
|
39
42
|
if (toDom === true) {
|
|
40
43
|
if (['id', LC_COMPONENT_UNIT_KEY].includes(prop)) {
|
|
@@ -53,6 +56,8 @@ var LCWrapper = function LCWrapper(_ref) {
|
|
|
53
56
|
get: function get(target, property, receiver) {
|
|
54
57
|
if (property === 'api') {
|
|
55
58
|
return api ? _objectSpread(_objectSpread({}, _api), api.current) : _api;
|
|
59
|
+
} else if (property === 'name') {
|
|
60
|
+
return _selfData.current.props.name;
|
|
56
61
|
}
|
|
57
62
|
return Reflect.get(target, property, receiver);
|
|
58
63
|
}
|
|
@@ -63,6 +68,9 @@ var LCWrapper = function LCWrapper(_ref) {
|
|
|
63
68
|
if (dom) {
|
|
64
69
|
dom.setAttribute('id', id);
|
|
65
70
|
dom.setAttribute(LC_COMPONENT_UNIT_KEY, LC_COMPONENT_UNIT);
|
|
71
|
+
if (ppCtx) {
|
|
72
|
+
dom.setAttribute(LC_PAGEPROXY_KEY, ppCtx.id);
|
|
73
|
+
}
|
|
66
74
|
}
|
|
67
75
|
ctx.$publisher(ctx.topics.COMPONENT_MOUNT, {
|
|
68
76
|
id: id
|
|
@@ -8,9 +8,9 @@ import React, { forwardRef, useEffect, useImperativeHandle } from 'react';
|
|
|
8
8
|
import { Button, Checkbox, Dropdown, Icon, Modal, Upload } from 'luck-design/antd';
|
|
9
9
|
import { useSetState } from 'ahooks';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import { canPreview, formatMessage, patchDownload, request, showPop } from '@luck-design-biz/base/utils';
|
|
12
|
-
import { getDvaApp } from 'umi';
|
|
13
|
-
import { last, lowerCase, split } from 'lodash';
|
|
11
|
+
import { canPreview, formatMessage, patchDownload, request, showPop, string2ASCII } from '@luck-design-biz/base/utils';
|
|
12
|
+
import { getDvaApp, history, getCreateHistoryOptions } from 'umi';
|
|
13
|
+
import { last, lowerCase, split, replace } from 'lodash';
|
|
14
14
|
import { Box, Permission, PermissionGroup } from 'luck-design';
|
|
15
15
|
import styles from "./index.less";
|
|
16
16
|
|
|
@@ -150,12 +150,22 @@ var FilesWall = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
150
150
|
});
|
|
151
151
|
onUploadChange && onUploadChange(e);
|
|
152
152
|
};
|
|
153
|
+
var headers = {};
|
|
154
|
+
var token = window.cookie.get(window.appConfig.authSaveKey);
|
|
155
|
+
if (token) headers.Authorization = "Bearer ".concat(token);
|
|
156
|
+
var ticket = history.location.query.ticket;
|
|
157
|
+
if (ticket) headers.ticket = string2ASCII(ticket);
|
|
158
|
+
if (window.__POWERED_BY_QIANKUN__) {
|
|
159
|
+
var pathname = replace(window.location.pathname, getCreateHistoryOptions().basename, '');
|
|
160
|
+
headers['Mf-Path'] = pathname.length > 0 ? pathname : '/';
|
|
161
|
+
headers['Sys-Code'] = getCreateHistoryOptions().basename.split('/')[1];
|
|
162
|
+
if (window.routeCode) headers['Menu-Code'] = window.routeCode;
|
|
163
|
+
}
|
|
164
|
+
;
|
|
153
165
|
var formItemProps = _objectSpread(_objectSpread({}, rest), {}, {
|
|
154
166
|
action: getUrl('upload'),
|
|
155
167
|
// 上传地址
|
|
156
|
-
headers:
|
|
157
|
-
Authorization: "Bearer ".concat(window.cookie.get(window.appConfig.authSaveKey))
|
|
158
|
-
},
|
|
168
|
+
headers: headers,
|
|
159
169
|
// 请求头
|
|
160
170
|
name: 'files',
|
|
161
171
|
multiple: true,
|
|
@@ -4,15 +4,15 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["formId", "formRef", "showNote", "operates", "loading", "uploadUrl", "supportTypes", "forbiddenTypes", "beforeUpload", "formMode", "onUploadChange", "zipName", "resetActions", "getUrl", "wrapperRef"];
|
|
6
6
|
import React, { useState, useRef, forwardRef } from 'react';
|
|
7
|
-
import { getDvaApp } from 'umi';
|
|
7
|
+
import { getDvaApp, history, getCreateHistoryOptions } from 'umi';
|
|
8
8
|
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
9
9
|
import { Button, Upload, Tooltip, Icon } from 'luck-design/antd';
|
|
10
10
|
import moment from 'moment';
|
|
11
|
-
import { last } from 'lodash';
|
|
11
|
+
import { last, replace } from 'lodash';
|
|
12
12
|
import { BasicForm, BasicFormItem, PopWindow } from 'luck-design';
|
|
13
13
|
import api from "@/services/ApiConfig";
|
|
14
14
|
import { FormBtn, GridForm } from '@luck-design-biz/base/FormList';
|
|
15
|
-
import { byteConvert, formatMessage, beforeUpload as _beforeUpload2, getSupportUploadTypes, patchDownloadZip, showPop, request, canPreview } from '@luck-design-biz/base/utils';
|
|
15
|
+
import { byteConvert, formatMessage, beforeUpload as _beforeUpload2, getSupportUploadTypes, patchDownloadZip, showPop, request, canPreview, string2ASCII } from '@luck-design-biz/base/utils';
|
|
16
16
|
var columns = [{
|
|
17
17
|
field: 'name',
|
|
18
18
|
title: '附件名称'
|
|
@@ -198,12 +198,22 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
198
198
|
}
|
|
199
199
|
});
|
|
200
200
|
var renderUploadTopLeft = useMemoizedFn(function () {
|
|
201
|
+
var headers = {};
|
|
202
|
+
var token = window.cookie.get(window.appConfig.authSaveKey);
|
|
203
|
+
if (token) headers.Authorization = "Bearer ".concat(token);
|
|
204
|
+
var ticket = history.location.query.ticket;
|
|
205
|
+
if (ticket) headers.ticket = string2ASCII(ticket);
|
|
206
|
+
if (window.__POWERED_BY_QIANKUN__) {
|
|
207
|
+
var pathname = replace(window.location.pathname, getCreateHistoryOptions().basename, '');
|
|
208
|
+
headers['Mf-Path'] = pathname.length > 0 ? pathname : '/';
|
|
209
|
+
headers['Sys-Code'] = getCreateHistoryOptions().basename.split('/')[1];
|
|
210
|
+
if (window.routeCode) headers['Menu-Code'] = window.routeCode;
|
|
211
|
+
}
|
|
212
|
+
;
|
|
201
213
|
var formItemProps = {
|
|
202
214
|
action: uploadUrl || getUrl('upload'),
|
|
203
215
|
// 上传地址
|
|
204
|
-
headers:
|
|
205
|
-
Authorization: "Bearer ".concat(window.cookie.get(window.appConfig.authSaveKey))
|
|
206
|
-
},
|
|
216
|
+
headers: headers,
|
|
207
217
|
// 请求头
|
|
208
218
|
name: 'files',
|
|
209
219
|
multiple: true,
|
|
@@ -3,8 +3,10 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["uploadUrl", "moduleCode", "bucket", "tag", "note", "config", "supportTypes", "forbiddenTypes", "children", "dataFormat", "listType"];
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { replace } from 'lodash';
|
|
6
7
|
import { BasicFormItem } from 'luck-design';
|
|
7
|
-
import {
|
|
8
|
+
import { history, getCreateHistoryOptions } from 'umi';
|
|
9
|
+
import { formatMessage, beforeUpload as _beforeUpload, getSupportUploadTypes, string2ASCII } from '@luck-design-biz/base/utils';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* 表单类型富文本上传
|
|
@@ -45,6 +47,18 @@ function buildComponent(props) {
|
|
|
45
47
|
return "".concat(window.appConfig.OSS_HOST_V3, "?moduleCode=").concat(moduleCode, "&behaviorKey=").concat(behaviorKey, "&bucket=").concat(bucket, "&tag=").concat(tag, "¬e=").concat(note);
|
|
46
48
|
};
|
|
47
49
|
var supportUploadTypes = getSupportUploadTypes(forbiddenTypes, supportTypes);
|
|
50
|
+
var headers = {};
|
|
51
|
+
var token = window.cookie.get(window.appConfig.authSaveKey);
|
|
52
|
+
if (token) headers.Authorization = "Bearer ".concat(token);
|
|
53
|
+
var ticket = history.location.query.ticket;
|
|
54
|
+
if (ticket) headers.ticket = string2ASCII(ticket);
|
|
55
|
+
if (window.__POWERED_BY_QIANKUN__) {
|
|
56
|
+
var pathname = replace(window.location.pathname, getCreateHistoryOptions().basename, '');
|
|
57
|
+
headers['Mf-Path'] = pathname.length > 0 ? pathname : '/';
|
|
58
|
+
headers['Sys-Code'] = getCreateHistoryOptions().basename.split('/')[1];
|
|
59
|
+
if (window.routeCode) headers['Menu-Code'] = window.routeCode;
|
|
60
|
+
}
|
|
61
|
+
;
|
|
48
62
|
return /*#__PURE__*/React.createElement(BasicFormItem, _extends({
|
|
49
63
|
extra: "".concat(formatMessage({
|
|
50
64
|
id: 'app.upload.supportUpload',
|
|
@@ -62,9 +76,7 @@ function buildComponent(props) {
|
|
|
62
76
|
}),
|
|
63
77
|
action: uploadUrl || getUrl('upload'),
|
|
64
78
|
// 上传地址
|
|
65
|
-
headers:
|
|
66
|
-
Authorization: "Bearer ".concat(window.cookie.get(window.appConfig.authSaveKey))
|
|
67
|
-
},
|
|
79
|
+
headers: headers,
|
|
68
80
|
// 请求头
|
|
69
81
|
name: 'files',
|
|
70
82
|
// 发送到后台的文件名
|
package/es/utils/action.js
CHANGED
|
@@ -2,7 +2,7 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
4
|
// 行为请求同一接口
|
|
5
|
-
import { fetchCallBehavior } from "../lowcode/constants/api-url";
|
|
5
|
+
import { fetchCallBehavior, readCallBehavior } from "../lowcode/constants/api-url";
|
|
6
6
|
export function behaviorCall() {
|
|
7
7
|
return _behaviorCall.apply(this, arguments);
|
|
8
8
|
}
|
|
@@ -28,4 +28,5 @@ function _behaviorCall() {
|
|
|
28
28
|
}, _callee);
|
|
29
29
|
}));
|
|
30
30
|
return _behaviorCall.apply(this, arguments);
|
|
31
|
-
}
|
|
31
|
+
}
|
|
32
|
+
export { readCallBehavior };
|
package/es/utils/form.js
CHANGED
|
@@ -15,7 +15,7 @@ import moment from 'moment';
|
|
|
15
15
|
import { capitalize, merge, transform, isArray, omit, isNil, clone, cloneDeep } from 'lodash';
|
|
16
16
|
import api from "@/services/ApiConfig";
|
|
17
17
|
import { defaultComName, translator, splitStrToObj, formatCustomProps } from "../helper/form";
|
|
18
|
-
import { getColumnRender } from "./grid";
|
|
18
|
+
import { getColumnRender, getExportField } from "./grid";
|
|
19
19
|
import * as formItemUtils from "../helper/FromItems";
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -194,7 +194,7 @@ export var dataFormat = function dataFormat() {
|
|
|
194
194
|
default:
|
|
195
195
|
result[name] = values[name];
|
|
196
196
|
}
|
|
197
|
-
values = omit(values, [name, "".concat(name, "
|
|
197
|
+
values = omit(values, [name, "".concat(name, "_virtual")]);
|
|
198
198
|
}, {});
|
|
199
199
|
return _objectSpread(_objectSpread({}, values), data);
|
|
200
200
|
};
|
|
@@ -256,6 +256,7 @@ export var getFormColumn = function getFormColumn() {
|
|
|
256
256
|
key: name
|
|
257
257
|
}, _props));
|
|
258
258
|
},
|
|
259
|
-
field: name
|
|
259
|
+
field: name,
|
|
260
|
+
exportField: getExportField(name, formItemType, _props)
|
|
260
261
|
});
|
|
261
262
|
};
|
package/es/utils/grid.js
CHANGED
|
@@ -109,6 +109,11 @@ var getAlign = function getAlign(extraData, alignClass) {
|
|
|
109
109
|
return 'left';
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
|
+
export var getExportField = function getExportField(name, type, props) {
|
|
113
|
+
var _props$config2;
|
|
114
|
+
if (type === 'number' && (_props$config2 = props.config) !== null && _props$config2 !== void 0 && _props$config2.precision || ['date', 'user', 'select', 'group', 'region', 'upload'].includes(type)) return "".concat(name, "_virtual");
|
|
115
|
+
return;
|
|
116
|
+
};
|
|
112
117
|
export var getGridColumn = function getGridColumn() {
|
|
113
118
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
114
119
|
comName = _ref.comName,
|
|
@@ -132,6 +137,7 @@ export var getGridColumn = function getGridColumn() {
|
|
|
132
137
|
var _extra = JSON.parse(extra) || {};
|
|
133
138
|
var data = _objectSpread(_objectSpread({}, _props), {}, {
|
|
134
139
|
field: name,
|
|
140
|
+
exportField: getExportField(name, comName || defaultComName[property], _props),
|
|
135
141
|
title: _props.fieldAliasName || _props.label,
|
|
136
142
|
headerAlign: _props.headerAlign || getAlign(_extra, 'sheading_alignment_virtual'),
|
|
137
143
|
align: _props.align || getAlign(_extra, 'scell_alignment_virtual'),
|
|
@@ -144,8 +150,8 @@ export var getGridColumn = function getGridColumn() {
|
|
|
144
150
|
data.filter = filter;
|
|
145
151
|
data.filterParams = filterParams;
|
|
146
152
|
} else if (!isTreeGrid && !isVirtual) {
|
|
147
|
-
var _props$
|
|
148
|
-
if ((_props.mode || ((_props$
|
|
153
|
+
var _props$config3;
|
|
154
|
+
if ((_props.mode || ((_props$config3 = _props.config) === null || _props$config3 === void 0 ? void 0 : _props$config3.mode)) === 'multiple') {
|
|
149
155
|
data.field = "".concat(name, "_virtual");
|
|
150
156
|
data.filter = 'text';
|
|
151
157
|
return data;
|
|
@@ -196,6 +202,7 @@ export var getGridColumn = function getGridColumn() {
|
|
|
196
202
|
break;
|
|
197
203
|
case 'select':
|
|
198
204
|
case 'radio':
|
|
205
|
+
case 'dict':
|
|
199
206
|
data.filter = 'select';
|
|
200
207
|
if (_props.alias) {
|
|
201
208
|
data.filterParams = {
|
|
@@ -269,6 +276,7 @@ export var getGridColumn = function getGridColumn() {
|
|
|
269
276
|
case 'select':
|
|
270
277
|
case 'group':
|
|
271
278
|
case 'complex':
|
|
279
|
+
case 'dict':
|
|
272
280
|
if (translateProps.multiple) {
|
|
273
281
|
formItemProps = {
|
|
274
282
|
dataFormat: function dataFormat(value) {
|
|
@@ -20,8 +20,9 @@ var _LdPop = _interopRequireDefault(require("../LdPop"));
|
|
|
20
20
|
var _services = require("../../services");
|
|
21
21
|
var _action2 = require("../../helper/action");
|
|
22
22
|
var LuckDaContext = exports.LuckDaContext = /*#__PURE__*/(0, _react.createContext)();
|
|
23
|
-
var useLDCtx = exports.useLDCtx = function useLDCtx() {
|
|
24
|
-
|
|
23
|
+
var useLDCtx = exports.useLDCtx = function useLDCtx(pageProxy) {
|
|
24
|
+
var ctx = (0, _react.useContext)(LuckDaContext);
|
|
25
|
+
return ctx[(pageProxy === null || pageProxy === void 0 ? void 0 : pageProxy.proxyCode) || 'master'];
|
|
25
26
|
};
|
|
26
27
|
var builder = function builder(WrappedComponent, moduleCode) {
|
|
27
28
|
var Component = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
@@ -125,14 +126,16 @@ var builder = function builder(WrappedComponent, moduleCode) {
|
|
|
125
126
|
label: '模块缺少数据集'
|
|
126
127
|
});
|
|
127
128
|
return /*#__PURE__*/_react.default.createElement(LuckDaContext.Provider, {
|
|
128
|
-
value:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
value: {
|
|
130
|
+
master: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, moduleData), {}, {
|
|
131
|
+
doAction: doAction,
|
|
132
|
+
openPop: openPop,
|
|
133
|
+
closePop: closePop,
|
|
134
|
+
readFieldProps: readFieldProps,
|
|
135
|
+
setFieldProps: setFieldProps,
|
|
136
|
+
moduleCode: moduleCode
|
|
137
|
+
})
|
|
138
|
+
}
|
|
136
139
|
}, /*#__PURE__*/_react.default.createElement(WrappedComponent, (0, _extends2.default)({
|
|
137
140
|
ref: ref
|
|
138
141
|
}, moduleData || {}, {
|
|
@@ -49,7 +49,7 @@ var Index = function Index(_ref) {
|
|
|
49
49
|
keyName: keyField,
|
|
50
50
|
titleKey: "title",
|
|
51
51
|
api: ( /*#__PURE__*/function () {
|
|
52
|
-
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(get) {
|
|
52
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(get, post) {
|
|
53
53
|
var res, formatData, detail;
|
|
54
54
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
55
55
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -58,7 +58,9 @@ var Index = function Index(_ref) {
|
|
|
58
58
|
return (0, _service.fetchContent)(dataModel, (0, _objectSpread2.default)({
|
|
59
59
|
datasetCode: dataSetCode,
|
|
60
60
|
moduleCode: moduleCode
|
|
61
|
-
}, get)
|
|
61
|
+
}, get), {
|
|
62
|
+
_AutoFilter: post
|
|
63
|
+
});
|
|
62
64
|
case 2:
|
|
63
65
|
res = _context.sent;
|
|
64
66
|
formatData = (res === null || res === void 0 ? void 0 : res.data.map(function (i) {
|
|
@@ -79,7 +81,7 @@ var Index = function Index(_ref) {
|
|
|
79
81
|
}
|
|
80
82
|
}, _callee);
|
|
81
83
|
}));
|
|
82
|
-
return function (_x) {
|
|
84
|
+
return function (_x, _x2) {
|
|
83
85
|
return _ref2.apply(this, arguments);
|
|
84
86
|
};
|
|
85
87
|
}()),
|