Merge remote-tracking branch 'origin/master'
commit
9ab5c50980
|
@ -38,6 +38,15 @@ export function getInfo(id){
|
|||
|
||||
|
||||
//测试连接
|
||||
export function structure(data){
|
||||
return request({
|
||||
url: "/source/source/structure",
|
||||
method: "post",
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
//同步资产结构
|
||||
export function connectionTest(data){
|
||||
return request({
|
||||
url: "/source/source/connectionTest",
|
||||
|
@ -52,7 +61,16 @@ export function deleteSource(ids){
|
|||
return request({
|
||||
url: "/source/source/"+ids,
|
||||
method: "delete",
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//修改
|
||||
export function update(data){
|
||||
return request({
|
||||
url: "/source/source/update",
|
||||
method: "post",
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -56,9 +56,9 @@
|
|||
</el-button>
|
||||
|
||||
|
||||
<el-dialog title="添加数据源接入" :visible.sync="dialogFormVisible">
|
||||
<el-dialog title="title" :visible.sync="dialogFormVisible" append-to-body width="60%">
|
||||
|
||||
<el-form :model="sourceAddReq">
|
||||
<el-form ref="form" :model="sourceAddReq" :rules="rules" label-width="140px" :inline="true" class="demo-form-inline">
|
||||
<el-form-item label="接入源名称">
|
||||
<el-input v-model="sourceAddReq.dataResourceName"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -86,25 +86,74 @@
|
|||
<el-form-item label="数据连接参数">
|
||||
<el-input v-model="sourceAddReq.connectionParams"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="初始化连接数量">
|
||||
<el-input v-model="sourceAddReq.initLinkNum"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大连接数量">
|
||||
<el-input v-model="sourceAddReq.maxLinkNum"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大等待时间">
|
||||
<el-input v-model="sourceAddReq.maxWaitTime"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大等待次数">
|
||||
<el-input v-model="sourceAddReq.maxWaitTimes"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="sourceAddReq.remark"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="初始化连接数量">-->
|
||||
<!-- <el-input v-model="sourceAddReq.initLinkNum"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="最大连接数量">-->
|
||||
<!-- <el-input v-model="sourceAddReq.maxLinkNum"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="最大等待时间">-->
|
||||
<!-- <el-input v-model="sourceAddReq.maxWaitTime"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="最大等待次数">-->
|
||||
<!-- <el-input v-model="sourceAddReq.maxWaitTimes"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="备注">-->
|
||||
<!-- <el-input v-model="sourceAddReq.remark"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>连接池配置</span>
|
||||
</div>
|
||||
<el-form ref="form" :model="sourceAddReq" label-width="120px" :inline="true" class="demo-form-inline">
|
||||
<el-form-item label="初始连接数量:" prop="initCount">
|
||||
<el-input v-model="sourceAddReq.initCount" placeholder="初始连接数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大连接数量:" prop="maxCount">
|
||||
<el-input v-model="sourceAddReq.maxLinkNum" placeholder="最大连接数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大等待时间:" prop="maxTime">
|
||||
<el-input v-model="sourceAddReq.maxWaitTime" placeholder="最大等待时间"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大等待次数:" prop="maxFrequency">
|
||||
<el-input v-model="sourceAddReq.remark" placeholder="最大等待次数"/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>其他信息</span>
|
||||
</div>
|
||||
<el-form ref="form" :model="sourceAddReq" label-width="140px" :inline="true" class="demo-form-inline">
|
||||
<!-- <el-form-item label="是否初始化:" prop="status">-->
|
||||
<!-- <el-radio-group v-model="sourceAddReq.status">-->
|
||||
<!-- <el-radio-->
|
||||
<!-- v-for="dict in dict.type.yes_no"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.value"-->
|
||||
<!-- >{{ dict.label }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="备注:">
|
||||
<el-input type="textarea" v-model="sourceAddReq.remark"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="textP()">测试</el-button>
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
|
@ -213,12 +262,13 @@
|
|||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {selectSourceList} from "@/api/etl/switch";
|
||||
import {selectSourceList, update} 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";
|
||||
import {structure} from "@/api/etl/switch";
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
|
@ -228,6 +278,17 @@ export default {
|
|||
//这里存放数据"
|
||||
|
||||
return {
|
||||
rules: {
|
||||
dataResourceName: [
|
||||
{required: true, message: "接入源名称不能为空", trigger: "blur"}
|
||||
],
|
||||
dataSourcesSystemName: [
|
||||
{required: true, message: "数据来源系统名称不能为空", trigger: "blur"}
|
||||
],
|
||||
host: [
|
||||
{required: true, message: "主机地址不能为空", trigger: "blur"}
|
||||
]
|
||||
},
|
||||
ids:[],
|
||||
dialogFormVisible:false,
|
||||
SourceReq:{
|
||||
|
@ -245,6 +306,27 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
reset() {
|
||||
this.sourceAddReq = {
|
||||
};
|
||||
this.resetForm("sourceAddReq");
|
||||
},
|
||||
//修改
|
||||
update(row){
|
||||
this.reset();
|
||||
getInfo(row.id).then(res=>{
|
||||
this.sourceAddReq=res.data;
|
||||
this.dialogFormVisible=true;
|
||||
this.title="修改岗位"
|
||||
})
|
||||
},
|
||||
struceure(row){
|
||||
structure(row).then(res=>{
|
||||
if (res ===200){
|
||||
alert("同步资产成功")
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteSourceByIds(){
|
||||
deleteSource(this.ids).then(res=>{
|
||||
if(res.code===200){
|
||||
|
@ -254,8 +336,8 @@ export default {
|
|||
},
|
||||
handleDelete(row){
|
||||
deleteSource(row.id).then(res=>{
|
||||
if(res.code===200){
|
||||
alert("删除成功");
|
||||
if (res.code===200){
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -269,11 +351,25 @@ export default {
|
|||
})
|
||||
},
|
||||
addSource(){
|
||||
insertAdd(this.sourceAddReq).then(res=>{
|
||||
if(res.code===200){
|
||||
location.reload();
|
||||
this.$refs["sourceAddReq"].validate(valid => {
|
||||
if (valid){
|
||||
if (this.sourceAddReq.id!=undefined){
|
||||
update(this.sourceAddReq).then(res=>{
|
||||
if (res.code===200){
|
||||
alert("修改成功")
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}else {
|
||||
insertAdd(this.sourceAddReq).then(res=>{
|
||||
if(res.code===200){
|
||||
alert("添加成功")
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//测试连接
|
||||
textConnect(row){
|
||||
|
@ -285,9 +381,11 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
insertAdd(){
|
||||
this.dialogFormVisible=true
|
||||
|
||||
//新增
|
||||
insertAdd(){
|
||||
this.reset();
|
||||
this.dialogFormVisible=true
|
||||
},
|
||||
findSelectSourceList(){
|
||||
selectSourceList(this.SourceReq).then(res=>{
|
||||
|
|
|
@ -5,14 +5,12 @@
|
|||
<span>手机号查询归属地</span>
|
||||
<el-button style="float: right; padding: 3px 0" type="text">购买</el-button>
|
||||
</div>
|
||||
<el-form :label-position="labelPosition" :model="formLabelAlign">
|
||||
<el-form :model="formLabelAlign">
|
||||
<el-form-item placeholder="请输入手机号">
|
||||
<input v-model="formLabelAlign.tel">
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<button @click="getPhonePlace">查询</button>
|
||||
<el-input v-model="formLabelAlign.tel"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button @click="getPhonePlace">查询</el-button>
|
||||
<span>省份:{{this.formLabelAlign.province}}</span><br>
|
||||
<span>城市:{{this.formLabelAlign.city}}</span><br>
|
||||
<span>区号:{{this.formLabelAlign.areacode}}</span><br>
|
||||
|
|
|
@ -144,6 +144,12 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
|
||||
<el-button
|
||||
icon="el-icon-update"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="updateById(scope.row)">修改</el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
@ -269,9 +275,9 @@
|
|||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px" v-if="scope.row.weigh ==1 ">非空规则</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.weigh ==2 ">非空规则</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.weigh ==3 ">非空规则</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.weigh ==4 ">非空规则</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.weigh ==2 ">aa规则</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.weigh ==3 ">我啊规则</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.weigh ==4 ">收到规则</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -279,7 +285,7 @@
|
|||
label="表别名"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<input type="text">
|
||||
<el-input v-model="scope.row.fieldAsEngineId"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -336,6 +342,7 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
|
||||
executeTask(){
|
||||
this.taskInputAdd = true;
|
||||
},
|
||||
|
@ -350,6 +357,7 @@ export default {
|
|||
this.dialogFormVisible = true;
|
||||
},
|
||||
|
||||
|
||||
//添加任务
|
||||
addTask(){
|
||||
addTask(this.taskAddReq).then(res=>{
|
||||
|
@ -374,7 +382,7 @@ export default {
|
|||
},
|
||||
|
||||
handleDelete(row){
|
||||
deleteByTaskId(row.getId).then(res=>{
|
||||
deleteByTaskId(row.id).then(res=>{
|
||||
alert(res.msg);
|
||||
if(res.code == 200){
|
||||
location.reload();
|
||||
|
|
Loading…
Reference in New Issue