提交77,78,79,76
This commit is contained in:
parent
4a0a3aa4d1
commit
b7048baf2a
|
@ -1,4 +1,4 @@
|
|||
NODE_ENV=development
|
||||
VUE_APP_API_BASE_URL=http://pbl.natapp1.cc/jeecg-boot
|
||||
VUE_APP_API_BASE_URL=http://pbl1.natapp1.cc/jeecg-boot
|
||||
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
|
||||
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
|
|
@ -8,7 +8,8 @@
|
|||
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName">
|
||||
{{ d.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-select>
|
||||
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button>
|
||||
</div>
|
||||
<!-- table区域-begin -->
|
||||
<div ref="tableContainer" style="height:calc(100vh - 347px);background: #e6e9f1;padding:10px;">
|
||||
|
@ -153,6 +154,9 @@ export default {
|
|||
|
||||
},
|
||||
methods: {
|
||||
openlink(url) {
|
||||
window.location.href = url;
|
||||
},
|
||||
calculateScrollY() {
|
||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||
const container = this.$refs.tableContainer;
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
</a-col>
|
||||
<a-col :md="5" :sm="6">
|
||||
<a-button @click="getTableDataList" type="primary">查询</a-button>
|
||||
<a-button @click="exportTool" type="primary">导出</a-button>
|
||||
<a-button @click="exportTool" type="primary">导出dmp</a-button>
|
||||
<a-button @click="handleAdd" type="primary">导出csv、txt</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -57,15 +58,19 @@
|
|||
<div class="linese"></div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<tablelist ref="modalForm" @ok="getTableDataList"></tablelist>
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
import { metaDataTypeTree, tableDataList,DmExportTool } from '@/api/metaData'
|
||||
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
||||
import moment from 'moment';
|
||||
import tablelist from './modules/tablelist'
|
||||
|
||||
export default {
|
||||
name: "metadata",
|
||||
components: {
|
||||
tablelist
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -145,6 +150,13 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
handleAdd(){
|
||||
if(this.queryParam.schemaMass == ""){
|
||||
this.$message.warning("请选择导出的数据类型");
|
||||
return;
|
||||
}
|
||||
this.$refs.modalForm.add(this.queryParam.schemaMass);
|
||||
},
|
||||
getMetaDataTypeTree() {
|
||||
metaDataTypeTree(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -229,9 +241,12 @@ export default {
|
|||
this.$message.warning("请选择导出的数据类型");
|
||||
return;
|
||||
}
|
||||
postAction("/dataManager/DmExportTool?schemaMass="+this.queryParam.schemaMass,{}).then(res => {
|
||||
|
||||
|
||||
postAction("/dataManager/DmExportTool?schemaMass="+this.queryParam.schemaMass+"&tableNames="+""+"&exportType=0",{}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.result);
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
139
src/views/data/modules/tablelist.vue
Normal file
139
src/views/data/modules/tablelist.vue
Normal file
|
@ -0,0 +1,139 @@
|
|||
<template>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:width="800"
|
||||
: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"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource">
|
||||
<!-- :locale="myLocale"-->
|
||||
|
||||
<!-- 字符串超长截取省略号显示-->
|
||||
</a-table>
|
||||
<a-button type="primary" style="width:50%;" @click="exportTool(1)">导出csv</a-button>
|
||||
<a-button type="primary" style="width:50%;" @click="exportTool(2)">导出txt</a-button>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from "moment"
|
||||
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
||||
import { metaDataTypeTree } from '@/api/metaData'
|
||||
|
||||
export default {
|
||||
name: "tablelist",
|
||||
components: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"导出表数据",
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
queryParam: {
|
||||
sourceType: 2,
|
||||
schemaMass: null,
|
||||
massKey: null
|
||||
},
|
||||
dataSource:[],
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'id',
|
||||
width:60,
|
||||
align:"id",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '报文名',
|
||||
align:"center",
|
||||
dataIndex: 'massName',
|
||||
},
|
||||
{
|
||||
title: '表名',
|
||||
align:"center",
|
||||
dataIndex: 'tableName'
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
add (schemaMass) {
|
||||
this.visible =true;
|
||||
this.queryParam.schemaMass = schemaMass;
|
||||
this.getTableInfo();
|
||||
},
|
||||
getTableInfo(){
|
||||
metaDataTypeTree(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
var keys = Object.keys(res.result)
|
||||
keys.forEach((element, index) => {
|
||||
this.dataSource = res.result[element]
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(selectedRowKeys) {
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
},
|
||||
exportTool(exportType){
|
||||
if(this.queryParam.schemaMass == ""){
|
||||
this.$message.warning("参数错误请重新打开导出");
|
||||
return;
|
||||
}
|
||||
if(this.selectedRowKeys.length <= 0){
|
||||
this.$message.warning("至少选择一个需要导出的表");
|
||||
return;
|
||||
}
|
||||
postAction("/dataManager/DmExportTool?schemaMass="+this.queryParam.schemaMass+"&tableNames="+this.selectedRowKeys+"&exportType="+exportType,{}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.result);
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
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>
|
|
@ -53,6 +53,8 @@
|
|||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="processFile(record)">解析</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="clearTableData(record.id)">卸载</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
|
@ -189,6 +191,17 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
clearTableData:function (id){
|
||||
var that = this;
|
||||
deleteAction("/fileDataLink/clearTableData?id="+id,{}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.result);
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
that.loadData();
|
||||
});
|
||||
},
|
||||
handleDelete: function (id) {
|
||||
var that = this;
|
||||
deleteAction("/fileDataLink/delete?id="+id,{}).then((res) => {
|
||||
|
|
|
@ -56,6 +56,8 @@
|
|||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="processFile(record)">解析</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="clearTableData(record.id)">卸载</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
|
@ -204,6 +206,17 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
clearTableData:function (id){
|
||||
var that = this;
|
||||
deleteAction("/fileDataLink/clearTableData?id="+id,{}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.result);
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
that.loadData();
|
||||
});
|
||||
},
|
||||
handleDelete: function (id) {
|
||||
var that = this;
|
||||
deleteAction("/fileDataLink/delete?id="+id,{}).then((res) => {
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="processFile(record)" v-has="'cont:btn'" >解析</a>
|
||||
<a-divider type="vertical" v-has="'cont:btn'" />
|
||||
<a @click="clearTableData(record.id)">卸载</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
|
@ -199,6 +201,17 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
clearTableData:function (id){
|
||||
var that = this;
|
||||
deleteAction("/fileDataLink/clearTableData?id="+id,{}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.result);
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
that.loadData();
|
||||
});
|
||||
},
|
||||
handleDelete: function (id) {
|
||||
var that = this;
|
||||
deleteAction("/fileDataLink/delete?id="+id,{}).then((res) => {
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
import { filterObj } from '@/utils/util';
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
import moment from 'moment';
|
||||
|
||||
export default {
|
||||
name: "LogList",
|
||||
|
@ -69,6 +70,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
description: '这是日志管理页面',
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
ipInfo: '',
|
||||
|
@ -145,6 +147,9 @@ export default {
|
|||
list: "/sys/log/list",
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getQueryParams() {
|
||||
|
@ -153,6 +158,17 @@ export default {
|
|||
param.pageNo = this.ipagination.current;
|
||||
param.pageSize = this.ipagination.pageSize;
|
||||
delete param.createTimeRange; // 时间参数不传递后台
|
||||
if(this.queryParam.startTime == null){
|
||||
const start = moment()
|
||||
.subtract(7, 'days')
|
||||
.set({ hour: 0, minute: 0, second: 0 });
|
||||
const end = moment()
|
||||
.set({ hour: 23, minute: 59, second: 59 });
|
||||
this.queryParam.startTime = start.format(this.dateFormat);
|
||||
this.queryParam.endTime = end.format(this.dateFormat);
|
||||
param.startTime = start.format(this.dateFormat);
|
||||
param.endTime = end.format(this.dateFormat);
|
||||
}
|
||||
if (this.superQueryParams) {
|
||||
param['superQueryParams'] = encodeURI(this.superQueryParams)
|
||||
param['superQueryMatchType'] = this.superQueryMatchType
|
||||
|
@ -170,6 +186,13 @@ export default {
|
|||
logType: '1',
|
||||
keyWord: '',
|
||||
}; //清空查询区域参数
|
||||
const start = moment()
|
||||
.subtract(7, 'days')
|
||||
.set({ hour: 0, minute: 0, second: 0 });
|
||||
const end = moment()
|
||||
.set({ hour: 23, minute: 59, second: 59 });
|
||||
that.queryParam.startTime = start.format(this.dateFormat);
|
||||
that.queryParam.endTime = end.format(this.dateFormat);
|
||||
that.queryParam.logType = logType;
|
||||
that.loadData(this.ipagination.current);
|
||||
},
|
||||
|
@ -189,11 +212,6 @@ export default {
|
|||
that.queryParam.logType = key;
|
||||
that.loadData();
|
||||
},
|
||||
onDateChange: function (value, dateString) {
|
||||
console.log(dateString[0], dateString[1]);
|
||||
this.queryParam.createTime_begin = dateString[0];
|
||||
this.queryParam.createTime_end = dateString[1];
|
||||
},
|
||||
onDateOk(value) {
|
||||
console.log(value);
|
||||
},
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
import { filterObj } from '@/utils/util';
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
import moment from 'moment';
|
||||
|
||||
export default {
|
||||
name: "OptionLog",
|
||||
|
@ -71,6 +72,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
description: '这是日志管理页面',
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
ipInfo: '',
|
||||
|
@ -160,6 +162,17 @@ export default {
|
|||
param.pageNo = this.ipagination.current;
|
||||
param.pageSize = this.ipagination.pageSize;
|
||||
delete param.createTimeRange; // 时间参数不传递后台
|
||||
if(this.queryParam.startTime == null){
|
||||
const start = moment()
|
||||
.subtract(7, 'days')
|
||||
.set({ hour: 0, minute: 0, second: 0 });
|
||||
const end = moment()
|
||||
.set({ hour: 23, minute: 59, second: 59 });
|
||||
this.queryParam.startTime = start.format(this.dateFormat);
|
||||
this.queryParam.endTime = end.format(this.dateFormat);
|
||||
param.startTime = start.format(this.dateFormat);
|
||||
param.endTime = end.format(this.dateFormat);
|
||||
}
|
||||
if (this.superQueryParams) {
|
||||
param['superQueryParams'] = encodeURI(this.superQueryParams)
|
||||
param['superQueryMatchType'] = this.superQueryMatchType
|
||||
|
@ -173,6 +186,13 @@ export default {
|
|||
var logType = that.queryParam.logType;
|
||||
that.queryParam = {}; //清空查询区域参数
|
||||
that.queryParam.logType = logType;
|
||||
const start = moment()
|
||||
.subtract(7, 'days')
|
||||
.set({ hour: 0, minute: 0, second: 0 });
|
||||
const end = moment()
|
||||
.set({ hour: 23, minute: 59, second: 59 });
|
||||
that.queryParam.startTime = start.format(this.dateFormat);
|
||||
that.queryParam.endTime = end.format(this.dateFormat);
|
||||
that.loadData(this.ipagination.current);
|
||||
},
|
||||
// 日志类型
|
||||
|
|
Loading…
Reference in New Issue
Block a user