ecinc-cloud-wappaio 9.0.0

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.
@@ -0,0 +1,809 @@
1
+ ((typeof self !== 'undefined' ? self : this)["webpackJsonpecwappnowf"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpecwappnowf"] || []).push([[2],{
2
+
3
+ /***/ "5a17":
4
+ /***/ (function(module, exports, __webpack_require__) {
5
+
6
+ // style-loader: Adds some css to the DOM by adding a <style> tag
7
+
8
+ // load the styles
9
+ var content = __webpack_require__("faf8");
10
+ if(content.__esModule) content = content.default;
11
+ if(typeof content === 'string') content = [[module.i, content, '']];
12
+ if(content.locals) module.exports = content.locals;
13
+ // add the styles to the DOM
14
+ var add = __webpack_require__("499e").default
15
+ var update = add("a3fb204e", content, true, {"sourceMap":false,"shadowMode":false});
16
+
17
+ /***/ }),
18
+
19
+ /***/ "97ad":
20
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
21
+
22
+ "use strict";
23
+ /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Grid24colPageModule_vue_vue_type_style_index_0_id_5afff5f3_prod_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5a17");
24
+ /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Grid24colPageModule_vue_vue_type_style_index_0_id_5afff5f3_prod_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Grid24colPageModule_vue_vue_type_style_index_0_id_5afff5f3_prod_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
25
+ /* unused harmony reexport * */
26
+
27
+
28
+ /***/ }),
29
+
30
+ /***/ "c9b6":
31
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
32
+
33
+ "use strict";
34
+ __webpack_require__.r(__webpack_exports__);
35
+
36
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"921eb748-vue-loader-template"}!./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/ecwplus/PortalPageDesigner/src/components/Grid24colPageModule.vue?vue&type=template&id=5afff5f3&scoped=true&
37
+ var render = function render() {
38
+ var _vm = this,
39
+ _c = _vm._self._c;
40
+ return _vm.grids.length > 0 ? _c('grid-layout', {
41
+ ref: "gridLayout",
42
+ attrs: {
43
+ "id": _vm.gridLayoutId,
44
+ "layout": _vm.grids,
45
+ "col-num": _vm.colNum,
46
+ "row-height": _vm.layoutHeight,
47
+ "is-draggable": _vm.isDraggable,
48
+ "is-resizable": _vm.isResizable,
49
+ "is-mirrored": _vm.isMirrored,
50
+ "vertical-compact": _vm.verticalCompact,
51
+ "margin": _vm.margin,
52
+ "use-css-transforms": _vm.useCssTransforms
53
+ },
54
+ on: {
55
+ "update:layout": function updateLayout($event) {
56
+ _vm.grids = $event;
57
+ },
58
+ "layout-updated": _vm.layoutUpdatedEvent,
59
+ "layout-created": _vm.layoutCreatedEvent,
60
+ "layout-before-mount": _vm.layoutBeforeMountEvent,
61
+ "layout-mounted": _vm.layoutMountedEvent,
62
+ "layout-ready": _vm.layoutReadyEvent
63
+ }
64
+ }, [_vm._l(_vm.grids, function (item, index) {
65
+ return _c('grid-item', {
66
+ key: item.i,
67
+ staticStyle: {
68
+ "transition": "none"
69
+ },
70
+ attrs: {
71
+ "x": item.x,
72
+ "y": item.y,
73
+ "w": item.w,
74
+ "h": item.h,
75
+ "i": item.i,
76
+ "max-w": _vm.maxW,
77
+ "min-w": _vm.minW,
78
+ "min-h": _vm.minH,
79
+ "max-h": _vm.maxH
80
+ },
81
+ on: {
82
+ "move": _vm.moveEvent,
83
+ "moved": _vm.movedEvent,
84
+ "resize": _vm.resizeEvent,
85
+ "resized": _vm.resizedEvent
86
+ }
87
+ }, [!item.addItemStatus ? _c('div', {
88
+ staticClass: "content-item",
89
+ on: {
90
+ "mouseenter": function mouseenter($event) {
91
+ return _vm.hoverEnter($event, item.addItemStatus);
92
+ },
93
+ "mouseleave": _vm.hoverOut
94
+ }
95
+ }, [item.gridster && item.gridster.gridsterModule ? _c('PortletModule', {
96
+ attrs: {
97
+ "applets": _vm.applets,
98
+ "appdata": item,
99
+ "layout-height": _vm.layoutHeight
100
+ }
101
+ }) : _c('Portlet', {
102
+ attrs: {
103
+ "appdata": item,
104
+ "layout-height": _vm.layoutHeight
105
+ }
106
+ }), _c('div', {
107
+ staticClass: "setting"
108
+ }, [item.code !== 'blank' && _vm.setShow(item) ? _c('img', {
109
+ attrs: {
110
+ "src": _vm.dataType,
111
+ "alt": "",
112
+ "title": "编辑样式"
113
+ },
114
+ on: {
115
+ "click": function click($event) {
116
+ return _vm.editPortletStyle(index);
117
+ }
118
+ }
119
+ }) : item.code !== 'blank' && item.canRepeat ? _c('img', {
120
+ attrs: {
121
+ "src": _vm.dataType,
122
+ "alt": "",
123
+ "title": "设置数据类别"
124
+ },
125
+ on: {
126
+ "click": function click($event) {
127
+ return _vm.setRepeatDataType(index);
128
+ }
129
+ }
130
+ }) : _vm._e(), item.code !== 'blank' ? _c('img', {
131
+ attrs: {
132
+ "src": _vm.setting,
133
+ "alt": "",
134
+ "title": "修改组件"
135
+ },
136
+ on: {
137
+ "click": function click($event) {
138
+ return _vm.editPortlet(index);
139
+ }
140
+ }
141
+ }) : _vm._e(), item.code !== 'blank' ? _c('img', {
142
+ attrs: {
143
+ "src": _vm.del,
144
+ "alt": "",
145
+ "title": "删除组件"
146
+ },
147
+ on: {
148
+ "click": function click($event) {
149
+ return _vm.deleteById(index);
150
+ }
151
+ }
152
+ }) : _vm._e()])], 1) : _c('div', {
153
+ staticClass: "content-item"
154
+ })]);
155
+ }), _vm.showLayer ? _c('div', {
156
+ staticClass: "layer-content",
157
+ on: {
158
+ "click": function click($event) {
159
+ _vm.showLayer = false;
160
+ }
161
+ }
162
+ }) : _vm._e()], 2) : _vm._e();
163
+ };
164
+ var staticRenderFns = [];
165
+
166
+ // CONCATENATED MODULE: ./packages/ecwplus/PortalPageDesigner/src/components/Grid24colPageModule.vue?vue&type=template&id=5afff5f3&scoped=true&
167
+
168
+ // EXTERNAL MODULE: ./src/global/utils/index.js
169
+ var utils = __webpack_require__("bee9");
170
+
171
+ // EXTERNAL MODULE: ./packages/ecwplus/PortalPageDesigner/src/Portlet.vue + 9 modules
172
+ var Portlet = __webpack_require__("9521");
173
+
174
+ // EXTERNAL MODULE: ./packages/ecwplus/PortalPageDesigner/src/components/PortletModule.vue + 4 modules
175
+ var PortletModule = __webpack_require__("2a27");
176
+
177
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/ecwplus/PortalPageDesigner/src/components/Grid24colPageModule.vue?vue&type=script&lang=js&
178
+
179
+ var VueGridLayout = __webpack_require__("7be8");
180
+ var GridLayout = VueGridLayout.GridLayout;
181
+ var GridItem = VueGridLayout.GridItem;
182
+
183
+
184
+ /* harmony default export */ var Grid24colPageModulevue_type_script_lang_js_ = ({
185
+ // import引入的组件需要注入到对象中才能使用
186
+ components: {
187
+ GridLayout: GridLayout,
188
+ GridItem: GridItem,
189
+ Portlet: Portlet["a" /* default */],
190
+ PortletModule: PortletModule["a" /* default */]
191
+ },
192
+ props: {
193
+ gridLayoutId: {
194
+ type: String,
195
+ default: function _default() {
196
+ return 'gridLayout';
197
+ }
198
+ },
199
+ isModule: {
200
+ type: Boolean,
201
+ default: function _default() {
202
+ return false;
203
+ }
204
+ },
205
+ // 是否组件容器
206
+ moduleName: {
207
+ type: String,
208
+ default: function _default() {
209
+ return '';
210
+ }
211
+ },
212
+ // 组件容器名称
213
+ applets: {
214
+ type: Object,
215
+ default: function _default() {
216
+ return [];
217
+ }
218
+ },
219
+ // 网格初始化布局
220
+ colNum: {
221
+ type: Number,
222
+ default: function _default() {
223
+ return 24;
224
+ }
225
+ },
226
+ // 行高
227
+ minW: {
228
+ type: Number,
229
+ default: function _default() {
230
+ return 1;
231
+ }
232
+ },
233
+ // 最小宽度
234
+ maxH: {
235
+ type: Number,
236
+ default: function _default() {
237
+ return 1000;
238
+ }
239
+ },
240
+ // 最大行数
241
+ minH: {
242
+ type: Number,
243
+ default: function _default() {
244
+ return 2;
245
+ }
246
+ },
247
+ // 最小行数
248
+ layoutHeight: {
249
+ type: Number,
250
+ default: function _default() {
251
+ return 50;
252
+ }
253
+ },
254
+ // 行高
255
+ isDraggable: {
256
+ type: Boolean,
257
+ default: function _default() {
258
+ return true;
259
+ }
260
+ },
261
+ // 表示网格项数是否可以拖动
262
+ isResizable: {
263
+ type: Boolean,
264
+ default: function _default() {
265
+ return true;
266
+ }
267
+ },
268
+ // 表示网格是否可以改变带大小
269
+ isMirrored: {
270
+ type: Boolean,
271
+ default: function _default() {
272
+ return false;
273
+ }
274
+ },
275
+ // RTL/LTR 的转换 Boolean
276
+ verticalCompact: {
277
+ type: Boolean,
278
+ default: function _default() {
279
+ return true;
280
+ }
281
+ },
282
+ // 垂直方向上 是否应该紧凑布局
283
+ margin: {
284
+ type: Object,
285
+ default: function _default() {
286
+ return [10, 10];
287
+ }
288
+ },
289
+ // 网格之间的边距 两个数字组成的数组 第一个数字为水品距离 第二个为垂直距离
290
+ useCssTransforms: {
291
+ type: Boolean,
292
+ default: function _default() {
293
+ return true;
294
+ }
295
+ },
296
+ // 垂直方向上 是否应该紧凑布局
297
+ showLayer: {
298
+ type: Boolean,
299
+ default: function _default() {
300
+ return false;
301
+ }
302
+ },
303
+ canDelete: {
304
+ type: Boolean,
305
+ default: function _default() {
306
+ return true;
307
+ }
308
+ },
309
+ layoutType: {
310
+ type: String,
311
+ default: function _default() {
312
+ return 'dataElement';
313
+ }
314
+ }
315
+ },
316
+ data: function data() {
317
+ return {
318
+ del: './images/w-imgs/portal/del2.png',
319
+ setting: './images/w-imgs/portal/setting2.png',
320
+ dataType: './images/w-imgs/portal/dataType.png',
321
+ position: {
322
+ x: 0,
323
+ y: 0
324
+ },
325
+ maxW: 24,
326
+ // 最大宽度
327
+ // applets: [],
328
+ layoutData: [],
329
+ grids: [],
330
+ appletsCustom: null,
331
+ compPanel: {},
332
+ CustomTip: {},
333
+ defaultColSpan: 6,
334
+ defaultRowSpan: 3
335
+ };
336
+ },
337
+ computed: {},
338
+ watch: {
339
+ layoutData: function layoutData(val) {
340
+ if (this.layoutType === 'topElement') {
341
+ this.$vnode.context.topElements = val;
342
+ } else {
343
+ console.log(val);
344
+ this.$bus.emit('setApplets', val);
345
+ }
346
+ }
347
+ },
348
+ // 生命周期 - 创建完成(可以访问当前this实例)
349
+ created: function created() {
350
+ var _this = this;
351
+ // 获取页面组件
352
+ // if (this.applets.length === 0) {
353
+ // this.applets.push({ 'axisX': 0, 'axisY': 0, 'code': 'blank', 'icon': 'news', 'name': '空组件栏', 'rowSpan': this.defaultRowSpan, 'colSpan': this.defaultColSpan })
354
+ // }
355
+ this.maxW = this.colNum;
356
+ this.applets.forEach(function (item, index) {
357
+ if (!item.x) _this.$set(item, 'x', item.axisX);
358
+ if (!item.y) _this.$set(item, 'y', item.axisY);
359
+ if (item.colSpan < _this.minW) _this.$set(item, 'colSpan', _this.minW);
360
+ if (item.rowSpan < _this.minH) _this.$set(item, 'rowSpan', _this.minH);
361
+ if (!item.w) _this.$set(item, 'w', item.colSpan === null || item.colSpan === undefined ? _this.defaultColSpan : item.colSpan);
362
+ if (!item.h) _this.$set(item, 'h', item.rowSpan === null || item.rowSpan === undefined ? _this.defaultRowSpan : item.rowSpan);
363
+ if (!item.i) _this.$set(item, 'i', index);
364
+ });
365
+ this.layoutData = this.applets;
366
+ this.layoutData.forEach(function (item) {
367
+ item.gridster = item.repeatDataType && item.repeatDataType.indexOf('{') > -1 ? JSON.parse(item.repeatDataType) : {};
368
+ });
369
+ this.grids = this.isModule ? this.layoutData.filter(function (node) {
370
+ return node.gridster.parentGridster === _this.moduleName;
371
+ }) : this.layoutData.filter(function (node) {
372
+ return !node.gridster.parentGridster || node.gridster.parentGridster === 'gridster';
373
+ });
374
+ if (this.grids.length === 0) {
375
+ this.grids.push({
376
+ 'axisX': 0,
377
+ 'axisY': 0,
378
+ 'code': 'blank',
379
+ 'icon': 'news',
380
+ 'name': '空组件栏',
381
+ 'rowSpan': this.defaultRowSpan,
382
+ 'colSpan': this.defaultColSpan
383
+ });
384
+ this.grids.forEach(function (item, index) {
385
+ _this.$set(item, 'x', item.axisX);
386
+ _this.$set(item, 'y', item.axisY);
387
+ if (item.colSpan < _this.minW) _this.$set(item, 'colSpan', _this.minW);
388
+ if (item.rowSpan < _this.minH) _this.$set(item, 'rowSpan', _this.minH);
389
+ _this.$set(item, 'w', item.colSpan === null || item.colSpan === undefined ? _this.defaultColSpan : item.colSpan);
390
+ _this.$set(item, 'h', item.rowSpan === null || item.rowSpan === undefined ? _this.defaultRowSpan : item.rowSpan);
391
+ _this.$set(item, 'i', index);
392
+ });
393
+ }
394
+ // 获取页面设置弹窗
395
+ this.$bus.emit('getCompPanel', this);
396
+ this.$bus.on('onDraggableStart' + this.moduleName, this.startDrag);
397
+ },
398
+ beforeDestroy: function beforeDestroy() {
399
+ this.$bus.off('onDraggableStart' + this.moduleName, this.startDrag);
400
+ this.$bus.$emit('showNavSearch', true);
401
+ },
402
+ mounted: function mounted() {
403
+ var _this2 = this;
404
+ if (this.$vnode.context.portalPage) {
405
+ setTimeout(function () {
406
+ if (_this2.$vnode.context.portalPage.pageTemplate === 'channel12col') {
407
+ _this2.$bus.emit('showNavSearch', false);
408
+ document.querySelector('.tags-view-container').style.borderBottom = '1px solid #ececec';
409
+ document.querySelector('.navbar').style.marginLeft = '0px';
410
+ document.querySelector('.navbar').style.marginRight = '0px';
411
+ document.querySelector('.navbar').style.paddingLeft = '10px';
412
+ } else if (_this2.$vnode.context.portalPage.topbarType === 'self') {
413
+ _this2.$bus.emit('setTopbarHeight');
414
+ } else if (_this2.$vnode.context.portalPage.topbarType === 'mini') {
415
+ _this2.$bus.emit('setTopbarHeight', 62);
416
+ }
417
+ }, 0);
418
+ }
419
+ },
420
+ methods: {
421
+ setShow: function setShow(portletVo) {
422
+ // 识别组件
423
+ if (portletVo.repeatType === 'advertise') {
424
+ // 轮播图
425
+ return true;
426
+ } else if (portletVo.repeatType === 'articleBlockList') {
427
+ // 文章列表
428
+ return true;
429
+ } else if (portletVo.repeatType === 'videoList') {
430
+ // 视频
431
+ return true;
432
+ } else if (portletVo.repeatType === 'imageList') {
433
+ // 图册
434
+ return true;
435
+ } else if (portletVo.code === 'gridsterModule') {
436
+ // 组件容器
437
+ return true;
438
+ } else {
439
+ return false;
440
+ }
441
+ },
442
+ startDrag: function startDrag(evt) {
443
+ var _this3 = this;
444
+ var dataType = evt.item.getAttribute('data-type') || 'dataElement';
445
+ if (this.layoutType !== dataType) {
446
+ return;
447
+ }
448
+ var self = this;
449
+ if (this.layoutType === 'topElement') {
450
+ if (this.compPanel) {
451
+ this.appletsCustom = this.compPanel.pageElements;
452
+ }
453
+ } else {
454
+ // 个性化弹窗
455
+ this.appletsCustom = this.compPanel.portlets;
456
+ }
457
+ this.CustomTip = this.compPanel.$refs.CustomTip;
458
+ this.appletsCustom.forEach(function (item) {
459
+ if (item.colSpan < _this3.defaultColSpan) _this3.$set(item, 'colSpan', _this3.defaultColSpan);
460
+ if (item.rowSpan < _this3.defaultRowSpan) _this3.$set(item, 'rowSpan', _this3.defaultRowSpan);
461
+ });
462
+
463
+ // 鼠标滑动事件
464
+ document.onmousemove = function (ev) {
465
+ var id = evt.item.getAttribute('data-id');
466
+ if (id === '') {
467
+ return false;
468
+ }
469
+
470
+ // 节流
471
+ if (!self.timer) {
472
+ self.timer = true;
473
+ setTimeout(function () {
474
+ self.allow(evt, ev);
475
+ self.timer = false;
476
+ }, 100);
477
+ }
478
+ };
479
+ // 鼠标抬起
480
+ document.onmouseup = function () {
481
+ self.endfunc(evt);
482
+ };
483
+ },
484
+ allow: function allow(evt, ev) {
485
+ var l = ev.clientX;
486
+ var t = ev.clientY;
487
+
488
+ // 获取拖动元素ID
489
+ var id = evt.item.getAttribute('data-id');
490
+
491
+ // 小程序放置区域
492
+ var gridLayout = this;
493
+ // 小程序放置区域左上角 坐标
494
+ var x1 = gridLayout.$el.getBoundingClientRect().left;
495
+ var y1 = gridLayout.$el.getBoundingClientRect().top;
496
+ // 小程序放置区域右下角坐标
497
+ var x2 = x1 + gridLayout.$el.offsetWidth;
498
+ // const y2 = y1 + gridLayout.$el.offsetHeight
499
+ // 个性化弹窗左下角坐标
500
+ var Tx1 = this.CustomTip.getBoundingClientRect().left;
501
+ var Ty1 = this.CustomTip.getBoundingClientRect().top;
502
+ // 个性化弹窗右下角坐标
503
+ var Tx2 = Tx1 + this.CustomTip.offsetWidth;
504
+ var Ty2 = Ty1 + this.CustomTip.offsetHeight;
505
+ // (l >= x1 && t >= y1 && l <= x2 && t <= y2)
506
+ if (l >= x1 && t >= y1 && l <= x2 && !(l >= Tx1 && t >= Ty1 && l <= Tx2 && t <= Ty2)) {
507
+ // 判断是否存在
508
+ var list = this.layoutData.filter(function (item) {
509
+ return item.id === id;
510
+ });
511
+ if (list.length < 1 || list[0].canRepeat) {
512
+ // 不存在
513
+ this.isAdd = true;
514
+ this.addItem(l, t, x1, y1, id);
515
+ } else {
516
+ // 已存在
517
+ this.showLayer = true;
518
+ this.isAdd = false;
519
+ }
520
+ } else {
521
+ this.showLayer = false;
522
+ this.isAdd = false;
523
+ this.clearItem(); // 清除占位标识
524
+ }
525
+ },
526
+ endfunc: function endfunc(evt) {
527
+ this.clearItem(); // 清除占位标识
528
+ if (this.isAdd) {
529
+ var id = evt.item.getAttribute('data-id');
530
+ var list = this.appletsCustom.filter(function (item) {
531
+ if (item.id === id) {
532
+ item.hidden = 0;
533
+ return true;
534
+ }
535
+ });
536
+ if (list.length > 0) {
537
+ if (this.grids.length === 1 && this.grids[0].code === 'blank') {
538
+ this.grids.splice(0, 1);
539
+ }
540
+ this.$set(list[0], 'x', this.position.x);
541
+ this.$set(list[0], 'y', this.position.y);
542
+ this.$set(list[0], 'w', list[0].colSpan || this.defaultColSpan);
543
+ this.$set(list[0], 'h', list[0].rowSpan || this.defaultRowSpan);
544
+ this.$set(list[0], 'i', this.layoutData.length);
545
+ list[0].gridster = {
546
+ parentGridster: this.moduleName
547
+ };
548
+ list[0].repeatDataType = JSON.stringify(list[0].gridster);
549
+ var newPortlet = JSON.parse(JSON.stringify(list[0]));
550
+ this.layoutData.push(newPortlet);
551
+ this.grids.push(newPortlet);
552
+ }
553
+ this.isAdd = false;
554
+ this.setTopbarHeight();
555
+ }
556
+ this.showLayer = false;
557
+ this.timer = false;
558
+ setTimeout(function () {
559
+ if (document.querySelector('.layer-content')) {
560
+ document.querySelector('.layer-content').parentNode.removeChild(document.querySelector('.layer-content'));
561
+ }
562
+ }, 100);
563
+ document.onmousemove = function () {
564
+ return false;
565
+ };
566
+ document.onmouseup = function () {
567
+ return false;
568
+ };
569
+ },
570
+ clearItem: function clearItem() {
571
+ this.layoutData = this.layoutData.filter(function (item) {
572
+ return !item.addItemStatus;
573
+ }); // 清除占位标识
574
+ this.grids = this.grids.filter(function (item) {
575
+ return !item.addItemStatus;
576
+ }); // 清除占位标识
577
+ },
578
+ addItem: function addItem(left, top, contentX, contentY, id) {
579
+ // 自动添加
580
+ this.clearItem();
581
+ // 当前移动对象
582
+ var list = this.appletsCustom.filter(function (item) {
583
+ return item.id === id;
584
+ })[0];
585
+ var i = this.layoutData.length;
586
+
587
+ // 区域宽度
588
+ var gridLayoutWidth = this.$el.offsetWidth;
589
+
590
+ // 计算鼠标位置在x y轴坐标区域
591
+ var xPosition = 0;
592
+ if (this.colNum - Math.floor((left - contentX) / (gridLayoutWidth / this.colNum)) >= list.colSpan) {
593
+ xPosition = Math.floor((left - contentX) / (gridLayoutWidth / this.colNum));
594
+ } else {
595
+ xPosition = this.colNum - list.colSpan;
596
+ }
597
+ var yPosition = Math.floor((top - contentY) / this.layoutHeight);
598
+ var hiddenApplet = {
599
+ x: xPosition,
600
+ y: yPosition,
601
+ w: list.colSpan || this.defaultColSpan,
602
+ h: list.rowSpan || this.defaultRowSpan,
603
+ i: i,
604
+ addItemStatus: true // 占位标识
605
+ };
606
+
607
+ this.position.x = xPosition;
608
+ this.position.y = yPosition;
609
+ this.layoutData.unshift(hiddenApplet);
610
+ this.grids.unshift(hiddenApplet);
611
+ },
612
+ deleteById: function deleteById(index) {
613
+ var _this4 = this;
614
+ // 删除
615
+ var portletVo = this.grids[index];
616
+ this.$confirm('确认要删除“' + portletVo.name + '”吗?', '确认操作', {
617
+ type: 'warning'
618
+ }).then(function () {
619
+ if (portletVo.dataType === 'topElement') {
620
+ _this4.appletsCustom = _this4.compPanel.pageElements;
621
+ } else {
622
+ _this4.appletsCustom = _this4.compPanel.portlets;
623
+ }
624
+ _this4.appletsCustom.forEach(function (item) {
625
+ if (item.id === portletVo.id) {
626
+ item.hidden = 1;
627
+ }
628
+ });
629
+ _this4.grids.splice(index, 1);
630
+ var idx = 0;
631
+ _this4.layoutData.forEach(function (item, tindex) {
632
+ item.i = tindex;
633
+ if (item.id === portletVo.id && item.pppId === portletVo.pppId) {
634
+ idx = tindex;
635
+ }
636
+ });
637
+ _this4.layoutData.splice(idx, 1);
638
+ if (_this4.grids.length === 0) {
639
+ var defaultRowSpan = _this4.minH > _this4.defaultRowSpan ? _this4.minH : _this4.defaultRowSpan;
640
+ var axisX = _this4.layoutType === 'topElement' ? 10 : 0;
641
+ _this4.grids.push({
642
+ dataType: portletVo.dataType,
643
+ 'x': axisX,
644
+ 'y': 0,
645
+ 'w': _this4.defaultColSpan,
646
+ 'h': defaultRowSpan,
647
+ i: 0,
648
+ 'axisX': axisX,
649
+ 'axisY': 0,
650
+ 'code': 'blank',
651
+ 'icon': 'news',
652
+ 'name': '空组件栏',
653
+ 'rowSpan': defaultRowSpan,
654
+ 'colSpan': _this4.defaultColSpan
655
+ });
656
+ }
657
+ if (portletVo.dataType === 'topElement') {
658
+ _this4.compPanel.$forceUpdate();
659
+ _this4.setTopbarHeight();
660
+ }
661
+ });
662
+ },
663
+ // 修改组件样式
664
+ editPortletStyle: function editPortletStyle(index) {
665
+ var portletVo = this.grids[index];
666
+ if (!portletVo.pppId) {
667
+ portletVo.pppId = Object(utils["k" /* uuid */])();
668
+ }
669
+ var vo = {
670
+ id: portletVo.id,
671
+ pppId: portletVo.pppId,
672
+ useArea: portletVo.useArea,
673
+ code: portletVo.code,
674
+ repeatType: portletVo.repeatType,
675
+ busiType: portletVo.busiType,
676
+ repeatDataType: portletVo.repeatDataType && portletVo.repeatDataType.indexOf('{') > -1 ? JSON.parse(portletVo.repeatDataType) : {}
677
+ };
678
+ this.$bus.emit('editPortletStyle', vo);
679
+ },
680
+ editPortlet: function editPortlet(index) {
681
+ var portletVo = this.grids[index];
682
+ if (!portletVo.pppId) {
683
+ portletVo.pppId = Object(utils["k" /* uuid */])();
684
+ }
685
+ var vo = {
686
+ id: portletVo.id,
687
+ pppId: portletVo.pppId,
688
+ useArea: portletVo.useArea
689
+ };
690
+ this.$bus.emit('editPortlet', vo);
691
+ },
692
+ setRepeatDataType: function setRepeatDataType(index) {
693
+ var portletVo = this.grids[index];
694
+ if (!portletVo.pppId) {
695
+ portletVo.pppId = Object(utils["k" /* uuid */])();
696
+ }
697
+ var vo = {
698
+ id: portletVo.id,
699
+ pppId: portletVo.pppId,
700
+ useArea: portletVo.useArea
701
+ };
702
+ // 设置额外参数弹窗
703
+ this.$bus.emit('setRepeatDataType', vo);
704
+ },
705
+ hoverEnter: function hoverEnter($event, addItemStatus) {
706
+ if (this.canDelete && !addItemStatus) {
707
+ $event.target.children[1].style.display = 'block';
708
+ }
709
+ },
710
+ hoverOut: function hoverOut($event) {
711
+ if (this.canDelete) {
712
+ $event.target.children[1].style.display = 'none';
713
+ }
714
+ },
715
+ moveEvent: function moveEvent(i, newX, newY) {
716
+ // console.log('移动中', newX, newY)
717
+ this.setTopbarHeight();
718
+ },
719
+ movedEvent: function movedEvent(i, newX, newY) {
720
+ // console.log('移动结束', newX, newY)
721
+ this.setTopbarHeight();
722
+ },
723
+ resizeEvent: function resizeEvent(i, newX, newY) {
724
+ // console.log('调整大小中', newX, newY)
725
+ this.setTopbarHeight();
726
+ },
727
+ resizedEvent: function resizedEvent(i, newX, newY) {
728
+ // console.log('调整大小结束', newX, newY)
729
+ this.setTopbarHeight();
730
+ },
731
+ layoutUpdatedEvent: function layoutUpdatedEvent() {
732
+ // console.log('视图更新', this.layoutType)
733
+ },
734
+ layoutCreatedEvent: function layoutCreatedEvent() {
735
+ // console.log('创建事件')
736
+ },
737
+ layoutBeforeMountEvent: function layoutBeforeMountEvent() {
738
+ // console.log('加载之前')
739
+ },
740
+ layoutMountedEvent: function layoutMountedEvent() {
741
+ // console.log('加载完成')
742
+ },
743
+ layoutReadyEvent: function layoutReadyEvent() {
744
+ // console.log('准备')
745
+ },
746
+ setTopbarHeight: function setTopbarHeight() {
747
+ var _this5 = this;
748
+ if (this.layoutType === 'topElement' && !this.updateing) {
749
+ this.updateing = true;
750
+ setTimeout(function () {
751
+ var topbarHeight = _this5.$el.offsetHeight;
752
+ if (topbarHeight < 60) topbarHeight = 60;
753
+ document.querySelector('.header-container').style.height = topbarHeight + 2 + 'px';
754
+ document.querySelector('.header-content-container').style.height = topbarHeight + 'px';
755
+ _this5.$bus.emit('setTopbarHeight', topbarHeight + 2);
756
+ _this5.updateing = false;
757
+ }, 200);
758
+ }
759
+ }
760
+ } // 如果页面有keep-alive缓存功能,这个函数会触发
761
+ });
762
+ // CONCATENATED MODULE: ./packages/ecwplus/PortalPageDesigner/src/components/Grid24colPageModule.vue?vue&type=script&lang=js&
763
+ /* harmony default export */ var components_Grid24colPageModulevue_type_script_lang_js_ = (Grid24colPageModulevue_type_script_lang_js_);
764
+ // EXTERNAL MODULE: ./packages/ecwplus/PortalPageDesigner/src/components/Grid24colPageModule.vue?vue&type=style&index=0&id=5afff5f3&prod&lang=scss&scoped=true&
765
+ var Grid24colPageModulevue_type_style_index_0_id_5afff5f3_prod_lang_scss_scoped_true_ = __webpack_require__("97ad");
766
+
767
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
768
+ var componentNormalizer = __webpack_require__("2877");
769
+
770
+ // CONCATENATED MODULE: ./packages/ecwplus/PortalPageDesigner/src/components/Grid24colPageModule.vue
771
+
772
+
773
+
774
+
775
+
776
+
777
+ /* normalize component */
778
+
779
+ var component = Object(componentNormalizer["a" /* default */])(
780
+ components_Grid24colPageModulevue_type_script_lang_js_,
781
+ render,
782
+ staticRenderFns,
783
+ false,
784
+ null,
785
+ "5afff5f3",
786
+ null
787
+
788
+ )
789
+
790
+ /* harmony default export */ var Grid24colPageModule = __webpack_exports__["default"] = (component.exports);
791
+
792
+ /***/ }),
793
+
794
+ /***/ "faf8":
795
+ /***/ (function(module, exports, __webpack_require__) {
796
+
797
+ // Imports
798
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
799
+ exports = ___CSS_LOADER_API_IMPORT___(false);
800
+ // Module
801
+ exports.push([module.i, "[data-v-5afff5f3]:export{stdMenuBgcolor:#f3f4f4;stdMenuHover:rgba(163,174,177,.419608);stdMenuText:#303133;stdMenuAcitveText:#ff6f4b;stdSubMenuBgcolor:#f9fafc;stdSubMenuHover:rgba(163,174,177,.419608);stdSubMenuActiveText:#ff6f4b;darkMenuBgcolor:#304156;darkMenuHover:#263445;darkMenuText:#bfcbd9;darkMenuAcitveText:#ffd04b;darkSubMenuBgcolor:#384b63;darkSubMenuHover:#263445;darkSubMenuActiveText:#ffd04b;sideBarWidth:210px;formLabelWidth:133px;lightBlue:#409eff;skinBlue:#438eb9;skinScienceBlue:#1a82e3;skinTaleBlue:#012964;skinBlack:#409eff;skinOrange:#f37d12;skinRed:#9d1414}.vue-grid-item[data-v-5afff5f3]{background:#fff;border:1px solid #e4e7ed;overflow:hidden}.vue-grid-item .content-item[data-v-5afff5f3]{width:100%;height:100%;overflow:hidden;background-color:rgba(83,168,255,.2)!important}.layer-content[data-v-5afff5f3]{background:rgba(83,168,255,.2)}.layer-content[data-v-5afff5f3],.setting[data-v-5afff5f3]{position:absolute;top:0;bottom:0;left:0;right:0}.setting[data-v-5afff5f3]{display:none;height:40px;z-index:400}.setting img[data-v-5afff5f3]{width:32px;height:32px;float:right;cursor:pointer;margin-top:5px;margin-right:5px}", ""]);
802
+ // Exports
803
+ module.exports = exports;
804
+
805
+
806
+ /***/ })
807
+
808
+ }]);
809
+ //# sourceMappingURL=ecwappnowf.umd.2.js.map