修改问题

main
JayChou 1 day ago
parent be92f66f9c
commit 225f038264
  1. 2
      index.html
  2. BIN
      src/assets/images/guanxitu.png
  3. 4
      src/utils/request.ts
  4. 9
      src/views/designRoute/index.vue
  5. 14
      src/views/program/index.vue

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="zh">
<head>
<meta charset="UTF-8" />
<link rel="icon" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 KiB

After

Width:  |  Height:  |  Size: 316 KiB

@ -2,7 +2,7 @@
import axios from "axios";
import pinia from "@/store";
import { ElMessage } from "element-plus";
import { removeToken } from "@/utils/auth";
import { clearLocalStorage } from "@/utils/auth";
import userStore from "@/store/modules/user";
import router from "@/router";
@ -30,7 +30,7 @@ const handleAuthError = (message:string) => {
const useUserStore = userStore(pinia);
ElMessage.error(message);
removeToken();
clearLocalStorage();
useUserStore.token = "";
router.push("/login");
};

@ -820,9 +820,12 @@ onMounted(() => {
setTimeout(() => {
restoreGraph();
}, 1000);
graph.on("edge:added", ({ edge }) => {
console.log("新增连线数据:", edge.toJSON());
});
const zoom = window.outerWidth / window.innerWidth;
console.log("缩放比例为:", zoom);
if(zoom > 1) {
ElMessage.error("当前浏览器缩放比例过大,通过Ctrl+滚轮调整比例");
// graph.zoom(-0.5);
}
// const nodes = graph.getNodes();
// console.log(nodes);
// const data = graph.toJSON();

@ -153,6 +153,8 @@ const nodeName = ref("");
const csedNode = ref<any>(null);
const operations = [];
onMounted(() => {
preWork();
// #region
@ -254,7 +256,8 @@ onMounted(() => {
console.log(cell);
if (!useSettingStore.saveRoute) {
ElMessage({
message: "请先完成配置",
message:
"第二步只需把模块拖放的相应的位置即可,下一步完成后可以填写数据",
type: "warning",
});
return;
@ -400,6 +403,12 @@ onMounted(() => {
graph.zoom(0.1);
}
});
const zoom = window.outerWidth / window.innerWidth;
console.log("缩放比例为:", zoom);
if(zoom > 1) {
ElMessage.error("当前浏览器缩放比例过大,通过Ctrl+滚轮调整比例");
graph.zoom(-0.5);
}
graph.bindKey(["ctrl+2", "meta+2"], () => {
const zoom = graph.zoom();
if (zoom > 0.5) {
@ -1213,12 +1222,13 @@ function preWork() {
bord
}
#stencil {
width: 0.9375rem;
width: 200px;
height: 3.125rem;
position: relative;
}
#graph-container {
flex:1;
width: 8.3333rem;
height: 3.125rem;
}

Loading…
Cancel
Save