|
@@ -333,7 +333,7 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
// 复用现有的更新接口,传递完整的行数据
|
|
|
await updateCategory({
|
|
|
id: row.id,
|
|
@@ -345,7 +345,10 @@ export default {
|
|
|
status: row.status, // 新的状态值
|
|
|
remark: row.remark || ''
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
+ // 刷新页面数据
|
|
|
+ this.onLoad();
|
|
|
+
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: `${statusText}成功!`
|
|
@@ -353,7 +356,7 @@ export default {
|
|
|
} catch (error) {
|
|
|
// 恢复原状态
|
|
|
row.status = row.status === 1 ? 0 : 1;
|
|
|
-
|
|
|
+
|
|
|
if (error !== 'cancel') {
|
|
|
console.error('状态更新失败:', error);
|
|
|
this.$message({
|