Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
wisdom-components
Commits
7e7f65d1
Commit
7e7f65d1
authored
Mar 21, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改组态
parent
a67d6b24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
14 deletions
+73
-14
HistoryModel.js
...xtend-components/EC_ConfigurationView/src/HistoryModel.js
+36
-7
RealModel.js
...s/extend-components/EC_ConfigurationView/src/RealModel.js
+37
-7
No files found.
packages/extend-components/EC_ConfigurationView/src/HistoryModel.js
View file @
7e7f65d1
...
...
@@ -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(), // 绑定角色可见
...
...
packages/extend-components/EC_ConfigurationView/src/RealModel.js
View file @
7e7f65d1
...
...
@@ -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(), // 绑定角色可见
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment