centaline-data-driven 1.4.60 → 1.4.62
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 +112 -67
- 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 +22 -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,37 +16,12 @@
|
|
|
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
|
-
<div class="stream-total-tips"
|
|
24
|
+
<div class="stream-total-tips" v-if="progressFlag">
|
|
50
25
|
<el-progress type="circle"
|
|
51
26
|
:percentage="typeof loadProgress !== 'undefined' && loadProgress !== null ? loadProgress : 0.00"
|
|
52
27
|
:width="150" :height="150" class="file-cirle"></el-progress>
|
|
@@ -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 {
|
|
@@ -83,6 +58,9 @@
|
|
|
83
58
|
canMove: false,
|
|
84
59
|
PaintMove: false,
|
|
85
60
|
isActive: false,
|
|
61
|
+
bodywidth: 0,
|
|
62
|
+
bodyheight: 0,
|
|
63
|
+
scale:1,
|
|
86
64
|
tx: 0,
|
|
87
65
|
ty: 0,
|
|
88
66
|
tl: 0,
|
|
@@ -93,6 +71,54 @@
|
|
|
93
71
|
nt: 0,
|
|
94
72
|
ratio: 0,
|
|
95
73
|
cropBoxResizable: false,
|
|
74
|
+
bntindex:-1,
|
|
75
|
+
bntList: [
|
|
76
|
+
{
|
|
77
|
+
name: "左旋转",
|
|
78
|
+
ico: "el-icon-refresh-left",
|
|
79
|
+
key:"rotLeft",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "右旋转",
|
|
83
|
+
ico: "el-icon-refresh-right",
|
|
84
|
+
key: "rotRight",
|
|
85
|
+
},
|
|
86
|
+
//{
|
|
87
|
+
// name: "裁剪",
|
|
88
|
+
// ico: "el-icon-crop",
|
|
89
|
+
// key: "Crop",
|
|
90
|
+
//},
|
|
91
|
+
{
|
|
92
|
+
name: "拖动",
|
|
93
|
+
ico: "el-icon-rank",
|
|
94
|
+
key: "Drag",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "涂抹",
|
|
98
|
+
ico: "el-icon-brush",
|
|
99
|
+
key: "Apply",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "放大",
|
|
103
|
+
ico: "el-icon-zoom-in",
|
|
104
|
+
key: "enlarge",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "缩小",
|
|
108
|
+
ico: "el-icon-zoom-out",
|
|
109
|
+
key: "narrow",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "清除",
|
|
113
|
+
ico: "el-icon-refresh",
|
|
114
|
+
key: "clear",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "保存",
|
|
118
|
+
ico: "el-icon-check",
|
|
119
|
+
key: "preservation",
|
|
120
|
+
},
|
|
121
|
+
],
|
|
96
122
|
}
|
|
97
123
|
},
|
|
98
124
|
computed: {
|
|
@@ -101,6 +127,10 @@
|
|
|
101
127
|
mounted() {
|
|
102
128
|
this.progressFlag = false;
|
|
103
129
|
this.loadProgress = 0;
|
|
130
|
+
var width = parseInt(window.document.body.clientWidth * 0.8);
|
|
131
|
+
width = width > 1160 ? 1160 : width;
|
|
132
|
+
this.bodywidth = width;
|
|
133
|
+
this.bodyheight = parseInt(window.document.body.clientHeight * 0.8);
|
|
104
134
|
if (typeof this.minWidth == 'undefined' || typeof this.minWidth == 'undefined') {
|
|
105
135
|
this.cropBoxResizable = true;
|
|
106
136
|
}
|
|
@@ -130,25 +160,23 @@
|
|
|
130
160
|
_this.canvas.width = naturalWidth;
|
|
131
161
|
_this.canvas.height = naturalHeight;
|
|
132
162
|
_this.ctx.drawImage(_this.imgObj, 0, 0, naturalWidth, naturalHeight)
|
|
133
|
-
|
|
134
|
-
var
|
|
135
|
-
var scalew = 900 / _this.imgObj.width;
|
|
136
|
-
var scaleh = window.document.body.clientHeight / _this.imgObj.height;
|
|
163
|
+
var scalew = _this.bodywidth / _this.imgObj.width;
|
|
164
|
+
var scaleh = _this.bodyheight / _this.imgObj.height;
|
|
137
165
|
if (scalew < 1 && scaleh < 1) {
|
|
138
166
|
if (scalew < scaleh) {
|
|
139
|
-
scale = scalew;
|
|
167
|
+
_this.scale = scalew;
|
|
140
168
|
}
|
|
141
169
|
else {
|
|
142
|
-
scale = scaleh;
|
|
170
|
+
_this.scale = scaleh;
|
|
143
171
|
}
|
|
144
172
|
}
|
|
145
173
|
else if (scalew > 1 && scaleh < 1) {
|
|
146
|
-
scale = scaleh;
|
|
174
|
+
_this.scale = scaleh;
|
|
147
175
|
}
|
|
148
176
|
else if (scalew < 1 && scaleh > 1) {
|
|
149
|
-
scale = scalew;
|
|
177
|
+
_this.scale = scalew;
|
|
150
178
|
}
|
|
151
|
-
_this.scaleDomSize(_this.canvas
|
|
179
|
+
_this.scaleDomSize(_this.canvas);
|
|
152
180
|
}
|
|
153
181
|
this.canvas.addEventListener("pointerdown", _this.startDraw, false);
|
|
154
182
|
this.canvas.addEventListener("pointermove", _this.draw, false);
|
|
@@ -234,6 +262,23 @@
|
|
|
234
262
|
}
|
|
235
263
|
this.isActive = false;
|
|
236
264
|
},
|
|
265
|
+
handleClick(key, index) {
|
|
266
|
+
this.bntindex = index;
|
|
267
|
+
this.canMove = false;
|
|
268
|
+
this.PaintMove = false;
|
|
269
|
+
this.isActive = false;
|
|
270
|
+
switch (key) {
|
|
271
|
+
case "rotLeft": this.rotLeft(); break;
|
|
272
|
+
case "rotRight": this.rotRight(); break;
|
|
273
|
+
case "enlarge": this.scaleDom(this.canvas, "+");; break;
|
|
274
|
+
case "narrow": this.scaleDom(this.canvas, "-");; break;
|
|
275
|
+
case "Crop": this.Crop(); break;
|
|
276
|
+
case "Drag": this.Drag(); break;
|
|
277
|
+
case "Apply": this.Apply(); break;
|
|
278
|
+
case "clear": this.clear(); break;
|
|
279
|
+
case "preservation": this.preservation(); break;
|
|
280
|
+
}
|
|
281
|
+
},
|
|
237
282
|
|
|
238
283
|
enlarge() {
|
|
239
284
|
this.scaleDom(this.canvas, "+");
|
|
@@ -243,25 +288,15 @@
|
|
|
243
288
|
},
|
|
244
289
|
//放大缩小
|
|
245
290
|
scaleDom(canvas, type) {
|
|
246
|
-
let scale = parseFloat((canvas.style.transform || `scale(1)`).replace(/[^0-9.]/gi, ''))
|
|
247
291
|
if (type == "-") {
|
|
248
|
-
scale += -0.1;
|
|
249
|
-
if ((scale <= 1 && canvas.width > 900) || (scale <= 1 && canvas.height > (window.document.body.clientHeight))) {
|
|
250
|
-
canvas.style.left = - canvas.width * 0.05 * ((1 - scale) * 10) + 'px';
|
|
251
|
-
canvas.style.top = -canvas.height * 0.05 * ((1 - scale) * 10) + 'px';
|
|
252
|
-
}
|
|
292
|
+
this.scale += -0.1;
|
|
253
293
|
} else if (type == "+") {
|
|
254
|
-
scale += 0.1;
|
|
255
|
-
if ((scale <= 1 && canvas.width > 900) || (scale <= 1 && canvas.height > (window.document.body.clientHeight))) {
|
|
256
|
-
canvas.style.left = - canvas.width * 0.05 * ((1 - scale) * 10) + 'px';
|
|
257
|
-
canvas.style.top = -canvas.height * 0.05 * ((1 - scale) * 10) + 'px';
|
|
258
|
-
}
|
|
294
|
+
this.scale += 0.1;
|
|
259
295
|
}
|
|
260
296
|
else {
|
|
261
|
-
scale = 1;
|
|
297
|
+
this.scale = 1;
|
|
262
298
|
}
|
|
263
|
-
|
|
264
|
-
|
|
299
|
+
this.scaleDomSize(canvas);
|
|
265
300
|
},
|
|
266
301
|
rotLeft() {
|
|
267
302
|
this.rot -= 90;
|
|
@@ -310,19 +345,26 @@
|
|
|
310
345
|
context.drawImage(img, 0, 0, w, h);
|
|
311
346
|
context.restore();
|
|
312
347
|
img.style.display = "none";
|
|
348
|
+
this.scaleDomSize(canvas);
|
|
313
349
|
},
|
|
314
350
|
Crop() {
|
|
315
351
|
let _this = this
|
|
316
352
|
this.drawCanv()
|
|
317
353
|
this.croppShow = true
|
|
354
|
+
var w;
|
|
355
|
+
var h;
|
|
356
|
+
if (typeof this.minWidth !== 'undefined' && typeof this.minWidth !== 'undefined') {
|
|
357
|
+
w = parseInt(this.minWidth)
|
|
358
|
+
h = parseInt(this.minHeight);
|
|
359
|
+
}
|
|
318
360
|
let cropper = new Cropper(this.$refs.canvas, {
|
|
319
361
|
checkCrossOrigin: true,
|
|
320
362
|
viewMode: 1,
|
|
321
363
|
dragMode: 'move',
|
|
322
364
|
cropBoxResizable: _this.cropBoxResizable,
|
|
323
365
|
data: {
|
|
324
|
-
width:
|
|
325
|
-
height:
|
|
366
|
+
width: w,
|
|
367
|
+
height: h
|
|
326
368
|
},
|
|
327
369
|
zoom(e) {
|
|
328
370
|
if (_this.ratio == 0) {
|
|
@@ -365,20 +407,19 @@
|
|
|
365
407
|
clear() {
|
|
366
408
|
this.drawCanv();
|
|
367
409
|
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
368
|
-
this.canvas.style.left = '0px';
|
|
369
|
-
this.canvas.style.top = '0px';
|
|
370
410
|
this.rot = 0;
|
|
371
411
|
this.nl = 0;
|
|
372
412
|
this.nt = 0;
|
|
413
|
+
this.canMove = false;
|
|
414
|
+
this.PaintMove = false;
|
|
415
|
+
this.isActive = false;
|
|
373
416
|
this.scaleDom(this.canvas, "");
|
|
374
417
|
this.rotate(this.canvas, this.imgObj, this.rot);
|
|
375
418
|
},
|
|
376
|
-
scaleDomSize(canvas
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
if (scale >= 0.1) canvas.style.transform = `scale(${scale})`;
|
|
419
|
+
scaleDomSize(canvas) {
|
|
420
|
+
canvas.style.transform = `scale(${this.scale})`;
|
|
421
|
+
canvas.style.left = (- canvas.width * 0.05 * ((1 - this.scale) * 10)) + ((this.bodywidth - canvas.width * this.scale) / 2) + 'px';
|
|
422
|
+
canvas.style.top = (-canvas.height * 0.05 * ((1 - this.scale) * 10)) + ((this.bodyheight - canvas.height * this.scale) / 2) + 'px';
|
|
382
423
|
},
|
|
383
424
|
async preservation() {
|
|
384
425
|
this.progressFlag = true;
|
|
@@ -575,9 +616,13 @@
|
|
|
575
616
|
font-size: 24px;
|
|
576
617
|
cursor: pointer;
|
|
577
618
|
}
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
619
|
+
.picedit-toolbar .active {
|
|
620
|
+
background-color: #fff;
|
|
621
|
+
color:#333;
|
|
622
|
+
}
|
|
623
|
+
.rc-cropper {
|
|
624
|
+
position: relative;
|
|
625
|
+
}
|
|
581
626
|
|
|
582
627
|
.rc-cropper__iconCrop1 {
|
|
583
628
|
position: absolute;
|
|
@@ -596,7 +641,7 @@
|
|
|
596
641
|
.stream-total-tips {
|
|
597
642
|
position: fixed;
|
|
598
643
|
top: 40%;
|
|
599
|
-
left:
|
|
644
|
+
left: 45%;
|
|
600
645
|
z-index: 9999;
|
|
601
646
|
}
|
|
602
647
|
|
|
@@ -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,13 @@ 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
|
+
if (data.mediaTypeID == 2) {
|
|
360
|
+
const img = await this.imgFn(data.mediaUrl);
|
|
361
|
+
w = img.width;
|
|
362
|
+
h = img.height;
|
|
363
|
+
}
|
|
364
|
+
Vue.set(file, "width", w);
|
|
365
|
+
Vue.set(file, "height", h);
|
|
349
366
|
Vue.set(file, "url", data.url);
|
|
350
367
|
Vue.set(file, "source", data.source);
|
|
351
368
|
Vue.set(file, "mediaUrl", data.mediaUrl);
|
|
@@ -377,6 +394,8 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
377
394
|
if (i === -1) return;
|
|
378
395
|
|
|
379
396
|
Vue.set(rtn.fileList, i, {
|
|
397
|
+
width: w,
|
|
398
|
+
height: h,
|
|
380
399
|
url: data.url,
|
|
381
400
|
source: data.source,
|
|
382
401
|
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"}',
|