修改bug #12

Merged
zwq merged 1 commits from zwq into master 2022-03-18 15:18:11 +08:00
5 changed files with 67 additions and 31 deletions
Showing only changes of commit f4f26474d4 - Show all commits

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2021-11-15 15:17:30 * @Date: 2021-11-15 15:17:30
* @LastEditors: gtz * @LastEditors: zwq
* @LastEditTime: 2021-12-21 15:33:40 * @LastEditTime: 2022-03-18 15:00:32
* @Description: * @Description:
--> -->
<template> <template>
@ -36,7 +36,7 @@
<el-row :gutter="30" style="padding: 20px;"> <el-row :gutter="30" style="padding: 20px;">
<el-col class="footer-item-container" :span="6" v-for="count in 4" :key="count"> <el-col class="footer-item-container" :span="6" v-for="count in 4" :key="count">
<el-card class="footer-item-box base-container" @click.native="selectPlat(count)"> <el-card class="footer-item-box base-container" @click.native="selectPlat(count)">
<div class="plat" style="font-size: 24px">提升{{ count }}</div> <div class="plat" style="font-size: 24px">液压{{ count }}</div>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
@ -105,7 +105,7 @@ export default {
url: this.$http.adornUrl('/outStock/runOutTask'), url: this.$http.adornUrl('/outStock/runOutTask'),
method: 'post', method: 'post',
data: this.$http.adornData({ data: this.$http.adornData({
code: count, code: 'YYT00' + count,
localtionId: this.isActive localtionId: this.isActive
}) })
}).then(({data}) => { }).then(({data}) => {

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-06 16:47:31 * @LastEditTime: 2022-03-18 14:48:46
* @Description: * @Description:
--> -->
<template> <template>
@ -39,7 +39,9 @@
}, },
data () { data () {
return { return {
loading: false loading: false,
websock: '',
url: ''
} }
}, },
components: { components: {
@ -65,7 +67,10 @@
} }
}, },
created () { created () {
const baseurl = window.SITE_CONFIG.baseUrl
this.url = baseurl.slice(5)
this.getUserInfo() this.getUserInfo()
this.initWebSocket()
}, },
mounted () { mounted () {
this.resetDocumentClientHeight() this.resetDocumentClientHeight()
@ -91,6 +96,33 @@
// this.userName = data.user.username // this.userName = data.user.username
// } // }
// }) // })
},
initWebSocket () { // weosocket
const path = `ws:${this.url}/qj/websocket/${'id'}`
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())
},
websocketonerror () { //
this.initWebSocket()
},
websocketonmessage (e) { //
this.$notify.info({
title: '提示',
message: e.data,
duration: 15000
})
},
websocketsend () { //
this.websock.send()
},
websocketclose (e) { //
console.log('断开连接', e)
} }
} }
} }

View File

@ -186,11 +186,6 @@
}, },
// //
addOrUpdateHandle (id) { addOrUpdateHandle (id) {
this.$confirm(`确定对[任务id=${id}]进行删除操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('/currTask/runTask'), url: this.$http.adornUrl('/currTask/runTask'),
method: 'post', method: 'post',
@ -210,7 +205,6 @@
this.$message.error(data.msg) this.$message.error(data.msg)
} }
}) })
}).catch(() => {})
}, },
// //
deleteHandle (sheetNo) { deleteHandle (sheetNo) {

View File

@ -44,6 +44,11 @@
prop="equipmentName" prop="equipmentName"
label="车辆名称"> label="车辆名称">
</el-table-column> </el-table-column>
<el-table-column
prop="taskCode"
label="任务编码"
>
</el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="createTime"
label="报警时间"> label="报警时间">

View File

@ -48,6 +48,11 @@
label="窑炉名称" label="窑炉名称"
> >
</el-table-column> </el-table-column>
<el-table-column
prop="taskCode"
label="任务编码"
>
</el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="createTime"
label="报警时间" label="报警时间"
@ -57,7 +62,7 @@
prop="time" prop="time"
label="报警级别" label="报警级别"
> --> > -->
</el-table-column> <!-- </el-table-column> -->
<el-table-column <el-table-column
prop="alarmInfo" prop="alarmInfo"
label="报警内容" label="报警内容"