diff --git a/package.json b/package.json index 595b301..00323a6 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "vue-router": "^3.0.3", "vue-schart": "^2.0.0", "vuedraggable": "^2.17.0", - "vuex": "^3.6.2" + "vuex": "^3.6.2", + "lodash": "^4.17.15" }, "devDependencies": { "@vue/cli-plugin-babel": "^3.9.0", diff --git a/src/components/newchart/avgChart.vue b/src/components/newchart/avgChart.vue new file mode 100644 index 0000000..c2fb5d2 --- /dev/null +++ b/src/components/newchart/avgChart.vue @@ -0,0 +1,254 @@ + + + + diff --git a/src/components/newchart/barChart.vue b/src/components/newchart/barChart.vue new file mode 100644 index 0000000..19a9908 --- /dev/null +++ b/src/components/newchart/barChart.vue @@ -0,0 +1,162 @@ + + + diff --git a/src/components/newchart/detailDialog.vue b/src/components/newchart/detailDialog.vue new file mode 100644 index 0000000..67e84f8 --- /dev/null +++ b/src/components/newchart/detailDialog.vue @@ -0,0 +1,125 @@ + + + + \ No newline at end of file diff --git a/src/components/newchart/lineChart.vue b/src/components/newchart/lineChart.vue new file mode 100644 index 0000000..b0e1d96 --- /dev/null +++ b/src/components/newchart/lineChart.vue @@ -0,0 +1,451 @@ + + + + diff --git a/src/components/newchart/pieChart.vue b/src/components/newchart/pieChart.vue new file mode 100644 index 0000000..f0f100c --- /dev/null +++ b/src/components/newchart/pieChart.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/components/newchart/regionTable.vue b/src/components/newchart/regionTable.vue new file mode 100644 index 0000000..33d541c --- /dev/null +++ b/src/components/newchart/regionTable.vue @@ -0,0 +1,276 @@ + + + + \ No newline at end of file diff --git a/src/components/newchart/tableShow.vue b/src/components/newchart/tableShow.vue new file mode 100644 index 0000000..66a6a40 --- /dev/null +++ b/src/components/newchart/tableShow.vue @@ -0,0 +1,312 @@ + + + + \ No newline at end of file diff --git a/src/components/newchart/thermalChart.vue b/src/components/newchart/thermalChart.vue new file mode 100644 index 0000000..0c3c69e --- /dev/null +++ b/src/components/newchart/thermalChart.vue @@ -0,0 +1,217 @@ + + + + diff --git a/src/components/sensorFusion/echartsPie.vue b/src/components/sensorFusion/echartsPie.vue index 0ff0b99..19d585c 100644 --- a/src/components/sensorFusion/echartsPie.vue +++ b/src/components/sensorFusion/echartsPie.vue @@ -97,10 +97,10 @@ export default { if(seriesData&&seriesData.length>0){ let temp=[]; seriesData.forEach((ele) => { - if (ele.value != 0) { + // if (ele.value != 0) { ele.name = getNameFromTargetType(ele.name); temp.push(ele) - } + // } }) seriesData = temp } diff --git a/src/components/sensorFusion/meanValue.vue b/src/components/sensorFusion/meanValue.vue index 5fe6169..e77cfce 100644 --- a/src/components/sensorFusion/meanValue.vue +++ b/src/components/sensorFusion/meanValue.vue @@ -65,64 +65,71 @@ export default { }, methods: { initEcharts() { - this.max = []; - this.min = []; - this.med = []; - this.avg = []; - // console.log("均值图",arr) - // let myChart = this.$echarts.getInstanceByDom(this.$refs.barChart); - // if (myChart == null) { - // myChart = this.$echarts.init(this.$refs.barChart); + // this.max = []; + // this.min = []; + // this.med = []; + // this.avg = []; + // // console.log("均值图",arr) + // // let myChart = this.$echarts.getInstanceByDom(this.$refs.barChart); + // // if (myChart == null) { + // // myChart = this.$echarts.init(this.$refs.barChart); + // // } + // // this.dataProcessing(this.dataList); + // if (this.dataList.length > 10) { + // this.dataList = this.dataList.slice(-10); // } - // this.dataProcessing(this.dataList); - if (this.dataList.length > 10) { - this.dataList = this.dataList.slice(-10); - } - for (let i = 0; i < this.dataList.length; i++) { - if (this.dataList[i].max) { - this.max.push(Math.abs(this.dataList[i].max.toFixed(2))); - } else { - this.max.push(0); - } + // for (let i = 0; i < this.dataList.length; i++) { + // if (this.dataList[i].max) { + // this.max.push(Math.abs(this.dataList[i].max.toFixed(2))); + // } else { + // this.max.push(0); + // } - if (this.dataList[i].min) { - this.min.push(Math.abs(this.dataList[i].min.toFixed(2))); - } else { - this.min.push(0); - } + // if (this.dataList[i].min) { + // this.min.push(Math.abs(this.dataList[i].min.toFixed(2))); + // } else { + // this.min.push(0); + // } - if (this.dataList[i].med) { - this.med.push(Math.abs(this.dataList[i].med.toFixed(2))); - } else { - this.med.push(0); - } + // if (this.dataList[i].med) { + // this.med.push(Math.abs(this.dataList[i].med.toFixed(2))); + // } else { + // this.med.push(0); + // } - if (this.dataList[i].avg) { - this.avg.push(Math.abs(this.dataList[i].avg.toFixed(2))); - } else { - this.avg.push(0); - } + // if (this.dataList[i].avg) { + // this.avg.push(Math.abs(this.dataList[i].avg.toFixed(2))); + // } else { + // this.avg.push(0); + // } - // this.max.push(Math.abs(this.dataList[i].max.toFixed(2))); - // this.min.push(Math.abs(this.dataList[i].min.toFixed(2))); - // this.med.push(Math.abs(this.dataList[i].med.toFixed(2))); - // this.avg.push(Math.abs(this.dataList[i].avg.toFixed(2))); - } + // // this.max.push(Math.abs(this.dataList[i].max.toFixed(2))); + // // this.min.push(Math.abs(this.dataList[i].min.toFixed(2))); + // // this.med.push(Math.abs(this.dataList[i].med.toFixed(2))); + // // this.avg.push(Math.abs(this.dataList[i].avg.toFixed(2))); + // } let maxData = ''; let minData = ''; let medData = ''; let avgData = ''; - for (let i = 0; i < this.max.length; i++) { - maxData = this.max[i]; - } - for (let i = 0; i < this.min.length; i++) { - minData = this.min[i]; - } - for (let i = 0; i < this.med.length; i++) { - medData = this.med[i]; - } - for (let i = 0; i < this.avg.length; i++) { - avgData = this.avg[i]; + // for (let i = 0; i < this.max.length; i++) { + // maxData = this.max[i]; + // } + // for (let i = 0; i < this.min.length; i++) { + // minData = this.min[i]; + // } + // for (let i = 0; i < this.med.length; i++) { + // medData = this.med[i]; + // } + // for (let i = 0; i < this.avg.length; i++) { + // avgData = this.avg[i]; + // } + let arr = this.dataList[0]||{} + if (arr && Object.keys(arr).length > 0) { + avgData = arr.avg ? Math.abs(arr.avg).toFixed(2) : 0; + medData = arr.med ? Math.abs(arr.med).toFixed(2) : 0; + maxData = arr.max ? Math.abs(arr.max).toFixed(2) : 0; + minData = arr.min ? Math.abs(arr.min).toFixed(2) : 0; } let myChart = this.chart; let chartData = [{ stage: '', number: 40 }]; @@ -310,45 +317,51 @@ export default { }, 300); }, watch: { - intersectionName: { - handler: function (oldValues, newValues) { - this.$nextTick(() => { - this.initEcharts(); - }); - } - }, - chatShowType: { - handler: function (oldValues, newValues) { - let that = this; - setTimeout(() => { - that.$nextTick(() => { - this.chart = this.$echarts.getInstanceByDom(document.getElementById(this.echartsRef)); - if (this.chart == null) { - this.chart = this.$echarts.init(document.getElementById(this.echartsRef)); - } - that.initEcharts(); - }); - }, 300); - } - }, - echartsRef: { - handler: function (oldValues, newValues) { - console.log('old', oldValues); - console.log('newV', newValues); - let that = this; - setTimeout(() => { - that.$nextTick(() => { - this.chart = this.$echarts.getInstanceByDom(document.getElementById(this.echartsRef)); - if (this.chart == null) { - this.chart = this.$echarts.init(document.getElementById(this.echartsRef)); - } - that.initEcharts(); - }); - }, 300); - } - }, + // intersectionName: { + // handler: function (oldValues, newValues) { + // this.$nextTick(() => { + // this.initEcharts(); + // }); + // } + // }, + // chatShowType: { + // handler: function (oldValues, newValues) { + // let that = this; + // setTimeout(() => { + // that.$nextTick(() => { + // this.chart = this.$echarts.getInstanceByDom(document.getElementById(this.echartsRef)); + // if (this.chart == null) { + // this.chart = this.$echarts.init(document.getElementById(this.echartsRef)); + // } + // that.initEcharts(); + // }); + // }, 300); + // } + // }, + // echartsRef: { + // handler: function (newValues, oldValues) { + // console.log('old', oldValues); + // console.log('newV', newValues); + // let that = this; + // setTimeout(() => { + // that.$nextTick(() => { + // this.chart = this.$echarts.getInstanceByDom(document.getElementById(this.echartsRef)); + // if (this.chart == null) { + // this.chart = this.$echarts.init(document.getElementById(this.echartsRef)); + // } + // that.initEcharts(); + // }); + // }, 300); + // } + // }, dataList: { - handler: function (oldValues, newValues) { + handler: function (newValues, oldValues) { + // if(newValues&&newValues.length>0) { + // if(newValues[0].name=='gate1'){ + // console.log('newV', newValues); + // } + // } + this.$nextTick(() => { this.chart = this.$echarts.getInstanceByDom(document.getElementById(this.echartsRef)); if (this.chart == null) { diff --git a/src/components/target/newtypeChart.vue b/src/components/target/newtypeChart.vue new file mode 100644 index 0000000..bebc396 --- /dev/null +++ b/src/components/target/newtypeChart.vue @@ -0,0 +1,404 @@ + + + + diff --git a/src/views/bounced/dataBoard-old.vue b/src/views/bounced/dataBoard-old.vue new file mode 100644 index 0000000..8bd6508 --- /dev/null +++ b/src/views/bounced/dataBoard-old.vue @@ -0,0 +1,1049 @@ + + + + + diff --git a/src/views/bounced/dataBoard.vue b/src/views/bounced/dataBoard.vue index dd4d2e9..22aa19c 100644 --- a/src/views/bounced/dataBoard.vue +++ b/src/views/bounced/dataBoard.vue @@ -1,6 +1,6 @@