提交 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 @@
<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_1331132_5lvbai88wkb.css" rel="stylesheet" />
<link href="<%= BASE_URL %>css/font_2030495_3ziztwjjab6.css" rel="stylesheet" />
<!-- 国家电网图元规范 -->
<link href="<%= BASE_URL %>css/sgge.css" rel="stylesheet" />
<!-- 电气工程常用字母和符号 -->
<link href="<%= BASE_URL %>css/eesymbols.css" rel="stylesheet" />
<!-- 电气元器件 -->
<!-- <link href="<%= BASE_URL %>css/ecomponents.css" rel="stylesheet" /> -->
<link href="<%= BASE_URL %>css/font_4042197_3rfoz0ndy1b.css" rel="stylesheet" />
<link href="<%= BASE_URL %>css/2d/iconfont.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/ty/iconfont.css" rel="stylesheet" />
<title>
<%= webpackConfig.name %>
......
......@@ -47,4 +47,12 @@ export function deleteTopologyHandle(id){
url:'/topology/deleteTopologyHandle/'+id,
method: 'delete'
})
}
export function getFile(file){
return request({
url: file,
method: 'get',
// params: query
})
}
\ No newline at end of file
......@@ -465,7 +465,7 @@
</div>
</template>
<script>
import { getRect } from "@topology/core";
// import { getRect } from "@topology/core";
import { lineOther } from "@/utils/topology/topologysetting.js";
export default {
props: {
......@@ -521,8 +521,8 @@ export default {
return "";
},
clickAlignment(type) {
let rect = getRect(this.pens);
this.$emit("no", rect, type);
// let rect = getRect(this.pens);
// this.$emit("no", rect, type);
},
typeSetting() {
this.$emit("ok", this.params);
......
......@@ -18,8 +18,8 @@
</div>
</template>
<script>
import { Topology } from "@topology/core";
import { register as registerChart } from "@topology/chart-diagram";
// import { Topology } from "@topology/core";
// import { register as registerChart } from "@topology/chart-diagram";
export default {
data() {
return {
......@@ -30,7 +30,7 @@ export default {
};
},
created() {
registerChart();
// registerChart();
},
mounted() {
this.init();
......@@ -48,15 +48,15 @@ export default {
this.canvas.open(this.data);
},
init() {
this.canvas = new Topology("topology-hrhx", {});
this.data.locked = 1;
// 3. 渲染图形
// 画布图形数据,可以来自于官网下载的json
this.canvas.open(this.data);
// 或 用window.topology对象 === 上面的canvas
// topology.open(json);
// 4. 如果json发送变化,重绘
this.canvas.render();
// this.canvas = new Topology("topology-hrhx", {});
// this.data.locked = 1;
// // 3. 渲染图形
// // 画布图形数据,可以来自于官网下载的json
// this.canvas.open(this.data);
// // 或 用window.topology对象 === 上面的canvas
// // topology.open(json);
// // 4. 如果json发送变化,重绘
// this.canvas.render();
},
},
};
......
......@@ -15,8 +15,8 @@
</div>
</template>
<script>
import { Topology } from "@topology/core";
import { register as registerChart } from "@topology/chart-diagram";
// import { Topology } from "@topology/core";
// import { register as registerChart } from "@topology/chart-diagram";
export default {
props: {
canvasData: {
......@@ -57,18 +57,18 @@ export default {
},
methods: {
init() {
this.canvas = new Topology("topology-hrhx");
this.canvasData.locked = 2;
// 3. 渲染图形
// 画布图形数据,可以来自于官网下载的json
this.canvasData.websocket = "";
this.canvas.open(this.canvasData);
// 或 用window.topology对象 === 上面的canvas
// topology.open(json);
// 4. 如果json发送变化,重绘
// this.canvas.render();
this.imgData = this.canvas.toImage();
this.canvas.destroy();
// this.canvas = new Topology("topology-hrhx");
// this.canvasData.locked = 2;
// // 3. 渲染图形
// // 画布图形数据,可以来自于官网下载的json
// this.canvasData.websocket = "";
// this.canvas.open(this.canvasData);
// // 或 用window.topology对象 === 上面的canvas
// // topology.open(json);
// // 4. 如果json发送变化,重绘
// // this.canvas.render();
// this.imgData = this.canvas.toImage();
// 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)
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
// baseURL: process.env.VUE_APP_BASE_API,
baseURL: mainProxy,
baseURL: process.env.VUE_APP_BASE_API,
// baseURL: mainProxy,
// 超时
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 {assembleSvg} from "./setting"
/**
......@@ -55,7 +55,7 @@ export function myAnchors(node) {
// }
}
export function getRegisterNode(name) {
registerNode(name, myShape, myAnchors, myIconRect, null);
// registerNode(name, myShape, myAnchors, myIconRect, null);
}
export function registerIcons(){
for (let i of getDatas()) {
......@@ -77,7 +77,7 @@ export function registerSvgs(){
}
}
export function getSvgToCavansRegisterNode(name) {
registerNode(name, myIconRect, myAnchors, myIconRect, null);
// registerNode(name, myIconRect, myAnchors, myIconRect, null);
}
export function svgTocavansShape(ctx, node) {
node.tmp={};
......
import { Node } from "@topology/core";
// import { Node } from "@topology/core";
//node动态
export const animateType = [
{ name: "无", type: 0 },
......
此差异已折叠。
......@@ -21,7 +21,7 @@
</div>
</template>
<script>
import { Topology } from "@topology/core";
// import { Topology } from "@topology/core";
import { getTopologyId } from "@/api/topology.js";
import { urlParse } from "@/utils/ruoyi";
export default {
......@@ -36,7 +36,7 @@ export default {
},
created() {},
mounted() {
this.init();
// this.init();
let that = this;
// window.onresize = () => {
// setTimeout(function () {
......@@ -59,53 +59,53 @@ export default {
onSizeOri() {
this.canvas.open(this.topologyData);
},
async init() {
this.canvas = new Topology("topology-hrhx", {});
// async init() {
// this.canvas = new Topology("topology-hrhx", {});
// Data.locked=1;
// this.topologyData=Data
// 3. 渲染图形
// 画布图形数据,可以来自于官网下载的json
let id = this.$route.query.id;
id = this.$route.fullPath.split("id=")[1];
await getTopologyId(id)
.then((res) => {
if (res.code === 200) {
this.topologyData = res.data.data;
}
})
.catch((res) => {
this.topologyData = {};
});
if (this.topologyData) {
let data = JSON.parse(this.topologyData);
if(data.websocket){
data.websocket= data.websocket + "/" + (urlParse()===''?null:urlParse());
}
this.topologyData=JSON.stringify(data)
// // Data.locked=1;
// // this.topologyData=Data
// // 3. 渲染图形
// // 画布图形数据,可以来自于官网下载的json
// let id = this.$route.query.id;
// id = this.$route.fullPath.split("id=")[1];
// await getTopologyId(id)
// .then((res) => {
// if (res.code === 200) {
// this.topologyData = res.data.data;
// }
// })
// .catch((res) => {
// this.topologyData = {};
// });
// if (this.topologyData) {
// let data = JSON.parse(this.topologyData);
// if(data.websocket){
// data.websocket= data.websocket + "/" + (urlParse()===''?null:urlParse());
// }
// this.topologyData=JSON.stringify(data)
}
this.canvas.open(this.topologyData);
this.canvas.lock(1);
// 或 用window.topology对象 === 上面的canvas
// topology.open(json);
// 4. 如果json发送变化,重绘
// this.canvas.render();
this.$nextTick(()=>{
this.onSizeWindow();
})
// topology.data.socketEvent = true;
// topology.on("websocket", (e) => {
// let msg = JSON.parse(e);
// if (msg.code) {
// if (msg.code === 200) {
// this.$message.success(msg.msg);
// } else {
// this.$message.error(msg.msg);
// }
// }
// });
},
// }
// this.canvas.open(this.topologyData);
// this.canvas.lock(1);
// // 或 用window.topology对象 === 上面的canvas
// // topology.open(json);
// // 4. 如果json发送变化,重绘
// // this.canvas.render();
// this.$nextTick(()=>{
// this.onSizeWindow();
// })
// // topology.data.socketEvent = true;
// // topology.on("websocket", (e) => {
// // let msg = JSON.parse(e);
// // if (msg.code) {
// // if (msg.code === 200) {
// // this.$message.success(msg.msg);
// // } else {
// // this.$message.error(msg.msg);
// // }
// // }
// // });
// },
},
};
</script>
......
此差异已折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论