perf : network ,process 二级页面优化

This commit is contained in:
likexuan
2022-09-16 16:11:09 +08:00
parent 71d5476121
commit 5ed047ef0d
3 changed files with 11 additions and 8 deletions

View File

@@ -43,7 +43,7 @@
<log-bottom-tab v-if="from === fromRoute.asset && targetTab === 'log'" v-show="subResizeShow" :sign="sign+'log'" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></log-bottom-tab>
<process-bottom-tab v-if="from === fromRoute.asset && targetTab === 'process' && obj.clientState == '1'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></process-bottom-tab>
<assetSubTab v-if="from === fromRoute.asset && targetTab === 'assetSubTab' && obj.childrenNum" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" @changeTab="changeTab" :targetTab.sync="targetTab"></assetSubTab>
<network-bottom-tab v-if="from === fromRoute.asset && targetTab === 'network'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></network-bottom-tab>
<network-bottom-tab v-if="from === fromRoute.asset && targetTab === 'network' && obj.clientState == '1'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></network-bottom-tab>
<!--module列表的tab-->
<endpointTabNew v-if="from === fromRoute.module && targetTab === 'endpoint'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.moduleTabTitle" :targetTab="targetTab" @changeTab="changeTab"></endpointTabNew>
<alertMessageTabNew v-if="from === fromRoute.module && targetTab === 'moduleAlertMessage'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.moduleTabTitle" @changeTab="changeTab" :targetTab="targetTab"></alertMessageTabNew>
@@ -262,9 +262,8 @@ export default {
tabs.push({ prop: 'assetSubTab', name: this.$t('overall.assetSubTab') })
}
if (hasProcess) {
tabs.push({ prop: 'process', name: this.$t('overall.process') })
tabs.push({ prop: 'process', name: this.$t('overall.process') }, { prop: 'network', name: this.$t('overall.network') })
}
tabs.push({ prop: 'network', name: this.$t('overall.network') })
return tabs
},
endpointTabs () {

View File

@@ -26,7 +26,7 @@
<log-bottom-tab :showTitle="false" v-if="from === fromRoute.asset && targetTab === 'log'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></log-bottom-tab>
<assetSubTab :showTitle="false" v-if="from === fromRoute.asset && targetTab === 'assetSubTab' && obj.childrenNum" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab="targetTab" @changeTab="changeTab"></assetSubTab>
<process-bottom-tab :showTitle="false" v-if="from === fromRoute.asset && targetTab === 'process' && obj.clientState == '1'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab="targetTab" @changeTab="changeTab"></process-bottom-tab>
<network-bottom-tab :showTitle="false" v-if="from === fromRoute.asset && targetTab === 'network'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></network-bottom-tab>
<network-bottom-tab :showTitle="false" v-if="from === fromRoute.asset && targetTab === 'network' && obj.clientState == '1'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></network-bottom-tab>
<!--module列表的tab-->
<endpointTabNew :showTitle="false" v-if="from === fromRoute.module && targetTab === 'endpoint'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.moduleTabTitle" :targetTab="targetTab" @changeTab="changeTab"></endpointTabNew>
<alertMessageTabNew :showTitle="false" v-if="from === fromRoute.module && targetTab === 'moduleAlertMessage'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.moduleTabTitle" @changeTab="changeTab" :targetTab="targetTab"></alertMessageTabNew>
@@ -224,9 +224,8 @@ export default {
tabs.push({ prop: 'assetSubTab', name: this.$t('overall.assetSubTab') })
}
if (hasProcess) {
tabs.push({ prop: 'process', name: this.$t('overall.process') })
tabs.push({ prop: 'process', name: this.$t('overall.process') }, { prop: 'network', name: this.$t('overall.network') })
}
tabs.push({ prop: 'network', name: this.$t('overall.network') })
return tabs
},
endpointTabs () {

View File

@@ -38,7 +38,7 @@
</template>
<template slot-scope="scope" :column="item">
<template v-if="item.prop === 'processCmd'">
<div :title="scope.row[item.prop] ? scope.row[item.prop] : scope.row.processName">{{scope.row[item.prop] ? scope.row[item.prop] : scope.row.processName}}</div>
<div class="process-name" :title="scope.row[item.prop] ? scope.row[item.prop] : scope.row.processName">{{scope.row[item.prop] ? scope.row[item.prop] : scope.row.processName}}</div>
</template>
<template v-else-if="item.prop === 'processId'">
{{scope.row[item.prop]}}
@@ -145,5 +145,10 @@ export default {
}
}
</script>
<style>
<style scoped>
.process-name{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>