projects/mesxc-zjl #171

Merged
juzi merged 2 commits from projects/mesxc-zjl into projects/mesxc-test 2024-01-05 11:18:27 +08:00
13 changed files with 256 additions and 278 deletions
Showing only changes of commit d42786e7ed - Show all commits

View File

@ -14,9 +14,9 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://100.64.0.26:48082' # VUE_APP_BASE_API = 'http://100.64.0.26:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082' VUE_APP_BASE_API = 'http://192.168.0.33:48082'
VUE_APP_BASE_API = 'http://10.70.2.2:8080' # VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# VUE_APP_BASE_API = 'http://192.168.4.173:48080' # VUE_APP_BASE_API = 'http://192.168.4.173:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080'

View File

@ -9,7 +9,7 @@ import store from './store';
import router from './router'; import router from './router';
import directive from './directive'; // directive import directive from './directive'; // directive
import plugins from './plugins'; // plugins import plugins from './plugins'; // plugins
// import { borderBox1 } from '@jiaminghi/data-view' import { scrollBoard } from '@jiaminghi/data-view'
import './assets/icons'; // icon import './assets/icons'; // icon
import './permission'; // permission control import './permission'; // permission control
@ -79,7 +79,7 @@ Vue.use(CodeBrickZj)
Vue.use(directive); Vue.use(directive);
Vue.use(plugins); Vue.use(plugins);
Vue.use(VueMeta); Vue.use(VueMeta);
// Vue.use(dataV) Vue.use(scrollBoard)
// Vue.use(hljs.vuePlugin); // Vue.use(hljs.vuePlugin);
// bpmnProcessDesigner 需要引入 // bpmnProcessDesigner 需要引入

View File

@ -24,7 +24,57 @@ const state = {
israWeekStatistic: [],//缺陷统计 israWeekStatistic: [],//缺陷统计
israMonthStatistic: [],//缺陷统计 israMonthStatistic: [],//缺陷统计
israYearStatistic: [],//缺陷统计 israYearStatistic: [],//缺陷统计
productline: [] // 产线产量及良品率 productline: [{
"creator": "1",
"sumOutputNum": 15,
"outputNum": 15,
"passRate": 0.6,
"lineName": "3#深加工",
"updateTime": "2024-01-04T16:00:19",
"updater": "1",
"inputNum": 15,
"deleted": false,
"recordTime": "2023-12-25T20:00:00",
"createTime": "2023-10-13T10:44:27",
"tenantId": 1,
"id": 1712660539187441666,
"productionLineId": 1737313260027285506,
"sumInputNum": 15
}, {
"creator": "1",
"sumOutputNum": 49,
"outputNum": 16,
"passRate": 0.3,
"lineName": "2#深加工",
"updateTime": "2024-01-04T16:00:19",
"updater": "1",
"inputNum": 17,
"deleted": false,
"recordTime": "2023-12-25T20:00:00",
"createTime": "2023-10-13T10:44:27",
"tenantId": 1,
"id": 1712660539187441665,
"productionLineId": 1737313119178362881,
"sumInputNum": 47
}, {
"creator": "1",
"sumOutputNum": 29,
"outputNum": 18,
"passRate": 0.5,
"lineName": "1#深加工",
"updateTime": "2024-01-04T16:00:19",
"updater": "1",
"inputNum": 20,
"deleted": false,
"recordTime": "2023-12-25T20:00:00",
"createTime": "2023-10-13T10:43:17",
"tenantId": 1,
"id": 1712660244285927426,
"productionLineId": 1737312466842456065,
"sumInputNum": 27
}], // SJG产线产量及良品率
sjgEquipment:[],// SJG设备报警
}; };
const mutations = { const mutations = {
SET_FANFREQUENCYINFO: (state, fanFrequencyInfo) => { SET_FANFREQUENCYINFO: (state, fanFrequencyInfo) => {

View File

@ -118,7 +118,7 @@ export default {
{ {
name: '电耗能', name: '电耗能',
type: 'bar', type: 'bar',
// barWidth: 12, barWidth: 20,
tooltip: { tooltip: {
valueFormatter: function (value) { valueFormatter: function (value) {
return value + ' ml'; return value + ' ml';

View File

@ -47,9 +47,9 @@ export default {
let outputNum = [] let outputNum = []
let passRate = [] let passRate = []
this.productline && this.productline.length > 0 && this.productline.map(item => { this.productline && this.productline.length > 0 && this.productline.map(item => {
xData.push(itme.productionLineId) xData.push(item.lineName)
outputNum.push(itme.outputNum) outputNum.push(item.outputNum)
passRate.push(item.passRate) passRate.push(item.passRate*100)
}) })
var option = { var option = {
grid: { top: 32, right: 60, bottom: 20, left: 60 }, grid: { top: 32, right: 60, bottom: 20, left: 60 },
@ -70,7 +70,7 @@ export default {
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
data: ['Y61', 'Y62', 'Y63', 'Y64', 'Y65', 'Y66', 'Y67'], data: xData,
axisLabel: { axisLabel: {
color: "#fff", color: "#fff",
fontSize: 12, fontSize: 12,
@ -91,9 +91,6 @@ export default {
{ {
type: 'value', type: 'value',
name: '产量/片', name: '产量/片',
// min: 0,
// max: 250,
// interval: 50,
axisLabel: { axisLabel: {
color: "#fff", color: "#fff",
fontSize: 12, fontSize: 12,
@ -114,9 +111,6 @@ export default {
{ {
type: 'value', type: 'value',
name: '良品率', name: '良品率',
min: 0,
max: 25,
interval: 5,
axisLabel: { axisLabel: {
color: "#fff", color: "#fff",
fontSize: 12, fontSize: 12,
@ -151,9 +145,7 @@ export default {
{ offset: 1, color: '#364BFE' } { offset: 1, color: '#364BFE' }
]) ])
}, },
data: [ data: outputNum
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
]
}, },
{ {
name: '合格率', name: '合格率',
@ -177,7 +169,7 @@ export default {
lineStyle: { lineStyle: {
width: 1 width: 1
}, },
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2] data: passRate
} }
] ]
}; };

View File

@ -0,0 +1,38 @@
<template>
<div class="scroll-board-container">
<dv-scroll-board :config="config" :style="{'width':width,'height':height}" />
</div>
</template>
<script>
export default {
name: 'ScrollBoard',
props: {
config: {
type: Object,
default: () => ({})
},
width:{
type: String,
default: '600px'
},
height:{
type: String,
default: '380px'
}
},
data() {
return {
}
}
}
</script>
<style lang='scss'>
.scroll-board-container {
.dv-scroll-board .rows .ceil, .dv-scroll-board .header .header-item {
border-right: 1px solid rgba(13, 23, 40, 1);
}
.dv-scroll-board .rows .ceil:last-child, .dv-scroll-board .header .header-item:last-child {
border-right: none;
}
}
</style>

View File

@ -1,14 +1,43 @@
<template> <template>
<div style="flex: 1;"> <div style="flex: 1;">
<Container name="各工序缺陷汇总" size="small" style=""> <Container name="各工序缺陷汇总" size="small" style="">
设备报警 <div style="padding: 5px 10px;">
<ScrollBoard :config = "config" width='575px' height='380px'/>
</div>
</Container> </Container>
</div> </div>
</template> </template>
<script> <script>
import Container from '../components/Container.vue'; import Container from '../components/Container.vue';
import ScrollBoard from '../components/ScrollBoard'
export default { export default {
name: 'DefectSum', name: 'DefectSum',
components: { Container }, components: { Container, ScrollBoard },
data() {
return {
config: {
header: ['序号', '产线', '工序','损耗片数','缺陷类型'],
// headerHeight: '17',
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60],
align: ['center'],
data: [
[1, '产线1', '行1列3', '', ''],
[2, '产线2', '行2列3', '', ''],
[3, '产线3', '行3列3', '', ''],
[4, '产线4', '行4列3', '', ''],
[5, '产线5', '行5列3', '', ''],
[6, '产线6', '行6列3', '', ''],
[7, '产线7', '行7列3', '', ''],
[8, '产线8', '行8列3', '', ''],
[9, '产线9', '行9列3', '', ''],
[10, '产线10', '行10列3', '', '']
],
rowNum: 10
}
}
}
} }
</script> </script>

View File

@ -1,14 +1,43 @@
<template> <template>
<div style="flex: 1;"> <div style="flex: 1;">
<Container name="设备报警" size="small" style=""> <Container name="设备报警" size="small" style="">
设备报警 <div style="padding: 5px 10px;">
<ScrollBoard :config = "config" width='575px' height='380px'/>
</div>
</Container> </Container>
</div> </div>
</template> </template>
<script> <script>
import Container from '../components/Container.vue'; import Container from '../components/Container.vue';
import ScrollBoard from '../components/ScrollBoard'
export default { export default {
name: 'EqAlarm', name: 'EqAlarm',
components: { Container }, components: { Container, ScrollBoard },
data() {
return {
config: {
header: ['序号', '设备名称', '设备编码','设备状态','是否故障'],
// headerHeight: '17',
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60],
align: ['center'],
data: [
[1, '设备1', '行1列3', '', ''],
[2, '设备2', '行2列3', '', ''],
[3, '设备3', '行3列3', '', ''],
[4, '设备4', '行4列3', '', ''],
[5, '设备5', '行5列3', '', ''],
[6, '设备6', '行6列3', '', ''],
[7, '设备7', '行7列3', '', ''],
[8, '设备8', '行8列3', '', ''],
[9, '设备9', '行9列3', '', ''],
[10, '设备10', '行10列3', '', '']
],
rowNum: 10
}
}
}
} }
</script> </script>

View File

@ -1,14 +1,43 @@
<template> <template>
<div style="flex: 1;"> <div style="flex: 1;">
<Container name="工单监控" size="small" style=""> <Container name="工单监控" size="small" style="">
设备报警111 <div style="padding: 5px 10px;">
<ScrollBoard :config = "config" width='575px' height='380px'/>
</div>
</Container> </Container>
</div> </div>
</template> </template>
<script> <script>
import Container from '../components/Container.vue'; import Container from '../components/Container.vue';
import ScrollBoard from '../components/ScrollBoard'
export default { export default {
name: 'WorkOrderMonitoring', name: 'WorkOrderMonitoring',
components: { Container }, components: { Container, ScrollBoard },
data() {
return {
config: {
header: ['序号', '工单名称', '规格','产线','工单状态', '计划完成时间', '计划产量', '实际产量'],
// headerHeight: '17',
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60],
align: ['center'],
data: [
[1, '设备1', '行1列3', '', '','','',''],
[2, '设备2', '行2列3', '', '','','',''],
[3, '设备3', '行3列3', '', '','','',''],
[4, '设备4', '行4列3', '', '','','',''],
[5, '设备5', '行5列3', '', '','','',''],
[6, '设备6', '行6列3', '', '','','',''],
[7, '设备7', '行7列3', '', '','','',''],
[8, '设备8', '行8列3', '', '','','',''],
[9, '设备9', '行9列3', '', '','','',''],
[10, '设备10', '行10列3', '', '','','','']
],
rowNum: 10
}
}
}
} }
</script> </script>

View File

@ -17,7 +17,7 @@
gap: 24px; gap: 24px;
" "
:style="{transform:'scale('+scaleNum+')'}"> :style="{transform:'scale('+scaleNum+')'}">
<KHeader :isFullScreen='isFullScreen' @screenfullChange='screenfullChange' topTitle='全厂总览驾驶舱'/> <KHeader :isFullScreen='isFullScreen' @screenfullChange='screenfullChange' topTitle='深加工生产运行驾驶舱'/>
<div <div
class="main-body" class="main-body"
style=" style="

View File

@ -1,155 +1,43 @@
<template> <template>
<div style="flex: 1;"> <div style="flex: 1;">
<Container name="订单完成情况" size="small" class="wholeOrder"> <Container name="订单完成情况" size="small" style="">
<div style="width: 100%;padding: 10px; 20px"> <div style="padding: 5px 10px;">
<el-table <ScrollBoard :config = "config" width='575px' height='230px'/>
:header-cell-style="{background:'rgba(4, 74, 132, 0.8)',color:'#fff',height: '40px',lineHeight: '40px', padding: 0,fontSize:'16px'}"
:row-style="setRowStyle"
:data="list"
height="225"
border
style="width: 100%; background: transparent"
>
<el-table-column
v-for="item in tableProps"
:key="item.prop"
:show-overflow-tooltip="item.showOverflowtooltip"
v-bind="item"
>
<template slot-scope="scope">
<component :is="item.subcomponent" v-if="item.subcomponent" :inject-data="{...scope.row, ...item}" @emitData="emitData" />
<span v-else>{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
</template>
</el-table-column>
<slot name="content" />
</el-table>
</div> </div>
</Container> </Container>
</div> </div>
</template> </template>
<script> <script>
// :header-cell-style="{background:'rgba(79,114,136,0.29)',color:'#fff'}" import Container from '../components/Container'
const tableProps = [ import ScrollBoard from '../components/ScrollBoard'
{
prop: 'time',
label: '添加时间',
filter: parseTime,
minWidth: 140
},
{
prop: 'name',
label: '订单名称',
minWidth: 120,
showOverflowtooltip: true
},
{
prop: 'code',
label: '订单编码',
minWidth: 180
},
{
prop: 'customerId',
label: '客户',
showOverflowtooltip: true
}
]
import Container from '../components/Container.vue';
import { parseTime } from '@/utils/ruoyi'
export default { export default {
name: 'OrderStatus', name: 'OrderStatus',
filters: { components: { Container, ScrollBoard },
commonFilter: (source, filterType = a => a) => {
return filterType(source)
}
},
components: { Container },
data() { data() {
return { return {
tableProps, config: {
list:[ header: ['上线时间', '客户名称', '规格','完成度'],
{time: '2023-12-12', name: '名称名称'}, // headerHeight: '17',
{time: '2023-12-13', name: '名称名称'}, headerBGC: 'rgba(32, 55, 96, 0.8)',
{time: '2023-12-14', name: '名称名称'}, oddRowBGC: 'rgba(32, 55, 96, 0.8)',
{time: '2023-12-15', name: '名称名称'}, evenRowBGC: 'rgba(14, 32, 62, 0.8)',
{time: '2023-12-16', name: '名称名称'}, // columnWidth: [60],
{time: '2023-12-17', name: '名称名称'}, align: ['center'],
{time: '2023-12-18', name: '名称名称'}, data: [
{time: '2023-12-19', name: '名称名称'}, ['2023-12-01', '客户1', '行1列3', ''],
{time: '2023-12-20', name: '名称名称'}, ['2023-12-01', '客户2', '行2列3', ''],
{time: '2023-12-21', name: '名称名称'} ['2023-12-01', '客户3', '行3列3', ''],
] ['2023-12-01', '客户4', '行4列3', ''],
} ['2023-12-01', '客户5', '行5列3', ''],
}, ['2023-12-01', '客户6', '行6列3', ''],
mounted() { ['2023-12-01', '客户7', '行7列3', ''],
['2023-12-01', '客户8', '行8列3', ''],
}, ['2023-12-01', '客户9', '行9列3', ''],
methods:{ ['2023-12-01', '客户10', '行10列3', '']
setRowStyle(v) { ],
if (v.rowIndex % 2 === 0) { rowNum: 6
return {
background: 'rgba(11, 84, 153, 0.5)',
color: 'rgba(255,255,255,0.8)',
height: '40px',
lineHeight: '40px',
padding: 0,
fontSize: '16px'
}
} else {
return {
background: 'rgba(4, 74, 132, 0.5)',
color: 'rgba(255,255,255,0.8)',
height: '40px',
lineHeight: '40px',
padding: 0,
fontSize: '16px'
}
} }
} }
} }
} }
</script> </script>
<style lang='scss'>
.wholeOrder {
.el-table {
border: 0;
}
.el-table::before,.el-table--border::after {
background-color: transparent;
}
.el-table th,td{
border-color: #0D1728 !important;
padding: 0;
}
.el-table tr {
background: transparent;
}
.el-table__row:hover > td {
background-color: rgba(79,114,136,0.29) !important;
}
.el-table__row--striped:hover > td {
background-color: rgba(79,114,136,0.29) !important;
}
// .el-table {
// border: 0;
// }
// .el-table::before,.el-table--border::after {
// background-color: transparent;
// }
// .el-table th,td{
// border-color: #0D1728 !important;
// padding: 0;
// }
// .el-table tr {
// background: transparent;
// }
// .el-table__row:hover > td {
// background-color: rgba(79,114,136,0.29) !important;
// }
// .el-table__row--striped:hover > td {
// background-color: rgba(79,114,136,0.29) !important;
// }
}
</style>

View File

@ -1,127 +1,45 @@
<template> <template>
<div style="flex: 2;" class="aaa"> <div style="flex: 2;" class="aaa">
<Container name="本日生产良品率" size="small" style=""> <Container name="本日生产良品率" size="small" style="">
<el-table <ScrollBoard :config = "config" width='575px' height='300px'/>
:header-cell-style="{background:'rgba(4, 74, 132, 0.8)',color:'#fff',height: '40px',lineHeight: '40px', padding: 0,fontSize:'16px'}"
:row-style="setRowStyle"
:data="list"
border
style="width: 100%; background: transparent"
>
<el-table-column
v-for="item in tableProps"
:key="item.prop"
:show-overflow-tooltip="item.showOverflowtooltip"
v-bind="item"
>
<template slot-scope="scope">
<component :is="item.subcomponent" v-if="item.subcomponent" :inject-data="{...scope.row, ...item}" @emitData="emitData" />
<span v-else>{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
</template>
</el-table-column>
<slot name="content" />
</el-table>
</Container> </Container>
</div> </div>
</template> </template>
<script> <script>
const tableProps = [
{
prop: 'time',
label: '添加时间',
filter: parseTime,
minWidth: 140
},
{
prop: 'name',
label: '订单名称',
minWidth: 120,
showOverflowtooltip: true
},
{
prop: 'code',
label: '订单编码',
minWidth: 180
},
{
prop: 'customerId',
label: '客户',
showOverflowtooltip: true
}
]
import Container from '../components/Container'; import Container from '../components/Container';
import { parseTime } from '@/utils/ruoyi' import ScrollBoard from '../components/ScrollBoard'
export default { export default {
name: 'YieldRate', name: 'YieldRate',
filters: { components: { Container, ScrollBoard },
commonFilter: (source, filterType = a => a) => {
return filterType(source)
}
},
components: { Container },
data() { data() {
return { return {
tableProps, config: {
list:[ header: ['序号', '设备名称', '设备编码','设备状态','是否故障'],
{time: '2023-12-12', name: '名称名称'}, // headerHeight: '17',
// {time: '2023-12-13', name: ''}, headerBGC: 'rgba(32, 55, 96, 0.8)',
// {time: '2023-12-14', name: ''}, oddRowBGC: 'rgba(32, 55, 96, 0.8)',
// {time: '2023-12-15', name: ''}, evenRowBGC: 'rgba(14, 32, 62, 0.8)',
// {time: '2023-12-16', name: ''}, columnWidth: [60],
// {time: '2023-12-17', name: ''}, align: ['center'],
// {time: '2023-12-18', name: ''}, data: [
// {time: '2023-12-19', name: ''}, [1, '设备1', '行1列3', '', ''],
// {time: '2023-12-20', name: ''}, [2, '设备2', '行2列3', '', ''],
// {time: '2023-12-21', name: ''} [3, '设备3', '行3列3', '', ''],
] [4, '设备4', '行4列3', '', ''],
[5, '设备5', '行5列3', '', ''],
[6, '设备6', '行6列3', '', ''],
[7, '设备7', '行7列3', '', ''],
[8, '设备8', '行8列3', '', ''],
[9, '设备9', '行9列3', '', ''],
[10, '设备10', '行10列3', '', '']
],
rowNum: 10
}
} }
}, },
methods: { methods: {
setRowStyle(v) {
if (v.rowIndex % 2 === 0) {
return {
background: 'rgba(11, 84, 153, 1)',
color: 'rgba(255,255,255,0.8)',
height: '40px',
lineHeight: '40px',
padding: 0,
fontSize: '16px'
}
} else {
return {
background: 'rgba(4, 74, 132, 1)',
color: 'rgba(255,255,255,0.8)',
height: '40px',
lineHeight: '40px',
padding: 0,
fontSize: '16px'
}
}
}
} }
} }
</script> </script>
<style lang='scss'> <style lang='scss'>
.aaa {
.el-table {
border: 0;
}
.el-table::before,.el-table--border::after {
background-color: transparent;
}
.el-table th,td{
border-color: #0D1728 !important;
padding: 0;
}
.el-table tr {
background: transparent;
}
.el-table__row:hover > td {
background-color: rgba(79,114,136,0.29) !important;
}
.el-table__row--striped:hover > td {
background-color: rgba(79,114,136,0.29) !important;
}
}
</style> </style>

View File

@ -180,11 +180,12 @@ const mesIS = new WsConnect(
} }
) )
// 产线产量及良品率 SJG // 深加工生产运行驾驶舱(除能源) SJG
const mesSJG = new WsConnect( const mesSJG = new WsConnect(
// websocket地址 // websocket地址
// 'ws://10.70.2.2:8080/websocket/message?userId=SJG'+timestr, // 'ws://10.70.2.2:8080/websocket/message?userId=SJG'+timestr,
'ws://192.168.1.104:48082/websocket/message?userId=SJG'+timestr, // 'ws://192.168.0.33:48082/websocket/message?userId=SJG'+timestr,
'ws://192.168.1.62:48082/websocket/message?userId=SJG'+timestr,
// 传递给后台的数据 // 传递给后台的数据
'', '',
// 成功拿到后台返回的数据的回调函数 // 成功拿到后台返回的数据的回调函数
@ -197,6 +198,10 @@ const mesSJG = new WsConnect(
store.dispatch({type: "websocket/setProductline", payload:msgData.detData}) store.dispatch({type: "websocket/setProductline", payload:msgData.detData})
break; break;
} }
case "equipment": {
store.dispatch({type: "websocket/setSJGEq", payload:msgData.detData})
break;
}
default: default:
} }
}, },
@ -214,7 +219,7 @@ export const getDcsMsg = () => {
mesEN.createWebSoket() mesEN.createWebSoket()
mesGAS.createWebSoket() mesGAS.createWebSoket()
mesIS.createWebSoket() mesIS.createWebSoket()
// mesSJG.createWebSoket() mesSJG.createWebSoket()
} }
export const closeDcsMsg = () => { export const closeDcsMsg = () => {
dcsConn.closeWebsocket() dcsConn.closeWebsocket()
@ -223,5 +228,5 @@ export const closeDcsMsg = () => {
mesEN.closeWebsocket() mesEN.closeWebsocket()
mesGAS.closeWebsocket() mesGAS.closeWebsocket()
mesIS.closeWebsocket() mesIS.closeWebsocket()
// mesSJG.closeWebsocket() mesSJG.closeWebsocket()
} }