rev: 修改

This commit is contained in:
2026-02-09 20:53:52 +08:00
parent 2753f58c24
commit ff48593eee
18 changed files with 402 additions and 45 deletions

View File

@@ -3,6 +3,17 @@
<div class="head-container">
<Search />
<crudOperation>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-thumb"
size="mini"
:loading="showDtlLoading"
@click="down"
>
导出
</el-button>
</crudOperation>
</div>
<!--表格渲染-->
@@ -49,6 +60,8 @@ import Search from './search'
import CRUD, { presenter } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
export default {
name: 'ErrorLog',
@@ -59,6 +72,7 @@ export default {
mixins: [presenter()],
data() {
return {
showDtlLoading: false,
errorInfo: '', dialog: false
}
},
@@ -96,6 +110,23 @@ export default {
})
}).catch(() => {
})
},
down() {
if (this.currentRow !== null) {
const data = this.crud.query
if (this.crud.query.createTime !== undefined) {
data.begin_time = this.crud.query.createTime[0]
data.end_time = this.crud.query.createTime[1]
}
data.log_type = 'ERROR'
this.showDtlLoading = true
download('/api/logs/download', data).then(result => {
downloadFile(result, '日志查询', 'xlsx')
this.showDtlLoading = false
}).catch(() => {
this.showDtlLoading = false
})
}
}
}
}

View File

@@ -3,6 +3,17 @@
<div class="head-container">
<Search />
<crudOperation>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-thumb"
size="mini"
:loading="showDtlLoading"
@click="down"
>
导出
</el-button>
</crudOperation>
</div>
<!--表格渲染-->
@@ -49,6 +60,8 @@ import CRUD, { presenter } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import i18n from '@/i18n'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
export default {
name: 'Log',
@@ -65,6 +78,11 @@ export default {
download: false
}
},
data() {
return {
showDtlLoading: false
}
},
methods: {
confirmDelAll() {
this.$confirm(i18n.t('ErrorLog.msg.m1'), i18n.t('common.Operate'), {
@@ -84,6 +102,23 @@ export default {
})
}).catch(() => {
})
},
down() {
if (this.currentRow !== null) {
const data = this.crud.query
if (this.crud.query.createTime !== undefined) {
data.begin_time = this.crud.query.createTime[0]
data.end_time = this.crud.query.createTime[1]
}
data.log_type = 'INFO'
this.showDtlLoading = true
download('/api/logs/download', data).then(result => {
downloadFile(result, '日志查询', 'xlsx')
this.showDtlLoading = false
}).catch(() => {
this.showDtlLoading = false
})
}
}
}
}

View File

@@ -85,7 +85,19 @@
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-thumb"
size="mini"
:loading="showDtlLoading"
@click="down"
>
导出
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="800px">
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="115px" label-suffix=":">
@@ -261,6 +273,8 @@ import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import {download} from "@/api/data";
import {downloadFile} from "@/utils";
const defaultForm = {
task_id: null,
@@ -322,6 +336,7 @@ export default {
},
rules: {
},
showDtlLoading: false,
taskStatusList: [],
taskConfigList: []
}
@@ -390,6 +405,22 @@ export default {
}).catch(err => {
console.log(err.response.data.message)
})
},
down() {
if (this.currentRow !== null) {
const data = this.crud.query
if (this.crud.query.createTime !== undefined) {
data.begin_time = this.crud.query.createTime[0]
data.end_time = this.crud.query.createTime[1]
}
this.showDtlLoading = true
download('/api/schBaseTask/download', data).then(result => {
downloadFile(result, '任务查询', 'xlsx')
this.showDtlLoading = false
}).catch(() => {
this.showDtlLoading = false
})
}
}
}
}