增加歌手等级删除
This commit is contained in:
@@ -77,3 +77,8 @@ export const editSingerData = data => {
|
||||
data
|
||||
});
|
||||
}
|
||||
export const deleteSingData = data => {
|
||||
return http.request<Result>("post", "/adminapi/SingerSong/singerLevelDel", {
|
||||
data
|
||||
});
|
||||
}
|
||||
@@ -3,10 +3,8 @@ import editForm from "./form.vue";
|
||||
import { message } from "@/utils/message";
|
||||
import {
|
||||
querySingerList,
|
||||
editSingerData
|
||||
// addCharmData,
|
||||
// editCharmData,
|
||||
// deleteCharmData
|
||||
editSingerData,
|
||||
deleteSingData
|
||||
} from "@/api/modules/level";
|
||||
import { addDialog } from "@/components/ReDialog";
|
||||
export function useData() {
|
||||
@@ -98,13 +96,13 @@ export function useData() {
|
||||
onSearch(searchForm.value);
|
||||
};
|
||||
const handleDelete = async rowData => {
|
||||
// const { code } = await deleteCharmData({ id: rowData.id });
|
||||
// if (code) {
|
||||
// message(`您删除了等级名称为${rowData.name}的这条数据`, {
|
||||
// type: "success"
|
||||
// });
|
||||
// onSearch(searchForm.value);
|
||||
// }
|
||||
const { code } = await deleteSingData({ id: rowData.id });
|
||||
if (code) {
|
||||
message(`删除成功`, {
|
||||
type: "success"
|
||||
});
|
||||
onSearch(searchForm.value);
|
||||
}
|
||||
};
|
||||
// 新增
|
||||
const openDialog = (title = "新增", rowData: any) => {
|
||||
|
||||
@@ -51,11 +51,11 @@ onMounted(() => {
|
||||
<el-button link type="primary" :size="size" @click="openDialog('编辑', row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<!-- <el-popconfirm :title="`是否确认删除这条数据`" @confirm="handleDelete(row)">
|
||||
<el-popconfirm :title="`是否确认删除这条数据`" @confirm="handleDelete(row)">
|
||||
<template #reference>
|
||||
<el-button link type="primary" :size="size"> 删除 </el-button>
|
||||
</template>
|
||||
</el-popconfirm> -->
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</pure-table>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user