@yilianjituan/yilian_dgerm 0.0.1-alpha.31 → 0.0.1-alpha.33
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/.eslintrc.js +0 -0
- package/LICENSE +0 -0
- package/README.md +8 -6
- package/dist/business/Entry/index.d.ts +0 -0
- package/dist/business/Entry/index.interface.d.ts +0 -0
- package/dist/business/Entry/index.interface.js +0 -0
- package/dist/business/Entry/index.js +0 -0
- package/dist/business/Entry/index.scss +0 -0
- package/dist/business/TestBtn/index.d.ts +0 -0
- package/dist/business/TestBtn/index.interface.d.ts +0 -0
- package/dist/business/TestBtn/index.interface.js +0 -0
- package/dist/business/TestBtn/index.js +0 -0
- package/dist/commonAxios/Axios.d.ts +0 -0
- package/dist/commonAxios/Axios.js +0 -0
- package/dist/commonAxios/http.d.ts +0 -0
- package/dist/commonAxios/http.js +0 -0
- package/dist/commonAxios/index.d.ts +0 -0
- package/dist/commonAxios/index.js +0 -0
- package/dist/commonAxios/juicer.d.ts +0 -0
- package/dist/commonAxios/juicer.js +0 -0
- package/dist/commonData/address.d.ts +0 -0
- package/dist/commonData/address.js +0 -0
- package/dist/commonImg/ic_im_no_archives_new.png +0 -0
- package/dist/commonType/globalEnum.d.ts +0 -0
- package/dist/commonType/globalEnum.js +0 -0
- package/dist/commonType/globalFun.d.ts +0 -0
- package/dist/commonType/globalFun.js +0 -0
- package/dist/components/BigImage/index.d.ts +0 -0
- package/dist/components/BigImage/index.interface.d.ts +0 -0
- package/dist/components/BigImage/index.interface.js +0 -0
- package/dist/components/BigImage/index.js +0 -0
- package/dist/components/CustomButtonModal/index.d.ts +4 -0
- package/dist/components/CustomButtonModal/index.interface.d.ts +14 -0
- package/dist/components/CustomButtonModal/index.interface.js +1 -0
- package/dist/components/CustomButtonModal/index.js +69 -0
- package/dist/components/DateTimePicker/index.d.ts +4 -0
- package/dist/components/DateTimePicker/index.interface.d.ts +6 -0
- package/dist/components/DateTimePicker/index.interface.js +1 -0
- package/dist/components/DateTimePicker/index.js +100 -0
- package/dist/components/DropDownSelect/index.d.ts +0 -0
- package/dist/components/DropDownSelect/index.interface.d.ts +4 -0
- package/dist/components/DropDownSelect/index.interface.js +0 -0
- package/dist/components/DropDownSelect/index.js +4 -2
- package/dist/components/EmptyDom/index.d.ts +0 -0
- package/dist/components/EmptyDom/index.interface.d.ts +0 -0
- package/dist/components/EmptyDom/index.interface.js +0 -0
- package/dist/components/EmptyDom/index.js +0 -0
- package/dist/components/Entry/index.d.ts +0 -0
- package/dist/components/Entry/index.interface.d.ts +0 -0
- package/dist/components/Entry/index.interface.js +0 -0
- package/dist/components/Entry/index.js +0 -0
- package/dist/components/Entry/index.scss +0 -0
- package/dist/components/ExportExcels/ExportExcels.scss +0 -0
- package/dist/components/ExportExcels/index.d.ts +0 -0
- package/dist/components/ExportExcels/index.interface.d.ts +0 -0
- package/dist/components/ExportExcels/index.interface.js +0 -0
- package/dist/components/ExportExcels/index.js +0 -0
- package/dist/components/FileUpload/fileUtil.d.ts +0 -0
- package/dist/components/FileUpload/fileUtil.js +0 -0
- package/dist/components/FileUpload/index.d.ts +0 -0
- package/dist/components/FileUpload/index.interface.d.ts +0 -0
- package/dist/components/FileUpload/index.interface.js +0 -0
- package/dist/components/FileUpload/index.js +0 -0
- package/dist/components/FileUpload/index.scss +0 -0
- package/dist/components/FilterRadio/index.d.ts +0 -0
- package/dist/components/FilterRadio/index.interface.d.ts +0 -0
- package/dist/components/FilterRadio/index.interface.js +0 -0
- package/dist/components/FilterRadio/index.js +0 -0
- package/dist/components/FilterRadio/index.scss +0 -0
- package/dist/components/MyBtn/index.d.ts +0 -0
- package/dist/components/MyBtn/index.interface.d.ts +0 -0
- package/dist/components/MyBtn/index.interface.js +0 -0
- package/dist/components/MyBtn/index.js +0 -0
- package/dist/components/NumberInput/index.d.ts +0 -0
- package/dist/components/NumberInput/index.interface.d.ts +0 -0
- package/dist/components/NumberInput/index.interface.js +0 -0
- package/dist/components/NumberInput/index.js +0 -0
- package/dist/components/NumberInput/index.scss +0 -0
- package/dist/components/OcrCommon/index.config.d.ts +18 -0
- package/dist/components/OcrCommon/index.config.js +67 -0
- package/dist/components/OcrCommon/index.d.ts +5 -0
- package/dist/components/OcrCommon/index.interface.d.ts +22 -0
- package/dist/components/OcrCommon/index.interface.js +1 -0
- package/dist/components/OcrCommon/index.js +479 -0
- package/dist/components/OcrCommon/index.scss +128 -0
- package/dist/components/PageTemplate/index.d.ts +0 -0
- package/dist/components/PageTemplate/index.interface.d.ts +0 -0
- package/dist/components/PageTemplate/index.interface.js +0 -0
- package/dist/components/PageTemplate/index.js +0 -0
- package/dist/components/PageTemplate/index.scss +0 -0
- package/dist/components/ReactEcharts/index.d.ts +0 -0
- package/dist/components/ReactEcharts/index.interface.d.ts +0 -0
- package/dist/components/ReactEcharts/index.interface.js +0 -0
- package/dist/components/ReactEcharts/index.js +0 -0
- package/dist/components/SelectMax/index.d.ts +0 -0
- package/dist/components/SelectMax/index.interface.d.ts +0 -0
- package/dist/components/SelectMax/index.interface.js +0 -0
- package/dist/components/SelectMax/index.js +0 -0
- package/dist/components/SelectPosition/index.d.ts +5 -0
- package/dist/components/SelectPosition/index.interface.d.ts +65 -0
- package/dist/components/SelectPosition/index.interface.js +1 -0
- package/dist/components/SelectPosition/index.js +353 -0
- package/dist/components/SelectPosition/index.scss +19 -0
- package/dist/components/SuperCascader/index.d.ts +0 -0
- package/dist/components/SuperCascader/index.interface.d.ts +0 -0
- package/dist/components/SuperCascader/index.interface.js +0 -0
- package/dist/components/SuperCascader/index.js +0 -0
- package/dist/components/SuperInput/index.d.ts +0 -0
- package/dist/components/SuperInput/index.interface.d.ts +0 -0
- package/dist/components/SuperInput/index.interface.js +0 -0
- package/dist/components/SuperInput/index.js +0 -0
- package/dist/components/TabsMode/index.d.ts +0 -0
- package/dist/components/TabsMode/index.interface.d.ts +0 -0
- package/dist/components/TabsMode/index.interface.js +0 -0
- package/dist/components/TabsMode/index.js +0 -0
- package/dist/components/TypographyText/index.d.ts +5 -0
- package/dist/components/TypographyText/index.interface.d.ts +13 -0
- package/dist/components/TypographyText/index.interface.js +1 -0
- package/dist/components/TypographyText/index.js +67 -0
- package/dist/components/TypographyText/index.scss +9 -0
- package/dist/components/VideoProgressModal/index.d.ts +0 -0
- package/dist/components/VideoProgressModal/index.interface.d.ts +0 -0
- package/dist/components/VideoProgressModal/index.interface.js +0 -0
- package/dist/components/VideoProgressModal/index.js +0 -0
- package/dist/components/VideoProgressModal/index.scss +0 -0
- package/dist/components/YLModal/drag.d.ts +0 -0
- package/dist/components/YLModal/drag.js +0 -0
- package/dist/components/YLModal/index.d.ts +0 -0
- package/dist/components/YLModal/index.interface.d.ts +0 -0
- package/dist/components/YLModal/index.interface.js +0 -0
- package/dist/components/YLModal/index.js +0 -0
- package/dist/index.d.ts +17 -12
- package/dist/index.js +17 -12
- package/dist/react-app-env.d.ts +0 -0
- package/dist/utils/common.d.ts +0 -0
- package/dist/utils/common.js +0 -0
- package/dist/utils/index.d.ts +0 -0
- package/dist/utils/index.js +0 -0
- package/dist/utils/notificationHelper.d.ts +0 -0
- package/dist/utils/notificationHelper.js +0 -0
- package/dist/utils/responseMessage.d.ts +0 -0
- package/dist/utils/responseMessage.js +0 -0
- package/dist/utils/userSessionActions.d.ts +0 -0
- package/dist/utils/userSessionActions.js +0 -0
- package/package.json +28 -27
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
4
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
5
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
6
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
10
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
/*
|
|
13
|
+
* @Author: chengjiang
|
|
14
|
+
* @Date: 2024-11-05 09:35:37
|
|
15
|
+
* @Last Modified by: chengjiang
|
|
16
|
+
* @Last Modified time: 2024-11-15 10:05:09
|
|
17
|
+
*/
|
|
18
|
+
import "./index.scss";
|
|
19
|
+
import { Button, ColorPicker, Image, message, Modal, Radio, Switch } from 'antd';
|
|
20
|
+
import copy from 'copy-to-clipboard';
|
|
21
|
+
import React, { useEffect, useState } from 'react';
|
|
22
|
+
import { fontSizeOpt, imgSizeOpt, ocrDirection } from "./index.config";
|
|
23
|
+
var Index = function Index(props) {
|
|
24
|
+
var http = props.http,
|
|
25
|
+
open = props.open,
|
|
26
|
+
onCancel = props.onCancel,
|
|
27
|
+
url = props.url,
|
|
28
|
+
_props$minWidth = props.minWidth,
|
|
29
|
+
minWidth = _props$minWidth === void 0 ? 700 : _props$minWidth,
|
|
30
|
+
params = props.params,
|
|
31
|
+
_props$disabled = props.disabled,
|
|
32
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
33
|
+
_props$showHandleBtn = props.showHandleBtn,
|
|
34
|
+
showHandleBtn = _props$showHandleBtn === void 0 ? true : _props$showHandleBtn,
|
|
35
|
+
_props$modalProps = props.modalProps,
|
|
36
|
+
modalProps = _props$modalProps === void 0 ? {} : _props$modalProps,
|
|
37
|
+
_props$afterRequest = props.afterRequest,
|
|
38
|
+
afterRequest = _props$afterRequest === void 0 ? function (params) {
|
|
39
|
+
return params;
|
|
40
|
+
} : _props$afterRequest;
|
|
41
|
+
var _useState = useState(''),
|
|
42
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
43
|
+
ocrImg = _useState2[0],
|
|
44
|
+
setOcrImg = _useState2[1]; // ocr识别图片
|
|
45
|
+
var _useState3 = useState({}),
|
|
46
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
47
|
+
ocrResult = _useState4[0],
|
|
48
|
+
setOcrResult = _useState4[1];
|
|
49
|
+
var _useState5 = useState(true),
|
|
50
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
51
|
+
ocrContentShow = _useState6[0],
|
|
52
|
+
setOcrContentShow = _useState6[1]; // 内容是否展示
|
|
53
|
+
var _useState7 = useState(1),
|
|
54
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
55
|
+
numValue = _useState8[0],
|
|
56
|
+
setNumValue = _useState8[1]; // 字倍数
|
|
57
|
+
var _useState9 = useState(1),
|
|
58
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
59
|
+
imgScale = _useState10[0],
|
|
60
|
+
setImgScale = _useState10[1]; // 图片倍数
|
|
61
|
+
var _useState11 = useState(false),
|
|
62
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
63
|
+
loading = _useState12[0],
|
|
64
|
+
setLoading = _useState12[1];
|
|
65
|
+
var _useState13 = useState(0),
|
|
66
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
67
|
+
imgWidth = _useState14[0],
|
|
68
|
+
setImgWidth = _useState14[1]; // 弹窗宽
|
|
69
|
+
var _useState15 = useState(0),
|
|
70
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
71
|
+
imgHeight = _useState16[0],
|
|
72
|
+
setImgHeight = _useState16[1]; // 弹窗高
|
|
73
|
+
var _useState17 = useState('rgba(255, 255, 255, 0.4)'),
|
|
74
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
75
|
+
boxBackGround = _useState18[0],
|
|
76
|
+
setBoxBackGround = _useState18[1]; // ocr识别文字背景色
|
|
77
|
+
|
|
78
|
+
var _useState19 = useState(window.innerWidth * 0.8),
|
|
79
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
80
|
+
modalWidth = _useState20[0],
|
|
81
|
+
setModalWidth = _useState20[1];
|
|
82
|
+
var _useState21 = useState(undefined),
|
|
83
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
84
|
+
modalHeight = _useState22[0],
|
|
85
|
+
setModalHeight = _useState22[1];
|
|
86
|
+
useEffect(function () {
|
|
87
|
+
if (!url) return;
|
|
88
|
+
handleOcr();
|
|
89
|
+
}, [url]);
|
|
90
|
+
var removeDom = function removeDom() {
|
|
91
|
+
var ocrLoadingDiv = document.querySelector('.ocr_loading');
|
|
92
|
+
if (ocrLoadingDiv) {
|
|
93
|
+
document.body.removeChild(ocrLoadingDiv);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// 渲染loading,挂载在body,防止层级问题
|
|
98
|
+
var renderLoading = function renderLoading() {
|
|
99
|
+
var ocrLoadingDiv = document.createElement('div');
|
|
100
|
+
ocrLoadingDiv.className = 'ocr_loading';
|
|
101
|
+
ocrLoadingDiv.innerHTML = "\n <img class=\"scan_img_scan\" src=\"".concat(process.env.REACT_APP_IMAGE_HOST, "/ic-im/ic_im_scan.png\" />\n <p class=\"scan_tips\">\u8BC6\u522B\u4E2D\uFF0C\u8BF7\u4E0D\u8981\u5173\u95ED\u9875\u9762</p>\n ");
|
|
102
|
+
document.body.appendChild(ocrLoadingDiv);
|
|
103
|
+
};
|
|
104
|
+
useEffect(function () {
|
|
105
|
+
if (!loading) {
|
|
106
|
+
removeDom();
|
|
107
|
+
} else {
|
|
108
|
+
renderLoading();
|
|
109
|
+
}
|
|
110
|
+
return function () {
|
|
111
|
+
removeDom();
|
|
112
|
+
};
|
|
113
|
+
}, [loading]);
|
|
114
|
+
|
|
115
|
+
// 进行ocr识别
|
|
116
|
+
var handleOcr = /*#__PURE__*/function () {
|
|
117
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
118
|
+
var _url$method, method, res, _result;
|
|
119
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
120
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
121
|
+
case 0:
|
|
122
|
+
if (!loading) {
|
|
123
|
+
_context2.next = 2;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
return _context2.abrupt("return");
|
|
127
|
+
case 2:
|
|
128
|
+
setLoading(true);
|
|
129
|
+
_context2.prev = 3;
|
|
130
|
+
if (!(!url || !url.url)) {
|
|
131
|
+
_context2.next = 6;
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
return _context2.abrupt("return");
|
|
135
|
+
case 6:
|
|
136
|
+
_url$method = url.method, method = _url$method === void 0 ? 'get' : _url$method;
|
|
137
|
+
_context2.next = 9;
|
|
138
|
+
return http[method](url.url, params);
|
|
139
|
+
case 9:
|
|
140
|
+
res = _context2.sent;
|
|
141
|
+
if (res.code === 'OK') {
|
|
142
|
+
_result = afterRequest(res.result);
|
|
143
|
+
setOcrResult(_result);
|
|
144
|
+
setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
145
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
146
|
+
while (1) switch (_context.prev = _context.next) {
|
|
147
|
+
case 0:
|
|
148
|
+
setOcrContentShow(true);
|
|
149
|
+
_context.next = 3;
|
|
150
|
+
return renderDom(_result);
|
|
151
|
+
case 3:
|
|
152
|
+
case "end":
|
|
153
|
+
return _context.stop();
|
|
154
|
+
}
|
|
155
|
+
}, _callee);
|
|
156
|
+
})), 300);
|
|
157
|
+
} else {
|
|
158
|
+
message.error('识别失败,请重试!');
|
|
159
|
+
onCancel();
|
|
160
|
+
}
|
|
161
|
+
_context2.next = 17;
|
|
162
|
+
break;
|
|
163
|
+
case 13:
|
|
164
|
+
_context2.prev = 13;
|
|
165
|
+
_context2.t0 = _context2["catch"](3);
|
|
166
|
+
message.error('识别失败,请重试!');
|
|
167
|
+
onCancel();
|
|
168
|
+
case 17:
|
|
169
|
+
setLoading(false);
|
|
170
|
+
case 18:
|
|
171
|
+
case "end":
|
|
172
|
+
return _context2.stop();
|
|
173
|
+
}
|
|
174
|
+
}, _callee2, null, [[3, 13]]);
|
|
175
|
+
}));
|
|
176
|
+
return function handleOcr() {
|
|
177
|
+
return _ref.apply(this, arguments);
|
|
178
|
+
};
|
|
179
|
+
}();
|
|
180
|
+
function getBase64ImageDimensions(base64Image) {
|
|
181
|
+
return new Promise(function (resolve, reject) {
|
|
182
|
+
// 创建一个 Image 对象
|
|
183
|
+
var img = document.createElement('img');
|
|
184
|
+
|
|
185
|
+
// 设置图像的源为 Base64 编码数据
|
|
186
|
+
img.src = base64Image;
|
|
187
|
+
|
|
188
|
+
// 当图像加载完成后
|
|
189
|
+
img.onload = function () {
|
|
190
|
+
// 获取图像的宽度和高度
|
|
191
|
+
var width = img.naturalWidth;
|
|
192
|
+
var height = img.naturalHeight;
|
|
193
|
+
|
|
194
|
+
// 返回宽度和高度
|
|
195
|
+
resolve({
|
|
196
|
+
width: width,
|
|
197
|
+
height: height
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// 如果图像加载出错
|
|
202
|
+
img.onerror = function () {
|
|
203
|
+
reject(new Error('Failed to load image'));
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// 渲染
|
|
209
|
+
var renderDom = /*#__PURE__*/function () {
|
|
210
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(res, num, numScale, color) {
|
|
211
|
+
var ocrTextBox, texts, direction, src;
|
|
212
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
213
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
214
|
+
case 0:
|
|
215
|
+
ocrTextBox = document.getElementById('ocr_text_box');
|
|
216
|
+
if (ocrTextBox) {
|
|
217
|
+
_context4.next = 3;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
return _context4.abrupt("return");
|
|
221
|
+
case 3:
|
|
222
|
+
texts = res.wordsResult;
|
|
223
|
+
direction = res.direction;
|
|
224
|
+
src = params.imageUrl;
|
|
225
|
+
_context4.next = 8;
|
|
226
|
+
return getBase64ImageDimensions(src).then( /*#__PURE__*/function () {
|
|
227
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(dimensions) {
|
|
228
|
+
var scale, screenWidth, screenHeight, imgWidth, imgHeight, reduction, numBoxes, fragment, fontSize, i, box, width, height, left, staticStyles, div, divStyle;
|
|
229
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
230
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
231
|
+
case 0:
|
|
232
|
+
scale = dimensions.width / dimensions.height;
|
|
233
|
+
screenWidth = window.innerWidth;
|
|
234
|
+
screenHeight = window.innerHeight;
|
|
235
|
+
imgWidth = screenWidth * 0.8 * (numScale || imgScale);
|
|
236
|
+
imgHeight = imgWidth / scale;
|
|
237
|
+
if (direction === 3 || direction === 1) {
|
|
238
|
+
scale = dimensions.height / dimensions.width;
|
|
239
|
+
imgHeight = screenWidth * 0.8 * (numScale || imgScale);
|
|
240
|
+
imgWidth = imgHeight / scale;
|
|
241
|
+
}
|
|
242
|
+
if (!(screenWidth * 0.8 > minWidth && imgWidth < minWidth)) {
|
|
243
|
+
_context3.next = 9;
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
message.warning('无法缩小到该比例!');
|
|
247
|
+
return _context3.abrupt("return");
|
|
248
|
+
case 9:
|
|
249
|
+
numScale && setImgScale(numScale); // 可以缩小,同步该值
|
|
250
|
+
num && setNumValue(num); // 字体可以变小,同步该值
|
|
251
|
+
|
|
252
|
+
// 清除之前渲染
|
|
253
|
+
case 11:
|
|
254
|
+
if (!ocrTextBox.firstChild) {
|
|
255
|
+
_context3.next = 16;
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
_context3.next = 14;
|
|
259
|
+
return ocrTextBox.removeChild(ocrTextBox.firstChild);
|
|
260
|
+
case 14:
|
|
261
|
+
_context3.next = 11;
|
|
262
|
+
break;
|
|
263
|
+
case 16:
|
|
264
|
+
setImgWidth(imgWidth);
|
|
265
|
+
setImgHeight(imgHeight);
|
|
266
|
+
reduction = dimensions.width / imgWidth; // 识别文字定位缩放比
|
|
267
|
+
numBoxes = texts.length; // 识别总量
|
|
268
|
+
fragment = document.createDocumentFragment(); // 创建dom节点
|
|
269
|
+
fontSize = 12; // 文字大小
|
|
270
|
+
// 在没有num,没有imgScale时,根据缩放比初步设置文字大小
|
|
271
|
+
if (reduction > 2 && !num && !numScale) {
|
|
272
|
+
setNumValue(0.5);
|
|
273
|
+
fontSize = 12 * 0.5;
|
|
274
|
+
} else {
|
|
275
|
+
fontSize = fontSize * (num || numValue);
|
|
276
|
+
}
|
|
277
|
+
for (i = 0; i < numBoxes; i++) {
|
|
278
|
+
box = document.createElement('div');
|
|
279
|
+
box.className = 'box';
|
|
280
|
+
|
|
281
|
+
// 计算矩形的位置和尺寸
|
|
282
|
+
width = texts[i].location.width / reduction;
|
|
283
|
+
height = texts[i].location.height / reduction;
|
|
284
|
+
left = texts[i].location.left / reduction;
|
|
285
|
+
if (direction === 3) {
|
|
286
|
+
left = left + (imgHeight - imgWidth);
|
|
287
|
+
}
|
|
288
|
+
if (direction === 3 || direction === 1) {
|
|
289
|
+
setModalHeight(imgWidth + 50);
|
|
290
|
+
setModalWidth(imgHeight + 100);
|
|
291
|
+
} else {
|
|
292
|
+
setModalHeight(imgHeight + 50);
|
|
293
|
+
setModalWidth(imgWidth + 100);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// 将样式设置为静态值
|
|
297
|
+
staticStyles = {
|
|
298
|
+
left: "".concat(left, "px"),
|
|
299
|
+
top: "".concat(texts[i].location.top / reduction, "px"),
|
|
300
|
+
width: "".concat(width, "px"),
|
|
301
|
+
height: "".concat(height, "px"),
|
|
302
|
+
fontSize: "".concat(fontSize, "px"),
|
|
303
|
+
backgroundColor: "".concat(color || boxBackGround)
|
|
304
|
+
}; // 将样式设置为元素的style属性
|
|
305
|
+
Object.assign(box.style, staticStyles);
|
|
306
|
+
|
|
307
|
+
// 添加文本内容
|
|
308
|
+
div = document.createElement('div');
|
|
309
|
+
div.className = 'text-item';
|
|
310
|
+
divStyle = {
|
|
311
|
+
transform: "rotate(-".concat(ocrDirection[direction], "deg)")
|
|
312
|
+
};
|
|
313
|
+
Object.assign(div.style, divStyle);
|
|
314
|
+
div.innerText = texts[i].words || '';
|
|
315
|
+
box.appendChild(div);
|
|
316
|
+
|
|
317
|
+
// box.innerText = texts[i].words || '';
|
|
318
|
+
|
|
319
|
+
fragment.appendChild(box);
|
|
320
|
+
setOcrImg(src);
|
|
321
|
+
}
|
|
322
|
+
_context3.next = 26;
|
|
323
|
+
return ocrTextBox.appendChild(fragment);
|
|
324
|
+
case 26:
|
|
325
|
+
case "end":
|
|
326
|
+
return _context3.stop();
|
|
327
|
+
}
|
|
328
|
+
}, _callee3);
|
|
329
|
+
}));
|
|
330
|
+
return function (_x5) {
|
|
331
|
+
return _ref4.apply(this, arguments);
|
|
332
|
+
};
|
|
333
|
+
}()).catch(function (error) {
|
|
334
|
+
message.error('识别失败,请重试!');
|
|
335
|
+
onCancel();
|
|
336
|
+
});
|
|
337
|
+
case 8:
|
|
338
|
+
case "end":
|
|
339
|
+
return _context4.stop();
|
|
340
|
+
}
|
|
341
|
+
}, _callee4);
|
|
342
|
+
}));
|
|
343
|
+
return function renderDom(_x, _x2, _x3, _x4) {
|
|
344
|
+
return _ref3.apply(this, arguments);
|
|
345
|
+
};
|
|
346
|
+
}();
|
|
347
|
+
|
|
348
|
+
// 更改字体大小步进器
|
|
349
|
+
var handleChangeFontSlider = function handleChangeFontSlider(e) {
|
|
350
|
+
if (!ocrResult || !ocrResult.wordsResult) return;
|
|
351
|
+
renderDom(ocrResult, e.target.value);
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
// 更改缩放比步进器
|
|
355
|
+
var handleChangeImgSlider = function handleChangeImgSlider(e) {
|
|
356
|
+
if (!ocrResult || !ocrResult.wordsResult) return;
|
|
357
|
+
renderDom(ocrResult, undefined, e.target.value);
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
// 更改背景色
|
|
361
|
+
var handleChangeColor = function handleChangeColor(e, color) {
|
|
362
|
+
setBoxBackGround(color);
|
|
363
|
+
renderDom(ocrResult, undefined, undefined, color);
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
// ocr结果显示/隐藏
|
|
367
|
+
var onHandleChangeSwitch = function onHandleChangeSwitch() {
|
|
368
|
+
setOcrContentShow(function (prev) {
|
|
369
|
+
return !prev;
|
|
370
|
+
});
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
// 选中全部
|
|
374
|
+
var handleSelectAll = function handleSelectAll() {
|
|
375
|
+
if (!ocrResult || !ocrResult.wordsResult) return;
|
|
376
|
+
var allText = ocrResult.wordsResult.map(function (item) {
|
|
377
|
+
return item.words;
|
|
378
|
+
}).join(' ');
|
|
379
|
+
copy(allText);
|
|
380
|
+
message.success('复制成功');
|
|
381
|
+
};
|
|
382
|
+
return loading ? /*#__PURE__*/React.createElement(React.Fragment, null) : /*#__PURE__*/React.createElement(Modal, _extends({
|
|
383
|
+
zIndex: 9999 // 默认1000
|
|
384
|
+
,
|
|
385
|
+
open: open
|
|
386
|
+
// width={imgWidth ? imgWidth + 50 : window.innerWidth * 0.8}
|
|
387
|
+
// height={imgWidth ? imgHeight + 100 : undefined}
|
|
388
|
+
,
|
|
389
|
+
width: modalWidth,
|
|
390
|
+
height: modalHeight,
|
|
391
|
+
title: /*#__PURE__*/React.createElement("div", {
|
|
392
|
+
className: "common_ocr_modal_title"
|
|
393
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
394
|
+
className: "title"
|
|
395
|
+
}, "OCR\u8BC6\u522B"), showHandleBtn ? /*#__PURE__*/React.createElement("div", {
|
|
396
|
+
className: "btn_box"
|
|
397
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
398
|
+
className: "btn_box_item"
|
|
399
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
400
|
+
className: "item_box"
|
|
401
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
402
|
+
className: "label"
|
|
403
|
+
}, "\u5B57\u4F53\u5927\u5C0F\uFF1A"), /*#__PURE__*/React.createElement(Radio.Group, {
|
|
404
|
+
block: true,
|
|
405
|
+
options: fontSizeOpt,
|
|
406
|
+
value: numValue,
|
|
407
|
+
optionType: "button",
|
|
408
|
+
buttonStyle: "solid",
|
|
409
|
+
onChange: handleChangeFontSlider,
|
|
410
|
+
disabled: disabled
|
|
411
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
412
|
+
disabled: disabled,
|
|
413
|
+
className: "copy_btn right_box",
|
|
414
|
+
type: "primary",
|
|
415
|
+
onClick: function onClick() {
|
|
416
|
+
handleSelectAll();
|
|
417
|
+
}
|
|
418
|
+
}, "\u590D\u5236\u5168\u90E8")), /*#__PURE__*/React.createElement("div", {
|
|
419
|
+
className: "btn_box_item"
|
|
420
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
421
|
+
className: "item_box"
|
|
422
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
423
|
+
className: "label"
|
|
424
|
+
}, "ocr\u56FE\u50CF\u6BD4\u4F8B\uFF1A"), /*#__PURE__*/React.createElement(Radio.Group, {
|
|
425
|
+
block: true,
|
|
426
|
+
options: imgSizeOpt,
|
|
427
|
+
optionType: "button",
|
|
428
|
+
buttonStyle: "solid",
|
|
429
|
+
value: imgScale,
|
|
430
|
+
onChange: handleChangeImgSlider,
|
|
431
|
+
disabled: disabled
|
|
432
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
433
|
+
className: "right_box"
|
|
434
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
435
|
+
className: "label"
|
|
436
|
+
}, "\u663E\u793A\uFF1A"), /*#__PURE__*/React.createElement(Switch, {
|
|
437
|
+
defaultChecked: true,
|
|
438
|
+
onChange: onHandleChangeSwitch,
|
|
439
|
+
disabled: disabled
|
|
440
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
441
|
+
className: "btn_box_item"
|
|
442
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
443
|
+
className: "item_box"
|
|
444
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
445
|
+
className: "label"
|
|
446
|
+
}, "ocr\u6587\u5B57\u80CC\u666F\u8272\uFF1A"), /*#__PURE__*/React.createElement(ColorPicker, {
|
|
447
|
+
onChange: handleChangeColor,
|
|
448
|
+
value: boxBackGround,
|
|
449
|
+
disabled: disabled
|
|
450
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
451
|
+
className: "right_box"
|
|
452
|
+
}))) : null)
|
|
453
|
+
// maskClosable={false}
|
|
454
|
+
// keyboard={false}
|
|
455
|
+
,
|
|
456
|
+
className: "common_ocr_modal",
|
|
457
|
+
onCancel: onCancel,
|
|
458
|
+
footer: null
|
|
459
|
+
}, modalProps), /*#__PURE__*/React.createElement("div", {
|
|
460
|
+
className: "ocr_img",
|
|
461
|
+
id: "canvas",
|
|
462
|
+
style: {
|
|
463
|
+
transform: "rotate(".concat(ocrDirection[ocrResult.direction], "deg)")
|
|
464
|
+
}
|
|
465
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
466
|
+
style: {
|
|
467
|
+
width: imgWidth + 'px',
|
|
468
|
+
height: imgHeight + 'px',
|
|
469
|
+
marginLeft: ocrResult.direction === 3 ? imgHeight - imgWidth + 'px' : '0'
|
|
470
|
+
},
|
|
471
|
+
preview: false,
|
|
472
|
+
className: "ocr_img_box",
|
|
473
|
+
src: ocrImg
|
|
474
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
475
|
+
className: "".concat(ocrContentShow ? 'ocrContentShow' : 'ocrContentHide'),
|
|
476
|
+
id: "ocr_text_box"
|
|
477
|
+
})));
|
|
478
|
+
};
|
|
479
|
+
export default Index;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
.common_ocr_modal {
|
|
2
|
+
top: 25px;
|
|
3
|
+
|
|
4
|
+
.common_ocr_modal_title {
|
|
5
|
+
|
|
6
|
+
.btn_box {
|
|
7
|
+
|
|
8
|
+
.btn_box_item {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
margin: 20px 0;
|
|
13
|
+
|
|
14
|
+
.item_box {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
flex: 1;
|
|
18
|
+
|
|
19
|
+
.label {
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
width: fit-content;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ant-slider {
|
|
25
|
+
flex: 1;
|
|
26
|
+
margin-left: 20px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.copy_btn {
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
margin-left: 10px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.right_box {
|
|
36
|
+
width: fit-content;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ant-modal-content {
|
|
45
|
+
height: 100%;
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ant-modal-body {
|
|
50
|
+
height: 100%;
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ocr_img {
|
|
55
|
+
position: relative;
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
|
|
59
|
+
.ocr_img_content {
|
|
60
|
+
position: absolute;
|
|
61
|
+
z-index: 10;
|
|
62
|
+
top: 0;
|
|
63
|
+
left: 0;
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ocrContentShow {
|
|
68
|
+
visibility: visible;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ocrContentHide {
|
|
72
|
+
visibility: hidden;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.box {
|
|
77
|
+
position: absolute;
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
text-align: center;
|
|
82
|
+
font-size: 12px;
|
|
83
|
+
color: black;
|
|
84
|
+
padding: 2px;
|
|
85
|
+
z-index: 999;
|
|
86
|
+
|
|
87
|
+
.text-item {
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ocr_text_box {
|
|
93
|
+
position: absolute;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ocr_loading {
|
|
98
|
+
position: fixed;
|
|
99
|
+
top: 50%;
|
|
100
|
+
left: 50%;
|
|
101
|
+
z-index: 9999;
|
|
102
|
+
|
|
103
|
+
.scan_img_scan {
|
|
104
|
+
position: fixed;
|
|
105
|
+
top: 0;
|
|
106
|
+
left: 0;
|
|
107
|
+
width: 53px;
|
|
108
|
+
height: 100%;
|
|
109
|
+
animation: move 4s infinite;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.scan_tips {
|
|
113
|
+
position: fixed;
|
|
114
|
+
bottom: 50%;
|
|
115
|
+
left: 50%;
|
|
116
|
+
margin-left: -92px;
|
|
117
|
+
margin-top: -17px;
|
|
118
|
+
width: 184px;
|
|
119
|
+
height: 34px;
|
|
120
|
+
border-radius: 17px;
|
|
121
|
+
background-color: rgba(55, 194, 188, 0.3);
|
|
122
|
+
font-size: 14px;
|
|
123
|
+
font-weight: bold;
|
|
124
|
+
color: #FFFFFF;
|
|
125
|
+
line-height: 34px;
|
|
126
|
+
text-align: center;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|