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
07058648
Commit
07058648
authored
1 year ago
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 组态修改图片路径、增加交互脚本解析
parent
7c04f52e
dev
Tags unavailable
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
HistoryModel.js
...xtend-components/EC_ConfigurationView/src/HistoryModel.js
+4
-3
RealModel.js
...s/extend-components/EC_ConfigurationView/src/RealModel.js
+19
-3
No files found.
packages/extend-components/EC_ConfigurationView/src/HistoryModel.js
View file @
07058648
...
...
@@ -55,9 +55,10 @@ const ConfigurationView = (props) => {
/** **********************************获取工艺图画板信息*********************** */
const
getConfiguraList
=
async
()
=>
{
const
url
=
globalConfig
.
mainserver
?
globalConfig
.
mainserver
:
'https://panda-water.cn/'
;
imgUrl
=
online
?
'https://panda-water.cn/PandaConfiguration/Raw/'
:
`
${
globalConfig
.
baseURI
}
/Panda
Configuration/Raw
/`
;
?
`
${
url
}
PandaMonitor/Monitor/`
:
`
${
globalConfig
.
baseURI
}
/Panda
Monitor/Monitor
/`
;
// 获取画板信息
const
drawInfo
=
await
getSketchPadList
({
name
:
props
.
name
,
...
...
@@ -1031,7 +1032,7 @@ const ConfigurationView = (props) => {
go.Picture,
{ name: 'animateSvg', width: 56, height: 56, column: 0, scale: 1, source: '' },
new go.Binding('source', 'imgSrc', (v) => {
return `
$
{
imgUrl
}
File
/
ModelManage
/
ModelFile
Preview
/
$
{
encodeURIComponent
(
v
)}
`;
return `
$
{
imgUrl
}
Model
/
Preview
/
$
{
encodeURIComponent
(
v
)}
`;
}),
new go.Binding('scale', 'scale').makeTwoWay(),
new go.Binding('width', 'width').makeTwoWay(),
...
...
This diff is collapsed.
Click to expand it.
packages/extend-components/EC_ConfigurationView/src/RealModel.js
View file @
07058648
...
...
@@ -83,9 +83,10 @@ const ConfigurationView = (props) => {
/** **********************************获取工艺图画板信息*********************** */
const
getConfiguraList
=
async
()
=>
{
const
url
=
globalConfig
.
mainserver
?
globalConfig
.
mainserver
:
'https://panda-water.cn/'
;
imgUrl
=
online
?
'https://panda-water.cn/PandaConfiguration/Raw/'
:
`
${
globalConfig
.
baseURI
}
/Panda
Configuration/Raw
/`
;
?
`
${
url
}
PandaMonitor/Monitor/`
:
`
${
globalConfig
.
baseURI
}
/Panda
Monitor/Monitor
/`
;
// 获取画板信息
const
drawInfo
=
await
getSketchPadList
({
name
:
props
.
name
,
...
...
@@ -1146,6 +1147,17 @@ const ConfigurationView = (props) => {
}
};
/** **************************************交互脚本****************************************** */
const interactiveScript = (data) => {
try {
const opRule = JSON.parse(data.opRule);
const script = opRule && opRule.script ? opRule.script : '';
new Function('
diagram
', '
list
', '
props
', script)(myDiagram, data, props);
} catch (e) {
// console.log(e)
}
};
/** **************************************跳转方法****************************************** */
const menuJumpMethod = (data) => {
const opRule = JSON.parse(data.opRule);
...
...
@@ -1406,6 +1418,7 @@ const ConfigurationView = (props) => {
break;
case '自定义交互': // 自定义交互
customBack(data);
interactiveScript(data);
break;
default:
break;
...
...
@@ -1439,7 +1452,7 @@ const ConfigurationView = (props) => {
go.Picture,
{ name: 'animateSvg', width: 56, height: 56, column: 0, scale: 1, source: '' },
new go.Binding('source', 'imgSrc', (v) => {
return `
$
{
imgUrl
}
File
/
ModelManage
/
ModelFile
Preview
/
$
{
encodeURIComponent
(
v
)}
`;
return `
$
{
imgUrl
}
Model
/
Preview
/
$
{
encodeURIComponent
(
v
)}
`;
}),
new go.Binding('scale', 'scale').makeTwoWay(),
new go.Binding('width', 'width').makeTwoWay(),
...
...
@@ -1469,6 +1482,7 @@ const ConfigurationView = (props) => {
break;
case '自定义交互': // 自定义交互
customBack(data);
interactiveScript(data);
break;
default:
break;
...
...
@@ -1596,6 +1610,7 @@ const ConfigurationView = (props) => {
break;
case '自定义交互': // 自定义交互
customBack(data);
interactiveScript(data);
break;
default:
break;
...
...
@@ -1669,6 +1684,7 @@ const ConfigurationView = (props) => {
break;
case '自定义交互': // 自定义交互
customBack(data);
interactiveScript(data);
break;
default:
break;
...
...
This diff is collapsed.
Click to expand it.
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