feat(auth): 优化权限模块菜单数据处理逻辑
- 添加showMenuList、flatMenuList和breadcrumbList状态字段 - 修改getter方法直接返回缓存的状态数据 - 新增refreshDerivedMenus方法统一处理菜单衍生数据计算 - 在重置授权存储时清理新增的菜单相关状态 - 避免每次路由跳转时重复深拷贝整个菜单树结构 feat(checksquare): 完善校验功能组件和业务逻辑 - 新增测量点对话框组件用于显示监测点详细信息 - 添加校验台账工具函数解析测量点详情 - 实现任务表格删除功能包括确认提示和数据刷新 - 更新任务表格将缺失率字段替换为数据完整性字段 - 重构详情面板使用标签页展示不同类型的校验详情 - 优化摘要表格样式包括紧凑布局和危险颜色标识 - 统一详情对话框尺寸样式保持界面一致性 - 实现数据完整性字段的百分比单位去除处理 refactor(influxdb): 简化数据库启动流程移除命令行包装器 - 直接通过influxd.exe启动InfluxDB服务 - 移除对cmd.exe包装器的依赖和进程ID记录 - 保持进程管理和停止功能的完整性
This commit is contained in:
@@ -164,13 +164,12 @@ class InfluxDBProcessManager {
|
||||
}
|
||||
|
||||
const expectedExe = this.normalizeComparablePath(path.join(this.influxdbPath, 'influxd.exe'));
|
||||
const expectedBat = this.normalizeComparablePath(path.join(this.influxdbPath, 'start-influxdb.bat'));
|
||||
const expectedConfig = this.normalizeComparablePath((record && record.configFile) || this.configFile);
|
||||
const executablePath = this.normalizeComparablePath(processInfo.executablePath);
|
||||
const commandLine = this.normalizeComparablePath(processInfo.commandLine);
|
||||
|
||||
return (
|
||||
(executablePath === expectedExe || commandLine.includes(expectedBat)) &&
|
||||
executablePath === expectedExe &&
|
||||
(!expectedConfig || commandLine.includes(expectedConfig))
|
||||
);
|
||||
}
|
||||
@@ -268,24 +267,20 @@ bind-address = "127.0.0.1:8088"
|
||||
async startInfluxDBProcess(port) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const influxd = path.join(this.influxdbPath, 'influxd.exe');
|
||||
const startBat = path.join(this.influxdbPath, 'start-influxdb.bat');
|
||||
|
||||
this.log('system', '正在启动 InfluxDB 进程...');
|
||||
this.log('system', `可执行文件: ${influxd}`);
|
||||
this.log('system', `启动脚本: ${startBat}`);
|
||||
this.log('system', `配置文件: ${this.configFile}`);
|
||||
|
||||
if (!fs.existsSync(influxd)) {
|
||||
return reject(new Error(`influxd.exe 不存在: ${influxd}`));
|
||||
}
|
||||
if (!fs.existsSync(startBat)) {
|
||||
return reject(new Error(`start-influxdb.bat 不存在: ${startBat}`));
|
||||
}
|
||||
if (!fs.existsSync(this.configFile)) {
|
||||
return reject(new Error(`配置文件不存在: ${this.configFile}`));
|
||||
}
|
||||
|
||||
const influxdbProcess = spawn('cmd.exe', ['/d', '/s', '/c', 'call', startBat, this.configFile], {
|
||||
// 直接启动 influxd.exe,进程标记中的 PID 才能精确对应实际 InfluxDB 进程。
|
||||
const influxdbProcess = spawn(influxd, ['-config', this.configFile], {
|
||||
cwd: this.influxdbPath,
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
windowsHide: true
|
||||
|
||||
Reference in New Issue
Block a user