fix(数据源): 修复驱动管理中支持版本反显问题 #7640
This commit is contained in:
parent
fb1bbdaa9c
commit
ad25f77fe6
@ -98,6 +98,13 @@ public class DriverMgmController {
|
||||
return driverService.save(deDriver);
|
||||
}
|
||||
|
||||
@RequiresPermissions("datasource:read")
|
||||
@ApiOperation("获取驱动")
|
||||
@GetMapping("/getDriver/{id}")
|
||||
public DeDriver getDriver(@PathVariable String id) throws Exception {
|
||||
return driverService.get(id);
|
||||
}
|
||||
|
||||
@RequiresPermissions("datasource:read")
|
||||
@ApiOperation("更新驱动")
|
||||
@PostMapping("/update")
|
||||
|
||||
@ -94,6 +94,9 @@ public class DriverService {
|
||||
return deDriver;
|
||||
}
|
||||
|
||||
public DeDriver get(String id) {
|
||||
return deDriverMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<DeDriverDetails> listDriverDetails(String driverId) {
|
||||
DeDriverDetailsExample example = new DeDriverDetailsExample();
|
||||
|
||||
@ -122,6 +122,14 @@ export function listDriverDetails(id) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getDriver(id) {
|
||||
return request({
|
||||
url: '/driver/getDriver/' + id,
|
||||
method: 'get',
|
||||
loading: true
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteDriverFile(data) {
|
||||
return request({
|
||||
url: '/driver/deleteDriverFile',
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
<script>
|
||||
import i18n from '@/lang/index'
|
||||
import {
|
||||
deleteDriverFile,
|
||||
deleteDriverFile, getDriver,
|
||||
listDriverDetails,
|
||||
updateDriver
|
||||
} from '@/api/system/datasource'
|
||||
@ -216,6 +216,10 @@ export default {
|
||||
this.params.showModel === 'show' &&
|
||||
!this.canEdit
|
||||
this.listDriverDetails()
|
||||
|
||||
getDriver(this.driverForm.id).then((res) => {
|
||||
this.driverForm = res.data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
beforeUpload(file) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user