Commit a0ac2dff by jiang'yun

Merge branch 'master' of D:\qianhe\project\dizhen\dizhen-ui with conflicts.

parent 8fa5f746
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"author": "若依", "author": "若依",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build:prod": "vue-cli-service build", "build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
"url": "https://gitee.com/y_project/RuoYi-Vue.git" "url": "https://gitee.com/y_project/RuoYi-Vue.git"
}, },
"dependencies": { "dependencies": {
"@mdi/font": "^7.4.47", "@jsonforms/core": "^3.6.0",
"@jsonforms/vue": "^3.6.0",
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"axios": "0.28.1", "axios": "0.28.1",
"clipboard": "2.0.8", "clipboard": "2.0.8",
......
...@@ -445,6 +445,7 @@ export default { ...@@ -445,6 +445,7 @@ export default {
}, },
methods: { methods: {
init() { init() {
//创建 //创建
seismicPlot = new SeismicPlot({ seismicPlot = new SeismicPlot({
'canvas': this.$refs.plot, 'canvas': this.$refs.plot,
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
</div> </div>
<!-- 缩略图 end--> <!-- 缩略图 end-->
<!-- 缩略图弹窗 start --> <!-- 缩略图弹窗 start -->
<!-- 缩略图弹窗 start -->
<el-dialog v-if="shouldShowThumb" title="缩略图预览" :visible.sync="showThumbDialog" width="80%" append-to-body <el-dialog v-if="shouldShowThumb" title="缩略图预览" :visible.sync="showThumbDialog" width="80%" append-to-body
:z-index="9999999" :modal="true" :close-on-click-modal="true" :close-on-press-escape="true" :z-index="9999999" :modal="true" :close-on-click-modal="true" :close-on-press-escape="true"
custom-class="thumbnail-dialog"> custom-class="thumbnail-dialog">
...@@ -77,6 +78,7 @@ ...@@ -77,6 +78,7 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 缩略图弹窗 end --> <!-- 缩略图弹窗 end -->
<!-- 缩略图弹窗 end -->
</div> </div>
<!-- 添加加载状态和错误提示 --> <!-- 添加加载状态和错误提示 -->
...@@ -811,14 +813,6 @@ export default { ...@@ -811,14 +813,6 @@ export default {
// height: 0.1452145214521452 // height: 0.1452145214521452
// } // }
// }], // }],
// 添加鼠标悬停相关的数据
cursorInfo: {
depth: null,
trace: null,
value: null
},
showCursorInfo: true,
isHovering: false,
// 添加画笔工具相关属性 // 添加画笔工具相关属性
pencilTool: null, pencilTool: null,
selectedShape: null, selectedShape: null,
...@@ -887,9 +881,6 @@ export default { ...@@ -887,9 +881,6 @@ export default {
'DashDot': [20, 4, 2, 4], 'DashDot': [20, 4, 2, 4],
'DashDotDot': [20, 4, 2, 4, 2, 4] 'DashDotDot': [20, 4, 2, 4, 2, 4]
}, },
isWidgetReady: false,
loadingError: null,
pipeline: null,
colorProvider: null, colorProvider: null,
// 右键菜单相关数据 // 右键菜单相关数据
contextMenu: { contextMenu: {
...@@ -1163,7 +1154,7 @@ export default { ...@@ -1163,7 +1154,7 @@ export default {
}, },
// 监听routeId变化 // 监听routeId变化
routeId(newId, oldId) { routeId(newId, oldId) {
//console.log('[index2] routeId变化:', newId, oldId); // console.log('[index2] routeId变化:', newId, oldId);
if (newId !== oldId) { if (newId !== oldId) {
this.handleRouteChange(); this.handleRouteChange();
// 强制刷新缩略图 // 强制刷新缩略图
...@@ -1171,66 +1162,69 @@ export default { ...@@ -1171,66 +1162,69 @@ export default {
} }
} }
}, },
// mounted() {
//
// console.log(1111)
// // 初始化时强制设置为初始状态
// this.resetToInitialState();
//
// // 立即禁用滚动条工具
// this.disableScrollbarTools();
//
// // 添加强制隐藏滚动条的CSS
// this.addForceHideScrollbarCSS();
//
// // 关闭强力滚动条监控,避免影响全局布局
// // this.startAggressiveScrollbarMonitor();
//
// this.$nextTick(async () => {
// ['thumb-test-container', 'thumb-chart-container', 'super-visible-thumb'].forEach(id => {
// const el = document.getElementById(id);
// if (el) try { el.remove(); } catch (e) { }
// });
// // 保持缩略图容器在组件内部,避免在DOM树中难以定位
// // 初始化场景时不自动加载演示数据,等待接口结果决定
// this.shouldLoadDemo = false;
// this.createScene(this.$refs.plot, { autoloadDemo: false });
// // 等DOM稳定后再渲染缩略图组件
// setTimeout(() => {
// this.thumbReady = true;
// // 再兜底:确保右上角出现内容,并直接绘制缩略图
// setTimeout(() => {
// this.ensureThumbRendered();
// this.drawThumbDirect();
// }, 200);
// }, 100);
// // 已改为内嵌 YsgcIndex 缩略图,不再走旧的 ECharts 缩略图初始化
//
// // 自动拉取接口数据并加载第一组上/下部 SEGY(jbsegy -> 顶部,xbsegy -> 底部)
// try {
// await this.loadThumbData();
// if (Array.isArray(this.segyList) && this.segyList.length > 0) {
// await this.loadCurrentSegy();
// } else {
// // 无接口数据:若没有路由id,允许加载演示数据;若有id但无数据,保持空白
// const hasId = !!this.routeId;
// if (!hasId) {
// this.shouldLoadDemo = true;
// try { await this.handleFileSelect(this.plots); } catch (e) { }
// } else {
// this.clearCurrentPlots();
// console.info('[index2] 该项目无可用SEGY数据');
// }
// }
// } catch (e) {
// console.warn('[index2] 自动加载数据失败:', e);
// // 加载失败时,如果没有路由ID,尝试加载演示数据
// if (!this.routeId) {
// this.shouldLoadDemo = true;
// try { await this.handleFileSelect(this.plots); } catch (e) { }
// }
// }
// });
// },
mounted() { mounted() {
// 初始化时强制设置为初始状态 console.log(2222)
this.resetToInitialState();
// 立即禁用滚动条工具
this.disableScrollbarTools();
// 添加强制隐藏滚动条的CSS
this.addForceHideScrollbarCSS();
// 关闭强力滚动条监控,避免影响全局布局
// this.startAggressiveScrollbarMonitor();
this.$nextTick(async () => {
['thumb-test-container', 'thumb-chart-container', 'super-visible-thumb'].forEach(id => {
const el = document.getElementById(id);
if (el) try { el.remove(); } catch (e) { }
});
// 保持缩略图容器在组件内部,避免在DOM树中难以定位
// 初始化场景时不自动加载演示数据,等待接口结果决定
this.shouldLoadDemo = false;
this.createScene(this.$refs.plot, { autoloadDemo: false });
// 等DOM稳定后再渲染缩略图组件
setTimeout(() => {
this.thumbReady = true;
// 再兜底:确保右上角出现内容,并直接绘制缩略图
setTimeout(() => {
this.ensureThumbRendered();
this.drawThumbDirect();
}, 200);
}, 100);
// 已改为内嵌 YsgcIndex 缩略图,不再走旧的 ECharts 缩略图初始化
// 自动拉取接口数据并加载第一组上/下部 SEGY(jbsegy -> 顶部,xbsegy -> 底部)
try {
await this.loadThumbData();
if (Array.isArray(this.segyList) && this.segyList.length > 0) {
await this.loadCurrentSegy();
} else {
// 无接口数据:若没有路由id,允许加载演示数据;若有id但无数据,保持空白
const hasId = !!this.routeId;
if (!hasId) {
this.shouldLoadDemo = true;
try { await this.handleFileSelect(this.plots); } catch (e) { }
} else {
this.clearCurrentPlots();
console.info('[index2] 该项目无可用SEGY数据');
}
}
} catch (e) {
console.warn('[index2] 自动加载数据失败:', e);
// 加载失败时,如果没有路由ID,尝试加载演示数据
if (!this.routeId) {
this.shouldLoadDemo = true;
try { await this.handleFileSelect(this.plots); } catch (e) { }
}
}
});
},
mounted() {
// 将缩略图容器移动到body,确保fixed基于视口 // 将缩略图容器移动到body,确保fixed基于视口
if (this.$refs.thumbContainer && this.$refs.thumbContainer.parentNode !== document.body) { if (this.$refs.thumbContainer && this.$refs.thumbContainer.parentNode !== document.body) {
document.body.appendChild(this.$refs.thumbContainer); document.body.appendChild(this.$refs.thumbContainer);
...@@ -2186,6 +2180,8 @@ export default { ...@@ -2186,6 +2180,8 @@ export default {
//console.log('[index2] 加载segy文件 Top/Bottom:', (currentSegy.jbsegyName || currentSegy.jbsegy), (currentSegy.xbsegyName || currentSegy.xbsegy)); //console.log('[index2] 加载segy文件 Top/Bottom:', (currentSegy.jbsegyName || currentSegy.jbsegy), (currentSegy.xbsegyName || currentSegy.xbsegy));
//console.log('[index2] segy文件路径 Top/Bottom:', currentSegy.jbsegy, currentSegy.xbsegy); //console.log('[index2] segy文件路径 Top/Bottom:', currentSegy.jbsegy, currentSegy.xbsegy);
//
try { try {
// 双图加载:jbsegy -> 顶部;xbsegy -> 底部 // 双图加载:jbsegy -> 顶部;xbsegy -> 底部
// 根据后台返回的 ysqqXmxxSegy 数据,jbsegy 顶部展示,xbsegy 底部展示 // 根据后台返回的 ysqqXmxxSegy 数据,jbsegy 顶部展示,xbsegy 底部展示
...@@ -2209,6 +2205,9 @@ export default { ...@@ -2209,6 +2205,9 @@ export default {
try { this._seismicWidget && this._seismicWidget.invalidate && this._seismicWidget.invalidate(); } catch (e) { } try { this._seismicWidget && this._seismicWidget.invalidate && this._seismicWidget.invalidate(); } catch (e) { }
// 关键修复:切换下一道后,强制将底部 widget 绑定为当前 pipeline,并重新插入绘制工具,防止短暂显示上一道 // 关键修复:切换下一道后,强制将底部 widget 绑定为当前 pipeline,并重新插入绘制工具,防止短暂显示上一道
try { try {
// 确保 pipeline/路径键为当前
// await this.assertBottomPipelineCurrent();
this.refreshBottomDisplay();
// 确保 pipeline/路径键为当前(只在必要时调用,避免频繁刷新) // 确保 pipeline/路径键为当前(只在必要时调用,避免频繁刷新)
await this.assertBottomPipelineCurrent(); await this.assertBottomPipelineCurrent();
// 移除重复的 refreshBottomDisplay 调用,避免闪烁 // 移除重复的 refreshBottomDisplay 调用,避免闪烁
...@@ -2468,7 +2467,7 @@ export default { ...@@ -2468,7 +2467,7 @@ export default {
} }
console.log('[renderAnnotationsFromXbbznr] 开始解析标注数据,数量:', annotationList.length); console.log('[renderAnnotationsFromXbbznr] 开始解析标注数据,数量:', annotationList.length);
console.log('[renderAnnotationsFromXbbznr] annotationList 详细内容:', JSON.stringify(annotationList, null, 2)); // console.log('[renderAnnotationsFromXbbznr] annotationList 详细内容:', JSON.stringify(annotationList, null, 2));
// 清空现有的底部 savedAnnotations 和 savedLineAnnotations // 清空现有的底部 savedAnnotations 和 savedLineAnnotations
this.savedAnnotationsBottom = []; this.savedAnnotationsBottom = [];
...@@ -2879,116 +2878,143 @@ export default { ...@@ -2879,116 +2878,143 @@ export default {
this.isHovering = false; this.isHovering = false;
// 打开双图布局 // 打开双图布局
this.showDualChart(); // this.showDualChart();
// 不再隐藏容器,避免首次绘制依赖鼠标事件触发 // 不再隐藏容器,避免首次绘制依赖鼠标事件触发
const topScroll = this.$refs.topScroll; const topScroll = this.$refs.topScroll;
const bottomScroll = this.$refs.bottomScroll; const bottomScroll = this.$refs.bottomScroll;
// 清空现有图表 // if (this.annotationTool){
this.clearCurrentPlots(); // // if (this.annotationTool.isEnabled() && this.annotationTool.getMode() === PaintMode.Edit && this.annotationTool.getShape() != null) {
// if (Array.isArray(this.annotationTool.getShape())) {
// this.annotationTool.getShape().forEach((shape) => shape.dispose());
// } else {
// this.annotationTool.getShape().dispose();
// }
// this.annotationTool.editNode(null);
// // }
// }
var theCanvas = document.getElementById("canvasTop");
var w = theCanvas.width;
var h = theCanvas.height;
var context = theCanvas.getContext("2d");
context.clearRect(0, 0, w, h);
// 清空 pipeline 引用,确保旧数据被清除
this.pipeline = null;
this.pipelineBottom = null;
this.plots = null;
this.plotsBottom = null;
// 确保两个画布已初始化(如果widget不存在,才创建新的)
if (this.$refs.plot && !this._seismicWidget) {
this.createScene(this.$refs.plot, { autoloadDemo: false });
}
if (this.$refs.plot2 && !this._seismicWidgetBottom) {
this.initSecondWidget(this.$refs.plot2);
}
// 重新绑定事件监听器
this.$nextTick(() => {
this.bindContextMenuListeners();
});
// 等待一小段时间,确保清空操作完成
await new Promise(resolve => setTimeout(resolve, 50));
// 顺序加载,分别统计成功与失败,但不立即刷新 if(this.plots){
let topOk = false; this.plots.dispose();
let bottomOk = false;
try {
if (jbPath) {
const topTitle = jbName || this.extractFileName(jbPath) || 'jbsegy';
await this.loadSegyIntoWidget('top', jbPath, topTitle, false); // 不立即刷新
topOk = true;
} }
} catch (e) { if(this.plotsBottom){
console.warn('加载上部SEGY失败:', e); this.plotsBottom.dispose();
} }
try {
if (xbPath) {
const bottomTitle = xbName || this.extractFileName(xbPath) || 'xbsegy';
await this.loadSegyIntoWidget('bottom', xbPath, bottomTitle, false); // 不立即刷新
bottomOk = true;
}
} catch (e) {
console.warn('加载下部SEGY失败:', e);
}
// 等待所有数据加载完成后再统一刷新
if (topOk || bottomOk) {
// 使用 requestAnimationFrame 确保在下一帧统一刷新
await this.$nextTick();
requestAnimationFrame(() => {
try {
if (topOk && this._seismicWidget) {
if (this._seismicWidget.invalidate) {
this._seismicWidget.invalidate();
}
this.setScrollbarCSS(this._seismicWidget);
this.forceDisableInternalScrollbars();
setTimeout(() => {
try {
if (this._seismicWidget && this._seismicWidget.fitToBounds) {
this._seismicWidget.fitToBounds();
}
} catch (e) { }
}, 100);
}
if (bottomOk && this._seismicWidgetBottom) {
if (this._seismicWidgetBottom.invalidate) {
this._seismicWidgetBottom.invalidate();
}
this.setScrollbarCSS(this._seismicWidgetBottom);
this.forceDisableInternalScrollbars();
setTimeout(() => {
try {
if (this._seismicWidgetBottom && this._seismicWidgetBottom.fitToBounds) {
this._seismicWidgetBottom.fitToBounds();
}
// 额外在显示前进行一次尺寸同步与重绘
try { this.updateBaseCanvasSize(); } catch (e) { }
try { this.plotsBottom && typeof this.plotsBottom.redraw === 'function' && this.plotsBottom.redraw(); } catch (e) { }
} catch (e) { }
}, 100);
}
} catch (e) {
console.warn('最终刷新widget时出错:', e);
}
});
// 刷新完成后,额外进行一次尺寸同步与重绘,确保无悬浮也正确 // 清空现有图表
setTimeout(() => { this.clearCurrentPlots();
try { this.updateBaseCanvasSize(); } catch (e) { }
try { this._seismicWidget && this._seismicWidget.invalidate && this._seismicWidget.invalidate(); } catch (e) { } //
try { this._seismicWidgetBottom && this._seismicWidgetBottom.invalidate && this._seismicWidgetBottom.invalidate(); } catch (e) { } // 清空 pipeline 引用,确保旧数据被清除
requestAnimationFrame(() => { this.pipeline = null;
try { this._seismicWidget && this._seismicWidget.invalidate && this._seismicWidget.invalidate(); } catch (e) { } this.pipelineBottom = null;
try { this._seismicWidgetBottom && this._seismicWidgetBottom.invalidate && this._seismicWidgetBottom.invalidate(); } catch (e) { } this.plots = null;
}); this.plotsBottom = null;
}, 200); // // 确保两个画布已初始化(如果widget不存在,才创建新的)
} else { // if (this.$refs.plot && !this._seismicWidget) {
// 加载失败也做一次重绘尝试 // this.createScene(this.$refs.plot, { autoloadDemo: false });
try { this._seismicWidget && this._seismicWidget.invalidate && this._seismicWidget.invalidate(); } catch (e) { } // }
try { this._seismicWidgetBottom && this._seismicWidgetBottom.invalidate && this._seismicWidgetBottom.invalidate(); } catch (e) { } // if (this.$refs.plot2 && !this._seismicWidgetBottom) {
} // this.initSecondWidget(this.$refs.plot2);
// }
// // 重新绑定事件监听器
// this.$nextTick(() => {
// this.bindContextMenuListeners();
// });
//
// // 等待一小段时间,确保清空操作完成
// await new Promise(resolve => setTimeout(resolve, 50));
//
// // 顺序加载,分别统计成功与失败,但不立即刷新
// let topOk = false;
// let bottomOk = false;
// try {
// if (jbPath) {
// const topTitle = jbName || this.extractFileName(jbPath) || 'jbsegy';
// await this.loadSegyIntoWidget('top', jbPath, topTitle, false); // 不立即刷新
// topOk = true;
// }
// } catch (e) {
// console.warn('加载上部SEGY失败:', e);
// }
//
// try {
// if (xbPath) {
// const bottomTitle = xbName || this.extractFileName(xbPath) || 'xbsegy';
// await this.loadSegyIntoWidget('bottom', xbPath, bottomTitle, false); // 不立即刷新
// bottomOk = true;
// }
// } catch (e) {
// console.warn('加载下部SEGY失败:', e);
// }
//
// // 等待所有数据加载完成后再统一刷新
// if (topOk || bottomOk) {
// // 使用 requestAnimationFrame 确保在下一帧统一刷新
// await this.$nextTick();
// requestAnimationFrame(() => {
// try {
// if (topOk && this._seismicWidget) {
// if (this._seismicWidget.invalidate) {
// this._seismicWidget.invalidate();
// }
// this.setScrollbarCSS(this._seismicWidget);
// this.forceDisableInternalScrollbars();
// setTimeout(() => {
// try {
// if (this._seismicWidget && this._seismicWidget.fitToBounds) {
// this._seismicWidget.fitToBounds();
// }
// } catch (e) { }
// }, 100);
// }
// if (bottomOk && this._seismicWidgetBottom) {
// if (this._seismicWidgetBottom.invalidate) {
// this._seismicWidgetBottom.invalidate();
// }
// this.setScrollbarCSS(this._seismicWidgetBottom);
// this.forceDisableInternalScrollbars();
// setTimeout(() => {
// try {
// if (this._seismicWidgetBottom && this._seismicWidgetBottom.fitToBounds) {
// this._seismicWidgetBottom.fitToBounds();
// }
// // 额外在显示前进行一次尺寸同步与重绘
// try { this.updateBaseCanvasSize(); } catch (e) { }
// try { this.plotsBottom && typeof this.plotsBottom.redraw === 'function' && this.plotsBottom.redraw(); } catch (e) { }
// } catch (e) { }
// }, 100);
// }
// } catch (e) {
// console.warn('最终刷新widget时出错:', e);
// }
// });
//
// // 刷新完成后,额外进行一次尺寸同步与重绘,确保无悬浮也正确
// setTimeout(() => {
// try { this.updateBaseCanvasSize(); } catch (e) { }
// try { this._seismicWidget && this._seismicWidget.invalidate && this._seismicWidget.invalidate(); } catch (e) { }
// try { this._seismicWidgetBottom && this._seismicWidgetBottom.invalidate && this._seismicWidgetBottom.invalidate(); } catch (e) { }
// requestAnimationFrame(() => {
// try { this._seismicWidget && this._seismicWidget.invalidate && this._seismicWidget.invalidate(); } catch (e) { }
// try { this._seismicWidgetBottom && this._seismicWidgetBottom.invalidate && this._seismicWidgetBottom.invalidate(); } catch (e) { }
// });
// }, 200);
// } else {
// // 加载失败也做一次重绘尝试
// try { this._seismicWidget && this._seismicWidget.invalidate && this._seismicWidget.invalidate(); } catch (e) { }
// try { this._seismicWidgetBottom && this._seismicWidgetBottom.invalidate && this._seismicWidgetBottom.invalidate(); } catch (e) { }
// }
}, },
// 将指定segy加载到顶部/底部widget // 将指定segy加载到顶部/底部widget
// skipRefresh: 如果为 true,则不立即刷新,等待统一刷新 // skipRefresh: 如果为 true,则不立即刷新,等待统一刷新
...@@ -6260,6 +6286,9 @@ export default { ...@@ -6260,6 +6286,9 @@ export default {
} }
}, },
async handleFileSelect(plot) { async handleFileSelect(plot) {
let segys = []; let segys = [];
...@@ -6382,7 +6411,7 @@ export default { ...@@ -6382,7 +6411,7 @@ export default {
}); });
// Set the pipeline first // Set the pipeline first
this.pipeline = pipeline; this.pipeline= pipeline;
this._seismicWidget.setPipeline(pipeline); this._seismicWidget.setPipeline(pipeline);
// Then set widget options // Then set widget options
...@@ -6488,11 +6517,11 @@ export default { ...@@ -6488,11 +6517,11 @@ export default {
}); });
}, },
handleMouseMove(event) { // handleMouseMove(event) {
if (!this._seismicWidget || !this.isHovering) return; // if (!this._seismicWidget || !this.isHovering) return;
//
// 使用内置状态栏,不需要额外的处理逻辑 // // 使用内置状态栏,不需要额外的处理逻辑
}, // },
onFileOpen(evt, plot, fileInfo) { onFileOpen(evt, plot, fileInfo) {
evt.stopPropagation(); evt.stopPropagation();
...@@ -7918,8 +7947,7 @@ export default { ...@@ -7918,8 +7947,7 @@ export default {
if (!this.checkWidgetStatus() || !this.isWidgetReady) return; if (!this.checkWidgetStatus() || !this.isWidgetReady) return;
// 修复:如果 plots 为 null,直接使用 _seismicWidget const widget = this.plots.getRoot();
const widget = (this.plots && this.plots.getRoot) ? this.plots.getRoot() : this._seismicWidget;
if (!widget) return; if (!widget) return;
// 确保注释层存在 // 确保注释层存在
...@@ -7986,42 +8014,9 @@ export default { ...@@ -7986,42 +8014,9 @@ export default {
if (node && this.annotations.indexOfChild(node) === -1) { if (node && this.annotations.indexOfChild(node) === -1) {
this.annotations.addChild(node); this.annotations.addChild(node);
} }
tool.setEditMode(EditMode.EditNode);
// 关键修复:绘制完成后,确保节点保持可编辑属性 tool.editNode(node);
try {
const props = typeof node.getProperties === 'function' ? node.getProperties() : {};
if (!props.selectable || !props.movable || !props.editable) {
// 如果属性丢失,重新设置
const currentLineStyle = props.linestyle || new LineStyle({
color: this.lineStyle?.color || '#0351ad',
width: this.lineStyle?.width || 2,
pattern: this.getProcessedLinePattern ? this.getProcessedLinePattern(this.lineStyle?.pattern) : []
});
node.setProperties({
...props,
linestyle: currentLineStyle,
selectable: true,
movable: true,
editable: true
});
}
} catch (e) {
console.warn('设置线条节点编辑属性失败:', e);
}
// 修复:绘制完成后,保持编辑模式,让用户可以立即编辑刚绘制的线条
// 用户可以通过点击空白区域或按 ESC 来取消编辑,然后继续绘制新线条
try {
if (this.pencilTool && this.pencilTool.isEnabled() && this.showLineStylePanel) {
// 设置编辑模式,让用户可以选择和编辑刚绘制的线条
this.pencilTool.setEditMode(EditMode.EditNode);
this.pencilTool.editNode(node);
this.selectedShape = node; this.selectedShape = node;
}
} catch (e) {
console.warn('设置线条编辑模式失败:', e);
}
this.requestRepaint(); this.requestRepaint();
}); });
} }
......
...@@ -38,10 +38,7 @@ module.exports = { ...@@ -38,10 +38,7 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8999`, target: `http://127.0.0.1:8999`, //井测试
// target: `http://192.168.31.108:8999`,
target: `http://192.168.31.12:8999`,
// target: `http://192.168.31.12:8999`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '', ['^' + process.env.VUE_APP_BASE_API]: '',
......
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