feat:endpoint 根据state 显示相关的模块 是否开启关闭

This commit is contained in:
zhangyu
2021-04-25 20:17:14 +08:00
parent 43436e5cbe
commit da40c519fa
5 changed files with 122 additions and 30 deletions

View File

@@ -34,7 +34,9 @@
</template>
<template slot-scope="scope" :column="item">
<span v-if="item.prop==='varType'">{{scope.row[item.prop]===1?'Asset':'endpoint'}}</span>
<span v-else-if="item.prop==='type'" :class="typeIcon(scope.row)">{{scope.row[item.prop]}}</span>
<span v-else-if="item.prop==='type'" :class="typeIcon(scope.row)">
{{chartTypeList.find(title=>title.id == scope.row[item.prop]).name}}
</span>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop] || '-'}}</span>
<template v-else>-</template>
</template>
@@ -90,7 +92,50 @@ export default {
prop: 'remark',
show: true
}
]
],
chartTypeList: [
{
id: 'line',
name: this.$t('dashboard.panel.chartForm.typeVal.line.label')
},
{
id: 'stackArea',
name: this.$t('dashboard.panel.chartForm.typeVal.stackArea.label')
},
{
id: 'bar',
name: this.$t('dashboard.panel.chartForm.typeVal.bar.label')
},
{
id: 'singleStat',
name: this.$t('dashboard.panel.chartForm.typeVal.singleStat.label')
},
{
id: 'pie',
name: this.$t('dashboard.panel.chartForm.typeVal.pie.label')
},
{
id: 'table',
name: this.$t('dashboard.panel.chartForm.typeVal.table.label')
},
{
id: 'alertList',
name: this.$t('dashboard.panel.chartForm.typeVal.alertList.label')
},
{
id: 'text',
name: this.$t('dashboard.panel.chartForm.typeVal.text.label')
},
{
id: 'url',
name: this.$t('dashboard.panel.chartForm.typeVal.url.label')
},
{
id: 'group',
name: this.$t('dashboard.panel.chartForm.typeVal.group.label')
}
],
}
},
methods: {