人员管理新增删除功能 调整登陆获取养护站信息接口
This commit is contained in:
parent
51ba2008ac
commit
fa4eb3f9dc
@ -87,7 +87,7 @@ const getYHZinfo = async () => {
|
||||
method: "GET",
|
||||
});
|
||||
if (res.code === "00000") {
|
||||
yhzinfo.value = res.data;
|
||||
yhzinfo.value = res.data[0];
|
||||
} else {
|
||||
throw new Error(res.message);
|
||||
}
|
||||
|
||||
@ -440,7 +440,6 @@ const handleGetLocation = () => {
|
||||
(position) => {
|
||||
form.material.jd = position.coords.longitude.toFixed(6);
|
||||
form.material.wd = position.coords.latitude.toFixed(6);
|
||||
showToast("定位成功");
|
||||
},
|
||||
(error) => {
|
||||
const errorMessage =
|
||||
|
||||
@ -144,6 +144,51 @@ const columns = () => {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "操作",
|
||||
fixed: "right",
|
||||
width: 150,
|
||||
render: (row) => () =>
|
||||
h("div", { class: "action-btns" }, [
|
||||
h(
|
||||
ElButton,
|
||||
{
|
||||
type: "danger",
|
||||
link: true,
|
||||
style: "margin-left: 10px;",
|
||||
onClick: async () => {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
"确定要删除该人员吗?",
|
||||
"删除确认",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
);
|
||||
const res = await request({
|
||||
url: `/snow-ops-platform/yhzry/delete`,
|
||||
method: "POST",
|
||||
data: {
|
||||
id: row.id,
|
||||
},
|
||||
});
|
||||
if (res.code === "00000") {
|
||||
ElMessage.success("删除成功");
|
||||
getPeopleList();
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
ElMessage.error(error.message || "删除失败");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
() => "删除"
|
||||
),
|
||||
]),
|
||||
},
|
||||
];
|
||||
case "material":
|
||||
return [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user