diff --git a/src/api/config.js b/src/api/config.js index c7c823a..01dae2d 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -8,32 +8,27 @@ const updateConfig = (params) => { return request.post('/config/updateConfig', params) } -const queryBoxConfig = (params) => { - return request.post('/config/queryBoxConfig', params) +const restartSystem = (params) => { + return request({ + url: '/system/restartSystem', + method: 'post', + data: params, + timeout: 5000 + }) } -const queryBoxConfigByPage = (params) => { - return request.post('/config/queryBoxConfigByPage', params) -} - -const updateBoxConfig = (params) => { - return request.post('/config/updateBoxConfig', params) -} - -const addBoxConfig = (params) => { - return request.post('/config/addBoxConfig', params) -} - -const deleteBoxConfig = (params) => { - return request.post('/config/deleteBoxConfig', params) +const reloadConfig = (params) => { + return request({ + url: '/system/reloadConfig', + method: 'post', + data: params, + timeout: 5000 + }) } export { getConfigs, updateConfig, - queryBoxConfig, - queryBoxConfigByPage, - updateBoxConfig, - addBoxConfig, - deleteBoxConfig + restartSystem, + reloadConfig } \ No newline at end of file diff --git a/src/api/excel.js b/src/api/excel.js index b55edba..3ce2aef 100644 --- a/src/api/excel.js +++ b/src/api/excel.js @@ -1,6 +1,6 @@ import request from "@/http/request"; -const downlocadExcel = () => { +const downloadExcel = () => { return request.get('/test/testExcelExport', { responseType: 'blob' }) @@ -15,42 +15,6 @@ const uploadExcel = (formData) => { }) } -const uploadExcelPeijian = (data) => { - return request({ - url: '/excel/uploadExcelPeijian', - method: 'post', - data: data, - timeout: 100000 - }) -} - -const uploadExcelHejian = (data) => { - return request({ - url: '/excel/uploadExcelHejian', - method: 'post', - data: data, - timeout: 100000 - }) -} - -const uploadExcelJinji = (data) => { - return request({ - url: '/excel/uploadExcelJinji', - method: 'post', - data: data, - timeout: 100000 - }) -} - -const uploadExcelKatePackage = (data) => { - return request({ - url: '/excel/uploadExcelKatePackage', - method: 'post', - data: data, - timeout: 100000 - }) -} - const uploadExcelParts = (data) => { return request({ url: '/excel/uploadStocks', @@ -60,95 +24,55 @@ const uploadExcelParts = (data) => { }) } -const uploadBoxConfig = (data) => { - return request({ - url: '/excel/uploadBoxConfig', - method: 'post', - data: data, - timeout: 100000 - }) -} - -const distributePeijianTasks = (data) => { - return request({ - url: '/excel/distributePeijianTasks', - method: 'post', - data: data, - timeout: 100000 - }) -} - -const distributeHejianTasks = (data) => { - return request({ - url: '/excel/distributeHejianTasks', - method: 'post', - data: data, - timeout: 100000 - }) -} - -const distributeJinjiTasks = (data) => { - return request({ - url: '/excel/distributeJinjiTasks', - method: 'post', - data: data, - timeout: 100000 - }) -} - -const downloadStockExcel = () => { +const downloadStockExcel = (params) => { return request({ url: '/excel/downloadStockExcel', method: 'get', - responseType: 'blob' + responseType: 'blob', + params: { + stockStatus: params.stockStatus, + goodsStatus: params.goodsStatus, + locationId: params.locationId, + vehicleId: params.vehicleId, + goodsId: params.goodsId, + goodsName: params.goodsName + } }) } -const downloadKateTaskExcel = () => { +const downloadInRecordExcel = (params) => { return request({ - url: '/excel/downloadKateTaskExcel', + url: '/excel/downloadInRecordExcel', method: 'get', - responseType: 'blob' + responseType: 'blob', + params: { + vehicleId: params.vehicleId, + goodsId: params.goodsId + } }) } -const downloadPeijianExcel = () => { +const downloadOutRecordExcel = (params) => { return request({ - url: '/excel/downloadPeijianExcel', + url: '/excel/downloadOutRecordExcel', method: 'get', - responseType: 'blob' + responseType: 'blob', + params: { + vehicleId: params.vehicleId, + goodsId: params.goodsId + } }) } -const downloadRukuExcel = () => { +const downloadInventoryRecordExcel = (params) => { return request({ - url: '/excel/downloadRukuExcel', + url: '/excel/downloadInventoryRecordExcel', method: 'get', - responseType: 'blob' - }) -} - -const downloadHejianExcel = () => { - return request({ - url: '/excel/downloadHejianExcel', - method: 'get', - responseType: 'blob' - }) -} - -const downloadJinjiExcel = () => { - return request({ - url: '/excel/downloadJinjiExcel', - method: 'get', - responseType: 'blob' - }) -} - -const downloadPackageExcel = () => { - return request({ - url: '/excel/downloadPackageExcel', - method: 'get', - responseType: 'blob' + responseType: 'blob', + params: { + vehicleId: params.vehicleId, + goodsId: params.goodsId + } }) } @@ -160,24 +84,43 @@ const downloadMaterialExcel = () => { }) } +const downloadVehicleExcel = (vehicleQuery) => { + return request({ + url: '/excel/downloadVehicleExcel', + method: 'get', + responseType: 'blob', + params: { + vehicleId: vehicleQuery.vehicleId, + locationId: vehicleQuery.locationId, + isEmpty: vehicleQuery.isEmpty, + vehicleStatus: vehicleQuery.vehicleStatus + } + }) +} + +const downloadLocationsExcel = (params) => { + return request({ + url: '/excel/downloadLocationsExcel', + method: 'get', + responseType: 'blob', + params: { + locationId: params.locationId, + areaId: params.areaId, + isLock: params.isLock, + locationStatus: params.locationStatus + } + }) +} + export { - downlocadExcel, + downloadExcel, uploadExcel, - uploadExcelPeijian, - uploadExcelHejian, uploadExcelParts, - distributePeijianTasks, - distributeHejianTasks, downloadStockExcel, - downloadKateTaskExcel, - uploadExcelJinji, - distributeJinjiTasks, - downloadPeijianExcel, - downloadRukuExcel, - downloadHejianExcel, - downloadJinjiExcel, - downloadPackageExcel, - uploadBoxConfig, - uploadExcelKatePackage, - downloadMaterialExcel + downloadMaterialExcel, + downloadVehicleExcel, + downloadInRecordExcel, + downloadOutRecordExcel, + downloadInventoryRecordExcel, + downloadLocationsExcel } \ No newline at end of file diff --git a/src/api/task.js b/src/api/task.js index d5fd31e..3ed6d27 100644 --- a/src/api/task.js +++ b/src/api/task.js @@ -16,10 +16,11 @@ const sendGoodsOutTask = (params) => { }) } -const getAllTasks = () => { +const getTasks = () => { return request({ - url: '/task/getAllTasks', - method: 'get' + url: '/task/getTasks', + method: 'post', + data: params }) } @@ -39,25 +40,17 @@ const finishInventoryTask = (params) => { }) } -const getTasks = (params) => { +const getTasksByPage = (params) => { return request({ - url: '/task/getTasks', + url: '/task/getTasksByPage', method: 'post', data: params }) } -const finishPicking = (params) => { +const finishPickingAndBack = (params) => { return request({ - url: '/task/finishPicking', - method: 'post', - data: params - }) -} - -const getTaskByTask = (params) => { - return request({ - url: '/task/getTaskByTask', + url: '/task/finishPickingAndBack', method: 'post', data: params }) @@ -71,32 +64,13 @@ const changeTaskStatus = (params) => { }) } -const queryNotConfirmScanInfo = (params) => { - return request({ - url: '/task/queryNotConfirmScanInfo', - method: 'post', - data: params - }) -} - -const solveScanDifference = (params) => { - return request({ - url: '/task/solveScanDifference', - method: 'post', - data: params - }) -} - export { sendGoodsInTask, sendGoodsOutTask, - getAllTasks, + getTasksByPage, sendInventoryTask, finishInventoryTask, getTasks, - finishPicking, - getTaskByTask, + finishPickingAndBack, changeTaskStatus, - queryNotConfirmScanInfo, - solveScanDifference } \ No newline at end of file diff --git a/src/api/vehicle.js b/src/api/vehicle.js index 2ffe9f6..4d05b0d 100644 --- a/src/api/vehicle.js +++ b/src/api/vehicle.js @@ -2,7 +2,7 @@ import request from "@/http/request"; const getAllVehicles = (params) => { return request({ - url: '/location/getVehicles', + url: '/location/getVehiclesByPage', method: 'post', data: params }) diff --git a/src/http/request.js b/src/http/request.js index 3c6e942..b969fc4 100644 --- a/src/http/request.js +++ b/src/http/request.js @@ -1,11 +1,11 @@ import axios from 'axios' const request = axios.create({ - baseURL: 'http://localhost:12315/wms', + baseURL: 'http://192.168.3.254:12315/wms', timeout: 5000 }) -// axios.defaults.baseURL = 'http://10.18.61.7:12315/wms' +// axios.defaults.baseURL = 'http://192.168.3.254:12315/wms' // axios.defaults.baseURL = 'http://localhost:12315/wms' // axios.defaults.baseURL = 'http://10.30.9.89:12315/wms' diff --git a/src/layout/goodsIn.vue b/src/layout/goodsIn.vue index 01b4225..ede7458 100644 --- a/src/layout/goodsIn.vue +++ b/src/layout/goodsIn.vue @@ -137,7 +137,7 @@ export default { disabledEmpty: false, taskInRequestEntity: reactive({ vehicleId: '', - originPoint: 'R1', + originPoint: 'RC1', goodsId: '', goodsName: '', singleWeight: 0, @@ -159,8 +159,8 @@ export default { }), standOptions: [ { - value: "R1", - label: '入库站台1' + value: "RC1", + label: '入库口' } ], stockTypeOptions: [ diff --git a/src/layout/goodsOut.vue b/src/layout/goodsOut.vue index f701a63..2e82faa 100644 --- a/src/layout/goodsOut.vue +++ b/src/layout/goodsOut.vue @@ -9,14 +9,13 @@ - - - - - - + + + + + - - + + - - + + - - + - - + + + + + + + + + + + + + + @@ -70,6 +84,46 @@ +
+ 拣选确认信息 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 拣货完成确认回库 + + + + +
@@ -77,23 +131,16 @@ @@ -112,12 +159,42 @@ export default { loading: false, labelPosition: 'top', taskOutRequestEntity: { - goodsType: '', - specification: '', - quantity: 0, - taskId: '', + vehicleId: '', + goodsId: '', + goodsNum: 0, + originPoint: '', + isPicking: 0, + destinationPoint: '', userName: store.getters.getUserName, - } + }, + pickConfirmEntity: { + taskId: '', + vehicleId: '', + goodsId: '', + opNum: 0, + originNum: 0, + userName: store.getters.getUserName, + }, + destinationPointOptions: [ + { + value: "RC1", + label: '入库口' + }, + { + value: "P1", + label: '拣选台' + } + ], + pickOptions: [ + { + value: 0, + label: '非拣选任务' + }, + { + value: 1, + label: '拣选任务' + } + ], } }, mounted() { @@ -130,22 +207,18 @@ export default { }, methods: { getAllTasks() { - this.pageInfo.pageNum = this.currentPage - this.pageInfo.pageSize = this.pageSize - const tableRequest = { - page: this.pageInfo, - param: { - taskType: 2, - userName: store.getters.getUserName - } + const request = { + pageNo: this.currentPage, + pageSize: this.pageSize, + taskType: 2 } - getTasks(tableRequest).then(res => { + getTasksByPage(request).then(res => { const tableResponse = res.data if (tableResponse.code != 0) { ElMessage.error(tableResponse.message) } - this.tasks = tableResponse.rows - this.total = tableResponse.total + this.tasks = tableResponse.returnData.lists + this.total = tableResponse.returnData.total }).catch(err => { console.log(err) ElMessage.error('查询任务错误') @@ -173,23 +246,43 @@ export default { }) return } - if (formData.quantity <= 0) { + if (formData.vehicleId == '' || formData.goodsId == '' || formData.originPoint == '') { + ElMessage({ + message: '载具号、物料号、起始库位号必须至少输入一个', + type: 'error', + }) + return + } + if (formData.goodsNum <= 0) { ElMessage({ message: '数量必须要大于0的数字', type: 'error', }) return } + if ((formData.isPicking == 1 && formData.destinationPoint != 'P1')) { + ElMessage({ + message: '拣选任务必须选拣选站台', + type: 'error', + }) + return + } + if (formData.isPicking == 0 && formData.destinationPoint == 'P1') { + ElMessage({ + message: '非拣选任务不得选拣选站台', + type: 'error', + }) + return + } const outParams = { - taskId: formData.taskId == '' ? genTaskId('') : formData.taskId, - taskType: 2, - detailTaskInfoList: [ - { - goodsType: formData.goodsType, - specification: formData.specification, - quantity: formData.quantity - } - ] + goodsId: formData.goodsId, + goodsNum: formData.goodsNum, + vehicleId: formData.vehicleId, + originPoint: formData.originPoint, + destinationPoint: formData.destinationPoint, + userName: store.getters.getUserName, + isPicking: formData.isPicking, + pickStand: formData.destinationPoint } sendGoodsOutTask(outParams).then(res => { if (res.data.code == 0) { @@ -206,6 +299,77 @@ export default { ElMessage.error('创建出库任务错误!') }) }) + }, + getPickTaskDetails() { + const request = { + taskType: 2, + isPicking: 1, + taskStatus: 8 + } + getTasks(request).then(res1 => { + if (res1.data.code == 0) { + if (res1.data.returnData.length > 0) { + const currentFinishTask = res1.data.returnData[0]; + if (currentFinishTask.taskId == this.pickConfirmEntity.taskId) {// 信息没更新 + return + } + this.pickConfirmEntity.taskId = currentFinishTask.taskId + this.pickConfirmEntity.goodsId = currentFinishTask.goodsRelated.goodsId + this.pickConfirmEntity.vehicleId = currentFinishTask.vehicleId + this.pickConfirmEntity.opNum = currentFinishTask.goodsRelated.opNum + this.pickConfirmEntity.originNum = currentFinishTask.goodsRelated.originNum + + } else { + this.pickConfirmEntity.taskId = '' + this.pickConfirmEntity.goodsId = '' + this.pickConfirmEntity.vehicleId = '' + this.pickConfirmEntity.opNum = 0 + this.pickConfirmEntity.originNum = 0 + } + } + }).catch(err => { + ElMessage.error('查询任务错误') + }) + }, + confirmTask(formEl, formData) { + if (!formEl) return + formEl.validate((valid) => { + if (!valid) { + ElMessage({ + message: '确认信息验证失败', + type: 'warning', + }) + return + } + if (formData.taskId = '' || formData.vehicleId == '' || formData.goodsId == '') { + ElMessage({ + message: '载具号、物料号、任务号不可缺少', + type: 'error', + }) + return + } + const confirmParams = { + taskId: formData.taskId, + vehicleId: formData.vehicleId, + goodsId: formData.goodsId, + opNum: formData.opNum, + originNum: formData.originNum, + userName: formData.userName + } + finishPickingAndBack(confirmParams).then(res => { + if (res.data.code == 0) { + ElMessage({ + message: '确认成功!', + type: 'success', + }) + formEl.resetFields() + } else { + ElMessage.error(res.data.message) + } + }).catch(err => { + ElMessage.error('创建出库任务错误!') + }) + }) } } } @@ -256,7 +420,16 @@ export default { .input-area-up { margin: auto; max-width: inherit; - height: 632px; + height: 300px; + border: solid 1px; + border-radius: 10px; + box-shadow: 0px 15px 10px -15px #000; +} + +.input-area-down { + margin: auto; + max-width: inherit; + height: 300px; border: solid 1px; border-radius: 10px; box-shadow: 0px 15px 10px -15px #000; diff --git a/src/layout/inTaskRecord.vue b/src/layout/inTaskRecord.vue index 837cfa2..0ded0da 100644 --- a/src/layout/inTaskRecord.vue +++ b/src/layout/inTaskRecord.vue @@ -41,10 +41,9 @@ + + + \ No newline at end of file diff --git a/src/layout/outTaskRecord.vue b/src/layout/outTaskRecord.vue index 5d386a7..f82a474 100644 --- a/src/layout/outTaskRecord.vue +++ b/src/layout/outTaskRecord.vue @@ -3,10 +3,11 @@
- - + + 搜索 重置 + 导出记录
import { getTaskRecords } from '@/api/record.js' import { dateFormatter, taskStatusFormatter, timeFormatter } from '@/utils/formatter.js' +import { downloadOutRecordExcel } from '@/api/excel.js' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import { ElMessage } from 'element-plus' import store from '@/store' @@ -53,8 +55,8 @@ export default { currentPage: 1, pageSize: 10, total: 0, - goodsTypeQuery: '', - specificationQuery: '', + goodsIdQuery: '', + vehicleIdQuery: '', loading: true } }, @@ -82,16 +84,12 @@ export default { }, search() { this.loading = true - this.pageInfo.pageNum = this.currentPage - this.pageInfo.pageSize = this.pageSize const tableRequest = { - page: this.pageInfo, - param: { - taskType: 2, - goodsType: this.goodsTypeQuery.trim(), - specification: this.specificationQuery.trim(), - userName: store.getters.getUserName - } + pageNo: this.currentPage, + pageSize: this.pageSize, + taskType: 2, + goodsId: this.goodsIdQuery.trim(), + vehicleId: this.vehicleIdQuery.trim() } getTaskRecords(tableRequest).then(res => { const tableResponse = res.data @@ -111,6 +109,43 @@ export default { this.specificationQuery = '' this.search() }, + exportExcel() { + const params = { + vehicleId: this.vehicleIdQuery.trim(), + goodsId: this.goodsIdQuery.trim() + } + downloadOutRecordExcel(params).then(res => { + const link = document.createElement('a');//创建a标签 + try { + // let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式, + let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据 + // let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话 + let _fileName = "导出出库记录" + dateFormatter(new Date) + ".xlsx" + link.style.display = 'none'//隐藏 + + // 兼容不同浏览器的URL对象 + const url = window.URL || window.webkitURL || window.moxURL + link.href = url.createObjectURL(blob) + link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1)) + document.body.appendChild(link) + link.click() + document.body.removeChild(link) + url.revokeObjectURL(link.href)//移除url对象 + } catch (e) { + ElMessage({ + message: '下载文件失败:: ' + e, + type: 'error', + showClose: true + }) + } + }).catch(err => { + ElMessage({ + message: '导出失败:: ' + err, + type: 'error', + showClose: true + }) + }) + }, }, } diff --git a/src/layout/scanConfirm.vue b/src/layout/scanConfirm.vue deleted file mode 100644 index c774669..0000000 --- a/src/layout/scanConfirm.vue +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/layout/stock.vue b/src/layout/stock.vue index 59a68c2..7954a7f 100644 --- a/src/layout/stock.vue +++ b/src/layout/stock.vue @@ -17,20 +17,22 @@   - - - + + + + + + - - + - +
{ const tableResponse = res.data if (tableResponse.code != 0) { - console.log(tableResponse.code + ':' + tableResponse.message) ElMessage.error(tableResponse.message) } - this.displayStocks = tableResponse.lists - this.total = tableResponse.total + this.displayStocks = tableResponse.returnData.lists + this.total = tableResponse.returnData.total }).catch(err => { console.log(err) ElMessage.error('查询库存错误') diff --git a/src/layout/taskMonitor.vue b/src/layout/taskMonitor.vue index 6dcb93b..001736a 100644 --- a/src/layout/taskMonitor.vue +++ b/src/layout/taskMonitor.vue @@ -3,8 +3,8 @@
- - + + 搜索 重置 @@ -18,14 +18,14 @@ - - - - + + + + - - + + @@ -106,7 +106,7 @@ + + + \ No newline at end of file diff --git a/src/layout/vehicles.vue b/src/layout/vehicles.vue deleted file mode 100644 index 193f73a..0000000 --- a/src/layout/vehicles.vue +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/layout/wmsLog.vue b/src/layout/wmsLog.vue index 8680b64..ff085ea 100644 --- a/src/layout/wmsLog.vue +++ b/src/layout/wmsLog.vue @@ -135,23 +135,20 @@ export default { methods: { search() { this.loading = true - this.pageInfo.pageNum = this.currentPage - this.pageInfo.pageSize = this.pageSize const tableRequest = { - page: this.pageInfo, - param: { - logRequest: this.queryKey.trim() - }, + pageNo: this.currentPage, + pageSize: this.pageSize, + queryParam: this.queryKey.trim() } queryLogs(tableRequest).then(res => { const tableResponse = res.data if (tableResponse.code != 0) { ElMessage.error(tableResponse.message) } - this.wmsLogs = tableResponse.rows - this.total = tableResponse.total + this.wmsLogs = tableResponse.returnData.lists + this.total = tableResponse.returnData.total }).catch(err => { - ElMessage.error('查询物料错误' + err.message) + ElMessage.error('查询日志错误' + err.message) }) this.loading = false }, diff --git a/src/router/index.js b/src/router/index.js index bced4de..9c7d36f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -21,10 +21,10 @@ const routes = [ { path: '/standSettings', component: () => import('@/layout/standSettings.vue') },// 站台(库口)设置 { path: '/config', component: () => import('@/layout/config.vue') },// 系统配置 { path: '/taskMonitor', component: () => import('@/layout/taskMonitor.vue') },// 任务监控 + { path: '/vehicles', component: () => import('@/layout/vehicle.vue') },// 任务监控 { path: '/inventory', component: () => import('@/layout/inventory.vue') },// 盘点 { path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue') },// 盘点 { path: '/wmsLog', component: () => import('@/layout/wmsLog.vue') },// 日志 - { path: '/scanConfirm', component: () => import('@/layout/scanConfirm.vue') },// 扫码确认 ] }, { diff --git a/src/utils/formatter.js b/src/utils/formatter.js index d962995..31e4d2b 100644 --- a/src/utils/formatter.js +++ b/src/utils/formatter.js @@ -57,7 +57,8 @@ function locationFormatter(locationId) { if (locationId === null || locationId == undefined) { return '' } - return locationId.substr(0, 2) + '排' + locationId.substr(2, 2) + '列' + locationId.substr(4, 2) + '层' + locationId.substr(7, 3) + '深度' + const locationArray = locationId.split('-') + return locationArray[0] + '排' + locationArray[1] + '列' + locationArray[2] + '层' + locationArray[3] + '深度' } function kateTaskStatusFormatter(value) { diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 0ffc511..946c9b8 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -5,9 +5,21 @@
- WMS仓库管理系统 + WMS仓库管理系统 +
+
+ + + {{ userName }} + + +
-
{{ userName }}
@@ -36,7 +48,7 @@ - © 1970-2024 江苏菲达宝开电气股份有限公司 + © 1970- 江苏菲达宝开电气股份有限公司 @@ -46,6 +58,9 @@ // @ is an alias to /src import sideMenu from '@/components/sideMenu.vue' import appTag from '@/components/appTag.vue' +import store from '@/store' +import { ElMessage } from 'element-plus' +import { restartSystem, reloadConfig } from '@/api/config.js' const icon_img_url = require('@/assets/fdbk_log.png') @@ -58,7 +73,7 @@ export default { }, computed: { userName() { - return this.$store.state.user.userName + return store.getters.getUserName } }, methods: { @@ -69,6 +84,33 @@ export default { path: '/location' }) this.$router.push('/location') + }, + handleCommand: (command) => { + const param = store.getters.getUser + if (command == 1) { + restartSystem(param).then(res => { + if (res.data.code != 0) { + ElMessage.error(res.data.message) + } + }).catch(err => { + console.log(err) + ElMessage.error('发生错误') + }) + } else if (command == 2) { + reloadConfig(param).then(res => { + if (res.data.code == 0) { + ElMessage({ + message: '重载配置成功', + type: 'success', + }) + } else { + ElMessage.error(res.data.message) + } + }).catch(err => { + console.log(err) + ElMessage.error('发生错误') + }) + } } } }