feat(): 数据同步
parent
eefc9723bb
commit
617e845404
|
@ -42,9 +42,18 @@ export function delSource(id) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 测试数据源连接
|
||||
export function testConnection(id) {
|
||||
return request({
|
||||
url: '/data/source/testConnection/' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
// 资产同步
|
||||
export function assetSynchronization(id) {
|
||||
return request({
|
||||
url: '/data/source/assetSynchronization/' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -112,6 +112,14 @@
|
|||
v-hasPermi="['data:source:testConnection']"
|
||||
>测试链接
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="assetSynchronization(scope.row.id)"
|
||||
v-hasPermi="['data:source:assetSynchronization']"
|
||||
>同步数据结构
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -287,7 +295,15 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {listSource, getSource, delSource, addSource, updateSource, testConnection} from "@/api/data/source";
|
||||
import {
|
||||
listSource,
|
||||
getSource,
|
||||
delSource,
|
||||
addSource,
|
||||
updateSource,
|
||||
testConnection,
|
||||
assetSynchronization
|
||||
} from "@/api/data/source";
|
||||
import {listType} from "@/api/data/type";
|
||||
|
||||
export default {
|
||||
|
@ -374,6 +390,18 @@ export default {
|
|||
this.getTypeList();
|
||||
},
|
||||
methods: {
|
||||
// 同步数据结构
|
||||
assetSynchronization(id) {
|
||||
assetSynchronization(id).then(response => {
|
||||
console.log(response)
|
||||
if (response.data) {
|
||||
this.$modal.msgSuccess("同步成功");
|
||||
} else {
|
||||
this.$modal.msgError("同步失败");
|
||||
}
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
// 测试链接
|
||||
testConnection(id) {
|
||||
testConnection(id).then(response => {
|
||||
|
|
Loading…
Reference in New Issue