|
|
@ -128,10 +128,10 @@
|
|
|
|
:app-code="appCode"
|
|
|
|
:app-code="appCode"
|
|
|
|
@refreshTable="init"
|
|
|
|
@refreshTable="init"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<checkDatasource
|
|
|
|
<checkDatasource
|
|
|
|
ref="checkDatasource"
|
|
|
|
ref="checkDatasource"
|
|
|
|
:reasonList="reasonList"
|
|
|
|
:reason-list="reasonList"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -185,7 +185,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
reasonList:[],
|
|
|
|
reasonList: [],
|
|
|
|
testBtnLoading: [],
|
|
|
|
testBtnLoading: [],
|
|
|
|
loadingText: '',
|
|
|
|
loadingText: '',
|
|
|
|
searchLoading: false,
|
|
|
|
searchLoading: false,
|
|
|
@ -279,25 +279,24 @@ export default {
|
|
|
|
handleDelete (row) {
|
|
|
|
handleDelete (row) {
|
|
|
|
// eslint-disable-next-line eqeqeq
|
|
|
|
// eslint-disable-next-line eqeqeq
|
|
|
|
if (row.editable == 1 && !this.appCode) return
|
|
|
|
if (row.editable == 1 && !this.appCode) return
|
|
|
|
dataSourceCheck(row.id).then((res)=>{
|
|
|
|
dataSourceCheck(row.id).then((res) => {
|
|
|
|
if(res.canDelete){
|
|
|
|
if (res.canDelete) {
|
|
|
|
this.$confirm('确定删除当前数据源吗?', '提示', {
|
|
|
|
this.$confirm('确定删除当前数据源吗?', '提示', {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
type: 'warning',
|
|
|
|
type: 'warning',
|
|
|
|
customClass: 'bs-el-message-box'
|
|
|
|
customClass: 'bs-el-message-box'
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
sourceRemove(row.id).then((r) => {
|
|
|
|
sourceRemove(row.id).then((r) => {
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
this.init()
|
|
|
|
this.init()
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
}else{
|
|
|
|
this.reasonList = res.reasons
|
|
|
|
this.reasonList=res.reasons
|
|
|
|
|
|
|
|
this.$refs.checkDatasource.checkDatasourceVisible = true
|
|
|
|
this.$refs.checkDatasource.checkDatasourceVisible = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
sourceLinkTest (row) {
|
|
|
|
sourceLinkTest (row) {
|
|
|
|
this.testBtnLoading.push(row.id)
|
|
|
|
this.testBtnLoading.push(row.id)
|
|
|
|