Merge remote-tracking branch 'origin/master'
commit
389a555504
|
@ -31,7 +31,7 @@ export function insertAdd(data){
|
|||
//获取基本信息
|
||||
export function getInfo(id){
|
||||
return request({
|
||||
url: "/source/source/id",
|
||||
url: "/source/source/"+id,
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
@ -47,4 +47,13 @@ export function connectionTest(data){
|
|||
}
|
||||
|
||||
|
||||
//删除
|
||||
export function deleteSource(ids){
|
||||
return request({
|
||||
url: "/source/source/"+ids,
|
||||
method: "delete",
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,6 +46,15 @@
|
|||
>新增
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
icon="el-icon-delete"
|
||||
plain
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="deleteSourceByIds()"
|
||||
>删除
|
||||
</el-button>
|
||||
|
||||
|
||||
<el-dialog title="添加数据源接入" :visible.sync="dialogFormVisible">
|
||||
|
||||
|
@ -208,6 +217,7 @@ import {selectSourceList} from "@/api/etl/switch";
|
|||
import {selectSourceExport} from "@/api/etl/switch";
|
||||
import {connectionTest} from "@/api/etl/switch";
|
||||
import {insertAdd} from "@/api/etl/switch";
|
||||
import {deleteSource} from "@/api/etl/switch";
|
||||
import {getInfo} from "@/api/etl/switch";
|
||||
|
||||
export default {
|
||||
|
@ -218,6 +228,7 @@ export default {
|
|||
//这里存放数据"
|
||||
|
||||
return {
|
||||
ids:[],
|
||||
dialogFormVisible:false,
|
||||
SourceReq:{
|
||||
|
||||
|
@ -234,6 +245,20 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
deleteSourceByIds(){
|
||||
deleteSource(this.ids).then(res=>{
|
||||
if(res.code===200){
|
||||
alert("删除成功");
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(row){
|
||||
deleteSource(row.id).then(res=>{
|
||||
if(res.code===200){
|
||||
alert("删除成功");
|
||||
}
|
||||
})
|
||||
},
|
||||
textP(){
|
||||
connectionTest(this.sourceAddReq).then(res=>{
|
||||
if (res.code===200){
|
||||
|
@ -245,7 +270,9 @@ export default {
|
|||
},
|
||||
addSource(){
|
||||
insertAdd(this.sourceAddReq).then(res=>{
|
||||
|
||||
if(res.code===200){
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
},
|
||||
//测试连接
|
||||
|
@ -271,7 +298,10 @@ export default {
|
|||
selectSourceExport(this.SourceReq).then();
|
||||
},
|
||||
handleSelectionChange(row){
|
||||
|
||||
this.ids=[];
|
||||
for (let rowKey in row) {
|
||||
this.ids.push(row[rowKey].id)
|
||||
}
|
||||
},
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
|
|
Loading…
Reference in New Issue