迁移SCADA节点配置
This commit is contained in:
10
src/api/scada-manage/device-gather-management.js
Normal file
10
src/api/scada-manage/device-gather-management.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { request } from '@/api/_service'
|
||||||
|
|
||||||
|
const BASE = 'scada_manage/device_gather_management/management/'
|
||||||
|
|
||||||
|
export function getDeviceGatherManagementAll (data) {
|
||||||
|
return request({ url: BASE + 'all', method: 'post', data: { method: 'scada_manage_device_gather_management_management_all', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function deviceDataExportTask (data) {
|
||||||
|
return request({ url: BASE + 'device_data_export_task', method: 'post', data: { method: 'scada_manage_device_gather_management_management_device_data_export_task', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
108
src/api/scada-manage/edge-manager.js
Normal file
108
src/api/scada-manage/edge-manager.js
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
import axios from 'axios'
|
||||||
|
import { request } from '@/api/_service'
|
||||||
|
|
||||||
|
const EDGE_BASE = process.env.VUE_APP_HSLSERVER_API
|
||||||
|
const EDGE_PASSWORD = process.env.VUE_APP_HSLSERVER_PASSWORD
|
||||||
|
|
||||||
|
function edgeUrl (query = '') {
|
||||||
|
return query ? `${EDGE_BASE}?${query}` : EDGE_BASE
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edgeGet (url) {
|
||||||
|
return axios({ method: 'get', url }).then(res => res.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edgePost (url, data) {
|
||||||
|
return axios({ method: 'post', url, data }).then(res => res.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addNode (data) { return edgePost(EDGE_BASE, data) }
|
||||||
|
export function updateNode (data) { return edgePost(EDGE_BASE, data) }
|
||||||
|
export function removeNode (data) { return edgePost(EDGE_BASE, data) }
|
||||||
|
|
||||||
|
export function getQueryNode (data = {}) {
|
||||||
|
const params = new URLSearchParams()
|
||||||
|
params.set('query', 'nodes')
|
||||||
|
params.set('currentPage', data.currentPage || data.page_no || 1)
|
||||||
|
params.set('pageSize', data.pageSize || data.page_size || 10)
|
||||||
|
params.set('working_subclass', data.working_subclass || '')
|
||||||
|
params.set('category', data.categoryName || data.category || '')
|
||||||
|
return edgeGet(edgeUrl(params.toString()))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQueryWorkingSubclasses (data = {}) {
|
||||||
|
const params = new URLSearchParams()
|
||||||
|
params.set('query', 'working_subclasses')
|
||||||
|
if (data.device_code) params.set('device_code', data.device_code)
|
||||||
|
return edgeGet(edgeUrl(params.toString()))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQueryCodes (workingSubclass, deviceCode) {
|
||||||
|
const params = new URLSearchParams()
|
||||||
|
params.set('query', 'codes')
|
||||||
|
params.set('working_subclass', workingSubclass || '')
|
||||||
|
if (deviceCode) params.set('device_code', deviceCode)
|
||||||
|
return edgeGet(edgeUrl(params.toString()))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getNodeValue () { return edgeGet(edgeUrl('query=nodes_value')) }
|
||||||
|
export function getNodeAll () { return edgeGet(edgeUrl('query=nodes_all')) }
|
||||||
|
|
||||||
|
export function getNodeMappingDeviceList (data = {}) {
|
||||||
|
const params = new URLSearchParams()
|
||||||
|
params.set('query', 'node_mapping_device_list')
|
||||||
|
if (data.page_no !== undefined) params.set('currentPage', data.page_no)
|
||||||
|
if (data.page_size !== undefined) params.set('pageSize', data.page_size)
|
||||||
|
if (data.scada_data_capture_node_code) params.set('scada_data_capture_node_code', data.scada_data_capture_node_code)
|
||||||
|
if (data.device_code) params.set('device_code', data.device_code)
|
||||||
|
return edgeGet(edgeUrl(params.toString()))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addNodeMappingDevice (data) { return edgePost(EDGE_BASE, data) }
|
||||||
|
export function editNodeMappingDevice (data) { return edgePost(EDGE_BASE, data) }
|
||||||
|
export function delNodeMappingDevice (data) { return edgePost(EDGE_BASE, data) }
|
||||||
|
|
||||||
|
export function getExecLog (data = {}) {
|
||||||
|
const params = new URLSearchParams()
|
||||||
|
params.set('query', 'get_exec_log')
|
||||||
|
params.set('page_no', data.page_no || 1)
|
||||||
|
params.set('page_size', data.page_size || 10)
|
||||||
|
if (data.create_date) params.set('create_date', data.create_date)
|
||||||
|
if (data.command) params.set('command', data.command)
|
||||||
|
if (data.server_name) params.set('server_name', data.server_name)
|
||||||
|
if (data.device_name) params.set('device_name', data.device_name)
|
||||||
|
return edgeGet(edgeUrl(params.toString()))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQueryNodeData (data = {}) {
|
||||||
|
const params = new URLSearchParams()
|
||||||
|
params.set('query', 'node_data')
|
||||||
|
params.set('startRow', data.startRow || 0)
|
||||||
|
params.set('endRow', data.endRow || 50)
|
||||||
|
params.set('working_subclass', data.workingSubclass || data.working_subclass || '')
|
||||||
|
params.set('wipCode', data.wipCode || '')
|
||||||
|
params.set('start_time', data.startTime || '')
|
||||||
|
params.set('end_time', data.endTime || '')
|
||||||
|
params.set('dedup', data.dedup === undefined ? 1 : data.dedup)
|
||||||
|
if (data.code) params.set('code', Array.isArray(data.code) ? data.code.join(',') : data.code)
|
||||||
|
if (data.device_code) params.set('device_code', data.device_code)
|
||||||
|
return edgeGet(edgeUrl(params.toString()))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function queryServers () { return request({ url: `${EDGE_BASE}?query=servers` }) }
|
||||||
|
export function addServer (data) { return request({ url: EDGE_BASE, method: 'post', data }) }
|
||||||
|
export function updateServer (data) { return request({ url: EDGE_BASE, method: 'post', data }) }
|
||||||
|
export function removeServer (data) { return request({ url: EDGE_BASE, method: 'post', data }) }
|
||||||
|
export function setServerExec (data) { return request({ url: EDGE_BASE, method: 'post', data }) }
|
||||||
|
|
||||||
|
export function verifyServer (url) {
|
||||||
|
return request({ auth: { username: 'admin', password: EDGE_PASSWORD }, method: 'post', url: `${url}/Admin/ServerSettingsRequest` })
|
||||||
|
}
|
||||||
|
|
||||||
|
export function modifyServer (url, data) {
|
||||||
|
return request({ auth: { username: 'admin', password: EDGE_PASSWORD }, method: 'post', url: `${url}/Admin/ServerSettingsModify`, data })
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServeDeviceMonitoring (url) {
|
||||||
|
return request({ auth: { username: 'admin', password: EDGE_PASSWORD }, url: `${url}/Edge/DeviceData?data=/` })
|
||||||
|
}
|
||||||
19
src/api/scada-manage/workshop-config.js
Normal file
19
src/api/scada-manage/workshop-config.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { request } from '@/api/_service'
|
||||||
|
|
||||||
|
const BASE = 'scada_manage/workshop/config/'
|
||||||
|
|
||||||
|
export function getWorkshopConfigAll (data) {
|
||||||
|
return request({ url: BASE + 'all', method: 'get', params: { method: 'scada_manage_workshop_config_all', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function getWorkshopConfigList (data) {
|
||||||
|
return request({ url: BASE + 'list', method: 'get', params: { method: 'scada_manage_workshop_config_list', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function createWorkshopConfig (data) {
|
||||||
|
return request({ url: BASE + 'create', method: 'post', data: { method: 'scada_manage_workshop_config_create', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function editWorkshopConfig (data) {
|
||||||
|
return request({ url: BASE + 'edit', method: 'put', data: { method: 'scada_manage_workshop_config_edit', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function deleteWorkshopConfig (data) {
|
||||||
|
return request({ url: BASE + 'delete', method: 'delete', data: { method: 'scada_manage_workshop_config_delete', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
25
src/api/scada-manage/workshop-point.js
Normal file
25
src/api/scada-manage/workshop-point.js
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import { request } from '@/api/_service'
|
||||||
|
|
||||||
|
const BASE = 'scada_manage/workshop/point/'
|
||||||
|
|
||||||
|
export function getWorkshopPointAll (data) {
|
||||||
|
return request({ url: BASE + 'all', method: 'get', params: { method: 'scada_manage_workshop_point_all', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function getWorkshopPointList (data) {
|
||||||
|
return request({ url: BASE + 'list', method: 'get', params: { method: 'scada_manage_workshop_point_list', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function createWorkshopPoint (data) {
|
||||||
|
return request({ url: BASE + 'create', method: 'post', data: { method: 'scada_manage_workshop_point_create', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function editWorkshopPoint (data) {
|
||||||
|
return request({ url: BASE + 'edit', method: 'put', data: { method: 'scada_manage_workshop_point_edit', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function deleteWorkshopPoint (data) {
|
||||||
|
return request({ url: BASE + 'delete', method: 'delete', data: { method: 'scada_manage_workshop_point_delete', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function importExcel (data) {
|
||||||
|
return request({ url: BASE + 'import', method: 'post', data: { method: 'scada_manage_workshop_point_delete', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
|
export function getWorkshopNodeAll (data) {
|
||||||
|
return request({ url: BASE + 'node_all', method: 'get', data: { method: 'scada_manage_workshop_point_node_all', platform: 'background', ...data } })
|
||||||
|
}
|
||||||
@@ -4877,7 +4877,349 @@
|
|||||||
"sample_value": "Sample Value"
|
"sample_value": "Sample Value"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
,
|
||||||
|
"scada_manage": {
|
||||||
|
"basic_configuration": {
|
||||||
|
"scada_configure": {
|
||||||
|
"search": "Search",
|
||||||
|
"reset": "Reset",
|
||||||
|
"query": "Query",
|
||||||
|
"add": "Add",
|
||||||
|
"edit": "Edit",
|
||||||
|
"delete": "Delete",
|
||||||
|
"operation": "Operation",
|
||||||
|
"confirm": "Confirm",
|
||||||
|
"cancel": "Cancel",
|
||||||
|
"tip": "Tip",
|
||||||
|
"confirm_delete": "Confirm this operation?",
|
||||||
|
"operation_success": "Operation succeeded",
|
||||||
|
"please_select": "Please select records",
|
||||||
|
"sort": "No.",
|
||||||
|
"code": "Code",
|
||||||
|
"name": "Name",
|
||||||
|
"remark": "Remark",
|
||||||
|
"note": "Note",
|
||||||
|
"create_time": "Create Time",
|
||||||
|
"created_time": "Created Time",
|
||||||
|
"add_title": "Add",
|
||||||
|
"edit_title": "Edit",
|
||||||
|
"enter_code": "Enter code",
|
||||||
|
"enter_name": "Enter name",
|
||||||
|
"enter_remark": "Enter remark",
|
||||||
|
"type": "Type",
|
||||||
|
"data_category": "Data Category",
|
||||||
|
"working_subclass": "Process Unit",
|
||||||
|
"data_length": "Data Length",
|
||||||
|
"unit": "Unit",
|
||||||
|
"select_type": "Select type",
|
||||||
|
"select_data_category": "Select data category",
|
||||||
|
"select_working_subclass": "Select process unit",
|
||||||
|
"enter_data_length": "Enter data length",
|
||||||
|
"enter_unit": "Enter unit",
|
||||||
|
"device_status": "Device Status",
|
||||||
|
"item_id_item": "Item ID Item",
|
||||||
|
"device_data": "Device Data",
|
||||||
|
"process_data": "Process Data",
|
||||||
|
"result_data": "Result Data",
|
||||||
|
"statistical_data": "Statistical Data",
|
||||||
|
"inspection_data": "Inspection Data",
|
||||||
|
"batch_import": "Batch Import",
|
||||||
|
"download_template": "Download Template"
|
||||||
},
|
},
|
||||||
|
"ems_configure": {
|
||||||
|
"search": "Search",
|
||||||
|
"reset": "Reset",
|
||||||
|
"query": "Query",
|
||||||
|
"add": "Add",
|
||||||
|
"edit": "Edit",
|
||||||
|
"delete": "Delete",
|
||||||
|
"operation": "Operation",
|
||||||
|
"confirm": "Confirm",
|
||||||
|
"cancel": "Cancel",
|
||||||
|
"tip": "Tip",
|
||||||
|
"confirm_delete": "Confirm this operation?",
|
||||||
|
"operation_success": "Operation succeeded",
|
||||||
|
"please_select": "Please select records",
|
||||||
|
"sort": "No.",
|
||||||
|
"code": "Code",
|
||||||
|
"name": "Name",
|
||||||
|
"remark": "Remark",
|
||||||
|
"note": "Note",
|
||||||
|
"create_time": "Create Time",
|
||||||
|
"created_time": "Created Time",
|
||||||
|
"add_title": "Add",
|
||||||
|
"edit_title": "Edit",
|
||||||
|
"enter_code": "Enter code",
|
||||||
|
"enter_name": "Enter name",
|
||||||
|
"enter_remark": "Enter remark",
|
||||||
|
"type": "Type",
|
||||||
|
"data_category": "Data Category",
|
||||||
|
"working_subclass": "Process Unit",
|
||||||
|
"data_length": "Data Length",
|
||||||
|
"unit": "Unit",
|
||||||
|
"select_type": "Select type",
|
||||||
|
"select_data_category": "Select data category",
|
||||||
|
"select_working_subclass": "Select process unit",
|
||||||
|
"enter_data_length": "Enter data length",
|
||||||
|
"enter_unit": "Enter unit",
|
||||||
|
"device_status": "Device Status",
|
||||||
|
"item_id_item": "Item ID Item",
|
||||||
|
"device_data": "Device Data",
|
||||||
|
"process_data": "Process Data",
|
||||||
|
"result_data": "Result Data",
|
||||||
|
"statistical_data": "Statistical Data",
|
||||||
|
"inspection_data": "Inspection Data",
|
||||||
|
"batch_import": "Batch Import",
|
||||||
|
"download_template": "Download Template",
|
||||||
|
"environmental_data": "Environmental Data"
|
||||||
|
},
|
||||||
|
"node_mapping_device_code": {
|
||||||
|
"search": "Search",
|
||||||
|
"reset": "Reset",
|
||||||
|
"query": "Query",
|
||||||
|
"add": "Add",
|
||||||
|
"edit": "Edit",
|
||||||
|
"delete": "Delete",
|
||||||
|
"operation": "Operation",
|
||||||
|
"confirm": "Confirm",
|
||||||
|
"cancel": "Cancel",
|
||||||
|
"tip": "Tip",
|
||||||
|
"confirm_delete": "Confirm this operation?",
|
||||||
|
"operation_success": "Operation succeeded",
|
||||||
|
"please_select": "Please select records",
|
||||||
|
"sort": "No.",
|
||||||
|
"code": "Code",
|
||||||
|
"name": "Name",
|
||||||
|
"remark": "Remark",
|
||||||
|
"note": "Note",
|
||||||
|
"create_time": "Create Time",
|
||||||
|
"created_time": "Created Time",
|
||||||
|
"add_title": "Add",
|
||||||
|
"edit_title": "Edit",
|
||||||
|
"enter_code": "Enter code",
|
||||||
|
"enter_name": "Enter name",
|
||||||
|
"enter_remark": "Enter remark",
|
||||||
|
"add_mapping": "Add Mapping",
|
||||||
|
"edit_mapping": "Edit Mapping",
|
||||||
|
"node_code": "Node Code",
|
||||||
|
"enter_node_code": "Enter node code",
|
||||||
|
"node_name": "Node Name",
|
||||||
|
"mapping_device": "Mapping Device",
|
||||||
|
"device_code": "Device Code",
|
||||||
|
"select_device_code": "Select device code",
|
||||||
|
"process_unit": "Process Unit",
|
||||||
|
"select_process_unit": "Select process unit",
|
||||||
|
"data_node": "Data Node",
|
||||||
|
"select_data_node": "Select data node",
|
||||||
|
"enter_note": "Enter note"
|
||||||
|
},
|
||||||
|
"edgeserverconfigure": {
|
||||||
|
"search": "Search",
|
||||||
|
"reset": "Reset",
|
||||||
|
"query": "Query",
|
||||||
|
"add": "Add",
|
||||||
|
"edit": "Edit",
|
||||||
|
"delete": "Delete",
|
||||||
|
"operation": "Operation",
|
||||||
|
"confirm": "Confirm",
|
||||||
|
"cancel": "Cancel",
|
||||||
|
"tip": "Tip",
|
||||||
|
"confirm_delete": "Confirm this operation?",
|
||||||
|
"operation_success": "Operation succeeded",
|
||||||
|
"please_select": "Please select records",
|
||||||
|
"sort": "No.",
|
||||||
|
"code": "Code",
|
||||||
|
"name": "Name",
|
||||||
|
"remark": "Remark",
|
||||||
|
"note": "Note",
|
||||||
|
"create_time": "Create Time",
|
||||||
|
"created_time": "Created Time",
|
||||||
|
"add_title": "Add",
|
||||||
|
"edit_title": "Edit",
|
||||||
|
"enter_code": "Enter code",
|
||||||
|
"enter_name": "Enter name",
|
||||||
|
"enter_remark": "Enter remark",
|
||||||
|
"status": "Status",
|
||||||
|
"updated": "Updated",
|
||||||
|
"changed": "Changed",
|
||||||
|
"port": "Port",
|
||||||
|
"address": "Address",
|
||||||
|
"service_name": "Service Name",
|
||||||
|
"enter_service_name": "Enter service name",
|
||||||
|
"unique_identifier": "Unique Identifier",
|
||||||
|
"unique_identifier_tip": "Returned after test succeeds",
|
||||||
|
"enter_url": "Enter service URL",
|
||||||
|
"enter_port": "Enter port",
|
||||||
|
"enter_address": "Enter binding address",
|
||||||
|
"test": "Test",
|
||||||
|
"test_success": "Test passed",
|
||||||
|
"device_configuration": "Device Configuration",
|
||||||
|
"restart_service": "Restart Service",
|
||||||
|
"confirm_restart": "Restart this service?",
|
||||||
|
"request_success": "Request succeeded and was added to queue",
|
||||||
|
"device_config_tip": "Device configuration is migrated to a drawer and can be extended here."
|
||||||
|
},
|
||||||
|
"edgeservermonitor": {
|
||||||
|
"device_type": "Device Type",
|
||||||
|
"ip_port": "IP/Port",
|
||||||
|
"activity_time": "Activity Time",
|
||||||
|
"success_count": "Success Count",
|
||||||
|
"failure_count": "Failure Count",
|
||||||
|
"device_stop": "Stop",
|
||||||
|
"device_continue": "Start",
|
||||||
|
"request_success": "Request succeeded"
|
||||||
|
},
|
||||||
|
"edgeserver_log": {
|
||||||
|
"search": "Search",
|
||||||
|
"reset": "Reset",
|
||||||
|
"query": "Query",
|
||||||
|
"add": "Add",
|
||||||
|
"edit": "Edit",
|
||||||
|
"delete": "Delete",
|
||||||
|
"operation": "Operation",
|
||||||
|
"confirm": "Confirm",
|
||||||
|
"cancel": "Cancel",
|
||||||
|
"tip": "Tip",
|
||||||
|
"confirm_delete": "Confirm this operation?",
|
||||||
|
"operation_success": "Operation succeeded",
|
||||||
|
"please_select": "Please select records",
|
||||||
|
"sort": "No.",
|
||||||
|
"code": "Code",
|
||||||
|
"name": "Name",
|
||||||
|
"remark": "Remark",
|
||||||
|
"note": "Note",
|
||||||
|
"create_time": "Create Time",
|
||||||
|
"created_time": "Created Time",
|
||||||
|
"add_title": "Add",
|
||||||
|
"edit_title": "Edit",
|
||||||
|
"enter_code": "Enter code",
|
||||||
|
"enter_name": "Enter name",
|
||||||
|
"enter_remark": "Enter remark",
|
||||||
|
"server_name": "Server Name",
|
||||||
|
"device_name": "Device Name",
|
||||||
|
"command": "Command",
|
||||||
|
"status": "Status",
|
||||||
|
"success": "Success",
|
||||||
|
"danger": "Failure",
|
||||||
|
"server_restart": "Restart Server",
|
||||||
|
"server_close": "Close Server",
|
||||||
|
"device_stop": "Stop Device",
|
||||||
|
"device_continue": "Continue Device",
|
||||||
|
"stop_device": "Stop Device",
|
||||||
|
"warning_device": "Warning Device"
|
||||||
|
},
|
||||||
|
"scada_query": {
|
||||||
|
"workingsubclass": "Process Unit",
|
||||||
|
"node_code": "Node Code",
|
||||||
|
"collection_time": "Collection Time",
|
||||||
|
"to": "to",
|
||||||
|
"time_start": "Start Time",
|
||||||
|
"time_end": "End Time",
|
||||||
|
"yes": "Yes",
|
||||||
|
"no": "No",
|
||||||
|
"select_all_nodes": "Select All Nodes",
|
||||||
|
"query": "Query",
|
||||||
|
"export_excel": "Export Excel",
|
||||||
|
"export_task_created": "Export task created"
|
||||||
|
},
|
||||||
|
"ems_query": {
|
||||||
|
"workingsubclass": "Process Unit",
|
||||||
|
"node_code": "Node Code",
|
||||||
|
"collection_time": "Collection Time",
|
||||||
|
"to": "to",
|
||||||
|
"time_start": "Start Time",
|
||||||
|
"time_end": "End Time",
|
||||||
|
"yes": "Yes",
|
||||||
|
"no": "No",
|
||||||
|
"select_all_nodes": "Select All Nodes",
|
||||||
|
"query": "Query",
|
||||||
|
"export_excel": "Export Excel",
|
||||||
|
"export_task_created": "Export task created"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"workshop_manage": {
|
||||||
|
"workshop_config": {
|
||||||
|
"search": "Search",
|
||||||
|
"reset": "Reset",
|
||||||
|
"query": "Query",
|
||||||
|
"add": "Add",
|
||||||
|
"edit": "Edit",
|
||||||
|
"delete": "Delete",
|
||||||
|
"operation": "Operation",
|
||||||
|
"confirm": "Confirm",
|
||||||
|
"cancel": "Cancel",
|
||||||
|
"tip": "Tip",
|
||||||
|
"confirm_delete": "Confirm this operation?",
|
||||||
|
"operation_success": "Operation succeeded",
|
||||||
|
"please_select": "Please select records",
|
||||||
|
"sort": "No.",
|
||||||
|
"code": "Code",
|
||||||
|
"name": "Name",
|
||||||
|
"remark": "Remark",
|
||||||
|
"note": "Note",
|
||||||
|
"create_time": "Create Time",
|
||||||
|
"created_time": "Created Time",
|
||||||
|
"add_title": "Add",
|
||||||
|
"edit_title": "Edit",
|
||||||
|
"enter_code": "Enter code",
|
||||||
|
"enter_name": "Enter name",
|
||||||
|
"enter_remark": "Enter remark",
|
||||||
|
"building": "Building",
|
||||||
|
"floor": "Floor",
|
||||||
|
"enter_building": "Enter building",
|
||||||
|
"enter_floor": "Enter floor"
|
||||||
|
},
|
||||||
|
"workshop_point": {
|
||||||
|
"search": "Search",
|
||||||
|
"reset": "Reset",
|
||||||
|
"query": "Query",
|
||||||
|
"add": "Add",
|
||||||
|
"edit": "Edit",
|
||||||
|
"delete": "Delete",
|
||||||
|
"operation": "Operation",
|
||||||
|
"confirm": "Confirm",
|
||||||
|
"cancel": "Cancel",
|
||||||
|
"tip": "Tip",
|
||||||
|
"confirm_delete": "Confirm this operation?",
|
||||||
|
"operation_success": "Operation succeeded",
|
||||||
|
"please_select": "Please select records",
|
||||||
|
"sort": "No.",
|
||||||
|
"code": "Code",
|
||||||
|
"name": "Name",
|
||||||
|
"remark": "Remark",
|
||||||
|
"note": "Note",
|
||||||
|
"create_time": "Create Time",
|
||||||
|
"created_time": "Created Time",
|
||||||
|
"add_title": "Add",
|
||||||
|
"edit_title": "Edit",
|
||||||
|
"enter_code": "Enter code",
|
||||||
|
"enter_name": "Enter name",
|
||||||
|
"enter_remark": "Enter remark",
|
||||||
|
"workshop_name": "Workshop",
|
||||||
|
"select_workshop": "Select workshop",
|
||||||
|
"category": "Point Type",
|
||||||
|
"select_category": "Select point type",
|
||||||
|
"workshop_area": "Workshop Area",
|
||||||
|
"single_device": "Single Device",
|
||||||
|
"offline_area": "Offline Area"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"device_gather": {
|
||||||
|
"battery_device_gather_monitor": {
|
||||||
|
"device_type": "Device Type",
|
||||||
|
"ip_port": "IP/Port",
|
||||||
|
"activity_time": "Activity Time",
|
||||||
|
"success_count": "Success Count",
|
||||||
|
"failure_count": "Failure Count",
|
||||||
|
"device_stop": "Stop",
|
||||||
|
"device_continue": "Start",
|
||||||
|
"request_success": "Request succeeded",
|
||||||
|
"refresh": "Refresh",
|
||||||
|
"last_refresh_time": "Last Refresh Time",
|
||||||
|
"stop_device": "Stop Device"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}},
|
||||||
"__MENU_TEMP_BEGIN__": "===== 以下为临时菜单翻译,后续统一删除 =====",
|
"__MENU_TEMP_BEGIN__": "===== 以下为临时菜单翻译,后续统一删除 =====",
|
||||||
"设备类型": "Device Type",
|
"设备类型": "Device Type",
|
||||||
"首页": "Home",
|
"首页": "Home",
|
||||||
|
|||||||
@@ -4877,7 +4877,349 @@
|
|||||||
"sample_value": "样本值"
|
"sample_value": "样本值"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
,
|
||||||
|
"scada_manage": {
|
||||||
|
"basic_configuration": {
|
||||||
|
"scada_configure": {
|
||||||
|
"search": "查询",
|
||||||
|
"reset": "重置",
|
||||||
|
"query": "查询",
|
||||||
|
"add": "新增",
|
||||||
|
"edit": "编辑",
|
||||||
|
"delete": "删除",
|
||||||
|
"operation": "操作",
|
||||||
|
"confirm": "确定",
|
||||||
|
"cancel": "取消",
|
||||||
|
"tip": "提示",
|
||||||
|
"confirm_delete": "确定要执行该操作吗?",
|
||||||
|
"operation_success": "操作成功",
|
||||||
|
"please_select": "请选择要操作的数据",
|
||||||
|
"sort": "序号",
|
||||||
|
"code": "编码",
|
||||||
|
"name": "名称",
|
||||||
|
"remark": "备注",
|
||||||
|
"note": "备注",
|
||||||
|
"create_time": "创建时间",
|
||||||
|
"created_time": "创建日期",
|
||||||
|
"add_title": "新增",
|
||||||
|
"edit_title": "编辑",
|
||||||
|
"enter_code": "请输入编码",
|
||||||
|
"enter_name": "请输入名称",
|
||||||
|
"enter_remark": "请输入备注",
|
||||||
|
"type": "类型",
|
||||||
|
"data_category": "数据类别",
|
||||||
|
"working_subclass": "工序单元",
|
||||||
|
"data_length": "数据长度",
|
||||||
|
"unit": "单位",
|
||||||
|
"select_type": "请选择类型",
|
||||||
|
"select_data_category": "请选择数据类别",
|
||||||
|
"select_working_subclass": "请选择工序单元",
|
||||||
|
"enter_data_length": "请输入数据长度",
|
||||||
|
"enter_unit": "请输入单位",
|
||||||
|
"device_status": "设备状态",
|
||||||
|
"item_id_item": "条码项",
|
||||||
|
"device_data": "设备数据",
|
||||||
|
"process_data": "过程数据",
|
||||||
|
"result_data": "结果数据",
|
||||||
|
"statistical_data": "统计数据",
|
||||||
|
"inspection_data": "点检数据",
|
||||||
|
"batch_import": "批量导入",
|
||||||
|
"download_template": "下载模板"
|
||||||
},
|
},
|
||||||
|
"ems_configure": {
|
||||||
|
"search": "查询",
|
||||||
|
"reset": "重置",
|
||||||
|
"query": "查询",
|
||||||
|
"add": "新增",
|
||||||
|
"edit": "编辑",
|
||||||
|
"delete": "删除",
|
||||||
|
"operation": "操作",
|
||||||
|
"confirm": "确定",
|
||||||
|
"cancel": "取消",
|
||||||
|
"tip": "提示",
|
||||||
|
"confirm_delete": "确定要执行该操作吗?",
|
||||||
|
"operation_success": "操作成功",
|
||||||
|
"please_select": "请选择要操作的数据",
|
||||||
|
"sort": "序号",
|
||||||
|
"code": "编码",
|
||||||
|
"name": "名称",
|
||||||
|
"remark": "备注",
|
||||||
|
"note": "备注",
|
||||||
|
"create_time": "创建时间",
|
||||||
|
"created_time": "创建日期",
|
||||||
|
"add_title": "新增",
|
||||||
|
"edit_title": "编辑",
|
||||||
|
"enter_code": "请输入编码",
|
||||||
|
"enter_name": "请输入名称",
|
||||||
|
"enter_remark": "请输入备注",
|
||||||
|
"type": "类型",
|
||||||
|
"data_category": "数据类别",
|
||||||
|
"working_subclass": "工序单元",
|
||||||
|
"data_length": "数据长度",
|
||||||
|
"unit": "单位",
|
||||||
|
"select_type": "请选择类型",
|
||||||
|
"select_data_category": "请选择数据类别",
|
||||||
|
"select_working_subclass": "请选择工序单元",
|
||||||
|
"enter_data_length": "请输入数据长度",
|
||||||
|
"enter_unit": "请输入单位",
|
||||||
|
"device_status": "设备状态",
|
||||||
|
"item_id_item": "条码项",
|
||||||
|
"device_data": "设备数据",
|
||||||
|
"process_data": "过程数据",
|
||||||
|
"result_data": "结果数据",
|
||||||
|
"statistical_data": "统计数据",
|
||||||
|
"inspection_data": "点检数据",
|
||||||
|
"batch_import": "批量导入",
|
||||||
|
"download_template": "下载模板",
|
||||||
|
"environmental_data": "环控数据"
|
||||||
|
},
|
||||||
|
"node_mapping_device_code": {
|
||||||
|
"search": "查询",
|
||||||
|
"reset": "重置",
|
||||||
|
"query": "查询",
|
||||||
|
"add": "新增",
|
||||||
|
"edit": "编辑",
|
||||||
|
"delete": "删除",
|
||||||
|
"operation": "操作",
|
||||||
|
"confirm": "确定",
|
||||||
|
"cancel": "取消",
|
||||||
|
"tip": "提示",
|
||||||
|
"confirm_delete": "确定要执行该操作吗?",
|
||||||
|
"operation_success": "操作成功",
|
||||||
|
"please_select": "请选择要操作的数据",
|
||||||
|
"sort": "序号",
|
||||||
|
"code": "编码",
|
||||||
|
"name": "名称",
|
||||||
|
"remark": "备注",
|
||||||
|
"note": "备注",
|
||||||
|
"create_time": "创建时间",
|
||||||
|
"created_time": "创建日期",
|
||||||
|
"add_title": "新增",
|
||||||
|
"edit_title": "编辑",
|
||||||
|
"enter_code": "请输入编码",
|
||||||
|
"enter_name": "请输入名称",
|
||||||
|
"enter_remark": "请输入备注",
|
||||||
|
"add_mapping": "新增映射",
|
||||||
|
"edit_mapping": "编辑映射",
|
||||||
|
"node_code": "节点编码",
|
||||||
|
"enter_node_code": "请输入节点编码",
|
||||||
|
"node_name": "节点名称",
|
||||||
|
"mapping_device": "映射设备",
|
||||||
|
"device_code": "设备编码",
|
||||||
|
"select_device_code": "请选择设备编码",
|
||||||
|
"process_unit": "工序单元",
|
||||||
|
"select_process_unit": "请选择工序单元",
|
||||||
|
"data_node": "数据节点",
|
||||||
|
"select_data_node": "请选择数据节点",
|
||||||
|
"enter_note": "请输入备注"
|
||||||
|
},
|
||||||
|
"edgeserverconfigure": {
|
||||||
|
"search": "查询",
|
||||||
|
"reset": "重置",
|
||||||
|
"query": "查询",
|
||||||
|
"add": "新增",
|
||||||
|
"edit": "编辑",
|
||||||
|
"delete": "删除",
|
||||||
|
"operation": "操作",
|
||||||
|
"confirm": "确定",
|
||||||
|
"cancel": "取消",
|
||||||
|
"tip": "提示",
|
||||||
|
"confirm_delete": "确定要执行该操作吗?",
|
||||||
|
"operation_success": "操作成功",
|
||||||
|
"please_select": "请选择要操作的数据",
|
||||||
|
"sort": "序号",
|
||||||
|
"code": "编码",
|
||||||
|
"name": "名称",
|
||||||
|
"remark": "备注",
|
||||||
|
"note": "备注",
|
||||||
|
"create_time": "创建时间",
|
||||||
|
"created_time": "创建日期",
|
||||||
|
"add_title": "新增",
|
||||||
|
"edit_title": "编辑",
|
||||||
|
"enter_code": "请输入编码",
|
||||||
|
"enter_name": "请输入名称",
|
||||||
|
"enter_remark": "请输入备注",
|
||||||
|
"status": "状态",
|
||||||
|
"updated": "更新状态",
|
||||||
|
"changed": "已变更",
|
||||||
|
"port": "端口",
|
||||||
|
"address": "地址",
|
||||||
|
"service_name": "服务名称",
|
||||||
|
"enter_service_name": "请输入服务名称",
|
||||||
|
"unique_identifier": "唯一标识",
|
||||||
|
"unique_identifier_tip": "测试成功后返回采集服务唯一标识",
|
||||||
|
"enter_url": "请输入服务地址",
|
||||||
|
"enter_port": "请输入端口",
|
||||||
|
"enter_address": "请输入绑定地址",
|
||||||
|
"test": "测试",
|
||||||
|
"test_success": "测试通过",
|
||||||
|
"device_configuration": "设备配置",
|
||||||
|
"restart_service": "重启服务",
|
||||||
|
"confirm_restart": "确定要重启该服务吗?",
|
||||||
|
"request_success": "请求成功,请求动作已添加至请求队列",
|
||||||
|
"device_config_tip": "设备配置已迁移为独立抽屉,后续可在此扩展采集设备参数。"
|
||||||
|
},
|
||||||
|
"edgeservermonitor": {
|
||||||
|
"device_type": "设备类型",
|
||||||
|
"ip_port": "IP/端口",
|
||||||
|
"activity_time": "活动时间",
|
||||||
|
"success_count": "成功次数",
|
||||||
|
"failure_count": "失败次数",
|
||||||
|
"device_stop": "暂停",
|
||||||
|
"device_continue": "启动",
|
||||||
|
"request_success": "请求成功"
|
||||||
|
},
|
||||||
|
"edgeserver_log": {
|
||||||
|
"search": "查询",
|
||||||
|
"reset": "重置",
|
||||||
|
"query": "查询",
|
||||||
|
"add": "新增",
|
||||||
|
"edit": "编辑",
|
||||||
|
"delete": "删除",
|
||||||
|
"operation": "操作",
|
||||||
|
"confirm": "确定",
|
||||||
|
"cancel": "取消",
|
||||||
|
"tip": "提示",
|
||||||
|
"confirm_delete": "确定要执行该操作吗?",
|
||||||
|
"operation_success": "操作成功",
|
||||||
|
"please_select": "请选择要操作的数据",
|
||||||
|
"sort": "序号",
|
||||||
|
"code": "编码",
|
||||||
|
"name": "名称",
|
||||||
|
"remark": "备注",
|
||||||
|
"note": "备注",
|
||||||
|
"create_time": "创建时间",
|
||||||
|
"created_time": "创建日期",
|
||||||
|
"add_title": "新增",
|
||||||
|
"edit_title": "编辑",
|
||||||
|
"enter_code": "请输入编码",
|
||||||
|
"enter_name": "请输入名称",
|
||||||
|
"enter_remark": "请输入备注",
|
||||||
|
"server_name": "服务名称",
|
||||||
|
"device_name": "设备名称",
|
||||||
|
"command": "命令",
|
||||||
|
"status": "状态",
|
||||||
|
"success": "成功",
|
||||||
|
"danger": "失败",
|
||||||
|
"server_restart": "重启服务",
|
||||||
|
"server_close": "关闭服务",
|
||||||
|
"device_stop": "暂停设备",
|
||||||
|
"device_continue": "启动设备",
|
||||||
|
"stop_device": "停止设备",
|
||||||
|
"warning_device": "告警设备"
|
||||||
|
},
|
||||||
|
"scada_query": {
|
||||||
|
"workingsubclass": "工序单元",
|
||||||
|
"node_code": "节点编码",
|
||||||
|
"collection_time": "采集时间",
|
||||||
|
"to": "至",
|
||||||
|
"time_start": "开始时间",
|
||||||
|
"time_end": "结束时间",
|
||||||
|
"yes": "是",
|
||||||
|
"no": "否",
|
||||||
|
"select_all_nodes": "选择全部节点",
|
||||||
|
"query": "查询",
|
||||||
|
"export_excel": "导出Excel",
|
||||||
|
"export_task_created": "导出任务已创建"
|
||||||
|
},
|
||||||
|
"ems_query": {
|
||||||
|
"workingsubclass": "工序单元",
|
||||||
|
"node_code": "节点编码",
|
||||||
|
"collection_time": "采集时间",
|
||||||
|
"to": "至",
|
||||||
|
"time_start": "开始时间",
|
||||||
|
"time_end": "结束时间",
|
||||||
|
"yes": "是",
|
||||||
|
"no": "否",
|
||||||
|
"select_all_nodes": "选择全部节点",
|
||||||
|
"query": "查询",
|
||||||
|
"export_excel": "导出Excel",
|
||||||
|
"export_task_created": "导出任务已创建"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"workshop_manage": {
|
||||||
|
"workshop_config": {
|
||||||
|
"search": "查询",
|
||||||
|
"reset": "重置",
|
||||||
|
"query": "查询",
|
||||||
|
"add": "新增",
|
||||||
|
"edit": "编辑",
|
||||||
|
"delete": "删除",
|
||||||
|
"operation": "操作",
|
||||||
|
"confirm": "确定",
|
||||||
|
"cancel": "取消",
|
||||||
|
"tip": "提示",
|
||||||
|
"confirm_delete": "确定要执行该操作吗?",
|
||||||
|
"operation_success": "操作成功",
|
||||||
|
"please_select": "请选择要操作的数据",
|
||||||
|
"sort": "序号",
|
||||||
|
"code": "编码",
|
||||||
|
"name": "名称",
|
||||||
|
"remark": "备注",
|
||||||
|
"note": "备注",
|
||||||
|
"create_time": "创建时间",
|
||||||
|
"created_time": "创建日期",
|
||||||
|
"add_title": "新增",
|
||||||
|
"edit_title": "编辑",
|
||||||
|
"enter_code": "请输入编码",
|
||||||
|
"enter_name": "请输入名称",
|
||||||
|
"enter_remark": "请输入备注",
|
||||||
|
"building": "楼栋",
|
||||||
|
"floor": "楼层",
|
||||||
|
"enter_building": "请输入楼栋",
|
||||||
|
"enter_floor": "请输入楼层"
|
||||||
|
},
|
||||||
|
"workshop_point": {
|
||||||
|
"search": "查询",
|
||||||
|
"reset": "重置",
|
||||||
|
"query": "查询",
|
||||||
|
"add": "新增",
|
||||||
|
"edit": "编辑",
|
||||||
|
"delete": "删除",
|
||||||
|
"operation": "操作",
|
||||||
|
"confirm": "确定",
|
||||||
|
"cancel": "取消",
|
||||||
|
"tip": "提示",
|
||||||
|
"confirm_delete": "确定要执行该操作吗?",
|
||||||
|
"operation_success": "操作成功",
|
||||||
|
"please_select": "请选择要操作的数据",
|
||||||
|
"sort": "序号",
|
||||||
|
"code": "编码",
|
||||||
|
"name": "名称",
|
||||||
|
"remark": "备注",
|
||||||
|
"note": "备注",
|
||||||
|
"create_time": "创建时间",
|
||||||
|
"created_time": "创建日期",
|
||||||
|
"add_title": "新增",
|
||||||
|
"edit_title": "编辑",
|
||||||
|
"enter_code": "请输入编码",
|
||||||
|
"enter_name": "请输入名称",
|
||||||
|
"enter_remark": "请输入备注",
|
||||||
|
"workshop_name": "车间名称",
|
||||||
|
"select_workshop": "请选择车间",
|
||||||
|
"category": "点位类型",
|
||||||
|
"select_category": "请选择点位类型",
|
||||||
|
"workshop_area": "车间区域",
|
||||||
|
"single_device": "单设备",
|
||||||
|
"offline_area": "离线区域"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"device_gather": {
|
||||||
|
"battery_device_gather_monitor": {
|
||||||
|
"device_type": "设备类型",
|
||||||
|
"ip_port": "IP/端口",
|
||||||
|
"activity_time": "活动时间",
|
||||||
|
"success_count": "成功次数",
|
||||||
|
"failure_count": "失败次数",
|
||||||
|
"device_stop": "暂停",
|
||||||
|
"device_continue": "启动",
|
||||||
|
"request_success": "请求成功",
|
||||||
|
"refresh": "刷新",
|
||||||
|
"last_refresh_time": "最后刷新时间",
|
||||||
|
"stop_device": "停止设备"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}},
|
||||||
"__MENU_TEMP_BEGIN__": "===== 以下为临时菜单翻译,后续统一删除 =====",
|
"__MENU_TEMP_BEGIN__": "===== 以下为临时菜单翻译,后续统一删除 =====",
|
||||||
"设备类型": "设备类型",
|
"设备类型": "设备类型",
|
||||||
"首页": "首页",
|
"首页": "首页",
|
||||||
|
|||||||
23
src/router/modules/scada-management.js
Normal file
23
src/router/modules/scada-management.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import layoutHeaderAside from '@/layout/header-aside'
|
||||||
|
|
||||||
|
const meta = { auth: true }
|
||||||
|
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
|
||||||
|
|
||||||
|
export default {
|
||||||
|
path: '/scada_manage',
|
||||||
|
component: layoutHeaderAside,
|
||||||
|
children: (pre => [
|
||||||
|
{ path: 'index', name: `${pre}index`, meta: { ...meta, cache: true, title: '采集管理', root: '/scada_manage' }, component: _import('system/function/module-index') },
|
||||||
|
{ path: 'basic_configuration/scadaconfigure', name: `${pre}basic_configuration-scadaconfigure`, meta: { ...meta, cache: true, title: 'SCADA节点配置' }, component: _import('scada_manage/basic_configuration/scada_configure') },
|
||||||
|
{ path: 'basic_configuration/scadaquery', name: `${pre}basic_configuration-scadaquery`, meta: { ...meta, cache: true, title: 'SCADA数据查询' }, component: _import('scada_manage/basic_configuration/scada_query') },
|
||||||
|
{ path: 'basic_configuration/node_mapping_device_code', name: `${pre}basic_configuration-node_mapping_device_code`, meta: { ...meta, cache: true, title: '节点设备映射' }, component: _import('scada_manage/basic_configuration/node_mapping_device_code') },
|
||||||
|
{ path: 'basic_configuration/ems_configure', name: `${pre}basic_configuration-ems_configure`, meta: { ...meta, cache: true, title: '环控节点配置' }, component: _import('scada_manage/basic_configuration/ems_configure') },
|
||||||
|
{ path: 'basic_configuration/ems_query', name: `${pre}basic_configuration-ems_query`, meta: { ...meta, cache: true, title: '环控数据查询' }, component: _import('scada_manage/basic_configuration/ems_query') },
|
||||||
|
{ path: 'workshop_manage/workshop_config', name: `${pre}workshop_manage-workshop_config`, meta: { ...meta, cache: true, title: '车间配置' }, component: _import('scada_manage/workshop_manage/workshop_config') },
|
||||||
|
{ path: 'workshop_manage/workshop_point', name: `${pre}workshop_manage-workshop_point`, meta: { ...meta, cache: true, title: '车间点位管理' }, component: _import('scada_manage/workshop_manage/workshop_point') },
|
||||||
|
{ path: 'lecpserver/edgeserverconfigure', name: `${pre}lecpserver-edgeserverconfigure`, meta: { ...meta, cache: true, title: '服务配置' }, component: _import('scada_manage/lecpserver/edgeserverconfigure') },
|
||||||
|
{ path: 'lecpserver/edgeervermonitor', name: `${pre}lecpserver-edgeervermonitor`, meta: { ...meta, cache: true, title: '服务监控' }, component: _import('scada_manage/lecpserver/edgeservermonitor') },
|
||||||
|
{ path: 'lecpserver/edgeserver_log', name: `${pre}lecpserver-edgeserver_log`, meta: { ...meta, cache: true, title: '前置服务日志' }, component: _import('scada_manage/lecpserver/edgeserver_log') },
|
||||||
|
{ path: 'device_gather/battery_device_gather_monitor', name: `${pre}device_gather-battery_device_gather_monitor`, meta: { ...meta, cache: true, title: '实时采集监控' }, component: _import('scada_manage/device_gather/battery_device_gather_monitor') }
|
||||||
|
])('scada_manage-')
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import dataPlatform from './modules/data-platform'
|
|||||||
import systemAdministration from './modules/system-administration'
|
import systemAdministration from './modules/system-administration'
|
||||||
import equipmentManagement from './modules/equipment-management'
|
import equipmentManagement from './modules/equipment-management'
|
||||||
import spcQualityManagement from './modules/spc-quality-management'
|
import spcQualityManagement from './modules/spc-quality-management'
|
||||||
|
import scadaManagement from './modules/scada-management'
|
||||||
|
|
||||||
// 由于懒加载页面太多的话会造成webpack热更新太慢,所以开发环境不使用懒加载,只有生产环境使用懒加载
|
// 由于懒加载页面太多的话会造成webpack热更新太慢,所以开发环境不使用懒加载,只有生产环境使用懒加载
|
||||||
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
|
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
|
||||||
@@ -61,7 +62,8 @@ const frameIn = [
|
|||||||
dataPlatform,
|
dataPlatform,
|
||||||
systemAdministration,
|
systemAdministration,
|
||||||
equipmentManagement,
|
equipmentManagement,
|
||||||
spcQualityManagement
|
spcQualityManagement,
|
||||||
|
scadaManagement
|
||||||
]
|
]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,198 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<template #header>
|
||||||
|
<el-form :inline="true" size="mini">
|
||||||
|
<el-form-item :label="$t(key('working_subclass'))" v-if="showProcessFilter">
|
||||||
|
<el-select v-model="search.working_subclass" clearable filterable style="width:200px" :placeholder="$t(key('select_working_subclass'))">
|
||||||
|
<el-option v-for="item in workingSubclassOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t(key('data_category'))" v-if="showCategoryFilter">
|
||||||
|
<el-select v-model="search.categoryName" clearable style="width:180px" :placeholder="$t(key('select_data_category'))">
|
||||||
|
<el-option v-for="item in categoryOptions" :key="item.value" :label="$t(item.label)" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="onSearch">{{ $t(key('search')) }}</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" @click="onReset">{{ $t(key('reset')) }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<page-table
|
||||||
|
:columns="columns"
|
||||||
|
:data="tableData"
|
||||||
|
:loading="loading"
|
||||||
|
:toolbar-buttons="toolbarButtons"
|
||||||
|
:row-buttons="rowButtons"
|
||||||
|
:pagination="pagination"
|
||||||
|
auto-height
|
||||||
|
@page-change="onPageChange"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<page-dialog-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:title="dialogTitle"
|
||||||
|
width="520px"
|
||||||
|
:form-cols="formCols"
|
||||||
|
:form-data="formData"
|
||||||
|
:rules="rules"
|
||||||
|
:submitting="submitting"
|
||||||
|
:confirm-text="key('confirm')"
|
||||||
|
:cancel-text="key('cancel')"
|
||||||
|
@submit="onDialogSubmit"
|
||||||
|
/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { useTableColumns } from '@/composables/useTableColumns'
|
||||||
|
import { useTableButtons } from '@/composables/useTableButtons'
|
||||||
|
import { i18nMixin } from '@/composables/useI18n'
|
||||||
|
import PageTable from '@/components/page-table'
|
||||||
|
import PageDialogForm from '@/components/page-dialog-form'
|
||||||
|
import { getQueryNode, addNode, updateNode, removeNode } from '@/api/scada-manage/edge-manager'
|
||||||
|
import { getWorkingsubclassAll } from '@/api/production-master-data/process-step'
|
||||||
|
import { getWorkshopPointAll } from '@/api/scada-manage/workshop-point'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'scada-node-config-page',
|
||||||
|
components: { PageTable, PageDialogForm },
|
||||||
|
mixins: [i18nMixin('page.scada_manage.basic_configuration.scada_configure')],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
submitting: false,
|
||||||
|
tableData: [],
|
||||||
|
workingSubclassOptions: [],
|
||||||
|
search: { working_subclass: '', categoryName: '' },
|
||||||
|
pagination: { current: 1, size: 10, total: 0 },
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogTitle: '',
|
||||||
|
handleType: 'create',
|
||||||
|
editRow: null,
|
||||||
|
showProcessFilter: true,
|
||||||
|
showCategoryFilter: true,
|
||||||
|
categoryOptions: [{ value: 'DEVICE_STATUS', label: 'page.scada_manage.basic_configuration.scada_configure.device_status' }, { value: 'ITEM_ID_ITEM', label: 'page.scada_manage.basic_configuration.scada_configure.item_id_item' }, { value: 'DEVICE_DATA', label: 'page.scada_manage.basic_configuration.scada_configure.device_data' }, { value: 'PROCESS_DATA', label: 'page.scada_manage.basic_configuration.scada_configure.process_data' }, { value: 'RESULT_DATA', label: 'page.scada_manage.basic_configuration.scada_configure.result_data' }, { value: 'STATISTICAL_DATA', label: 'page.scada_manage.basic_configuration.scada_configure.statistical_data' }, { value: 'INSPECTION_DATA', label: 'page.scada_manage.basic_configuration.scada_configure.inspection_data' }],
|
||||||
|
columns: [],
|
||||||
|
toolbarButtons: [],
|
||||||
|
rowButtons: [],
|
||||||
|
formData: { code: '', name: '', type: 'varchar', category: '', working_subclass: '', data_length: 1, unit: '', note: '' },
|
||||||
|
rules: {
|
||||||
|
code: [{ required: true, message: this.key('enter_code'), trigger: 'blur' }],
|
||||||
|
name: [{ required: true, message: this.key('enter_name'), trigger: 'blur' }],
|
||||||
|
type: [{ required: true, message: this.key('select_type'), trigger: 'change' }],
|
||||||
|
category: [{ required: true, message: this.key('select_data_category'), trigger: 'change' }],
|
||||||
|
working_subclass: [{ required: true, message: this.key('select_working_subclass'), trigger: 'change' }]
|
||||||
|
},
|
||||||
|
formCols: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.columns = useTableColumns([
|
||||||
|
{ prop: 'id', label: this.key('sort'), width: 80 },
|
||||||
|
{ prop: 'code', label: this.key('code'), minWidth: 130 },
|
||||||
|
{ prop: 'name', label: this.key('name'), minWidth: 140 },
|
||||||
|
{ prop: 'type', label: this.key('type'), width: 100 },
|
||||||
|
{ prop: 'categoryName', label: this.key('data_category'), minWidth: 140 },
|
||||||
|
{ prop: 'worksubclass_name', label: this.key('working_subclass'), minWidth: 150 },
|
||||||
|
{ prop: 'data_length', label: this.key('data_length'), width: 100 },
|
||||||
|
{ prop: 'unit', label: this.key('unit'), width: 100 },
|
||||||
|
{ prop: 'create_time', label: this.key('create_time'), minWidth: 160 },
|
||||||
|
{ prop: 'note', label: this.key('remark'), minWidth: 160 },
|
||||||
|
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||||
|
], { selectionWidth: 0 })
|
||||||
|
const buttons = useTableButtons({
|
||||||
|
toolbar: [{ key: 'add', label: this.key('add'), icon: 'el-icon-plus', type: 'primary', auth: '/scada_manage/basic_configuration/scadaconfigure/add', onClick: this.openAdd }],
|
||||||
|
row: [
|
||||||
|
{ key: 'edit', label: this.key('edit'), icon: 'el-icon-edit', auth: '/scada_manage/basic_configuration/scadaconfigure/edit', onClick: this.openEdit },
|
||||||
|
{ key: 'delete', label: this.key('delete'), icon: 'el-icon-delete', color: 'danger', auth: '/scada_manage/basic_configuration/scadaconfigure/delete', onClick: this.handleDelete }
|
||||||
|
]
|
||||||
|
}, this.$permission)
|
||||||
|
this.toolbarButtons = buttons.toolbarButtons
|
||||||
|
this.rowButtons = buttons.rowButtons
|
||||||
|
this.formCols = this.makeFormCols()
|
||||||
|
this.loadOptions()
|
||||||
|
this.fetchData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
makeFormCols () {
|
||||||
|
return [
|
||||||
|
[{ type: 'input', prop: 'code', label: this.key('code'), placeholder: this.key('enter_code'), disabled: this.handleType === 'edit' }],
|
||||||
|
[{ type: 'input', prop: 'name', label: this.key('name'), placeholder: this.key('enter_name') }],
|
||||||
|
[{ type: 'select', prop: 'type', label: this.key('type'), placeholder: this.key('select_type'), options: ['varchar', 'text', 'int', 'bigint', 'double', 'real', 'float', 'jsonb', 'bool'].map(v => ({ label: v, value: v })), disabled: this.handleType === 'edit' }],
|
||||||
|
[{ type: 'select', prop: 'category', label: this.key('data_category'), placeholder: this.key('select_data_category'), options: this.categoryOptions.map(item => ({ ...item, label: this.$t(item.label) })), disabled: this.handleType === 'edit' }],
|
||||||
|
[{ type: 'select', prop: 'working_subclass', label: this.key('working_subclass'), placeholder: this.key('select_working_subclass'), options: this.workingSubclassOptions, disabled: this.handleType === 'edit' }],
|
||||||
|
[{ type: 'input', prop: 'data_length', label: this.key('data_length'), placeholder: this.key('enter_data_length') }],
|
||||||
|
[{ type: 'input', prop: 'unit', label: this.key('unit'), placeholder: this.key('enter_unit') }],
|
||||||
|
[{ type: 'input', prop: 'note', label: this.key('remark'), placeholder: this.key('enter_remark'), inputType: 'textarea', autosize: { minRows: 2, maxRows: 4 } }]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
async loadOptions () {
|
||||||
|
try {
|
||||||
|
const loader = false ? getWorkshopPointAll : getWorkingsubclassAll
|
||||||
|
const res = await loader()
|
||||||
|
const list = Array.isArray(res) ? res : (res.data || [])
|
||||||
|
this.workingSubclassOptions = list.map(item => ({ label: item.name || item.code, value: item.code }))
|
||||||
|
this.formCols = this.makeFormCols()
|
||||||
|
} catch (e) {}
|
||||||
|
},
|
||||||
|
categoryText (category) {
|
||||||
|
const item = this.categoryOptions.find(opt => opt.value === category)
|
||||||
|
return item ? this.$t(item.label) : category
|
||||||
|
},
|
||||||
|
workingSubclassText (code) {
|
||||||
|
const item = this.workingSubclassOptions.find(opt => opt.value === code)
|
||||||
|
return item ? item.label : code
|
||||||
|
},
|
||||||
|
async fetchData () {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await getQueryNode({ currentPage: this.pagination.current, pageSize: this.pagination.size, ...this.search })
|
||||||
|
const list = Array.isArray(res) ? res : (res.data || [])
|
||||||
|
this.tableData = list.map(item => ({ ...item, categoryName: this.categoryText(item.category), worksubclass_name: this.workingSubclassText(item.working_subclass) }))
|
||||||
|
this.pagination.total = Array.isArray(res) ? res.length : (res.total || res.count || 0)
|
||||||
|
} finally { this.loading = false }
|
||||||
|
},
|
||||||
|
onSearch () { this.pagination.current = 1; this.fetchData() },
|
||||||
|
onReset () { this.search = { working_subclass: '', categoryName: '' }; this.onSearch() },
|
||||||
|
onPageChange (page) { this.pagination.current = page.current; this.pagination.size = page.size; this.fetchData() },
|
||||||
|
openAdd () {
|
||||||
|
this.handleType = 'create'
|
||||||
|
this.dialogTitle = this.key('add_title')
|
||||||
|
this.formData = { code: '', name: '', type: 'varchar', category: '', working_subclass: '', data_length: 1, unit: '', note: '' }
|
||||||
|
this.formCols = this.makeFormCols()
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
openEdit (row) {
|
||||||
|
this.handleType = 'edit'
|
||||||
|
this.dialogTitle = this.key('edit_title')
|
||||||
|
this.editRow = row
|
||||||
|
this.formData = { code: row.code, name: row.name, type: row.type, category: row.category || '', working_subclass: row.working_subclass, data_length: row.data_length, unit: row.unit, note: row.note }
|
||||||
|
this.formCols = this.makeFormCols()
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
async onDialogSubmit () {
|
||||||
|
this.submitting = true
|
||||||
|
try {
|
||||||
|
if (this.handleType === 'create') {
|
||||||
|
await addNode({ action: 'add_node', node_data: JSON.stringify([this.formData]) })
|
||||||
|
} else {
|
||||||
|
await updateNode({ id: this.editRow.id, name: this.formData.name, note: this.formData.note, unit: this.formData.unit, data_length: this.formData.data_length, action: 'update_node' })
|
||||||
|
}
|
||||||
|
this.$message.success(this.$t(this.key('operation_success')))
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.fetchData()
|
||||||
|
} finally { this.submitting = false }
|
||||||
|
},
|
||||||
|
handleDelete (row) {
|
||||||
|
this.$confirm(this.$t(this.key('confirm_delete')), this.$t(this.key('tip')), { type: 'warning' }).then(async () => {
|
||||||
|
await removeNode({ action: 'remove_node', code: row.code, working_subclass: row.working_subclass })
|
||||||
|
this.$message.success(this.$t(this.key('operation_success')))
|
||||||
|
this.fetchData()
|
||||||
|
}).catch(() => {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user