更新
This commit is contained in:
parent
6fed42bb11
commit
e5e5ae1281
@ -33,6 +33,9 @@
|
|||||||
<!-- <el-dropdown-item @click.native="setting = true">
|
<!-- <el-dropdown-item @click.native="setting = true">
|
||||||
<span>布局设置</span>
|
<span>布局设置</span>
|
||||||
</el-dropdown-item> -->
|
</el-dropdown-item> -->
|
||||||
|
<el-dropdown-item divided @click.native="alarmSet">
|
||||||
|
<span>{{alarmTip?'关闭报警':'打开报警'}}</span>
|
||||||
|
</el-dropdown-item>
|
||||||
<el-dropdown-item divided @click.native="logout">
|
<el-dropdown-item divided @click.native="logout">
|
||||||
<span>退出登录</span>
|
<span>退出登录</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
@ -64,6 +67,12 @@ export default {
|
|||||||
Search,
|
Search,
|
||||||
NotifyMessage
|
NotifyMessage
|
||||||
},
|
},
|
||||||
|
props:{
|
||||||
|
alarmTip:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'sidebar',
|
'sidebar',
|
||||||
@ -89,7 +98,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
nickname: ''
|
nickname: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -101,6 +110,9 @@ export default {
|
|||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
},
|
},
|
||||||
|
alarmSet(){
|
||||||
|
this.$emit('refreshAlarm');
|
||||||
|
},
|
||||||
async logout() {
|
async logout() {
|
||||||
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
|
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
:class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
|
:class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
|
||||||
class="main-container">
|
class="main-container">
|
||||||
<div :class="{ 'fixed-header': fixedHeader }">
|
<div :class="{ 'fixed-header': fixedHeader }">
|
||||||
<navbar />
|
<navbar @refreshAlarm="refreshAlarm" :alarm-tip="alarmTip" />
|
||||||
<tags-view v-if="needTagsView" />
|
<tags-view v-if="needTagsView" />
|
||||||
</div>
|
</div>
|
||||||
<app-main />
|
<app-main />
|
||||||
@ -82,6 +82,8 @@ export default {
|
|||||||
instance: {
|
instance: {
|
||||||
closed: true,
|
closed: true,
|
||||||
}, // 通知弹窗实例
|
}, // 通知弹窗实例
|
||||||
|
timer: null,
|
||||||
|
alarmTip: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -89,7 +91,6 @@ export default {
|
|||||||
axios
|
axios
|
||||||
.post('http://172.22.22.190/wcs-njlm/business/wcsTask/isonline')
|
.post('http://172.22.22.190/wcs-njlm/business/wcsTask/isonline')
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
|
||||||
if (res.data.code == 500) {
|
if (res.data.code == 500) {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '设备异常',
|
title: '设备异常',
|
||||||
@ -102,7 +103,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('There was an error!', error);
|
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '通知',
|
title: '通知',
|
||||||
message: '设备不在线,请稍后重试',
|
message: '设备不在线,请稍后重试',
|
||||||
@ -112,11 +112,22 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
refreshAlarm() {
|
||||||
|
if (this.alarmTip) {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.timer = null;
|
||||||
|
} else {
|
||||||
|
this.startFun();
|
||||||
|
}
|
||||||
|
this.alarmTip = !this.alarmTip;
|
||||||
|
},
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false });
|
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false });
|
||||||
},
|
},
|
||||||
startFun() {
|
startFun() {
|
||||||
setInterval(() => {
|
clearInterval(this.timer);
|
||||||
|
this.timer = null;
|
||||||
|
this.timer = setInterval(() => {
|
||||||
this.getRealAlarm();
|
this.getRealAlarm();
|
||||||
}, 10000);
|
}, 10000);
|
||||||
},
|
},
|
||||||
@ -149,6 +160,34 @@ export default {
|
|||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('There was an error!', error);
|
console.error('There was an error!', error);
|
||||||
});
|
});
|
||||||
|
axios
|
||||||
|
.post('http://172.22.22.14:8080/wcs-njlm/business/wcsTask/isAlarm')
|
||||||
|
.then((res) => {
|
||||||
|
res.data.forEach((item, index) => {
|
||||||
|
if (index < 4) {
|
||||||
|
if (item.code !== 0) {
|
||||||
|
this.$notify({
|
||||||
|
title: '异常',
|
||||||
|
message: item.msg,
|
||||||
|
type: 'warning',
|
||||||
|
duration: 8000,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (item.code > 30) {
|
||||||
|
this.$notify({
|
||||||
|
title: '异常',
|
||||||
|
message: item.msg,
|
||||||
|
type: 'warning',
|
||||||
|
duration: 9000,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('There was an error!', error);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-12-26 11:20:46
|
* @LastEditTime: 2025-01-07 15:48:54
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -214,7 +214,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>
|
<span>
|
||||||
{{
|
{{
|
||||||
scope.row.region ? regionArr[scope.row.region - 1].name : ''
|
scope.row.region ? regionArr.filter(item=>{return item.id===scope.row.region})[0].name: ''
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@ -624,6 +624,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
|
this.dataForm.warehouseId = '1698950657556340737'
|
||||||
this.urlOptions.createURL(this.dataForm).then((response) => {
|
this.urlOptions.createURL(this.dataForm).then((response) => {
|
||||||
if (response.data === -1) {
|
if (response.data === -1) {
|
||||||
this.$modal.msgWarning('排、列、层不能重复');
|
this.$modal.msgWarning('排、列、层不能重复');
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<el-table-column prop="region" label="发货区域" width="95">
|
<el-table-column prop="region" label="发货区域" width="95">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>
|
<span>
|
||||||
{{ regionArr.filter(item=>{return item.id===scope.row.region})[0].name }}
|
{{ scope.row.region?regionArr.filter(item=>{return item.id===scope.row.region})[0].name:'-' }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -142,6 +142,7 @@ export default {
|
|||||||
deliveryType,
|
deliveryType,
|
||||||
trayType,
|
trayType,
|
||||||
region,
|
region,
|
||||||
|
regionArr,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
|
@ -185,20 +185,20 @@ const mainTaskState = [
|
|||||||
];
|
];
|
||||||
const stackerArr = [
|
const stackerArr = [
|
||||||
{
|
{
|
||||||
name: 'DDJ1',
|
name: 'DDJ5',
|
||||||
id: 1,
|
id: 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'DDJ2',
|
name: 'DDJ6',
|
||||||
id: 2,
|
id: 6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'DDJ3',
|
name: 'DDJ7',
|
||||||
id: 3,
|
id: 7,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'DDJ4',
|
name: 'DDJ8',
|
||||||
id: 4,
|
id: 8,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
export default {
|
export default {
|
||||||
|
@ -112,6 +112,14 @@ const tableProps = [
|
|||||||
prop: 'grade',
|
prop: 'grade',
|
||||||
label: '品质',
|
label: '品质',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'cpGrade',
|
||||||
|
label: '质检初判',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'fpGrade',
|
||||||
|
label: '质检复判',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'bugCode',
|
prop: 'bugCode',
|
||||||
label: '复判缺陷',
|
label: '复判缺陷',
|
||||||
@ -193,6 +201,18 @@ export default {
|
|||||||
placeholder: '品质',
|
placeholder: '品质',
|
||||||
param: 'grade',
|
param: 'grade',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '质检初判',
|
||||||
|
placeholder: '质检初判',
|
||||||
|
param: 'cpGrade',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '质检复判',
|
||||||
|
placeholder: '质检复判',
|
||||||
|
param: 'fpGrade',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '入库单号',
|
label: '入库单号',
|
||||||
@ -243,6 +263,8 @@ export default {
|
|||||||
this.listQuery.rollCode = val.rollCode.trim() || null;
|
this.listQuery.rollCode = val.rollCode.trim() || null;
|
||||||
this.listQuery.productName = val.productName.trim() || null;
|
this.listQuery.productName = val.productName.trim() || null;
|
||||||
this.listQuery.grade = val.grade.trim() || null;
|
this.listQuery.grade = val.grade.trim() || null;
|
||||||
|
this.listQuery.cpGrade = val.cpGrade.trim() || null;
|
||||||
|
this.listQuery.fpGrade = val.fpGrade.trim() || null;
|
||||||
this.listQuery.workOrderCode = val.workOrderCode.trim() || null;
|
this.listQuery.workOrderCode = val.workOrderCode.trim() || null;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||||
|
@ -112,6 +112,14 @@ const tableProps = [
|
|||||||
prop: 'grade',
|
prop: 'grade',
|
||||||
label: '品质',
|
label: '品质',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'cpGrade',
|
||||||
|
label: '质检初判',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'fpGrade',
|
||||||
|
label: '质检复判',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'bugCode',
|
prop: 'bugCode',
|
||||||
label: '复判缺陷',
|
label: '复判缺陷',
|
||||||
@ -193,6 +201,18 @@ export default {
|
|||||||
placeholder: '品质',
|
placeholder: '品质',
|
||||||
param: 'grade',
|
param: 'grade',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '质检初判',
|
||||||
|
placeholder: '质检初判',
|
||||||
|
param: 'cpGrade',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '质检复判',
|
||||||
|
placeholder: '质检复判',
|
||||||
|
param: 'fpGrade',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '入库单号',
|
label: '入库单号',
|
||||||
@ -244,6 +264,8 @@ export default {
|
|||||||
this.listQuery.rollCode = val.rollCode.trim() || null;
|
this.listQuery.rollCode = val.rollCode.trim() || null;
|
||||||
this.listQuery.productName = val.productName.trim() || null;
|
this.listQuery.productName = val.productName.trim() || null;
|
||||||
this.listQuery.grade = val.grade.trim() || null;
|
this.listQuery.grade = val.grade.trim() || null;
|
||||||
|
this.listQuery.cpGrade = val.cpGrade.trim() || null;
|
||||||
|
this.listQuery.fpGrade = val.fpGrade.trim() || null;
|
||||||
this.listQuery.workOrderCode = val.workOrderCode.trim() || null;
|
this.listQuery.workOrderCode = val.workOrderCode.trim() || null;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||||
|
192
src/views/wcsAlarm/real1.vue
Normal file
192
src/views/wcsAlarm/real1.vue
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2024-05-21 14:25:27
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-01-09 10:07:00
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="main-body">
|
||||||
|
<el-divider content-position="left">堆垛机报警信息</el-divider>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col v-for="i in 4" :key="i + 'ddj'" :span="6">
|
||||||
|
<el-card class="box-card" style="min-width: 240px">
|
||||||
|
<div slot="header" class="header-card">
|
||||||
|
堆垛机:
|
||||||
|
<div class="info">
|
||||||
|
{{ Info[i - 1].name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
报警信息:
|
||||||
|
<div class="info">
|
||||||
|
{{ Info[i - 1].msg }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
报警编码:
|
||||||
|
<div class="info">
|
||||||
|
{{ Info[i - 1].code }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="blinking-warning" v-if="Info[i - 1].code !== 0" />
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-divider content-position="left">1-2巷道输送线报警信息</el-divider>
|
||||||
|
<el-row :gutter="20" v-for="l in 2" :key="l + 'line1'">
|
||||||
|
<el-col v-for="i in 6" :key="i + 'ssx1'" :span="4">
|
||||||
|
<el-card class="box-card" style="min-width: 240px">
|
||||||
|
<div slot="header" class="header-card">
|
||||||
|
输送线:
|
||||||
|
<div class="info">
|
||||||
|
{{ Info[i - 1 + 4 + (l - 1) * 6].name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
报警信息:
|
||||||
|
<div class="info">{{ Info[i - 1 + 4 + (l - 1) * 6].msg }}</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
报警编码:
|
||||||
|
<div class="info">{{ Info[i - 1 + 4 + (l - 1) * 6].code }}</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="blinking-warning"
|
||||||
|
v-if="Info[i - 1 + 4 + (l - 1) * 6].code > 30" />
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-divider content-position="left">3-4巷道输送线报警信息</el-divider>
|
||||||
|
<el-row :gutter="20" v-for="l in 2" :key="l + 'line2'">
|
||||||
|
<el-col v-for="i in 6" :key="i + 'ssx2'" :span="4">
|
||||||
|
<el-card class="box-card" style="min-width: 240px">
|
||||||
|
<div slot="header" class="header-card">
|
||||||
|
输送线:
|
||||||
|
<div class="info">
|
||||||
|
{{ Info[i - 1 + 4 + (l + 1) * 6].name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
报警信息:
|
||||||
|
<div class="info">{{ Info[i - 1 + 4 + (l + 1) * 6].msg }}</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
报警编码:
|
||||||
|
<div class="info">{{ Info[i - 1 + 4 + (l + 1) * 6].code }}</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="blinking-warning"
|
||||||
|
v-if="Info[i - 1 + 4 + (l + 1) * 6].code > 30" />
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-divider content-position="left">检尺门报警信息</el-divider>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col v-for="i in 4" :key="i + 'jcm'" :span="6">
|
||||||
|
<el-card class="box-card" style="min-width: 240px">
|
||||||
|
<div slot="header" class="header-card">
|
||||||
|
检尺门:
|
||||||
|
<div class="info">
|
||||||
|
{{ Info[i - 1 + 4 + 24].name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
报警信息:
|
||||||
|
<div class="info">
|
||||||
|
{{ Info[i - 1 + 4 + 24].msg }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
报警编码:
|
||||||
|
<div class="info">
|
||||||
|
{{ Info[i - 1 + 4 + 24].code }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="blinking-warning" v-if="Info[i - 1 + 4 + 24].code > 30" />
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from 'axios';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
Info: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getInfo();
|
||||||
|
this.startFun();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
startFun() {
|
||||||
|
const timer = setInterval(() => {
|
||||||
|
this.getInfo();
|
||||||
|
}, 10000);
|
||||||
|
this.$once('hook:beforeDestroy', () => {
|
||||||
|
clearInterval(timer);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getInfo() {
|
||||||
|
axios
|
||||||
|
.post(' http://172.22.22.14:8080/wcs-njlm/business/wcsTask/isAlarm')
|
||||||
|
.then((res) => {
|
||||||
|
console.log('实时报警')
|
||||||
|
console.log(res.data)
|
||||||
|
this.Info = res.data
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('There was an error!', error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.main-body {
|
||||||
|
::v-deep .el-card__header {
|
||||||
|
padding: 5px 20px;
|
||||||
|
min-height: 25px;
|
||||||
|
}
|
||||||
|
::v-deep .el-card__body {
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
.box-card {
|
||||||
|
font-size: 15px;
|
||||||
|
position: relative;
|
||||||
|
.header-card {
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
.info {
|
||||||
|
color: #409eff;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.blinking-warning {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: #ff0000; /* 红色背景 */
|
||||||
|
animation: blinkWarning 1s infinite; /* 动画名称和持续时间 */
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blinkWarning {
|
||||||
|
0% {
|
||||||
|
opacity: 0.7; /* 开始状态:不透明 */
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 0; /* 中间状态:完全透明 */
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 0.7; /* 结束状态:不透明 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user