mirror of
https://gitee.com/beecue/fastbee.git
synced 2026-03-21 22:14: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-50": "please enter an 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-1": "Remove sub devices",
|
||||
"device.sub.083943-2": "Set sub device address",
|
||||
|
||||
@@ -67,5 +67,7 @@
|
||||
"home.free": "Free",
|
||||
"home.diskUsage": "Disk Usage",
|
||||
"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-1": "Data Source",
|
||||
"tool.import.670901-2": "Please select data source",
|
||||
"tool.import.670901-3": "Table Name",
|
||||
"tool.import.670901-4": "Please enter table name",
|
||||
"tool.import.670901-5": "Table Description",
|
||||
"tool.import.670901-6": "Please enter table description",
|
||||
"tool.import.670901-7": "Create Time",
|
||||
"tool.import.670901-8": "Update Time",
|
||||
"tool.import.670901-9": "Please select tables to import",
|
||||
"tool.genInfo.670902-0": "Generate Template",
|
||||
"tool.genInfo.670902-1": "Single Table (CRUD)",
|
||||
"tool.genInfo.670902-2": "Tree Table (CRUD)",
|
||||
"tool.genInfo.670902-3": "Master-Sub Table (CRUD)",
|
||||
"tool.genInfo.670902-4": "Frontend Type",
|
||||
"tool.genInfo.670902-5": "Vue2 Element UI Template",
|
||||
"tool.genInfo.670902-6": "Vue3 Element Plus Template",
|
||||
"tool.genInfo.670902-7": "Package Path",
|
||||
"tool.genInfo.670902-8": "Generate under which java package, e.g. com.ruoyi.system",
|
||||
"tool.genInfo.670902-9": "Module Name",
|
||||
"tool.genInfo.670902-10": "Can be understood as subsystem name, e.g. system",
|
||||
"tool.genInfo.670902-11": "Business Name",
|
||||
"tool.genInfo.670902-12": "Can be understood as function English name, e.g. user",
|
||||
"tool.genInfo.670902-13": "Function Name",
|
||||
"tool.genInfo.670902-14": "Used for class description, e.g. User",
|
||||
"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-17": "Zip Package",
|
||||
"tool.genInfo.670902-18": "Custom Path",
|
||||
"tool.genInfo.670902-19": "Parent Menu",
|
||||
"tool.genInfo.670902-20": "Assign to specified menu, e.g. System Management",
|
||||
"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-23": "Recent Path Quick Select",
|
||||
"tool.genInfo.670902-24": "Restore default generation base path",
|
||||
"tool.genInfo.670902-25": "Other Information",
|
||||
"tool.genInfo.670902-26": "Tree Code Field",
|
||||
"tool.genInfo.670902-27": "Tree display code field name, e.g. dept_id",
|
||||
"tool.genInfo.670902-28": "Please select",
|
||||
"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-31": "Tree Name Field",
|
||||
"tool.genInfo.670902-32": "Tree node display name field name, e.g. dept_name",
|
||||
"tool.genInfo.670902-33": "Association Information",
|
||||
"tool.genInfo.670902-34": "Associated Sub Table Name",
|
||||
"tool.genInfo.670902-35": "Associated sub table name, e.g. sys_user",
|
||||
"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-38": "Please select generate template",
|
||||
"tool.genInfo.670902-39": "Please enter package path",
|
||||
"tool.genInfo.670902-40": "Please enter module name",
|
||||
"tool.genInfo.670902-41": "Please enter business name",
|
||||
"tool.genInfo.670902-42": "Please enter function name",
|
||||
"tool.editTable.670903-0": "Basic Information",
|
||||
"tool.editTable.670903-1": "Column Information",
|
||||
"tool.editTable.670903-2": "Generate Information",
|
||||
"tool.editTable.670903-3": "No.",
|
||||
"tool.editTable.670903-4": "Column Name",
|
||||
"tool.editTable.670903-5": "Column Description",
|
||||
"tool.editTable.670903-6": "Physical Type",
|
||||
"tool.editTable.670903-7": "Java Type",
|
||||
"tool.editTable.670903-8": "Java Property",
|
||||
"tool.editTable.670903-9": "Insert",
|
||||
"tool.editTable.670903-10": "Edit",
|
||||
"tool.editTable.670903-11": "List",
|
||||
"tool.editTable.670903-12": "Query",
|
||||
"tool.editTable.670903-13": "Query Method",
|
||||
"tool.editTable.670903-14": "Required",
|
||||
"tool.editTable.670903-15": "Display Type",
|
||||
"tool.editTable.670903-16": "Input Box",
|
||||
"tool.editTable.670903-17": "Textarea",
|
||||
"tool.editTable.670903-18": "Select",
|
||||
"tool.editTable.670903-19": "Radio",
|
||||
"tool.editTable.670903-20": "Checkbox",
|
||||
"tool.editTable.670903-21": "Date Control",
|
||||
"tool.editTable.670903-22": "Image Upload",
|
||||
"tool.editTable.670903-23": "File Upload",
|
||||
"tool.editTable.670903-24": "Rich Text Control",
|
||||
"tool.editTable.670903-25": "Dict Type",
|
||||
"tool.editTable.670903-26": "Please select",
|
||||
"tool.editTable.670903-27": "Submit",
|
||||
"tool.editTable.670903-28": "Back",
|
||||
"tool.editTable.670903-29": "Form validation failed, please check and resubmit",
|
||||
"tool.createTable.670904-0": "Create Table",
|
||||
"tool.createTable.670904-1": "Create table statement (supports multiple statements):",
|
||||
"tool.createTable.670904-2": "Please enter text",
|
||||
"tool.createTable.670904-3": "Please enter table creation statement",
|
||||
"tool.basicInfo.670905-0": "Table Name",
|
||||
"tool.basicInfo.670905-1": "Please enter repository name",
|
||||
"tool.basicInfo.670905-2": "Table Description",
|
||||
"tool.basicInfo.670905-3": "Please enter",
|
||||
"tool.basicInfo.670905-4": "Entity Class Name",
|
||||
"tool.basicInfo.670905-5": "Author",
|
||||
"tool.basicInfo.670905-6": "Remark",
|
||||
"tool.basicInfo.670905-7": "Please enter table name",
|
||||
"tool.basicInfo.670905-8": "Please enter table description",
|
||||
"tool.basicInfo.670905-9": "Please enter entity class name",
|
||||
"tool.basicInfo.670905-10": "Please enter author",
|
||||
"tool.build.index.670906-0": "Form Generator",
|
||||
"tool.build.index.670906-1": "Input Components",
|
||||
"tool.build.index.670906-2": "Select Components",
|
||||
"tool.build.index.670906-3": "Layout Components",
|
||||
"tool.build.index.670906-4": "Export Vue File",
|
||||
"tool.build.index.670906-5": "Copy Code",
|
||||
"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-8": "Success",
|
||||
"tool.build.index.670906-9": "Code has been copied to clipboard",
|
||||
"tool.build.index.670906-10": "Code copy failed",
|
||||
"tool.build.index.670906-11": "Are you sure to clear all components?",
|
||||
"tool.build.index.670906-12": "Tip",
|
||||
"tool.rightPanel.670907-0": "Component Properties",
|
||||
"tool.rightPanel.670907-1": "Form Properties",
|
||||
"tool.rightPanel.670907-2": "View Component Documentation",
|
||||
"tool.rightPanel.670907-3": "Component Type",
|
||||
"tool.rightPanel.670907-4": "Please select component type",
|
||||
"tool.rightPanel.670907-5": "Field Name",
|
||||
"tool.rightPanel.670907-6": "Please enter field name (v-model)",
|
||||
"tool.rightPanel.670907-7": "Component Name",
|
||||
"tool.rightPanel.670907-8": "Label",
|
||||
"tool.rightPanel.670907-9": "Please enter label",
|
||||
"tool.rightPanel.670907-10": "Placeholder",
|
||||
"tool.rightPanel.670907-11": "Please enter placeholder",
|
||||
"tool.rightPanel.670907-12": "Start Placeholder",
|
||||
"tool.rightPanel.670907-13": "End Placeholder",
|
||||
"tool.rightPanel.670907-14": "Form Grid",
|
||||
"tool.rightPanel.670907-15": "Grid Gap",
|
||||
"tool.rightPanel.670907-16": "Layout Mode",
|
||||
"tool.rightPanel.670907-17": "Justify Content",
|
||||
"tool.rightPanel.670907-18": "Please select justify content",
|
||||
"tool.rightPanel.670907-19": "Align Items",
|
||||
"tool.rightPanel.670907-20": "Label Width",
|
||||
"tool.rightPanel.670907-21": "Please enter label width",
|
||||
"tool.rightPanel.670907-22": "Component Width",
|
||||
"tool.rightPanel.670907-23": "Please enter component width",
|
||||
"tool.rightPanel.670907-24": "Default Value",
|
||||
"tool.rightPanel.670907-25": "Please enter default value",
|
||||
"tool.rightPanel.670907-26": "Min Selection",
|
||||
"tool.rightPanel.670907-27": "Max Selection",
|
||||
"tool.rightPanel.670907-28": "Prefix",
|
||||
"tool.rightPanel.670907-29": "Please enter prefix",
|
||||
"tool.rightPanel.670907-30": "Suffix",
|
||||
"tool.rightPanel.670907-31": "Please enter suffix",
|
||||
"tool.rightPanel.670907-32": "Prefix Icon",
|
||||
"tool.rightPanel.670907-33": "Please enter prefix icon name",
|
||||
"tool.rightPanel.670907-34": "Select",
|
||||
"tool.rightPanel.670907-35": "Suffix Icon",
|
||||
"tool.rightPanel.670907-36": "Please enter suffix icon name",
|
||||
"tool.rightPanel.670907-37": "Option Separator",
|
||||
"tool.rightPanel.670907-38": "Please enter option separator",
|
||||
"tool.rightPanel.670907-39": "Min Rows",
|
||||
"tool.rightPanel.670907-40": "Max Rows",
|
||||
"tool.rightPanel.670907-41": "Min Value",
|
||||
"tool.rightPanel.670907-42": "Max Value",
|
||||
"tool.rightPanel.670907-43": "Step",
|
||||
"tool.rightPanel.670907-44": "Precision",
|
||||
"tool.rightPanel.670907-45": "Controls Position",
|
||||
"tool.rightPanel.670907-46": "Default",
|
||||
"tool.rightPanel.670907-47": "Right",
|
||||
"tool.rightPanel.670907-48": "Max Input",
|
||||
"tool.rightPanel.670907-49": "characters",
|
||||
"tool.rightPanel.670907-50": "Active Text",
|
||||
"tool.rightPanel.670907-51": "Please enter active text",
|
||||
"tool.rightPanel.670907-52": "Inactive Text",
|
||||
"tool.rightPanel.670907-53": "Please enter inactive text",
|
||||
"tool.rightPanel.670907-54": "Active Value",
|
||||
"tool.rightPanel.670907-55": "Please enter active value",
|
||||
"tool.rightPanel.670907-56": "Inactive Value",
|
||||
"tool.rightPanel.670907-57": "Please enter inactive value",
|
||||
"tool.rightPanel.670907-58": "Date Type",
|
||||
"tool.rightPanel.670907-59": "Please select date type",
|
||||
"tool.rightPanel.670907-60": "File Field Name",
|
||||
"tool.rightPanel.670907-61": "Please enter upload file field name",
|
||||
"tool.rightPanel.670907-62": "File Type",
|
||||
"tool.rightPanel.670907-63": "Please select file type",
|
||||
"tool.rightPanel.670907-64": "Image",
|
||||
"tool.rightPanel.670907-65": "Video",
|
||||
"tool.rightPanel.670907-66": "Audio",
|
||||
"tool.rightPanel.670907-67": "File Size",
|
||||
"tool.rightPanel.670907-68": "Please enter file size",
|
||||
"tool.rightPanel.670907-69": "Upload Address",
|
||||
"tool.rightPanel.670907-70": "Please enter upload address",
|
||||
"tool.rightPanel.670907-71": "List Type",
|
||||
"tool.rightPanel.670907-72": "Button Text",
|
||||
"tool.rightPanel.670907-73": "Please enter button text",
|
||||
"tool.rightPanel.670907-74": "Separator",
|
||||
"tool.rightPanel.670907-75": "Please enter separator",
|
||||
"tool.rightPanel.670907-76": "Time Range",
|
||||
"tool.rightPanel.670907-77": "Please enter time range",
|
||||
"tool.rightPanel.670907-78": "Date Format",
|
||||
"tool.rightPanel.670907-79": "Please enter date format",
|
||||
"tool.rightPanel.670907-80": "Options",
|
||||
"tool.rightPanel.670907-81": "Option Name",
|
||||
"tool.rightPanel.670907-82": "Option Value",
|
||||
"tool.rightPanel.670907-83": "Add Option",
|
||||
"tool.rightPanel.670907-84": "Data Type",
|
||||
"tool.rightPanel.670907-85": "Dynamic Data",
|
||||
"tool.rightPanel.670907-86": "Static Data",
|
||||
"tool.rightPanel.670907-87": "Label Key",
|
||||
"tool.rightPanel.670907-88": "Please enter label key",
|
||||
"tool.rightPanel.670907-89": "Value Key",
|
||||
"tool.rightPanel.670907-90": "Please enter value key",
|
||||
"tool.rightPanel.670907-91": "Children Key",
|
||||
"tool.rightPanel.670907-92": "Please enter children key",
|
||||
"tool.rightPanel.670907-93": "Add Parent",
|
||||
"tool.rightPanel.670907-94": "Option Style",
|
||||
"tool.rightPanel.670907-95": "Button",
|
||||
"tool.rightPanel.670907-96": "Active Color",
|
||||
"tool.rightPanel.670907-97": "Inactive Color",
|
||||
"tool.rightPanel.670907-98": "Allow Half",
|
||||
"tool.rightPanel.670907-99": "Show Text",
|
||||
"tool.rightPanel.670907-100": "Show Score",
|
||||
"tool.rightPanel.670907-101": "Show Stops",
|
||||
"tool.rightPanel.670907-102": "Range Selection",
|
||||
"tool.rightPanel.670907-103": "Show Border",
|
||||
"tool.rightPanel.670907-104": "Color Format",
|
||||
"tool.rightPanel.670907-105": "Please select color format",
|
||||
"tool.rightPanel.670907-106": "Option Size",
|
||||
"tool.rightPanel.670907-107": "Medium",
|
||||
"tool.rightPanel.670907-108": "Small",
|
||||
"tool.rightPanel.670907-109": "Mini",
|
||||
"tool.rightPanel.670907-110": "Show Word Limit",
|
||||
"tool.rightPanel.670907-111": "Step Strictly",
|
||||
"tool.rightPanel.670907-112": "Multiple Selection",
|
||||
"tool.rightPanel.670907-113": "Show All Levels",
|
||||
"tool.rightPanel.670907-114": "Filterable",
|
||||
"tool.rightPanel.670907-115": "Clearable",
|
||||
"tool.rightPanel.670907-116": "Show Tip",
|
||||
"tool.rightPanel.670907-117": "Multiple Files",
|
||||
"tool.rightPanel.670907-118": "Auto Upload",
|
||||
"tool.rightPanel.670907-119": "Readonly",
|
||||
"tool.rightPanel.670907-120": "Disabled",
|
||||
"tool.rightPanel.670907-121": "Searchable",
|
||||
"tool.rightPanel.670907-122": "Required",
|
||||
"tool.rightPanel.670907-123": "Layout Structure Tree",
|
||||
"tool.rightPanel.670907-124": "Regular Validation",
|
||||
"tool.rightPanel.670907-125": "Expression",
|
||||
"tool.rightPanel.670907-126": "Please enter regex",
|
||||
"tool.rightPanel.670907-127": "Error Message",
|
||||
"tool.rightPanel.670907-128": "Please enter error message",
|
||||
"tool.rightPanel.670907-129": "Add Rule",
|
||||
"tool.rightPanel.670907-130": "Form Name",
|
||||
"tool.rightPanel.670907-131": "Please enter form name (ref)",
|
||||
"tool.rightPanel.670907-132": "Form Model",
|
||||
"tool.rightPanel.670907-133": "Please enter data model",
|
||||
"tool.rightPanel.670907-134": "Validation Model",
|
||||
"tool.rightPanel.670907-135": "Please enter validation model",
|
||||
"tool.rightPanel.670907-136": "Form Size",
|
||||
"tool.rightPanel.670907-137": "Label Position",
|
||||
"tool.rightPanel.670907-138": "Left",
|
||||
"tool.rightPanel.670907-139": "Right",
|
||||
"tool.rightPanel.670907-140": "Top",
|
||||
"tool.rightPanel.670907-141": "Disable Form",
|
||||
"tool.rightPanel.670907-142": "Form Buttons",
|
||||
"tool.rightPanel.670907-143": "Show Unfocused Component Border",
|
||||
"tool.rightPanel.670907-144": "Add Option",
|
||||
"tool.treeNode.670908-0": "Option Name",
|
||||
"tool.treeNode.670908-1": "Please enter option name",
|
||||
"tool.treeNode.670908-2": "Option Value",
|
||||
"tool.treeNode.670908-3": "Please enter option value",
|
||||
"tool.treeNode.670908-4": "String",
|
||||
"tool.treeNode.670908-5": "Number",
|
||||
"tool.treeNode.670908-6": "Confirm",
|
||||
"tool.treeNode.670908-7": "Cancel",
|
||||
"tool.icons.670909-0": "Select Icon",
|
||||
"tool.icons.670909-1": "Please enter icon name",
|
||||
"tool.build.index.670906-13": "Copy",
|
||||
"tool.build.index.670906-14": "Delete",
|
||||
"tool.codeType.670910-0": "Generate Type",
|
||||
"tool.codeType.670910-1": "File Name",
|
||||
"tool.codeType.670910-2": "Please enter file name",
|
||||
"tool.codeType.670910-3": "Page",
|
||||
"tool.codeType.670910-4": "Dialog",
|
||||
"tool.codeType.670910-5": "Generate type cannot be empty"
|
||||
"tool.import.670901-0": "Import Table",
|
||||
"tool.import.670901-1": "Data Source",
|
||||
"tool.import.670901-2": "Please select data source",
|
||||
"tool.import.670901-3": "Table Name",
|
||||
"tool.import.670901-4": "Please enter table name",
|
||||
"tool.import.670901-5": "Table Description",
|
||||
"tool.import.670901-6": "Please enter table description",
|
||||
"tool.import.670901-7": "Create Time",
|
||||
"tool.import.670901-8": "Update Time",
|
||||
"tool.import.670901-9": "Please select tables to import",
|
||||
"tool.genInfo.670902-0": "Generate Template",
|
||||
"tool.genInfo.670902-1": "Single Table (CRUD)",
|
||||
"tool.genInfo.670902-2": "Tree Table (CRUD)",
|
||||
"tool.genInfo.670902-3": "Master-Sub Table (CRUD)",
|
||||
"tool.genInfo.670902-4": "Frontend Type",
|
||||
"tool.genInfo.670902-5": "Vue2 Element UI Template",
|
||||
"tool.genInfo.670902-6": "Vue3 Element Plus Template",
|
||||
"tool.genInfo.670902-7": "Package Path",
|
||||
"tool.genInfo.670902-8": "Generate under which java package, e.g. com.ruoyi.system",
|
||||
"tool.genInfo.670902-9": "Module Name",
|
||||
"tool.genInfo.670902-10": "Can be understood as subsystem name, e.g. system",
|
||||
"tool.genInfo.670902-11": "Business Name",
|
||||
"tool.genInfo.670902-12": "Can be understood as function English name, e.g. user",
|
||||
"tool.genInfo.670902-13": "Function Name",
|
||||
"tool.genInfo.670902-14": "Used for class description, e.g. User",
|
||||
"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-17": "Zip Package",
|
||||
"tool.genInfo.670902-18": "Custom Path",
|
||||
"tool.genInfo.670902-19": "Parent Menu",
|
||||
"tool.genInfo.670902-20": "Assign to specified menu, e.g. System Management",
|
||||
"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-23": "Recent Path Quick Select",
|
||||
"tool.genInfo.670902-24": "Restore default generation base path",
|
||||
"tool.genInfo.670902-25": "Other Information",
|
||||
"tool.genInfo.670902-26": "Tree Code Field",
|
||||
"tool.genInfo.670902-27": "Tree display code field name, e.g. dept_id",
|
||||
"tool.genInfo.670902-28": "Please select",
|
||||
"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-31": "Tree Name Field",
|
||||
"tool.genInfo.670902-32": "Tree node display name field name, e.g. dept_name",
|
||||
"tool.genInfo.670902-33": "Association Information",
|
||||
"tool.genInfo.670902-34": "Associated Sub Table Name",
|
||||
"tool.genInfo.670902-35": "Associated sub table name, e.g. sys_user",
|
||||
"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-38": "Please select generate template",
|
||||
"tool.genInfo.670902-39": "Please enter package path",
|
||||
"tool.genInfo.670902-40": "Please enter module name",
|
||||
"tool.genInfo.670902-41": "Please enter business name",
|
||||
"tool.genInfo.670902-42": "Please enter function name",
|
||||
"tool.editTable.670903-0": "Basic Information",
|
||||
"tool.editTable.670903-1": "Column Information",
|
||||
"tool.editTable.670903-2": "Generate Information",
|
||||
"tool.editTable.670903-3": "No.",
|
||||
"tool.editTable.670903-4": "Column Name",
|
||||
"tool.editTable.670903-5": "Column Description",
|
||||
"tool.editTable.670903-6": "Physical Type",
|
||||
"tool.editTable.670903-7": "Java Type",
|
||||
"tool.editTable.670903-8": "Java Property",
|
||||
"tool.editTable.670903-9": "Insert",
|
||||
"tool.editTable.670903-10": "Edit",
|
||||
"tool.editTable.670903-11": "List",
|
||||
"tool.editTable.670903-12": "Query",
|
||||
"tool.editTable.670903-13": "Query Method",
|
||||
"tool.editTable.670903-14": "Required",
|
||||
"tool.editTable.670903-15": "Display Type",
|
||||
"tool.editTable.670903-16": "Input Box",
|
||||
"tool.editTable.670903-17": "Textarea",
|
||||
"tool.editTable.670903-18": "Select",
|
||||
"tool.editTable.670903-19": "Radio",
|
||||
"tool.editTable.670903-20": "Checkbox",
|
||||
"tool.editTable.670903-21": "Date Control",
|
||||
"tool.editTable.670903-22": "Image Upload",
|
||||
"tool.editTable.670903-23": "File Upload",
|
||||
"tool.editTable.670903-24": "Rich Text Control",
|
||||
"tool.editTable.670903-25": "Dict Type",
|
||||
"tool.editTable.670903-26": "Please select",
|
||||
"tool.editTable.670903-27": "Submit",
|
||||
"tool.editTable.670903-28": "Back",
|
||||
"tool.editTable.670903-29": "Form validation failed, please check and resubmit",
|
||||
"tool.createTable.670904-0": "Create Table",
|
||||
"tool.createTable.670904-1": "Create table statement (supports multiple statements):",
|
||||
"tool.createTable.670904-2": "Please enter text",
|
||||
"tool.createTable.670904-3": "Please enter table creation statement",
|
||||
"tool.basicInfo.670905-0": "Table Name",
|
||||
"tool.basicInfo.670905-1": "Please enter repository name",
|
||||
"tool.basicInfo.670905-2": "Table Description",
|
||||
"tool.basicInfo.670905-3": "Please enter",
|
||||
"tool.basicInfo.670905-4": "Entity Class Name",
|
||||
"tool.basicInfo.670905-5": "Author",
|
||||
"tool.basicInfo.670905-6": "Remark",
|
||||
"tool.basicInfo.670905-7": "Please enter table name",
|
||||
"tool.basicInfo.670905-8": "Please enter table description",
|
||||
"tool.basicInfo.670905-9": "Please enter entity class name",
|
||||
"tool.basicInfo.670905-10": "Please enter author",
|
||||
"tool.build.index.670906-0": "Form Generator",
|
||||
"tool.build.index.670906-1": "Input Components",
|
||||
"tool.build.index.670906-2": "Select Components",
|
||||
"tool.build.index.670906-3": "Layout Components",
|
||||
"tool.build.index.670906-4": "Export Vue File",
|
||||
"tool.build.index.670906-5": "Copy Code",
|
||||
"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-8": "Success",
|
||||
"tool.build.index.670906-9": "Code has been copied to clipboard",
|
||||
"tool.build.index.670906-10": "Code copy failed",
|
||||
"tool.build.index.670906-11": "Are you sure to clear all components?",
|
||||
"tool.build.index.670906-12": "Tip",
|
||||
"tool.rightPanel.670907-0": "Component Properties",
|
||||
"tool.rightPanel.670907-1": "Form Properties",
|
||||
"tool.rightPanel.670907-2": "View Component Documentation",
|
||||
"tool.rightPanel.670907-3": "Component Type",
|
||||
"tool.rightPanel.670907-4": "Please select component type",
|
||||
"tool.rightPanel.670907-5": "Field Name",
|
||||
"tool.rightPanel.670907-6": "Please enter field name (v-model)",
|
||||
"tool.rightPanel.670907-7": "Component Name",
|
||||
"tool.rightPanel.670907-8": "Label",
|
||||
"tool.rightPanel.670907-9": "Please enter label",
|
||||
"tool.rightPanel.670907-10": "Placeholder",
|
||||
"tool.rightPanel.670907-11": "Please enter placeholder",
|
||||
"tool.rightPanel.670907-12": "Start Placeholder",
|
||||
"tool.rightPanel.670907-13": "End Placeholder",
|
||||
"tool.rightPanel.670907-14": "Form Grid",
|
||||
"tool.rightPanel.670907-15": "Grid Gap",
|
||||
"tool.rightPanel.670907-16": "Layout Mode",
|
||||
"tool.rightPanel.670907-17": "Justify Content",
|
||||
"tool.rightPanel.670907-18": "Please select justify content",
|
||||
"tool.rightPanel.670907-19": "Align Items",
|
||||
"tool.rightPanel.670907-20": "Label Width",
|
||||
"tool.rightPanel.670907-21": "Please enter label width",
|
||||
"tool.rightPanel.670907-22": "Component Width",
|
||||
"tool.rightPanel.670907-23": "Please enter component width",
|
||||
"tool.rightPanel.670907-24": "Default Value",
|
||||
"tool.rightPanel.670907-25": "Please enter default value",
|
||||
"tool.rightPanel.670907-26": "Min Selection",
|
||||
"tool.rightPanel.670907-27": "Max Selection",
|
||||
"tool.rightPanel.670907-28": "Prefix",
|
||||
"tool.rightPanel.670907-29": "Please enter prefix",
|
||||
"tool.rightPanel.670907-30": "Suffix",
|
||||
"tool.rightPanel.670907-31": "Please enter suffix",
|
||||
"tool.rightPanel.670907-32": "Prefix Icon",
|
||||
"tool.rightPanel.670907-33": "Please enter prefix icon name",
|
||||
"tool.rightPanel.670907-34": "Select",
|
||||
"tool.rightPanel.670907-35": "Suffix Icon",
|
||||
"tool.rightPanel.670907-36": "Please enter suffix icon name",
|
||||
"tool.rightPanel.670907-37": "Option Separator",
|
||||
"tool.rightPanel.670907-38": "Please enter option separator",
|
||||
"tool.rightPanel.670907-39": "Min Rows",
|
||||
"tool.rightPanel.670907-40": "Max Rows",
|
||||
"tool.rightPanel.670907-41": "Min Value",
|
||||
"tool.rightPanel.670907-42": "Max Value",
|
||||
"tool.rightPanel.670907-43": "Step",
|
||||
"tool.rightPanel.670907-44": "Precision",
|
||||
"tool.rightPanel.670907-45": "Controls Position",
|
||||
"tool.rightPanel.670907-46": "Default",
|
||||
"tool.rightPanel.670907-47": "Right",
|
||||
"tool.rightPanel.670907-48": "Max Input",
|
||||
"tool.rightPanel.670907-49": "characters",
|
||||
"tool.rightPanel.670907-50": "Active Text",
|
||||
"tool.rightPanel.670907-51": "Please enter active text",
|
||||
"tool.rightPanel.670907-52": "Inactive Text",
|
||||
"tool.rightPanel.670907-53": "Please enter inactive text",
|
||||
"tool.rightPanel.670907-54": "Active Value",
|
||||
"tool.rightPanel.670907-55": "Please enter active value",
|
||||
"tool.rightPanel.670907-56": "Inactive Value",
|
||||
"tool.rightPanel.670907-57": "Please enter inactive value",
|
||||
"tool.rightPanel.670907-58": "Date Type",
|
||||
"tool.rightPanel.670907-59": "Please select date type",
|
||||
"tool.rightPanel.670907-60": "File Field Name",
|
||||
"tool.rightPanel.670907-61": "Please enter upload file field name",
|
||||
"tool.rightPanel.670907-62": "File Type",
|
||||
"tool.rightPanel.670907-63": "Please select file type",
|
||||
"tool.rightPanel.670907-64": "Image",
|
||||
"tool.rightPanel.670907-65": "Video",
|
||||
"tool.rightPanel.670907-66": "Audio",
|
||||
"tool.rightPanel.670907-67": "File Size",
|
||||
"tool.rightPanel.670907-68": "Please enter file size",
|
||||
"tool.rightPanel.670907-69": "Upload Address",
|
||||
"tool.rightPanel.670907-70": "Please enter upload address",
|
||||
"tool.rightPanel.670907-71": "List Type",
|
||||
"tool.rightPanel.670907-72": "Button Text",
|
||||
"tool.rightPanel.670907-73": "Please enter button text",
|
||||
"tool.rightPanel.670907-74": "Separator",
|
||||
"tool.rightPanel.670907-75": "Please enter separator",
|
||||
"tool.rightPanel.670907-76": "Time Range",
|
||||
"tool.rightPanel.670907-77": "Please enter time range",
|
||||
"tool.rightPanel.670907-78": "Date Format",
|
||||
"tool.rightPanel.670907-79": "Please enter date format",
|
||||
"tool.rightPanel.670907-80": "Options",
|
||||
"tool.rightPanel.670907-81": "Option Name",
|
||||
"tool.rightPanel.670907-82": "Option Value",
|
||||
"tool.rightPanel.670907-83": "Add Option",
|
||||
"tool.rightPanel.670907-84": "Data Type",
|
||||
"tool.rightPanel.670907-85": "Dynamic Data",
|
||||
"tool.rightPanel.670907-86": "Static Data",
|
||||
"tool.rightPanel.670907-87": "Label Key",
|
||||
"tool.rightPanel.670907-88": "Please enter label key",
|
||||
"tool.rightPanel.670907-89": "Value Key",
|
||||
"tool.rightPanel.670907-90": "Please enter value key",
|
||||
"tool.rightPanel.670907-91": "Children Key",
|
||||
"tool.rightPanel.670907-92": "Please enter children key",
|
||||
"tool.rightPanel.670907-93": "Add Parent",
|
||||
"tool.rightPanel.670907-94": "Option Style",
|
||||
"tool.rightPanel.670907-95": "Button",
|
||||
"tool.rightPanel.670907-96": "Active Color",
|
||||
"tool.rightPanel.670907-97": "Inactive Color",
|
||||
"tool.rightPanel.670907-98": "Allow Half",
|
||||
"tool.rightPanel.670907-99": "Show Text",
|
||||
"tool.rightPanel.670907-100": "Show Score",
|
||||
"tool.rightPanel.670907-101": "Show Stops",
|
||||
"tool.rightPanel.670907-102": "Range Selection",
|
||||
"tool.rightPanel.670907-103": "Show Border",
|
||||
"tool.rightPanel.670907-104": "Color Format",
|
||||
"tool.rightPanel.670907-105": "Please select color format",
|
||||
"tool.rightPanel.670907-106": "Option Size",
|
||||
"tool.rightPanel.670907-107": "Medium",
|
||||
"tool.rightPanel.670907-108": "Small",
|
||||
"tool.rightPanel.670907-109": "Mini",
|
||||
"tool.rightPanel.670907-110": "Show Word Limit",
|
||||
"tool.rightPanel.670907-111": "Step Strictly",
|
||||
"tool.rightPanel.670907-112": "Multiple Selection",
|
||||
"tool.rightPanel.670907-113": "Show All Levels",
|
||||
"tool.rightPanel.670907-114": "Filterable",
|
||||
"tool.rightPanel.670907-115": "Clearable",
|
||||
"tool.rightPanel.670907-116": "Show Tip",
|
||||
"tool.rightPanel.670907-117": "Multiple Files",
|
||||
"tool.rightPanel.670907-118": "Auto Upload",
|
||||
"tool.rightPanel.670907-119": "Readonly",
|
||||
"tool.rightPanel.670907-120": "Disabled",
|
||||
"tool.rightPanel.670907-121": "Searchable",
|
||||
"tool.rightPanel.670907-122": "Required",
|
||||
"tool.rightPanel.670907-123": "Layout Structure Tree",
|
||||
"tool.rightPanel.670907-124": "Regular Validation",
|
||||
"tool.rightPanel.670907-125": "Expression",
|
||||
"tool.rightPanel.670907-126": "Please enter regex",
|
||||
"tool.rightPanel.670907-127": "Error Message",
|
||||
"tool.rightPanel.670907-128": "Please enter error message",
|
||||
"tool.rightPanel.670907-129": "Add Rule",
|
||||
"tool.rightPanel.670907-130": "Form Name",
|
||||
"tool.rightPanel.670907-131": "Please enter form name (ref)",
|
||||
"tool.rightPanel.670907-132": "Form Model",
|
||||
"tool.rightPanel.670907-133": "Please enter data model",
|
||||
"tool.rightPanel.670907-134": "Validation Model",
|
||||
"tool.rightPanel.670907-135": "Please enter validation model",
|
||||
"tool.rightPanel.670907-136": "Form Size",
|
||||
"tool.rightPanel.670907-137": "Label Position",
|
||||
"tool.rightPanel.670907-138": "Left",
|
||||
"tool.rightPanel.670907-139": "Right",
|
||||
"tool.rightPanel.670907-140": "Top",
|
||||
"tool.rightPanel.670907-141": "Disable Form",
|
||||
"tool.rightPanel.670907-142": "Form Buttons",
|
||||
"tool.rightPanel.670907-143": "Show Unfocused Component Border",
|
||||
"tool.rightPanel.670907-144": "Add Option",
|
||||
"tool.treeNode.670908-0": "Option Name",
|
||||
"tool.treeNode.670908-1": "Please enter option name",
|
||||
"tool.treeNode.670908-2": "Option Value",
|
||||
"tool.treeNode.670908-3": "Please enter option value",
|
||||
"tool.treeNode.670908-4": "String",
|
||||
"tool.treeNode.670908-5": "Number",
|
||||
"tool.treeNode.670908-6": "Confirm",
|
||||
"tool.treeNode.670908-7": "Cancel",
|
||||
"tool.icons.670909-0": "Select Icon",
|
||||
"tool.icons.670909-1": "Please enter icon name",
|
||||
"tool.build.index.670906-13": "Copy",
|
||||
"tool.build.index.670906-14": "Delete",
|
||||
"tool.build.index.670906-15": "does not have",
|
||||
"tool.build.index.670906-16": "Related components",
|
||||
"tool.codeType.670910-0": "Generate Type",
|
||||
"tool.codeType.670910-1": "File Name",
|
||||
"tool.codeType.670910-2": "Please enter file name",
|
||||
"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-50": "只能输入整数",
|
||||
"device.running-status.866086-51": "请输入有效的整数",
|
||||
"device.running-status.866086-52": "指令发送",
|
||||
"device.sub.083943-0": "添加子设备",
|
||||
"device.sub.083943-1": "移除子设备",
|
||||
"device.sub.083943-2": "设置子设备地址",
|
||||
|
||||
@@ -67,5 +67,7 @@
|
||||
"home.free": "剩余",
|
||||
"home.diskUsage": "系统盘使用率",
|
||||
"home.diskStatus": "磁盘状态",
|
||||
"home.available": "可用"
|
||||
"home.available": "可用",
|
||||
"home.fengxinIoT": "蜂信物联",
|
||||
"home.projectDocs": "项目文档"
|
||||
}
|
||||
|
||||
@@ -1,276 +1,278 @@
|
||||
{
|
||||
"tool.import.670901-0": "导入表",
|
||||
"tool.import.670901-1": "数据源",
|
||||
"tool.import.670901-2": "请选择数据源",
|
||||
"tool.import.670901-3": "表名称",
|
||||
"tool.import.670901-4": "请输入表名称",
|
||||
"tool.import.670901-5": "表描述",
|
||||
"tool.import.670901-6": "请输入表描述",
|
||||
"tool.import.670901-7": "创建时间",
|
||||
"tool.import.670901-8": "更新时间",
|
||||
"tool.import.670901-9": "请选择要导入的表",
|
||||
"tool.genInfo.670902-0": "生成模板",
|
||||
"tool.genInfo.670902-1": "单表(增删改查)",
|
||||
"tool.genInfo.670902-2": "树表(增删改查)",
|
||||
"tool.genInfo.670902-3": "主子表(增删改查)",
|
||||
"tool.genInfo.670902-4": "前端类型",
|
||||
"tool.genInfo.670902-5": "Vue2 Element UI 模版",
|
||||
"tool.genInfo.670902-6": "Vue3 Element Plus 模版",
|
||||
"tool.genInfo.670902-7": "生成包路径",
|
||||
"tool.genInfo.670902-8": "生成在哪个java包下,例如 com.ruoyi.system",
|
||||
"tool.genInfo.670902-9": "生成模块名",
|
||||
"tool.genInfo.670902-10": "可理解为子系统名,例如 system",
|
||||
"tool.genInfo.670902-11": "生成业务名",
|
||||
"tool.genInfo.670902-12": "可理解为功能英文名,例如 user",
|
||||
"tool.genInfo.670902-13": "生成功能名",
|
||||
"tool.genInfo.670902-14": "用作类描述,例如 用户",
|
||||
"tool.genInfo.670902-15": "生成代码方式",
|
||||
"tool.genInfo.670902-16": "默认为zip压缩包下载,也可以自定义生成路径",
|
||||
"tool.genInfo.670902-17": "zip压缩包",
|
||||
"tool.genInfo.670902-18": "自定义路径",
|
||||
"tool.genInfo.670902-19": "上级菜单",
|
||||
"tool.genInfo.670902-20": "分配到指定菜单下,例如 系统管理",
|
||||
"tool.genInfo.670902-21": "请选择系统菜单",
|
||||
"tool.genInfo.670902-22": "填写磁盘绝对路径,若不填写,则生成到当前Web项目下",
|
||||
"tool.genInfo.670902-23": "最近路径快速选择",
|
||||
"tool.genInfo.670902-24": "恢复默认的生成基础路径",
|
||||
"tool.genInfo.670902-25": "其他信息",
|
||||
"tool.genInfo.670902-26": "树编码字段",
|
||||
"tool.genInfo.670902-27": "树显示的编码字段名,如:dept_id",
|
||||
"tool.genInfo.670902-28": "请选择",
|
||||
"tool.genInfo.670902-29": "树父编码字段",
|
||||
"tool.genInfo.670902-30": "树显示的父编码字段名,如:parent_id",
|
||||
"tool.genInfo.670902-31": "树名称字段",
|
||||
"tool.genInfo.670902-32": "树节点的显示名称字段名,如:dept_name",
|
||||
"tool.genInfo.670902-33": "关联信息",
|
||||
"tool.genInfo.670902-34": "关联子表的表名",
|
||||
"tool.genInfo.670902-35": "关联子表的表名,如:sys_user",
|
||||
"tool.genInfo.670902-36": "子表关联的外键名",
|
||||
"tool.genInfo.670902-37": "子表关联的外键名,如:user_id",
|
||||
"tool.genInfo.670902-38": "请选择生成模板",
|
||||
"tool.genInfo.670902-39": "请输入生成包路径",
|
||||
"tool.genInfo.670902-40": "请输入生成模块名",
|
||||
"tool.genInfo.670902-41": "请输入生成业务名",
|
||||
"tool.genInfo.670902-42": "请输入生成功能名",
|
||||
"tool.editTable.670903-0": "基本信息",
|
||||
"tool.editTable.670903-1": "字段信息",
|
||||
"tool.editTable.670903-2": "生成信息",
|
||||
"tool.editTable.670903-3": "序号",
|
||||
"tool.editTable.670903-4": "字段列名",
|
||||
"tool.editTable.670903-5": "字段描述",
|
||||
"tool.editTable.670903-6": "物理类型",
|
||||
"tool.editTable.670903-7": "Java类型",
|
||||
"tool.editTable.670903-8": "java属性",
|
||||
"tool.editTable.670903-9": "插入",
|
||||
"tool.editTable.670903-10": "编辑",
|
||||
"tool.editTable.670903-11": "列表",
|
||||
"tool.editTable.670903-12": "查询",
|
||||
"tool.editTable.670903-13": "查询方式",
|
||||
"tool.editTable.670903-14": "必填",
|
||||
"tool.editTable.670903-15": "显示类型",
|
||||
"tool.editTable.670903-16": "文本框",
|
||||
"tool.editTable.670903-17": "文本域",
|
||||
"tool.editTable.670903-18": "下拉框",
|
||||
"tool.editTable.670903-19": "单选框",
|
||||
"tool.editTable.670903-20": "复选框",
|
||||
"tool.editTable.670903-21": "日期控件",
|
||||
"tool.editTable.670903-22": "图片上传",
|
||||
"tool.editTable.670903-23": "文件上传",
|
||||
"tool.editTable.670903-24": "富文本控件",
|
||||
"tool.editTable.670903-25": "字典类型",
|
||||
"tool.editTable.670903-26": "请选择",
|
||||
"tool.editTable.670903-27": "提交",
|
||||
"tool.editTable.670903-28": "返回",
|
||||
"tool.editTable.670903-29": "表单校验未通过,请重新检查提交内容",
|
||||
"tool.createTable.670904-0": "创建表",
|
||||
"tool.createTable.670904-1": "创建表语句(支持多个建表语句):",
|
||||
"tool.createTable.670904-2": "请输入文本",
|
||||
"tool.createTable.670904-3": "请输入建表语句",
|
||||
"tool.basicInfo.670905-0": "表名称",
|
||||
"tool.basicInfo.670905-1": "请输入仓库名称",
|
||||
"tool.basicInfo.670905-2": "表描述",
|
||||
"tool.basicInfo.670905-3": "请输入",
|
||||
"tool.basicInfo.670905-4": "实体类名称",
|
||||
"tool.basicInfo.670905-5": "作者",
|
||||
"tool.basicInfo.670905-6": "备注",
|
||||
"tool.basicInfo.670905-7": "请输入表名称",
|
||||
"tool.basicInfo.670905-8": "请输入表描述",
|
||||
"tool.basicInfo.670905-9": "请输入实体类名称",
|
||||
"tool.basicInfo.670905-10": "请输入作者",
|
||||
"tool.build.index.670906-0": "Form Generator",
|
||||
"tool.build.index.670906-1": "输入型组件",
|
||||
"tool.build.index.670906-2": "选择型组件",
|
||||
"tool.build.index.670906-3": "布局型组件",
|
||||
"tool.build.index.670906-4": "导出vue文件",
|
||||
"tool.build.index.670906-5": "复制代码",
|
||||
"tool.build.index.670906-6": "清空",
|
||||
"tool.build.index.670906-7": "从左侧拖入或点选组件进行表单设计",
|
||||
"tool.build.index.670906-8": "成功",
|
||||
"tool.build.index.670906-9": "代码已复制到剪切板,可粘贴。",
|
||||
"tool.build.index.670906-10": "代码复制失败",
|
||||
"tool.build.index.670906-11": "确定要清空所有组件吗?",
|
||||
"tool.build.index.670906-12": "提示",
|
||||
"tool.rightPanel.670907-0": "组件属性",
|
||||
"tool.rightPanel.670907-1": "表单属性",
|
||||
"tool.rightPanel.670907-2": "查看组件文档",
|
||||
"tool.rightPanel.670907-3": "组件类型",
|
||||
"tool.rightPanel.670907-4": "请选择组件类型",
|
||||
"tool.rightPanel.670907-5": "字段名",
|
||||
"tool.rightPanel.670907-6": "请输入字段名(v-model)",
|
||||
"tool.rightPanel.670907-7": "组件名",
|
||||
"tool.rightPanel.670907-8": "标题",
|
||||
"tool.rightPanel.670907-9": "请输入标题",
|
||||
"tool.rightPanel.670907-10": "占位提示",
|
||||
"tool.rightPanel.670907-11": "请输入占位提示",
|
||||
"tool.rightPanel.670907-12": "开始占位",
|
||||
"tool.rightPanel.670907-13": "结束占位",
|
||||
"tool.rightPanel.670907-14": "表单栅格",
|
||||
"tool.rightPanel.670907-15": "栅格间隔",
|
||||
"tool.rightPanel.670907-16": "布局模式",
|
||||
"tool.rightPanel.670907-17": "水平排列",
|
||||
"tool.rightPanel.670907-18": "请选择水平排列",
|
||||
"tool.rightPanel.670907-19": "垂直排列",
|
||||
"tool.rightPanel.670907-20": "标签宽度",
|
||||
"tool.rightPanel.670907-21": "请输入标签宽度",
|
||||
"tool.rightPanel.670907-22": "组件宽度",
|
||||
"tool.rightPanel.670907-23": "请输入组件宽度",
|
||||
"tool.rightPanel.670907-24": "默认值",
|
||||
"tool.rightPanel.670907-25": "请输入默认值",
|
||||
"tool.rightPanel.670907-26": "至少应选",
|
||||
"tool.rightPanel.670907-27": "最多可选",
|
||||
"tool.rightPanel.670907-28": "前缀",
|
||||
"tool.rightPanel.670907-29": "请输入前缀",
|
||||
"tool.rightPanel.670907-30": "后缀",
|
||||
"tool.rightPanel.670907-31": "请输入后缀",
|
||||
"tool.rightPanel.670907-32": "前图标",
|
||||
"tool.rightPanel.670907-33": "请输入前图标名称",
|
||||
"tool.rightPanel.670907-34": "选择",
|
||||
"tool.rightPanel.670907-35": "后图标",
|
||||
"tool.rightPanel.670907-36": "请输入后图标名称",
|
||||
"tool.rightPanel.670907-37": "选项分隔符",
|
||||
"tool.rightPanel.670907-38": "请输入选项分隔符",
|
||||
"tool.rightPanel.670907-39": "最小行数",
|
||||
"tool.rightPanel.670907-40": "最大行数",
|
||||
"tool.rightPanel.670907-41": "最小值",
|
||||
"tool.rightPanel.670907-42": "最大值",
|
||||
"tool.rightPanel.670907-43": "步长",
|
||||
"tool.rightPanel.670907-44": "精度",
|
||||
"tool.rightPanel.670907-45": "按钮位置",
|
||||
"tool.rightPanel.670907-46": "默认",
|
||||
"tool.rightPanel.670907-47": "右侧",
|
||||
"tool.rightPanel.670907-48": "最多输入",
|
||||
"tool.rightPanel.670907-49": "个字符",
|
||||
"tool.rightPanel.670907-50": "开启提示",
|
||||
"tool.rightPanel.670907-51": "请输入开启提示",
|
||||
"tool.rightPanel.670907-52": "关闭提示",
|
||||
"tool.rightPanel.670907-53": "请输入关闭提示",
|
||||
"tool.rightPanel.670907-54": "开启值",
|
||||
"tool.rightPanel.670907-55": "请输入开启值",
|
||||
"tool.rightPanel.670907-56": "关闭值",
|
||||
"tool.rightPanel.670907-57": "请输入关闭值",
|
||||
"tool.rightPanel.670907-58": "时间类型",
|
||||
"tool.rightPanel.670907-59": "请选择时间类型",
|
||||
"tool.rightPanel.670907-60": "文件字段名",
|
||||
"tool.rightPanel.670907-61": "请输入上传文件字段名",
|
||||
"tool.rightPanel.670907-62": "文件类型",
|
||||
"tool.rightPanel.670907-63": "请选择文件类型",
|
||||
"tool.rightPanel.670907-64": "图片",
|
||||
"tool.rightPanel.670907-65": "视频",
|
||||
"tool.rightPanel.670907-66": "音频",
|
||||
"tool.rightPanel.670907-67": "文件大小",
|
||||
"tool.rightPanel.670907-68": "请输入文件大小",
|
||||
"tool.rightPanel.670907-69": "上传地址",
|
||||
"tool.rightPanel.670907-70": "请输入上传地址",
|
||||
"tool.rightPanel.670907-71": "列表类型",
|
||||
"tool.rightPanel.670907-72": "按钮文字",
|
||||
"tool.rightPanel.670907-73": "请输入按钮文字",
|
||||
"tool.rightPanel.670907-74": "分隔符",
|
||||
"tool.rightPanel.670907-75": "请输入分隔符",
|
||||
"tool.rightPanel.670907-76": "时间段",
|
||||
"tool.rightPanel.670907-77": "请输入时间段",
|
||||
"tool.rightPanel.670907-78": "时间格式",
|
||||
"tool.rightPanel.670907-79": "请输入时间格式",
|
||||
"tool.rightPanel.670907-80": "选项",
|
||||
"tool.rightPanel.670907-81": "选项名",
|
||||
"tool.rightPanel.670907-82": "选项值",
|
||||
"tool.rightPanel.670907-83": "添加选项",
|
||||
"tool.rightPanel.670907-84": "数据类型",
|
||||
"tool.rightPanel.670907-85": "动态数据",
|
||||
"tool.rightPanel.670907-86": "静态数据",
|
||||
"tool.rightPanel.670907-87": "标签键名",
|
||||
"tool.rightPanel.670907-88": "请输入标签键名",
|
||||
"tool.rightPanel.670907-89": "值键名",
|
||||
"tool.rightPanel.670907-90": "请输入值键名",
|
||||
"tool.rightPanel.670907-91": "子级键名",
|
||||
"tool.rightPanel.670907-92": "请输入子级键名",
|
||||
"tool.rightPanel.670907-93": "添加父级",
|
||||
"tool.rightPanel.670907-94": "选项样式",
|
||||
"tool.rightPanel.670907-95": "按钮",
|
||||
"tool.rightPanel.670907-96": "开启颜色",
|
||||
"tool.rightPanel.670907-97": "关闭颜色",
|
||||
"tool.rightPanel.670907-98": "允许半选",
|
||||
"tool.rightPanel.670907-99": "辅助文字",
|
||||
"tool.rightPanel.670907-100": "显示分数",
|
||||
"tool.rightPanel.670907-101": "显示间断点",
|
||||
"tool.rightPanel.670907-102": "范围选择",
|
||||
"tool.rightPanel.670907-103": "是否带边框",
|
||||
"tool.rightPanel.670907-104": "颜色格式",
|
||||
"tool.rightPanel.670907-105": "请选择颜色格式",
|
||||
"tool.rightPanel.670907-106": "选项尺寸",
|
||||
"tool.rightPanel.670907-107": "中等",
|
||||
"tool.rightPanel.670907-108": "较小",
|
||||
"tool.rightPanel.670907-109": "迷你",
|
||||
"tool.rightPanel.670907-110": "输入统计",
|
||||
"tool.rightPanel.670907-111": "严格步数",
|
||||
"tool.rightPanel.670907-112": "是否多选",
|
||||
"tool.rightPanel.670907-113": "展示全路径",
|
||||
"tool.rightPanel.670907-114": "可否筛选",
|
||||
"tool.rightPanel.670907-115": "能否清空",
|
||||
"tool.rightPanel.670907-116": "显示提示",
|
||||
"tool.rightPanel.670907-117": "多选文件",
|
||||
"tool.rightPanel.670907-118": "自动上传",
|
||||
"tool.rightPanel.670907-119": "是否只读",
|
||||
"tool.rightPanel.670907-120": "是否禁用",
|
||||
"tool.rightPanel.670907-121": "是否可搜索",
|
||||
"tool.rightPanel.670907-122": "是否必填",
|
||||
"tool.rightPanel.670907-123": "布局结构树",
|
||||
"tool.rightPanel.670907-124": "正则校验",
|
||||
"tool.rightPanel.670907-125": "表达式",
|
||||
"tool.rightPanel.670907-126": "请输入正则",
|
||||
"tool.rightPanel.670907-127": "错误提示",
|
||||
"tool.rightPanel.670907-128": "请输入错误提示",
|
||||
"tool.rightPanel.670907-129": "添加规则",
|
||||
"tool.rightPanel.670907-130": "表单名",
|
||||
"tool.rightPanel.670907-131": "请输入表单名(ref)",
|
||||
"tool.rightPanel.670907-132": "表单模型",
|
||||
"tool.rightPanel.670907-133": "请输入数据模型",
|
||||
"tool.rightPanel.670907-134": "校验模型",
|
||||
"tool.rightPanel.670907-135": "请输入校验模型",
|
||||
"tool.rightPanel.670907-136": "表单尺寸",
|
||||
"tool.rightPanel.670907-137": "标签对齐",
|
||||
"tool.rightPanel.670907-138": "左对齐",
|
||||
"tool.rightPanel.670907-139": "右对齐",
|
||||
"tool.rightPanel.670907-140": "顶部对齐",
|
||||
"tool.rightPanel.670907-141": "禁用表单",
|
||||
"tool.rightPanel.670907-142": "表单按钮",
|
||||
"tool.rightPanel.670907-143": "显示未选中组件边框",
|
||||
"tool.rightPanel.670907-144": "添加选项",
|
||||
"tool.treeNode.670908-0": "选项名",
|
||||
"tool.treeNode.670908-1": "请输入选项名",
|
||||
"tool.treeNode.670908-2": "选项值",
|
||||
"tool.treeNode.670908-3": "请输入选项值",
|
||||
"tool.treeNode.670908-4": "字符串",
|
||||
"tool.treeNode.670908-5": "数字",
|
||||
"tool.treeNode.670908-6": "确定",
|
||||
"tool.treeNode.670908-7": "取消",
|
||||
"tool.icons.670909-0": "选择图标",
|
||||
"tool.icons.670909-1": "请输入图标名称",
|
||||
"tool.build.index.670906-13": "复制",
|
||||
"tool.build.index.670906-14": "删除",
|
||||
"tool.codeType.670910-0": "生成类型",
|
||||
"tool.codeType.670910-1": "文件名",
|
||||
"tool.codeType.670910-2": "请输入文件名",
|
||||
"tool.codeType.670910-3": "页面",
|
||||
"tool.codeType.670910-4": "弹窗",
|
||||
"tool.codeType.670910-5": "生成类型不能为空"
|
||||
"tool.import.670901-0": "导入表",
|
||||
"tool.import.670901-1": "数据源",
|
||||
"tool.import.670901-2": "请选择数据源",
|
||||
"tool.import.670901-3": "表名称",
|
||||
"tool.import.670901-4": "请输入表名称",
|
||||
"tool.import.670901-5": "表描述",
|
||||
"tool.import.670901-6": "请输入表描述",
|
||||
"tool.import.670901-7": "创建时间",
|
||||
"tool.import.670901-8": "更新时间",
|
||||
"tool.import.670901-9": "请选择要导入的表",
|
||||
"tool.genInfo.670902-0": "生成模板",
|
||||
"tool.genInfo.670902-1": "单表(增删改查)",
|
||||
"tool.genInfo.670902-2": "树表(增删改查)",
|
||||
"tool.genInfo.670902-3": "主子表(增删改查)",
|
||||
"tool.genInfo.670902-4": "前端类型",
|
||||
"tool.genInfo.670902-5": "Vue2 Element UI 模版",
|
||||
"tool.genInfo.670902-6": "Vue3 Element Plus 模版",
|
||||
"tool.genInfo.670902-7": "生成包路径",
|
||||
"tool.genInfo.670902-8": "生成在哪个java包下,例如 com.ruoyi.system",
|
||||
"tool.genInfo.670902-9": "生成模块名",
|
||||
"tool.genInfo.670902-10": "可理解为子系统名,例如 system",
|
||||
"tool.genInfo.670902-11": "生成业务名",
|
||||
"tool.genInfo.670902-12": "可理解为功能英文名,例如 user",
|
||||
"tool.genInfo.670902-13": "生成功能名",
|
||||
"tool.genInfo.670902-14": "用作类描述,例如 用户",
|
||||
"tool.genInfo.670902-15": "生成代码方式",
|
||||
"tool.genInfo.670902-16": "默认为zip压缩包下载,也可以自定义生成路径",
|
||||
"tool.genInfo.670902-17": "zip压缩包",
|
||||
"tool.genInfo.670902-18": "自定义路径",
|
||||
"tool.genInfo.670902-19": "上级菜单",
|
||||
"tool.genInfo.670902-20": "分配到指定菜单下,例如 系统管理",
|
||||
"tool.genInfo.670902-21": "请选择系统菜单",
|
||||
"tool.genInfo.670902-22": "填写磁盘绝对路径,若不填写,则生成到当前Web项目下",
|
||||
"tool.genInfo.670902-23": "最近路径快速选择",
|
||||
"tool.genInfo.670902-24": "恢复默认的生成基础路径",
|
||||
"tool.genInfo.670902-25": "其他信息",
|
||||
"tool.genInfo.670902-26": "树编码字段",
|
||||
"tool.genInfo.670902-27": "树显示的编码字段名,如:dept_id",
|
||||
"tool.genInfo.670902-28": "请选择",
|
||||
"tool.genInfo.670902-29": "树父编码字段",
|
||||
"tool.genInfo.670902-30": "树显示的父编码字段名,如:parent_id",
|
||||
"tool.genInfo.670902-31": "树名称字段",
|
||||
"tool.genInfo.670902-32": "树节点的显示名称字段名,如:dept_name",
|
||||
"tool.genInfo.670902-33": "关联信息",
|
||||
"tool.genInfo.670902-34": "关联子表的表名",
|
||||
"tool.genInfo.670902-35": "关联子表的表名,如:sys_user",
|
||||
"tool.genInfo.670902-36": "子表关联的外键名",
|
||||
"tool.genInfo.670902-37": "子表关联的外键名,如:user_id",
|
||||
"tool.genInfo.670902-38": "请选择生成模板",
|
||||
"tool.genInfo.670902-39": "请输入生成包路径",
|
||||
"tool.genInfo.670902-40": "请输入生成模块名",
|
||||
"tool.genInfo.670902-41": "请输入生成业务名",
|
||||
"tool.genInfo.670902-42": "请输入生成功能名",
|
||||
"tool.editTable.670903-0": "基本信息",
|
||||
"tool.editTable.670903-1": "字段信息",
|
||||
"tool.editTable.670903-2": "生成信息",
|
||||
"tool.editTable.670903-3": "序号",
|
||||
"tool.editTable.670903-4": "字段列名",
|
||||
"tool.editTable.670903-5": "字段描述",
|
||||
"tool.editTable.670903-6": "物理类型",
|
||||
"tool.editTable.670903-7": "Java类型",
|
||||
"tool.editTable.670903-8": "java属性",
|
||||
"tool.editTable.670903-9": "插入",
|
||||
"tool.editTable.670903-10": "编辑",
|
||||
"tool.editTable.670903-11": "列表",
|
||||
"tool.editTable.670903-12": "查询",
|
||||
"tool.editTable.670903-13": "查询方式",
|
||||
"tool.editTable.670903-14": "必填",
|
||||
"tool.editTable.670903-15": "显示类型",
|
||||
"tool.editTable.670903-16": "文本框",
|
||||
"tool.editTable.670903-17": "文本域",
|
||||
"tool.editTable.670903-18": "下拉框",
|
||||
"tool.editTable.670903-19": "单选框",
|
||||
"tool.editTable.670903-20": "复选框",
|
||||
"tool.editTable.670903-21": "日期控件",
|
||||
"tool.editTable.670903-22": "图片上传",
|
||||
"tool.editTable.670903-23": "文件上传",
|
||||
"tool.editTable.670903-24": "富文本控件",
|
||||
"tool.editTable.670903-25": "字典类型",
|
||||
"tool.editTable.670903-26": "请选择",
|
||||
"tool.editTable.670903-27": "提交",
|
||||
"tool.editTable.670903-28": "返回",
|
||||
"tool.editTable.670903-29": "表单校验未通过,请重新检查提交内容",
|
||||
"tool.createTable.670904-0": "创建表",
|
||||
"tool.createTable.670904-1": "创建表语句(支持多个建表语句):",
|
||||
"tool.createTable.670904-2": "请输入文本",
|
||||
"tool.createTable.670904-3": "请输入建表语句",
|
||||
"tool.basicInfo.670905-0": "表名称",
|
||||
"tool.basicInfo.670905-1": "请输入仓库名称",
|
||||
"tool.basicInfo.670905-2": "表描述",
|
||||
"tool.basicInfo.670905-3": "请输入",
|
||||
"tool.basicInfo.670905-4": "实体类名称",
|
||||
"tool.basicInfo.670905-5": "作者",
|
||||
"tool.basicInfo.670905-6": "备注",
|
||||
"tool.basicInfo.670905-7": "请输入表名称",
|
||||
"tool.basicInfo.670905-8": "请输入表描述",
|
||||
"tool.basicInfo.670905-9": "请输入实体类名称",
|
||||
"tool.basicInfo.670905-10": "请输入作者",
|
||||
"tool.build.index.670906-0": "Form Generator",
|
||||
"tool.build.index.670906-1": "输入型组件",
|
||||
"tool.build.index.670906-2": "选择型组件",
|
||||
"tool.build.index.670906-3": "布局型组件",
|
||||
"tool.build.index.670906-4": "导出vue文件",
|
||||
"tool.build.index.670906-5": "复制代码",
|
||||
"tool.build.index.670906-6": "清空",
|
||||
"tool.build.index.670906-7": "从左侧拖入或点选组件进行表单设计",
|
||||
"tool.build.index.670906-8": "成功",
|
||||
"tool.build.index.670906-9": "代码已复制到剪切板,可粘贴。",
|
||||
"tool.build.index.670906-10": "代码复制失败",
|
||||
"tool.build.index.670906-11": "确定要清空所有组件吗?",
|
||||
"tool.build.index.670906-12": "提示",
|
||||
"tool.rightPanel.670907-0": "组件属性",
|
||||
"tool.rightPanel.670907-1": "表单属性",
|
||||
"tool.rightPanel.670907-2": "查看组件文档",
|
||||
"tool.rightPanel.670907-3": "组件类型",
|
||||
"tool.rightPanel.670907-4": "请选择组件类型",
|
||||
"tool.rightPanel.670907-5": "字段名",
|
||||
"tool.rightPanel.670907-6": "请输入字段名(v-model)",
|
||||
"tool.rightPanel.670907-7": "组件名",
|
||||
"tool.rightPanel.670907-8": "标题",
|
||||
"tool.rightPanel.670907-9": "请输入标题",
|
||||
"tool.rightPanel.670907-10": "占位提示",
|
||||
"tool.rightPanel.670907-11": "请输入占位提示",
|
||||
"tool.rightPanel.670907-12": "开始占位",
|
||||
"tool.rightPanel.670907-13": "结束占位",
|
||||
"tool.rightPanel.670907-14": "表单栅格",
|
||||
"tool.rightPanel.670907-15": "栅格间隔",
|
||||
"tool.rightPanel.670907-16": "布局模式",
|
||||
"tool.rightPanel.670907-17": "水平排列",
|
||||
"tool.rightPanel.670907-18": "请选择水平排列",
|
||||
"tool.rightPanel.670907-19": "垂直排列",
|
||||
"tool.rightPanel.670907-20": "标签宽度",
|
||||
"tool.rightPanel.670907-21": "请输入标签宽度",
|
||||
"tool.rightPanel.670907-22": "组件宽度",
|
||||
"tool.rightPanel.670907-23": "请输入组件宽度",
|
||||
"tool.rightPanel.670907-24": "默认值",
|
||||
"tool.rightPanel.670907-25": "请输入默认值",
|
||||
"tool.rightPanel.670907-26": "至少应选",
|
||||
"tool.rightPanel.670907-27": "最多可选",
|
||||
"tool.rightPanel.670907-28": "前缀",
|
||||
"tool.rightPanel.670907-29": "请输入前缀",
|
||||
"tool.rightPanel.670907-30": "后缀",
|
||||
"tool.rightPanel.670907-31": "请输入后缀",
|
||||
"tool.rightPanel.670907-32": "前图标",
|
||||
"tool.rightPanel.670907-33": "请输入前图标名称",
|
||||
"tool.rightPanel.670907-34": "选择",
|
||||
"tool.rightPanel.670907-35": "后图标",
|
||||
"tool.rightPanel.670907-36": "请输入后图标名称",
|
||||
"tool.rightPanel.670907-37": "选项分隔符",
|
||||
"tool.rightPanel.670907-38": "请输入选项分隔符",
|
||||
"tool.rightPanel.670907-39": "最小行数",
|
||||
"tool.rightPanel.670907-40": "最大行数",
|
||||
"tool.rightPanel.670907-41": "最小值",
|
||||
"tool.rightPanel.670907-42": "最大值",
|
||||
"tool.rightPanel.670907-43": "步长",
|
||||
"tool.rightPanel.670907-44": "精度",
|
||||
"tool.rightPanel.670907-45": "按钮位置",
|
||||
"tool.rightPanel.670907-46": "默认",
|
||||
"tool.rightPanel.670907-47": "右侧",
|
||||
"tool.rightPanel.670907-48": "最多输入",
|
||||
"tool.rightPanel.670907-49": "个字符",
|
||||
"tool.rightPanel.670907-50": "开启提示",
|
||||
"tool.rightPanel.670907-51": "请输入开启提示",
|
||||
"tool.rightPanel.670907-52": "关闭提示",
|
||||
"tool.rightPanel.670907-53": "请输入关闭提示",
|
||||
"tool.rightPanel.670907-54": "开启值",
|
||||
"tool.rightPanel.670907-55": "请输入开启值",
|
||||
"tool.rightPanel.670907-56": "关闭值",
|
||||
"tool.rightPanel.670907-57": "请输入关闭值",
|
||||
"tool.rightPanel.670907-58": "时间类型",
|
||||
"tool.rightPanel.670907-59": "请选择时间类型",
|
||||
"tool.rightPanel.670907-60": "文件字段名",
|
||||
"tool.rightPanel.670907-61": "请输入上传文件字段名",
|
||||
"tool.rightPanel.670907-62": "文件类型",
|
||||
"tool.rightPanel.670907-63": "请选择文件类型",
|
||||
"tool.rightPanel.670907-64": "图片",
|
||||
"tool.rightPanel.670907-65": "视频",
|
||||
"tool.rightPanel.670907-66": "音频",
|
||||
"tool.rightPanel.670907-67": "文件大小",
|
||||
"tool.rightPanel.670907-68": "请输入文件大小",
|
||||
"tool.rightPanel.670907-69": "上传地址",
|
||||
"tool.rightPanel.670907-70": "请输入上传地址",
|
||||
"tool.rightPanel.670907-71": "列表类型",
|
||||
"tool.rightPanel.670907-72": "按钮文字",
|
||||
"tool.rightPanel.670907-73": "请输入按钮文字",
|
||||
"tool.rightPanel.670907-74": "分隔符",
|
||||
"tool.rightPanel.670907-75": "请输入分隔符",
|
||||
"tool.rightPanel.670907-76": "时间段",
|
||||
"tool.rightPanel.670907-77": "请输入时间段",
|
||||
"tool.rightPanel.670907-78": "时间格式",
|
||||
"tool.rightPanel.670907-79": "请输入时间格式",
|
||||
"tool.rightPanel.670907-80": "选项",
|
||||
"tool.rightPanel.670907-81": "选项名",
|
||||
"tool.rightPanel.670907-82": "选项值",
|
||||
"tool.rightPanel.670907-83": "添加选项",
|
||||
"tool.rightPanel.670907-84": "数据类型",
|
||||
"tool.rightPanel.670907-85": "动态数据",
|
||||
"tool.rightPanel.670907-86": "静态数据",
|
||||
"tool.rightPanel.670907-87": "标签键名",
|
||||
"tool.rightPanel.670907-88": "请输入标签键名",
|
||||
"tool.rightPanel.670907-89": "值键名",
|
||||
"tool.rightPanel.670907-90": "请输入值键名",
|
||||
"tool.rightPanel.670907-91": "子级键名",
|
||||
"tool.rightPanel.670907-92": "请输入子级键名",
|
||||
"tool.rightPanel.670907-93": "添加父级",
|
||||
"tool.rightPanel.670907-94": "选项样式",
|
||||
"tool.rightPanel.670907-95": "按钮",
|
||||
"tool.rightPanel.670907-96": "开启颜色",
|
||||
"tool.rightPanel.670907-97": "关闭颜色",
|
||||
"tool.rightPanel.670907-98": "允许半选",
|
||||
"tool.rightPanel.670907-99": "辅助文字",
|
||||
"tool.rightPanel.670907-100": "显示分数",
|
||||
"tool.rightPanel.670907-101": "显示间断点",
|
||||
"tool.rightPanel.670907-102": "范围选择",
|
||||
"tool.rightPanel.670907-103": "是否带边框",
|
||||
"tool.rightPanel.670907-104": "颜色格式",
|
||||
"tool.rightPanel.670907-105": "请选择颜色格式",
|
||||
"tool.rightPanel.670907-106": "选项尺寸",
|
||||
"tool.rightPanel.670907-107": "中等",
|
||||
"tool.rightPanel.670907-108": "较小",
|
||||
"tool.rightPanel.670907-109": "迷你",
|
||||
"tool.rightPanel.670907-110": "输入统计",
|
||||
"tool.rightPanel.670907-111": "严格步数",
|
||||
"tool.rightPanel.670907-112": "是否多选",
|
||||
"tool.rightPanel.670907-113": "展示全路径",
|
||||
"tool.rightPanel.670907-114": "可否筛选",
|
||||
"tool.rightPanel.670907-115": "能否清空",
|
||||
"tool.rightPanel.670907-116": "显示提示",
|
||||
"tool.rightPanel.670907-117": "多选文件",
|
||||
"tool.rightPanel.670907-118": "自动上传",
|
||||
"tool.rightPanel.670907-119": "是否只读",
|
||||
"tool.rightPanel.670907-120": "是否禁用",
|
||||
"tool.rightPanel.670907-121": "是否可搜索",
|
||||
"tool.rightPanel.670907-122": "是否必填",
|
||||
"tool.rightPanel.670907-123": "布局结构树",
|
||||
"tool.rightPanel.670907-124": "正则校验",
|
||||
"tool.rightPanel.670907-125": "表达式",
|
||||
"tool.rightPanel.670907-126": "请输入正则",
|
||||
"tool.rightPanel.670907-127": "错误提示",
|
||||
"tool.rightPanel.670907-128": "请输入错误提示",
|
||||
"tool.rightPanel.670907-129": "添加规则",
|
||||
"tool.rightPanel.670907-130": "表单名",
|
||||
"tool.rightPanel.670907-131": "请输入表单名(ref)",
|
||||
"tool.rightPanel.670907-132": "表单模型",
|
||||
"tool.rightPanel.670907-133": "请输入数据模型",
|
||||
"tool.rightPanel.670907-134": "校验模型",
|
||||
"tool.rightPanel.670907-135": "请输入校验模型",
|
||||
"tool.rightPanel.670907-136": "表单尺寸",
|
||||
"tool.rightPanel.670907-137": "标签对齐",
|
||||
"tool.rightPanel.670907-138": "左对齐",
|
||||
"tool.rightPanel.670907-139": "右对齐",
|
||||
"tool.rightPanel.670907-140": "顶部对齐",
|
||||
"tool.rightPanel.670907-141": "禁用表单",
|
||||
"tool.rightPanel.670907-142": "表单按钮",
|
||||
"tool.rightPanel.670907-143": "显示未选中组件边框",
|
||||
"tool.rightPanel.670907-144": "添加选项",
|
||||
"tool.treeNode.670908-0": "选项名",
|
||||
"tool.treeNode.670908-1": "请输入选项名",
|
||||
"tool.treeNode.670908-2": "选项值",
|
||||
"tool.treeNode.670908-3": "请输入选项值",
|
||||
"tool.treeNode.670908-4": "字符串",
|
||||
"tool.treeNode.670908-5": "数字",
|
||||
"tool.treeNode.670908-6": "确定",
|
||||
"tool.treeNode.670908-7": "取消",
|
||||
"tool.icons.670909-0": "选择图标",
|
||||
"tool.icons.670909-1": "请输入图标名称",
|
||||
"tool.build.index.670906-13": "复制",
|
||||
"tool.build.index.670906-14": "删除",
|
||||
"tool.build.index.670906-15": "没有与",
|
||||
"tool.build.index.670906-16": "相关的组件",
|
||||
"tool.codeType.670910-0": "生成类型",
|
||||
"tool.codeType.670910-1": "文件名",
|
||||
"tool.codeType.670910-2": "请输入文件名",
|
||||
"tool.codeType.670910-3": "页面",
|
||||
"tool.codeType.670910-4": "弹窗",
|
||||
"tool.codeType.670910-5": "生成类型不能为空"
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<div>
|
||||
<el-row :gutter="20" style="margin-bottom: 16px">
|
||||
<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-select>
|
||||
</el-col>
|
||||
<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-col>
|
||||
</el-row>
|
||||
@@ -127,14 +127,14 @@ export default {
|
||||
this.$refs.player.registercallback('loadingTimeout', this.TimeoutCallback);
|
||||
this.$refs.player.registercallback('delayTimeout', this.TimeoutCallback);
|
||||
startPlay(this.deviceId, this.channelId).then((response) => {
|
||||
console.log('开始推流: [' + this.channelId + ']');
|
||||
const res = response.data;
|
||||
this.streamId = res.streamId;
|
||||
this.playurl = res.playurl;
|
||||
this.$refs.player.play(this.playurl);
|
||||
this.playing = true;
|
||||
this.pushStream = true;
|
||||
});
|
||||
console.log('开始推流: [' + this.channelId + ']');
|
||||
const res = response.data;
|
||||
this.streamId = res.streamId;
|
||||
this.playurl = res.playurl;
|
||||
this.$refs.player.play(this.playurl);
|
||||
this.playing = true;
|
||||
this.pushStream = true;
|
||||
});
|
||||
},
|
||||
closeStream(force) {
|
||||
if (force) {
|
||||
|
||||
@@ -206,12 +206,12 @@
|
||||
Copyright © 2021-2022
|
||||
<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
|
||||
</span>
|
||||
<br />
|
||||
<span>
|
||||
项目文档
|
||||
{{ $t('home.projectDocs') }}
|
||||
<a href="https://fastbee.cn/doc/" target="_blank">https://fastbee.cn/doc/</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
<span>{{ scope.row.createTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标识符" align="center" prop="identify" />
|
||||
<el-table-column label="动作" align="left" header-align="center" prop="logValue">
|
||||
<el-table-column :label="$t('device.device-log.798283-2')" align="center" prop="identify" />
|
||||
<el-table-column :label="$t('device.device-log.798283-15')" align="left" header-align="center" prop="logValue">
|
||||
<template slot-scope="scope">
|
||||
<div v-html="formatValueDisplay(scope.row)"></div>
|
||||
</template>
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<el-table-column :label="$t('device.device-log.798283-16')" header-align="center" align="left" prop="remark">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -1,296 +1,302 @@
|
||||
<template>
|
||||
<div style="padding-left: 20px">
|
||||
<el-form :inline="true" label-width="100px">
|
||||
<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-input v-model="monitorInterval" :placeholder="$t('device.device-monitor.817489-2')" type="number" clearable size="small" style="width: 180px" />
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
<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-input v-model="monitorNumber" :placeholder="$t('device.device-monitor.817489-5')" type="number" clearable size="small" style="width: 180px" />
|
||||
</el-tooltip>
|
||||
</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="danger" icon="el-icon-video-pause" size="mini" @click="stopMonitor()">{{ $t('device.device-monitor.817489-7') }}</el-button>
|
||||
</el-form-item>
|
||||
</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-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' }">
|
||||
<div ref="monitor" style="height: 210px; padding: 0"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding-left: 20px">
|
||||
<el-form :inline="true" label-width="100px">
|
||||
<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-input v-model="monitorInterval" :placeholder="$t('device.device-monitor.817489-2')" type="number" clearable size="small" style="width: 180px" />
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
<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-input v-model="monitorNumber" :placeholder="$t('device.device-monitor.817489-5')" type="number" clearable size="small" style="width: 180px" />
|
||||
</el-tooltip>
|
||||
</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="danger" icon="el-icon-video-pause" size="mini" @click="stopMonitor()">{{ $t('device.device-monitor.817489-7') }}</el-button>
|
||||
</el-form-item>
|
||||
</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-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' }">
|
||||
<div ref="monitor" style="height: 210px; padding: 0"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DeviceMonitor',
|
||||
props: {
|
||||
device: {
|
||||
type: Object,
|
||||
default: null,
|
||||
name: 'DeviceMonitor',
|
||||
props: {
|
||||
device: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// 获取到父组件传递的device后,刷新列表
|
||||
device: function (newVal, oldVal) {
|
||||
this.deviceInfo = newVal;
|
||||
if (this.deviceInfo && this.deviceInfo.deviceId != 0) {
|
||||
// 监测数据
|
||||
this.monitorThings = this.deviceInfo.monitorList;
|
||||
// 监测数据集合初始化
|
||||
this.dataList = [];
|
||||
for (let i = 0; i < this.monitorThings.length; i++) {
|
||||
this.dataList.push({
|
||||
id: this.monitorThings[i].id,
|
||||
name: this.monitorThings[i].name,
|
||||
data: [],
|
||||
});
|
||||
// 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();
|
||||
watch: {
|
||||
// 获取到父组件传递的device后,刷新列表
|
||||
device: function (newVal, oldVal) {
|
||||
this.deviceInfo = newVal;
|
||||
if (this.deviceInfo && this.deviceInfo.deviceId != 0) {
|
||||
// 监测数据
|
||||
this.monitorThings = this.deviceInfo.monitorList;
|
||||
// 监测数据集合初始化
|
||||
this.dataList = [];
|
||||
for (let i = 0; i < this.monitorThings.length; i++) {
|
||||
this.dataList.push({
|
||||
id: this.monitorThings[i].id,
|
||||
name: this.monitorThings[i].name,
|
||||
data: [],
|
||||
});
|
||||
// this.dataList[i].data.push(["2022-03-14 23:32:09", "30"]);
|
||||
}
|
||||
this.dataList[i].data.push([this.getTime(), value]);
|
||||
// 更新图表
|
||||
this.chart[i].setOption({
|
||||
series: [
|
||||
{
|
||||
data: this.dataList[i].data,
|
||||
},
|
||||
],
|
||||
// 绘制监测图表
|
||||
this.$nextTick(function () {
|
||||
this.getMonitorChart();
|
||||
});
|
||||
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;
|
||||
}
|
||||
}
|
||||
this.mqttCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
/** 更新实时监测参数*/
|
||||
beginMonitor() {
|
||||
if (this.deviceInfo.status != 3) {
|
||||
this.$modal.alertError('设备不在线,下发指令失败');
|
||||
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 = '更新实时监测';
|
||||
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: [],
|
||||
},
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
// 实时监测间隔
|
||||
monitorInterval: 1000,
|
||||
// 实时监测次数
|
||||
monitorNumber: 60,
|
||||
// 图表集合
|
||||
chart: [],
|
||||
// 图表数据集合
|
||||
dataList: [],
|
||||
// 监测物模型
|
||||
monitorThings: [],
|
||||
// 图表遮罩层
|
||||
chartLoading: false,
|
||||
// 设备信息
|
||||
deviceInfo: {},
|
||||
};
|
||||
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;
|
||||
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.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>
|
||||
|
||||
@@ -1,86 +1,98 @@
|
||||
<template>
|
||||
<div style="padding-left: 20px">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<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-col>
|
||||
<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-col>
|
||||
</el-row>
|
||||
<div style="padding-left: 20px">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<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-col>
|
||||
<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-col>
|
||||
</el-row>
|
||||
|
||||
<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-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-4')" align="center" prop="isOwner" width="150">
|
||||
<template slot-scope="scope">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('device.device-user.037521-7')" align="center" prop="createTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</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.index.105953-34')" align="center" class-name="small-padding fixed-width" width="180">
|
||||
<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-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:device:share']" v-if="scope.row.isOwner == 0">{{ $t('device.device-user.037521-11') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<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-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-4')" align="center" prop="isOwner" width="150">
|
||||
<template slot-scope="scope">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('device.device-user.037521-7')" align="center" prop="createTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</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.index.105953-34')" align="center" class-name="small-padding fixed-width" width="180">
|
||||
<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-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:device:share']" v-if="scope.row.isOwner == 0">
|
||||
{{ $t('device.device-user.037521-11') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--设备分享对话框-->
|
||||
<el-dialog :title="$t('device.device-user.037521-12')" :visible.sync="open" width="800px">
|
||||
<div style="margin-top: -50px">
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
<!--用户查询-->
|
||||
<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-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-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>
|
||||
<!--设备分享对话框-->
|
||||
<el-dialog :title="$t('device.device-user.037521-12')" :visible.sync="open" width="800px">
|
||||
<div style="margin-top: -50px">
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
<!--用户查询-->
|
||||
<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-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-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-if="message" style="padding: 20px">{{ message }}</div>
|
||||
<div v-if="form.userId" style="padding: 15px">
|
||||
<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>{{ form.userId }}</span>
|
||||
<br />
|
||||
<span style="width: 80px; display: inline-block">{{ $t('device.device-user.037521-17') }}</span>
|
||||
<span>{{ form.phonenumber }}</span>
|
||||
<br />
|
||||
<span style="width: 80px; display: inline-block">{{ $t('device.device-user.037521-18') }}</span>
|
||||
<span>{{ form.userName }}</span>
|
||||
<br />
|
||||
<!--选择权限-->
|
||||
<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-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-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>
|
||||
<!--选择权限-->
|
||||
<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" />
|
||||
</div>
|
||||
</div>
|
||||
<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 @click="closeSelectUser">{{ $t('device.device-user.037521-25') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<!--用户信息和权限设置-->
|
||||
<div v-loading="permsLoading" style="background-color: #f8f8f9; line-height: 28px">
|
||||
<div v-if="message" style="padding: 20px">{{ message }}</div>
|
||||
<div v-if="form.userId" style="padding: 15px">
|
||||
<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>{{ form.userId }}</span>
|
||||
<br />
|
||||
<span style="width: 80px; display: inline-block">{{ $t('device.device-user.037521-17') }}</span>
|
||||
<span>{{ form.phonenumber }}</span>
|
||||
<br />
|
||||
<span style="width: 80px; display: inline-block">{{ $t('device.device-user.037521-18') }}</span>
|
||||
<span>{{ form.userName }}</span>
|
||||
<br />
|
||||
<!--选择权限-->
|
||||
<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-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-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>
|
||||
<!--选择权限-->
|
||||
<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" />
|
||||
</div>
|
||||
</div>
|
||||
<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 @click="closeSelectUser">{{ $t('device.device-user.037521-25') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -88,256 +100,261 @@ import { addDeviceUser, listDeviceUser, getDeviceUser, delDeviceUser, updateDevi
|
||||
import { permListModel } from '@/api/iot/model';
|
||||
|
||||
export default {
|
||||
name: 'device-user',
|
||||
dicts: ['iot_yes_no'],
|
||||
props: {
|
||||
device: {
|
||||
type: Object,
|
||||
default: null,
|
||||
name: 'device-user',
|
||||
dicts: ['iot_yes_no'],
|
||||
props: {
|
||||
device: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// 获取到父组件传递的device后,刷新列表
|
||||
device: function (newVal, oldVal) {
|
||||
this.deviceInfo = newVal;
|
||||
if (this.deviceInfo && this.deviceInfo.deviceId != 0) {
|
||||
this.queryParams.deviceId = this.deviceInfo.deviceId;
|
||||
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;
|
||||
}
|
||||
watch: {
|
||||
// 获取到父组件传递的device后,刷新列表
|
||||
device: function (newVal, oldVal) {
|
||||
this.deviceInfo = newVal;
|
||||
if (this.deviceInfo && this.deviceInfo.deviceId != 0) {
|
||||
this.queryParams.deviceId = this.deviceInfo.deviceId;
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
}
|
||||
this.permsLoading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
// 重置查询
|
||||
resetUserQuery() {
|
||||
this.resetForm('queryForm');
|
||||
this.reset();
|
||||
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: {},
|
||||
};
|
||||
},
|
||||
// 关闭选择用户
|
||||
closeSelectUser() {
|
||||
this.open = false;
|
||||
this.resetUserQuery();
|
||||
created() {
|
||||
this.queryParams.deviceId = this.device.deviceId;
|
||||
this.getList();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.form.perms = selection.map((x) => x.identifier).join(',');
|
||||
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 = 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) {
|
||||
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();
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
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-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('common.search') }}</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</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('reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<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">
|
||||
<input type="radio" :checked="scope.row.isSelect" name="product" />
|
||||
</template>
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
<template>
|
||||
<div style="padding: 6px">
|
||||
<el-card v-show="showSearch" style="margin-bottom: 6px">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="68px" style="margin-bottom: -20px">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" style="margin-bottom: -20px">
|
||||
<el-form-item :label="$t('script.349087-0')" prop="scriptId">
|
||||
<el-input v-model="queryParams.scriptId" :placeholder="$t('script.349087-1')" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
<el-input v-model="queryParams.scriptId" :placeholder="$t('script.349087-1')" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('script.349087-2')" prop="scriptName">
|
||||
<el-input v-model="queryParams.scriptName" :placeholder="$t('script.349087-3')" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
<el-input v-model="queryParams.scriptName" :placeholder="$t('script.349087-3')" clearable @keyup.enter.native="handleQuery" />
|
||||
</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 icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</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('reset') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['iot:script:add']">{{ $t('common.add') }}</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['iot:script:add']">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@@ -34,8 +30,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('script.index.470901-5')" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.rule_script_action" :value="scope.row.scriptAction"
|
||||
size="small" />
|
||||
<dict-tag :options="dict.type.rule_script_action" :value="scope.row.scriptAction" size="small" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('script.index.470901-7')" align="center" prop="scriptLanguage" />
|
||||
@@ -46,23 +41,19 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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">
|
||||
<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)"
|
||||
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('common.del') }}</el-button>
|
||||
<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>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:script:remove']">{{ $t('del') }}</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" />
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 添加或修改规则引擎脚本对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false"
|
||||
:close-on-press-escape="false">
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||
<el-row :gutter="50">
|
||||
<el-col :span="12">
|
||||
@@ -72,16 +63,19 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<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"
|
||||
controls-position="right" style="width: 100%" />
|
||||
<el-input-number v-model="form.scriptOrder" :placeholder="$t('script.index.470901-10')" type="number" controls-position="right" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<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-option v-for="dict in dict.type.rule_script_event" :key="dict.label"
|
||||
:label="dict.label" :value="Number(dict.value)"
|
||||
:disabled="dict.value !== '1' && dict.value !== '2'"></el-option>
|
||||
<el-option
|
||||
v-for="dict in dict.type.rule_script_event"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="Number(dict.value)"
|
||||
:disabled="dict.value !== '1' && dict.value !== '2'"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -89,9 +83,7 @@
|
||||
<el-col :span="12">
|
||||
<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-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>
|
||||
<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>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -102,10 +94,8 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<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')"
|
||||
style="margin-top: 3px">
|
||||
<el-button slot="append" @click="handleSelectProduct()"
|
||||
size="small">{{ $t('script.index.470901-4') }}</el-button>
|
||||
<el-input readonly v-model="form.productName" size="small" :placeholder="$t('script.index.470901-3')" style="margin-top: 3px">
|
||||
<el-button slot="append" @click="handleSelectProduct()" size="small">{{ $t('script.index.470901-4') }}</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -113,28 +103,21 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="padding: 0px 10px" @click="editClick">
|
||||
<AceEditor ref="codeEditor" :content.sync="form.scriptData" lang="groovy" codeStyle="chrome"
|
||||
:read-only="false" width="100%" height="450px"></AceEditor>
|
||||
<AceEditor ref="codeEditor" :content.sync="form.scriptData" lang="groovy" codeStyle="chrome" :read-only="false" width="100%" height="450px"></AceEditor>
|
||||
</div>
|
||||
<div style="padding: 0 10px; margin: 10px 0">
|
||||
<el-alert :title="validateMsg" type="success" 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>
|
||||
<el-alert :title="validateMsg" type="success" 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 slot="footer" class="dialog-footer">
|
||||
<span style="float: left">
|
||||
<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">
|
||||
<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">
|
||||
{{ $t('script.index.470901-17') }}
|
||||
</el-link>
|
||||
</span>
|
||||
<el-button type="success" @click="handleValidate">{{ $t('script.index.470901-18') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:script:edit']"
|
||||
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('common.add') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:script:edit']" 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 @click="cancel">{{ $t('script.index.470901-20') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -406,7 +389,7 @@ msgContext.setPayload(NewPayload);`,
|
||||
this.getList();
|
||||
this.$modal.msgSuccess(this.$i18n.t('script.index.470901-27'));
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 验证按钮操作 */
|
||||
handleValidate() {
|
||||
|
||||
@@ -195,84 +195,84 @@ export default {
|
||||
protocol: [
|
||||
{
|
||||
required: true,
|
||||
message: '默认播放协议不能为空',
|
||||
message: this.$t('sip.index.998533-26'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
ip: [
|
||||
{
|
||||
required: true,
|
||||
message: '服务器ip不能为空',
|
||||
message: this.$t('sip.index.998533-27'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
domain: [
|
||||
{
|
||||
required: true,
|
||||
message: '服务器域名不能为空',
|
||||
message: this.$t('sip.index.998533-28'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
secret: [
|
||||
{
|
||||
required: true,
|
||||
message: '流媒体密钥不能为空',
|
||||
message: this.$t('sip.index.998533-29'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
portHttp: [
|
||||
{
|
||||
required: true,
|
||||
message: 'http端口不能为空',
|
||||
message: this.$t('sip.index.998533-30'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
portHttps: [
|
||||
{
|
||||
required: true,
|
||||
message: 'https端口不能为空',
|
||||
message: this.$t('sip.index.998533-31'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
portRtmp: [
|
||||
{
|
||||
required: true,
|
||||
message: 'rtmp端口不能为空',
|
||||
message: this.$t('sip.index.998533-32'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
portRtsp: [
|
||||
{
|
||||
required: true,
|
||||
message: 'rtsp端口不能为空',
|
||||
message: this.$t('sip.index.998533-33'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
rtpPortRange: [
|
||||
{
|
||||
required: true,
|
||||
message: 'rtp端口范围不能为空',
|
||||
message: this.$t('sip.index.998533-34'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
delFlag: [
|
||||
{
|
||||
required: true,
|
||||
message: '删除标志不能为空',
|
||||
message: this.$t('sip.index.998533-35'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
createBy: [
|
||||
{
|
||||
required: true,
|
||||
message: '创建者不能为空',
|
||||
message: this.$t('sip.index.998533-36'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
createTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '创建时间不能为空',
|
||||
message: this.$t('sip.index.998533-37'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1,103 +1,108 @@
|
||||
<template>
|
||||
<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()">
|
||||
<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-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-form-item>
|
||||
<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-form-item>
|
||||
<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-form-item>
|
||||
<el-form-item>
|
||||
<div style="float: right; font-size: 28px">
|
||||
<el-button @click="close">{{ $t('cancel') }}</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>
|
||||
<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()">
|
||||
<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-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-form-item>
|
||||
<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-form-item>
|
||||
<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-form-item>
|
||||
<el-form-item>
|
||||
<div style="float: right; font-size: 28px">
|
||||
<el-button @click="close">{{ $t('cancel') }}</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>
|
||||
</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>
|
||||
</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>
|
||||
</el-dialog>
|
||||
<!-- 选择用户 -->
|
||||
<user-list ref="userList" @userEvent="getUserData($event)" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 选择用户 -->
|
||||
<user-list ref="userList" @userEvent="getUserData($event)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -105,252 +110,251 @@ import { addmediaServer, checkmediaServer, updatemediaServer } from '@/api/iot/m
|
||||
import userList from '@/views/iot/sip/user-list.vue';
|
||||
|
||||
export default {
|
||||
name: 'MediaServerEdit',
|
||||
components: { userList },
|
||||
props: {
|
||||
editFlag: {
|
||||
type: Boolean,
|
||||
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';
|
||||
}
|
||||
name: 'MediaServerEdit',
|
||||
components: { userList },
|
||||
props: {
|
||||
editFlag: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
openDialog: function (param, callback) {
|
||||
this.showDialog = true;
|
||||
this.listChangeCallback = callback;
|
||||
if (param != null) {
|
||||
if (param.autoConfig === 1) {
|
||||
param.autoConfig = param.autoConfig === 1;
|
||||
} else if (param.autoConfig === 0) {
|
||||
param.autoConfig = param.autoConfig === 1;
|
||||
}
|
||||
|
||||
if (param.rtpEnable === 1) {
|
||||
param.rtpEnable = param.rtpEnable === 1;
|
||||
} else if (param.rtpEnable === 0) {
|
||||
param.rtpEnable = param.rtpEnable === 1;
|
||||
}
|
||||
|
||||
this.mediaServerForm = param;
|
||||
this.currentStep = 3;
|
||||
if (param.rtpPortRange) {
|
||||
let rtpPortRange = this.mediaServerForm.rtpPortRange.split(',');
|
||||
if (rtpPortRange.length > 0) {
|
||||
this.rtpPortRange1 = rtpPortRange[0];
|
||||
this.rtpPortRange2 = rtpPortRange[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
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(this.$t('sip.mediaServerEdit.998534-24')));
|
||||
} 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(this.$t('sip.mediaServerEdit.998534-25')));
|
||||
} 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' }],
|
||||
},
|
||||
};
|
||||
},
|
||||
checkServer: function () {
|
||||
this.$refs.mediaServerForm.validate((valid) => {
|
||||
if (valid) {
|
||||
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',
|
||||
});
|
||||
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) {
|
||||
this.showDialog = true;
|
||||
this.listChangeCallback = callback;
|
||||
if (param != null) {
|
||||
if (param.autoConfig === 1) {
|
||||
param.autoConfig = param.autoConfig === 1;
|
||||
} else if (param.autoConfig === 0) {
|
||||
param.autoConfig = param.autoConfig === 1;
|
||||
}
|
||||
|
||||
if (param.rtpEnable === 1) {
|
||||
param.rtpEnable = param.rtpEnable === 1;
|
||||
} else if (param.rtpEnable === 0) {
|
||||
param.rtpEnable = param.rtpEnable === 1;
|
||||
}
|
||||
|
||||
this.mediaServerForm = param;
|
||||
this.currentStep = 3;
|
||||
if (param.rtpPortRange) {
|
||||
let rtpPortRange = this.mediaServerForm.rtpPortRange.split(',');
|
||||
if (rtpPortRange.length > 0) {
|
||||
this.rtpPortRange1 = rtpPortRange[0];
|
||||
this.rtpPortRange2 = rtpPortRange[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
checkServer: function () {
|
||||
this.$refs.mediaServerForm.validate((valid) => {
|
||||
if (valid) {
|
||||
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>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,21 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<el-row>
|
||||
<el-col :xs="24">
|
||||
<div 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 class="login-wrap">
|
||||
<div class="logo-wrap">
|
||||
<img class="icon" src="@/assets/images/logo_blue.png" />
|
||||
<span class="text">{{ $t('login.989807-37') }}</span>
|
||||
</div>
|
||||
<pre class="introduce-text">{{ $t('login.989807-38') }}</pre>
|
||||
<div class="img-wrap">
|
||||
<img style="width: 100%; height: 100%" src="@/assets/images/cover.png" />
|
||||
</div>
|
||||
<div class="box-wrap">
|
||||
<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>
|
||||
|
||||
<pre class="demo-account">{{ $t('login.989807-33') }}</pre>
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<el-form-item>
|
||||
<div class="alert-box-wrap" v-if="loginForm.bindId != null">
|
||||
@@ -54,15 +58,9 @@
|
||||
</el-form-item>
|
||||
<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>
|
||||
<langSelect class="lang"></langSelect>
|
||||
</div>
|
||||
<el-form-item style="width: 100%">
|
||||
<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">
|
||||
<el-button class="btn" :loading="loading" type="primary" @click.native.prevent="handleLogin">
|
||||
<span v-if="!loading">{{ $t('login.989807-3') }}</span>
|
||||
@@ -78,13 +76,13 @@
|
||||
<span>{{ $t('login.989807-44') }}</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<el-row>
|
||||
<div>
|
||||
<el-link href="https://fastbee.cn/" :underline="false" target="_blank" style="float: left">{{ $t('login.989807-41') }}</el-link>
|
||||
<el-link href="https://fastbee.cn/doc" :underline="false" target="_blank" style="float: left; margin-left: 20px">{{ $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>
|
||||
</div>
|
||||
</el-row>
|
||||
<div class="other-link">
|
||||
<el-link href="https://fastbee.cn/" :underline="false" target="_blank">{{ $t('login.989807-41') }}</el-link>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-link href="https://fastbee.cn/doc" :underline="false" target="_blank">{{ $t('login.989807-40') }}</el-link>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<router-link v-if="!bindAccount" :to="{ path: '/register', query: this.$route.query }">{{ $t('login.989807-18') }}</router-link>
|
||||
</div>
|
||||
<div class="other-login">
|
||||
<span class="text">{{ $t('login.989807-42') }}</span>
|
||||
<svg-icon class="icon" icon-class="wechat" style="color: #07c160" @click="handleGotoWeChatLogin" />
|
||||
@@ -92,15 +90,16 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>
|
||||
Copyright © 2021-2025
|
||||
<a target="_blank" href="http://fastbee.cn">FastBee</a>
|
||||
All Rights Reserved.
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>
|
||||
Copyright © 2021-2026
|
||||
<a target="_blank" href="http://fastbee.cn">FastBee</a>
|
||||
All Rights Reserved.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -469,22 +468,157 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.login {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
<style lang="scss" scoped>
|
||||
.login-wrap {
|
||||
user-select: none;
|
||||
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 {
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
color: #333;
|
||||
font-size: 24px;
|
||||
.cover-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.login-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.login-header {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
margin: 30px auto 0 auto;
|
||||
padding: 15px;
|
||||
flex: 1;
|
||||
padding: 0px;
|
||||
z-index: 1000;
|
||||
max-width: 350px;
|
||||
|
||||
@@ -514,16 +648,12 @@ export default {
|
||||
}
|
||||
|
||||
.el-login-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #333;
|
||||
font-family: Arial;
|
||||
position: absolute;
|
||||
bottom: 24px;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
color: #909399;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.alert-box-wrap {
|
||||
@@ -542,6 +672,7 @@ export default {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.other-login {
|
||||
margin-top: 40px;
|
||||
display: flex;
|
||||
@@ -555,4 +686,66 @@ export default {
|
||||
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>
|
||||
|
||||
372
vue/src/views/monitor/cache/list.vue
vendored
372
vue/src/views/monitor/cache/list.vue
vendored
@@ -1,241 +1,161 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-card style="height: calc(100vh - 125px)">
|
||||
<div slot="header">
|
||||
<span>{{ $t('monitor.cache.list.501235-0') }}</span>
|
||||
<el-button
|
||||
style="float: right; padding: 3px 0"
|
||||
type="text"
|
||||
icon="el-icon-refresh-right"
|
||||
@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>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-card style="height: calc(100vh - 125px)">
|
||||
<div slot="header">
|
||||
<span>{{ $t('monitor.cache.list.501235-0') }}</span>
|
||||
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-refresh-right" @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
|
||||
:label="$t('monitor.cache.list.501235-2')"
|
||||
align="center"
|
||||
prop="cacheName"
|
||||
:show-overflow-tooltip="true"
|
||||
:formatter="nameFormatter"
|
||||
></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>
|
||||
|
||||
<el-table-column
|
||||
:label="$t('common.remark')"
|
||||
align="center"
|
||||
prop="remark"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<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="handleClearCacheName(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-table-column :label="$t('remark')" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="$t('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="handleClearCacheName(scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-card style="height: calc(100vh - 125px)">
|
||||
<div slot="header">
|
||||
<span>{{ $t('monitor.cache.list.501235-5') }}</span>
|
||||
<el-button
|
||||
style="float: right; padding: 3px 0"
|
||||
type="text"
|
||||
icon="el-icon-refresh-right"
|
||||
@click="refreshCacheKeys()"
|
||||
></el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="subLoading"
|
||||
:data="cacheKeys"
|
||||
:height="tableHeight"
|
||||
highlight-current-row
|
||||
@row-click="handleCacheValue"
|
||||
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-card style="height: calc(100vh - 125px)">
|
||||
<div slot="header">
|
||||
<span>{{ $t('monitor.cache.list.501235-5') }}</span>
|
||||
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-refresh-right" @click="refreshCacheKeys()"></el-button>
|
||||
</div>
|
||||
<el-table v-loading="subLoading" :data="cacheKeys" :height="tableHeight" highlight-current-row @row-click="handleCacheValue" 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('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-card :bordered="false" style="height: calc(100vh - 125px)">
|
||||
<div slot="header">
|
||||
<span>{{ $t('monitor.cache.list.501235-7') }}</span>
|
||||
<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
|
||||
>
|
||||
</div>
|
||||
<el-form :model="cacheForm">
|
||||
<el-row :gutter="32">
|
||||
<el-col :offset="1" :span="22">
|
||||
<el-form-item :label="$t('monitor.cache.list.501235-8')" prop="cacheName">
|
||||
<el-input v-model="cacheForm.cacheName" :readOnly="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :offset="1" :span="22">
|
||||
<el-form-item :label="$t('monitor.cache.list.501235-9')" prop="cacheKey">
|
||||
<el-input v-model="cacheForm.cacheKey" :readOnly="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :offset="1" :span="22">
|
||||
<el-form-item :label="$t('monitor.cache.list.501235-10')" prop="cacheValue">
|
||||
<el-input
|
||||
v-model="cacheForm.cacheValue"
|
||||
type="textarea"
|
||||
:rows="8"
|
||||
:readOnly="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-col :span="8">
|
||||
<el-card :bordered="false" style="height: calc(100vh - 125px)">
|
||||
<div slot="header">
|
||||
<span>{{ $t('monitor.cache.list.501235-7') }}</span>
|
||||
<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>
|
||||
</div>
|
||||
<el-form :model="cacheForm">
|
||||
<el-row :gutter="32">
|
||||
<el-col :offset="1" :span="22">
|
||||
<el-form-item :label="$t('monitor.cache.list.501235-8')" prop="cacheName">
|
||||
<el-input v-model="cacheForm.cacheName" :readOnly="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :offset="1" :span="22">
|
||||
<el-form-item :label="$t('monitor.cache.list.501235-9')" prop="cacheKey">
|
||||
<el-input v-model="cacheForm.cacheKey" :readOnly="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :offset="1" :span="22">
|
||||
<el-form-item :label="$t('monitor.cache.list.501235-10')" prop="cacheValue">
|
||||
<el-input v-model="cacheForm.cacheValue" type="textarea" :rows="8" :readOnly="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
name: "CacheList",
|
||||
data() {
|
||||
return {
|
||||
cacheNames: [],
|
||||
cacheKeys: [],
|
||||
cacheForm: {},
|
||||
loading: true,
|
||||
subLoading: false,
|
||||
nowCacheName: "",
|
||||
tableHeight: window.innerHeight - 200
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getCacheNames();
|
||||
},
|
||||
methods: {
|
||||
/** 查询缓存名称列表 */
|
||||
getCacheNames() {
|
||||
this.loading = true;
|
||||
listCacheName().then(response => {
|
||||
this.cacheNames = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
name: 'CacheList',
|
||||
data() {
|
||||
return {
|
||||
cacheNames: [],
|
||||
cacheKeys: [],
|
||||
cacheForm: {},
|
||||
loading: true,
|
||||
subLoading: false,
|
||||
nowCacheName: '',
|
||||
tableHeight: window.innerHeight - 200,
|
||||
};
|
||||
},
|
||||
/** 刷新缓存名称列表 */
|
||||
refreshCacheNames() {
|
||||
this.getCacheNames();
|
||||
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-12'));
|
||||
created() {
|
||||
this.getCacheNames();
|
||||
},
|
||||
/** 清理指定名称缓存 */
|
||||
handleClearCacheName(row) {
|
||||
clearCacheName(row.cacheName).then(response => {
|
||||
this.$modal.msgSuccess(this.$i18n.t('monitor.cache.list.501235-13', [this.nowCacheName]));
|
||||
this.getCacheKeys();
|
||||
});
|
||||
methods: {
|
||||
/** 查询缓存名称列表 */
|
||||
getCacheNames() {
|
||||
this.loading = true;
|
||||
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>
|
||||
|
||||
@@ -1,324 +1,259 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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-input
|
||||
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>
|
||||
<div class="app-container">
|
||||
<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-input v-model="queryParams.operIp" :placeholder="$t('operlog.874509-10')" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
|
||||
</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-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-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="open = false">{{ $t('close') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<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-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>
|
||||
|
||||
<script>
|
||||
import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog";
|
||||
import { list, delOperlog, cleanOperlog } from '@/api/monitor/operlog';
|
||||
|
||||
export default {
|
||||
name: "Operlog",
|
||||
dicts: ['sys_oper_type', 'sys_common_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表格数据
|
||||
list: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 默认排序
|
||||
defaultSort: {prop: 'operTime', order: 'descending'},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
operIp: undefined,
|
||||
title: undefined,
|
||||
operName: undefined,
|
||||
businessType: 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;
|
||||
}
|
||||
);
|
||||
name: 'Operlog',
|
||||
dicts: ['sys_oper_type', 'sys_common_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表格数据
|
||||
list: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 默认排序
|
||||
defaultSort: { prop: 'operTime', order: 'descending' },
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
operIp: undefined,
|
||||
title: undefined,
|
||||
operName: undefined,
|
||||
businessType: undefined,
|
||||
status: undefined,
|
||||
},
|
||||
};
|
||||
},
|
||||
// 操作日志类型字典翻译
|
||||
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(() => {
|
||||
created() {
|
||||
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(() => {});
|
||||
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;
|
||||
});
|
||||
},
|
||||
// 操作日志类型字典翻译
|
||||
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>
|
||||
|
||||
|
||||
@@ -1,324 +1,598 @@
|
||||
<template>
|
||||
<div class="register">
|
||||
<el-row>
|
||||
<el-col :xs="24">
|
||||
<div
|
||||
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 class="register-wrap">
|
||||
<div class="logo-wrap">
|
||||
<img class="icon" src="@/assets/images/logo_blue.png" />
|
||||
<span class="text">{{ $t('login.989807-37') }}</span>
|
||||
</div>
|
||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form"
|
||||
style="z-index: 1000;">
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" :placeholder="$t('login.989807-20')">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="phonenumber">
|
||||
<el-input v-model="registerForm.phonenumber" type="text" auto-complete="off" :placeholder="$t('register.974236-14')">
|
||||
<svg-icon slot="prefix" icon-class="phone" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input v-model="registerForm.password" type="password" auto-complete="off" :placeholder="$t('login.989807-21')"
|
||||
@keyup.enter.native="handleRegister">
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="confirmPassword">
|
||||
<el-input v-model="registerForm.confirmPassword" type="password" auto-complete="off" :placeholder="$t('login.989807-48')"
|
||||
@keyup.enter.native="handleRegister">
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="captchaOnOff" prop="code">
|
||||
<el-input v-model="registerForm.code" auto-complete="off" :placeholder="$t('login.989807-22')" style="width: 63%"
|
||||
@keyup.enter.native="handleRegister">
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<div class="register-code">
|
||||
<img :src="codeUrl" @click="getCode" />
|
||||
<pre class="introduce-text">{{ $t('login.989807-38') }}</pre>
|
||||
<div class="img-wrap">
|
||||
<img style="width: 100%; height: 100%" src="@/assets/images/cover.png" />
|
||||
</div>
|
||||
<div class="box-wrap">
|
||||
<!-- 注册表单 -->
|
||||
<div class="form-box" v-show="!isHaveBind && !errorText && formIndex === 1">
|
||||
<div class="title-wrap">
|
||||
<div class="name">{{ $t('register.974236-0') }}</div>
|
||||
<langSelect class="lang"></langSelect>
|
||||
</div>
|
||||
<el-form class="form-wrap" id="registerForm" ref="registerForm" :model="registerForm" :rules="registerRules">
|
||||
<el-form-item prop="username">
|
||||
<div class="item-wrap">
|
||||
<div class="input-wrap">
|
||||
<input class="inner" v-model="registerForm.username" auto-complete="off" type="text" :placeholder="$t('login.989807-20')" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item prop="phonenumber">
|
||||
<div class="item-wrap">
|
||||
<div class="input-wrap">
|
||||
<input class="inner" v-model="registerForm.phonenumber" auto-complete="off" type="text" :placeholder="$t('register.974236-14')" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<div class="item-wrap">
|
||||
<div class="input-wrap">
|
||||
<input class="inner" v-model="registerForm.password" auto-complete="off" :type="pwdtype" :placeholder="$t('login.989807-21')" />
|
||||
<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>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%">
|
||||
<el-button v-if="!bindAccount" :loading="loading" type="primary" style="width: 100%"
|
||||
@click.native.prevent="handleRegister">
|
||||
<span v-if="!loading">{{ $t('register.974236-4') }}</span>
|
||||
<span v-else>{{ $t('register.974236-5') }}</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-link href="https://fastbee.cn/" :underline="false" target="_blank" style="float: left">{{ $t('login.989807-41') }}</el-link>
|
||||
<el-link href="https://fastbee.cn/doc" :underline="false" target="_blank"
|
||||
style="float: left; margin-left: 20px">{{ $t('login.989807-40') }}</el-link>
|
||||
<router-link :to="{ path: '/login', query: this.$route.query }"
|
||||
style="float: left; margin-left: 20px">{{ $t('register.974236-9') }}</router-link>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 底部 -->
|
||||
<div class="el-register-footer">
|
||||
<span>
|
||||
Copyright © 2021-2025
|
||||
<a target="_blank" href="http://fastbee.cn">FastBee</a>
|
||||
All Rights Reserved.
|
||||
</span>
|
||||
|
||||
<!-- 绑定账号提示 -->
|
||||
<div class="form-box" v-if="isHaveBind">
|
||||
<div class="mess-text">
|
||||
<i style="font-size: 16px" class="el-icon-warning" />
|
||||
<span> {{ $t('login.989807-10') }}</span>
|
||||
<span style="color: #486ff2; cursor: pointer" @click="handleRegister"> {{ $t('login.989807-12') }}</span>
|
||||
</div>
|
||||
<el-button style="margin-top: 40px" class="btn" @click="handleGotoLogin">
|
||||
<span>{{ $t('login.989807-44') }}</span>
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 错误信息提示 -->
|
||||
<div class="form-box" v-if="errorText">
|
||||
<div class="mess-text">
|
||||
<i style="font-size: 16px" class="el-icon-warning" />
|
||||
<span>{{ errorText }}</span>
|
||||
</div>
|
||||
<el-button style="margin-top: 40px" class="btn" @click="handleGotoLogin">
|
||||
<span>{{ $t('login.989807-44') }}</span>
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import 'element-ui/lib/theme-chalk/display.css';
|
||||
import logo from '@/assets/logo/logo.gif';
|
||||
import { getCodeImg, checkBindId, bindRegister } from '@/api/login';
|
||||
import { getCodeImg, checkBindId, getErrorMsg, socialLogin } from '@/api/login';
|
||||
import { register } from '@/api/iot/tool';
|
||||
import { setToken } from '@/utils/auth';
|
||||
import langSelect from '@/layout/components/langSelect';
|
||||
|
||||
export default {
|
||||
name: 'Register',
|
||||
data() {
|
||||
const equalToPassword = (rule, value, callback) => {
|
||||
if (this.registerForm.password !== value) {
|
||||
callback(new Error(this.$t('pwdNotMatch')));
|
||||
} 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()
|
||||
}
|
||||
name: 'Register',
|
||||
components: { langSelect },
|
||||
data() {
|
||||
const equalToPassword = (rule, value, callback) => {
|
||||
if (this.registerForm.password !== value) {
|
||||
callback(new Error(this.$t('pwdNotMatch')));
|
||||
} 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,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.checkBind();
|
||||
this.getCode();
|
||||
},
|
||||
methods: {
|
||||
checkBind() {
|
||||
const query = this.$route.query;
|
||||
const bindId = query.bindId;
|
||||
if (bindId === undefined || bindId === null) {
|
||||
this.bindAccount = false;
|
||||
} else {
|
||||
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: {},
|
||||
};
|
||||
return {
|
||||
formIndex: 1, // 1 注册表单
|
||||
pwdtype: 'password', // 控制密码可见
|
||||
codeUrl: '',
|
||||
registerForm: {
|
||||
username: '',
|
||||
phonenumber: '',
|
||||
password: '',
|
||||
confirmPassword: '',
|
||||
code: '',
|
||||
uuid: '',
|
||||
bindId: '',
|
||||
agree: false, // 同意隐私协议
|
||||
},
|
||||
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();
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
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;
|
||||
} else {
|
||||
this.redirectLogin(loginId);
|
||||
}
|
||||
});
|
||||
},
|
||||
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}`,
|
||||
});
|
||||
methods: {
|
||||
// 显示|隐藏密码
|
||||
handlePasswordTypeChange() {
|
||||
this.pwdtype == 'password' ? (this.pwdtype = 'text') : (this.pwdtype = 'password');
|
||||
},
|
||||
});
|
||||
},
|
||||
handleRegister() {
|
||||
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;
|
||||
// 获取验证码
|
||||
getCode() {
|
||||
getCodeImg().then((res) => {
|
||||
this.captchaOnOff = res.captchaEnabled;
|
||||
if (this.captchaOnOff) {
|
||||
this.getCode();
|
||||
this.codeUrl = 'data:image/gif;base64,' + res.img;
|
||||
this.registerForm.uuid = res.uuid;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
register(this.registerForm)
|
||||
.then((res) => {
|
||||
this.innerRegister(res);
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
if (this.captchaOnOff) {
|
||||
this.getCode();
|
||||
});
|
||||
},
|
||||
// 检测绑定信息
|
||||
checkBind() {
|
||||
const query = this.$route.query;
|
||||
const bindId = query.bindId;
|
||||
if (bindId === undefined || bindId === null) {
|
||||
this.bindAccount = false;
|
||||
} else {
|
||||
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>
|
||||
|
||||
<style lang="scss">
|
||||
.register {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
<style lang="scss" scoped>
|
||||
.register-wrap {
|
||||
user-select: none;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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>
|
||||
</style>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item prop="roleKey">
|
||||
<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>
|
||||
</el-tooltip>
|
||||
{{ $t('role.index.094567-0') }}
|
||||
|
||||
@@ -197,7 +197,7 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<styule lang="scss">
|
||||
<style lang="scss">
|
||||
// 自定义二维码样式
|
||||
.impowerBox .title {
|
||||
display: none;
|
||||
@@ -214,4 +214,4 @@ export default {
|
||||
.impowerBox .status {
|
||||
display: none;
|
||||
}
|
||||
</styule>
|
||||
</style>
|
||||
|
||||
@@ -1,100 +1,121 @@
|
||||
<script>
|
||||
import draggable from 'vuedraggable'
|
||||
import render from '@/utils/generator/render'
|
||||
import draggable from 'vuedraggable';
|
||||
import render from '@/utils/generator/render';
|
||||
|
||||
const components = {
|
||||
itemBtns(h, element, index, parent) {
|
||||
const { copyItem, deleteItem } = this.$listeners
|
||||
return [
|
||||
<span class="drawing-item-copy" title={this.$i18n.t('tool.build.index.670906-13')} onClick={event => {
|
||||
copyItem(element, parent); event.stopPropagation()
|
||||
}}>
|
||||
<i class="el-icon-copy-document" />
|
||||
</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>
|
||||
]
|
||||
}
|
||||
}
|
||||
itemBtns(h, element, index, parent) {
|
||||
const { copyItem, deleteItem } = this.$listeners;
|
||||
return [
|
||||
<span
|
||||
class="drawing-item-copy"
|
||||
title={this.$i18n.t('tool.build.index.670906-13')}
|
||||
onClick={(event) => {
|
||||
copyItem(element, parent);
|
||||
event.stopPropagation();
|
||||
}}
|
||||
>
|
||||
<i class="el-icon-copy-document" />
|
||||
</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 = {
|
||||
colFormItem(h, element, index, parent) {
|
||||
const { activeItem } = this.$listeners
|
||||
let className = this.activeId === element.formId ? 'drawing-item active-from-item' : 'drawing-item'
|
||||
if (this.formConf.unFocusedComponentBorder) className += ' unfocus-bordered'
|
||||
return (
|
||||
<el-col span={element.span} class={className}
|
||||
nativeOnClick={event => { activeItem(element); event.stopPropagation() }}>
|
||||
<el-form-item label-width={element.labelWidth ? `${element.labelWidth}px` : null}
|
||||
label={element.label} required={element.required}>
|
||||
<render key={element.renderKey} conf={element} onInput={ event => {
|
||||
this.$set(element, 'defaultValue', event)
|
||||
}} />
|
||||
</el-form-item>
|
||||
{components.itemBtns.apply(this, arguments)}
|
||||
</el-col>
|
||||
)
|
||||
},
|
||||
rowFormItem(h, element, index, parent) {
|
||||
const { activeItem } = this.$listeners
|
||||
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') {
|
||||
child = <el-row type={element.type} justify={element.justify} align={element.align}>
|
||||
{child}
|
||||
</el-row>
|
||||
}
|
||||
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>
|
||||
)
|
||||
}
|
||||
}
|
||||
colFormItem(h, element, index, parent) {
|
||||
const { activeItem } = this.$listeners;
|
||||
let className = this.activeId === element.formId ? 'drawing-item active-from-item' : 'drawing-item';
|
||||
if (this.formConf.unFocusedComponentBorder) className += ' unfocus-bordered';
|
||||
return (
|
||||
<el-col
|
||||
span={element.span}
|
||||
class={className}
|
||||
nativeOnClick={(event) => {
|
||||
activeItem(element);
|
||||
event.stopPropagation();
|
||||
}}
|
||||
>
|
||||
<el-form-item label-width={element.labelWidth ? `${element.labelWidth}px` : null} label={element.label} required={element.required}>
|
||||
<render
|
||||
key={element.renderKey}
|
||||
conf={element}
|
||||
onInput={(event) => {
|
||||
this.$set(element, 'defaultValue', event);
|
||||
}}
|
||||
/>
|
||||
</el-form-item>
|
||||
{components.itemBtns.apply(this, arguments)}
|
||||
</el-col>
|
||||
);
|
||||
},
|
||||
rowFormItem(h, element, index, parent) {
|
||||
const { activeItem } = this.$listeners;
|
||||
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') {
|
||||
child = (
|
||||
<el-row type={element.type} justify={element.justify} align={element.align}>
|
||||
{child}
|
||||
</el-row>
|
||||
);
|
||||
}
|
||||
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) {
|
||||
if (!Array.isArray(element.children)) return null
|
||||
return element.children.map((el, i) => {
|
||||
const layout = layouts[el.layout]
|
||||
if (layout) {
|
||||
return layout.call(this, h, el, i, element.children)
|
||||
}
|
||||
return layoutIsNotFound()
|
||||
})
|
||||
if (!Array.isArray(element.children)) return null;
|
||||
return element.children.map((el, i) => {
|
||||
const layout = layouts[el.layout];
|
||||
if (layout) {
|
||||
return layout.call(this, h, el, i, element.children);
|
||||
}
|
||||
return 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 {
|
||||
components: {
|
||||
render,
|
||||
draggable
|
||||
},
|
||||
props: [
|
||||
'element',
|
||||
'index',
|
||||
'drawingList',
|
||||
'activeId',
|
||||
'formConf'
|
||||
],
|
||||
render(h) {
|
||||
const layout = layouts[this.element.layout]
|
||||
components: {
|
||||
render,
|
||||
draggable,
|
||||
},
|
||||
props: ['element', 'index', 'drawingList', 'activeId', 'formConf'],
|
||||
render(h) {
|
||||
const layout = layouts[this.element.layout];
|
||||
|
||||
if (layout) {
|
||||
return layout.call(this, h, this.element, this.index, this.drawingList)
|
||||
}
|
||||
return layoutIsNotFound()
|
||||
}
|
||||
}
|
||||
if (layout) {
|
||||
return layout.call(this, h, this.element, this.index, this.drawingList);
|
||||
}
|
||||
return layoutIsNotFound();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -469,7 +469,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<template v-if="activeData.layoutTree">
|
||||
<el-divider>布局结构树</el-divider>
|
||||
<el-divider>{{ $t('tool.rightPanel.670907-123') }}</el-divider>
|
||||
<el-tree
|
||||
:data="[activeData]"
|
||||
:props="layoutTreeProps"
|
||||
@@ -487,7 +487,7 @@
|
||||
</template>
|
||||
|
||||
<template v-if="activeData.layout === 'colFormItem' && activeData.tag !== 'el-button'">
|
||||
<el-divider>正则校验</el-divider>
|
||||
<el-divider>{{ $t('tool.rightPanel.670907-124') }}</el-divider>
|
||||
<div
|
||||
v-for="(item, index) in activeData.regList"
|
||||
:key="index"
|
||||
@@ -496,77 +496,77 @@
|
||||
<span class="close-btn" @click="activeData.regList.splice(index, 1)">
|
||||
<i class="el-icon-close" />
|
||||
</span>
|
||||
<el-form-item label="表达式">
|
||||
<el-input v-model="item.pattern" placeholder="请输入正则" />
|
||||
<el-form-item :label="$t('tool.rightPanel.670907-125')">
|
||||
<el-input v-model="item.pattern" :placeholder="$t('tool.rightPanel.670907-126')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="错误提示" style="margin-bottom:0">
|
||||
<el-input v-model="item.message" placeholder="请输入错误提示" />
|
||||
<el-form-item :label="$t('tool.rightPanel.670907-127')" style="margin-bottom:0">
|
||||
<el-input v-model="item.message" :placeholder="$t('tool.rightPanel.670907-128')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="margin-left: 20px">
|
||||
<el-button icon="el-icon-circle-plus-outline" type="text" @click="addReg">
|
||||
添加规则
|
||||
{{ $t('tool.rightPanel.670907-129') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-form>
|
||||
<!-- 表单属性 -->
|
||||
<el-form v-show="currentTab === 'form'" size="small" label-width="90px">
|
||||
<el-form-item label="表单名">
|
||||
<el-input v-model="formConf.formRef" placeholder="请输入表单名(ref)" />
|
||||
<el-form-item :label="$t('tool.rightPanel.670907-130')">
|
||||
<el-input v-model="formConf.formRef" :placeholder="$t('tool.rightPanel.670907-131')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="表单模型">
|
||||
<el-input v-model="formConf.formModel" placeholder="请输入数据模型" />
|
||||
<el-form-item :label="$t('tool.rightPanel.670907-132')">
|
||||
<el-input v-model="formConf.formModel" :placeholder="$t('tool.rightPanel.670907-133')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="校验模型">
|
||||
<el-input v-model="formConf.formRules" placeholder="请输入校验模型" />
|
||||
<el-form-item :label="$t('tool.rightPanel.670907-134')">
|
||||
<el-input v-model="formConf.formRules" :placeholder="$t('tool.rightPanel.670907-135')" />
|
||||
</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-button label="medium">
|
||||
中等
|
||||
{{ $t('tool.rightPanel.670907-107') }}
|
||||
</el-radio-button>
|
||||
<el-radio-button label="small">
|
||||
较小
|
||||
{{ $t('tool.rightPanel.670907-108') }}
|
||||
</el-radio-button>
|
||||
<el-radio-button label="mini">
|
||||
迷你
|
||||
{{ $t('tool.rightPanel.670907-109') }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</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-button label="left">
|
||||
左对齐
|
||||
{{ $t('tool.rightPanel.670907-138') }}
|
||||
</el-radio-button>
|
||||
<el-radio-button label="right">
|
||||
右对齐
|
||||
{{ $t('tool.rightPanel.670907-139') }}
|
||||
</el-radio-button>
|
||||
<el-radio-button label="top">
|
||||
顶部对齐
|
||||
{{ $t('tool.rightPanel.670907-140') }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="标签宽度">
|
||||
<el-input-number v-model="formConf.labelWidth" placeholder="标签宽度" />
|
||||
<el-form-item :label="$t('tool.rightPanel.670907-20')">
|
||||
<el-input-number v-model="formConf.labelWidth" :placeholder="$t('tool.rightPanel.670907-21')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="栅格间隔">
|
||||
<el-input-number v-model="formConf.gutter" :min="0" placeholder="栅格间隔" />
|
||||
<el-form-item :label="$t('tool.rightPanel.670907-15')">
|
||||
<el-input-number v-model="formConf.gutter" :min="0" :placeholder="$t('tool.rightPanel.670907-15')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="禁用表单">
|
||||
<el-form-item :label="$t('tool.rightPanel.670907-141')">
|
||||
<el-switch v-model="formConf.disabled" />
|
||||
</el-form-item>
|
||||
<el-form-item label="表单按钮">
|
||||
<el-form-item :label="$t('tool.rightPanel.670907-142')">
|
||||
<el-switch v-model="formConf.formBtns" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示未选中组件边框">
|
||||
<el-form-item :label="$t('tool.rightPanel.670907-143')">
|
||||
<el-switch v-model="formConf.unFocusedComponentBorder" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</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" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
<template>
|
||||
<!-- 创建表 -->
|
||||
<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>
|
||||
<el-input type="textarea" :rows="10" :placeholder="$t('tool.createTable.670904-2')" v-model="content"></el-input>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleCreateTable">{{ $t('common.confirm') }}</el-button>
|
||||
<el-button @click="visible = false">{{ $t('common.cancel') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 创建表 -->
|
||||
<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>
|
||||
<el-input type="textarea" :rows="10" :placeholder="$t('tool.createTable.670904-2')" v-model="content"></el-input>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleCreateTable">{{ $t('confirm') }}</el-button>
|
||||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { createTable } from "@/api/tool/gen";
|
||||
import { createTable } from '@/api/tool/gen';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
visible: false,
|
||||
// 文本内容
|
||||
content: ""
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 显示弹框
|
||||
show() {
|
||||
this.visible = true;
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
visible: false,
|
||||
// 文本内容
|
||||
content: '',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 显示弹框
|
||||
show() {
|
||||
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>
|
||||
|
||||
@@ -1,139 +1,123 @@
|
||||
<template>
|
||||
<!-- 导入表 -->
|
||||
<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-item :label="$t('tool.import.670901-1')" prop="dataName">
|
||||
<!-- 导入表 -->
|
||||
<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-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-option v-for="(item, index) in dataSources" :key="index" :label="item" :value="item"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('tool.import.670901-3')" prop="tableName">
|
||||
<el-input
|
||||
v-model="queryParams.tableName"
|
||||
:placeholder="$t('tool.import.670901-4')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('tool.import.670901-5')" prop="tableComment">
|
||||
<el-input
|
||||
v-model="queryParams.tableComment"
|
||||
:placeholder="$t('tool.import.670901-6')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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 icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-table @row-click="clickRow" ref="table" :data="dbTableList" @selection-change="handleSelectionChange" height="260px">
|
||||
<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-table-column prop="tableComment" :label="$t('tool.import.670901-5')" :show-overflow-tooltip="true"></el-table-column>
|
||||
<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>
|
||||
<el-form-item :label="$t('tool.import.670901-3')" prop="tableName">
|
||||
<el-input v-model="queryParams.tableName" :placeholder="$t('tool.import.670901-4')" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('tool.import.670901-5')" prop="tableComment">
|
||||
<el-input v-model="queryParams.tableComment" :placeholder="$t('tool.import.670901-6')" clearable @keyup.enter.native="handleQuery" />
|
||||
</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>
|
||||
<el-table @row-click="clickRow" ref="table" :data="dbTableList" @selection-change="handleSelectionChange" height="260px">
|
||||
<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-table-column prop="tableComment" :label="$t('tool.import.670901-5')" :show-overflow-tooltip="true"></el-table-column>
|
||||
<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('confirm') }}</el-button>
|
||||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDbTable, importTable, listDataSource } from '@/api/tool/gen';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
visible: false,
|
||||
// 选中数组值
|
||||
tables: [],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表数据
|
||||
dbTableList: [],
|
||||
dataSources: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
tableName: undefined,
|
||||
tableComment: undefined,
|
||||
dataName: 'master',
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 显示弹框
|
||||
show() {
|
||||
this.getList();
|
||||
this.visible = true;
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
visible: false,
|
||||
// 选中数组值
|
||||
tables: [],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表数据
|
||||
dbTableList: [],
|
||||
dataSources: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
tableName: undefined,
|
||||
tableComment: undefined,
|
||||
dataName: 'master',
|
||||
},
|
||||
};
|
||||
},
|
||||
clickRow(row) {
|
||||
this.$refs.table.toggleRowSelection(row);
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.tables = selection.map(item => item.tableName);
|
||||
},
|
||||
// 查询表数据
|
||||
getList() {
|
||||
listDbTable(this.queryParams).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.dbTableList = res.rows;
|
||||
this.total = res.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取数据源
|
||||
handleDataSource() {
|
||||
methods: {
|
||||
// 显示弹框
|
||||
show() {
|
||||
this.getList();
|
||||
this.visible = true;
|
||||
},
|
||||
clickRow(row) {
|
||||
this.$refs.table.toggleRowSelection(row);
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.tables = selection.map((item) => item.tableName);
|
||||
},
|
||||
// 查询表数据
|
||||
getList() {
|
||||
listDbTable(this.queryParams).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.dbTableList = res.rows;
|
||||
this.total = res.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取数据源
|
||||
handleDataSource() {
|
||||
this.loading = true;
|
||||
listDataSource().then((response) => {
|
||||
this.dataSources = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
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>
|
||||
|
||||
@@ -1,349 +1,254 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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-input
|
||||
v-model="queryParams.tableName"
|
||||
:placeholder="$t('gen.import.832346-2')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('gen.import.832346-3')" prop="tableComment">
|
||||
<el-input
|
||||
v-model="queryParams.tableComment"
|
||||
:placeholder="$t('gen.import.832346-4')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('creatTime')">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
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>
|
||||
<div class="app-container">
|
||||
<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-input v-model="queryParams.tableName" :placeholder="$t('gen.import.832346-2')" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('gen.import.832346-3')" prop="tableComment">
|
||||
<el-input v-model="queryParams.tableComment" :placeholder="$t('gen.import.832346-4')" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('creatTime')">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
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-col :span="1.5">
|
||||
<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>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<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>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @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-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">
|
||||
<template slot-scope="scope">
|
||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('gen.import.832346-1')"
|
||||
align="center"
|
||||
prop="tableName"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('gen.import.832346-3')"
|
||||
align="center"
|
||||
prop="tableComment"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('gen.index.467583-1')"
|
||||
align="center"
|
||||
prop="className"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column :label="$t('creatTime')" align="center" prop="createTime" width="160" />
|
||||
<el-table-column :label="$t('updateTime')" align="center" prop="updateTime" width="160" />
|
||||
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
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>
|
||||
<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 :label="$t('system.cache.list.093478-1')" type="index" width="50" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('gen.import.832346-1')" align="center" prop="tableName" :show-overflow-tooltip="true" width="120" />
|
||||
<el-table-column :label="$t('gen.import.832346-3')" align="center" prop="tableComment" :show-overflow-tooltip="true" width="120" />
|
||||
<el-table-column :label="$t('gen.index.467583-1')" align="center" prop="className" :show-overflow-tooltip="true" width="120" />
|
||||
<el-table-column :label="$t('creatTime')" align="center" prop="createTime" width="160" />
|
||||
<el-table-column :label="$t('updateTime')" align="center" prop="updateTime" width="160" />
|
||||
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" 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>
|
||||
|
||||
<script>
|
||||
import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/gen";
|
||||
import importTable from "./importTable";
|
||||
import createTable from "./createTable";
|
||||
import hljs from "highlight.js/lib/highlight";
|
||||
import "highlight.js/styles/github-gist.css";
|
||||
hljs.registerLanguage("java", require("highlight.js/lib/languages/java"));
|
||||
hljs.registerLanguage("xml", 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("javascript", require("highlight.js/lib/languages/javascript"));
|
||||
hljs.registerLanguage("sql", require("highlight.js/lib/languages/sql"));
|
||||
import { listTable, previewTable, delTable, genCode, synchDb } from '@/api/tool/gen';
|
||||
import importTable from './importTable';
|
||||
import createTable from './createTable';
|
||||
import hljs from 'highlight.js/lib/highlight';
|
||||
import 'highlight.js/styles/github-gist.css';
|
||||
hljs.registerLanguage('java', require('highlight.js/lib/languages/java'));
|
||||
hljs.registerLanguage('xml', 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('javascript', require('highlight.js/lib/languages/javascript'));
|
||||
hljs.registerLanguage('sql', require('highlight.js/lib/languages/sql'));
|
||||
|
||||
export default {
|
||||
name: "Gen",
|
||||
components: { importTable, createTable },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 唯一标识符
|
||||
uniqueId: "",
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 选中表数组
|
||||
tableNames: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表数据
|
||||
tableList: [],
|
||||
// 日期范围
|
||||
dateRange: "",
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
tableName: undefined,
|
||||
tableComment: undefined
|
||||
},
|
||||
// 预览参数
|
||||
preview: {
|
||||
open: false,
|
||||
title: this.$t('gen.index.467583-5'),
|
||||
data: {},
|
||||
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;
|
||||
}
|
||||
);
|
||||
name: 'Gen',
|
||||
components: { importTable, createTable },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 唯一标识符
|
||||
uniqueId: '',
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 选中表数组
|
||||
tableNames: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表数据
|
||||
tableList: [],
|
||||
// 日期范围
|
||||
dateRange: '',
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
tableName: undefined,
|
||||
tableComment: undefined,
|
||||
},
|
||||
// 预览参数
|
||||
preview: {
|
||||
open: false,
|
||||
title: this.$t('gen.index.467583-5'),
|
||||
data: {},
|
||||
activeName: 'domain.java',
|
||||
},
|
||||
};
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
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(() => {
|
||||
created() {
|
||||
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