Browse Source

feat:语言切换

ananzhusen 3 weeks ago
parent
commit
c634b85993

+ 283 - 1
src/i18n/lang/en.ts

@@ -1381,5 +1381,287 @@ const a = {
   "此功能仅对dxf文件解析结果":"This function only parses the results of dxf files",
   "dxf缩放倍率":"dxf scaling",
   "导入visio(vsdx)文件":"Import visio (vsdx) files",
-  "导入CAD(dxf)文件":"Import CAD (dxf) file"
+  "导入CAD(dxf)文件":"Import CAD (dxf) file",
+  "数据列表": "Data list",
+  "批量导入数据图元到画布": "Batch import data primitives to the canvas",
+  "需配合乐吾乐物联网平台使用此功能": "This function needs to be used in conjunction with the Lewu Le Internet of Things platform",
+  "搜索我的数据列表": "Search my data list",
+  "请选择数据源": "Please select the data source.",
+  "轮询间隔": "Polling interval",
+  "不填,仅初始执行一次": "Leave it blank. It will only be executed initially once",
+  "查询方式": "Query method",
+  "单条": "Single entry",
+  "语句": "Statement",
+  "第几页": "Which page?",
+  "每页数量": "Quantity per page",
+  "默认20": "Default 20",
+  "关联属性名": "Associated attribute name",
+  "连接测试": "Connection test",
+  "搜索设备属性": "Search for device attributes",
+  "JSON值": "JSON value",
+  "简单模式": "Simple mode",
+  "可自定义输入": "Customizable input",
+  "JSON模式": "JSON mode",
+  "更多属性": "More attributes",
+  "搜索属性": "Search attribute",
+  "关联图元属性": "Associate graphic element attributes",
+  "搜索图元": "Search for graphic elements",
+  "新建页面": "Create a new page",
+  "工程": "project",
+  "新建工程":"New Project",
+  "导入工程":"Import project",
+  "导出工程": "Export the project",
+  "导出工程离线部署包": "Export the offline deployment package of the project",
+  "导出工程Vue3组件包":"Export project Vue3 component package",
+  "导出工程Vue2组件包":"Export project Vue2 component package",
+  "导出工程react组件包":"Export project react component package",
+  "从模版创建": "Create from the template",
+  "引用页面": "Reference page",
+  "复制页面": "Copy the page",
+  "粘贴页面": "Paste the page",
+  "仅删除与工程的关联关系,不删除图纸": "Only delete the association with the project, not the drawings",
+  "移除页面": "Remove the page",
+  "删除文件夹": "Delete the folder",
+  "设备属性": "Equipment attributes",
+  "自定义数据": "Custom data",
+  "下载进度": "Download progress",
+  "重新下载": "Download again",
+  "确认取消吗?": "Is the cancellation confirmed?",
+  "取消任务": "Cancel the task",
+  "总览": "Overview",
+  "我的项目": "My project",
+  "我的消息": "My Message",
+  "未读消息": "Unread message",
+  "全部消息": "All messages",
+  "账号管理": "Account Management",
+  "添加物联网平台": "Add an Internet of Things platform",
+  "添加sql数据源": "Add sql data source",
+  "编辑sql数据源": "Edit the sql data source",
+  "请填写sql语句": "Please fill in the sql statement",
+  "关联属性名必填": "The name of the associated attribute is required",
+  "连接错误:": "Connection error:",
+  "连接成功:[": "Connection successful:",
+  "连接成功:": "Connection successful:",
+  "编辑${networkDialog.network.protocol}数据源": "Edit ${networkDialog.net work. Protocol} the data source",
+  "添加${protocol}数据源": "Add the ${protocol} data source",
+  "具体配置参考": "For specific configuration reference",
+  "距离下一年还有:${day}天${hours}时${minutes}分${seconds}秒": "There are still: ${day} days, ${hours} hours, ${minutes} minutes, ${seconds} seconds until the next year",
+  "合并单元格": "Merge cells",
+  "表头": "Header",
+  "当前页背景颜色": "Background color of the current page",
+  "边框颜色": "Border color",
+  "当前页边框颜色": "The border color of the current page",
+  "当前页文字颜色": "The text color of the current page",
+  "状态选项卡": "Status TAB",
+  "字体": "Font",
+  "状态图标大小": "Status icon size",
+  "日期-日": "Date - Day",
+  "日期选择-日": "Date selection - Day",
+  "是否自动平铺": "Whether it is automatically tiled",
+  "类型选择": "Type selection",
+  "日": "day",
+  "周": "weeks",
+  "月": "month",
+  "年": "years",
+  "是否多选": "Whether to make multiple choices or not",
+  "自定义样式": "Custom style",
+  "日期-周": "Date - Week",
+  "日期选择-周": "Date selection - Week",
+  "日期-月": "Date - Month",
+  "日期选择-月": "Date selection - Month",
+  "日期-年": "Date - Year",
+  "日期选择-年": "Date selection - year",
+  "日期-时间": "Date - Time",
+  "带时间的日期选择": "Date selection with time",
+  "区间-日": "Interval - day",
+  "日期区间-日": "Date range - day",
+  "区间-周": "Interval - week",
+  "日期区间-周": "Date range - week",
+  "区间-月": "Interval - month",
+  "日期区间-月": "Date range - month",
+  "区间-年": "Interval - year",
+  "日期区间-年": "Date range - year",
+  "区间-时间": "Interval - time",
+  "日期区间-时间": "Date interval - time",
+  "树形选择器": "Tree selector",
+  "湖北省": "Hubei Province",
+  "黄冈市": "Huanggang City",
+  "武穴市": "Wuxue City",
+  "武汉市": "Wuhan City",
+  "武昌区": "Wuchang District",
+  "东湖风景区": "East Lake Scenic Area",
+  "听涛景区": "Tingtao Scenic Area",
+  "汉阳区": "Hanyang District",
+  "汉阳大道": "Hanyang Avenue",
+  "汉阳火车站": "Hanyang Railway Station",
+  "湖南省": "Hunan Province",
+  "长沙市": "Changsha City",
+  "橘子洲头": "Orange Isle Head",
+  "常德市": "Changde City",
+  "桃源县": "Taoyuan County",
+  "展开所有": "Expand all",
+  "只能选择叶子节点": "Only leaf nodes can be selected",
+  "父子是否不关联": "Whether father and son are not related",
+  "过滤搜索": "Filter search",
+  "手风琴模式": "Accordion mode",
+  "默认文本": "Default text",
+  "树形-异步": "Tree shape - Asynchronous",
+  "树形筛选器-动态加载": "Tree Filter - Dynamic loading",
+  "异步加载接口(只支持GET请求)": "Asynchronous loading interface (only supports GET requests)",
+  "接口header": "Interface header",
+  "级联选择器": "Cascade selector",
+  "选项1.1": "Option 1.1",
+  "选项1.1.1": "Option 1.1.1",
+  "选项1.1.1.1": "Option 1.1.1.1",
+  "选项1.1.1.2": "Option 1.1.1.2",
+  "选项1.1.2": "Option 1.1.2",
+  "选项1.1.2.1": "Option 1.1.2.1",
+  "选项1.1.2.2": "Option 1.1.2.2",
+  "选项1.2": "Option 1.2",
+  "选项1.2.1": "Option 1.2.1",
+  "选项1.2.1.1": "Option 1.2.1.1",
+  "选项1.2.1.2": "Option 1.2.1.2",
+  "选项1.2.2": "Option 1.2.2",
+  "选项1.2.2.1": "Option 1.2.2.1",
+  "选项1.2.2.2": "Option 1.2.2.2",
+  "选项2.1": "Option 2.1",
+  "选项2.2": "Option 2.2",
+  "选项3.1": "Option 3.1",
+  "选项3.1.1": "Option 3.1.1",
+  "选项3.2.1": "Option 3.2.1",
+  "选项3.2": "Option 3.2",
+  "级联-异步": "Cascading - Asynchronous",
+  "级联筛选器-动态加载": "Cascade Filter - Dynamic loading",
+  "唯一ID": "Unique ID",
+  "父图元id": "Parent graphic element id",
+  "X坐标": "X coordinate",
+  "Y坐标": "Y-coordinate",
+  "宽度": "Width",
+  "高度": "Height",
+  "连线类型名": "Connection type name",
+  "连线封闭": "Connection closure",
+  "锚点数组。": "Anchor point group.",
+  "锁定宽高比": "Lock the aspect ratio",
+  "旋转角度": "Rotation Angle",
+  "文字旋转": "Text rotation",
+  "连线长度": "Connection length",
+  "提示脚本": "Prompt script",
+  "线宽": "Line width",
+  "虚线模式": "Dotted line mode",
+  "虚线偏移": "Dotted line offset",
+  "背景色": "Background color",
+  "移入颜色": "Move into the color",
+  "移入背景": "Move into the background",
+  "锚点颜色": "Anchor point color",
+  "禁用文本颜色": "Disable text color",
+  "文本自动调整": "Automatic text adjustment",
+  "绘制类型": "Draw type",
+  "渐变背景色": "Gradient background color",
+  "连线渐变色": "Gradient color of the connection lines",
+  "线端点样式": "Line endpoint style",
+  "线连接样式": "Line connection style",
+  "阴影模糊度": "Shadow blur degree",
+  "阴影X偏移量": "Shadow X offset",
+  "阴影Y偏移量": "Shadow Y offset",
+  "文本宽度": "Text width",
+  "文本高度": "Text height",
+  "文本左偏移": "Text left offset",
+  "文本上偏移": "Offset on the text",
+  "文本颜色类型": "Text color type",
+  "文本渐变颜色": "Text gradient color",
+  "移入文本颜色": "Move into the text color",
+  "选中文本颜色": "Select the text color",
+  "文本大小": "Text size",
+  "字体样式": "Font style",
+  "字体粗细": "Font thickness",
+  "文字对齐": "Text alignment",
+  "文本基线": "Text baseline",
+  "文本背景": "Text background",
+  "文本换行方式": "Text line break mode",
+  "文本省略": "Text omission",
+  "image跨源": "image Cross-source",
+  "图片保持比例": "Keep the picture in proportion.",
+  "图片圆角": "Rounded corners of the picture",
+  "图标旋转": "Icon rotation",
+  "图片/图标宽度": "Picture/icon width",
+  "图片/图标高度": "Picture/icon height",
+  "图标上偏移": "Offset on the icon",
+  "图标左偏移": "Left offset of the icon",
+  "图标字体": "Icon font",
+  "图标颜色": "Icon color",
+  "字体对齐": "Font alignment",
+  "图标加粗": "Bold the icon",
+  "禁止输入": "Prohibited input",
+  "禁止改变大小": "Do not change the size.",
+  "顶部填充": "Top filling",
+  "线条填充图片": "Line filling picture",
+  "子画笔": "Sub-brush",
+  "锚点大小": "Anchor point size",
+  "锚点背景": "Anchor point background",
+  "svg路径": "svg path",
+  "起始箭头": "Starting arrow",
+  "起始箭头大小": "Starting arrow size",
+  "终点箭头大小": "The size of the end arrow",
+  "起始箭头颜色": "Starting arrow color",
+  "终点箭头颜色": "Endpoint arrow color",
+  "连线关系": "Connection relationship",
+  "动画播放次数": "The number of animation plays",
+  "下一个动画": "The next animation",
+  "循环播放": "Loop play",
+  "动画时长": "Duration of the animation",
+  "动画速度": "Animation speed",
+  "动画虚线样式": "Animation dotted line style",
+  "动画圆点大小": "The size of the animation dots",
+  "动画反向": "Animation reverse",
+  "动画保持初始状态": "The animation remains in its initial state",
+  "连线动画类型": "Connection animation type",
+  "动画帧": "Animation frame",
+  "单击输入": "Click input",
+  "外部元素": "External element",
+  "自动折线": "Automatic folding line",
+  "起点自动关联": "Automatic association of the starting point",
+  "终点自动关联": "Automatic association of the endpoint",
+  "文字镜像": "Text mirror image",
+  "层": "layer",
+  "连线边框": "Connection border",
+  "边框圆角": "Rounded corners of the border",
+  "隐藏文本": "Hidden text",
+  "小数点": "Decimal point",
+  "最后帧": "The last frame",
+  "元素层级": "Element hierarchy",
+  "类名": "Class name",
+  "跟随图元": "Follow the graphic element",
+  "旋转中心": "Rotation center",
+  "key名": "key name",
+  "页面": "Page",
+  "文件夹": "Folder",
+  "请先删除文件夹下的页面": "Please delete the pages under the folder first",
+  "请先保存当前画布": "Please save the current canvas first",
+  "该页面已被引用,是否拷贝一份?": "This page has been referenced. Do you want to make a copy?",
+  "sql数据源": "sql data source",
+  "请选择一项设备属性!": "Please select a device attribute!",
+  "属性名必填!": "Attribute name required!",
+  "发送到":"Send to",
+  "参数名":"Parameter name",
+  "参数值":"Parameter value",
+  "URL地址":"URL address",
+  "背景网格":"Background grid",
+  "网格颜色":"Grid color",
+  "开启网格":"Open grid",
+  "网格大小":"Grid size",
+  "数据源名称":"Datasource name",
+  "名称:":"Name:",
+  "地址:":"Address:",
+  "支持设置动态参数,例如:":"Supports setting dynamic parameters, for example:",
+  "参考文档:":"Reference document:",
+  "SQL数据源":"SQL data source",
+  "消息类型":"Message type",
+  "消息内容":"Message content",
+  "普通消息":"Normal message",
+  "成功":"Success",
+  "警告":"Warning",
+  "错误":"Error",
+  "问题":"Problem",
+  "二次确认":"Second confirmation",
+  "确认文本":"Confirmation text"
 };export default a

+ 279 - 1
src/i18n/lang/zh_CHT.ts

@@ -1382,5 +1382,283 @@ const a = {
   "此功能仅对dxf文件解析结果":"此功能僅對dxf檔案解析結果",
   "dxf缩放倍率":"dxf縮放倍率",
   "导入visio(vsdx)文件":"導入visio(vsdx)檔案",
-  "导入CAD(dxf)文件":"導入CAD(dxf)檔案"
+  "导入CAD(dxf)文件":"導入CAD(dxf)檔案",
+  "数据列表": "數據列表",
+  "批量导入数据图元到画布": "批量導入數據圖元到畫布",
+  "需配合乐吾乐物联网平台使用此功能": "需配合樂吾樂物聯網平臺使用此功能",
+  "搜索我的数据列表": "搜索我的數據列表",
+  "请选择数据源": "請選擇數據源",
+  "轮询间隔": "輪詢間隔",
+  "不填,仅初始执行一次": "不填,僅初始執行一次",
+  "查询方式": "查詢方式",
+  "单条": "單條",
+  "语句": "語句",
+  "第几页": "第幾頁",
+  "每页数量": "每頁數量",
+  "默认20": "默認20",
+  "关联属性名": "關聯屬性名",
+  "连接测试": "連接測試",
+  "搜索设备属性": "搜索設備屬性",
+  "JSON值": "JSON值",
+  "简单模式": "簡單模式",
+  "可自定义输入": "可自定義輸入",
+  "JSON模式": "JSON模式",
+  "更多属性": "更多屬性",
+  "搜索属性": "搜索屬性",
+  "关联图元属性": "關聯圖元屬性",
+  "搜索图元": "搜索圖元",
+  "新建页面": "新建頁面",
+  "新建工程":"新建工程",
+  "导入工程":"導入工程",
+  "导出工程": "導出工程",
+  "导出工程离线部署包": "導出工程離線部署包",
+  "导出工程Vue3组件包":"導出工程Vue3元件包",
+  "导出工程Vue2组件包":"導出工程Vue2元件包",
+  "导出工程react组件包":"導出工程react元件包",
+  "从模版创建": "從模版創建",
+  "引用页面": "引用頁面",
+  "复制页面": "複製頁面",
+  "粘贴页面": "粘貼頁面",
+  "仅删除与工程的关联关系,不删除图纸": "僅刪除與工程的關聯關係,不刪除圖紙",
+  "移除页面": "移除頁面",
+  "删除文件夹": "刪除文件夾",
+  "设备属性": "設備屬性",
+  "自定义数据": "自定義數據",
+  "下载进度": "下載進度",
+  "重新下载": "重新下載",
+  "确认取消吗?": "確認取消嗎?",
+  "取消任务": "取消任務",
+  "总览": "總覽",
+  "我的项目": "我的項目",
+  "我的消息": "我的消息",
+  "未读消息": "未讀消息",
+  "全部消息": "全部消息",
+  "账号管理": "賬號管理",
+  "添加物联网平台": "添加物聯網平臺",
+  "添加sql数据源": "添加sql數據源",
+  "编辑sql数据源": "編輯sql數據源",
+  "请填写sql语句": "請填寫sql語句",
+  "关联属性名必填": "關聯屬性名必填",
+  "连接错误:": "連接錯誤:",
+  "连接成功:[": "連接成功:[",
+  "连接成功:": "連接成功:",
+  "编辑${networkDialog.network.protocol}数据源": "編輯${networkDialog.network.protocol}數據源",
+  "添加${protocol}数据源": "添加${protocol}數據源",
+  "合并单元格": "合併單元格",
+  "表头": "表頭",
+  "当前页背景颜色": "當前頁背景顏色",
+  "边框颜色": "邊框顏色",
+  "当前页边框颜色": "當前頁邊框顏色",
+  "当前页文字颜色": "當前頁文字顏色",
+  "状态选项卡": "狀態選項卡",
+  "字体": "字體",
+  "状态图标大小": "狀態圖標大小",
+  "日期-日": "日期-日",
+  "日期选择-日": "日期選擇-日",
+  "是否自动平铺": "是否自動平鋪",
+  "类型选择": "類型選擇",
+  "日": "日",
+  "周": "周",
+  "月": "月",
+  "年": "年",
+  "是否多选": "是否多選",
+  "自定义样式": "自定義樣式",
+  "日期-周": "日期-周",
+  "日期选择-周": "日期選擇-周",
+  "日期-月": "日期-月",
+  "日期选择-月": "日期選擇-月",
+  "日期-年": "日期-年",
+  "日期选择-年": "日期選擇-年",
+  "日期-时间": "日期-時間",
+  "带时间的日期选择": "帶時間的日期選擇",
+  "区间-日": "區間-日",
+  "日期区间-日": "日期區間-日",
+  "区间-周": "區間-周",
+  "日期区间-周": "日期區間-周",
+  "区间-月": "區間-月",
+  "日期区间-月": "日期區間-月",
+  "区间-年": "區間-年",
+  "日期区间-年": "日期區間-年",
+  "区间-时间": "區間-時間",
+  "日期区间-时间": "日期區間-時間",
+  "树形选择器": "樹形選擇器",
+  "湖北省": "湖北省",
+  "黄冈市": "黃岡市",
+  "武穴市": "武穴市",
+  "武汉市": "武漢市",
+  "武昌区": "武昌區",
+  "东湖风景区": "東湖風景區",
+  "听涛景区": "聽濤景區",
+  "汉阳区": "漢陽區",
+  "汉阳大道": "漢陽大道",
+  "汉阳火车站": "漢陽火車站",
+  "湖南省": "湖南省",
+  "长沙市": "長沙市",
+  "橘子洲头": "橘子洲頭",
+  "常德市": "常德市",
+  "桃源县": "桃源縣",
+  "展开所有": "展開所有",
+  "只能选择叶子节点": "只能選擇葉子節點",
+  "父子是否不关联": "父子是否不關聯",
+  "过滤搜索": "過濾搜索",
+  "手风琴模式": "手風琴模式",
+  "默认文本": "默認文本",
+  "树形-异步": "樹形-異步",
+  "树形筛选器-动态加载": "樹形篩選器-動態加載",
+  "异步加载接口(只支持GET请求)": "異步加載接口(只支持GET請求)",
+  "接口header": "接口header",
+  "级联选择器": "級聯選擇器",
+  "选项1.1": "選項1.1",
+  "选项1.1.1": "選項1.1.1",
+  "选项1.1.1.1": "選項1.1.1.1",
+  "选项1.1.1.2": "選項1.1.1.2",
+  "选项1.1.2": "選項1.1.2",
+  "选项1.1.2.1": "選項1.1.2.1",
+  "选项1.1.2.2": "選項1.1.2.2",
+  "选项1.2": "選項1.2",
+  "选项1.2.1": "選項1.2.1",
+  "选项1.2.1.1": "選項1.2.1.1",
+  "选项1.2.1.2": "選項1.2.1.2",
+  "选项1.2.2": "選項1.2.2",
+  "选项1.2.2.1": "選項1.2.2.1",
+  "选项1.2.2.2": "選項1.2.2.2",
+  "选项2.1": "選項2.1",
+  "选项2.2": "選項2.2",
+  "选项3.1": "選項3.1",
+  "选项3.1.1": "選項3.1.1",
+  "选项3.2.1": "選項3.2.1",
+  "选项3.2": "選項3.2",
+  "级联-异步": "級聯-異步",
+  "级联筛选器-动态加载": "級聯篩選器-動態加載",
+  "唯一ID": "唯一ID",
+  "父图元id": "父圖元id",
+  "X坐标": "X座標",
+  "Y坐标": "Y座標",
+  "宽度": "寬度",
+  "高度": "高度",
+  "连线类型名": "連線類型名",
+  "连线封闭": "連線封閉",
+  "锚点数组。": "錨點數組。",
+  "锁定宽高比": "鎖定寬高比",
+  "旋转角度": "旋轉角度",
+  "文字旋转": "文字旋轉",
+  "连线长度": "連線長度",
+  "提示脚本": "提示腳本",
+  "线宽": "線寬",
+  "虚线模式": "虛線模式",
+  "虚线偏移": "虛線偏移",
+  "背景色": "背景色",
+  "移入颜色": "移入顏色",
+  "移入背景": "移入背景",
+  "锚点颜色": "錨點顏色",
+  "禁用文本颜色": "禁用文本顏色",
+  "文本自动调整": "文本自動調整",
+  "绘制类型": "繪製類型",
+  "渐变背景色": "漸變背景色",
+  "连线渐变色": "連線漸變色",
+  "线端点样式": "線端點樣式",
+  "线连接样式": "線連接樣式",
+  "阴影模糊度": "陰影模糊度",
+  "阴影X偏移量": "陰影X偏移量",
+  "阴影Y偏移量": "陰影Y偏移量",
+  "文本宽度": "文本寬度",
+  "文本高度": "文本高度",
+  "文本左偏移": "文本左偏移",
+  "文本上偏移": "文本上偏移",
+  "文本颜色类型": "文本顏色類型",
+  "文本渐变颜色": "文本漸變顏色",
+  "移入文本颜色": "移入文本顏色",
+  "选中文本颜色": "選中文本顏色",
+  "文本大小": "文本大小",
+  "字体样式": "字體樣式",
+  "字体粗细": "字體粗細",
+  "文字对齐": "文字對齊",
+  "文本基线": "文本基線",
+  "文本背景": "文本背景",
+  "文本换行方式": "文本換行方式",
+  "文本省略": "文本省略",
+  "image跨源": "image跨源",
+  "图片保持比例": "圖片保持比例",
+  "图片圆角": "圖片圓角",
+  "图标旋转": "圖標旋轉",
+  "图片/图标宽度": "圖片/圖標寬度",
+  "图片/图标高度": "圖片/圖標高度",
+  "图标上偏移": "圖標上偏移",
+  "图标左偏移": "圖標左偏移",
+  "图标字体": "圖標字體",
+  "图标颜色": "圖標顏色",
+  "字体对齐": "字體對齊",
+  "图标加粗": "圖標加粗",
+  "禁止输入": "禁止輸入",
+  "禁止改变大小": "禁止改變大小",
+  "顶部填充": "頂部填充",
+  "线条填充图片": "線條填充圖片",
+  "子画笔": "子畫筆",
+  "锚点大小": "錨點大小",
+  "锚点背景": "錨點背景",
+  "svg路径": "svg路徑",
+  "起始箭头": "起始箭頭",
+  "起始箭头大小": "起始箭頭大小",
+  "终点箭头大小": "終點箭頭大小",
+  "起始箭头颜色": "起始箭頭顏色",
+  "终点箭头颜色": "終點箭頭顏色",
+  "连线关系": "連線關係",
+  "动画播放次数": "動畫播放次數",
+  "下一个动画": "下一個動畫",
+  "循环播放": "循環播放",
+  "动画时长": "動畫時長",
+  "动画速度": "動畫速度",
+  "动画虚线样式": "動畫虛線樣式",
+  "动画圆点大小": "動畫圓點大小",
+  "动画反向": "動畫反向",
+  "动画保持初始状态": "動畫保持初始狀態",
+  "连线动画类型": "連線動畫類型",
+  "动画帧": "動畫幀",
+  "单击输入": "單擊輸入",
+  "外部元素": "外部元素",
+  "自动折线": "自動折線",
+  "起点自动关联": "起點自動關聯",
+  "终点自动关联": "終點自動關聯",
+  "文字镜像": "文字鏡像",
+  "层": "層",
+  "连线边框": "連線邊框",
+  "边框圆角": "邊框圓角",
+  "隐藏文本": "隱藏文本",
+  "小数点": "小數點",
+  "最后帧": "最後幀",
+  "元素层级": "元素層級",
+  "类名": "類名",
+  "跟随图元": "跟隨圖元",
+  "旋转中心": "旋轉中心",
+  "key名": "key名",
+  "页面": "頁面",
+  "文件夹": "文件夾",
+  "请先删除文件夹下的页面": "請先刪除文件夾下的頁面",
+  "请先保存当前画布": "請先保存當前畫布",
+  "该页面已被引用,是否拷贝一份?": "該頁面已被引用,是否拷貝一份?",
+  "sql数据源": "sql數據源",
+  "请选择一项设备属性!": "請選擇一項設備屬性!",
+  "属性名必填!": "屬性名必填!",
+  "发送到":"發送到",
+  "参数名":"參數名稱",
+  "参数值":"參數值",
+  "背景网格":"背景網格",
+  "网格颜色":"網格顏色",
+  "开启网格":"開啟網格",
+  "网格大小":"網格大小",
+  "数据源名称":"資料來源名稱",
+  "名称:":"名稱",
+  "地址:":"地址:",
+  "支持设置动态参数,例如:":"支援設定動態參數,例如:",
+  "参考文档:":"參考文件:",
+  "SQL数据源":"SQL資料來源",
+  "消息类型":"訊息類型",
+  "消息内容":"訊息內容",
+  "普通消息":"普通訊息",
+  "成功":"成功",
+  "警告":"警告",
+  "错误":"錯誤",
+  "问题":"問題",
+  "二次确认":"二次確認",
+  "确认文本":"確認文字"
 };export default a

+ 10 - 10
src/views/components/Actions.vue

@@ -15,7 +15,7 @@
         <div class="form-item mt-4">
           <label>{{$t('动作类型')}}</label>
           <t-select v-model="a.action" @change="onChangeAction(a)" :placeholder="$t('请选择')">
-            <t-option v-for="option in actionOptions" :key="option.value" :value="option.value" :label="option.label"></t-option>
+            <t-option v-for="option in actionOptions" :key="option.value" :value="option.value" :label="$t(option.label)"></t-option>
           </t-select>
         </div>
         <template v-if="a.action == 0">
@@ -215,7 +215,7 @@
           <Network v-model="a.network" mode="1" />
           <div class="flex middle mt-16">
             <t-tooltip content="json格式">
-              <div class="flex middle mr-8" style="font-size:12px;color:var(--color)">数据</div>
+              <div class="flex middle mr-8" style="font-size:12px;color:var(--color)">{{$t('数据')}}</div>
             </t-tooltip>
             <!-- <add-circle-icon @click="addSendData(a)" class="hover"/> -->
           </div>
@@ -227,7 +227,7 @@
                   <template v-if="d.prop">{{d._label||d.label}}<br>{{ d.prop }}</template>
                 </template>
                 <!-- <t-input class="actions-prop" style="width: 70px;" v-model="d.prop" /> -->
-                <div class="actions-prop"> {{ d.label||'参数名'  }}</div>
+                <div class="actions-prop"> {{ d.label||$t('参数名')  }}</div>
                 </t-tooltip>
                 <Edit1Icon class="hover" @click="selectDeviceProps(d)"/>
               <!-- <t-input style="width: 100px;" v-model="item.value" /> -->
@@ -242,7 +242,7 @@
                 >
                   <ellipsis-icon slot="icon" />
                 </t-button>
-                <t-input v-else :placeholder="d.key&&d.id?((d.idLabel||d.id)+'.'+(d.keyLabel||d.key)):('参数值')" :readonly="!!(d.key&&d.id)" class="full" v-model="d.value" />
+                <t-input v-else :placeholder="d.key&&d.id?((d.idLabel||d.id)+'.'+(d.keyLabel||d.key)):($t('参数值'))" :readonly="!!(d.key&&d.id)" class="full" v-model="d.value" />
                 <LinkIcon class="hover actions-bind" :class="{ primary: d.key }" @click="bindPenProp(d)" />
               </div>
               <!-- <t-tree-select
@@ -605,22 +605,22 @@
         </template>
         <template v-else-if="a.action == 18">
           <div class="form-item mt-8">
-            <label>消息类型</label>
+            <label>{{$t('消息类型')}}</label>
             <t-select
               v-model="a.params"
-              placeholder="请选择"
+              :placeholder="$t('请选择')"
             >
               <t-option
                 v-for="option in themeOptions"
                 :key="option.value"
                 :value="option.value"
-                :label="option.label"
+                :label="$t(option.label)"
               />
             </t-select>
           </div>
           <div class="form-item mt-8">
-            <label>消息内容</label>
-            <t-input v-model="a.value" placeholder="消息内容" />
+            <label>{{$t('消息内容')}}</label>
+            <t-input v-model="a.value" :placeholder="$t('消息内容')" />
           </div>
         </template> 
       </div>
@@ -732,7 +732,7 @@ const actionOptions = [
     value: 17,
   },
   {
-    label: '全局消息',
+    label: $t('全局消息'),
     value: 18,
   },
 ];

+ 93 - 90
src/views/components/DataSource.vue

@@ -9,16 +9,16 @@
         class="flex mb-16"
         style="justify-content: space-between; padding-right: 8px"
       >
-        <div style="line-height: 32px">数据列表</div>
+        <div style="line-height: 32px">{{$t('数据列表')}}</div>
         <div class="flex">
-          <t-tooltip content="批量导入数据图元到画布" placement="top">
+          <t-tooltip :content="$t('批量导入数据图元到画布')" placement="top">
             <div @click="onCheckAllChange" class="icon-box">
               <DragDropIcon  :style="{
                   color: data.checkAll ? 'var(--color-primary)' : '',
                 }"/>
             </div>
           </t-tooltip>
-          <t-tooltip content="开启全局数据模拟" placement="top">
+          <t-tooltip :content="$t('开启全局数据模拟')" placement="top">
             <div  @click="onChangeMock" class="icon-box">
               <RouterWaveIcon
                 :style="{
@@ -33,15 +33,15 @@
             </div>
             <t-dropdown-menu>
               <t-dropdown-item @click="onShowIot"> 
-                <div style="width:100%"> 物联网平台   
-                  <t-tooltip content="需配合乐吾乐物联网平台使用此功能" placement="right"> 
+                <div style="width:100%"> {{$t('物联网平台')}}   
+                  <t-tooltip :content="$t('需配合乐吾乐物联网平台使用此功能')" placement="right"> 
                     <HelpCircleIcon style="font-size: 14px" class="ml-4 hover"/>
                   </t-tooltip> 
                 </div>
               </t-dropdown-item>
               <t-dropdown-item @click="addSql">
-                  <div style="width:100%">SQL数据源
-                    <t-tooltip content="需配合乐吾乐物联网平台使用此功能" placement="right"> 
+                  <div style="width:100%">{{$t('SQL数据源')}}
+                    <t-tooltip :content="$t('需配合乐吾乐物联网平台使用此功能')" placement="right"> 
                       <HelpCircleIcon style="font-size: 14px" class="ml-4 hover"/>
                     </t-tooltip> 
                   </div>
@@ -73,7 +73,7 @@
             v-model="dataSearch"
             @change="onSearchData"
             @enter="onSearchData"
-            placeholder="搜索我的数据列表"
+            :placeholder="$t('搜索我的数据列表')"
           />
         </div>
       </div>
@@ -82,7 +82,7 @@
       <div class="flex mt-16 between" style="height: 32px; line-height: 32px">
         <!-- <div class="flex"> -->
           <!-- <ApplicationIcon class="tree-icon mt-8" /> -->
-          <div class="datasource-title">物联网平台</div>
+          <div class="datasource-title">{{$t('物联网平台')}}</div>
         <!-- </div> -->
         <!-- <div>
           <Edit2Icon  class="mr-12 hover" style="width: 14px;height: 14px;" @click="onShowIot" />
@@ -127,7 +127,7 @@
     <div v-if="data.sqls?.length">
       <div class="flex mt-16" style="height: 32px">
         <!-- <DataIcon class="tree-icon" /> -->
-        <div class="datasource-title">SQL数据源</div>
+        <div class="datasource-title">{{$t('SQL数据源')}}</div>
       </div>
       <div
         :draggable="data.checkAll ? true : false"
@@ -326,10 +326,10 @@
                   :divider="true"
                   @click="showAddData(node.data)"
                 >
-                  新建属性
+                  {{$t('新建属性')}}
                 </t-dropdown-item>
                 <t-dropdown-item :value="3" :divider="true">
-                  在线接口
+                  {{$t('在线接口')}}
 
                   <t-dropdown-menu
                     class="menu-item-input"
@@ -344,9 +344,9 @@
                         style="max-width: 216px !important"
                       >
                         <t-input
-                          label="地址:"
+                          :label="$t('地址:')"
                           style="width: 216px"
-                          placeholder="请输入地址"
+                          :placeholder="$t('请输入地址')"
                           v-model="data.dataset.url"
                           @blur="getDatas(node.data)"
                           @enter="getDatas(node.data)"
@@ -363,7 +363,7 @@
                   </t-dropdown-menu>
                 </t-dropdown-item>
                 <t-dropdown-item :value="2" @click="importDataset(node.data)">
-                  从Excel导入
+                  {{$t('从Excel导入')}}
                 </t-dropdown-item>
                 <t-dropdown-item :value="4">
                   <a
@@ -372,7 +372,7 @@
                     style="color: var(--td-text-color-primary)"
                     @click.stop
                   >
-                    下载Excel示例
+                    {{$t('下载Excel示例')}}
                   </a>
                 </t-dropdown-item>
               </t-dropdown-menu>
@@ -458,10 +458,10 @@
                   :divider="true"
                   @click="showAddData(node.data)"
                 >
-                  新建属性
+                  {{$t('新建属性')}}
                 </t-dropdown-item>
                 <t-dropdown-item :value="3" :divider="true">
-                  在线接口
+                  {{$t('在线接口')}}
 
                   <t-dropdown-menu
                     class="menu-item-input"
@@ -476,9 +476,9 @@
                         style="max-width: 216px !important"
                       >
                         <t-input
-                          label="地址:"
+                          :label="$t('地址:')"
                           style="width: 216px"
-                          placeholder="请输入地址"
+                          :placeholder="$t('请输入地址')"
                           v-model="data.dataset.url"
                           @blur="getDatas(node.data)"
                           @enter="getDatas(node.data)"
@@ -495,7 +495,7 @@
                   </t-dropdown-menu>
                 </t-dropdown-item>
                 <t-dropdown-item :value="2" @click="importDataset(node.data)">
-                  从Excel导入
+                    {{$t('从Excel导入')}}
                 </t-dropdown-item>
                 <t-dropdown-item :value="4">
                   <a
@@ -503,7 +503,7 @@
                     style="color: var(--td-text-color-primary)"
                     @click.stop
                   >
-                    下载Excel示例
+                    {{$t('下载Excel示例')}}
                   </a>
                 </t-dropdown-item>
               </t-dropdown-menu>
@@ -590,10 +590,10 @@
                   :divider="true"
                   @click="showAddData(node.data)"
                 >
-                  新建属性
+                  {{$t('新建属性')}}
                 </t-dropdown-item>
                 <t-dropdown-item :value="3" :divider="true">
-                  在线接口
+                  {{$t('在线接口')}}
 
                   <t-dropdown-menu
                     class="menu-item-input"
@@ -608,9 +608,9 @@
                         style="max-width: 216px !important"
                       >
                         <t-input
-                          label="地址:"
+                          :label=" $t('地址:')"
                           style="width: 216px"
-                          placeholder="请输入地址"
+                          :placeholder="$t('请输入地址')"
                           v-model="data.dataset.url"
                           @blur="getDatas(node.data)"
                           @enter="getDatas(node.data)"
@@ -627,7 +627,7 @@
                   </t-dropdown-menu>
                 </t-dropdown-item>
                 <t-dropdown-item :value="2" @click="importDataset(node.data)">
-                  从Excel导入
+                  {{$t('从Excel导入')}}
                 </t-dropdown-item>
                 <t-dropdown-item :value="4">
                   <a
@@ -635,7 +635,7 @@
                     style="color: var(--td-text-color-primary)"
                     @click.stop
                   >
-                    下载Excel示例
+                  {{$t('下载Excel示例')}}
                   </a>
                 </t-dropdown-item>
               </t-dropdown-menu>
@@ -721,10 +721,10 @@
                   :divider="true"
                   @click="showAddData(node.data)"
                 >
-                  新建属性
+                {{$t('新建属性')}}
                 </t-dropdown-item>
                 <t-dropdown-item :value="3" :divider="true">
-                  在线接口
+                  {{$t('在线接口')}}
 
                   <t-dropdown-menu
                     class="menu-item-input"
@@ -739,9 +739,9 @@
                         style="max-width: 216px !important"
                       >
                         <t-input
-                          label="地址:"
+                          :label="$t('地址:')"
                           style="width: 216px"
-                          placeholder="请输入地址"
+                          :placeholder="$t('请输入地址')"
                           v-model="data.dataset.url"
                           @blur="getDatas(node.data)"
                           @enter="getDatas(node.data)"
@@ -758,7 +758,7 @@
                   </t-dropdown-menu>
                 </t-dropdown-item>
                 <t-dropdown-item :value="2" @click="importDataset(node.data)">
-                  从Excel导入
+                  {{$t('从Excel导入')}}
                 </t-dropdown-item>
                 <t-dropdown-item :value="4">
                   <a
@@ -766,7 +766,7 @@
                     style="color: var(--td-text-color-primary)"
                     @click.stop
                   >
-                    下载Excel示例
+                  {{$t('下载Excel示例')}}
                   </a>
                 </t-dropdown-item>
               </t-dropdown-menu>
@@ -808,7 +808,7 @@
       v-if="!data.iotTree.length && !data.sqls.length && !data.networks.length"
     >
       <img src="/img/no-data.png" />
-      <div class="gray center">暂无数据</div>
+      <div class="gray center"> {{$t('暂无数据')}}</div>
       <!-- <div class="mt-20">
         <t-button theme="primary" @click="addNetwork()">
           添加数据源
@@ -818,7 +818,7 @@
   </div>
   <div class="content" v-if="group === '解析'">
     <div class="flex between">
-      <div class="title">数据{{ group }}</div>
+      <div class="title"> 数据{{ group }}</div>
     </div>
     <div class="mt-8">
       <CodeEditor
@@ -832,12 +832,12 @@
       </div>
     </div>
     <div class="mt-16">
-      参考文档:
+      {{$t('参考文档:')}}
       <a
         target="_blank"
-        href="https://doc.le5le.com/document/136233394#%E8%A7%A3%E6%9E%90%E8%87%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F"
+        href="https://doc.le5le.com/document/75"
       >
-        解析自定义格式数据</a
+        {{$t('解析自定义格式数据')}}</a
       >
     </div>
   </div>
@@ -846,7 +846,7 @@
     v-if="addDataDialog.show"
     :visible="true"
     class="data-dialog"
-    :header="addDataDialog.header"
+    :header="$t(addDataDialog.header)"
     @close="addDataDialog.show = false"
     @confirm="onOkAddData"
   >
@@ -855,28 +855,28 @@
         <t-input v-model="addDataDialog.data.device" placeholder="设备名称" />
       </div> -->
     <div class="form-item mt-16">
-      <label>显示名称</label>
+      <label>{{$t('显示名称')}}</label>
       <t-input
         @change="changeDataLabel($event)"
         :value="addDataDialog.data.label"
-        placeholder="属性简短描述"
+        :placeholder="$t('属性简短描述')"
       />
     </div>
     <div class="form-item mt-16">
-      <label>属性名</label>
+      <label>{{$t('属性名')}}</label>
       <t-input
         @change="changeDataID($event)"
         :value="addDataDialog.data.id"
-        placeholder="属性名"
+        :placeholder="$t('属性名')"
       />
     </div>
     <div class="form-item mt-16">
-      <label>类型</label>
+      <label>{{$t('类型')}}</label>
       <t-select
         class="w-full"
         :options="typeOptions"
         v-model="addDataDialog.data.type"
-        placeholder="字符串"
+        :placeholder="$t('字符串')"
         @change="addDataDialog.data.value = null"
       />
     </div>
@@ -917,7 +917,7 @@
     :visible="true"
     width="800px"
     class="data-dialog"
-    :header="networkDialog.header"
+    :header="$t(networkDialog.header)"
     @close="networkDialog.show = false"
     @confirm="onOkNetwork"
   >
@@ -926,7 +926,7 @@
         <!-- <t-checkbox v-model="networkDialog.save" class="mr-12">
           同时保存到我的数据源
         </t-checkbox> -->
-        <t-button @click="onOkNetwork">确定</t-button>
+        <t-button @click="onOkNetwork">{{$t('确定')}}</t-button>
       </div>
     </template>
     <div style="max-height: 450px; padding: 8px; overflow-y: auto">
@@ -936,19 +936,19 @@
   <t-dialog
     v-if="dataTransformationDialog.show"
     :visible="true"
-    header="数据监听"
+    :header="$t('数据监听')"
     @confirm="onOkDataTransformation"
     @close="dataTransformationDialog.show = false"
     :width="800"
   >
     <CodeEditor v-model="dataTransformationDialog.data" style="height: 300px" />
     <div class="mt-8">
-      参考文档:
+      {{$t('参考文档:')}}
       <a
         target="_blank"
-        href="https://doc.le5le.com/document/136233394#%E8%A7%A3%E6%9E%90%E8%87%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F"
+        href="https://doc.le5le.com/document/75"
       >
-        解析自定义格式数据</a
+      {{$t('解析自定义格式数据')}}</a
       >
     </div>
   </t-dialog>
@@ -957,14 +957,14 @@
     :visible="true"
     width="800px"
     class="data-dialog"
-    :header="sqlDialog.header"
+    :header="$t(sqlDialog.header)"
     @close="sqlDialog.show = false"
     @confirm="onOkSql"
   >
     <div style="max-height: 450px; padding: 8px">
       <div class="form-item mt-8">
-        <label>sql数据源</label>
-        <t-select v-model="sqlDialog.sql.dbid" placeholder="请选择数据源">
+        <label>{{$t('sql数据源')}}</label>
+        <t-select v-model="sqlDialog.sql.dbid" :placeholder="$t('请选择数据源')">
           <t-option
             v-for="sql in sqlList"
             @click="sqlChange(sql)"
@@ -975,22 +975,22 @@
         </t-select>
       </div>
       <div class="form-item mt-8">
-        <label>sql轮询间隔</label>
+        <label>{{$t('sql轮询间隔')}}</label>
         <t-input-number
           theme="column"
           v-model="sqlDialog.sql.interval"
-          placeholder="不填,仅初始执行一次"
+          :placeholder="$t('不填,仅初始执行一次')"
         />
       </div>
       <div class="form-item mt-8">
-        <label>查询方式</label>
+        <label>{{$t('查询方式')}}</label>
         <t-select v-model="sqlDialog.sql.method">
-          <t-option key="get" value="get" label="单条" />
-          <t-option key="list" value="list" label="列表" />
+          <t-option key="get" value="get" :label="$t('单条')" />
+          <t-option key="list" value="list" :label="$t('列表')" />
         </t-select>
       </div>
       <div class="form-item mt-8">
-        <label>sql语句</label>
+        <label>{{$t('sql语句')}}</label>
         <CodeEditor
           :json="false"
           :language="'sql'"
@@ -1000,7 +1000,7 @@
         />
       </div>
       <div v-if="sqlDialog.sql.method === 'list'" class="form-item mt-8">
-        <label>第几页</label>
+        <label>{{$t('第几页')}}</label>
         <t-input-number
           v-model="sqlDialog.sql.current"
           theme="normal"
@@ -1009,21 +1009,21 @@
         />
       </div>
       <div v-if="sqlDialog.sql.method === 'list'" class="form-item mt-8">
-        <label>每页数量</label>
+        <label>{{$t('每页数量')}}</label>
         <t-input-number
           v-model="sqlDialog.sql.pageSize"
           theme="normal"
-          placeholder="默认20"
+          :placeholder="$t('默认20')"
           :min="1"
         />
       </div>
       <div class="form-item mt-8">
-        <label>关联属性名</label>
-        <t-input v-model="sqlDialog.sql.bindId" placeholder="关联属性名" />
+        <label>{{$t('关联属性名')}}</label>
+        <t-input v-model="sqlDialog.sql.bindId" :placeholder="$t('关联属性名')" />
       </div>
       <div class="flex mt-8">
         <!-- <label> -->
-        <t-button style="width: 75px" @click="sqlTest">连接测试</t-button>
+        <t-button style="width: 75px" @click="sqlTest">{{$t('连接测试')}}</t-button>
         <!-- </label> -->
         <p class="ml-8" style="width: 700px">{{ sqlDialog.result }}</p>
       </div>
@@ -1034,7 +1034,7 @@
     :visible="true"
     width="472px"
     dialogClassName="iot-dialog"
-    :header="iotDialog.header"
+    :header="$t(iotDialog.header)"
     @close="iotDialog.show = false"
     @confirm="onOkIot"
   >
@@ -1053,7 +1053,7 @@
         v-model="iotSearch"
         @change="onSearchIot"
         @enter="onSearchIot"
-        placeholder="搜索设备属性"
+        :placeholder="$t('搜索设备属性')"
       />
     </div>
     <div style="height: 320px; margin-top: 8px; overflow-y: scroll">
@@ -1079,7 +1079,7 @@
 </template>
 
 <script lang="ts" setup>
-import { reactive, defineComponent, ref, onMounted, toRaw, watch } from 'vue';
+import { reactive, defineComponent, ref, onMounted, toRaw, watch, getCurrentInstance } from 'vue';
 import {
   FileImportIcon,
   FileExportIcon,
@@ -1125,6 +1125,9 @@ import {
   doSqlCode,
 } from '@/services/iot';
 
+const { proxy } = getCurrentInstance();
+const $t = proxy.$t;
+
 const props = defineProps<{
   group: string;
 }>();
@@ -1418,18 +1421,18 @@ const deleteSql = (index: number) => {
 const sqlTreeKey = ref(s8());
 const onOkSql = async () => {
   if (!sqlDialog.sql.dbid) {
-    MessagePlugin.error('请选择数据源');
+    MessagePlugin.error($t('请选择数据源'));
     return;
   }
   if (!sqlDialog.sql.sql) {
-    MessagePlugin.error('请填写sql语句');
+    MessagePlugin.error($t('请填写sql语句'));
     return;
   }
   if (!sqlDialog.sql.interval) {
     sqlDialog.sql.interval = undefined;
   }
   if (!sqlDialog.sql.bindId) {
-    MessagePlugin.error('关联属性名必填');
+    MessagePlugin.error($t('关联属性名必填'));
     return;
   }
   sqlDialog.sql.label = sqlDialog.sql.bindId;
@@ -1474,11 +1477,11 @@ const sqlChange = (sql: any) => {
 const sqlTest = async () => {
   let ret: any = await doSqlCode(sqlDialog.sql);
   if (ret.error) {
-    MessagePlugin.error('连接错误:' + ret.error);
-    sqlDialog.result = '连接错误:' + ret.error;
+    MessagePlugin.error($t('连接错误:') + ret.error);
+    sqlDialog.result = $t('连接错误:') + ret.error;
   } else {
     if (sqlDialog.sql.method === 'list') {
-      sqlDialog.result = '连接成功:[' + JSON.stringify(ret[0]) + ',...]';
+      sqlDialog.result = $t('连接成功:[') + JSON.stringify(ret[0]) + ',...]';
       // sqlDialog.sql.columns = ret[0];
       const columnsKeys = Object.keys(ret[0]);
       const children = new Array(ret.length).fill(0).map((item, index) => {
@@ -1500,7 +1503,7 @@ const sqlTest = async () => {
       sqlDialog.sql.class = 'sql';
       sqlDialog.sql.children = children;
     } else {
-      sqlDialog.result = '连接成功:' + JSON.stringify(ret);
+      sqlDialog.result = $t('连接成功:') + JSON.stringify(ret);
       // sqlDialog.sql.columns = ret;
       const children = [];
       for (let key in ret) {
@@ -1555,12 +1558,12 @@ const clearData = () => {
 
 const changeDataLabel = (value) => {
   if (!value) {
-    MessagePlugin.error('显示名称不能为空!');
+    MessagePlugin.error($t('显示名称不能为空!'));
     return;
   }
   let item = data.dataset.devices?.filter((item) => item.label === value);
   if (item && item.length) {
-    MessagePlugin.error('显示名称重复!');
+    MessagePlugin.error($t('显示名称重复!'));
     return;
   }
   addDataDialog.data.label = value;
@@ -1568,12 +1571,12 @@ const changeDataLabel = (value) => {
 
 const changeDataID = (value) => {
   if (!value) {
-    MessagePlugin.error('属性名不能为空!');
+    MessagePlugin.error($t('属性名不能为空!'));
     return;
   }
   let item = data.dataset.devices?.filter((item) => item.id === value);
   if (item && item.length) {
-    MessagePlugin.error('属性名重复!');
+    MessagePlugin.error($t('属性名重复!'));
     return;
   }
   addDataDialog.data.id = value;
@@ -1581,11 +1584,11 @@ const changeDataID = (value) => {
 
 const onOkAddData = () => {
   if (!addDataDialog.data.label) {
-    MessagePlugin.error('请填写名称');
+    MessagePlugin.error($t('请填写名称'));
     return;
   }
   if (!addDataDialog.data.id) {
-    MessagePlugin.error('请填写数据ID');
+    MessagePlugin.error($t('请填写数据ID'));
     return;
   }
   if (!addDataDialog.network.children) {
@@ -1692,7 +1695,7 @@ const importDataset = async (network) => {
 
 const downloadAsExcel = () => {
   if (!(data.dataset.devices && data.dataset.devices.length)) {
-    MessagePlugin.error('属性列表不能为空!');
+    MessagePlugin.error($t('属性列表不能为空!'));
     return;
   }
   const name = meta2d.store.data.name;
@@ -1719,7 +1722,7 @@ const downloadAsExcel = () => {
 
 const downloadAsJson = () => {
   if (!(data.dataset.devices && data.dataset.devices.length)) {
-    MessagePlugin.error('属性列表不能为空!');
+    MessagePlugin.error($t('属性列表不能为空!'));
     return;
   }
   import('file-saver').then(({ saveAs }) => {
@@ -1738,7 +1741,7 @@ const onOkDataset = async (saveas = false) => {
   //   return;
   // }
   if (!(data.dataset.devices && data.dataset.devices.length)) {
-    MessagePlugin.error('属性列表不能为空');
+    MessagePlugin.error($t('属性列表不能为空'));
     return;
   }
   const dataset = JSON.parse(JSON.stringify(data.dataset));
@@ -1907,7 +1910,7 @@ const onSelDataset = async (datasetId = false) => {
 // 请求我的数据模型
 const getDatasets = async (name?: string) => {
   if (!user.id) {
-    MessagePlugin.error('请先登录');
+    MessagePlugin.error($t('请先登录'));
     return;
   }
   const body: any = {
@@ -2102,11 +2105,11 @@ const onOkNetwork = async () => {
       ['mqtt', 'websocket', 'http'].includes(networkDialog.network.protocol) &&
       !networkDialog.network.url
     ) {
-      MessagePlugin.error('URL地址不能为空!');
+      MessagePlugin.error($t('URL地址不能为空!'));
       return;
     }
     if (!networkDialog.network.name) {
-      MessagePlugin.error('名称不能为空!');
+      MessagePlugin.error($t('名称不能为空!'));
       return;
     }
     // if (networkDialog.save) {
@@ -2247,7 +2250,7 @@ const onAddShape = (e, _data,type) => {
     }
     // const checked = _data.filter((item) => item.checked);
     if (!checked.length) {
-      MessagePlugin.error('请先选择数据');
+      MessagePlugin.error($t('请先选择数据'));
       return;
     }
     data = [];

+ 4 - 4
src/views/components/FileProps.vue

@@ -48,10 +48,10 @@
             <t-upload class="ml-8" v-model="data.background" action="/api/image/upload" theme="image" accept="image/*" :headers="headers" :data="updataData" :auto-upload="true" :before-upload="beforeUpload" :upload-all-files-in-one-request="false" @success="fileSuccessed" @remove="fileRemoved"></t-upload>
           </div>
           <div class="form-item">
-            <label>背景网格</label>
+            <label>{{$t('背景网格')}}</label>
             <div class="flex ml-8" style="align-items:center">
               <t-tooltip
-                content="开启网格"
+                :content="$t('开启网格')"
                 placement="top"
               >
                 <t-checkbox
@@ -62,7 +62,7 @@
               </t-tooltip>
               <t-tooltip
                 v-if="data.grid"
-                content="网格颜色"
+                :content="$t('网格颜色')"
                 placement="top"
               >
                 <t-color-picker
@@ -79,7 +79,7 @@
               </t-tooltip>
               <t-tooltip
                 v-if="data.grid"
-                content="网格大小"
+                :content="$t('网格大小')"
                 placement="top"
               >
                 <t-input-number

+ 1 - 1
src/views/components/Graphics.vue

@@ -188,7 +188,7 @@
                   <svg v-else class="l-icon" aria-hidden="true">
                     <use :xlink:href="'#' + elem.icon"></use>
                   </svg>
-                  <p :title="elem.name">{{ elem.name }}</p>
+                  <p :title="elem.name">{{ $t(elem.name) }}</p>
                   <div class="price" v-if="elem.price > 0">
                     ¥{{ elem.price }}
                   </div>

+ 2 - 2
src/views/components/Header.vue

@@ -8,12 +8,12 @@
       <a> {{$t('文件')}} </a>
       <t-dropdown-menu>
         <t-dropdown-item @click="newProject">
-          <a>新建工程</a>
+          <a>{{$t('新建工程')}}</a>
         </t-dropdown-item>
         <t-dropdown-item @click="loadProject" divider="true">
           <a>
             <div class="flex">
-                导入工程 <span class="flex-grow"></span>
+              {{$t('导入工程')}} <span class="flex-grow"></span>
             </div>
           </a>
         </t-dropdown-item>

+ 21 - 21
src/views/components/Net.vue

@@ -2,13 +2,13 @@
   <div class="network-component">
     <div class="form-item mt-8">
       <label>
-        数据源名称
+        {{$t('数据源名称')}}
       </label>
       <t-select-input
         v-if="mode"
         v-model:inputValue="modelValue.name"
         :value="modelValue.name"
-        placeholder="我的数据发送"
+        :placeholder="$t('我的数据发送')"
         allow-input
         clearable
         v-model:popup-visible="popupVisible"
@@ -29,8 +29,8 @@
               :key="item.url"
               @click="() => onSelect(item)"
             >
-              名称: {{ item.name }}
-              <div class="desc">地址: {{ item.url }}</div>
+            {{$t('名称:')}} {{ item.name }}
+              <div class="desc">{{$t('地址:')}}' {{ item.url }}</div>
 
               <span class="del" @click.stop="onDelNetWork(item, i)">
                 <delete-icon />
@@ -49,12 +49,12 @@
               style="line-height: 1.5; padding: 8px; border-radius: 2px"
               :key="-1"
             >
-              <div class="desc">暂无数据</div>
+              <div class="desc">{{$t('暂无数据')}}</div>
             </li>
           </ul>
         </template>
       </t-select-input>
-      <t-input v-else v-model="modelValue.name" placeholder="名称" />
+      <t-input v-else v-model="modelValue.name" :placeholder="$t('名称')" />
     </div>
 
     <!-- <div class="form-item mt-8">
@@ -70,15 +70,15 @@
       </t-select>
     </div> -->
     <div class="form-item mt-8">
-      <label>URL地址</label>
+      <label>{{$t('URL地址')}}</label>
       <t-input
         :format="urlFormat"
         :placeholder="
           (modelValue.protocol !== 'http'&&modelValue.protocol !== 'SSE')
             ? isSafeProtocol()
-              ? '必须是wss协议'
-              : '必须是ws协议'
-            : '请输入'
+              ? $t('必须是wss协议')
+              : $t('必须是ws协议')
+            : $t('请输入')
         "
         v-model="modelValue.url"
       />
@@ -91,14 +91,14 @@
     </template>
     <template v-else-if="modelValue.protocol === 'http'">
       <div class="form-item mt-8">
-        <label>请求方式</label>
+        <label>{{$t('请求方式')}}</label>
         <t-select v-model="modelValue.method" @change="httpMethodChange">
           <t-option key="GET" value="GET" label="GET" />
           <t-option key="POST" value="POST" label="POST" />
         </t-select>
       </div>
       <div v-if="modelValue.type === 'subscribe'" class="form-item mt-8">
-        <label>请求间隔</label>
+        <label>{{$t('请求间隔')}}</label>
         <t-input-number
           theme="column"
           v-model="modelValue.interval"
@@ -106,7 +106,7 @@
         />
       </div>
       <div class="form-item mt-8">
-        <label>请求头</label>
+        <label>{{$t('请求头')}}</label>
         <!-- <t-textarea
           v-model="modelValue.headers"
           :autosize="{ minRows: 3, maxRows: 5 }"
@@ -122,10 +122,10 @@
       </div>
       <div class="form-item mt-8 desc">
         <label></label>
-        支持设置动态参数,例如:{"Authorization": "Bearer ${token}"}
+        {{$t('支持设置动态参数,例如:')}}{"Authorization": "Bearer ${token}"}
       </div>
       <div v-if="!mode && modelValue.method === 'POST'" class="form-item mt-8">
-        <label>请求体</label>
+        <label>{{$t('请求体')}}</label>
         <!-- <t-textarea
           v-model="modelValue.body"
           :autosize="{ minRows: 3, maxRows: 5 }"
@@ -144,12 +144,12 @@
         class="form-item mt-8 desc"
       >
         <label></label>
-        支持设置动态参数,例如:{"value": "${value}"}
+        {{$t('支持设置动态参数,例如:')}}{"value": "${value}"}
       </div>
     </template>
     <template v-else-if="modelValue.protocol === 'SSE'">
       <div class="form-item mt-8">
-        <label>跨域凭据</label>
+        <label>{{$t('跨域凭据')}}</label>
         <t-switch
           class="mt-8 ml-8"
           v-model="modelValue.withCredentials"
@@ -163,7 +163,7 @@
         <t-input v-model="modelValue.options.clientId" />
       </div>
       <div class="form-item mt-8">
-        <label>自动生成</label>
+        <label>{{$t('自动生成')}}</label>
         <t-switch
           class="mt-8 ml-8"
           v-model="modelValue.options.customClientId"
@@ -171,11 +171,11 @@
         />
       </div>
       <div class="form-item mt-8">
-        <label>用户名</label>
+        <label>{{$t('用户名')}}</label>
         <t-input v-model="modelValue.options.username" />
       </div>
       <div class="form-item mt-8">
-        <label>密码</label>
+        <label>{{$t('密码')}}</label>
         <t-input v-model="modelValue.options.password" />
       </div>
       <div class="form-item mt-8">
@@ -186,7 +186,7 @@
     <div class="form-item mt-8" v-if="mode">
       <label> </label>
       <div>
-        <t-button @click="onSave">保存到我的数据发送</t-button>
+        <t-button @click="onSave">{{$t('保存到我的数据发送')}}</t-button>
       </div>
     </div>
   </div>

+ 3 - 3
src/views/components/Network.vue

@@ -77,7 +77,7 @@
       </t-select>
     </div> -->
     <div v-if="!modelValue.unmodifiable"  class="form-item mt-8">
-      <label>URL地址</label>
+      <label>{{$t('URL地址')}}</label>
       <t-input
         :format="urlFormat"
         :placeholder="
@@ -96,7 +96,7 @@
     </template>
     <template v-else-if="modelValue.protocol === 'http'">
       <div class="form-item mt-8">
-        <label>请求方式</label>
+        <label>{{$t('请求方式')}}</label>
         <t-select :disabled="modelValue.unmodifiable" v-model="modelValue.method" @change="httpMethodChange">
           <t-option key="GET" value="GET" label="GET" />
           <t-option key="POST" value="POST" label="POST" />
@@ -276,7 +276,7 @@ const hasIot = ref(false);
 // 请求我的数据源接口
 const getNetworks = async () => {
   let arr = [];
-  meta2d.store.data.networks.forEach((network)=>{
+  meta2d.store.data.networks?.forEach((network)=>{
      if(['mqtt','websocket','http'].includes(network.protocol)&&network.method!=="POST"){
         let net:any = deepClone(network);
         if(net.protocol === 'http'){

+ 2 - 2
src/views/components/PenDatas.vue

@@ -228,7 +228,7 @@
         </div>
         </div>
       </t-collapse-panel>
-      <t-collapse-panel value="3" header="数据">
+      <t-collapse-panel value="3" :header="$t('数据')">
         <!-- <div class="t-space-item">
           <div class="form-item  py-12">
               <label style="width: 76px">{{$t('关联设备')}}</label>
@@ -380,7 +380,7 @@
               @click="addRealTime"
               :minColumnWidth="150"
             >
-              <t-button style="height: 30px"> 添加动态数据 </t-button>
+              <t-button style="height: 30px"> {{$t('添加动态数据')}} </t-button>
             </t-dropdown>
           </div>
         </div>

+ 2 - 2
src/views/components/PenEvents.vue

@@ -36,11 +36,11 @@
 
           <Conditions :data="props.pen.events[i]" />
           <div class="form-item mt-16" v-if="['click','dblclick'].includes(item.name)||item.confirm">
-            <label>二次确认</label>
+            <label> {{$t('二次确认')}}</label>
             <t-switch size="small" class="mt-8 ml-8" v-model="item.confirm" />
           </div>
           <div v-if="item.confirm" class="form-item mt-8 mb-16">
-            <label>确认文本</label>
+            <label>{{$t('确认文本')}}</label>
             <t-input  v-model="item.confirmTitle" />
           </div>
           <Actions :data="props.pen.events[i]" />

+ 4 - 4
src/views/components/PenProps.vue

@@ -410,7 +410,7 @@
                   </t-select>
                 </div>
                 <div class="form-item">
-                  <label style="width: 76px">起点箭头大小 </label>
+                  <label style="width: 76px">{{$t('起始箭头大小')}} </label>
                   <t-input-number
                     style="width:54px"
                     theme="column"
@@ -418,7 +418,7 @@
                     :min="0"
                     @change="changeValue('fromArrowSize')"
                   />
-                  <label style="width: 76px"  class="ml-4">终点箭头大小 </label>
+                  <label style="width: 76px"  class="ml-4">{{$t('终点箭头大小')}} </label>
                   <t-input-number
                     style="width:54px"
                     theme="column"
@@ -428,7 +428,7 @@
                   />
                 </div>
                 <div class="form-item">
-                  <label style="width: 76px">起点箭头颜色 </label>
+                  <label style="width: 76px">{{$t('起始箭头颜色')}} </label>
                   <t-color-picker
                     class="simple mt-8 ml-8"
                     format="CSS"
@@ -441,7 +441,7 @@
                     v-model="data.pen.fromArrowColor"
                     @change="changeValue('fromArrowColor')"
                   />
-                  <label style="width: 76px;margin-left:36px">终点箭头颜色 </label>
+                  <label style="width: 76px;margin-left:36px">{{$t('终点箭头颜色')}} </label>
                   <t-color-picker
                     class="simple mt-8 ml-8"
                     format="CSS"

+ 31 - 28
src/views/components/Project.vue

@@ -4,50 +4,50 @@
       <div></div>
       <div>
         <t-dropdown :minColumnWidth="200" :hide-after-item-click="false">
-          <t-tooltip content="导入属性列表" placement="top">
+          <t-tooltip :content="$t('导入属性列表')" placement="top">
             <div class="icon-box">
               <AddIcon />
             </div>
           </t-tooltip>
           <t-dropdown-menu>
             <t-dropdown-item @click="append(undefined, true)">
-              <a>新建文件夹</a>
+              <a>{{$t('新建文件夹')}}</a>
             </t-dropdown-item>
             <t-dropdown-item @click="append(undefined)" divider="true">
-              <a>新建页面</a>
+              <a>{{$t('新建页面')}}</a>
             </t-dropdown-item>
             <t-dropdown-item @click="downloadProjectSource">
               <a>
                 <div class="flex">
-                  导出工程 <span class="flex-grow"></span>
+                  {{$t('导出工程')}}<span class="flex-grow"></span>
                 </div>
               </a>
             </t-dropdown-item>
             <t-dropdown-item @click="downloadProject(Frame.html)">
               <a>
                 <div class="flex">
-                  导出工程离线部署包 <span class="flex-grow"></span>
+                  {{$t('导出工程离线部署包')}} <span class="flex-grow"></span>
                 </div>
               </a>
             </t-dropdown-item>
             <t-dropdown-item @click="downloadProject(Frame.vue3)">
               <a>
                 <div class="flex">
-                  导出工程Vue3组件包 <span class="flex-grow"></span>
+                  {{$t('导出工程Vue3组件包')}} <span class="flex-grow"></span>
                 </div>
               </a>
             </t-dropdown-item>
             <t-dropdown-item @click="downloadProject(Frame.vue2)">
               <a>
                 <div class="flex">
-                  导出工程Vue2组件包 <span class="flex-grow"></span>
+                  {{$t('导出工程Vue2组件包')}} <span class="flex-grow"></span>
                 </div>
               </a>
             </t-dropdown-item>
             <t-dropdown-item @click="downloadProject(Frame.react)">
               <a>
                 <div class="flex">
-                  导出工程react组件包 <span class="flex-grow"></span>
+                  {{$t('导出工程react组件包')}} <span class="flex-grow"></span>
                 </div>
               </a>
             </t-dropdown-item>
@@ -109,36 +109,36 @@
       expandType="popup"
     >
       <t-menu-item v-for="item in operations" :value="item.key">
-        <div class="flex">{{ item.label }}</div>
+        <div class="flex">{{$t(item.label) }}</div>
       </t-menu-item>
       <t-menu-item
         v-if="current.data.type === 'page'"
         value="createFromTemplate"
       >
-        <div class="flex">从模版创建</div>
+        <div class="flex">{{$t('从模版创建')}}</div>
       </t-menu-item>
       <t-menu-item v-if="current.data.type === 'page'" value="quotePage">
-        <div class="flex">引用页面</div>
+        <div class="flex">{{$t('引用页面')}}</div>
       </t-menu-item>
       <t-menu-item
         v-if="current.data.type === 'page' && current.data.pageId"
         value="copyPage"
       >
-        <div class="flex">复制页面</div>
+        <div class="flex">{{$t('复制页面')}}</div>
       </t-menu-item>
       <t-menu-item :disabled="!copyData" value="pastePage">
-        <div class="flex">粘贴页面</div>
+        <div class="flex">{{$t('粘贴页面')}}</div>
       </t-menu-item>
       <t-menu-item v-if="current.data.type === 'page'" value="delete">
         <t-tooltip
-          content="仅删除与工程的关联关系,不删除图纸"
+          :content="$t('仅删除与工程的关联关系,不删除图纸')"
           placement="right"
         >
-          <div class="flex">移除页面</div>
+          <div class="flex">{{$t('移除页面')}}</div>
         </t-tooltip>
       </t-menu-item>
       <t-menu-item v-else value="delete">
-        <div class="flex">删除文件夹</div>
+        <div class="flex">{{$t('删除文件夹')}}</div>
       </t-menu-item>
     </t-menu>
   </div>
@@ -167,7 +167,7 @@
 </template>
 
 <script lang="ts" setup>
-import { reactive, ref, onMounted, onUnmounted, onBeforeUnmount } from 'vue';
+import { reactive, ref, onMounted, onUnmounted, onBeforeUnmount, getCurrentInstance } from 'vue';
 import {
   FolderOpenIcon,
   FolderIcon,
@@ -201,6 +201,9 @@ import { Frame } from '@/services/download';
 // import ProjectCPayModal from './common/ProjectCPayModal.vue';
 // import { isDownload } from '@/services/defaults';
 
+const { proxy } = getCurrentInstance();
+const $t = proxy.$t;
+
 const { taskDialog, setTask } = useTask();
 
 const { payDialog } = usePay();
@@ -242,10 +245,10 @@ const append = async (node, folder?: boolean) => {
   const item: any = {
     value: s8(),
     type: 'page',
-    label: '页面',
+    label: $t('页面'),
   };
   if (folder) {
-    item.label = '文件夹';
+    item.label = $t('文件夹');
     item.type = 'folder';
     item.children = [];
   }
@@ -309,7 +312,7 @@ const pastePage = async (node) => {
 const deletePage = async (node) => {
   if (node.data.type !== 'page') {
     if (node.data.children?.length) {
-      MessagePlugin.info('请先删除文件夹下的页面');
+      MessagePlugin.info($t('请先删除文件夹下的页面'));
       return;
     }
   }
@@ -331,10 +334,10 @@ const insertAfter = async (node, folder?: boolean) => {
   const item: any = {
     value: s8(),
     type: 'page',
-    label: '页面',
+    label: $t('页面'),
   };
   if (folder) {
-    item.label = '文件夹';
+    item.label = $t('文件夹');
     item.type = 'folder';
     item.children = [];
   }
@@ -423,7 +426,7 @@ const click = (node) => {
     return;
   }
   if (meta2d.store.data.pens.length && dot.value) {
-    MessagePlugin.info('请先保存当前画布');
+    MessagePlugin.info($t('请先保存当前画布'));
     return;
   }
   data.actived = [node.value];
@@ -444,7 +447,7 @@ const click = (node) => {
 
 const open = async (id: string) => {
   if (meta2d.store.data.pens.length && dot.value) {
-    MessagePlugin.info('请先保存当前画布');
+    MessagePlugin.info($t('请先保存当前画布'));
     return;
   }
   router.push({
@@ -485,10 +488,10 @@ const getScene = async (e) => {
     const ret: any = await getCollection('v', e.id, 'id,other_data');
     if (ret.otherData?.projectId) {
       const confirmDia = DialogPlugin({
-        header: '提示',
-        body: '该页面已被引用,是否拷贝一份?',
-        confirmBtn: '是',
-        cancelBtn: '否',
+        header: $t('提示'),
+        body:  $t('该页面已被引用,是否拷贝一份?'),
+        confirmBtn:  $t('是'),
+        cancelBtn:  $t('否'),
         onConfirm: async () => {
           //如果当前已经存在id,则删除关系
           if (meta2d.store.data.id) {

+ 5 - 5
src/views/components/common/JsonModal.vue

@@ -1,19 +1,19 @@
 <template>
   <t-dialog
     v-model:visible="props.visible"
-    header="JSON值"
+    :header="$t('JSON值')"
     :width="470"
     @close="close"
     @confirm="confirm"
   >
     <t-tabs v-model="tabValue" @change="tabChange">
-      <t-tab-panel :value="1" label="简单模式">
+      <t-tab-panel :value="1" :label="$t('简单模式')">
         <div class="mt-8">
           <div class="flex mt-4 one-data" v-for="(d, i) in simpleData">
             <t-select-input
               class="input-key"
               v-if="props.options?.length"
-              placeholder="可自定义输入"
+              :placeholder="$t('可自定义输入')"
               v-model:inputValue="d.key"
               :value="d.keyLabel"
               v-model:popupVisible="d.keyPopupVisible"
@@ -49,9 +49,9 @@
           </div>
         </div>
       </t-tab-panel>
-      <t-tab-panel :value="2" label="JSON模式">
+      <t-tab-panel :value="2" :label="$t('JSON模式')">
         <template #label>
-          JSON模式
+          {{$t('JSON模式')}}
           <t-tooltip v-if="props.tips" :content="props.tips" placement="top">
             <HelpCircleIcon class="ml-4" />
           </t-tooltip>

+ 9 - 6
src/views/components/common/MoreModal.vue

@@ -1,7 +1,7 @@
 <template>
   <t-dialog
     v-model:visible="props.visible"
-    header="更多属性"
+    :header="$t('更多属性')"
     :width="470"
     @close="close"
     @confirm="confirm"
@@ -14,7 +14,7 @@
         v-model="search"
         @change="onSearch"
         @enter="onSearch"
-        placeholder="搜索属性"
+        :placeholder="$t('搜索属性')"
       />
     </div>
     <div class="props mt-8">
@@ -53,9 +53,12 @@
 
 <script lang="ts" setup>
 import { SearchIcon } from 'tdesign-icons-vue-next';
-import { ref, toRaw } from 'vue';
+import { ref, toRaw, getCurrentInstance } from 'vue';
 import { penProps } from '@/services/defaults';
  
+const { proxy } = getCurrentInstance();
+const $t = proxy.$t
+
 const props = defineProps<{
   visible: boolean;
 }>();
@@ -125,9 +128,9 @@ function getList(){
 
 const columns = [
     { colKey: 'row-select', type: 'single',width:50 },
-    { colKey: 'label', title: '名称' },
-    { colKey: 'value', title: 'key名' ,width:150},
-    { colKey: 'type', title: '类型' ,width:80},
+    { colKey: 'label', title: $t('名称') },
+    { colKey: 'value', title: $t('key名') ,width:150},
+    { colKey: 'type', title: $t('类型') ,width:80},
 ];
 
 let data = ref(penProps);

+ 3 - 3
src/views/components/common/PenPropModal.vue

@@ -1,7 +1,7 @@
 <template>
   <t-dialog
     v-model:visible="props.visible"
-    header="关联图元属性"
+    :header="$t('关联图元属性')"
     :width="580"
     @close="close"
     @confirm="confirm"
@@ -16,7 +16,7 @@
             v-model="search"
             @change="onSearch"
             @enter="onSearch"
-            placeholder="搜索图元"
+            :placeholder="$t('搜索图元')"
           />
         </div>
         <div class="props-tree mt-8">
@@ -48,7 +48,7 @@
             v-model="propSearch"
             @change="onPropSearch"
             @enter="onPropSearch"
-            placeholder="搜索属性"
+            :placeholder="$t('搜索属性')"
           />
         </div>
         <div class="props mt-8">

+ 1 - 1
src/views/components/common/ProjectModal.vue

@@ -18,7 +18,7 @@
           </template>
           <template v-else >
              <div class="item-title" style="height:50px;">
-               暂无数据
+               {{$t('暂无数据')}}
              </div>
           </template>
         </div>

+ 18 - 15
src/views/components/common/PropModal.vue

@@ -1,13 +1,13 @@
 <template>
   <t-dialog
     v-model:visible="props.visible"
-    header="设备属性"
+    :header="$t('设备属性')"
     :width="470"
     @close="close"
     @confirm="confirm"
   >
   <t-tabs v-model="tabValue" @change="tabChange">
-    <t-tab-panel :value="1" label="数据列表">
+    <t-tab-panel :value="1" :label="$t('数据列表')">
     <div class="input-search mt-8">
       <div class="btn">
         <search-icon class="hover" />
@@ -16,7 +16,7 @@
         v-model="search"
         @change="onSearch"
         @enter="onSearch"
-        placeholder="搜索属性"
+        :placeholder="$t('搜索属性')"
       />
     </div>
     <div class="props mt-8">
@@ -31,28 +31,28 @@
       />
     </div>
     </t-tab-panel>
-    <t-tab-panel :value="2" label="自定义数据">
+    <t-tab-panel :value="2" :label="$t('自定义数据')">
       <div class="form-item mt-16">
-        <label>显示名称</label>
+        <label>{{$t('显示名称')}}</label>
         <t-input
             v-model:value="activeObj.label"
-            placeholder="属性简短描述"
+            :placeholder="$t('属性简短描述')"
           />
       </div>
       <div class="form-item mt-16">
-      <label>属性名</label>
+      <label>{{$t('属性名')}}</label>
       <t-input
         v-model:value="activeObj.value"
-        placeholder="属性名"
+        :placeholder="$t('属性名')"
       />
     </div>
     <div class="form-item mt-16">
-      <label>类型</label>
+      <label>{{$t('类型')}}</label>
       <t-select
         class="w-full"
         :options="typeOptions"
         v-model="activeObj.type"
-        placeholder="字符串"
+        :placeholder="$t('字符串')"
       />
     </div>
     </t-tab-panel>
@@ -62,10 +62,13 @@
 
 <script lang="ts" setup>
 import { SearchIcon } from 'tdesign-icons-vue-next';
-import { ref, toRaw, onMounted } from 'vue';
+import { ref, toRaw, onMounted, getCurrentInstance } from 'vue';
 import { typeOptions } from '@/services/common';
 import { MessagePlugin } from 'tdesign-vue-next';
 
+const { proxy } = getCurrentInstance();
+const $t = proxy.$t
+
 const props = defineProps<{
   visible: boolean;
 }>();
@@ -90,7 +93,7 @@ const getBindTreeData = () => {
       item.checkable = false;
     });
     data.push({
-      label: '物联网平台',
+      label: $t('物联网平台'),
       value: 'iot',
       checkable: false,
       children: iotTree,
@@ -99,7 +102,7 @@ const getBindTreeData = () => {
   const sqlTree = meta2d.store.data.sqls || [];
   if (sqlTree.length) {
     data.push({
-      label: 'sql数据源',
+      label: $t('sql数据源'),
       value: 'sql',
       checkable: false,
       children: sqlTree,
@@ -197,9 +200,9 @@ const tabValue = ref(1);
 const confirm = () => {
   if(!activeObj.value.value){
     if(tabValue.value===1){
-      MessagePlugin.info("请选择一项设备属性!");
+      MessagePlugin.info($t("请选择一项设备属性!"));
     }else{
-      MessagePlugin.info("属性名必填!");
+      MessagePlugin.info($t("属性名必填!"));
     }
     return;
   }

+ 5 - 5
src/views/components/common/StepModal.vue

@@ -1,7 +1,7 @@
 <template>
   <t-dialog
     v-model:visible="props.visible"
-    header="下载进度"
+    :header="$t('下载进度')"
     class="project-dialog"
     :width="700"
     :closeBtn="false"
@@ -10,7 +10,7 @@
       <t-steps class="task-steps" :current="3">
         <t-step-item
           v-for="step in props.tasks"
-          :title="step.title"
+          :title="$t(step.title)"
           :status="step.status"
         >
           <template #icon>
@@ -36,9 +36,9 @@
       </t-steps>
     </div>
     <template #footer>
-      <t-button v-if="props.reload" theme="primary" @click="reDownload"> 重新下载 </t-button>
-      <t-popconfirm theme="default" content="确认取消吗?" @confirm="close">
-        <t-button theme="default"> 取消任务 </t-button>
+      <t-button v-if="props.reload" theme="primary" @click="reDownload">{{$t('重新下载')}} </t-button>
+      <t-popconfirm theme="default" :content="$t('确认取消吗?')" @confirm="close">
+        <t-button theme="default">{{$t('取消任务')}} </t-button>
       </t-popconfirm>
     </template>
   </t-dialog>