fix: 修复Database name 取值错误问题,优化样式

This commit is contained in:
Xu Zhimeng 2024-01-04 16:37:10 +08:00
parent 5d2dbf2aa2
commit a80cfedfc2
3 changed files with 16 additions and 7 deletions

View File

@ -119,7 +119,6 @@ export default {
},
watch: {
dataSource() {
console.log('%c [ ]-128', 'font-size:13px; background:pink; color:#bf2c9f;')
this.drawChart()
},
},

View File

@ -92,7 +92,18 @@ export default {
getDbList() {
getAction("/sysDatabase/sourceList").then(res => {
if (res.success) {
this.value.hostId = this.$route.query.id || res.result[0].hostId
const sourceId = this.$route.query.id
// urlsourceId
if(sourceId) {
const find = res.result.find(item => item.sourceId == sourceId)
if(find) {
this.value.hostId = find.hostId
}
}
if(!this.value.hostId) {
this.value.hostId = res.result[0].hostId
}
this.DbOptions = res.result.map(item => {
return {
label: item.sourceName,

View File

@ -2,8 +2,8 @@
<div style="height: 100%">
<ConditionBox :value="queryParams" @change="getData" @refresh="getData"></ConditionBox>
<div class="monitor-content">
<a-row :gutter="10" style="height: auto">
<a-col :span="12" style="height: 240px" v-for="(el, i) in chartData" :key="i">
<a-row :gutter="10" style="height: 100%">
<a-col :span="12" style="height: 33.3333%" v-for="(el, i) in chartData" :key="i">
<div class="monitor-content-item">
<AreaChart
:title="el.title"
@ -17,7 +17,7 @@
</div>
</a-col>
</a-row>
<div style="height: auto; margin-top: 15px; padding-right: 10px">
<!-- <div style="height: auto; margin-top: 15px; padding-right: 10px">
<BoxTitle title="Connect List"></BoxTitle>
<a-row :gutter="20" style="height: auto; margin-top: 15px">
<a-col :span="8" v-for="(el, i) in mailData" :key="i">
@ -38,7 +38,7 @@
</div>
</a-col>
</a-row>
</div>
</div> -->
</div>
</div>
</template>
@ -376,7 +376,6 @@ export default {
val.value = Number(this.dataConversion(number, item.newUnits))
})
}
console.log('%c [ ]-379', 'font-size:13px; background:pink; color:#bf2c9f;', item.list)
Object.assign(chartItem, item)
})
} else {