方案数据改为列表点击修改测试项,数据绑定修改设备绑定
This commit is contained in:
@@ -272,7 +272,6 @@ 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
|
||||
@@ -281,12 +280,15 @@ const handleOpen = (val: any) => {
|
||||
dialogRef.value.details(dailogForm.value)
|
||||
// deviceData.value.records[0].id
|
||||
let ids = ''
|
||||
//数据绑定
|
||||
if (val == 3) {
|
||||
ids = deviceData.value.records.find((item: any) => {
|
||||
return item.id == activeName.value
|
||||
})?.id
|
||||
dialogRef.value.detailsType("table")
|
||||
} else {
|
||||
ids = ''
|
||||
dialogRef.value.detailsType("")
|
||||
}
|
||||
dialogRef.value.open(val, ids)
|
||||
}
|
||||
@@ -302,7 +304,6 @@ const range = (start: any, end: any, step: any) => {
|
||||
}
|
||||
const init = () => {
|
||||
//调用子组件的方法切换的时候tree的节点也变化
|
||||
console.log(activeName.value, '000000')
|
||||
let list: any = []
|
||||
loading.value = true
|
||||
//颜色数组
|
||||
@@ -371,7 +372,6 @@ const init = () => {
|
||||
|
||||
getHistoryTrend(obj)
|
||||
.then((res: any) => {
|
||||
console.log(res, '+++++++++3666')
|
||||
if (res.code === 'A0000') {
|
||||
historyDataList.value = res.data
|
||||
echartsData.value = null
|
||||
@@ -390,9 +390,6 @@ const init = () => {
|
||||
xAxis = timeList.sort((a: any, b: any) => {
|
||||
return new Date(a).getTime() - new Date(b).getTime()
|
||||
})
|
||||
// xAxis.map((item:any)=>{
|
||||
// item=item.replace(" ","\n")
|
||||
// })
|
||||
echartsData.value = {
|
||||
options: {
|
||||
title: [
|
||||
@@ -447,7 +444,7 @@ const init = () => {
|
||||
height: 50
|
||||
},
|
||||
grid: {
|
||||
left: '5%',
|
||||
left: historyDataList.value.length != 0 ? '5%' : '1%',
|
||||
right: '5%',
|
||||
bottom: '10%',
|
||||
top: '8%',
|
||||
|
||||
Reference in New Issue
Block a user