😎1、增加清理相关js脚本 2、调整翻译模式及增加Deepseek翻译

This commit is contained in:
zuohuaijun 2025-08-12 14:15:56 +08:00
parent 6e9780c507
commit b9265c4fd9
10 changed files with 5829 additions and 5536 deletions

View File

@ -12,3 +12,6 @@ VITE_PUBLIC_PATH =
# 国密SM公钥保持空即可自动从后台获取
VITE_SM_PUBLIC_KEY =
# 翻译 DeepSeek API key https://platform.deepseek.com/api_keys
DEEPSEEK_API_KEY = "你的 DeepSeek API key"

View File

@ -3,7 +3,7 @@ CHCP 65001
set dir=%~dp0
set moduleName=apiServices
set moduleName=system
set apiServicesPath=%dir%..\src\api-services\system\
set apiUrl=http://localhost:5005/swagger/Default/swagger.json

View File

@ -12,7 +12,7 @@
## 脚本一键生成
Swagger Codegen 读取 swagger.json 生成 typescript-axios 客户端后,直接拷贝到 src/api-services/system 子文件夹中
Swagger Codegen 读取 swagger.json 生成 typescript-axios 客户端后,直接拷贝到 src/api-services/system 子文件夹中(建议每个应用层创建一个独立的文件夹单独放置,和框架接口分开)
> Swagger Codegen 可以通过为任何 API 生成服务端代码和客户端代码的方式来简化 OpenAPI 的构建过程,因此,项目开发团队可以更好地关注 API 的实现和应用
> Githubhttps://github.com/swagger-api/swagger-codegen

View File

@ -2457,755 +2457,755 @@
},
"xa27dj7": {
"zh-cn": "设备已工作时长",
"en": ""
"en": "Device operating duration"
},
"otu2": {
"zh-cn": " 秒",
"en": ""
"en": "seconds"
},
"aw6h554": {
"zh-cn": "关闭一路",
"en": ""
"en": "Close Channel 1"
},
"csra2k4": {
"zh-cn": "打开一路",
"en": ""
"en": "Open Channel 1"
},
"h8ul2": {
"zh-cn": "打开",
"en": ""
"en": "Open"
},
"aw6khp4": {
"zh-cn": "关闭二路",
"en": ""
"en": "Close Channel 2"
},
"csrdf44": {
"zh-cn": "打开二路",
"en": ""
"en": "Open Channel 2"
},
"aw6hcw4": {
"zh-cn": "关闭三路",
"en": ""
"en": "Close Channel 3"
},
"csraab4": {
"zh-cn": "打开三路",
"en": ""
"en": "Open Channel 3"
},
"aw7zda4": {
"zh-cn": "关闭四路",
"en": ""
"en": "Close Channel 4"
},
"csssap4": {
"zh-cn": "打开四路",
"en": ""
"en": "Open four channels"
},
"cp02xa6": {
"zh-cn": "四路全部关闭",
"en": ""
"en": "Close all four channels"
},
"eakr2": {
"zh-cn": "全关",
"en": ""
"en": "All off"
},
"cp2nep6": {
"zh-cn": "四路全部打开",
"en": ""
"en": "Open all four channels"
},
"ed942": {
"zh-cn": "全开",
"en": ""
"en": "All on"
},
"6931m8c": {
"zh-cn": "网络服务断开或设备离线!",
"en": ""
"en": "Network service disconnected or device offline!"
},
"f2552": {
"zh-cn": "合计",
"en": ""
"en": "Total"
},
"d0e92h4": {
"zh-cn": "报表查看",
"en": ""
"en": "View report"
},
"eeeyuj5": {
"zh-cn": "确定导出?",
"en": ""
"en": "Confirm export?"
},
"p6kpuz8": {
"zh-cn": "努力同步中...",
"en": ""
"en": "Synchronizing..."
},
"u4enyr9": {
"zh-cn": "国家地名信息库数据",
"en": ""
"en": "National Geographic Information Database"
},
"cxetiw4": {
"zh-cn": "接口说明",
"en": ""
"en": "API Documentation"
},
"ru014yl": {
"zh-cn": "指定区划代码 (0或不输入导入全部数据)",
"en": ""
"en": "Specify division code (0 or leave blank to import all data)"
},
"cnq0sp6": {
"zh-cn": "指定区划代码",
"en": ""
"en": "Specify division code"
},
"hymp3ls": {
"zh-cn": "行政区级数最大查询深度最多支持2级深度不支持村级",
"en": ""
"en": "Administrative level depth (maximum query depth, supports up to 2 levels, village level not supported)"
},
"m7c8vk5": {
"zh-cn": "行政区级数",
"en": ""
"en": "Administrative level depth"
},
"jrfb8r4": {
"zh-cn": "飞燕草蓝",
"en": ""
"en": "Larkspur Blue"
},
"aghf564": {
"zh-cn": "保存成功",
"en": ""
"en": "Saved successfully"
},
"sjmq0j6": {
"zh-cn": "系统信息配置",
"en": ""
"en": "System Information Configuration"
},
"vgq71p8": {
"zh-cn": " 系统信息配置 ",
"en": ""
"en": "System Information Configuration"
},
"agpp984": {
"zh-cn": "保存配置",
"en": ""
"en": "Save Configuration"
},
"gahy4t4": {
"zh-cn": "系统图标",
"en": ""
"en": "System Icons"
},
"mz3wyb6": {
"zh-cn": " 系统图标 ",
"en": ""
"en": "System Icons"
},
"fs9o7r4": {
"zh-cn": "租户标识",
"en": ""
"en": "Tenant Identifier"
},
"79zdhl6": {
"zh-cn": " 租户标识 ",
"en": ""
"en": "Tenant Identifier"
},
"2kcyg55": {
"zh-cn": "访问地址:",
"en": ""
"en": "Access URL:"
},
"7sen8o5": {
"zh-cn": "系统主标题",
"en": ""
"en": "System Main Title"
},
"u6jvc7": {
"zh-cn": " 系统主标题 ",
"en": ""
"en": "System Main Title"
},
"7t0t3w5": {
"zh-cn": "系统副标题",
"en": ""
"en": "System Subtitle"
},
"1d9lr87": {
"zh-cn": " 系统副标题 ",
"en": ""
"en": "System Subtitle"
},
"gakchx4": {
"zh-cn": "系统描述",
"en": ""
"en": "System Description"
},
"n16a8r6": {
"zh-cn": " 系统描述 ",
"en": ""
"en": "System Description"
},
"dzxgnk4": {
"zh-cn": "水印内容",
"en": ""
"en": "Watermark Content"
},
"mwkx2o6": {
"zh-cn": " 水印内容 ",
"en": ""
"en": "Watermark Content"
},
"fq3ndec": {
"zh-cn": "若此处留空,则不显示水印",
"en": ""
"en": "If left blank, no watermark will be displayed"
},
"eupj9x4": {
"zh-cn": "版权说明",
"en": ""
"en": "Copyright Notice"
},
"lmcvn96": {
"zh-cn": " 版权说明 ",
"en": ""
"en": "Copyright Notice"
},
"fc0e8d5": {
"zh-cn": " 版本号 ",
"en": ""
"en": "Version Number"
},
"aib1034": {
"zh-cn": "主题颜色",
"en": ""
"en": "Theme Color"
},
"e8mi5v6": {
"zh-cn": " 主题颜色 ",
"en": ""
"en": "Theme Color"
},
"c76fp3": {
"zh-cn": "主题色",
"en": ""
"en": "Theme Color"
},
"c8wdij4": {
"zh-cn": "布局模式",
"en": ""
"en": "Layout Mode"
},
"vdcs976": {
"zh-cn": " 布局模式 ",
"en": ""
"en": "Layout Mode"
},
"km5s2x4": {
"zh-cn": "默认布局",
"en": ""
"en": "Default Layout"
},
"gc6i1y4": {
"zh-cn": "经典布局",
"en": ""
"en": "Classic Layout"
},
"dqtlhg4": {
"zh-cn": "横向布局",
"en": ""
"en": "Horizontal Layout"
},
"as4xly4": {
"zh-cn": "分栏布局",
"en": ""
"en": "Column Layout"
},
"jutwww4": {
"zh-cn": "页面动画",
"en": ""
"en": "Page Animation"
},
"8kt8tc6": {
"zh-cn": " 页面动画 ",
"en": ""
"en": "Page Animation"
},
"z10pj46": {
"zh-cn": "ICP备案号",
"en": ""
"en": "ICP Filing Number"
},
"lhepj48": {
"zh-cn": " ICP备案号 ",
"en": ""
"en": "ICP Filing Number"
},
"15spvq5": {
"zh-cn": "ICP地址",
"en": ""
"en": "ICP Address"
},
"8gmzne7": {
"zh-cn": " ICP地址 ",
"en": ""
"en": "ICP Address"
},
"2c79a05": {
"zh-cn": "图形验证码",
"en": ""
"en": "Graphic Verification Code"
},
"t088aw7": {
"zh-cn": " 图形验证码 ",
"en": ""
"en": "Graphic Verification Code"
},
"uduaf06": {
"zh-cn": "登录二次验证",
"en": ""
"en": "Secondary Login Verification"
},
"jl3sxw8": {
"zh-cn": " 登录二次验证 ",
"en": ""
"en": "Secondary Login Verification"
},
"ixmwbk5": {
"zh-cn": "首页轮播图",
"en": ""
"en": "Homepage Carousel"
},
"os7d5s7": {
"zh-cn": " 首页轮播图 ",
"en": ""
"en": "Homepage Carousel"
},
"ws83q38": {
"zh-cn": " 中国传统颜色 ",
"en": ""
"en": "Traditional Chinese Colors"
},
"qm1o8y6": {
"zh-cn": "添加动态插件",
"en": ""
"en": "Add dynamic plugin"
},
"5sav9k6": {
"zh-cn": "编辑动态插件",
"en": ""
"en": "Edit dynamic plugin"
},
"77fb1fa": {
"zh-cn": "确定删除动态插件:【",
"en": ""
"en": "Confirm deletion of dynamic plugin:【"
},
"av5v0z4": {
"zh-cn": "区域信息",
"en": ""
"en": "Regional information"
},
"hm48c64": {
"zh-cn": "行政名称",
"en": ""
"en": "Administrative name"
},
"hm3cc14": {
"zh-cn": "行政代码",
"en": ""
"en": "Administrative code"
},
"em7x2": {
"zh-cn": "区号",
"en": ""
"en": "Area code"
},
"xeardp6": {
"zh-cn": "添加行政区域",
"en": ""
"en": "Add administrative region"
},
"zy7v76": {
"zh-cn": "编辑行政区域",
"en": ""
"en": "Edit administrative region"
},
"7gd4w2a": {
"zh-cn": "确定删除行政区域:【",
"en": ""
"en": "Confirm deletion of administrative region:【"
},
"rj570a6": {
"zh-cn": "同步高德地图",
"en": ""
"en": "Synchronize Gaode Map"
},
"brosmv9": {
"zh-cn": "同步天地图行政区划",
"en": ""
"en": "Synchronize Tianditu Administrative Divisions"
},
"tvvdai9": {
"zh-cn": "同步国家地名信息库",
"en": ""
"en": "Synchronize National Geographic Names Database"
},
"a474ox6": {
"zh-cn": "菜单选择有误",
"en": ""
"en": "Incorrect menu selection"
},
"uci7jlb": {
"zh-cn": "生成/更新系统组织架构",
"en": ""
"en": "Generate/Update System Organization Structure"
},
"31i99n6": {
"zh-cn": " 全部展开 ",
"en": ""
"en": "Expand All"
},
"30n4qw6": {
"zh-cn": " 全部折叠 ",
"en": ""
"en": "Collapse All"
},
"cm2kle5": {
"zh-cn": "同步天地图",
"en": ""
"en": "Synchronize Tianditu"
},
"9z4sa49": {
"zh-cn": "同步民政部行政区划",
"en": ""
"en": "Synchronize Ministry of Civil Affairs Administrative Divisions"
},
"pwt0at7": {
"zh-cn": " 从云端同步 ",
"en": ""
"en": "Synchronize from Cloud"
},
"bcgo0u8": {
"zh-cn": " 生成组织架构 ",
"en": ""
"en": "Generate Organization Structure"
},
"acifrw4": {
"zh-cn": "作业集群",
"en": ""
"en": "Job Cluster"
},
"jjww5b4": {
"zh-cn": "集群编号",
"en": ""
"en": "Cluster ID"
},
"egwgr4": {
"zh-cn": " 宕机 ",
"en": ""
"en": "Down"
},
"cnxdze5": {
"zh-cn": " 工作中 ",
"en": ""
"en": "Working"
},
"z7pntv7": {
"zh-cn": " 等待被唤醒 ",
"en": ""
"en": "Waiting to be Woken Up"
},
"devbay4": {
"zh-cn": "更新时间",
"en": ""
"en": "Update Time"
},
"vql2vy7": {
"zh-cn": "请选择存放位置",
"en": ""
"en": "Please Select Storage Location"
},
"ds2louh": {
"zh-cn": "生成成功,请重启项目以加载最新代码",
"en": ""
"en": "Generation Successful, Please Restart Project to Load Latest Code"
},
"n8xxldn": {
"zh-cn": " 生成种子数据【生成实体后必须重启服务才生效】",
"en": ""
"en": "Generate Seed Data【Service Must Be Restarted After Entity Generation to Take Effect】"
},
"wmt0i36": {
"zh-cn": "表名不能为空",
"en": ""
"en": "Table name cannot be empty"
},
"bxzajr4": {
"zh-cn": "存放位置",
"en": ""
"en": "Storage location"
},
"kais9x6": {
"zh-cn": "过滤重复数据",
"en": ""
"en": "Filter duplicate data"
},
"c8wsiu4": {
"zh-cn": "差异日志",
"en": ""
"en": "Difference log"
},
"d1tr1p4": {
"zh-cn": "操作时间",
"en": ""
"en": "Operation time"
},
"a76rv34": {
"zh-cn": "业务对象",
"en": ""
"en": "Business object"
},
"d1x8m74": {
"zh-cn": "操作类型",
"en": ""
"en": "Operation type"
},
"1cdk925": {
"zh-cn": "Sql语句",
"en": ""
"en": "SQL statement"
},
"esxa2": {
"zh-cn": "参数",
"en": ""
"en": "Parameters"
},
"g3c92": {
"zh-cn": "导入",
"en": ""
"en": "Import"
},
"obrz2": {
"zh-cn": "详情",
"en": ""
"en": "Details"
},
"1h6y76": {
"zh-cn": " 日志详情 ",
"en": ""
"en": "Log Details"
},
"loyxgd5": {
"zh-cn": "操作前记录",
"en": ""
"en": "Pre-operation Record"
},
"lopoik5": {
"zh-cn": "操作后记录",
"en": ""
"en": "Post-operation Record"
},
"xl3ink7": {
"zh-cn": "不能以数字开头",
"en": ""
"en": "Cannot start with a number"
},
"ke08s3": {
"zh-cn": "表单有",
"en": ""
"en": "The form has"
},
"xsaxyid": {
"zh-cn": "处验证失败,请修改后再提交",
"en": ""
"en": "validation failures, please modify and resubmit"
},
"2jb6fo5": {
"zh-cn": "请输入名称",
"en": ""
"en": "Please enter a name"
},
"ckmie36": {
"zh-cn": "状态不能为空",
"en": ""
"en": "Status cannot be empty"
},
"2eief25": {
"zh-cn": "请选择状态",
"en": ""
"en": "Please select a status"
},
"2jaeja5": {
"zh-cn": "请输入备注",
"en": ""
"en": "Please enter remarks"
},
"nnql2": {
"zh-cn": "表单",
"en": ""
"en": "Form"
},
"2j2hgq5": {
"zh-cn": "请输入表单",
"en": ""
"en": "Please enter form"
},
"j94a2": {
"zh-cn": "流程",
"en": ""
"en": "Process"
},
"2j6w315": {
"zh-cn": "请输入流程",
"en": ""
"en": "Please enter process"
},
"fwfyrv8": {
"zh-cn": "确定开启插件:【",
"en": ""
"en": "Confirm to enable plugin: 【"
},
"cc5y4e4": {
"zh-cn": "开启成功",
"en": ""
"en": "Enabled successfully"
},
"cwthrn8": {
"zh-cn": "确定禁用插件:【",
"en": ""
"en": "Confirm to disable plugin: 【"
},
"ftc7864": {
"zh-cn": "禁用成功",
"en": ""
"en": "Disabled successfully"
},
"v8l3ksa": {
"zh-cn": "确定卸载动态插件:【",
"en": ""
"en": "Confirm to unload dynamic plugin: 【"
},
"b4hqhg4": {
"zh-cn": "卸载成功",
"en": ""
"en": "Uninstalled successfully"
},
"hubg2": {
"zh-cn": "文档",
"en": ""
"en": "Documentation"
},
"cxholw4": {
"zh-cn": "插件设置",
"en": ""
"en": "Plugin Settings"
},
"e78p2": {
"zh-cn": "作者",
"en": ""
"en": "Author"
},
"k06c2": {
"zh-cn": "版本",
"en": ""
"en": "Version"
},
"dgyvv4": {
"zh-cn": " 卸载 ",
"en": ""
"en": "Uninstall"
},
"dg9c74": {
"zh-cn": " 启用 ",
"en": ""
"en": "Enable"
},
"ix1qx4": {
"zh-cn": " 禁用 ",
"en": ""
"en": "Disable"
},
"ajjl946": {
"zh-cn": " 查看介绍 ",
"en": ""
"en": "View Introduction"
},
"amrnlq6": {
"zh-cn": " 查看文档 ",
"en": ""
"en": "View Documentation"
},
"lmys04": {
"zh-cn": " 设置 ",
"en": ""
"en": "Settings"
},
"cxhpfo4": {
"zh-cn": "插件详细",
"en": ""
"en": "Plugin Details"
},
"cvxuf3": {
"zh-cn": "名称:",
"en": ""
"en": "Name:"
},
"fartl3": {
"zh-cn": "描述:",
"en": ""
"en": "Description:"
},
"c88j53": {
"zh-cn": "作者:",
"en": ""
"en": "Author:"
},
"h85hy3": {
"zh-cn": "版本:",
"en": ""
"en": "Version:"
},
"v5p3z87": {
"zh-cn": "请选择验证类型",
"en": ""
"en": "Please select verification type"
},
"zer5nb8": {
"zh-cn": "请输入正确的数字",
"en": ""
"en": "Please enter a valid number"
},
"x0iq7v7": {
"zh-cn": "请选择起始日期",
"en": ""
"en": "Please select start date"
},
"yt0bk37": {
"zh-cn": "请选择结束日期",
"en": ""
"en": "Please select end date"
},
"kfq3r37": {
"zh-cn": "请输入提示信息",
"en": ""
"en": "Please enter prompt message"
},
"univa28": {
"zh-cn": "请输入正则表达式",
"en": ""
"en": "Please enter regular expression"
},
"cgjzi34": {
"zh-cn": "必填验证",
"en": ""
"en": "Required validation"
},
"inu5yc4": {
"zh-cn": "远程验证",
"en": ""
"en": "Remote validation"
},
"dbwow94": {
"zh-cn": "数组验证",
"en": ""
"en": "Array validation"
},
"dw55es4": {
"zh-cn": "正则模式",
"en": ""
"en": "Regular pattern"
},
"j9e2i54": {
"zh-cn": "长度限制",
"en": ""
"en": "Length restriction"
},
"xim2ls6": {
"zh-cn": " 编辑规则 ",
"en": ""
"en": "Edit rule"
},
"pwsdiyd": {
"zh-cn": " 本字段的数据库类型是:【",
"en": ""
"en": "The database type of this field is: 【"
},
"n1utl7b": {
"zh-cn": "】,.Net类型是【",
"en": ""
"en": "】, .Net type is: 【"
},
"k2t5np4": {
"zh-cn": "验证类型",
"en": ""
"en": "Validation Type"
},
"i7zjf24": {
"zh-cn": "起始日期",
"en": ""
"en": "Start Date"
},
"gfhy2u4": {
"zh-cn": "结束日期",
"en": ""
"en": "End Date"
},
"il0kye4": {
"zh-cn": "选择正则",
"en": ""
"en": "Select Regular Expression"
},
"bdmju65": {
"zh-cn": " 列编辑 ",
"en": ""
"en": "Column Editing"
},
"cftne3": {
"zh-cn": "列名称",
"en": ""
"en": "Column Name"
},
"ha9vlb8": {
"zh-cn": "显示文本不能为空",
"en": ""
"en": "Display Text Cannot Be Empty"
},
"shlhpn7": {
"zh-cn": "字典值不能为空",
"en": ""
"en": "Dictionary Value Cannot Be Empty"
},
"rc04at6": {
"zh-cn": "编码不能为空",
"en": ""
"en": "Code Cannot Be Empty"
},
"dn1ddz4": {
"zh-cn": "标签类型",
"en": ""
"en": "Tag Type"
},
"ai56i09": {
"zh-cn": "样式(Style)",
"en": ""
"en": "Style"
},
"2slpa99": {
"zh-cn": "样式(Class)",
"en": ""
"en": "Class"
},
"kocbsn7": {
"zh-cn": "请输入拓展数据",
"en": ""
"en": "Please enter extended data"
},
"ef9y2": {
"zh-cn": "列名",
"en": ""
"en": "Column name"
},
"g4la2": {
"zh-cn": "字段",
"en": ""
"en": "Field"
},
"ai3oho4": {
"zh-cn": "作用类型",
"en": ""
"en": "Action type"
},
"fzep2": {
"zh-cn": "字典",
"en": ""
"en": "Dictionary"
},
"ax7wz14": {
"zh-cn": "列表显示",
"en": ""
"en": "List display"
},
"fmmz2": {
"zh-cn": "增改",
"en": ""
"en": "Add/Modify"
},
"grwm2": {
"zh-cn": "必填",
"en": ""
"en": "Required"
},
"cs19o3": {
"zh-cn": "可排序",
"en": ""
"en": "Sortable"
},
"gkz0ww4": {
"zh-cn": "统计字段",
"en": ""
"en": "Statistical field"
},
"fltxkb5": {
"zh-cn": "是否是查询",
"en": ""
"en": "Is query"
},
"doq9cj4": {
"zh-cn": "查询方式",
"en": ""
"en": "Query method"
},
"ds3ycg4": {
"zh-cn": "校验规则",
"en": ""
"en": "Validation rules"
},
"f6vdjm4": {
"zh-cn": "生成配置",
"en": ""
"en": "Generation configuration"
},
"e5fv2": {
"zh-cn": "修改",
"en": ""
"en": "Modify"
},
"dhg3b3": {
"zh-cn": "天地图",
"en": ""
"en": "Tianditu"
},
"xmaxbu7": {
"zh-cn": "区划名称或编码",
@ -5197,43 +5197,43 @@
},
"cnxt24": {
"zh-cn": " 串行 ",
"en": ""
"en": "Serial"
},
"d3yjb4": {
"zh-cn": " 内置 ",
"en": ""
"en": "Built-in"
},
"jyqcu4": {
"zh-cn": " 脚本 ",
"en": ""
"en": "Script"
},
"vxskod8": {
"zh-cn": " HTTP请求 ",
"en": ""
"en": "HTTP Request"
},
"866ksn6": {
"zh-cn": " 请求参数 ",
"en": ""
"en": "Request Parameters"
},
"htw9in9": {
"zh-cn": "Http 请求参数",
"en": ""
"en": "Http Request Parameters"
},
"ia0wpb4": {
"zh-cn": "超时时间",
"en": ""
"en": "Timeout Duration"
},
"2bw8wr5": {
"zh-cn": "增加触发器",
"en": ""
"en": "Add Trigger"
},
"azb9tu4": {
"zh-cn": "删除作业",
"en": ""
"en": "Delete Job"
},
"8kzyaoa": {
"zh-cn": " 作业触发器运行记录",
"en": ""
"en": "Job Trigger Execution Log"
},
"bbm3ih15h": {
"zh-cn": "// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\n//\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\n//\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\n\n#region using\n\nusing Furion;\nusing Furion.HttpRemote;\nusing Furion.Logging;\nusing Furion.Schedule;\nusing Microsoft.Extensions.DependencyInjection;\nusing System;\nusing System.Data;\nusing System.Linq.Dynamic.Core;\nusing System.Linq.Expressions;\nusing System.Text;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Yitter.IdGenerator;\n\n#endregion\n\nnamespace Admin.NET.Core;\n\n/// <summary>\n/// 动态作业任务\n/// </summary>\n[JobDetail(\"你的作业编号\")]\npublic class DynamicJob : IJob\n{\n private readonly IServiceProvider _serviceProvider;\n\n public DynamicJob(IServiceProvider serviceProvider)\n {\n _serviceProvider = serviceProvider;\n }\n\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\n {\n using var serviceScope = _serviceProvider.CreateScope();\n \n // 获取用户仓储\n // var rep = serviceScope.ServiceProvider.GetService<SqlSugarRepository<SysUser>>();\n\n // 请求网址\n // var url = \"http://www.baidu.com\";\n // var httpRemoteService = App.GetRequiredService<IHttpRemoteService>();\n // var result = await httpRemoteService.GetAsStringAsync(url);\n // Console.WriteLine(result);\n\n // 日志\n // Log.Information(\"日志消息\");\n }\n}",

View File

@ -14,7 +14,8 @@
"build-api": "cd api_build/ && build.bat",
"build-approvalFlow-api": "cd api_build/ && build.bat approvalFlow",
"build-dingTalk-api": "cd api_build/ && build.bat dingTalk",
"build-goView-api": "cd api_build/ && build.bat goView"
"build-goView-api": "cd api_build/ && build.bat goView",
"translate": "node script/translate.cjs"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.2",
@ -95,7 +96,10 @@
"@vitejs/plugin-vue": "^6.0.1",
"@vitejs/plugin-vue-jsx": "^5.0.1",
"@vue/compiler-sfc": "^3.5.18",
"cli-progress": "^3.12.0",
"code-inspector-plugin": "^1.0.5",
"colors": "^1.4.0",
"dotenv": "^17.2.1",
"eslint": "^9.33.0",
"eslint-plugin-vue": "^10.4.0",
"globals": "^16.3.0",

16
Web/script/clean-dist.js Normal file
View File

@ -0,0 +1,16 @@
// 清理dist文件夹
import fs from 'fs';
import path from 'path';
const directoriesToDelete = ['dist'];
// 删除文件夹
directoriesToDelete.forEach((dir) => {
const dirPath = path.join(process.cwd(), dir);
if (fs.existsSync(dirPath)) {
fs.rmSync(dirPath, { recursive: true, force: true });
console.log(`Deleted directory: ${dirPath}`);
} else {
console.log(`Directory not found: ${dirPath}`);
}
});

16
Web/script/clean-lock.js Normal file
View File

@ -0,0 +1,16 @@
// 清理lock文件
import fs from 'fs';
import path from 'path';
const filesToDelete = ['pnpm-lock.yaml', 'package-lock.json'];
// 删除文件
filesToDelete.forEach((file) => {
const filePath = path.join(process.cwd(), file);
if (fs.existsSync(filePath)) {
fs.unlinkSync(filePath);
console.log(`Deleted file: ${filePath}`);
} else {
console.log(`File not found: ${filePath}`);
}
});

View File

@ -0,0 +1,16 @@
// 清理modules文件夹
import fs from 'fs';
import path from 'path';
const directoriesToDelete = ['node_modules'];
// 删除文件夹
directoriesToDelete.forEach((dir) => {
const dirPath = path.join(process.cwd(), dir);
if (fs.existsSync(dirPath)) {
fs.rmSync(dirPath, { recursive: true, force: true });
console.log(`Deleted directory: ${dirPath}`);
} else {
console.log(`Directory not found: ${dirPath}`);
}
});

238
Web/script/translate.cjs Normal file
View File

@ -0,0 +1,238 @@
// DeepSeek 翻译
require('dotenv').config();
const fs = require('fs');
const path = require('path');
const API_URL = 'https://api.deepseek.com/v1/chat/completions';
const API_KEY = process.env.DEEPSEEK_API_KEY;
const SOURCE_LANG = 'zh-cn';
const LOCALE_FILE = path.resolve(__dirname, '../lang/index.json');
// 引入进度条库
const cliProgress = require('cli-progress');
const colors = require('colors');
async function translateBatch(texts, targetLang) {
// 构建批量内容:每行以[index]开头
const batchContent = texts.map((text, index) => `[${index}] ${text}`).join('\n');
const response = await fetch(API_URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${API_KEY}`,
},
body: JSON.stringify({
model: 'deepseek-chat',
messages: [
{
role: 'system',
content: `作为企业软件系统专业翻译,严格遵守以下铁律:
核心原则
1. 严格逐符号翻译${SOURCE_LANG}${targetLang}
2. 禁止添加/删除/改写任何内容
3. 保持批量翻译的编号格式
符号保留规则
! 所有符号必须原样保留
编程符号\${ } <% %> @ # & |
UI占位符{0} %s [ ]
货币单位¥100.00 kg cm²
中文符号
中文符号位置规范
# 三级处理机制
1. 成对符号必须保持完整结构
正确WarningText
禁止Warning Text
2. 独立符号位置
优先句尾 Text?
次选句首 Text?
禁止句中 TextText?
3. 跨字符串符号处理
前段含 保留在段尾"Synchronize【"
后段含 保留在段首"】authorization data?"
符号后接字母时添加空格 Authorization
语法规范
外文 被动语态"Item was created"
中文 主动语态"已创建项目"
禁止推测上下文只翻译当前字符串内容
错误预防绝对禁止
将中文符号改为西式符号]
移动非中文符号位置
添加原文不存在的内容
合并/拆分原始字符串
批量处理
严格保持原始JSON结构
语言键名精确匹配zh-cn/en/it等`,
},
{
role: 'user',
content: batchContent,
},
],
temperature: 0.3,
max_tokens: 4000,
}),
});
const data = await response.json();
if (!response.ok || !data.choices || !data.choices[0]?.message?.content) {
const errorMsg = data.error?.message || `HTTP ${response.status}: ${response.statusText}`;
throw new Error(`翻译API返回错误${errorMsg}`);
}
// 解析批量响应
const batchResult = data.choices[0].message.content.trim();
const translations = {};
// 按行分割结果
const lines = batchResult.split('\n');
for (const line of lines) {
// 使用更精确的匹配模式
const match = line.match(/^\[(\d+)\]\s*(.+)/);
if (match) {
const index = parseInt(match[1]);
translations[index] = match[2].trim();
}
}
return translations;
}
function extractTargetLangs(localeData) {
const allLangs = new Set();
for (const translations of Object.values(localeData)) {
for (const lang of Object.keys(translations)) {
if (lang !== SOURCE_LANG) {
allLangs.add(lang);
}
}
}
return [...allLangs];
}
function groupTasksByLang(localeData, targetLangs) {
const tasks = {};
for (const lang of targetLangs) {
tasks[lang] = {
keys: [],
texts: [],
};
}
for (const [key, translations] of Object.entries(localeData)) {
const sourceText = translations[SOURCE_LANG];
if (!sourceText) {
console.warn(`⚠️ 缺少源语言(${SOURCE_LANG})文本: ${key}`);
continue;
}
for (const lang of targetLangs) {
if (!translations[lang] || translations[lang].trim() === '') {
tasks[lang].keys.push(key);
tasks[lang].texts.push(sourceText);
}
}
}
return tasks;
}
async function main() {
// 读取语言文件
const rawData = fs.readFileSync(LOCALE_FILE);
const localeData = JSON.parse(rawData);
const TARGET_LANGS = extractTargetLangs(localeData);
const langTasks = groupTasksByLang(localeData, TARGET_LANGS);
let totalUpdated = 0;
const BATCH_SIZE = 10;
// 创建多进度条容器
const multibar = new cliProgress.MultiBar(
{
format: '{lang} |' + colors.cyan('{bar}') + '| {percentage}% | {value}/{total} 条',
barCompleteChar: '\u2588',
barIncompleteChar: '\u2591',
hideCursor: true,
clearOnComplete: true,
stopOnComplete: true,
},
cliProgress.Presets.shades_grey
);
// 为每个语言创建进度条
const progressBars = {};
for (const lang of TARGET_LANGS) {
if (langTasks[lang].texts.length > 0) {
progressBars[lang] = multibar.create(langTasks[lang].texts.length, 0, {
lang: lang.padEnd(6, ' '),
});
}
}
// 并行处理所有语言
await Promise.all(
Object.entries(langTasks).map(async ([lang, task]) => {
if (task.texts.length === 0) return;
// 分批处理
for (let i = 0; i < task.texts.length; i += BATCH_SIZE) {
const batchKeys = task.keys.slice(i, i + BATCH_SIZE);
const batchTexts = task.texts.slice(i, i + BATCH_SIZE);
try {
const batchResults = await translateBatch(batchTexts, lang);
// 更新翻译结果
batchKeys.forEach((key, index) => {
if (batchResults[index] !== undefined) {
localeData[key][lang] = batchResults[index];
totalUpdated++;
} else {
console.error(`❌ 缺失翻译结果 [${key}@${lang}]`);
localeData[key][lang] = `[BATCH_ERROR] ${localeData[key][SOURCE_LANG]}`;
}
});
// 更新进度条
progressBars[lang].increment(batchTexts.length);
// 每批处理后保存进度
fs.writeFileSync(LOCALE_FILE, JSON.stringify(localeData, null, 2));
// 添加请求间隔避免速率限制
await new Promise((resolve) => setTimeout(resolve, 300));
} catch (error) {
console.error(`\n❌ 批次翻译失败 [${lang}]:`, error.message);
// 标记失败条目
batchKeys.forEach((key) => {
localeData[key][lang] = `[TRANSLATION_FAILED] ${localeData[key][SOURCE_LANG]}`;
});
// 跳过当前批次继续处理
progressBars[lang].increment(batchTexts.length);
}
}
})
);
// 停止所有进度条
multibar.stop();
// 最终保存
fs.writeFileSync(LOCALE_FILE, JSON.stringify(localeData, null, 2));
// 显示最终结果
if (totalUpdated > 0) {
console.log(`\n✅ 翻译完成! 共更新 ${totalUpdated} 处翻译`);
} else {
console.log('\n 没有需要更新的翻译');
}
}
main().catch(console.error);

View File

@ -76,7 +76,8 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
translateKey: '$tr',
// 是否清除已经不在上下文中的内容(清除项目中不再使用到的源语言键值对)
isClear: true,
// 翻译器(支持 doubao 或 deepseek
// 翻译器
translator: new EmptyTranslator(),
// translator: new VolcengineTranslator({
// apiKey: '',
// model: '',
@ -85,16 +86,15 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
// appId: '',
// appKey: '',
// }),
// translator: new EmptyTranslator(),
translator: new GoogleTranslator({
proxyOption: {
host: '127.0.0.1',
port: 7890,
headers: {
'User-Agent': 'Node',
},
},
}),
// translator: new GoogleTranslator({
// proxyOption: {
// host: '127.0.0.1',
// port: 7890,
// headers: {
// 'User-Agent': 'Node',
// },
// },
// }),
}),
],
root: process.cwd(),