centaline-data-driven 1.4.63 → 1.4.65

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.4.63",
3
+ "version": "1.4.65",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -161,7 +161,8 @@
161
161
  height: true,
162
162
  infoTrue: true, // true 为展示真实输出图片宽高 false 展示看到的截图框宽高
163
163
  enlarge: 1, // 图片根据截图框输出比例倍数
164
- //mode: 'cover', // 图片默认渲染方式
164
+ mode: 'cover', // 图片默认渲染方式
165
+ maxImgSize: 6000 // 限制图片最大宽度和高度
165
166
  },
166
167
  }
167
168
  },
@@ -175,9 +176,6 @@
175
176
  width = width > 1160 ? 1160 : width;
176
177
  this.bodywidth = width;
177
178
  this.bodyheight = parseInt(window.document.body.clientHeight * 0.8);
178
- if (typeof this.minWidth !== 'undefined' && typeof this.minWidth !== 'undefined') {
179
- this.cropBoxResizable = true;
180
- }
181
179
  if (typeof this.file.originalSavedFileName !== 'undefined' && this.file.originalSavedFileName !== this.file.savedFileName) {
182
180
  this.flagOriginal = true;
183
181
  }
@@ -226,8 +224,19 @@
226
224
  this.canvas.addEventListener("pointermove", _this.draw, false);
227
225
  this.canvas.addEventListener("pointerup", _this.endDraw, false);
228
226
  this.canvas.addEventListener("pointerout", _this.outdraw, false);
227
+ this.canvas.addEventListener("mousewheel", _this.onMousewheel, false);
229
228
  })
230
229
  },
230
+ //滚动缩放
231
+ onMousewheel(e) {
232
+ if (e.wheelDelta > 0) {
233
+ // 放大
234
+ this.scaleDom(this.canvas, "+");
235
+ } else {
236
+ // 缩小
237
+ this.scaleDom(this.canvas, "-")
238
+ }
239
+ },
231
240
  outdraw() {
232
241
  this.isActive = false;
233
242
  },
@@ -333,9 +342,12 @@
333
342
  //放大缩小
334
343
  scaleDom(canvas, type) {
335
344
  if (type == "-") {
336
- this.scale += -0.1;
345
+ if (this.scale - 0.05 < 0) {
346
+ return;
347
+ }
348
+ this.scale += -0.05;
337
349
  } else if (type == "+") {
338
- this.scale += 0.1;
350
+ this.scale += 0.05;
339
351
  }
340
352
  else {
341
353
  this.scale = 1;
@@ -391,17 +403,17 @@
391
403
  img.style.display = "none";
392
404
  this.scaleDomSize(canvas);
393
405
  },
406
+ //开始裁剪
394
407
  Crop() {
395
-
396
- if (typeof this.minWidth !== 'undefined' && typeof this.minWidth !== 'undefined') {
408
+ if (typeof this.minWidth !== 'undefined' && typeof this.minHeight !== 'undefined') {
409
+ this.cropBoxResizable = true;
397
410
  if (parseInt(this.minWidth) > this.bodywidth || parseInt(this.minHeight) > this.bodyheight) {
398
411
  this.options.enlarge = 2;
399
- this.options.autoCropWidth = parseInt(this.minWidth)/2;
400
- this.options.autoCropHeight = parseInt(this.minHeight)/2;
401
412
  }
402
- else {
403
- this.options.autoCropWidth = parseInt(this.minWidth);
404
- this.options.autoCropHeight = parseInt(this.minHeight);
413
+ this.options.autoCropWidth = parseInt(this.minWidth) / this.options.enlarge;
414
+ this.options.autoCropHeight = parseInt(this.minHeight) / this.options.enlarge;
415
+ if (this.canvas.width < parseInt(this.minWidth) || this.canvas.height < parseInt(this.minHeight)) {
416
+ this.options.mode = this.canvas.width / this.options.enlarge + "px auto";
405
417
  }
406
418
  }
407
419
  this.canvasImg = this.canvas.toDataURL('image/jpeg');
@@ -98,11 +98,9 @@
98
98
  return val.split('.').reduce((data, currentVal) => {
99
99
  var rtn = data[currentVal];
100
100
  if (typeof rtn !== 'undefined') {
101
- if (rtn.toString().indexOf('"') != -1) {
102
- rtn = rtn.replace(/"/g, "'");
103
- rtn = rtn.replace(/>/g, "&gt;");
104
- rtn = rtn.replace(/</g, "&lt;");
105
- }
101
+ rtn = rtn.replace(/"/g, "'");
102
+ rtn = rtn.replace(/>/g, "&gt;");
103
+ rtn = rtn.replace(/</g, "&lt;");
106
104
  }
107
105
  else {
108
106
  rtn = "";
@@ -219,6 +219,10 @@
219
219
  this.flagSideBar=false;
220
220
  }
221
221
 
222
+ if(document.body.clientWidth && document.body.clientWidth<1024){
223
+ this.flagSideBar=false;
224
+ }
225
+
222
226
  if(this.flagSideBar){
223
227
  this.selectIndex=-1;
224
228
  if(this.flagDefaultDisplaySideBar && !this.sideBarStatus){
@@ -285,6 +289,7 @@
285
289
  }
286
290
  }
287
291
  }
292
+ this.$refs.table.setTableHeight();
288
293
  },
289
294
  closeSideHandler() {
290
295
  this.$refs.sideMenu.clickHandler();
package/src/main.js CHANGED
@@ -47,7 +47,7 @@ Vue.use(centaline, {
47
47
  getRequestHeaders: function () {
48
48
  return {
49
49
  oldToken: '3ba3f510-93fd-4103-9249-73c13f3f6fc2',
50
- token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjrEOgkAQRP9lazZxYbndo9MDGz-C3MFdgpURSDTGfxcjdPS-4hWTTGZeMM4BKpAV3NFGa1dwRxstEVsh0-DRikM2XKCSU3RsHJ_rpnCnGjKIjxtUZERKVrWSweCnX8Am528wj_F-ic9_nLtOwzLrOXYqYvEQksWlGNBT2SHHlKSn3Ide4f0BAAD__w.HOklRNVaTrByviaFzKXmF9LGELoOvSJiutmh3TyQoyM',
50
+ token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjkEKwjAQRe-StQNJZiYz6S5tmo2HkMZWqCuxLSji3a14CLePz3v_ZZatmsZgKy1nFgiJCcj3BJqlAIVMklVKl-gUCmfvRQClKHTOInifMtjvFDPGIPaUKSb1hLAj3E2uB20xgWdSwsIUhc3BTI-baVwQdYzk9WDmYf0Bu1u-YFum-3F6_uPcdZ337Og4ajgTTJdQgWwYYdCqMNpYeajjhSOb9wcAAP__.FwJrqBiqDn1H2KI7t-vmBjLQYadNyXFFaId5kR1WL_8',
51
51
 
52
52
  originalRequestURL: 'http://10.88.22.67:8080',
53
53
  EstateInfo: '{"estateId":"FAF029E8-EC28-4297-83CF-B8FFD826DB91","estateName":"AABBCC"}',