centaline-data-driven 1.4.60 → 1.4.61
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 +1 -1
- package/src/centaline/css/common.css +4 -0
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +10 -2
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +10 -2
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +14 -2
- package/src/centaline/dynamicEditPictures/src/dynamicEditPictures.vue +87 -34
- package/src/centaline/dynamicFile/src/dynamicFile.vue +58 -7
- package/src/centaline/loader/src/ctl/Detail.js +9 -0
- package/src/centaline/loader/src/ctl/File.js +20 -3
- package/src/main.js +1 -1
- package/wwwroot/static/centaline/centaline-data-driven.js +4 -4
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
|
@@ -97,6 +97,10 @@ html {
|
|
|
97
97
|
}
|
|
98
98
|
.cursor{
|
|
99
99
|
cursor: pointer !important;
|
|
100
|
+
}
|
|
101
|
+
.cursorLink{
|
|
102
|
+
color: #388cd3;
|
|
103
|
+
cursor: pointer !important;
|
|
100
104
|
}
|
|
101
105
|
.ct-so .ct-close > .el-select__caret.is-show-close:hover, .ct-tags .ct-close > .el-select__caret.is-show-close:hover {
|
|
102
106
|
color: #909399;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<div class="title">
|
|
10
10
|
<span>{{ model.fields1Dic.StatusName.value }}</span>
|
|
11
11
|
<span class="head-line"></span>
|
|
12
|
-
<span>{{ model.fields1Dic.EstateName.value }}</span>
|
|
12
|
+
<span class="cursorLink" @click="fieldClickHandler(model.actionRouterEstate, $event)">{{ model.fields1Dic.EstateName.value }}</span>
|
|
13
13
|
<span> {{ model.fields1Dic.BuildingName.value }}</span>
|
|
14
14
|
<span>{{ model.fields1Dic.RoomNo.value }}</span>
|
|
15
15
|
<img v-if="model.actionRouterFavorite" :src="model.actionRouterFavorite.imgUrl" alt="" @click="fieldClickHandler(model.actionRouterFavorite, $event)" class="collection" />
|
|
@@ -721,6 +721,10 @@ export default {
|
|
|
721
721
|
}
|
|
722
722
|
},
|
|
723
723
|
fieldClickHandler(field) {
|
|
724
|
+
if(field == null || field==undefined){
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
|
|
724
728
|
var self = this;
|
|
725
729
|
var callBack = null;
|
|
726
730
|
let submitData = {};
|
|
@@ -918,7 +922,11 @@ export default {
|
|
|
918
922
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
919
923
|
submitData = field.getActionPara(submitData).para;
|
|
920
924
|
let query = self.$common.objectToQueryStr(submitData);
|
|
921
|
-
|
|
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
|
+
window.open(urlTab, "_blank");
|
|
922
930
|
}
|
|
923
931
|
else if (field.isOpenUrlInBrowse) {// 浏览器打开
|
|
924
932
|
window.open(submitData[field.submitFormField], "_blank");
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<div class="title">
|
|
10
10
|
<span>{{ model.fields1Dic.StatusName.value }}</span>
|
|
11
11
|
<span class="head-line"></span>
|
|
12
|
-
<span>{{ model.fields1Dic.EstateName.value }}</span>
|
|
12
|
+
<span class="cursorLink" @click="fieldClickHandler(model.actionRouterEstate, $event)">{{ model.fields1Dic.EstateName.value }}</span>
|
|
13
13
|
<span> {{ model.fields1Dic.BuildingName.value }}</span>
|
|
14
14
|
<span>{{ model.fields1Dic.RoomNo.value }}</span>
|
|
15
15
|
<img v-if="model.actionRouterFavorite" :src="model.actionRouterFavorite.imgUrl" alt="" @click="fieldClickHandler(model.actionRouterFavorite, $event)" class="collection" />
|
|
@@ -730,6 +730,10 @@ export default {
|
|
|
730
730
|
}
|
|
731
731
|
},
|
|
732
732
|
fieldClickHandler(field) {
|
|
733
|
+
if(field == null || field==undefined){
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
|
|
733
737
|
var self = this;
|
|
734
738
|
var callBack = null;
|
|
735
739
|
let submitData = {};
|
|
@@ -927,7 +931,11 @@ export default {
|
|
|
927
931
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
928
932
|
submitData = field.getActionPara(submitData).para;
|
|
929
933
|
let query = self.$common.objectToQueryStr(submitData);
|
|
930
|
-
|
|
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
|
+
window.open(urlTab, "_blank");
|
|
931
939
|
}
|
|
932
940
|
else if (field.isOpenUrlInBrowse) {// 浏览器打开
|
|
933
941
|
window.open(submitData[field.submitFormField], "_blank");
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<div style="padding-left: 20px;padding-right: 20px;">
|
|
23
23
|
<div ref="title" style="margin-top: 18px;">
|
|
24
24
|
<div style="font-weight: Bold;font-size: 16px;color: #333333;display: flex;">
|
|
25
|
-
<span>{{model.fields1Dic.EstateName.value}}</span>
|
|
25
|
+
<span class="cursorLink" @click="fieldClickHandler(model.actionRouterEstate, $event)">{{model.fields1Dic.EstateName.value}}</span>
|
|
26
26
|
<span>{{model.fields1Dic.BuildingName.value}}</span>
|
|
27
27
|
<span>{{model.fields1Dic.RoomNo.value}}</span>
|
|
28
28
|
<div style="border: 1px solid #E0E0E0;font-size: 12px;color: #333333;padding-top: 3px;
|
|
@@ -293,6 +293,9 @@
|
|
|
293
293
|
if(this.$refs['popover0']){
|
|
294
294
|
this.$refs['popover0'].doClose();
|
|
295
295
|
}
|
|
296
|
+
if(field == null || field==undefined){
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
296
299
|
|
|
297
300
|
var self = this;
|
|
298
301
|
var callBack=null;
|
|
@@ -321,6 +324,11 @@
|
|
|
321
324
|
router = this.model.routerForQRCode;
|
|
322
325
|
}
|
|
323
326
|
}
|
|
327
|
+
if (router == undefined && this.model.actionRouterEstate) {
|
|
328
|
+
if (field.id === this.model.actionRouterEstate.id) {
|
|
329
|
+
router = this.model.actionRouterEstate;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
324
332
|
|
|
325
333
|
if(router){
|
|
326
334
|
if(field.isSubmitDataFromSelf){
|
|
@@ -433,7 +441,11 @@
|
|
|
433
441
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
434
442
|
submitData = field.getActionPara(submitData).para;
|
|
435
443
|
let query = self.$common.objectToQueryStr(submitData);
|
|
436
|
-
|
|
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
|
+
window.open(urlTab, "_blank");
|
|
437
449
|
}
|
|
438
450
|
else if (field.isOpenUrlInBrowse) {// 浏览器打开
|
|
439
451
|
window.open(submitData[field.submitFormField], "_blank");
|
|
@@ -16,34 +16,9 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
<div class="picedit-footer" v-else>
|
|
18
18
|
<div class="picedit-toolbar">
|
|
19
|
-
<a @click="
|
|
20
|
-
<span class="
|
|
19
|
+
<a v-for="(item, index) in bntList" :key="index" @click="handleClick(item.key,index)" :class="['magnify-btn', index==bntindex ? 'active' : '',]" :title="item.name">
|
|
20
|
+
<span :class="item.ico"></span>
|
|
21
21
|
</a>
|
|
22
|
-
<a @click="rotRight" class="magnify-btn" title="右旋转">
|
|
23
|
-
<span class="el-icon-refresh-right"></span>
|
|
24
|
-
</a>
|
|
25
|
-
<a @click="Crop" class="magnify-btn" title="裁剪">
|
|
26
|
-
<span class="el-icon-crop"></span>
|
|
27
|
-
</a>
|
|
28
|
-
<a @click="Drag" class="magnify-btn" title="拖动">
|
|
29
|
-
<span class="el-icon-rank"></span>
|
|
30
|
-
</a>
|
|
31
|
-
<a @click="Apply" class="magnify-btn" title="涂抹">
|
|
32
|
-
<span class="el-icon-brush"></span>
|
|
33
|
-
</a>
|
|
34
|
-
<a @click="enlarge" class="magnify-btn" title="放大">
|
|
35
|
-
<span class="el-icon-zoom-in"></span>
|
|
36
|
-
</a>
|
|
37
|
-
<a @click="narrow" class="magnify-btn" title="缩小">
|
|
38
|
-
<span class="el-icon-zoom-out"></span>
|
|
39
|
-
</a>
|
|
40
|
-
<a @click="clear" class="magnify-btn" title="清除">
|
|
41
|
-
<span class="el-icon-refresh"></span>
|
|
42
|
-
</a>
|
|
43
|
-
<a @click="preservation" class="magnify-btn" title="保存">
|
|
44
|
-
<span class="el-icon-check"></span>
|
|
45
|
-
</a>
|
|
46
|
-
|
|
47
22
|
</div>
|
|
48
23
|
</div>
|
|
49
24
|
<div class="stream-total-tips" v-if="progressFlag">
|
|
@@ -66,8 +41,8 @@
|
|
|
66
41
|
props: {
|
|
67
42
|
file: Object,
|
|
68
43
|
api: String,
|
|
69
|
-
minWidth:
|
|
70
|
-
minHeight:
|
|
44
|
+
minWidth: String,
|
|
45
|
+
minHeight: String
|
|
71
46
|
},
|
|
72
47
|
data() {
|
|
73
48
|
return {
|
|
@@ -93,6 +68,54 @@
|
|
|
93
68
|
nt: 0,
|
|
94
69
|
ratio: 0,
|
|
95
70
|
cropBoxResizable: false,
|
|
71
|
+
bntindex:-1,
|
|
72
|
+
bntList: [
|
|
73
|
+
{
|
|
74
|
+
name: "左旋转",
|
|
75
|
+
ico: "el-icon-refresh-left",
|
|
76
|
+
key:"rotLeft",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "右旋转",
|
|
80
|
+
ico: "el-icon-refresh-right",
|
|
81
|
+
key: "rotRight",
|
|
82
|
+
},
|
|
83
|
+
//{
|
|
84
|
+
// name: "裁剪",
|
|
85
|
+
// ico: "el-icon-crop",
|
|
86
|
+
// key: "Crop",
|
|
87
|
+
//},
|
|
88
|
+
{
|
|
89
|
+
name: "拖动",
|
|
90
|
+
ico: "el-icon-rank",
|
|
91
|
+
key: "Drag",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "涂抹",
|
|
95
|
+
ico: "el-icon-brush",
|
|
96
|
+
key: "Apply",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "放大",
|
|
100
|
+
ico: "el-icon-zoom-in",
|
|
101
|
+
key: "enlarge",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "缩小",
|
|
105
|
+
ico: "el-icon-zoom-out",
|
|
106
|
+
key: "narrow",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "清除",
|
|
110
|
+
ico: "el-icon-refresh",
|
|
111
|
+
key: "clear",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "保存",
|
|
115
|
+
ico: "el-icon-check",
|
|
116
|
+
key: "preservation",
|
|
117
|
+
},
|
|
118
|
+
],
|
|
96
119
|
}
|
|
97
120
|
},
|
|
98
121
|
computed: {
|
|
@@ -234,6 +257,23 @@
|
|
|
234
257
|
}
|
|
235
258
|
this.isActive = false;
|
|
236
259
|
},
|
|
260
|
+
handleClick(key, index) {
|
|
261
|
+
this.bntindex = index;
|
|
262
|
+
this.canMove = false;
|
|
263
|
+
this.PaintMove = false;
|
|
264
|
+
this.isActive = false;
|
|
265
|
+
switch (key) {
|
|
266
|
+
case "rotLeft": this.rotLeft(); break;
|
|
267
|
+
case "rotRight": this.rotRight(); break;
|
|
268
|
+
case "enlarge": this.scaleDom(this.canvas, "+");; break;
|
|
269
|
+
case "narrow": this.scaleDom(this.canvas, "-");; break;
|
|
270
|
+
case "Crop": this.Crop(); break;
|
|
271
|
+
case "Drag": this.Drag(); break;
|
|
272
|
+
case "Apply": this.Apply(); break;
|
|
273
|
+
case "clear": this.clear(); break;
|
|
274
|
+
case "preservation": this.preservation(); break;
|
|
275
|
+
}
|
|
276
|
+
},
|
|
237
277
|
|
|
238
278
|
enlarge() {
|
|
239
279
|
this.scaleDom(this.canvas, "+");
|
|
@@ -315,14 +355,20 @@
|
|
|
315
355
|
let _this = this
|
|
316
356
|
this.drawCanv()
|
|
317
357
|
this.croppShow = true
|
|
358
|
+
var w;
|
|
359
|
+
var h;
|
|
360
|
+
if (typeof this.minWidth !== 'undefined' && typeof this.minWidth !== 'undefined') {
|
|
361
|
+
w = parseInt(this.minWidth)
|
|
362
|
+
h = parseInt(this.minHeight);
|
|
363
|
+
}
|
|
318
364
|
let cropper = new Cropper(this.$refs.canvas, {
|
|
319
365
|
checkCrossOrigin: true,
|
|
320
366
|
viewMode: 1,
|
|
321
367
|
dragMode: 'move',
|
|
322
368
|
cropBoxResizable: _this.cropBoxResizable,
|
|
323
369
|
data: {
|
|
324
|
-
width:
|
|
325
|
-
height:
|
|
370
|
+
width: w,
|
|
371
|
+
height: h
|
|
326
372
|
},
|
|
327
373
|
zoom(e) {
|
|
328
374
|
if (_this.ratio == 0) {
|
|
@@ -370,6 +416,9 @@
|
|
|
370
416
|
this.rot = 0;
|
|
371
417
|
this.nl = 0;
|
|
372
418
|
this.nt = 0;
|
|
419
|
+
this.canMove = false;
|
|
420
|
+
this.PaintMove = false;
|
|
421
|
+
this.isActive = false;
|
|
373
422
|
this.scaleDom(this.canvas, "");
|
|
374
423
|
this.rotate(this.canvas, this.imgObj, this.rot);
|
|
375
424
|
},
|
|
@@ -575,9 +624,13 @@
|
|
|
575
624
|
font-size: 24px;
|
|
576
625
|
cursor: pointer;
|
|
577
626
|
}
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
627
|
+
.picedit-toolbar .active {
|
|
628
|
+
background-color: #fff;
|
|
629
|
+
color:#333;
|
|
630
|
+
}
|
|
631
|
+
.rc-cropper {
|
|
632
|
+
position: relative;
|
|
633
|
+
}
|
|
581
634
|
|
|
582
635
|
.rc-cropper__iconCrop1 {
|
|
583
636
|
position: absolute;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<template v-if="model.type==51">
|
|
5
5
|
<el-upload :class="disableUpload ? 'ct-upload-display-none' : ''"
|
|
6
6
|
:http-request="SliceUpload"
|
|
7
|
+
ref="upload"
|
|
7
8
|
:disabled="model.lock"
|
|
8
9
|
:accept="model.fileAccept"
|
|
9
10
|
:on-change="handleChange"
|
|
@@ -21,8 +22,8 @@
|
|
|
21
22
|
:limit="parseInt(model.max || 999)"
|
|
22
23
|
:on-exceed="handleExceed">
|
|
23
24
|
<i slot="default" class="el-icon-plus"></i>
|
|
24
|
-
<div slot="tip" class="el-upload__tip errorMessage" v-show="!valid">
|
|
25
|
-
|
|
25
|
+
<div slot="tip" class="el-upload__tip errorMessage" style="white-space:pre-wrap;" v-show="!valid" v-html="validMessage">
|
|
26
|
+
|
|
26
27
|
</div>
|
|
27
28
|
<div slot="tip" v-show="model.description" v-html="model.description">
|
|
28
29
|
</div>
|
|
@@ -90,6 +91,7 @@
|
|
|
90
91
|
<!-- 官方上传 -->
|
|
91
92
|
<template v-else>
|
|
92
93
|
<el-upload :class="disableUpload ? 'ct-upload-display-none' : ''"
|
|
94
|
+
ref="upload"
|
|
93
95
|
:disabled="model.lock"
|
|
94
96
|
:accept="model.fileAccept"
|
|
95
97
|
:on-change="handleChange"
|
|
@@ -107,8 +109,8 @@
|
|
|
107
109
|
:limit="parseInt(model.max || 999)"
|
|
108
110
|
:on-exceed="handleExceed">
|
|
109
111
|
<i slot="default" class="el-icon-plus"></i>
|
|
110
|
-
<div slot="tip" class="el-upload__tip errorMessage" v-show="!valid">
|
|
111
|
-
|
|
112
|
+
<div slot="tip" class="el-upload__tip errorMessage" style="white-space:pre-wrap;" v-show="!valid" v-html="validMessage">
|
|
113
|
+
|
|
112
114
|
</div>
|
|
113
115
|
<div slot="tip" v-show="model.description" v-html="model.description">
|
|
114
116
|
</div>
|
|
@@ -334,9 +336,10 @@
|
|
|
334
336
|
this.changeHandler(this.model.value);
|
|
335
337
|
},
|
|
336
338
|
//上传之前的钩子
|
|
337
|
-
beforeUploadProcess(
|
|
339
|
+
beforeUploadProcess(file) {
|
|
338
340
|
return true;
|
|
339
341
|
},
|
|
342
|
+
|
|
340
343
|
//文件上传时的钩子
|
|
341
344
|
uploadProcess(event, file, fileList) {
|
|
342
345
|
file.progressFlag = true; // 显示进度条
|
|
@@ -394,6 +397,8 @@
|
|
|
394
397
|
return false;
|
|
395
398
|
}
|
|
396
399
|
}
|
|
400
|
+
|
|
401
|
+
|
|
397
402
|
if (this.model.rightDefault && this.model.rightDefault == 1 && eventName == "valid") {
|
|
398
403
|
if (this.model.getfileDefault() <= 0) {
|
|
399
404
|
this.validMessage = "请设置默认封面";
|
|
@@ -406,7 +411,54 @@
|
|
|
406
411
|
this.valid = false;
|
|
407
412
|
return false;
|
|
408
413
|
}
|
|
409
|
-
|
|
414
|
+
if (typeof this.model.min2 !== 'undefined' || typeof this.model.max2 !== 'undefined') {
|
|
415
|
+
var flagSize = true;
|
|
416
|
+
this.validMessage = "";
|
|
417
|
+
this.model.fileList.forEach((v, index) => {
|
|
418
|
+
var flagw = true;
|
|
419
|
+
var flagh = true;
|
|
420
|
+
if (typeof this.model.min2 !== 'undefined' && typeof v.width!== 'undefined') {
|
|
421
|
+
if (v.width < parseInt(this.model.min2)) {
|
|
422
|
+
flagSize = false;
|
|
423
|
+
flagw = false;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
if (typeof this.model.max2 !== 'undefined' && typeof v.height !== 'undefined') {
|
|
427
|
+
if (v.height < parseInt(this.model.max2)) {
|
|
428
|
+
flagSize = false;
|
|
429
|
+
flagh = false;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
if (!flagw || !flagh) {
|
|
433
|
+
this.validMessage = this.validMessage+"第" + (index + 1) + "张图片";
|
|
434
|
+
if (!flagw && !flagh) {
|
|
435
|
+
this.validMessage = this.validMessage + "宽高不符合标准";
|
|
436
|
+
}
|
|
437
|
+
else if (!flagw) {
|
|
438
|
+
this.validMessage = this.validMessage + "宽度不符合标准";
|
|
439
|
+
}
|
|
440
|
+
else if (!flagh) {
|
|
441
|
+
this.validMessage = this.validMessage + "高度不符合标准";
|
|
442
|
+
}
|
|
443
|
+
this.validMessage = this.validMessage + ",上传图片";
|
|
444
|
+
if (typeof this.model.min2 !== 'undefined') {
|
|
445
|
+
this.validMessage = this.validMessage + "宽度不小于" + this.model.min2 + "px ";
|
|
446
|
+
}
|
|
447
|
+
if (typeof this.model.max2 !== 'undefined') {
|
|
448
|
+
this.validMessage = this.validMessage + "高度不小于" + this.model.max2 + "px ";
|
|
449
|
+
}
|
|
450
|
+
this.validMessage = this.validMessage + "\r\n";
|
|
451
|
+
if (this.$refs.upload) {
|
|
452
|
+
this.$refs.upload.$el.children[0].children[index].style.border = "1px solid #ff0000";
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
})
|
|
456
|
+
if (!flagSize) {
|
|
457
|
+
this.valid = false;
|
|
458
|
+
return false;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
410
462
|
this.valid = true;
|
|
411
463
|
return this.valid;
|
|
412
464
|
},
|
|
@@ -677,5 +729,4 @@
|
|
|
677
729
|
left: 50%;
|
|
678
730
|
transform: translate(-50%, -50%);
|
|
679
731
|
}
|
|
680
|
-
|
|
681
732
|
</style>
|
|
@@ -285,6 +285,15 @@ const Detail = function (source, para, callBack) {
|
|
|
285
285
|
}
|
|
286
286
|
return routerPrice;
|
|
287
287
|
},
|
|
288
|
+
get actionRouterEstate() {
|
|
289
|
+
let routerPrice = null;
|
|
290
|
+
if (rtn.actionRoutersAll) {
|
|
291
|
+
rtn.actionRoutersAll.forEach((v, i) => {
|
|
292
|
+
if (v.id == 'browseEstate') routerPrice = v;
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
return routerPrice;
|
|
296
|
+
},
|
|
288
297
|
get actionRouterFavorite() {
|
|
289
298
|
if (rtn._actionRouterFavorite !== null) {
|
|
290
299
|
return rtn._actionRouterFavorite;
|
|
@@ -271,6 +271,7 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
271
271
|
fileSourceList.push(res.content[0]);
|
|
272
272
|
var data = rtn.getFileData(res.content[0]);
|
|
273
273
|
|
|
274
|
+
|
|
274
275
|
Vue.set(file, "url", data.url);
|
|
275
276
|
Vue.set(file, "source", data.source);
|
|
276
277
|
Vue.set(file, "mediaUrl", data.mediaUrl);
|
|
@@ -333,11 +334,21 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
333
334
|
}
|
|
334
335
|
rtn.fileList.push(awaitfile);
|
|
335
336
|
},
|
|
336
|
-
|
|
337
|
-
|
|
337
|
+
imgFn(url) {
|
|
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) {
|
|
338
347
|
if (res.rtnCode === Enum.ReturnCode.Successful) {
|
|
339
348
|
//下面的方式绑定,会有一些问题 todo 不强与页面关联
|
|
340
349
|
var data = {};
|
|
350
|
+
var w;
|
|
351
|
+
var h;
|
|
341
352
|
if (res.content.finished == 1) {
|
|
342
353
|
//下面的方式绑定,会有一些问题 todo 不强与页面关联
|
|
343
354
|
fileSourceList.push(res.content.media);
|
|
@@ -345,7 +356,11 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
345
356
|
data = rtn.getFileData(res.content.media);
|
|
346
357
|
data.progressFlag = false;
|
|
347
358
|
data.loadProgress = 100;
|
|
348
|
-
|
|
359
|
+
const img = await this.imgFn(data.mediaUrl);
|
|
360
|
+
w = img.width;
|
|
361
|
+
h = img.height ;
|
|
362
|
+
Vue.set(file, "width", w);
|
|
363
|
+
Vue.set(file, "height", h);
|
|
349
364
|
Vue.set(file, "url", data.url);
|
|
350
365
|
Vue.set(file, "source", data.source);
|
|
351
366
|
Vue.set(file, "mediaUrl", data.mediaUrl);
|
|
@@ -377,6 +392,8 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
377
392
|
if (i === -1) return;
|
|
378
393
|
|
|
379
394
|
Vue.set(rtn.fileList, i, {
|
|
395
|
+
width: w,
|
|
396
|
+
height: h,
|
|
380
397
|
url: data.url,
|
|
381
398
|
source: data.source,
|
|
382
399
|
mediaUrl: data.mediaUrl,
|
package/src/main.js
CHANGED
|
@@ -44,7 +44,7 @@ Vue.use(centaline, {
|
|
|
44
44
|
getRequestHeaders: function () {
|
|
45
45
|
return {
|
|
46
46
|
oldToken: '3ba3f510-93fd-4103-9249-73c13f3f6fc2',
|
|
47
|
-
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.
|
|
47
|
+
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjrEOgkAQRP9lazZxYbndo9MDGz-C3MFdgpURSDTGfxcjdPS-4hWTTGZeMM4BKpAV3NFGa1dwRxstEVsh0-DRikM2XKCSU3RsHJ_rpnCnGjKIjxtUZERKVrWSweCnX8Am528wj_F-ic9_nLtOwzLrOXYqYvEQksWlGNBT2SHHlKSn3Ide4f0BAAD__w.HOklRNVaTrByviaFzKXmF9LGELoOvSJiutmh3TyQoyM',
|
|
48
48
|
|
|
49
49
|
originalRequestURL: 'http://10.88.22.67:8080',
|
|
50
50
|
EstateInfo: '{"estateId":"FAF029E8-EC28-4297-83CF-B8FFD826DB91","estateName":"AABBCC"}',
|