cnhis-design-vue 3.1.31-beta.0 → 3.1.31-beta.10
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/big-table/index.js +1 -1
- package/es/components/big-table/src/{BigTable.js → BigTable.vue.js} +1 -1
- package/es/components/big-table/src/{BigTable.vue_vue_type_script_setup_true_lang.js → BigTable.vue2.js} +6 -6
- package/es/components/{scale-view/src/components/NoData.js → big-table/src/components/NoData.vue.js} +4 -4
- package/es/components/big-table/src/components/edit-form/{edit-separate.js → edit-separate.vue.js} +1 -1
- package/es/components/big-table/src/components/{input-button.js → input-button.vue.js} +0 -0
- package/es/components/big-table/src/components/{separate.js → separate.vue.js} +0 -0
- package/es/components/big-table/src/hooks/useEdit.js +1 -1
- package/es/components/big-table/src/utils.js +1 -1
- package/es/components/bpmn-workflow/index.js +1 -1
- package/es/components/bpmn-workflow/src/{BpmnWorkflow.js → BpmnWorkflow.vue.js} +0 -0
- package/es/components/button-print/index.d.ts +76 -79
- package/es/components/button-print/index.js +2 -2
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +76 -79
- package/es/components/button-print/src/{ButtonPrint.js → ButtonPrint.vue.js} +1 -1
- package/es/components/button-print/src/{ButtonPrint.vue_vue_type_script_setup_true_lang.js → ButtonPrint.vue2.js} +47 -85
- package/es/components/button-print/src/components/{edit.vue.d.ts → EditFormat.vue.d.ts} +61 -54
- package/es/components/button-print/src/components/EditFormat.vue.js +173 -0
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +76 -64
- package/es/components/button-print/src/components/{IdentityVerification.js → IdentityVerification.vue.js} +22 -10
- package/es/components/button-print/src/components/Preview.vue.d.ts +41 -0
- package/es/components/button-print/src/components/Preview.vue.js +6 -0
- package/es/components/button-print/src/components/Preview.vue2.js +67 -0
- package/es/components/button-print/src/utils/browserPrint.d.ts +2 -1
- package/es/components/button-print/src/utils/browserPrint.js +6 -3
- package/es/components/button-print/src/utils/dialog.d.ts +6 -2
- package/es/components/button-print/src/utils/dialog.js +69 -25
- package/es/components/button-print/src/utils/index.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +7 -3
- package/es/components/button-print/src/utils/print.js +51 -4
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/drag-layout/index.js +1 -1
- package/es/components/drag-layout/src/{DragFormLeftItem.js → DragFormLeftItem.vue.js} +0 -0
- package/es/components/drag-layout/src/{DragFormRightItem.js → DragFormRightItem.vue.js} +0 -0
- package/es/components/drag-layout/src/{DragLayout.js → DragLayout.vue.js} +2 -2
- package/es/components/fabric-chart/index.js +1 -1
- package/es/components/fabric-chart/src/{FabricChart.js → FabricChart.vue.js} +1 -1
- package/es/components/fabric-chart/src/components/{PopupTip.js → PopupTip.vue.js} +0 -0
- package/es/components/fabric-chart/src/hooks/useCenter.js +5 -6
- package/es/components/fabric-chart/src/hooks/useGrid.js +3 -3
- package/es/components/fabric-chart/src/interface.d.ts +1 -1
- package/es/components/fabric-chart/src/utils/index.js +0 -1
- package/es/components/field-set/index.js +1 -1
- package/es/components/field-set/src/{FieldSet.js → FieldSet.vue.js} +0 -0
- package/es/components/form-config/index.js +1 -1
- package/es/components/form-config/src/{FormConfig.js → FormConfig.vue.js} +3 -3
- package/es/components/form-config/src/components/{FormConfigCreator.js → FormConfigCreator.vue.js} +0 -0
- package/es/components/form-config/src/components/{FormConfigDragDisplay.js → FormConfigDragDisplay.vue.js} +0 -0
- package/es/components/form-config/src/components/{FormConfigEdit.js → FormConfigEdit.vue.js} +0 -0
- package/es/components/form-config/src/components/index.js +6 -6
- package/es/components/form-config/src/components/renderer/{CloseButton.js → CloseButton.vue.js} +0 -0
- package/es/components/form-config/src/components/renderer/{ComplexNode.js → ComplexNode.vue.js} +2 -2
- package/es/components/form-config/src/components/renderer/{DefaultNode.js → DefaultNode.vue.js} +1 -1
- package/es/components/form-config/src/components/renderer/index.js +3 -3
- package/es/components/form-config/src/hooks/usePresetRenderer.js +2 -2
- package/es/components/form-render/index.js +2 -2
- package/es/components/form-render/src/{FormRender.js → FormRender.vue.js} +0 -0
- package/es/components/form-render/src/{FormRenderWrapper.js → FormRenderWrapper.vue.js} +1 -1
- package/es/components/form-render/src/components/renderer/checkbox.js +3 -5
- package/es/components/form-render/src/components/renderer/index.js +2 -0
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/{FormCollapse.js → FormCollapse.vue.js} +0 -0
- package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -1
- package/es/components/form-render/src/components/renderer/recommendSelect.d.ts +131 -0
- package/es/components/form-render/src/components/renderer/recommendSelect.js +213 -0
- package/es/components/form-render/src/components/renderer/remoteSearch.js +0 -1
- package/es/components/form-render/src/components/renderer/select.js +3 -5
- package/es/components/form-render/src/hooks/useAsyncQueue.js +2 -1
- package/es/components/form-render/src/hooks/useAutographOptions.js +5 -7
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +3 -2
- package/es/components/form-render/src/hooks/useBusinessBinding.js +20 -17
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +7 -0
- package/es/components/form-render/src/hooks/useFormRequest.d.ts +8 -1
- package/es/components/form-render/src/hooks/useFormRequest.js +24 -1
- package/es/components/form-render/src/utils/index.d.ts +2 -2
- package/es/components/form-render/src/utils/index.js +27 -3
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +160 -102
- package/es/components/iho-table/index.js +1 -2
- package/es/components/iho-table/src/IhoTable.vue.d.ts +160 -102
- package/es/components/iho-table/src/{IhoTable.js → IhoTable.vue.js} +2 -1
- package/es/components/iho-table/src/components/IhoTableColumn.js +14 -11
- package/es/components/iho-table/src/constants/index.d.ts +5 -3
- package/es/components/iho-table/src/constants/index.js +5 -3
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +64 -5
- package/es/components/iho-table/src/hooks/tapHooks/index.js +17 -9
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +5 -3
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +3 -2
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterPlugin/{filter.js → filter.vue.js} +1 -0
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +14 -12
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +32 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/{editDate.js → editDate.vue.js} +0 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +10 -12
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +11 -15
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +17 -24
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +11 -13
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/{editSeparate.js → editSeparate.vue.js} +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +9 -12
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +13 -17
- package/es/components/iho-table/src/types/index.d.ts +6 -6
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -1
- package/es/components/iho-table/src/utils/index.d.ts +12 -2
- package/es/components/iho-table/src/utils/index.js +33 -2
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +6 -3
- package/es/components/info-header/index.js +1 -1
- package/es/components/info-header/src/{HiddenContent.js → HiddenContent.vue.js} +1 -1
- package/es/components/info-header/src/{InfoEllipsis.js → InfoEllipsis.vue.js} +0 -0
- package/es/components/info-header/src/{InfoHeader.js → InfoHeader.vue.js} +2 -2
- package/es/components/keyboard/index.d.ts +146 -78
- package/es/components/keyboard/index.js +1 -1
- package/es/components/keyboard/src/Keyboard.vue.d.ts +155 -78
- package/es/components/keyboard/src/Keyboard.vue.js +149 -0
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +6 -4
- package/es/components/keyboard/src/components/{InputNumber.js → InputNumber.vue.js} +0 -0
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +118 -0
- package/es/components/keyboard/src/components/NumberPanel.vue.js +206 -0
- package/es/components/map/index.js +1 -1
- package/es/components/map/src/{Map.js → Map.vue.js} +0 -0
- package/es/components/recommend-search/index.d.ts +813 -0
- package/es/components/recommend-search/index.js +10 -0
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +815 -0
- package/es/components/recommend-search/src/RecommendSearch.vue.js +62 -0
- package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +119 -0
- package/es/components/recommend-search/src/components/BaseSearch.vue.js +148 -0
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +303 -0
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +103 -0
- package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +63 -0
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +104 -0
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +350 -0
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +156 -0
- package/es/components/recommend-search/src/constant/index.d.ts +4 -0
- package/es/components/recommend-search/src/constant/index.js +7 -0
- package/es/components/recommend-search/src/types/index.d.ts +9 -0
- package/es/components/recommend-search/src/types/index.js +1 -0
- package/es/components/recommend-search/style/index.css +1 -0
- package/es/components/scale-view/index.js +1 -1
- package/es/components/scale-view/src/{ScaleView.js → ScaleView.vue.js} +5 -5
- package/es/components/scale-view/src/components/{AnswerParse.js → AnswerParse.vue.js} +1 -1
- package/es/components/scale-view/src/components/{EvaluateCountdown.js → EvaluateCountdown.vue.js} +1 -1
- package/es/components/scale-view/src/components/{EvaluatePage.js → EvaluatePage.vue.js} +0 -0
- package/es/components/scale-view/src/components/{LoadingCom.js → LoadingCom.vue.js} +0 -0
- package/es/components/{big-table/src/components/NoData.js → scale-view/src/components/NoData.vue.js} +4 -4
- package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.js +1 -1
- package/es/components/search-cascader/index.js +1 -1
- package/es/components/search-cascader/src/{SearchCascader.js → SearchCascader.vue.js} +0 -0
- package/es/components/search-cascader/src/components/SearchMenu.js +3 -3
- package/es/components/select-label/index.js +2 -2
- package/es/components/select-label/src/{LabelFormContent.js → LabelFormContent.vue.js} +1 -1
- package/es/components/select-label/src/{SelectLabel.js → SelectLabel.vue.js} +1 -1
- package/es/components/select-label/src/{SelectLabel.vue_vue_type_script_setup_true_lang.js → SelectLabel.vue2.js} +2 -2
- package/es/components/select-label/src/components/{label-classify.js → label-classify.vue.js} +0 -0
- package/es/components/select-person/index.js +1 -1
- package/es/components/select-person/src/{SelectPerson.js → SelectPerson.vue.js} +1 -1
- package/es/components/select-person/src/{SelectPerson.vue_vue_type_script_setup_true_lang.js → SelectPerson.vue2.js} +0 -0
- package/es/components/shortcut-provider/index.js +1 -1
- package/es/components/shortcut-provider/src/{ShortcutProvider.js → ShortcutProvider.vue.js} +0 -0
- package/es/components/shortcut-setter/index.js +1 -1
- package/es/components/shortcut-setter/src/{ShortcutSetter.js → ShortcutSetter.vue.js} +1 -1
- package/es/components/shortcut-setter/src/{ShortcutSetterItem.js → ShortcutSetterItem.vue.js} +0 -0
- package/es/components/steps-wheel/index.d.ts +3 -0
- package/es/components/steps-wheel/index.js +1 -1
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +3 -0
- package/es/components/steps-wheel/src/{StepsWheel.js → StepsWheel.vue.js} +38 -9
- package/es/components/steps-wheel/style/index.css +1 -1
- package/es/components/time-line/index.js +1 -1
- package/es/components/time-line/src/{TimeLine.js → TimeLine.vue.js} +0 -0
- package/es/components/vod-chunk-upload/index.js +1 -1
- package/es/components/vod-chunk-upload/src/{chunk-upload-new.js → chunk-upload-new.vue.js} +0 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +2 -2
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/{vod-chunk-upload.js → vod-chunk-upload.vue.js} +3 -3
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
- package/es/shared/assets/img/failure.js +1 -3
- package/es/shared/assets/img/failure.png.js +3 -0
- package/es/shared/assets/img/no-permission.js +1 -3
- package/es/shared/assets/img/no-permission.png.js +3 -0
- package/es/shared/assets/img/nodata.js +1 -3
- package/es/shared/assets/img/nodata.png.js +3 -0
- package/es/shared/assets/img/notfound.js +1 -3
- package/es/shared/assets/img/notfound.png.js +3 -0
- package/es/shared/assets/img/qr.js +1 -3
- package/es/shared/assets/img/qr.png.js +3 -0
- package/es/shared/assets/img/success.js +1 -3
- package/es/shared/assets/img/success.png.js +3 -0
- package/es/shared/assets/img/video.js +1 -3
- package/es/shared/assets/img/video.png.js +3 -0
- package/es/shared/assets/img/video_default_cover.js +1 -3
- package/es/shared/assets/img/video_default_cover.png.js +3 -0
- package/es/shared/assets/img/xb_big.js +1 -3
- package/es/shared/assets/img/xb_big.png.js +3 -0
- package/es/shared/assets/img/xb_small.js +1 -3
- package/es/shared/assets/img/xb_small.png.js +3 -0
- package/es/shared/components/SelectPage/{SelectPage.js → SelectPage.vue.js} +0 -0
- package/es/shared/components/SelectPage/index.js +2 -2
- package/es/shared/components/SvgIcon/{SvgIcon.js → SvgIcon.vue.js} +0 -0
- package/es/shared/components/SvgIcon/index.js +2 -2
- package/es/shared/components/TextOverTooltip/{TextOverTooltip.js → TextOverTooltip.vue.js} +0 -0
- package/es/shared/components/TextOverTooltip/index.js +2 -2
- package/es/shared/components/no-data/{NoData.js → NoData.vue.js} +4 -4
- package/es/shared/components/no-data/index.js +2 -2
- package/es/shared/utils/index.d.ts +1 -1
- package/es/shared/utils/index.js +3 -3
- package/package.json +2 -2
- package/es/components/button-print/src/components/edit.js +0 -142
- package/es/components/fabric-chart/index.d.ts +0 -207
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +0 -208
- package/es/components/keyboard/src/Keyboard.js +0 -285
|
@@ -3,8 +3,8 @@ import { isObject } from '@vue/shared';
|
|
|
3
3
|
import { useMessage, NDropdown, NButton, NIcon } from 'naive-ui';
|
|
4
4
|
import { ChevronDown } from '@vicons/ionicons5';
|
|
5
5
|
import { Print } from './utils/print.js';
|
|
6
|
-
import {
|
|
7
|
-
import IdentityVerification from './components/IdentityVerification.js';
|
|
6
|
+
import { isIReport } from './utils/browserPrint.js';
|
|
7
|
+
import IdentityVerification from './components/IdentityVerification.vue.js';
|
|
8
8
|
import { format } from 'date-fns';
|
|
9
9
|
|
|
10
10
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -67,10 +67,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
printdlgshow: {
|
|
68
68
|
default: "0",
|
|
69
69
|
type: String
|
|
70
|
-
},
|
|
71
|
-
queryPrintFile: {
|
|
72
|
-
type: Function,
|
|
73
|
-
default: () => Promise.resolve({})
|
|
74
70
|
}
|
|
75
71
|
},
|
|
76
72
|
emits: ["success", "error", "clickoutside"],
|
|
@@ -92,8 +88,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
92
88
|
},
|
|
93
89
|
isInited: false,
|
|
94
90
|
watchPrintParamsReformatFn: null,
|
|
95
|
-
spinTimer: null
|
|
96
|
-
fileObject: null
|
|
91
|
+
spinTimer: null
|
|
97
92
|
});
|
|
98
93
|
const options = reactive([{
|
|
99
94
|
label: props.printText,
|
|
@@ -179,21 +174,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
179
174
|
params = Object.assign({}, JSON.parse(getPrintParams(0)), obj);
|
|
180
175
|
return JSON.stringify(params);
|
|
181
176
|
};
|
|
182
|
-
const browserPrint = async (mode) => {
|
|
183
|
-
if (state.fileObject) {
|
|
184
|
-
useBrowserPrint(state.fileObject, mode);
|
|
185
|
-
} else {
|
|
186
|
-
const queryParams = {
|
|
187
|
-
formatId: state.currentFormatId,
|
|
188
|
-
params: getOnceParams()
|
|
189
|
-
};
|
|
190
|
-
const {
|
|
191
|
-
data
|
|
192
|
-
} = await props.queryPrintFile(queryParams) || {};
|
|
193
|
-
state.fileObject = data;
|
|
194
|
-
useBrowserPrint(data, mode);
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
177
|
const handleClickPrint = () => {
|
|
198
178
|
let len = state.printParams.length;
|
|
199
179
|
const callLocalServicesSuccessCbTmp = async (data) => {
|
|
@@ -208,31 +188,26 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
208
188
|
props.prevFn().catch(() => {
|
|
209
189
|
prevFnError();
|
|
210
190
|
return Promise.reject();
|
|
211
|
-
}).then(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
printdlgshow: props.printdlgshow
|
|
220
|
-
};
|
|
221
|
-
if (props.strategy === "MULTI") {
|
|
222
|
-
for (let i = 0; i < state.printParams.length; i++) {
|
|
223
|
-
printInstance.printDirect({
|
|
224
|
-
...queryParams,
|
|
225
|
-
params: getPrintParams(i)
|
|
226
|
-
}, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
|
|
227
|
-
}
|
|
228
|
-
} else {
|
|
191
|
+
}).then(() => {
|
|
192
|
+
const queryParams = {
|
|
193
|
+
formatId: state.currentFormatId,
|
|
194
|
+
templateId: getTemplateIdByFormatId.value,
|
|
195
|
+
printdlgshow: props.printdlgshow
|
|
196
|
+
};
|
|
197
|
+
if (props.strategy === "MULTI") {
|
|
198
|
+
for (let i = 0; i < state.printParams.length; i++) {
|
|
229
199
|
printInstance.printDirect({
|
|
230
200
|
...queryParams,
|
|
231
|
-
params:
|
|
232
|
-
},
|
|
233
|
-
callLocalServicesSuccessCb(res, "print");
|
|
234
|
-
}, callLocalServicesErrorCb);
|
|
201
|
+
params: getPrintParams(i)
|
|
202
|
+
}, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
|
|
235
203
|
}
|
|
204
|
+
} else {
|
|
205
|
+
printInstance.printDirect({
|
|
206
|
+
...queryParams,
|
|
207
|
+
params: getOnceParams()
|
|
208
|
+
}, (res) => {
|
|
209
|
+
callLocalServicesSuccessCb(res, "print");
|
|
210
|
+
}, callLocalServicesErrorCb);
|
|
236
211
|
}
|
|
237
212
|
}).finally(() => {
|
|
238
213
|
state.visible = false;
|
|
@@ -242,21 +217,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
242
217
|
props.prevFn().catch(() => {
|
|
243
218
|
prevFnError();
|
|
244
219
|
return Promise.reject();
|
|
245
|
-
}).then(
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
};
|
|
256
|
-
printInstance.preview(queryParams, (res) => {
|
|
257
|
-
callLocalServicesSuccessCb(res, "preview");
|
|
258
|
-
}, callLocalServicesErrorCb);
|
|
259
|
-
}
|
|
220
|
+
}).then(() => {
|
|
221
|
+
const params = props.strategy === "MULTI" ? getPrintParams() : getOnceParams();
|
|
222
|
+
const queryParams = {
|
|
223
|
+
formatId: state.currentFormatId,
|
|
224
|
+
templateId: getTemplateIdByFormatId.value,
|
|
225
|
+
params
|
|
226
|
+
};
|
|
227
|
+
printInstance.preview(queryParams, (res) => {
|
|
228
|
+
callLocalServicesSuccessCb(res, "preview");
|
|
229
|
+
}, callLocalServicesErrorCb);
|
|
260
230
|
}).finally(() => {
|
|
261
231
|
state.visible = false;
|
|
262
232
|
});
|
|
@@ -265,23 +235,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
265
235
|
props.prevFn().catch(() => {
|
|
266
236
|
prevFnError();
|
|
267
237
|
return Promise.reject();
|
|
268
|
-
}).then(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
},
|
|
281
|
-
params
|
|
282
|
-
};
|
|
283
|
-
printInstance.downloadPDF(queryParams, (res) => callLocalServicesSuccessCb(res, "preview"), callLocalServicesErrorCb);
|
|
284
|
-
}
|
|
238
|
+
}).then(() => {
|
|
239
|
+
const params = props.strategy === "MULTI" ? getPrintParams() : getOnceParams();
|
|
240
|
+
const queryParams = {
|
|
241
|
+
formatId: state.currentFormatId,
|
|
242
|
+
templateId: getTemplateIdByFormatId.value,
|
|
243
|
+
print: {
|
|
244
|
+
print: "1",
|
|
245
|
+
type: "1"
|
|
246
|
+
},
|
|
247
|
+
params
|
|
248
|
+
};
|
|
249
|
+
printInstance.downloadPDF(queryParams, (res) => callLocalServicesSuccessCb(res, "preview"), callLocalServicesErrorCb);
|
|
285
250
|
}).finally(() => {
|
|
286
251
|
state.visible = false;
|
|
287
252
|
});
|
|
@@ -312,7 +277,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
312
277
|
break;
|
|
313
278
|
default:
|
|
314
279
|
state.currentFormatId = key;
|
|
315
|
-
state.fileObject = null;
|
|
316
280
|
state.visible = false;
|
|
317
281
|
break;
|
|
318
282
|
}
|
|
@@ -406,7 +370,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
406
370
|
var _a;
|
|
407
371
|
state.formatList = formatListResult ? formatFormatList(formatListResult.obj) : [];
|
|
408
372
|
state.currentFormatId = getDefaultFormatId(state.formatList, "defaultFlag");
|
|
409
|
-
state.fileObject = null;
|
|
410
373
|
if (!state.currentFormatId) {
|
|
411
374
|
$message.error("\u83B7\u53D6\u6253\u5370\u683C\u5F0F\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01");
|
|
412
375
|
return requestError();
|
|
@@ -461,10 +424,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
461
424
|
state.printParams = formatParams(state.templateParams, props.params);
|
|
462
425
|
};
|
|
463
426
|
const verifiySuccess = (token) => {
|
|
464
|
-
var _a;
|
|
465
427
|
state.identityVerification.visible = false;
|
|
466
|
-
if ((
|
|
467
|
-
return;
|
|
428
|
+
if (isIReport(state.currentFormatId))
|
|
429
|
+
return callLocalServicesSuccessCb(null, "edit");
|
|
468
430
|
const queryParams = {
|
|
469
431
|
formatId: state.currentFormatId,
|
|
470
432
|
templateId: getTemplateIdByFormatId.value,
|
|
@@ -489,7 +451,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
489
451
|
deep: true
|
|
490
452
|
});
|
|
491
453
|
return (_ctx, _cache) => {
|
|
492
|
-
var _a;
|
|
493
454
|
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(NDropdown), {
|
|
494
455
|
class: "c-dropdown",
|
|
495
456
|
placement: "bottom-start",
|
|
@@ -518,9 +479,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
518
479
|
}, 8, ["show", "options"]), createVNode(IdentityVerification, mergeProps(_ctx.$attrs, {
|
|
519
480
|
modelValue: state.identityVerification.visible,
|
|
520
481
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.identityVerification.visible = $event),
|
|
521
|
-
|
|
482
|
+
formatId: state.currentFormatId,
|
|
483
|
+
templateId: unref(getTemplateIdByFormatId),
|
|
522
484
|
onSuccess: verifiySuccess
|
|
523
|
-
}), null, 16, ["modelValue", "
|
|
485
|
+
}), null, 16, ["modelValue", "formatId", "templateId"])], 64);
|
|
524
486
|
};
|
|
525
487
|
}
|
|
526
488
|
});
|
|
@@ -1,63 +1,69 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { UploadFileInfo } from 'naive-ui';
|
|
3
|
+
import { AnyObject } from '../../../../../es/shared/types';
|
|
3
4
|
declare const _default: import("vue").DefineComponent<{
|
|
4
|
-
|
|
5
|
-
type:
|
|
5
|
+
formatId: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
required: false;
|
|
8
|
+
};
|
|
9
|
+
token: {
|
|
10
|
+
type: StringConstructor;
|
|
6
11
|
required: true;
|
|
7
|
-
default: () => Promise<void>;
|
|
8
12
|
};
|
|
9
13
|
}, {
|
|
14
|
+
PROTOCOL: string;
|
|
15
|
+
HOST: string;
|
|
16
|
+
BASEURL: string;
|
|
17
|
+
SAVEIREPORT: string;
|
|
18
|
+
QUERYFILELIST: string;
|
|
19
|
+
DELETEFILE: string;
|
|
20
|
+
instance: import("axios").AxiosInstance;
|
|
10
21
|
$message: import("naive-ui").MessageApi;
|
|
11
22
|
props: {
|
|
12
|
-
|
|
23
|
+
formatId?: string | undefined;
|
|
24
|
+
token: string;
|
|
13
25
|
};
|
|
14
26
|
fileList: import("vue").Ref<{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
type?: string | null | undefined;
|
|
48
|
-
fullPath?: string | null | undefined;
|
|
49
|
-
}[];
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
batchId?: string | null | undefined;
|
|
30
|
+
percentage?: number | null | undefined;
|
|
31
|
+
status: "error" | "pending" | "uploading" | "finished" | "removed";
|
|
32
|
+
url?: string | null | undefined;
|
|
33
|
+
file?: {
|
|
34
|
+
readonly lastModified: number;
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly webkitRelativePath: string;
|
|
37
|
+
readonly size: number;
|
|
38
|
+
readonly type: string;
|
|
39
|
+
arrayBuffer: {
|
|
40
|
+
(): Promise<ArrayBuffer>;
|
|
41
|
+
(): Promise<ArrayBuffer>;
|
|
42
|
+
};
|
|
43
|
+
slice: {
|
|
44
|
+
(start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob;
|
|
45
|
+
(start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob;
|
|
46
|
+
};
|
|
47
|
+
stream: {
|
|
48
|
+
(): ReadableStream<Uint8Array>;
|
|
49
|
+
(): NodeJS.ReadableStream;
|
|
50
|
+
};
|
|
51
|
+
text: {
|
|
52
|
+
(): Promise<string>;
|
|
53
|
+
(): Promise<string>;
|
|
54
|
+
};
|
|
55
|
+
} | null | undefined;
|
|
56
|
+
thumbnailUrl?: string | null | undefined;
|
|
57
|
+
type?: string | null | undefined;
|
|
58
|
+
fullPath?: string | null | undefined;
|
|
50
59
|
}[]>;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
file: UploadFileInfo;
|
|
54
|
-
fileList: UploadFileInfo[];
|
|
55
|
-
}, index: number) => void;
|
|
56
|
-
onBeforeUpload: (data: {
|
|
60
|
+
queryFileList: () => void;
|
|
61
|
+
onRemove: (options: {
|
|
57
62
|
file: UploadFileInfo;
|
|
58
|
-
fileList: UploadFileInfo
|
|
59
|
-
}) => Promise<
|
|
60
|
-
|
|
63
|
+
fileList: Array<UploadFileInfo>;
|
|
64
|
+
}) => Promise<unknown>;
|
|
65
|
+
submit: (datas: AnyObject) => Promise<unknown>;
|
|
66
|
+
validateFormat: () => boolean;
|
|
61
67
|
NForm: any;
|
|
62
68
|
NFormItem: import("vue").DefineComponent<{
|
|
63
69
|
readonly label: StringConstructor;
|
|
@@ -1226,12 +1232,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1226
1232
|
NSpace: any;
|
|
1227
1233
|
Archive: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1228
1234
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1229
|
-
|
|
1230
|
-
type:
|
|
1235
|
+
formatId: {
|
|
1236
|
+
type: StringConstructor;
|
|
1237
|
+
required: false;
|
|
1238
|
+
};
|
|
1239
|
+
token: {
|
|
1240
|
+
type: StringConstructor;
|
|
1231
1241
|
required: true;
|
|
1232
|
-
default: () => Promise<void>;
|
|
1233
1242
|
};
|
|
1234
|
-
}>>, {
|
|
1235
|
-
saveIReportFormat: Function;
|
|
1236
|
-
}>;
|
|
1243
|
+
}>>, {}>;
|
|
1237
1244
|
export default _default;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createTextVNode } from 'vue';
|
|
2
|
+
import { useMessage, NForm, NFormItem, NSpace, NUpload, NUploadDragger, NIcon, NText, NP } from 'naive-ui';
|
|
3
|
+
import { Archive } from '@vicons/ionicons5';
|
|
4
|
+
import axios from 'axios';
|
|
5
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = { style: { "margin-bottom": "12px" } };
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "EditFormat",
|
|
10
|
+
props: {
|
|
11
|
+
formatId: null,
|
|
12
|
+
token: null
|
|
13
|
+
},
|
|
14
|
+
setup(__props, { expose }) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const PROTOCOL = window.location.protocol;
|
|
17
|
+
const HOST = window.location.host;
|
|
18
|
+
const BASEURL = `${PROTOCOL}//${HOST}/bi-api`;
|
|
19
|
+
const SAVEIREPORT = `${BASEURL}/reprot/print/open/client/saveIReportFormat`;
|
|
20
|
+
const QUERYFILELIST = `${BASEURL}/reprot/print/open/client/getIReportFiles`;
|
|
21
|
+
const DELETEFILE = `${BASEURL}/reprot/print/open/client/delIReportFiles`;
|
|
22
|
+
const instance = axios.create({});
|
|
23
|
+
const $message = useMessage();
|
|
24
|
+
const fileList = ref([]);
|
|
25
|
+
queryFileList();
|
|
26
|
+
function queryFileList() {
|
|
27
|
+
var _a;
|
|
28
|
+
instance.get(`${QUERYFILELIST}?formatId=${(_a = props.formatId) == null ? void 0 : _a.split("_")[1]}&authorizationKey=${props.token}`).then(({ data }) => {
|
|
29
|
+
(data.list || []).forEach((file) => {
|
|
30
|
+
fileList.value.push({
|
|
31
|
+
id: Date.now().toString(),
|
|
32
|
+
name: file,
|
|
33
|
+
status: "finished"
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function onRemove(options) {
|
|
39
|
+
return new Promise((resolve, reject) => {
|
|
40
|
+
var _a;
|
|
41
|
+
instance.get(
|
|
42
|
+
`${DELETEFILE}?formatId=${(_a = props.formatId) == null ? void 0 : _a.split("_")[1]}&authorizationKey=${props.token}&fileName=${options.file.name}`
|
|
43
|
+
).then(({ data }) => {
|
|
44
|
+
if ((data == null ? void 0 : data.result) !== "SUCCESS") {
|
|
45
|
+
$message.error((data == null ? void 0 : data.resultMsg) || "\u5220\u9664\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\uFF01");
|
|
46
|
+
reject();
|
|
47
|
+
} else {
|
|
48
|
+
$message.success("\u5220\u9664\u6587\u4EF6\u6210\u529F\uFF01");
|
|
49
|
+
resolve("SUCCESS");
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function submit(datas) {
|
|
55
|
+
return new Promise((resolve, reject) => {
|
|
56
|
+
if (!validateFormat()) {
|
|
57
|
+
$message.warning("\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2Ajrxml\u6587\u4EF6\u548C\u4E00\u4E2Ajasper\u6587\u4EF6\uFF01");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const files = fileList.value.filter((file) => file.file);
|
|
61
|
+
if (files.length === 0) {
|
|
62
|
+
$message.warning("\u672C\u6B21\u65E0\u65B0\u6587\u4EF6\u589E\u52A0\uFF0C\u8BF7\u5148\u6DFB\u52A0\u65B0\u6587\u4EF6\uFF01");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const params = new FormData();
|
|
66
|
+
Object.keys(datas).forEach((v) => {
|
|
67
|
+
params.append(v, datas[v]);
|
|
68
|
+
});
|
|
69
|
+
fileList.value.forEach((file) => {
|
|
70
|
+
file.file && params.append("files", file.file);
|
|
71
|
+
});
|
|
72
|
+
instance.post(SAVEIREPORT, params, {
|
|
73
|
+
headers: {
|
|
74
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
75
|
+
}
|
|
76
|
+
}).then(({ data }) => {
|
|
77
|
+
if ((data == null ? void 0 : data.result) !== "SUCCESS") {
|
|
78
|
+
$message.error((data == null ? void 0 : data.resultMsg) || "\u4E0A\u4F20\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\uFF01");
|
|
79
|
+
reject();
|
|
80
|
+
} else {
|
|
81
|
+
resolve("SUCCESS");
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function validateFormat() {
|
|
87
|
+
if (fileList.value.length < 2)
|
|
88
|
+
return false;
|
|
89
|
+
let isJrxml = false;
|
|
90
|
+
let isJasper = false;
|
|
91
|
+
const rExt = /\.([^.]+)$/;
|
|
92
|
+
fileList.value.forEach((file) => {
|
|
93
|
+
var _a;
|
|
94
|
+
const name = ((_a = file.file) == null ? void 0 : _a.name) || file.name || "";
|
|
95
|
+
const ext = rExt.exec(name) ? RegExp.$1.toLowerCase() : "";
|
|
96
|
+
if (ext && ".jrxml".includes(ext))
|
|
97
|
+
isJrxml = true;
|
|
98
|
+
if (ext && ".jasper".includes(ext))
|
|
99
|
+
isJasper = true;
|
|
100
|
+
});
|
|
101
|
+
if (isJrxml && isJasper)
|
|
102
|
+
return true;
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
expose({
|
|
106
|
+
submit
|
|
107
|
+
});
|
|
108
|
+
return (_ctx, _cache) => {
|
|
109
|
+
return openBlock(), createBlock(unref(NForm), {
|
|
110
|
+
"label-placement": "left",
|
|
111
|
+
"label-width": 75
|
|
112
|
+
}, {
|
|
113
|
+
default: withCtx(() => [
|
|
114
|
+
createVNode(unref(NFormItem), {
|
|
115
|
+
label: "\u683C\u5F0F\u6587\u4EF6:",
|
|
116
|
+
path: "file"
|
|
117
|
+
}, {
|
|
118
|
+
default: withCtx(() => [
|
|
119
|
+
createVNode(unref(NSpace), { vertical: "" }, {
|
|
120
|
+
default: withCtx(() => [
|
|
121
|
+
createVNode(unref(NUpload), {
|
|
122
|
+
multiple: "",
|
|
123
|
+
"directory-dnd": "",
|
|
124
|
+
"file-list": fileList.value,
|
|
125
|
+
"onUpdate:file-list": _cache[0] || (_cache[0] = ($event) => fileList.value = $event),
|
|
126
|
+
onRemove
|
|
127
|
+
}, {
|
|
128
|
+
default: withCtx(() => [
|
|
129
|
+
createVNode(unref(NUploadDragger), null, {
|
|
130
|
+
default: withCtx(() => [
|
|
131
|
+
createElementVNode("div", _hoisted_1, [
|
|
132
|
+
createVNode(unref(NIcon), {
|
|
133
|
+
size: "36",
|
|
134
|
+
depth: 3,
|
|
135
|
+
component: unref(Archive)
|
|
136
|
+
}, null, 8, ["component"])
|
|
137
|
+
]),
|
|
138
|
+
createVNode(unref(NText), { style: { "font-size": "12px" } }, {
|
|
139
|
+
default: withCtx(() => [
|
|
140
|
+
createTextVNode("\u70B9\u51FB\u6216\u8005\u62D6\u52A8\u6587\u4EF6\u5230\u8BE5\u533A\u57DF\u6765\u4E0A\u4F20")
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
}),
|
|
144
|
+
createVNode(unref(NP), {
|
|
145
|
+
depth: "3",
|
|
146
|
+
style: { "margin": "5px 0 0 0", "font-size": "13px" }
|
|
147
|
+
}, {
|
|
148
|
+
default: withCtx(() => [
|
|
149
|
+
createTextVNode("\u81F3\u5C11\u5305\u542B\u4E00\u4E2Ajxml\u6587\u4EF6\u548C\u4E00\u4E2Ajasper\u6587\u4EF6")
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
})
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
})
|
|
156
|
+
]),
|
|
157
|
+
_: 1
|
|
158
|
+
}, 8, ["file-list"])
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
})
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
})
|
|
165
|
+
]),
|
|
166
|
+
_: 1
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
var EditFormat = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "EditFormat.vue"]]);
|
|
172
|
+
|
|
173
|
+
export { EditFormat as default };
|