Merge pull request '更新' (#16) from zwq into master

Reviewed-on: #16
This commit is contained in:
朱文强 2022-07-06 17:00:31 +08:00
commit 370eb50bf4
20 changed files with 228 additions and 171 deletions

View File

@ -2,7 +2,7 @@
* @Author: gtz
* @Date: 2021-11-19 10:10:51
* @LastEditors: zwq
* @LastEditTime: 2022-07-01 11:05:12
* @LastEditTime: 2022-07-06 15:07:51
* @Description: file content
* @FilePath: \mt-qj-wms-ui\config\index.js
*/
@ -22,7 +22,7 @@ module.exports = {
// 代理列表, 是否开启代理通过[./dev.env.js]配置
proxyTable: devEnv.OPEN_PROXY === false ? {} : {
'/proxyApi': {
target: 'http://192.168.1.7:8080',
target: 'http://192.168.1.18:8080',
changeOrigin: true,
pathRewrite: {
'^/proxyApi': '/api'

View File

@ -18,7 +18,7 @@
<script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script>
<% }else { %>
<!-- 开发环境 -->
<link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="./static/img/top.png">
<script src="./static/config/index.js"></script>
<script src="./static/plugins/mock-1.0.0-beta3/mock-min.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.config.js"></script>

BIN
src/assets/img/bg.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="15px" height="14px" viewBox="0 0 15 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 60 (88103) - https://sketch.com -->
<title>维护开始</title>
<title>执行</title>
<desc>Created with Sketch.</desc>
<g id="组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon/界面内/维护开始" transform="translate(-1.000000, -1.000000)">
@ -15,4 +15,4 @@
</g>
</g>
</g>
</svg>
</svg>

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2022-07-01 11:11:17
* @LastEditTime: 2022-07-06 10:38:26
* @Description:
*/
/**
@ -55,7 +55,7 @@ const mainRoutes = {
{ path: '/basic-alarmInfo', component: _import('basic/alarmInfo'), name: 'basic-alarmInfo', meta: { title: '报警基础信息', isTab: true } },
{ path: '/order-current-order', component: _import('order/current-order'), name: 'order-current-order', meta: { title: '当前订单列表', isTab: true } },
{ path: '/order-current-order-task', component: _import('order/components/current-order-task'), name: 'order-current-order-task', meta: { title: '当前订单任务详情', isTab: true } },
{ path: '/order-current-task', component: _import('order/current-task'), name: 'order-current-task', meta: { title: '当前执行任务', isTab: true } },
{ path: '/order-current-task', component: _import('order/current-task'), name: 'order-current-task', meta: { title: '当前任务列表', isTab: true } },
{ path: '/order-current-task-detail', component: _import('order/components/current-task-detail'), name: 'order-current-task-detail', meta: { title: '当前执行任务详情', isTab: true } },
{ path: '/report-kiln-alarm', component: _import('report/kiln-alarm'), name: 'report-kiln-alarm', meta: { title: '窑炉报警', isTab: true } },
{ path: '/report-car-alarm', component: _import('report/car-alarm'), name: 'report-car-alarm', meta: { title: '车辆运行报警', isTab: true } },

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-03-07 15:31:13
* @LastEditors: zwq
* @LastEditTime: 2022-07-05 16:12:59
* @LastEditTime: 2022-07-06 16:08:05
* @Description:
-->
<template>
@ -30,7 +30,7 @@ export default {
},
created () {
const baseurl = window.SITE_CONFIG.baseUrl
this.url = baseurl.slice(5)
this.url = baseurl.substring(5, baseurl.length - 4)
this.initWebSocket()
},
destroyed () {
@ -51,7 +51,7 @@ export default {
},
websocketonopen () {
// send
this.websocketsend(JSON.stringify())
this.websocketsend(JSON.stringify('2'))
},
websocketonerror () {
//
@ -59,13 +59,12 @@ export default {
},
websocketonmessage (e) {
//
console.log(e.data)
this.wbData = JSON.parse(e.data)
console.log(this.wbData)
},
websocketsend () {
websocketsend (val) {
//
this.websock.send()
this.websock.send(val)
},
websocketclose (e) {
//

View File

@ -84,7 +84,6 @@
right: 0;
bottom: 0;
left: 0;
background-color: rgba(38, 50, 56, .6);
overflow: hidden;
&:before {
position: fixed;
@ -94,8 +93,8 @@
width: 100%;
height: 100%;
content: "";
background-image: url(~@/assets/img/login_bg.jpg);
background-size: cover;
background-image: url(~@/assets/img/bg.jpeg);
background-size: 100% 100%;
}
.site-content__wrapper {
position: absolute;

View File

@ -199,7 +199,7 @@
message: '请选择窑炉',
type: 'warning'
})
} else if (!this.processType) {
} else if (this.processType !== 0 || this.processType !== 1) {
this.$message.warning('请选择加工类型')
} else {
this.$confirm(`确定提交任务?`, '提示', {

View File

@ -11,7 +11,7 @@
<icon-svg name="shouye" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">首页</span>
</el-menu-item>
<el-menu-item index="board" @click="$router.push({ name: 'board' })">
<el-menu-item index="board" @click="getUrl">
<icon-svg name="shanchu" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">车间生产看板</span>
</el-menu-item>
@ -27,7 +27,7 @@
@click="$router.push({ name: 'orderAuto' })"
>
<icon-svg name="tubiao" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">自动任务</span>
<span slot="title">多步骤自动任务</span>
</el-menu-item>
<el-menu-item
index="orderProcess"
@ -132,7 +132,7 @@
@click="$router.push({ name: 'order-current-task' })"
>
<icon-svg name="editor" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">当前执行任务</span>
<span slot="title">当前任务列表</span>
</el-menu-item>
</el-submenu>
<!-- <el-submenu index="energy">
@ -412,6 +412,10 @@ export default {
this.routeHandle(this.$route)
},
methods: {
getUrl () {
let routeData = this.$router.resolve({ path: '/board' })
window.open(routeData.href, '_blank')
},
//
routeHandle (route) {
if (route.meta.isTab) {

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2022-07-05 15:46:53
* @LastEditTime: 2022-07-06 16:28:27
* @Description:
-->
<template>
@ -68,7 +68,7 @@
},
created () {
const baseurl = window.SITE_CONFIG.baseUrl
this.url = baseurl.slice(5)
this.url = baseurl.substring(5, baseurl.length - 4)
this.getUserInfo()
this.initWebSocket()
},
@ -106,7 +106,7 @@
this.websock.onclose = this.websocketclose
},
websocketonopen () { // send
this.websocketsend(JSON.stringify())
this.websocketsend(JSON.stringify(1))
},
websocketonerror () { //
this.initWebSocket()
@ -118,8 +118,8 @@
duration: 15000
})
},
websocketsend () { //
this.websock.send()
websocketsend (val) { //
this.websock.send(val)
},
websocketclose (e) { //
console.log('断开连接', e)

View File

@ -34,16 +34,25 @@
prop="abeginTime"
label="发起时间"
>
<template slot-scope="scope">
{{ scope.row.abeginTime ? scope.row.abeginTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="aendTime"
label="完成时间"
>
<template slot-scope="scope">
{{ scope.row.aendTime ? scope.row.aendTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="taskType"
label="任务类型"
>
<template slot-scope="scope">
{{ scope.row.taskType === 0 ? '初始加工' : '复加工' }}
</template>
</el-table-column>
<el-table-column
prop="remark"
@ -60,11 +69,6 @@
label="目标位置"
>
</el-table-column>
<el-table-column
prop="vehicleName"
label="车辆名称"
>
</el-table-column>
<el-table-column
prop="kilnName"
label="加工炉"

View File

@ -27,6 +27,9 @@
<el-table-column
prop="createTime"
label="获取时间">
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="idenCardNum"

View File

@ -1,6 +1,6 @@
<template>
<div class="mod-config">
<el-form style="display: flex; align-items: center; justify-content: right;" :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<!-- <el-form style="display: flex; align-items: center; justify-content: right;" :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-select size="small" v-model="dataForm.vehicleId" filterable placeholder="车辆名称">
<el-option
@ -14,44 +14,42 @@
</el-form-item>
<el-form-item>
<el-button size="small" @click="getDataList()">查询</el-button>
<!-- <el-button type="primary" @click="handTask()">手动执行任务</el-button> -->
<el-button type="primary" @click="handTask()">手动执行任务</el-button>
</el-form-item>
</el-form>
</el-form> -->
<el-table
:data="dataList"
:stripe="true"
:header-cell-style="{background:'#eef1f6',color:'#606266',height: '56px'}"
:header-cell-style="{
background: '#eef1f6',
color: '#606266',
height: '56px'
}"
v-loading="dataListLoading"
style="width: 100%;">
style="width: 100%;"
>
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50">
width="50"
>
</el-table-column>
<el-table-column
prop="taskCode"
label="任务编码">
</el-table-column>
<el-table-column
prop="createTime"
label="发起时间">
</el-table-column>
<el-table-column
prop="taskSource"
label="任务来源">
</el-table-column>
<el-table-column
prop="status"
label="任务状态">
<el-table-column prop="taskCode" label="任务编码"> </el-table-column>
<el-table-column prop="createTime" label="发起时间">
<template slot-scope="scope">
{{ scope.row.status >= 0 ? statusList[scope.row.status] : '' }}
{{
scope.row.createTime ? scope.row.createTime.replace("T", " ") : ""
}}
</template>
</el-table-column>
<el-table-column
prop="taskType"
label="任务类型">
<el-table-column prop="status" label="任务状态">
<template slot-scope="scope">
{{ scope.row.status >= 0 ? statusList[scope.row.status] : "" }}
</template>
</el-table-column>
<el-table-column prop="taskType" label="任务类型">
<template slot-scope="scope">
<span>{{
scope.row.taskType === 0
@ -64,26 +62,21 @@
}}</span>
</template>
</el-table-column>
<el-table-column
prop="startPosition"
label="开始位置">
</el-table-column>
<el-table-column
prop="targetPosition"
label="目标位置">
</el-table-column>
<el-table-column
prop="vehicleName"
label="车辆名称">
<el-table-column prop="startPosition" label="开始位置"> </el-table-column>
<el-table-column prop="targetPosition" label="目标位置">
</el-table-column>
<el-table-column prop="vehicleName" label="车辆名称"> </el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="80"
label="详情">
label="详情"
>
<template slot-scope="scope">
<el-button type="text" size="small" @click="Detail(scope.row.id)">详情</el-button>
<el-button type="text" size="small" @click="Detail(scope.row.id)"
>详情</el-button
>
</template>
</el-table-column>
<el-table-column
@ -91,15 +84,38 @@
header-align="center"
align="center"
width="120"
label="操作">
label="操作"
>
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">
<el-tooltip class="item" effect="dark" content="执行" placement="top">
<icon-svg class="iconClass" name="维护开始"></icon-svg>
<el-button
type="text"
:disabled="scope.row.status === 1"
size="small"
@click="addOrUpdateHandle(scope.row.id)"
>
<el-tooltip
class="item"
effect="dark"
content="执行"
placement="top"
>
<icon-svg class="iconClass" name="维护开始"></icon-svg>
</el-tooltip>
</el-button>
<el-button type="text" v-if="!(scope.row.isAuto)" style="color:red" size="small" @click="deleteHandle(scope.row.sheetNo)">
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<el-button
type="text"
:disabled="scope.row.status === 1"
v-if="!scope.row.isAuto"
style="color:red"
size="small"
@click="deleteHandle(scope.row.sheetNo)"
>
<el-tooltip
class="item"
effect="dark"
content="删除"
placement="top"
>
<icon-svg class="iconClass" name="删除"></icon-svg>
</el-tooltip>
</el-button>
@ -113,111 +129,115 @@
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination>
</div>
</template>
<script>
//
const statusList = {
0: '等待执行',
1: '执行中',
2: '执行完成',
3: '追加后完成'
}
export default {
data () {
return {
dataForm: {
vehicleId: ''
},
dataList: [],
options: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
statusList
}
//
const statusList = {
0: '等待执行',
1: '执行中',
2: '执行完成',
3: '追加后完成'
}
export default {
data () {
return {
dataForm: {
vehicleId: ''
},
timer: '',
dataList: [],
options: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
statusList
}
},
created () {
this.getDataList()
this.timer = setInterval(this.getDataList, 180000)
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/currTask/currentTaskNow'),
method: 'post',
data: this.$http.adornData({
current: this.pageIndex,
size: this.pageSize,
vehicleId: this.dataForm.vehicleId
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
activated () {
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/currTask/currentTaskNow'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'vehicleId': this.dataForm.vehicleId
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
Detail (id) {
this.$router.push({ name: 'order-current-task-detail', query: { id } })
},
handTask () {
this.$router.push({ name: 'orderProcess' })
},
//
addOrUpdateHandle (id) {
this.$http({
url: this.$http.adornUrl('/currTask/runTask'),
method: 'post',
data: this.$http.adornData({ id })
// params: this.$http.adornParams({ id }, false)
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
Detail (id) {
this.$router.push({name: 'order-current-task-detail', query: {id}})
},
handTask () {
this.$router.push({name: 'orderProcess'})
},
//
addOrUpdateHandle (id) {
this.$http({
url: this.$http.adornUrl('/currTask/runTask'),
method: 'post',
data: this.$http.adornData({ id })
// params: this.$http.adornParams({ id }, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
},
//
deleteHandle (sheetNo) {
this.$confirm(`确定对[生产单编号=${sheetNo}]进行删除操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
} else {
this.$message.error(data.msg)
}
})
},
//
deleteHandle (sheetNo) {
this.$confirm(`确定对[生产单编号=${sheetNo}]进行删除操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$http({
url: this.$http.adornUrl('/currTask/deleteBySheetNo'),
method: 'post',
data: this.$http.adornData(sheetNo)
}).then(({data}) => {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
@ -231,8 +251,12 @@
this.$message.error(data.msg)
}
})
}).catch(() => {})
}
})
.catch(() => {})
}
},
beforeDestroy () {
clearInterval(this.timer)
}
}
</script>

View File

@ -52,6 +52,9 @@
<el-table-column
prop="createTime"
label="报警时间">
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<!-- <el-table-column
prop="time"

View File

@ -34,11 +34,17 @@
prop="abeginTime"
label="发起时间"
>
<template slot-scope="scope">
{{ scope.row.abeginTime ? scope.row.abeginTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="aendTime"
label="完成时间"
>
<template slot-scope="scope">
{{ scope.row.aendTime ? scope.row.aendTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="orderSource"

View File

@ -57,6 +57,9 @@
prop="createTime"
label="报警时间"
>
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<!-- <el-table-column
prop="time"

View File

@ -43,6 +43,9 @@
<el-table-column
prop="createTime"
label="获取时间">
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="idenCardNum"
@ -55,10 +58,16 @@
<el-table-column
prop="abeginTime"
label="发起时间">
<template slot-scope="scope">
{{ scope.row.abeginTime ? scope.row.abeginTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="aendTime"
label="完成时间">
<template slot-scope="scope">
{{ scope.row.aendTime ? scope.row.aendTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<!-- <el-table-column
prop="orderSource"

View File

@ -62,6 +62,9 @@
prop="createTime"
label="发起时间"
>
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="taskSource"
@ -170,7 +173,7 @@ export default {
statusList
}
},
activated () {
created () {
this.getDataList()
},
methods: {

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-12-07 14:48:08
* @LastEditTime: 2022-07-06 15:12:03
* @Description:
*/
/**
@ -12,7 +12,7 @@
window.SITE_CONFIG = {}
// api接口请求地址
window.SITE_CONFIG['baseUrl'] = 'http://192.168.0.134:8080/'
window.SITE_CONFIG['baseUrl'] = 'http://192.168.1.18:8080/api/'
// cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './' // 域名

BIN
static/img/top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB