feat:添加chart 同步按钮 以及 修改时间显示不正确的问题
This commit is contained in:
@@ -59,6 +59,9 @@
|
||||
<el-dropdown-item v-has="'panel_chart_add'">
|
||||
<div id="chart-temp-add" @click="addChartByTemp"><i class="nz-icon nz-icon-add"></i>{{ $t('overall.AddByTemplate') }}</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-has="'panel_chart_edit'">
|
||||
<div id="chart-temp-sync" @click="chartBySync"><i class="nz-icon nz-icon-sync"></i>{{ $t('overall.syncChart') }}</div>
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</top-tool-more-options>
|
||||
</div>
|
||||
@@ -296,6 +299,16 @@ export default {
|
||||
this.chart.panelId = this.showPanel.id
|
||||
this.rightBox.chartTemp.show = true
|
||||
},
|
||||
chartBySync () {
|
||||
this.$post('visual/panel/chart/syncTmpl', { panelId: this.showPanel.id }).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.getData(this.filter)
|
||||
this.$message.success(this.$t('tip.syncSuccess'))
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
addGroupItem (groupId) {
|
||||
this.chart = this.newChart()
|
||||
this.chart.groupId = groupId
|
||||
|
||||
Reference in New Issue
Block a user