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