Commit 7e7f65d1 authored by 李纪文's avatar 李纪文

fix: 修改组态

parent a67d6b24
......@@ -932,8 +932,9 @@ const ConfigurationView = (props) => {
goJS(
go.Node,
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 1 },
{ locationSpot: go.Spot.Center, zOrder: 1, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
......@@ -968,6 +969,29 @@ const ConfigurationView = (props) => {
new go.Binding('height', 'height').makeTwoWay(),
),
),
{
click(e, node) {
const { data } = node;
const list = bindData.find((item) => {
return item.name === data.stationName;
});
if (!list) return false;
// 画板跳转
switch (data.opType) {
case '画板跳转': // 图片模型
drawBoardMethod(data);
break;
case '功能跳转': // 功能模型
menuJumpMethod(data);
break;
case '自定义交互': // 自定义交互
customBack(data);
break;
default:
break;
}
},
},
),
);
......@@ -977,8 +1001,9 @@ const ConfigurationView = (props) => {
goJS(
go.Node,
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 1 },
{ locationSpot: go.Spot.Center, zOrder: 1, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
roleVisibleBinding(), // 绑定角色可见
......@@ -1088,8 +1113,9 @@ const ConfigurationView = (props) => {
'Auto',
nodeStyle(),
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 3 },
{ locationSpot: go.Spot.Center, zOrder: 3, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
roleVisibleBinding(), // 绑定角色可见
......@@ -1153,8 +1179,9 @@ const ConfigurationView = (props) => {
'Auto',
nodeStyle(),
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 3 },
{ locationSpot: go.Spot.Center, zOrder: 3, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
roleVisibleBinding(), // 绑定角色可见
......@@ -1275,8 +1302,9 @@ const ConfigurationView = (props) => {
'Auto',
nodeStyle(),
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 2 },
{ locationSpot: go.Spot.Center, zOrder: 2, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
roleVisibleBinding(), // 绑定角色可见
......@@ -1315,7 +1343,7 @@ const ConfigurationView = (props) => {
});
if (!list) return false;
// 历史查看
if (data.opType) historyModalRender(data, list);
if (data.opType && data.shName) historyModalRender(data, list);
},
},
),
......@@ -1600,8 +1628,9 @@ const ConfigurationView = (props) => {
'Auto',
nodeStyle(),
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 2 },
{ locationSpot: go.Spot.Center, zOrder: 2, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
roleVisibleBinding(), // 绑定角色可见
......
......@@ -1347,8 +1347,9 @@ const ConfigurationView = (props) => {
goJS(
go.Node,
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 1 },
{ locationSpot: go.Spot.Center, zOrder: 1, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
......@@ -1383,6 +1384,30 @@ const ConfigurationView = (props) => {
new go.Binding('height', 'height').makeTwoWay(),
),
),
{
click(e, node) {
const { data } = node;
nodeData = data;
const list = bindData.find((item) => {
return item.name === data.stationName;
});
if (!list) return false;
// 画板跳转
switch (data.opType) {
case '画板跳转': // 图片模型
drawBoardMethod(data);
break;
case '功能跳转': // 功能模型
menuJumpMethod(data);
break;
case '自定义交互': // 自定义交互
customBack(data);
break;
default:
break;
}
},
},
),
);
......@@ -1392,8 +1417,9 @@ const ConfigurationView = (props) => {
goJS(
go.Node,
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 1 },
{ locationSpot: go.Spot.Center, zOrder: 1, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
roleVisibleBinding(), // 绑定角色可见
......@@ -1514,8 +1540,9 @@ const ConfigurationView = (props) => {
'Auto',
nodeStyle(),
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 3 },
{ locationSpot: go.Spot.Center, zOrder: 3, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
roleVisibleBinding(), // 绑定角色可见
......@@ -1581,8 +1608,9 @@ const ConfigurationView = (props) => {
'Auto',
nodeStyle(),
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 3 },
{ locationSpot: go.Spot.Center, zOrder: 3, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
roleVisibleBinding(), // 绑定角色可见
......@@ -1714,8 +1742,9 @@ const ConfigurationView = (props) => {
'Auto',
nodeStyle(),
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 2 },
{ locationSpot: go.Spot.Center, zOrder: 2, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
roleVisibleBinding(), // 绑定角色可见
......@@ -1760,7 +1789,7 @@ const ConfigurationView = (props) => {
return false;
}
// 历史查看
if (data.opType) historyModalRender(data, list);
if (data.opType && data.shName) historyModalRender(data, list);
},
},
),
......@@ -2045,8 +2074,9 @@ const ConfigurationView = (props) => {
'Auto',
nodeStyle(),
'Spot',
{ locationSpot: go.Spot.Center, zOrder: 2 },
{ locationSpot: go.Spot.Center, zOrder: 2, cursor: 'default' },
new go.Binding('zOrder', 'zOrder').makeTwoWay(),
new go.Binding('cursor', 'cursor').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('angle').makeTwoWay(),
roleVisibleBinding(), // 绑定角色可见
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment