feat(): 数据同步
parent
eefc9723bb
commit
617e845404
|
@ -42,9 +42,18 @@ export function delSource(id) {
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 测试数据源连接
|
||||||
export function testConnection(id) {
|
export function testConnection(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/source/testConnection/' + id,
|
url: '/data/source/testConnection/' + id,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 资产同步
|
||||||
|
export function assetSynchronization(id) {
|
||||||
|
return request({
|
||||||
|
url: '/data/source/assetSynchronization/' + id,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -112,6 +112,14 @@
|
||||||
v-hasPermi="['data:source:testConnection']"
|
v-hasPermi="['data:source:testConnection']"
|
||||||
>测试链接
|
>测试链接
|
||||||
</el-button>
|
</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
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -287,7 +295,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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";
|
import {listType} from "@/api/data/type";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -374,6 +390,18 @@ export default {
|
||||||
this.getTypeList();
|
this.getTypeList();
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
||||||
testConnection(id).then(response => {
|
testConnection(id).then(response => {
|
||||||
|
|
Loading…
Reference in New Issue