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