123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- webpackJsonp([11],{
- /***/ 456:
- /***/ (function(module, exports, __webpack_require__) {
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(965)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- var __vue_script__ = __webpack_require__(967)
- /* template */
- var __vue_template__ = __webpack_require__(968)
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = "data-v-97cb6240"
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __vue_script__,
- __vue_template__,
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "resources/assets/js/main/components/docs/flow/index.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-97cb6240", Component.options)
- } else {
- hotAPI.reload("data-v-97cb6240", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- module.exports = Component.exports
- /***/ }),
- /***/ 965:
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(966);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("71cfe6dc", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../../../../../../node_modules/css-loader/index.js!../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-97cb6240\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./index.vue", function() {
- var newContent = require("!!../../../../../../../node_modules/css-loader/index.js!../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-97cb6240\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./index.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /***/ 966:
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.flow-content[data-v-97cb6240] {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.flow-content .flow-iframe[data-v-97cb6240] {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: 0 0;\n border: 0;\n float: none;\n margin: -1px 0 0;\n max-width: none;\n outline: 0;\n padding: 0;\n}\n.flow-content .flow-loading[data-v-97cb6240] {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.flow-content .zoom-box[data-v-97cb6240] {\n position: absolute;\n left: 20px;\n bottom: 20px;\n height: 34px;\n max-width: 50%;\n border-radius: 3px;\n -webkit-box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);\n background-color: #fff;\n color: #666;\n z-index: 10;\n padding: 0 6px;\n}\n.flow-content .zoom-box .zoom-svg[data-v-97cb6240] {\n height: 34px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.flow-content .zoom-box .zoom-svg .icon[data-v-97cb6240] {\n margin: 0 6px;\n}\n.flow-content .zoom-box .zoom-slider[data-v-97cb6240] {\n display: none;\n padding: 0 10px;\n width: 300px;\n max-width: 100%;\n}\n.flow-content .zoom-box:hover .zoom-svg[data-v-97cb6240], .flow-content .zoom-box.zoom-ing .zoom-svg[data-v-97cb6240] {\n display: none;\n}\n.flow-content .zoom-box:hover .zoom-slider[data-v-97cb6240], .flow-content .zoom-box.zoom-ing .zoom-slider[data-v-97cb6240] {\n display: inline-block;\n}\n", ""]);
- // exports
- /***/ }),
- /***/ 967:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jspdf__ = __webpack_require__(328);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jspdf___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jspdf__);
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ __webpack_exports__["default"] = ({
- name: "Flow",
- props: {
- value: {
- type: Object,
- default: function _default() {
- return {};
- }
- },
- readOnly: {
- type: Boolean,
- default: false
- }
- },
- data: function data() {
- return {
- loadIng: true,
- url: null,
- zoom: -1,
- zoomIng: false,
- bakData: ''
- };
- },
- created: function created() {
- this.url = window.location.origin + '/js/grapheditor/' + (this.readOnly ? 'viewer' : 'index') + '.html?lang=' + (this.getLanguage() === 'zh' ? 'zh' : 'en');
- },
- mounted: function mounted() {
- window.addEventListener('message', this.handleMessage);
- },
- beforeDestroy: function beforeDestroy() {
- window.removeEventListener('message', this.handleMessage);
- },
- watch: {
- value: {
- handler: function handler(val) {
- if (this.bakData == $A.jsonStringify(val)) {
- return;
- }
- this.bakData = $A.jsonStringify(val);
- this.updateContent();
- },
- deep: true
- },
- zoom: function zoom(val) {
- this.$refs.myFlow.contentWindow.postMessage({
- act: 'zoom',
- params: {
- zoom: val / 100
- }
- }, '*');
- }
- },
- methods: {
- formatZoom: function formatZoom(val) {
- return val + '%';
- },
- updateContent: function updateContent() {
- this.zoom = Math.max(1, (typeof this.value.scale === "number" ? this.value.scale : 1) * 100);
- this.$refs.myFlow.contentWindow.postMessage({
- act: 'setXml',
- params: Object.assign(this.value, typeof this.value.xml === "undefined" ? {
- xml: this.value.content
- } : {})
- }, '*');
- },
- handleMessage: function handleMessage(event) {
- var data = event.data;
- switch (data.act) {
- case 'ready':
- this.loadIng = false;
- this.updateContent();
- break;
- case 'change':
- this.bakData = $A.jsonStringify(data.params);
- this.$emit('input', data.params);
- break;
- case 'save':
- this.$emit('saveData');
- break;
- case 'imageContent':
- var pdf = new __WEBPACK_IMPORTED_MODULE_0_jspdf___default.a({
- format: [data.params.width, data.params.height]
- });
- pdf.addImage(data.params.content, 'PNG', 0, 0, 0, 0);
- pdf.save(data.params.name + ".pdf");
- break;
- }
- },
- exportPNG: function exportPNG(name) {
- var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
- this.$refs.myFlow.contentWindow.postMessage({
- act: 'exportPNG',
- params: {
- name: name || this.$L('无标题'),
- scale: scale,
- type: 'png'
- }
- }, '*');
- },
- exportPDF: function exportPDF(name) {
- var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
- this.$refs.myFlow.contentWindow.postMessage({
- act: 'exportPNG',
- params: {
- name: name || this.$L('无标题'),
- scale: scale,
- type: 'imageContent'
- }
- }, '*');
- }
- }
- });
- /***/ }),
- /***/ 968:
- /***/ (function(module, exports, __webpack_require__) {
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("div", { staticClass: "flow-content" }, [
- _c("iframe", {
- ref: "myFlow",
- staticClass: "flow-iframe",
- attrs: { src: _vm.url }
- }),
- _vm._v(" "),
- _vm.loadIng
- ? _c("div", { staticClass: "flow-loading" }, [_c("w-loading")], 1)
- : _vm._e(),
- _vm._v(" "),
- _vm.readOnly && _vm.zoom > 0
- ? _c(
- "div",
- { staticClass: "zoom-box", class: { "zoom-ing": _vm.zoomIng } },
- [
- _c("div", { staticClass: "zoom-svg" }, [
- _c(
- "svg",
- {
- staticClass: "icon",
- attrs: {
- t: "1600613502044",
- viewBox: "0 0 1024 1024",
- version: "1.1",
- xmlns: "http://www.w3.org/2000/svg",
- "p-id": "1161",
- width: "18",
- height: "18"
- }
- },
- [
- _c("path", {
- attrs: {
- d:
- "M598.646154 401.723077H279.630769c-15.753846 0-27.569231 11.815385-27.569231 31.507692 0 15.753846 11.815385 27.569231 31.507693 27.569231h319.015384c15.753846 0 27.569231-11.815385 27.569231-31.507692 0-15.753846-15.753846-27.569231-31.507692-27.569231z",
- fill: "#666666",
- "p-id": "1162"
- }
- }),
- _c("path", {
- attrs: {
- d:
- "M921.6 850.707692l-204.8-196.923077c47.261538-59.076923 78.769231-137.846154 78.769231-220.553846 0-196.923077-157.538462-354.461538-354.461539-354.461538s-354.461538 157.538462-354.461538 354.461538 157.538462 354.461538 354.461538 354.461539c90.584615 0 173.292308-35.446154 236.307693-90.584616l204.8 196.923077c3.938462 3.938462 11.815385 7.876923 19.692307 7.876923s15.753846-3.938462 19.692308-7.876923c11.815385-15.753846 11.815385-35.446154 0-43.323077z m-484.430769-126.030769c-161.476923 0-295.384615-133.907692-295.384616-295.384615S275.692308 133.907692 437.169231 133.907692s295.384615 133.907692 295.384615 295.384616-129.969231 295.384615-295.384615 295.384615z",
- fill: "#666666",
- "p-id": "1163"
- }
- })
- ]
- ),
- _vm._v(" "),
- _c(
- "svg",
- {
- staticClass: "icon",
- attrs: {
- t: "1600613514136",
- viewBox: "0 0 1024 1024",
- version: "1.1",
- xmlns: "http://www.w3.org/2000/svg",
- "p-id": "1403",
- width: "18",
- height: "18"
- }
- },
- [
- _c("path", {
- attrs: {
- d:
- "M929.476923 854.646154l-212.676923-200.861539c47.261538-59.076923 78.769231-137.846154 78.769231-220.553846 0-196.923077-157.538462-354.461538-354.461539-354.461538s-354.461538 157.538462-354.461538 354.461538 157.538462 354.461538 354.461538 354.461539c90.584615 0 173.292308-35.446154 236.307693-90.584616l212.676923 200.861539c3.938462 3.938462 11.815385 7.876923 19.692307 7.876923s15.753846-3.938462 19.692308-7.876923c11.815385-11.815385 11.815385-31.507692 0-43.323077z m-488.369231-126.030769c-161.476923 0-295.384615-133.907692-295.384615-295.384616s133.907692-295.384615 295.384615-295.384615 295.384615 133.907692 295.384616 295.384615-133.907692 295.384615-295.384616 295.384616z",
- fill: "#666666",
- "p-id": "1404"
- }
- }),
- _c("path", {
- attrs: {
- d:
- "M598.646154 401.723077h-129.969231V271.753846c0-15.753846-11.815385-31.507692-31.507692-31.507692s-31.507692 11.815385-31.507693 31.507692v129.969231H279.630769c-15.753846 0-31.507692 11.815385-31.507692 31.507692s11.815385 31.507692 31.507692 31.507693h129.969231V590.769231c0 15.753846 11.815385 31.507692 31.507692 31.507692s31.507692-11.815385 31.507693-31.507692v-129.969231h129.96923c15.753846 0 31.507692-11.815385 31.507693-31.507692s-15.753846-27.569231-35.446154-27.569231z",
- fill: "#666666",
- "p-id": "1405"
- }
- })
- ]
- )
- ]),
- _vm._v(" "),
- _c("Slider", {
- staticClass: "zoom-slider",
- attrs: { min: 1, max: 300, "tip-format": _vm.formatZoom },
- on: {
- "on-change": function($event) {
- _vm.zoomIng = false
- },
- "on-input": function($event) {
- _vm.zoomIng = true
- }
- },
- model: {
- value: _vm.zoom,
- callback: function($$v) {
- _vm.zoom = $$v
- },
- expression: "zoom"
- }
- })
- ],
- 1
- )
- : _vm._e()
- ])
- }
- var staticRenderFns = []
- render._withStripped = true
- module.exports = { render: render, staticRenderFns: staticRenderFns }
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-hot-reload-api") .rerender("data-v-97cb6240", module.exports)
- }
- }
- /***/ })
- });
|