Commit bb0064a6 authored by 李纪文's avatar 李纪文

fix: 组态增加图片模型、功能跳转方法

parent 4a1d7d54
......@@ -909,7 +909,11 @@ const ConfigurationView = (props) => {
go.Picture,
{ width: 56, height: 56, scale: 1, source: '', background: '#2e3343' },
new go.Binding('source', 'imgSrc', function (v) {
return `/PandaCore/GCK/SketchPad/PreviewResource?name=${v}&_site=${globalConfig?.userInfo?.LocalSite || ''}`;
return v
? `/PandaCore/GCK/SketchPad/PreviewResource?name=${v}&_site=${
globalConfig?.userInfo?.LocalSite || ''
}`
: '';
}).makeTwoWay(),
new go.Binding('scale', 'scale').makeTwoWay(),
new go.Binding('width', 'width').makeTwoWay(),
......
......@@ -699,7 +699,7 @@ const ConfigurationView = (props) => {
myDiagram = null;
}
};
}, [props.name, props.devices]);
}, [props.name]);
useEffect(() => {
if (!isModalVisible) {
......@@ -1323,7 +1323,11 @@ const ConfigurationView = (props) => {
go.Picture,
{ width: 56, height: 56, scale: 1, source: '', background: '#2e3343' },
new go.Binding('source', 'imgSrc', function (v) {
return `/PandaCore/GCK/SketchPad/PreviewResource?name=${v}&_site=${globalConfig?.userInfo?.LocalSite || ''}`;
return v
? `/PandaCore/GCK/SketchPad/PreviewResource?name=${v}&_site=${
globalConfig?.userInfo?.LocalSite || ''
}`
: '';
}).makeTwoWay(),
new go.Binding('scale', 'scale').makeTwoWay(),
new go.Binding('width', 'width').makeTwoWay(),
......
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