fix:修改dashboard导出参数

This commit is contained in:
zyh
2022-12-01 10:44:09 +08:00
parent c04c735ad5
commit 189f9030a9
3 changed files with 11 additions and 12 deletions

View File

@@ -1314,9 +1314,9 @@ li {
} }
} }
.result-detail{ .result-detail{
height: 182px; height: 184px;
margin: 10px 0; margin: 10px 0;
padding: 16px 0; padding: 18px 0;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
&>div{ &>div{
@@ -1325,7 +1325,7 @@ li {
.nz-icon-override{ .nz-icon-override{
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
top: 5px; top: 3px;
right: 15px; right: 15px;
} }
.import-result-item { .import-result-item {

View File

@@ -289,7 +289,7 @@ export default {
assetTabs () { assetTabs () {
const hasSub = this.obj && this.obj.childrenNum const hasSub = this.obj && this.obj.childrenNum
const hasProcess = this.obj && this.obj.clientState == '1' const hasProcess = this.obj && this.obj.clientState == '1'
const hasVays = this.obj && this.obj.model.tsgAppliance == '1' const hasVays = this.obj && this.obj.model && this.obj.model.tsgAppliance == '1'
const tabs = [ const tabs = [
{ prop: 'panelTab', name: this.$t('overall.dashboard') }, { prop: 'panelTab', name: this.$t('overall.dashboard') },
{ prop: 'alertMessageTab', name: this.$t('overall.alert') }, { prop: 'alertMessageTab', name: this.$t('overall.alert') },

View File

@@ -533,6 +533,9 @@ export default {
delete params.end_time delete params.end_time
delete params.id delete params.id
delete params.searchName delete params.searchName
delete params.value
params.ids = params.panelId
delete params.panelId
} }
params.language = localStorage.getItem('nz-language') || 'en' params.language = localStorage.getItem('nz-language') || 'en'
params.format = this.importBox.format params.format = this.importBox.format
@@ -561,8 +564,7 @@ export default {
delete params.end_time delete params.end_time
delete params.id delete params.id
delete params.searchName delete params.searchName
} delete params.value
if (this.importUrl.indexOf('panel') > -1) {
delete params.panelId delete params.panelId
} }
// if (this.importUrl.indexOf('endpoint') > -1){ // if (this.importUrl.indexOf('endpoint') > -1){
@@ -595,8 +597,7 @@ export default {
delete params.end_time delete params.end_time
delete params.id delete params.id
delete params.searchName delete params.searchName
} delete params.value
if (this.importUrl.indexOf('panel') > -1) {
delete params.panelId delete params.panelId
} }
// if (this.importUrl.indexOf('endpoint') > -1){ // if (this.importUrl.indexOf('endpoint') > -1){
@@ -680,12 +681,10 @@ export default {
uInt8Array[i] = raw.charCodeAt(i) uInt8Array[i] = raw.charCodeAt(i)
} }
const link = document.createElement('a') const link = document.createElement('a')
const blob = new Blob([uInt8Array], { const blob = new Blob([uInt8Array])
type: 'application/vnd.ms-excel'
})
link.style.display = 'none' link.style.display = 'none'
link.href = URL.createObjectURL(blob) link.href = URL.createObjectURL(blob)
link.setAttribute('download', 'failed_records' + '-' + this.getTimeString() + '.xlsx') link.setAttribute('download', 'failed_records' + '-' + this.getTimeString() + '.json')
document.body.appendChild(link) document.body.appendChild(link)
link.click() link.click()
document.body.removeChild(link) document.body.removeChild(link)