Compare commits

..

No commits in common. "4aad193bb0424e27b258b54b05691b48a712448a" and "64f42511590900cc877e24fd4a6342fa774028c3" have entirely different histories.

34 changed files with 138 additions and 192 deletions

View File

@ -1 +0,0 @@
.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}

1
dist/css/3475.a51523c6.css vendored Normal file
View File

@ -0,0 +1 @@
.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}

1
dist/css/4026.25a1676f.css vendored Normal file
View File

@ -0,0 +1 @@
.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}

1
dist/css/4545.b963b9fc.css vendored Normal file
View File

@ -0,0 +1 @@
.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}

View File

@ -1 +0,0 @@
.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}

View File

@ -1 +0,0 @@
.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}

1
dist/css/7923.00279449.css vendored Normal file
View File

@ -0,0 +1 @@
.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}

View File

@ -1 +0,0 @@
.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.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>
<!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>

1
dist/js/1486.26b8fddb.js vendored Normal file
View File

@ -0,0 +1 @@
"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}}]);

1
dist/js/1857.891e517e.js vendored Normal file
View File

@ -0,0 +1 @@
"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}}]);

1
dist/js/207.21b2ce91.js vendored Normal file
View File

@ -0,0 +1 @@
"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}}]);

1
dist/js/2979.83d084ce.js vendored Normal file
View File

@ -0,0 +1 @@
"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}}]);

View File

@ -1 +1 @@
"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}}]);
"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}}]);

File diff suppressed because one or more lines are too long

1
dist/js/3475.5b3b7317.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/js/3829.c6e257e7.js vendored Normal file
View File

@ -0,0 +1 @@
"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}}]);

1
dist/js/4026.1cc1b217.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/js/4545.0dacf1ef.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/js/4610.daf8e9e1.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

File diff suppressed because one or more lines are too long

1
dist/js/7923.a74d1898.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

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/app.cbc70e1b.js vendored Normal file

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,7 +58,6 @@ import {
palletIndicatorGetType
} from '@/api/deviceManagement'
import { timeFormatter } from '@/utils'
import moment from 'moment'
const tableProps = [
{
prop: 'proLineName',
@ -144,15 +143,12 @@ export default {
{
type: 'datePicker',
label: '产品上片时间',
dateType: 'datetimerange',
dateType: 'datetime',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
defaultSelect: [],
width: 350
valueFormat: 'yyyy-MM-dd HH:mm:ss',
placeholder: '产品上片时间',
param: 'testTime',
width: 200
},
{
type: 'button',
@ -164,9 +160,7 @@ export default {
listQuery: {
current: 1,
size: 20,
palletId: '',
startTime: '',
endTime: ''
palletId: ''
},
total: 0,
tableProps,
@ -187,69 +181,53 @@ export default {
this.tableH = tableHeight(330)
this.tableH2 = tableHeight(360) / 2
})
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'
this.getList()
},
methods: {
getList() {
if (this.listQuery.palletId) {
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)
})
this.getLevel()
} else {
this.$message.error('请先输入托盘id后再查询')
}
},
setCurrent() {
let _this = this
setTimeout(function () {
_this.$refs.palletTable1.setCurrent('palletTable', 0)
}, 500)
},
getLevel() {
// ID
palletIndicatorGetType({
palletId: this.listQuery.palletId,
startTime: this.listQuery.startTime,
endTime: this.listQuery.endTime
}).then((res) => {
palletIndicatorGetType({ id: 1 }).then((res) => {
this.tableData2 = []
if (res.code === 0) {
const data = res.data
this.chartMsg = data
console.log(this.chartMsg)
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]
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)
}
})
},
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,6 +185,7 @@ export default {
placeholder: '月份选择',
param: 'timePosition',
defaultSelect: '',
pickerOptions: {},
width: 200
},
{
@ -214,6 +215,7 @@ export default {
window.addEventListener('resize', () => {
this.tableH = tableHeight(214) / 2 - 75
})
this.getMonth()
this.setDefaultVal()
this.getTree()
},
@ -240,6 +242,27 @@ 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,31 +40,22 @@
: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, publicFormatter } from '@/utils/index'
import { tableHeight, timeFormatter } from '@/utils/index'
import { getTreeData } from '@/api/app'
import { getAlarmReal, getAlarmHis } from '@/api/processManagement'
import moment from 'moment'
const tableProps = [
{
prop: 'paramName',
label: '工艺参数',
showOverflowtooltip: true
label: '工艺参数'
},
{
prop: 'variableName',
label: '变量名称',
showOverflowtooltip: true
label: '变量名称'
},
{
prop: 'eqName',
@ -90,8 +81,7 @@ const tableProps = [
{
prop: 'alarmType',
label: '报警类型',
width: 100,
filter: publicFormatter('alarmTypeVoList')
width: 100
},
{
prop: 'alarmLimit',
@ -143,7 +133,7 @@ export default {
total: 0,
listQuery: {
current: 1,
size: 20,
size: 1000,
equipmentId: null,
proLineId: null,
unitId: null,
@ -156,14 +146,8 @@ export default {
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(340)
this.tableH = tableHeight(300)
})
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()
},
@ -177,7 +161,6 @@ export default {
getAlarmReal({ ...this.listQuery }).then((res) => {
if (res.code === 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
@ -185,7 +168,6 @@ export default {
getAlarmHis({ ...this.listQuery }).then((res) => {
if (res.code === 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
@ -213,11 +195,10 @@ export default {
console.log(val)
if (val === '实时数据') {
this.tableData = []
this.total = 0
this.getReal()
} else if (val === '历史数据') {
this.tableData = []
this.total = 0
console.log(this.listQuery)
}
},
buttonClick(val) {

View File

@ -68,14 +68,12 @@ const tableProps = [
{
prop: 'variableName',
label: '变量名称',
minWidth: 180,
showOverflowtooltip: true
minWidth: 150
},
{
prop: 'paramName',
label: '工艺参数',
minWidth: 180,
showOverflowtooltip: true
minWidth: 150
},
{
prop: 'maxValue',
@ -196,7 +194,6 @@ export default {
this.getList()
},
cascaderSelect(val) {
let obj = { ...this.$refs.searchBarForm.formInline }
switch (val.value.length) {
case 1:
this.listQuery.proLineId = val.value[0]
@ -205,11 +202,7 @@ 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:
@ -221,11 +214,7 @@ 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:
@ -239,19 +228,12 @@ 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,14 +55,12 @@ const tableProps = [
{
prop: 'paramName',
label: '工艺参数',
minWidth: 150,
showOverflowtooltip: true
minWidth: 150
},
{
prop: 'variableName',
label: '变量名称',
minWidth: 150,
showOverflowtooltip: true
minWidth: 150
},
{
prop: 'eqName',
@ -129,7 +127,7 @@ export default {
],
listQuery: {
current: 1,
size: 20,
size: 1000,
equipmentId: '',
paramName: '',
startTime: '',
@ -137,7 +135,7 @@ export default {
},
tableProps,
tableData: [],
tableH: tableHeight(340),
tableH: tableHeight(290),
total: 0,
historyList: []
}
@ -154,7 +152,6 @@ export default {
this.getRealList()
},
methods: {
//
getRealList() {
getPageReal({ ...this.listQuery }).then((res) => {
console.log(res)
@ -164,7 +161,6 @@ export default {
}
})
},
//
getHistoryList() {
if (!this.listQuery.startTime || !this.listQuery.endTime) {
this.$message.error('时间范围不能为空')
@ -178,12 +174,8 @@ export default {
this.$message.error('工艺参数不能为空')
return false
}
getPageHistory({
startTime: this.listQuery.startTime,
endTime: this.listQuery.endTime,
equipmentId: this.listQuery.equipmentId,
paramName: this.listQuery.paramName
}).then((res) => {
getPageHistory({ ...this.listQuery }).then((res) => {
console.log(res)
if (res.code === 0) {
this.historyList = res
}
@ -195,6 +187,7 @@ export default {
})
},
buttonClick(val) {
console.log(val)
if (this.type === '实时数据') {
this.listQuery.startTime = ''
this.listQuery.endTime = ''
@ -210,6 +203,7 @@ export default {
}
},
changeType(val) {
console.log(val)
this.$refs.searchBarForm.resetForm()
this.listQuery.startTime = ''
this.listQuery.endTime = ''
@ -219,22 +213,14 @@ 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,
@ -242,18 +228,9 @@ 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 = []
}