From d42786e7ed3f211da7feb5f4cda48d7109e4f2ac Mon Sep 17 00:00:00 2001
From: juzi <819872918@qq.com>
Date: Fri, 5 Jan 2024 11:03:08 +0800
Subject: [PATCH 1/4] =?UTF-8?q?SJG=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.dev | 4 +-
src/main.js | 4 +-
src/store/modules/websocket.js | 52 +++++-
.../components/EnergeMonitoringChart.vue | 2 +-
.../databoard/components/NumRateChart.vue | 20 +--
.../databoard/components/ScrollBoard.vue | 38 ++++
.../databoard/deepProcessing/DefectSum.vue | 33 +++-
.../databoard/deepProcessing/EqAlarm.vue | 33 +++-
.../deepProcessing/WorkOrderMonitoring.vue | 33 +++-
src/views/databoard/deepProcessing/index.vue | 2 +-
.../databoard/wholePlant/OrderStatus.vue | 168 +++---------------
src/views/databoard/wholePlant/YieldRate.vue | 132 +++-----------
src/websocket/wsInterface.js | 13 +-
13 files changed, 256 insertions(+), 278 deletions(-)
create mode 100644 src/views/databoard/components/ScrollBoard.vue
diff --git a/.env.dev b/.env.dev
index 5d905f0a..24a898c4 100644
--- a/.env.dev
+++ b/.env.dev
@@ -14,9 +14,9 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
# 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.2.173:48080'
diff --git a/src/main.js b/src/main.js
index 9e38edca..bb3be6b6 100644
--- a/src/main.js
+++ b/src/main.js
@@ -9,7 +9,7 @@ import store from './store';
import router from './router';
import directive from './directive'; // directive
import plugins from './plugins'; // plugins
-// import { borderBox1 } from '@jiaminghi/data-view'
+import { scrollBoard } from '@jiaminghi/data-view'
import './assets/icons'; // icon
import './permission'; // permission control
@@ -79,7 +79,7 @@ Vue.use(CodeBrickZj)
Vue.use(directive);
Vue.use(plugins);
Vue.use(VueMeta);
-// Vue.use(dataV)
+Vue.use(scrollBoard)
// Vue.use(hljs.vuePlugin);
// bpmnProcessDesigner 需要引入
diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js
index 7966e519..9964e201 100644
--- a/src/store/modules/websocket.js
+++ b/src/store/modules/websocket.js
@@ -24,7 +24,57 @@ const state = {
israWeekStatistic: [],//缺陷统计
israMonthStatistic: [],//缺陷统计
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 = {
SET_FANFREQUENCYINFO: (state, fanFrequencyInfo) => {
diff --git a/src/views/databoard/components/EnergeMonitoringChart.vue b/src/views/databoard/components/EnergeMonitoringChart.vue
index c845341d..5c8e59fa 100644
--- a/src/views/databoard/components/EnergeMonitoringChart.vue
+++ b/src/views/databoard/components/EnergeMonitoringChart.vue
@@ -118,7 +118,7 @@ export default {
{
name: '电耗能',
type: 'bar',
- // barWidth: 12,
+ barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value + ' ml';
diff --git a/src/views/databoard/components/NumRateChart.vue b/src/views/databoard/components/NumRateChart.vue
index f8d4c00c..f18000bf 100644
--- a/src/views/databoard/components/NumRateChart.vue
+++ b/src/views/databoard/components/NumRateChart.vue
@@ -47,9 +47,9 @@ export default {
let outputNum = []
let passRate = []
this.productline && this.productline.length > 0 && this.productline.map(item => {
- xData.push(itme.productionLineId)
- outputNum.push(itme.outputNum)
- passRate.push(item.passRate)
+ xData.push(item.lineName)
+ outputNum.push(item.outputNum)
+ passRate.push(item.passRate*100)
})
var option = {
grid: { top: 32, right: 60, bottom: 20, left: 60 },
@@ -70,7 +70,7 @@ export default {
xAxis: [
{
type: 'category',
- data: ['Y61', 'Y62', 'Y63', 'Y64', 'Y65', 'Y66', 'Y67'],
+ data: xData,
axisLabel: {
color: "#fff",
fontSize: 12,
@@ -91,9 +91,6 @@ export default {
{
type: 'value',
name: '产量/片',
- // min: 0,
- // max: 250,
- // interval: 50,
axisLabel: {
color: "#fff",
fontSize: 12,
@@ -114,9 +111,6 @@ export default {
{
type: 'value',
name: '良品率',
- min: 0,
- max: 25,
- interval: 5,
axisLabel: {
color: "#fff",
fontSize: 12,
@@ -151,9 +145,7 @@ export default {
{ offset: 1, color: '#364BFE' }
])
},
- data: [
- 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
- ]
+ data: outputNum
},
{
name: '合格率',
@@ -177,7 +169,7 @@ export default {
lineStyle: {
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
}
]
};
diff --git a/src/views/databoard/components/ScrollBoard.vue b/src/views/databoard/components/ScrollBoard.vue
new file mode 100644
index 00000000..033c602f
--- /dev/null
+++ b/src/views/databoard/components/ScrollBoard.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/databoard/deepProcessing/DefectSum.vue b/src/views/databoard/deepProcessing/DefectSum.vue
index fca3dbaa..1fc95112 100644
--- a/src/views/databoard/deepProcessing/DefectSum.vue
+++ b/src/views/databoard/deepProcessing/DefectSum.vue
@@ -1,14 +1,43 @@
\ No newline at end of file
diff --git a/src/views/databoard/deepProcessing/EqAlarm.vue b/src/views/databoard/deepProcessing/EqAlarm.vue
index ef7be248..6b6fc21f 100644
--- a/src/views/databoard/deepProcessing/EqAlarm.vue
+++ b/src/views/databoard/deepProcessing/EqAlarm.vue
@@ -1,14 +1,43 @@
\ No newline at end of file
diff --git a/src/views/databoard/deepProcessing/WorkOrderMonitoring.vue b/src/views/databoard/deepProcessing/WorkOrderMonitoring.vue
index b3fab7f4..47271bc5 100644
--- a/src/views/databoard/deepProcessing/WorkOrderMonitoring.vue
+++ b/src/views/databoard/deepProcessing/WorkOrderMonitoring.vue
@@ -1,14 +1,43 @@
\ No newline at end of file
diff --git a/src/views/databoard/deepProcessing/index.vue b/src/views/databoard/deepProcessing/index.vue
index f2cdefcf..48d32fd4 100644
--- a/src/views/databoard/deepProcessing/index.vue
+++ b/src/views/databoard/deepProcessing/index.vue
@@ -17,7 +17,7 @@
gap: 24px;
"
:style="{transform:'scale('+scaleNum+')'}">
-
+
-
-
-
-
-
-
- {{ scope.row[item.prop] | commonFilter(item.filter) }}
-
-
-
-
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/views/databoard/wholePlant/YieldRate.vue b/src/views/databoard/wholePlant/YieldRate.vue
index 91421ee1..6c82ae63 100644
--- a/src/views/databoard/wholePlant/YieldRate.vue
+++ b/src/views/databoard/wholePlant/YieldRate.vue
@@ -1,127 +1,45 @@
-
-
-
-
- {{ scope.row[item.prop] | commonFilter(item.filter) }}
-
-
-
-
+
\ No newline at end of file
diff --git a/src/websocket/wsInterface.js b/src/websocket/wsInterface.js
index a28bf552..6e2d708b 100644
--- a/src/websocket/wsInterface.js
+++ b/src/websocket/wsInterface.js
@@ -180,11 +180,12 @@ const mesIS = new WsConnect(
}
)
-// 产线产量及良品率 SJG
+// 深加工生产运行驾驶舱(除能源) SJG
const mesSJG = new WsConnect(
// websocket地址
// '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})
break;
}
+ case "equipment": {
+ store.dispatch({type: "websocket/setSJGEq", payload:msgData.detData})
+ break;
+ }
default:
}
},
@@ -214,7 +219,7 @@ export const getDcsMsg = () => {
mesEN.createWebSoket()
mesGAS.createWebSoket()
mesIS.createWebSoket()
- // mesSJG.createWebSoket()
+ mesSJG.createWebSoket()
}
export const closeDcsMsg = () => {
dcsConn.closeWebsocket()
@@ -223,5 +228,5 @@ export const closeDcsMsg = () => {
mesEN.closeWebsocket()
mesGAS.closeWebsocket()
mesIS.closeWebsocket()
- // mesSJG.closeWebsocket()
+ mesSJG.closeWebsocket()
}
\ No newline at end of file
From d619db3d897b4d6991ff14940c47b8cb08c91edb Mon Sep 17 00:00:00 2001
From: juzi <819872918@qq.com>
Date: Fri, 5 Jan 2024 11:19:39 +0800
Subject: [PATCH 2/4] 1
---
.env.dev | 5 -----
1 file changed, 5 deletions(-)
diff --git a/.env.dev b/.env.dev
index a7cac807..4fa61a97 100644
--- a/.env.dev
+++ b/.env.dev
@@ -13,16 +13,11 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
-<<<<<<< HEAD
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.0.33:48082'
->>>>>>> projects/mesxc-test
# 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.1.49:48082'
From 16551a5f9d87748f38069f1c28986c98b7311455 Mon Sep 17 00:00:00 2001
From: helloDy <1615073571@qq.com>
Date: Mon, 8 Jan 2024 16:22:53 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E5=8F=82=E6=95=B0=20=E4=BA=A7=E5=93=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.dev | 5 ++--
src/views/base/coreProduct/add-or-updata.vue | 3 ++-
.../monitoring/equipmentFullParams/index.vue | 25 ++++++++++---------
3 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/.env.dev b/.env.dev
index 40a1806e..6a6611c2 100644
--- a/.env.dev
+++ b/.env.dev
@@ -1,8 +1,8 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
- # @LastEditTime: 2023-12-18 13:35:00
- # @LastEditors: zhp
+ # @LastEditTime: 2024-01-08 16:05:09
+ # @LastEditors: DY
# @Description:
###
# 开发环境配置
@@ -14,6 +14,7 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
# 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.1.101:8080'
# 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.1.49:48082'
diff --git a/src/views/base/coreProduct/add-or-updata.vue b/src/views/base/coreProduct/add-or-updata.vue
index 8c855299..0b2923e3 100644
--- a/src/views/base/coreProduct/add-or-updata.vue
+++ b/src/views/base/coreProduct/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
- * @LastEditTime: 2023-12-06 10:36:56
+ * @LastEditTime: 2024-01-08 16:11:03
* @Description:
-->
@@ -253,6 +253,7 @@ export default {
dataRule: {
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
+ specifications: [{ required: true, message: "规格不能为空", trigger: "blur" }],
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }],
processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
diff --git a/src/views/monitoring/equipmentFullParams/index.vue b/src/views/monitoring/equipmentFullParams/index.vue
index 0601cd16..b0c76935 100644
--- a/src/views/monitoring/equipmentFullParams/index.vue
+++ b/src/views/monitoring/equipmentFullParams/index.vue
@@ -51,10 +51,10 @@ export default {
components: {},
props: {},
data() {
- const now = new Date();
+ // const now = new Date().getTime();
// const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date().getTime();
- const tenminAgo = today - (10 * 60 * 1000);
+ const tenminAgo = new Date(today - (10 * 60 * 1000)).getTime();
return {
searchBarFormConfig: [
{
@@ -77,7 +77,7 @@ export default {
dateType: 'datetimerange', // datetimerange
format: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'yyyy-MM-dd HH:mm:ss',
- valueFormat: 'timestamp',
+ valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
@@ -94,8 +94,8 @@ export default {
},
],
queryParams: {
- id: null,
- time: [tenminAgo, today],
+ equipmentId: null,
+ recordTime: [parseTime(tenminAgo), parseTime(today)],
},
tableList: [
// {
@@ -118,7 +118,7 @@ export default {
beforeRouteEnter(to, from, next) {
if (Object.keys(to.params).length > 0) {
next((vm) => {
- vm.$set(vm.queryParams, 'id', to.params.equipmentId);
+ vm.$set(vm.queryParams, 'equipmentId', to.params.equipmentId);
vm.$set(
vm.searchBarFormConfig[0],
'defaultSelect',
@@ -132,7 +132,7 @@ export default {
vm.$set(
vm.searchBarFormConfig[2],
'defaultSelect',
- vm.queryParams.time
+ vm.queryParams.recordTime
);
vm.handleQuery();
});
@@ -167,7 +167,7 @@ export default {
},
beforeRouteLeave(to, from, next) {
// clean job
- this.$set(this.queryParams, 'id', null);
+ this.$set(this.queryParams, 'equipmentId', null);
this.$set(this.searchBarFormConfig[0], 'defaultSelect', null);
this.$set(this.searchBarFormConfig[1], 'defaultSelect', null);
this.tableList = [];
@@ -204,7 +204,7 @@ export default {
props.push({
label: item.name,
prop: item.name,
- width: 128,
+ // width: 128,
});
firstLineData[item.name] = `${item.minValue ?? ''}-${
item.maxValue ?? ''
@@ -280,14 +280,15 @@ export default {
async handleSearchBarBtnClick({ btnName, timeVal }) {
if (timeVal && timeVal.length > 0) {
- if (timeVal[1] - timeVal[0] <= 10 * 60 * 1000) {
- this.queryParams.time = timeVal;
+ console.log('nihc ', timeVal)
+ if (new Date(timeVal[1]).getTime() - new Date(timeVal[0]).getTime() <= 10 * 60 * 1000) {
+ this.queryParams.recordTime = timeVal;
await this.handleQuery();
} else {
this.$message.warning('时间范围最大一小时限制!')
}
} else {
- this.queryParams.time = [];
+ this.queryParams.recordTime = [];
this.$message.warning('时间段必选!')
}
From 10ad3acf9c88fffd723e39a81d9a6b401b1e7a34 Mon Sep 17 00:00:00 2001
From: juzi <819872918@qq.com>
Date: Mon, 8 Jan 2024 16:59:42 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E9=A9=BE=E9=A9=B6=E8=88=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.dev | 10 +-
src/store/modules/websocket.js | 77 ++++-
src/styles/index.scss | 8 +
.../databoard/components/DefectChart.vue | 83 ++---
src/views/databoard/components/FlueGas.vue | 8 +-
src/views/databoard/components/GasChart.vue | 11 +
.../databoard/components/ScrollBoard.vue | 18 +-
src/views/databoard/components/Switcher.vue | 23 +-
.../databoard/components/YieldRateChart.vue | 317 ++++++++++++++++++
.../databoard/deepProcessing/DefectSum.vue | 38 ++-
.../databoard/deepProcessing/EqAlarm.vue | 28 +-
.../deepProcessing/WorkOrderMonitoring.vue | 50 ++-
src/views/databoard/kiln/EnergeCost.vue | 3 +-
src/views/databoard/kiln/FanSequence.vue | 4 +-
src/views/databoard/kiln/GasHandle.vue | 11 +-
src/views/databoard/kiln/RightTwo.vue | 3 +-
.../databoard/wholePlant/OrderStatus.vue | 24 +-
src/views/databoard/wholePlant/YieldRate.vue | 118 +++++--
src/websocket/wsInterface.js | 107 +++++-
19 files changed, 776 insertions(+), 165 deletions(-)
create mode 100644 src/views/databoard/components/YieldRateChart.vue
diff --git a/.env.dev b/.env.dev
index 4fa61a97..67ff42df 100644
--- a/.env.dev
+++ b/.env.dev
@@ -25,12 +25,14 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
-VUE_APP_BASE_API = 'http://192.168.1.78:48082'
+# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
+
+# dcs地址
+VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# socket地址
-VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
+VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
+# VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
-
-# VUE_APP_BASE_API = 'http://100.64.0.23:48082'
# 积木报表指向地址
VUE_APP_JIMU_API = 'http://10.70.2.22:8080'
diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js
index 9964e201..7b69b33e 100644
--- a/src/store/modules/websocket.js
+++ b/src/store/modules/websocket.js
@@ -20,6 +20,7 @@ const state = {
gasChartWeekTrend:{}, // 烟气
gasChartMonthTrend:{}, // 烟气
gasChartYearTrend:{}, // 烟气
+ israCheckType: [],
israDayStatistic: [],//缺陷统计
israWeekStatistic: [],//缺陷统计
israMonthStatistic: [],//缺陷统计
@@ -73,8 +74,17 @@ const state = {
"productionLineId": 1737312466842456065,
"sumInputNum": 27
}], // SJG产线产量及良品率
- sjgEquipment:[],// SJG设备报警
-
+ sjgEquipment:[
+ {name: 'sadd', error:false,code: 'EQ202312121624540000072',status: "正常"}
+ ],// SJG设备报警
+ workOrder: [], // 工单监控
+ defectSum: [], // 缺陷汇总
+ order: [],// 订单完成情况
+ yieldRateTable: [],// 本日生产良率table
+ cutChartDay:[],
+ cutChartWeek:[],
+ cutChartMonth:[],
+ cutChartYear:[]
};
const mutations = {
SET_FANFREQUENCYINFO: (state, fanFrequencyInfo) => {
@@ -123,12 +133,13 @@ const mutations = {
state.exhaustGasInfo = exhaustGasInfo
},
SET_EXHAUSTGASCHART: (state, exhaustGasChart) => {
- state.gasChartDayTrend = exhaustGasChart.gasChartDayTrend
- state.gasChartWeekTrend = exhaustGasChart.gasChartWeekTrend
- state.gasChartMonthTrend = exhaustGasChart.gasChartMonthTrend
- state.gasChartYearTrend = exhaustGasChart.gasChartYearTrend
+ state.gasChartDayTrend = exhaustGasChart.dayTrend
+ state.gasChartWeekTrend = exhaustGasChart.weekTrend
+ state.gasChartMonthTrend = exhaustGasChart.monthTrend
+ state.gasChartYearTrend = exhaustGasChart.yearTrend
},
SET_DEFECTCHART: (state, israStatistic) => {
+ state.israCheckType = israStatistic.checkType
state.israDayStatistic = israStatistic.dayStatistic
state.israWeekStatistic = israStatistic.weekStatistic
state.israMonthStatistic = israStatistic.monthStatistic
@@ -136,6 +147,33 @@ const mutations = {
},
SET_PRODUCTLINE: (state, productline) => {
state.productline = productline
+ },
+ SET_SJGEQ: (state, equipment) => {
+ state.sjgEquipment = equipment
+ },
+ SET_WORKORDER: (state, workOrder) => {
+ state.workOrder = workOrder
+ },
+ SET_DEFECTSUM: (state, defectSum) => {
+ state.defectSum = defectSum
+ },
+ SET_ORDER: (state, order) => {
+ state.order = order
+ },
+ SET_YIELDRATETABLE: (state, yieldRateTable) => {
+ state.yieldRateTable = yieldRateTable
+ },
+ SET_CUTCHARDAY: (state, cutChartDay) => {
+ state.cutChartDay = cutChartDay
+ },
+ SET_CUTCHARWEEK: (state, cutChartWeek) => {
+ state.cutChartWeek = cutChartWeek
+ },
+ SET_CUTCHARMONTH: (state, cutChartMonth) => {
+ state.cutChartMonth = cutChartMonth
+ },
+ SET_CUTCHARYEAR: (state, cutChartYear) => {
+ state.cutChartYear = cutChartYear
}
};
const actions = {
@@ -180,6 +218,33 @@ const actions = {
setProductline({ commit }, productline) {
commit('SET_PRODUCTLINE', productline.payload)
},
+ setSJGEq({ commit }, equipment) {
+ commit('SET_SJGEQ', equipment.payload)
+ },
+ setWorkOrder({ commit }, workOrder) {
+ commit('SET_WORKORDER', workOrder.payload)
+ },
+ setDefectSum({ commit }, defectSum) {
+ commit('SET_DEFECTSUM', defectSum.payload)
+ },
+ setOrder({ commit }, order) {
+ commit('SET_ORDER', order.payload)
+ },
+ setYieldRateTable({ commit }, yieldRateTable) {
+ commit('SET_YIELDRATETABLE', yieldRateTable.payload)
+ },
+ setCutChartDay({ commit }, cutChartDay) {
+ commit('SET_CUTCHARDAY', cutChartDay.payload)
+ },
+ setCutChartWeek({ commit }, cutChartWeek) {
+ commit('SET_CUTCHARWEEK', cutChartWeek.payload)
+ },
+ setCutChartMonth({ commit }, cutChartMonth) {
+ commit('SET_CUTCHARMONTH', cutChartMonth.payload)
+ },
+ setCutChartYear({ commit }, cutChartYear) {
+ commit('SET_CUTCHARYEAR', cutChartYear.payload)
+ }
};
export default {
namespaced: true,
diff --git a/src/styles/index.scss b/src/styles/index.scss
index d162abed..7c145d7e 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -200,4 +200,12 @@ input, textarea{
// 弹出框,上下分布,去掉label的padding-bottom
.el-form--label-top .el-form-item__label {
padding: 0;
+}
+
+// 大屏滚动表格
+.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;
}
\ No newline at end of file
diff --git a/src/views/databoard/components/DefectChart.vue b/src/views/databoard/components/DefectChart.vue
index f10647b4..deb892ec 100644
--- a/src/views/databoard/components/DefectChart.vue
+++ b/src/views/databoard/components/DefectChart.vue
@@ -17,6 +17,9 @@ export default {
}
},
computed: {
+ israCheckType() {
+ return this.$store.state.websocket.israCheckType
+ },
israDayStatistic() {
return this.$store.state.websocket.israDayStatistic
},
@@ -34,7 +37,7 @@ export default {
israDayStatistic: {
handler(newVal, oldVal) {
if (this.chartTime === '日') {
- this.tempData = israDayStatistic
+ this.tempData = this.israDayStatistic
this.updateChart()
}
}
@@ -42,7 +45,7 @@ export default {
israWeekStatistic: {
handler(newVal, oldVal) {
if (this.chartTime === '周') {
- this.tempData = israWeekStatistic
+ this.tempData = this.israWeekStatistic
this.updateChart()
}
}
@@ -50,7 +53,7 @@ export default {
israMonthStatistic: {
handler(newVal, oldVal) {
if (this.chartTime === '月') {
- this.tempData = israMonthStatistic
+ this.tempData = this.israMonthStatistic
this.updateChart()
}
}
@@ -58,7 +61,7 @@ export default {
israYearStatistic: {
handler(newVal, oldVal) {
if (this.chartTime === '年') {
- this.tempData = israYearStatistic
+ this.tempData = this.israYearStatistic
this.updateChart()
}
}
@@ -80,56 +83,34 @@ export default {
this.chart.dispose()
}
this.chart = echarts.init(this.$el);
- let legendData = []
let xData = []
- let yData = []
+ let seriesData = []
+ for (let i = 0;i < this.israCheckType.length; i++) {
+ let obj = {}
+ obj.type = 'bar'
+ obj.stack = 'all'
+ obj.emphasis = {
+ focus:"series"
+ }
+ obj.name = this.israCheckType[i]
+ obj.barWidth = 12
+ obj.data = []
+ for (let j = 0;j < this.tempData.length; j++) {
+ for (let k = 0; k < this.tempData[j].data.length; k++) {
+ if (this.israCheckType[i] === this.tempData[j].data[k].checkType) {
+ obj.data.push(this.tempData[j].data[k].checkNum)
+ }
+ }
+ }
+ seriesData.push(obj)
+ }
+
this.tempData && this.tempData.length > 0 && this.tempData.map(item => {
xData.push(item.name)
})
- var series = [
- {
- data: [120, 200, 150, 80, 70, 110, 130],
- type: 'bar',
- stack: 'all',
- name: 'a',
- barWidth: 12,
- },
- {
- data: [10, 46, 64, '-', 0, '-', 0],
- type: 'bar',
- stack: 'all',
- name: 'b',
- barWidth: 12,
- },
- {
- data: [30, '-', 0, 20, 10, '-', 0],
- type: 'bar',
- stack: 'all',
- barWidth: 12,
- name: 'c'
- },
- {
- data: [30, '-', 0, 20, 10, '-', 0],
- type: 'bar',
- stack: 'all',
- barWidth: 12,
- name: 'd'
- },
- {
- data: [10, 20, 150, 0, '-', 50, 10],
- type: 'bar',
- stack: 'all',
- name: 'e',
- barWidth: 12,
- label: {
- show: true,
- position: 'top'
- }
- }
- ];
var option = {
- color: ['#2760FF','#5B9BFF','#FFD160','#8167F6', '#99D66C', '#FF8A40'],
- grid: { top: 40, right: 12, bottom: 20, left: 48 },
+ color: ["#2760FF", "#8167F6", "#5B9BFF", "#99D66C", "#FFD160", "#FF8A40"],
+ grid: { top: 80, right: 12, bottom: 20, left: 48 },
legend: {
top: 10,
left: 80,
@@ -142,7 +123,7 @@ export default {
color: "#DFF1FE",
fontSize: 12,
},
- data:['a','b','c','d','e'],
+ data:this.israCheckType,
},
xAxis: {
type: "category",
@@ -191,7 +172,7 @@ export default {
},
className: "defect-chart-tooltip"
},
- series: series
+ series: seriesData
};
option && this.chart.setOption(option)
}
diff --git a/src/views/databoard/components/FlueGas.vue b/src/views/databoard/components/FlueGas.vue
index aaecbcf9..dfd286e9 100644
--- a/src/views/databoard/components/FlueGas.vue
+++ b/src/views/databoard/components/FlueGas.vue
@@ -119,19 +119,19 @@ export default {
}
switch (this.chartType) {
case '氧气含量':{
- temp2 = temp1.O2_float || []
+ temp2 = temp1?.O2_float || []
break;
}
case '二氧化硫':{
- temp2 = temp1.SO2_float || []
+ temp2 = temp1?.SO2_float || []
break;
}
case '一氧化氮':{
- temp2 = temp1.NOX_float || []
+ temp2 = temp1?.NOX_float || []
break;
}
case '颗粒物':{
- temp2 = temp1.dust_float || []
+ temp2 = temp1?.dust_float || []
break;
}
default:
diff --git a/src/views/databoard/components/GasChart.vue b/src/views/databoard/components/GasChart.vue
index 87445833..4971e1be 100644
--- a/src/views/databoard/components/GasChart.vue
+++ b/src/views/databoard/components/GasChart.vue
@@ -221,6 +221,7 @@ export default {
series: seriesData,
tooltip: {
trigger: 'axis',
+ className: "gas-tooltip"
},
}
option && this.chart.setOption(option)
@@ -269,3 +270,13 @@ export default {
height: 100%;
}
+
diff --git a/src/views/databoard/components/ScrollBoard.vue b/src/views/databoard/components/ScrollBoard.vue
index 033c602f..bc4524ad 100644
--- a/src/views/databoard/components/ScrollBoard.vue
+++ b/src/views/databoard/components/ScrollBoard.vue
@@ -1,6 +1,6 @@
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/views/databoard/components/Switcher.vue b/src/views/databoard/components/Switcher.vue
index 341e8946..026f6e01 100644
--- a/src/views/databoard/components/Switcher.vue
+++ b/src/views/databoard/components/Switcher.vue
@@ -7,7 +7,7 @@
-
+
{{ mode }}
;
@@ -17,18 +17,31 @@
export default {
name: 'Switcher',
components: {},
- props: {},
+ props: {
+ showTitle:{
+ type: Array,
+ required: true,
+ default: () => {
+ return []
+ }
+ }
+ },
data() {
return {
- value: true,
+ value: false,
};
},
computed: {
mode() {
- return this.value ? '历史详情' : '实时数据';
+ return this.value ? this.showTitle[0]: this.showTitle[1];
},
},
- methods: {},
+ methods: {
+ handleClick(v) {
+ this.value = v;
+ this.$emit('emitFun', v);
+ }
+ },
};
diff --git a/src/views/databoard/components/YieldRateChart.vue b/src/views/databoard/components/YieldRateChart.vue
new file mode 100644
index 00000000..8575bb5e
--- /dev/null
+++ b/src/views/databoard/components/YieldRateChart.vue
@@ -0,0 +1,317 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/databoard/deepProcessing/DefectSum.vue b/src/views/databoard/deepProcessing/DefectSum.vue
index 1fc95112..60ca0a60 100644
--- a/src/views/databoard/deepProcessing/DefectSum.vue
+++ b/src/views/databoard/deepProcessing/DefectSum.vue
@@ -2,17 +2,21 @@
\ No newline at end of file
diff --git a/src/views/databoard/deepProcessing/EqAlarm.vue b/src/views/databoard/deepProcessing/EqAlarm.vue
index 6b6fc21f..9e82e9bb 100644
--- a/src/views/databoard/deepProcessing/EqAlarm.vue
+++ b/src/views/databoard/deepProcessing/EqAlarm.vue
@@ -2,19 +2,24 @@
\ No newline at end of file
diff --git a/src/views/databoard/deepProcessing/WorkOrderMonitoring.vue b/src/views/databoard/deepProcessing/WorkOrderMonitoring.vue
index 47271bc5..fe2c1d11 100644
--- a/src/views/databoard/deepProcessing/WorkOrderMonitoring.vue
+++ b/src/views/databoard/deepProcessing/WorkOrderMonitoring.vue
@@ -2,17 +2,21 @@
\ No newline at end of file
diff --git a/src/views/databoard/kiln/EnergeCost.vue b/src/views/databoard/kiln/EnergeCost.vue
index b152d828..719c962c 100644
--- a/src/views/databoard/kiln/EnergeCost.vue
+++ b/src/views/databoard/kiln/EnergeCost.vue
@@ -45,7 +45,7 @@
import Container from '../components/Container';
import ShadowRect from '../components/ShadowRect.vue';
import SplitLine from '../components/line';
-import Switcher from '../components/Switcher';
+// import Switcher from '../components/Switcher';
import EnergeTop from './EnergeTop';
import GasChart from '../components/GasChart.vue';
import SelectorBtnGroup from '../components/SelectorBtnGroup';
@@ -55,7 +55,6 @@ export default {
Container,
ShadowRect,
SplitLine,
- Switcher,
EnergeTop,
GasChart,
SelectorBtnGroup,
diff --git a/src/views/databoard/kiln/FanSequence.vue b/src/views/databoard/kiln/FanSequence.vue
index c23c6316..2af2b190 100644
--- a/src/views/databoard/kiln/FanSequence.vue
+++ b/src/views/databoard/kiln/FanSequence.vue
@@ -42,10 +42,10 @@
\ No newline at end of file
diff --git a/src/views/databoard/wholePlant/YieldRate.vue b/src/views/databoard/wholePlant/YieldRate.vue
index 6c82ae63..a4a4d2bb 100644
--- a/src/views/databoard/wholePlant/YieldRate.vue
+++ b/src/views/databoard/wholePlant/YieldRate.vue
@@ -1,20 +1,53 @@
-
-
-
+
-
\ No newline at end of file
diff --git a/src/websocket/wsInterface.js b/src/websocket/wsInterface.js
index 6e2d708b..355c39ae 100644
--- a/src/websocket/wsInterface.js
+++ b/src/websocket/wsInterface.js
@@ -6,7 +6,7 @@ import store from "@/store";
const timestr = new Date().getTime()
const dcsConn = new WsConnect(
// websocket地址
- 'ws://10.70.180.10:8081/xc-screen/websocket/dcsmsg'+timestr,
+ process.env.VUE_APP_Socket_Dcs_API + '/xc-screen/websocket/dcsmsg'+timestr,
// 传递给后台的数据
'',
(data) => {
@@ -39,7 +39,7 @@ const dcsConn = new WsConnect(
)
// ISRA
const mesIsra = new WsConnect(
- 'ws://10.70.2.2:8080/websocket/message?userId=KILN'+timestr,
+ process.env.VUE_APP_Socket_API + '/websocket/message?userId=KILN'+timestr,
'',
(data) => {
// console.log('mes ISRA成功的回调函数, 接收到的data数据: ', data)
@@ -51,10 +51,6 @@ const mesIsra = new WsConnect(
store.dispatch({type: "websocket/setIsraKiln", payload:msgData.detData.dayStatistic})
break;
}
- // case "KilnInfo": {
- // // store.dispatch({type: "websocket/setKilnInfo", payload: msgData.data.kilnInfo})
- // break;
- // }
default:
}
},
@@ -65,7 +61,7 @@ const mesIsra = new WsConnect(
// 原料 MA
const mesMA = new WsConnect(
- 'ws://10.70.2.2:8080/websocket/message?userId=MA'+timestr,
+ process.env.VUE_APP_Socket_API + '/websocket/message?userId=MA'+timestr,
'',
(data) => {
// console.log('mes 原料成功的回调函数, 接收到的data数据: ', data)
@@ -76,10 +72,6 @@ const mesMA = new WsConnect(
store.dispatch({type: "websocket/setMaterial", payload:msgData.data})
break;
}
- // case "KilnInfo": {
- // // store.dispatch({type: "websocket/setKilnInfo", payload: msgData.data.kilnInfo})
- // break;
- // }
default:
}
},
@@ -90,7 +82,7 @@ const mesMA = new WsConnect(
// 能耗 EN
const mesEN = new WsConnect(
// websocket地址
- 'ws://10.70.2.2:8080/websocket/message?userId=ENERGY'+timestr,
+ process.env.VUE_APP_Socket_API + '/websocket/message?userId=ENERGY'+timestr,
// 传递给后台的数据
'',
// 成功拿到后台返回的数据的回调函数
@@ -122,7 +114,7 @@ const mesEN = new WsConnect(
// 烟气 GAS
const mesGAS = new WsConnect(
// websocket地址
- 'ws://10.70.2.2:8080/websocket/message?userId=GAS'+timestr,
+ process.env.VUE_APP_Socket_API + '/websocket/message?userId=GAS'+timestr,
// 传递给后台的数据
'',
// 成功拿到后台返回的数据的回调函数
@@ -153,7 +145,7 @@ const mesGAS = new WsConnect(
// 缺陷分类/统计 IS
const mesIS = new WsConnect(
// websocket地址
- 'ws://10.70.2.2:8080/websocket/message?userId=IS'+timestr,
+ process.env.VUE_APP_Socket_API + '/websocket/message?userId=IS'+timestr,
// 传递给后台的数据
'',
// 成功拿到后台返回的数据的回调函数
@@ -164,6 +156,7 @@ const mesIS = new WsConnect(
switch (msgData?.type) {
case "isra": {
store.dispatch({type: "websocket/setDefectChart", payload:{
+ checkType: msgData.detData.checkType,
dayStatistic: msgData.detData.dayStatistic,
weekStatistic: msgData.detData.weekStatistic,
monthStatistic: msgData.detData.monthStatistic,
@@ -183,9 +176,7 @@ const mesIS = new WsConnect(
// 深加工生产运行驾驶舱(除能源) SJG
const mesSJG = new WsConnect(
// websocket地址
- // 'ws://10.70.2.2:8080/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,
+ process.env.VUE_APP_Socket_API + '/websocket/message?userId=SJG'+timestr,
// 传递给后台的数据
'',
// 成功拿到后台返回的数据的回调函数
@@ -202,6 +193,14 @@ const mesSJG = new WsConnect(
store.dispatch({type: "websocket/setSJGEq", payload:msgData.detData})
break;
}
+ case "order": {
+ store.dispatch({type: "websocket/setWorkOrder", payload:msgData.detData})
+ break;
+ }
+ case "defectSum": {
+ store.dispatch({type: "websocket/setDefectSum", payload:msgData.detData})
+ break;
+ }
default:
}
},
@@ -211,6 +210,76 @@ const mesSJG = new WsConnect(
}
)
+// 订单完成情况 OV
+const mesOV = new WsConnect(
+ // websocket地址
+ process.env.VUE_APP_Socket_API + '/websocket/message?userId=OV'+timestr,
+ // 'ws://192.168.0.33:48082/websocket/message?userId=OV'+timestr,
+ // 传递给后台的数据
+ '',
+ // 成功拿到后台返回的数据的回调函数
+ (data) => {
+ // console.log('mes 产线产量及良品率成功的回调函数, 接收到的data数据: ', data)
+ let msgData = JSON.parse(data)
+ if (msgData == null) return;
+ switch (msgData?.type) {
+ case "order": {
+ store.dispatch({type: "websocket/setOrder", payload:msgData.detData})
+ break;
+ }
+ default:
+ }
+ },
+ // websocket连接失败的回调函数
+ (err) => {
+ console.log('失败的回调函数', err)
+ }
+)
+
+// 本日生产良品率 CUTTING
+const mesCUTTING = new WsConnect(
+ // websocket地址
+ process.env.VUE_APP_Socket_API + '/websocket/message?userId=CUTTING'+timestr,
+ // 传递给后台的数据
+ '',
+ // 成功拿到后台返回的数据的回调函数
+ (data) => {
+ // console.log('mes 产线产量及良品率成功的回调函数, 接收到的data数据: ', data)
+ let msgData = JSON.parse(data)
+ if (msgData == null) return;
+ console.log(msgData)
+ switch (msgData?.type) {
+ case "cutting": {
+ if (msgData?.name === 'table') {
+ store.dispatch({type: "websocket/setYieldRateTable", payload:msgData.data})
+ return
+ }
+ if (msgData?.dateType === 'day') {
+ store.dispatch({type: "websocket/setCutChartDay", payload:msgData.detData})
+ return
+ }
+ if (msgData?.dateType === 'weekly') {
+ store.dispatch({type: "websocket/setCutChartWeek", payload:msgData.detData})
+ return
+ }
+ if (msgData?.dateType === 'month') {
+ store.dispatch({type: "websocket/setCutChartMonth", payload:msgData.detData})
+ return
+ }
+ if (msgData?.dateType === 'year') {
+ store.dispatch({type: "websocket/setCutChartYear", payload:msgData.detData})
+ return
+ }
+ break;
+ }
+ default:
+ }
+ },
+ // websocket连接失败的回调函数
+ (err) => {
+ console.log('失败的回调函数', err)
+ }
+)
export const getDcsMsg = () => {
dcsConn.createWebSoket()
@@ -220,6 +289,8 @@ export const getDcsMsg = () => {
mesGAS.createWebSoket()
mesIS.createWebSoket()
mesSJG.createWebSoket()
+ mesOV.createWebSoket()
+ mesCUTTING.createWebSoket()
}
export const closeDcsMsg = () => {
dcsConn.closeWebsocket()
@@ -229,4 +300,6 @@ export const closeDcsMsg = () => {
mesGAS.closeWebsocket()
mesIS.closeWebsocket()
mesSJG.closeWebsocket()
+ mesOV.closeWebsocket()
+ mesCUTTING.closeWebsocket()
}
\ No newline at end of file