方案测试项bug修改

This commit is contained in:
zhujiyan
2024-09-26 11:20:12 +08:00
parent a385f360ba
commit e34fb26a4c
3 changed files with 45 additions and 21 deletions

View File

@@ -186,7 +186,7 @@ const voltageLevelList = dictData.getBasicData('Dev_Voltage')
const volConTypeList = dictData.getBasicData('Dev_Connect')
//值类型
const pageHeight = mainHeight(20)
const loading = ref(true)
const loading = ref(false)
const searchForm = ref({})
const typeOptions = [
{
@@ -245,6 +245,7 @@ const nodeClick = async (e: anyObj) => {
deviceData.value = []
historyDevId.value = e.children && e.children.length != 0 ? e.children[0].id : e.id
let id = e.pid ? e.pid : e.id
//查询测试项信息
await getTestRecordInfo(id)
.then(res => {
@@ -269,7 +270,15 @@ const nodeClick = async (e: anyObj) => {
})
}
const dialogRef = ref()
const dailogForm = ref()
const handleOpen = (val: any) => {
console.log(deviceData.value, '++++++++')
deviceData.value.records.map((item: any) => {
if (item.id == activeName.value) {
dailogForm.value = item
}
})
dialogRef.value.details(dailogForm.value)
// deviceData.value.records[0].id
let ids = ''
if (val == 3) {
@@ -291,7 +300,7 @@ const refreshTree = () => {
const range = (start: any, end: any, step: any) => {
return Array.from({ length: (end - start) / step + 1 }, (_, i) => start + i * step)
}
const init = async () => {
const init = () => {
//调用子组件的方法切换的时候tree的节点也变化
console.log(activeName.value, '000000')
let list: any = []
@@ -312,7 +321,6 @@ const init = async () => {
'cadetblue'
]
if (historyDevId.value && legendDictList.value && legendDictList.value.selectedList) {
loading.value = true
// 选择指标的时候切换legend内容和data数据
legendDictList.value?.selectedList?.map((item: any) => {
if (item.dataType == searchForm.value.index) {
@@ -321,7 +329,7 @@ const init = async () => {
})
//选择的指标使用方法处理
await formatCountOptions([searchForm.value.index])
formatCountOptions([searchForm.value.index])
//查询历史趋势
historyDataList.value = []
let middleTitle = ''
@@ -363,7 +371,8 @@ const init = async () => {
getHistoryTrend(obj)
.then((res: any) => {
if (res.code == 'A0000') {
console.log(res, '+++++++++3666')
if (res.code === 'A0000') {
historyDataList.value = res.data
echartsData.value = null
//icon图标替换legend图例