Compare commits
4 Commits
1bc5c4c448
...
53c080ee6f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
53c080ee6f | ||
![]() |
8ef96d5004 | ||
![]() |
1b34272383 | ||
![]() |
4182e6e52e |
|
@ -24,9 +24,9 @@
|
||||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<!-- <a-col :md="6" :sm="8">
|
||||||
<a-button type="primary" @click="handleAdd" icon="plus" style="margin-left: 8px;left: 10px">添加</a-button>
|
<a-button type="primary" @click="handleAdd" icon="plus" style="margin-left: 8px;left: 10px">添加</a-button>
|
||||||
</a-col>
|
</a-col> -->
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -115,13 +115,13 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'columnPosition',
|
dataIndex: 'columnPosition',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '操作',
|
// title: '操作',
|
||||||
dataIndex: 'action',
|
// dataIndex: 'action',
|
||||||
align: "center",
|
// align: "center",
|
||||||
width: 260,
|
// width: 260,
|
||||||
scopedSlots: { customRender: 'action' },
|
// scopedSlots: { customRender: 'action' },
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
dataTypedataSources:[],
|
dataTypedataSources:[],
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ import { metaDataTypeTree } from '@/api/metaData'
|
||||||
this.$message.warning("至少选择一个需要导出的表");
|
this.$message.warning("至少选择一个需要导出的表");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
postAction("/dataManager/DmExportTool?schemaMass="+this.queryParam.schemaMass+"&tableNames="+this.selectedRowKeys+"&exportType="+exportType,{}).then(res => {
|
postAction("/dataManager/getDataManagerInfo?schemaMass="+this.queryParam.schemaMass+"&tableNames="+this.selectedRowKeys+"&exportType="+exportType,{}).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message.success(res.result);
|
this.$message.success(res.result);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -83,12 +83,7 @@
|
||||||
customRender: () => {
|
customRender: () => {
|
||||||
return this.datatypequeryParam.schemaDesc;
|
return this.datatypequeryParam.schemaDesc;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
{
|
|
||||||
title: '标签类型',
|
|
||||||
align:"center",
|
|
||||||
dataIndex: 'tagNames'
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
tableScrollY: 0,
|
tableScrollY: 0,
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,21 @@
|
||||||
validateTrigger: 'change'
|
validateTrigger: 'change'
|
||||||
}]" :disabled="testConnBool"></a-input>
|
}]" :disabled="testConnBool"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="选择数据库类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-select show-search :disabled="testConnBool"placeholder="选择数据库类型" option-filter-prop="children" :filter-option="filterOption" size="large" v-decorator="['dbType', {
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: '选择数据库类型' },
|
||||||
|
],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
}]">
|
||||||
|
<a-select-option key="dm">
|
||||||
|
达梦数据库
|
||||||
|
</a-select-option>
|
||||||
|
<a-select-option key="mysql">
|
||||||
|
MySql
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item :labelCol="labelCol"
|
<a-form-item :labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol" label="端口号" >
|
:wrapperCol="wrapperCol" label="端口号" >
|
||||||
<a-input v-decorator="['port',{
|
<a-input v-decorator="['port',{
|
||||||
|
@ -198,7 +213,8 @@ import { datasyncqueryPage,
|
||||||
database:"",
|
database:"",
|
||||||
dataType:"",
|
dataType:"",
|
||||||
shipModel:"",
|
shipModel:"",
|
||||||
shipNum:""
|
shipNum:"",
|
||||||
|
dbType:""
|
||||||
},
|
},
|
||||||
recordId:""
|
recordId:""
|
||||||
}
|
}
|
||||||
|
@ -220,7 +236,8 @@ import { datasyncqueryPage,
|
||||||
model.dataType = '';
|
model.dataType = '';
|
||||||
model.shipModel = '';
|
model.shipModel = '';
|
||||||
model.shipNum = '';
|
model.shipNum = '';
|
||||||
this.form.setFieldsValue(pick(model,'ip','port','username','password','database','dataType','shipModel','shipNum'));
|
model.dbType='';
|
||||||
|
this.form.setFieldsValue(pick(model,'ip','dbType','port','username','password','database','dataType','shipModel','shipNum'));
|
||||||
},
|
},
|
||||||
edit (record) {
|
edit (record) {
|
||||||
this.visible =true;
|
this.visible =true;
|
||||||
|
@ -241,7 +258,8 @@ import { datasyncqueryPage,
|
||||||
model.dataType = res.result.dataTypeId;
|
model.dataType = res.result.dataTypeId;
|
||||||
model.shipModel = res.result.shipModelId;
|
model.shipModel = res.result.shipModelId;
|
||||||
model.shipNum = res.result.shipNumId;
|
model.shipNum = res.result.shipNumId;
|
||||||
this.form.setFieldsValue(pick(model,'ip','port','username','password','database','dataType','shipModel','shipNum'));
|
model.dbType== res.result.shipNumId;
|
||||||
|
this.form.setFieldsValue(pick(model,'ip','dbType','port','username','password','database','dataType','shipModel','shipNum'));
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message);
|
this.$message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
@ -264,7 +282,7 @@ import { datasyncqueryPage,
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!err) {
|
if (!err) {
|
||||||
that.confirmLoading = true;
|
that.confirmLoading = true;
|
||||||
datasyncgetTableInfo({ip:values.ip,port:values.port,username:values.username,password:values.password,database:values.database}).then((res) => {
|
datasyncgetTableInfo({ip:values.ip,port:values.port,username:values.username,password:values.password,database:values.database,dbType:values.dbType}).then((res) => {
|
||||||
if (res.result) {
|
if (res.result) {
|
||||||
this.confirmLoading = false;
|
this.confirmLoading = false;
|
||||||
this.dataSource = res.result;
|
this.dataSource = res.result;
|
||||||
|
@ -350,7 +368,7 @@ import { datasyncqueryPage,
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!err) {
|
if (!err) {
|
||||||
that.confirmLoading = true;
|
that.confirmLoading = true;
|
||||||
datasynctestConn({ip:values.ip,port:values.port,username:values.username,password:values.password}).then((res) => {
|
datasynctestConn({ip:values.ip,port:values.port,username:values.username,password:values.password,dbType:values.dbType}).then((res) => {
|
||||||
if (res.result) {
|
if (res.result) {
|
||||||
this.testConnBool =true;
|
this.testConnBool =true;
|
||||||
this.getdatabaseList();
|
this.getdatabaseList();
|
||||||
|
@ -364,7 +382,7 @@ import { datasyncqueryPage,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getdatabaseList(){
|
getdatabaseList(){
|
||||||
datasyncgetDatabases({ip:this.datamodel.ip,port:this.datamodel.port,username:this.datamodel.username,password:this.datamodel.password}).then((res) => {
|
datasyncgetDatabases({ip:this.datamodel.ip,dbType:this.datamodel.dbType,port:this.datamodel.port,username:this.datamodel.username,password:this.datamodel.password}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.selectDataBase = false;
|
this.selectDataBase = false;
|
||||||
this.databaseSource = res.result;
|
this.databaseSource = res.result;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
:pagination="pagination" :scroll="{ y: 'calc(100vh - 420px)' }" rowKey="id"
|
:pagination="pagination" :scroll="{ y: 'calc(100vh - 420px)' }" rowKey="id"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="download(record,$event)">下载</a> <a @click="viewFile(record,$event)">预览</a>
|
<a @click="download(record,$event)">下载</a> <a v-if="isPreviewable(record.fileName)" @click="viewFile(record,$event)">预览</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -120,6 +120,7 @@ export default {
|
||||||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||||
},
|
},
|
||||||
|
viewFileType:["png","bmp","jpg","jpeg","mp4","avi","mp3","pdf"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -131,6 +132,12 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
isPreviewable(fileName){
|
||||||
|
const parts = fileName.split('.');
|
||||||
|
if (parts.length < 2) return false; // 无后缀
|
||||||
|
const extension = parts.pop().toLowerCase();
|
||||||
|
return this.viewFileType.includes(extension);
|
||||||
|
},
|
||||||
handleTableChange(pagination, filters, sorter) {
|
handleTableChange(pagination, filters, sorter) {
|
||||||
this.pagination = pagination
|
this.pagination = pagination
|
||||||
this.searchFile.pageNum = pagination.current
|
this.searchFile.pageNum = pagination.current
|
||||||
|
|
|
@ -132,7 +132,7 @@
|
||||||
@change="handleTableChange"
|
@change="handleTableChange"
|
||||||
>
|
>
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="download(record, $event)">下载</a> <a @click="viewFile(record, $event)">预览</a>
|
<a @click="download(record, $event)">下载</a> <a v-if="isPreviewable(record.fileName)" @click="viewFile(record, $event)">预览</a>
|
||||||
<a @click="DeleteFile(record, $event)">删除</a>
|
<a @click="DeleteFile(record, $event)">删除</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
@ -233,6 +233,7 @@ export default {
|
||||||
audio: 0,
|
audio: 0,
|
||||||
total: 0,
|
total: 0,
|
||||||
},
|
},
|
||||||
|
viewFileType:["png","bmp","jpg","jpeg","mp4","avi","mp3","pdf"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
|
@ -243,6 +244,12 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
isPreviewable(fileName){
|
||||||
|
const parts = fileName.split('.');
|
||||||
|
if (parts.length < 2) return false; // 无后缀
|
||||||
|
const extension = parts.pop().toLowerCase();
|
||||||
|
return this.viewFileType.includes(extension);
|
||||||
|
},
|
||||||
calculateScrollY() {
|
calculateScrollY() {
|
||||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||||
const container = this.$refs.tableContainer;
|
const container = this.$refs.tableContainer;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user