fix:修改 同步功能的无效的问题
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
:from="from"
|
||||
:time-range="timeRange"
|
||||
:chart-detail-info="chartDetailInfo"
|
||||
@refreshPanel="$emit('refreshPanel')"
|
||||
@showFullscreen="showFullscreen"
|
||||
></panel-chart>
|
||||
</grid-item>
|
||||
@@ -280,10 +281,12 @@ export default {
|
||||
panelId: this.panelId,
|
||||
charts: charts
|
||||
}
|
||||
if (charts && charts.length) {
|
||||
this.$put('/visual/panel/chart/weights', params).then(() => {
|
||||
const position = getLayoutPosition(this.copyDataList)
|
||||
this.$store.commit('setChartLastPosition', position)
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
onScroll (scrollTop = 0, groupTop = 0) {
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
@loadMore="loadMore"
|
||||
@edit-chart="$emit('edit-chart', chartInfo)"
|
||||
@refresh="refresh"
|
||||
@sync="chartSync"
|
||||
@groupShow="groupShow"
|
||||
@showFullscreen="showFullscreen"
|
||||
></chart-header>
|
||||
@@ -440,6 +441,17 @@ export default {
|
||||
},
|
||||
saveChart () {
|
||||
this.$emit('saveChart', this.chartInfo)
|
||||
},
|
||||
chartSync () {
|
||||
this.loading = true
|
||||
this.$post('visual/panel/chart/syncTmpl', { ids: [this.chartInfo.id] }).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success(this.$t('tip.syncSuccess'))
|
||||
this.$emit('refreshPanel')
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
@on-refresh-time="refreshTime"
|
||||
@on-remove-chart="delChart"
|
||||
@on-add-group-item-chart="addGroupItem"
|
||||
@refreshPanel="refreshPanel"
|
||||
:loading="chartListLoading"
|
||||
:chart-detail-info="chartDetailInfo"
|
||||
></chart-list>
|
||||
@@ -274,6 +275,9 @@ export default {
|
||||
refresh () {
|
||||
this.getTableData(this.obj.id)
|
||||
},
|
||||
refreshPanel () {
|
||||
this.getData(this.filter)
|
||||
},
|
||||
refreshTime (st, et) {
|
||||
const startTime = bus.timeFormate(st, 'yyyy-MM-dd hh:mm')
|
||||
const endTime = bus.timeFormate(et, 'yyyy-MM-dd hh:mm')
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
@on-refresh-time="refreshTime"
|
||||
@on-remove-chart="delChart"
|
||||
@on-add-group-item-chart="addGroupItem"
|
||||
@refreshPanel="refreshPanel"
|
||||
:loading="chartListLoading"
|
||||
></chart-list>
|
||||
</div>
|
||||
@@ -299,11 +300,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 刷新
|
||||
Refresh () {
|
||||
const curTime = this.$refs.calendarPanel.getCurrentTime()
|
||||
this.filter.start_time = bus.timeFormate(curTime[0], this.panelDateFormatTime)
|
||||
this.filter.end_time = bus.timeFormate(curTime[1], this.panelDateFormatTime)
|
||||
this.getTableData()
|
||||
refreshPanel () {
|
||||
this.getData(this.filter)
|
||||
},
|
||||
// 面板相关操作
|
||||
panelChange (val) {
|
||||
|
||||
Reference in New Issue
Block a user