mirror of
https://gitee.com/beecue/fastbee.git
synced 2026-03-22 14:34:50 +08:00
feat(国际化): 完善国际化
This commit is contained in:
4
vue/src/assets/icons/svg/globe.svg
Normal file
4
vue/src/assets/icons/svg/globe.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<path d="M8,1 C11.8659932,1 15,4.13400675 15,8 C15,11.8659932 11.8659932,15 8,15 C4.13400675,15 1,11.8659932 1,8 C1,4.13400675 4.13400675,1 8,1 Z M9.99190372,8.50131193 L6.00809628,8.50131193 C6.05866848,10.0621498 6.3438261,11.4964981 6.79782469,12.5558282 C7.21659494,13.5329588 7.68982759,14 8,14 C8.31017241,14 8.78340506,13.5329588 9.20217531,12.5558282 C9.6561739,11.4964981 9.94133152,10.0621498 9.99190372,8.50131193 Z M5.00755213,8.50056098 L2.02061151,8.50090367 C2.22703857,10.9985235 3.96324115,13.0622309 6.28999965,13.7528062 C5.5657829,12.5787023 5.07345663,10.6770109 5.00755213,8.50056098 Z M13.9793885,8.50090367 L10.9924479,8.50056098 C10.9265434,10.6770109 10.4342171,12.5787023 9.70923696,13.7535099 C12.0367588,13.0622309 13.7729614,10.9985235 13.9793885,8.50090367 Z M6.29076304,2.24649006 L6.26712071,2.25403417 C3.95155645,2.9514068 2.22589888,5.01022147 2.02052886,7.50009733 L5.007522,7.50043503 C5.07330643,5.32356926 5.56567231,3.42147692 6.29076304,2.24649006 Z M8,2 C7.68982759,2 7.21659494,2.46704125 6.79782469,3.44417183 C6.34372889,4.5037287 6.05854637,5.93846447 6.00806383,7.49969077 L9.99193617,7.49969077 C9.94145363,5.93846447 9.65627111,4.5037287 9.20217531,3.44417183 C8.81132308,2.53218328 8.37302804,2.06453923 8.06414417,2.00623997 L8,2 Z M9.71000035,2.2471938 L9.73522769,2.28908358 C10.4460778,3.46714611 10.9274826,5.34967989 10.992478,7.50043503 L13.9794711,7.50009733 C13.7734253,5.00202792 12.0370697,2.9378614 9.71000035,2.2471938 Z" id="fe-globe" fill-rule="nonzero"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
BIN
vue/src/assets/images/cover.png
Normal file
BIN
vue/src/assets/images/cover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 282 KiB |
BIN
vue/src/assets/images/logo_blue.png
Normal file
BIN
vue/src/assets/images/logo_blue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
@@ -652,6 +652,7 @@
|
|||||||
"device.running-status.866086-49": "please enter decimals",
|
"device.running-status.866086-49": "please enter decimals",
|
||||||
"device.running-status.866086-50": "please enter an integer",
|
"device.running-status.866086-50": "please enter an integer",
|
||||||
"device.running-status.866086-51": "please enter a valid integer",
|
"device.running-status.866086-51": "please enter a valid integer",
|
||||||
|
"device.running-status.866086-52": "Send Command",
|
||||||
"device.sub.083943-0": "Add sub devices",
|
"device.sub.083943-0": "Add sub devices",
|
||||||
"device.sub.083943-1": "Remove sub devices",
|
"device.sub.083943-1": "Remove sub devices",
|
||||||
"device.sub.083943-2": "Set sub device address",
|
"device.sub.083943-2": "Set sub device address",
|
||||||
|
|||||||
@@ -67,5 +67,7 @@
|
|||||||
"home.free": "Free",
|
"home.free": "Free",
|
||||||
"home.diskUsage": "Disk Usage",
|
"home.diskUsage": "Disk Usage",
|
||||||
"home.diskStatus": "Disk Status",
|
"home.diskStatus": "Disk Status",
|
||||||
"home.available": "Available"
|
"home.available": "Available",
|
||||||
|
"home.fengxinIoT": "Fengxin IoT",
|
||||||
|
"home.projectDocs": "Project Documentation"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,276 +1,278 @@
|
|||||||
{
|
{
|
||||||
"tool.import.670901-0": "Import Table",
|
"tool.import.670901-0": "Import Table",
|
||||||
"tool.import.670901-1": "Data Source",
|
"tool.import.670901-1": "Data Source",
|
||||||
"tool.import.670901-2": "Please select data source",
|
"tool.import.670901-2": "Please select data source",
|
||||||
"tool.import.670901-3": "Table Name",
|
"tool.import.670901-3": "Table Name",
|
||||||
"tool.import.670901-4": "Please enter table name",
|
"tool.import.670901-4": "Please enter table name",
|
||||||
"tool.import.670901-5": "Table Description",
|
"tool.import.670901-5": "Table Description",
|
||||||
"tool.import.670901-6": "Please enter table description",
|
"tool.import.670901-6": "Please enter table description",
|
||||||
"tool.import.670901-7": "Create Time",
|
"tool.import.670901-7": "Create Time",
|
||||||
"tool.import.670901-8": "Update Time",
|
"tool.import.670901-8": "Update Time",
|
||||||
"tool.import.670901-9": "Please select tables to import",
|
"tool.import.670901-9": "Please select tables to import",
|
||||||
"tool.genInfo.670902-0": "Generate Template",
|
"tool.genInfo.670902-0": "Generate Template",
|
||||||
"tool.genInfo.670902-1": "Single Table (CRUD)",
|
"tool.genInfo.670902-1": "Single Table (CRUD)",
|
||||||
"tool.genInfo.670902-2": "Tree Table (CRUD)",
|
"tool.genInfo.670902-2": "Tree Table (CRUD)",
|
||||||
"tool.genInfo.670902-3": "Master-Sub Table (CRUD)",
|
"tool.genInfo.670902-3": "Master-Sub Table (CRUD)",
|
||||||
"tool.genInfo.670902-4": "Frontend Type",
|
"tool.genInfo.670902-4": "Frontend Type",
|
||||||
"tool.genInfo.670902-5": "Vue2 Element UI Template",
|
"tool.genInfo.670902-5": "Vue2 Element UI Template",
|
||||||
"tool.genInfo.670902-6": "Vue3 Element Plus Template",
|
"tool.genInfo.670902-6": "Vue3 Element Plus Template",
|
||||||
"tool.genInfo.670902-7": "Package Path",
|
"tool.genInfo.670902-7": "Package Path",
|
||||||
"tool.genInfo.670902-8": "Generate under which java package, e.g. com.ruoyi.system",
|
"tool.genInfo.670902-8": "Generate under which java package, e.g. com.ruoyi.system",
|
||||||
"tool.genInfo.670902-9": "Module Name",
|
"tool.genInfo.670902-9": "Module Name",
|
||||||
"tool.genInfo.670902-10": "Can be understood as subsystem name, e.g. system",
|
"tool.genInfo.670902-10": "Can be understood as subsystem name, e.g. system",
|
||||||
"tool.genInfo.670902-11": "Business Name",
|
"tool.genInfo.670902-11": "Business Name",
|
||||||
"tool.genInfo.670902-12": "Can be understood as function English name, e.g. user",
|
"tool.genInfo.670902-12": "Can be understood as function English name, e.g. user",
|
||||||
"tool.genInfo.670902-13": "Function Name",
|
"tool.genInfo.670902-13": "Function Name",
|
||||||
"tool.genInfo.670902-14": "Used for class description, e.g. User",
|
"tool.genInfo.670902-14": "Used for class description, e.g. User",
|
||||||
"tool.genInfo.670902-15": "Code Generation Method",
|
"tool.genInfo.670902-15": "Code Generation Method",
|
||||||
"tool.genInfo.670902-16": "Default is zip compressed package download, can also customize generation path",
|
"tool.genInfo.670902-16": "Default is zip compressed package download, can also customize generation path",
|
||||||
"tool.genInfo.670902-17": "Zip Package",
|
"tool.genInfo.670902-17": "Zip Package",
|
||||||
"tool.genInfo.670902-18": "Custom Path",
|
"tool.genInfo.670902-18": "Custom Path",
|
||||||
"tool.genInfo.670902-19": "Parent Menu",
|
"tool.genInfo.670902-19": "Parent Menu",
|
||||||
"tool.genInfo.670902-20": "Assign to specified menu, e.g. System Management",
|
"tool.genInfo.670902-20": "Assign to specified menu, e.g. System Management",
|
||||||
"tool.genInfo.670902-21": "Please select system menu",
|
"tool.genInfo.670902-21": "Please select system menu",
|
||||||
"tool.genInfo.670902-22": "Fill in absolute disk path, if not filled, generate under current Web project",
|
"tool.genInfo.670902-22": "Fill in absolute disk path, if not filled, generate under current Web project",
|
||||||
"tool.genInfo.670902-23": "Recent Path Quick Select",
|
"tool.genInfo.670902-23": "Recent Path Quick Select",
|
||||||
"tool.genInfo.670902-24": "Restore default generation base path",
|
"tool.genInfo.670902-24": "Restore default generation base path",
|
||||||
"tool.genInfo.670902-25": "Other Information",
|
"tool.genInfo.670902-25": "Other Information",
|
||||||
"tool.genInfo.670902-26": "Tree Code Field",
|
"tool.genInfo.670902-26": "Tree Code Field",
|
||||||
"tool.genInfo.670902-27": "Tree display code field name, e.g. dept_id",
|
"tool.genInfo.670902-27": "Tree display code field name, e.g. dept_id",
|
||||||
"tool.genInfo.670902-28": "Please select",
|
"tool.genInfo.670902-28": "Please select",
|
||||||
"tool.genInfo.670902-29": "Tree Parent Code Field",
|
"tool.genInfo.670902-29": "Tree Parent Code Field",
|
||||||
"tool.genInfo.670902-30": "Tree display parent code field name, e.g. parent_id",
|
"tool.genInfo.670902-30": "Tree display parent code field name, e.g. parent_id",
|
||||||
"tool.genInfo.670902-31": "Tree Name Field",
|
"tool.genInfo.670902-31": "Tree Name Field",
|
||||||
"tool.genInfo.670902-32": "Tree node display name field name, e.g. dept_name",
|
"tool.genInfo.670902-32": "Tree node display name field name, e.g. dept_name",
|
||||||
"tool.genInfo.670902-33": "Association Information",
|
"tool.genInfo.670902-33": "Association Information",
|
||||||
"tool.genInfo.670902-34": "Associated Sub Table Name",
|
"tool.genInfo.670902-34": "Associated Sub Table Name",
|
||||||
"tool.genInfo.670902-35": "Associated sub table name, e.g. sys_user",
|
"tool.genInfo.670902-35": "Associated sub table name, e.g. sys_user",
|
||||||
"tool.genInfo.670902-36": "Sub Table Foreign Key Name",
|
"tool.genInfo.670902-36": "Sub Table Foreign Key Name",
|
||||||
"tool.genInfo.670902-37": "Sub table associated foreign key name, e.g. user_id",
|
"tool.genInfo.670902-37": "Sub table associated foreign key name, e.g. user_id",
|
||||||
"tool.genInfo.670902-38": "Please select generate template",
|
"tool.genInfo.670902-38": "Please select generate template",
|
||||||
"tool.genInfo.670902-39": "Please enter package path",
|
"tool.genInfo.670902-39": "Please enter package path",
|
||||||
"tool.genInfo.670902-40": "Please enter module name",
|
"tool.genInfo.670902-40": "Please enter module name",
|
||||||
"tool.genInfo.670902-41": "Please enter business name",
|
"tool.genInfo.670902-41": "Please enter business name",
|
||||||
"tool.genInfo.670902-42": "Please enter function name",
|
"tool.genInfo.670902-42": "Please enter function name",
|
||||||
"tool.editTable.670903-0": "Basic Information",
|
"tool.editTable.670903-0": "Basic Information",
|
||||||
"tool.editTable.670903-1": "Column Information",
|
"tool.editTable.670903-1": "Column Information",
|
||||||
"tool.editTable.670903-2": "Generate Information",
|
"tool.editTable.670903-2": "Generate Information",
|
||||||
"tool.editTable.670903-3": "No.",
|
"tool.editTable.670903-3": "No.",
|
||||||
"tool.editTable.670903-4": "Column Name",
|
"tool.editTable.670903-4": "Column Name",
|
||||||
"tool.editTable.670903-5": "Column Description",
|
"tool.editTable.670903-5": "Column Description",
|
||||||
"tool.editTable.670903-6": "Physical Type",
|
"tool.editTable.670903-6": "Physical Type",
|
||||||
"tool.editTable.670903-7": "Java Type",
|
"tool.editTable.670903-7": "Java Type",
|
||||||
"tool.editTable.670903-8": "Java Property",
|
"tool.editTable.670903-8": "Java Property",
|
||||||
"tool.editTable.670903-9": "Insert",
|
"tool.editTable.670903-9": "Insert",
|
||||||
"tool.editTable.670903-10": "Edit",
|
"tool.editTable.670903-10": "Edit",
|
||||||
"tool.editTable.670903-11": "List",
|
"tool.editTable.670903-11": "List",
|
||||||
"tool.editTable.670903-12": "Query",
|
"tool.editTable.670903-12": "Query",
|
||||||
"tool.editTable.670903-13": "Query Method",
|
"tool.editTable.670903-13": "Query Method",
|
||||||
"tool.editTable.670903-14": "Required",
|
"tool.editTable.670903-14": "Required",
|
||||||
"tool.editTable.670903-15": "Display Type",
|
"tool.editTable.670903-15": "Display Type",
|
||||||
"tool.editTable.670903-16": "Input Box",
|
"tool.editTable.670903-16": "Input Box",
|
||||||
"tool.editTable.670903-17": "Textarea",
|
"tool.editTable.670903-17": "Textarea",
|
||||||
"tool.editTable.670903-18": "Select",
|
"tool.editTable.670903-18": "Select",
|
||||||
"tool.editTable.670903-19": "Radio",
|
"tool.editTable.670903-19": "Radio",
|
||||||
"tool.editTable.670903-20": "Checkbox",
|
"tool.editTable.670903-20": "Checkbox",
|
||||||
"tool.editTable.670903-21": "Date Control",
|
"tool.editTable.670903-21": "Date Control",
|
||||||
"tool.editTable.670903-22": "Image Upload",
|
"tool.editTable.670903-22": "Image Upload",
|
||||||
"tool.editTable.670903-23": "File Upload",
|
"tool.editTable.670903-23": "File Upload",
|
||||||
"tool.editTable.670903-24": "Rich Text Control",
|
"tool.editTable.670903-24": "Rich Text Control",
|
||||||
"tool.editTable.670903-25": "Dict Type",
|
"tool.editTable.670903-25": "Dict Type",
|
||||||
"tool.editTable.670903-26": "Please select",
|
"tool.editTable.670903-26": "Please select",
|
||||||
"tool.editTable.670903-27": "Submit",
|
"tool.editTable.670903-27": "Submit",
|
||||||
"tool.editTable.670903-28": "Back",
|
"tool.editTable.670903-28": "Back",
|
||||||
"tool.editTable.670903-29": "Form validation failed, please check and resubmit",
|
"tool.editTable.670903-29": "Form validation failed, please check and resubmit",
|
||||||
"tool.createTable.670904-0": "Create Table",
|
"tool.createTable.670904-0": "Create Table",
|
||||||
"tool.createTable.670904-1": "Create table statement (supports multiple statements):",
|
"tool.createTable.670904-1": "Create table statement (supports multiple statements):",
|
||||||
"tool.createTable.670904-2": "Please enter text",
|
"tool.createTable.670904-2": "Please enter text",
|
||||||
"tool.createTable.670904-3": "Please enter table creation statement",
|
"tool.createTable.670904-3": "Please enter table creation statement",
|
||||||
"tool.basicInfo.670905-0": "Table Name",
|
"tool.basicInfo.670905-0": "Table Name",
|
||||||
"tool.basicInfo.670905-1": "Please enter repository name",
|
"tool.basicInfo.670905-1": "Please enter repository name",
|
||||||
"tool.basicInfo.670905-2": "Table Description",
|
"tool.basicInfo.670905-2": "Table Description",
|
||||||
"tool.basicInfo.670905-3": "Please enter",
|
"tool.basicInfo.670905-3": "Please enter",
|
||||||
"tool.basicInfo.670905-4": "Entity Class Name",
|
"tool.basicInfo.670905-4": "Entity Class Name",
|
||||||
"tool.basicInfo.670905-5": "Author",
|
"tool.basicInfo.670905-5": "Author",
|
||||||
"tool.basicInfo.670905-6": "Remark",
|
"tool.basicInfo.670905-6": "Remark",
|
||||||
"tool.basicInfo.670905-7": "Please enter table name",
|
"tool.basicInfo.670905-7": "Please enter table name",
|
||||||
"tool.basicInfo.670905-8": "Please enter table description",
|
"tool.basicInfo.670905-8": "Please enter table description",
|
||||||
"tool.basicInfo.670905-9": "Please enter entity class name",
|
"tool.basicInfo.670905-9": "Please enter entity class name",
|
||||||
"tool.basicInfo.670905-10": "Please enter author",
|
"tool.basicInfo.670905-10": "Please enter author",
|
||||||
"tool.build.index.670906-0": "Form Generator",
|
"tool.build.index.670906-0": "Form Generator",
|
||||||
"tool.build.index.670906-1": "Input Components",
|
"tool.build.index.670906-1": "Input Components",
|
||||||
"tool.build.index.670906-2": "Select Components",
|
"tool.build.index.670906-2": "Select Components",
|
||||||
"tool.build.index.670906-3": "Layout Components",
|
"tool.build.index.670906-3": "Layout Components",
|
||||||
"tool.build.index.670906-4": "Export Vue File",
|
"tool.build.index.670906-4": "Export Vue File",
|
||||||
"tool.build.index.670906-5": "Copy Code",
|
"tool.build.index.670906-5": "Copy Code",
|
||||||
"tool.build.index.670906-6": "Clear",
|
"tool.build.index.670906-6": "Clear",
|
||||||
"tool.build.index.670906-7": "Drag or click components from the left to design form",
|
"tool.build.index.670906-7": "Drag or click components from the left to design form",
|
||||||
"tool.build.index.670906-8": "Success",
|
"tool.build.index.670906-8": "Success",
|
||||||
"tool.build.index.670906-9": "Code has been copied to clipboard",
|
"tool.build.index.670906-9": "Code has been copied to clipboard",
|
||||||
"tool.build.index.670906-10": "Code copy failed",
|
"tool.build.index.670906-10": "Code copy failed",
|
||||||
"tool.build.index.670906-11": "Are you sure to clear all components?",
|
"tool.build.index.670906-11": "Are you sure to clear all components?",
|
||||||
"tool.build.index.670906-12": "Tip",
|
"tool.build.index.670906-12": "Tip",
|
||||||
"tool.rightPanel.670907-0": "Component Properties",
|
"tool.rightPanel.670907-0": "Component Properties",
|
||||||
"tool.rightPanel.670907-1": "Form Properties",
|
"tool.rightPanel.670907-1": "Form Properties",
|
||||||
"tool.rightPanel.670907-2": "View Component Documentation",
|
"tool.rightPanel.670907-2": "View Component Documentation",
|
||||||
"tool.rightPanel.670907-3": "Component Type",
|
"tool.rightPanel.670907-3": "Component Type",
|
||||||
"tool.rightPanel.670907-4": "Please select component type",
|
"tool.rightPanel.670907-4": "Please select component type",
|
||||||
"tool.rightPanel.670907-5": "Field Name",
|
"tool.rightPanel.670907-5": "Field Name",
|
||||||
"tool.rightPanel.670907-6": "Please enter field name (v-model)",
|
"tool.rightPanel.670907-6": "Please enter field name (v-model)",
|
||||||
"tool.rightPanel.670907-7": "Component Name",
|
"tool.rightPanel.670907-7": "Component Name",
|
||||||
"tool.rightPanel.670907-8": "Label",
|
"tool.rightPanel.670907-8": "Label",
|
||||||
"tool.rightPanel.670907-9": "Please enter label",
|
"tool.rightPanel.670907-9": "Please enter label",
|
||||||
"tool.rightPanel.670907-10": "Placeholder",
|
"tool.rightPanel.670907-10": "Placeholder",
|
||||||
"tool.rightPanel.670907-11": "Please enter placeholder",
|
"tool.rightPanel.670907-11": "Please enter placeholder",
|
||||||
"tool.rightPanel.670907-12": "Start Placeholder",
|
"tool.rightPanel.670907-12": "Start Placeholder",
|
||||||
"tool.rightPanel.670907-13": "End Placeholder",
|
"tool.rightPanel.670907-13": "End Placeholder",
|
||||||
"tool.rightPanel.670907-14": "Form Grid",
|
"tool.rightPanel.670907-14": "Form Grid",
|
||||||
"tool.rightPanel.670907-15": "Grid Gap",
|
"tool.rightPanel.670907-15": "Grid Gap",
|
||||||
"tool.rightPanel.670907-16": "Layout Mode",
|
"tool.rightPanel.670907-16": "Layout Mode",
|
||||||
"tool.rightPanel.670907-17": "Justify Content",
|
"tool.rightPanel.670907-17": "Justify Content",
|
||||||
"tool.rightPanel.670907-18": "Please select justify content",
|
"tool.rightPanel.670907-18": "Please select justify content",
|
||||||
"tool.rightPanel.670907-19": "Align Items",
|
"tool.rightPanel.670907-19": "Align Items",
|
||||||
"tool.rightPanel.670907-20": "Label Width",
|
"tool.rightPanel.670907-20": "Label Width",
|
||||||
"tool.rightPanel.670907-21": "Please enter label width",
|
"tool.rightPanel.670907-21": "Please enter label width",
|
||||||
"tool.rightPanel.670907-22": "Component Width",
|
"tool.rightPanel.670907-22": "Component Width",
|
||||||
"tool.rightPanel.670907-23": "Please enter component width",
|
"tool.rightPanel.670907-23": "Please enter component width",
|
||||||
"tool.rightPanel.670907-24": "Default Value",
|
"tool.rightPanel.670907-24": "Default Value",
|
||||||
"tool.rightPanel.670907-25": "Please enter default value",
|
"tool.rightPanel.670907-25": "Please enter default value",
|
||||||
"tool.rightPanel.670907-26": "Min Selection",
|
"tool.rightPanel.670907-26": "Min Selection",
|
||||||
"tool.rightPanel.670907-27": "Max Selection",
|
"tool.rightPanel.670907-27": "Max Selection",
|
||||||
"tool.rightPanel.670907-28": "Prefix",
|
"tool.rightPanel.670907-28": "Prefix",
|
||||||
"tool.rightPanel.670907-29": "Please enter prefix",
|
"tool.rightPanel.670907-29": "Please enter prefix",
|
||||||
"tool.rightPanel.670907-30": "Suffix",
|
"tool.rightPanel.670907-30": "Suffix",
|
||||||
"tool.rightPanel.670907-31": "Please enter suffix",
|
"tool.rightPanel.670907-31": "Please enter suffix",
|
||||||
"tool.rightPanel.670907-32": "Prefix Icon",
|
"tool.rightPanel.670907-32": "Prefix Icon",
|
||||||
"tool.rightPanel.670907-33": "Please enter prefix icon name",
|
"tool.rightPanel.670907-33": "Please enter prefix icon name",
|
||||||
"tool.rightPanel.670907-34": "Select",
|
"tool.rightPanel.670907-34": "Select",
|
||||||
"tool.rightPanel.670907-35": "Suffix Icon",
|
"tool.rightPanel.670907-35": "Suffix Icon",
|
||||||
"tool.rightPanel.670907-36": "Please enter suffix icon name",
|
"tool.rightPanel.670907-36": "Please enter suffix icon name",
|
||||||
"tool.rightPanel.670907-37": "Option Separator",
|
"tool.rightPanel.670907-37": "Option Separator",
|
||||||
"tool.rightPanel.670907-38": "Please enter option separator",
|
"tool.rightPanel.670907-38": "Please enter option separator",
|
||||||
"tool.rightPanel.670907-39": "Min Rows",
|
"tool.rightPanel.670907-39": "Min Rows",
|
||||||
"tool.rightPanel.670907-40": "Max Rows",
|
"tool.rightPanel.670907-40": "Max Rows",
|
||||||
"tool.rightPanel.670907-41": "Min Value",
|
"tool.rightPanel.670907-41": "Min Value",
|
||||||
"tool.rightPanel.670907-42": "Max Value",
|
"tool.rightPanel.670907-42": "Max Value",
|
||||||
"tool.rightPanel.670907-43": "Step",
|
"tool.rightPanel.670907-43": "Step",
|
||||||
"tool.rightPanel.670907-44": "Precision",
|
"tool.rightPanel.670907-44": "Precision",
|
||||||
"tool.rightPanel.670907-45": "Controls Position",
|
"tool.rightPanel.670907-45": "Controls Position",
|
||||||
"tool.rightPanel.670907-46": "Default",
|
"tool.rightPanel.670907-46": "Default",
|
||||||
"tool.rightPanel.670907-47": "Right",
|
"tool.rightPanel.670907-47": "Right",
|
||||||
"tool.rightPanel.670907-48": "Max Input",
|
"tool.rightPanel.670907-48": "Max Input",
|
||||||
"tool.rightPanel.670907-49": "characters",
|
"tool.rightPanel.670907-49": "characters",
|
||||||
"tool.rightPanel.670907-50": "Active Text",
|
"tool.rightPanel.670907-50": "Active Text",
|
||||||
"tool.rightPanel.670907-51": "Please enter active text",
|
"tool.rightPanel.670907-51": "Please enter active text",
|
||||||
"tool.rightPanel.670907-52": "Inactive Text",
|
"tool.rightPanel.670907-52": "Inactive Text",
|
||||||
"tool.rightPanel.670907-53": "Please enter inactive text",
|
"tool.rightPanel.670907-53": "Please enter inactive text",
|
||||||
"tool.rightPanel.670907-54": "Active Value",
|
"tool.rightPanel.670907-54": "Active Value",
|
||||||
"tool.rightPanel.670907-55": "Please enter active value",
|
"tool.rightPanel.670907-55": "Please enter active value",
|
||||||
"tool.rightPanel.670907-56": "Inactive Value",
|
"tool.rightPanel.670907-56": "Inactive Value",
|
||||||
"tool.rightPanel.670907-57": "Please enter inactive value",
|
"tool.rightPanel.670907-57": "Please enter inactive value",
|
||||||
"tool.rightPanel.670907-58": "Date Type",
|
"tool.rightPanel.670907-58": "Date Type",
|
||||||
"tool.rightPanel.670907-59": "Please select date type",
|
"tool.rightPanel.670907-59": "Please select date type",
|
||||||
"tool.rightPanel.670907-60": "File Field Name",
|
"tool.rightPanel.670907-60": "File Field Name",
|
||||||
"tool.rightPanel.670907-61": "Please enter upload file field name",
|
"tool.rightPanel.670907-61": "Please enter upload file field name",
|
||||||
"tool.rightPanel.670907-62": "File Type",
|
"tool.rightPanel.670907-62": "File Type",
|
||||||
"tool.rightPanel.670907-63": "Please select file type",
|
"tool.rightPanel.670907-63": "Please select file type",
|
||||||
"tool.rightPanel.670907-64": "Image",
|
"tool.rightPanel.670907-64": "Image",
|
||||||
"tool.rightPanel.670907-65": "Video",
|
"tool.rightPanel.670907-65": "Video",
|
||||||
"tool.rightPanel.670907-66": "Audio",
|
"tool.rightPanel.670907-66": "Audio",
|
||||||
"tool.rightPanel.670907-67": "File Size",
|
"tool.rightPanel.670907-67": "File Size",
|
||||||
"tool.rightPanel.670907-68": "Please enter file size",
|
"tool.rightPanel.670907-68": "Please enter file size",
|
||||||
"tool.rightPanel.670907-69": "Upload Address",
|
"tool.rightPanel.670907-69": "Upload Address",
|
||||||
"tool.rightPanel.670907-70": "Please enter upload address",
|
"tool.rightPanel.670907-70": "Please enter upload address",
|
||||||
"tool.rightPanel.670907-71": "List Type",
|
"tool.rightPanel.670907-71": "List Type",
|
||||||
"tool.rightPanel.670907-72": "Button Text",
|
"tool.rightPanel.670907-72": "Button Text",
|
||||||
"tool.rightPanel.670907-73": "Please enter button text",
|
"tool.rightPanel.670907-73": "Please enter button text",
|
||||||
"tool.rightPanel.670907-74": "Separator",
|
"tool.rightPanel.670907-74": "Separator",
|
||||||
"tool.rightPanel.670907-75": "Please enter separator",
|
"tool.rightPanel.670907-75": "Please enter separator",
|
||||||
"tool.rightPanel.670907-76": "Time Range",
|
"tool.rightPanel.670907-76": "Time Range",
|
||||||
"tool.rightPanel.670907-77": "Please enter time range",
|
"tool.rightPanel.670907-77": "Please enter time range",
|
||||||
"tool.rightPanel.670907-78": "Date Format",
|
"tool.rightPanel.670907-78": "Date Format",
|
||||||
"tool.rightPanel.670907-79": "Please enter date format",
|
"tool.rightPanel.670907-79": "Please enter date format",
|
||||||
"tool.rightPanel.670907-80": "Options",
|
"tool.rightPanel.670907-80": "Options",
|
||||||
"tool.rightPanel.670907-81": "Option Name",
|
"tool.rightPanel.670907-81": "Option Name",
|
||||||
"tool.rightPanel.670907-82": "Option Value",
|
"tool.rightPanel.670907-82": "Option Value",
|
||||||
"tool.rightPanel.670907-83": "Add Option",
|
"tool.rightPanel.670907-83": "Add Option",
|
||||||
"tool.rightPanel.670907-84": "Data Type",
|
"tool.rightPanel.670907-84": "Data Type",
|
||||||
"tool.rightPanel.670907-85": "Dynamic Data",
|
"tool.rightPanel.670907-85": "Dynamic Data",
|
||||||
"tool.rightPanel.670907-86": "Static Data",
|
"tool.rightPanel.670907-86": "Static Data",
|
||||||
"tool.rightPanel.670907-87": "Label Key",
|
"tool.rightPanel.670907-87": "Label Key",
|
||||||
"tool.rightPanel.670907-88": "Please enter label key",
|
"tool.rightPanel.670907-88": "Please enter label key",
|
||||||
"tool.rightPanel.670907-89": "Value Key",
|
"tool.rightPanel.670907-89": "Value Key",
|
||||||
"tool.rightPanel.670907-90": "Please enter value key",
|
"tool.rightPanel.670907-90": "Please enter value key",
|
||||||
"tool.rightPanel.670907-91": "Children Key",
|
"tool.rightPanel.670907-91": "Children Key",
|
||||||
"tool.rightPanel.670907-92": "Please enter children key",
|
"tool.rightPanel.670907-92": "Please enter children key",
|
||||||
"tool.rightPanel.670907-93": "Add Parent",
|
"tool.rightPanel.670907-93": "Add Parent",
|
||||||
"tool.rightPanel.670907-94": "Option Style",
|
"tool.rightPanel.670907-94": "Option Style",
|
||||||
"tool.rightPanel.670907-95": "Button",
|
"tool.rightPanel.670907-95": "Button",
|
||||||
"tool.rightPanel.670907-96": "Active Color",
|
"tool.rightPanel.670907-96": "Active Color",
|
||||||
"tool.rightPanel.670907-97": "Inactive Color",
|
"tool.rightPanel.670907-97": "Inactive Color",
|
||||||
"tool.rightPanel.670907-98": "Allow Half",
|
"tool.rightPanel.670907-98": "Allow Half",
|
||||||
"tool.rightPanel.670907-99": "Show Text",
|
"tool.rightPanel.670907-99": "Show Text",
|
||||||
"tool.rightPanel.670907-100": "Show Score",
|
"tool.rightPanel.670907-100": "Show Score",
|
||||||
"tool.rightPanel.670907-101": "Show Stops",
|
"tool.rightPanel.670907-101": "Show Stops",
|
||||||
"tool.rightPanel.670907-102": "Range Selection",
|
"tool.rightPanel.670907-102": "Range Selection",
|
||||||
"tool.rightPanel.670907-103": "Show Border",
|
"tool.rightPanel.670907-103": "Show Border",
|
||||||
"tool.rightPanel.670907-104": "Color Format",
|
"tool.rightPanel.670907-104": "Color Format",
|
||||||
"tool.rightPanel.670907-105": "Please select color format",
|
"tool.rightPanel.670907-105": "Please select color format",
|
||||||
"tool.rightPanel.670907-106": "Option Size",
|
"tool.rightPanel.670907-106": "Option Size",
|
||||||
"tool.rightPanel.670907-107": "Medium",
|
"tool.rightPanel.670907-107": "Medium",
|
||||||
"tool.rightPanel.670907-108": "Small",
|
"tool.rightPanel.670907-108": "Small",
|
||||||
"tool.rightPanel.670907-109": "Mini",
|
"tool.rightPanel.670907-109": "Mini",
|
||||||
"tool.rightPanel.670907-110": "Show Word Limit",
|
"tool.rightPanel.670907-110": "Show Word Limit",
|
||||||
"tool.rightPanel.670907-111": "Step Strictly",
|
"tool.rightPanel.670907-111": "Step Strictly",
|
||||||
"tool.rightPanel.670907-112": "Multiple Selection",
|
"tool.rightPanel.670907-112": "Multiple Selection",
|
||||||
"tool.rightPanel.670907-113": "Show All Levels",
|
"tool.rightPanel.670907-113": "Show All Levels",
|
||||||
"tool.rightPanel.670907-114": "Filterable",
|
"tool.rightPanel.670907-114": "Filterable",
|
||||||
"tool.rightPanel.670907-115": "Clearable",
|
"tool.rightPanel.670907-115": "Clearable",
|
||||||
"tool.rightPanel.670907-116": "Show Tip",
|
"tool.rightPanel.670907-116": "Show Tip",
|
||||||
"tool.rightPanel.670907-117": "Multiple Files",
|
"tool.rightPanel.670907-117": "Multiple Files",
|
||||||
"tool.rightPanel.670907-118": "Auto Upload",
|
"tool.rightPanel.670907-118": "Auto Upload",
|
||||||
"tool.rightPanel.670907-119": "Readonly",
|
"tool.rightPanel.670907-119": "Readonly",
|
||||||
"tool.rightPanel.670907-120": "Disabled",
|
"tool.rightPanel.670907-120": "Disabled",
|
||||||
"tool.rightPanel.670907-121": "Searchable",
|
"tool.rightPanel.670907-121": "Searchable",
|
||||||
"tool.rightPanel.670907-122": "Required",
|
"tool.rightPanel.670907-122": "Required",
|
||||||
"tool.rightPanel.670907-123": "Layout Structure Tree",
|
"tool.rightPanel.670907-123": "Layout Structure Tree",
|
||||||
"tool.rightPanel.670907-124": "Regular Validation",
|
"tool.rightPanel.670907-124": "Regular Validation",
|
||||||
"tool.rightPanel.670907-125": "Expression",
|
"tool.rightPanel.670907-125": "Expression",
|
||||||
"tool.rightPanel.670907-126": "Please enter regex",
|
"tool.rightPanel.670907-126": "Please enter regex",
|
||||||
"tool.rightPanel.670907-127": "Error Message",
|
"tool.rightPanel.670907-127": "Error Message",
|
||||||
"tool.rightPanel.670907-128": "Please enter error message",
|
"tool.rightPanel.670907-128": "Please enter error message",
|
||||||
"tool.rightPanel.670907-129": "Add Rule",
|
"tool.rightPanel.670907-129": "Add Rule",
|
||||||
"tool.rightPanel.670907-130": "Form Name",
|
"tool.rightPanel.670907-130": "Form Name",
|
||||||
"tool.rightPanel.670907-131": "Please enter form name (ref)",
|
"tool.rightPanel.670907-131": "Please enter form name (ref)",
|
||||||
"tool.rightPanel.670907-132": "Form Model",
|
"tool.rightPanel.670907-132": "Form Model",
|
||||||
"tool.rightPanel.670907-133": "Please enter data model",
|
"tool.rightPanel.670907-133": "Please enter data model",
|
||||||
"tool.rightPanel.670907-134": "Validation Model",
|
"tool.rightPanel.670907-134": "Validation Model",
|
||||||
"tool.rightPanel.670907-135": "Please enter validation model",
|
"tool.rightPanel.670907-135": "Please enter validation model",
|
||||||
"tool.rightPanel.670907-136": "Form Size",
|
"tool.rightPanel.670907-136": "Form Size",
|
||||||
"tool.rightPanel.670907-137": "Label Position",
|
"tool.rightPanel.670907-137": "Label Position",
|
||||||
"tool.rightPanel.670907-138": "Left",
|
"tool.rightPanel.670907-138": "Left",
|
||||||
"tool.rightPanel.670907-139": "Right",
|
"tool.rightPanel.670907-139": "Right",
|
||||||
"tool.rightPanel.670907-140": "Top",
|
"tool.rightPanel.670907-140": "Top",
|
||||||
"tool.rightPanel.670907-141": "Disable Form",
|
"tool.rightPanel.670907-141": "Disable Form",
|
||||||
"tool.rightPanel.670907-142": "Form Buttons",
|
"tool.rightPanel.670907-142": "Form Buttons",
|
||||||
"tool.rightPanel.670907-143": "Show Unfocused Component Border",
|
"tool.rightPanel.670907-143": "Show Unfocused Component Border",
|
||||||
"tool.rightPanel.670907-144": "Add Option",
|
"tool.rightPanel.670907-144": "Add Option",
|
||||||
"tool.treeNode.670908-0": "Option Name",
|
"tool.treeNode.670908-0": "Option Name",
|
||||||
"tool.treeNode.670908-1": "Please enter option name",
|
"tool.treeNode.670908-1": "Please enter option name",
|
||||||
"tool.treeNode.670908-2": "Option Value",
|
"tool.treeNode.670908-2": "Option Value",
|
||||||
"tool.treeNode.670908-3": "Please enter option value",
|
"tool.treeNode.670908-3": "Please enter option value",
|
||||||
"tool.treeNode.670908-4": "String",
|
"tool.treeNode.670908-4": "String",
|
||||||
"tool.treeNode.670908-5": "Number",
|
"tool.treeNode.670908-5": "Number",
|
||||||
"tool.treeNode.670908-6": "Confirm",
|
"tool.treeNode.670908-6": "Confirm",
|
||||||
"tool.treeNode.670908-7": "Cancel",
|
"tool.treeNode.670908-7": "Cancel",
|
||||||
"tool.icons.670909-0": "Select Icon",
|
"tool.icons.670909-0": "Select Icon",
|
||||||
"tool.icons.670909-1": "Please enter icon name",
|
"tool.icons.670909-1": "Please enter icon name",
|
||||||
"tool.build.index.670906-13": "Copy",
|
"tool.build.index.670906-13": "Copy",
|
||||||
"tool.build.index.670906-14": "Delete",
|
"tool.build.index.670906-14": "Delete",
|
||||||
"tool.codeType.670910-0": "Generate Type",
|
"tool.build.index.670906-15": "does not have",
|
||||||
"tool.codeType.670910-1": "File Name",
|
"tool.build.index.670906-16": "Related components",
|
||||||
"tool.codeType.670910-2": "Please enter file name",
|
"tool.codeType.670910-0": "Generate Type",
|
||||||
"tool.codeType.670910-3": "Page",
|
"tool.codeType.670910-1": "File Name",
|
||||||
"tool.codeType.670910-4": "Dialog",
|
"tool.codeType.670910-2": "Please enter file name",
|
||||||
"tool.codeType.670910-5": "Generate type cannot be empty"
|
"tool.codeType.670910-3": "Page",
|
||||||
|
"tool.codeType.670910-4": "Dialog",
|
||||||
|
"tool.codeType.670910-5": "Generate type cannot be empty"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -652,6 +652,7 @@
|
|||||||
"device.running-status.866086-49": "请输入下发值",
|
"device.running-status.866086-49": "请输入下发值",
|
||||||
"device.running-status.866086-50": "只能输入整数",
|
"device.running-status.866086-50": "只能输入整数",
|
||||||
"device.running-status.866086-51": "请输入有效的整数",
|
"device.running-status.866086-51": "请输入有效的整数",
|
||||||
|
"device.running-status.866086-52": "指令发送",
|
||||||
"device.sub.083943-0": "添加子设备",
|
"device.sub.083943-0": "添加子设备",
|
||||||
"device.sub.083943-1": "移除子设备",
|
"device.sub.083943-1": "移除子设备",
|
||||||
"device.sub.083943-2": "设置子设备地址",
|
"device.sub.083943-2": "设置子设备地址",
|
||||||
|
|||||||
@@ -67,5 +67,7 @@
|
|||||||
"home.free": "剩余",
|
"home.free": "剩余",
|
||||||
"home.diskUsage": "系统盘使用率",
|
"home.diskUsage": "系统盘使用率",
|
||||||
"home.diskStatus": "磁盘状态",
|
"home.diskStatus": "磁盘状态",
|
||||||
"home.available": "可用"
|
"home.available": "可用",
|
||||||
|
"home.fengxinIoT": "蜂信物联",
|
||||||
|
"home.projectDocs": "项目文档"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,276 +1,278 @@
|
|||||||
{
|
{
|
||||||
"tool.import.670901-0": "导入表",
|
"tool.import.670901-0": "导入表",
|
||||||
"tool.import.670901-1": "数据源",
|
"tool.import.670901-1": "数据源",
|
||||||
"tool.import.670901-2": "请选择数据源",
|
"tool.import.670901-2": "请选择数据源",
|
||||||
"tool.import.670901-3": "表名称",
|
"tool.import.670901-3": "表名称",
|
||||||
"tool.import.670901-4": "请输入表名称",
|
"tool.import.670901-4": "请输入表名称",
|
||||||
"tool.import.670901-5": "表描述",
|
"tool.import.670901-5": "表描述",
|
||||||
"tool.import.670901-6": "请输入表描述",
|
"tool.import.670901-6": "请输入表描述",
|
||||||
"tool.import.670901-7": "创建时间",
|
"tool.import.670901-7": "创建时间",
|
||||||
"tool.import.670901-8": "更新时间",
|
"tool.import.670901-8": "更新时间",
|
||||||
"tool.import.670901-9": "请选择要导入的表",
|
"tool.import.670901-9": "请选择要导入的表",
|
||||||
"tool.genInfo.670902-0": "生成模板",
|
"tool.genInfo.670902-0": "生成模板",
|
||||||
"tool.genInfo.670902-1": "单表(增删改查)",
|
"tool.genInfo.670902-1": "单表(增删改查)",
|
||||||
"tool.genInfo.670902-2": "树表(增删改查)",
|
"tool.genInfo.670902-2": "树表(增删改查)",
|
||||||
"tool.genInfo.670902-3": "主子表(增删改查)",
|
"tool.genInfo.670902-3": "主子表(增删改查)",
|
||||||
"tool.genInfo.670902-4": "前端类型",
|
"tool.genInfo.670902-4": "前端类型",
|
||||||
"tool.genInfo.670902-5": "Vue2 Element UI 模版",
|
"tool.genInfo.670902-5": "Vue2 Element UI 模版",
|
||||||
"tool.genInfo.670902-6": "Vue3 Element Plus 模版",
|
"tool.genInfo.670902-6": "Vue3 Element Plus 模版",
|
||||||
"tool.genInfo.670902-7": "生成包路径",
|
"tool.genInfo.670902-7": "生成包路径",
|
||||||
"tool.genInfo.670902-8": "生成在哪个java包下,例如 com.ruoyi.system",
|
"tool.genInfo.670902-8": "生成在哪个java包下,例如 com.ruoyi.system",
|
||||||
"tool.genInfo.670902-9": "生成模块名",
|
"tool.genInfo.670902-9": "生成模块名",
|
||||||
"tool.genInfo.670902-10": "可理解为子系统名,例如 system",
|
"tool.genInfo.670902-10": "可理解为子系统名,例如 system",
|
||||||
"tool.genInfo.670902-11": "生成业务名",
|
"tool.genInfo.670902-11": "生成业务名",
|
||||||
"tool.genInfo.670902-12": "可理解为功能英文名,例如 user",
|
"tool.genInfo.670902-12": "可理解为功能英文名,例如 user",
|
||||||
"tool.genInfo.670902-13": "生成功能名",
|
"tool.genInfo.670902-13": "生成功能名",
|
||||||
"tool.genInfo.670902-14": "用作类描述,例如 用户",
|
"tool.genInfo.670902-14": "用作类描述,例如 用户",
|
||||||
"tool.genInfo.670902-15": "生成代码方式",
|
"tool.genInfo.670902-15": "生成代码方式",
|
||||||
"tool.genInfo.670902-16": "默认为zip压缩包下载,也可以自定义生成路径",
|
"tool.genInfo.670902-16": "默认为zip压缩包下载,也可以自定义生成路径",
|
||||||
"tool.genInfo.670902-17": "zip压缩包",
|
"tool.genInfo.670902-17": "zip压缩包",
|
||||||
"tool.genInfo.670902-18": "自定义路径",
|
"tool.genInfo.670902-18": "自定义路径",
|
||||||
"tool.genInfo.670902-19": "上级菜单",
|
"tool.genInfo.670902-19": "上级菜单",
|
||||||
"tool.genInfo.670902-20": "分配到指定菜单下,例如 系统管理",
|
"tool.genInfo.670902-20": "分配到指定菜单下,例如 系统管理",
|
||||||
"tool.genInfo.670902-21": "请选择系统菜单",
|
"tool.genInfo.670902-21": "请选择系统菜单",
|
||||||
"tool.genInfo.670902-22": "填写磁盘绝对路径,若不填写,则生成到当前Web项目下",
|
"tool.genInfo.670902-22": "填写磁盘绝对路径,若不填写,则生成到当前Web项目下",
|
||||||
"tool.genInfo.670902-23": "最近路径快速选择",
|
"tool.genInfo.670902-23": "最近路径快速选择",
|
||||||
"tool.genInfo.670902-24": "恢复默认的生成基础路径",
|
"tool.genInfo.670902-24": "恢复默认的生成基础路径",
|
||||||
"tool.genInfo.670902-25": "其他信息",
|
"tool.genInfo.670902-25": "其他信息",
|
||||||
"tool.genInfo.670902-26": "树编码字段",
|
"tool.genInfo.670902-26": "树编码字段",
|
||||||
"tool.genInfo.670902-27": "树显示的编码字段名,如:dept_id",
|
"tool.genInfo.670902-27": "树显示的编码字段名,如:dept_id",
|
||||||
"tool.genInfo.670902-28": "请选择",
|
"tool.genInfo.670902-28": "请选择",
|
||||||
"tool.genInfo.670902-29": "树父编码字段",
|
"tool.genInfo.670902-29": "树父编码字段",
|
||||||
"tool.genInfo.670902-30": "树显示的父编码字段名,如:parent_id",
|
"tool.genInfo.670902-30": "树显示的父编码字段名,如:parent_id",
|
||||||
"tool.genInfo.670902-31": "树名称字段",
|
"tool.genInfo.670902-31": "树名称字段",
|
||||||
"tool.genInfo.670902-32": "树节点的显示名称字段名,如:dept_name",
|
"tool.genInfo.670902-32": "树节点的显示名称字段名,如:dept_name",
|
||||||
"tool.genInfo.670902-33": "关联信息",
|
"tool.genInfo.670902-33": "关联信息",
|
||||||
"tool.genInfo.670902-34": "关联子表的表名",
|
"tool.genInfo.670902-34": "关联子表的表名",
|
||||||
"tool.genInfo.670902-35": "关联子表的表名,如:sys_user",
|
"tool.genInfo.670902-35": "关联子表的表名,如:sys_user",
|
||||||
"tool.genInfo.670902-36": "子表关联的外键名",
|
"tool.genInfo.670902-36": "子表关联的外键名",
|
||||||
"tool.genInfo.670902-37": "子表关联的外键名,如:user_id",
|
"tool.genInfo.670902-37": "子表关联的外键名,如:user_id",
|
||||||
"tool.genInfo.670902-38": "请选择生成模板",
|
"tool.genInfo.670902-38": "请选择生成模板",
|
||||||
"tool.genInfo.670902-39": "请输入生成包路径",
|
"tool.genInfo.670902-39": "请输入生成包路径",
|
||||||
"tool.genInfo.670902-40": "请输入生成模块名",
|
"tool.genInfo.670902-40": "请输入生成模块名",
|
||||||
"tool.genInfo.670902-41": "请输入生成业务名",
|
"tool.genInfo.670902-41": "请输入生成业务名",
|
||||||
"tool.genInfo.670902-42": "请输入生成功能名",
|
"tool.genInfo.670902-42": "请输入生成功能名",
|
||||||
"tool.editTable.670903-0": "基本信息",
|
"tool.editTable.670903-0": "基本信息",
|
||||||
"tool.editTable.670903-1": "字段信息",
|
"tool.editTable.670903-1": "字段信息",
|
||||||
"tool.editTable.670903-2": "生成信息",
|
"tool.editTable.670903-2": "生成信息",
|
||||||
"tool.editTable.670903-3": "序号",
|
"tool.editTable.670903-3": "序号",
|
||||||
"tool.editTable.670903-4": "字段列名",
|
"tool.editTable.670903-4": "字段列名",
|
||||||
"tool.editTable.670903-5": "字段描述",
|
"tool.editTable.670903-5": "字段描述",
|
||||||
"tool.editTable.670903-6": "物理类型",
|
"tool.editTable.670903-6": "物理类型",
|
||||||
"tool.editTable.670903-7": "Java类型",
|
"tool.editTable.670903-7": "Java类型",
|
||||||
"tool.editTable.670903-8": "java属性",
|
"tool.editTable.670903-8": "java属性",
|
||||||
"tool.editTable.670903-9": "插入",
|
"tool.editTable.670903-9": "插入",
|
||||||
"tool.editTable.670903-10": "编辑",
|
"tool.editTable.670903-10": "编辑",
|
||||||
"tool.editTable.670903-11": "列表",
|
"tool.editTable.670903-11": "列表",
|
||||||
"tool.editTable.670903-12": "查询",
|
"tool.editTable.670903-12": "查询",
|
||||||
"tool.editTable.670903-13": "查询方式",
|
"tool.editTable.670903-13": "查询方式",
|
||||||
"tool.editTable.670903-14": "必填",
|
"tool.editTable.670903-14": "必填",
|
||||||
"tool.editTable.670903-15": "显示类型",
|
"tool.editTable.670903-15": "显示类型",
|
||||||
"tool.editTable.670903-16": "文本框",
|
"tool.editTable.670903-16": "文本框",
|
||||||
"tool.editTable.670903-17": "文本域",
|
"tool.editTable.670903-17": "文本域",
|
||||||
"tool.editTable.670903-18": "下拉框",
|
"tool.editTable.670903-18": "下拉框",
|
||||||
"tool.editTable.670903-19": "单选框",
|
"tool.editTable.670903-19": "单选框",
|
||||||
"tool.editTable.670903-20": "复选框",
|
"tool.editTable.670903-20": "复选框",
|
||||||
"tool.editTable.670903-21": "日期控件",
|
"tool.editTable.670903-21": "日期控件",
|
||||||
"tool.editTable.670903-22": "图片上传",
|
"tool.editTable.670903-22": "图片上传",
|
||||||
"tool.editTable.670903-23": "文件上传",
|
"tool.editTable.670903-23": "文件上传",
|
||||||
"tool.editTable.670903-24": "富文本控件",
|
"tool.editTable.670903-24": "富文本控件",
|
||||||
"tool.editTable.670903-25": "字典类型",
|
"tool.editTable.670903-25": "字典类型",
|
||||||
"tool.editTable.670903-26": "请选择",
|
"tool.editTable.670903-26": "请选择",
|
||||||
"tool.editTable.670903-27": "提交",
|
"tool.editTable.670903-27": "提交",
|
||||||
"tool.editTable.670903-28": "返回",
|
"tool.editTable.670903-28": "返回",
|
||||||
"tool.editTable.670903-29": "表单校验未通过,请重新检查提交内容",
|
"tool.editTable.670903-29": "表单校验未通过,请重新检查提交内容",
|
||||||
"tool.createTable.670904-0": "创建表",
|
"tool.createTable.670904-0": "创建表",
|
||||||
"tool.createTable.670904-1": "创建表语句(支持多个建表语句):",
|
"tool.createTable.670904-1": "创建表语句(支持多个建表语句):",
|
||||||
"tool.createTable.670904-2": "请输入文本",
|
"tool.createTable.670904-2": "请输入文本",
|
||||||
"tool.createTable.670904-3": "请输入建表语句",
|
"tool.createTable.670904-3": "请输入建表语句",
|
||||||
"tool.basicInfo.670905-0": "表名称",
|
"tool.basicInfo.670905-0": "表名称",
|
||||||
"tool.basicInfo.670905-1": "请输入仓库名称",
|
"tool.basicInfo.670905-1": "请输入仓库名称",
|
||||||
"tool.basicInfo.670905-2": "表描述",
|
"tool.basicInfo.670905-2": "表描述",
|
||||||
"tool.basicInfo.670905-3": "请输入",
|
"tool.basicInfo.670905-3": "请输入",
|
||||||
"tool.basicInfo.670905-4": "实体类名称",
|
"tool.basicInfo.670905-4": "实体类名称",
|
||||||
"tool.basicInfo.670905-5": "作者",
|
"tool.basicInfo.670905-5": "作者",
|
||||||
"tool.basicInfo.670905-6": "备注",
|
"tool.basicInfo.670905-6": "备注",
|
||||||
"tool.basicInfo.670905-7": "请输入表名称",
|
"tool.basicInfo.670905-7": "请输入表名称",
|
||||||
"tool.basicInfo.670905-8": "请输入表描述",
|
"tool.basicInfo.670905-8": "请输入表描述",
|
||||||
"tool.basicInfo.670905-9": "请输入实体类名称",
|
"tool.basicInfo.670905-9": "请输入实体类名称",
|
||||||
"tool.basicInfo.670905-10": "请输入作者",
|
"tool.basicInfo.670905-10": "请输入作者",
|
||||||
"tool.build.index.670906-0": "Form Generator",
|
"tool.build.index.670906-0": "Form Generator",
|
||||||
"tool.build.index.670906-1": "输入型组件",
|
"tool.build.index.670906-1": "输入型组件",
|
||||||
"tool.build.index.670906-2": "选择型组件",
|
"tool.build.index.670906-2": "选择型组件",
|
||||||
"tool.build.index.670906-3": "布局型组件",
|
"tool.build.index.670906-3": "布局型组件",
|
||||||
"tool.build.index.670906-4": "导出vue文件",
|
"tool.build.index.670906-4": "导出vue文件",
|
||||||
"tool.build.index.670906-5": "复制代码",
|
"tool.build.index.670906-5": "复制代码",
|
||||||
"tool.build.index.670906-6": "清空",
|
"tool.build.index.670906-6": "清空",
|
||||||
"tool.build.index.670906-7": "从左侧拖入或点选组件进行表单设计",
|
"tool.build.index.670906-7": "从左侧拖入或点选组件进行表单设计",
|
||||||
"tool.build.index.670906-8": "成功",
|
"tool.build.index.670906-8": "成功",
|
||||||
"tool.build.index.670906-9": "代码已复制到剪切板,可粘贴。",
|
"tool.build.index.670906-9": "代码已复制到剪切板,可粘贴。",
|
||||||
"tool.build.index.670906-10": "代码复制失败",
|
"tool.build.index.670906-10": "代码复制失败",
|
||||||
"tool.build.index.670906-11": "确定要清空所有组件吗?",
|
"tool.build.index.670906-11": "确定要清空所有组件吗?",
|
||||||
"tool.build.index.670906-12": "提示",
|
"tool.build.index.670906-12": "提示",
|
||||||
"tool.rightPanel.670907-0": "组件属性",
|
"tool.rightPanel.670907-0": "组件属性",
|
||||||
"tool.rightPanel.670907-1": "表单属性",
|
"tool.rightPanel.670907-1": "表单属性",
|
||||||
"tool.rightPanel.670907-2": "查看组件文档",
|
"tool.rightPanel.670907-2": "查看组件文档",
|
||||||
"tool.rightPanel.670907-3": "组件类型",
|
"tool.rightPanel.670907-3": "组件类型",
|
||||||
"tool.rightPanel.670907-4": "请选择组件类型",
|
"tool.rightPanel.670907-4": "请选择组件类型",
|
||||||
"tool.rightPanel.670907-5": "字段名",
|
"tool.rightPanel.670907-5": "字段名",
|
||||||
"tool.rightPanel.670907-6": "请输入字段名(v-model)",
|
"tool.rightPanel.670907-6": "请输入字段名(v-model)",
|
||||||
"tool.rightPanel.670907-7": "组件名",
|
"tool.rightPanel.670907-7": "组件名",
|
||||||
"tool.rightPanel.670907-8": "标题",
|
"tool.rightPanel.670907-8": "标题",
|
||||||
"tool.rightPanel.670907-9": "请输入标题",
|
"tool.rightPanel.670907-9": "请输入标题",
|
||||||
"tool.rightPanel.670907-10": "占位提示",
|
"tool.rightPanel.670907-10": "占位提示",
|
||||||
"tool.rightPanel.670907-11": "请输入占位提示",
|
"tool.rightPanel.670907-11": "请输入占位提示",
|
||||||
"tool.rightPanel.670907-12": "开始占位",
|
"tool.rightPanel.670907-12": "开始占位",
|
||||||
"tool.rightPanel.670907-13": "结束占位",
|
"tool.rightPanel.670907-13": "结束占位",
|
||||||
"tool.rightPanel.670907-14": "表单栅格",
|
"tool.rightPanel.670907-14": "表单栅格",
|
||||||
"tool.rightPanel.670907-15": "栅格间隔",
|
"tool.rightPanel.670907-15": "栅格间隔",
|
||||||
"tool.rightPanel.670907-16": "布局模式",
|
"tool.rightPanel.670907-16": "布局模式",
|
||||||
"tool.rightPanel.670907-17": "水平排列",
|
"tool.rightPanel.670907-17": "水平排列",
|
||||||
"tool.rightPanel.670907-18": "请选择水平排列",
|
"tool.rightPanel.670907-18": "请选择水平排列",
|
||||||
"tool.rightPanel.670907-19": "垂直排列",
|
"tool.rightPanel.670907-19": "垂直排列",
|
||||||
"tool.rightPanel.670907-20": "标签宽度",
|
"tool.rightPanel.670907-20": "标签宽度",
|
||||||
"tool.rightPanel.670907-21": "请输入标签宽度",
|
"tool.rightPanel.670907-21": "请输入标签宽度",
|
||||||
"tool.rightPanel.670907-22": "组件宽度",
|
"tool.rightPanel.670907-22": "组件宽度",
|
||||||
"tool.rightPanel.670907-23": "请输入组件宽度",
|
"tool.rightPanel.670907-23": "请输入组件宽度",
|
||||||
"tool.rightPanel.670907-24": "默认值",
|
"tool.rightPanel.670907-24": "默认值",
|
||||||
"tool.rightPanel.670907-25": "请输入默认值",
|
"tool.rightPanel.670907-25": "请输入默认值",
|
||||||
"tool.rightPanel.670907-26": "至少应选",
|
"tool.rightPanel.670907-26": "至少应选",
|
||||||
"tool.rightPanel.670907-27": "最多可选",
|
"tool.rightPanel.670907-27": "最多可选",
|
||||||
"tool.rightPanel.670907-28": "前缀",
|
"tool.rightPanel.670907-28": "前缀",
|
||||||
"tool.rightPanel.670907-29": "请输入前缀",
|
"tool.rightPanel.670907-29": "请输入前缀",
|
||||||
"tool.rightPanel.670907-30": "后缀",
|
"tool.rightPanel.670907-30": "后缀",
|
||||||
"tool.rightPanel.670907-31": "请输入后缀",
|
"tool.rightPanel.670907-31": "请输入后缀",
|
||||||
"tool.rightPanel.670907-32": "前图标",
|
"tool.rightPanel.670907-32": "前图标",
|
||||||
"tool.rightPanel.670907-33": "请输入前图标名称",
|
"tool.rightPanel.670907-33": "请输入前图标名称",
|
||||||
"tool.rightPanel.670907-34": "选择",
|
"tool.rightPanel.670907-34": "选择",
|
||||||
"tool.rightPanel.670907-35": "后图标",
|
"tool.rightPanel.670907-35": "后图标",
|
||||||
"tool.rightPanel.670907-36": "请输入后图标名称",
|
"tool.rightPanel.670907-36": "请输入后图标名称",
|
||||||
"tool.rightPanel.670907-37": "选项分隔符",
|
"tool.rightPanel.670907-37": "选项分隔符",
|
||||||
"tool.rightPanel.670907-38": "请输入选项分隔符",
|
"tool.rightPanel.670907-38": "请输入选项分隔符",
|
||||||
"tool.rightPanel.670907-39": "最小行数",
|
"tool.rightPanel.670907-39": "最小行数",
|
||||||
"tool.rightPanel.670907-40": "最大行数",
|
"tool.rightPanel.670907-40": "最大行数",
|
||||||
"tool.rightPanel.670907-41": "最小值",
|
"tool.rightPanel.670907-41": "最小值",
|
||||||
"tool.rightPanel.670907-42": "最大值",
|
"tool.rightPanel.670907-42": "最大值",
|
||||||
"tool.rightPanel.670907-43": "步长",
|
"tool.rightPanel.670907-43": "步长",
|
||||||
"tool.rightPanel.670907-44": "精度",
|
"tool.rightPanel.670907-44": "精度",
|
||||||
"tool.rightPanel.670907-45": "按钮位置",
|
"tool.rightPanel.670907-45": "按钮位置",
|
||||||
"tool.rightPanel.670907-46": "默认",
|
"tool.rightPanel.670907-46": "默认",
|
||||||
"tool.rightPanel.670907-47": "右侧",
|
"tool.rightPanel.670907-47": "右侧",
|
||||||
"tool.rightPanel.670907-48": "最多输入",
|
"tool.rightPanel.670907-48": "最多输入",
|
||||||
"tool.rightPanel.670907-49": "个字符",
|
"tool.rightPanel.670907-49": "个字符",
|
||||||
"tool.rightPanel.670907-50": "开启提示",
|
"tool.rightPanel.670907-50": "开启提示",
|
||||||
"tool.rightPanel.670907-51": "请输入开启提示",
|
"tool.rightPanel.670907-51": "请输入开启提示",
|
||||||
"tool.rightPanel.670907-52": "关闭提示",
|
"tool.rightPanel.670907-52": "关闭提示",
|
||||||
"tool.rightPanel.670907-53": "请输入关闭提示",
|
"tool.rightPanel.670907-53": "请输入关闭提示",
|
||||||
"tool.rightPanel.670907-54": "开启值",
|
"tool.rightPanel.670907-54": "开启值",
|
||||||
"tool.rightPanel.670907-55": "请输入开启值",
|
"tool.rightPanel.670907-55": "请输入开启值",
|
||||||
"tool.rightPanel.670907-56": "关闭值",
|
"tool.rightPanel.670907-56": "关闭值",
|
||||||
"tool.rightPanel.670907-57": "请输入关闭值",
|
"tool.rightPanel.670907-57": "请输入关闭值",
|
||||||
"tool.rightPanel.670907-58": "时间类型",
|
"tool.rightPanel.670907-58": "时间类型",
|
||||||
"tool.rightPanel.670907-59": "请选择时间类型",
|
"tool.rightPanel.670907-59": "请选择时间类型",
|
||||||
"tool.rightPanel.670907-60": "文件字段名",
|
"tool.rightPanel.670907-60": "文件字段名",
|
||||||
"tool.rightPanel.670907-61": "请输入上传文件字段名",
|
"tool.rightPanel.670907-61": "请输入上传文件字段名",
|
||||||
"tool.rightPanel.670907-62": "文件类型",
|
"tool.rightPanel.670907-62": "文件类型",
|
||||||
"tool.rightPanel.670907-63": "请选择文件类型",
|
"tool.rightPanel.670907-63": "请选择文件类型",
|
||||||
"tool.rightPanel.670907-64": "图片",
|
"tool.rightPanel.670907-64": "图片",
|
||||||
"tool.rightPanel.670907-65": "视频",
|
"tool.rightPanel.670907-65": "视频",
|
||||||
"tool.rightPanel.670907-66": "音频",
|
"tool.rightPanel.670907-66": "音频",
|
||||||
"tool.rightPanel.670907-67": "文件大小",
|
"tool.rightPanel.670907-67": "文件大小",
|
||||||
"tool.rightPanel.670907-68": "请输入文件大小",
|
"tool.rightPanel.670907-68": "请输入文件大小",
|
||||||
"tool.rightPanel.670907-69": "上传地址",
|
"tool.rightPanel.670907-69": "上传地址",
|
||||||
"tool.rightPanel.670907-70": "请输入上传地址",
|
"tool.rightPanel.670907-70": "请输入上传地址",
|
||||||
"tool.rightPanel.670907-71": "列表类型",
|
"tool.rightPanel.670907-71": "列表类型",
|
||||||
"tool.rightPanel.670907-72": "按钮文字",
|
"tool.rightPanel.670907-72": "按钮文字",
|
||||||
"tool.rightPanel.670907-73": "请输入按钮文字",
|
"tool.rightPanel.670907-73": "请输入按钮文字",
|
||||||
"tool.rightPanel.670907-74": "分隔符",
|
"tool.rightPanel.670907-74": "分隔符",
|
||||||
"tool.rightPanel.670907-75": "请输入分隔符",
|
"tool.rightPanel.670907-75": "请输入分隔符",
|
||||||
"tool.rightPanel.670907-76": "时间段",
|
"tool.rightPanel.670907-76": "时间段",
|
||||||
"tool.rightPanel.670907-77": "请输入时间段",
|
"tool.rightPanel.670907-77": "请输入时间段",
|
||||||
"tool.rightPanel.670907-78": "时间格式",
|
"tool.rightPanel.670907-78": "时间格式",
|
||||||
"tool.rightPanel.670907-79": "请输入时间格式",
|
"tool.rightPanel.670907-79": "请输入时间格式",
|
||||||
"tool.rightPanel.670907-80": "选项",
|
"tool.rightPanel.670907-80": "选项",
|
||||||
"tool.rightPanel.670907-81": "选项名",
|
"tool.rightPanel.670907-81": "选项名",
|
||||||
"tool.rightPanel.670907-82": "选项值",
|
"tool.rightPanel.670907-82": "选项值",
|
||||||
"tool.rightPanel.670907-83": "添加选项",
|
"tool.rightPanel.670907-83": "添加选项",
|
||||||
"tool.rightPanel.670907-84": "数据类型",
|
"tool.rightPanel.670907-84": "数据类型",
|
||||||
"tool.rightPanel.670907-85": "动态数据",
|
"tool.rightPanel.670907-85": "动态数据",
|
||||||
"tool.rightPanel.670907-86": "静态数据",
|
"tool.rightPanel.670907-86": "静态数据",
|
||||||
"tool.rightPanel.670907-87": "标签键名",
|
"tool.rightPanel.670907-87": "标签键名",
|
||||||
"tool.rightPanel.670907-88": "请输入标签键名",
|
"tool.rightPanel.670907-88": "请输入标签键名",
|
||||||
"tool.rightPanel.670907-89": "值键名",
|
"tool.rightPanel.670907-89": "值键名",
|
||||||
"tool.rightPanel.670907-90": "请输入值键名",
|
"tool.rightPanel.670907-90": "请输入值键名",
|
||||||
"tool.rightPanel.670907-91": "子级键名",
|
"tool.rightPanel.670907-91": "子级键名",
|
||||||
"tool.rightPanel.670907-92": "请输入子级键名",
|
"tool.rightPanel.670907-92": "请输入子级键名",
|
||||||
"tool.rightPanel.670907-93": "添加父级",
|
"tool.rightPanel.670907-93": "添加父级",
|
||||||
"tool.rightPanel.670907-94": "选项样式",
|
"tool.rightPanel.670907-94": "选项样式",
|
||||||
"tool.rightPanel.670907-95": "按钮",
|
"tool.rightPanel.670907-95": "按钮",
|
||||||
"tool.rightPanel.670907-96": "开启颜色",
|
"tool.rightPanel.670907-96": "开启颜色",
|
||||||
"tool.rightPanel.670907-97": "关闭颜色",
|
"tool.rightPanel.670907-97": "关闭颜色",
|
||||||
"tool.rightPanel.670907-98": "允许半选",
|
"tool.rightPanel.670907-98": "允许半选",
|
||||||
"tool.rightPanel.670907-99": "辅助文字",
|
"tool.rightPanel.670907-99": "辅助文字",
|
||||||
"tool.rightPanel.670907-100": "显示分数",
|
"tool.rightPanel.670907-100": "显示分数",
|
||||||
"tool.rightPanel.670907-101": "显示间断点",
|
"tool.rightPanel.670907-101": "显示间断点",
|
||||||
"tool.rightPanel.670907-102": "范围选择",
|
"tool.rightPanel.670907-102": "范围选择",
|
||||||
"tool.rightPanel.670907-103": "是否带边框",
|
"tool.rightPanel.670907-103": "是否带边框",
|
||||||
"tool.rightPanel.670907-104": "颜色格式",
|
"tool.rightPanel.670907-104": "颜色格式",
|
||||||
"tool.rightPanel.670907-105": "请选择颜色格式",
|
"tool.rightPanel.670907-105": "请选择颜色格式",
|
||||||
"tool.rightPanel.670907-106": "选项尺寸",
|
"tool.rightPanel.670907-106": "选项尺寸",
|
||||||
"tool.rightPanel.670907-107": "中等",
|
"tool.rightPanel.670907-107": "中等",
|
||||||
"tool.rightPanel.670907-108": "较小",
|
"tool.rightPanel.670907-108": "较小",
|
||||||
"tool.rightPanel.670907-109": "迷你",
|
"tool.rightPanel.670907-109": "迷你",
|
||||||
"tool.rightPanel.670907-110": "输入统计",
|
"tool.rightPanel.670907-110": "输入统计",
|
||||||
"tool.rightPanel.670907-111": "严格步数",
|
"tool.rightPanel.670907-111": "严格步数",
|
||||||
"tool.rightPanel.670907-112": "是否多选",
|
"tool.rightPanel.670907-112": "是否多选",
|
||||||
"tool.rightPanel.670907-113": "展示全路径",
|
"tool.rightPanel.670907-113": "展示全路径",
|
||||||
"tool.rightPanel.670907-114": "可否筛选",
|
"tool.rightPanel.670907-114": "可否筛选",
|
||||||
"tool.rightPanel.670907-115": "能否清空",
|
"tool.rightPanel.670907-115": "能否清空",
|
||||||
"tool.rightPanel.670907-116": "显示提示",
|
"tool.rightPanel.670907-116": "显示提示",
|
||||||
"tool.rightPanel.670907-117": "多选文件",
|
"tool.rightPanel.670907-117": "多选文件",
|
||||||
"tool.rightPanel.670907-118": "自动上传",
|
"tool.rightPanel.670907-118": "自动上传",
|
||||||
"tool.rightPanel.670907-119": "是否只读",
|
"tool.rightPanel.670907-119": "是否只读",
|
||||||
"tool.rightPanel.670907-120": "是否禁用",
|
"tool.rightPanel.670907-120": "是否禁用",
|
||||||
"tool.rightPanel.670907-121": "是否可搜索",
|
"tool.rightPanel.670907-121": "是否可搜索",
|
||||||
"tool.rightPanel.670907-122": "是否必填",
|
"tool.rightPanel.670907-122": "是否必填",
|
||||||
"tool.rightPanel.670907-123": "布局结构树",
|
"tool.rightPanel.670907-123": "布局结构树",
|
||||||
"tool.rightPanel.670907-124": "正则校验",
|
"tool.rightPanel.670907-124": "正则校验",
|
||||||
"tool.rightPanel.670907-125": "表达式",
|
"tool.rightPanel.670907-125": "表达式",
|
||||||
"tool.rightPanel.670907-126": "请输入正则",
|
"tool.rightPanel.670907-126": "请输入正则",
|
||||||
"tool.rightPanel.670907-127": "错误提示",
|
"tool.rightPanel.670907-127": "错误提示",
|
||||||
"tool.rightPanel.670907-128": "请输入错误提示",
|
"tool.rightPanel.670907-128": "请输入错误提示",
|
||||||
"tool.rightPanel.670907-129": "添加规则",
|
"tool.rightPanel.670907-129": "添加规则",
|
||||||
"tool.rightPanel.670907-130": "表单名",
|
"tool.rightPanel.670907-130": "表单名",
|
||||||
"tool.rightPanel.670907-131": "请输入表单名(ref)",
|
"tool.rightPanel.670907-131": "请输入表单名(ref)",
|
||||||
"tool.rightPanel.670907-132": "表单模型",
|
"tool.rightPanel.670907-132": "表单模型",
|
||||||
"tool.rightPanel.670907-133": "请输入数据模型",
|
"tool.rightPanel.670907-133": "请输入数据模型",
|
||||||
"tool.rightPanel.670907-134": "校验模型",
|
"tool.rightPanel.670907-134": "校验模型",
|
||||||
"tool.rightPanel.670907-135": "请输入校验模型",
|
"tool.rightPanel.670907-135": "请输入校验模型",
|
||||||
"tool.rightPanel.670907-136": "表单尺寸",
|
"tool.rightPanel.670907-136": "表单尺寸",
|
||||||
"tool.rightPanel.670907-137": "标签对齐",
|
"tool.rightPanel.670907-137": "标签对齐",
|
||||||
"tool.rightPanel.670907-138": "左对齐",
|
"tool.rightPanel.670907-138": "左对齐",
|
||||||
"tool.rightPanel.670907-139": "右对齐",
|
"tool.rightPanel.670907-139": "右对齐",
|
||||||
"tool.rightPanel.670907-140": "顶部对齐",
|
"tool.rightPanel.670907-140": "顶部对齐",
|
||||||
"tool.rightPanel.670907-141": "禁用表单",
|
"tool.rightPanel.670907-141": "禁用表单",
|
||||||
"tool.rightPanel.670907-142": "表单按钮",
|
"tool.rightPanel.670907-142": "表单按钮",
|
||||||
"tool.rightPanel.670907-143": "显示未选中组件边框",
|
"tool.rightPanel.670907-143": "显示未选中组件边框",
|
||||||
"tool.rightPanel.670907-144": "添加选项",
|
"tool.rightPanel.670907-144": "添加选项",
|
||||||
"tool.treeNode.670908-0": "选项名",
|
"tool.treeNode.670908-0": "选项名",
|
||||||
"tool.treeNode.670908-1": "请输入选项名",
|
"tool.treeNode.670908-1": "请输入选项名",
|
||||||
"tool.treeNode.670908-2": "选项值",
|
"tool.treeNode.670908-2": "选项值",
|
||||||
"tool.treeNode.670908-3": "请输入选项值",
|
"tool.treeNode.670908-3": "请输入选项值",
|
||||||
"tool.treeNode.670908-4": "字符串",
|
"tool.treeNode.670908-4": "字符串",
|
||||||
"tool.treeNode.670908-5": "数字",
|
"tool.treeNode.670908-5": "数字",
|
||||||
"tool.treeNode.670908-6": "确定",
|
"tool.treeNode.670908-6": "确定",
|
||||||
"tool.treeNode.670908-7": "取消",
|
"tool.treeNode.670908-7": "取消",
|
||||||
"tool.icons.670909-0": "选择图标",
|
"tool.icons.670909-0": "选择图标",
|
||||||
"tool.icons.670909-1": "请输入图标名称",
|
"tool.icons.670909-1": "请输入图标名称",
|
||||||
"tool.build.index.670906-13": "复制",
|
"tool.build.index.670906-13": "复制",
|
||||||
"tool.build.index.670906-14": "删除",
|
"tool.build.index.670906-14": "删除",
|
||||||
"tool.codeType.670910-0": "生成类型",
|
"tool.build.index.670906-15": "没有与",
|
||||||
"tool.codeType.670910-1": "文件名",
|
"tool.build.index.670906-16": "相关的组件",
|
||||||
"tool.codeType.670910-2": "请输入文件名",
|
"tool.codeType.670910-0": "生成类型",
|
||||||
"tool.codeType.670910-3": "页面",
|
"tool.codeType.670910-1": "文件名",
|
||||||
"tool.codeType.670910-4": "弹窗",
|
"tool.codeType.670910-2": "请输入文件名",
|
||||||
"tool.codeType.670910-5": "生成类型不能为空"
|
"tool.codeType.670910-3": "页面",
|
||||||
|
"tool.codeType.670910-4": "弹窗",
|
||||||
|
"tool.codeType.670910-5": "生成类型不能为空"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-row :gutter="20" style="margin-bottom: 16px">
|
<el-row :gutter="20" style="margin-bottom: 16px">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-select v-model="channelId" placeholder="请选择通道" @change="changeChannel()">
|
<el-select v-model="channelId" :placeholder="$t('views.components.player.deviceLiveStream.48750-1')" @change="changeChannel()">
|
||||||
<el-option v-for="option in channelList" :key="option.value" :label="option.label" :value="option.value"></el-option>
|
<el-option v-for="option in channelList" :key="option.value" :label="option.label" :value="option.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5" style="line-height: 36px">
|
<el-col :span="1.5" style="line-height: 36px">
|
||||||
<span style="font-size: 14px">开启拉流:</span>
|
<span style="font-size: 14px">{{ $t('views.components.player.deviceLiveStream.48750-2') }}</span>
|
||||||
<el-switch v-model="pushStream" :disabled="channelId === ''" @change="startPushStream"></el-switch>
|
<el-switch v-model="pushStream" :disabled="channelId === ''" @change="startPushStream"></el-switch>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -127,14 +127,14 @@ export default {
|
|||||||
this.$refs.player.registercallback('loadingTimeout', this.TimeoutCallback);
|
this.$refs.player.registercallback('loadingTimeout', this.TimeoutCallback);
|
||||||
this.$refs.player.registercallback('delayTimeout', this.TimeoutCallback);
|
this.$refs.player.registercallback('delayTimeout', this.TimeoutCallback);
|
||||||
startPlay(this.deviceId, this.channelId).then((response) => {
|
startPlay(this.deviceId, this.channelId).then((response) => {
|
||||||
console.log('开始推流: [' + this.channelId + ']');
|
console.log('开始推流: [' + this.channelId + ']');
|
||||||
const res = response.data;
|
const res = response.data;
|
||||||
this.streamId = res.streamId;
|
this.streamId = res.streamId;
|
||||||
this.playurl = res.playurl;
|
this.playurl = res.playurl;
|
||||||
this.$refs.player.play(this.playurl);
|
this.$refs.player.play(this.playurl);
|
||||||
this.playing = true;
|
this.playing = true;
|
||||||
this.pushStream = true;
|
this.pushStream = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
closeStream(force) {
|
closeStream(force) {
|
||||||
if (force) {
|
if (force) {
|
||||||
|
|||||||
@@ -206,12 +206,12 @@
|
|||||||
Copyright © 2021-2022
|
Copyright © 2021-2022
|
||||||
<a href="https://fastbee.cn/" target="_blank">FastBee</a>
|
<a href="https://fastbee.cn/" target="_blank">FastBee</a>
|
||||||
|
|
|
|
||||||
<a href="https://fastbee.cn/" target="_blank">蜂信物联</a>
|
<a href="https://fastbee.cn/" target="_blank">{{ $t('home.fengxinIoT') }}</a>
|
||||||
| Apache License
|
| Apache License
|
||||||
</span>
|
</span>
|
||||||
<br />
|
<br />
|
||||||
<span>
|
<span>
|
||||||
项目文档
|
{{ $t('home.projectDocs') }}
|
||||||
<a href="https://fastbee.cn/doc/" target="_blank">https://fastbee.cn/doc/</a>
|
<a href="https://fastbee.cn/doc/" target="_blank">https://fastbee.cn/doc/</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -45,8 +45,8 @@
|
|||||||
<span>{{ scope.row.createTime }}</span>
|
<span>{{ scope.row.createTime }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="标识符" align="center" prop="identify" />
|
<el-table-column :label="$t('device.device-log.798283-2')" align="center" prop="identify" />
|
||||||
<el-table-column label="动作" align="left" header-align="center" prop="logValue">
|
<el-table-column :label="$t('device.device-log.798283-15')" align="left" header-align="center" prop="logValue">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-html="formatValueDisplay(scope.row)"></div>
|
<div v-html="formatValueDisplay(scope.row)"></div>
|
||||||
</template>
|
</template>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<el-table-column :label="$t('device.device-log.798283-16')" header-align="center" align="left" prop="remark">
|
<el-table-column :label="$t('device.device-log.798283-16')" header-align="center" align="left" prop="remark">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.remark == null ? '无' : scope.row.remark }}
|
{{ scope.row.remark == null ? $t('device.device-log.798283-17') : scope.row.remark }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
@@ -1,296 +1,302 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="padding-left: 20px">
|
<div style="padding-left: 20px">
|
||||||
<el-form :inline="true" label-width="100px">
|
<el-form :inline="true" label-width="100px">
|
||||||
<el-form-item :label="$t('device.device-monitor.817489-0') + '(ms)'">
|
<el-form-item :label="$t('device.device-monitor.817489-0') + '(ms)'">
|
||||||
<el-tooltip class="item" effect="light" :content="$t('device.device-monitor.817489-1')" placement="top">
|
<el-tooltip class="item" effect="light" :content="$t('device.device-monitor.817489-1')" placement="top">
|
||||||
<el-input v-model="monitorInterval" :placeholder="$t('device.device-monitor.817489-2')" type="number" clearable size="small" style="width: 180px" />
|
<el-input v-model="monitorInterval" :placeholder="$t('device.device-monitor.817489-2')" type="number" clearable size="small" style="width: 180px" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('device.device-monitor.817489-3')">
|
<el-form-item :label="$t('device.device-monitor.817489-3')">
|
||||||
<el-tooltip class="item" effect="light" :content="$t('device.device-monitor.817489-4')" placement="top">
|
<el-tooltip class="item" effect="light" :content="$t('device.device-monitor.817489-4')" placement="top">
|
||||||
<el-input v-model="monitorNumber" :placeholder="$t('device.device-monitor.817489-5')" type="number" clearable size="small" style="width: 180px" />
|
<el-input v-model="monitorNumber" :placeholder="$t('device.device-monitor.817489-5')" type="number" clearable size="small" style="width: 180px" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="success" icon="el-icon-video-play" size="mini" @click="beginMonitor()" style="margin-left: 30px">{{ $t('device.device-monitor.817489-6') }}</el-button>
|
<el-button type="success" icon="el-icon-video-play" size="mini" @click="beginMonitor()" style="margin-left: 30px">{{ $t('device.device-monitor.817489-6') }}</el-button>
|
||||||
<el-button type="danger" icon="el-icon-video-pause" size="mini" @click="stopMonitor()">{{ $t('device.device-monitor.817489-7') }}</el-button>
|
<el-button type="danger" icon="el-icon-video-pause" size="mini" @click="stopMonitor()">{{ $t('device.device-monitor.817489-7') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row :gutter="20" v-loading="chartLoading" :element-loading-text="$t('device.device-monitor.817489-8')" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
|
<el-row :gutter="20" v-loading="chartLoading" :element-loading-text="$t('device.device-monitor.817489-8')" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
|
||||||
<el-col :span="12" v-for="(item, index) in monitorThings" :key="index" style="margin-bottom: 20px">
|
<el-col :span="12" v-for="(item, index) in monitorThings" :key="index" style="margin-bottom: 20px">
|
||||||
<el-card shadow="hover" :body-style="{ paddingTop: '10px', marginBottom: '-20px' }">
|
<el-card shadow="hover" :body-style="{ paddingTop: '10px', marginBottom: '-20px' }">
|
||||||
<div ref="monitor" style="height: 210px; padding: 0"></div>
|
<div ref="monitor" style="height: 210px; padding: 0"></div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'DeviceMonitor',
|
name: 'DeviceMonitor',
|
||||||
props: {
|
props: {
|
||||||
device: {
|
device: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null,
|
default: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
watch: {
|
||||||
watch: {
|
// 获取到父组件传递的device后,刷新列表
|
||||||
// 获取到父组件传递的device后,刷新列表
|
device: function (newVal, oldVal) {
|
||||||
device: function (newVal, oldVal) {
|
this.deviceInfo = newVal;
|
||||||
this.deviceInfo = newVal;
|
if (this.deviceInfo && this.deviceInfo.deviceId != 0) {
|
||||||
if (this.deviceInfo && this.deviceInfo.deviceId != 0) {
|
// 监测数据
|
||||||
// 监测数据
|
this.monitorThings = this.deviceInfo.monitorList;
|
||||||
this.monitorThings = this.deviceInfo.monitorList;
|
// 监测数据集合初始化
|
||||||
// 监测数据集合初始化
|
this.dataList = [];
|
||||||
this.dataList = [];
|
for (let i = 0; i < this.monitorThings.length; i++) {
|
||||||
for (let i = 0; i < this.monitorThings.length; i++) {
|
this.dataList.push({
|
||||||
this.dataList.push({
|
id: this.monitorThings[i].id,
|
||||||
id: this.monitorThings[i].id,
|
name: this.monitorThings[i].name,
|
||||||
name: this.monitorThings[i].name,
|
data: [],
|
||||||
data: [],
|
});
|
||||||
});
|
// this.dataList[i].data.push(["2022-03-14 23:32:09", "30"]);
|
||||||
// this.dataList[i].data.push(["2022-03-14 23:32:09", "30"]);
|
|
||||||
}
|
|
||||||
// 绘制监测图表
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.getMonitorChart();
|
|
||||||
});
|
|
||||||
this.mqttCallback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 实时监测间隔
|
|
||||||
monitorInterval: 1000,
|
|
||||||
// 实时监测次数
|
|
||||||
monitorNumber: 60,
|
|
||||||
// 图表集合
|
|
||||||
chart: [],
|
|
||||||
// 图表数据集合
|
|
||||||
dataList: [],
|
|
||||||
// 监测物模型
|
|
||||||
monitorThings: [],
|
|
||||||
// 图表遮罩层
|
|
||||||
chartLoading: false,
|
|
||||||
// 设备信息
|
|
||||||
deviceInfo: {},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
methods: {
|
|
||||||
/**
|
|
||||||
* Mqtt发布消息
|
|
||||||
* @device 设备
|
|
||||||
* @model 物模型 ,type 类型(1=属性,2=功能,3=OTA升级(商业版支持),4=实时监测)
|
|
||||||
* */
|
|
||||||
mqttPublish(device, model) {
|
|
||||||
let topic = '';
|
|
||||||
let message = '';
|
|
||||||
if (model.type == 4) {
|
|
||||||
// 实时监测
|
|
||||||
topic = '/' + device.productId + '/' + device.serialNumber + '/monitor/get';
|
|
||||||
message = '{"count":' + model.value + ',"interval":' + this.monitorInterval + '}';
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (topic != '') {
|
|
||||||
// 发布
|
|
||||||
this.$mqttTool
|
|
||||||
.publish(topic, message, model.name)
|
|
||||||
.then((res) => {
|
|
||||||
this.$modal.notifySuccess(res);
|
|
||||||
})
|
|
||||||
.catch((res) => {
|
|
||||||
this.$modal.notifyError(res);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/* Mqtt回调处理 */
|
|
||||||
mqttCallback() {
|
|
||||||
this.$mqttTool.client.on('message', (topic, message, buffer) => {
|
|
||||||
let topics = topic.split('/');
|
|
||||||
let productId = topics[1];
|
|
||||||
let deviceNum = topics[2];
|
|
||||||
message = JSON.parse(message.toString());
|
|
||||||
if (!message) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (topics[3] == 'status') {
|
|
||||||
console.log('接收到【设备状态】主题:', topic);
|
|
||||||
console.log('接收到【设备状态】内容:', message);
|
|
||||||
// 更新列表中设备的状态
|
|
||||||
if (this.deviceInfo.serialNumber == deviceNum) {
|
|
||||||
this.deviceInfo.status = message.status;
|
|
||||||
this.deviceInfo.isShadow = message.isShadow;
|
|
||||||
this.deviceInfo.rssi = message.rssi;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (topics[3] == 'monitor') {
|
|
||||||
console.log(this.$t('device.device-monitor.817489-11'), topic);
|
|
||||||
console.log(this.$t('device.device-monitor.817489-12'), message);
|
|
||||||
// 实时监测
|
|
||||||
this.chartLoading = false;
|
|
||||||
for (let k = 0; k < message.length; k++) {
|
|
||||||
let value = message[k].value;
|
|
||||||
let id = message[k].id;
|
|
||||||
let remark = message[k].remark;
|
|
||||||
// 数据加载到图表
|
|
||||||
for (let i = 0; i < this.dataList.length; i++) {
|
|
||||||
if (id == this.dataList[i].id) {
|
|
||||||
// 普通类型匹配
|
|
||||||
if (this.dataList[i].length > 50) {
|
|
||||||
this.dataList[i].shift();
|
|
||||||
}
|
}
|
||||||
this.dataList[i].data.push([this.getTime(), value]);
|
// 绘制监测图表
|
||||||
// 更新图表
|
this.$nextTick(function () {
|
||||||
this.chart[i].setOption({
|
this.getMonitorChart();
|
||||||
series: [
|
|
||||||
{
|
|
||||||
data: this.dataList[i].data,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
break;
|
this.mqttCallback();
|
||||||
} else if (this.dataList[i].id.indexOf('array_') == 0) {
|
|
||||||
// 数组类型匹配,例如:gateway_temperature,图表id去除前缀后匹配
|
|
||||||
let index = this.dataList[i].id.substring(6, 8);
|
|
||||||
let identity = this.dataList[i].id.substring(9);
|
|
||||||
if (identity == id) {
|
|
||||||
let values = value.split(',');
|
|
||||||
if (this.dataList[i].length > 50) {
|
|
||||||
this.dataList[i].shift();
|
|
||||||
}
|
|
||||||
this.dataList[i].data.push([this.getTime(), values[index]]);
|
|
||||||
// 更新图表
|
|
||||||
this.chart[i].setOption({
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
data: this.dataList[i].data,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 更新实时监测参数*/
|
data() {
|
||||||
beginMonitor() {
|
return {
|
||||||
if (this.deviceInfo.status != 3) {
|
// 实时监测间隔
|
||||||
this.$modal.alertError('设备不在线,下发指令失败');
|
monitorInterval: 1000,
|
||||||
return;
|
// 实时监测次数
|
||||||
}
|
monitorNumber: 60,
|
||||||
// 清空图表数据
|
// 图表集合
|
||||||
for (let i = 0; i < this.dataList.length; i++) {
|
chart: [],
|
||||||
this.dataList[i].data = [];
|
// 图表数据集合
|
||||||
}
|
dataList: [],
|
||||||
if (this.monitorInterval < 500 || this.monitorInterval > 10000) {
|
// 监测物模型
|
||||||
this.$modal.alertError(this.$t('device.device-monitor.817489-14'));
|
monitorThings: [],
|
||||||
}
|
// 图表遮罩层
|
||||||
if (this.monitorNumber == 0 || this.monitorNumber > 300) {
|
chartLoading: false,
|
||||||
this.$modal.alertError(this.$t('device.device-monitor.817489-15'));
|
// 设备信息
|
||||||
}
|
deviceInfo: {},
|
||||||
// Mqtt发布实时监测消息
|
|
||||||
let model = {};
|
|
||||||
model.name = '更新实时监测';
|
|
||||||
model.value = this.monitorNumber;
|
|
||||||
model.type = 4;
|
|
||||||
this.mqttPublish(this.deviceInfo, model);
|
|
||||||
this.chartLoading = true;
|
|
||||||
},
|
|
||||||
/** 停止实时监测 */
|
|
||||||
stopMonitor() {
|
|
||||||
if (this.deviceInfo.status != 3) {
|
|
||||||
this.$modal.alertError('设备不在线,下发指令失败');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.chartLoading = false;
|
|
||||||
// Mqtt发布实时监测
|
|
||||||
let model = {};
|
|
||||||
model.name = this.$t('device.device-monitor.817489-17');
|
|
||||||
model.value = 0;
|
|
||||||
model.type = 4;
|
|
||||||
this.mqttPublish(this.deviceInfo, model);
|
|
||||||
},
|
|
||||||
/**监测数据 */
|
|
||||||
getMonitorChart() {
|
|
||||||
let color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
|
||||||
for (let i = 0; i < this.monitorThings.length; i++) {
|
|
||||||
// 设置宽度
|
|
||||||
this.$refs.monitor[i].style.width = document.documentElement.clientWidth / 2 - 255 + 'px';
|
|
||||||
this.chart[i] = this.$echarts.init(this.$refs.monitor[i]);
|
|
||||||
var option;
|
|
||||||
option = {
|
|
||||||
title: {
|
|
||||||
left: 'center',
|
|
||||||
text: this.monitorThings[i].name + ' ' + this.$t('device.device-monitor.817489-18') + ' ' + (this.monitorThings[i].datatype.unit != undefined ? this.monitorThings[i].datatype.unit : this.$t('device.device-monitor.817489-19')) + ')',
|
|
||||||
textStyle: {
|
|
||||||
fontSize: 14,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
top: '50px',
|
|
||||||
left: '20px',
|
|
||||||
right: '20px',
|
|
||||||
bottom: '10px',
|
|
||||||
containLabel: true,
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
animation: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'time',
|
|
||||||
show: false,
|
|
||||||
splitLine: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
boundaryGap: [0, '100%'],
|
|
||||||
splitLine: {
|
|
||||||
show: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: this.monitorThings[i].name,
|
|
||||||
type: 'line',
|
|
||||||
symbol: 'none',
|
|
||||||
sampling: 'lttb',
|
|
||||||
itemStyle: {
|
|
||||||
color: i > 9 ? color[0] : color[i],
|
|
||||||
},
|
|
||||||
areaStyle: {},
|
|
||||||
data: [],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
option && this.chart[i].setOption(option);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/* 获取当前时间*/
|
created() {},
|
||||||
getTime() {
|
methods: {
|
||||||
let date = new Date();
|
/**
|
||||||
let y = date.getFullYear();
|
* Mqtt发布消息
|
||||||
let m = date.getMonth() + 1;
|
* @device 设备
|
||||||
let d = date.getDate();
|
* @model 物模型 ,type 类型(1=属性,2=功能,3=OTA升级(商业版支持),4=实时监测)
|
||||||
let H = date.getHours();
|
* */
|
||||||
let mm = date.getMinutes();
|
mqttPublish(device, model) {
|
||||||
let s = date.getSeconds();
|
let topic = '';
|
||||||
m = m < 10 ? '0' + m : m;
|
let message = '';
|
||||||
d = d < 10 ? '0' + d : d;
|
if (model.type == 4) {
|
||||||
H = H < 10 ? '0' + H : H;
|
// 实时监测
|
||||||
return y + '-' + m + '-' + d + ' ' + H + ':' + mm + ':' + s;
|
topic = '/' + device.productId + '/' + device.serialNumber + '/monitor/get';
|
||||||
|
message = '{"count":' + model.value + ',"interval":' + this.monitorInterval + '}';
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (topic != '') {
|
||||||
|
// 发布
|
||||||
|
this.$mqttTool
|
||||||
|
.publish(topic, message, model.name)
|
||||||
|
.then((res) => {
|
||||||
|
this.$modal.notifySuccess(res);
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
this.$modal.notifyError(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* Mqtt回调处理 */
|
||||||
|
mqttCallback() {
|
||||||
|
this.$mqttTool.client.on('message', (topic, message, buffer) => {
|
||||||
|
let topics = topic.split('/');
|
||||||
|
let productId = topics[1];
|
||||||
|
let deviceNum = topics[2];
|
||||||
|
message = JSON.parse(message.toString());
|
||||||
|
if (!message) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (topics[3] == 'status') {
|
||||||
|
console.log('接收到【设备状态】主题:', topic);
|
||||||
|
console.log('接收到【设备状态】内容:', message);
|
||||||
|
// 更新列表中设备的状态
|
||||||
|
if (this.deviceInfo.serialNumber == deviceNum) {
|
||||||
|
this.deviceInfo.status = message.status;
|
||||||
|
this.deviceInfo.isShadow = message.isShadow;
|
||||||
|
this.deviceInfo.rssi = message.rssi;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (topics[3] == 'monitor') {
|
||||||
|
console.log(this.$t('device.device-monitor.817489-11'), topic);
|
||||||
|
console.log(this.$t('device.device-monitor.817489-12'), message);
|
||||||
|
// 实时监测
|
||||||
|
this.chartLoading = false;
|
||||||
|
for (let k = 0; k < message.length; k++) {
|
||||||
|
let value = message[k].value;
|
||||||
|
let id = message[k].id;
|
||||||
|
let remark = message[k].remark;
|
||||||
|
// 数据加载到图表
|
||||||
|
for (let i = 0; i < this.dataList.length; i++) {
|
||||||
|
if (id == this.dataList[i].id) {
|
||||||
|
// 普通类型匹配
|
||||||
|
if (this.dataList[i].length > 50) {
|
||||||
|
this.dataList[i].shift();
|
||||||
|
}
|
||||||
|
this.dataList[i].data.push([this.getTime(), value]);
|
||||||
|
// 更新图表
|
||||||
|
this.chart[i].setOption({
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: this.dataList[i].data,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
} else if (this.dataList[i].id.indexOf('array_') == 0) {
|
||||||
|
// 数组类型匹配,例如:gateway_temperature,图表id去除前缀后匹配
|
||||||
|
let index = this.dataList[i].id.substring(6, 8);
|
||||||
|
let identity = this.dataList[i].id.substring(9);
|
||||||
|
if (identity == id) {
|
||||||
|
let values = value.split(',');
|
||||||
|
if (this.dataList[i].length > 50) {
|
||||||
|
this.dataList[i].shift();
|
||||||
|
}
|
||||||
|
this.dataList[i].data.push([this.getTime(), values[index]]);
|
||||||
|
// 更新图表
|
||||||
|
this.chart[i].setOption({
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: this.dataList[i].data,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 更新实时监测参数*/
|
||||||
|
beginMonitor() {
|
||||||
|
if (this.deviceInfo.status != 3) {
|
||||||
|
this.$modal.alertError(this.$t('device.device-monitor.817489-13'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 清空图表数据
|
||||||
|
for (let i = 0; i < this.dataList.length; i++) {
|
||||||
|
this.dataList[i].data = [];
|
||||||
|
}
|
||||||
|
if (this.monitorInterval < 500 || this.monitorInterval > 10000) {
|
||||||
|
this.$modal.alertError(this.$t('device.device-monitor.817489-14'));
|
||||||
|
}
|
||||||
|
if (this.monitorNumber == 0 || this.monitorNumber > 300) {
|
||||||
|
this.$modal.alertError(this.$t('device.device-monitor.817489-15'));
|
||||||
|
}
|
||||||
|
// Mqtt发布实时监测消息
|
||||||
|
let model = {};
|
||||||
|
model.name = this.$t('device.device-monitor.817489-16');
|
||||||
|
model.value = this.monitorNumber;
|
||||||
|
model.type = 4;
|
||||||
|
this.mqttPublish(this.deviceInfo, model);
|
||||||
|
this.chartLoading = true;
|
||||||
|
},
|
||||||
|
/** 停止实时监测 */
|
||||||
|
stopMonitor() {
|
||||||
|
if (this.deviceInfo.status != 3) {
|
||||||
|
this.$modal.alertError(this.$t('device.device-monitor.817489-13'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.chartLoading = false;
|
||||||
|
// Mqtt发布实时监测
|
||||||
|
let model = {};
|
||||||
|
model.name = this.$t('device.device-monitor.817489-17');
|
||||||
|
model.value = 0;
|
||||||
|
model.type = 4;
|
||||||
|
this.mqttPublish(this.deviceInfo, model);
|
||||||
|
},
|
||||||
|
/**监测数据 */
|
||||||
|
getMonitorChart() {
|
||||||
|
let color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
||||||
|
for (let i = 0; i < this.monitorThings.length; i++) {
|
||||||
|
// 设置宽度
|
||||||
|
this.$refs.monitor[i].style.width = document.documentElement.clientWidth / 2 - 255 + 'px';
|
||||||
|
this.chart[i] = this.$echarts.init(this.$refs.monitor[i]);
|
||||||
|
var option;
|
||||||
|
option = {
|
||||||
|
title: {
|
||||||
|
left: 'center',
|
||||||
|
text:
|
||||||
|
this.monitorThings[i].name +
|
||||||
|
' ' +
|
||||||
|
this.$t('device.device-monitor.817489-18') +
|
||||||
|
' ' +
|
||||||
|
(this.monitorThings[i].datatype.unit != undefined ? this.monitorThings[i].datatype.unit : this.$t('device.device-monitor.817489-19')) +
|
||||||
|
')',
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: '50px',
|
||||||
|
left: '20px',
|
||||||
|
right: '20px',
|
||||||
|
bottom: '10px',
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
animation: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'time',
|
||||||
|
show: false,
|
||||||
|
splitLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
boundaryGap: [0, '100%'],
|
||||||
|
splitLine: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: this.monitorThings[i].name,
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'none',
|
||||||
|
sampling: 'lttb',
|
||||||
|
itemStyle: {
|
||||||
|
color: i > 9 ? color[0] : color[i],
|
||||||
|
},
|
||||||
|
areaStyle: {},
|
||||||
|
data: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
option && this.chart[i].setOption(option);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 获取当前时间*/
|
||||||
|
getTime() {
|
||||||
|
let date = new Date();
|
||||||
|
let y = date.getFullYear();
|
||||||
|
let m = date.getMonth() + 1;
|
||||||
|
let d = date.getDate();
|
||||||
|
let H = date.getHours();
|
||||||
|
let mm = date.getMinutes();
|
||||||
|
let s = date.getSeconds();
|
||||||
|
m = m < 10 ? '0' + m : m;
|
||||||
|
d = d < 10 ? '0' + d : d;
|
||||||
|
H = H < 10 ? '0' + H : H;
|
||||||
|
return y + '-' + m + '-' + d + ' ' + H + ':' + mm + ':' + s;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,86 +1,98 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="padding-left: 20px">
|
<div style="padding-left: 20px">
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="el-icon-share" size="mini" @click="shareDevice" v-hasPermi="['iot:device:share']">{{ $t('device.device-edit.148398-48') }}</el-button>
|
<el-button type="primary" plain icon="el-icon-share" size="mini" @click="shareDevice" v-hasPermi="['iot:device:share']">{{ $t('device.device-edit.148398-48') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="el-icon-refresh" size="mini" @click="getList">{{ $t('device.device-user.037521-0') }}</el-button>
|
<el-button type="warning" plain icon="el-icon-refresh" size="mini" @click="getList">{{ $t('device.device-user.037521-0') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="deviceUserList" @selection-change="handleSelectionChange" size="mini">
|
<el-table v-loading="loading" :data="deviceUserList" @selection-change="handleSelectionChange" size="mini">
|
||||||
<el-table-column :label="$t('device.device-user.037521-1')" align="center" prop="userId" width="100" />
|
<el-table-column :label="$t('device.device-user.037521-1')" align="center" prop="userId" width="100" />
|
||||||
<el-table-column :label="$t('device.device-user.037521-2')" align="center" prop="userName" />
|
<el-table-column :label="$t('device.device-user.037521-2')" align="center" prop="userName" />
|
||||||
<el-table-column :label="$t('device.device-user.037521-3')" align="center" prop="phonenumber" width="150" />
|
<el-table-column :label="$t('device.device-user.037521-3')" align="center" prop="phonenumber" width="150" />
|
||||||
<el-table-column :label="$t('device.device-user.037521-4')" align="center" prop="isOwner" width="150">
|
<el-table-column :label="$t('device.device-user.037521-4')" align="center" prop="isOwner" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag type="primary" v-if="scope.row.isOwner">{{ $t('device.device-user.037521-5') }}</el-tag>
|
<el-tag type="primary" v-if="scope.row.isOwner">{{ $t('device.device-user.037521-5') }}</el-tag>
|
||||||
<el-tag type="success" v-else>{{ $t('device.device-user.037521-6') }}</el-tag>
|
<el-tag type="success" v-else>{{ $t('device.device-user.037521-6') }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('device.device-user.037521-7')" align="center" prop="createTime" width="150">
|
<el-table-column :label="$t('device.device-user.037521-7')" align="center" prop="createTime" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('device.device-user.037521-8')" align="left" prop="remark" header-align="center" min-width="150" />
|
<el-table-column :label="$t('device.device-user.037521-8')" align="left" prop="remark" header-align="center" min-width="150" />
|
||||||
<el-table-column :label="$t('device.index.105953-34')" align="center" class-name="small-padding fixed-width" width="180">
|
<el-table-column :label="$t('device.index.105953-34')" align="center" class-name="small-padding fixed-width" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:device:share']" v-if="scope.row.isOwner == 0">{{ $t('edit') }}</el-button>
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:device:share']" v-if="scope.row.isOwner == 0">{{ $t('edit') }}</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:device:share']" v-if="scope.row.isOwner == 0">{{ $t('device.device-user.037521-11') }}</el-button>
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:device:share']" v-if="scope.row.isOwner == 0">
|
||||||
</template>
|
{{ $t('device.device-user.037521-11') }}
|
||||||
</el-table-column>
|
</el-button>
|
||||||
</el-table>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
<!--设备分享对话框-->
|
<!--设备分享对话框-->
|
||||||
<el-dialog :title="$t('device.device-user.037521-12')" :visible.sync="open" width="800px">
|
<el-dialog :title="$t('device.device-user.037521-12')" :visible.sync="open" width="800px">
|
||||||
<div style="margin-top: -50px">
|
<div style="margin-top: -50px">
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
</div>
|
</div>
|
||||||
<!--用户查询-->
|
<!--用户查询-->
|
||||||
<el-form :model="permParams" ref="queryForm" :rules="rules" :inline="true" label-width="80px" v-if="type == 1">
|
<el-form :model="permParams" ref="queryForm" :rules="rules" :inline="true" label-width="80px" v-if="type == 1">
|
||||||
<el-form-item :label="$t('device.device-user.037521-3')" prop="phonenumber">
|
<el-form-item :label="$t('device.device-user.037521-3')" prop="phonenumber">
|
||||||
<el-input type="text" :placeholder="$t('device.device-user.037521-13')" v-model="permParams.phonenumber" minlength="10" clearable size="small" show-word-limit style="width: 240px" @keyup.enter.native="handleQuery"></el-input>
|
<el-input
|
||||||
</el-form-item>
|
type="text"
|
||||||
<el-form-item>
|
:placeholder="$t('device.device-user.037521-13')"
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="userQuery">{{ $t('device.device-user.037521-14') }}</el-button>
|
v-model="permParams.phonenumber"
|
||||||
</el-form-item>
|
minlength="10"
|
||||||
</el-form>
|
clearable
|
||||||
|
size="small"
|
||||||
|
show-word-limit
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="userQuery">{{ $t('device.device-user.037521-14') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
<!--用户信息和权限设置-->
|
<!--用户信息和权限设置-->
|
||||||
<div v-loading="permsLoading" style="background-color: #f8f8f9; line-height: 28px">
|
<div v-loading="permsLoading" style="background-color: #f8f8f9; line-height: 28px">
|
||||||
<div v-if="message" style="padding: 20px">{{ message }}</div>
|
<div v-if="message" style="padding: 20px">{{ message }}</div>
|
||||||
<div v-if="form.userId" style="padding: 15px">
|
<div v-if="form.userId" style="padding: 15px">
|
||||||
<div style="font-weight: bold; line-height: 28px">{{ $t('device.device-user.037521-15') }}</div>
|
<div style="font-weight: bold; line-height: 28px">{{ $t('device.device-user.037521-15') }}</div>
|
||||||
<span style="width: 80px; display: inline-block">{{ $t('device.device-user.037521-16') }}</span>
|
<span style="width: 80px; display: inline-block">{{ $t('device.device-user.037521-16') }}</span>
|
||||||
<span>{{ form.userId }}</span>
|
<span>{{ form.userId }}</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="width: 80px; display: inline-block">{{ $t('device.device-user.037521-17') }}</span>
|
<span style="width: 80px; display: inline-block">{{ $t('device.device-user.037521-17') }}</span>
|
||||||
<span>{{ form.phonenumber }}</span>
|
<span>{{ form.phonenumber }}</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="width: 80px; display: inline-block">{{ $t('device.device-user.037521-18') }}</span>
|
<span style="width: 80px; display: inline-block">{{ $t('device.device-user.037521-18') }}</span>
|
||||||
<span>{{ form.userName }}</span>
|
<span>{{ form.userName }}</span>
|
||||||
<br />
|
<br />
|
||||||
<!--选择权限-->
|
<!--选择权限-->
|
||||||
<div style="font-weight: bold; margin: 15px 0 10px">{{ $t('device.device-user.037521-19') }}</div>
|
<div style="font-weight: bold; margin: 15px 0 10px">{{ $t('device.device-user.037521-19') }}</div>
|
||||||
<el-table :data="sharePermissionList" highlight-current-row size="mini" ref="multipleTable" @select="handleSelectionChange" @select-all="handleSelectionAll">
|
<el-table :data="sharePermissionList" highlight-current-row size="mini" ref="multipleTable" @select="handleSelectionChange" @select-all="handleSelectionAll">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column :label="$t('device.device-user.037521-20')" align="center" key="modelName" prop="modelName" />
|
<el-table-column :label="$t('device.device-user.037521-20')" align="center" key="modelName" prop="modelName" />
|
||||||
<el-table-column :label="$t('device.device-user.037521-21')" align="center" key="identifier" prop="identifier" />
|
<el-table-column :label="$t('device.device-user.037521-21')" align="center" key="identifier" prop="identifier" />
|
||||||
<el-table-column :label="$t('device.device-edit.148398-17')" align="left" min-width="100" header-align="center" key="remark" prop="remark" />
|
<el-table-column :label="$t('device.device-edit.148398-17')" align="left" min-width="100" header-align="center" key="remark" prop="remark" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--选择权限-->
|
<!--选择权限-->
|
||||||
<div style="font-weight: bold; margin: 15px 0 10px">{{ $t('device.device-edit.148398-17') }}</div>
|
<div style="font-weight: bold; margin: 15px 0 10px">{{ $t('device.device-edit.148398-17') }}</div>
|
||||||
<el-input v-model="form.remark" type="textarea" :placeholder="$t('device.device-edit.148398-18')" rows="2" />
|
<el-input v-model="form.remark" type="textarea" :placeholder="$t('device.device-edit.148398-18')" rows="2" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm" :disabled="!form.userId || !deviceInfo.deviceId">{{ $t('device.product-list.058448-14') }}</el-button>
|
<el-button type="primary" @click="submitForm" :disabled="!form.userId || !deviceInfo.deviceId">{{ $t('device.product-list.058448-14') }}</el-button>
|
||||||
<el-button @click="closeSelectUser">{{ $t('device.device-user.037521-25') }}</el-button>
|
<el-button @click="closeSelectUser">{{ $t('device.device-user.037521-25') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -88,256 +100,261 @@ import { addDeviceUser, listDeviceUser, getDeviceUser, delDeviceUser, updateDevi
|
|||||||
import { permListModel } from '@/api/iot/model';
|
import { permListModel } from '@/api/iot/model';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'device-user',
|
name: 'device-user',
|
||||||
dicts: ['iot_yes_no'],
|
dicts: ['iot_yes_no'],
|
||||||
props: {
|
props: {
|
||||||
device: {
|
device: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null,
|
default: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
watch: {
|
||||||
watch: {
|
// 获取到父组件传递的device后,刷新列表
|
||||||
// 获取到父组件传递的device后,刷新列表
|
device: function (newVal, oldVal) {
|
||||||
device: function (newVal, oldVal) {
|
this.deviceInfo = newVal;
|
||||||
this.deviceInfo = newVal;
|
if (this.deviceInfo && this.deviceInfo.deviceId != 0) {
|
||||||
if (this.deviceInfo && this.deviceInfo.deviceId != 0) {
|
this.queryParams.deviceId = this.deviceInfo.deviceId;
|
||||||
this.queryParams.deviceId = this.deviceInfo.deviceId;
|
this.getList();
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 类型,1=新增,2=更新
|
|
||||||
type: 1,
|
|
||||||
// 消息提示
|
|
||||||
message: '',
|
|
||||||
// 权限遮罩层
|
|
||||||
permsLoading: false,
|
|
||||||
// 权限列表
|
|
||||||
sharePermissionList: [],
|
|
||||||
// 设备信息
|
|
||||||
deviceInfo: {},
|
|
||||||
// 是否显示选择用户弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
permParams: {
|
|
||||||
userName: undefined,
|
|
||||||
phonenumber: undefined,
|
|
||||||
deviceId: null,
|
|
||||||
},
|
|
||||||
// 查询表单验证
|
|
||||||
rules: {
|
|
||||||
phonenumber: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: this.$t('device.device-user.037521-26'),
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
min: 11,
|
|
||||||
max: 11,
|
|
||||||
message: this.$t('device.device-user.037521-27'),
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 设备用户表格数据
|
|
||||||
deviceUserList: [],
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
deviceName: null,
|
|
||||||
userName: null,
|
|
||||||
userId: null,
|
|
||||||
tenantName: null,
|
|
||||||
isOwner: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.queryParams.deviceId = this.device.deviceId;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询设备用户列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listDeviceUser(this.queryParams).then((response) => {
|
|
||||||
this.deviceUserList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
deviceId: null,
|
|
||||||
userId: null,
|
|
||||||
deviceName: null,
|
|
||||||
userName: null,
|
|
||||||
perms: null,
|
|
||||||
phonenumber: null,
|
|
||||||
remark: null,
|
|
||||||
};
|
|
||||||
this.sharePermissionList = [];
|
|
||||||
this.message = '';
|
|
||||||
this.resetForm('form');
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.type = 2; //更新
|
|
||||||
getDeviceUser(row.deviceId, row.userId).then((response) => {
|
|
||||||
this.form = response.data;
|
|
||||||
// 查询物模型权限列表
|
|
||||||
this.getPermissionList();
|
|
||||||
this.open = true;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设备分享
|
|
||||||
shareDevice() {
|
|
||||||
this.type = 1; // 新增
|
|
||||||
this.open = true;
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const deviceUser = row;
|
|
||||||
this.$modal
|
|
||||||
.confirm(this.$t('device.device-user.037521-28'))
|
|
||||||
.then(function () {
|
|
||||||
return delDeviceUser(deviceUser);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess(this.$t('device.device-user.037521-29'));
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
/** 用户按钮操作 */
|
|
||||||
userQuery() {
|
|
||||||
this.$refs['queryForm'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.reset();
|
|
||||||
this.getShareUser();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 查询用户 */
|
|
||||||
getShareUser() {
|
|
||||||
this.permsLoading = true;
|
|
||||||
if (!this.deviceInfo.deviceId) {
|
|
||||||
this.$modal.alert(this.$t('device.device-user.037521-30'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.permParams.deviceId = this.deviceInfo.deviceId;
|
|
||||||
shareUser(this.permParams).then((response) => {
|
|
||||||
if (response.data) {
|
|
||||||
this.form = response.data;
|
|
||||||
// 查询物模型权限列表
|
|
||||||
this.getPermissionList();
|
|
||||||
} else {
|
|
||||||
this.permsLoading = false;
|
|
||||||
this.message = '查询不到用户信息,或者该用户已经是设备用户';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 查询产品物模型设备权限列表 */
|
|
||||||
async getPermissionList() {
|
|
||||||
let perms = [];
|
|
||||||
if (this.form.perms) {
|
|
||||||
perms = this.form.perms.split(',');
|
|
||||||
}
|
|
||||||
console.log('deviceInfo', this.deviceInfo);
|
|
||||||
permListModel(this.deviceInfo.productId).then((response) => {
|
|
||||||
// 固定增加设备系统相关权限
|
|
||||||
this.sharePermissionList = [
|
|
||||||
{
|
|
||||||
identifier: 'timer',
|
|
||||||
modelName: this.$t('device.device-user.037521-34'),
|
|
||||||
remark: this.$t('device.device-user.037521-35'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
identifier: 'log',
|
|
||||||
modelName: '设备日志',
|
|
||||||
remark: '包含事件日志和指令日志',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
identifier: 'monitor',
|
|
||||||
modelName: this.$t('device.device-user.037521-38'),
|
|
||||||
remark: this.$t('device.device-user.037521-39'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
identifier: 'statistic',
|
|
||||||
modelName: '监测统计',
|
|
||||||
remark: '图表显示存储的历史监测数据',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
this.sharePermissionList = this.sharePermissionList.concat(response.data);
|
|
||||||
|
|
||||||
// 设置选中
|
|
||||||
if (perms.length > 0) {
|
|
||||||
for (let i = 0; i < this.sharePermissionList.length; i++) {
|
|
||||||
for (let j = 0; j < perms.length; j++) {
|
|
||||||
if (this.sharePermissionList[i].identifier == perms[j]) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.multipleTable.toggleRowSelection(this.sharePermissionList[i], true);
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
|
||||||
this.permsLoading = false;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 重置查询
|
data() {
|
||||||
resetUserQuery() {
|
return {
|
||||||
this.resetForm('queryForm');
|
// 类型,1=新增,2=更新
|
||||||
this.reset();
|
type: 1,
|
||||||
|
// 消息提示
|
||||||
|
message: '',
|
||||||
|
// 权限遮罩层
|
||||||
|
permsLoading: false,
|
||||||
|
// 权限列表
|
||||||
|
sharePermissionList: [],
|
||||||
|
// 设备信息
|
||||||
|
deviceInfo: {},
|
||||||
|
// 是否显示选择用户弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
permParams: {
|
||||||
|
userName: undefined,
|
||||||
|
phonenumber: undefined,
|
||||||
|
deviceId: null,
|
||||||
|
},
|
||||||
|
// 查询表单验证
|
||||||
|
rules: {
|
||||||
|
phonenumber: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('device.device-user.037521-26'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
min: 11,
|
||||||
|
max: 11,
|
||||||
|
message: this.$t('device.device-user.037521-27'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 设备用户表格数据
|
||||||
|
deviceUserList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
deviceName: null,
|
||||||
|
userName: null,
|
||||||
|
userId: null,
|
||||||
|
tenantName: null,
|
||||||
|
isOwner: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
};
|
||||||
},
|
},
|
||||||
// 关闭选择用户
|
created() {
|
||||||
closeSelectUser() {
|
this.queryParams.deviceId = this.device.deviceId;
|
||||||
this.open = false;
|
this.getList();
|
||||||
this.resetUserQuery();
|
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
methods: {
|
||||||
handleSelectionChange(selection) {
|
/** 查询设备用户列表 */
|
||||||
this.form.perms = selection.map((x) => x.identifier).join(',');
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listDeviceUser(this.queryParams).then((response) => {
|
||||||
|
this.deviceUserList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
deviceId: null,
|
||||||
|
userId: null,
|
||||||
|
deviceName: null,
|
||||||
|
userName: null,
|
||||||
|
perms: null,
|
||||||
|
phonenumber: null,
|
||||||
|
remark: null,
|
||||||
|
};
|
||||||
|
this.sharePermissionList = [];
|
||||||
|
this.message = '';
|
||||||
|
this.resetForm('form');
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
this.type = 2; //更新
|
||||||
|
getDeviceUser(row.deviceId, row.userId).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
// 查询物模型权限列表
|
||||||
|
this.getPermissionList();
|
||||||
|
this.open = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 设备分享
|
||||||
|
shareDevice() {
|
||||||
|
this.type = 1; // 新增
|
||||||
|
this.open = true;
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const deviceUser = row;
|
||||||
|
this.$modal
|
||||||
|
.confirm(this.$t('device.device-user.037521-28'))
|
||||||
|
.then(function () {
|
||||||
|
return delDeviceUser(deviceUser);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess(this.$t('device.device-user.037521-29'));
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 用户按钮操作 */
|
||||||
|
userQuery() {
|
||||||
|
this.$refs['queryForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.reset();
|
||||||
|
this.getShareUser();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询用户 */
|
||||||
|
getShareUser() {
|
||||||
|
this.permsLoading = true;
|
||||||
|
if (!this.deviceInfo.deviceId) {
|
||||||
|
this.$modal.alert(this.$t('device.device-user.037521-30'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.permParams.deviceId = this.deviceInfo.deviceId;
|
||||||
|
shareUser(this.permParams).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.form = response.data;
|
||||||
|
// 查询物模型权限列表
|
||||||
|
this.getPermissionList();
|
||||||
|
} else {
|
||||||
|
this.permsLoading = false;
|
||||||
|
this.message = this.$t('device.device-user.037521-31');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询产品物模型设备权限列表 */
|
||||||
|
async getPermissionList() {
|
||||||
|
let perms = [];
|
||||||
|
if (this.form.perms) {
|
||||||
|
perms = this.form.perms.split(',');
|
||||||
|
}
|
||||||
|
console.log('deviceInfo', this.deviceInfo);
|
||||||
|
permListModel(this.deviceInfo.productId).then((response) => {
|
||||||
|
// 固定增加设备系统相关权限
|
||||||
|
this.sharePermissionList = [
|
||||||
|
{
|
||||||
|
identifier: 'timer',
|
||||||
|
modelName: this.$t('device.device-user.037521-34'),
|
||||||
|
remark: this.$t('device.device-user.037521-35'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
identifier: 'log',
|
||||||
|
modelName: this.$t('device.device-user.037521-36'),
|
||||||
|
remark: this.$t('device.device-user.037521-37'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
identifier: 'monitor',
|
||||||
|
modelName: this.$t('device.device-user.037521-38'),
|
||||||
|
remark: this.$t('device.device-user.037521-39'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
identifier: 'statistic',
|
||||||
|
modelName: this.$t('device.device-user.037521-40'),
|
||||||
|
remark: this.$t('device.device-user.037521-41'),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
this.sharePermissionList = this.sharePermissionList.concat(response.data);
|
||||||
|
|
||||||
|
// 设置选中
|
||||||
|
if (perms.length > 0) {
|
||||||
|
for (let i = 0; i < this.sharePermissionList.length; i++) {
|
||||||
|
for (let j = 0; j < perms.length; j++) {
|
||||||
|
if (this.sharePermissionList[i].identifier == perms[j]) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(this.sharePermissionList[i], true);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.permsLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 重置查询
|
||||||
|
resetUserQuery() {
|
||||||
|
this.resetForm('queryForm');
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 关闭选择用户
|
||||||
|
closeSelectUser() {
|
||||||
|
this.open = false;
|
||||||
|
this.resetUserQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.form.perms = selection.map((x) => x.identifier).join(',');
|
||||||
|
},
|
||||||
|
// 全选事件处理
|
||||||
|
handleSelectionAll(selection) {
|
||||||
|
this.form.perms = selection.map((x) => x.identifier).join(',');
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
if (this.type == 2) {
|
||||||
|
// 更新设备用户
|
||||||
|
updateDeviceUser(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess(this.$t('device.device-user.037521-42'));
|
||||||
|
this.resetUserQuery();
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else if (this.type == 1) {
|
||||||
|
// 添加设备用户
|
||||||
|
this.form.deviceId = this.deviceInfo.deviceId;
|
||||||
|
this.form.deviceName = this.deviceInfo.deviceName;
|
||||||
|
addDeviceUser(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess(this.$t('device.device-user.037521-43'));
|
||||||
|
this.resetUserQuery();
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// 全选事件处理
|
};
|
||||||
handleSelectionAll(selection) {
|
</script>
|
||||||
this.form.perms = selection.map((x) => x.identifier).join(',');
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
if (this.type == 2) {
|
|
||||||
// 更新设备用户
|
|
||||||
updateDeviceUser(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess(this.$t('device.device-user.037521-42'));
|
|
||||||
this.resetUserQuery();
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else if (this.type == 1) {
|
|
||||||
// 添加设备用户
|
|
||||||
this.form.deviceId = this.deviceInfo.deviceId;
|
|
||||||
this.form.deviceName = this.deviceInfo.deviceName;
|
|
||||||
addDeviceUser(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess(this.$t('device.device-user.037521-43'));
|
|
||||||
this.resetUserQuery();
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -7,13 +7,13 @@
|
|||||||
<el-input v-model="queryParams.productName" :placeholder="$t('productList.index.470902-2')" clearable size="small" @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.productName" :placeholder="$t('productList.index.470902-2')" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('common.search') }}</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="loading" ref="singleTable" :data="productList" @row-click="rowClick" highlight-current-row size="mini">
|
<el-table v-loading="loading" ref="singleTable" :data="productList" @row-click="rowClick" highlight-current-row size="mini">
|
||||||
<el-table-column :label="$t('common.select')" width="50" align="center">
|
<el-table-column :label="$t('select')" width="50" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<input type="radio" :checked="scope.row.isSelect" name="product" />
|
<input type="radio" :checked="scope.row.isSelect" name="product" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,23 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="padding: 6px">
|
<div style="padding: 6px">
|
||||||
<el-card v-show="showSearch" style="margin-bottom: 6px">
|
<el-card v-show="showSearch" style="margin-bottom: 6px">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" style="margin-bottom: -20px">
|
||||||
label-width="68px" style="margin-bottom: -20px">
|
|
||||||
<el-form-item :label="$t('script.349087-0')" prop="scriptId">
|
<el-form-item :label="$t('script.349087-0')" prop="scriptId">
|
||||||
<el-input v-model="queryParams.scriptId" :placeholder="$t('script.349087-1')" clearable
|
<el-input v-model="queryParams.scriptId" :placeholder="$t('script.349087-1')" clearable @keyup.enter.native="handleQuery" />
|
||||||
@keyup.enter.native="handleQuery" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('script.349087-2')" prop="scriptName">
|
<el-form-item :label="$t('script.349087-2')" prop="scriptName">
|
||||||
<el-input v-model="queryParams.scriptName" :placeholder="$t('script.349087-3')" clearable
|
<el-input v-model="queryParams.scriptName" :placeholder="$t('script.349087-3')" clearable @keyup.enter.native="handleQuery" />
|
||||||
@keyup.enter.native="handleQuery" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('common.search') }}</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="float: right">
|
<el-form-item style="float: right">
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['iot:script:add']">{{ $t('add') }}</el-button>
|
||||||
v-hasPermi="['iot:script:add']">{{ $t('common.add') }}</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -34,8 +30,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('script.index.470901-5')" align="center" prop="status">
|
<el-table-column :label="$t('script.index.470901-5')" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.rule_script_action" :value="scope.row.scriptAction"
|
<dict-tag :options="dict.type.rule_script_action" :value="scope.row.scriptAction" size="small" />
|
||||||
size="small" />
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('script.index.470901-7')" align="center" prop="scriptLanguage" />
|
<el-table-column :label="$t('script.index.470901-7')" align="center" prop="scriptLanguage" />
|
||||||
@@ -46,23 +41,19 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('script.index.470901-9')" align="center" prop="scriptOrder" />
|
<el-table-column :label="$t('script.index.470901-9')" align="center" prop="scriptOrder" />
|
||||||
<el-table-column :label="$t('common.opation')" align="center" class-name="small-padding fixed-width" width="200">
|
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="small" type="text" icon="el-icon-date" @click="handleLog(scope.row.scriptId)" v-hasPermi="['iot:script:query']">{{ $t('script.index.470901-23') }}</el-button>
|
<el-button size="small" type="text" icon="el-icon-date" @click="handleLog(scope.row.scriptId)" v-hasPermi="['iot:script:query']">{{ $t('script.index.470901-23') }}</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleUpdate(scope.row)"
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handleUpdate(scope.row)" v-hasPermi="['iot:script:query']">{{ $t('script.index.470901-24') }}</el-button>
|
||||||
v-hasPermi="['iot:script:query']">{{ $t('script.index.470901-24') }}</el-button>
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:script:remove']">{{ $t('del') }}</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['iot:script:remove']">{{ $t('common.del') }}</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
||||||
|
|
||||||
<!-- 添加或修改规则引擎脚本对话框 -->
|
<!-- 添加或修改规则引擎脚本对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false"
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
|
||||||
:close-on-press-escape="false">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||||
<el-row :gutter="50">
|
<el-row :gutter="50">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -72,16 +63,19 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('script.index.470901-9')" prop="scriptOrder">
|
<el-form-item :label="$t('script.index.470901-9')" prop="scriptOrder">
|
||||||
<el-input-number v-model="form.scriptOrder" :placeholder="$t('script.index.470901-10')" type="number"
|
<el-input-number v-model="form.scriptOrder" :placeholder="$t('script.index.470901-10')" type="number" controls-position="right" style="width: 100%" />
|
||||||
controls-position="right" style="width: 100%" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('script.349087-6')" prop="scriptEvent">
|
<el-form-item :label="$t('script.349087-6')" prop="scriptEvent">
|
||||||
<el-select v-model="form.scriptEvent" :placeholder="$t('script.349087-11')" style="width: 100%">
|
<el-select v-model="form.scriptEvent" :placeholder="$t('script.349087-11')" style="width: 100%">
|
||||||
<el-option v-for="dict in dict.type.rule_script_event" :key="dict.label"
|
<el-option
|
||||||
:label="dict.label" :value="Number(dict.value)"
|
v-for="dict in dict.type.rule_script_event"
|
||||||
:disabled="dict.value !== '1' && dict.value !== '2'"></el-option>
|
:key="dict.label"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="Number(dict.value)"
|
||||||
|
:disabled="dict.value !== '1' && dict.value !== '2'"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -89,9 +83,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('script.index.470901-5')" prop="scriptAction">
|
<el-form-item :label="$t('script.index.470901-5')" prop="scriptAction">
|
||||||
<el-select v-model="form.scriptAction" :placeholder="$t('script.index.470901-6')" style="width: 100%">
|
<el-select v-model="form.scriptAction" :placeholder="$t('script.index.470901-6')" style="width: 100%">
|
||||||
<el-option v-for="dict in dict.type.rule_script_action" :key="dict.label"
|
<el-option v-for="dict in dict.type.rule_script_action" :key="dict.label" :label="dict.label" :value="Number(dict.value)" :disabled="dict.value !== '1'"></el-option>
|
||||||
:label="dict.label" :value="Number(dict.value)"
|
|
||||||
:disabled="dict.value !== '1'"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -102,10 +94,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('script.index.470901-2')" prop="productName">
|
<el-form-item :label="$t('script.index.470901-2')" prop="productName">
|
||||||
<el-input readonly v-model="form.productName" size="small" :placeholder="$t('script.index.470901-3')"
|
<el-input readonly v-model="form.productName" size="small" :placeholder="$t('script.index.470901-3')" style="margin-top: 3px">
|
||||||
style="margin-top: 3px">
|
<el-button slot="append" @click="handleSelectProduct()" size="small">{{ $t('script.index.470901-4') }}</el-button>
|
||||||
<el-button slot="append" @click="handleSelectProduct()"
|
|
||||||
size="small">{{ $t('script.index.470901-4') }}</el-button>
|
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -113,28 +103,21 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="padding: 0px 10px" @click="editClick">
|
<div style="padding: 0px 10px" @click="editClick">
|
||||||
<AceEditor ref="codeEditor" :content.sync="form.scriptData" lang="groovy" codeStyle="chrome"
|
<AceEditor ref="codeEditor" :content.sync="form.scriptData" lang="groovy" codeStyle="chrome" :read-only="false" width="100%" height="450px"></AceEditor>
|
||||||
:read-only="false" width="100%" height="450px"></AceEditor>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 0 10px; margin: 10px 0">
|
<div style="padding: 0 10px; margin: 10px 0">
|
||||||
<el-alert :title="validateMsg" type="success" show-icon v-if="isValidate && validateMsg"
|
<el-alert :title="validateMsg" type="success" show-icon v-if="isValidate && validateMsg" :closable="false"></el-alert>
|
||||||
:closable="false"></el-alert>
|
<el-alert :title="validateMsg" type="error" show-icon v-if="!isValidate && validateMsg" :closable="false"></el-alert>
|
||||||
<el-alert :title="validateMsg" type="error" show-icon v-if="!isValidate && validateMsg"
|
|
||||||
:closable="false"></el-alert>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<span style="float: left">
|
<span style="float: left">
|
||||||
<el-link style="line-height: 40px; padding-left: 20px" icon="el-icon-question"
|
<el-link style="line-height: 40px; padding-left: 20px" icon="el-icon-question" :underline="false" type="primary" href="https://fastbee.cn/doc/pages/rule_engine/" target="_blank">
|
||||||
:underline="false" type="primary" href="https://fastbee.cn/doc/pages/rule_engine/"
|
|
||||||
target="_blank">
|
|
||||||
{{ $t('script.index.470901-17') }}
|
{{ $t('script.index.470901-17') }}
|
||||||
</el-link>
|
</el-link>
|
||||||
</span>
|
</span>
|
||||||
<el-button type="success" @click="handleValidate">{{ $t('script.index.470901-18') }}</el-button>
|
<el-button type="success" @click="handleValidate">{{ $t('script.index.470901-18') }}</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:script:edit']"
|
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:script:edit']" v-show="form.scriptId" :disabled="!isValidate">{{ $t('script.index.470901-19') }}</el-button>
|
||||||
v-show="form.scriptId" :disabled="!isValidate">{{ $t('script.index.470901-19') }}</el-button>
|
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:script:add']" v-show="!form.scriptId" :disabled="!isValidate">{{ $t('add') }}</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:script:add']"
|
|
||||||
v-show="!form.scriptId" :disabled="!isValidate">{{ $t('common.add') }}</el-button>
|
|
||||||
<el-button @click="cancel">{{ $t('script.index.470901-20') }}</el-button>
|
<el-button @click="cancel">{{ $t('script.index.470901-20') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -406,7 +389,7 @@ msgContext.setPayload(NewPayload);`,
|
|||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess(this.$i18n.t('script.index.470901-27'));
|
this.$modal.msgSuccess(this.$i18n.t('script.index.470901-27'));
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 验证按钮操作 */
|
/** 验证按钮操作 */
|
||||||
handleValidate() {
|
handleValidate() {
|
||||||
|
|||||||
@@ -195,84 +195,84 @@ export default {
|
|||||||
protocol: [
|
protocol: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '默认播放协议不能为空',
|
message: this.$t('sip.index.998533-26'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ip: [
|
ip: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '服务器ip不能为空',
|
message: this.$t('sip.index.998533-27'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
domain: [
|
domain: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '服务器域名不能为空',
|
message: this.$t('sip.index.998533-28'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
secret: [
|
secret: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '流媒体密钥不能为空',
|
message: this.$t('sip.index.998533-29'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
portHttp: [
|
portHttp: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: 'http端口不能为空',
|
message: this.$t('sip.index.998533-30'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
portHttps: [
|
portHttps: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: 'https端口不能为空',
|
message: this.$t('sip.index.998533-31'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
portRtmp: [
|
portRtmp: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: 'rtmp端口不能为空',
|
message: this.$t('sip.index.998533-32'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
portRtsp: [
|
portRtsp: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: 'rtsp端口不能为空',
|
message: this.$t('sip.index.998533-33'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
rtpPortRange: [
|
rtpPortRange: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: 'rtp端口范围不能为空',
|
message: this.$t('sip.index.998533-34'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
delFlag: [
|
delFlag: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '删除标志不能为空',
|
message: this.$t('sip.index.998533-35'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
createBy: [
|
createBy: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '创建者不能为空',
|
message: this.$t('sip.index.998533-36'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
createTime: [
|
createTime: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '创建时间不能为空',
|
message: this.$t('sip.index.998533-37'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,103 +1,108 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="mediaServerEdit" v-loading="isLoging">
|
<div id="mediaServerEdit" v-loading="isLoging">
|
||||||
<el-dialog :title="$t('sip.mediaServerEdit.998534-0')" :width="dialogWidth" top="2rem" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()">
|
<el-dialog :title="$t('sip.mediaServerEdit.998534-0')" :width="dialogWidth" top="2rem" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()">
|
||||||
<div id="formStep" style="margin-top: 1rem; margin-right: 20px">
|
<div id="formStep" style="margin-top: 1rem; margin-right: 20px">
|
||||||
<el-form v-if="currentStep == 1" ref="mediaServerForm" :rules="rules" :model="mediaServerForm" label-width="280px" style="width: 70%">
|
<el-form v-if="currentStep == 1" ref="mediaServerForm" :rules="rules" :model="mediaServerForm" label-width="280px" style="width: 70%">
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-1')" prop="ip">
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-1')" prop="ip">
|
||||||
<el-input v-model="mediaServerForm.ip" :placeholder="$t('sip.mediaServerEdit.998534-2')" clearable></el-input>
|
<el-input v-model="mediaServerForm.ip" :placeholder="$t('sip.mediaServerEdit.998534-2')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-3')" prop="portHttp">
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-3')" prop="portHttp">
|
||||||
<el-input v-model="mediaServerForm.portHttp" :placeholder="$t('sip.mediaServerEdit.998534-4')" clearable></el-input>
|
<el-input v-model="mediaServerForm.portHttp" :placeholder="$t('sip.mediaServerEdit.998534-4')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-5')" prop="secret">
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-5')" prop="secret">
|
||||||
<el-input v-model="mediaServerForm.secret" :placeholder="$t('sip.mediaServerEdit.998534-6')" clearable></el-input>
|
<el-input v-model="mediaServerForm.secret" :placeholder="$t('sip.mediaServerEdit.998534-6')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div style="float: right; font-size: 28px">
|
<div style="float: right; font-size: 28px">
|
||||||
<el-button @click="close">{{ $t('cancel') }}</el-button>
|
<el-button @click="close">{{ $t('cancel') }}</el-button>
|
||||||
<el-button type="success" @click="checkServer" :loading="btnLoading">{{ $t('test') }}</el-button>
|
<el-button type="success" @click="checkServer" :loading="btnLoading">{{ $t('test') }}</el-button>
|
||||||
<el-button type="primary" v-if="currentStep === 1 && serverCheck === 1" @click="next">{{ $t('next') }}</el-button>
|
<el-button type="primary" v-if="currentStep === 1 && serverCheck === 1" @click="next">{{ $t('next') }}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form v-if="currentStep === 2 || currentStep === 3" ref="mediaServerForm1" :rules="rules" :model="mediaServerForm" label-width="140px" :disabled="!editFlag">
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-7')" prop="serverId">
|
||||||
|
<el-input v-model="mediaServerForm.serverId" :placeholder="$t('sip.mediaServerEdit.998534-8')" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-9')" prop="ip">
|
||||||
|
<el-input v-if="currentStep === 2" v-model="mediaServerForm.ip" disabled></el-input>
|
||||||
|
<el-input v-if="currentStep === 3" v-model="mediaServerForm.ip"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-10')" prop="protocol">
|
||||||
|
<el-select v-model="mediaServerForm.protocol" style="width: 100%">
|
||||||
|
<el-option key="http" label="http" value="http"></el-option>
|
||||||
|
<el-option key="https" label="https" value="https"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="HookUrl" prop="hookurl">
|
||||||
|
<el-input v-model="mediaServerForm.hookurl" placeholder="HookUrl" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-11')" prop="portHttp">
|
||||||
|
<el-input v-if="currentStep === 2" v-model="mediaServerForm.portHttp" disabled></el-input>
|
||||||
|
<el-input v-if="currentStep === 3" v-model="mediaServerForm.portHttp"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-12')" prop="portHttps">
|
||||||
|
<el-input v-model="mediaServerForm.portHttps" :placeholder="$t('sip.mediaServerEdit.998534-13')" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-14')" prop="portRtsp">
|
||||||
|
<el-input v-model="mediaServerForm.portRtsp" :placeholder="$t('sip.mediaServerEdit.998534-15')" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form v-if="currentStep === 2 || currentStep === 3" ref="mediaServerForm2" :rules="rules" :model="mediaServerForm" label-width="180px" :disabled="!editFlag">
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-16')" prop="secret">
|
||||||
|
<el-input v-if="currentStep === 2" v-model="mediaServerForm.secret" disabled></el-input>
|
||||||
|
<el-input v-if="currentStep === 3" v-model="mediaServerForm.secret"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-17')" prop="domain">
|
||||||
|
<el-input v-model="mediaServerForm.domain" :placeholder="$t('sip.mediaServerEdit.998534-18')" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-19')">
|
||||||
|
<el-switch v-model="mediaServerForm.autoConfig"></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-20')">
|
||||||
|
<el-switch
|
||||||
|
:active-text="$t('sip.mediaServerEdit.998534-21')"
|
||||||
|
:inactive-text="$t('sip.mediaServerEdit.998534-22')"
|
||||||
|
@change="portRangeChange"
|
||||||
|
v-model="mediaServerForm.rtpEnable"
|
||||||
|
></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="!mediaServerForm.rtpEnable" :label="$t('sip.mediaServerEdit.998534-23')" prop="rtpProxyPort">
|
||||||
|
<el-input v-model.number="mediaServerForm.rtpProxyPort" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="mediaServerForm.rtpEnable" :label="$t('sip.mediaServerEdit.998534-23')">
|
||||||
|
<el-input v-model="rtpPortRange1" :placeholder="$t('sip.mediaServerEdit.998534-24')" @change="portRangeChange" clearable style="width: 100px" prop="rtpPortRange1"></el-input>
|
||||||
|
<el-input v-model="rtpPortRange2" :placeholder="$t('sip.mediaServerEdit.998534-25')" @change="portRangeChange" clearable style="width: 100px" prop="rtpPortRange2"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-26')" prop="portRtmp">
|
||||||
|
<el-input v-model="mediaServerForm.portRtmp" :placeholder="$t('sip.mediaServerEdit.998534-27')" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('sip.mediaServerEdit.998534-28')" prop="recordPort">
|
||||||
|
<el-input v-model.number="mediaServerForm.recordPort" :disabled="!editFlag">
|
||||||
|
<el-button v-if="mediaServerForm.recordPort > 0" class="el-icon-check" slot="append" type="primary" @click="checkRecordServer"></el-button>
|
||||||
|
</el-input>
|
||||||
|
<i v-if="recordServerCheck === 1" class="el-icon-success" style="color: #3caf36; position: absolute; top: 14px"></i>
|
||||||
|
<i v-if="recordServerCheck === 2" class="el-icon-loading" style="color: #3caf36; position: absolute; top: 14px"></i>
|
||||||
|
<i v-if="recordServerCheck === -1" class="el-icon-error" style="color: #c80000; position: absolute; top: 14px"></i>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<div style="float: right">
|
||||||
|
<el-button type="primary" @click="onSubmit" v-if="editFlag">{{ $t('submit') }}</el-button>
|
||||||
|
<el-button @click="close" v-if="editFlag">{{ $t('close') }}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-dialog>
|
||||||
</el-form>
|
<!-- 选择用户 -->
|
||||||
<el-row :gutter="24">
|
<user-list ref="userList" @userEvent="getUserData($event)" />
|
||||||
<el-col :span="12">
|
</div>
|
||||||
<el-form v-if="currentStep === 2 || currentStep === 3" ref="mediaServerForm1" :rules="rules" :model="mediaServerForm" label-width="140px" :disabled="!editFlag">
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-7')" prop="serverId">
|
|
||||||
<el-input v-model="mediaServerForm.serverId" :placeholder="$t('sip.mediaServerEdit.998534-8')" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-9')" prop="ip">
|
|
||||||
<el-input v-if="currentStep === 2" v-model="mediaServerForm.ip" disabled></el-input>
|
|
||||||
<el-input v-if="currentStep === 3" v-model="mediaServerForm.ip"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-10')" prop="protocol">
|
|
||||||
<el-select v-model="mediaServerForm.protocol" style="width: 100%">
|
|
||||||
<el-option key="http" label="http" value="http"></el-option>
|
|
||||||
<el-option key="https" label="https" value="https"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="HookUrl" prop="hookurl">
|
|
||||||
<el-input v-model="mediaServerForm.hookurl" placeholder="HookUrl" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-11')" prop="portHttp">
|
|
||||||
<el-input v-if="currentStep === 2" v-model="mediaServerForm.portHttp" disabled></el-input>
|
|
||||||
<el-input v-if="currentStep === 3" v-model="mediaServerForm.portHttp"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-12')" prop="portHttps">
|
|
||||||
<el-input v-model="mediaServerForm.portHttps" :placeholder="$t('sip.mediaServerEdit.998534-13')" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-14')" prop="portRtsp">
|
|
||||||
<el-input v-model="mediaServerForm.portRtsp" :placeholder="$t('sip.mediaServerEdit.998534-15')" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form v-if="currentStep === 2 || currentStep === 3" ref="mediaServerForm2" :rules="rules" :model="mediaServerForm" label-width="180px" :disabled="!editFlag">
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-16')" prop="secret">
|
|
||||||
<el-input v-if="currentStep === 2" v-model="mediaServerForm.secret" disabled></el-input>
|
|
||||||
<el-input v-if="currentStep === 3" v-model="mediaServerForm.secret"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-17')" prop="domain">
|
|
||||||
<el-input v-model="mediaServerForm.domain" :placeholder="$t('sip.mediaServerEdit.998534-18')" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-19')">
|
|
||||||
<el-switch v-model="mediaServerForm.autoConfig"></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-20')">
|
|
||||||
<el-switch :active-text="$t('sip.mediaServerEdit.998534-21')" :inactive-text="$t('sip.mediaServerEdit.998534-22')" @change="portRangeChange" v-model="mediaServerForm.rtpEnable"></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="!mediaServerForm.rtpEnable" :label="$t('sip.mediaServerEdit.998534-23')" prop="rtpProxyPort">
|
|
||||||
<el-input v-model.number="mediaServerForm.rtpProxyPort" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="mediaServerForm.rtpEnable" :label="$t('sip.mediaServerEdit.998534-23')">
|
|
||||||
<el-input v-model="rtpPortRange1" :placeholder="$t('sip.mediaServerEdit.998534-24')" @change="portRangeChange" clearable style="width: 100px" prop="rtpPortRange1"></el-input>
|
|
||||||
<el-input v-model="rtpPortRange2" :placeholder="$t('sip.mediaServerEdit.998534-25')" @change="portRangeChange" clearable style="width: 100px" prop="rtpPortRange2" ></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-26')" prop="portRtmp">
|
|
||||||
<el-input v-model="mediaServerForm.portRtmp" :placeholder="$t('sip.mediaServerEdit.998534-27')" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('sip.mediaServerEdit.998534-28')" prop="recordPort">
|
|
||||||
<el-input v-model.number="mediaServerForm.recordPort" :disabled="!editFlag">
|
|
||||||
<el-button v-if="mediaServerForm.recordPort > 0" class="el-icon-check" slot="append" type="primary" @click="checkRecordServer"></el-button>
|
|
||||||
</el-input>
|
|
||||||
<i v-if="recordServerCheck === 1" class="el-icon-success" style="color: #3caf36; position: absolute; top: 14px"></i>
|
|
||||||
<i v-if="recordServerCheck === 2" class="el-icon-loading" style="color: #3caf36; position: absolute; top: 14px"></i>
|
|
||||||
<i v-if="recordServerCheck === -1" class="el-icon-error" style="color: #c80000; position: absolute; top: 14px"></i>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<div style="float: right">
|
|
||||||
<el-button type="primary" @click="onSubmit" v-if="editFlag">{{ $t('submit') }}</el-button>
|
|
||||||
<el-button @click="close" v-if="editFlag">{{ $t('close') }}</el-button>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!-- 选择用户 -->
|
|
||||||
<user-list ref="userList" @userEvent="getUserData($event)" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -105,252 +110,251 @@ import { addmediaServer, checkmediaServer, updatemediaServer } from '@/api/iot/m
|
|||||||
import userList from '@/views/iot/sip/user-list.vue';
|
import userList from '@/views/iot/sip/user-list.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MediaServerEdit',
|
name: 'MediaServerEdit',
|
||||||
components: { userList },
|
components: { userList },
|
||||||
props: {
|
props: {
|
||||||
editFlag: {
|
editFlag: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
const isValidIp = (rule, value, callback) => {
|
|
||||||
// 校验IP是否符合规则
|
|
||||||
var reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
|
|
||||||
if (!reg.test(value)) {
|
|
||||||
return callback(new Error('请输入有效的IP地址'));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
const isValidPort = (rule, value, callback) => {
|
|
||||||
// 校验IP是否符合规则
|
|
||||||
var reg = /^(([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-5]{2}[0-3][0-5]))$/;
|
|
||||||
if (!reg.test(value)) {
|
|
||||||
return callback(new Error('请输入有效的端口号'));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
return {
|
|
||||||
tempTenantId: '',
|
|
||||||
tempTenantName: '',
|
|
||||||
btnLoading: false,
|
|
||||||
dialogWidth: '',
|
|
||||||
defaultWidth: 1000,
|
|
||||||
listChangeCallback: null,
|
|
||||||
showDialog: false,
|
|
||||||
isLoging: false,
|
|
||||||
dialogLoading: false,
|
|
||||||
currentStep: 1,
|
|
||||||
platformList: [],
|
|
||||||
serverCheck: 0,
|
|
||||||
recordServerCheck: 0,
|
|
||||||
mediaServerForm: {
|
|
||||||
serverId: '',
|
|
||||||
ip: '',
|
|
||||||
domain: '',
|
|
||||||
productId: '',
|
|
||||||
productName: '',
|
|
||||||
tenantId: '',
|
|
||||||
tenantName: '',
|
|
||||||
autoConfig: true,
|
|
||||||
hookurl: '',
|
|
||||||
secret: '',
|
|
||||||
portHttp: '',
|
|
||||||
portHttps: '',
|
|
||||||
recordPort: '',
|
|
||||||
portRtmp: '',
|
|
||||||
portRtsp: '',
|
|
||||||
rtpEnable: true,
|
|
||||||
rtpPortRange: '',
|
|
||||||
rtpProxyPort: '',
|
|
||||||
},
|
|
||||||
rtpPortRange1: 30000,
|
|
||||||
rtpPortRange2: 30100,
|
|
||||||
rules: {
|
|
||||||
ip: [{ required: true, validator: isValidIp, message: this.$t('sip.mediaServerEdit.998534-24'), trigger: 'blur' }],
|
|
||||||
portHttp: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
|
||||||
portHttps: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
|
||||||
recordPort: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
|
||||||
portRtmp: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
|
||||||
portRtsp: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
|
||||||
rtpPortRange1: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
|
||||||
rtpPortRange2: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
|
||||||
rtpProxyPort: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
|
||||||
secret: [{ required: true, message: this.$t('sip.mediaServerEdit.998534-31'), trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {},
|
|
||||||
created() {
|
|
||||||
this.setDialogWidth();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
setDialogWidth() {
|
|
||||||
let val = document.body.clientWidth;
|
|
||||||
if (val < this.defaultWidth) {
|
|
||||||
this.dialogWidth = '100%';
|
|
||||||
} else {
|
|
||||||
this.dialogWidth = this.defaultWidth + 'px';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
openDialog: function (param, callback) {
|
data() {
|
||||||
this.showDialog = true;
|
const isValidIp = (rule, value, callback) => {
|
||||||
this.listChangeCallback = callback;
|
// 校验IP是否符合规则
|
||||||
if (param != null) {
|
var reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
|
||||||
if (param.autoConfig === 1) {
|
if (!reg.test(value)) {
|
||||||
param.autoConfig = param.autoConfig === 1;
|
return callback(new Error(this.$t('sip.mediaServerEdit.998534-24')));
|
||||||
} else if (param.autoConfig === 0) {
|
} else {
|
||||||
param.autoConfig = param.autoConfig === 1;
|
callback();
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
if (param.rtpEnable === 1) {
|
};
|
||||||
param.rtpEnable = param.rtpEnable === 1;
|
const isValidPort = (rule, value, callback) => {
|
||||||
} else if (param.rtpEnable === 0) {
|
// 校验IP是否符合规则
|
||||||
param.rtpEnable = param.rtpEnable === 1;
|
var reg = /^(([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-5]{2}[0-3][0-5]))$/;
|
||||||
}
|
if (!reg.test(value)) {
|
||||||
|
return callback(new Error(this.$t('sip.mediaServerEdit.998534-25')));
|
||||||
this.mediaServerForm = param;
|
} else {
|
||||||
this.currentStep = 3;
|
callback();
|
||||||
if (param.rtpPortRange) {
|
}
|
||||||
let rtpPortRange = this.mediaServerForm.rtpPortRange.split(',');
|
return true;
|
||||||
if (rtpPortRange.length > 0) {
|
};
|
||||||
this.rtpPortRange1 = rtpPortRange[0];
|
return {
|
||||||
this.rtpPortRange2 = rtpPortRange[1];
|
tempTenantId: '',
|
||||||
}
|
tempTenantName: '',
|
||||||
}
|
btnLoading: false,
|
||||||
}
|
dialogWidth: '',
|
||||||
|
defaultWidth: 1000,
|
||||||
|
listChangeCallback: null,
|
||||||
|
showDialog: false,
|
||||||
|
isLoging: false,
|
||||||
|
dialogLoading: false,
|
||||||
|
currentStep: 1,
|
||||||
|
platformList: [],
|
||||||
|
serverCheck: 0,
|
||||||
|
recordServerCheck: 0,
|
||||||
|
mediaServerForm: {
|
||||||
|
serverId: '',
|
||||||
|
ip: '',
|
||||||
|
domain: '',
|
||||||
|
productId: '',
|
||||||
|
productName: '',
|
||||||
|
tenantId: '',
|
||||||
|
tenantName: '',
|
||||||
|
autoConfig: true,
|
||||||
|
hookurl: '',
|
||||||
|
secret: '',
|
||||||
|
portHttp: '',
|
||||||
|
portHttps: '',
|
||||||
|
recordPort: '',
|
||||||
|
portRtmp: '',
|
||||||
|
portRtsp: '',
|
||||||
|
rtpEnable: true,
|
||||||
|
rtpPortRange: '',
|
||||||
|
rtpProxyPort: '',
|
||||||
|
},
|
||||||
|
rtpPortRange1: 30000,
|
||||||
|
rtpPortRange2: 30100,
|
||||||
|
rules: {
|
||||||
|
ip: [{ required: true, validator: isValidIp, message: this.$t('sip.mediaServerEdit.998534-24'), trigger: 'blur' }],
|
||||||
|
portHttp: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
||||||
|
portHttps: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
||||||
|
recordPort: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
||||||
|
portRtmp: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
||||||
|
portRtsp: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
||||||
|
rtpPortRange1: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
||||||
|
rtpPortRange2: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
||||||
|
rtpProxyPort: [{ required: true, validator: isValidPort, message: this.$t('sip.mediaServerEdit.998534-25'), trigger: 'blur' }],
|
||||||
|
secret: [{ required: true, message: this.$t('sip.mediaServerEdit.998534-31'), trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
};
|
||||||
},
|
},
|
||||||
checkServer: function () {
|
computed: {},
|
||||||
this.$refs.mediaServerForm.validate((valid) => {
|
created() {
|
||||||
if (valid) {
|
this.setDialogWidth();
|
||||||
this.btnLoading = true;
|
},
|
||||||
this.serverCheck = 0;
|
methods: {
|
||||||
let query = {
|
setDialogWidth() {
|
||||||
ip: this.mediaServerForm.ip,
|
let val = document.body.clientWidth;
|
||||||
port: this.mediaServerForm.portHttp,
|
if (val < this.defaultWidth) {
|
||||||
secret: this.mediaServerForm.secret,
|
this.dialogWidth = '100%';
|
||||||
};
|
} else {
|
||||||
checkmediaServer(query)
|
this.dialogWidth = this.defaultWidth + 'px';
|
||||||
.then((response) => {
|
}
|
||||||
this.btnLoading = false;
|
},
|
||||||
if (response.data != null) {
|
openDialog: function (param, callback) {
|
||||||
this.mediaServerForm = response.data;
|
this.showDialog = true;
|
||||||
this.mediaServerForm.autoConfig = true;
|
this.listChangeCallback = callback;
|
||||||
this.mediaServerForm.rtpEnable = true;
|
if (param != null) {
|
||||||
this.mediaServerForm.protocol = 'http';
|
if (param.autoConfig === 1) {
|
||||||
this.mediaServerForm.domain = 'fastbee.com';
|
param.autoConfig = param.autoConfig === 1;
|
||||||
this.mediaServerForm.enabled = 1;
|
} else if (param.autoConfig === 0) {
|
||||||
this.mediaServerForm.tenantId = this.tempTenantId;
|
param.autoConfig = param.autoConfig === 1;
|
||||||
this.mediaServerForm.tenantName = this.tempTenantName;
|
}
|
||||||
this.mediaServerForm.serverId = 'fastbee';
|
|
||||||
this.mediaServerForm.hookurl = 'java:8080';
|
if (param.rtpEnable === 1) {
|
||||||
this.mediaServerForm.portHttps = 8443;
|
param.rtpEnable = param.rtpEnable === 1;
|
||||||
this.mediaServerForm.recordPort = 18081;
|
} else if (param.rtpEnable === 0) {
|
||||||
this.mediaServerForm.portRtmp = 1935;
|
param.rtpEnable = param.rtpEnable === 1;
|
||||||
this.mediaServerForm.portRtsp = 554;
|
}
|
||||||
this.mediaServerForm.rtpProxyPort = '';
|
|
||||||
this.rtpPortRange1 = 30000;
|
this.mediaServerForm = param;
|
||||||
this.rtpPortRange2 = 30100;
|
this.currentStep = 3;
|
||||||
this.serverCheck = 1;
|
if (param.rtpPortRange) {
|
||||||
this.$modal.alertSuccess(this.$t('sip.mediaServerEdit.998534-26'));
|
let rtpPortRange = this.mediaServerForm.rtpPortRange.split(',');
|
||||||
} else {
|
if (rtpPortRange.length > 0) {
|
||||||
this.serverCheck = -1;
|
this.rtpPortRange1 = rtpPortRange[0];
|
||||||
this.$modal.alertError(this.$t('sip.mediaServerEdit.998534-27'));
|
this.rtpPortRange2 = rtpPortRange[1];
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
.catch((error) => {
|
}
|
||||||
this.serverCheck = -1;
|
},
|
||||||
this.$message({
|
checkServer: function () {
|
||||||
showClose: true,
|
this.$refs.mediaServerForm.validate((valid) => {
|
||||||
message: error,
|
if (valid) {
|
||||||
type: 'error',
|
this.btnLoading = true;
|
||||||
});
|
this.serverCheck = 0;
|
||||||
|
let query = {
|
||||||
|
ip: this.mediaServerForm.ip,
|
||||||
|
port: this.mediaServerForm.portHttp,
|
||||||
|
secret: this.mediaServerForm.secret,
|
||||||
|
};
|
||||||
|
checkmediaServer(query)
|
||||||
|
.then((response) => {
|
||||||
|
this.btnLoading = false;
|
||||||
|
if (response.data != null) {
|
||||||
|
this.mediaServerForm = response.data;
|
||||||
|
this.mediaServerForm.autoConfig = true;
|
||||||
|
this.mediaServerForm.rtpEnable = true;
|
||||||
|
this.mediaServerForm.protocol = 'http';
|
||||||
|
this.mediaServerForm.domain = 'fastbee.com';
|
||||||
|
this.mediaServerForm.enabled = 1;
|
||||||
|
this.mediaServerForm.tenantId = this.tempTenantId;
|
||||||
|
this.mediaServerForm.tenantName = this.tempTenantName;
|
||||||
|
this.mediaServerForm.serverId = 'fastbee';
|
||||||
|
this.mediaServerForm.hookurl = 'java:8080';
|
||||||
|
this.mediaServerForm.portHttps = 8443;
|
||||||
|
this.mediaServerForm.recordPort = 18081;
|
||||||
|
this.mediaServerForm.portRtmp = 1935;
|
||||||
|
this.mediaServerForm.portRtsp = 554;
|
||||||
|
this.mediaServerForm.rtpProxyPort = '';
|
||||||
|
this.rtpPortRange1 = 30000;
|
||||||
|
this.rtpPortRange2 = 30100;
|
||||||
|
this.serverCheck = 1;
|
||||||
|
this.$modal.alertSuccess(this.$t('sip.mediaServerEdit.998534-26'));
|
||||||
|
} else {
|
||||||
|
this.serverCheck = -1;
|
||||||
|
this.$modal.alertError(this.$t('sip.mediaServerEdit.998534-27'));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
this.serverCheck = -1;
|
||||||
|
this.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: error,
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
});
|
next: function () {
|
||||||
|
this.currentStep = 2;
|
||||||
|
this.defaultWidth = 900;
|
||||||
|
this.setDialogWidth();
|
||||||
|
},
|
||||||
|
checkRecordServer: function () {
|
||||||
|
let that = this;
|
||||||
|
that.recordServerCheck = 2;
|
||||||
|
if (that.mediaServerForm.recordPort <= 0 || that.mediaServerForm.recordPort > 65535) {
|
||||||
|
that.recordServerCheck = -1;
|
||||||
|
that.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: this.$t('sip.mediaServerEdit.998534-28'),
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSubmit: function () {
|
||||||
|
this.dialogLoading = true;
|
||||||
|
this.mediaServerForm.rtpEnable = this.mediaServerForm.rtpEnable ? 1 : 0;
|
||||||
|
this.mediaServerForm.autoConfig = this.mediaServerForm.autoConfig ? 1 : 0;
|
||||||
|
if (this.mediaServerForm.id != null) {
|
||||||
|
updatemediaServer(this.mediaServerForm).then((response) => {
|
||||||
|
this.$modal.msgSuccess(this.$t('updateSuccess'));
|
||||||
|
this.showDialog = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.portRangeChange();
|
||||||
|
addmediaServer(this.mediaServerForm).then((response) => {
|
||||||
|
this.$modal.msgSuccess(this.$t('addSuccess'));
|
||||||
|
this.showDialog = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.$parent.getServerList();
|
||||||
|
this.$parent.delay();
|
||||||
|
},
|
||||||
|
close: function () {
|
||||||
|
this.showDialog = false;
|
||||||
|
this.dialogLoading = false;
|
||||||
|
this.mediaServerForm = {
|
||||||
|
serverId: '',
|
||||||
|
ip: '',
|
||||||
|
domain: '',
|
||||||
|
autoConfig: true,
|
||||||
|
hookurl: '',
|
||||||
|
secret: '',
|
||||||
|
portHttp: '',
|
||||||
|
portHttps: '',
|
||||||
|
recordPort: '',
|
||||||
|
portRtmp: '',
|
||||||
|
portRtsp: '',
|
||||||
|
rtpEnable: true,
|
||||||
|
rtpPortRange: '',
|
||||||
|
rtpProxyPort: '',
|
||||||
|
};
|
||||||
|
this.rtpPortRange1 = 30000;
|
||||||
|
this.rtpPortRange2 = 30100;
|
||||||
|
this.listChangeCallback = null;
|
||||||
|
this.currentStep = 1;
|
||||||
|
},
|
||||||
|
portRangeChange: function () {
|
||||||
|
if (this.mediaServerForm.rtpEnable) {
|
||||||
|
this.mediaServerForm.rtpPortRange = this.rtpPortRange1 + ',' + this.rtpPortRange2;
|
||||||
|
console.log(this.mediaServerForm.rtpPortRange);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectUser() {
|
||||||
|
this.$refs.userList.open = true;
|
||||||
|
this.$refs.userList.getList();
|
||||||
|
},
|
||||||
|
getUserData(user) {
|
||||||
|
this.tempTenantId = user.userId;
|
||||||
|
this.tempTenantName = user.userName;
|
||||||
|
this.mediaServerForm.tenantId = user.userId;
|
||||||
|
this.mediaServerForm.tenantName = user.userName;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
next: function () {
|
|
||||||
this.currentStep = 2;
|
|
||||||
this.defaultWidth = 900;
|
|
||||||
this.setDialogWidth();
|
|
||||||
},
|
|
||||||
checkRecordServer: function () {
|
|
||||||
let that = this;
|
|
||||||
that.recordServerCheck = 2;
|
|
||||||
if (that.mediaServerForm.recordPort <= 0 || that.mediaServerForm.recordPort > 65535) {
|
|
||||||
that.recordServerCheck = -1;
|
|
||||||
that.$message({
|
|
||||||
showClose: true,
|
|
||||||
message: this.$t('sip.mediaServerEdit.998534-28'),
|
|
||||||
type: 'error',
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onSubmit: function () {
|
|
||||||
this.dialogLoading = true;
|
|
||||||
this.mediaServerForm.rtpEnable = this.mediaServerForm.rtpEnable ? 1 : 0;
|
|
||||||
this.mediaServerForm.autoConfig = this.mediaServerForm.autoConfig ? 1 : 0;
|
|
||||||
if (this.mediaServerForm.id != null) {
|
|
||||||
updatemediaServer(this.mediaServerForm).then((response) => {
|
|
||||||
this.$modal.msgSuccess(this.$t('updateSuccess'));
|
|
||||||
this.showDialog = false;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.portRangeChange();
|
|
||||||
addmediaServer(this.mediaServerForm).then((response) => {
|
|
||||||
this.$modal.msgSuccess(this.$t('addSuccess'));
|
|
||||||
this.showDialog = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.$parent.getServerList();
|
|
||||||
this.$parent.delay();
|
|
||||||
},
|
|
||||||
close: function () {
|
|
||||||
this.showDialog = false;
|
|
||||||
this.dialogLoading = false;
|
|
||||||
this.mediaServerForm = {
|
|
||||||
serverId: '',
|
|
||||||
ip: '',
|
|
||||||
domain: '',
|
|
||||||
autoConfig: true,
|
|
||||||
hookurl: '',
|
|
||||||
secret: '',
|
|
||||||
portHttp: '',
|
|
||||||
portHttps: '',
|
|
||||||
recordPort: '',
|
|
||||||
portRtmp: '',
|
|
||||||
portRtsp: '',
|
|
||||||
rtpEnable: true,
|
|
||||||
rtpPortRange: '',
|
|
||||||
rtpProxyPort: '',
|
|
||||||
};
|
|
||||||
this.rtpPortRange1 = 30000;
|
|
||||||
this.rtpPortRange2 = 30100;
|
|
||||||
this.listChangeCallback = null;
|
|
||||||
this.currentStep = 1;
|
|
||||||
},
|
|
||||||
portRangeChange: function () {
|
|
||||||
if (this.mediaServerForm.rtpEnable) {
|
|
||||||
this.mediaServerForm.rtpPortRange = this.rtpPortRange1 + ',' + this.rtpPortRange2;
|
|
||||||
console.log(this.mediaServerForm.rtpPortRange);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectUser() {
|
|
||||||
this.$refs.userList.open = true;
|
|
||||||
this.$refs.userList.getList();
|
|
||||||
},
|
|
||||||
getUserData(user) {
|
|
||||||
this.tempTenantId = user.userId;
|
|
||||||
this.tempTenantName = user.userName;
|
|
||||||
this.mediaServerForm.tenantId = user.userId;
|
|
||||||
this.mediaServerForm.tenantName = user.userName;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login-wrap">
|
||||||
<el-row>
|
<div class="logo-wrap">
|
||||||
<el-col :xs="24">
|
<img class="icon" src="@/assets/images/logo_blue.png" />
|
||||||
<div style="color: #fff; background-color: #0f73ee; width: 100%; height: 200px; text-align: center; padding: 15px; font-family: '微软雅黑'">
|
<span class="text">{{ $t('login.989807-37') }}</span>
|
||||||
<div style="font-size: 42px; padding-top: 40px; width: 300px; margin: 0 auto">
|
</div>
|
||||||
<img :src="logo" alt="logo" style="width: 100px; height: 100px; float: left" />
|
<pre class="introduce-text">{{ $t('login.989807-38') }}</pre>
|
||||||
<div style="float: left; margin-top: 13px; width: 200px; text-align: left">
|
<div class="img-wrap">
|
||||||
<div>FastBee</div>
|
<img style="width: 100%; height: 100%" src="@/assets/images/cover.png" />
|
||||||
<div style="letter-spacing: 1.5px; font-size: 20px; font-weight: 600; margin-top: -8px; margin-left: 3px">{{ $t('login.989807-0') }}</div>
|
</div>
|
||||||
</div>
|
<div class="box-wrap">
|
||||||
</div>
|
<div class="form-box">
|
||||||
|
<div class="title-wrap">
|
||||||
|
<div v-if="!bindId" class="name">{{ $t('login.989807-1') }}</div>
|
||||||
|
<div v-else class="name">{{ $t('login.989807-36') }}</div>
|
||||||
|
<langSelect class="lang"></langSelect>
|
||||||
</div>
|
</div>
|
||||||
|
<pre class="demo-account">{{ $t('login.989807-33') }}</pre>
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="alert-box-wrap" v-if="loginForm.bindId != null">
|
<div class="alert-box-wrap" v-if="loginForm.bindId != null">
|
||||||
@@ -54,15 +58,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div style="display: flex; justify-content: space-between">
|
<div style="display: flex; justify-content: space-between">
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px; color: #000">{{ $t('login.989807-7') }}</el-checkbox>
|
<el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px; color: #000">{{ $t('login.989807-7') }}</el-checkbox>
|
||||||
<langSelect class="lang"></langSelect>
|
|
||||||
</div>
|
</div>
|
||||||
<el-form-item style="width: 100%">
|
<el-form-item style="width: 100%">
|
||||||
<div style="margin-bottom: 10px">
|
<div style="margin-bottom: 10px">
|
||||||
<!-- <el-button v-if="!bindAccount" :loading="loading" type="primary" style="width: 100%"
|
|
||||||
@click.native.prevent="handleLogin">
|
|
||||||
<span v-if="!loading">登 录</span>
|
|
||||||
<span v-else>登 录 中...</span>
|
|
||||||
</el-button> -->
|
|
||||||
<div v-if="!bindId">
|
<div v-if="!bindId">
|
||||||
<el-button class="btn" :loading="loading" type="primary" @click.native.prevent="handleLogin">
|
<el-button class="btn" :loading="loading" type="primary" @click.native.prevent="handleLogin">
|
||||||
<span v-if="!loading">{{ $t('login.989807-3') }}</span>
|
<span v-if="!loading">{{ $t('login.989807-3') }}</span>
|
||||||
@@ -78,13 +76,13 @@
|
|||||||
<span>{{ $t('login.989807-44') }}</span>
|
<span>{{ $t('login.989807-44') }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-row>
|
<div class="other-link">
|
||||||
<div>
|
<el-link href="https://fastbee.cn/" :underline="false" target="_blank">{{ $t('login.989807-41') }}</el-link>
|
||||||
<el-link href="https://fastbee.cn/" :underline="false" target="_blank" style="float: left">{{ $t('login.989807-41') }}</el-link>
|
<el-divider direction="vertical"></el-divider>
|
||||||
<el-link href="https://fastbee.cn/doc" :underline="false" target="_blank" style="float: left; margin-left: 20px">{{ $t('login.989807-40') }}</el-link>
|
<el-link href="https://fastbee.cn/doc" :underline="false" target="_blank">{{ $t('login.989807-40') }}</el-link>
|
||||||
<router-link v-if="!bindAccount" :to="{ path: '/register', query: this.$route.query }" style="float: left; margin-left: 20px">{{ $t('login.989807-18') }}</router-link>
|
<el-divider direction="vertical"></el-divider>
|
||||||
</div>
|
<router-link v-if="!bindAccount" :to="{ path: '/register', query: this.$route.query }">{{ $t('login.989807-18') }}</router-link>
|
||||||
</el-row>
|
</div>
|
||||||
<div class="other-login">
|
<div class="other-login">
|
||||||
<span class="text">{{ $t('login.989807-42') }}</span>
|
<span class="text">{{ $t('login.989807-42') }}</span>
|
||||||
<svg-icon class="icon" icon-class="wechat" style="color: #07c160" @click="handleGotoWeChatLogin" />
|
<svg-icon class="icon" icon-class="wechat" style="color: #07c160" @click="handleGotoWeChatLogin" />
|
||||||
@@ -92,15 +90,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</div>
|
||||||
</el-row>
|
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div class="el-login-footer">
|
<div class="el-login-footer">
|
||||||
<span>
|
<span>
|
||||||
Copyright © 2021-2025
|
Copyright © 2021-2026
|
||||||
<a target="_blank" href="http://fastbee.cn">FastBee</a>
|
<a target="_blank" href="http://fastbee.cn">FastBee</a>
|
||||||
All Rights Reserved.
|
All Rights Reserved.
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -469,22 +468,157 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.login {
|
.login-wrap {
|
||||||
height: 100%;
|
user-select: none;
|
||||||
overflow: auto;
|
height: 100vh;
|
||||||
|
max-width: 100%;
|
||||||
|
width: 100vw;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.logo-wrap {
|
||||||
|
position: absolute;
|
||||||
|
top: 80px;
|
||||||
|
left: 80px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 42px;
|
||||||
|
height: 46px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 36px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-left: 12px;
|
||||||
|
color: #486ff2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.introduce-text {
|
||||||
|
position: absolute;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #909399;
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
top: 146px;
|
||||||
|
left: 80px;
|
||||||
|
width: 500px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-wrap {
|
||||||
|
flex: 1;
|
||||||
|
background: #0f73ee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-wrap {
|
||||||
|
position: relative;
|
||||||
|
width: 608px;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.form-box {
|
||||||
|
margin-top: -8%; // 上移35下面留宽一点
|
||||||
|
width: 300px;
|
||||||
|
|
||||||
|
.title-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
::v-deep .el-dropdown {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-account {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #909399;
|
||||||
|
margin: 40px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-wrap {
|
||||||
|
::v-deep .el-form-item {
|
||||||
|
margin-bottom: 21px;
|
||||||
|
|
||||||
|
.el-form-item__content {
|
||||||
|
line-height: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: left;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
margin-top: 26px;
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.other-link {
|
||||||
|
margin-top: 17px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.login-image {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bindAccountTitle {
|
.cover-image {
|
||||||
margin: 0px auto 30px auto;
|
width: 100%;
|
||||||
text-align: center;
|
height: 100%;
|
||||||
color: #333;
|
object-fit: cover;
|
||||||
font-size: 24px;
|
}
|
||||||
|
|
||||||
|
.login-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-header {
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
margin: 30px auto 0 auto;
|
flex: 1;
|
||||||
padding: 15px;
|
padding: 0px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
max-width: 350px;
|
max-width: 350px;
|
||||||
|
|
||||||
@@ -514,16 +648,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-login-footer {
|
.el-login-footer {
|
||||||
height: 40px;
|
position: absolute;
|
||||||
line-height: 40px;
|
bottom: 24px;
|
||||||
position: fixed;
|
font-weight: 400;
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
color: #333;
|
|
||||||
font-family: Arial;
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
letter-spacing: 1px;
|
color: #909399;
|
||||||
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert-box-wrap {
|
.alert-box-wrap {
|
||||||
@@ -542,6 +672,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.other-login {
|
.other-login {
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -555,4 +686,66 @@ export default {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 响应式设计:当屏幕小于768px时,只显示右侧登录表单
|
||||||
|
@media (max-width: 767.98px) {
|
||||||
|
.login-right {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 1920px) {
|
||||||
|
.login-wrap .box-wrap {
|
||||||
|
width: 811px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 1180px) {
|
||||||
|
.login-wrap .box-wrap {
|
||||||
|
width: 498px;
|
||||||
|
|
||||||
|
.form-box {
|
||||||
|
width: 246px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-wrap .logo-wrap {
|
||||||
|
top: 66px;
|
||||||
|
left: 66px;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 34px;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 29px;
|
||||||
|
margin-left: 10px;
|
||||||
|
color: #486ff2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-wrap .introduce-text {
|
||||||
|
font-size: 11px;
|
||||||
|
top: 120px;
|
||||||
|
left: 66px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 968px) {
|
||||||
|
.login-wrap .img-wrap {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-wrap .logo-wrap {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-wrap .introduce-text {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-wrap .box-wrap {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
372
vue/src/views/monitor/cache/list.vue
vendored
372
vue/src/views/monitor/cache/list.vue
vendored
@@ -1,241 +1,161 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-card style="height: calc(100vh - 125px)">
|
<el-card style="height: calc(100vh - 125px)">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span>{{ $t('monitor.cache.list.501235-0') }}</span>
|
<span>{{ $t('monitor.cache.list.501235-0') }}</span>
|
||||||
<el-button
|
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-refresh-right" @click="refreshCacheNames()"></el-button>
|
||||||
style="float: right; padding: 3px 0"
|
</div>
|
||||||
type="text"
|
<el-table v-loading="loading" :data="cacheNames" :height="tableHeight" highlight-current-row @row-click="getCacheKeys" style="width: 100%">
|
||||||
icon="el-icon-refresh-right"
|
<el-table-column :label="$t('monitor.cache.list.501235-1')" width="60" type="index"></el-table-column>
|
||||||
@click="refreshCacheNames()"
|
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
<el-table
|
|
||||||
v-loading="loading"
|
|
||||||
:data="cacheNames"
|
|
||||||
:height="tableHeight"
|
|
||||||
highlight-current-row
|
|
||||||
@row-click="getCacheKeys"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-table-column
|
|
||||||
:label="$t('monitor.cache.list.501235-1')"
|
|
||||||
width="60"
|
|
||||||
type="index"
|
|
||||||
></el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column :label="$t('monitor.cache.list.501235-2')" align="center" prop="cacheName" :show-overflow-tooltip="true" :formatter="nameFormatter"></el-table-column>
|
||||||
:label="$t('monitor.cache.list.501235-2')"
|
|
||||||
align="center"
|
|
||||||
prop="cacheName"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
:formatter="nameFormatter"
|
|
||||||
></el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column :label="$t('remark')" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||||
:label="$t('common.remark')"
|
<el-table-column :label="$t('opation')" width="60" align="center" class-name="small-padding fixed-width">
|
||||||
align="center"
|
<template slot-scope="scope">
|
||||||
prop="remark"
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleClearCacheName(scope.row)"></el-button>
|
||||||
:show-overflow-tooltip="true"
|
</template>
|
||||||
/>
|
</el-table-column>
|
||||||
<el-table-column
|
</el-table>
|
||||||
:label="$t('common.opation')"
|
</el-card>
|
||||||
width="60"
|
</el-col>
|
||||||
align="center"
|
|
||||||
class-name="small-padding fixed-width"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleClearCacheName(scope.row)"
|
|
||||||
></el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-card style="height: calc(100vh - 125px)">
|
<el-card style="height: calc(100vh - 125px)">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span>{{ $t('monitor.cache.list.501235-5') }}</span>
|
<span>{{ $t('monitor.cache.list.501235-5') }}</span>
|
||||||
<el-button
|
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-refresh-right" @click="refreshCacheKeys()"></el-button>
|
||||||
style="float: right; padding: 3px 0"
|
</div>
|
||||||
type="text"
|
<el-table v-loading="subLoading" :data="cacheKeys" :height="tableHeight" highlight-current-row @row-click="handleCacheValue" style="width: 100%">
|
||||||
icon="el-icon-refresh-right"
|
<el-table-column :label="$t('monitor.cache.list.501235-1')" width="60" type="index"></el-table-column>
|
||||||
@click="refreshCacheKeys()"
|
<el-table-column :label="$t('monitor.cache.list.501235-6')" align="center" :show-overflow-tooltip="true" :formatter="keyFormatter"></el-table-column>
|
||||||
></el-button>
|
<el-table-column :label="$t('opation')" width="60" align="center" class-name="small-padding fixed-width">
|
||||||
</div>
|
<template slot-scope="scope">
|
||||||
<el-table
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleClearCacheKey(scope.row)"></el-button>
|
||||||
v-loading="subLoading"
|
</template>
|
||||||
:data="cacheKeys"
|
</el-table-column>
|
||||||
:height="tableHeight"
|
</el-table>
|
||||||
highlight-current-row
|
</el-card>
|
||||||
@row-click="handleCacheValue"
|
</el-col>
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-table-column
|
|
||||||
:label="$t('monitor.cache.list.501235-1')"
|
|
||||||
width="60"
|
|
||||||
type="index"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
:label="$t('monitor.cache.list.501235-6')"
|
|
||||||
align="center"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
:formatter="keyFormatter"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
:label="$t('common.opation')"
|
|
||||||
width="60"
|
|
||||||
align="center"
|
|
||||||
class-name="small-padding fixed-width"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleClearCacheKey(scope.row)"
|
|
||||||
></el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-card :bordered="false" style="height: calc(100vh - 125px)">
|
<el-card :bordered="false" style="height: calc(100vh - 125px)">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span>{{ $t('monitor.cache.list.501235-7') }}</span>
|
<span>{{ $t('monitor.cache.list.501235-7') }}</span>
|
||||||
<el-button
|
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-refresh-right" @click="handleClearCacheAll()">{{ $t('monitor.cache.list.501235-11') }}</el-button>
|
||||||
style="float: right; padding: 3px 0"
|
</div>
|
||||||
type="text"
|
<el-form :model="cacheForm">
|
||||||
icon="el-icon-refresh-right"
|
<el-row :gutter="32">
|
||||||
@click="handleClearCacheAll()"
|
<el-col :offset="1" :span="22">
|
||||||
>{{ $t('monitor.cache.list.501235-11') }}</el-button
|
<el-form-item :label="$t('monitor.cache.list.501235-8')" prop="cacheName">
|
||||||
>
|
<el-input v-model="cacheForm.cacheName" :readOnly="true" />
|
||||||
</div>
|
</el-form-item>
|
||||||
<el-form :model="cacheForm">
|
</el-col>
|
||||||
<el-row :gutter="32">
|
<el-col :offset="1" :span="22">
|
||||||
<el-col :offset="1" :span="22">
|
<el-form-item :label="$t('monitor.cache.list.501235-9')" prop="cacheKey">
|
||||||
<el-form-item :label="$t('monitor.cache.list.501235-8')" prop="cacheName">
|
<el-input v-model="cacheForm.cacheKey" :readOnly="true" />
|
||||||
<el-input v-model="cacheForm.cacheName" :readOnly="true" />
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
<el-col :offset="1" :span="22">
|
||||||
<el-col :offset="1" :span="22">
|
<el-form-item :label="$t('monitor.cache.list.501235-10')" prop="cacheValue">
|
||||||
<el-form-item :label="$t('monitor.cache.list.501235-9')" prop="cacheKey">
|
<el-input v-model="cacheForm.cacheValue" type="textarea" :rows="8" :readOnly="true" />
|
||||||
<el-input v-model="cacheForm.cacheKey" :readOnly="true" />
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
<el-col :offset="1" :span="22">
|
</el-form>
|
||||||
<el-form-item :label="$t('monitor.cache.list.501235-10')" prop="cacheValue">
|
</el-card>
|
||||||
<el-input
|
</el-col>
|
||||||
v-model="cacheForm.cacheValue"
|
</el-row>
|
||||||
type="textarea"
|
</div>
|
||||||
:rows="8"
|
|
||||||
:readOnly="true"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listCacheName, listCacheKey, getCacheValue, clearCacheName, clearCacheKey, clearCacheAll } from "@/api/monitor/cache";
|
import { listCacheName, listCacheKey, getCacheValue, clearCacheName, clearCacheKey, clearCacheAll } from '@/api/monitor/cache';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CacheList",
|
name: 'CacheList',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
cacheNames: [],
|
cacheNames: [],
|
||||||
cacheKeys: [],
|
cacheKeys: [],
|
||||||
cacheForm: {},
|
cacheForm: {},
|
||||||
loading: true,
|
loading: true,
|
||||||
subLoading: false,
|
subLoading: false,
|
||||||
nowCacheName: "",
|
nowCacheName: '',
|
||||||
tableHeight: window.innerHeight - 200
|
tableHeight: window.innerHeight - 200,
|
||||||
};
|
};
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getCacheNames();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询缓存名称列表 */
|
|
||||||
getCacheNames() {
|
|
||||||
this.loading = true;
|
|
||||||
listCacheName().then(response => {
|
|
||||||
this.cacheNames = response.data;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 刷新缓存名称列表 */
|
created() {
|
||||||
refreshCacheNames() {
|
this.getCacheNames();
|
||||||
this.getCacheNames();
|
|
||||||
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-12'));
|
|
||||||
},
|
},
|
||||||
/** 清理指定名称缓存 */
|
methods: {
|
||||||
handleClearCacheName(row) {
|
/** 查询缓存名称列表 */
|
||||||
clearCacheName(row.cacheName).then(response => {
|
getCacheNames() {
|
||||||
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-13', [this.nowCacheName]));
|
this.loading = true;
|
||||||
this.getCacheKeys();
|
listCacheName().then((response) => {
|
||||||
});
|
this.cacheNames = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 刷新缓存名称列表 */
|
||||||
|
refreshCacheNames() {
|
||||||
|
this.getCacheNames();
|
||||||
|
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-12'));
|
||||||
|
},
|
||||||
|
/** 清理指定名称缓存 */
|
||||||
|
handleClearCacheName(row) {
|
||||||
|
clearCacheName(row.cacheName).then((response) => {
|
||||||
|
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-13', [this.nowCacheName]));
|
||||||
|
this.getCacheKeys();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询缓存键名列表 */
|
||||||
|
getCacheKeys(row) {
|
||||||
|
const cacheName = row !== undefined ? row.cacheName : this.nowCacheName;
|
||||||
|
if (cacheName === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.subLoading = true;
|
||||||
|
listCacheKey(cacheName).then((response) => {
|
||||||
|
this.cacheKeys = response.data;
|
||||||
|
this.subLoading = false;
|
||||||
|
this.nowCacheName = cacheName;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 刷新缓存键名列表 */
|
||||||
|
refreshCacheKeys() {
|
||||||
|
this.getCacheKeys();
|
||||||
|
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-14'));
|
||||||
|
},
|
||||||
|
/** 清理指定键名缓存 */
|
||||||
|
handleClearCacheKey(cacheKey) {
|
||||||
|
clearCacheKey(cacheKey).then((response) => {
|
||||||
|
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-15', [cacheKey]));
|
||||||
|
this.getCacheKeys();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 列表前缀去除 */
|
||||||
|
nameFormatter(row) {
|
||||||
|
return row.cacheName.replace(':', '');
|
||||||
|
},
|
||||||
|
/** 键名前缀去除 */
|
||||||
|
keyFormatter(cacheKey) {
|
||||||
|
return cacheKey.replace(this.nowCacheName, '');
|
||||||
|
},
|
||||||
|
/** 查询缓存内容详细 */
|
||||||
|
handleCacheValue(cacheKey) {
|
||||||
|
getCacheValue(this.nowCacheName, cacheKey).then((response) => {
|
||||||
|
this.cacheForm = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 清理全部缓存 */
|
||||||
|
handleClearCacheAll() {
|
||||||
|
clearCacheAll().then((response) => {
|
||||||
|
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-16'));
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
/** 查询缓存键名列表 */
|
|
||||||
getCacheKeys(row) {
|
|
||||||
const cacheName = row !== undefined ? row.cacheName : this.nowCacheName;
|
|
||||||
if (cacheName === "") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.subLoading = true;
|
|
||||||
listCacheKey(cacheName).then(response => {
|
|
||||||
this.cacheKeys = response.data;
|
|
||||||
this.subLoading = false;
|
|
||||||
this.nowCacheName = cacheName;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 刷新缓存键名列表 */
|
|
||||||
refreshCacheKeys() {
|
|
||||||
this.getCacheKeys();
|
|
||||||
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-14'));
|
|
||||||
},
|
|
||||||
/** 清理指定键名缓存 */
|
|
||||||
handleClearCacheKey(cacheKey) {
|
|
||||||
clearCacheKey(cacheKey).then(response => {
|
|
||||||
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-15', [cacheKey]));
|
|
||||||
this.getCacheKeys();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 列表前缀去除 */
|
|
||||||
nameFormatter(row) {
|
|
||||||
return row.cacheName.replace(":", "");
|
|
||||||
},
|
|
||||||
/** 键名前缀去除 */
|
|
||||||
keyFormatter(cacheKey) {
|
|
||||||
return cacheKey.replace(this.nowCacheName, "");
|
|
||||||
},
|
|
||||||
/** 查询缓存内容详细 */
|
|
||||||
handleCacheValue(cacheKey) {
|
|
||||||
getCacheValue(this.nowCacheName, cacheKey).then(response => {
|
|
||||||
this.cacheForm = response.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 清理全部缓存 */
|
|
||||||
handleClearCacheAll() {
|
|
||||||
clearCacheAll().then(response => {
|
|
||||||
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-16'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,324 +1,259 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item :label="$t('operlog.874509-10')" prop="operIp">
|
<el-form-item :label="$t('operlog.874509-10')" prop="operIp">
|
||||||
<el-input
|
<el-input v-model="queryParams.operIp" :placeholder="$t('operlog.874509-10')" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.operIp"
|
|
||||||
:placeholder="$t('operlog.874509-10')"
|
|
||||||
clearable
|
|
||||||
style="width: 240px;"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('operlog.874509-0')" prop="title">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.title"
|
|
||||||
:placeholder="$t('operlog.874509-1')"
|
|
||||||
clearable
|
|
||||||
style="width: 240px;"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('operlog.874509-2')" prop="operName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.operName"
|
|
||||||
:placeholder="$t('operlog.874509-3')"
|
|
||||||
clearable
|
|
||||||
style="width: 240px;"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('system.notice.670989-4')" prop="businessType">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.businessType"
|
|
||||||
:placeholder="$t('operlog.874509-4')"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
>
|
|
||||||
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.sys_oper_type"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('status')" prop="status">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.status"
|
|
||||||
:placeholder="$t('operlog.874509-5')"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.sys_common_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('operlog.874509-6')">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="dateRange"
|
|
||||||
style="width: 240px"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="daterange"
|
|
||||||
range-separator="-"
|
|
||||||
:start-placeholder="$t('system.dict.index.880996-3')"
|
|
||||||
:end-placeholder="$t('system.dict.index.880996-4')"
|
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
|
||||||
></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['monitor:operlog:remove']"
|
|
||||||
>{{ $t('del') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
@click="handleClean"
|
|
||||||
v-hasPermi="['monitor:operlog:remove']"
|
|
||||||
>{{ $t('operlog.874509-7') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['monitor:operlog:export']"
|
|
||||||
>{{ $t('export') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
|
||||||
<el-table-column :label="$t('operlog.874509-8')" align="center" prop="operId" />
|
|
||||||
<el-table-column :label="$t('operlog.874509-0')" align="center" prop="title" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column :label="$t('operlog.874509-4')" align="center" prop="businessType">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.sys_oper_type" :value="scope.row.businessType"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :label="$t('operlog.874509-2')" align="center" prop="operName" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
|
|
||||||
<el-table-column :label="$t('operlog.874509-10')" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column :label="$t('operlog.874509-11')" align="center" prop="operLocation" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column :label="$t('operlog.874509-30')" align="center" prop="status">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :label="$t('operlog.874509-12')" align="center" prop="operTime" width="160" sortable="custom" :sort-orders="['descending', 'ascending']">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.operTime) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :label="$t('operlog.874509-31') align="center" prop="costTime" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ scope.row.costTime }}ms</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-view"
|
|
||||||
@click="handleView(scope.row,scope.index)"
|
|
||||||
v-hasPermi="['monitor:operlog:query']"
|
|
||||||
>{{ $t('operlog.874509-13') }}</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 操作日志详细 -->
|
|
||||||
<el-dialog :title="$t('operlog.874509-14')" :visible.sync="open" width="800px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item :label="$t('operlog.874509-15')">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
:label="$t('operlog.874509-16')"
|
|
||||||
>{{ form.operName }} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item :label="$t('operlog.874509-17')">{{ form.operUrl }}</el-form-item>
|
|
||||||
<el-form-item :label="$t('operlog.874509-18')">{{ form.requestMethod }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item :label="$t('operlog.874509-19')">{{ form.method }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item :label="$t('operlog.874509-20')">{{ form.operParam }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item :label="$t('operlog.874509-21')">{{ form.jsonResult }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item :label="$t('operlog.874509-22')">
|
|
||||||
<div v-if="form.status === 0">{{ $t('operlog.874509-23') }}</div>
|
|
||||||
<div v-else-if="form.status === 1">{{ $t('operlog.874509-24') }}</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item :label="$t('operlog.874509-0')" prop="title">
|
||||||
<el-col :span="8">
|
<el-input v-model="queryParams.title" :placeholder="$t('operlog.874509-1')" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
|
||||||
<el-form-item :label="$t('operlog.874509-31')">{{ form.costTime }}ms</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item :label="$t('operlog.874509-2')" prop="operName">
|
||||||
<el-col :span="8">
|
<el-input v-model="queryParams.operName" :placeholder="$t('operlog.874509-3')" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
|
||||||
<el-form-item :label="$t('operlog.874509-25')">{{ parseTime(form.operTime) }}</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item :label="$t('system.notice.670989-4')" prop="businessType">
|
||||||
<el-col :span="24">
|
<el-select v-model="queryParams.businessType" :placeholder="$t('operlog.874509-4')" clearable style="width: 240px">
|
||||||
<el-form-item :label="$t('operlog.874509-26')" v-if="form.status === 1">{{ form.errorMsg }}</el-form-item>
|
<el-option v-for="dict in dict.type.sys_oper_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-col>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('status')" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" :placeholder="$t('operlog.874509-5')" clearable style="width: 240px">
|
||||||
|
<el-option v-for="dict in dict.type.sys_common_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('operlog.874509-6')">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRange"
|
||||||
|
style="width: 240px"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
:start-placeholder="$t('system.dict.index.880996-3')"
|
||||||
|
:end-placeholder="$t('system.dict.index.880996-4')"
|
||||||
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['monitor:operlog:remove']">{{ $t('del') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" @click="handleClean" v-hasPermi="['monitor:operlog:remove']">{{ $t('operlog.874509-7') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['monitor:operlog:export']">{{ $t('export') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||||
<el-button @click="open = false">{{ $t('close') }}</el-button>
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
</div>
|
<el-table-column :label="$t('operlog.874509-8')" align="center" prop="operId" />
|
||||||
</el-dialog>
|
<el-table-column :label="$t('operlog.874509-0')" align="center" prop="title" :show-overflow-tooltip="true" />
|
||||||
</div>
|
<el-table-column :label="$t('operlog.874509-4')" align="center" prop="businessType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_oper_type" :value="scope.row.businessType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('operlog.874509-2')" align="center" prop="operName" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
|
||||||
|
<el-table-column :label="$t('operlog.874509-10')" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column :label="$t('operlog.874509-11')" align="center" prop="operLocation" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column :label="$t('operlog.874509-30')" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('operlog.874509-12')" align="center" prop="operTime" width="160" sortable="custom" :sort-orders="['descending', 'ascending']">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.operTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('operlog.874509-31')" align="center" prop="costTime" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.costTime }}ms</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row, scope.index)" v-hasPermi="['monitor:operlog:query']">{{ $t('operlog.874509-13') }}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||||
|
|
||||||
|
<!-- 操作日志详细 -->
|
||||||
|
<el-dialog :title="$t('operlog.874509-14')" :visible.sync="open" width="800px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :label="$t('operlog.874509-15')">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
|
||||||
|
<el-form-item :label="$t('operlog.874509-16')">{{ form.operName }} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :label="$t('operlog.874509-17')">{{ form.operUrl }}</el-form-item>
|
||||||
|
<el-form-item :label="$t('operlog.874509-18')">{{ form.requestMethod }}</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="$t('operlog.874509-19')">{{ form.method }}</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="$t('operlog.874509-20')">{{ form.operParam }}</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="$t('operlog.874509-21')">{{ form.jsonResult }}</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item :label="$t('operlog.874509-22')">
|
||||||
|
<div v-if="form.status === 0">{{ $t('operlog.874509-23') }}</div>
|
||||||
|
<div v-else-if="form.status === 1">{{ $t('operlog.874509-24') }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item :label="$t('operlog.874509-31')">{{ form.costTime }}ms</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item :label="$t('operlog.874509-25')">{{ parseTime(form.operTime) }}</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="$t('operlog.874509-26')" v-if="form.status === 1">{{ form.errorMsg }}</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="open = false">{{ $t('close') }}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog";
|
import { list, delOperlog, cleanOperlog } from '@/api/monitor/operlog';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Operlog",
|
name: 'Operlog',
|
||||||
dicts: ['sys_oper_type', 'sys_common_status'],
|
dicts: ['sys_oper_type', 'sys_common_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 表格数据
|
// 表格数据
|
||||||
list: [],
|
list: [],
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
// 默认排序
|
// 默认排序
|
||||||
defaultSort: {prop: 'operTime', order: 'descending'},
|
defaultSort: { prop: 'operTime', order: 'descending' },
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
operIp: undefined,
|
operIp: undefined,
|
||||||
title: undefined,
|
title: undefined,
|
||||||
operName: undefined,
|
operName: undefined,
|
||||||
businessType: undefined,
|
businessType: undefined,
|
||||||
status: undefined
|
status: undefined,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询登录日志 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
|
||||||
this.list = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
// 操作日志类型字典翻译
|
created() {
|
||||||
typeFormat(row, column) {
|
|
||||||
return this.selectDictLabel(this.dict.type.sys_oper_type, row.businessType);
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.dateRange = [];
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
|
|
||||||
},
|
|
||||||
/** 多选框选中数据 */
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.operId)
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 排序触发事件 */
|
|
||||||
handleSortChange(column, prop, order) {
|
|
||||||
this.queryParams.orderByColumn = column.prop;
|
|
||||||
this.queryParams.isAsc = column.order;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 详细按钮操作 */
|
|
||||||
handleView(row) {
|
|
||||||
this.open = true;
|
|
||||||
this.form = row;
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const operIds = row.operId || this.ids;
|
|
||||||
this.$modal.confirm(this.$t('operlog.874509-27', [operIds])).then(function() {
|
|
||||||
return delOperlog(operIds);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess(this.$t('delSuccess'));
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
},
|
||||||
/** 清空按钮操作 */
|
methods: {
|
||||||
handleClean() {
|
/** 查询登录日志 */
|
||||||
this.$modal.confirm(this.$t('operlog.874509-28')).then(function() {
|
getList() {
|
||||||
return cleanOperlog();
|
this.loading = true;
|
||||||
}).then(() => {
|
list(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
|
||||||
this.getList();
|
this.list = response.rows;
|
||||||
this.$modal.msgSuccess(this.$t('operlog.874509-29'));
|
this.total = response.total;
|
||||||
}).catch(() => {});
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 操作日志类型字典翻译
|
||||||
|
typeFormat(row, column) {
|
||||||
|
return this.selectDictLabel(this.dict.type.sys_oper_type, row.businessType);
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.dateRange = [];
|
||||||
|
this.resetForm('queryForm');
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
||||||
|
},
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map((item) => item.operId);
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 排序触发事件 */
|
||||||
|
handleSortChange(column, prop, order) {
|
||||||
|
this.queryParams.orderByColumn = column.prop;
|
||||||
|
this.queryParams.isAsc = column.order;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 详细按钮操作 */
|
||||||
|
handleView(row) {
|
||||||
|
this.open = true;
|
||||||
|
this.form = row;
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const operIds = row.operId || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm(this.$t('operlog.874509-27', [operIds]))
|
||||||
|
.then(function () {
|
||||||
|
return delOperlog(operIds);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess(this.$t('delSuccess'));
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 清空按钮操作 */
|
||||||
|
handleClean() {
|
||||||
|
this.$modal
|
||||||
|
.confirm(this.$t('operlog.874509-28'))
|
||||||
|
.then(function () {
|
||||||
|
return cleanOperlog();
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess(this.$t('operlog.874509-29'));
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download(
|
||||||
|
'monitor/operlog/export',
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`operlog_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('monitor/operlog/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `operlog_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,324 +1,598 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="register">
|
<div class="register-wrap">
|
||||||
<el-row>
|
<div class="logo-wrap">
|
||||||
<el-col :xs="24">
|
<img class="icon" src="@/assets/images/logo_blue.png" />
|
||||||
<div
|
<span class="text">{{ $t('login.989807-37') }}</span>
|
||||||
style="color: #fff; background-color: #0f73ee; width: 100%; height: 200px; text-align: center; padding: 15px; font-family: '微软雅黑'">
|
|
||||||
<div style="font-size: 42px; padding-top: 40px; width: 300px; margin: 0 auto">
|
|
||||||
<img :src="logo" alt="logo" style="width: 100px; height: 100px; float: left" />
|
|
||||||
<div style="float: left; margin-top: 13px; width: 200px; text-align: left">
|
|
||||||
<div>FastBee</div>
|
|
||||||
<div style="letter-spacing: 1.5px; font-size: 20px; font-weight: 600; margin-top: -8px; margin-left: 3px">
|
|
||||||
{{ $t('login.989807-0') }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form"
|
<pre class="introduce-text">{{ $t('login.989807-38') }}</pre>
|
||||||
style="z-index: 1000;">
|
<div class="img-wrap">
|
||||||
<el-form-item prop="username">
|
<img style="width: 100%; height: 100%" src="@/assets/images/cover.png" />
|
||||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" :placeholder="$t('login.989807-20')">
|
</div>
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<div class="box-wrap">
|
||||||
</el-input>
|
<!-- 注册表单 -->
|
||||||
</el-form-item>
|
<div class="form-box" v-show="!isHaveBind && !errorText && formIndex === 1">
|
||||||
<el-form-item prop="phonenumber">
|
<div class="title-wrap">
|
||||||
<el-input v-model="registerForm.phonenumber" type="text" auto-complete="off" :placeholder="$t('register.974236-14')">
|
<div class="name">{{ $t('register.974236-0') }}</div>
|
||||||
<svg-icon slot="prefix" icon-class="phone" class="el-input__icon input-icon" />
|
<langSelect class="lang"></langSelect>
|
||||||
</el-input>
|
</div>
|
||||||
</el-form-item>
|
<el-form class="form-wrap" id="registerForm" ref="registerForm" :model="registerForm" :rules="registerRules">
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="registerForm.password" type="password" auto-complete="off" :placeholder="$t('login.989807-21')"
|
<div class="item-wrap">
|
||||||
@keyup.enter.native="handleRegister">
|
<div class="input-wrap">
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<input class="inner" v-model="registerForm.username" auto-complete="off" type="text" :placeholder="$t('login.989807-20')" />
|
||||||
</el-input>
|
</div>
|
||||||
</el-form-item>
|
</div>
|
||||||
<el-form-item prop="confirmPassword">
|
</el-form-item>
|
||||||
<el-input v-model="registerForm.confirmPassword" type="password" auto-complete="off" :placeholder="$t('login.989807-48')"
|
<el-form-item prop="phonenumber">
|
||||||
@keyup.enter.native="handleRegister">
|
<div class="item-wrap">
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<div class="input-wrap">
|
||||||
</el-input>
|
<input class="inner" v-model="registerForm.phonenumber" auto-complete="off" type="text" :placeholder="$t('register.974236-14')" />
|
||||||
</el-form-item>
|
</div>
|
||||||
<el-form-item v-if="captchaOnOff" prop="code">
|
</div>
|
||||||
<el-input v-model="registerForm.code" auto-complete="off" :placeholder="$t('login.989807-22')" style="width: 63%"
|
</el-form-item>
|
||||||
@keyup.enter.native="handleRegister">
|
<el-form-item prop="password">
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<div class="item-wrap">
|
||||||
</el-input>
|
<div class="input-wrap">
|
||||||
<div class="register-code">
|
<input class="inner" v-model="registerForm.password" auto-complete="off" :type="pwdtype" :placeholder="$t('login.989807-21')" />
|
||||||
<img :src="codeUrl" @click="getCode" />
|
<span class="el-icon-view icon" @click="handlePasswordTypeChange()"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="confirmPassword">
|
||||||
|
<div class="item-wrap">
|
||||||
|
<div class="input-wrap">
|
||||||
|
<input class="inner" v-model="registerForm.confirmPassword" auto-complete="off" :type="pwdtype" :placeholder="$t('login.989807-48')" />
|
||||||
|
<span class="el-icon-view icon" @click="handlePasswordTypeChange()"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="captchaOnOff" prop="code">
|
||||||
|
<div class="item-wrap">
|
||||||
|
<div class="input-wrap">
|
||||||
|
<input class="inner" v-model="registerForm.code" auto-complete="off" type="text" :placeholder="$t('login.989807-22')" />
|
||||||
|
</div>
|
||||||
|
<img class="input-append" :src="codeUrl" @click="getCode" />
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<div class="item-wrap">
|
||||||
|
<el-checkbox v-model="registerForm.agree">
|
||||||
|
{{ $t('login.989807-53') }}
|
||||||
|
<span style="color: #486ff2; cursor: pointer" @click="handleGotoPrivacyPolicy">
|
||||||
|
{{ $t('login.989807-54') }}
|
||||||
|
</span>
|
||||||
|
</el-checkbox>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-button class="btn" :loading="loading" type="primary" @click.native.prevent="handleRegister">
|
||||||
|
<span v-if="!loading">{{ $t('register.974236-4') }}</span>
|
||||||
|
<span v-else>{{ $t('register.974236-5') }}</span>
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<div class="other-link">
|
||||||
|
<span class="text" @click="handleGotoLogin">{{ $t('register.974236-9') }}</span>
|
||||||
|
<el-divider direction="vertical" v-if="systemForm.document"></el-divider>
|
||||||
|
<span class="text" @click="handleGotoDoc" v-if="systemForm.document">{{ $t('login.989807-40') }}</span>
|
||||||
|
<el-divider direction="vertical" v-if="systemForm.website"></el-divider>
|
||||||
|
<span class="text" @click="handleGotoOS" v-if="systemForm.website">{{ $t('login.989807-41') }}</span>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item style="width: 100%">
|
<!-- 绑定账号提示 -->
|
||||||
<el-button v-if="!bindAccount" :loading="loading" type="primary" style="width: 100%"
|
<div class="form-box" v-if="isHaveBind">
|
||||||
@click.native.prevent="handleRegister">
|
<div class="mess-text">
|
||||||
<span v-if="!loading">{{ $t('register.974236-4') }}</span>
|
<i style="font-size: 16px" class="el-icon-warning" />
|
||||||
<span v-else>{{ $t('register.974236-5') }}</span>
|
<span> {{ $t('login.989807-10') }}</span>
|
||||||
</el-button>
|
<span style="color: #486ff2; cursor: pointer" @click="handleRegister"> {{ $t('login.989807-12') }}</span>
|
||||||
</el-form-item>
|
</div>
|
||||||
<el-form-item>
|
<el-button style="margin-top: 40px" class="btn" @click="handleGotoLogin">
|
||||||
<el-link href="https://fastbee.cn/" :underline="false" target="_blank" style="float: left">{{ $t('login.989807-41') }}</el-link>
|
<span>{{ $t('login.989807-44') }}</span>
|
||||||
<el-link href="https://fastbee.cn/doc" :underline="false" target="_blank"
|
</el-button>
|
||||||
style="float: left; margin-left: 20px">{{ $t('login.989807-40') }}</el-link>
|
</div>
|
||||||
<router-link :to="{ path: '/login', query: this.$route.query }"
|
|
||||||
style="float: left; margin-left: 20px">{{ $t('register.974236-9') }}</router-link>
|
<!-- 错误信息提示 -->
|
||||||
</el-form-item>
|
<div class="form-box" v-if="errorText">
|
||||||
</el-form>
|
<div class="mess-text">
|
||||||
</el-col>
|
<i style="font-size: 16px" class="el-icon-warning" />
|
||||||
</el-row>
|
<span>{{ errorText }}</span>
|
||||||
<!-- 底部 -->
|
</div>
|
||||||
<div class="el-register-footer">
|
<el-button style="margin-top: 40px" class="btn" @click="handleGotoLogin">
|
||||||
<span>
|
<span>{{ $t('login.989807-44') }}</span>
|
||||||
Copyright © 2021-2025
|
</el-button>
|
||||||
<a target="_blank" href="http://fastbee.cn">FastBee</a>
|
</div>
|
||||||
All Rights Reserved.
|
|
||||||
</span>
|
<div class="copyright-wrap" v-if="systemForm.copyRight">
|
||||||
|
<span>
|
||||||
|
Copyright © 2021-2026
|
||||||
|
<a target="_blank" href="http://fastbee.cn">FastBee</a>
|
||||||
|
All Rights Reserved.
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import 'element-ui/lib/theme-chalk/display.css';
|
import 'element-ui/lib/theme-chalk/display.css';
|
||||||
import logo from '@/assets/logo/logo.gif';
|
import { getCodeImg, checkBindId, getErrorMsg, socialLogin } from '@/api/login';
|
||||||
import { getCodeImg, checkBindId, bindRegister } from '@/api/login';
|
|
||||||
import { register } from '@/api/iot/tool';
|
import { register } from '@/api/iot/tool';
|
||||||
|
import { setToken } from '@/utils/auth';
|
||||||
|
import langSelect from '@/layout/components/langSelect';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Register',
|
name: 'Register',
|
||||||
data() {
|
components: { langSelect },
|
||||||
const equalToPassword = (rule, value, callback) => {
|
data() {
|
||||||
if (this.registerForm.password !== value) {
|
const equalToPassword = (rule, value, callback) => {
|
||||||
callback(new Error(this.$t('pwdNotMatch')));
|
if (this.registerForm.password !== value) {
|
||||||
} else {
|
callback(new Error(this.$t('pwdNotMatch')));
|
||||||
callback();
|
} else {
|
||||||
}
|
callback();
|
||||||
};
|
|
||||||
return {
|
|
||||||
logo,
|
|
||||||
codeUrl: '',
|
|
||||||
registerForm: {
|
|
||||||
username: '',
|
|
||||||
phonenumber: '',
|
|
||||||
password: '',
|
|
||||||
confirmPassword: '',
|
|
||||||
code: '',
|
|
||||||
uuid: '',
|
|
||||||
bindId: '',
|
|
||||||
},
|
|
||||||
registerRules: {
|
|
||||||
username: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
trigger: 'blur',
|
|
||||||
message: this.$t('login.989807-20'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
min: 2,
|
|
||||||
max: 20,
|
|
||||||
message: this.$t('register.974236-13'),
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
phonenumber: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
trigger: 'blur',
|
|
||||||
message: this.$t('register.974236-14'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
min: 11,
|
|
||||||
max: 11,
|
|
||||||
message: this.$t('register.974236-15'),
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
password: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
trigger: 'blur',
|
|
||||||
message: this.$t('login.989807-21'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
min: 5,
|
|
||||||
max: 20,
|
|
||||||
message: this.$t('register.974236-16'),
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
trigger: 'blur',
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
var passwordreg = /(?![A-Z]*$)(?![a-z]*$)(?![0-9]*$)(?![^a-zA-Z0-9]*$)/
|
|
||||||
if (!passwordreg.test(value)) {
|
|
||||||
callback(new Error(this.$t('login.989807-62')))
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
],
|
return {
|
||||||
confirmPassword: [
|
formIndex: 1, // 1 注册表单
|
||||||
{
|
pwdtype: 'password', // 控制密码可见
|
||||||
required: true,
|
codeUrl: '',
|
||||||
trigger: 'blur',
|
registerForm: {
|
||||||
message: this.$t('register.974236-17'),
|
username: '',
|
||||||
},
|
phonenumber: '',
|
||||||
{
|
password: '',
|
||||||
required: true,
|
confirmPassword: '',
|
||||||
validator: equalToPassword,
|
code: '',
|
||||||
trigger: 'blur',
|
uuid: '',
|
||||||
},
|
bindId: '',
|
||||||
],
|
agree: false, // 同意隐私协议
|
||||||
code: [
|
},
|
||||||
{
|
registerRules: {
|
||||||
required: true,
|
username: [
|
||||||
trigger: 'change',
|
{
|
||||||
message: this.$t('login.989807-22'),
|
required: true,
|
||||||
},
|
trigger: 'blur',
|
||||||
],
|
message: this.$t('login.989807-20'),
|
||||||
},
|
},
|
||||||
loading: false,
|
{
|
||||||
captchaOnOff: true,
|
min: 2,
|
||||||
bindAccount: false,
|
max: 20,
|
||||||
};
|
message: this.$t('register.974236-13'),
|
||||||
},
|
trigger: 'blur',
|
||||||
created() {
|
},
|
||||||
this.checkBind();
|
],
|
||||||
this.getCode();
|
phonenumber: [
|
||||||
},
|
{
|
||||||
methods: {
|
required: true,
|
||||||
checkBind() {
|
trigger: 'blur',
|
||||||
const query = this.$route.query;
|
message: this.$t('register.974236-14'),
|
||||||
const bindId = query.bindId;
|
},
|
||||||
if (bindId === undefined || bindId === null) {
|
{
|
||||||
this.bindAccount = false;
|
min: 11,
|
||||||
} else {
|
max: 11,
|
||||||
this.bindAccount = true;
|
message: this.$t('register.974236-15'),
|
||||||
checkBindId(bindId).then((res) => {
|
trigger: 'blur',
|
||||||
this.bindAccount = res.bindAccount === undefined ? true : res.bindAccount;
|
},
|
||||||
if (this.bindAccount) {
|
],
|
||||||
this.registerForm.bindId = bindId;
|
password: [
|
||||||
} else {
|
{
|
||||||
this.registerForm.bindId = '';
|
required: true,
|
||||||
this.$router.push({
|
trigger: 'blur',
|
||||||
query: {},
|
message: this.$t('login.989807-21'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
min: 5,
|
||||||
|
max: 20,
|
||||||
|
message: this.$t('register.974236-16'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
trigger: 'blur',
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
var passwordreg = /(?![A-Z]*$)(?![a-z]*$)(?![0-9]*$)(?![^a-zA-Z0-9]*$)/;
|
||||||
|
if (!passwordreg.test(value)) {
|
||||||
|
callback(new Error(this.$t('login.989807-62')));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
confirmPassword: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
trigger: 'blur',
|
||||||
|
message: this.$t('register.974236-17'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: equalToPassword,
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
code: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
trigger: 'change',
|
||||||
|
message: this.$t('login.989807-22'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
// 验证码开关
|
||||||
|
captchaOnOff: true,
|
||||||
|
bindAccount: false,
|
||||||
|
redirect: undefined,
|
||||||
|
bindId: '',
|
||||||
|
systemForm: {
|
||||||
|
copyRight: true,
|
||||||
|
logo: undefined,
|
||||||
|
imgUrl: undefined,
|
||||||
|
accountTip: true,
|
||||||
|
document: true,
|
||||||
|
website: true,
|
||||||
|
isShowPhone: true,
|
||||||
|
isDoc: true,
|
||||||
|
},
|
||||||
|
isHaveBind: false, // 是否有绑定账号
|
||||||
|
errorText: '', // 错误信息
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const { loginId } = this.$route.query;
|
||||||
|
if (!loginId) {
|
||||||
|
this.getCode();
|
||||||
|
this.checkBind();
|
||||||
|
this.checkError();
|
||||||
|
//获取配置信息
|
||||||
|
this.getConfigKey('sys.logo.config').then((response) => {
|
||||||
|
if (response.code === 200 && response.msg !== '' && response.msg !== '{}') {
|
||||||
|
this.systemForm = JSON.parse(response.msg);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
});
|
this.redirectLogin(loginId);
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
getCode() {
|
|
||||||
getCodeImg().then((res) => {
|
|
||||||
this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
|
|
||||||
if (this.captchaOnOff) {
|
|
||||||
this.codeUrl = 'data:image/gif;base64,' + res.img;
|
|
||||||
this.registerForm.uuid = res.uuid;
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
},
|
||||||
qqLogin() {
|
methods: {
|
||||||
window.location.href = 'http://localhost:8080/auth/render/qq';
|
// 显示|隐藏密码
|
||||||
},
|
handlePasswordTypeChange() {
|
||||||
authLogin() {
|
this.pwdtype == 'password' ? (this.pwdtype = 'text') : (this.pwdtype = 'password');
|
||||||
this.$alert(this.$t('login.989807-63'), this.$t('login.989807-32'), {
|
|
||||||
confirmButtonText: this.$t('confirm'),
|
|
||||||
callback: (action) => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: `action: ${action}`,
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
});
|
// 获取验证码
|
||||||
},
|
getCode() {
|
||||||
handleRegister() {
|
getCodeImg().then((res) => {
|
||||||
this.$refs.registerForm.validate((valid) => {
|
this.captchaOnOff = res.captchaEnabled;
|
||||||
if (valid) {
|
|
||||||
this.loading = true;
|
|
||||||
if (this.bindAccount) {
|
|
||||||
bindRegister(this.registerForm)
|
|
||||||
.then((res) => {
|
|
||||||
this.innerRegister(res);
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
if (this.captchaOnOff) {
|
if (this.captchaOnOff) {
|
||||||
this.getCode();
|
this.codeUrl = 'data:image/gif;base64,' + res.img;
|
||||||
|
this.registerForm.uuid = res.uuid;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
},
|
||||||
register(this.registerForm)
|
// 检测绑定信息
|
||||||
.then((res) => {
|
checkBind() {
|
||||||
this.innerRegister(res);
|
const query = this.$route.query;
|
||||||
})
|
const bindId = query.bindId;
|
||||||
.catch(() => {
|
if (bindId === undefined || bindId === null) {
|
||||||
this.loading = false;
|
this.bindAccount = false;
|
||||||
if (this.captchaOnOff) {
|
} else {
|
||||||
this.getCode();
|
this.bindAccount = true;
|
||||||
|
checkBindId(bindId).then((res) => {
|
||||||
|
this.bindAccount = res.bindAccount === undefined ? true : res.bindAccount;
|
||||||
|
if (this.bindAccount) {
|
||||||
|
this.registerForm.bindId = bindId;
|
||||||
|
} else {
|
||||||
|
this.registerForm.bindId = '';
|
||||||
|
this.$router.push({
|
||||||
|
query: {},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 检查错误信息
|
||||||
|
checkError() {
|
||||||
|
const { errorId } = this.$route.query;
|
||||||
|
if (errorId) {
|
||||||
|
getErrorMsg(errorId).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.errorText = res.msg;
|
||||||
|
} else {
|
||||||
|
this.errorText = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 重定向到登录
|
||||||
|
redirectLogin() {
|
||||||
|
const { loginId } = this.$route.query;
|
||||||
|
socialLogin(loginId).then((res) => {
|
||||||
|
setToken(res.token); // 保存token
|
||||||
|
this.$router.push({
|
||||||
|
path: this.redirect || '/',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 返回登录页
|
||||||
|
handleGotoLogin() {
|
||||||
|
if (this.captchaOnOff) {
|
||||||
|
this.getCode();
|
||||||
|
}
|
||||||
|
this.formIndex = 1;
|
||||||
|
this.isHaveBind = false;
|
||||||
|
this.errorText = '';
|
||||||
|
this.$router.push('/login');
|
||||||
|
},
|
||||||
|
// 查看文档
|
||||||
|
handleGotoDoc() {
|
||||||
|
window.open('https://fastbee.cn/doc', '_blank');
|
||||||
|
},
|
||||||
|
// 返回官网
|
||||||
|
handleGotoOS() {
|
||||||
|
window.open('https://fastbee.cn', '_blank');
|
||||||
|
},
|
||||||
|
// 跳转到隐私政策
|
||||||
|
handleGotoPrivacyPolicy() {
|
||||||
|
window.open('https://fastbee.cn/privacy-policy.html', '_blank');
|
||||||
|
},
|
||||||
|
qqLogin() {
|
||||||
|
window.location.href = 'http://localhost:8080/auth/render/qq';
|
||||||
|
},
|
||||||
|
authLogin() {
|
||||||
|
this.$alert(this.$t('login.989807-63'), this.$t('login.989807-32'), {
|
||||||
|
confirmButtonText: this.$t('confirm'),
|
||||||
|
callback: (action) => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: `action: ${action}`,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleRegister() {
|
||||||
|
// 验證是否同意隱私協議
|
||||||
|
if (!this.registerForm.agree) {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: this.$t('login.989807-58'),
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$refs.registerForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
|
if (this.bindAccount) {
|
||||||
|
bindRegister(this.registerForm)
|
||||||
|
.then((res) => {
|
||||||
|
this.innerRegister(res);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
if (this.captchaOnOff) {
|
||||||
|
this.getCode();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
register(this.registerForm)
|
||||||
|
.then((res) => {
|
||||||
|
this.innerRegister(res);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
if (this.captchaOnOff) {
|
||||||
|
this.getCode();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
innerRegister(res) {
|
||||||
});
|
const username = this.registerForm.username;
|
||||||
|
this.$alert("<font color='red'>" + this.$t('register.974236-18') + username + this.$t('register.974236-19') + '</font>', this.$t('register.974236-20'), {
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$router.push('/login');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
innerRegister(res) {
|
|
||||||
const username = this.registerForm.username;
|
|
||||||
this.$alert("<font color='red'>" + this.$t('register.974236-18') + username + this.$t('register.974236-19') + "</font>", this.$t('register.974236-20'), {
|
|
||||||
dangerouslyUseHTMLString: true,
|
|
||||||
type: 'success',
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.$router.push('/login');
|
|
||||||
})
|
|
||||||
.catch(() => { });
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.register {
|
.register-wrap {
|
||||||
height: 100%;
|
user-select: none;
|
||||||
overflow: auto;
|
height: 100vh;
|
||||||
|
max-width: 100%;
|
||||||
|
width: 100vw;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.logo-wrap {
|
||||||
|
position: absolute;
|
||||||
|
top: 80px;
|
||||||
|
left: 80px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 42px;
|
||||||
|
height: 46px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 36px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-left: 12px;
|
||||||
|
color: #486ff2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.introduce-text {
|
||||||
|
position: absolute;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #909399;
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
top: 146px;
|
||||||
|
left: 80px;
|
||||||
|
width: 500px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-wrap {
|
||||||
|
flex: 1;
|
||||||
|
background: #0f73ee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-wrap {
|
||||||
|
position: relative;
|
||||||
|
width: 608px;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.form-box {
|
||||||
|
margin-top: -8%; // 上移35下面留宽一点
|
||||||
|
width: 300px;
|
||||||
|
|
||||||
|
.title-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
::v-deep .el-dropdown {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-wrap {
|
||||||
|
::v-deep .el-form-item {
|
||||||
|
margin-bottom: 21px;
|
||||||
|
|
||||||
|
.el-form-item__content {
|
||||||
|
line-height: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.input-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
padding: 3px 16px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.inner {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
box-sizing: border-box;
|
||||||
|
flex-grow: 1;
|
||||||
|
font-size: inherit;
|
||||||
|
outline: none;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
color: #303133;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
color: #303133;
|
||||||
|
cursor: pointer;
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-append {
|
||||||
|
width: 112px;
|
||||||
|
height: 40px;
|
||||||
|
margin-left: 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.other-link {
|
||||||
|
margin-top: 17px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: left;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.other-login {
|
||||||
|
margin-top: 40px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin: 0 12px 0 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
margin-top: 26px;
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mess-text {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 24px;
|
||||||
|
color: #ed2525;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.copyright-wrap {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 24px;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
.register-form {
|
|
||||||
margin: 30px auto 0 auto;
|
|
||||||
padding: 15px;
|
|
||||||
z-index: 1000;
|
|
||||||
max-width: 350px;
|
|
||||||
|
|
||||||
input {
|
|
||||||
height: 38px;
|
|
||||||
background-color: #f1f1f1;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-icon {
|
|
||||||
height: 39px;
|
|
||||||
width: 14px;
|
|
||||||
margin-left: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.register-code {
|
|
||||||
width: 33%;
|
|
||||||
float: right;
|
|
||||||
|
|
||||||
img {
|
|
||||||
cursor: pointer;
|
|
||||||
vertical-align: middle;
|
|
||||||
border-radius: 3px;
|
|
||||||
height: 38px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-register-footer {
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
color: #333;
|
|
||||||
font-family: Arial;
|
|
||||||
font-size: 12px;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}</style>
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="roleKey">
|
<el-form-item prop="roleKey">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">
|
<el-tooltip :content="$t('role.index.094567-14')" placement="top">
|
||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
{{ $t('role.index.094567-0') }}
|
{{ $t('role.index.094567-0') }}
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<styule lang="scss">
|
<style lang="scss">
|
||||||
// 自定义二维码样式
|
// 自定义二维码样式
|
||||||
.impowerBox .title {
|
.impowerBox .title {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -214,4 +214,4 @@ export default {
|
|||||||
.impowerBox .status {
|
.impowerBox .status {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
</styule>
|
</style>
|
||||||
|
|||||||
@@ -1,100 +1,121 @@
|
|||||||
<script>
|
<script>
|
||||||
import draggable from 'vuedraggable'
|
import draggable from 'vuedraggable';
|
||||||
import render from '@/utils/generator/render'
|
import render from '@/utils/generator/render';
|
||||||
|
|
||||||
const components = {
|
const components = {
|
||||||
itemBtns(h, element, index, parent) {
|
itemBtns(h, element, index, parent) {
|
||||||
const { copyItem, deleteItem } = this.$listeners
|
const { copyItem, deleteItem } = this.$listeners;
|
||||||
return [
|
return [
|
||||||
<span class="drawing-item-copy" title={this.$i18n.t('tool.build.index.670906-13')} onClick={event => {
|
<span
|
||||||
copyItem(element, parent); event.stopPropagation()
|
class="drawing-item-copy"
|
||||||
}}>
|
title={this.$i18n.t('tool.build.index.670906-13')}
|
||||||
<i class="el-icon-copy-document" />
|
onClick={(event) => {
|
||||||
</span>,
|
copyItem(element, parent);
|
||||||
<span class="drawing-item-delete" title={this.$i18n.t('tool.build.index.670906-14')} onClick={event => {
|
event.stopPropagation();
|
||||||
deleteItem(index, parent); event.stopPropagation()
|
}}
|
||||||
}}>
|
>
|
||||||
<i class="el-icon-delete" />
|
<i class="el-icon-copy-document" />
|
||||||
</span>
|
</span>,
|
||||||
]
|
<span
|
||||||
}
|
class="drawing-item-delete"
|
||||||
}
|
title={this.$i18n.t('tool.build.index.670906-14')}
|
||||||
|
onClick={(event) => {
|
||||||
|
deleteItem(index, parent);
|
||||||
|
event.stopPropagation();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<i class="el-icon-delete" />
|
||||||
|
</span>,
|
||||||
|
];
|
||||||
|
},
|
||||||
|
};
|
||||||
const layouts = {
|
const layouts = {
|
||||||
colFormItem(h, element, index, parent) {
|
colFormItem(h, element, index, parent) {
|
||||||
const { activeItem } = this.$listeners
|
const { activeItem } = this.$listeners;
|
||||||
let className = this.activeId === element.formId ? 'drawing-item active-from-item' : 'drawing-item'
|
let className = this.activeId === element.formId ? 'drawing-item active-from-item' : 'drawing-item';
|
||||||
if (this.formConf.unFocusedComponentBorder) className += ' unfocus-bordered'
|
if (this.formConf.unFocusedComponentBorder) className += ' unfocus-bordered';
|
||||||
return (
|
return (
|
||||||
<el-col span={element.span} class={className}
|
<el-col
|
||||||
nativeOnClick={event => { activeItem(element); event.stopPropagation() }}>
|
span={element.span}
|
||||||
<el-form-item label-width={element.labelWidth ? `${element.labelWidth}px` : null}
|
class={className}
|
||||||
label={element.label} required={element.required}>
|
nativeOnClick={(event) => {
|
||||||
<render key={element.renderKey} conf={element} onInput={ event => {
|
activeItem(element);
|
||||||
this.$set(element, 'defaultValue', event)
|
event.stopPropagation();
|
||||||
}} />
|
}}
|
||||||
</el-form-item>
|
>
|
||||||
{components.itemBtns.apply(this, arguments)}
|
<el-form-item label-width={element.labelWidth ? `${element.labelWidth}px` : null} label={element.label} required={element.required}>
|
||||||
</el-col>
|
<render
|
||||||
)
|
key={element.renderKey}
|
||||||
},
|
conf={element}
|
||||||
rowFormItem(h, element, index, parent) {
|
onInput={(event) => {
|
||||||
const { activeItem } = this.$listeners
|
this.$set(element, 'defaultValue', event);
|
||||||
const className = this.activeId === element.formId ? 'drawing-row-item active-from-item' : 'drawing-row-item'
|
}}
|
||||||
let child = renderChildren.apply(this, arguments)
|
/>
|
||||||
if (element.type === 'flex') {
|
</el-form-item>
|
||||||
child = <el-row type={element.type} justify={element.justify} align={element.align}>
|
{components.itemBtns.apply(this, arguments)}
|
||||||
{child}
|
</el-col>
|
||||||
</el-row>
|
);
|
||||||
}
|
},
|
||||||
return (
|
rowFormItem(h, element, index, parent) {
|
||||||
<el-col span={element.span}>
|
const { activeItem } = this.$listeners;
|
||||||
<el-row gutter={element.gutter} class={className}
|
const className = this.activeId === element.formId ? 'drawing-row-item active-from-item' : 'drawing-row-item';
|
||||||
nativeOnClick={event => { activeItem(element); event.stopPropagation() }}>
|
let child = renderChildren.apply(this, arguments);
|
||||||
<span class="component-name">{element.componentName}</span>
|
if (element.type === 'flex') {
|
||||||
<draggable list={element.children} animation={340} group="componentsGroup" class="drag-wrapper">
|
child = (
|
||||||
{child}
|
<el-row type={element.type} justify={element.justify} align={element.align}>
|
||||||
</draggable>
|
{child}
|
||||||
{components.itemBtns.apply(this, arguments)}
|
</el-row>
|
||||||
</el-row>
|
);
|
||||||
</el-col>
|
}
|
||||||
)
|
return (
|
||||||
}
|
<el-col span={element.span}>
|
||||||
}
|
<el-row
|
||||||
|
gutter={element.gutter}
|
||||||
|
class={className}
|
||||||
|
nativeOnClick={(event) => {
|
||||||
|
activeItem(element);
|
||||||
|
event.stopPropagation();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span class="component-name">{element.componentName}</span>
|
||||||
|
<draggable list={element.children} animation={340} group="componentsGroup" class="drag-wrapper">
|
||||||
|
{child}
|
||||||
|
</draggable>
|
||||||
|
{components.itemBtns.apply(this, arguments)}
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
function renderChildren(h, element, index, parent) {
|
function renderChildren(h, element, index, parent) {
|
||||||
if (!Array.isArray(element.children)) return null
|
if (!Array.isArray(element.children)) return null;
|
||||||
return element.children.map((el, i) => {
|
return element.children.map((el, i) => {
|
||||||
const layout = layouts[el.layout]
|
const layout = layouts[el.layout];
|
||||||
if (layout) {
|
if (layout) {
|
||||||
return layout.call(this, h, el, i, element.children)
|
return layout.call(this, h, el, i, element.children);
|
||||||
}
|
}
|
||||||
return layoutIsNotFound()
|
return layoutIsNotFound();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function layoutIsNotFound() {
|
function layoutIsNotFound() {
|
||||||
throw new Error(`没有与${this.element.layout}匹配的layout`)
|
throw new Error(this.$t('tool.build.index.670906-15') + `${this.element.layout}` + this.$t('tool.build.index.670906-16'));
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
render,
|
render,
|
||||||
draggable
|
draggable,
|
||||||
},
|
},
|
||||||
props: [
|
props: ['element', 'index', 'drawingList', 'activeId', 'formConf'],
|
||||||
'element',
|
render(h) {
|
||||||
'index',
|
const layout = layouts[this.element.layout];
|
||||||
'drawingList',
|
|
||||||
'activeId',
|
|
||||||
'formConf'
|
|
||||||
],
|
|
||||||
render(h) {
|
|
||||||
const layout = layouts[this.element.layout]
|
|
||||||
|
|
||||||
if (layout) {
|
if (layout) {
|
||||||
return layout.call(this, h, this.element, this.index, this.drawingList)
|
return layout.call(this, h, this.element, this.index, this.drawingList);
|
||||||
}
|
}
|
||||||
return layoutIsNotFound()
|
return layoutIsNotFound();
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -469,7 +469,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<template v-if="activeData.layoutTree">
|
<template v-if="activeData.layoutTree">
|
||||||
<el-divider>布局结构树</el-divider>
|
<el-divider>{{ $t('tool.rightPanel.670907-123') }}</el-divider>
|
||||||
<el-tree
|
<el-tree
|
||||||
:data="[activeData]"
|
:data="[activeData]"
|
||||||
:props="layoutTreeProps"
|
:props="layoutTreeProps"
|
||||||
@@ -487,7 +487,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="activeData.layout === 'colFormItem' && activeData.tag !== 'el-button'">
|
<template v-if="activeData.layout === 'colFormItem' && activeData.tag !== 'el-button'">
|
||||||
<el-divider>正则校验</el-divider>
|
<el-divider>{{ $t('tool.rightPanel.670907-124') }}</el-divider>
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in activeData.regList"
|
v-for="(item, index) in activeData.regList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -496,77 +496,77 @@
|
|||||||
<span class="close-btn" @click="activeData.regList.splice(index, 1)">
|
<span class="close-btn" @click="activeData.regList.splice(index, 1)">
|
||||||
<i class="el-icon-close" />
|
<i class="el-icon-close" />
|
||||||
</span>
|
</span>
|
||||||
<el-form-item label="表达式">
|
<el-form-item :label="$t('tool.rightPanel.670907-125')">
|
||||||
<el-input v-model="item.pattern" placeholder="请输入正则" />
|
<el-input v-model="item.pattern" :placeholder="$t('tool.rightPanel.670907-126')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="错误提示" style="margin-bottom:0">
|
<el-form-item :label="$t('tool.rightPanel.670907-127')" style="margin-bottom:0">
|
||||||
<el-input v-model="item.message" placeholder="请输入错误提示" />
|
<el-input v-model="item.message" :placeholder="$t('tool.rightPanel.670907-128')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 20px">
|
<div style="margin-left: 20px">
|
||||||
<el-button icon="el-icon-circle-plus-outline" type="text" @click="addReg">
|
<el-button icon="el-icon-circle-plus-outline" type="text" @click="addReg">
|
||||||
添加规则
|
{{ $t('tool.rightPanel.670907-129') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 表单属性 -->
|
<!-- 表单属性 -->
|
||||||
<el-form v-show="currentTab === 'form'" size="small" label-width="90px">
|
<el-form v-show="currentTab === 'form'" size="small" label-width="90px">
|
||||||
<el-form-item label="表单名">
|
<el-form-item :label="$t('tool.rightPanel.670907-130')">
|
||||||
<el-input v-model="formConf.formRef" placeholder="请输入表单名(ref)" />
|
<el-input v-model="formConf.formRef" :placeholder="$t('tool.rightPanel.670907-131')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="表单模型">
|
<el-form-item :label="$t('tool.rightPanel.670907-132')">
|
||||||
<el-input v-model="formConf.formModel" placeholder="请输入数据模型" />
|
<el-input v-model="formConf.formModel" :placeholder="$t('tool.rightPanel.670907-133')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="校验模型">
|
<el-form-item :label="$t('tool.rightPanel.670907-134')">
|
||||||
<el-input v-model="formConf.formRules" placeholder="请输入校验模型" />
|
<el-input v-model="formConf.formRules" :placeholder="$t('tool.rightPanel.670907-135')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="表单尺寸">
|
<el-form-item :label="$t('tool.rightPanel.670907-136')">
|
||||||
<el-radio-group v-model="formConf.size">
|
<el-radio-group v-model="formConf.size">
|
||||||
<el-radio-button label="medium">
|
<el-radio-button label="medium">
|
||||||
中等
|
{{ $t('tool.rightPanel.670907-107') }}
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
<el-radio-button label="small">
|
<el-radio-button label="small">
|
||||||
较小
|
{{ $t('tool.rightPanel.670907-108') }}
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
<el-radio-button label="mini">
|
<el-radio-button label="mini">
|
||||||
迷你
|
{{ $t('tool.rightPanel.670907-109') }}
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标签对齐">
|
<el-form-item :label="$t('tool.rightPanel.670907-137')">
|
||||||
<el-radio-group v-model="formConf.labelPosition">
|
<el-radio-group v-model="formConf.labelPosition">
|
||||||
<el-radio-button label="left">
|
<el-radio-button label="left">
|
||||||
左对齐
|
{{ $t('tool.rightPanel.670907-138') }}
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
<el-radio-button label="right">
|
<el-radio-button label="right">
|
||||||
右对齐
|
{{ $t('tool.rightPanel.670907-139') }}
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
<el-radio-button label="top">
|
<el-radio-button label="top">
|
||||||
顶部对齐
|
{{ $t('tool.rightPanel.670907-140') }}
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标签宽度">
|
<el-form-item :label="$t('tool.rightPanel.670907-20')">
|
||||||
<el-input-number v-model="formConf.labelWidth" placeholder="标签宽度" />
|
<el-input-number v-model="formConf.labelWidth" :placeholder="$t('tool.rightPanel.670907-21')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="栅格间隔">
|
<el-form-item :label="$t('tool.rightPanel.670907-15')">
|
||||||
<el-input-number v-model="formConf.gutter" :min="0" placeholder="栅格间隔" />
|
<el-input-number v-model="formConf.gutter" :min="0" :placeholder="$t('tool.rightPanel.670907-15')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="禁用表单">
|
<el-form-item :label="$t('tool.rightPanel.670907-141')">
|
||||||
<el-switch v-model="formConf.disabled" />
|
<el-switch v-model="formConf.disabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="表单按钮">
|
<el-form-item :label="$t('tool.rightPanel.670907-142')">
|
||||||
<el-switch v-model="formConf.formBtns" />
|
<el-switch v-model="formConf.formBtns" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="显示未选中组件边框">
|
<el-form-item :label="$t('tool.rightPanel.670907-143')">
|
||||||
<el-switch v-model="formConf.unFocusedComponentBorder" />
|
<el-switch v-model="formConf.unFocusedComponentBorder" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<treeNode-dialog :visible.sync="dialogVisible" title="添加选项" @commit="addNode" />
|
<treeNode-dialog :visible.sync="dialogVisible" :title="$t('tool.rightPanel.670907-144')" @commit="addNode" />
|
||||||
<icons-dialog :visible.sync="iconsVisible" :current="activeData[currentIconModel]" @select="setIcon" />
|
<icons-dialog :visible.sync="iconsVisible" :current="activeData[currentIconModel]" @select="setIcon" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,45 +1,45 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 创建表 -->
|
<!-- 创建表 -->
|
||||||
<el-dialog :title="$t('tool.createTable.670904-0')" :visible.sync="visible" width="800px" top="5vh" append-to-body>
|
<el-dialog :title="$t('tool.createTable.670904-0')" :visible.sync="visible" width="800px" top="5vh" append-to-body>
|
||||||
<span>{{ $t('tool.createTable.670904-1') }}</span>
|
<span>{{ $t('tool.createTable.670904-1') }}</span>
|
||||||
<el-input type="textarea" :rows="10" :placeholder="$t('tool.createTable.670904-2')" v-model="content"></el-input>
|
<el-input type="textarea" :rows="10" :placeholder="$t('tool.createTable.670904-2')" v-model="content"></el-input>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="handleCreateTable">{{ $t('common.confirm') }}</el-button>
|
<el-button type="primary" @click="handleCreateTable">{{ $t('confirm') }}</el-button>
|
||||||
<el-button @click="visible = false">{{ $t('common.cancel') }}</el-button>
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { createTable } from "@/api/tool/gen";
|
import { createTable } from '@/api/tool/gen';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
visible: false,
|
visible: false,
|
||||||
// 文本内容
|
// 文本内容
|
||||||
content: ""
|
content: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 显示弹框
|
// 显示弹框
|
||||||
show() {
|
show() {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
},
|
||||||
|
/** 创建按钮操作 */
|
||||||
|
handleCreateTable() {
|
||||||
|
if (this.content === '') {
|
||||||
|
this.$modal.msgError(this.$i18n.t('tool.createTable.670904-3'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
createTable({ sql: this.content }).then((res) => {
|
||||||
|
this.$modal.msgSuccess(res.msg);
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('ok');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
/** 创建按钮操作 */
|
|
||||||
handleCreateTable() {
|
|
||||||
if (this.content === "") {
|
|
||||||
this.$modal.msgError(this.$i18n.t('tool.createTable.670904-3'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
createTable({ sql: this.content }).then(res => {
|
|
||||||
this.$modal.msgSuccess(res.msg);
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit("ok");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,139 +1,123 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 导入表 -->
|
<!-- 导入表 -->
|
||||||
<el-dialog :title="$t('tool.import.670901-0')" :visible.sync="visible" width="800px" top="5vh" append-to-body>
|
<el-dialog :title="$t('tool.import.670901-0')" :visible.sync="visible" width="800px" top="5vh" append-to-body>
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
|
||||||
<el-form-item :label="$t('tool.import.670901-1')" prop="dataName">
|
<el-form-item :label="$t('tool.import.670901-1')" prop="dataName">
|
||||||
<el-select v-model="queryParams.dataName" size="small" :placeholder="$t('tool.import.670901-2')" style="width: 100%" :clearable="true">
|
<el-select v-model="queryParams.dataName" size="small" :placeholder="$t('tool.import.670901-2')" style="width: 100%" :clearable="true">
|
||||||
<el-option v-for="(item, index) in dataSources" :key="index" :label="item" :value="item"></el-option>
|
<el-option v-for="(item, index) in dataSources" :key="index" :label="item" :value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('tool.import.670901-3')" prop="tableName">
|
<el-form-item :label="$t('tool.import.670901-3')" prop="tableName">
|
||||||
<el-input
|
<el-input v-model="queryParams.tableName" :placeholder="$t('tool.import.670901-4')" clearable @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.tableName"
|
</el-form-item>
|
||||||
:placeholder="$t('tool.import.670901-4')"
|
<el-form-item :label="$t('tool.import.670901-5')" prop="tableComment">
|
||||||
clearable
|
<el-input v-model="queryParams.tableComment" :placeholder="$t('tool.import.670901-6')" clearable @keyup.enter.native="handleQuery" />
|
||||||
@keyup.enter.native="handleQuery"
|
</el-form-item>
|
||||||
/>
|
<el-form-item>
|
||||||
</el-form-item>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
|
||||||
<el-form-item :label="$t('tool.import.670901-5')" prop="tableComment">
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
|
||||||
<el-input
|
</el-form-item>
|
||||||
v-model="queryParams.tableComment"
|
</el-form>
|
||||||
:placeholder="$t('tool.import.670901-6')"
|
<el-row>
|
||||||
clearable
|
<el-table @row-click="clickRow" ref="table" :data="dbTableList" @selection-change="handleSelectionChange" height="260px">
|
||||||
@keyup.enter.native="handleQuery"
|
<el-table-column type="selection" width="55"></el-table-column>
|
||||||
/>
|
<el-table-column prop="tableName" :label="$t('tool.import.670901-3')" :show-overflow-tooltip="true"></el-table-column>
|
||||||
</el-form-item>
|
<el-table-column prop="tableComment" :label="$t('tool.import.670901-5')" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-form-item>
|
<el-table-column prop="createTime" :label="$t('tool.import.670901-7')"></el-table-column>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('common.search') }}</el-button>
|
<el-table-column prop="updateTime" :label="$t('tool.import.670901-8')"></el-table-column>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</el-button>
|
</el-table>
|
||||||
</el-form-item>
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||||
</el-form>
|
</el-row>
|
||||||
<el-row>
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-table @row-click="clickRow" ref="table" :data="dbTableList" @selection-change="handleSelectionChange" height="260px">
|
<el-button type="primary" @click="handleImportTable">{{ $t('confirm') }}</el-button>
|
||||||
<el-table-column type="selection" width="55"></el-table-column>
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
||||||
<el-table-column prop="tableName" :label="$t('tool.import.670901-3')" :show-overflow-tooltip="true"></el-table-column>
|
</div>
|
||||||
<el-table-column prop="tableComment" :label="$t('tool.import.670901-5')" :show-overflow-tooltip="true"></el-table-column>
|
</el-dialog>
|
||||||
<el-table-column prop="createTime" :label="$t('tool.import.670901-7')"></el-table-column>
|
|
||||||
<el-table-column prop="updateTime" :label="$t('tool.import.670901-8')"></el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</el-row>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="handleImportTable">{{ $t('common.confirm') }}</el-button>
|
|
||||||
<el-button @click="visible = false">{{ $t('common.cancel') }}</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listDbTable, importTable, listDataSource } from '@/api/tool/gen';
|
import { listDbTable, importTable, listDataSource } from '@/api/tool/gen';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
visible: false,
|
visible: false,
|
||||||
// 选中数组值
|
// 选中数组值
|
||||||
tables: [],
|
tables: [],
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 表数据
|
// 表数据
|
||||||
dbTableList: [],
|
dbTableList: [],
|
||||||
dataSources: [],
|
dataSources: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
tableName: undefined,
|
tableName: undefined,
|
||||||
tableComment: undefined,
|
tableComment: undefined,
|
||||||
dataName: 'master',
|
dataName: 'master',
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 显示弹框
|
|
||||||
show() {
|
|
||||||
this.getList();
|
|
||||||
this.visible = true;
|
|
||||||
},
|
},
|
||||||
clickRow(row) {
|
methods: {
|
||||||
this.$refs.table.toggleRowSelection(row);
|
// 显示弹框
|
||||||
},
|
show() {
|
||||||
// 多选框选中数据
|
this.getList();
|
||||||
handleSelectionChange(selection) {
|
this.visible = true;
|
||||||
this.tables = selection.map(item => item.tableName);
|
},
|
||||||
},
|
clickRow(row) {
|
||||||
// 查询表数据
|
this.$refs.table.toggleRowSelection(row);
|
||||||
getList() {
|
},
|
||||||
listDbTable(this.queryParams).then(res => {
|
// 多选框选中数据
|
||||||
if (res.code === 200) {
|
handleSelectionChange(selection) {
|
||||||
this.dbTableList = res.rows;
|
this.tables = selection.map((item) => item.tableName);
|
||||||
this.total = res.total;
|
},
|
||||||
}
|
// 查询表数据
|
||||||
});
|
getList() {
|
||||||
},
|
listDbTable(this.queryParams).then((res) => {
|
||||||
//获取数据源
|
if (res.code === 200) {
|
||||||
handleDataSource() {
|
this.dbTableList = res.rows;
|
||||||
|
this.total = res.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取数据源
|
||||||
|
handleDataSource() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listDataSource().then((response) => {
|
listDataSource().then((response) => {
|
||||||
this.dataSources = response.data;
|
this.dataSources = response.data;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm('queryForm');
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 导入按钮操作 */
|
||||||
|
handleImportTable() {
|
||||||
|
const tableNames = this.tables.join(',');
|
||||||
|
const params = {
|
||||||
|
tables: tableNames,
|
||||||
|
dataName: this.queryParams.dataName,
|
||||||
|
};
|
||||||
|
if (tableNames == '') {
|
||||||
|
this.$modal.msgError(this.$i18n.t('tool.import.670901-9'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
importTable(params).then((res) => {
|
||||||
|
this.$modal.msgSuccess(res.msg);
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('ok');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 导入按钮操作 */
|
|
||||||
handleImportTable() {
|
|
||||||
const tableNames = this.tables.join(',');
|
|
||||||
const params = {
|
|
||||||
tables: tableNames,
|
|
||||||
dataName: this.queryParams.dataName,
|
|
||||||
};
|
|
||||||
if (tableNames == '') {
|
|
||||||
this.$modal.msgError(this.$i18n.t('tool.import.670901-9'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
importTable(params).then((res) => {
|
|
||||||
this.$modal.msgSuccess(res.msg);
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit("ok");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,349 +1,254 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item :label="$t('gen.import.832346-1')" prop="tableName">
|
<el-form-item :label="$t('gen.import.832346-1')" prop="tableName">
|
||||||
<el-input
|
<el-input v-model="queryParams.tableName" :placeholder="$t('gen.import.832346-2')" clearable @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.tableName"
|
</el-form-item>
|
||||||
:placeholder="$t('gen.import.832346-2')"
|
<el-form-item :label="$t('gen.import.832346-3')" prop="tableComment">
|
||||||
clearable
|
<el-input v-model="queryParams.tableComment" :placeholder="$t('gen.import.832346-4')" clearable @keyup.enter.native="handleQuery" />
|
||||||
@keyup.enter.native="handleQuery"
|
</el-form-item>
|
||||||
/>
|
<el-form-item :label="$t('creatTime')">
|
||||||
</el-form-item>
|
<el-date-picker
|
||||||
<el-form-item :label="$t('gen.import.832346-3')" prop="tableComment">
|
v-model="dateRange"
|
||||||
<el-input
|
style="width: 240px"
|
||||||
v-model="queryParams.tableComment"
|
value-format="yyyy-MM-dd"
|
||||||
:placeholder="$t('gen.import.832346-4')"
|
type="daterange"
|
||||||
clearable
|
range-separator="-"
|
||||||
@keyup.enter.native="handleQuery"
|
:start-placeholder="$t('system.job.log.085689-5')"
|
||||||
/>
|
:end-placeholder="$t('system.job.log.085689-5')"
|
||||||
</el-form-item>
|
></el-date-picker>
|
||||||
<el-form-item :label="$t('creatTime')">
|
</el-form-item>
|
||||||
<el-date-picker
|
<el-form-item>
|
||||||
v-model="dateRange"
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
|
||||||
style="width: 240px"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
|
||||||
value-format="yyyy-MM-dd"
|
</el-form-item>
|
||||||
type="daterange"
|
</el-form>
|
||||||
range-separator="-"
|
|
||||||
:start-placeholder="$t('system.job.log.085689-5')"
|
|
||||||
:end-placeholder="$t('system.job.log.085689-5')"
|
|
||||||
></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="el-icon-download" size="mini" :disabled="multiple" @click="handleGenTable" v-hasPermi="['tool:gen:code']">{{ $t('build.index.2090840-3') }}</el-button>
|
||||||
type="primary"
|
</el-col>
|
||||||
plain
|
<el-col :span="1.5">
|
||||||
icon="el-icon-download"
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openCreateTable" v-hasRole="['admin']">{{ $t('add') }}</el-button>
|
||||||
size="mini"
|
</el-col>
|
||||||
:disabled="multiple"
|
<el-col :span="1.5">
|
||||||
@click="handleGenTable"
|
<el-button type="info" plain icon="el-icon-upload" size="mini" @click="openImportTable" v-hasPermi="['tool:gen:import']">{{ $t('import') }}</el-button>
|
||||||
v-hasPermi="['tool:gen:code']"
|
</el-col>
|
||||||
>{{ $t('build.index.2090840-3') }}</el-button>
|
<el-col :span="1.5">
|
||||||
</el-col>
|
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleEditTable" v-hasPermi="['tool:gen:edit']">{{ $t('update') }}</el-button>
|
||||||
<el-col :span="1.5">
|
</el-col>
|
||||||
<el-button
|
<el-col :span="1.5">
|
||||||
type="primary"
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['tool:gen:remove']">{{ $t('del') }}</el-button>
|
||||||
plain
|
</el-col>
|
||||||
icon="el-icon-plus"
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
size="mini"
|
</el-row>
|
||||||
@click="openCreateTable"
|
|
||||||
v-hasRole="['admin']"
|
|
||||||
>{{ $t('add') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="info"
|
|
||||||
plain
|
|
||||||
icon="el-icon-upload"
|
|
||||||
size="mini"
|
|
||||||
@click="openImportTable"
|
|
||||||
v-hasPermi="['tool:gen:import']"
|
|
||||||
>{{ $t('import') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleEditTable"
|
|
||||||
v-hasPermi="['tool:gen:edit']"
|
|
||||||
>{{ $t('update') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['tool:gen:remove']"
|
|
||||||
>{{ $t('del') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" align="center" width="55"></el-table-column>
|
<el-table-column type="selection" align="center" width="55"></el-table-column>
|
||||||
<el-table-column :label="$t('system.cache.list.093478-1')" type="index" width="50" align="center">
|
<el-table-column :label="$t('system.cache.list.093478-1')" type="index" width="50" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column :label="$t('gen.import.832346-1')" align="center" prop="tableName" :show-overflow-tooltip="true" width="120" />
|
||||||
:label="$t('gen.import.832346-1')"
|
<el-table-column :label="$t('gen.import.832346-3')" align="center" prop="tableComment" :show-overflow-tooltip="true" width="120" />
|
||||||
align="center"
|
<el-table-column :label="$t('gen.index.467583-1')" align="center" prop="className" :show-overflow-tooltip="true" width="120" />
|
||||||
prop="tableName"
|
<el-table-column :label="$t('creatTime')" align="center" prop="createTime" width="160" />
|
||||||
:show-overflow-tooltip="true"
|
<el-table-column :label="$t('updateTime')" align="center" prop="updateTime" width="160" />
|
||||||
width="120"
|
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
|
||||||
/>
|
<template slot-scope="scope">
|
||||||
<el-table-column
|
<el-button type="text" size="small" icon="el-icon-view" @click="handlePreview(scope.row)" v-hasPermi="['tool:gen:preview']">{{ $t('preview') }}</el-button>
|
||||||
:label="$t('gen.import.832346-3')"
|
<el-button type="text" size="small" icon="el-icon-edit" @click="handleEditTable(scope.row)" v-hasPermi="['tool:gen:edit']">{{ $t('edit') }}</el-button>
|
||||||
align="center"
|
<el-button type="text" size="small" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['tool:gen:remove']">{{ $t('del') }}</el-button>
|
||||||
prop="tableComment"
|
<el-button type="text" size="small" icon="el-icon-refresh" @click="handleSynchDb(scope.row)" v-hasPermi="['tool:gen:edit']">{{ $t('gen.index.467583-3') }}</el-button>
|
||||||
:show-overflow-tooltip="true"
|
<el-button type="text" size="small" icon="el-icon-download" @click="handleGenTable(scope.row)" v-hasPermi="['tool:gen:code']">{{ $t('gen.index.467583-4') }}</el-button>
|
||||||
width="120"
|
</template>
|
||||||
/>
|
</el-table-column>
|
||||||
<el-table-column
|
</el-table>
|
||||||
:label="$t('gen.index.467583-1')"
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||||
align="center"
|
<!-- Preview -->
|
||||||
prop="className"
|
<el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar">
|
||||||
:show-overflow-tooltip="true"
|
<el-tabs v-model="preview.activeName">
|
||||||
width="120"
|
<el-tab-pane v-for="(value, key) in preview.data" :label="key.substring(key.lastIndexOf('/') + 1, key.indexOf('.vm'))" :name="key.substring(key.lastIndexOf('/') + 1, key.indexOf('.vm'))" :key="key">
|
||||||
/>
|
<el-link :underline="false" icon="el-icon-document-copy" v-clipboard:copy="value" v-clipboard:success="clipboardSuccess" style="float: right">{{ $t('device.device-edit.148398-55') }}</el-link>
|
||||||
<el-table-column :label="$t('creatTime')" align="center" prop="createTime" width="160" />
|
<pre><code class="hljs" v-html="highlightedCode(value, key)"></code></pre>
|
||||||
<el-table-column :label="$t('updateTime')" align="center" prop="updateTime" width="160" />
|
</el-tab-pane>
|
||||||
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
|
</el-tabs>
|
||||||
<template slot-scope="scope">
|
</el-dialog>
|
||||||
<el-button
|
<import-table ref="import" @ok="handleQuery" />
|
||||||
type="text"
|
<create-table ref="create" @ok="handleQuery" />
|
||||||
size="small"
|
</div>
|
||||||
icon="el-icon-view"
|
|
||||||
@click="handlePreview(scope.row)"
|
|
||||||
v-hasPermi="['tool:gen:preview']"
|
|
||||||
>{{ $t('preview') }}</el-button>
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleEditTable(scope.row)"
|
|
||||||
v-hasPermi="['tool:gen:edit']"
|
|
||||||
>{{ $t('edit') }}</el-button>
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['tool:gen:remove']"
|
|
||||||
>{{ $t('del') }}</el-button>
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
icon="el-icon-refresh"
|
|
||||||
@click="handleSynchDb(scope.row)"
|
|
||||||
v-hasPermi="['tool:gen:edit']"
|
|
||||||
>{{ $t('gen.index.467583-3') }}</el-button>
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
icon="el-icon-download"
|
|
||||||
@click="handleGenTable(scope.row)"
|
|
||||||
v-hasPermi="['tool:gen:code']"
|
|
||||||
>{{ $t('gen.index.467583-4') }}</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- Preview -->
|
|
||||||
<el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar">
|
|
||||||
<el-tabs v-model="preview.activeName">
|
|
||||||
<el-tab-pane
|
|
||||||
v-for="(value, key) in preview.data"
|
|
||||||
:label="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))"
|
|
||||||
:name="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))"
|
|
||||||
:key="key"
|
|
||||||
>
|
|
||||||
<el-link :underline="false" icon="el-icon-document-copy" v-clipboard:copy="value" v-clipboard:success="clipboardSuccess" style="float:right">{{ $t('device.device-edit.148398-55') }}</el-link>
|
|
||||||
<pre><code class="hljs" v-html="highlightedCode(value, key)"></code></pre>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</el-dialog>
|
|
||||||
<import-table ref="import" @ok="handleQuery" />
|
|
||||||
<create-table ref="create" @ok="handleQuery" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/gen";
|
import { listTable, previewTable, delTable, genCode, synchDb } from '@/api/tool/gen';
|
||||||
import importTable from "./importTable";
|
import importTable from './importTable';
|
||||||
import createTable from "./createTable";
|
import createTable from './createTable';
|
||||||
import hljs from "highlight.js/lib/highlight";
|
import hljs from 'highlight.js/lib/highlight';
|
||||||
import "highlight.js/styles/github-gist.css";
|
import 'highlight.js/styles/github-gist.css';
|
||||||
hljs.registerLanguage("java", require("highlight.js/lib/languages/java"));
|
hljs.registerLanguage('java', require('highlight.js/lib/languages/java'));
|
||||||
hljs.registerLanguage("xml", require("highlight.js/lib/languages/xml"));
|
hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'));
|
||||||
hljs.registerLanguage("html", require("highlight.js/lib/languages/xml"));
|
hljs.registerLanguage('html', require('highlight.js/lib/languages/xml'));
|
||||||
hljs.registerLanguage("vue", require("highlight.js/lib/languages/xml"));
|
hljs.registerLanguage('vue', require('highlight.js/lib/languages/xml'));
|
||||||
hljs.registerLanguage("javascript", require("highlight.js/lib/languages/javascript"));
|
hljs.registerLanguage('javascript', require('highlight.js/lib/languages/javascript'));
|
||||||
hljs.registerLanguage("sql", require("highlight.js/lib/languages/sql"));
|
hljs.registerLanguage('sql', require('highlight.js/lib/languages/sql'));
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Gen",
|
name: 'Gen',
|
||||||
components: { importTable, createTable },
|
components: { importTable, createTable },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 唯一标识符
|
// 唯一标识符
|
||||||
uniqueId: "",
|
uniqueId: '',
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 选中表数组
|
// 选中表数组
|
||||||
tableNames: [],
|
tableNames: [],
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 表数据
|
// 表数据
|
||||||
tableList: [],
|
tableList: [],
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: "",
|
dateRange: '',
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
tableName: undefined,
|
tableName: undefined,
|
||||||
tableComment: undefined
|
tableComment: undefined,
|
||||||
},
|
},
|
||||||
// 预览参数
|
// 预览参数
|
||||||
preview: {
|
preview: {
|
||||||
open: false,
|
open: false,
|
||||||
title: this.$t('gen.index.467583-5'),
|
title: this.$t('gen.index.467583-5'),
|
||||||
data: {},
|
data: {},
|
||||||
activeName: "domain.java"
|
activeName: 'domain.java',
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
activated() {
|
|
||||||
const time = this.$route.query.t;
|
|
||||||
if (time != null && time != this.uniqueId) {
|
|
||||||
this.uniqueId = time;
|
|
||||||
this.queryParams.pageNum = Number(this.$route.query.pageNum);
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询表集合 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listTable(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
||||||
this.tableList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
created() {
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 生成代码操作 */
|
|
||||||
handleGenTable(row) {
|
|
||||||
const tableNames = row.tableName || this.tableNames;
|
|
||||||
if (tableNames == "") {
|
|
||||||
this.$modal.msgError(this.$t('gen.index.467583-6'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(row.genType === "1") {
|
|
||||||
genCode(row.tableName).then(response => {
|
|
||||||
this.$modal.msgSuccess(this.$t('gen.index.467583-7') + row.genPath);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$download.zip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi.zip");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/** 同步数据库操作 */
|
|
||||||
handleSynchDb(row) {
|
|
||||||
const tableName = row.tableName;
|
|
||||||
this.$modal.confirm(this.$t('gen.index.467583-8') + tableName + this.$t('gen.index.467583-9')).then(function() {
|
|
||||||
return synchDb(tableName);
|
|
||||||
}).then(() => {
|
|
||||||
this.$modal.msgSuccess(this.$t('gen.index.467583-10'));
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 打开导入表弹窗 */
|
|
||||||
openImportTable() {
|
|
||||||
this.$refs.import.show();
|
|
||||||
},
|
|
||||||
/** 打开创建表弹窗 */
|
|
||||||
openCreateTable() {
|
|
||||||
this.$refs.create.show();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.dateRange = [];
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 预览按钮 */
|
|
||||||
handlePreview(row) {
|
|
||||||
previewTable(row.tableId).then(response => {
|
|
||||||
this.preview.data = response.data;
|
|
||||||
this.preview.open = true;
|
|
||||||
this.preview.activeName = "domain.java";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 高亮显示 */
|
|
||||||
highlightedCode(code, key) {
|
|
||||||
const vmName = key.substring(key.lastIndexOf("/") + 1, key.indexOf(".vm"));
|
|
||||||
var language = vmName.substring(vmName.indexOf(".") + 1, vmName.length);
|
|
||||||
const result = hljs.highlight(language, code || "", true);
|
|
||||||
return result.value || ' ';
|
|
||||||
},
|
|
||||||
/** 复制代码成功 */
|
|
||||||
clipboardSuccess() {
|
|
||||||
this.$modal.msgSuccess(this.$t('gen.index.467583-11'));
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.tableId);
|
|
||||||
this.tableNames = selection.map(item => item.tableName);
|
|
||||||
this.single = selection.length != 1;
|
|
||||||
this.multiple = !selection.length;
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleEditTable(row) {
|
|
||||||
const tableId = row.tableId || this.ids[0];
|
|
||||||
const tableName = row.tableName || this.tableNames[0];
|
|
||||||
const params = { pageNum: this.queryParams.pageNum };
|
|
||||||
this.$tab.openPage(this.$t('update') + "[" + tableName + "]" + this.$t('gen.index.467583-4'), '/tool/gen-edit/index/' + tableId, params);
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const tableIds = row.tableId || this.ids;
|
|
||||||
this.$modal.confirm(this.$t('gen.index.467583-12', [tableIds])).then(function() {
|
|
||||||
return delTable(tableIds);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSucc
|
},
|
||||||
|
activated() {
|
||||||
|
const time = this.$route.query.t;
|
||||||
|
if (time != null && time != this.uniqueId) {
|
||||||
|
this.uniqueId = time;
|
||||||
|
this.queryParams.pageNum = Number(this.$route.query.pageNum);
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询表集合 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listTable(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
|
||||||
|
this.tableList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 生成代码操作 */
|
||||||
|
handleGenTable(row) {
|
||||||
|
const tableNames = row.tableName || this.tableNames;
|
||||||
|
if (tableNames == '') {
|
||||||
|
this.$modal.msgError(this.$t('gen.index.467583-6'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (row.genType === '1') {
|
||||||
|
genCode(row.tableName).then((response) => {
|
||||||
|
this.$modal.msgSuccess(this.$t('gen.index.467583-7') + row.genPath);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$download.zip('/tool/gen/batchGenCode?tables=' + tableNames, 'ruoyi.zip');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 同步数据库操作 */
|
||||||
|
handleSynchDb(row) {
|
||||||
|
const tableName = row.tableName;
|
||||||
|
this.$modal
|
||||||
|
.confirm(this.$t('gen.index.467583-8') + tableName + this.$t('gen.index.467583-9'))
|
||||||
|
.then(function () {
|
||||||
|
return synchDb(tableName);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$modal.msgSuccess(this.$t('gen.index.467583-10'));
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 打开导入表弹窗 */
|
||||||
|
openImportTable() {
|
||||||
|
this.$refs.import.show();
|
||||||
|
},
|
||||||
|
/** 打开创建表弹窗 */
|
||||||
|
openCreateTable() {
|
||||||
|
this.$refs.create.show();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.dateRange = [];
|
||||||
|
this.resetForm('queryForm');
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 预览按钮 */
|
||||||
|
handlePreview(row) {
|
||||||
|
previewTable(row.tableId).then((response) => {
|
||||||
|
this.preview.data = response.data;
|
||||||
|
this.preview.open = true;
|
||||||
|
this.preview.activeName = 'domain.java';
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 高亮显示 */
|
||||||
|
highlightedCode(code, key) {
|
||||||
|
const vmName = key.substring(key.lastIndexOf('/') + 1, key.indexOf('.vm'));
|
||||||
|
var language = vmName.substring(vmName.indexOf('.') + 1, vmName.length);
|
||||||
|
const result = hljs.highlight(language, code || '', true);
|
||||||
|
return result.value || ' ';
|
||||||
|
},
|
||||||
|
/** 复制代码成功 */
|
||||||
|
clipboardSuccess() {
|
||||||
|
this.$modal.msgSuccess(this.$t('gen.index.467583-11'));
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map((item) => item.tableId);
|
||||||
|
this.tableNames = selection.map((item) => item.tableName);
|
||||||
|
this.single = selection.length != 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleEditTable(row) {
|
||||||
|
const tableId = row.tableId || this.ids[0];
|
||||||
|
const tableName = row.tableName || this.tableNames[0];
|
||||||
|
const params = { pageNum: this.queryParams.pageNum };
|
||||||
|
this.$tab.openPage(this.$t('update') + '[' + tableName + ']' + this.$t('gen.index.467583-4'), '/tool/gen-edit/index/' + tableId, params);
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const tableIds = row.tableId || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm(this.$t('gen.index.467583-12', [tableIds]))
|
||||||
|
.then(function () {
|
||||||
|
return delTable(tableIds);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess(this.$t('delSuccess'));
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user