提交 4f68ecca authored 作者: 姜立玮's avatar 姜立玮 🤼

新版本

上级 8524023c
此差异已折叠。
此差异已折叠。
This source diff could not be displayed because it is too large. You can view the blob instead.
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -23,15 +23,11 @@ ...@@ -23,15 +23,11 @@
<link href="<%= BASE_URL %>css/font_1331132_h688rvffmbc.ttf" /> <link href="<%= BASE_URL %>css/font_1331132_h688rvffmbc.ttf" />
<!-- 通用基础图形库 --> <!-- 通用基础图形库 -->
<link href="<%= BASE_URL %>css/font_1331132_qhyav2o6mp.css" rel="stylesheet" /> <link href="<%= BASE_URL %>css/font_4042197_3rfoz0ndy1b.css" rel="stylesheet" />
<link href="<%= BASE_URL %>css/font_1331132_5lvbai88wkb.css" rel="stylesheet" /> <link href="<%= BASE_URL %>css/2d/iconfont.css" rel="stylesheet" />
<link href="<%= BASE_URL %>css/font_2030495_3ziztwjjab6.css" rel="stylesheet" /> <link href="<%= BASE_URL %>css/dq/iconfont.css" rel="stylesheet" />
<!-- 国家电网图元规范 --> <link href="<%= BASE_URL %>css/dw/iconfont.css" rel="stylesheet" />
<link href="<%= BASE_URL %>css/sgge.css" rel="stylesheet" /> <link href="<%= BASE_URL %>css/ty/iconfont.css" rel="stylesheet" />
<!-- 电气工程常用字母和符号 -->
<link href="<%= BASE_URL %>css/eesymbols.css" rel="stylesheet" />
<!-- 电气元器件 -->
<!-- <link href="<%= BASE_URL %>css/ecomponents.css" rel="stylesheet" /> -->
<title> <title>
<%= webpackConfig.name %> <%= webpackConfig.name %>
......
...@@ -47,4 +47,12 @@ export function deleteTopologyHandle(id){ ...@@ -47,4 +47,12 @@ export function deleteTopologyHandle(id){
url:'/topology/deleteTopologyHandle/'+id, url:'/topology/deleteTopologyHandle/'+id,
method: 'delete' method: 'delete'
}) })
}
export function getFile(file){
return request({
url: file,
method: 'get',
// params: query
})
} }
\ No newline at end of file
...@@ -465,7 +465,7 @@ ...@@ -465,7 +465,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getRect } from "@topology/core"; // import { getRect } from "@topology/core";
import { lineOther } from "@/utils/topology/topologysetting.js"; import { lineOther } from "@/utils/topology/topologysetting.js";
export default { export default {
props: { props: {
...@@ -521,8 +521,8 @@ export default { ...@@ -521,8 +521,8 @@ export default {
return ""; return "";
}, },
clickAlignment(type) { clickAlignment(type) {
let rect = getRect(this.pens); // let rect = getRect(this.pens);
this.$emit("no", rect, type); // this.$emit("no", rect, type);
}, },
typeSetting() { typeSetting() {
this.$emit("ok", this.params); this.$emit("ok", this.params);
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
</div> </div>
</template> </template>
<script> <script>
import { Topology } from "@topology/core"; // import { Topology } from "@topology/core";
import { register as registerChart } from "@topology/chart-diagram"; // import { register as registerChart } from "@topology/chart-diagram";
export default { export default {
data() { data() {
return { return {
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
}; };
}, },
created() { created() {
registerChart(); // registerChart();
}, },
mounted() { mounted() {
this.init(); this.init();
...@@ -48,15 +48,15 @@ export default { ...@@ -48,15 +48,15 @@ export default {
this.canvas.open(this.data); this.canvas.open(this.data);
}, },
init() { init() {
this.canvas = new Topology("topology-hrhx", {}); // this.canvas = new Topology("topology-hrhx", {});
this.data.locked = 1; // this.data.locked = 1;
// 3. 渲染图形 // // 3. 渲染图形
// 画布图形数据,可以来自于官网下载的json // // 画布图形数据,可以来自于官网下载的json
this.canvas.open(this.data); // this.canvas.open(this.data);
// 或 用window.topology对象 === 上面的canvas // // 或 用window.topology对象 === 上面的canvas
// topology.open(json); // // topology.open(json);
// 4. 如果json发送变化,重绘 // // 4. 如果json发送变化,重绘
this.canvas.render(); // this.canvas.render();
}, },
}, },
}; };
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
</div> </div>
</template> </template>
<script> <script>
import { Topology } from "@topology/core"; // import { Topology } from "@topology/core";
import { register as registerChart } from "@topology/chart-diagram"; // import { register as registerChart } from "@topology/chart-diagram";
export default { export default {
props: { props: {
canvasData: { canvasData: {
...@@ -57,18 +57,18 @@ export default { ...@@ -57,18 +57,18 @@ export default {
}, },
methods: { methods: {
init() { init() {
this.canvas = new Topology("topology-hrhx"); // this.canvas = new Topology("topology-hrhx");
this.canvasData.locked = 2; // this.canvasData.locked = 2;
// 3. 渲染图形 // // 3. 渲染图形
// 画布图形数据,可以来自于官网下载的json // // 画布图形数据,可以来自于官网下载的json
this.canvasData.websocket = ""; // this.canvasData.websocket = "";
this.canvas.open(this.canvasData); // this.canvas.open(this.canvasData);
// 或 用window.topology对象 === 上面的canvas // // 或 用window.topology对象 === 上面的canvas
// topology.open(json); // // topology.open(json);
// 4. 如果json发送变化,重绘 // // 4. 如果json发送变化,重绘
// this.canvas.render(); // // this.canvas.render();
this.imgData = this.canvas.toImage(); // this.imgData = this.canvas.toImage();
this.canvas.destroy(); // this.canvas.destroy();
}, },
}, },
}; };
......
此差异已折叠。
此差异已折叠。
{
"id": "1331132",
"name": "基础图表",
"font_family": "ticon",
"css_prefix_text": "ticon-",
"description": "",
"glyphs": [
{
"name": "矩形",
"font_class": "rectangle",
"unicode": "e60b"
}
,{
"name": "圆",
"font_class": "circle",
"unicode": "e600"
}
,{
"name": "三角形",
"font_class": "triangle",
"unicode": "e60b"
}
,{
"name": "菱形",
"font_class": "diamond",
"unicode": "e604"
}
,{
"name": "五边形",
"font_class": "pentagon",
"unicode": "e616"
}
,{
"name": "五角星",
"font_class": "pentagram",
"unicode": "e64b"
}
,{
"name": "六边形",
"font_class": "hexagon",
"unicode": "e617"
}
,{
"name": "左箭头",
"font_class": "leftArrow",
"unicode": "ec47"
}
,{
"name": "右箭头",
"font_class": "rightArrow",
"unicode": "e6c0"
}
,{
"name": "双向箭头",
"font_class": "twowayArrow",
"unicode": "e618"
}
,{
"name": "消息框",
"font_class": "message",
"unicode": "e6bc"
}
,{
"name": "云",
"font_class": "cloud",
"unicode": "e60a"
}
,{
"name": "文件",
"font_class": "file",
"unicode": "e7b4"
}
,{
"name": "立方体",
"font_class": "cube",
"unicode": "e6fc"
}
,{
"name": "人",
"font_class": "people",
"unicode": "e625"
}
,{
"name": "线",
"font_class": "line",
"unicode": "e978"
}
,{
"name": "网页",
"font_class": "iframe",
"unicode": "e60b"
}
,{
"name": "矩形",
"font_class": "音视频",
"unicode": "video"
}
,{
"name": "gif 动画",
"font_class": "gif",
"unicode": "e60b"
}
,{
"name": "svg path",
"font_class": "svgPath",
"unicode": "e60b"
}
]
}
\ No newline at end of file
此差异已折叠。
...@@ -10,8 +10,8 @@ console.log(mainProxy) ...@@ -10,8 +10,8 @@ console.log(mainProxy)
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分 // axios中请求配置有baseURL选项,表示请求URL公共部分
// baseURL: process.env.VUE_APP_BASE_API, baseURL: process.env.VUE_APP_BASE_API,
baseURL: mainProxy, // baseURL: mainProxy,
// 超时 // 超时
timeout: 10000 timeout: 10000
}) })
......
// 自定义组件 // 自定义组件
import { Node, Rect, Point, Direction, registerNode } from '@topology/core'; // import { Node, Rect, Point, Direction, registerNode } from '@topology/core';
import { getDatas,ces } from "@/utils/topology/registerIconssetting.js"; import { getDatas,ces } from "@/utils/topology/registerIconssetting.js";
import {assembleSvg} from "./setting" import {assembleSvg} from "./setting"
/** /**
...@@ -55,7 +55,7 @@ export function myAnchors(node) { ...@@ -55,7 +55,7 @@ export function myAnchors(node) {
// } // }
} }
export function getRegisterNode(name) { export function getRegisterNode(name) {
registerNode(name, myShape, myAnchors, myIconRect, null); // registerNode(name, myShape, myAnchors, myIconRect, null);
} }
export function registerIcons(){ export function registerIcons(){
for (let i of getDatas()) { for (let i of getDatas()) {
...@@ -77,7 +77,7 @@ export function registerSvgs(){ ...@@ -77,7 +77,7 @@ export function registerSvgs(){
} }
} }
export function getSvgToCavansRegisterNode(name) { export function getSvgToCavansRegisterNode(name) {
registerNode(name, myIconRect, myAnchors, myIconRect, null); // registerNode(name, myIconRect, myAnchors, myIconRect, null);
} }
export function svgTocavansShape(ctx, node) { export function svgTocavansShape(ctx, node) {
node.tmp={}; node.tmp={};
......
import { Node } from "@topology/core"; // import { Node } from "@topology/core";
//node动态 //node动态
export const animateType = [ export const animateType = [
{ name: "无", type: 0 }, { name: "无", type: 0 },
......
此差异已折叠。
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Topology } from "@topology/core"; // import { Topology } from "@topology/core";
import { getTopologyId } from "@/api/topology.js"; import { getTopologyId } from "@/api/topology.js";
import { urlParse } from "@/utils/ruoyi"; import { urlParse } from "@/utils/ruoyi";
export default { export default {
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
}, },
created() {}, created() {},
mounted() { mounted() {
this.init(); // this.init();
let that = this; let that = this;
// window.onresize = () => { // window.onresize = () => {
// setTimeout(function () { // setTimeout(function () {
...@@ -59,53 +59,53 @@ export default { ...@@ -59,53 +59,53 @@ export default {
onSizeOri() { onSizeOri() {
this.canvas.open(this.topologyData); this.canvas.open(this.topologyData);
}, },
async init() { // async init() {
this.canvas = new Topology("topology-hrhx", {}); // this.canvas = new Topology("topology-hrhx", {});
// Data.locked=1; // // Data.locked=1;
// this.topologyData=Data // // this.topologyData=Data
// 3. 渲染图形 // // 3. 渲染图形
// 画布图形数据,可以来自于官网下载的json // // 画布图形数据,可以来自于官网下载的json
let id = this.$route.query.id; // let id = this.$route.query.id;
id = this.$route.fullPath.split("id=")[1]; // id = this.$route.fullPath.split("id=")[1];
await getTopologyId(id) // await getTopologyId(id)
.then((res) => { // .then((res) => {
if (res.code === 200) { // if (res.code === 200) {
this.topologyData = res.data.data; // this.topologyData = res.data.data;
} // }
}) // })
.catch((res) => { // .catch((res) => {
this.topologyData = {}; // this.topologyData = {};
}); // });
if (this.topologyData) { // if (this.topologyData) {
let data = JSON.parse(this.topologyData); // let data = JSON.parse(this.topologyData);
if(data.websocket){ // if(data.websocket){
data.websocket= data.websocket + "/" + (urlParse()===''?null:urlParse()); // data.websocket= data.websocket + "/" + (urlParse()===''?null:urlParse());
} // }
this.topologyData=JSON.stringify(data) // this.topologyData=JSON.stringify(data)
} // }
this.canvas.open(this.topologyData); // this.canvas.open(this.topologyData);
this.canvas.lock(1); // this.canvas.lock(1);
// 或 用window.topology对象 === 上面的canvas // // 或 用window.topology对象 === 上面的canvas
// topology.open(json); // // topology.open(json);
// 4. 如果json发送变化,重绘 // // 4. 如果json发送变化,重绘
// this.canvas.render(); // // this.canvas.render();
this.$nextTick(()=>{ // this.$nextTick(()=>{
this.onSizeWindow(); // this.onSizeWindow();
}) // })
// topology.data.socketEvent = true; // // topology.data.socketEvent = true;
// topology.on("websocket", (e) => { // // topology.on("websocket", (e) => {
// let msg = JSON.parse(e); // // let msg = JSON.parse(e);
// if (msg.code) { // // if (msg.code) {
// if (msg.code === 200) { // // if (msg.code === 200) {
// this.$message.success(msg.msg); // // this.$message.success(msg.msg);
// } else { // // } else {
// this.$message.error(msg.msg); // // this.$message.error(msg.msg);
// } // // }
// } // // }
// }); // // });
}, // },
}, },
}; };
</script> </script>
......
此差异已折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论