orion-design 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -0
- package/dist/Throne/index.d.ts +18 -0
- package/dist/Throne/index.js +20 -0
- package/dist/Throne/index.js.map +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
- package/dist/components/Button/Button.vue.d.ts +2 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.js +27 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Flex/Col.d.ts +4 -4
- package/dist/components/Flex/Item.d.ts +4 -4
- package/dist/components/Flex/Row.d.ts +4 -4
- package/dist/components/Flex/index.d.ts +4 -4
- package/dist/components/Flex/index.js +95 -127
- package/dist/components/Flex/index.js.map +1 -0
- package/dist/components/Form/ButtonGroup/ButtonGroup.d.ts +5 -0
- package/dist/components/Form/ButtonGroup/ButtonGroup.js +2 -0
- package/dist/components/Form/ButtonGroup/ButtonGroup.js.map +1 -0
- package/dist/components/Form/ButtonGroup/ButtonGroup.vue.d.ts +17 -0
- package/dist/components/Form/ButtonGroup/index.d.ts +1 -0
- package/dist/components/Form/ButtonGroup/index.js +2 -0
- package/dist/components/Form/ButtonGroup/index.js.map +1 -0
- package/dist/components/Form/Checkbox/Checkbox.d.ts +10 -0
- package/dist/components/Form/Checkbox/Checkbox.js +2 -0
- package/dist/components/Form/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Form/Checkbox/Checkbox.vue.d.ts +3 -0
- package/dist/components/Form/Checkbox/index.d.ts +1 -0
- package/dist/components/Form/Checkbox/index.js +2 -0
- package/dist/components/Form/Checkbox/index.js.map +1 -0
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.d.ts +14 -0
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.js +2 -0
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.vue.d.ts +3 -0
- package/dist/components/Form/CheckboxGroup/index.d.ts +1 -0
- package/dist/components/Form/CheckboxGroup/index.js +2 -0
- package/dist/components/Form/CheckboxGroup/index.js.map +1 -0
- package/dist/components/Form/DateInput/DateInput.d.ts +17 -0
- package/dist/components/Form/DateInput/DateInput.js +2 -0
- package/dist/components/Form/DateInput/DateInput.js.map +1 -0
- package/dist/components/Form/DateInput/DateInput.vue.d.ts +3 -0
- package/dist/components/Form/DateInput/index.d.ts +1 -0
- package/dist/components/Form/DateInput/index.js +2 -0
- package/dist/components/Form/DateInput/index.js.map +1 -0
- package/dist/components/Form/FileInput/FileInput.d.ts +10 -0
- package/dist/components/Form/FileInput/FileInput.js +2 -0
- package/dist/components/Form/FileInput/FileInput.js.map +1 -0
- package/dist/components/Form/FileInput/FileInput.vue.d.ts +451 -0
- package/dist/components/Form/FileInput/index.d.ts +1 -0
- package/dist/components/Form/FileInput/index.js +2 -0
- package/dist/components/Form/FileInput/index.js.map +1 -0
- package/dist/components/Form/Form.d.ts +21 -0
- package/dist/components/Form/Form.js +5 -0
- package/dist/components/Form/Form.js.map +1 -0
- package/dist/components/Form/Form.vue.d.ts +465 -0
- package/dist/components/Form/MultiSelect/MultiSelect.d.ts +15 -0
- package/dist/components/Form/MultiSelect/MultiSelect.js +2 -0
- package/dist/components/Form/MultiSelect/MultiSelect.js.map +1 -0
- package/dist/components/Form/MultiSelect/MultiSelect.vue.d.ts +3 -0
- package/dist/components/Form/MultiSelect/index.d.ts +1 -0
- package/dist/components/Form/MultiSelect/index.js +2 -0
- package/dist/components/Form/MultiSelect/index.js.map +1 -0
- package/dist/components/Form/PasswordInput/PasswordInput.d.ts +13 -0
- package/dist/components/Form/PasswordInput/PasswordInput.js +2 -0
- package/dist/components/Form/PasswordInput/PasswordInput.js.map +1 -0
- package/dist/components/Form/PasswordInput/PasswordInput.vue.d.ts +3 -0
- package/dist/components/Form/PasswordInput/index.d.ts +1 -0
- package/dist/components/Form/PasswordInput/index.js +2 -0
- package/dist/components/Form/PasswordInput/index.js.map +1 -0
- package/dist/components/Form/RadioGroup/RadioGroup.d.ts +14 -0
- package/dist/components/Form/RadioGroup/RadioGroup.js +2 -0
- package/dist/components/Form/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/Form/RadioGroup/RadioGroup.vue.d.ts +3 -0
- package/dist/components/Form/RadioGroup/index.d.ts +1 -0
- package/dist/components/Form/RadioGroup/index.js +2 -0
- package/dist/components/Form/RadioGroup/index.js.map +1 -0
- package/dist/components/Form/SingleSelect/SingleSelect.d.ts +17 -0
- package/dist/components/Form/SingleSelect/SingleSelect.js +2 -0
- package/dist/components/Form/SingleSelect/SingleSelect.js.map +1 -0
- package/dist/components/Form/SingleSelect/SingleSelect.vue.d.ts +3 -0
- package/dist/components/Form/SingleSelect/index.d.ts +1 -0
- package/dist/components/Form/SingleSelect/index.js +2 -0
- package/dist/components/Form/SingleSelect/index.js.map +1 -0
- package/dist/components/Form/StringInput/StringInput.d.ts +13 -0
- package/dist/components/Form/StringInput/StringInput.js +2 -0
- package/dist/components/Form/StringInput/StringInput.js.map +1 -0
- package/dist/components/Form/StringInput/StringInput.vue.d.ts +3 -0
- package/dist/components/Form/StringInput/index.d.ts +1 -0
- package/dist/components/Form/StringInput/index.js +2 -0
- package/dist/components/Form/StringInput/index.js.map +1 -0
- package/dist/components/Form/Switch/Switch.d.ts +10 -0
- package/dist/components/Form/Switch/Switch.js +2 -0
- package/dist/components/Form/Switch/Switch.js.map +1 -0
- package/dist/components/Form/Switch/Switch.vue.d.ts +3 -0
- package/dist/components/Form/Switch/index.d.ts +1 -0
- package/dist/components/Form/Switch/index.js +2 -0
- package/dist/components/Form/Switch/index.js.map +1 -0
- package/dist/components/Form/Textarea/Textarea.d.ts +14 -0
- package/dist/components/Form/Textarea/Textarea.js +2 -0
- package/dist/components/Form/Textarea/Textarea.js.map +1 -0
- package/dist/components/Form/Textarea/Textarea.vue.d.ts +3 -0
- package/dist/components/Form/Textarea/index.d.ts +1 -0
- package/dist/components/Form/Textarea/index.js +2 -0
- package/dist/components/Form/Textarea/index.js.map +1 -0
- package/dist/components/Form/hooks/useForm.d.ts +7 -0
- package/dist/components/Form/hooks/useForm.js +44 -0
- package/dist/components/Form/hooks/useForm.js.map +1 -0
- package/dist/components/Form/index.d.ts +301 -0
- package/dist/components/Form/index.js +660 -0
- package/dist/components/Form/index.js.map +1 -0
- package/dist/components/Form/utils/index.d.ts +8 -0
- package/dist/components/Form/utils/index.js +26 -0
- package/dist/components/Form/utils/index.js.map +1 -0
- package/dist/components/Modal/index.d.ts +1 -14
- package/dist/components/Modal/useModal.d.ts +1 -1
- package/dist/components/Modal/useModal.js +7 -7
- package/dist/components/Modal/useModal.js.map +1 -0
- package/dist/components/Pagetable/Pagetable.d.ts +91 -0
- package/dist/components/Pagetable/columns/PagetableCellButton.d.ts +24 -0
- package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +78 -0
- package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +101 -0
- package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +78 -0
- package/dist/components/Pagetable/columns/PagetableColumnIndex.d.ts +5 -0
- package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +109 -0
- package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +114 -0
- package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +109 -0
- package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +75 -0
- package/dist/components/Pagetable/columns/PagetableColumngroup.d.ts +35 -0
- package/dist/components/Pagetable/hooks/useColumns.d.ts +1 -0
- package/dist/components/Pagetable/hooks/useColumns.js +96 -0
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -0
- package/dist/components/Pagetable/index.d.ts +85 -0
- package/dist/components/Pagetable/index.js +521 -0
- package/dist/components/Pagetable/index.js.map +1 -0
- package/dist/components/Pagetable/interface.d.ts +10 -0
- package/dist/components/Pagetable/interface.js +2 -0
- package/dist/components/Pagetable/interface.js.map +1 -0
- package/dist/components/Pagetable/utils/index.d.ts +15 -0
- package/dist/components/Pagetable/utils/index.js +169 -0
- package/dist/components/Pagetable/utils/index.js.map +1 -0
- package/dist/components/Space/index.d.ts +12 -12
- package/dist/components/_util/arrays.d.ts +5 -0
- package/dist/components/_util/arrays.js +8 -0
- package/dist/components/_util/arrays.js.map +1 -0
- package/dist/components/_util/browser.d.ts +3 -0
- package/dist/components/_util/browser.js +9 -0
- package/dist/components/_util/browser.js.map +1 -0
- package/dist/components/_util/classNames.js +20 -27
- package/dist/components/_util/classNames.js.map +1 -0
- package/dist/components/_util/dom/aria.d.ts +30 -0
- package/dist/components/_util/dom/aria.js +46 -0
- package/dist/components/_util/dom/aria.js.map +1 -0
- package/dist/components/_util/dom/element.d.ts +3 -0
- package/dist/components/_util/dom/element.js +18 -0
- package/dist/components/_util/dom/element.js.map +1 -0
- package/dist/components/_util/dom/event.d.ts +6 -0
- package/dist/components/_util/dom/event.js +10 -0
- package/dist/components/_util/dom/event.js.map +1 -0
- package/dist/components/_util/dom/index.d.ts +6 -0
- package/dist/components/_util/dom/index.js +39 -0
- package/dist/components/_util/dom/index.js.map +1 -0
- package/dist/components/_util/dom/position.d.ts +7 -0
- package/dist/components/_util/dom/position.js +30 -0
- package/dist/components/_util/dom/position.js.map +1 -0
- package/dist/components/_util/dom/scroll.d.ts +11 -0
- package/dist/components/_util/dom/scroll.js +78 -0
- package/dist/components/_util/dom/scroll.js.map +1 -0
- package/dist/components/_util/dom/style.d.ts +9 -0
- package/dist/components/_util/dom/style.js +58 -0
- package/dist/components/_util/dom/style.js.map +1 -0
- package/dist/components/_util/easings.d.ts +1 -0
- package/dist/components/_util/easings.js +8 -0
- package/dist/components/_util/easings.js.map +1 -0
- package/dist/components/_util/error.d.ts +3 -0
- package/dist/components/_util/error.js +22 -0
- package/dist/components/_util/error.js.map +1 -0
- package/dist/components/_util/functions.d.ts +1 -0
- package/dist/components/_util/functions.js +6 -0
- package/dist/components/_util/functions.js.map +1 -0
- package/dist/components/_util/i18n.d.ts +1 -0
- package/dist/components/_util/i18n.js +5 -0
- package/dist/components/_util/i18n.js.map +1 -0
- package/dist/components/_util/index.d.ts +15 -0
- package/dist/components/_util/index.js +140 -0
- package/dist/components/_util/index.js.map +1 -0
- package/dist/components/_util/isValid.js +4 -4
- package/dist/components/_util/isValid.js.map +1 -0
- package/dist/components/_util/objects.d.ts +8 -0
- package/dist/components/_util/objects.js +17 -0
- package/dist/components/_util/objects.js.map +1 -0
- package/dist/components/_util/props-util/index.d.ts +4 -4
- package/dist/components/_util/props-util/index.js +23 -50
- package/dist/components/_util/props-util/index.js.map +1 -0
- package/dist/components/_util/props-util/initDefaultProps.d.ts +2 -2
- package/dist/components/_util/props-util/initDefaultProps.js +13 -24
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -0
- package/dist/components/_util/raf.d.ts +2 -0
- package/dist/components/_util/raf.js +7 -0
- package/dist/components/_util/raf.js.map +1 -0
- package/dist/components/_util/rand.d.ts +12 -0
- package/dist/components/_util/rand.js +6 -0
- package/dist/components/_util/rand.js.map +1 -0
- package/dist/components/_util/strings.d.ts +6 -0
- package/dist/components/_util/strings.js +11 -0
- package/dist/components/_util/strings.js.map +1 -0
- package/dist/components/_util/throttleByRaf.d.ts +4 -0
- package/dist/components/_util/throttleByRaf.js +16 -0
- package/dist/components/_util/throttleByRaf.js.map +1 -0
- package/dist/components/_util/type.d.ts +5 -1
- package/dist/components/_util/type.js +52 -65
- package/dist/components/_util/type.js.map +1 -0
- package/dist/components/_util/types.d.ts +10 -0
- package/dist/components/_util/types.js +25 -0
- package/dist/components/_util/types.js.map +1 -0
- package/dist/components/_util/typescript.d.ts +12 -0
- package/dist/components/_util/typescript.js +5 -0
- package/dist/components/_util/typescript.js.map +1 -0
- package/dist/components/_util/util.d.ts +1 -1
- package/dist/components/_util/util.js +46 -74
- package/dist/components/_util/util.js.map +1 -0
- package/dist/components/_util/vue/global-node.d.ts +3 -0
- package/dist/components/_util/vue/global-node.js +21 -0
- package/dist/components/_util/vue/global-node.js.map +1 -0
- package/dist/components/_util/vue/icon.d.ts +23 -0
- package/dist/components/_util/vue/icon.js +154 -0
- package/dist/components/_util/vue/icon.js.map +1 -0
- package/dist/components/_util/vue/index.d.ts +9 -0
- package/dist/components/_util/vue/index.js +44 -0
- package/dist/components/_util/vue/index.js.map +1 -0
- package/dist/components/_util/vue/install.d.ts +6 -0
- package/dist/components/_util/vue/install.js +21 -0
- package/dist/components/_util/vue/install.js.map +1 -0
- package/dist/components/_util/vue/props/index.d.ts +3 -0
- package/dist/components/_util/vue/props/index.js +9 -0
- package/dist/components/_util/vue/props/index.js.map +1 -0
- package/dist/components/_util/vue/props/runtime.d.ts +29 -0
- package/dist/components/_util/vue/props/runtime.js +37 -0
- package/dist/components/_util/vue/props/runtime.js.map +1 -0
- package/dist/components/_util/vue/props/types.d.ts +120 -0
- package/dist/components/_util/vue/props/types.js +2 -0
- package/dist/components/_util/vue/props/types.js.map +1 -0
- package/dist/components/_util/vue/props/util.d.ts +8 -0
- package/dist/components/_util/vue/props/util.js +2 -0
- package/dist/components/_util/vue/props/util.js.map +1 -0
- package/dist/components/_util/vue/refs.d.ts +3 -0
- package/dist/components/_util/vue/refs.js +12 -0
- package/dist/components/_util/vue/refs.js.map +1 -0
- package/dist/components/_util/vue/size.d.ts +2 -0
- package/dist/components/_util/vue/size.js +6 -0
- package/dist/components/_util/vue/size.js.map +1 -0
- package/dist/components/_util/vue/typescript.d.ts +5 -0
- package/dist/components/_util/vue/typescript.js +2 -0
- package/dist/components/_util/vue/typescript.js.map +1 -0
- package/dist/components/_util/vue/validator.d.ts +3 -0
- package/dist/components/_util/vue/validator.js +7 -0
- package/dist/components/_util/vue/validator.js.map +1 -0
- package/dist/components/_util/vue/vnode.d.ts +50 -0
- package/dist/components/_util/vue/vnode.js +68 -0
- package/dist/components/_util/vue/vnode.js.map +1 -0
- package/dist/components/_util/vue-types/index.d.ts +3 -3
- package/dist/components/_util/vue-types/index.js +275 -417
- package/dist/components/_util/vue-types/index.js.map +1 -0
- package/dist/components/components.d.ts +4 -0
- package/dist/components/components.js +19 -12
- package/dist/components/components.js.map +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +26 -24
- package/dist/components/index.js.map +1 -0
- package/dist/components-CutWiB7Q.js +68 -0
- package/dist/components-CutWiB7Q.js.map +1 -0
- package/dist/error/OrionError.js +7 -12
- package/dist/error/OrionError.js.map +1 -0
- package/dist/functions-DzLqXvGt.js +33 -0
- package/dist/functions-DzLqXvGt.js.map +1 -0
- package/dist/index-BbsXWo7C.js +44 -0
- package/dist/index-BbsXWo7C.js.map +1 -0
- package/dist/index-C8JNJPWW.js +8 -0
- package/dist/index-C8JNJPWW.js.map +1 -0
- package/dist/index.css +1 -44
- package/dist/index.d.ts +2 -1
- package/dist/index.js +27 -14
- package/dist/index.js.map +1 -0
- package/dist/print/LodopFuncs.js +48 -111
- package/dist/print/LodopFuncs.js.map +1 -0
- package/dist/print/index.d.ts +2 -2
- package/dist/print/index.js +111 -220
- package/dist/print/index.js.map +1 -0
- package/dist/request/ErrorHandlerChain.js +17 -15
- package/dist/request/ErrorHandlerChain.js.map +1 -0
- package/dist/request/RequestFilterChain.d.ts +1 -1
- package/dist/request/RequestFilterChain.js +16 -14
- package/dist/request/RequestFilterChain.js.map +1 -0
- package/dist/request/ResponseParserChain.d.ts +1 -1
- package/dist/request/ResponseParserChain.js +17 -15
- package/dist/request/ResponseParserChain.js.map +1 -0
- package/dist/request/disivion/DateSerializer.js +25 -46
- package/dist/request/disivion/DateSerializer.js.map +1 -0
- package/dist/request/disivion/DivisionErrorHandler.d.ts +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +30 -52
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -0
- package/dist/request/disivion/DivisionResponseParser.d.ts +2 -2
- package/dist/request/disivion/DivisionResponseParser.js +13 -25
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -0
- package/dist/request/disivion/index.d.ts +3 -3
- package/dist/request/disivion/index.js +230 -480
- package/dist/request/disivion/index.js.map +1 -0
- package/dist/request/error/BizExceptionResponseError.d.ts +2 -2
- package/dist/request/error/BizExceptionResponseError.js +8 -15
- package/dist/request/error/BizExceptionResponseError.js.map +1 -0
- package/dist/request/error/ExceptionResponseError.d.ts +2 -2
- package/dist/request/error/ExceptionResponseError.js +8 -15
- package/dist/request/error/ExceptionResponseError.js.map +1 -0
- package/dist/request/error/ResponseError.d.ts +1 -1
- package/dist/request/error/ResponseError.js +7 -14
- package/dist/request/error/ResponseError.js.map +1 -0
- package/dist/request/error/SessionExceptionResponseError.d.ts +2 -2
- package/dist/request/error/SessionExceptionResponseError.js +8 -15
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -0
- package/dist/request/index.js +11 -17
- package/dist/request/index.js.map +1 -0
- package/dist/style/index.d.ts +0 -3
- package/dist/style/index.js +1 -0
- package/dist/style/index.js.map +1 -0
- package/dist/utils/DateUtil.js +36 -50
- package/dist/utils/DateUtil.js.map +1 -0
- package/dist/utils/NumberUtil.js +9 -8
- package/dist/utils/NumberUtil.js.map +1 -0
- package/dist/utils/cloneDeep.js +5 -1
- package/dist/utils/cloneDeep.js.map +1 -0
- package/dist/utils/delay.js +6 -4
- package/dist/utils/delay.js.map +1 -0
- package/dist/utils/functions.d.ts +1 -0
- package/dist/utils/functions.js +6 -0
- package/dist/utils/functions.js.map +1 -0
- package/dist/utils/index.js +15 -9
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/md5.js +120 -245
- package/dist/utils/md5.js.map +1 -0
- package/dist/utils/uuid.js +28 -58
- package/dist/utils/uuid.js.map +1 -0
- package/dist/version/index.d.ts +1 -1
- package/dist/version/index.js +5 -6
- package/dist/version/index.js.map +1 -0
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +5 -3
- package/dist/version/version.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/global.d.ts +6 -0
- package/package.json +53 -63
- package/dist/components-BTX5S_6V.js +0 -128
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/print/index.ts"],"sourcesContent":["// @ts-nocheck\r\nimport OrionError from '../error/OrionError'\r\nimport { getLodop } from './LodopFuncs'\r\n\r\nexport function lodopInit() {\r\n // 获取lodop\r\n const LODOP = getLodop()\r\n\r\n return new Promise((resolve) => {\r\n resolve(LODOP)\r\n })\r\n}\r\n\r\n// 获取打印机列表\r\nexport function getPrinterList() {\r\n lodopInit()\r\n const printers = []\r\n const count = LODOP.GET_PRINTER_COUNT()\r\n for (let i = 0; i < count; i++) {\r\n printers.push({\r\n value: i,\r\n content: LODOP.GET_PRINTER_NAME(i),\r\n })\r\n }\r\n\r\n return printers\r\n}\r\n\r\n// 获取打印机名称列表\r\nexport function getPrinterNameList() {\r\n lodopInit()\r\n const printers = []\r\n const count = LODOP.GET_PRINTER_COUNT()\r\n for (let i = 0; i < count; i++) {\r\n const prname = LODOP.GET_PRINTER_NAME(i)\r\n printers.push({\r\n value: prname,\r\n content: prname,\r\n })\r\n }\r\n\r\n return printers\r\n}\r\n\r\n//////////////////////////////////// 接口\r\n\r\n// 获取默认打印机名称\r\nexport async function getDefaultPrinter() {\r\n const LODOP = await lodopInit()\r\n return LODOP.GET_PRINTER_NAME(-1) // 获取默认打印机名称(-1是指定默认打印机)\r\n}\r\n\r\nexport interface PrintParaI {\r\n direction?: 1 | 2 | 3 | 0 // 1纵向;2横向;3纵向,高度自适应;0方向不定\r\n page_width?: number // 纸张宽度,默认为0\r\n page_height?: number // 纸张高度,默认为0\r\n page_type?: string // 纸张类型\r\n print_duplex?: 0 | 1 | 2 | 3 // 双面打印,默认为0 0-不控制 1-不双面 2-双面(长边装订) 3-小册子双面(短边装订_长边水平)\r\n print_defaultsource?: 0 | 1 | 4 | 7 // 双面打印方式,默认为0 1-纸盒 4-手动 7-自动 0-不控制\r\n print_mode_map?: {\r\n // 扩展接口,打印第三方文件时可能需要调优,参数可参考lodop官方文档的LODOP.SET_PRINT_MODE方法\r\n PRINT_PAGE_PERCENT: string // 指定整页缩放打印的比例 格式为Full-Width | Full-Height | Full-Page | “Width:XX%;Height:XX%”\r\n }\r\n}\r\n\r\n// 无打印模板,预览打印\r\nexport async function preview(params: { pdfurl: string; print_para?: PrintParaI }) {\r\n if (!params) {\r\n throw new OrionError('打印异常:入参为空,请检查')\r\n }\r\n\r\n const { pdfurl, print_para = {} } = params\r\n\r\n if (!pdfurl) {\r\n throw new OrionError('打印异常:未知的文件地址[' + pdfurl + '],无法进行打印')\r\n }\r\n\r\n const LODOP = await lodopInit()\r\n\r\n //获取传入的打印参数\r\n let page_width = 0\r\n if (print_para.page_width != 0 && typeof print_para.page_width != 'undefined') {\r\n page_width = print_para.page_width\r\n }\r\n let page_height = 0\r\n if (print_para.page_height != 0 && typeof print_para.page_height != 'undefined') {\r\n page_height = print_para.page_height\r\n }\r\n let page_type = ''\r\n if (print_para.page_type) {\r\n page_type = print_para.page_type\r\n }\r\n let direction = 1\r\n if (print_para.direction) {\r\n direction = print_para.direction\r\n }\r\n let print_duplex = 0\r\n if (print_para.print_duplex) {\r\n print_duplex = print_para.print_duplex\r\n }\r\n let print_defaultsource = 0\r\n if (print_para.print_defaultsource) {\r\n print_defaultsource = print_para.print_defaultsource\r\n }\r\n\r\n // 历史问题,防止重复打印的问题\r\n LODOP.PRINT_INIT('')\r\n\r\n if (print_para.print_mode_map) {\r\n Object.keys(print_para.print_mode_map).map((item) => {\r\n LODOP.SET_PRINT_MODE(item, print_para.print_mode_map[item])\r\n })\r\n }\r\n LODOP.SET_PRINT_MODE('PRINT_DUPLEX', print_duplex ? print_duplex : 0)\r\n LODOP.SET_PRINT_MODE('PRINT_DEFAULTSOURCE', print_defaultsource ? print_defaultsource : 0)\r\n LODOP.SET_PRINT_PAGESIZE(direction, page_width, page_height, page_type)\r\n LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', new URL(pdfurl, import.meta.url))\r\n LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', true) // 移除预览的线条\r\n LODOP.SET_PREVIEW_WINDOW(0, 0, 0, 0, 0, '预览查看.开始打印') // 适高,工具条,弹出选择打印机,窗口宽,窗口高,窗口名\r\n LODOP.SET_PRINT_MODE('CATCH_PRINT_STATUS', true) //返回打印机状态\r\n\r\n return new Promise((resolve) => {\r\n LODOP.On_Return = function (TaskID, Value) {\r\n resolve(Value)\r\n }\r\n LODOP.PREVIEW()\r\n })\r\n}\r\n\r\nexport async function print(params: { pdfurl: string; print_para?: PrintParaI; printer?: string | -1 }) {\r\n if (!params) {\r\n throw new OrionError('打印异常:入参为空,请检查')\r\n }\r\n\r\n const { pdfurl, print_para = {}, printer } = params\r\n\r\n if (!pdfurl) {\r\n throw new OrionError('打印异常:未知的文件地址[' + pdfurl + '],无法进行打印')\r\n }\r\n\r\n if (printer) {\r\n return await printWithCertainPrinter(pdfurl, print_para, printer)\r\n } else {\r\n // 没设置打印机\r\n return await printNeedSelectPrinter(pdfurl, print_para)\r\n }\r\n}\r\n\r\nasync function printWithCertainPrinter(pdfurl: string, print_para: PrintParaI = {}, pr_name: string | -1) {\r\n if (!pdfurl) {\r\n throw new OrionError('打印异常:未知的文件地址[' + pdfurl + '],无法进行打印')\r\n }\r\n if (!pr_name) {\r\n throw new OrionError('打印异常:未设置打印机,无法进行打印')\r\n }\r\n\r\n //获取传入的打印参数\r\n let page_width = 0\r\n if (print_para.page_width != 0 && typeof print_para.page_width != 'undefined') {\r\n page_width = print_para.page_width\r\n }\r\n let page_height = 0\r\n if (print_para.page_height != 0 && typeof print_para.page_height != 'undefined') {\r\n page_height = print_para.page_height\r\n }\r\n let page_type = ''\r\n if (print_para.page_type) {\r\n page_type = print_para.page_type\r\n }\r\n let direction = 1\r\n if (print_para.direction) {\r\n direction = print_para.direction\r\n }\r\n let print_duplex = 0\r\n if (print_para.print_duplex) {\r\n print_duplex = print_para.print_duplex\r\n }\r\n let print_defaultsource = 0\r\n if (print_para.print_defaultsource) {\r\n print_defaultsource = print_para.print_defaultsource\r\n }\r\n\r\n const LODOP = await lodopInit()\r\n // 指定打印设备(打印机)\r\n LODOP.PRINT_INIT('')\r\n // 设置了打印机\r\n if (pr_name === -1) {\r\n LODOP.SET_PRINTER_INDEXA(LODOP.GET_PRINTER_NAME(-1))\r\n } else {\r\n LODOP.SET_PRINTER_INDEXA(pr_name)\r\n }\r\n LODOP.SET_PRINT_PAGESIZE(direction, page_width, page_height, page_type)\r\n if (print_para.print_mode_map) {\r\n Object.keys(print_para.print_mode_map).map((item) => {\r\n LODOP.SET_PRINT_MODE(item, print_para.print_mode_map[item])\r\n })\r\n }\r\n LODOP.SET_PRINT_MODE('PRINT_DUPLEX', print_duplex ? print_duplex : 0)\r\n LODOP.SET_PRINT_MODE('PRINT_DEFAULTSOURCE', print_defaultsource ? print_defaultsource : 0)\r\n LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', new URL(pdfurl, import.meta.url))\r\n LODOP.SET_PRINT_MODE('CATCH_PRINT_STATUS', true) //返回打印机状态\r\n\r\n return new Promise((resolve) => {\r\n LODOP.On_Return = function (TaskID, Value) {\r\n resolve(Value)\r\n }\r\n LODOP.PRINT()\r\n })\r\n}\r\n\r\n// 无打印模板,直接打印,需要选择打印机\r\nexport async function printNeedSelectPrinter(url: string, print_para: PrintParaI = {}) {\r\n if (url === null || url === '' || typeof url === 'undefined') {\r\n throw new OrionError('打印异常:未知的文件地址[' + url + '],无法进行打印')\r\n }\r\n\r\n const LODOP = await lodopInit()\r\n\r\n //获取传入的打印参数\r\n let page_width = 0\r\n if (print_para.page_width != 0 && typeof print_para.page_width != 'undefined') {\r\n page_width = print_para.page_width\r\n }\r\n let page_height = 0\r\n if (print_para.page_height != 0 && typeof print_para.page_height != 'undefined') {\r\n page_height = print_para.page_height\r\n }\r\n let page_type = ''\r\n if (print_para.page_type) {\r\n page_type = print_para.page_type\r\n }\r\n let direction = 1\r\n if (print_para.direction) {\r\n direction = print_para.direction\r\n }\r\n let print_duplex = 0\r\n if (print_para.print_duplex) {\r\n print_duplex = print_para.print_duplex\r\n }\r\n let print_defaultsource = 0\r\n if (print_para.print_defaultsource) {\r\n print_defaultsource = print_para.print_defaultsource\r\n }\r\n\r\n // 历史问题,防止重复打印的问题\r\n LODOP.PRINT_INIT('')\r\n\r\n if (print_para.print_mode_map) {\r\n Object.keys(print_para.print_mode_map).map((item) => {\r\n LODOP.SET_PRINT_MODE(item, print_para.print_mode_map[item])\r\n })\r\n }\r\n\r\n LODOP.SET_PRINT_MODE('PRINT_DUPLEX', print_duplex ? print_duplex : 0)\r\n LODOP.SET_PRINT_MODE('PRINT_DEFAULTSOURCE', print_defaultsource ? print_defaultsource : 0)\r\n LODOP.SET_PRINT_PAGESIZE(direction, page_width, page_height, page_type)\r\n LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', url)\r\n LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', true) // 移除预览的线条\r\n LODOP.SET_PREVIEW_WINDOW(0, 0, 0, 0, 0, '预览查看.开始打印') // 适高,工具条,弹出选择打印机,窗口宽,窗口高,窗口名\r\n\r\n //返回打印机状态\r\n LODOP.SET_PRINT_MODE('CATCH_PRINT_STATUS', true)\r\n\r\n return new Promise((resolve) => {\r\n LODOP.On_Return = function (TaskID, Value) {\r\n resolve(Value)\r\n }\r\n LODOP.PRINTA()\r\n })\r\n}\r\n"],"names":["lodopInit","LODOP","getLodop","resolve","getPrinterList","printers","count","i","getPrinterNameList","prname","getDefaultPrinter","preview","params","OrionError","pdfurl","print_para","page_width","page_height","page_type","direction","print_duplex","print_defaultsource","item","TaskID","Value","print","printer","printWithCertainPrinter","printNeedSelectPrinter","pr_name","url"],"mappings":";;AAIO,SAASA,IAAY;AAE1B,QAAMC,IAAQC;AAEP,SAAA,IAAI,QAAQ,CAACC,MAAY;AAC9B,IAAAA,EAAQF,CAAK;AAAA,EAAA,CACd;AACH;AAGO,SAASG,IAAiB;AACrB,EAAAJ;AACV,QAAMK,IAAW,CAAA,GACXC,IAAQ,MAAM;AACpB,WAASC,IAAI,GAAGA,I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;
|
3
|
+
var t = (h, n, s) => a(h, typeof n != "symbol" ? n + "" : n, s);
|
4
|
+
class r {
|
5
|
+
constructor(n) {
|
6
|
+
t(this, "handlers");
|
7
|
+
t(this, "index");
|
8
|
+
this.handlers = n || [], this.index = 0;
|
7
9
|
}
|
8
|
-
async handle(
|
9
|
-
if (this.index == this.handlers.length)
|
10
|
-
throw
|
11
|
-
|
12
|
-
|
13
|
-
this.index++;
|
14
|
-
return await handler.handle(error, chain);
|
10
|
+
async handle(n, s) {
|
11
|
+
if (this.index == this.handlers.length)
|
12
|
+
throw n;
|
13
|
+
const e = this.handlers[this.index];
|
14
|
+
return this.index++, await e.handle(n, s);
|
15
15
|
}
|
16
16
|
}
|
17
|
-
|
18
|
-
|
17
|
+
export {
|
18
|
+
r as default
|
19
|
+
};
|
20
|
+
//# sourceMappingURL=ErrorHandlerChain.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ErrorHandlerChain.js","sources":["../../src/request/ErrorHandlerChain.ts"],"sourcesContent":["export interface ErrorHandler<T = Error> {\r\n handle: (error: T, chain: ErrorHandlerChain) => void\r\n}\r\n\r\nexport default class ErrorHandlerChain<T = Error> {\r\n private handlers: Array<ErrorHandler<T>>\r\n private index: number\r\n\r\n constructor(handlers: Array<ErrorHandler<T>>) {\r\n this.handlers = handlers ? handlers : []\r\n this.index = 0\r\n }\r\n\r\n async handle(error: T, chain: ErrorHandlerChain) {\r\n if (this.index == this.handlers.length) {\r\n throw error\r\n }\r\n\r\n const handler = this.handlers[this.index]\r\n\r\n this.index++\r\n\r\n return await handler.handle(error, chain)\r\n }\r\n}\r\n"],"names":["ErrorHandlerChain","handlers","__publicField","error","chain","handler"],"mappings":";;;AAIA,MAAqBA,EAA6B;AAAA,EAIhD,YAAYC,GAAkC;AAHtC,IAAAC,EAAA;AACA,IAAAA,EAAA;AAGD,SAAA,WAAWD,KAAsB,CAAA,GACtC,KAAK,QAAQ;AAAA,EACf;AAAA,EAEA,MAAM,OAAOE,GAAUC,GAA0B;AAC/C,QAAI,KAAK,SAAS,KAAK,SAAS;AACxB,YAAAD;AAGR,UAAME,IAAU,KAAK,SAAS,KAAK,KAAK;AAEnC,gBAAA,SAEE,MAAMA,EAAQ,OAAOF,GAAOC,CAAK;AAAA,EAC1C;AACF;"}
|
@@ -1,18 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
this
|
1
|
+
var l = Object.defineProperty;
|
2
|
+
var n = (i, t, e) => t in i ? l(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
3
|
+
var s = (i, t, e) => n(i, typeof t != "symbol" ? t + "" : t, e);
|
4
|
+
class d {
|
5
|
+
constructor(t) {
|
6
|
+
s(this, "filters");
|
7
|
+
s(this, "index");
|
8
|
+
this.filters = t || [], this.index = 0;
|
7
9
|
}
|
8
|
-
doFilter(
|
9
|
-
if (this.index == this.filters.length)
|
10
|
+
doFilter(t, e) {
|
11
|
+
if (this.index == this.filters.length)
|
10
12
|
return;
|
11
|
-
|
12
|
-
|
13
|
-
this.index++;
|
14
|
-
filter.doFilter(request, chain);
|
13
|
+
const r = this.filters[this.index];
|
14
|
+
this.index++, r.doFilter(t, e);
|
15
15
|
}
|
16
16
|
}
|
17
|
-
|
18
|
-
|
17
|
+
export {
|
18
|
+
d as default
|
19
|
+
};
|
20
|
+
//# sourceMappingURL=RequestFilterChain.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RequestFilterChain.js","sources":["../../src/request/RequestFilterChain.ts"],"sourcesContent":["import type { AxiosRequestConfig } from 'axios'\r\n\r\nexport interface RequestFilter<T = AxiosRequestConfig> {\r\n doFilter(request: T, chain: RequestFilterChain): void\r\n}\r\n\r\nexport default class RequestFilterChain<T = AxiosRequestConfig> {\r\n private filters: Array<RequestFilter<T>>\r\n private index: number\r\n\r\n constructor(filters: Array<RequestFilter<T>>) {\r\n this.filters = filters ? filters : []\r\n this.index = 0\r\n }\r\n\r\n doFilter(request: T, chain: RequestFilterChain) {\r\n if (this.index == this.filters.length) {\r\n return\r\n }\r\n\r\n const filter = this.filters[this.index]\r\n\r\n this.index++\r\n\r\n filter.doFilter(request, chain)\r\n }\r\n}\r\n"],"names":["RequestFilterChain","filters","__publicField","request","chain","filter"],"mappings":";;;AAMA,MAAqBA,EAA2C;AAAA,EAI9D,YAAYC,GAAkC;AAHtC,IAAAC,EAAA;AACA,IAAAA,EAAA;AAGD,SAAA,UAAUD,KAAoB,CAAA,GACnC,KAAK,QAAQ;AAAA,EACf;AAAA,EAEA,SAASE,GAAYC,GAA2B;AAC9C,QAAI,KAAK,SAAS,KAAK,QAAQ;AAC7B;AAGF,UAAMC,IAAS,KAAK,QAAQ,KAAK,KAAK;AAEjC,SAAA,SAEEA,EAAA,SAASF,GAASC,CAAK;AAAA,EAChC;AACF;"}
|
@@ -1,18 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
this
|
1
|
+
var a = Object.defineProperty;
|
2
|
+
var n = (r, s, e) => s in r ? a(r, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[s] = e;
|
3
|
+
var t = (r, s, e) => n(r, typeof s != "symbol" ? s + "" : s, e);
|
4
|
+
class d {
|
5
|
+
constructor(s) {
|
6
|
+
t(this, "parsers");
|
7
|
+
t(this, "index");
|
8
|
+
this.parsers = s || [], this.index = 0;
|
7
9
|
}
|
8
|
-
doParse(
|
9
|
-
if (this.index == this.parsers.length)
|
10
|
-
return
|
11
|
-
|
12
|
-
|
13
|
-
this.index++;
|
14
|
-
return parser.parse(response, chain);
|
10
|
+
doParse(s, e) {
|
11
|
+
if (this.index == this.parsers.length)
|
12
|
+
return s;
|
13
|
+
const i = this.parsers[this.index];
|
14
|
+
return this.index++, i.parse(s, e);
|
15
15
|
}
|
16
16
|
}
|
17
|
-
|
18
|
-
|
17
|
+
export {
|
18
|
+
d as default
|
19
|
+
};
|
20
|
+
//# sourceMappingURL=ResponseParserChain.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ResponseParserChain.js","sources":["../../src/request/ResponseParserChain.ts"],"sourcesContent":["import type { AxiosResponse } from 'axios'\r\n\r\nexport interface ResponseParser<T = AxiosResponse> {\r\n parse(response: T, chain: ResponseParserChain): T\r\n}\r\n\r\nexport default class ResponseParserChain<T = AxiosResponse> {\r\n private parsers: Array<ResponseParser<T>>\r\n private index: number\r\n\r\n constructor(parsers: Array<ResponseParser<T>>) {\r\n this.parsers = parsers ? parsers : []\r\n this.index = 0\r\n }\r\n\r\n doParse(response: T, chain: ResponseParserChain) {\r\n if (this.index == this.parsers.length) {\r\n return response\r\n }\r\n\r\n const parser = this.parsers[this.index]\r\n\r\n this.index++\r\n\r\n return parser.parse(response, chain)\r\n }\r\n}\r\n"],"names":["ResponseParserChain","parsers","__publicField","response","chain","parser"],"mappings":";;;AAMA,MAAqBA,EAAuC;AAAA,EAI1D,YAAYC,GAAmC;AAHvC,IAAAC,EAAA;AACA,IAAAA,EAAA;AAGD,SAAA,UAAUD,KAAoB,CAAA,GACnC,KAAK,QAAQ;AAAA,EACf;AAAA,EAEA,QAAQE,GAAaC,GAA4B;AAC/C,QAAI,KAAK,SAAS,KAAK,QAAQ;AACtB,aAAAD;AAGT,UAAME,IAAS,KAAK,QAAQ,KAAK,KAAK;AAEjC,gBAAA,SAEEA,EAAO,MAAMF,GAAUC,CAAK;AAAA,EACrC;AACF;"}
|
@@ -1,52 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
var y = Object.defineProperty;
|
2
|
+
var A = (f, s, i) => s in f ? y(f, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : f[s] = i;
|
3
|
+
var m = (f, s, i) => A(f, typeof s != "symbol" ? s + "" : s, i);
|
4
|
+
import o from "dayjs";
|
5
|
+
class b {
|
6
|
+
constructor(s = "YYYY-MM-DD HH:mm:ss.SSS") {
|
7
|
+
m(this, "format");
|
8
|
+
this.format = s;
|
7
9
|
}
|
8
|
-
serialize(
|
9
|
-
const
|
10
|
-
function
|
11
|
-
const
|
12
|
-
Object.keys(
|
13
|
-
const
|
14
|
-
|
15
|
-
|
16
|
-
} else if (value && value instanceof Object && !Array.isArray(value)) {
|
17
|
-
result[key] = objTransfer(value);
|
18
|
-
} else if (value && Array.isArray(value)) {
|
19
|
-
result[key] = arrayTransfer(value);
|
20
|
-
} else {
|
21
|
-
result[key] = value;
|
22
|
-
}
|
23
|
-
});
|
24
|
-
return result;
|
10
|
+
serialize(s) {
|
11
|
+
const i = this.format;
|
12
|
+
function n(e) {
|
13
|
+
const r = {};
|
14
|
+
return Object.keys(e).forEach((a) => {
|
15
|
+
const t = e[a];
|
16
|
+
t instanceof Date || o.isDayjs(t) ? r[a] = o(t).format(i) : t && t instanceof Object && !Array.isArray(t) ? r[a] = n(t) : t && Array.isArray(t) ? r[a] = c(t) : r[a] = t;
|
17
|
+
}), r;
|
25
18
|
}
|
26
|
-
function
|
27
|
-
return
|
28
|
-
if (value instanceof Date || dayjs.isDayjs(value)) {
|
29
|
-
return dayjs(value).format(format);
|
30
|
-
} else if (value && value instanceof Object && !Array.isArray(value)) {
|
31
|
-
return objTransfer(value);
|
32
|
-
} else if (value && Array.isArray(value)) {
|
33
|
-
return arrayTransfer(value);
|
34
|
-
} else {
|
35
|
-
return value;
|
36
|
-
}
|
37
|
-
});
|
19
|
+
function c(e) {
|
20
|
+
return e.map((r) => r instanceof Date || o.isDayjs(r) ? o(r).format(i) : r && r instanceof Object && !Array.isArray(r) ? n(r) : r && Array.isArray(r) ? c(r) : r);
|
38
21
|
}
|
39
|
-
Object.keys(
|
40
|
-
const
|
41
|
-
|
42
|
-
data[key] = dayjs(value).format(this.format);
|
43
|
-
} else if (value && typeof value == 'object' && !Array.isArray(value)) {
|
44
|
-
data[key] = objTransfer(value);
|
45
|
-
} else if (value && Array.isArray(value)) {
|
46
|
-
data[key] = arrayTransfer(value);
|
47
|
-
}
|
22
|
+
Object.keys(s).forEach((e) => {
|
23
|
+
const r = s[e];
|
24
|
+
r instanceof Date || o.isDayjs(r) ? s[e] = o(r).format(this.format) : r && typeof r == "object" && !Array.isArray(r) ? s[e] = n(r) : r && Array.isArray(r) && (s[e] = c(r));
|
48
25
|
});
|
49
26
|
}
|
50
27
|
}
|
51
|
-
|
52
|
-
|
28
|
+
export {
|
29
|
+
b as default
|
30
|
+
};
|
31
|
+
//# sourceMappingURL=DateSerializer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DateSerializer.js","sources":["../../../src/request/disivion/DateSerializer.ts"],"sourcesContent":["import dayjs from 'dayjs'\r\n\r\nexport default class DateSerializer {\r\n private format: string \r\n\r\n constructor(format = 'YYYY-MM-DD HH:mm:ss.SSS') {\r\n this.format = format\r\n }\r\n\r\n serialize(data: Record<string, unknown>) {\r\n const format = this.format\r\n\r\n function objTransfer(data: any): Record<any, unknown> {\r\n const result: Record<any, unknown> = {}\r\n Object.keys(data).forEach((key) => {\r\n const value = data[key]\r\n if (value instanceof Date || dayjs.isDayjs(value)) {\r\n result[key] = dayjs(value).format(format)\r\n } else if (value && value instanceof Object && !Array.isArray(value)) {\r\n result[key] = objTransfer(value)\r\n } else if (value && Array.isArray(value)) {\r\n result[key] = arrayTransfer(value)\r\n } else {\r\n result[key] = value\r\n }\r\n })\r\n return result\r\n }\r\n function arrayTransfer(data: Array<unknown>): Array<unknown> {\r\n return data.map((value) => {\r\n if (value instanceof Date || dayjs.isDayjs(value)) {\r\n return dayjs(value).format(format)\r\n } else if (value && value instanceof Object && !Array.isArray(value)) {\r\n return objTransfer(value)\r\n } else if (value && Array.isArray(value)) {\r\n return arrayTransfer(value)\r\n } else {\r\n return value\r\n }\r\n })\r\n }\r\n\r\n Object.keys(data).forEach((key) => {\r\n const value = data[key]\r\n if (value instanceof Date || dayjs.isDayjs(value)) {\r\n data[key] = dayjs(value).format(this.format)\r\n } else if (value && typeof value == 'object' && !Array.isArray(value)) {\r\n data[key] = objTransfer(value)\r\n } else if (value && Array.isArray(value)) {\r\n data[key] = arrayTransfer(value)\r\n }\r\n })\r\n }\r\n}\r\n"],"names":["DateSerializer","format","__publicField","data","objTransfer","result","key","value","dayjs","arrayTransfer"],"mappings":";;;;AAEA,MAAqBA,EAAe;AAAA,EAGlC,YAAYC,IAAS,2BAA2B;AAFxC,IAAAC,EAAA;AAGN,SAAK,SAASD;AAAA,EAChB;AAAA,EAEA,UAAUE,GAA+B;AACvC,UAAMF,IAAS,KAAK;AAEpB,aAASG,EAAYD,GAAiC;AACpD,YAAME,IAA+B,CAAA;AACrC,oBAAO,KAAKF,CAAI,EAAE,QAAQ,CAACG,MAAQ;AAC3B,cAAAC,IAAQJ,EAAKG,CAAG;AACtB,QAAIC,aAAiB,QAAQC,EAAM,QAAQD,CAAK,IAC9CF,EAAOC,CAAG,IAAIE,EAAMD,CAAK,EAAE,OAAON,CAAM,IAC/BM,KAASA,aAAiB,UAAU,CAAC,MAAM,QAAQA,CAAK,IAC1DF,EAAAC,CAAG,IAAIF,EAAYG,CAAK,IACtBA,KAAS,MAAM,QAAQA,CAAK,IAC9BF,EAAAC,CAAG,IAAIG,EAAcF,CAAK,IAEjCF,EAAOC,CAAG,IAAIC;AAAA,MAChB,CACD,GACMF;AAAA,IACT;AACA,aAASI,EAAcN,GAAsC;AACpDA,aAAAA,EAAK,IAAI,CAACI,MACXA,aAAiB,QAAQC,EAAM,QAAQD,CAAK,IACvCC,EAAMD,CAAK,EAAE,OAAON,CAAM,IACxBM,KAASA,aAAiB,UAAU,CAAC,MAAM,QAAQA,CAAK,IAC1DH,EAAYG,CAAK,IACfA,KAAS,MAAM,QAAQA,CAAK,IAC9BE,EAAcF,CAAK,IAEnBA,CAEV;AAAA,IACH;AAEA,WAAO,KAAKJ,CAAI,EAAE,QAAQ,CAACG,MAAQ;AAC3B,YAAAC,IAAQJ,EAAKG,CAAG;AACtB,MAAIC,aAAiB,QAAQC,EAAM,QAAQD,CAAK,IAC9CJ,EAAKG,CAAG,IAAIE,EAAMD,CAAK,EAAE,OAAO,KAAK,MAAM,IAClCA,KAAS,OAAOA,KAAS,YAAY,CAAC,MAAM,QAAQA,CAAK,IAC7DJ,EAAAG,CAAG,IAAIF,EAAYG,CAAK,IACpBA,KAAS,MAAM,QAAQA,CAAK,MAChCJ,EAAAG,CAAG,IAAIG,EAAcF,CAAK;AAAA,IACjC,CACD;AAAA,EACH;AACF;"}
|
@@ -1,59 +1,37 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
const reader = new FileReader();
|
12
|
-
reader.addEventListener('loadend', () => {
|
13
|
-
resolve(reader.result);
|
14
|
-
});
|
15
|
-
reader.readAsText(blob);
|
1
|
+
import l from "../error/ResponseError.js";
|
2
|
+
import i from "../error/ExceptionResponseError.js";
|
3
|
+
import p from "../error/BizExceptionResponseError.js";
|
4
|
+
import f from "../error/SessionExceptionResponseError.js";
|
5
|
+
function w(c) {
|
6
|
+
return new Promise((s) => {
|
7
|
+
const n = new FileReader();
|
8
|
+
n.addEventListener("loadend", () => {
|
9
|
+
s(n.result);
|
10
|
+
}), n.readAsText(c);
|
16
11
|
});
|
17
12
|
}
|
18
|
-
class
|
19
|
-
constructor() {
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
jsonData = JSON.parse(jsonData);
|
31
|
-
} else {
|
32
|
-
// 普通请求的异常JSON
|
33
|
-
jsonData = rawData;
|
34
|
-
}
|
35
|
-
const {
|
36
|
-
success,
|
37
|
-
errorcode,
|
38
|
-
data,
|
39
|
-
errortext
|
40
|
-
} = jsonData;
|
41
|
-
if (errorcode === '-1') {
|
42
|
-
throw new ExceptionResponseError(errortext, error, response, jsonData);
|
43
|
-
} else if (errorcode === '-2') {
|
44
|
-
throw new BizExceptionResponseError(errortext, error, response, jsonData);
|
45
|
-
} else if (errorcode === '-3') {
|
46
|
-
throw new SessionExceptionResponseError(errortext, error, response, jsonData);
|
47
|
-
} else {
|
48
|
-
throw new ExceptionResponseError(errortext, error, response, jsonData);
|
49
|
-
}
|
13
|
+
class R {
|
14
|
+
constructor() {
|
15
|
+
}
|
16
|
+
async handle(s, n) {
|
17
|
+
if (s instanceof l) {
|
18
|
+
const t = s.response;
|
19
|
+
if (t.status == 200) {
|
20
|
+
const o = t.data;
|
21
|
+
let e;
|
22
|
+
o instanceof Blob ? (e = await w(o), e = JSON.parse(e), e = JSON.parse(e)) : e = o;
|
23
|
+
const { success: d, errorcode: a, data: u, errortext: r } = e;
|
24
|
+
throw a === "-1" ? new i(r, s, t, e) : a === "-2" ? new p(r, s, t, e) : a === "-3" ? new f(r, s, t, e) : new i(r, s, t, e);
|
50
25
|
} else {
|
51
|
-
let
|
52
|
-
throw new
|
26
|
+
let o = "'" + t.config.url + "' " + t.status + " " + t.statusText;
|
27
|
+
throw new i(o, s, t, null);
|
53
28
|
}
|
54
29
|
}
|
55
|
-
throw
|
30
|
+
throw s;
|
56
31
|
}
|
57
32
|
}
|
58
|
-
|
59
|
-
|
33
|
+
export {
|
34
|
+
R as default,
|
35
|
+
w as readBlob
|
36
|
+
};
|
37
|
+
//# sourceMappingURL=DivisionErrorHandler.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DivisionErrorHandler.js","sources":["../../../src/request/disivion/DivisionErrorHandler.ts"],"sourcesContent":["// import { Modal } from 'dw-neit-antd'\r\n// import SobekThrone from '../../throne/SobekThrone'\r\n// import SobekMsgBox from '../../msgbox/SobekMsgBox'\r\n\r\nimport type ErrorHandlerChain from '../ErrorHandlerChain'\r\n\r\nimport ResponseError from '../error/ResponseError'\r\nimport ExceptionResponseError from '../error/ExceptionResponseError'\r\nimport BizExceptionResponseError from '../error/BizExceptionResponseError'\r\nimport SessionExceptionResponseError from '../error/SessionExceptionResponseError'\r\n\r\nexport function readBlob(blob: Blob): Promise<string> {\r\n return new Promise((resolve) => {\r\n const reader = new FileReader()\r\n reader.addEventListener('loadend', () => {\r\n resolve(reader.result as string)\r\n })\r\n reader.readAsText(blob)\r\n })\r\n}\r\n\r\nexport default class DivisionErrorHandler {\r\n constructor() {}\r\n\r\n async handle(error: Error, chain: ErrorHandlerChain) {\r\n if (error instanceof ResponseError) {\r\n const response = error.response\r\n if (response.status == 200) {\r\n const rawData = response.data\r\n let jsonData\r\n\r\n if (rawData instanceof Blob) {\r\n // 文件下载抛异常JSON,在Blob里面\r\n jsonData = await readBlob(rawData)\r\n jsonData = JSON.parse(jsonData)\r\n jsonData = JSON.parse(jsonData)\r\n } else {\r\n // 普通请求的异常JSON\r\n jsonData = rawData\r\n }\r\n\r\n const { success, errorcode, data, errortext } = jsonData\r\n if (errorcode === '-1') {\r\n throw new ExceptionResponseError(errortext, error, response, jsonData)\r\n } else if (errorcode === '-2') {\r\n throw new BizExceptionResponseError(errortext, error, response, jsonData)\r\n } else if (errorcode === '-3') {\r\n throw new SessionExceptionResponseError(errortext, error, response, jsonData)\r\n } else {\r\n throw new ExceptionResponseError(errortext, error, response, jsonData)\r\n }\r\n } else {\r\n let errortext = \"'\" + response.config.url + \"' \" + response.status + ' ' + response.statusText\r\n throw new ExceptionResponseError(errortext, error, response, null)\r\n }\r\n }\r\n\r\n throw error\r\n }\r\n}\r\n"],"names":["readBlob","blob","resolve","reader","DivisionErrorHandler","error","chain","ResponseError","response","rawData","jsonData","success","errorcode","data","errortext","ExceptionResponseError","BizExceptionResponseError","SessionExceptionResponseError"],"mappings":";;;;AAWO,SAASA,EAASC,GAA6B;AAC7C,SAAA,IAAI,QAAQ,CAACC,MAAY;AACxB,UAAAC,IAAS,IAAI;AACZ,IAAAA,EAAA,iBAAiB,WAAW,MAAM;AACvC,MAAAD,EAAQC,EAAO,MAAgB;AAAA,IAAA,CAChC,GACDA,EAAO,WAAWF,CAAI;AAAA,EAAA,CACvB;AACH;AAEA,MAAqBG,EAAqB;AAAA,EACxC,cAAc;AAAA,EAAC;AAAA,EAEf,MAAM,OAAOC,GAAcC,GAA0B;AACnD,QAAID,aAAiBE,GAAe;AAClC,YAAMC,IAAWH,EAAM;AACnB,UAAAG,EAAS,UAAU,KAAK;AAC1B,cAAMC,IAAUD,EAAS;AACrB,YAAAE;AAEJ,QAAID,aAAmB,QAEVC,IAAA,MAAMV,EAASS,CAAO,GACtBC,IAAA,KAAK,MAAMA,CAAQ,GACnBA,IAAA,KAAK,MAAMA,CAAQ,KAGnBA,IAAAD;AAGb,cAAM,EAAE,SAAAE,GAAS,WAAAC,GAAW,MAAAC,GAAM,WAAAC,MAAcJ;AAChD,cAAIE,MAAc,OACV,IAAIG,EAAuBD,GAAWT,GAAOG,GAAUE,CAAQ,IAC5DE,MAAc,OACjB,IAAII,EAA0BF,GAAWT,GAAOG,GAAUE,CAAQ,IAC/DE,MAAc,OACjB,IAAIK,EAA8BH,GAAWT,GAAOG,GAAUE,CAAQ,IAEtE,IAAIK,EAAuBD,GAAWT,GAAOG,GAAUE,CAAQ;AAAA,MACvE,OACK;AACD,YAAAI,IAAY,MAAMN,EAAS,OAAO,MAAM,OAAOA,EAAS,SAAS,MAAMA,EAAS;AACpF,cAAM,IAAIO,EAAuBD,GAAWT,GAAOG,GAAU,IAAI;AAAA,MACnE;AAAA,IACF;AAEM,UAAAH;AAAA,EACR;AACF;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import
|
1
|
+
import { AxiosResponse } from 'axios';
|
2
|
+
import { default as ResponseParserChain } from '../ResponseParserChain';
|
3
3
|
export default class DivisionResponseParser {
|
4
4
|
parse(response: AxiosResponse, chain: ResponseParserChain): AxiosResponse<any, any>;
|
5
5
|
}
|
@@ -1,27 +1,15 @@
|
|
1
|
-
class
|
2
|
-
parse(
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
return chain.doParse(response, chain);
|
11
|
-
}
|
12
|
-
// data为string时,兼容ie
|
13
|
-
const {
|
14
|
-
success,
|
15
|
-
errorcode,
|
16
|
-
data,
|
17
|
-
errortext
|
18
|
-
} = typeof response.data === 'string' ? JSON.parse(response.data) : response.data;
|
19
|
-
if (success === true) {
|
20
|
-
return chain.doParse(data, chain);
|
21
|
-
} else {
|
22
|
-
throw new Error(errortext);
|
23
|
-
}
|
1
|
+
class n {
|
2
|
+
parse(t, r) {
|
3
|
+
const e = t.headers["content-type"];
|
4
|
+
if (!e || e.indexOf("application/json") === -1)
|
5
|
+
return r.doParse(t, r);
|
6
|
+
const { success: a, errorcode: f, data: o, errortext: d } = typeof t.data == "string" ? JSON.parse(t.data) : t.data;
|
7
|
+
if (a === !0)
|
8
|
+
return r.doParse(o, r);
|
9
|
+
throw new Error(d);
|
24
10
|
}
|
25
11
|
}
|
26
|
-
|
27
|
-
|
12
|
+
export {
|
13
|
+
n as default
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=DivisionResponseParser.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DivisionResponseParser.js","sources":["../../../src/request/disivion/DivisionResponseParser.ts"],"sourcesContent":["import type { AxiosResponse } from 'axios'\r\nimport type ResponseParserChain from '../ResponseParserChain'\r\n\r\nexport default class DivisionResponseParser {\r\n parse(response: AxiosResponse, chain: ResponseParserChain) {\r\n // server 端不响应内容\r\n const contentType = response.headers['content-type']\r\n if (!contentType) {\r\n return chain.doParse(response, chain)\r\n }\r\n\r\n // server 端响应的不是 application/json 协议\r\n if (contentType.indexOf('application/json') === -1) {\r\n return chain.doParse(response, chain)\r\n }\r\n\r\n // data为string时,兼容ie\r\n const { success, errorcode, data, errortext } = typeof response.data === 'string' ? JSON.parse(response.data) : response.data\r\n if (success === true) {\r\n return chain.doParse(data, chain)\r\n } else {\r\n throw new Error(errortext)\r\n }\r\n }\r\n}\r\n"],"names":["DivisionResponseParser","response","chain","contentType","success","errorcode","data","errortext"],"mappings":"AAGA,MAAqBA,EAAuB;AAAA,EAC1C,MAAMC,GAAyBC,GAA4B;AAEnD,UAAAC,IAAcF,EAAS,QAAQ,cAAc;AAMnD,QALI,CAACE,KAKDA,EAAY,QAAQ,kBAAkB,MAAM;AACvC,aAAAD,EAAM,QAAQD,GAAUC,CAAK;AAItC,UAAM,EAAE,SAAAE,GAAS,WAAAC,GAAW,MAAAC,GAAM,WAAAC,MAAc,OAAON,EAAS,QAAS,WAAW,KAAK,MAAMA,EAAS,IAAI,IAAIA,EAAS;AACzH,QAAIG,MAAY;AACP,aAAAF,EAAM,QAAQI,GAAMJ,CAAK;AAE1B,UAAA,IAAI,MAAMK,CAAS;AAAA,EAE7B;AACF;"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
1
|
+
import { ResponseParser } from '../ResponseParserChain';
|
2
|
+
import { ErrorHandler } from '../ErrorHandlerChain';
|
3
|
+
import { RequestFilter } from '../RequestFilterChain';
|
4
4
|
export type RequestParams = Record<string, unknown>;
|
5
5
|
export interface RequestOptionsI {
|
6
6
|
loading?: boolean;
|