diff --git a/src/api/etl/switch.js b/src/api/etl/switch.js index c8222f8..ae099e8 100644 --- a/src/api/etl/switch.js +++ b/src/api/etl/switch.js @@ -18,7 +18,6 @@ export function selectSourceExport(data){ }) } - //新增 export function insertAdd(data){ return request({ @@ -38,4 +37,14 @@ export function getInfo(id){ } +//测试连接 +export function connectionTest(data){ + return request({ + url: "/source/source/connectionTest", + method: "post", + data:data + }) +} + + diff --git a/src/api/task/task.js b/src/api/task/task.js new file mode 100644 index 0000000..23b48d2 --- /dev/null +++ b/src/api/task/task.js @@ -0,0 +1,41 @@ +import request from '@/utils/request' + +//查询规则引擎列表 +export function selectEngineList(data){ + return request({ + url: "/task/task/list", + method: "get", + data:data + }) +} + +//导出 +export function selectSourceExport(data){ + return request({ + url: "/source/source/export", + method: "POST", + data:data + }) +} + + +//新增 +export function insertAdd(data){ + return request({ + url: "/source/source/insert", + method: "get", + data:data + }) +} + + +//获取基本信息 +export function getInfo(id){ + return request({ + url: "/source/source/id", + method: "get", + }) +} + + + diff --git a/src/views/etl/switch/index.vue b/src/views/etl/switch/index.vue index b80f21a..77411c8 100644 --- a/src/views/etl/switch/index.vue +++ b/src/views/etl/switch/index.vue @@ -97,9 +97,9 @@ @@ -185,7 +185,7 @@ icon="el-icon-aim" size="mini" type="text" - @click="text(scope.row)">测试连接 + @click="textConnect(scope.row)">测试连接 @@ -206,7 +206,10 @@ //例如:import 《组件名称》 from '《组件路径》, 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 {getInfo} from "@/api/etl/switch"; + export default { //import引入的组件需要注入到对象中才能使用" components: {}, @@ -231,8 +234,33 @@ export default { watch: {}, //方法集合", methods: { + textP(){ + connectionTest(this.sourceAddReq).then(res=>{ + if (res.code===200){ + alert("测试连接成功") + }else{ + alert("连接失败") + } + }) + }, + addSource(){ + insertAdd(this.sourceAddReq).then(res=>{ + + }) + }, + //测试连接 + textConnect(row){ + connectionTest(row).then(res=>{ + if (res.code===200){ + alert("测试连接成功"); + }else { + alert("测试连接失败"); + } + }) + }, insertAdd(){ this.dialogFormVisible=true + }, findSelectSourceList(){ selectSourceList(this.SourceReq).then(res=>{ diff --git a/src/views/task/task/index.vue b/src/views/task/task/index.vue new file mode 100644 index 0000000..7839729 --- /dev/null +++ b/src/views/task/task/index.vue @@ -0,0 +1,370 @@ + + + +