diff --git a/src/views/govern/device/control/tabs/trend.vue b/src/views/govern/device/control/tabs/trend.vue
index a7305e9..dff32df 100644
--- a/src/views/govern/device/control/tabs/trend.vue
+++ b/src/views/govern/device/control/tabs/trend.vue
@@ -8,21 +8,10 @@
-
-
+
+
@@ -32,19 +21,11 @@
-
-
+ v-show="item.countOptions.length != 0">
+
@@ -220,7 +201,14 @@ const init = async () => {
let unitList: any = []
let groupedData = chartsList.reduce((acc: any, item: any) => {
- let key = item.anotherName
+
+ let key = ''
+ if (item.phase == null) {
+ key = item.unit
+ } else {
+ key = item.anotherName
+ }
+
if (!acc[key]) {
acc[key] = []
}
@@ -228,6 +216,7 @@ const init = async () => {
return acc
}, {})
let result = Object.values(groupedData)
+ // console.log("🚀 ~ .then ~ result:", result)
if (chartsList.length > 0) {
unitList = result.map((item: any) => {
return item[0].unit
@@ -238,14 +227,17 @@ const init = async () => {
legend: {
itemWidth: 20,
itemHeight: 10,
- itemGap: 15,
+ itemGap: 10,
type: 'scroll', // 开启滚动分页
// orient: 'vertical', // 垂直排列
- top: 25,
- bottom: 30,
+ top: 10,
+
width: 400,
- right: 150,
- height: 100
+ height: 50
+ },
+ grid: {
+ top: '80px',
+
},
tooltip: {
axisPointer: {
@@ -319,13 +311,21 @@ const init = async () => {
series: []
}
}
+ // console.log("🚀 ~ unitList.forEach ~ unitList:", unitList)
+
if (chartsList.length > 0) {
echartsData.value.yAxis = []
+
+
unitList.forEach((item: any, index: any) => {
+ if (index > 2) {
+ echartsData.value.grid.right = (index - 1) * 80
+ }
let right = {
position: 'right',
offset: (index - 1) * 80
}
+ console.log("🚀 ~ unitList.forEach ~ right.index:", index)
echartsData.value.yAxis.push({
name: item,
yAxisIndex: index,
@@ -337,13 +337,22 @@ const init = async () => {
...(index > 0 ? right : null)
})
})
+ // console.log("🚀 ~ result.forEach ~ result:", result)
result.forEach((item: any, index: any) => {
let yMethodList: any = []
let ABCList = Object.values(
item.reduce((acc, item) => {
- let key = item.phase
+
+ let key = ''
+ if (item.phase == null) {
+ key = item.anotherName
+ } else {
+
+ key = item.phase
+ }
+
if (!acc[key]) {
acc[key] = []
}
@@ -351,6 +360,8 @@ const init = async () => {
return acc
}, {})
)
+ // console.log("🚀 ~ ABCList.forEach ~ ABCList:", ABCList)
+
ABCList.forEach((kk: any) => {
let seriesList: any = []
kk.forEach((cc: any) => {
@@ -360,11 +371,12 @@ const init = async () => {
seriesList.push([cc.time, cc.statisticalData?.toFixed(2), cc.unit])
})
+ // console.log(kk);
echartsData.value.options.series.push({
name: kk[0].phase
- ? kk[0].phase + '相' + item[0].anotherName
- : item[0].anotherName,
+ ? kk[0].phase + '相' + kk[0].anotherName
+ : kk[0].anotherName,
type: 'line',
smooth: true,
symbol: 'none',
@@ -376,6 +388,7 @@ const init = async () => {
echartsData.value.yAxis[index].min = min
echartsData.value.yAxis[index].max = max
})
+ console.log("🚀 ~ result.forEach ~ echartsData.value:", echartsData.value)
}
loading.value = false
}
@@ -665,6 +678,7 @@ defineExpose({ getTrendRequest })
// flex: 1;
margin-top: 10px;
}
+
.history_count {
.el-select {
min-width: 100px;
diff --git a/src/views/govern/device/planData/index.vue b/src/views/govern/device/planData/index.vue
index 11981dc..9a6b32d 100644
--- a/src/views/govern/device/planData/index.vue
+++ b/src/views/govern/device/planData/index.vue
@@ -21,12 +21,8 @@
测试项信息
-->
-
+
@@ -110,22 +106,11 @@
-
-
+
+
@@ -134,42 +119,20 @@
-
+ label-width="180px" v-show="item.countOptions.length != 0">
-
-
+
+
-
-
+
+
@@ -184,13 +147,8 @@
-
@@ -463,7 +421,12 @@ const init = (flag: boolean) => {
let unitList: any = []
let groupedData = chartsList.reduce((acc: any, item: any) => {
- let key = item.anotherName
+ let key = ''
+ if (item.phase == null) {
+ key = item.unit
+ } else {
+ key = item.anotherName
+ }
if (!acc[key]) {
acc[key] = []
}
@@ -471,6 +434,7 @@ const init = (flag: boolean) => {
return acc
}, {})
let result = Object.values(groupedData)
+
if (chartsList.length > 0) {
unitList = result.map((item: any) => {
return item[0].unit
@@ -485,10 +449,14 @@ const init = (flag: boolean) => {
type: 'scroll', // 开启滚动分页
// orient: 'vertical', // 垂直排列
top: 10,
- bottom: 30,
+
width: 400,
height: 50
},
+ grid: {
+ top: '80px',
+
+ },
tooltip: {
axisPointer: {
type: 'cross',
@@ -509,9 +477,8 @@ const init = (flag: boolean) => {
const xname = params[0].value[0]
let str = `${xname}
`
params.forEach((el: any, index: any) => {
- str += `${el.marker}${el.seriesName.split('(')[0]}:${
- el.value[1] ? el.value[1] + ' ' + el.value[2] : '-'
- }
`
+ str += `${el.marker}${el.seriesName.split('(')[0]}:${el.value[1] ? el.value[1] + ' ' + el.value[2] : '-'
+ }
`
})
return str
}
@@ -536,6 +503,9 @@ const init = (flag: boolean) => {
if (chartsList.length > 0) {
echartsData.value.yAxis = []
unitList.forEach((item: any, index: any) => {
+ if (index > 2) {
+ echartsData.value.grid.right = (index - 1) * 80
+ }
let right = {
position: 'right',
offset: (index - 1) * 80
@@ -557,7 +527,13 @@ const init = (flag: boolean) => {
let ABCList = Object.values(
item.reduce((acc, item) => {
- let key = item.phase
+ let key = ''
+ if (item.phase == null) {
+ key = item.anotherName
+ } else {
+
+ key = item.phase
+ }
if (!acc[key]) {
acc[key] = []
}
@@ -576,8 +552,8 @@ const init = (flag: boolean) => {
})
echartsData.value.options.series.push({
name: kk[0].phase
- ? kk[0].phase + '相' + item[0].anotherName
- : item[0].anotherName,
+ ? kk[0].phase + '相' + kk[0].anotherName
+ : kk[0].anotherName,
type: 'line',
smooth: true,
symbol: 'none',
diff --git a/src/views/govern/manage/engineering.vue b/src/views/govern/manage/engineering.vue
index c9de4c5..5051097 100644
--- a/src/views/govern/manage/engineering.vue
+++ b/src/views/govern/manage/engineering.vue
@@ -61,7 +61,7 @@ onMounted(() => {
// }, 500)
})
const deletes = (row: any) => {
- ElMessageBox.prompt('二次校验密码确认', '', {
+ ElMessageBox.prompt('二次校验密码确认', '·', {
confirmButtonText: '确认',
cancelButtonText: '取消',
customClass: 'customInput',