diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js
index 80fac1f04..4c98fb75d 100644
--- a/src/jmapNew/map.js
+++ b/src/jmapNew/map.js
@@ -116,6 +116,7 @@ class Jlmap {
this.$options.scaleRate = scaling;
this.$options.offsetX = origin ? origin.x : 0;
this.$options.offsetY = origin ? origin.y : 0;
+ this.$options.scaleIndex = parseInt((scaling / 0.05).toFixed());
this.$painter.updateTransform({ scaleRate: scaling, offsetX: origin ? origin.x : 0, offsetY: origin ? origin.y : 0 });
}
setMap(map, mapDevice, logicData) {
@@ -123,6 +124,7 @@ class Jlmap {
if (map.skinVO) {
this.lineCode = map.skinVO.code;
this.$options.scaleRate = map.scaling || 1;
+ this.$options.scaleIndex = parseInt(((map.scaling || 1) / 0.05).toFixed());
this.$options.offsetX = map.origin ? map.origin.x : 0;
this.$options.offsetY = map.origin ? map.origin.y : 0;
}
@@ -203,7 +205,6 @@ class Jlmap {
}
setCenterWithOffset(deviceCode, dx, offsetY) {
- console.log('setCenterWithOffset');
const arr = Object.keys(this.mapDevice);
if (arr.length != 0) {
const device = this.mapDevice[deviceCode];
@@ -286,7 +287,7 @@ class Jlmap {
const scaleX = Math.floor((((opts.width - 200) * num) / rect.width) * 100) / 100;
const scaleY = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
this.screenScale = Math.min(scaleX, scaleY);
-
+ this.$painter.setScreenScale(this.screenScale);
this.optsWidth = opts.width;
this.optsHeight = opts.height;
this.optsOffsetList = opts.offsetList;
diff --git a/src/jmapNew/options.js b/src/jmapNew/options.js
index 1e4fb43a2..42354088a 100644
--- a/src/jmapNew/options.js
+++ b/src/jmapNew/options.js
@@ -43,6 +43,7 @@ class Options {
}
update(payload) {
+ console.log(payload, '*****---------');
if (Number.isFinite(payload.dx)) {
this.offsetX -= payload.dx;
}
diff --git a/src/jmapNew/painter.js b/src/jmapNew/painter.js
index 396e9ae30..6841f27d5 100644
--- a/src/jmapNew/painter.js
+++ b/src/jmapNew/painter.js
@@ -197,7 +197,6 @@ class Painter {
}
} catch (err) {
console.error(err);
- console.log(device, 'device');
}
}
}
@@ -233,6 +232,9 @@ class Painter {
this.screenFlag = true;
this.$transformHandleScreen.updateTransform(list, opts);
}
+ setScreenScale(screenScale) {
+ this.$transformHandleScreen.setScreenScale(screenScale);
+ }
updateScreenZoom(bili) {
return this.$jmap.calculateScreenPosition(bili);
diff --git a/src/jmapNew/shape/graph/SignalButton/index.js b/src/jmapNew/shape/graph/SignalButton/index.js
index 194d16e25..92ce192ec 100644
--- a/src/jmapNew/shape/graph/SignalButton/index.js
+++ b/src/jmapNew/shape/graph/SignalButton/index.js
@@ -42,7 +42,7 @@ export default class SignalButton extends Group {
this.model = model;
this.style = style;
this.pressed = false;
- this.typeList = this.style.SignalButton.typeList || typeList;
+ this.typeList = this.style.SignalButton && this.style.SignalButton.typeList ? this.style.SignalButton.typeList : typeList;
// Line
this.create();
this.setState(model);
diff --git a/src/jmapNew/transformHandleScreen.js b/src/jmapNew/transformHandleScreen.js
index 2f1fab3c1..a721b2591 100644
--- a/src/jmapNew/transformHandleScreen.js
+++ b/src/jmapNew/transformHandleScreen.js
@@ -6,19 +6,18 @@ class TransformHandle {
this.$painter = painter;
this.scale = '';
- this.scaleIndex = 0;
- this.scaleList = [
- 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
- 1, 1.2, 1.4, 1.6, 1.8,
- 2, 2.2, 2.4, 2.6, 2.8,
- 3, 3.2, 3.4, 3.6, 3.8,
- 4, 4.2, 4.4, 4.6, 4.8,
- 5, 5.2, 5.4, 5.6, 5.8,
- 6, 6.2, 6.4, 6.6, 6.8,
- 7, 7.2, 7.4, 7.6, 7.8,
- 8
- ];
-
+ this.scaleIndex = 20;
+ // this.scaleList = [
+ // 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
+ // 1, 1.2, 1.4, 1.6, 1.8,
+ // 2, 2.2, 2.4, 2.6, 2.8,
+ // 3, 3.2, 3.4, 3.6, 3.8,
+ // 4, 4.2, 4.4, 4.6, 4.8,
+ // 5, 5.2, 5.4, 5.6, 5.8,
+ // 6, 6.2, 6.4, 6.6, 6.8,
+ // 7, 7.2, 7.4, 7.6, 7.8,
+ // 8
+ // ];
this.parentLevel = painter.getParentLevel();
this.rect = { x: 0, y: 0, width: 0, height: 0 };
@@ -31,7 +30,9 @@ class TransformHandle {
view.show();
view.dirty();
}
-
+ setScreenScale(screenScale) {
+ this.scaleIndex = parseInt((screenScale / 0.05).toFixed());
+ }
checkVisible(view, rect) {
// return createBoundingRect(view).intersect(this.rect); // 判断是否相交
// return createBoundingRect(view).intersect(rect); // 判断是否相交
@@ -105,11 +106,11 @@ class TransformHandle {
updataOffset(opt) {
if (opt.scale) {
if (opt.scale <= 0) {
- this.scaleIndex = this.scaleIndex <= 0 ? 0 : this.scaleIndex - 1;
+ this.scaleIndex = this.scaleIndex <= 2 ? 2 : this.scaleIndex - 1;
} else {
- this.scaleIndex = this.scaleIndex >= 40 ? 40 : this.scaleIndex + 1;
+ this.scaleIndex = this.scaleIndex >= 200 ? 200 : this.scaleIndex + 1;
}
- const {screenList, rectList} = this.$painter.updateScreenZoom(this.scaleList[this.scaleIndex]);
+ const {screenList, rectList} = this.$painter.updateScreenZoom((this.scaleIndex * 0.05).toFixed(2));
this.rectList = rectList;
this.transform = [];
screenList.forEach(item => {
diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js
index a1a9e525a..b56c5ab9d 100644
--- a/src/utils/baseUrl.js
+++ b/src/utils/baseUrl.js
@@ -24,14 +24,14 @@ export function handlerUrl(data) {
if (process.env.NODE_ENV === 'development') {
// const data = null;
// BASE_API = 'https://joylink.club/jlcloud';
- // BASE_API = 'https://test.joylink.club/jlcloud';
+ BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.233/rtss-server';
// BASE_API = 'http://114.116.51.125/jlcloud';
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
- BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
+ // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
diff --git a/src/views/designPlatform/bigScreen.vue b/src/views/designPlatform/bigScreen.vue
index 12149727c..8f375930f 100644
--- a/src/views/designPlatform/bigScreen.vue
+++ b/src/views/designPlatform/bigScreen.vue
@@ -119,7 +119,20 @@ export default {
},
handleUpdateScreen() {
this.maskOpen = false;
- if (this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length) {
+ let picture;
+ if (this.$store.state.map.map && this.$store.state.map.map.pictureList) {
+ picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
+ }
+ if (picture) {
+ this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
+ const deviceList = [];
+ const mapDevice = this.$store.state.map.mapDevice;
+ for (const deviceCode in mapDevice) {
+ deviceList.push(deviceCode);
+ }
+ this.$jlmap.updatePicture(deviceList);
+ this.$jlmap.updateTransform(picture.scaling, picture.origin);
+ } else if (this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length) {
const offsetList = this.bigScreenConfig.offsetList;
const width = this.bigScreenConfig.width;
const height = this.bigScreenConfig.height;
diff --git a/src/views/designPlatform/trainingTip.vue b/src/views/designPlatform/trainingTip.vue
index 44d8de8ee..748d1d7e7 100644
--- a/src/views/designPlatform/trainingTip.vue
+++ b/src/views/designPlatform/trainingTip.vue
@@ -23,9 +23,8 @@ export default {
.trainingTipMessage{
position: absolute;
width: 400px;
- padding: 15px 15px 20px 15px;
- background: rgba(255,255,255,0.97);
- top: 100px;
+ padding: 15px;
+ background: rgb(255, 221, 0);
left: 50%;
border-radius: 8px;
-webkit-transform: translateX(-50%);
diff --git a/src/views/newMap/mapDraftPicture/createPicture.vue b/src/views/newMap/mapDraftPicture/createPicture.vue
index 18855223a..d7eff1ecd 100644
--- a/src/views/newMap/mapDraftPicture/createPicture.vue
+++ b/src/views/newMap/mapDraftPicture/createPicture.vue
@@ -13,9 +13,10 @@
+
-
+