fix:修改panel 到处的参数

This commit is contained in:
zhangyu
2021-05-13 15:26:25 +08:00
parent 51d3479b21
commit 68deb0eee5
3 changed files with 39 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
.DS_Store
node_modules/
/dist/
/static/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

View File

@@ -352,7 +352,7 @@ export default {
newWeights.push({ id: chart.id, groupId: item.id, weight: this.dataList.length + i })
})
} else {
item.children= []
item.children = []
}
})
const panelId = this.pagePanelId
@@ -1467,24 +1467,31 @@ export default {
chartInfo.name = this.$t('asset.assetInfo')
const detail = []
if (!this.isModel) {
this.$refs['editChart' + chartInfo.id][0].showLoad()
const assetId = this.additionalInfo.assetId ? this.additionalInfo.assetId : this.additionalInfo.id
this.$get('/asset/info?id=' + assetId).then(response => {
if (response.code == 200) {
response.data && (function () {
response.data.Basic && detail.push({
title: vm.$t('project.chart.basicTitle'),
type: 'basic',
data: response.data.Basic
})
response.data.Attribute && detail.push({
title: vm.$t('asset.featureTitle'),
type: 'attribute',
data: response.data.Attribute
})
}())
}
this.$refs['editChart' + chartInfo.id][0].setData(chartInfo, detail, this.filter.panelId, this.filter)
const arr = []
arr.push(this.$get(`/asset/asset/${assetId}`))
arr.push(this.$get(`/asset/asset/feature/${assetId}`))
this.$refs['editChart' + chartInfo.id][0].showLoad()
// this.$get('/asset/info?id=' + assetId).then(response => {
// if (response.code == 200) {
// response.data && (function () {
// response.data.Basic && detail.push({
// title: vm.$t('project.chart.basicTitle'),
// type: 'basic',
// data: response.data.Basic
// })
// response.data.Attribute && detail.push({
// title: vm.$t('asset.featureTitle'),
// type: 'attribute',
// data: response.data.Attribute
// })
// }())
// }
// })
Promise.all(arr).then(res => {
console.log(res)
// this.$refs['editChart' + chartInfo.id][0].setData(chartInfo, detail, this.filter.panelId, this.filter)
})
} else {
detail.push({

View File

@@ -245,6 +245,13 @@ export default {
},
exportCur () {
const params = Object.assign({}, this.params)
if (this.exportUrl.indexOf('panel') > -1) {
params.pageSize = -1
delete params.start_time
delete params.end_time
delete params.id
delete params.searchName
}
params.language = localStorage.getItem('nz-language') || 'en'
this.exportExcel(this.exportUrl, params, this.exportFileName + '-' + this.getTimeString() + '.xlsx')
this.closeDialog()
@@ -252,6 +259,12 @@ export default {
exportAll () {
const params = JSON.parse(JSON.stringify(this.params))
params.pageSize = -1
if (this.exportUrl.indexOf('panel') > -1) {
delete params.start_time
delete params.end_time
delete params.id
delete params.searchName
}
if (this.importUrl.indexOf('panel') > -1) {
delete params.panelId
}