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-form-item>
|
||||
</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-col>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
@ -115,13 +115,13 @@ export default {
|
|||
align: "center",
|
||||
dataIndex: 'columnPosition',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: "center",
|
||||
width: 260,
|
||||
scopedSlots: { customRender: 'action' },
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// dataIndex: 'action',
|
||||
// align: "center",
|
||||
// width: 260,
|
||||
// scopedSlots: { customRender: 'action' },
|
||||
// }
|
||||
],
|
||||
dataTypedataSources:[],
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ import { metaDataTypeTree } from '@/api/metaData'
|
|||
this.$message.warning("至少选择一个需要导出的表");
|
||||
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) {
|
||||
this.$message.success(res.result);
|
||||
}else{
|
||||
|
|
|
@ -83,12 +83,7 @@
|
|||
customRender: () => {
|
||||
return this.datatypequeryParam.schemaDesc;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '标签类型',
|
||||
align:"center",
|
||||
dataIndex: 'tagNames'
|
||||
},
|
||||
}
|
||||
],
|
||||
tableScrollY: 0,
|
||||
}
|
||||
|
|
|
@ -22,6 +22,21 @@
|
|||
validateTrigger: 'change'
|
||||
}]" :disabled="testConnBool"></a-input>
|
||||
</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"
|
||||
:wrapperCol="wrapperCol" label="端口号" >
|
||||
<a-input v-decorator="['port',{
|
||||
|
@ -198,7 +213,8 @@ import { datasyncqueryPage,
|
|||
database:"",
|
||||
dataType:"",
|
||||
shipModel:"",
|
||||
shipNum:""
|
||||
shipNum:"",
|
||||
dbType:""
|
||||
},
|
||||
recordId:""
|
||||
}
|
||||
|
@ -220,7 +236,8 @@ import { datasyncqueryPage,
|
|||
model.dataType = '';
|
||||
model.shipModel = '';
|
||||
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) {
|
||||
this.visible =true;
|
||||
|
@ -241,7 +258,8 @@ import { datasyncqueryPage,
|
|||
model.dataType = res.result.dataTypeId;
|
||||
model.shipModel = res.result.shipModelId;
|
||||
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 {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
|
@ -264,7 +282,7 @@ import { datasyncqueryPage,
|
|||
var that = this;
|
||||
if (!err) {
|
||||
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) {
|
||||
this.confirmLoading = false;
|
||||
this.dataSource = res.result;
|
||||
|
@ -350,7 +368,7 @@ import { datasyncqueryPage,
|
|||
var that = this;
|
||||
if (!err) {
|
||||
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) {
|
||||
this.testConnBool =true;
|
||||
this.getdatabaseList();
|
||||
|
@ -364,7 +382,7 @@ import { datasyncqueryPage,
|
|||
})
|
||||
},
|
||||
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) {
|
||||
this.selectDataBase = false;
|
||||
this.databaseSource = res.result;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
:pagination="pagination" :scroll="{ y: 'calc(100vh - 420px)' }" rowKey="id"
|
||||
@change="handleTableChange">
|
||||
<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>
|
||||
</a-table>
|
||||
</div>
|
||||
|
@ -120,6 +120,7 @@ export default {
|
|||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||
},
|
||||
viewFileType:["png","bmp","jpg","jpeg","mp4","avi","mp3","pdf"]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -131,6 +132,12 @@ export default {
|
|||
|
||||
},
|
||||
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) {
|
||||
this.pagination = pagination
|
||||
this.searchFile.pageNum = pagination.current
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
@change="handleTableChange"
|
||||
>
|
||||
<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>
|
||||
</span>
|
||||
</a-table>
|
||||
|
@ -233,6 +233,7 @@ export default {
|
|||
audio: 0,
|
||||
total: 0,
|
||||
},
|
||||
viewFileType:["png","bmp","jpg","jpeg","mp4","avi","mp3","pdf"]
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
|
@ -243,6 +244,12 @@ export default {
|
|||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
isPreviewable(fileName){
|
||||
const parts = fileName.split('.');
|
||||
if (parts.length < 2) return false; // 无后缀
|
||||
const extension = parts.pop().toLowerCase();
|
||||
return this.viewFileType.includes(extension);
|
||||
},
|
||||
calculateScrollY() {
|
||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||
const container = this.$refs.tableContainer;
|
||||
|
|
Loading…
Reference in New Issue
Block a user