修改 测试bug
This commit is contained in:
@@ -20,12 +20,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="数据类型" label-width="80px">
|
||||
<el-select v-model="form.statMethod" placeholder="请选择值类型">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-option v-for="item in typeOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -115,12 +111,7 @@ const init = () => {
|
||||
dataLevel: form.dataLevel,
|
||||
statMethod: form.statMethod
|
||||
}).then(res => {
|
||||
console.log(
|
||||
123,
|
||||
res.data.map((item: any[]) => {
|
||||
return item[0].anotherName
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
if (res.data.length && res.data[0].length) {
|
||||
let arr: any[] = []
|
||||
@@ -187,20 +178,20 @@ const init = () => {
|
||||
})
|
||||
},
|
||||
yAxis: {
|
||||
name: `单位:(${arr[0].unit})`,
|
||||
name: `单位:(${arr[0].unit == null ? ' / ' : arr[0].unit})`,
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
show: true
|
||||
},
|
||||
minInterval: 0.1,
|
||||
min: parseFloat(
|
||||
min: (
|
||||
arr
|
||||
.map(item => item.statisticalData)
|
||||
.map((item: any) => item.statisticalData)
|
||||
.sort((a, b) => {
|
||||
return a - b
|
||||
})[0] / 1.5
|
||||
).toFixed(0),
|
||||
max: parseFloat(
|
||||
})[0] / 1.2
|
||||
).toFixed(1),
|
||||
max: (
|
||||
arr
|
||||
.map(item => item.statisticalData)
|
||||
.sort((a, b) => {
|
||||
@@ -239,6 +230,7 @@ defineExpose({ open })
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.el-form--inline .el-form-item {
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user