添加导出日志
This commit is contained in:
parent
82c5a21646
commit
27bb47b061
|
@ -19,7 +19,7 @@
|
|||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="6">
|
||||
<a-col :md="6" :sm="6">
|
||||
<a-form-item label="时间范围">
|
||||
<a-range-picker :default-value="defaultTime" show-time :show-time="{ format: 'HH:mm:ss' }" :format="dateFormat" @change="onChangeTime" />
|
||||
</a-form-item>
|
||||
|
@ -29,10 +29,11 @@
|
|||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="6">
|
||||
<a-col :md="7" :sm="6">
|
||||
<a-button @click="getTableDataList" type="primary">查询</a-button>
|
||||
<a-button @click="exportTool" type="primary">导出dmp</a-button>
|
||||
<a-button @click="handleAdd" type="primary">导出csv、txt</a-button>
|
||||
<a-button @click="handleAdd" type="primary">导出csv、txt</a-button>
|
||||
<a-button @click="openexptable" type="primary">导出日志</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -59,6 +60,7 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
<tablelist ref="modalForm" ></tablelist>
|
||||
<exptable ref="exptable" ></exptable>
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -66,11 +68,13 @@ import { metaDataTypeTree, tableDataList,DmExportTool } from '@/api/metaData'
|
|||
import { getAction, deleteAction, putAction, postAction,downFile } from '@/api/manage'
|
||||
import moment from 'moment';
|
||||
import tablelist from './modules/tablelist'
|
||||
import exptable from './modules/exptable'
|
||||
|
||||
export default {
|
||||
name: "metadata",
|
||||
components: {
|
||||
tablelist
|
||||
tablelist,
|
||||
exptable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -157,6 +161,13 @@ export default {
|
|||
}
|
||||
this.$refs.modalForm.add(this.queryParam.schemaMass);
|
||||
},
|
||||
openexptable(){
|
||||
if(this.queryParam.schemaMass == ""){
|
||||
this.$message.warning("请选择查询的导出的数据类型");
|
||||
return;
|
||||
}
|
||||
this.$refs.exptable.add(this.queryParam.schemaMass);
|
||||
},
|
||||
getMetaDataTypeTree() {
|
||||
metaDataTypeTree(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
|
157
src/views/data/modules/exptable.vue
Normal file
157
src/views/data/modules/exptable.vue
Normal file
|
@ -0,0 +1,157 @@
|
|||
<template>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:width="1400"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:ok-button-props="{ style: { display: 'none' } }"
|
||||
okText="保存"
|
||||
cancelText="关闭">
|
||||
|
||||
<a-spin :spinning="confirmLoading" style="background: #e6e9f1 !important;">
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="tableName"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource">
|
||||
<!-- :locale="myLocale"-->
|
||||
<template slot="logType" slot-scope="text">
|
||||
<span v-if="text === 0" >DMP</span>
|
||||
<span v-if="text === 1">CSV</span>
|
||||
<span v-if="text === 2">TXT</span>
|
||||
</template>
|
||||
<template slot="runStatus" slot-scope="text">
|
||||
<span style="color:black;" v-if="text === 0" >正在导出</span>
|
||||
<span style="color:#87d068;" v-if="text === 1">导出成功</span>
|
||||
<span style="color:red;" v-if="text === 3">导出失败</span>
|
||||
</template>
|
||||
|
||||
<!-- 字符串超长截取省略号显示-->
|
||||
</a-table>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from "moment"
|
||||
import axios from 'axios'
|
||||
import Vue from 'vue'
|
||||
import {getAction} from '@/api/manage'
|
||||
export default {
|
||||
name: "tablelist",
|
||||
components: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"导出日志",
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
schemaMass:null,
|
||||
dataSource:[],
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'id',
|
||||
width:60,
|
||||
align:"id",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '导出用户',
|
||||
align:"center",
|
||||
width:60,
|
||||
dataIndex: 'createBy',
|
||||
},
|
||||
{
|
||||
title: '导出开始时间',
|
||||
align:"center",
|
||||
width:60,
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '导出结束时间',
|
||||
align:"center",
|
||||
width:60,
|
||||
dataIndex: 'endTime'
|
||||
},
|
||||
{
|
||||
title: '导出文件类型',
|
||||
align:"center",
|
||||
width:60,
|
||||
dataIndex: 'logType',
|
||||
scopedSlots: { customRender: 'logType' },
|
||||
},
|
||||
{
|
||||
title: '运行状态',
|
||||
align:"center",
|
||||
width:60,
|
||||
dataIndex: 'runStatus',
|
||||
scopedSlots: { customRender: 'runStatus' },
|
||||
},
|
||||
{
|
||||
title: '导出地址',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'dmpPath'
|
||||
},
|
||||
{
|
||||
title: '导出日志地址',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'logPath'
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
add (schemaMass) {
|
||||
this.visible =true;
|
||||
this.schemaMass = schemaMass;
|
||||
this.getTableInfo();
|
||||
},
|
||||
getTableInfo(){
|
||||
getAction("/dataManager/DmExportLog?schemaMass="+this.schemaMass,{}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.dataSource = res.result
|
||||
console.log(this.dataSource)
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(selectedRowKeys) {
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
},
|
||||
onOk(value) {
|
||||
this.$emit('ok');
|
||||
},
|
||||
close () {
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$emit('ok');
|
||||
this.close();
|
||||
},
|
||||
handleCancel () {
|
||||
this.$emit('ok');
|
||||
this.close()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.disabled{
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user