Compare commits
4 Commits
dev-23.10-
...
dev-23.06
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
419a2c8905 | ||
|
|
1f8df7f404 | ||
|
|
8dc6f03df2 | ||
|
|
3a28cb45cd |
@@ -70,8 +70,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
custom: [],
|
custom: [],
|
||||||
dragIndex: -1,
|
dragIndex: -1,
|
||||||
selectList: [],
|
selectList: []
|
||||||
lastIndex: -1
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -95,19 +94,13 @@ export default {
|
|||||||
this.selectList = this.custom.filter(item => item.show)
|
this.selectList = this.custom.filter(item => item.show)
|
||||||
// 最少保留一个选项
|
// 最少保留一个选项
|
||||||
if (this.selectList.length === 1) {
|
if (this.selectList.length === 1) {
|
||||||
let index = -1
|
const obj = this.custom.find(item => item.prop === this.selectList[0].prop)
|
||||||
this.custom.find((item, i) => {
|
obj.disabled = true
|
||||||
index = i
|
} else if (this.selectList.length > 1) {
|
||||||
return item.prop === this.selectList[0].prop
|
|
||||||
})
|
|
||||||
this.lastIndex = index
|
|
||||||
this.custom[index].disabled = true
|
|
||||||
} else if (this.lastIndex > -1) {
|
|
||||||
this.custom.forEach(item => {
|
this.custom.forEach(item => {
|
||||||
// 该方案仅用于原始table列表无禁用的情况,目前无原始列表禁用的情况,后续有原始列表禁用的情况再修改
|
// 该方案仅用于原始table列表无禁用的情况,目前无原始列表禁用的情况,后续有原始列表禁用的情况再修改
|
||||||
item.disabled = false
|
item.disabled = false
|
||||||
})
|
})
|
||||||
this.lastIndex = -1
|
|
||||||
}
|
}
|
||||||
this.save()
|
this.save()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<div class="col-resize-area"></div>
|
<div class="col-resize-area"></div>
|
||||||
</template>
|
</template>
|
||||||
<template #default="scope" :column="item">
|
<template #default="scope" :column="item">
|
||||||
<span>{{scope.row[item.prop]}}</span>
|
<span>{{scope.row[item.prop] || '-'}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column><template v-slot:empty >
|
</el-table-column><template v-slot:empty >
|
||||||
<div class="table-no-data" v-if="isNoData">
|
<div class="table-no-data" v-if="isNoData">
|
||||||
|
|||||||
@@ -43,15 +43,15 @@
|
|||||||
{{$t('operationLog.state.fail')}}
|
{{$t('operationLog.state.fail')}}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{scope.row[item.prop]}}
|
{{scope.row[item.prop] || '-'}}
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="item.prop === 'username'">{{formatUsername(scope.row)}}</span>
|
<span v-else-if="item.prop === 'username'">{{formatUsername(scope.row)}}</span>
|
||||||
<span v-else-if="item.prop === 'ctime'">{{dateFormatByAppearance(scope.row[item.prop])}}</span>
|
<span v-else-if="item.prop === 'ctime'">{{dateFormatByAppearance(scope.row[item.prop])}}</span>
|
||||||
<template v-else-if="item.prop === 'params' || item.prop === 'response'">
|
<template v-else-if="item.prop === 'params' || item.prop === 'response'">
|
||||||
<span>{{scope.row[item.prop]}}</span>
|
<span>{{scope.row[item.prop] || '-'}}</span>
|
||||||
</template>
|
</template>
|
||||||
<span v-else>{{scope.row[item.prop]}}</span>
|
<span v-else>{{scope.row[item.prop] || '-'}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-slot:empty >
|
<template v-slot:empty >
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<span>-</span>
|
<span>-</span>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<span v-else>{{scope.row[item.prop]}}</span>
|
<span v-else>{{scope.row[item.prop] || '-'}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-slot:empty >
|
<template v-slot:empty >
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.prop === 'lastLoginTime'">
|
<template v-else-if="item.prop === 'lastLoginTime'">
|
||||||
<template v-if="scope.row[item.prop]">
|
<template v-if="scope.row[item.prop]">
|
||||||
{{dateFormatByAppearance(scope.row[item.prop])}}
|
{{dateFormatByAppearance(scope.row[item.prop]) || '-'}}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
@change="()=>{statusChange(scope.row)}">
|
@change="()=>{statusChange(scope.row)}">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
<span v-else>{{scope.row[item.prop]}}</span>
|
<span v-else>{{scope.row[item.prop] || '-'}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-slot:empty >
|
<template v-slot:empty >
|
||||||
|
|||||||
@@ -117,9 +117,7 @@
|
|||||||
{{ handleTimeRange(scope.row) }}
|
{{ handleTimeRange(scope.row) }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="item.prop === 'categoryId'">
|
<span v-else-if="item.prop === 'categoryId'">
|
||||||
<span v-for="(item, i) in categoryList" :key="i">
|
<span>{{ getCategoryName(scope.row.categoryId) }}</span>
|
||||||
<span v-if="scope.row.categoryId === item.id">{{ item.name }}</span>
|
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="item.prop === 'timePlan'">
|
<span v-else-if="item.prop === 'timePlan'">
|
||||||
<template v-if="scope.row.config && scope.row.config.isScheduler === 0">
|
<template v-if="scope.row.config && scope.row.config.isScheduler === 0">
|
||||||
@@ -768,6 +766,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.configCustom = str
|
this.configCustom = str
|
||||||
|
},
|
||||||
|
getCategoryName (id) {
|
||||||
|
let name = '-'
|
||||||
|
for (let i = 0; i < this.categoryList.length; i++) {
|
||||||
|
if (id === this.categoryList[i].id) {
|
||||||
|
name = this.categoryList[i].name
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUnmount () {
|
beforeUnmount () {
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.linkNoData = data.length === 0
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
item.totalBitsRate = item.egressBitsRate + item.ingressBitsRate
|
item.totalBitsRate = item.egressBitsRate + item.ingressBitsRate
|
||||||
})
|
})
|
||||||
@@ -246,7 +247,7 @@ export default {
|
|||||||
this.linkData = sorted
|
this.linkData = sorted
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.linkNoData = false
|
this.linkNoData = true
|
||||||
this.showError1 = true
|
this.showError1 = true
|
||||||
this.errorMsg1 = this.errorMsgHandler(res[0])
|
this.errorMsg1 = this.errorMsgHandler(res[0])
|
||||||
}
|
}
|
||||||
@@ -267,7 +268,7 @@ export default {
|
|||||||
directionArr = Array.from(new Set(directionArr))
|
directionArr = Array.from(new Set(directionArr))
|
||||||
|
|
||||||
const newNextHopData = []
|
const newNextHopData = []
|
||||||
|
this.nextHopNoData = directionArr.length === 0
|
||||||
directionArr.forEach((item1) => {
|
directionArr.forEach((item1) => {
|
||||||
const newObj = { egressBitsRate: 0, ingressBitsRate: 0, totalBitsRate: 0, linkDirection: item1 }
|
const newObj = { egressBitsRate: 0, ingressBitsRate: 0, totalBitsRate: 0, linkDirection: item1 }
|
||||||
nextHopData.forEach((item2) => {
|
nextHopData.forEach((item2) => {
|
||||||
@@ -309,7 +310,7 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.showError2 = true
|
this.showError2 = true
|
||||||
this.nextHopNoData = false
|
this.nextHopNoData = true
|
||||||
this.errorMsg2 = this.errorMsgHandler(res[1])
|
this.errorMsg2 = this.errorMsgHandler(res[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,10 +138,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.isLinkNoData = linkGridData.length === 0
|
||||||
this.linkGridData = linkGridData
|
this.linkGridData = linkGridData
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.isLinkNoData = false
|
this.isLinkNoData = true
|
||||||
this.isLinkShowError = true
|
this.isLinkShowError = true
|
||||||
this.linkErrorMsg = this.errorMsgHandler(res[0])
|
this.linkErrorMsg = this.errorMsgHandler(res[0])
|
||||||
}
|
}
|
||||||
@@ -227,10 +228,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.isNextNoData = nextGridData.length === 0
|
||||||
this.nextGridData = nextGridData
|
this.nextGridData = nextGridData
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.isNextNoData = false
|
this.isNextNoData = true
|
||||||
this.isNextShowError = true
|
this.isNextShowError = true
|
||||||
this.nextErrorMsg = this.errorMsgHandler(res[1])
|
this.nextErrorMsg = this.errorMsgHandler(res[1])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user