Compare commits

...

13 Commits

Author SHA1 Message Date
4ba7a55b2e Merge pull request 'zwq' (#18) from zwq into master
Reviewed-on: #18
2022-07-08 10:15:04 +08:00
zwq
f28b25cfe0 Merge branch 'master' of http://git.picaiba.com/mt-ck/mt-qj-wms-ui into zwq 2022-07-08 10:14:31 +08:00
zwq
bc7ae55adb 更新 2022-07-08 10:14:00 +08:00
2d812f07ad Merge pull request '更新' (#17) from zwq into master
Reviewed-on: #17
2022-07-07 13:33:56 +08:00
8c0f7f64a4 Merge branch 'master' into zwq 2022-07-07 13:33:51 +08:00
zwq
847acd0390 更新 2022-07-07 13:33:31 +08:00
370eb50bf4 Merge pull request '更新' (#16) from zwq into master
Reviewed-on: #16
2022-07-06 17:00:31 +08:00
zwq
a227548f38 更新 2022-07-06 16:59:18 +08:00
89ebeeb791 Merge pull request '更新看板' (#15) from zwq into master
Reviewed-on: #15
2022-07-05 16:55:02 +08:00
zwq
060ec37ccf 更新看板 2022-07-05 16:54:45 +08:00
1c71d4c22d Merge pull request '新增看板' (#14) from zwq into master
Reviewed-on: #14
2022-07-04 10:52:10 +08:00
zwq
3a12063529 新增看板 2022-07-04 10:51:20 +08:00
73a729da51 Merge pull request 'update' (#13) from gtz into master
Reviewed-on: #13
2022-03-19 11:51:24 +08:00
52 changed files with 600 additions and 198 deletions

View File

@@ -1,8 +1,8 @@
/* /*
* @Author: gtz * @Author: gtz
* @Date: 2021-11-19 10:10:51 * @Date: 2021-11-19 10:10:51
* @LastEditors: gtz * @LastEditors: zwq
* @LastEditTime: 2022-03-05 16:16:24 * @LastEditTime: 2022-07-06 15:07:51
* @Description: file content * @Description: file content
* @FilePath: \mt-qj-wms-ui\config\index.js * @FilePath: \mt-qj-wms-ui\config\index.js
*/ */
@@ -22,7 +22,7 @@ module.exports = {
// 代理列表, 是否开启代理通过[./dev.env.js]配置 // 代理列表, 是否开启代理通过[./dev.env.js]配置
proxyTable: devEnv.OPEN_PROXY === false ? {} : { proxyTable: devEnv.OPEN_PROXY === false ? {} : {
'/proxyApi': { '/proxyApi': {
target: 'http://192.168.1.7:8080', target: 'http://192.168.1.18:8080',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/proxyApi': '/api' '^/proxyApi': '/api'
@@ -31,7 +31,7 @@ module.exports = {
}, },
// Various Dev Server settings // Various Dev Server settings
host: '0.0.0.0', // can be overwritten by process.env.HOST host: 'localhost', // can be overwritten by process.env.HOST
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true, autoOpenBrowser: true,
errorOverlay: true, errorOverlay: true,

View File

@@ -18,7 +18,7 @@
<script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script> <script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script>
<% }else { %> <% }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/config/index.js"></script>
<script src="./static/plugins/mock-1.0.0-beta3/mock-min.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> <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

BIN
src/assets/img/board/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 KiB

BIN
src/assets/img/board/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <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 --> <!-- Generator: Sketch 60 (88103) - https://sketch.com -->
<title>维护开始</title> <title>执行</title>
<desc>Created with Sketch.</desc> <desc>Created with Sketch.</desc>
<g id="组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon/界面内/维护开始" transform="translate(-1.000000, -1.000000)"> <g id="icon/界面内/维护开始" transform="translate(-1.000000, -1.000000)">
@@ -15,4 +15,4 @@
</g> </g>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -1,8 +1,8 @@
/* /*
* @Author: zwq * @Author: zwq
* @Date: 2021-11-15 08:20:28 * @Date: 2021-11-15 08:20:28
* @LastEditors: gtz * @LastEditors: zwq
* @LastEditTime: 2022-03-05 16:05:35 * @LastEditTime: 2022-07-07 09:48:49
* @Description: * @Description:
*/ */
/** /**
@@ -23,7 +23,8 @@ const _import = require('./import-' + process.env.NODE_ENV)
// 全局路由(无需嵌套上左右整体布局) // 全局路由(无需嵌套上左右整体布局)
const globalRoutes = [ const globalRoutes = [
{ path: '/404', component: _import('common/404'), name: '404', meta: { title: '404未找到' } }, { path: '/404', component: _import('common/404'), name: '404', meta: { title: '404未找到' } },
{ path: '/login', component: _import('common/login'), name: 'login', meta: { title: '登录' } } { path: '/login', component: _import('common/login'), name: 'login', meta: { title: '登录' } },
{ path: '/board', component: _import('common/board'), name: 'board', meta: { title: '车间生产看板', isTab: false } }
] ]
// 主入口路由(需嵌套上左右整体布局) // 主入口路由(需嵌套上左右整体布局)
@@ -54,7 +55,7 @@ const mainRoutes = {
{ path: '/basic-alarmInfo', component: _import('basic/alarmInfo'), name: 'basic-alarmInfo', meta: { title: '报警基础信息', isTab: true } }, { 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', 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-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: '/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-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 } }, { path: '/report-car-alarm', component: _import('report/car-alarm'), name: 'report-car-alarm', meta: { title: '车辆运行报警', isTab: true } },

View File

@@ -0,0 +1,52 @@
<!--
* @Author: zwq
* @Date: 2022-03-07 15:31:13
* @LastEditors: zwq
* @LastEditTime: 2022-07-05 16:11:42
* @Description:
-->
<template>
<div class="main-body">
<el-table
size='mini'
:data="tableData"
:header-cell-style="{background:'#082c34',color:'#acb9be',padding:'0px'}"
:cell-style="{background:'#04222d',color:'#acb9be',padding:'5px 0px'}"
style="width: 100%"
>
<el-table-column type="index" label="序号" width="30" align="center"> </el-table-column>
<el-table-column prop="customer" label="客户名称" align="center"> </el-table-column>
<el-table-column prop="orderNo" label="订单编号" align="center"> </el-table-column>
<el-table-column prop="quantity" label="数量" width="50" align="center"> </el-table-column>
<el-table-column prop="productName" label="产品名称" align="center"> </el-table-column>
<el-table-column prop="weight" label="重量" width="50" align="center"> </el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: 'board-part-table',
components: {},
props: {
tableData: {
type: Array,
default: []
}
},
data () {
return {}
},
created () {},
methods: {}
}
</script>
<style lang="scss" scoped>
.main-body{
margin: 5px;
}
.main-body /deep/ .cell{
padding: 0px;
}
</style>

View File

@@ -0,0 +1,148 @@
<!--
* @Author: zwq
* @Date: 2022-03-07 15:31:13
* @LastEditors: zwq
* @LastEditTime: 2022-07-05 16:18:48
* @Description:
-->
<template>
<div class="container">
<div class="title">
<div class="tipDiv"></div>
加工单信息
</div>
<div class="main-body">
<div class="main-header">
<el-row :gutter="8">
<el-col :span="8">
<div class="front">
<img
:src="'/static/img/lu/'+imgUrl+'.png'"
style="display:block;margin:auto"
/>炉号
</div>
</el-col>
<el-col :span="8">
<el-row>
<div class="mid top-info">
{{wbData.taskCode}}
<div style="color: #fff;margin: 5px 0;">加工单编号</div>
</div>
</el-row>
<el-row>
<div class="mid bottom-info">
{{wbData.plcValue}}
<div style="color: #fff;margin: 5px 0;">工艺号</div>
</div>
</el-row>
</el-col>
<el-col :span="8">
<div class="back">
<el-progress
:percentage="wbData.completeness"
:stroke-width="8"
:show-text="false"
></el-progress>
<div style="margin: 5px 0;">{{ wbData.remainingTime}}</div>
<div style="color: #fff;font-size:14px">剩余时间</div>
</div>
</el-col>
</el-row>
</div>
<div class="main-table">
<div class="tipDiv"></div>
标识信息卡
</div>
<part-table :tableData="wbData.currTaskDetVoList"></part-table>
</div>
</div>
</template>
<script>
import partTable from './board-part-table.vue'
export default {
components: {partTable},
props: {
wbData: {
type: Object,
default: () => {}
},
imgUrl: {
type: String,
default: 'BMA1'
}
},
data () {
return {
}
},
created () {
},
mounted () {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.container{
width: 30%;
}
.title {
color: #ffffff;
font-size: 22px;
margin: 8px 0;
.tipDiv {
border-radius: 3px;
width: 8px;
height: 22px;
margin-right: 20px;
background-color: #54fdef;
float: left;
}
}
.main-body{
background-color: #04242d;
.main-header {
.front {
min-height: 136px;
border-radius: 4px;
padding: 6px;
color: #ffffff;
text-align: center;
background: linear-gradient(to bottom, #133e46 0%, #04202c 100%);
}
.mid {
min-height: 64px;
border-radius: 4px;
margin-bottom: 5px;
padding: 6px;
color: #48dcd1;
text-align: center;
background: linear-gradient(to bottom, #0b2c36 0%, #04202c 100%);
}
.back {
min-height: 136px;
padding: 25px 5px;
text-align: center;
font-size: 30px;
color: #48dcd1;
}
.back /deep/ .el-progress-bar__inner {
background: linear-gradient(to right, #62fbb9 0%, #fdd64a 100%);
}
}
.main-table{
color: #ffffff;
margin: 10px;
.tipDiv{
width: 8px;
height: 8px;
margin: 3px 10px 3px 0;
background-color: #54fdef;
float: left;
}
}
}
</style>

103
src/views/common/board.vue Normal file
View File

@@ -0,0 +1,103 @@
<!--
* @Author: zwq
* @Date: 2022-03-07 15:31:13
* @LastEditors: zwq
* @LastEditTime: 2022-07-08 08:36:01
* @Description:
-->
<template>
<div class="main-body">
<div class="container-title">
浙江求精科技车间生产看板
</div>
<div class="container-body">
<board v-for="(item,index) in wbData" :key="index" :wbData="item" :imgUrl="item.kilnCode"></board>
</div>
</div>
</template>
<script>
import board from './board-part'
export default {
name: 'Board',
components: { board },
data () {
return {
websock: '',
url: '',
wbData: []
}
},
created () {
this.url = window.SITE_CONFIG.wbUrl
this.initWebSocket()
},
destroyed () {
// 页面销毁时关闭ws连接
if (this.websock) {
this.websock.close() // 关闭websocket
}
},
methods: {
initWebSocket () {
// 初始化weosocket
const path = `ws://${this.url}/qj/websocket/2`
this.websock = new WebSocket(path)
this.websock.onmessage = this.websocketonmessage
this.websock.onopen = this.websocketonopen
this.websock.onerror = this.websocketonerror
this.websock.onclose = this.websocketclose
},
websocketonopen () {
// 连接建立之后执行send方法发送数据
this.websocketsend(JSON.stringify('2'))
},
websocketonerror () {
// 连接建立失败重连
this.initWebSocket()
},
websocketonmessage (e) {
// 数据接收
this.wbData = JSON.parse(e.data)
console.log(this.wbData)
},
websocketsend (val) {
// 数据发送
this.websock.send(val)
},
websocketclose (e) {
// 关闭
console.log('断开连接', e)
}
}
}
</script>
<style lang="scss" scoped>
.main-body {
min-height: 100vh;
width: 100%;
background: url(~@/assets/img/board/1.png) center no-repeat;
background-size: cover;
overflow: hidden;
.container-title {
width: 100%;
height: 80px;
background: url(~@/assets/img/board/2.png) no-repeat;
background-size: 100% 100%;
color: #00fff0;
font-size: 28px;
line-height: 80px;
text-align: center;
}
.container-body {
display: flex;
margin: auto;
flex-wrap: wrap;
flex-direction: row;
justify-content: space-around;
}
}
</style>

View File

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

View File

@@ -70,6 +70,7 @@
methods: { methods: {
init (row, idx) { init (row, idx) {
this.visible = true this.visible = true
this.formLoading = false
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (row) { if (row) {
@@ -110,7 +111,7 @@
dataFormSubmit () { dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
if (this.editIndex) { if (this.editIndex || this.editIndex === 0) {
const taskList = JSON.parse(sessionStorage.getItem('autoTaskList')) const taskList = JSON.parse(sessionStorage.getItem('autoTaskList'))
taskList.splice(this.editIndex, 1, this.dataForm) taskList.splice(this.editIndex, 1, this.dataForm)
sessionStorage.setItem('autoTaskList', JSON.stringify(taskList)) sessionStorage.setItem('autoTaskList', JSON.stringify(taskList))

View File

@@ -1,8 +1,8 @@
<!-- <!--
* @Author: gtz * @Author: gtz
* @Date: 2022-03-04 10:22:13 * @Date: 2022-03-04 10:22:13
* @LastEditors: gtz * @LastEditors: zwq
* @LastEditTime: 2022-03-05 12:09:38 * @LastEditTime: 2022-07-08 09:41:08
* @Description: file content * @Description: file content
* @FilePath: \mt-qj-wms-ui\src\views\common\order-auto-submit.vue * @FilePath: \mt-qj-wms-ui\src\views\common\order-auto-submit.vue
--> -->
@@ -144,6 +144,7 @@
}, },
methods: { methods: {
init (list) { init (list) {
this.dataList.splice(0, this.dataList.length)
this.dataList = list this.dataList = list
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
@@ -252,10 +253,16 @@
}).then(({data}) => { }).then(({data}) => {
console.log(data) console.log(data)
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message.success('任务提交成功') this.$message({
this.dataList = [] message: '操作成功',
sessionStorage.setItem('autoTaskList', '') type: 'success',
this.$emit('refreshDataList') duration: 1500,
onClose: () => {
this.visible = false
sessionStorage.setItem('autoTaskList', '')
this.$emit('refreshDataList')
}
})
} else { } else {
this.$message.warning(data.msg) this.$message.warning(data.msg)
} }

View File

@@ -70,12 +70,15 @@
methods: { methods: {
init (row, idx) { init (row, idx) {
this.visible = true this.visible = true
this.row = null
this.editIndex = null
this.formLoading = false
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (row) { if (row) {
this.row = row this.row = JSON.parse(JSON.stringify(row))
this.dataForm = row this.dataForm = JSON.parse(JSON.stringify(row))
this.editIndex = idx this.editIndex = JSON.parse(JSON.stringify(idx))
} }
this.$refs['idenCardNum'].focus() this.$refs['idenCardNum'].focus()
}) })
@@ -90,7 +93,6 @@
'idenCardNum': this.dataForm.idenCardNum 'idenCardNum': this.dataForm.idenCardNum
}) })
}).then(({data}) => { }).then(({data}) => {
console.log(data)
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm = data.data this.dataForm = data.data
this.dataForm.targetQuantity = data.data.quantity this.dataForm.targetQuantity = data.data.quantity
@@ -110,7 +112,7 @@
dataFormSubmit () { dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
if (this.editIndex) { if (this.editIndex || this.editIndex === 0) {
const taskList = JSON.parse(sessionStorage.getItem('taskList')) const taskList = JSON.parse(sessionStorage.getItem('taskList'))
taskList.splice(this.editIndex, 1, this.dataForm) taskList.splice(this.editIndex, 1, this.dataForm)
sessionStorage.setItem('taskList', JSON.stringify(taskList)) sessionStorage.setItem('taskList', JSON.stringify(taskList))

View File

@@ -28,6 +28,11 @@
</el-select> </el-select>
<!-- <el-button style="margin-left:10px" type="primary" @click="getPoint(1)">{{kilnId}}</el-button> --> <!-- <el-button style="margin-left:10px" type="primary" @click="getPoint(1)">{{kilnId}}</el-button> -->
</el-form-item> </el-form-item>
<el-form-item>
<el-select v-model="craftCode" placeholder="工艺">
<el-option v-for="item in processList" :key="item.id" :value="item.code" :label="item.craftCode" />
</el-select>
</el-form-item>
<el-form-item style="margin-left:1%"> <el-form-item style="margin-left:1%">
<el-button type="primary" size="small" @click="submitTask()">提交任务</el-button> <el-button type="primary" size="small" @click="submitTask()">提交任务</el-button>
</el-form-item> </el-form-item>
@@ -117,13 +122,15 @@
return { return {
startPosition: '', startPosition: '',
kilnId: '', kilnId: '',
craftCode: '',
targetPosition: '', targetPosition: '',
dataList: [], dataList: [],
processType: null, processType: null,
dataListLoading: false, dataListLoading: false,
addOrUpdateVisible: false, addOrUpdateVisible: false,
processPointVisible: false, processPointVisible: false,
eqList: [] eqList: [],
processList: []
} }
}, },
components: { components: {
@@ -151,6 +158,21 @@
} }
this.getDataList() this.getDataList()
}) })
this.$http({
url: this.$http.adornUrl('/craftInfo/page'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 999
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.processList = data.data.records
} else {
this.processList = []
}
})
}, },
// 获取数据列表 // 获取数据列表
getDataList () { getDataList () {
@@ -199,7 +221,12 @@
message: '请选择窑炉', message: '请选择窑炉',
type: 'warning' type: 'warning'
}) })
} else if (!this.processType) { } else if (!this.craftCode) {
this.$message({
message: '请选择工艺',
type: 'warning'
})
} else if (this.processType !== 0 && this.processType !== 1) {
this.$message.warning('请选择加工类型') this.$message.warning('请选择加工类型')
} else { } else {
this.$confirm(`确定提交任务?`, '提示', { this.$confirm(`确定提交任务?`, '提示', {
@@ -211,7 +238,7 @@
url: this.$http.adornUrl(`/currTask/createProcessTask`), url: this.$http.adornUrl(`/currTask/createProcessTask`),
method: 'post', method: 'post',
data: this.$http.adornData({ data: this.$http.adornData({
craftCode: '', craftCode: this.craftCode,
detParams: this.dataList, detParams: this.dataList,
kilnId: this.kilnId, kilnId: this.kilnId,
processType: this.processType, processType: this.processType,
@@ -220,7 +247,6 @@
// this.targetPosition // this.targetPosition
}) })
}).then(({data}) => { }).then(({data}) => {
console.log(data)
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message.success('任务提交成功') this.$message.success('任务提交成功')
this.dataList = [] this.dataList = []

View File

@@ -11,6 +11,10 @@
<icon-svg name="shouye" class="site-sidebar__menu-icon"></icon-svg> <icon-svg name="shouye" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">首页</span> <span slot="title">首页</span>
</el-menu-item> </el-menu-item>
<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>
<el-submenu index="task"> <el-submenu index="task">
<template slot="title"> <template slot="title">
<icon-svg name="config" class="site-sidebar__menu-icon"></icon-svg> <icon-svg name="config" class="site-sidebar__menu-icon"></icon-svg>
@@ -23,7 +27,7 @@
@click="$router.push({ name: 'orderAuto' })" @click="$router.push({ name: 'orderAuto' })"
> >
<icon-svg name="tubiao" class="site-sidebar__menu-icon"></icon-svg> <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>
<el-menu-item <el-menu-item
index="orderProcess" index="orderProcess"
@@ -128,7 +132,7 @@
@click="$router.push({ name: 'order-current-task' })" @click="$router.push({ name: 'order-current-task' })"
> >
<icon-svg name="editor" class="site-sidebar__menu-icon"></icon-svg> <icon-svg name="editor" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">当前执行任务</span> <span slot="title">当前任务列表</span>
</el-menu-item> </el-menu-item>
</el-submenu> </el-submenu>
<!-- <el-submenu index="energy"> <!-- <el-submenu index="energy">
@@ -408,6 +412,10 @@ export default {
this.routeHandle(this.$route) this.routeHandle(this.$route)
}, },
methods: { methods: {
getUrl () {
let routeData = this.$router.resolve({ path: '/board' })
window.open(routeData.href, '_blank')
},
// 路由操作 // 路由操作
routeHandle (route) { routeHandle (route) {
if (route.meta.isTab) { if (route.meta.isTab) {

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-15 08:20:28 * @Date: 2021-11-15 08:20:28
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2022-03-18 14:48:46 * @LastEditTime: 2022-07-07 10:51:59
* @Description: * @Description:
--> -->
<template> <template>
@@ -67,8 +67,7 @@
} }
}, },
created () { created () {
const baseurl = window.SITE_CONFIG.baseUrl this.url = window.SITE_CONFIG.wbUrl
this.url = baseurl.slice(5)
this.getUserInfo() this.getUserInfo()
this.initWebSocket() this.initWebSocket()
}, },
@@ -98,7 +97,7 @@
// }) // })
}, },
initWebSocket () { // 初始化weosocket initWebSocket () { // 初始化weosocket
const path = `ws:${this.url}/qj/websocket/${'id'}` const path = `ws://${this.url}/qj/websocket/1`
this.websock = new WebSocket(path) this.websock = new WebSocket(path)
this.websock.onmessage = this.websocketonmessage this.websock.onmessage = this.websocketonmessage
this.websock.onopen = this.websocketonopen this.websock.onopen = this.websocketonopen
@@ -106,7 +105,7 @@
this.websock.onclose = this.websocketclose this.websock.onclose = this.websocketclose
}, },
websocketonopen () { // 连接建立之后执行send方法发送数据 websocketonopen () { // 连接建立之后执行send方法发送数据
this.websocketsend(JSON.stringify()) this.websocketsend(JSON.stringify(1))
}, },
websocketonerror () { // 连接建立失败重连 websocketonerror () { // 连接建立失败重连
this.initWebSocket() this.initWebSocket()
@@ -118,8 +117,8 @@
duration: 15000 duration: 15000
}) })
}, },
websocketsend () { // 数据发送 websocketsend (val) { // 数据发送
this.websock.send() this.websock.send(val)
}, },
websocketclose (e) { // 关闭 websocketclose (e) { // 关闭
console.log('断开连接', e) console.log('断开连接', e)

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="mod-config"> <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-form-item>
<el-select size="small" v-model="dataForm.vehicleId" filterable placeholder="车辆名称"> <el-select size="small" v-model="dataForm.vehicleId" filterable placeholder="车辆名称">
<el-option <el-option
@@ -14,76 +14,68 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="small" @click="getDataList()">查询</el-button> <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-item>
</el-form> </el-form> -->
<el-table <el-table
:data="dataList" :data="dataList"
:stripe="true" :stripe="true"
:header-cell-style="{background:'#eef1f6',color:'#606266',height: '56px'}" :header-cell-style="{
background: '#eef1f6',
color: '#606266',
height: '56px'
}"
v-loading="dataListLoading" v-loading="dataListLoading"
style="width: 100%;"> style="width: 100%;"
>
<el-table-column <el-table-column
type="index" type="index"
header-align="center" header-align="center"
align="center" align="center"
label="序号" label="序号"
width="50"> width="50"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="taskCode" label="任务编码"> </el-table-column>
prop="taskCode" <el-table-column prop="createTime" label="发起时间">
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="任务状态">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status >= 0 ? statusList[scope.row.status] : '' }} {{
scope.row.createTime ? scope.row.createTime.replace("T", " ") : ""
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="status" label="任务状态">
prop="taskType" <template slot-scope="scope">
label="任务类型"> {{ scope.row.status >= 0 ? statusList[scope.row.status] : "" }}
</template>
</el-table-column>
<el-table-column prop="taskType" label="任务类型">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
scope.row.taskType === 0 scope.row.taskType === 0
? "缓存到窑炉加工" ? "入库到窑炉"
: scope.row.taskType === 1 : scope.row.taskType === 1
? "出炉到缓存" ? "入库到缓存"
: scope.row.taskType === 2 : scope.row.taskType === 2
? "缓存出库" ? "窑炉出库到缓存区"
: "入库缓存" : "缓存区出库"
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="startPosition" label="开始位置"> </el-table-column>
prop="startPosition" <el-table-column prop="targetPosition" label="目标位置">
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>
<el-table-column <el-table-column
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="80" width="80"
label="详情"> label="详情"
>
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -91,15 +83,38 @@
header-align="center" header-align="center"
align="center" align="center"
width="120" width="120"
label="操作"> label="操作"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)"> <el-button
<el-tooltip class="item" effect="dark" content="执行" placement="top"> type="text"
<icon-svg class="iconClass" name="维护开始"></icon-svg> :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-tooltip>
</el-button> </el-button>
<el-button type="text" v-if="!(scope.row.isAuto)" style="color:red" size="small" @click="deleteHandle(scope.row.sheetNo)"> <el-button
<el-tooltip class="item" effect="dark" content="删除" placement="top"> 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> <icon-svg class="iconClass" name="删除"></icon-svg>
</el-tooltip> </el-tooltip>
</el-button> </el-button>
@@ -113,111 +128,115 @@
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="pageSize" :page-size="pageSize"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
<script> <script>
// 任务状态列表 // 任务状态列表
const statusList = { const statusList = {
0: '等待执行', 0: '等待执行',
1: '执行中', 1: '执行中',
2: '执行完成', 2: '执行完成',
3: '追加后完成' 3: '追加后完成'
} }
export default { export default {
data () { data () {
return { return {
dataForm: { dataForm: {
vehicleId: '' vehicleId: ''
}, },
dataList: [], timer: '',
options: [], dataList: [],
pageIndex: 1, options: [],
pageSize: 10, pageIndex: 1,
totalPage: 0, pageSize: 10,
dataListLoading: false, totalPage: 0,
statusList 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() this.getDataList()
}, },
methods: { // 当前页
// 获取数据列表 currentChangeHandle (val) {
getDataList () { this.pageIndex = val
this.dataListLoading = true this.getDataList()
this.$http({ },
url: this.$http.adornUrl('/currTask/currentTaskNow'), Detail (id) {
method: 'post', this.$router.push({ name: 'order-current-task-detail', query: { id } })
data: this.$http.adornData({ },
'current': this.pageIndex, handTask () {
'size': this.pageSize, this.$router.push({ name: 'orderProcess' })
'vehicleId': this.dataForm.vehicleId },
// 执行
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}) => { } else {
if (data && data.code === 0) { this.$message.error(data.msg)
this.dataList = data.data.records }
this.totalPage = data.data.total })
} else { },
this.dataList = [] // 删除
this.totalPage = 0 deleteHandle (sheetNo) {
} this.$confirm(`确定对[生产单编号=${sheetNo}]进行删除操作?`, '提示', {
this.dataListLoading = false confirmButtonText: '确定',
}) cancelButtonText: '取消',
}, type: 'warning'
// 每页数 })
sizeChangeHandle (val) { .then(() => {
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(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('/currTask/deleteBySheetNo'), url: this.$http.adornUrl('/currTask/deleteBySheetNo'),
method: 'post', method: 'post',
data: this.$http.adornData(sheetNo) data: this.$http.adornData({sheetNo})
}).then(({data}) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
@@ -231,8 +250,12 @@
this.$message.error(data.msg) this.$message.error(data.msg)
} }
}) })
}).catch(() => {}) })
} .catch(() => {})
} }
},
beforeDestroy () {
clearInterval(this.timer)
} }
}
</script> </script>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,8 +1,8 @@
/* /*
* @Author: gtz * @Author: gtz
* @Date: 2021-11-19 10:10:52 * @Date: 2021-11-19 10:10:52
* @LastEditors: gtz * @LastEditors: zwq
* @LastEditTime: 2021-12-09 11:08:41 * @LastEditTime: 2022-07-07 10:51:22
* @Description: file content * @Description: file content
* @FilePath: \mt-qj-wms-ui\static\config\index-prod.js * @FilePath: \mt-qj-wms-ui\static\config\index-prod.js
*/ */
@@ -10,13 +10,14 @@
* 生产环境 * 生产环境
*/ */
;(function () { ;(function () {
window.SITE_CONFIG = {}; window.SITE_CONFIG = {}
// api接口请求地址 // api接口请求地址
window.SITE_CONFIG['baseUrl'] = '/api'; window.SITE_CONFIG['baseUrl'] = '/api'
window.SITE_CONFIG['wbUrl'] = '192.168.1.18:8080'
// cdn地址 = 域名 + 版本号 // cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './'; // 域名 window.SITE_CONFIG['domain'] = './' // 域名
window.SITE_CONFIG['version'] = ''; // 版本号(年月日时分) window.SITE_CONFIG['version'] = '' // 版本号(年月日时分)
window.SITE_CONFIG['cdnUrl'] = window.SITE_CONFIG.domain + window.SITE_CONFIG.version; window.SITE_CONFIG['cdnUrl'] = window.SITE_CONFIG.domain + window.SITE_CONFIG.version
})(); })()

View File

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

BIN
static/img/lu/BMA1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
static/img/lu/BMA2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
static/img/lu/BMA3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/img/lu/BMA4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
static/img/lu/BMB1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
static/img/lu/BMB2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
static/img/lu/BMB3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/img/lu/BMC1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
static/img/lu/BMC2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/img/lu/BMC3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/img/lu/BMC4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
static/img/lu/BMD.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
static/img/top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB