Merge branch 'dev-2.0' of https://git.mesalab.cn/nezha/nezha-fronted into dev-2.0

This commit is contained in:
@changcode
2021-04-27 21:00:11 +08:00
72 changed files with 8388 additions and 2334 deletions

View File

@@ -77,54 +77,54 @@
</template>
<script>
import table from '@/components/common/mixin/table'
export default {
name: "cabinet Table",
mixins: [table],
data(){
return{
tableTitle: [
{
label: 'ID',
prop: 'id',
show: true,
width: 80
},
{
label: this.$t('overall.name'),
prop: 'name',
show: true
},
{
label: this.$t('asset.uSize'),
prop: 'uSize',
show: true
},
{
label: this.$t('config.dc.assets'),
prop: 'assetStat',
show: true
},
{
label: this.$t('alert.alert'),
prop: 'alertStat',
show: true
},
{
label: this.$t('config.dc.remark'),
prop: 'remark',
show: true
},
{
label: this.$t('config.account.option'),
prop: 'option',
show: true,
width: 120
}
],
}
import table from '@/components/common/mixin/table'
export default {
name: 'cabinet Table',
mixins: [table],
data () {
return {
tableTitle: [
{
label: 'ID',
prop: 'id',
show: true,
width: 80
},
{
label: this.$t('overall.name'),
prop: 'name',
show: true
},
{
label: this.$t('asset.uSize'),
prop: 'uSize',
show: true
},
{
label: this.$t('config.dc.assets'),
prop: 'assetStat',
show: true
},
{
label: this.$t('alert.alert'),
prop: 'alertStat',
show: true
},
{
label: this.$t('config.dc.remark'),
prop: 'remark',
show: true
},
{
label: this.$t('config.account.option'),
prop: 'option',
show: true,
width: 120
}
]
}
}
}
</script>
<style scoped>

View File

@@ -136,7 +136,7 @@ export default {
name: this.$t('dashboard.panel.chartForm.typeVal.group.label')
}
],
]
}
},
methods: {
@@ -144,37 +144,37 @@ export default {
let str = 'nz-icon '
switch (row.type) {
case 'line':
str += 'nz-icon-LinkChart'
str += 'nz-icon-link-chart'
break
case 'bar':
str += 'nz-icon-barchart'
str += 'nz-icon-bar-chart'
break
case 'stackArea':
str += 'nz-icon-StackArea'
str += 'nz-icon-stack-area'
break
case 'singleStat':
str += 'nz-icon-SingleValue'
str += 'nz-icon-single-value'
break
case 'pie':
str += 'nz-icon-Piechart'
str += 'nz-icon-pie-chart'
break
case 'table':
str += 'nz-icon-Table1'
str += 'nz-icon-table1'
break
case 'alertList':
str += 'nz-icon-alertlist'
str += 'nz-icon-alert-list'
break
case 'text':
str += 'nz-icon-Text1'
str += 'nz-icon-text1'
break
case 'url':
str += 'nz-icon-URL'
str += 'nz-icon-url'
break
case 'group':
str += 'nz-icon-Group'
str += 'nz-icon-group'
break
default :
str += 'nz-icon-Table1'
str += 'nz-icon-table1'
break
}
return str

View File

@@ -133,7 +133,7 @@ export default {
label: this.$t('config.dc.assets'),
prop: 'assetNum',
show: true
},{
}, {
label: this.$t('config.dc.alert'),
prop: 'alertNum',
show: true
@@ -162,7 +162,8 @@ export default {
}
},
methods: {
showTableTooltip, hideTableTooltip,
showTableTooltip,
hideTableTooltip,
regNumTest (val) { // 校验是否是数字
return this.regNum.test(val)
},
@@ -186,7 +187,7 @@ export default {
}
}
return ''
},
}
}
}
</script>

View File

@@ -77,7 +77,7 @@
<div v-else-if="scope.row[item.prop]===1">
<div class="active-icon green inline-block"></div> up
</div>
<div v-else>
<div v-else-if="scope.row[item.prop]">
<div class="active-icon gray inline-block"></div> suspended
</div>
</div>
@@ -174,6 +174,7 @@ export default {
this.$message.success(this.$t('overall.copySuccess'))
},
suspendedStr (status) { // 10进制转为2进制 分别给对应的状态
if (!status || status === 1 || status == 0) { return '' }
const arr = status.toString(2).split('')
while (arr.length < 5) {
arr.unshift('0')

View File

@@ -95,11 +95,11 @@ export default {
label: this.$t('config.model.remark'),
prop: 'remark',
show: true
},{
}, {
label: this.$t('config.model.assetNum'),
prop: 'assetNum',
show: true,
width:200
width: 200
}
]
}

View File

@@ -53,7 +53,7 @@
</el-tooltip>
</template>
<template v-else-if="item.prop === 'authType'">
<span v-if="scope.row.authType == 1">{{$t('config.terminallog.password')}}</span>
<span v-if="scope.row.authType == 1">{{$t('config.terminallog.pin')}}</span>
<span v-else-if="scope.row.authType == 2">{{$t('config.terminallog.key')}}</span>
</template>
<span v-else>{{scope.row[item.prop]}}</span>

View File

@@ -465,7 +465,7 @@ export default {
this.graphShow = false
},
saveChart () { // 新增chart
this.getPanelData().then(()=>{
this.getPanelData().then(() => {
const chart = {
title: '',
type: 'line',