fl-web-component 2.1.1-beta.6 → 2.1.1-beta.7
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/dist/fl-web-component.common.js +198 -185
- package/dist/fl-web-component.common.js.map +1 -1
- package/dist/fl-web-component.css +1 -1
- package/package.json +1 -1
- package/packages/components/com-flcanvas/components/entityFormatting.js +3 -1
- package/packages/components/com-flcanvas/index.vue +184 -170
|
@@ -202,6 +202,13 @@ module.exports =
|
|
|
202
202
|
/************************************************************************/
|
|
203
203
|
/******/ ({
|
|
204
204
|
|
|
205
|
+
/***/ "0289":
|
|
206
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
207
|
+
|
|
208
|
+
// extracted by mini-css-extract-plugin
|
|
209
|
+
|
|
210
|
+
/***/ }),
|
|
211
|
+
|
|
205
212
|
/***/ "03d6":
|
|
206
213
|
/***/ (function(module, exports, __webpack_require__) {
|
|
207
214
|
|
|
@@ -2387,6 +2394,17 @@ Circle.prototype._attrsAffectingSize = ['radius'];
|
|
|
2387
2394
|
(0, Global_1._registerNode)(Circle);
|
|
2388
2395
|
Factory_1.Factory.addGetterSetter(Circle, 'radius', 0, (0, Validators_1.getNumberValidator)());
|
|
2389
2396
|
|
|
2397
|
+
/***/ }),
|
|
2398
|
+
|
|
2399
|
+
/***/ "1f32":
|
|
2400
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2401
|
+
|
|
2402
|
+
"use strict";
|
|
2403
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_3b9c081b_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0289");
|
|
2404
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_3b9c081b_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_3b9c081b_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
2405
|
+
/* unused harmony reexport * */
|
|
2406
|
+
|
|
2407
|
+
|
|
2390
2408
|
/***/ }),
|
|
2391
2409
|
|
|
2392
2410
|
/***/ "2013":
|
|
@@ -4064,17 +4082,6 @@ exports.default = {
|
|
|
4064
4082
|
|
|
4065
4083
|
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAA/hJREFUeF7tmU1ME0EUgN8Q5UQTrnKCCxoTZEr4MZ64ElHgQhrEiAm/J0HFmwp6U6J4EoSEGAXREyBni9xsCV1KYkQP9gRXkuJFsE+nZZdtu+12Zqs72NmEkGZ+3nvfvPfmzQyBAv9IgdsPCoDygAInoEKgwB1AJUEVAioECpyACgEZHYDSxtIY/LhGikgjIFAEKGd6EoAIENAwBgthLfAyH7pL5wFVtL6VEJwBIKU2BkYAYcQpiLwBoLSOAgD7E/5iRUAByQ2uCUhsNLy+NsI1xtTZMQBKz5cjwRkEbBRVwvE4guPh9eCQyDyOADDjY+RXKAd35dJtoK/nj3cDTExOWY6zakeEtk0tsMAlKJFXxL9z3vrvcJigyspOwZUOH3g8JdwT3rv/0BjDjOvv647/fj45nQYhczvuFuF+haZpuzwKCAOg9AKNkYMQE8aMf/fmFXg8Hh7Z8b6LS8twb8QEoLcb+vt7jHnMEMzGxwFNTMHEi+kjmYiDYS34jEcJYQBVtK6LEDLDhA3fHoLODh+PXKPv4M1h8K+sJo0dsIDAFNU9w9J4AECEhU0t0MajSF4APBi9Cy2XmnnkGn3bfZ2w9fVb2thUCOYOaSt/1BgJhwIVPIq4DqC6piGjvlYQshgfnyccCnDZxNXZrKk5BJx4QFYApoSoy7ZKjGa9jh2ApoutsL2zkx4CFsbbQ0AtHAp6j1UIWCbBFOOZ28eTYIbdQTf4WCbB13Pz8HjsqbFo2bY6q90hqVhC6OI9G7ieA6LRKDQ1twH7zz6zkVYJL0s79w7A5LkOgCnh93+EwVt3jrygtztRCpuLHFNgMwhp7QKrLw0ApsijsScwO/eWJ38ZfRFj45va2r89DOVrG0wqcCxq/5yICK7+X/UAVuNn+1ouW1eOS0vL8UOQ1daYcT4ZAWQrcJghG+ufsgJiID6srML2zjZsbSVKZXboOl1ZCbW1NfHfxu7xPwKwc/2kU6SMABbf24SA4OFJByM9ALsVdNquAJgvUmQMAacrbDdeeYDsHmBXB9itcGp7at0gvQfY1QG8AFLrBgVA+hCwqQN4PSD10lV6D+A1kLe/AiBTCDh5GOFdeb1/0lWaG4VQvp7GRACw67N231XjyHyA6P2sBTWRuYSvxJiwKm+Dnxw+ixuPoyX8j6M8ikf39mB2dt58XyB0F6jLdATgDKXlxeRk3p/HcweCuz9x3/tF0yK5j0nu6QgAmyoBodivP5OLKsI7DhFX9mH/uhPjmUzHAHTFz9I6egJINa8hIv0PADdEYz5VXt4AiBgiwxgFQIZVcFMH5QFu0pdBtvIAGVbBTR2UB7hJXwbZygNkWAU3dVAe4CZ9GWQXvAf8Bn5sSl++Dyn0AAAAAElFTkSuQmCC"
|
|
4066
4084
|
|
|
4067
|
-
/***/ }),
|
|
4068
|
-
|
|
4069
|
-
/***/ "2f91":
|
|
4070
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4071
|
-
|
|
4072
|
-
"use strict";
|
|
4073
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_cb260cfc_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fcd8");
|
|
4074
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_cb260cfc_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_cb260cfc_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
4075
|
-
/* unused harmony reexport * */
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
4085
|
/***/ }),
|
|
4079
4086
|
|
|
4080
4087
|
/***/ "2f9a":
|
|
@@ -56518,7 +56525,7 @@ module.exports = document && document.documentElement;
|
|
|
56518
56525
|
/***/ "9224":
|
|
56519
56526
|
/***/ (function(module) {
|
|
56520
56527
|
|
|
56521
|
-
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.1.1-beta.
|
|
56528
|
+
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.1.1-beta.7\",\"scripts\":{\"postinstall\":\"patch-package\",\"tip1\":\"仅调试本组件不涉及业务组件,请执行dev\",\"dev\":\"vue-cli-service serve\",\"lint\":\"eslint \\\"{src,packages}/**/*.{vue,js}\\\" --fix\",\"prettier\":\"prettier --write \\\"packages/**/*.{js,css,less,scss,vue,html}\\\"\",\"=\":\"=============================================================\",\"tip2\":\"同时调试本组件与业务组件,请执行watch,生产模式监听请执行watch:prod\",\"watch\":\"vue-cli-service build --watch --mode development --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"watch:prod\":\"vue-cli-service build --watch --mode production --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build\":\"npm run lint && vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build:test\":\"vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"publish:base\":\"npm run build && npm publish --registry https://registry.npmjs.org/\",\"publish:beta:base\":\"npm run build && npm publish --tag beta --registry https://registry.npmjs.org/\",\"==\":\"=============================================================\",\"tip3\":\"发版注意: 【测试版执行publish:beta】【修改bug执行publish:fix】【新增功能执行publish:feat】【新特性执行publish:perf】\",\"publish:beta\":\"npm version prerelease --preid=beta && npm run publish:beta:base\",\"publish:fix\":\"npm version patch && npm run publish:base\",\"publish:feat\":\"npm version minor && npm run publish:base\",\"publish:perf\":\"npm version major && npm run publish:base\"},\"files\":[\"dist\",\"packages\",\"src\"],\"main\":\"dist/fl-web-component.common.js\",\"dependencies\":{\"camera-controls\":\"2.9.0\",\"core-js\":\"^3.42.0\",\"dxf-parser\":\"^1.1.2\",\"element-ui\":\"2.15.14\",\"fflate\":\"^0.8.2\",\"html2canvas\":\"^1.4.1\",\"jspdf\":\"^3.0.1\",\"konva\":\"^9.3.12\",\"lodash\":\"^4.17.21\",\"meshline\":\"^3.3.1\",\"regenerator-runtime\":\"^0.14.1\",\"svg-pan-zoom\":\"^3.6.2\",\"three\":\"^0.176.0\",\"three.path\":\"^1.0.1\",\"vue\":\"^2.6.11\"},\"devDependencies\":{\"@babel/core\":\"^7.12.16\",\"@babel/plugin-proposal-nullish-coalescing-operator\":\"^7.18.6\",\"@babel/plugin-proposal-optional-chaining\":\"^7.21.0\",\"@babel/preset-env\":\"^7.0.0\",\"@babel/runtime-corejs3\":\"^7.27.1\",\"@vue/cli-plugin-babel\":\"~4.4.0\",\"@vue/cli-plugin-eslint\":\"~4.4.0\",\"@vue/cli-service\":\"~4.4.0\",\"babel-eslint\":\"^10.1.0\",\"babel-loader\":\"^8.0.0\",\"copy-webpack-plugin\":\"^4.0.1\",\"eslint\":\"^6.7.2\",\"eslint-config-prettier\":\"^6.15.0\",\"eslint-plugin-prettier\":\"^3.4.1\",\"eslint-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"prettier\":\"^2.8.8\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\",\"worker-loader\":\"^3.0.8\"},\"browserslist\":[\"> 1%\",\"last 2 versions\"]}");
|
|
56522
56529
|
|
|
56523
56530
|
/***/ }),
|
|
56524
56531
|
|
|
@@ -78627,7 +78634,7 @@ if (typeof window !== 'undefined') {
|
|
|
78627
78634
|
// Indicate to webpack that this file can be concatenated
|
|
78628
78635
|
/* harmony default export */ var setPublicPath = (null);
|
|
78629
78636
|
|
|
78630
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
78637
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3309e7a4-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/index.vue?vue&type=template&id=7f8842df&scoped=true
|
|
78631
78638
|
var com_graphicsvue_type_template_id_7f8842df_scoped_true_render = function render() {
|
|
78632
78639
|
var _vm = this,
|
|
78633
78640
|
_c = _vm._self._c;
|
|
@@ -128804,8 +128811,8 @@ var component = normalizeComponent(
|
|
|
128804
128811
|
)
|
|
128805
128812
|
|
|
128806
128813
|
/* harmony default export */ var com_graphics = (component.exports);
|
|
128807
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
128808
|
-
var
|
|
128814
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3309e7a4-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-flcanvas/index.vue?vue&type=template&id=3b9c081b&scoped=true
|
|
128815
|
+
var com_flcanvasvue_type_template_id_3b9c081b_scoped_true_render = function render() {
|
|
128809
128816
|
var _vm = this,
|
|
128810
128817
|
_c = _vm._self._c;
|
|
128811
128818
|
return _c('div', {
|
|
@@ -128818,9 +128825,9 @@ var com_flcanvasvue_type_template_id_cb260cfc_scoped_true_render = function rend
|
|
|
128818
128825
|
}
|
|
128819
128826
|
});
|
|
128820
128827
|
};
|
|
128821
|
-
var
|
|
128828
|
+
var com_flcanvasvue_type_template_id_3b9c081b_scoped_true_staticRenderFns = [];
|
|
128822
128829
|
|
|
128823
|
-
// CONCATENATED MODULE: ./packages/components/com-flcanvas/index.vue?vue&type=template&id=
|
|
128830
|
+
// CONCATENATED MODULE: ./packages/components/com-flcanvas/index.vue?vue&type=template&id=3b9c081b&scoped=true
|
|
128824
128831
|
|
|
128825
128832
|
// EXTERNAL MODULE: ./node_modules/konva/lib/index.js
|
|
128826
128833
|
var lib = __webpack_require__("362d");
|
|
@@ -134039,6 +134046,9 @@ function drawArc(recordDxf, entity, group, key, configParams) {
|
|
|
134039
134046
|
var rgb = decimalToRGBHex(color);
|
|
134040
134047
|
var hex = rgb.hex;
|
|
134041
134048
|
var startAngle, endAngle;
|
|
134049
|
+
if (hex == '#FFFFFF') {
|
|
134050
|
+
hex = '#000';
|
|
134051
|
+
}
|
|
134042
134052
|
if (entity.type === 'CIRCLE') {
|
|
134043
134053
|
startAngle = entity.startAngle || 0;
|
|
134044
134054
|
endAngle = startAngle + 2 * Math.PI;
|
|
@@ -135337,6 +135347,7 @@ function downloadPDF(base64, fileName) {
|
|
|
135337
135347
|
var parser2 = new dxf_parser_DxfParser_DxfParser();
|
|
135338
135348
|
var dxf2 = parser2.parseSync(data);
|
|
135339
135349
|
var hatchEntitys = dxf2.entities;
|
|
135350
|
+
console.log(dxf2.entities);
|
|
135340
135351
|
// 处理HATCH部分
|
|
135341
135352
|
for (var i = 0; i < hatchEntitys.length; i++) {
|
|
135342
135353
|
var entity = hatchEntitys[i];
|
|
@@ -135621,175 +135632,184 @@ function downloadPDF(base64, fileName) {
|
|
|
135621
135632
|
toPdfs: function toPdfs(list) {
|
|
135622
135633
|
var _this4 = this;
|
|
135623
135634
|
var _this = this;
|
|
135624
|
-
|
|
135625
|
-
|
|
135626
|
-
|
|
135627
|
-
|
|
135628
|
-
var
|
|
135629
|
-
|
|
135630
|
-
|
|
135631
|
-
|
|
135632
|
-
|
|
135633
|
-
|
|
135634
|
-
|
|
135635
|
-
|
|
135636
|
-
|
|
135637
|
-
|
|
135638
|
-
|
|
135639
|
-
|
|
135640
|
-
|
|
135641
|
-
|
|
135642
|
-
|
|
135643
|
-
|
|
135644
|
-
|
|
135645
|
-
|
|
135646
|
-
|
|
135647
|
-
|
|
135648
|
-
|
|
135649
|
-
|
|
135650
|
-
|
|
135651
|
-
|
|
135652
|
-
|
|
135653
|
-
|
|
135654
|
-
|
|
135655
|
-
|
|
135656
|
-
|
|
135657
|
-
|
|
135658
|
-
|
|
135659
|
-
|
|
135660
|
-
|
|
135661
|
-
|
|
135662
|
-
|
|
135663
|
-
|
|
135664
|
-
|
|
135665
|
-
|
|
135666
|
-
|
|
135667
|
-
|
|
135668
|
-
|
|
135669
|
-
|
|
135670
|
-
|
|
135671
|
-
|
|
135672
|
-
|
|
135673
|
-
|
|
135674
|
-
|
|
135675
|
-
|
|
135635
|
+
return new Promise(function (resolve, reject) {
|
|
135636
|
+
var pdf = new jspdf_es_min["a" /* default */]('l', 'px', [_this4.konvaStage.width(), _this4.konvaStage.height()]);
|
|
135637
|
+
var exportPixelRatio = 2; // 可以 2/3/4 自己调
|
|
135638
|
+
var index = 0;
|
|
135639
|
+
for (var pageIdx = 0; pageIdx < list.length; pageIdx++) {
|
|
135640
|
+
var data = list[pageIdx];
|
|
135641
|
+
//先绘制图面
|
|
135642
|
+
_this4.konvaLayer.destroyChildren();
|
|
135643
|
+
var parser = new dxf_parser_dist();
|
|
135644
|
+
var dxf = parser.parse(data);
|
|
135645
|
+
if (dxf.entities.length > 0) {
|
|
135646
|
+
var entities = formatEntity(dxf.entities);
|
|
135647
|
+
var layers = dxf.tables.layer.layers;
|
|
135648
|
+
//先计算包围
|
|
135649
|
+
for (var key in entities) {
|
|
135650
|
+
if (entities[key]) {
|
|
135651
|
+
var group = [];
|
|
135652
|
+
var l = entities[key].length;
|
|
135653
|
+
var layerConfig = _this4.recordLayerConfig[key];
|
|
135654
|
+
var configParams = layerConfig && Object.keys(layerConfig).length > 0 ? layerConfig : null;
|
|
135655
|
+
for (var i = 0; i < l; i++) {
|
|
135656
|
+
var type = entities[key][i].type;
|
|
135657
|
+
handleFn(type, dxf, entities[key][i], group, key, configParams, _this4.konvaLayer, _this4.recordLayerConfig);
|
|
135658
|
+
}
|
|
135659
|
+
for (var _i6 = 0; _i6 < group.length; _i6++) {
|
|
135660
|
+
var entity = group[_i6];
|
|
135661
|
+
if (entity.type === 'line') {
|
|
135662
|
+
var x1 = entity.x1;
|
|
135663
|
+
var y1 = entity.y1;
|
|
135664
|
+
var x2 = entity.x2;
|
|
135665
|
+
var y2 = entity.y2;
|
|
135666
|
+
var v1 = {};
|
|
135667
|
+
v1.x = x1;
|
|
135668
|
+
v1.y = y1;
|
|
135669
|
+
var v2 = {};
|
|
135670
|
+
v2.x = x2;
|
|
135671
|
+
v2.y = y2;
|
|
135672
|
+
_this.updateBounds1(v1);
|
|
135673
|
+
_this.updateBounds1(v2);
|
|
135674
|
+
}
|
|
135675
|
+
if (entity.type === 'polyline') {
|
|
135676
|
+
var flag = false;
|
|
135677
|
+
var points = entity.points;
|
|
135678
|
+
var closed = entity.closed;
|
|
135679
|
+
for (var j = 0; j < points.length; j++) {
|
|
135680
|
+
var _index = j % 2;
|
|
135681
|
+
if (_index === 0) {
|
|
135682
|
+
var _x2 = points[j];
|
|
135683
|
+
var _y2 = points[j + 1];
|
|
135684
|
+
var point = {};
|
|
135685
|
+
point.x = _x2;
|
|
135686
|
+
point.y = _y2;
|
|
135687
|
+
_this.updateBounds1(point);
|
|
135688
|
+
}
|
|
135689
|
+
}
|
|
135676
135690
|
}
|
|
135677
135691
|
}
|
|
135678
135692
|
}
|
|
135679
135693
|
}
|
|
135680
|
-
|
|
135681
|
-
|
|
135682
|
-
|
|
135683
|
-
|
|
135684
|
-
|
|
135685
|
-
|
|
135686
|
-
|
|
135687
|
-
|
|
135688
|
-
|
|
135689
|
-
|
|
135690
|
-
|
|
135691
|
-
|
|
135692
|
-
|
|
135693
|
-
|
|
135694
|
-
|
|
135695
|
-
|
|
135696
|
-
|
|
135697
|
-
if (_entity4.type === 'text') {
|
|
135698
|
-
if (_this4.konvaLayer) _this4.konvaLayer.add(_entity4.obj);
|
|
135699
|
-
}
|
|
135700
|
-
}
|
|
135701
|
-
if (_group[0].stroke == undefined) {
|
|
135702
|
-
_group[0].stroke = '#000';
|
|
135703
|
-
}
|
|
135704
|
-
var customShape = new lib_default.a.Shape({
|
|
135705
|
-
x: 0,
|
|
135706
|
-
y: 0,
|
|
135707
|
-
strokeWidth: 0.2,
|
|
135708
|
-
name: _key.replace(/\s*/g, ''),
|
|
135709
|
-
entityId: _key,
|
|
135710
|
-
stroke: _group[0].stroke,
|
|
135711
|
-
customColor: _configParams2 ? _configParams2.color : '',
|
|
135712
|
-
//visible: configParams ? configParams.visible :true,
|
|
135713
|
-
sceneFunc: function sceneFunc(context, shape) {
|
|
135714
|
-
context.beginPath();
|
|
135715
|
-
for (var _i9 = 0; _i9 < _group.length; _i9++) {
|
|
135716
|
-
var _entity5 = _group[_i9];
|
|
135717
|
-
if (_entity5.type === 'line') {
|
|
135718
|
-
context.strokeStyle = _entity5.stroke;
|
|
135719
|
-
var _x3 = _entity5.x1;
|
|
135720
|
-
var _y3 = _entity5.y1;
|
|
135721
|
-
var _x4 = _entity5.x2;
|
|
135722
|
-
var _y4 = _entity5.y2;
|
|
135723
|
-
if (_x3 != undefined && _y3 != undefined && _x4 != undefined && _y4 != undefined) {
|
|
135724
|
-
context.moveTo(_x3, -parseFloat(_y3));
|
|
135725
|
-
context.lineTo(_x4, -parseFloat(_y4));
|
|
135726
|
-
}
|
|
135694
|
+
var _loop2 = function _loop2() {
|
|
135695
|
+
if (entities[_key]) {
|
|
135696
|
+
var _group = [];
|
|
135697
|
+
var _l = entities[_key].length;
|
|
135698
|
+
var _layerConfig2 = _this4.recordLayerConfig[_key];
|
|
135699
|
+
var _configParams2 = _layerConfig2 && Object.keys(_layerConfig2).length > 0 ? _layerConfig2 : null;
|
|
135700
|
+
for (var _i7 = 0; _i7 < _l; _i7++) {
|
|
135701
|
+
var _type = entities[_key][_i7].type;
|
|
135702
|
+
handleFn(_type, dxf, entities[_key][_i7], _group, _key, _configParams2, _this4.konvaLayer, _this4.recordLayerConfig);
|
|
135703
|
+
}
|
|
135704
|
+
if (!_this4.konvaLayer) return {
|
|
135705
|
+
v: void 0
|
|
135706
|
+
};
|
|
135707
|
+
for (var _i8 = 0; _i8 < _group.length; _i8++) {
|
|
135708
|
+
var _entity4 = _group[_i8];
|
|
135709
|
+
if (_entity4.type === 'text') {
|
|
135710
|
+
if (_this4.konvaLayer) _this4.konvaLayer.add(_entity4.obj);
|
|
135727
135711
|
}
|
|
135728
|
-
|
|
135729
|
-
|
|
135730
|
-
|
|
135731
|
-
|
|
135732
|
-
|
|
135733
|
-
|
|
135734
|
-
|
|
135735
|
-
|
|
135736
|
-
|
|
135737
|
-
|
|
135738
|
-
|
|
135739
|
-
|
|
135740
|
-
|
|
135741
|
-
|
|
135712
|
+
}
|
|
135713
|
+
if (_group[0].stroke == undefined) {
|
|
135714
|
+
_group[0].stroke = '#000';
|
|
135715
|
+
}
|
|
135716
|
+
var customShape = new lib_default.a.Shape({
|
|
135717
|
+
x: 0,
|
|
135718
|
+
y: 0,
|
|
135719
|
+
strokeWidth: 0.2,
|
|
135720
|
+
name: _key.replace(/\s*/g, ''),
|
|
135721
|
+
entityId: _key,
|
|
135722
|
+
stroke: _group[0].stroke,
|
|
135723
|
+
customColor: _configParams2 ? _configParams2.color : '',
|
|
135724
|
+
//visible: configParams ? configParams.visible :true,
|
|
135725
|
+
sceneFunc: function sceneFunc(context, shape) {
|
|
135726
|
+
context.beginPath();
|
|
135727
|
+
for (var _i9 = 0; _i9 < _group.length; _i9++) {
|
|
135728
|
+
var _entity5 = _group[_i9];
|
|
135729
|
+
if (_entity5.type === 'line') {
|
|
135730
|
+
context.strokeStyle = _entity5.stroke;
|
|
135731
|
+
var _x3 = _entity5.x1;
|
|
135732
|
+
var _y3 = _entity5.y1;
|
|
135733
|
+
var _x4 = _entity5.x2;
|
|
135734
|
+
var _y4 = _entity5.y2;
|
|
135735
|
+
if (_x3 != undefined && _y3 != undefined && _x4 != undefined && _y4 != undefined) {
|
|
135736
|
+
context.moveTo(_x3, -parseFloat(_y3));
|
|
135737
|
+
context.lineTo(_x4, -parseFloat(_y4));
|
|
135742
135738
|
}
|
|
135743
135739
|
}
|
|
135744
|
-
if (
|
|
135745
|
-
|
|
135746
|
-
|
|
135740
|
+
if (_entity5.type === 'polyline') {
|
|
135741
|
+
context.strokeStyle = _entity5.stroke;
|
|
135742
|
+
var _flag = false;
|
|
135743
|
+
var _points = _entity5.points;
|
|
135744
|
+
var _closed = _entity5.closed;
|
|
135745
|
+
for (var _j2 = 0; _j2 < _points.length; _j2++) {
|
|
135746
|
+
var _index2 = _j2 % 2;
|
|
135747
|
+
if (_index2 === 0) {
|
|
135748
|
+
var _x5 = _points[_j2];
|
|
135749
|
+
var _y5 = _points[_j2 + 1];
|
|
135750
|
+
if (_j2 === 0) {
|
|
135751
|
+
context.moveTo(_x5, _y5);
|
|
135752
|
+
} else {
|
|
135753
|
+
context.lineTo(_x5, _y5);
|
|
135754
|
+
}
|
|
135755
|
+
}
|
|
135756
|
+
if (_closed) {
|
|
135757
|
+
if (_j2 === _points.length - 1) {
|
|
135758
|
+
context.lineTo(_points[0], _points[1]);
|
|
135759
|
+
}
|
|
135760
|
+
}
|
|
135747
135761
|
}
|
|
135748
135762
|
}
|
|
135749
135763
|
}
|
|
135764
|
+
// context.closePath();
|
|
135765
|
+
context.fillStrokeShape(shape);
|
|
135750
135766
|
}
|
|
135751
|
-
}
|
|
135752
|
-
|
|
135753
|
-
context.fillStrokeShape(shape);
|
|
135767
|
+
});
|
|
135768
|
+
if (_this4.konvaLayer) _this4.konvaLayer.add(customShape);
|
|
135754
135769
|
}
|
|
135755
|
-
}
|
|
135756
|
-
|
|
135770
|
+
},
|
|
135771
|
+
_ret2;
|
|
135772
|
+
for (var _key in entities) {
|
|
135773
|
+
_ret2 = _loop2();
|
|
135774
|
+
if (_ret2) return _ret2.v;
|
|
135757
135775
|
}
|
|
135758
|
-
|
|
135759
|
-
|
|
135760
|
-
|
|
135761
|
-
|
|
135762
|
-
|
|
135763
|
-
|
|
135764
|
-
|
|
135765
|
-
|
|
135766
|
-
|
|
135767
|
-
|
|
135768
|
-
|
|
135769
|
-
|
|
135770
|
-
|
|
135771
|
-
|
|
135772
|
-
|
|
135773
|
-
|
|
135774
|
-
this.konvaStage.scale({
|
|
135775
|
-
x: scale,
|
|
135776
|
-
y: scale
|
|
135777
|
-
});
|
|
135778
|
-
this.konvaStage.batchDraw();
|
|
135779
|
-
//添加成功移动视口位置
|
|
135776
|
+
var _this4$calculateScale = _this4.calculateScaleAndPosition(_this.bounds1, _this4.konvaStage.width(), _this4.konvaStage.height(), 0.05 // 5% 边距
|
|
135777
|
+
),
|
|
135778
|
+
scale = _this4$calculateScale.scale,
|
|
135779
|
+
x = _this4$calculateScale.x,
|
|
135780
|
+
y = _this4$calculateScale.y;
|
|
135781
|
+
_this.bounds1 = null;
|
|
135782
|
+
_this4.konvaStage.position({
|
|
135783
|
+
x: x,
|
|
135784
|
+
y: y
|
|
135785
|
+
});
|
|
135786
|
+
_this4.konvaStage.scale({
|
|
135787
|
+
x: scale,
|
|
135788
|
+
y: scale
|
|
135789
|
+
});
|
|
135790
|
+
_this4.konvaStage.batchDraw();
|
|
135791
|
+
//添加成功移动视口位置 pageIdx === 0
|
|
135780
135792
|
|
|
135781
|
-
|
|
135782
|
-
|
|
135783
|
-
|
|
135784
|
-
|
|
135793
|
+
if (index === 0) {
|
|
135794
|
+
pdf.addImage(_this4.konvaStage.toDataURL({
|
|
135795
|
+
pixelRatio: 2
|
|
135796
|
+
}), 0, 0, _this4.konvaStage.width(), _this4.konvaStage.height());
|
|
135797
|
+
} else {
|
|
135798
|
+
pdf.addPage();
|
|
135799
|
+
pdf.addImage(_this4.konvaStage.toDataURL({
|
|
135800
|
+
pixelRatio: 2
|
|
135801
|
+
}), 0, 0, _this4.konvaStage.width(), _this4.konvaStage.height());
|
|
135802
|
+
}
|
|
135803
|
+
index++;
|
|
135804
|
+
}
|
|
135805
|
+
}
|
|
135806
|
+
if (index > 0) {
|
|
135807
|
+
pdf.save('批量导出.pdf');
|
|
135808
|
+
resolve();
|
|
135785
135809
|
} else {
|
|
135786
|
-
|
|
135787
|
-
pdf.addImage(this.konvaStage.toDataURL({
|
|
135788
|
-
pixelRatio: 2
|
|
135789
|
-
}), 0, 0, this.konvaStage.width(), this.konvaStage.height());
|
|
135810
|
+
reject('解析数据为空, 请检查数据再进行下载');
|
|
135790
135811
|
}
|
|
135791
|
-
}
|
|
135792
|
-
pdf.save('批量导出.pdf');
|
|
135812
|
+
});
|
|
135793
135813
|
|
|
135794
135814
|
// var imgData = canvas.toDataURL('image/png');
|
|
135795
135815
|
//doc.text("Hello world!", 10, 10);
|
|
@@ -135845,8 +135865,8 @@ function downloadPDF(base64, fileName) {
|
|
|
135845
135865
|
});
|
|
135846
135866
|
// CONCATENATED MODULE: ./packages/components/com-flcanvas/index.vue?vue&type=script&lang=js
|
|
135847
135867
|
/* harmony default export */ var components_com_flcanvasvue_type_script_lang_js = (com_flcanvasvue_type_script_lang_js);
|
|
135848
|
-
// EXTERNAL MODULE: ./packages/components/com-flcanvas/index.vue?vue&type=style&index=0&id=
|
|
135849
|
-
var
|
|
135868
|
+
// EXTERNAL MODULE: ./packages/components/com-flcanvas/index.vue?vue&type=style&index=0&id=3b9c081b&prod&lang=scss&scoped=true
|
|
135869
|
+
var com_flcanvasvue_type_style_index_0_id_3b9c081b_prod_lang_scss_scoped_true = __webpack_require__("1f32");
|
|
135850
135870
|
|
|
135851
135871
|
// CONCATENATED MODULE: ./packages/components/com-flcanvas/index.vue
|
|
135852
135872
|
|
|
@@ -135859,17 +135879,17 @@ var com_flcanvasvue_type_style_index_0_id_cb260cfc_prod_lang_scss_scoped_true =
|
|
|
135859
135879
|
|
|
135860
135880
|
var com_flcanvas_component = normalizeComponent(
|
|
135861
135881
|
components_com_flcanvasvue_type_script_lang_js,
|
|
135862
|
-
|
|
135863
|
-
|
|
135882
|
+
com_flcanvasvue_type_template_id_3b9c081b_scoped_true_render,
|
|
135883
|
+
com_flcanvasvue_type_template_id_3b9c081b_scoped_true_staticRenderFns,
|
|
135864
135884
|
false,
|
|
135865
135885
|
null,
|
|
135866
|
-
"
|
|
135886
|
+
"3b9c081b",
|
|
135867
135887
|
null
|
|
135868
135888
|
|
|
135869
135889
|
)
|
|
135870
135890
|
|
|
135871
135891
|
/* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
|
|
135872
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
135892
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3309e7a4-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/per-control.vue?vue&type=template&id=f547d5c6&scoped=true
|
|
135873
135893
|
var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
|
|
135874
135894
|
var _vm = this,
|
|
135875
135895
|
_c = _vm._self._c;
|
|
@@ -135977,7 +135997,7 @@ var per_control_component = normalizeComponent(
|
|
|
135977
135997
|
)
|
|
135978
135998
|
|
|
135979
135999
|
/* harmony default export */ var per_control = (per_control_component.exports);
|
|
135980
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
136000
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3309e7a4-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/pid.vue?vue&type=template&id=2572c0e2&scoped=true
|
|
135981
136001
|
var pidvue_type_template_id_2572c0e2_scoped_true_render = function render() {
|
|
135982
136002
|
var _vm = this,
|
|
135983
136003
|
_c = _vm._self._c;
|
|
@@ -136024,7 +136044,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
|
|
|
136024
136044
|
var html2canvas = __webpack_require__("c0e9");
|
|
136025
136045
|
var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
|
|
136026
136046
|
|
|
136027
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
136047
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3309e7a4-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/component/ann-tool.vue?vue&type=template&id=4b17bce0&scoped=true
|
|
136028
136048
|
var ann_toolvue_type_template_id_4b17bce0_scoped_true_render = function render() {
|
|
136029
136049
|
var _vm = this,
|
|
136030
136050
|
_c = _vm._self._c;
|
|
@@ -137056,13 +137076,6 @@ exports.f = __webpack_require__("cc15");
|
|
|
137056
137076
|
|
|
137057
137077
|
/***/ }),
|
|
137058
137078
|
|
|
137059
|
-
/***/ "fcd8":
|
|
137060
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
137061
|
-
|
|
137062
|
-
// extracted by mini-css-extract-plugin
|
|
137063
|
-
|
|
137064
|
-
/***/ }),
|
|
137065
|
-
|
|
137066
137079
|
/***/ "fce6":
|
|
137067
137080
|
/***/ (function(module, exports, __webpack_require__) {
|
|
137068
137081
|
|