feat(web): 增加删除数据资源接口
This commit is contained in:
@@ -3,7 +3,7 @@ import {
|
||||
resourceDetailDialog,
|
||||
resourceEditeDialog
|
||||
} from "../../components/resource/dialog-resource.js";
|
||||
import {apiPost, crudCommonOptions} from "../../components/constants.js";
|
||||
import {apiGet, apiPost, crudCommonOptions} from "../../components/constants.js";
|
||||
|
||||
export function tabData() {
|
||||
return {
|
||||
@@ -66,6 +66,10 @@ export function tabData() {
|
||||
label: '删除',
|
||||
level: 'link',
|
||||
className: 'text-danger',
|
||||
confirmTitle: '确认删除',
|
||||
confirmText: '确认删除名称为「${name}」的数据资源吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/data_resource/remove/${id}')
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
@@ -74,9 +74,9 @@ public class DataResourceController {
|
||||
return AmisResponse.responseSuccess(new DataResourceDetail(mapper, dataResourceService.detail(id)));
|
||||
}
|
||||
|
||||
@PostMapping("/update/{id}")
|
||||
public void update(@PathVariable Long id, @RequestBody UpdateRequest request) throws JsonProcessingException {
|
||||
|
||||
@GetMapping("/remove/{id}")
|
||||
public void remove(@PathVariable Long id) {
|
||||
dataResourceService.remove(id);
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
Reference in New Issue
Block a user