fix:修改panel 到处的参数
This commit is contained in:
1
nezha-fronted/.gitignore
vendored
1
nezha-fronted/.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
/dist/
|
||||
/static/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user