工艺&设备 #10

Merged
juzi merged 1 commits from zjl into master 2023-02-23 16:56:57 +08:00
34 changed files with 192 additions and 138 deletions
Showing only changes of commit 2f8b5eb8a1 - Show all commits

1
dist/css/3101.e4d7b530.css vendored Normal file
View File

@ -0,0 +1 @@
.main-box[data-v-7a447aa0]{width:100%;padding:0 6px 0 16px}.main-box .left-box[data-v-7a447aa0]{padding-top:16px;border-radius:8px;background-color:#fff}.main-box .right-bottom[data-v-7a447aa0],.main-box .top-left[data-v-7a447aa0],.main-box .top-right[data-v-7a447aa0]{padding:16px 10px 0;border-radius:8px;background-color:#fff}.main-box .left-box[data-v-7a447aa0]{overflow-y:auto;height:calc(100vh - 204px)}.main-box .right-bottom[data-v-7a447aa0],.main-box .top-left[data-v-7a447aa0],.main-box .top-right[data-v-7a447aa0]{height:calc(50vh - 107px)}.main-box .top-left .title[data-v-7a447aa0],.main-box .top-right .title[data-v-7a447aa0]{display:inline-block;margin-right:8px;margin-bottom:22px}.main-box .top-left .title[data-v-7a447aa0]:before,.main-box .top-right .title[data-v-7a447aa0]:before{content:"";display:inline-block;width:4px;height:16px;background:#0b58ff;border-radius:1px;margin-right:8px;vertical-align:middle}.main-box .top-left .icon-style[data-v-7a447aa0],.main-box .top-right .icon-style[data-v-7a447aa0]{font-size:14px;margin-left:18px;cursor:pointer}.main-box .right-bottom[data-v-7a447aa0]{margin-top:10px}

View File

@ -1 +0,0 @@
.processMonitoring .bottom-box[data-v-6b1af1bb],.processMonitoring .top-box[data-v-6b1af1bb]{margin:8px 16px;background-color:#fff;border-radius:8px}.processMonitoring .bottom-box[data-v-6b1af1bb]{padding:16px;height:calc(100vh - 218px)}.processMonitoring .bottom-box .title-box[data-v-6b1af1bb]{margin-bottom:16px}.processMonitoring .bottom-box .title[data-v-6b1af1bb]:before{content:"";display:inline-block;width:4px;height:16px;background-color:#0b58ff;vertical-align:middle;margin-right:8px}.processMonitoring .top-box[data-v-6b1af1bb]{padding:10px 16px 1px}.processMonitoring .top-box .top-search1[data-v-6b1af1bb],.processMonitoring .top-box .top-search2[data-v-6b1af1bb]{display:inline-block}.processMonitoring .top-box .top-search1[data-v-6b1af1bb]{height:50px;padding-top:5px;vertical-align:bottom;margin-right:24px}

View File

@ -1 +0,0 @@
.main-box[data-v-8a08693c]{width:100%;padding:0 6px 0 16px}.main-box .left-box[data-v-8a08693c]{height:calc(100vh - 204px);padding:16px;border-radius:8px;background-color:#fff}.main-box .rigth-top[data-v-8a08693c]{margin-bottom:10px}.main-box .right-bottom[data-v-8a08693c],.main-box .rigth-top[data-v-8a08693c]{background-color:#fff;height:calc(50vh - 107px);border-radius:8px;padding:16px}.main-box .title[data-v-8a08693c]{display:inline-block;margin-right:8px;margin-bottom:22px}.main-box .title[data-v-8a08693c]:before{content:"";display:inline-block;width:4px;height:16px;background:#0b58ff;border-radius:1px;margin-right:8px;vertical-align:middle}

View File

@ -1 +0,0 @@
.main-box[data-v-216944f8]{width:100%;padding:0 6px 0 16px}.main-box .left-box[data-v-216944f8]{width:100%;padding:16px 16px 0;border-radius:8px;background-color:#fff;overflow:auto;height:calc(100vh - 147px);margin-top:8px}.main-box .right-top[data-v-216944f8]{padding:8px 16px 0;border-radius:8px;background-color:#fff;overflow-y:auto;height:62px;margin-top:8px;margin-bottom:8px}.main-box .right-top .top-search1[data-v-216944f8],.main-box .right-top .top-search2[data-v-216944f8]{display:inline-block}.main-box .right-top .top-search1[data-v-216944f8]{height:50px;padding-top:5px;vertical-align:bottom;margin-right:24px}.main-box .right-bottom[data-v-216944f8]{padding:16px 16px 0;border-radius:8px;background-color:#fff;overflow-y:auto;height:calc(100vh - 218px)}.main-box .right-bottom .title-box[data-v-216944f8]{margin-bottom:16px}.main-box .right-bottom .title[data-v-216944f8]:before{content:"";display:inline-block;width:4px;height:16px;background-color:#0b58ff;vertical-align:middle;margin-right:8px}

1
dist/css/4750.572b21b0.css vendored Normal file
View File

@ -0,0 +1 @@
.processMonitoring .bottom-box[data-v-bcfbbbf2],.processMonitoring .top-box[data-v-bcfbbbf2]{margin:8px 16px;background-color:#fff;border-radius:8px}.processMonitoring .bottom-box[data-v-bcfbbbf2]{padding:16px;height:calc(100vh - 218px)}.processMonitoring .bottom-box .title-box[data-v-bcfbbbf2]{margin-bottom:16px}.processMonitoring .bottom-box .title[data-v-bcfbbbf2]:before{content:"";display:inline-block;width:4px;height:16px;background-color:#0b58ff;vertical-align:middle;margin-right:8px}.processMonitoring .top-box[data-v-bcfbbbf2]{padding:10px 16px 1px}.processMonitoring .top-box .top-search1[data-v-bcfbbbf2],.processMonitoring .top-box .top-search2[data-v-bcfbbbf2]{display:inline-block}.processMonitoring .top-box .top-search1[data-v-bcfbbbf2]{height:50px;padding-top:5px;vertical-align:bottom;margin-right:24px}

1
dist/css/5067.0b4115dc.css vendored Normal file
View File

@ -0,0 +1 @@
.main-box[data-v-86c9b5c0]{width:100%;padding:0 6px 0 16px}.main-box .left-box[data-v-86c9b5c0]{height:calc(100vh - 204px);padding:16px;border-radius:8px;background-color:#fff}.main-box .rigth-top[data-v-86c9b5c0]{margin-bottom:10px}.main-box .right-bottom[data-v-86c9b5c0],.main-box .rigth-top[data-v-86c9b5c0]{background-color:#fff;height:calc(50vh - 107px);border-radius:8px;padding:16px}.main-box .title[data-v-86c9b5c0]{display:inline-block;margin-right:8px;margin-bottom:22px}.main-box .title[data-v-86c9b5c0]:before{content:"";display:inline-block;width:4px;height:16px;background:#0b58ff;border-radius:1px;margin-right:8px;vertical-align:middle}

View File

@ -1 +0,0 @@
.main-box[data-v-1e98e26f]{width:100%;padding:0 6px 0 16px}.main-box .left-box[data-v-1e98e26f]{padding-top:16px;border-radius:8px;background-color:#fff}.main-box .right-bottom[data-v-1e98e26f],.main-box .top-left[data-v-1e98e26f],.main-box .top-right[data-v-1e98e26f]{padding:16px 10px 0;border-radius:8px;background-color:#fff}.main-box .left-box[data-v-1e98e26f]{overflow-y:auto;height:calc(100vh - 204px)}.main-box .right-bottom[data-v-1e98e26f],.main-box .top-left[data-v-1e98e26f],.main-box .top-right[data-v-1e98e26f]{height:calc(50vh - 107px)}.main-box .top-left .title[data-v-1e98e26f],.main-box .top-right .title[data-v-1e98e26f]{display:inline-block;margin-right:8px;margin-bottom:22px}.main-box .top-left .title[data-v-1e98e26f]:before,.main-box .top-right .title[data-v-1e98e26f]:before{content:"";display:inline-block;width:4px;height:16px;background:#0b58ff;border-radius:1px;margin-right:8px;vertical-align:middle}.main-box .top-left .icon-style[data-v-1e98e26f],.main-box .top-right .icon-style[data-v-1e98e26f]{font-size:14px;margin-left:18px;cursor:pointer}.main-box .right-bottom[data-v-1e98e26f]{margin-top:10px}

1
dist/css/9881.9c17623c.css vendored Normal file
View File

@ -0,0 +1 @@
.main-box[data-v-706c4fb9]{width:100%;padding:0 6px 0 16px}.main-box .left-box[data-v-706c4fb9]{width:100%;padding:16px 16px 0;border-radius:8px;background-color:#fff;overflow:auto;height:calc(100vh - 147px);margin-top:8px}.main-box .right-top[data-v-706c4fb9]{padding:8px 16px 0;border-radius:8px;background-color:#fff;overflow-y:auto;height:62px;margin-top:8px;margin-bottom:8px}.main-box .right-top .top-search1[data-v-706c4fb9],.main-box .right-top .top-search2[data-v-706c4fb9]{display:inline-block}.main-box .right-top .top-search1[data-v-706c4fb9]{height:50px;padding-top:5px;vertical-align:bottom;margin-right:24px}.main-box .right-bottom[data-v-706c4fb9]{padding:16px 16px 0;border-radius:8px;background-color:#fff;overflow-y:auto;height:calc(100vh - 218px)}.main-box .right-bottom .title-box[data-v-706c4fb9]{margin-bottom:16px}.main-box .right-bottom .title[data-v-706c4fb9]:before{content:"";display:inline-block;width:4px;height:16px;background-color:#0b58ff;vertical-align:middle;margin-right:8px}

2
dist/index.html vendored
View File

@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>tft-mes</title><script defer="defer" src="/js/chunk-vendors.a42f8636.js"></script><script defer="defer" src="/js/app.cbc70e1b.js"></script><link href="/css/app.68cbc19b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but tft-mes doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>tft-mes</title><script defer="defer" src="/js/chunk-vendors.a42f8636.js"></script><script defer="defer" src="/js/app.9320babc.js"></script><link href="/css/app.68cbc19b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but tft-mes doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

View File

@ -1 +0,0 @@
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[1486],{1486:function(n,t,e){e.r(t),e.d(t,{default:function(){return c}});var u=function(){var n=this;n._self._c;return n._m(0)},r=[function(){var n=this,t=n._self._c;return t("div",[t("span",[n._v("报工管理,该功能目前还未开放")])])}],s={name:"WorkReportManagement"},f=s,l=e(1001),a=(0,l.Z)(f,u,r,!1,null,null,null),c=a.exports}}]);

View File

@ -1 +0,0 @@
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[1857],{1857:function(e,t,n){n.r(t),n.d(t,{default:function(){return c}});var u=function(){var e=this,t=e._self._c;return t("div",[e._v("暂时不做")])},l=[],r={name:"VehicleManagement",data(){return{split1:.5}}},s=r,a=n(1001),f=(0,a.Z)(s,u,l,!1,null,null,null),c=f.exports}}]);

View File

@ -1 +0,0 @@
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[207],{207:function(n,t,e){e.r(t),e.d(t,{default:function(){return c}});var u=function(){var n=this;n._self._c;return n._m(0)},s=[function(){var n=this,t=n._self._c;return t("div",[t("span",[n._v("设备登记,不做")])])}],r={name:"DeviceRegistration"},f=r,i=e(1001),l=(0,i.Z)(f,u,s,!1,null,null,null),c=l.exports}}]);

View File

@ -1 +1 @@
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[3101],{3101:function(e,t,n){n.r(t),n.d(t,{default:function(){return m}});var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"maintenance-management"},[t("el-menu",{attrs:{"default-active":e.activeName,mode:"horizontal"},on:{select:e.handleSelect}},[t("el-menu-item",{attrs:{index:"plannedMaintenance"}},[e._v("计划维护")]),t("el-menu-item",{attrs:{index:"selfMaintenance"}},[e._v("自主维护")])],1),t("section",[t("router-view")],1)],1)},i=[],s={name:"MaintenanceManagement",data(){return{activeName:""}},mounted(){this.activeName=this.$route.name},methods:{handleSelect(e){this.$router.push({name:e})}},watch:{$route:{handler:function(e){this.activeName=e.name}}}},u=s,l=n(1001),c=(0,l.Z)(u,a,i,!1,null,null,null),m=c.exports}}]);
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[2765],{2765:function(e,t,n){n.r(t),n.d(t,{default:function(){return m}});var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"maintenance-management"},[t("el-menu",{attrs:{"default-active":e.activeName,mode:"horizontal"},on:{select:e.handleSelect}},[t("el-menu-item",{attrs:{index:"plannedMaintenance"}},[e._v("计划维护")]),t("el-menu-item",{attrs:{index:"selfMaintenance"}},[e._v("自主维护")])],1),t("section",[t("router-view")],1)],1)},i=[],s={name:"MaintenanceManagement",data(){return{activeName:""}},mounted(){this.activeName=this.$route.name},methods:{handleSelect(e){this.$router.push({name:e})}},watch:{$route:{handler:function(e){this.activeName=e.name}}}},u=s,l=n(1001),c=(0,l.Z)(u,a,i,!1,null,null,null),m=c.exports}}]);

View File

@ -1 +0,0 @@
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[2979],{2979:function(n,t,e){e.r(t),e.d(t,{default:function(){return a}});var u=function(){var n=this;n._self._c;return n._m(0)},s=[function(){var n=this,t=n._self._c;return t("div",[t("span",[n._v("任务调度,该功能暂未开放")])])}],l={name:"TaskDcheduling"},r=l,f=e(1001),c=(0,f.Z)(r,u,s,!1,null,null,null),a=c.exports}}]);

1
dist/js/3101.d040dc0a.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[3829],{3829:function(t,n,s){s.r(n),s.d(n,{default:function(){return i}});var e=function(){var t=this;t._self._c;return t._m(0)},u=[function(){var t=this,n=t._self._c;return n("div",[n("span",[t._v("统计分析")])])}],l={name:"StatisticalAnalysis"},r=l,a=s(1001),f=(0,a.Z)(r,e,u,!1,null,null,null),i=f.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/js/4750.10fe98ea.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/js/5067.beaa119f.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/js/9809.1735a343.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/js/9881.b110795d.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/js/app.9320babc.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -95,23 +95,23 @@ export const routes = [
component: () =>
import('../views/productionScheduling/workOrderManagement')
},
{
path: 'workReportManagement',
name: 'workReportManagement',
meta: {
title: '报工管理'
},
component: () =>
import('../views/productionScheduling/workReportManagement')
},
{
path: 'taskDcheduling',
name: 'taskDcheduling',
meta: {
title: '任务调度'
},
component: () => import('../views/productionScheduling/taskDcheduling')
},
// {
// path: 'workReportManagement',
// name: 'workReportManagement',
// meta: {
// title: '报工管理'
// },
// component: () =>
// import('../views/productionScheduling/workReportManagement')
// },
// {
// path: 'taskDcheduling',
// name: 'taskDcheduling',
// meta: {
// title: '任务调度'
// },
// component: () => import('../views/productionScheduling/taskDcheduling')
// },
{
path: 'generateReports',
name: 'generateReports',
@ -186,14 +186,14 @@ export const routes = [
title: '设备管理'
},
children: [
{
path: 'vehicleManagement',
name: 'vehicleManagement',
meta: {
title: '载具管理'
},
component: () => import('../views/deviceManagement/vehicleManagement')
},
// {
// path: 'vehicleManagement',
// name: 'vehicleManagement',
// meta: {
// title: '载具管理'
// },
// component: () => import('../views/deviceManagement/vehicleManagement')
// },
{
path: 'performanceAnalysis',
name: 'performanceAnalysis',
@ -337,15 +337,15 @@ export const routes = [
import('../views/deviceManagement/alarmInformation/historyAlarm')
}
]
},
{
path: 'deviceRegistration',
name: 'deviceRegistration',
meta: {
title: '设备登记'
},
component: () => import('../views/deviceManagement/deviceRegistration')
}
// {
// path: 'deviceRegistration',
// name: 'deviceRegistration',
// meta: {
// title: '设备登记'
// },
// component: () => import('../views/deviceManagement/deviceRegistration')
// }
]
},
{
@ -492,15 +492,15 @@ export const routes = [
}
]
},
{
path: 'statisticalAnalysis',
name: 'statisticalAnalysis',
meta: {
title: '统计分析'
},
component: () =>
import('../views/qualityManagement/statisticalAnalysis')
},
// {
// path: 'statisticalAnalysis',
// name: 'statisticalAnalysis',
// meta: {
// title: '统计分析'
// },
// component: () =>
// import('../views/qualityManagement/statisticalAnalysis')
// },
{
path: 'productTraceability',
name: 'productTraceability',

View File

@ -58,6 +58,7 @@ import {
palletIndicatorGetType
} from '@/api/deviceManagement'
import { timeFormatter } from '@/utils'
import moment from 'moment'
const tableProps = [
{
prop: 'proLineName',
@ -143,12 +144,15 @@ export default {
{
type: 'datePicker',
label: '产品上片时间',
dateType: 'datetime',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
placeholder: '产品上片时间',
param: 'testTime',
width: 200
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
defaultSelect: [],
width: 350
},
{
type: 'button',
@ -160,7 +164,9 @@ export default {
listQuery: {
current: 1,
size: 20,
palletId: ''
palletId: '',
startTime: '',
endTime: ''
},
total: 0,
tableProps,
@ -181,53 +187,69 @@ export default {
this.tableH = tableHeight(330)
this.tableH2 = tableHeight(360) / 2
})
this.getList()
this.formConfig[1].defaultSelect = [
moment().format('yyyy-MM-DD') + 'T00:00:00',
moment().format('yyyy-MM-DD') + 'T23:59:59'
]
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
},
methods: {
getList() {
palletIndicatorAnalysisPage({ ...this.listQuery }).then((res) => {
this.tableData = res.data.records
this.total = res.data.total
this.setCurrent()
let palletId = this.tableData[0].palletId
this.getLevel(palletId)
})
},
setCurrent() {
let _this = this
setTimeout(function () {
_this.$refs.palletTable1.setCurrent('palletTable', 0)
}, 500)
if (this.listQuery.palletId) {
palletIndicatorAnalysisPage({ ...this.listQuery }).then((res) => {
this.tableData = res.data.records
this.total = res.data.total
})
this.getLevel()
} else {
this.$message.error('请先输入托盘id后再查询')
}
},
getLevel() {
// ID
palletIndicatorGetType({ id: 1 }).then((res) => {
palletIndicatorGetType({
palletId: this.listQuery.palletId,
startTime: this.listQuery.startTime,
endTime: this.listQuery.endTime
}).then((res) => {
this.tableData2 = []
if (res.code === 0) {
const data = res.data
this.chartMsg = data
console.log(this.chartMsg)
let obj = {}
obj.productType = '良品'
obj.num = data.okNum
obj.percentage = data.okPercentage
this.tableData2.push(obj)
let obj2 = {}
obj2.productType = '待再加工'
obj2.num = data.reprocessNum
obj2.percentage = data.rePercentage
this.tableData2.push(obj2)
let obj3 = {}
obj3.productType = '废品'
obj3.num = data.wasteNum
obj3.percentage = data.noPercentage
this.tableData2.push(obj3)
let arr = [
{ name: '良品', num: 'okNum', percentage: 'okPercentage' },
{
name: '待再加工',
num: 'reprocessNum',
percentage: 'rePercentage'
},
{ name: '废品', num: 'wasteNum', percentage: 'noPercentage' },
{ name: '抽检', num: 'checkNum', percentage: 'checkPercentage' },
{ name: '废弃', num: 'scrapNum', percentage: 'scrapPercentage' },
{ name: '碎片', num: 'chipNum', percentage: 'checkPercentage' },
{
name: '次良品',
num: 'inferiorNum',
percentage: 'inferiorPercentage'
}
]
for (let i = 0; i < 7; i++) {
let obj = {}
obj.productType = arr[i].name
obj.num = data[arr[i].num]
obj.percentage = data[arr[i].percentage]
this.tableData2.push(obj)
}
}
})
},
buttonClick(val) {
if (val.btnName === 'search') {
this.listQuery.palletId = val.palletId
this.listQuery.startTime = val.timeVal ? val.timeVal[0] : ''
this.listQuery.endTime = val.timeVal ? val.timeVal[1] : ''
this.getList()
}
},

View File

@ -98,7 +98,7 @@ import {
} from '@/api/deviceManagement'
import productPowerEdit from './../components/productPowerEdit.vue'
import deviceOeeLine from './../components/deviceOeeLine.vue'
import moment from 'moment'
// import moment from 'moment'
const tableProps = [
{
prop: 'date',
@ -185,7 +185,6 @@ export default {
placeholder: '月份选择',
param: 'timePosition',
defaultSelect: '',
pickerOptions: {},
width: 200
},
{
@ -215,7 +214,6 @@ export default {
window.addEventListener('resize', () => {
this.tableH = tableHeight(214) / 2 - 75
})
this.getMonth()
this.setDefaultVal()
this.getTree()
},
@ -242,27 +240,6 @@ export default {
this.getPlan()
})
},
getMonth() {
let arr = [
'2022-03',
'2022-05',
'2022-06',
'2022-08',
'2022-11',
'2023-01',
'2022-03'
]
this.formConfig[0].pickerOptions = {
disabledDate(date) {
for (let i = 0; i < arr.length; i++) {
if (moment(date).format('YYYY-MM') === arr[i]) {
return false
}
}
return true
}
}
},
getList() {
// OEE
performanceAnalysisGet({ ...this.listQuery }).then((res) => {

View File

@ -40,22 +40,31 @@
:table-data="tableData"
:max-height="tableH"
/>
<pagination
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
:total="total"
@pagination="getReal"
/>
</div>
</el-col>
</el-row>
</template>
<script>
import { tableHeight, timeFormatter } from '@/utils/index'
import { tableHeight, timeFormatter, publicFormatter } from '@/utils/index'
import { getTreeData } from '@/api/app'
import { getAlarmReal, getAlarmHis } from '@/api/processManagement'
import moment from 'moment'
const tableProps = [
{
prop: 'paramName',
label: '工艺参数'
label: '工艺参数',
showOverflowtooltip: true
},
{
prop: 'variableName',
label: '变量名称'
label: '变量名称',
showOverflowtooltip: true
},
{
prop: 'eqName',
@ -81,7 +90,8 @@ const tableProps = [
{
prop: 'alarmType',
label: '报警类型',
width: 100
width: 100,
filter: publicFormatter('alarmTypeVoList')
},
{
prop: 'alarmLimit',
@ -133,7 +143,7 @@ export default {
total: 0,
listQuery: {
current: 1,
size: 1000,
size: 20,
equipmentId: null,
proLineId: null,
unitId: null,
@ -146,8 +156,14 @@ export default {
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(300)
this.tableH = tableHeight(340)
})
this.formConfig[0].defaultSelect = [
moment().format('yyyy-MM-DD') + 'T00:00:00',
moment().format('yyyy-MM-DD') + 'T23:59:59'
]
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
this.getTree()
this.getReal()
},
@ -161,6 +177,7 @@ export default {
getAlarmReal({ ...this.listQuery }).then((res) => {
if (res.code === 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
@ -168,6 +185,7 @@ export default {
getAlarmHis({ ...this.listQuery }).then((res) => {
if (res.code === 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
@ -195,10 +213,11 @@ export default {
console.log(val)
if (val === '实时数据') {
this.tableData = []
this.total = 0
this.getReal()
} else if (val === '历史数据') {
this.tableData = []
console.log(this.listQuery)
this.total = 0
}
},
buttonClick(val) {

View File

@ -68,12 +68,14 @@ const tableProps = [
{
prop: 'variableName',
label: '变量名称',
minWidth: 150
minWidth: 180,
showOverflowtooltip: true
},
{
prop: 'paramName',
label: '工艺参数',
minWidth: 150
minWidth: 180,
showOverflowtooltip: true
},
{
prop: 'maxValue',
@ -194,6 +196,7 @@ export default {
this.getList()
},
cascaderSelect(val) {
let obj = { ...this.$refs.searchBarForm.formInline }
switch (val.value.length) {
case 1:
this.listQuery.proLineId = val.value[0]
@ -202,7 +205,11 @@ export default {
size: 1000,
proLineId: this.listQuery.proLineId
}).then((res) => {
this.formConfig[1].defaultSelect = ''
this.$refs.searchBarForm.resetForm()
this.formConfig[0].defaultSelect = obj.keyword
this.formConfig[1].selectOptions = res.data
this.formConfig[2].defaultSelect = obj.variableName
})
break
case 2:
@ -214,7 +221,11 @@ export default {
proLineId: this.listQuery.proLineId,
unitId: this.listQuery.unitId
}).then((res) => {
this.formConfig[1].defaultSelect = ''
this.$refs.searchBarForm.resetForm()
this.formConfig[0].defaultSelect = obj.keyword
this.formConfig[1].selectOptions = res.data
this.formConfig[2].defaultSelect = obj.variableName
})
break
case 3:
@ -228,12 +239,19 @@ export default {
unitId: this.listQuery.unitId,
equipmentId: this.listQuery.equipmentId
}).then((res) => {
this.formConfig[1].defaultSelect = ''
this.$refs.searchBarForm.resetForm()
this.formConfig[0].defaultSelect = obj.keyword
this.formConfig[1].selectOptions = res.data
this.formConfig[2].defaultSelect = obj.variableName
})
break
default:
this.formConfig[0].defaultSelect = ''
this.formConfig[1].defaultSelect = ''
this.$refs.searchBarForm.resetForm()
this.formConfig[1].selectOptions = []
this.formConfig[2].defaultSelect = obj.variableName
}
},
getTree() {

View File

@ -29,12 +29,12 @@
:max-height="tableH"
:row-class-name="tableRowClassName"
/>
<!-- <pagination
<pagination
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
:total="total"
@pagination="getRealList"
/> -->
/>
</div>
<div v-else>
<process-monitoring-chart :beilv="beilv" />
@ -55,12 +55,14 @@ const tableProps = [
{
prop: 'paramName',
label: '工艺参数',
minWidth: 150
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'variableName',
label: '变量名称',
minWidth: 150
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'eqName',
@ -127,7 +129,7 @@ export default {
],
listQuery: {
current: 1,
size: 1000,
size: 20,
equipmentId: '',
paramName: '',
startTime: '',
@ -135,7 +137,7 @@ export default {
},
tableProps,
tableData: [],
tableH: tableHeight(290),
tableH: tableHeight(340),
total: 0,
historyList: []
}
@ -152,6 +154,7 @@ export default {
this.getRealList()
},
methods: {
//
getRealList() {
getPageReal({ ...this.listQuery }).then((res) => {
console.log(res)
@ -161,6 +164,7 @@ export default {
}
})
},
//
getHistoryList() {
if (!this.listQuery.startTime || !this.listQuery.endTime) {
this.$message.error('时间范围不能为空')
@ -174,8 +178,12 @@ export default {
this.$message.error('工艺参数不能为空')
return false
}
getPageHistory({ ...this.listQuery }).then((res) => {
console.log(res)
getPageHistory({
startTime: this.listQuery.startTime,
endTime: this.listQuery.endTime,
equipmentId: this.listQuery.equipmentId,
paramName: this.listQuery.paramName
}).then((res) => {
if (res.code === 0) {
this.historyList = res
}
@ -187,7 +195,6 @@ export default {
})
},
buttonClick(val) {
console.log(val)
if (this.type === '实时数据') {
this.listQuery.startTime = ''
this.listQuery.endTime = ''
@ -203,7 +210,6 @@ export default {
}
},
changeType(val) {
console.log(val)
this.$refs.searchBarForm.resetForm()
this.listQuery.startTime = ''
this.listQuery.endTime = ''
@ -213,14 +219,22 @@ export default {
if (val === '历史数据') {
this.formConfig[0].type = 'datePicker'
this.formConfig[0].label = '时间范围'
this.formConfig[0].defaultSelect = []
this.formConfig[1].defaultSelect = []
this.formConfig[2].defaultSelect = ''
} else {
this.formConfig[0].type = ''
this.formConfig[0].label = ''
this.formConfig[0].defaultSelect = []
this.formConfig[1].defaultSelect = []
this.formConfig[2].defaultSelect = ''
this.getRealList()
}
},
cascaderSelect(val) {
console.log(val)
if (val.value.length === 3) {
console.log('333333333333333')
this.listQuery.equipmentId = val.value[2]
getParamList({
current: 1,
@ -228,9 +242,18 @@ export default {
equipmentId: this.listQuery.equipmentId
}).then((res) => {
console.log(res)
let obj = { ...this.$refs.searchBarForm.formInline }
this.$refs.searchBarForm.resetForm()
this.formConfig[0].defaultSelect = obj.timeStr
this.formConfig[1].defaultSelect = JSON.parse(
JSON.stringify(obj.equipmentId)
)
this.formConfig[2].defaultSelect = ''
this.formConfig[2].selectOptions = res.data
})
} else {
console.log('清空')
this.formConfig[1].defaultSelect = ''
this.$refs.searchBarForm.resetForm()
this.formConfig[2].selectOptions = []
}