Commit d2ec894d by 吴斌

update:氨气合成装置拓扑图示例

parent c3433f26
<svg width="265" height="260" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-1002 -119)"><path d="M1046.33 203.5 1181.95 203.5 1222.67 203.5 1264.5 203.5 1264.5 244.5 1264.5 285.5 1222.67 285.5 1181.95 285.5 1046.33 285.5C1023.23 285.5 1004.5 267.145 1004.5 244.5 1004.5 221.855 1023.23 203.5 1046.33 203.5Z" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><path d="M1222.5 203.5 1222.5 286" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/></g></svg>
<svg width="265" height="260" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-1002 -119)"><path d="M1046.33 203.5 1181.95 203.5 1222.67 203.5 1264.5 203.5 1264.5 244.5 1264.5 285.5 1222.67 285.5 1181.95 285.5 1046.33 285.5C1023.23 285.5 1004.5 267.145 1004.5 244.5 1004.5 221.855 1023.23 203.5 1046.33 203.5Z" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><path d="M1222.5 203.5 1222.5 286" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/></g></svg>
\ No newline at end of file
<svg width="265" height="259" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-562 -107)"><path d="M606.329 204.5 782.671 204.5C805.773 204.5 824.5 222.185 824.5 244 824.5 265.815 805.773 283.5 782.671 283.5L606.329 283.5C583.227 283.5 564.5 265.815 564.5 244 564.5 222.185 583.227 204.5 606.329 204.5Z" stroke="#1C334E" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/></g></svg>
<svg width="265" height="259" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-562 -107)"><path d="M606.329 204.5 782.671 204.5C805.773 204.5 824.5 222.185 824.5 244 824.5 265.815 805.773 283.5 782.671 283.5L606.329 283.5C583.227 283.5 564.5 265.815 564.5 244 564.5 222.185 583.227 204.5 606.329 204.5Z" stroke="#1C334E" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/></g></svg>
\ No newline at end of file
<svg width="265" height="265" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-94 -117)"><path d="M96.5001 379.5 161.5 119.5 291.5 119.5 356.5 379.5Z" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/></g></svg>
<svg width="265" height="265" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-94 -117)"><path d="M96.5001 379.5 161.5 119.5 291.5 119.5 356.5 379.5Z" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/></g></svg>
\ No newline at end of file
<svg width="649" height="655" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-57 -761)"><path d="M382 763.5C414.65 763.5 441.116 781.152 441.116 802.922L441.116 939.913 447.138 942.102C478.127 956.116 498.5 979.849 498.5 1006.76L498.5 1335.52C498.5 1378.58 446.345 1413.5 382 1413.5 317.655 1413.5 265.5 1378.58 265.5 1335.52L265.5 1006.76C265.5 979.849 285.873 956.116 316.862 942.101L322.883 939.914 322.883 802.922C322.883 781.152 349.349 763.5 382 763.5Z" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><rect x="339.5" y="818.5" width="82.9998" height="165" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><path d="M458.5 1018.44 458.5 1219.26 458.5 1279.56 458.5 1341.5 380.5 1341.5 302.5 1341.5 302.5 1279.56 302.5 1219.26 302.5 1018.44C302.5 984.235 337.419 956.5 380.5 956.5 423.58 956.5 458.5 984.235 458.5 1018.44Z" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><rect x="302.5" y="1148.5" width="156" height="156" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><path d="M302.5 1148.5 458.405 1304.41" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><path d="M0 0 155.905 155.906" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd" transform="matrix(1 0 0 -1 302.5 1304.41)"/><rect x="302.5" y="1072.5" width="156" height="62.9999" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><path d="M302.5 1072.5 458.405 1135.51" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><path d="M0 0 155.905 63.0114" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd" transform="matrix(1 0 0 -1 302.5 1135.51)"/><rect x="302.5" y="1011.5" width="156" height="45.9997" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><path d="M302.5 1011.5 458.405 1057.41" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><path d="M0 0 155.905 45.9055" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd" transform="matrix(1 0 0 -1 302.5 1057.41)"/></g></svg>
<svg width="649" height="655" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-57 -761)"><path d="M382 763.5C414.65 763.5 441.116 781.152 441.116 802.922L441.116 939.913 447.138 942.102C478.127 956.116 498.5 979.849 498.5 1006.76L498.5 1335.52C498.5 1378.58 446.345 1413.5 382 1413.5 317.655 1413.5 265.5 1378.58 265.5 1335.52L265.5 1006.76C265.5 979.849 285.873 956.116 316.862 942.101L322.883 939.914 322.883 802.922C322.883 781.152 349.349 763.5 382 763.5Z" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><rect x="339.5" y="818.5" width="82.9998" height="165" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><path d="M458.5 1018.44 458.5 1219.26 458.5 1279.56 458.5 1341.5 380.5 1341.5 302.5 1341.5 302.5 1279.56 302.5 1219.26 302.5 1018.44C302.5 984.235 337.419 956.5 380.5 956.5 423.58 956.5 458.5 984.235 458.5 1018.44Z" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><rect x="302.5" y="1148.5" width="156" height="156" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><path d="M302.5 1148.5 458.405 1304.41" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><path d="M0 0 155.905 155.906" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd" transform="matrix(1 0 0 -1 302.5 1304.41)"/><rect x="302.5" y="1072.5" width="156" height="62.9999" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><path d="M302.5 1072.5 458.405 1135.51" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><path d="M0 0 155.905 63.0114" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd" transform="matrix(1 0 0 -1 302.5 1135.51)"/><rect x="302.5" y="1011.5" width="156" height="45.9997" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><path d="M302.5 1011.5 458.405 1057.41" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><path d="M0 0 155.905 45.9055" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd" transform="matrix(1 0 0 -1 302.5 1057.41)"/></g></svg>
\ No newline at end of file
<svg width="390" height="394" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-809 -899)"><path d="M943.521 901.5 1064.48 901.5 1064.48 1004.3 1066.33 1004.3 1097.5 1035.45 1097.5 1290.5 910.5 1290.5 910.5 1035.45 941.667 1004.3 943.521 1004.3Z" stroke="#1C334E" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><path d="M931.5 1033.36 1066.2 1032.5 938.364 1103.64 1072.21 1097.64 941.796 1172.21 1076.5 1169.64 940.938 1233.93 1071.35 1229.64 993.275 1290.5" stroke="#1C334E" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="none" fill-rule="evenodd"/></g></svg>
<svg width="390" height="394" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-809 -899)"><path d="M943.521 901.5 1064.48 901.5 1064.48 1004.3 1066.33 1004.3 1097.5 1035.45 1097.5 1290.5 910.5 1290.5 910.5 1035.45 941.667 1004.3 943.521 1004.3Z" stroke="#1C334E" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><path d="M931.5 1033.36 1066.2 1032.5 938.364 1103.64 1072.21 1097.64 941.796 1172.21 1076.5 1169.64 940.938 1233.93 1071.35 1229.64 993.275 1290.5" stroke="#1C334E" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="none" fill-rule="evenodd"/></g></svg>
\ No newline at end of file
<svg width="265" height="260" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-1387 -114)"><rect x="1389.5" y="202.5" width="260" height="83.0002" stroke="#1C334E" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><rect x="1418.5" y="202.5" width="201" height="83.0002" stroke="#1C334E" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/></g></svg>
<svg width="265" height="260" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-1387 -114)"><rect x="1389.5" y="202.5" width="260" height="83.0002" stroke="#1C334E" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><rect x="1418.5" y="202.5" width="201" height="83.0002" stroke="#1C334E" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/></g></svg>
\ No newline at end of file
<svg width="265" height="260" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-1744 -119)"><path d="M1784.15 203.5 1906.2 203.5 1942.85 203.5 1980.5 203.5 1980.5 244.5 1980.5 285.5 1942.85 285.5 1906.2 285.5 1784.15 285.5C1763.36 285.5 1746.5 267.145 1746.5 244.5 1746.5 221.855 1763.36 203.5 1784.15 203.5Z" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><rect x="1980.5" y="175.5" width="26.0001" height="138" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><path d="M1784.5 203.5 1784.5 286" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/></g></svg>
<svg width="265" height="260" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-1744 -119)"><path d="M1784.15 203.5 1906.2 203.5 1942.85 203.5 1980.5 203.5 1980.5 244.5 1980.5 285.5 1942.85 285.5 1906.2 285.5 1784.15 285.5C1763.36 285.5 1746.5 267.145 1746.5 244.5 1746.5 221.855 1763.36 203.5 1784.15 203.5Z" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/><rect x="1980.5" y="175.5" width="26.0001" height="138" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF"/><path d="M1784.5 203.5 1784.5 286" stroke="#000000" stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" fill="#FFFFFF" fill-rule="evenodd"/></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="90px" height="50px" viewBox="0 0 90 50" enable-background="new 0 0 90 50" xml:space="preserve">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="45" y1="1.044341e-005" x2="45" y2="50">
<stop offset="0.0056" style="stop-color:#717071"/>
<stop offset="0.1763" style="stop-color:#9E9E9F"/>
<stop offset="0.3483" style="stop-color:#C8C9CA"/>
<stop offset="0.5219" style="stop-color:#FFFFFF"/>
<stop offset="0.6946" style="stop-color:#DBDCDC"/>
<stop offset="0.7395" style="stop-color:#D7D8D8"/>
<stop offset="0.7841" style="stop-color:#CBCCCC"/>
<stop offset="0.8284" style="stop-color:#B8B8B9"/>
<stop offset="0.836" style="stop-color:#B4B4B5"/>
<stop offset="1" style="stop-color:#6B6A6A"/>
</linearGradient>
<path fill="url(#SVGID_1_)" stroke="#C8C9CA" stroke-width="0.1877" stroke-miterlimit="10" d="M87.442,0.224L45.738,23.568
c-0.371,0.208-0.609,0.522-0.738,0.867c-0.129-0.345-0.366-0.659-0.738-0.867L2.558,0.224C1.421-0.412,0,0.383,0,1.656v46.688
c0,1.273,1.421,2.068,2.558,1.432l41.704-23.344c0.371-0.208,0.609-0.522,0.738-0.867c0.129,0.345,0.366,0.659,0.738,0.867
l41.704,23.344C88.579,50.412,90,49.617,90,48.344V1.656C90,0.383,88.579-0.412,87.442,0.224z"/>
</svg>
......@@ -114,7 +114,7 @@ export class Inspector {
this.inspectOnModelChanged = (e: go.ChangedEvent) => {
if (e.isTransactionFinished) self.inspectObject();
};
this.inspectOnSelectionChanged = (e: go.DiagramEvent) => { self.inspectObject(); };
this.inspectOnSelectionChanged = (_e: go.DiagramEvent) => { self.inspectObject(); };
this._diagram.addModelChangedListener(this.inspectOnModelChanged);
if (this._inspectSelection) {
this._diagram.addDiagramListener('ChangedSelection', this.inspectOnSelectionChanged);
......@@ -606,6 +606,14 @@ export class Inspector {
}
tr.appendChild(td2);
//td3 显示单位
const td3 = document.createElement('td');
const decProp2 = this._properties[propertyName];
if (decProp2 && decProp2.unit !== undefined){
td3.textContent = decProp2.unit;
tr.appendChild(td3);
}
this.inspectedProperties[propertyName] = input;
return tr;
}
......
......@@ -9,3 +9,49 @@ GO(go.Adornment, "Link",
new go.Binding("stroke").makeTwoWay()
) // use selection object's strokeWidth
);
export function MultiArrowLink() {
go.Link.call(this);
}
go.Diagram.inherit(MultiArrowLink, go.Link);
MultiArrowLink.prototype.makeGeometry = function() {
// get the Geometry created by the standard behavior
let geo = go.Link.prototype.makeGeometry.call(this);
if (geo.type !== go.Geometry.Path || geo.figures.length === 0) return geo;
let mainfig = geo.figures.elt(0); // assume there's just one PathFigure
let mainsegs = mainfig.segments;
let arrowLen = 8; // length for each arrowhead
let arrowWid = 3; // actually half-width of each arrowhead
let fx = mainfig.startX;
let fy = mainfig.startY;
for (let i = 0; i < mainsegs.length; i++) {
let a = mainsegs.elt(i);
// assume each arrowhead is a simple triangle
let ax = a.endX;
let ay = a.endY;
let bx = ax;
let by = ay;
let cx = ax;
let cy = ay;
if (fx < ax - arrowLen) {
bx -= arrowLen; by += arrowWid;
cx -= arrowLen; cy -= arrowWid;
} else if (fx > ax + arrowLen) {
bx += arrowLen; by += arrowWid;
cx += arrowLen; cy -= arrowWid;
} else if (fy < ay - arrowLen) {
bx -= arrowWid; by -= arrowLen;
cx += arrowWid; cy -= arrowLen;
} else if (fy > ay + arrowLen) {
bx -= arrowWid; by += arrowLen;
cx += arrowWid; cy += arrowLen;
}
geo.add(new go.PathFigure(ax, ay, true)
.add(new go.PathSegment(go.PathSegment.Line, bx, by))
.add(new go.PathSegment(go.PathSegment.Line, cx, cy).close()));
fx = ax;
fy = ay;
}
return geo;
};
\ No newline at end of file
......@@ -3,6 +3,7 @@ export const picCategory = [
{key:"valve",name:"阀门"},
{key:"pump",name:"泵"},
{key:"computer",name:"计算机"},
{key:"ammonia", name:"氨气合成装置"}
]
export const picModel = [
......@@ -15,4 +16,11 @@ export const picModel = [
{name: "pump2", category: "pump", img: "src/assets/models/pump/卧式泵.svg"},
{name: "pump3", category: "pump", img: "src/assets/models/pump/旋转泵.svg"},
{name: "pump4", category: "pump", img: "src/assets/models/pump/油池泵.svg"},
{name:"氨分离罐", category:"ammonia", img:"src/assets/models/ammonia/氨分离罐.svg"},
{name:"合成塔", category:"ammonia", img:"src/assets/models/ammonia/合成塔.svg"},
{name:"换热器", category:"ammonia", img:"src/assets/models/ammonia/换热器.svg"},
{name:"开工炉", category:"ammonia", img:"src/assets/models/ammonia/开工炉.svg"},
{name:"冷却器", category:"ammonia", img:"src/assets/models/ammonia/冷却器.svg"},
{name:"冷却器-2", category:"ammonia", img:"src/assets/models/ammonia/冷却器-2.svg"},
{name:"压缩机", category:"ammonia", img:"src/assets/models/ammonia/压缩机.svg"},
]
......@@ -7,7 +7,7 @@ export default defineConfig({
plugins: [vue(), UnoCss()],
server:{
host:'0.0.0.0' ,//ip地址
port: 2345, // 设置服务启动端口号
port: 23445, // 设置服务启动端口号
open: true, // 设置服务启动时是否自动打开浏览器
}
})
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