fix: chart添加link
This commit is contained in:
@@ -32,6 +32,9 @@
|
||||
{{chartInfo.name}}
|
||||
</div>
|
||||
<div class="chart-header__tools" v-if="chartInfo.type !== 'endpointInfo' && chartInfo.type !== 'assetInfo'">
|
||||
<span v-if="chartInfo.param.link" class="chart-header__tool" @click="openUrl">
|
||||
<i class="nz-icon nz-icon-more-app tool__icon"></i>
|
||||
</span>
|
||||
<span v-if="chartInfo.remark" class="chart-header__tool">
|
||||
<el-tooltip :content="chartInfo.remark" effect="light" placement="top">
|
||||
<i class="nz-icon nz-icon-info-normal tool__icon"></i>
|
||||
@@ -80,5 +83,10 @@ import chartHeaderMixin from '@/components/chart/chartHeaderMixin'
|
||||
export default {
|
||||
name: 'chartHeader',
|
||||
mixins: [chartHeaderMixin],
|
||||
methods: {
|
||||
openUrl () {
|
||||
window.open(this.chartInfo.param.link)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -786,6 +786,7 @@ export default {
|
||||
}
|
||||
this.chartConfig.param = {
|
||||
stack: 0,
|
||||
link: this.chartConfig.param.link,
|
||||
nullType: this.chartConfig.param.nullType,
|
||||
legend: { placement: 'bottom', values: [], show: true },
|
||||
thresholdShow: true,
|
||||
@@ -810,6 +811,7 @@ export default {
|
||||
}
|
||||
this.chartConfig.param = {
|
||||
nullType: this.chartConfig.param.nullType,
|
||||
link: this.chartConfig.param.link,
|
||||
statistics: 'last',
|
||||
text: 'value',
|
||||
valueMapping: [],
|
||||
@@ -828,6 +830,7 @@ export default {
|
||||
}
|
||||
this.chartConfig.param = {
|
||||
nullType: this.chartConfig.param.nullType,
|
||||
link: this.chartConfig.param.link,
|
||||
statistics: 'last',
|
||||
columns: [],
|
||||
tags: [],
|
||||
@@ -845,6 +848,7 @@ export default {
|
||||
break
|
||||
}
|
||||
this.chartConfig.param = {
|
||||
link: this.chartConfig.param.link,
|
||||
limit: 100
|
||||
}
|
||||
break
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
<el-form-item :label="$t('overall.remark')">
|
||||
<el-input maxlength="256" show-word-limit v-model="editChart.remark" :autosize="{ minRows: 1, maxRows: 6}" type="textarea"/>
|
||||
</el-form-item>
|
||||
<!--remark-->
|
||||
<el-form-item :label="$t('overall.link')">
|
||||
<el-input maxlength="256" show-word-limit v-model="editChart.param.link" :autosize="{ minRows: 1, maxRows: 6}" type="textarea"/>
|
||||
</el-form-item>
|
||||
|
||||
<!--title-->
|
||||
<div class="form__sub-title">
|
||||
@@ -161,7 +165,8 @@ export default {
|
||||
previewShow: false,
|
||||
editChart: {
|
||||
name: '',
|
||||
remark: ''
|
||||
remark: '',
|
||||
link: ''
|
||||
},
|
||||
panel: {
|
||||
id: '',
|
||||
@@ -421,12 +426,17 @@ export default {
|
||||
if (this.editChart.groupId === -1) {
|
||||
this.editChart.groupId = ''
|
||||
}
|
||||
if (this.editChart.param) {
|
||||
if (!this.editChart.param.min) {
|
||||
this.editChart.param.min = 0
|
||||
}
|
||||
if (!this.editChart.param.max) {
|
||||
this.editChart.param.max = 100
|
||||
}
|
||||
if (!this.editChart.param.link) {
|
||||
this.$set(this.editChart.param, 'link', '')
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'editChart.type': {
|
||||
|
||||
@@ -191,21 +191,25 @@ export default {
|
||||
case 'group':
|
||||
this.chartConfig.span = 12
|
||||
this.chartConfig.param = {
|
||||
link: this.chartConfig.param.link,
|
||||
collapse: true
|
||||
}
|
||||
break
|
||||
case 'text':
|
||||
this.chartConfig.param = {
|
||||
link: this.chartConfig.param.link,
|
||||
text: ''
|
||||
}
|
||||
break
|
||||
case 'diagram':
|
||||
this.chartConfig.param = {
|
||||
link: this.chartConfig.param.link,
|
||||
topo: ''
|
||||
}
|
||||
break
|
||||
case 'url':
|
||||
this.chartConfig.param = {
|
||||
link: this.chartConfig.param.link,
|
||||
url: ''
|
||||
}
|
||||
break
|
||||
|
||||
@@ -598,6 +598,7 @@ export default {
|
||||
break
|
||||
}
|
||||
this.chartConfig.param = {
|
||||
link: this.chartConfig.param.link,
|
||||
refer: 1,
|
||||
nullType: 'null',
|
||||
statistics: 'last',
|
||||
@@ -625,6 +626,7 @@ export default {
|
||||
break
|
||||
case 'table':
|
||||
this.chartConfig.param = {
|
||||
link: this.chartConfig.param.link,
|
||||
refer: 1,
|
||||
system: '',
|
||||
indexs: '',
|
||||
|
||||
Reference in New Issue
Block a user