|
@@ -311,11 +311,7 @@ const submitForm = () => {
|
|
|
};
|
|
|
|
|
|
const changeStatus = (row) => {
|
|
|
- modalType.value = "edit";
|
|
|
let status = row.status == "1" ? 0 : 1;
|
|
|
- proxy.post("/productCategory/detail", { id: row.id }).then((res) => {
|
|
|
- res.status = status;
|
|
|
- formData.data = res;
|
|
|
ElMessageBox.confirm("你是否确认此操作?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -323,7 +319,7 @@ const changeStatus = (row) => {
|
|
|
}).then(() => {
|
|
|
// 更新状态
|
|
|
proxy
|
|
|
- .post("/productCategory/" + modalType.value, formData.data)
|
|
|
+ .post("/productCategory/changeStatus", {id:row.id,status:status})
|
|
|
.then((res) => {
|
|
|
ElMessage({
|
|
|
message: "操作成功",
|
|
@@ -332,7 +328,6 @@ const changeStatus = (row) => {
|
|
|
getList();
|
|
|
});
|
|
|
});
|
|
|
- });
|
|
|
};
|
|
|
|
|
|
//编辑详情
|