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){ replaceSplit(key){
if(key){ if(key){
return key.replace('$_$',' ') return key.replace(/\$_\$/g,' ')
} }
}, },
dragResize:function(e){ dragResize:function(e){

View File

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

View File

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

View File

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