@vtx/ol-map 2.0.0-beta.16 → 2.0.0-beta.18
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/README.md +205 -205
- package/lib/_util/EventEmitter.js.map +1 -1
- package/lib/_util/StyleCache.js.map +1 -1
- package/lib/_util/encryptParams.js +10 -10
- package/lib/_util/encryptParams.js.map +1 -1
- package/lib/_util/filterSpecialCharacters.js +6 -6
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getCookie.js +4 -4
- package/lib/_util/getCookie.js.map +1 -1
- package/lib/_util/getDefaultMapInfo.js.map +1 -1
- package/lib/_util/getSystemInfo.js.map +1 -1
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/http.js +18 -18
- package/lib/_util/http.js.map +1 -1
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/layer.js +21 -21
- package/lib/_util/layer.js.map +1 -1
- package/lib/_util/mapTool.js +35 -35
- package/lib/_util/mapTool.js.map +1 -1
- package/lib/_util/projection.js +8 -8
- package/lib/_util/projection.js.map +1 -1
- package/lib/_util/projzh/datum/bd-09.js.map +1 -1
- package/lib/_util/projzh/datum/gcj-02.js.map +1 -1
- package/lib/_util/projzh/datum/index.js.map +1 -1
- package/lib/_util/projzh/index.js.map +1 -1
- package/lib/_util/projzh/projection/baidu-mercator.js.map +1 -1
- package/lib/_util/projzh/projection/index.js.map +1 -1
- package/lib/_util/projzh/projection/spherical-mercator.js.map +1 -1
- package/lib/_util/projzh/util.js.map +1 -1
- package/lib/_util/search.js.map +1 -1
- package/lib/_util/setCookie.js +4 -4
- package/lib/_util/setCookie.js.map +1 -1
- package/lib/_util/stringToFun.js.map +1 -1
- package/lib/_util/transform.js.map +1 -1
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js.map +1 -1
- package/lib/analysis-layer/index.js +20 -20
- package/lib/analysis-layer/index.js.map +1 -1
- package/lib/arrow-flow-layer/ArrowFlowLayer.js +6 -6
- package/lib/arrow-flow-layer/ArrowFlowLayer.js.map +1 -1
- package/lib/arrow-flow-layer/index.js.map +1 -1
- package/lib/arrow-flow-layer/sampleArrowsAlongLine.js +16 -16
- package/lib/arrow-flow-layer/sampleArrowsAlongLine.js.map +1 -1
- package/lib/arrow-flow-layer/style/css.js.map +1 -1
- package/lib/arrow-flow-layer/style/index.js.map +1 -1
- package/lib/buffer-draw/BufferDraw.js.map +1 -1
- package/lib/buffer-draw/index.js.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/convertCamelToCSS.js.map +1 -1
- package/lib/dom/Dom.js.map +1 -1
- package/lib/dom/index.js.map +1 -1
- package/lib/dom-layer/index.js.map +1 -1
- package/lib/dom-layer/style/css.js.map +1 -1
- package/lib/dom-layer/style/index.js.map +1 -1
- package/lib/dom-layer/style/index.less +3 -3
- package/lib/events/index.js.map +1 -1
- package/lib/feature-draw/FeatureDraw.js +4 -4
- package/lib/feature-draw/FeatureDraw.js.map +1 -1
- package/lib/feature-draw/index.js.map +1 -1
- package/lib/feature-layer/FeatureLayer.js.map +1 -1
- package/lib/feature-layer/MyCluster.js +7 -7
- package/lib/feature-layer/MyCluster.js.map +1 -1
- package/lib/feature-layer/createFeatureCollection.js +11 -11
- package/lib/feature-layer/createFeatureCollection.js.map +1 -1
- package/lib/feature-layer/index.js.map +1 -1
- package/lib/feature-layer/style/css.js.map +1 -1
- package/lib/feature-layer/style/index.js.map +1 -1
- package/lib/flow-line-layer/FlowLineLayer.js.map +1 -1
- package/lib/flow-line-layer/index.js.map +1 -1
- package/lib/flow-line-layer/style/css.js.map +1 -1
- package/lib/flow-line-layer/style/index.js.map +1 -1
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -1
- package/lib/fly-line-layer/index.js.map +1 -1
- package/lib/fly-line-layer/style/css.js.map +1 -1
- package/lib/fly-line-layer/style/index.js.map +1 -1
- package/lib/group-layer/GroupLayer.js.map +1 -1
- package/lib/group-layer/index.js.map +1 -1
- package/lib/group-layer/style/css.js.map +1 -1
- package/lib/group-layer/style/index.js.map +1 -1
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -1
- package/lib/heatmap-layer/index.js.map +1 -1
- package/lib/heatmap-layer/style/css.js.map +1 -1
- package/lib/heatmap-layer/style/index.js.map +1 -1
- package/lib/high-layer/HighLayer.js +2 -2
- package/lib/high-layer/HighLayer.js.map +1 -1
- package/lib/high-layer/index.js.map +1 -1
- package/lib/image-layer/ImageLayer.js.map +1 -1
- package/lib/image-layer/ImageTileLayer.js.map +1 -1
- package/lib/image-layer/index.js.map +1 -1
- package/lib/image-layer/style/css.js.map +1 -1
- package/lib/image-layer/style/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legend/index.js.map +1 -1
- package/lib/legend/style/css.js.map +1 -1
- package/lib/legend/style/index.js.map +1 -1
- package/lib/legend/style/index.less +100 -100
- package/lib/map/Analysis.js.map +1 -1
- package/lib/map/Layers.js.map +1 -1
- package/lib/map/Popup.js.map +1 -1
- package/lib/map/ScaleDenominator.js.map +1 -1
- package/lib/map/Test.js.map +1 -1
- package/lib/map/defaultTextEnum.js +20 -0
- package/lib/map/defaultTextEnum.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/index.js.map +1 -1
- package/lib/map/index.js +1 -1
- package/lib/map/index.js.map +1 -1
- package/lib/map/style/css.js.map +1 -1
- package/lib/map/style/index.js.map +1 -1
- package/lib/map/style/index.less +152 -152
- package/lib/map-icon/svg/index.js.map +1 -1
- package/lib/marker/Marker.js.map +1 -1
- package/lib/marker/index.js.map +1 -1
- package/lib/path-line-layer/PathLineLayer.js.map +1 -1
- package/lib/path-line-layer/getPathLineStyles.js.map +1 -1
- package/lib/path-line-layer/index.js.map +1 -1
- package/lib/path-line-layer/style/css.js.map +1 -1
- package/lib/path-line-layer/style/index.js.map +1 -1
- package/lib/path-play-back/PathPlayBack.js.map +1 -1
- package/lib/path-play-back/index.js.map +1 -1
- package/lib/poi-search/Location.js.map +1 -1
- package/lib/poi-search/PoiList.js.map +1 -1
- package/lib/poi-search/Search.js.map +1 -1
- package/lib/poi-search/index.js.map +1 -1
- package/lib/poi-search/style/css.js.map +1 -1
- package/lib/poi-search/style/index.js.map +1 -1
- package/lib/poi-search/style/index.less +97 -97
- package/lib/point/Point.js.map +1 -1
- package/lib/point/index.js.map +1 -1
- package/lib/polygon/Polygon.js.map +1 -1
- package/lib/polygon/index.js.map +1 -1
- package/lib/polyline/Polyline.js.map +1 -1
- package/lib/polyline/index.js.map +1 -1
- package/lib/popup/index.js.map +1 -1
- package/lib/popup/style/css.js.map +1 -1
- package/lib/popup/style/index.js.map +1 -1
- package/lib/popup/style/index.less +129 -129
- package/lib/provider/index.js.map +1 -1
- package/lib/renderer/Fill.js.map +1 -1
- package/lib/renderer/Stroke.js.map +1 -1
- package/lib/renderer/index.js.map +1 -1
- package/lib/renderer/style/css.js.map +1 -1
- package/lib/renderer/style/index.js.map +1 -1
- package/lib/renderer/transformRgb.js.map +1 -1
- package/lib/search-map/VtxModal.js.map +1 -1
- package/lib/search-map/index.js +6 -3
- package/lib/search-map/index.js.map +1 -1
- package/lib/search-map/style/css.js.map +1 -1
- package/lib/search-map/style/index.js.map +1 -1
- package/lib/search-map/style/index.less +96 -96
- package/lib/search-map/style/modal.less +65 -65
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +7 -7
- package/lib/style/themes/default.less +7 -7
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/tile-layer/TileLayer.js.map +1 -1
- package/lib/tile-layer/index.js.map +1 -1
- package/lib/tile-layer/style/css.js.map +1 -1
- package/lib/tile-layer/style/index.js.map +1 -1
- package/lib/tools/Layer/LayerService.js.map +1 -1
- package/lib/tools/Layer/LayersCheckService.js.map +1 -1
- package/lib/tools/Layer/index.js +2 -2
- package/lib/tools/Layer/index.js.map +1 -1
- package/lib/tools/Layer/index.less +43 -43
- package/lib/tools/Search/index.js +5 -5
- package/lib/tools/Search/index.js.map +1 -1
- package/lib/tools/Toolbox/BoxSelect/index.js +2 -2
- package/lib/tools/Toolbox/BoxSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/CircleSelect/index.js +2 -2
- package/lib/tools/Toolbox/CircleSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/EagleEye/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js +1 -1
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.js +2 -2
- package/lib/tools/Toolbox/MapBookmark/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.less +20 -20
- package/lib/tools/Toolbox/MapDownload/index.js.map +1 -1
- package/lib/tools/Toolbox/MapPrint/index.css +2 -1
- package/lib/tools/Toolbox/MapPrint/index.js +17 -15
- package/lib/tools/Toolbox/MapPrint/index.js.map +1 -1
- package/lib/tools/Toolbox/MapPrint/index.less +73 -72
- package/lib/tools/Toolbox/MapSheetPrint/assets/lock.png +0 -0
- package/lib/tools/Toolbox/MapSheetPrint/index.js +291 -62
- package/lib/tools/Toolbox/MapSheetPrint/index.js.map +1 -1
- package/lib/tools/Toolbox/MapSheetPrint/index.less +34 -34
- package/lib/tools/Toolbox/Measure/Area/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Distance/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Measure.js.map +1 -1
- package/lib/tools/Toolbox/Measure/index.js.map +1 -1
- package/lib/tools/Toolbox/PolygonSelect/index.js +2 -2
- package/lib/tools/Toolbox/PolygonSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/ScaleLine/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.js +11 -11
- package/lib/tools/Toolbox/SelectTools/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.less +87 -87
- package/lib/tools/Toolbox/SpaceQuery/index.js.map +1 -1
- package/lib/tools/Toolbox/SpaceQuery/index.less +16 -16
- package/lib/tools/Toolbox/ZoomInput/index.js.map +1 -1
- package/lib/tools/Toolbox/ZoomInput/index.less +5 -5
- package/lib/tools/Toolbox/draftingPrint/index.js +4 -3
- package/lib/tools/Toolbox/draftingPrint/index.js.map +1 -1
- package/lib/tools/Toolbox/draftingPrint/index.less +34 -34
- package/lib/tools/Toolbox/index.js.map +1 -1
- package/lib/tools/Toolbox/index.less +2 -2
- package/lib/tools/Utils/CreateOverlay.js +2 -2
- package/lib/tools/Utils/CreateOverlay.js.map +1 -1
- package/lib/tools/Utils/Draw.js +4 -4
- package/lib/tools/Utils/Draw.js.map +1 -1
- package/lib/tools/Utils/HighLayer.js +2 -2
- package/lib/tools/Utils/HighLayer.js.map +1 -1
- package/lib/tools/Utils/measure.js.map +1 -1
- package/lib/tools/Utils/utils.js +17 -17
- package/lib/tools/Utils/utils.js.map +1 -1
- package/lib/tools/View/index.js.map +1 -1
- package/lib/tools/View/index.less +28 -28
- package/lib/tools/analysis-tool/index.js.map +1 -1
- package/lib/tools/base-map-switch/index.js.map +1 -1
- package/lib/tools/components/Chart/index.js +88 -88
- package/lib/tools/components/Chart/index.js.map +1 -1
- package/lib/tools/components/Icon/index.js.map +1 -1
- package/lib/tools/components/Info/index.js.map +1 -1
- package/lib/tools/components/Info/index.less +26 -26
- package/lib/tools/components/ItemWrap/index.js.map +1 -1
- package/lib/tools/components/ItemWrap/index.less +41 -41
- package/lib/tools/components/Modal/index.js +2 -2
- package/lib/tools/components/Modal/index.js.map +1 -1
- package/lib/tools/components/Modal/index.less +33 -33
- package/lib/tools/components/MyTabs/index.js.map +1 -1
- package/lib/tools/components/RequiredLabel/index.js.map +1 -1
- package/lib/tools/components/RequiredLabel/index.less +5 -5
- package/lib/tools/components/Select/index.js.map +1 -1
- package/lib/tools/components/Table/index.js +2 -2
- package/lib/tools/components/Table/index.js.map +1 -1
- package/lib/tools/components/Table/index.less +13 -13
- package/lib/tools/components/ToolItem/index.js.map +1 -1
- package/lib/tools/components/ToolItem/index.less +27 -27
- package/lib/tools/components/ToolsSelect/index.js.map +1 -1
- package/lib/tools/components/ToolsSelect/index.less +10 -10
- package/lib/tools/full-screen/index.js.map +1 -1
- package/lib/tools/index.js.map +1 -1
- package/lib/tools/layer-control/index.js.map +1 -1
- package/lib/tools/refresh/index.js.map +1 -1
- package/lib/tools/style/css.js.map +1 -1
- package/lib/tools/style/index.js.map +1 -1
- package/lib/tools/style/index.less +154 -154
- package/lib/tools-item/index.js.map +1 -1
- package/lib/use-props/index.js.map +1 -1
- package/lib/wms-layer/WmsLayer.js.map +1 -1
- package/lib/wms-layer/index.js.map +1 -1
- package/lib/wms-layer/style/css.js.map +1 -1
- package/lib/wms-layer/style/index.js.map +1 -1
- package/package.json +138 -138
- package/lib/tools/Toolbox/MapSheetPrint/index-1.js +0 -1259
- package/lib/tools/Toolbox/MapSheetPrint/index-1.js.map +0 -1
- package/lib/tools/Toolbox/MapSheetPrint/index-2.js +0 -1338
- package/lib/tools/Toolbox/MapSheetPrint/index-2.js.map +0 -1
- package/lib/tools/Toolbox/MapSheetPrint/print.js +0 -189
- package/lib/tools/Toolbox/MapSheetPrint/print.js.map +0 -1
- package/lib/tools/Toolbox/MapSheetPrint/printUtils.js +0 -145
- package/lib/tools/Toolbox/MapSheetPrint/printUtils.js.map +0 -1
|
@@ -19,6 +19,9 @@ var _Draw = require("ol/interaction/Draw");
|
|
|
19
19
|
var _Draw2 = require("../../Utils/Draw");
|
|
20
20
|
var _useProps2 = _interopRequireDefault(require("../../../use-props"));
|
|
21
21
|
var _olMap = require("@vtx/ol-map");
|
|
22
|
+
var _FeatureLayer = _interopRequireDefault(require("../../../feature-layer/FeatureLayer"));
|
|
23
|
+
var _ImageLayer = _interopRequireDefault(require("../../../image-layer/ImageLayer"));
|
|
24
|
+
var _lock = _interopRequireDefault(require("./assets/lock.png"));
|
|
22
25
|
require("./index.less");
|
|
23
26
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
24
27
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
@@ -28,7 +31,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
|
28
31
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
29
32
|
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
30
33
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
31
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) {
|
|
34
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
|
|
32
35
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
33
36
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
34
37
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -286,7 +289,7 @@ var syncBusinessLayers = function syncBusinessLayers(sourceMap, targetMap, exclu
|
|
|
286
289
|
if (layer.get('key') === '__TDT_TILE' || layer.get('key') === '__TDT_MARK') {
|
|
287
290
|
return false;
|
|
288
291
|
}
|
|
289
|
-
return
|
|
292
|
+
return true;
|
|
290
293
|
}).forEach(function (layer) {
|
|
291
294
|
var clonedLayer = cloneLayer(layer);
|
|
292
295
|
if (clonedLayer) {
|
|
@@ -321,6 +324,122 @@ var waitMapRender = function waitMapRender(mapInstance) {
|
|
|
321
324
|
(_mapInstance$renderSy = mapInstance.renderSync) === null || _mapInstance$renderSy === void 0 || _mapInstance$renderSy.call(mapInstance);
|
|
322
325
|
});
|
|
323
326
|
};
|
|
327
|
+
|
|
328
|
+
// 业务图层经常是 WMS/WFS 异步请求,rendercomplete 加上固定 600ms 还不够稳。
|
|
329
|
+
// 这里额外等待图层 source 进入一段“空闲期”后再截图,避免外面图层还在加载时就提前截空白图。
|
|
330
|
+
var waitLayerSourcesSettled = function waitLayerSourcesSettled(mapInstance) {
|
|
331
|
+
var timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4000;
|
|
332
|
+
return new Promise(function (resolve) {
|
|
333
|
+
var _mapInstance$renderSy3;
|
|
334
|
+
if (!mapInstance) {
|
|
335
|
+
resolve();
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
var disposers = [];
|
|
339
|
+
var pending = 0;
|
|
340
|
+
var done = false;
|
|
341
|
+
var idleTimer = null;
|
|
342
|
+
var finish = function finish() {
|
|
343
|
+
if (done) {
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
done = true;
|
|
347
|
+
if (idleTimer) {
|
|
348
|
+
clearTimeout(idleTimer);
|
|
349
|
+
}
|
|
350
|
+
disposers.forEach(function (dispose) {
|
|
351
|
+
return dispose();
|
|
352
|
+
});
|
|
353
|
+
resolve();
|
|
354
|
+
};
|
|
355
|
+
var scheduleFinish = function scheduleFinish(delay) {
|
|
356
|
+
if (idleTimer) {
|
|
357
|
+
clearTimeout(idleTimer);
|
|
358
|
+
}
|
|
359
|
+
idleTimer = setTimeout(function () {
|
|
360
|
+
if (pending <= 0) {
|
|
361
|
+
finish();
|
|
362
|
+
}
|
|
363
|
+
}, delay);
|
|
364
|
+
};
|
|
365
|
+
var onStart = function onStart() {
|
|
366
|
+
pending += 1;
|
|
367
|
+
if (idleTimer) {
|
|
368
|
+
clearTimeout(idleTimer);
|
|
369
|
+
idleTimer = null;
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
var onEnd = function onEnd() {
|
|
373
|
+
pending = Math.max(0, pending - 1);
|
|
374
|
+
if (pending === 0) {
|
|
375
|
+
scheduleFinish(250);
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
var bind = function bind(target, type, handler) {
|
|
379
|
+
if (!(target !== null && target !== void 0 && target.on)) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
target.on(type, handler);
|
|
383
|
+
disposers.push(function () {
|
|
384
|
+
var _target$un;
|
|
385
|
+
return (_target$un = target.un) === null || _target$un === void 0 ? void 0 : _target$un.call(target, type, handler);
|
|
386
|
+
});
|
|
387
|
+
};
|
|
388
|
+
mapInstance.getLayers().getArray().filter(function (layer) {
|
|
389
|
+
return layer.get('__sheetPrintClone');
|
|
390
|
+
}).forEach(function (layer) {
|
|
391
|
+
var _layer$getSource;
|
|
392
|
+
var source = (_layer$getSource = layer.getSource) === null || _layer$getSource === void 0 ? void 0 : _layer$getSource.call(layer);
|
|
393
|
+
if (!source) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
['tileloadstart', 'imageloadstart', 'featuresloadstart', 'vectorloadstart'].forEach(function (type) {
|
|
397
|
+
return bind(source, type, onStart);
|
|
398
|
+
});
|
|
399
|
+
['tileloadend', 'tileloaderror', 'imageloadend', 'imageloaderror', 'featuresloadend', 'featuresloaderror', 'vectorloadend', 'vectorloaderror'].forEach(function (type) {
|
|
400
|
+
return bind(source, type, onEnd);
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
// 业务 ImageLayer 第一次进入预览时,经常是 source 已经创建但首张 WMS 图还没真正画进地图。
|
|
404
|
+
// 这里额外盯一下当前 image state,等它从 idle/loading 走到可用状态后再继续截图。
|
|
405
|
+
if (layer instanceof _ImageLayer["default"] && typeof source.getImage === 'function') {
|
|
406
|
+
var _mapInstance$getView, _mapInstance$getSize, _view$calculateExtent, _view$getResolution, _view$getProjection, _image$getState;
|
|
407
|
+
var view = (_mapInstance$getView = mapInstance.getView) === null || _mapInstance$getView === void 0 ? void 0 : _mapInstance$getView.call(mapInstance);
|
|
408
|
+
var size = (_mapInstance$getSize = mapInstance.getSize) === null || _mapInstance$getSize === void 0 ? void 0 : _mapInstance$getSize.call(mapInstance);
|
|
409
|
+
var extent = view === null || view === void 0 || (_view$calculateExtent = view.calculateExtent) === null || _view$calculateExtent === void 0 ? void 0 : _view$calculateExtent.call(view, size);
|
|
410
|
+
var resolution = view === null || view === void 0 || (_view$getResolution = view.getResolution) === null || _view$getResolution === void 0 ? void 0 : _view$getResolution.call(view);
|
|
411
|
+
var projection = view === null || view === void 0 || (_view$getProjection = view.getProjection) === null || _view$getProjection === void 0 ? void 0 : _view$getProjection.call(view);
|
|
412
|
+
var image = extent && resolution && projection ? source.getImage(extent, resolution, 1, projection) : null;
|
|
413
|
+
var imageState = image === null || image === void 0 || (_image$getState = image.getState) === null || _image$getState === void 0 ? void 0 : _image$getState.call(image);
|
|
414
|
+
if (image && (imageState === 0 || imageState === 1)) {
|
|
415
|
+
var _image$on;
|
|
416
|
+
onStart();
|
|
417
|
+
var _handleImageChange = function handleImageChange() {
|
|
418
|
+
var _image$getState2, _image$un, _mapInstance$renderSy2;
|
|
419
|
+
var nextState = (_image$getState2 = image.getState) === null || _image$getState2 === void 0 ? void 0 : _image$getState2.call(image);
|
|
420
|
+
if (nextState === 0 || nextState === 1) {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
(_image$un = image.un) === null || _image$un === void 0 || _image$un.call(image, 'change', _handleImageChange);
|
|
424
|
+
onEnd();
|
|
425
|
+
(_mapInstance$renderSy2 = mapInstance.renderSync) === null || _mapInstance$renderSy2 === void 0 || _mapInstance$renderSy2.call(mapInstance);
|
|
426
|
+
};
|
|
427
|
+
(_image$on = image.on) === null || _image$on === void 0 || _image$on.call(image, 'change', _handleImageChange);
|
|
428
|
+
disposers.push(function () {
|
|
429
|
+
var _image$un2;
|
|
430
|
+
return (_image$un2 = image.un) === null || _image$un2 === void 0 ? void 0 : _image$un2.call(image, 'change', _handleImageChange);
|
|
431
|
+
});
|
|
432
|
+
if (imageState === 0 && image.load) {
|
|
433
|
+
image.load();
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
scheduleFinish(500);
|
|
439
|
+
setTimeout(finish, timeout);
|
|
440
|
+
(_mapInstance$renderSy3 = mapInstance.renderSync) === null || _mapInstance$renderSy3 === void 0 || _mapInstance$renderSy3.call(mapInstance);
|
|
441
|
+
});
|
|
442
|
+
};
|
|
324
443
|
var parseCanvasTransform = function parseCanvasTransform(canvas) {
|
|
325
444
|
var transformText = canvas.style.transform || window.getComputedStyle(canvas).transform || '';
|
|
326
445
|
var match = transformText.match(/^matrix\(([^)]+)\)$/);
|
|
@@ -458,7 +577,7 @@ var createPdfFromImages = function createPdfFromImages(_ref4) {
|
|
|
458
577
|
};
|
|
459
578
|
function _default(props) {
|
|
460
579
|
var _splitPlan$sheets2;
|
|
461
|
-
var
|
|
580
|
+
var _onClose = props.onClose;
|
|
462
581
|
var _useProps = (0, _useProps2["default"])(),
|
|
463
582
|
map = _useProps.map,
|
|
464
583
|
TextEnum = _useProps.TextEnum;
|
|
@@ -501,22 +620,26 @@ function _default(props) {
|
|
|
501
620
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
502
621
|
previewReady = _useState16[0],
|
|
503
622
|
setPreviewReady = _useState16[1];
|
|
504
|
-
var _useState17 = (0, _react.useState)(
|
|
623
|
+
var _useState17 = (0, _react.useState)(TextEnum.generatingPreviewText),
|
|
505
624
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
var _useState19 = (0, _react.useState)(
|
|
625
|
+
previewLoadingText = _useState18[0],
|
|
626
|
+
setPreviewLoadingText = _useState18[1];
|
|
627
|
+
var _useState19 = (0, _react.useState)(''),
|
|
509
628
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
510
|
-
|
|
511
|
-
|
|
629
|
+
previewImage = _useState20[0],
|
|
630
|
+
setPreviewImage = _useState20[1];
|
|
512
631
|
var _useState21 = (0, _react.useState)([]),
|
|
513
632
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
var _useState23 = (0, _react.useState)(
|
|
633
|
+
sheetImages = _useState22[0],
|
|
634
|
+
setSheetImages = _useState22[1];
|
|
635
|
+
var _useState23 = (0, _react.useState)([]),
|
|
517
636
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
518
|
-
|
|
519
|
-
|
|
637
|
+
selectedSheetIds = _useState24[0],
|
|
638
|
+
setSelectedSheetIds = _useState24[1];
|
|
639
|
+
var _useState25 = (0, _react.useState)(false),
|
|
640
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
641
|
+
generating = _useState26[0],
|
|
642
|
+
setGenerating = _useState26[1];
|
|
520
643
|
var drawTool = (0, _react.useRef)(null);
|
|
521
644
|
var boxExtentRef = (0, _react.useRef)(null);
|
|
522
645
|
var boxLayerRef = (0, _react.useRef)(null);
|
|
@@ -525,16 +648,25 @@ function _default(props) {
|
|
|
525
648
|
var exportStageRef = (0, _react.useRef)(null);
|
|
526
649
|
var previewMasterCanvasRef = (0, _react.useRef)(null);
|
|
527
650
|
var previewMasterFramePixelsRef = (0, _react.useRef)(null);
|
|
651
|
+
var cleanupInternalMaps = function cleanupInternalMaps() {
|
|
652
|
+
if (previewRenderTimerRef.current) {
|
|
653
|
+
clearTimeout(previewRenderTimerRef.current);
|
|
654
|
+
previewRenderTimerRef.current = null;
|
|
655
|
+
}
|
|
656
|
+
clearClonedLayers(exportMapRef.current);
|
|
657
|
+
clearClonedLayers(previewMapRef.current);
|
|
658
|
+
renderLayersSyncedRef.current = false;
|
|
659
|
+
};
|
|
528
660
|
var renderLayersSyncedRef = (0, _react.useRef)(false);
|
|
529
661
|
var previewRenderSeqRef = (0, _react.useRef)(0);
|
|
530
662
|
var previewRenderTimerRef = (0, _react.useRef)(null);
|
|
531
|
-
var
|
|
663
|
+
var _useState27 = (0, _react.useState)({
|
|
532
664
|
width: 1,
|
|
533
665
|
height: 1
|
|
534
666
|
}),
|
|
535
|
-
|
|
536
|
-
exportSize =
|
|
537
|
-
setExportSize =
|
|
667
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
668
|
+
exportSize = _useState28[0],
|
|
669
|
+
setExportSize = _useState28[1];
|
|
538
670
|
(0, _react.useEffect)(function () {
|
|
539
671
|
form.setFieldsValue({
|
|
540
672
|
range: '1',
|
|
@@ -568,6 +700,9 @@ function _default(props) {
|
|
|
568
700
|
var extent = event.feature.getGeometry().getExtent();
|
|
569
701
|
boxExtentRef.current = extent;
|
|
570
702
|
map.showTip(TextEnum.leftClickToStart);
|
|
703
|
+
map.getView().fit(extent, {
|
|
704
|
+
duration: 500
|
|
705
|
+
});
|
|
571
706
|
});
|
|
572
707
|
map.addLayer(boxLayer);
|
|
573
708
|
map.addInteraction(tool);
|
|
@@ -592,6 +727,24 @@ function _default(props) {
|
|
|
592
727
|
var previewFrameExtent = (0, _react.useMemo)(function () {
|
|
593
728
|
return buildPreviewFrameExtent(splitPlan, metrics === null || metrics === void 0 ? void 0 : metrics.extent);
|
|
594
729
|
}, [splitPlan, metrics === null || metrics === void 0 ? void 0 : metrics.extent]);
|
|
730
|
+
var mapProjection = (0, _react.useMemo)(function () {
|
|
731
|
+
try {
|
|
732
|
+
var _map$getView, _map$getView$getProje, _map$getView$getProje2;
|
|
733
|
+
return (map === null || map === void 0 || (_map$getView = map.getView) === null || _map$getView === void 0 || (_map$getView = _map$getView.call(map)) === null || _map$getView === void 0 || (_map$getView$getProje = _map$getView.getProjection) === null || _map$getView$getProje === void 0 || (_map$getView$getProje = _map$getView$getProje.call(_map$getView)) === null || _map$getView$getProje === void 0 || (_map$getView$getProje2 = _map$getView$getProje.getCode) === null || _map$getView$getProje2 === void 0 ? void 0 : _map$getView$getProje2.call(_map$getView$getProje)) || 'EPSG:4326';
|
|
734
|
+
} catch (error) {
|
|
735
|
+
return 'EPSG:4326';
|
|
736
|
+
}
|
|
737
|
+
}, [map]);
|
|
738
|
+
var inheritedMapProps = (0, _react.useMemo)(function () {
|
|
739
|
+
var baseLayerParams = (map === null || map === void 0 ? void 0 : map.baseLayerParams) || {};
|
|
740
|
+
return {
|
|
741
|
+
projection: mapProjection,
|
|
742
|
+
mapStyle: baseLayerParams.mapStyle,
|
|
743
|
+
baseMapStyle: baseLayerParams.baseMapStyle,
|
|
744
|
+
dark: baseLayerParams.dark,
|
|
745
|
+
tk: (map === null || map === void 0 ? void 0 : map.tk) || baseLayerParams.tk || '1adbb6e47668cb33757cd799548bf1f4'
|
|
746
|
+
};
|
|
747
|
+
}, [map, mapProjection]);
|
|
595
748
|
|
|
596
749
|
// 预览里的“单张纸大小”应该只由纸张尺寸本身决定,
|
|
597
750
|
// 不应该因为修改总宽高而把 A4/A3 的纸张框一起缩放掉。
|
|
@@ -658,11 +811,10 @@ function _default(props) {
|
|
|
658
811
|
};
|
|
659
812
|
var handleExportMapCreated = function handleExportMapCreated(exportMap) {
|
|
660
813
|
exportMapRef.current = exportMap;
|
|
661
|
-
|
|
814
|
+
renderLayersSyncedRef.current = false;
|
|
662
815
|
};
|
|
663
816
|
var handlePreviewMapCreated = function handlePreviewMapCreated(previewMap) {
|
|
664
817
|
previewMapRef.current = previewMap;
|
|
665
|
-
syncBusinessLayers(map, previewMap, boxLayerRef.current);
|
|
666
818
|
};
|
|
667
819
|
|
|
668
820
|
// 隐藏导出地图只在第一次真正需要时补同步业务图层,
|
|
@@ -688,7 +840,7 @@ function _default(props) {
|
|
|
688
840
|
// 点击“执行分幅”时,直接读取外部主地图当前层级,
|
|
689
841
|
// 也就是“外面地图是什么层级,进去就按什么层级算”。
|
|
690
842
|
var handleSubmit = function handleSubmit(values) {
|
|
691
|
-
var _values$overlapMargin, _map$getView$getZoom, _map$
|
|
843
|
+
var _values$overlapMargin, _map$getView$getZoom, _map$getView2;
|
|
692
844
|
var pageSize = values.pageSize || form.getFieldValue('pageSize');
|
|
693
845
|
var overlapMargin = Number((_values$overlapMargin = values.overlapMargin) !== null && _values$overlapMargin !== void 0 ? _values$overlapMargin : form.getFieldValue('overlapMargin')) || 0;
|
|
694
846
|
// const overlapMargin = 10
|
|
@@ -698,7 +850,7 @@ function _default(props) {
|
|
|
698
850
|
if (!isValidExtent(extent)) {
|
|
699
851
|
return;
|
|
700
852
|
}
|
|
701
|
-
var zoom = Math.round(((_map$getView$getZoom = (_map$
|
|
853
|
+
var zoom = Math.round(((_map$getView$getZoom = (_map$getView2 = map.getView()).getZoom) === null || _map$getView$getZoom === void 0 ? void 0 : _map$getView$getZoom.call(_map$getView2)) || 0);
|
|
702
854
|
var nextMetrics = calcMetricsFromZoom(extent, map.getView(), zoom);
|
|
703
855
|
if (!nextMetrics) {
|
|
704
856
|
return;
|
|
@@ -730,6 +882,7 @@ function _default(props) {
|
|
|
730
882
|
setTotalWidthMm(Number(nextMetrics.widthMm.toFixed(3)));
|
|
731
883
|
setTotalHeightMm(Number(nextMetrics.heightMm.toFixed(3)));
|
|
732
884
|
setPreviewReady(false);
|
|
885
|
+
setPreviewLoadingText(TextEnum.generatingPreviewText);
|
|
733
886
|
setPreviewImage('');
|
|
734
887
|
previewMasterCanvasRef.current = null;
|
|
735
888
|
previewMasterFramePixelsRef.current = null;
|
|
@@ -856,6 +1009,7 @@ function _default(props) {
|
|
|
856
1009
|
} : null
|
|
857
1010
|
});
|
|
858
1011
|
setPreviewReady(false);
|
|
1012
|
+
setPreviewLoadingText(TextEnum.syncingLayersText);
|
|
859
1013
|
_context4.n = 2;
|
|
860
1014
|
return waitNextFrame();
|
|
861
1015
|
case 2:
|
|
@@ -898,32 +1052,39 @@ function _default(props) {
|
|
|
898
1052
|
_context4.n = 7;
|
|
899
1053
|
return waitMapRender(exportMapRef.current);
|
|
900
1054
|
case 7:
|
|
901
|
-
|
|
902
|
-
_context4.n = 8;
|
|
903
|
-
break;
|
|
904
|
-
}
|
|
1055
|
+
setPreviewLoadingText(TextEnum.waitingBusinessLayersText);
|
|
905
1056
|
_context4.n = 8;
|
|
906
|
-
return
|
|
1057
|
+
return waitLayerSourcesSettled(exportMapRef.current);
|
|
907
1058
|
case 8:
|
|
908
1059
|
_context4.n = 9;
|
|
909
|
-
return
|
|
1060
|
+
return waitMapRender(exportMapRef.current);
|
|
910
1061
|
case 9:
|
|
911
|
-
if (!
|
|
1062
|
+
if (!previewMapRef.current) {
|
|
912
1063
|
_context4.n = 10;
|
|
913
1064
|
break;
|
|
914
1065
|
}
|
|
915
|
-
|
|
1066
|
+
_context4.n = 10;
|
|
1067
|
+
return waitMapRender(previewMapRef.current);
|
|
916
1068
|
case 10:
|
|
917
1069
|
_context4.n = 11;
|
|
918
|
-
return
|
|
1070
|
+
return waitNextFrame();
|
|
919
1071
|
case 11:
|
|
920
|
-
sourceCanvas = _context4.v;
|
|
921
1072
|
if (!(seq !== previewRenderSeqRef.current)) {
|
|
922
1073
|
_context4.n = 12;
|
|
923
1074
|
break;
|
|
924
1075
|
}
|
|
925
1076
|
return _context4.a(2);
|
|
926
1077
|
case 12:
|
|
1078
|
+
_context4.n = 13;
|
|
1079
|
+
return captureDomCanvas(exportStageRef.current, captureWidthPx, captureHeightPx);
|
|
1080
|
+
case 13:
|
|
1081
|
+
sourceCanvas = _context4.v;
|
|
1082
|
+
if (!(seq !== previewRenderSeqRef.current)) {
|
|
1083
|
+
_context4.n = 14;
|
|
1084
|
+
break;
|
|
1085
|
+
}
|
|
1086
|
+
return _context4.a(2);
|
|
1087
|
+
case 14:
|
|
927
1088
|
previewCanvas = document.createElement('canvas');
|
|
928
1089
|
previewCanvas.width = Math.max(1, Math.round(previewFramePixels.width));
|
|
929
1090
|
previewCanvas.height = Math.max(1, Math.round(previewFramePixels.height));
|
|
@@ -947,7 +1108,8 @@ function _default(props) {
|
|
|
947
1108
|
ctx.drawImage(previewMasterCanvas, 0, 0, previewCanvas.width, previewCanvas.height);
|
|
948
1109
|
setPreviewImage(previewCanvas.toDataURL('image/png'));
|
|
949
1110
|
setPreviewReady(true);
|
|
950
|
-
|
|
1111
|
+
setPreviewLoadingText(TextEnum.generatingPreviewText);
|
|
1112
|
+
case 15:
|
|
951
1113
|
return _context4.a(2);
|
|
952
1114
|
}
|
|
953
1115
|
}, _callee4);
|
|
@@ -974,6 +1136,11 @@ function _default(props) {
|
|
|
974
1136
|
}
|
|
975
1137
|
};
|
|
976
1138
|
}, [previewVisible, metrics === null || metrics === void 0 ? void 0 : metrics.extent, previewFrameExtent, previewFramePixels, selectedMapPixels, totalWidthMm, totalHeightMm]);
|
|
1139
|
+
(0, _react.useEffect)(function () {
|
|
1140
|
+
if (!previewVisible && !sheetVisible) {
|
|
1141
|
+
cleanupInternalMaps();
|
|
1142
|
+
}
|
|
1143
|
+
}, [previewVisible, sheetVisible]);
|
|
977
1144
|
(0, _react.useEffect)(function () {
|
|
978
1145
|
if (!splitPlan) {
|
|
979
1146
|
return;
|
|
@@ -1083,7 +1250,10 @@ function _default(props) {
|
|
|
1083
1250
|
};
|
|
1084
1251
|
return /*#__PURE__*/_react["default"].createElement(_Modal["default"], {
|
|
1085
1252
|
title: TextEnum.toolMapSheetPrint,
|
|
1086
|
-
onClose: onClose
|
|
1253
|
+
onClose: function onClose() {
|
|
1254
|
+
cleanupInternalMaps();
|
|
1255
|
+
_onClose === null || _onClose === void 0 || _onClose();
|
|
1256
|
+
}
|
|
1087
1257
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
|
|
1088
1258
|
form: form,
|
|
1089
1259
|
name: "mapSheetPrint",
|
|
@@ -1095,16 +1265,16 @@ function _default(props) {
|
|
|
1095
1265
|
},
|
|
1096
1266
|
onFinish: handleSubmit
|
|
1097
1267
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
1098
|
-
label: TextEnum.
|
|
1268
|
+
label: TextEnum.mapPrintTitle,
|
|
1099
1269
|
name: "title",
|
|
1100
1270
|
rules: [{
|
|
1101
1271
|
required: true,
|
|
1102
|
-
message: TextEnum.
|
|
1272
|
+
message: TextEnum.pleaseInput
|
|
1103
1273
|
}]
|
|
1104
1274
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
1105
1275
|
placeholder: TextEnum.pleaseInput
|
|
1106
1276
|
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
1107
|
-
label: TextEnum.
|
|
1277
|
+
label: TextEnum.printRange,
|
|
1108
1278
|
name: "range",
|
|
1109
1279
|
rules: [{
|
|
1110
1280
|
required: true,
|
|
@@ -1121,8 +1291,16 @@ function _default(props) {
|
|
|
1121
1291
|
value: '2',
|
|
1122
1292
|
label: TextEnum.manualBoxSelect
|
|
1123
1293
|
}]
|
|
1124
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
1125
|
-
|
|
1294
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1295
|
+
style: {
|
|
1296
|
+
marginLeft: 12,
|
|
1297
|
+
marginBottom: 12,
|
|
1298
|
+
color: '#333',
|
|
1299
|
+
fontSize: 14,
|
|
1300
|
+
fontWeight: 500
|
|
1301
|
+
}
|
|
1302
|
+
}, TextEnum.sheetPrintParams), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
1303
|
+
label: TextEnum.pageSize,
|
|
1126
1304
|
name: "pageSize",
|
|
1127
1305
|
rules: [{
|
|
1128
1306
|
required: true,
|
|
@@ -1139,18 +1317,45 @@ function _default(props) {
|
|
|
1139
1317
|
};
|
|
1140
1318
|
})
|
|
1141
1319
|
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
1142
|
-
label:
|
|
1320
|
+
label: TextEnum.overlapMargin,
|
|
1321
|
+
required: true
|
|
1322
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1323
|
+
style: {
|
|
1324
|
+
display: 'flex',
|
|
1325
|
+
alignItems: 'center',
|
|
1326
|
+
gap: 8
|
|
1327
|
+
}
|
|
1143
1328
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
1144
1329
|
name: "overlapMargin",
|
|
1145
|
-
|
|
1330
|
+
rules: [{
|
|
1331
|
+
required: true,
|
|
1332
|
+
message: TextEnum.pleaseInput
|
|
1333
|
+
}, {
|
|
1334
|
+
type: 'integer',
|
|
1335
|
+
transform: function transform(value) {
|
|
1336
|
+
return value === undefined || value === null || value === '' ? value : Number(value);
|
|
1337
|
+
},
|
|
1338
|
+
message: TextEnum.pleaseInputInteger
|
|
1339
|
+
}],
|
|
1340
|
+
style: {
|
|
1341
|
+
flex: 1,
|
|
1342
|
+
marginBottom: 0,
|
|
1343
|
+
minWidth: 0
|
|
1344
|
+
}
|
|
1146
1345
|
}, /*#__PURE__*/_react["default"].createElement(_antd.InputNumber, {
|
|
1147
1346
|
min: 0,
|
|
1148
1347
|
precision: 0,
|
|
1149
1348
|
changeOnBlur: false,
|
|
1349
|
+
step: 1,
|
|
1350
|
+
style: {
|
|
1351
|
+
width: '100%'
|
|
1352
|
+
}
|
|
1353
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
1150
1354
|
style: {
|
|
1151
|
-
|
|
1355
|
+
whiteSpace: 'nowrap',
|
|
1356
|
+
flexShrink: 0
|
|
1152
1357
|
}
|
|
1153
|
-
}
|
|
1358
|
+
}, "\uFF08mm\uFF09"))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
1154
1359
|
wrapperCol: {
|
|
1155
1360
|
offset: 8,
|
|
1156
1361
|
span: 16
|
|
@@ -1158,14 +1363,14 @@ function _default(props) {
|
|
|
1158
1363
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
1159
1364
|
type: "primary",
|
|
1160
1365
|
htmlType: "submit"
|
|
1161
|
-
},
|
|
1366
|
+
}, TextEnum.executeSheetPrint))), /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
|
|
1162
1367
|
open: previewVisible,
|
|
1163
1368
|
title: TextEnum.preview,
|
|
1164
1369
|
onCancel: function onCancel() {
|
|
1165
1370
|
return setPreviewVisible(false);
|
|
1166
1371
|
},
|
|
1167
1372
|
onOk: handleGenerateSheets,
|
|
1168
|
-
okText:
|
|
1373
|
+
okText: TextEnum.ok,
|
|
1169
1374
|
cancelText: TextEnum.cancel,
|
|
1170
1375
|
width: map.getViewport().clientWidth - 80,
|
|
1171
1376
|
centered: true,
|
|
@@ -1179,18 +1384,23 @@ function _default(props) {
|
|
|
1179
1384
|
alignItems: 'center',
|
|
1180
1385
|
marginBottom: 12
|
|
1181
1386
|
}
|
|
1182
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null,
|
|
1387
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, TextEnum.widthText), /*#__PURE__*/_react["default"].createElement(_antd.InputNumber, {
|
|
1183
1388
|
min: 0.001,
|
|
1184
1389
|
precision: 3,
|
|
1185
1390
|
value: totalWidthMm,
|
|
1186
1391
|
onChange: handleWidthChange
|
|
1187
|
-
}), /*#__PURE__*/_react["default"].createElement("span", null, "mm"), /*#__PURE__*/_react["default"].createElement("
|
|
1392
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, "mm"), /*#__PURE__*/_react["default"].createElement("img", {
|
|
1393
|
+
src: _lock["default"],
|
|
1394
|
+
alt: TextEnum.fixedRatioText,
|
|
1188
1395
|
style: {
|
|
1189
|
-
|
|
1396
|
+
width: 16,
|
|
1397
|
+
height: 16,
|
|
1398
|
+
objectFit: 'contain'
|
|
1190
1399
|
}
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
|
|
1400
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, TextEnum.heightText), /*#__PURE__*/_react["default"].createElement(_antd.InputNumber, {
|
|
1401
|
+
precision: 0,
|
|
1402
|
+
step: 1,
|
|
1403
|
+
min: 0,
|
|
1194
1404
|
value: totalHeightMm,
|
|
1195
1405
|
onChange: handleHeightChange
|
|
1196
1406
|
}), /*#__PURE__*/_react["default"].createElement("span", null, "mm"), splitPlan && /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -1198,7 +1408,7 @@ function _default(props) {
|
|
|
1198
1408
|
marginLeft: 'auto',
|
|
1199
1409
|
color: '#666'
|
|
1200
1410
|
}
|
|
1201
|
-
}, splitPlan.cols, "
|
|
1411
|
+
}, splitPlan.cols, " ", TextEnum.colText, " x ", splitPlan.rows, " ", TextEnum.rowText, "\uFF0C", TextEnum.totalText, " ", splitPlan.totalSheets, " ", TextEnum.sheetText)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1202
1412
|
style: {
|
|
1203
1413
|
position: 'relative',
|
|
1204
1414
|
height: PREVIEW_HEIGHT,
|
|
@@ -1209,14 +1419,25 @@ function _default(props) {
|
|
|
1209
1419
|
}, !previewReady && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1210
1420
|
style: {
|
|
1211
1421
|
position: 'absolute',
|
|
1212
|
-
|
|
1422
|
+
left: 0,
|
|
1423
|
+
top: 0,
|
|
1424
|
+
right: 0,
|
|
1425
|
+
bottom: 0,
|
|
1213
1426
|
display: 'flex',
|
|
1427
|
+
flexDirection: 'column',
|
|
1214
1428
|
alignItems: 'center',
|
|
1215
1429
|
justifyContent: 'center',
|
|
1216
|
-
zIndex:
|
|
1217
|
-
background: 'rgba(255,255,255,0.
|
|
1430
|
+
zIndex: 10,
|
|
1431
|
+
background: 'rgba(255,255,255,0.82)',
|
|
1432
|
+
gap: 12,
|
|
1433
|
+
pointerEvents: 'none'
|
|
1434
|
+
}
|
|
1435
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Spin, null), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1436
|
+
style: {
|
|
1437
|
+
color: '#666',
|
|
1438
|
+
fontSize: 13
|
|
1218
1439
|
}
|
|
1219
|
-
},
|
|
1440
|
+
}, previewLoadingText)), metrics && previewFramePixels && splitPlan && selectedMapPixels && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1220
1441
|
style: {
|
|
1221
1442
|
position: 'relative',
|
|
1222
1443
|
width: previewFramePixels.width,
|
|
@@ -1237,7 +1458,11 @@ function _default(props) {
|
|
|
1237
1458
|
}, /*#__PURE__*/_react["default"].createElement(_olMap.Map, {
|
|
1238
1459
|
width: "".concat(Math.max(1, Math.round(selectedMapPixels.width)), "px"),
|
|
1239
1460
|
height: "".concat(Math.max(1, Math.round(selectedMapPixels.height)), "px"),
|
|
1240
|
-
|
|
1461
|
+
projection: inheritedMapProps.projection,
|
|
1462
|
+
mapStyle: inheritedMapProps.mapStyle,
|
|
1463
|
+
baseMapStyle: inheritedMapProps.baseMapStyle,
|
|
1464
|
+
dark: inheritedMapProps.dark,
|
|
1465
|
+
tk: inheritedMapProps.tk,
|
|
1241
1466
|
hidePopupTable: true,
|
|
1242
1467
|
createdMap: handlePreviewMapCreated
|
|
1243
1468
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -1320,12 +1545,12 @@ function _default(props) {
|
|
|
1320
1545
|
}, sheet.index));
|
|
1321
1546
|
})))), /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
|
|
1322
1547
|
open: sheetVisible,
|
|
1323
|
-
title:
|
|
1548
|
+
title: TextEnum.sheetResultText,
|
|
1324
1549
|
onCancel: function onCancel() {
|
|
1325
1550
|
return setSheetVisible(false);
|
|
1326
1551
|
},
|
|
1327
1552
|
onOk: handleExportPdf,
|
|
1328
|
-
okText:
|
|
1553
|
+
okText: TextEnum.printText,
|
|
1329
1554
|
cancelText: TextEnum.cancel,
|
|
1330
1555
|
width: map.getViewport().clientWidth - 80,
|
|
1331
1556
|
centered: true,
|
|
@@ -1342,7 +1567,7 @@ function _default(props) {
|
|
|
1342
1567
|
return item.id;
|
|
1343
1568
|
}) : []);
|
|
1344
1569
|
}
|
|
1345
|
-
},
|
|
1570
|
+
}, TextEnum.selectAllText)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1346
1571
|
style: {
|
|
1347
1572
|
display: 'grid',
|
|
1348
1573
|
gridTemplateColumns: 'repeat(auto-fill, minmax(240px, 1fr))',
|
|
@@ -1376,7 +1601,7 @@ function _default(props) {
|
|
|
1376
1601
|
});
|
|
1377
1602
|
});
|
|
1378
1603
|
}
|
|
1379
|
-
}), /*#__PURE__*/_react["default"].createElement("span", null, "
|
|
1604
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, TextEnum.sheetIndexPrefix, " ", item.index, " ", TextEnum.sheetText, " (", item.row, "-", item.col, ")")), /*#__PURE__*/_react["default"].createElement("img", {
|
|
1380
1605
|
src: item.url,
|
|
1381
1606
|
alt: "sheet-".concat(item.index),
|
|
1382
1607
|
style: {
|
|
@@ -1403,7 +1628,11 @@ function _default(props) {
|
|
|
1403
1628
|
}, /*#__PURE__*/_react["default"].createElement(_olMap.Map, {
|
|
1404
1629
|
width: "".concat(exportSize.width, "px"),
|
|
1405
1630
|
height: "".concat(exportSize.height, "px"),
|
|
1406
|
-
|
|
1631
|
+
projection: inheritedMapProps.projection,
|
|
1632
|
+
mapStyle: inheritedMapProps.mapStyle,
|
|
1633
|
+
baseMapStyle: inheritedMapProps.baseMapStyle,
|
|
1634
|
+
dark: inheritedMapProps.dark,
|
|
1635
|
+
tk: inheritedMapProps.tk,
|
|
1407
1636
|
hidePopupTable: true,
|
|
1408
1637
|
createdMap: handleExportMapCreated
|
|
1409
1638
|
}))));
|