fix:修复asset detail 图表删除bug

This commit is contained in:
wangwenrui
2020-05-25 18:47:30 +08:00
parent 468237e91f
commit b0660c8df9
4 changed files with 10 additions and 12 deletions

View File

@@ -180,7 +180,7 @@
},
replaceSplit(key){
if(key){
return key.replace('$_$',' ')
return key.replace(/\$_\$/g,' ')
}
},
dragResize:function(e){

View File

@@ -202,7 +202,7 @@
methods: {
//刷新
Refresh() {
this.getTableData();
this.getTableData(this.obj.id);
},
refreshTime(st, et) {
const startTime = bus.timeFormate(st, 'yyyy-MM-dd hh:mm');
@@ -210,7 +210,7 @@
this.searchTime = [startTime, endTime];
},
panelReloadForDel: function () {
this.getTableData();
this.getTableData(this.obj.id);
},
/*图表相关操作--start*/
toAddChart: function () {
@@ -269,7 +269,7 @@
break;
}
}
this.getTableData(); //删除相关图表后,刷新面板数据
this.getTableData(this.obj.id); //删除相关图表后,刷新面板数据
} else {
console.error(response.msg);
this.$message.error(response.msg);
@@ -376,11 +376,11 @@
},
pageNo(val) {
this.pageObj.pageNo = val;
this.getTableData();
this.getTableData(this.obj.id);
},
pageSize(val) {
this.pageObj.pageSize = val;
this.getTableData();
this.getTableData(this.obj.id);
},
search:function(){
if(this.$refs.chartList){

View File

@@ -907,9 +907,9 @@
if (this.pageObj.id) {
this.assetData.id=this.pageObj.id;
let reqData = JSON.parse(JSON.stringify(this.assetData));
if (reqData.modelId) {
reqData.modelId = reqData.modelId.join(',').split(',')[1];
}
// if (reqData.modelId) {
// reqData.modelId = reqData.modelId.join(',').split(',')[1];
// }
this.$put('asset', reqData).then(res => {
const h = this.$createElement;
if (res.code === 200) {

View File

@@ -361,9 +361,7 @@
'chart-preview':chartPreview,
},
mounted() {
this.$nextTick(()=>{
console.log(!this.isUrl && !this.isSingleStat)
})
},
methods: {
show(show) {