feat: 同步资产结构到数据库
parent
491185be53
commit
685e19cc72
|
@ -48,6 +48,14 @@ export function updateSource(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//同步数据库接入
|
||||||
|
export function Synchronization(data){
|
||||||
|
return request({
|
||||||
|
url:'/dataSource/source/synchronization',
|
||||||
|
method:'post',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除数据源
|
// 删除数据源
|
||||||
export function delSource(id) {
|
export function delSource(id) {
|
||||||
|
@ -56,3 +64,4 @@ export function delSource(id) {
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,6 +171,11 @@
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['dataSource:source:remove']"
|
v-hasPermi="['dataSource:source:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="Synchronization(scope.row)"
|
||||||
|
>同步数据库</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -338,7 +343,7 @@ import {
|
||||||
addSource,
|
addSource,
|
||||||
updateSource,
|
updateSource,
|
||||||
listType,
|
listType,
|
||||||
testConnection
|
testConnection, Synchronization
|
||||||
} from "@/api/dataSource/source";
|
} from "@/api/dataSource/source";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -402,6 +407,13 @@ export default {
|
||||||
this.findAccessType();
|
this.findAccessType();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Synchronization(dataSource){
|
||||||
|
Synchronization(dataSource).then(
|
||||||
|
res=>{
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
testConnection(source){
|
testConnection(source){
|
||||||
testConnection(source).then(
|
testConnection(source).then(
|
||||||
res=>{
|
res=>{
|
||||||
|
|
Loading…
Reference in New Issue