Commit 2441bced authored by 赵伟庚's avatar 赵伟庚

fix:启禁用失败时恢复初始状态

parent 4f3d7fc4
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
v-if="isIndex" v-if="isIndex"
type="index" type="index"
:label="indexLabel" :label="indexLabel"
width="80" width="54"
align="left" align="left"
> >
<!-- 序号 --> <!-- 序号 -->
......
...@@ -378,6 +378,7 @@ const changeUseRow = (row) => { ...@@ -378,6 +378,7 @@ const changeUseRow = (row) => {
changePage(1) changePage(1)
}else { }else {
ElMessage.error(res.data.data) ElMessage.error(res.data.data)
row.state = row.state == 0 ? 1 : 0
} }
}) })
} // 启用禁用 } // 启用禁用
......
...@@ -387,9 +387,11 @@ import CryptoJS from "crypto-js"; ...@@ -387,9 +387,11 @@ import CryptoJS from "crypto-js";
) )
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
$message.success(res.data.msg)
getTableRows() getTableRows()
}else { }else {
$message.error(res.data.data) $message.error(res.data.data)
row.state = row.state == 0 ? 1 : 0
} }
}) })
} }
......
...@@ -741,9 +741,11 @@ import { downloadFileFormatNew } from '@/services/helper' ...@@ -741,9 +741,11 @@ import { downloadFileFormatNew } from '@/services/helper'
) )
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
$message.success(res.data.msg)
getTableRows() getTableRows()
}else { }else {
$message.error(res.data.data) $message.error(res.data.data)
row.state = row.state == 0 ? 1 : 0
} }
}) })
} }
......
...@@ -350,6 +350,7 @@ const changeUseRow = (row) => { ...@@ -350,6 +350,7 @@ const changeUseRow = (row) => {
changePage(1) changePage(1)
}else { }else {
ElMessage.error(res.data.data) ElMessage.error(res.data.data)
row.state = row.state == 0 ? 1 : 0
} }
}) })
} // 更改启用禁用状态 } // 更改启用禁用状态
......
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