diff --git a/package.json b/package.json
index 436188f4..c5dc2ba0 100644
--- a/package.json
+++ b/package.json
@@ -43,6 +43,7 @@
"dependencies": {
"@antv/x6": "^2.15.3",
"@babel/parser": "7.18.4",
+ "@jiaminghi/data-view": "^2.10.0",
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.27.2",
"benz-amr-recorder": "^1.1.5",
diff --git a/public/favicon.ico b/public/favicon.ico
index 47918ab0..71ea1add 100644
Binary files a/public/favicon.ico and b/public/favicon.ico differ
diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue
index 7b7b76fc..913a7f6f 100644
--- a/src/layout/components/TagsView/index.vue
+++ b/src/layout/components/TagsView/index.vue
@@ -88,7 +88,7 @@ export default {
visitedViews(newVal, oldVal){
let num = 0
newVal && newVal.map(item => {
- if (item.path === '/databoard/kiln' || item.path === '/databoard/whole-plant') {
+ if (item.path === '/databoard/kiln' || item.path === '/databoard/whole-plant' || item.path === '/databoard/deep-processing') {
num++
}
})
diff --git a/src/main.js b/src/main.js
index bcac305d..cf12f4cc 100644
--- a/src/main.js
+++ b/src/main.js
@@ -9,6 +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 './assets/icons'; // icon
import './permission'; // permission control
@@ -78,6 +79,7 @@ Vue.use(CodeBrickZj)
Vue.use(directive);
Vue.use(plugins);
Vue.use(VueMeta);
+// Vue.use(dataV)
// Vue.use(hljs.vuePlugin);
import scroll from 'vue-seamless-scroll'
Vue.use(scroll)
diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js
index 27a0782c..7966e519 100644
--- a/src/store/modules/websocket.js
+++ b/src/store/modules/websocket.js
@@ -4,7 +4,7 @@ const state = {
gasInfo:{},// 天然气流量图
sumGasInfo: {},// 天然气总量
- israKiln:[],// ISRA缺陷检测
+ israKiln:[],// ISRA窑炉缺陷检测
material:[],// 原料
energyInfo: {
elecQty1: '',
@@ -14,11 +14,17 @@ const state = {
energyWeekTrend:[],
energyMonthTrend:[],
energyYearTrend:[],// 能耗图
+ energyMonitoring: [], // 能源监控
exhaustGasInfo:{}, // 烟气
gasChartDayTrend:{}, // 烟气
gasChartWeekTrend:{}, // 烟气
gasChartMonthTrend:{}, // 烟气
- gasChartYearTrend:{} // 烟气
+ gasChartYearTrend:{}, // 烟气
+ israDayStatistic: [],//缺陷统计
+ israWeekStatistic: [],//缺陷统计
+ israMonthStatistic: [],//缺陷统计
+ israYearStatistic: [],//缺陷统计
+ productline: [] // 产线产量及良品率
};
const mutations = {
SET_FANFREQUENCYINFO: (state, fanFrequencyInfo) => {
@@ -60,6 +66,9 @@ const mutations = {
state.energyYearTrend = energyTrend.year
}
},
+ SET_ENERGY_MONITORING: (state, energyMonitoring) => {
+ state.energyMonitoring = energyMonitoring
+ },
SET_EXHAUSTGASINFO: (state, exhaustGasInfo) => {
state.exhaustGasInfo = exhaustGasInfo
},
@@ -68,6 +77,15 @@ const mutations = {
state.gasChartWeekTrend = exhaustGasChart.gasChartWeekTrend
state.gasChartMonthTrend = exhaustGasChart.gasChartMonthTrend
state.gasChartYearTrend = exhaustGasChart.gasChartYearTrend
+ },
+ SET_DEFECTCHART: (state, israStatistic) => {
+ state.israDayStatistic = israStatistic.dayStatistic
+ state.israWeekStatistic = israStatistic.weekStatistic
+ state.israMonthStatistic = israStatistic.monthStatistic
+ state.israYearStatistic = israStatistic.yearStatistic
+ },
+ SET_PRODUCTLINE: (state, productline) => {
+ state.productline = productline
}
};
const actions = {
@@ -97,12 +115,21 @@ const actions = {
setEnergyTrend({ commit }, energyTrend) {
commit('SET_ENERGYTREND', energyTrend.payload)
},
+ setEnergyMonitoring({ commit }, energyMonitoring) {
+ commit('SET_ENERGY_MONITORING', energyMonitoring.payload)
+ },
setExhaustGasInfo({ commit }, exhaustGasInfo) {
commit('SET_EXHAUSTGASINFO', exhaustGasInfo.payload)
},
setExhaustGasChart({ commit }, exhaustGasChart) {
commit('SET_EXHAUSTGASCHART', exhaustGasChart.payload)
},
+ setDefectChart({ commit }, israStatistic) {
+ commit('SET_DEFECTCHART', israStatistic.payload)
+ },
+ setProductline({ commit }, productline) {
+ commit('SET_PRODUCTLINE', productline.payload)
+ },
};
export default {
namespaced: true,
diff --git a/src/views/databoard/assets/defectStatistics.png b/src/views/databoard/assets/defectStatistics.png
new file mode 100644
index 00000000..c65bd849
Binary files /dev/null and b/src/views/databoard/assets/defectStatistics.png differ
diff --git a/src/views/databoard/assets/eqMonitor.png b/src/views/databoard/assets/eqMonitor.png
new file mode 100644
index 00000000..bb63e762
Binary files /dev/null and b/src/views/databoard/assets/eqMonitor.png differ
diff --git a/src/views/databoard/assets/goodRate.png b/src/views/databoard/assets/goodRate.png
new file mode 100644
index 00000000..847e9c0d
Binary files /dev/null and b/src/views/databoard/assets/goodRate.png differ
diff --git a/src/views/databoard/assets/order.png b/src/views/databoard/assets/order.png
new file mode 100644
index 00000000..f7b1ee13
Binary files /dev/null and b/src/views/databoard/assets/order.png differ
diff --git a/src/views/databoard/components/Container.vue b/src/views/databoard/components/Container.vue
index 36a8742e..e86c92e5 100644
--- a/src/views/databoard/components/Container.vue
+++ b/src/views/databoard/components/Container.vue
@@ -55,6 +55,24 @@ export default {
return require('../assets/msg.png');
case '烟气处理':
return require('../assets/gas.png');
+ case '产线缺陷统计':
+ return require('../assets/defectStatistics.png');
+ case '产线当日缺陷分类':
+ return require('../assets/check.png');
+ case '本日生产良品率':
+ return require('../assets/goodRate.png');
+ case '订单完成情况':
+ return require('../assets/order.png');
+ case '设备报警':
+ return require('../assets/goodRate.png');
+ case '各工序缺陷汇总':
+ return require('../assets/check.png');
+ case '能源监控':
+ return require('../assets/defectStatistics.png');
+ case '产线产量及良品率':
+ return require('../assets/order.png');
+ case '工单监控':
+ return require('../assets/eqMonitor.png');
}
},
},
diff --git a/src/views/databoard/components/DefectChart.vue b/src/views/databoard/components/DefectChart.vue
new file mode 100644
index 00000000..f10647b4
--- /dev/null
+++ b/src/views/databoard/components/DefectChart.vue
@@ -0,0 +1,216 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/databoard/components/DefectClassChart.vue b/src/views/databoard/components/DefectClassChart.vue
new file mode 100644
index 00000000..a1d4a9a7
--- /dev/null
+++ b/src/views/databoard/components/DefectClassChart.vue
@@ -0,0 +1,170 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/databoard/components/EnergeMonitoringChart.vue b/src/views/databoard/components/EnergeMonitoringChart.vue
new file mode 100644
index 00000000..c845341d
--- /dev/null
+++ b/src/views/databoard/components/EnergeMonitoringChart.vue
@@ -0,0 +1,157 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/databoard/components/GasChart.vue b/src/views/databoard/components/GasChart.vue
index 3a7b46f9..87445833 100644
--- a/src/views/databoard/components/GasChart.vue
+++ b/src/views/databoard/components/GasChart.vue
@@ -51,27 +51,34 @@ export default {
}
},
watch: {
- energyWeekTrend: {// 监听时间变化,更新图
+ energyWeekTrend: {// 监听周电能,更新图
handler(newVal, oldVal) {
if (this.chartTime === '周' && this.chartType === '电耗能') {
this.updateChart()
}
}
},
- energyMonthTrend: {// 监听时间变化,更新图
+ energyMonthTrend: {// 监听月电能,更新图
handler(newVal, oldVal) {
if (this.chartTime === '月' && this.chartType === '电耗能') {
this.updateChart()
}
}
},
- energyYearTrend: {// 监听时间变化,更新图
+ energyYearTrend: {// 监听年电能,更新图
handler(newVal, oldVal) {
if (this.chartTime === '年' && this.chartType === '电耗能') {
this.updateChart()
}
}
},
+ gasChartMsg: {// 监听天然气,更新图
+ handler(newVal, oldVal) {
+ if (this.chartType === '天然气I' || this.chartType === '天然气II') {
+ this.updateChart()
+ }
+ }
+ },
chartTime: {// 监听时间变化,更新图
handler(newVal, oldVal) {
this.updateChart()
@@ -114,33 +121,27 @@ export default {
break;
}
case '天然气I':{
- yData = this.gasChartMsg.hisSumGas1 || []
+ if (this.chartTime === '周') {
+ yData = this.gasChartMsg.hisSumGas1For7Day || []
+ }else if(this.chartTime === '月') {
+ yData = this.gasChartMsg.sumGas1ForMonth || []
+ }else{
+ yData = this.gasChartMsg.sumGas1ForYear || []
+ }
gasName = '天然气I'
- xData = Array(7)
- .fill(1)
- .map((_, index) => {
- const today = new Date();
- const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
- return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
- dtimestamp
- ).getDate()}`;
- })
- .reverse()
+ xData = this.getXdata()
break;
}
default:
gasName = '天然气II'
- yData = this.gasChartMsg.hisSumGas2 || []
- xData = Array(7)
- .fill(1)
- .map((_, index) => {
- const today = new Date();
- const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
- return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
- dtimestamp
- ).getDate()}`;
- })
- .reverse()
+ if (this.chartTime === '周') {
+ yData = this.gasChartMsg.hisSumGas2For7Day || []
+ }else if(this.chartTime === '月') {
+ yData = this.gasChartMsg.sumGas2ForMonth || []
+ }else{
+ yData = this.gasChartMsg.sumGas2ForYear || []
+ }
+ xData = this.getXdata()
}
if (yData.length == 0) {
seriesData = []
@@ -177,7 +178,7 @@ export default {
this.chart = echarts.init(this.$el);
var option = {
color: colors,
- grid: { top: 32, right: 12, bottom: 20, left: 48 },
+ grid: { top: 32, right: 12, bottom: 20, left: 60 },
xAxis: {
type: 'category',
data: xData,
@@ -223,6 +224,40 @@ export default {
},
}
option && this.chart.setOption(option)
+ },
+ getXdata() {
+ const today = new Date();
+ const currentYear = today.getFullYear();
+ const currentMonth = today.getMonth() + 1;
+ let days = 30;
+ if (this.chartTime === '周') {
+ return Array(7)
+ .fill(1)
+ .map((_, index) => {
+ const today = new Date();
+ const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
+ return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
+ dtimestamp
+ ).getDate()}`;}).reverse()
+ }else if (this.chartTime == "月") {
+ if (currentMonth in [1, 3, 5, 7, 8, 10, 12]) {
+ days = 31;
+ } else if (currentMonth == 2) {
+ days = this.isLeapYear(currentYear) ? 29 : 28;
+ }
+ return Array(days)
+ .fill(1)
+ .map((_, index) => {
+ return `${currentMonth}.${days - index}`;}).reverse()
+ } else {
+ return Array(12)
+ .fill(1)
+ .map((_, index) => {
+ return `${currentYear}.${12 - index}`;}).reverse()
+ }
+ },
+ isLeapYear(year) {
+ return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
}
},
};
diff --git a/src/views/databoard/components/NumRateChart.vue b/src/views/databoard/components/NumRateChart.vue
new file mode 100644
index 00000000..f8d4c00c
--- /dev/null
+++ b/src/views/databoard/components/NumRateChart.vue
@@ -0,0 +1,204 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/databoard/deepProcessing/BottomTwo.vue b/src/views/databoard/deepProcessing/BottomTwo.vue
index d7dda8dc..8d3f5ccb 100644
--- a/src/views/databoard/deepProcessing/BottomTwo.vue
+++ b/src/views/databoard/deepProcessing/BottomTwo.vue
@@ -1,22 +1,34 @@
排放浓度
二氧化硫
排放浓度
- {{exhaustGasInfo.SO2_float}}mg/m³ + {{exhaustGasInfo?.SO2_float ? (exhaustGasInfo?.SO2_float).toFixed(2): ''}}mg/m³