From d81c57e9beceffbf8f10997f6010bbfceb07629d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Tue, 4 Apr 2023 09:30:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/tireManagement/install.js | 12 +- ruoyi-ui/src/views/dashboard/BarChart.vue | 51 ++- .../src/views/feedback/feedback/index.vue | 410 ++++++++++++++++++ ruoyi-ui/src/views/index.vue | 4 +- .../views/tireManagement/install/index.vue | 25 +- 5 files changed, 474 insertions(+), 28 deletions(-) create mode 100644 ruoyi-ui/src/views/feedback/feedback/index.vue diff --git a/ruoyi-ui/src/api/tireManagement/install.js b/ruoyi-ui/src/api/tireManagement/install.js index 2224bba..e84f6fd 100644 --- a/ruoyi-ui/src/api/tireManagement/install.js +++ b/ruoyi-ui/src/api/tireManagement/install.js @@ -42,4 +42,14 @@ export function TyreUnInstall(query) { method: 'post', data: query }) -} \ No newline at end of file +} + + +// 修改花纹深度 +export function EditPatternTextureDepth(query) { + return request({ + url: '/basetyre/tyre/EditPatternTextureDepth', + method: 'post', + data: query + }) +} diff --git a/ruoyi-ui/src/views/dashboard/BarChart.vue b/ruoyi-ui/src/views/dashboard/BarChart.vue index d8fa33f..8b3b313 100644 --- a/ruoyi-ui/src/views/dashboard/BarChart.vue +++ b/ruoyi-ui/src/views/dashboard/BarChart.vue @@ -12,6 +12,7 @@ const animationDuration = 6000 export default { mixins: [resize], + expose: ['setData'], props: { className: { type: String, @@ -28,7 +29,10 @@ export default { }, data() { return { - chart: null + chart: null, + XData:['高温报警', '低压报警', '电池电量报警', '位置报警'], + dataOne:[1,2,3], + dataTwo:[3,4,5] } }, mounted() { @@ -44,6 +48,15 @@ export default { this.chart = null }, methods: { + setData(e) { + console.log(e) + let item = e.filter(val => !!val ) + this.XData = item.map(val => val.time || '') + this.dataOne = item.map(val => val.course) + this.dataTwo = item.map(val => val.textureDepth) + console.log(item) + this.initChart() + }, initChart() { this.chart = echarts.init(this.$el, 'macarons') @@ -51,7 +64,7 @@ export default { tooltip: { trigger: 'axis', axisPointer: { - type: 'cross', + // type: 'cross', crossStyle: { color: '#999' } @@ -71,7 +84,7 @@ export default { xAxis: [ { type: 'category', - data: ['胎号1001', '胎号1001', '胎号1001', '胎号1001', '胎号1001', '胎号1001', '胎号1001'], + data: this.XData, axisPointer: { type: 'shadow' } @@ -81,9 +94,6 @@ export default { { type: 'value', name: '里程', - min: 0, - max: 500, - interval: 50, axisLabel: { formatter: '{value} KM' } @@ -91,9 +101,6 @@ export default { { type: 'value', name: '花纹深度', - min: 0, - max: 25, - interval: 5, axisLabel: { formatter: '{value} mm' } @@ -103,26 +110,24 @@ export default { { name: '里程', type: 'bar', - tooltip: { - valueFormatter: function (value) { - return value + ' ml'; - } - }, - data: [ - 50, 102, 156, 186, 208, 254, 289, 351, 387, 432, 484, 500 - ] + // tooltip: { + // valueFormatter: function (value) { + // return value + ' ml'; + // } + // }, + data: this.dataOne, }, { name: '花纹深度', type: 'line', yAxisIndex: 1, - tooltip: { - valueFormatter: function (value) { - return value + ' °C'; - } - }, - data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 7.9] + // tooltip: { + // valueFormatter: function (value) { + // return value + ' °C'; + // } + // }, + data: this.dataTwo, } ] }) diff --git a/ruoyi-ui/src/views/feedback/feedback/index.vue b/ruoyi-ui/src/views/feedback/feedback/index.vue new file mode 100644 index 0000000..5638739 --- /dev/null +++ b/ruoyi-ui/src/views/feedback/feedback/index.vue @@ -0,0 +1,410 @@ + + + + + diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 7afa249..2547de5 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -47,7 +47,7 @@
- +
@@ -72,6 +72,7 @@ const dateRange = ref([]); const tempRef = ref(); const pieRef = ref(); + const barRef = ref() // 搜索参数 const queryParams = ref({ @@ -98,6 +99,7 @@ getTempdata(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => { tempRef.value.setData(response.data); pieRef.value.setData(response?.data?.WarnData); + barRef.value.setData(response?.data?.patternTextureList) }).finally(() => { //loading.value = false; }); diff --git a/ruoyi-ui/src/views/tireManagement/install/index.vue b/ruoyi-ui/src/views/tireManagement/install/index.vue index c6aa962..590e982 100644 --- a/ruoyi-ui/src/views/tireManagement/install/index.vue +++ b/ruoyi-ui/src/views/tireManagement/install/index.vue @@ -101,12 +101,12 @@ - +     - 修改花纹深度 + 修改花纹深度 安装/更换 @@ -120,7 +120,7 @@