fix:修改 asset chart样式错乱的问题 以及 asset chart 导出 参数错乱的问题

This commit is contained in:
zhangyu
2021-05-18 10:12:47 +08:00
parent 5052aeb853
commit 74ee237ab0
2 changed files with 9 additions and 5 deletions

View File

@@ -10,7 +10,7 @@
> >
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template> <template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
<template v-slot:top-tool-right> <template v-slot:top-tool-right>
<span v-if="from === fromRoute.asset"> <div v-if="from === fromRoute.asset" style="display: flex" >
<div class="top-tool-search margin-r-20"> <div class="top-tool-search margin-r-20">
<el-input id="queryPanel" ref="queryPanel" v-model="filter.searchName" class="query-input-inactive" clearable size="small" @blur="blurInput" @clear="clearInput" @focus="focusInput"> <el-input id="queryPanel" ref="queryPanel" v-model="filter.searchName" class="query-input-inactive" clearable size="small" @blur="blurInput" @clear="clearInput" @focus="focusInput">
<i slot="suffix" class="el-input__icon nz-icon nz-icon-search" style="float: right" @click="focusInput"></i> <i slot="suffix" class="el-input__icon nz-icon nz-icon-search" style="float: right" @click="focusInput"></i>
@@ -50,11 +50,11 @@
@panelLockChange="panelLockChange" @panelLockChange="panelLockChange"
> >
</top-tool-more-options> </top-tool-more-options>
</span> </div>
<span v-else> <button @click="panelLock=!panelLock" id="panel-lock" :title='panelLock ? $t("overall.locked") : $t("overall.unlocked")' class="top-tool-btn margin-r-10" <div v-else> <button @click="panelLock=!panelLock" id="panel-lock" :title='panelLock ? $t("overall.locked") : $t("overall.unlocked")' class="top-tool-btn margin-r-10"
type="button"> type="button">
<i :class="{'nz-icon nz-icon-lock':panelLock,'nz-icon nz-icon-unlock':!panelLock}"></i> <i :class="{'nz-icon nz-icon-lock':panelLock,'nz-icon nz-icon-unlock':!panelLock}"></i>
</button></span> </button></div>
</template> </template>
<template v-slot> <template v-slot>
<div class="panel"> <div class="panel">

View File

@@ -248,7 +248,7 @@ export default {
return jsonData.map(v => filterVal.map(j => v[j])) return jsonData.map(v => filterVal.map(j => v[j]))
}, },
exportCur () { exportCur () {
const params = Object.assign({}, this.params) const params = JSON.parse(JSON.stringify(this.params))
if (this.exportUrl.indexOf('panel') > -1) { if (this.exportUrl.indexOf('panel') > -1) {
params.pageSize = -1 params.pageSize = -1
delete params.start_time delete params.start_time
@@ -284,6 +284,10 @@ export default {
if (this.paramsType) { if (this.paramsType) {
params.type = this.paramsType params.type = this.paramsType
} }
if (params.from == 'asset') {
delete params.type
delete params.from
}
axios.get(url, { responseType: 'blob', params: params }).then(res => { axios.get(url, { responseType: 'blob', params: params }).then(res => {
if (window.navigator.msSaveOrOpenBlob) { if (window.navigator.msSaveOrOpenBlob) {
// 兼容ie11 // 兼容ie11