fix:处理group删除 子组件未刷新的问题 以及保存 文本 url以及列表保存不到group的问题
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<span class="el-dropdown-link chart-title">
|
||||
<span class="chart-title-text">{{chartData.name}}</span>
|
||||
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
|
||||
<span v-if="chartData.remark">
|
||||
<span>
|
||||
<el-tooltip :content="chartData.remark" placement="top" effect="light">
|
||||
<i class="nz-icon nz-icon-info-normal"></i>
|
||||
</el-tooltip>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<span class="el-dropdown-link chart-title">
|
||||
<span class="chart-title-text">{{chartData.name}}</span>
|
||||
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
|
||||
<span v-if="chartData.remark">
|
||||
<span>
|
||||
<el-tooltip :content="chartData.remark" placement="top" effect="light">
|
||||
<i class="nz-icon nz-icon-info-normal"></i>
|
||||
</el-tooltip>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<span v-show="!showList" class="collapse-content">({{chartData.children.length}} charts)</span>
|
||||
</span>
|
||||
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
|
||||
<span v-if="chartData.remark">
|
||||
<span>
|
||||
<el-tooltip :content="chartData.remark" placement="top" effect="light">
|
||||
<i class="nz-icon nz-icon-info-normal"></i>
|
||||
</el-tooltip>
|
||||
@@ -226,6 +226,10 @@ export default {
|
||||
this.dropdownMenuShow = false
|
||||
this.$emit('on-remove-group-chart', chart)
|
||||
},
|
||||
// 删除group 下的该图表
|
||||
removeChartGroup (chart) {
|
||||
this.$emit('on-remove-group-chart', chart)
|
||||
},
|
||||
addGroupItemChart () {
|
||||
this.$emit('on-add-group-item-chart', this.data.id)
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<span class="el-dropdown-link chart-title">
|
||||
<span class="chart-title-text">{{chartData.name}}</span>
|
||||
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
|
||||
<span v-if="chartData.remark">
|
||||
<span>
|
||||
<el-tooltip :content="chartData.remark" placement="top" effect="light">
|
||||
<i class="nz-icon nz-icon-info-normal"></i>
|
||||
</el-tooltip>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<span class="el-dropdown-link chart-title">
|
||||
<span class="chart-title-text">{{chartData.name}}</span>
|
||||
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
|
||||
<span v-if="chartData.remark">
|
||||
<span>
|
||||
<el-tooltip :content="chartData.remark" placement="top" effect="light">
|
||||
<i class="nz-icon nz-icon-info-normal"></i>
|
||||
</el-tooltip>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<span class="el-dropdown-link chart-title">
|
||||
<span class="chart-title-text">{{chartData.name}}</span>
|
||||
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
|
||||
<span v-if="chartData.remark">
|
||||
<span>
|
||||
<el-tooltip :content="chartData.remark" placement="top" effect="light">
|
||||
<i class="nz-icon nz-icon-info-normal"></i>
|
||||
</el-tooltip>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<span class="el-dropdown-link chart-title">
|
||||
<span class="chart-title-text">{{chartData.name}}</span>
|
||||
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
|
||||
<span v-if="chartData.remark">
|
||||
<span>
|
||||
<el-tooltip :content="chartData.remark" placement="top" effect="light">
|
||||
<i class="nz-icon nz-icon-info-normal"></i>
|
||||
</el-tooltip>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<span class="el-dropdown-link chart-title">
|
||||
<span class="chart-title-text">{{chartData.name}}</span>
|
||||
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
|
||||
<span v-if="chartData.remark">
|
||||
<span>
|
||||
<el-tooltip :content="chartData.remark" placement="top" effect="light">
|
||||
<i class="nz-icon nz-icon-info-normal"></i>
|
||||
</el-tooltip>
|
||||
|
||||
@@ -874,7 +874,7 @@ export default {
|
||||
}); */
|
||||
|
||||
// panelPromise.then(()=>{
|
||||
console.log(this.editChart)
|
||||
console.log(this.editChart,params)
|
||||
if (this.panelId) {
|
||||
const chartParams = params || this.editChart
|
||||
chartParams.panelId = this.panelId
|
||||
@@ -948,7 +948,8 @@ export default {
|
||||
param: {
|
||||
|
||||
},
|
||||
sync: this.editChart.sync
|
||||
sync: this.editChart.sync,
|
||||
groupId: this.editChart.groupId
|
||||
}
|
||||
if (this.editChart.type === 'singleStat' || this.editChart.type === 'pie' || this.editChart.type === 'bar') {
|
||||
// params.param.statistics=this.statistics;
|
||||
@@ -1012,7 +1013,8 @@ export default {
|
||||
unit: this.editChart.unit,
|
||||
param: param,
|
||||
sync: this.editChart.sync,
|
||||
remark: this.editChart.remark
|
||||
remark: this.editChart.remark,
|
||||
groupId: this.editChart.groupId,
|
||||
}
|
||||
if (valid) {
|
||||
if (opType === 'preview') {
|
||||
@@ -1080,7 +1082,8 @@ export default {
|
||||
url: this.editChart.param.url
|
||||
},
|
||||
sync: this.editChart.sync,
|
||||
remark: this.editChart.remark
|
||||
remark: this.editChart.remark,
|
||||
groupId: this.editChart.groupId,
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
@@ -1108,7 +1111,8 @@ export default {
|
||||
text: text
|
||||
},
|
||||
sync: this.editChart.sync,
|
||||
remark: this.editChart.remark
|
||||
remark: this.editChart.remark,
|
||||
groupId: this.editChart.groupId
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
@@ -1484,6 +1488,11 @@ export default {
|
||||
if (this.editChart.type != 'singleStat' && this.editChart.type != 'pie' && this.editChart.type != 'table') {
|
||||
delete params.param.statistics
|
||||
}
|
||||
|
||||
if(this.editChart.type === 'bar' && this.editChart.param.statistics && this.editChart.param.statistics !== 'null'){
|
||||
params.param.statistics = this.editChart.param.statistics
|
||||
}
|
||||
|
||||
if (this.editChart.type === 'line' || this.editChart.type === 'bar' || this.editChart.type === 'stackArea' || this.editChart.type === 'table') {
|
||||
params.param.threshold = this.editChart.param.threshold
|
||||
if (this.editChart.type === 'table') {
|
||||
|
||||
@@ -347,6 +347,9 @@ export default {
|
||||
if (chartList[i].id === data.id) {
|
||||
chartList.splice(i, 1)
|
||||
}
|
||||
if (chartList[i].type === 'group') {
|
||||
chartList[i].children = chartList[i].children.filter((item) => item.id !== data.id)
|
||||
}
|
||||
// if(data.next != -1){
|
||||
// if(chartList[i].id === data.next){
|
||||
// nextChart = chartList[i]
|
||||
|
||||
Reference in New Issue
Block a user