diff --git a/frontend/src/views/home/components/compareDataCheckResultTable.vue b/frontend/src/views/home/components/compareDataCheckResultTable.vue
index b12aafd..f138b3d 100644
--- a/frontend/src/views/home/components/compareDataCheckResultTable.vue
+++ b/frontend/src/views/home/components/compareDataCheckResultTable.vue
@@ -2,11 +2,13 @@
-
diff --git a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue
index 3849a57..12412ce 100644
--- a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue
+++ b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue
@@ -159,10 +159,10 @@
diff --git a/frontend/src/views/plan/planList/components/planPopup.vue b/frontend/src/views/plan/planList/components/planPopup.vue
index 305d7d5..996f1e8 100644
--- a/frontend/src/views/plan/planList/components/planPopup.vue
+++ b/frontend/src/views/plan/planList/components/planPopup.vue
@@ -1131,7 +1131,7 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
formContent.name = ''
// 新建子计划允许选择数据源
const datasourceDicts = dictStore.getDictData('Datasource')
- formContent.datasourceIds = [datasourceDicts[0]?.code] ?? []
+ formContent.datasourceIds = datasourceDicts[0]?.code ? [datasourceDicts[0].code] : []
formContent.memberIds = []
}
generateData()
diff --git a/package.json b/package.json
index e220862..76481fd 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,8 @@
"debug": "^4.4.0",
"ee-bin": "^4.1.4",
"electron": "^31.7.6",
- "electron-builder": "^25.1.8"
+ "electron-builder": "^25.1.8",
+ "icon-gen": "^5.0.0"
},
"dependencies": {
"autofit.js": "^3.2.8",
diff --git a/public/images/example/aw-3.png b/public/images/example/aw-3.png
deleted file mode 100644
index ddebf47..0000000
Binary files a/public/images/example/aw-3.png and /dev/null differ
diff --git a/public/images/example/ee-mac-home.png b/public/images/example/ee-mac-home.png
deleted file mode 100644
index 7fd5093..0000000
Binary files a/public/images/example/ee-mac-home.png and /dev/null differ
diff --git a/public/images/example/ee-project-7.png b/public/images/example/ee-project-7.png
deleted file mode 100644
index adc4a31..0000000
Binary files a/public/images/example/ee-project-7.png and /dev/null differ
diff --git a/public/images/example/ee-win-home.png b/public/images/example/ee-win-home.png
deleted file mode 100644
index 5a83862..0000000
Binary files a/public/images/example/ee-win-home.png and /dev/null differ
diff --git a/public/images/example/ee-zs.png b/public/images/example/ee-zs.png
deleted file mode 100644
index ab27baa..0000000
Binary files a/public/images/example/ee-zs.png and /dev/null differ
diff --git a/public/images/example/ee_game_1.png b/public/images/example/ee_game_1.png
deleted file mode 100644
index c08dcb7..0000000
Binary files a/public/images/example/ee_game_1.png and /dev/null differ
diff --git a/public/images/example/fm-p1.png b/public/images/example/fm-p1.png
deleted file mode 100644
index 45ae065..0000000
Binary files a/public/images/example/fm-p1.png and /dev/null differ
diff --git a/public/images/example/fm-p2.png b/public/images/example/fm-p2.png
deleted file mode 100644
index 37360c9..0000000
Binary files a/public/images/example/fm-p2.png and /dev/null differ
diff --git a/public/images/example/fm-p4.png b/public/images/example/fm-p4.png
deleted file mode 100644
index 8ed280a..0000000
Binary files a/public/images/example/fm-p4.png and /dev/null differ
diff --git a/public/images/example/gaiyan-1.jpg b/public/images/example/gaiyan-1.jpg
deleted file mode 100644
index 91f9623..0000000
Binary files a/public/images/example/gaiyan-1.jpg and /dev/null differ
diff --git a/public/images/example/gaiyan-2.png b/public/images/example/gaiyan-2.png
deleted file mode 100644
index c3266f5..0000000
Binary files a/public/images/example/gaiyan-2.png and /dev/null differ
diff --git a/public/images/example/gaiyan-3.jpg b/public/images/example/gaiyan-3.jpg
deleted file mode 100644
index 55b7b37..0000000
Binary files a/public/images/example/gaiyan-3.jpg and /dev/null differ
diff --git a/public/images/example/im-p1.png b/public/images/example/im-p1.png
deleted file mode 100644
index 440a47c..0000000
Binary files a/public/images/example/im-p1.png and /dev/null differ
diff --git a/public/images/example/im-p5.png b/public/images/example/im-p5.png
deleted file mode 100644
index 0b7ac54..0000000
Binary files a/public/images/example/im-p5.png and /dev/null differ
diff --git a/public/images/example/im2-p1.png b/public/images/example/im2-p1.png
deleted file mode 100644
index 44d7145..0000000
Binary files a/public/images/example/im2-p1.png and /dev/null differ
diff --git a/public/images/example/logo.png b/public/images/example/logo.png
deleted file mode 100644
index 95dc60b..0000000
Binary files a/public/images/example/logo.png and /dev/null differ
diff --git a/public/images/example/lol-zhanji.png b/public/images/example/lol-zhanji.png
deleted file mode 100644
index 7166c2d..0000000
Binary files a/public/images/example/lol-zhanji.png and /dev/null differ
diff --git a/public/images/example/rq-1.png b/public/images/example/rq-1.png
deleted file mode 100644
index aeca28e..0000000
Binary files a/public/images/example/rq-1.png and /dev/null differ
diff --git a/public/images/example/rq-2.png b/public/images/example/rq-2.png
deleted file mode 100644
index ec793a1..0000000
Binary files a/public/images/example/rq-2.png and /dev/null differ
diff --git a/public/images/example/ubuntu-db.png b/public/images/example/ubuntu-db.png
deleted file mode 100644
index fbcf44e..0000000
Binary files a/public/images/example/ubuntu-db.png and /dev/null differ
diff --git a/public/images/example/uos-home.png b/public/images/example/uos-home.png
deleted file mode 100644
index b20c3dd..0000000
Binary files a/public/images/example/uos-home.png and /dev/null differ
diff --git a/public/images/example/v3-home.png b/public/images/example/v3-home.png
deleted file mode 100644
index 7535541..0000000
Binary files a/public/images/example/v3-home.png and /dev/null differ
diff --git a/public/images/example/vue-antd.png b/public/images/example/vue-antd.png
deleted file mode 100644
index 4747cfc..0000000
Binary files a/public/images/example/vue-antd.png and /dev/null differ
diff --git a/public/images/icon.ico b/public/images/icon.ico
new file mode 100644
index 0000000..1de1c87
Binary files /dev/null and b/public/images/icon.ico differ
diff --git a/public/images/logo-32.png b/public/images/logo-32.png
index f02c0dd..7fdd308 100644
Binary files a/public/images/logo-32.png and b/public/images/logo-32.png differ
diff --git a/public/images/tray.png b/public/images/tray.png
index e88d02d..3bee245 100644
Binary files a/public/images/tray.png and b/public/images/tray.png differ
diff --git a/scripts/config-generator.js b/scripts/config-generator.js
index b58ae76..02e7e7f 100644
--- a/scripts/config-generator.js
+++ b/scripts/config-generator.js
@@ -88,15 +88,15 @@ class ConfigGenerator {
console.log('[ConfigGenerator] Data path:', this.dataPath);
console.log('[ConfigGenerator] MySQL port:', options.mysqlPort || 3306);
console.log('[ConfigGenerator] MySQL password:', options.mysqlPassword || 'njcnpqs');
- console.log('[ConfigGenerator] Java port:', options.javaPort || 18092);
- console.log('[ConfigGenerator] WebSocket port:', options.websocketPort || 7777);
-
+ console.log('[ConfigGenerator] Java port:', options.javaPort || 18093);
+ console.log('[ConfigGenerator] WebSocket port:', options.websocketPort || 7778);
+
resolve({
configPath: this.configPath,
dataPath: this.dataPath,
mysqlPort: options.mysqlPort || 3306,
- javaPort: options.javaPort || 18092,
- websocketPort: options.websocketPort || 7777
+ javaPort: options.javaPort || 18093,
+ websocketPort: options.websocketPort || 7778
});
} catch (error) {
console.error('[ConfigGenerator] Failed to generate config:', error);
@@ -123,6 +123,75 @@ class ConfigGenerator {
console.log('[ConfigGenerator] Created directory:', dir);
}
});
+
+ // 复制内置的报告模板文件
+ this.copyBuiltInTemplates();
+ }
+
+ /**
+ * 复制内置的报告模板文件到用户数据目录
+ */
+ copyBuiltInTemplates() {
+ try {
+ const isDev = !process.resourcesPath;
+ const baseDir = isDev
+ ? path.join(__dirname, '..')
+ : path.dirname(process.resourcesPath);
+
+ // 内置模板源路径
+ const templateSource = isDev
+ ? path.join(baseDir, 'build', 'extraResources', 'templates')
+ : path.join(process.resourcesPath, 'extraResources', 'templates');
+
+ // 目标路径:用户数据目录/template/
+ const templateDest = path.join(this.dataPath, 'template');
+
+ // 检查源模板是否存在
+ if (!fs.existsSync(templateSource)) {
+ console.log('[ConfigGenerator] Built-in templates not found, skipping copy');
+ return;
+ }
+
+ // 递归复制模板文件(只复制不存在的文件,不覆盖已有文件)
+ this.copyTemplatesRecursive(templateSource, templateDest);
+
+ console.log('[ConfigGenerator] Built-in templates copied successfully');
+ } catch (error) {
+ console.error('[ConfigGenerator] Failed to copy templates:', error);
+ }
+ }
+
+ /**
+ * 递归复制模板文件(不覆盖已存在的文件)
+ * @param {string} src 源目录
+ * @param {string} dest 目标目录
+ */
+ copyTemplatesRecursive(src, dest) {
+ // 确保目标目录存在
+ if (!fs.existsSync(dest)) {
+ fs.mkdirSync(dest, { recursive: true });
+ }
+
+ // 读取源目录内容
+ const entries = fs.readdirSync(src, { withFileTypes: true });
+
+ entries.forEach(entry => {
+ const srcPath = path.join(src, entry.name);
+ const destPath = path.join(dest, entry.name);
+
+ if (entry.isDirectory()) {
+ // 递归复制子目录
+ this.copyTemplatesRecursive(srcPath, destPath);
+ } else {
+ // 只复制不存在的文件(不覆盖用户修改过的文件)
+ if (!fs.existsSync(destPath)) {
+ fs.copyFileSync(srcPath, destPath);
+ console.log('[ConfigGenerator] Copied template:', destPath);
+ } else {
+ console.log('[ConfigGenerator] Template already exists, skipping:', destPath);
+ }
+ }
+ });
}
/**
diff --git a/scripts/java-runner.js b/scripts/java-runner.js
index 11df35d..915464a 100644
--- a/scripts/java-runner.js
+++ b/scripts/java-runner.js
@@ -166,11 +166,20 @@ class JavaRunner {
'-Dfile.encoding=UTF-8', // 设置文件编码为UTF-8,解决中文乱码
'-Duser.language=zh', // 设置语言为中文
'-Duser.region=CN', // 设置地区为中国
- '-jar',
- jarPath,
- `--spring.config.location=${configPath}`
];
+ // 如果提供了 logPath,通过 JVM 系统属性传递给 logback
+ if (options.logPath) {
+ // Windows 路径使用正斜杠或保持原样,JVM 会自动处理
+ // 方案1:转换为正斜杠(跨平台兼容)
+ const normalizedLogPath = options.logPath.replace(/\\/g, '/');
+ javaArgs.push(`-DlogHomeDir=${normalizedLogPath}`);
+ console.log('[Java] Setting log path to:', normalizedLogPath);
+ console.log('[Java] Original log path:', options.logPath);
+ }
+
+ javaArgs.push('-jar', jarPath, `--spring.config.location=${configPath}`);
+
const defaultOptions = {
cwd: path.dirname(jarPath),
stdio: ['ignore', 'pipe', 'pipe'],
diff --git a/scripts/mysql-service-manager.js b/scripts/mysql-service-manager.js
index 6b99e2e..22082ed 100644
--- a/scripts/mysql-service-manager.js
+++ b/scripts/mysql-service-manager.js
@@ -300,6 +300,7 @@ default-character-set=utf8mb4
// 如果还没退出,强制杀死
this.log('warn', '优雅关闭超时,强制终止...');
this.mysqlProcess.kill('SIGTERM');
+ await this.sleep(1000);
}
this.log('success', 'MySQL 进程已关闭');
@@ -309,16 +310,30 @@ default-character-set=utf8mb4
if (this.mysqlProcess) {
this.mysqlProcess.kill('SIGTERM');
+ await this.sleep(1000);
}
// 确保进程被杀死
try {
await this.execCommand('taskkill /F /IM mysqld.exe');
+ await this.sleep(2000); // 等待文件句柄释放
} catch (e) {
// 忽略
}
}
+ // 最终检查:确保所有 mysqld.exe 进程都被终止
+ try {
+ const { stdout } = await this.execCommand('tasklist /FI "IMAGENAME eq mysqld.exe" /FO CSV /NH');
+ if (stdout.includes('mysqld.exe')) {
+ this.log('warn', '检测到残留进程,强制清理...');
+ await this.execCommand('taskkill /F /IM mysqld.exe');
+ await this.sleep(2000); // 额外等待以确保文件句柄释放
+ }
+ } catch (e) {
+ // 忽略
+ }
+
this.mysqlProcess = null;
this.currentPort = null;
}