feat(web): 增加删除数据资源接口
This commit is contained in:
@@ -3,7 +3,7 @@ import {
|
|||||||
resourceDetailDialog,
|
resourceDetailDialog,
|
||||||
resourceEditeDialog
|
resourceEditeDialog
|
||||||
} from "../../components/resource/dialog-resource.js";
|
} from "../../components/resource/dialog-resource.js";
|
||||||
import {apiPost, crudCommonOptions} from "../../components/constants.js";
|
import {apiGet, apiPost, crudCommonOptions} from "../../components/constants.js";
|
||||||
|
|
||||||
export function tabData() {
|
export function tabData() {
|
||||||
return {
|
return {
|
||||||
@@ -66,6 +66,10 @@ export function tabData() {
|
|||||||
label: '删除',
|
label: '删除',
|
||||||
level: 'link',
|
level: 'link',
|
||||||
className: 'text-danger',
|
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)));
|
return AmisResponse.responseSuccess(new DataResourceDetail(mapper, dataResourceService.detail(id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/update/{id}")
|
@GetMapping("/remove/{id}")
|
||||||
public void update(@PathVariable Long id, @RequestBody UpdateRequest request) throws JsonProcessingException {
|
public void remove(@PathVariable Long id) {
|
||||||
|
dataResourceService.remove(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
Reference in New Issue
Block a user