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