From 2c62b12634a37586391f2465c99b0db5a66bc0ec Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期一, 06 五月 2024 16:15:31 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before into master

---
 src/views/equipment/mqtt-show/components/largeAreaChart.vue |  124 +++++++++++++++++++++++++++++++
 src/views/equipment/mqtt-show/index.vue                     |   71 +++++++++++++++++
 src/views/quality/processInspect/processInspect-form.vue    |    2 
 3 files changed, 196 insertions(+), 1 deletions(-)

diff --git a/src/views/equipment/mqtt-show/components/largeAreaChart.vue b/src/views/equipment/mqtt-show/components/largeAreaChart.vue
new file mode 100644
index 0000000..5bdaf75
--- /dev/null
+++ b/src/views/equipment/mqtt-show/components/largeAreaChart.vue
@@ -0,0 +1,124 @@
+<template>
+  <div ref="myChart" style="width: 100%; height: 100%;"></div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+var myChart = null
+var option = null
+
+let base = +new Date(1968, 9, 3)
+let oneDay = 24 * 3600 * 1000
+let date = []
+let data = [Math.random() * 300]
+for (let i = 1; i < 20000; i++) {
+  var now = new Date((base += oneDay))
+  date.push([now.getFullYear(), now.getMonth() + 1, now.getDate()].join('/'))
+  data.push(Math.round((Math.random() - 0.5) * 20 + data[i - 1]))
+}
+
+export default {
+  //   props: {
+  //     yAxisMonth: {
+  //       type: Array,
+  //       default: []
+  //     },
+  //     seriesData: {
+  //       type: Array,
+  //       default: []
+  //     }
+  //   },
+  data() {
+    return {
+      option: {
+        tooltip: {
+          trigger: 'axis',
+          position: function(pt) {
+            return [pt[0], '10%']
+          }
+        },
+        title: {
+          left: '5%',
+          text: 'Large Ara Chart'
+        },
+        toolbox: {
+          right: '5%',
+          feature: {
+            dataZoom: {
+              yAxisIndex: 'none'
+            },
+            restore: {},
+            saveAsImage: {}
+          }
+        },
+        grid: {
+          right: '5%'
+        },
+        xAxis: {
+          type: 'category',
+          boundaryGap: false,
+          data: date
+        },
+        yAxis: {
+          type: 'value',
+          boundaryGap: [0, '100%']
+        },
+        dataZoom: [
+          {
+            type: 'inside',
+            start: 0,
+            end: 10
+          },
+          {
+            start: 0,
+            end: 10
+          }
+        ],
+        series: [
+          {
+            name: 'Fake Data',
+            type: 'line',
+            symbol: 'none',
+            sampling: 'lttb',
+            itemStyle: {
+              color: 'rgb(255, 70, 131)'
+            },
+            areaStyle: {
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                {
+                  offset: 0,
+                  color: 'rgb(255, 158, 68)'
+                },
+                {
+                  offset: 1,
+                  color: 'rgb(255, 70, 131)'
+                }
+              ])
+            },
+            data: data
+          }
+        ]
+      }
+    }
+  },
+  mounted() {
+    myChart = echarts.init(this.$refs.myChart)
+    option = this.makeOption()
+    this.initDrag()
+  },
+  methods: {
+    makeOption() {},
+    initDrag() {
+      myChart.setOption((option = this.option))
+
+      option && myChart.setOption(option)
+      // 椤甸潰鍙戠敓鍙樺寲tree涔熸敼鍙�
+      window.addEventListener('resize', () => {
+        if (myChart) myChart.resize()
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>
diff --git a/src/views/equipment/mqtt-show/index.vue b/src/views/equipment/mqtt-show/index.vue
new file mode 100644
index 0000000..8d3a4fe
--- /dev/null
+++ b/src/views/equipment/mqtt-show/index.vue
@@ -0,0 +1,71 @@
+<template>
+  <div>
+    <div class="header_div">
+      <el-select v-model="value" placeholder="璇烽�夋嫨">
+        <el-option
+          v-for="item in options"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+    </div>
+    <el-row>
+      <el-col
+        v-for="(v, k) in index"
+        :key="k"
+        style="height: 40vh; padding-top: 0.4em;"
+        :span="12"
+        ><largeAreaChart
+      /></el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import largeAreaChart from './components/largeAreaChart.vue'
+export default {
+  components: {
+    largeAreaChart: largeAreaChart
+  },
+  data() {
+    return {
+      index: 7,
+      options: [
+        {
+          value: '閫夐」1',
+          label: '榛勯噾绯�'
+        },
+        {
+          value: '閫夐」2',
+          label: '鍙岀毊濂�'
+        },
+        {
+          value: '閫夐」3',
+          label: '铓典粩鐓�'
+        },
+        {
+          value: '閫夐」4',
+          label: '榫欓』闈�'
+        },
+        {
+          value: '閫夐」5',
+          label: '鍖椾含鐑ら腑'
+        }
+      ],
+      value: ''
+    }
+  }
+}
+</script>
+
+<style>
+.header_div {
+  height: 5em;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  margin-left: 3em;
+}
+</style>
diff --git a/src/views/quality/processInspect/processInspect-form.vue b/src/views/quality/processInspect/processInspect-form.vue
index 8ed338a..f1fa506 100644
--- a/src/views/quality/processInspect/processInspect-form.vue
+++ b/src/views/quality/processInspect/processInspect-form.vue
@@ -808,7 +808,7 @@
                                 if (obj.inspectionValue) {
                                     arr = obj.inspectionValue.split(",")
                                 }
-                                obj.empiricalValueAddss = arr
+                                this.$set(obj, "empiricalValueAddss", arr)
                                 if(!obj.inote){
                                     obj.inote = null
                                 }

--
Gitblit v1.9.3