Merge remote-tracking branch 'origin/master'
commit
1d5e6f8fd8
|
@ -39,6 +39,25 @@ export function del(id){
|
|||
}
|
||||
|
||||
|
||||
//开启
|
||||
export function onEngine(id){
|
||||
return request({
|
||||
url: "/engine/engine/onEngine/" + id,
|
||||
method: "post",
|
||||
data:id
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//禁用
|
||||
export function forbiddenEngine(id){
|
||||
return request({
|
||||
url: "/engine/engine/forbiddenEngine/" + id,
|
||||
method: "post",
|
||||
data:id
|
||||
})
|
||||
}
|
||||
|
||||
export function selectLevel(){
|
||||
return request({
|
||||
url: "/engine/level/selectLevelList",
|
||||
|
@ -55,3 +74,12 @@ export function getRuleEngineInfo(id) {
|
|||
}
|
||||
|
||||
|
||||
// 通过id查询
|
||||
export function findById(id) {
|
||||
return request({
|
||||
url: '/engine/engine/findById/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -75,3 +75,27 @@ export function update(data){
|
|||
}
|
||||
|
||||
|
||||
//查询数据库名称 表名称 字段名称 类型等
|
||||
|
||||
export function findTableInfo(){
|
||||
return request({
|
||||
url: "/source/tableInfo/findTableInfo",
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
||||
export function findTableInfoList(){
|
||||
return request({
|
||||
url: "/source/tableInfo/findTableInfoList",
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
||||
export function findStructureByTableId(id){
|
||||
return request({
|
||||
url: "/source/tableInfo/findStruceure/"+id,
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
>导出
|
||||
</el-button>
|
||||
|
||||
<!-- 添加按钮 /-->
|
||||
<!-- 添加按钮 /-->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
|
@ -182,7 +182,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页-->
|
||||
<!-- 分页-->
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
|
@ -211,7 +211,7 @@ export default {
|
|||
|
||||
return {
|
||||
engineReq:{
|
||||
pageNum:1,
|
||||
pageNum:1,
|
||||
pageSize:5
|
||||
},
|
||||
engine:{
|
||||
|
@ -267,22 +267,22 @@ export default {
|
|||
},
|
||||
findSelectSourceList(){
|
||||
selectEngineList(this.engineReq).then(res=>{
|
||||
this.arr=res.data.list;
|
||||
this.total=res.data.total;
|
||||
this.arr=res.data.list;
|
||||
this.total=res.data.total;
|
||||
})
|
||||
},
|
||||
handleDelete(id){
|
||||
if (confirm("是否删除这条数据?")){
|
||||
del(id).then(res =>{
|
||||
del(id).then(res =>{
|
||||
//判断删除是否成功
|
||||
this.$message.success(res.msg || "删除成功")
|
||||
})
|
||||
this.$message.success(res.msg || "删除成功")
|
||||
})
|
||||
}
|
||||
},
|
||||
findSelectSourceExport(){
|
||||
this.download('engine/engine/export', {
|
||||
...this.engineReq
|
||||
},
|
||||
...this.engineReq
|
||||
},
|
||||
`source_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
select(){
|
||||
|
|
|
@ -1,117 +1,72 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-table :data="scopeList" style="width: 100%">
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8" v-for="customer in scopeList" v-if="scopeList.length !== 0">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 18px;font-weight: 900">{{ customer.name }}</span>
|
||||
<span style="font-size: 18px;font-weight: 900">{{ customer.versionCode }}</span>
|
||||
<span style="font-size: 18px;font-weight: 900">{{ customer.isActivate }}</span>
|
||||
<span style="font-size: 18px;font-weight: 900">{{ customer.status }}</span>
|
||||
<span style="font-size: 18px;font-weight: 900">{{ customer.testStatus }}</span>
|
||||
<span style="font-size: 18px;font-weight: 900">{{ customer.ruleContent }}</span>
|
||||
<span style="font-size: 18px;font-weight: 900">{{ customer.engineMaintenanceId }}</span>
|
||||
<span style="font-size: 18px;font-weight: 900">{{ customer.description }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-descriptions class="margin-top" :column="1" :size="size" border>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>版本名称</template>
|
||||
{{ customer.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>版本编码</template>
|
||||
{{ customer.versionClass }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>是否激活</template>
|
||||
{{ customer.versionCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>版本状态</template>
|
||||
{{ customer.isActivate }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>版本测试状态</template>
|
||||
{{ customer.status }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>规则内容</template>
|
||||
{{ customer.testStatus }}
|
||||
</el-descriptions-item><el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>引擎维护编号</template>
|
||||
{{ customer.ruleContent }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><i class="el-icon-user"></i>描述</template>
|
||||
{{ customer.engineMaintenanceId }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider content-position="left">规则引擎版本</el-divider>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="日期" width="180">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!-- <el-table-column label="操作">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleEdit(scope.$index, scope.row)">编辑</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="danger"-->
|
||||
<!-- @click="handleDelete(scope.$index, scope.row)">删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- -->
|
||||
|
||||
|
||||
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getRuleEngineInfo} from "@/api/engine/engine";
|
||||
|
||||
import {findById, forbiddenEngine, onEngine} from "@/api/engine/engine";
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
|
@ -125,15 +80,29 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
List(){
|
||||
getRuleEngineInfo().then(res =>{
|
||||
this.scopeList = res.data;
|
||||
List(){
|
||||
findById(this.maintenance.id).then(res =>{
|
||||
this.scopeList = res.data;
|
||||
console.log(this.scopeList)
|
||||
})
|
||||
},
|
||||
handleStatusChange(row){
|
||||
if (row.status === "Y"){
|
||||
onEngine(row.id).then((res)=>{
|
||||
this.$modal.msgSuccess("启用成功")
|
||||
this.getList()
|
||||
})
|
||||
}else {
|
||||
forbiddenEngine(row.id).then((res)=>{
|
||||
this.$modal.msgSuccess("禁用成功")
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
this.scopeList.id = this.$route.query.id
|
||||
this.maintenance.id = this.$route.query.id
|
||||
this.List();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
<el-container>
|
||||
<el-aside width="30%">
|
||||
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
||||
</el-aside>
|
||||
|
||||
<el-main>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>资产模型基本信息</span>
|
||||
</div>
|
||||
<el-descriptions class="margin-top" title="带边框列表" :column="2" border>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">表名称</template>
|
||||
{{ tableBasic.tableName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">表备注</template>
|
||||
{{ tableBasic.tableRemark }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">数据量</template>
|
||||
{{ tableBasic.dataNum }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">是否核心</template>
|
||||
<dict-tag :options="dict.type.yes_no" :value="tableBasic.isCenter"/>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>资产模型详细信息</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData" style="width: 100%">
|
||||
<el-table-column label="名称" prop="columnName"></el-table-column>
|
||||
<el-table-column label="注释" prop="columnRemark"></el-table-column>
|
||||
<el-table-column label="是否主键" prop="isPrimary">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.yes_no" :value="scope.row.isPrimary"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" prop="columnType"></el-table-column>
|
||||
<el-table-column label="映射类型" prop="javaType"></el-table-column>
|
||||
<el-table-column label="长度" prop="columnLength"></el-table-column>
|
||||
<el-table-column label="小数位" prop="columnDecimals"></el-table-column>
|
||||
<el-table-column label="是否为空" prop="isNull">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.yes_no" :value="scope.row.isNull"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
|
||||
</el-main>
|
||||
|
||||
|
||||
|
||||
</el-container>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {findTableInfoList} from "@/api/etl/switch";
|
||||
import {findStructureByTableId} from "@/api/etl/switch";
|
||||
export default {
|
||||
dicts: ['yes_no'],
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
//这里存放数据"
|
||||
|
||||
return {
|
||||
tableData:[],
|
||||
tableBasic:{
|
||||
|
||||
},
|
||||
form:{
|
||||
|
||||
},
|
||||
data:[],
|
||||
defaultProps:{
|
||||
children:"children",
|
||||
label:'tableName'
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
//计算属性 类似于data概念",
|
||||
computed: {},
|
||||
//监控data中的数据变化",
|
||||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
findTAbleInfoList(){
|
||||
findTableInfoList().then(res=>{
|
||||
this.data=res.data;
|
||||
})
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
this.tableBasic=data
|
||||
findStructureByTableId(data.id).then((res)=>{
|
||||
this.tableData=res.data;
|
||||
})
|
||||
console.log(data);
|
||||
},
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
this.findTAbleInfoList();
|
||||
},
|
||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
},
|
||||
beforeCreate() {
|
||||
}, //生命周期 - 创建之前",
|
||||
beforeMount() {
|
||||
}, //生命周期 - 挂载之前",
|
||||
beforeUpdate() {
|
||||
}, //生命周期 - 更新之前",
|
||||
updated() {
|
||||
}, //生命周期 - 更新之后",
|
||||
beforeDestroy() {
|
||||
}, //生命周期 - 销毁之前",
|
||||
destroyed() {
|
||||
}, //生命周期 - 销毁完成",
|
||||
activated() {
|
||||
} //如果页面有keep-alive缓存功能,这个函数会触发",
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
<el-dialog title="title" :visible.sync="dialogFormVisible" append-to-body width="60%">
|
||||
|
||||
<el-form ref="form" :model="sourceAddReq" :rules="rules" label-width="140px" :inline="true" class="demo-form-inline">
|
||||
<el-form ref="sourceAddReq" :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>
|
||||
|
@ -83,9 +83,9 @@
|
|||
<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 :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-input v-model="sourceAddReq.initLinkNum" placeholder="初始连接数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大连接数量:" prop="maxCount">
|
||||
<el-input v-model="sourceAddReq.maxLinkNum" placeholder="最大连接数量"/>
|
||||
|
@ -94,7 +94,7 @@
|
|||
<el-input v-model="sourceAddReq.maxWaitTime" placeholder="最大等待时间"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大等待次数:" prop="maxFrequency">
|
||||
<el-input v-model="sourceAddReq.remark" placeholder="最大等待次数"/>
|
||||
<el-input v-model="sourceAddReq.maxWaitTimes" placeholder="最大等待次数"/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
@ -106,11 +106,11 @@
|
|||
<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 :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.ys_yes_no"
|
||||
v-for="dict in dict.type.yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
|
@ -125,11 +125,13 @@
|
|||
</el-card>
|
||||
|
||||
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="textP()">测试</el-button>
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addSource()">确 定</el-button>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
@ -179,14 +181,20 @@
|
|||
prop="databaseName">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="是否初始化"
|
||||
prop="status">
|
||||
<el-table-column align="status" label="是否初始化" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dicts.type.ys_yes_no" :value="scope.row.status"/>
|
||||
<dict-tag :options="dict.type.yes_no" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="是否初始化"-->
|
||||
<!-- prop="status">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.yes_no" :value="scope.row.status"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column
|
||||
label="备注"
|
||||
prop="remark">
|
||||
|
@ -237,43 +245,43 @@
|
|||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
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";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
dicts: ['sys_normal_disable','ys_yes_no'],
|
||||
|
||||
|
||||
|
||||
|
||||
dicts: ['yes_no', 'sys_normal_disable'],
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
components: {},
|
||||
components: {
|
||||
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
|
||||
//这里存放数据"
|
||||
|
||||
return {
|
||||
dicts: ['sys_normal_disable','ys_yes_no'],
|
||||
sourceAddReq:{
|
||||
|
||||
},
|
||||
rules: {
|
||||
dataResourceName: [
|
||||
{required: true, message: "接入源名称不能为空", trigger: "blur"}
|
||||
],
|
||||
dataSourcesSystemName: [
|
||||
{required: true, message: "数据来源系统名称不能为空", trigger: "blur"}
|
||||
],
|
||||
host: [
|
||||
{required: true, message: "主机地址不能为空", trigger: "blur"}
|
||||
]
|
||||
dataResourceName: [{required: true, message: "接入源名称不能为空", trigger: "blur"}],
|
||||
dataSourcesSystemName: [{required: true, message: "数据来源系统名称不能为空", trigger: "blur"}],
|
||||
host: [{required: true, message: "主机地址不能为空", trigger: "blur"}]
|
||||
},
|
||||
ids:[],
|
||||
dialogFormVisible:false,
|
||||
SourceReq:{
|
||||
|
||||
},
|
||||
sourceAddReq:{
|
||||
|
||||
},
|
||||
source:[],
|
||||
};
|
||||
},
|
||||
|
@ -299,8 +307,8 @@ export default {
|
|||
},
|
||||
struceure(row){
|
||||
structure(row).then(res=>{
|
||||
if (res ===200){
|
||||
alert("同步资产成功")
|
||||
if (res.code ===200){
|
||||
alert("同步资产成功,请查询数据库")
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -311,6 +319,7 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
|
||||
handleDelete(row){
|
||||
deleteSource(row.id).then(res=>{
|
||||
if (res.code===200){
|
||||
|
@ -327,22 +336,27 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
addSource(){
|
||||
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();
|
||||
}
|
||||
})
|
||||
}
|
||||
addSource: function (){
|
||||
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){
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<script>
|
||||
export default {
|
||||
name: "index"
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -429,6 +429,7 @@ export default {
|
|||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
|
||||
if (valid) {
|
||||
if (this.form.menuId != undefined) {
|
||||
updateMenu(this.form).then(response => {
|
||||
|
@ -444,6 +445,7 @@ export default {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
|
|
Loading…
Reference in New Issue