|
@@ -457,7 +457,7 @@ const submitForm = () => {
|
|
|
};
|
|
|
const clickUpdate = (row) => {
|
|
|
modalType.value = "edit";
|
|
|
- proxy.post('/department/detail',{id:row.id}).then(res => {
|
|
|
+ proxy.post("/department/detail", { id: row.id }).then((res) => {
|
|
|
formData.data = res;
|
|
|
if (formData.data.wlnBrand) {
|
|
|
formData.data.wlnBrandArr = formData.data.wlnBrand.split(",");
|
|
@@ -471,19 +471,21 @@ const clickUpdate = (row) => {
|
|
|
}
|
|
|
btnDisabled.value = false;
|
|
|
openDialog.value = true;
|
|
|
- })
|
|
|
+ });
|
|
|
};
|
|
|
const clickDelete = (row) => {
|
|
|
ElMessageBox.confirm("你是否确认此操作", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- }).then(() => {
|
|
|
- proxy.post("/department/delete", { id: row.id }).then(() => {
|
|
|
- ElMessage({ message: "删除成功", type: "success" });
|
|
|
- getList();
|
|
|
- });
|
|
|
- });
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ proxy.post("/department/delete", { id: row.id }).then(() => {
|
|
|
+ ElMessage({ message: "删除成功", type: "success" });
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
};
|
|
|
</script>
|
|
|
|