centaline-data-driven 1.4.61 → 1.4.63
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/package.json +2 -2
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +10 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +9 -0
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +9 -0
- package/src/centaline/dynamicEditPictures/src/dynamicEditPictures.vue +114 -83
- package/src/centaline/dynamicFile/src/dynamicFile.vue +7 -0
- package/src/centaline/dynamicForm/src/dynamicForm.vue +9 -0
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +9 -0
- package/src/centaline/loader/src/ctl/File.js +1 -13
- package/src/centaline/loader/src/ctl/Router.js +3 -0
- package/src/centaline/loader/src/ctl/lib/Enum.js +5 -0
- package/src/main.js +3 -0
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -12
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "centaline-data-driven",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.63",
|
|
4
4
|
"description": "ccai",
|
|
5
5
|
"author": "hjc <3226136347@qq.com>",
|
|
6
6
|
"private": false,
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"axios": "^0.24.0",
|
|
16
16
|
"babel-polyfill": "^6.26.0",
|
|
17
17
|
"compression-webpack-plugin": "^2.0.0",
|
|
18
|
-
"cropperjs": "^1.5.13",
|
|
19
18
|
"element-ui": "^2.15.7",
|
|
20
19
|
"module": "^1.2.5",
|
|
21
20
|
"sass": "^1.34.0",
|
|
22
21
|
"save": "^2.4.0",
|
|
23
22
|
"v-viewer": "^1.6.4",
|
|
24
23
|
"vue": "2.5.17",
|
|
24
|
+
"vue-cropper": "^0.5.8",
|
|
25
25
|
"vue-ueditor-wrap": "^2.5.6",
|
|
26
26
|
"vuedraggable": "^2.24.3"
|
|
27
27
|
},
|
|
@@ -918,7 +918,16 @@ export default {
|
|
|
918
918
|
else if (field.isSearchPageInTab) {// 外部框架tab页打开
|
|
919
919
|
submitData = field.getActionPara(submitData).para;
|
|
920
920
|
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
921
|
-
}
|
|
921
|
+
}
|
|
922
|
+
else if (field.isUrlInSystemTab) {//外部框架tab页打开URl
|
|
923
|
+
submitData = field.getActionPara(submitData).para;
|
|
924
|
+
let query = self.$common.objectToQueryStr(submitData);
|
|
925
|
+
let urlTab = field.action + query;
|
|
926
|
+
if(field.action.indexOf('?')>-1 && query.indexOf('?')>-1){
|
|
927
|
+
urlTab = field.action + '&' +query.substr(1, query.length);
|
|
928
|
+
}
|
|
929
|
+
self.$common.getDataDrivenOpts().handler.openTabUrl(urlTab,field.pageTitle||field.label);
|
|
930
|
+
}
|
|
922
931
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
923
932
|
submitData = field.getActionPara(submitData).para;
|
|
924
933
|
let query = self.$common.objectToQueryStr(submitData);
|
|
@@ -928,6 +928,15 @@ export default {
|
|
|
928
928
|
submitData = field.getActionPara(submitData).para;
|
|
929
929
|
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
930
930
|
}
|
|
931
|
+
else if (field.isUrlInSystemTab) {//外部框架tab页打开URl
|
|
932
|
+
submitData = field.getActionPara(submitData).para;
|
|
933
|
+
let query = self.$common.objectToQueryStr(submitData);
|
|
934
|
+
let urlTab = field.action + query;
|
|
935
|
+
if(field.action.indexOf('?')>-1 && query.indexOf('?')>-1){
|
|
936
|
+
urlTab = field.action + '&' +query.substr(1, query.length);
|
|
937
|
+
}
|
|
938
|
+
self.$common.getDataDrivenOpts().handler.openTabUrl(urlTab,field.pageTitle||field.label);
|
|
939
|
+
}
|
|
931
940
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
932
941
|
submitData = field.getActionPara(submitData).para;
|
|
933
942
|
let query = self.$common.objectToQueryStr(submitData);
|
|
@@ -438,6 +438,15 @@
|
|
|
438
438
|
submitData = field.getActionPara(submitData).para;
|
|
439
439
|
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
440
440
|
}
|
|
441
|
+
else if (field.isUrlInSystemTab) {//外部框架tab页打开URl
|
|
442
|
+
submitData = field.getActionPara(submitData).para;
|
|
443
|
+
let query = self.$common.objectToQueryStr(submitData);
|
|
444
|
+
let urlTab = field.action + query;
|
|
445
|
+
if(field.action.indexOf('?')>-1 && query.indexOf('?')>-1){
|
|
446
|
+
urlTab = field.action + '&' +query.substr(1, query.length);
|
|
447
|
+
}
|
|
448
|
+
self.$common.getDataDrivenOpts().handler.openTabUrl(urlTab,field.pageTitle||field.label);
|
|
449
|
+
}
|
|
441
450
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
442
451
|
submitData = field.getActionPara(submitData).para;
|
|
443
452
|
let query = self.$common.objectToQueryStr(submitData);
|
|
@@ -1,7 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="picedit-modal" style="width:100%; height:100%;background-color: #1e1e1e">
|
|
3
3
|
<div class="picedit-stage">
|
|
4
|
-
<
|
|
4
|
+
<div style="width:100%; height:100%;" v-if="croppShow">
|
|
5
|
+
<vue-cropper ref="cropper"
|
|
6
|
+
:img="options.img"
|
|
7
|
+
:output-size="options.size"
|
|
8
|
+
:output-type="options.outputType"
|
|
9
|
+
:info="options.info"
|
|
10
|
+
:full="options.full"
|
|
11
|
+
:canScale="options.canScale"
|
|
12
|
+
:can-move="options.canMove"
|
|
13
|
+
:can-move-box="options.canMoveBox"
|
|
14
|
+
:fixed="options.fixed"
|
|
15
|
+
:fixed-box="options.fixedBox"
|
|
16
|
+
:original="options.original"
|
|
17
|
+
:auto-crop="options.autoCrop"
|
|
18
|
+
:auto-crop-width="options.autoCropWidth"
|
|
19
|
+
:auto-crop-height="options.autoCropHeight"
|
|
20
|
+
:center-box="options.centerBox"
|
|
21
|
+
:high="options.high"
|
|
22
|
+
:info-true="options.infoTrue"
|
|
23
|
+
:max-img-size="options.maxImageSize"
|
|
24
|
+
:enlarge="options.enlarge"
|
|
25
|
+
:mode="options.mode"
|
|
26
|
+
:maxImgSize="options.maxImgSize" />
|
|
27
|
+
</div>
|
|
28
|
+
<canvas v-else id="drawCanvas" ref="canvas" style="position:absolute;"></canvas>
|
|
5
29
|
</div>
|
|
6
30
|
<div class="picedit-Original" v-if="flagOriginal">
|
|
7
31
|
<el-row>
|
|
@@ -32,12 +56,11 @@
|
|
|
32
56
|
<script>
|
|
33
57
|
import dynamicElement from "../../mixins/dynamicElement";
|
|
34
58
|
import { upload, uploadByPieces } from "../../loader/src/ctl/SliceUpload";
|
|
35
|
-
import
|
|
36
|
-
import Cropper from 'cropperjs'
|
|
37
|
-
import 'cropperjs/dist/cropper.min.css'
|
|
59
|
+
import { VueCropper } from "vue-cropper";
|
|
38
60
|
export default {
|
|
39
61
|
name: "ct-editpictures",
|
|
40
62
|
mixins: [dynamicElement],
|
|
63
|
+
components: { VueCropper },
|
|
41
64
|
props: {
|
|
42
65
|
file: Object,
|
|
43
66
|
api: String,
|
|
@@ -49,7 +72,6 @@
|
|
|
49
72
|
flagOriginal: false,
|
|
50
73
|
progressFlag: false,
|
|
51
74
|
loadProgress: 0,
|
|
52
|
-
cropper: null,
|
|
53
75
|
croppShow: false,
|
|
54
76
|
canvas: Object,
|
|
55
77
|
ctx: Object,
|
|
@@ -58,6 +80,9 @@
|
|
|
58
80
|
canMove: false,
|
|
59
81
|
PaintMove: false,
|
|
60
82
|
isActive: false,
|
|
83
|
+
bodywidth: 0,
|
|
84
|
+
bodyheight: 0,
|
|
85
|
+
scale: 1,
|
|
61
86
|
tx: 0,
|
|
62
87
|
ty: 0,
|
|
63
88
|
tl: 0,
|
|
@@ -68,23 +93,24 @@
|
|
|
68
93
|
nt: 0,
|
|
69
94
|
ratio: 0,
|
|
70
95
|
cropBoxResizable: false,
|
|
71
|
-
bntindex
|
|
96
|
+
bntindex: -1,
|
|
97
|
+
canvasImg:'',
|
|
72
98
|
bntList: [
|
|
73
99
|
{
|
|
74
100
|
name: "左旋转",
|
|
75
101
|
ico: "el-icon-refresh-left",
|
|
76
|
-
key:"rotLeft",
|
|
102
|
+
key: "rotLeft",
|
|
77
103
|
},
|
|
78
104
|
{
|
|
79
105
|
name: "右旋转",
|
|
80
106
|
ico: "el-icon-refresh-right",
|
|
81
107
|
key: "rotRight",
|
|
82
108
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
109
|
+
{
|
|
110
|
+
name: "裁剪",
|
|
111
|
+
ico: "el-icon-crop",
|
|
112
|
+
key: "Crop",
|
|
113
|
+
},
|
|
88
114
|
{
|
|
89
115
|
name: "拖动",
|
|
90
116
|
ico: "el-icon-rank",
|
|
@@ -116,6 +142,27 @@
|
|
|
116
142
|
key: "preservation",
|
|
117
143
|
},
|
|
118
144
|
],
|
|
145
|
+
options: {
|
|
146
|
+
img: '', //裁剪图片的地址
|
|
147
|
+
outputSize: 1, // 裁剪生成图片的质量
|
|
148
|
+
outputType: 'jpeg', // 裁剪生成图片的格式
|
|
149
|
+
full: false, // 是否输出原图比例的截图
|
|
150
|
+
info: true, // 图片大小信息
|
|
151
|
+
canScale: true, // 图片是否允许滚轮缩放
|
|
152
|
+
autoCrop: true, // 是否默认生成截图框
|
|
153
|
+
//autoCropWidth: 800, // 默认生成截图框宽度
|
|
154
|
+
//autoCropHeight: 600, // 默认生成截图框高度
|
|
155
|
+
canMove: true, // 上传图片是否可以移动
|
|
156
|
+
//fixedBox: true, // 固定截图框大小 不允许改变
|
|
157
|
+
fixed: false, // 是否开启截图框宽高固定比例
|
|
158
|
+
canMoveBox: true, // 截图框能否拖动
|
|
159
|
+
original: false, // 上传图片按照原始比例渲染
|
|
160
|
+
centerBox: true, // 截图框是否被限制在图片里面
|
|
161
|
+
height: true,
|
|
162
|
+
infoTrue: true, // true 为展示真实输出图片宽高 false 展示看到的截图框宽高
|
|
163
|
+
enlarge: 1, // 图片根据截图框输出比例倍数
|
|
164
|
+
//mode: 'cover', // 图片默认渲染方式
|
|
165
|
+
},
|
|
119
166
|
}
|
|
120
167
|
},
|
|
121
168
|
computed: {
|
|
@@ -124,7 +171,11 @@
|
|
|
124
171
|
mounted() {
|
|
125
172
|
this.progressFlag = false;
|
|
126
173
|
this.loadProgress = 0;
|
|
127
|
-
|
|
174
|
+
var width = parseInt(window.document.body.clientWidth * 0.8);
|
|
175
|
+
width = width > 1160 ? 1160 : width;
|
|
176
|
+
this.bodywidth = width;
|
|
177
|
+
this.bodyheight = parseInt(window.document.body.clientHeight * 0.8);
|
|
178
|
+
if (typeof this.minWidth !== 'undefined' && typeof this.minWidth !== 'undefined') {
|
|
128
179
|
this.cropBoxResizable = true;
|
|
129
180
|
}
|
|
130
181
|
if (typeof this.file.originalSavedFileName !== 'undefined' && this.file.originalSavedFileName !== this.file.savedFileName) {
|
|
@@ -136,14 +187,14 @@
|
|
|
136
187
|
drawCanv(href) {
|
|
137
188
|
this.$nextTick(() => {
|
|
138
189
|
let _this = this
|
|
139
|
-
_this.canvas =
|
|
190
|
+
_this.canvas = this.$refs.canvas;
|
|
140
191
|
_this.ctx = _this.canvas.getContext("2d");
|
|
141
192
|
|
|
142
193
|
_this.canvas.width = 0;
|
|
143
194
|
_this.canvas.height = 0;
|
|
144
195
|
|
|
145
196
|
_this.imgObj = new Image()
|
|
146
|
-
_this.imgObj.src = href||_this.file.mediaUrl;
|
|
197
|
+
_this.imgObj.src = href || _this.file.mediaUrl;
|
|
147
198
|
_this.imgObj.setAttribute("crossOrigin", 'Anonymous')
|
|
148
199
|
_this.imgObj.onload = function (e) {
|
|
149
200
|
//获取原始宽高
|
|
@@ -153,25 +204,23 @@
|
|
|
153
204
|
_this.canvas.width = naturalWidth;
|
|
154
205
|
_this.canvas.height = naturalHeight;
|
|
155
206
|
_this.ctx.drawImage(_this.imgObj, 0, 0, naturalWidth, naturalHeight)
|
|
156
|
-
|
|
157
|
-
var
|
|
158
|
-
var scalew = 900 / _this.imgObj.width;
|
|
159
|
-
var scaleh = window.document.body.clientHeight / _this.imgObj.height;
|
|
207
|
+
var scalew = _this.bodywidth / _this.imgObj.width;
|
|
208
|
+
var scaleh = _this.bodyheight / _this.imgObj.height;
|
|
160
209
|
if (scalew < 1 && scaleh < 1) {
|
|
161
210
|
if (scalew < scaleh) {
|
|
162
|
-
scale = scalew;
|
|
211
|
+
_this.scale = scalew;
|
|
163
212
|
}
|
|
164
213
|
else {
|
|
165
|
-
scale = scaleh;
|
|
214
|
+
_this.scale = scaleh;
|
|
166
215
|
}
|
|
167
216
|
}
|
|
168
217
|
else if (scalew > 1 && scaleh < 1) {
|
|
169
|
-
scale = scaleh;
|
|
218
|
+
_this.scale = scaleh;
|
|
170
219
|
}
|
|
171
220
|
else if (scalew < 1 && scaleh > 1) {
|
|
172
|
-
scale = scalew;
|
|
221
|
+
_this.scale = scalew;
|
|
173
222
|
}
|
|
174
|
-
_this.scaleDomSize(_this.canvas
|
|
223
|
+
_this.scaleDomSize(_this.canvas);
|
|
175
224
|
}
|
|
176
225
|
this.canvas.addEventListener("pointerdown", _this.startDraw, false);
|
|
177
226
|
this.canvas.addEventListener("pointermove", _this.draw, false);
|
|
@@ -283,25 +332,15 @@
|
|
|
283
332
|
},
|
|
284
333
|
//放大缩小
|
|
285
334
|
scaleDom(canvas, type) {
|
|
286
|
-
let scale = parseFloat((canvas.style.transform || `scale(1)`).replace(/[^0-9.]/gi, ''))
|
|
287
335
|
if (type == "-") {
|
|
288
|
-
scale += -0.1;
|
|
289
|
-
if ((scale <= 1 && canvas.width > 900) || (scale <= 1 && canvas.height > (window.document.body.clientHeight))) {
|
|
290
|
-
canvas.style.left = - canvas.width * 0.05 * ((1 - scale) * 10) + 'px';
|
|
291
|
-
canvas.style.top = -canvas.height * 0.05 * ((1 - scale) * 10) + 'px';
|
|
292
|
-
}
|
|
336
|
+
this.scale += -0.1;
|
|
293
337
|
} else if (type == "+") {
|
|
294
|
-
scale += 0.1;
|
|
295
|
-
if ((scale <= 1 && canvas.width > 900) || (scale <= 1 && canvas.height > (window.document.body.clientHeight))) {
|
|
296
|
-
canvas.style.left = - canvas.width * 0.05 * ((1 - scale) * 10) + 'px';
|
|
297
|
-
canvas.style.top = -canvas.height * 0.05 * ((1 - scale) * 10) + 'px';
|
|
298
|
-
}
|
|
338
|
+
this.scale += 0.1;
|
|
299
339
|
}
|
|
300
340
|
else {
|
|
301
|
-
scale = 1;
|
|
341
|
+
this.scale = 1;
|
|
302
342
|
}
|
|
303
|
-
|
|
304
|
-
|
|
343
|
+
this.scaleDomSize(canvas);
|
|
305
344
|
},
|
|
306
345
|
rotLeft() {
|
|
307
346
|
this.rot -= 90;
|
|
@@ -350,51 +389,39 @@
|
|
|
350
389
|
context.drawImage(img, 0, 0, w, h);
|
|
351
390
|
context.restore();
|
|
352
391
|
img.style.display = "none";
|
|
392
|
+
this.scaleDomSize(canvas);
|
|
353
393
|
},
|
|
354
394
|
Crop() {
|
|
355
|
-
|
|
356
|
-
this.drawCanv()
|
|
357
|
-
this.croppShow = true
|
|
358
|
-
var w;
|
|
359
|
-
var h;
|
|
395
|
+
|
|
360
396
|
if (typeof this.minWidth !== 'undefined' && typeof this.minWidth !== 'undefined') {
|
|
361
|
-
|
|
362
|
-
|
|
397
|
+
if (parseInt(this.minWidth) > this.bodywidth || parseInt(this.minHeight) > this.bodyheight) {
|
|
398
|
+
this.options.enlarge = 2;
|
|
399
|
+
this.options.autoCropWidth = parseInt(this.minWidth)/2;
|
|
400
|
+
this.options.autoCropHeight = parseInt(this.minHeight)/2;
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
this.options.autoCropWidth = parseInt(this.minWidth);
|
|
404
|
+
this.options.autoCropHeight = parseInt(this.minHeight);
|
|
405
|
+
}
|
|
363
406
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
cropBoxResizable: _this.cropBoxResizable,
|
|
369
|
-
data: {
|
|
370
|
-
width: w,
|
|
371
|
-
height: h
|
|
372
|
-
},
|
|
373
|
-
zoom(e) {
|
|
374
|
-
if (_this.ratio == 0) {
|
|
375
|
-
_this.ratio = e.detail.oldRatio
|
|
376
|
-
}
|
|
377
|
-
if (e.detail.ratio > _this.ratio) {
|
|
378
|
-
e.preventDefault();
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
})
|
|
382
|
-
this.cropper = cropper
|
|
407
|
+
this.canvasImg = this.canvas.toDataURL('image/jpeg');
|
|
408
|
+
this.options.img = this.canvasImg;
|
|
409
|
+
this.options.fixedBox = this.cropBoxResizable;
|
|
410
|
+
this.croppShow = true
|
|
383
411
|
},
|
|
384
412
|
// 确认裁剪
|
|
385
413
|
sureCropper() {
|
|
386
414
|
let _this = this
|
|
387
|
-
this.cropper.
|
|
415
|
+
this.$refs.cropper.getCropBlob(blob => {
|
|
388
416
|
const href = window.URL.createObjectURL(blob)
|
|
417
|
+
_this.croppShow = false;
|
|
389
418
|
_this.drawCanv(href)
|
|
390
|
-
}
|
|
391
|
-
this.cancelCropper()
|
|
419
|
+
});
|
|
392
420
|
},
|
|
393
421
|
// 销毁裁剪框
|
|
394
422
|
cancelCropper() {
|
|
395
|
-
this.cropper.destroy()
|
|
396
423
|
this.croppShow = false
|
|
397
|
-
this.
|
|
424
|
+
this.drawCanv(this.canvasImg);
|
|
398
425
|
},
|
|
399
426
|
Original() {
|
|
400
427
|
var url = this.file.mediaUrl.replace(this.file.savedFileName, this.file.originalSavedFileName);
|
|
@@ -411,8 +438,6 @@
|
|
|
411
438
|
clear() {
|
|
412
439
|
this.drawCanv();
|
|
413
440
|
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
414
|
-
this.canvas.style.left = '0px';
|
|
415
|
-
this.canvas.style.top = '0px';
|
|
416
441
|
this.rot = 0;
|
|
417
442
|
this.nl = 0;
|
|
418
443
|
this.nt = 0;
|
|
@@ -422,12 +447,10 @@
|
|
|
422
447
|
this.scaleDom(this.canvas, "");
|
|
423
448
|
this.rotate(this.canvas, this.imgObj, this.rot);
|
|
424
449
|
},
|
|
425
|
-
scaleDomSize(canvas
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
if (scale >= 0.1) canvas.style.transform = `scale(${scale})`;
|
|
450
|
+
scaleDomSize(canvas) {
|
|
451
|
+
canvas.style.transform = `scale(${this.scale})`;
|
|
452
|
+
canvas.style.left = (- canvas.width * 0.05 * ((1 - this.scale) * 10)) + ((this.bodywidth - canvas.width * this.scale) / 2) + 'px';
|
|
453
|
+
canvas.style.top = (-canvas.height * 0.05 * ((1 - this.scale) * 10)) + ((this.bodyheight - canvas.height * this.scale) / 2) + 'px';
|
|
431
454
|
},
|
|
432
455
|
async preservation() {
|
|
433
456
|
this.progressFlag = true;
|
|
@@ -466,6 +489,8 @@
|
|
|
466
489
|
this.file.mediaUrl = res.content.media.mediaUrl;
|
|
467
490
|
this.file.savedFileName = res.content.media.savedFileName;
|
|
468
491
|
this.file.mediaDate = res.content.media.mediaDate;
|
|
492
|
+
this.file.width = this.canvas.width;
|
|
493
|
+
this.file.height = this.canvas.height;
|
|
469
494
|
this.$emit('handleEditPhoto', this.file);
|
|
470
495
|
}
|
|
471
496
|
return true;
|
|
@@ -587,6 +612,7 @@
|
|
|
587
612
|
color: #fff;
|
|
588
613
|
z-index: 9;
|
|
589
614
|
}
|
|
615
|
+
|
|
590
616
|
.picedit-cropper {
|
|
591
617
|
height: 50px;
|
|
592
618
|
bottom: 0;
|
|
@@ -596,6 +622,7 @@
|
|
|
596
622
|
color: #fff;
|
|
597
623
|
z-index: 9;
|
|
598
624
|
}
|
|
625
|
+
|
|
599
626
|
.picedit-Original {
|
|
600
627
|
height: 50px;
|
|
601
628
|
top: 50px;
|
|
@@ -604,6 +631,7 @@
|
|
|
604
631
|
color: #fff;
|
|
605
632
|
z-index: 9;
|
|
606
633
|
}
|
|
634
|
+
|
|
607
635
|
.picedit-toolbar {
|
|
608
636
|
display: inline-block;
|
|
609
637
|
height: 50px;
|
|
@@ -624,19 +652,22 @@
|
|
|
624
652
|
font-size: 24px;
|
|
625
653
|
cursor: pointer;
|
|
626
654
|
}
|
|
655
|
+
|
|
627
656
|
.picedit-toolbar .active {
|
|
628
657
|
background-color: #fff;
|
|
629
|
-
color
|
|
630
|
-
}
|
|
631
|
-
.rc-cropper {
|
|
632
|
-
position: relative;
|
|
658
|
+
color: #333;
|
|
633
659
|
}
|
|
634
660
|
|
|
661
|
+
.rc-cropper {
|
|
662
|
+
position: relative;
|
|
663
|
+
}
|
|
664
|
+
|
|
635
665
|
.rc-cropper__iconCrop1 {
|
|
636
666
|
position: absolute;
|
|
637
667
|
right: 4%;
|
|
638
668
|
top: 0%;
|
|
639
669
|
}
|
|
670
|
+
|
|
640
671
|
.mask {
|
|
641
672
|
position: fixed;
|
|
642
673
|
z-index: 9998;
|
|
@@ -646,11 +677,11 @@
|
|
|
646
677
|
left: 0;
|
|
647
678
|
background-color: rgba(0, 0, 0, .3);
|
|
648
679
|
}
|
|
680
|
+
|
|
649
681
|
.stream-total-tips {
|
|
650
682
|
position: fixed;
|
|
651
683
|
top: 40%;
|
|
652
|
-
left:
|
|
684
|
+
left: 45%;
|
|
653
685
|
z-index: 9999;
|
|
654
686
|
}
|
|
655
|
-
|
|
656
687
|
</style>
|
|
@@ -561,6 +561,13 @@
|
|
|
561
561
|
this.model.setByPieces(res, Progress, file);
|
|
562
562
|
|
|
563
563
|
if (res.content.finished == 1) {
|
|
564
|
+
var self = this;
|
|
565
|
+
let img = new Image();
|
|
566
|
+
img.src = self.model.fileList[self.model.fileList.length - 1].mediaUrl;
|
|
567
|
+
img.onload = function () {
|
|
568
|
+
self.model.fileList[self.model.fileList.length - 1].width = img.width;
|
|
569
|
+
self.model.fileList[self.model.fileList.length - 1].height = img.height;
|
|
570
|
+
};
|
|
564
571
|
this.handleChange();
|
|
565
572
|
}
|
|
566
573
|
return true;
|
|
@@ -510,6 +510,15 @@
|
|
|
510
510
|
let query = self.$common.objectToQueryStr(submitData);
|
|
511
511
|
window.open(field.action + query, "_blank");
|
|
512
512
|
}
|
|
513
|
+
else if (field.isUrlInSystemTab) {//外部框架tab页打开URl
|
|
514
|
+
submitData = field.getActionPara(submitData).para;
|
|
515
|
+
let query = self.$common.objectToQueryStr(submitData);
|
|
516
|
+
let urlTab = field.action + query;
|
|
517
|
+
if(field.action.indexOf('?')>-1 && query.indexOf('?')>-1){
|
|
518
|
+
urlTab = field.action + '&' +query.substr(1, query.length);
|
|
519
|
+
}
|
|
520
|
+
self.$common.getDataDrivenOpts().handler.openTabUrl(urlTab,field.pageTitle||field.label);
|
|
521
|
+
}
|
|
513
522
|
else if (field.isSeeVoice) {//看视频
|
|
514
523
|
self.$common.browseVideo(field, submitData)
|
|
515
524
|
}
|
|
@@ -886,6 +886,15 @@ export default {
|
|
|
886
886
|
let query = self.$common.objectToQueryStr(submitData);
|
|
887
887
|
window.open(action + query, "_blank");
|
|
888
888
|
}
|
|
889
|
+
else if (field.isUrlInSystemTab) {//外部框架tab页打开URl
|
|
890
|
+
submitData = field.getActionPara(submitData).para;
|
|
891
|
+
let query = self.$common.objectToQueryStr(submitData);
|
|
892
|
+
let urlTab = field.action + query;
|
|
893
|
+
if(field.action.indexOf('?')>-1 && query.indexOf('?')>-1){
|
|
894
|
+
urlTab = field.action + '&' +query.substr(1, query.length);
|
|
895
|
+
}
|
|
896
|
+
self.$common.getDataDrivenOpts().handler.openTabUrl(urlTab,field.pageTitle||field.label);
|
|
897
|
+
}
|
|
889
898
|
else if (field.isSeeVoice) {//看视频
|
|
890
899
|
self.$common.browseVideo(field, submitData);
|
|
891
900
|
}
|
|
@@ -334,16 +334,7 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
334
334
|
}
|
|
335
335
|
rtn.fileList.push(awaitfile);
|
|
336
336
|
},
|
|
337
|
-
|
|
338
|
-
return new Promise(function (resolve, reject) {
|
|
339
|
-
let img = new Image();
|
|
340
|
-
img.src = url;
|
|
341
|
-
img.onload = function () {
|
|
342
|
-
resolve(img);
|
|
343
|
-
};
|
|
344
|
-
});
|
|
345
|
-
},
|
|
346
|
-
async setByPieces(res, Progress, file) {
|
|
337
|
+
setByPieces(res, Progress, file) {
|
|
347
338
|
if (res.rtnCode === Enum.ReturnCode.Successful) {
|
|
348
339
|
//下面的方式绑定,会有一些问题 todo 不强与页面关联
|
|
349
340
|
var data = {};
|
|
@@ -356,9 +347,6 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
356
347
|
data = rtn.getFileData(res.content.media);
|
|
357
348
|
data.progressFlag = false;
|
|
358
349
|
data.loadProgress = 100;
|
|
359
|
-
const img = await this.imgFn(data.mediaUrl);
|
|
360
|
-
w = img.width;
|
|
361
|
-
h = img.height ;
|
|
362
350
|
Vue.set(file, "width", w);
|
|
363
351
|
Vue.set(file, "height", h);
|
|
364
352
|
Vue.set(file, "url", data.url);
|
|
@@ -98,6 +98,9 @@ const Router = function (source) {
|
|
|
98
98
|
get isUrlInLayer() {
|
|
99
99
|
return source.pageStyle === Enum.PageStyle.UrlInLayer;
|
|
100
100
|
},
|
|
101
|
+
get isUrlInSystemTab() {
|
|
102
|
+
return source.pageStyle === Enum.PageStyle.UrlInSystemTab;
|
|
103
|
+
},
|
|
101
104
|
get isOpenUrlInBrowse() {
|
|
102
105
|
return source.actionType === Enum.ActionType.OpenUrlInBrowse;
|
|
103
106
|
},
|