centaline-data-driven 1.4.59 → 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 +100 -48
- package/src/centaline/dynamicFile/src/dynamicFile.vue +58 -8
- 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");
|
|
@@ -1,49 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<div class="
|
|
2
|
+
<div class="picedit-modal" style="width:100%; height:100%;background-color: #1e1e1e">
|
|
3
|
+
<div class="picedit-stage">
|
|
4
4
|
<canvas id="drawCanvas" ref="canvas" style="position:absolute;"></canvas>
|
|
5
5
|
</div>
|
|
6
|
-
<div class="
|
|
6
|
+
<div class="picedit-Original" v-if="flagOriginal">
|
|
7
7
|
<el-row>
|
|
8
8
|
<el-button type="success" @click="Original()">原图</el-button>
|
|
9
9
|
</el-row>
|
|
10
10
|
</div>
|
|
11
|
-
<div class="
|
|
11
|
+
<div class="picedit-cropper" v-if="croppShow">
|
|
12
12
|
<el-row>
|
|
13
13
|
<el-button type="success" @click="sureCropper()"><i class="el-icon-check"></i></el-button>
|
|
14
14
|
<el-button type="primary" @click="cancelCropper()"><i class="el-icon-close"></i></el-button>
|
|
15
15
|
</el-row>
|
|
16
16
|
</div>
|
|
17
|
-
<div class="
|
|
18
|
-
<div class="
|
|
19
|
-
<a @click="
|
|
20
|
-
<span class="
|
|
17
|
+
<div class="picedit-footer" v-else>
|
|
18
|
+
<div class="picedit-toolbar">
|
|
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: {
|
|
@@ -107,7 +130,6 @@
|
|
|
107
130
|
if (typeof this.file.originalSavedFileName !== 'undefined' && this.file.originalSavedFileName !== this.file.savedFileName) {
|
|
108
131
|
this.flagOriginal = true;
|
|
109
132
|
}
|
|
110
|
-
console.log(this.file);
|
|
111
133
|
this.drawCanv();
|
|
112
134
|
},
|
|
113
135
|
methods: {
|
|
@@ -235,6 +257,23 @@
|
|
|
235
257
|
}
|
|
236
258
|
this.isActive = false;
|
|
237
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
|
+
},
|
|
238
277
|
|
|
239
278
|
enlarge() {
|
|
240
279
|
this.scaleDom(this.canvas, "+");
|
|
@@ -316,14 +355,20 @@
|
|
|
316
355
|
let _this = this
|
|
317
356
|
this.drawCanv()
|
|
318
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
|
+
}
|
|
319
364
|
let cropper = new Cropper(this.$refs.canvas, {
|
|
320
365
|
checkCrossOrigin: true,
|
|
321
366
|
viewMode: 1,
|
|
322
367
|
dragMode: 'move',
|
|
323
368
|
cropBoxResizable: _this.cropBoxResizable,
|
|
324
369
|
data: {
|
|
325
|
-
width:
|
|
326
|
-
height:
|
|
370
|
+
width: w,
|
|
371
|
+
height: h
|
|
327
372
|
},
|
|
328
373
|
zoom(e) {
|
|
329
374
|
if (_this.ratio == 0) {
|
|
@@ -371,6 +416,9 @@
|
|
|
371
416
|
this.rot = 0;
|
|
372
417
|
this.nl = 0;
|
|
373
418
|
this.nt = 0;
|
|
419
|
+
this.canMove = false;
|
|
420
|
+
this.PaintMove = false;
|
|
421
|
+
this.isActive = false;
|
|
374
422
|
this.scaleDom(this.canvas, "");
|
|
375
423
|
this.rotate(this.canvas, this.imgObj, this.rot);
|
|
376
424
|
},
|
|
@@ -520,7 +568,7 @@
|
|
|
520
568
|
};
|
|
521
569
|
</script>
|
|
522
570
|
<style>
|
|
523
|
-
.
|
|
571
|
+
.picedit-stage {
|
|
524
572
|
position: absolute;
|
|
525
573
|
left: 0;
|
|
526
574
|
right: 0;
|
|
@@ -530,7 +578,7 @@
|
|
|
530
578
|
overflow: hidden;
|
|
531
579
|
}
|
|
532
580
|
|
|
533
|
-
.
|
|
581
|
+
.picedit-footer {
|
|
534
582
|
height: 50px;
|
|
535
583
|
bottom: 0;
|
|
536
584
|
position: absolute;
|
|
@@ -539,7 +587,7 @@
|
|
|
539
587
|
color: #fff;
|
|
540
588
|
z-index: 9;
|
|
541
589
|
}
|
|
542
|
-
.
|
|
590
|
+
.picedit-cropper {
|
|
543
591
|
height: 50px;
|
|
544
592
|
bottom: 0;
|
|
545
593
|
position: absolute;
|
|
@@ -548,15 +596,15 @@
|
|
|
548
596
|
color: #fff;
|
|
549
597
|
z-index: 9;
|
|
550
598
|
}
|
|
551
|
-
.
|
|
599
|
+
.picedit-Original {
|
|
552
600
|
height: 50px;
|
|
553
601
|
top: 50px;
|
|
554
|
-
right:20px;
|
|
602
|
+
right: 20px;
|
|
555
603
|
position: absolute;
|
|
556
604
|
color: #fff;
|
|
557
605
|
z-index: 9;
|
|
558
606
|
}
|
|
559
|
-
.
|
|
607
|
+
.picedit-toolbar {
|
|
560
608
|
display: inline-block;
|
|
561
609
|
height: 50px;
|
|
562
610
|
background-color: rgba(0, 0, 0, .5);
|
|
@@ -565,7 +613,7 @@
|
|
|
565
613
|
border-radius: 5px 5px 0 0;
|
|
566
614
|
}
|
|
567
615
|
|
|
568
|
-
.
|
|
616
|
+
.picedit-toolbar .magnify-btn {
|
|
569
617
|
display: inline-block;
|
|
570
618
|
width: 50px;
|
|
571
619
|
height: 50px;
|
|
@@ -576,9 +624,13 @@
|
|
|
576
624
|
font-size: 24px;
|
|
577
625
|
cursor: pointer;
|
|
578
626
|
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
627
|
+
.picedit-toolbar .active {
|
|
628
|
+
background-color: #fff;
|
|
629
|
+
color:#333;
|
|
630
|
+
}
|
|
631
|
+
.rc-cropper {
|
|
632
|
+
position: relative;
|
|
633
|
+
}
|
|
582
634
|
|
|
583
635
|
.rc-cropper__iconCrop1 {
|
|
584
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>
|
|
@@ -290,7 +292,6 @@
|
|
|
290
292
|
self.$nextTick(function () {
|
|
291
293
|
this.model.updateFile(file);
|
|
292
294
|
self.$common.closeDialog(dialogOption.dialog);
|
|
293
|
-
console.log(this.model.fileList);
|
|
294
295
|
});
|
|
295
296
|
},
|
|
296
297
|
},
|
|
@@ -335,9 +336,10 @@
|
|
|
335
336
|
this.changeHandler(this.model.value);
|
|
336
337
|
},
|
|
337
338
|
//上传之前的钩子
|
|
338
|
-
beforeUploadProcess(
|
|
339
|
+
beforeUploadProcess(file) {
|
|
339
340
|
return true;
|
|
340
341
|
},
|
|
342
|
+
|
|
341
343
|
//文件上传时的钩子
|
|
342
344
|
uploadProcess(event, file, fileList) {
|
|
343
345
|
file.progressFlag = true; // 显示进度条
|
|
@@ -395,6 +397,8 @@
|
|
|
395
397
|
return false;
|
|
396
398
|
}
|
|
397
399
|
}
|
|
400
|
+
|
|
401
|
+
|
|
398
402
|
if (this.model.rightDefault && this.model.rightDefault == 1 && eventName == "valid") {
|
|
399
403
|
if (this.model.getfileDefault() <= 0) {
|
|
400
404
|
this.validMessage = "请设置默认封面";
|
|
@@ -407,7 +411,54 @@
|
|
|
407
411
|
this.valid = false;
|
|
408
412
|
return false;
|
|
409
413
|
}
|
|
410
|
-
|
|
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
|
+
|
|
411
462
|
this.valid = true;
|
|
412
463
|
return this.valid;
|
|
413
464
|
},
|
|
@@ -678,5 +729,4 @@
|
|
|
678
729
|
left: 50%;
|
|
679
730
|
transform: translate(-50%, -50%);
|
|
680
731
|
}
|
|
681
|
-
|
|
682
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"}',
|