代码更新
This commit is contained in:
parent
b90b620d2e
commit
ddda8743d1
|
|
@ -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
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
|
|
|
|||
|
|
@ -9,14 +9,13 @@
|
|||
<!-- 此表格现在显示当前当前站台正在执行的出库任务 -->
|
||||
<el-table :data="tasks" stripe border class="table-class" max-height="250px"
|
||||
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column prop="goodsType" label="型号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="specification" label="规格" min-width="120px" />
|
||||
<el-table-column prop="taskGroup" label="任务单号" min-width="120px" />
|
||||
<el-table-column prop="batchNo" label="批次号" min-width="120px" />
|
||||
<el-table-column prop="operateNum" label="操作数量" min-width="120px" />
|
||||
<el-table-column prop="totalNum" label="库存数量" min-width="120px" />
|
||||
<el-table-column prop="goodsRelated.goodsId" label="物料编号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="vehicleId" label="载具号" min-width="120px" />
|
||||
<el-table-column prop="goodsRelated.originNum" label="库存数量" min-width="120px" />
|
||||
<el-table-column prop="goodsRelated.opNum" label="操作数量" min-width="120px" />
|
||||
<el-table-column prop="origin" label="起始位置" min-width="120px" />
|
||||
<el-table-column prop="destination" label="目标位置" min-width="120px" />
|
||||
<el-table-column prop="isPicking" label="是否拣选" min-width="120px" />
|
||||
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" />
|
||||
<el-table-column prop="createTime" label="运行时长" :formatter="dueFormat" min-width="120px" />
|
||||
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
||||
|
|
@ -36,27 +35,42 @@
|
|||
label-width="100px" style="max-width: 100%" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="型号" prop="goodsType">
|
||||
<el-input v-model="taskOutRequestEntity.goodsType" clearable placeholder="此处输入型号" />
|
||||
<el-form-item label="载具号" prop="vehicleId">
|
||||
<el-input v-model="taskOutRequestEntity.vehicleId" clearable
|
||||
placeholder="此处输入载具号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格" prop="specification">
|
||||
<el-input v-model="taskOutRequestEntity.specification" clearable
|
||||
placeholder="此处输入规格" />
|
||||
<el-form-item label="物料编号" prop="goodsId">
|
||||
<el-input v-model="taskOutRequestEntity.goodsId" clearable placeholder="此处输入物料编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="数量" prop="quantity">
|
||||
<el-input-number v-model.number="taskOutRequestEntity.quantity"
|
||||
<el-form-item label="数量" prop="goodsNum">
|
||||
<el-input-number v-model.number="taskOutRequestEntity.goodsNum"
|
||||
controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="任务单号" prop="taskId">
|
||||
<el-input v-model="taskOutRequestEntity.taskId" clearable placeholder="此处输入任务单号" />
|
||||
<el-form-item label="起始库位" prop="originPoint">
|
||||
<el-input v-model="taskOutRequestEntity.originPoint" clearable
|
||||
placeholder="此处输入起始库位,格式为A-01-01-01" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="是否拣选" prop="isPicking">
|
||||
<el-select-v2 v-model="taskOutRequestEntity.isPicking" placeholder="请选择是否拣选"
|
||||
:options="pickOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出库站台" prop="destinationPoint">
|
||||
<el-select-v2 v-model="taskOutRequestEntity.destinationPoint" placeholder="请选择出库站台"
|
||||
:options="destinationPointOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -70,6 +84,46 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
</fieldset>
|
||||
<fieldset class="input-area-down" style="margin-top: 15px;">
|
||||
<legend>拣选确认信息</legend>
|
||||
<el-form ref="pickConfirmRef" :model="pickConfirmEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="max-width: 100%" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="载具号" prop="vehicleId">
|
||||
<el-input v-model="pickConfirmEntity.vehicleId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料编号" prop="goodsId">
|
||||
<el-input v-model="pickConfirmEntity.goodsId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="库存数量" prop="originNum">
|
||||
<el-input-number v-model.number="pickConfirmEntity.originNum" clearable
|
||||
controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="拣选数量" prop="opNum">
|
||||
<el-input-number v-model.number="pickConfirmEntity.opNum" clearable
|
||||
controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16" class="btn-area">
|
||||
<el-col :span="8" :offset="8">
|
||||
<el-form-item>
|
||||
<el-button type="success" round
|
||||
@click="confirmTask(pickConfirmRef, pickConfirmEntity)">确认完回库</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</fieldset>
|
||||
</div>
|
||||
</el-container>
|
||||
</el-config-provider>
|
||||
|
|
@ -77,23 +131,16 @@
|
|||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { sendGoodsOutTask, getTasks } from '@/api/task'
|
||||
import { sendGoodsOutTask, getTasksByPage, getTasks, finishPickingAndBack } from '@/api/task'
|
||||
import { taskStatusFormatter, dueFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import { genTaskId } from '@/utils/stringUtils'
|
||||
import { reactive, ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
const taskOutRequestRef = ref()
|
||||
const pickConfirmRef = ref()
|
||||
const rules = reactive({
|
||||
goodsType: [
|
||||
{ required: true, message: '请输入型号' }
|
||||
],
|
||||
specification: [
|
||||
{ required: true, message: '请输入规格' }
|
||||
],
|
||||
quantity: [
|
||||
{ required: true, message: '请输入数量' },
|
||||
{ type: 'number', message: '请输入数字' }
|
||||
destinationPointOptions: [
|
||||
{ required: true, message: '请选择出库站台' }
|
||||
]
|
||||
})
|
||||
</script>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -288,11 +288,10 @@ export default {
|
|||
getAllStocks(request).then(res => {
|
||||
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('查询库存错误')
|
||||
|
|
|
|||
|
|
@ -5,9 +5,21 @@
|
|||
<el-image :src="icon_img_url" :fit="'fill'" />
|
||||
</div>
|
||||
<div class="title">
|
||||
<span>WMS仓库管理系统</span>
|
||||
<span style="font-size: 15px;font-weight: bold;">WMS仓库管理系统</span>
|
||||
</div>
|
||||
<div class="user">
|
||||
<el-dropdown @command="handleCommand">
|
||||
<span class="el-dropdown-link">
|
||||
{{ userName }}
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="1">重启系统</el-dropdown-item>
|
||||
<el-dropdown-item command="2" divided>重载配置</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="user">{{ userName }}</div>
|
||||
</el-header>
|
||||
<el-container class="content">
|
||||
<el-aside class="aside">
|
||||
|
|
@ -36,7 +48,7 @@
|
|||
</router-view>
|
||||
</el-scrollbar>
|
||||
</el-main>
|
||||
<el-footer class="footer">© 1970-2024 江苏菲达宝开电气股份有限公司</el-footer>
|
||||
<el-footer class="footer">© 1970- 江苏菲达宝开电气股份有限公司</el-footer>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</el-container>
|
||||
|
|
@ -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')
|
||||
</script>
|
||||
|
||||
|
|
@ -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('发生错误')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user