更新12个教务系统并优化项目大小
主要更新: - 更新所有12个产业的教务系统数据和功能 - 删除所有 node_modules 文件夹(节省3.7GB) - 删除所有 .yoyo 缓存文件夹(节省1.2GB) - 删除所有 dist 构建文件(节省55MB) 项目优化: - 项目大小从 8.1GB 减少到 3.2GB(节省60%空间) - 保留完整的源代码和配置文件 - .gitignore 已配置,防止再次提交大文件 启动脚本: - start-industry.sh/bat/ps1 脚本会自动检测并安装依赖 - 首次启动时自动运行 npm install - 支持单个或批量启动产业系统 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
31
frontend/check_duplicates.cjs
Normal file
31
frontend/check_duplicates.cjs
Normal file
@@ -0,0 +1,31 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// 读取JSON文件
|
||||
const jsonPath = path.join(__dirname, '网页未导入数据/文旅产业/文旅_作业海报.json');
|
||||
const data = JSON.parse(fs.readFileSync(jsonPath, 'utf-8'));
|
||||
|
||||
console.log('JSON文件总数据:', data.length);
|
||||
|
||||
// 检查重复
|
||||
const names = data.map(d => d['课程名称']);
|
||||
const nameCount = {};
|
||||
|
||||
names.forEach(name => {
|
||||
nameCount[name] = (nameCount[name] || 0) + 1;
|
||||
});
|
||||
|
||||
const duplicates = Object.entries(nameCount).filter(([name, count]) => count > 1);
|
||||
|
||||
if (duplicates.length > 0) {
|
||||
console.log('\n发现重复的课程名称:');
|
||||
duplicates.forEach(([name, count]) => {
|
||||
console.log(` - "${name}": 出现 ${count} 次`);
|
||||
});
|
||||
} else {
|
||||
console.log('\n没有重复的课程名称');
|
||||
}
|
||||
|
||||
// 统计唯一课程名
|
||||
console.log('\n唯一课程名数量:', Object.keys(nameCount).length);
|
||||
console.log('差异:', data.length - Object.keys(nameCount).length);
|
||||
Reference in New Issue
Block a user