Commit e12ce381 authored by rencs's avatar rencs

1.27 删除数据

parent ceef2691
......@@ -96,3 +96,11 @@ export function updateimagePrice(obj) {
data: obj
});
}
// 删除数据
export function delObj(obj) {
return fetch({
url: '/api/datacenter/bg/imageData/completeDelete',
method: 'DELETE',
params: obj
});
}
......@@ -74,6 +74,11 @@
</el-table-column>
<el-table-column prop="dataId" label="数据id" align="center">
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="{ row }">
<el-button type="text" @click="delRow(row)"> 删除 </el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
style="text-align: center"
......@@ -93,6 +98,7 @@ import {
getDateList,
getResolutionAll,
getimagePriceAll,
delObj,
} from "api/website/archiveDataManagement";
import { timestamp2DateAuto } from "../../../utils/dateUtils";
export default {
......@@ -114,6 +120,23 @@ export default {
this.getImgPrices();
},
methods: {
delRow(row) {
console.log(row);
this.$confirm("是否确认删除该数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
delObj({ id: row.id }).then((res) => {
if (res.status == 200) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.warning(res.message);
}
});
});
},
getResolutions() {
getResolutionAll().then((res) => {
if (res.status == 200) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment