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

View File

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