fix: 菜单管理调整
This commit is contained in:
@@ -275,7 +275,7 @@ function fnModalVisibleByVive(menuId: string | number) {
|
||||
getMenu(menuId).then(res => {
|
||||
modalState.confirmLoading = false;
|
||||
hide();
|
||||
if (res.code === 200 && res.data) {
|
||||
if (res.code === 1 && res.data) {
|
||||
modalState.from = Object.assign(modalState.from, res.data);
|
||||
modalState.title = '菜单信息';
|
||||
modalState.visibleByView = true;
|
||||
@@ -311,7 +311,7 @@ function fnModalVisibleByEdit(
|
||||
getMenu(menuId).then(res => {
|
||||
modalState.confirmLoading = false;
|
||||
hide();
|
||||
if (res.code === 200 && res.data) {
|
||||
if (res.code === 1 && res.data) {
|
||||
modalState.from = Object.assign(modalState.from, res.data);
|
||||
modalState.title = '修改菜单信息';
|
||||
modalState.visibleByEdit = true;
|
||||
@@ -349,7 +349,7 @@ function fnModalOk() {
|
||||
message.loading({ content: '请稍等...', key });
|
||||
menu
|
||||
.then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.code === 1) {
|
||||
message.success({
|
||||
content: `${modalState.title}成功`,
|
||||
key,
|
||||
@@ -398,7 +398,7 @@ function fnRecordDelete(menuId: string | number) {
|
||||
const key = 'delMenu';
|
||||
message.loading({ content: '请稍等...', key });
|
||||
delMenu(menuId).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.code === 1) {
|
||||
message.success({
|
||||
content: `删除成功`,
|
||||
key,
|
||||
@@ -422,7 +422,7 @@ function fnGetList() {
|
||||
if (tableState.loading) return;
|
||||
tableState.loading = true;
|
||||
listMenu(toRaw(queryParams)).then(res => {
|
||||
if (res.code === 200 && Array.isArray(res.data)) {
|
||||
if (res.code === 1 && Array.isArray(res.data)) {
|
||||
menuListData = JSON.parse(JSON.stringify(res.data));
|
||||
// 初始上级菜单和展开编号key
|
||||
if (treeDataAll.length <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user