Commit fc52e943 authored by zhengke's avatar zhengke

修改

parent 11811f64
...@@ -96,3 +96,16 @@ export function GetWebMenu(data) { ...@@ -96,3 +96,16 @@ export function GetWebMenu(data) {
}) })
} }
/**
* 修改网站菜单状态
*
*/
export function RemoveWebMenuStatus(data) {
return request({
url: '/WebManager/RemoveWebMenuStatus',
method: 'post',
data
})
}
...@@ -127,21 +127,24 @@ ...@@ -127,21 +127,24 @@
}, },
//保存菜单 //保存菜单
saveWebkitMenu() { saveWebkitMenu() {
this.saveLoading = true this.$refs.NavTitle.validate();
SetWebNav(this.objOption).then(res => { if (!this.$refs.NavTitle.hasError) {
this.saveLoading = false this.saveLoading = true
this.$q.notify({ SetWebNav(this.objOption).then(res => {
icon: 'iconfont icon-chenggong', this.saveLoading = false
color: 'accent', this.$q.notify({
timeout: 2000, icon: 'iconfont icon-chenggong',
message: '数据保存成功!', color: 'accent',
position: 'top' timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success")
this.closeSaveForm()
}).catch(() => {
this.saveLoading = false
}) })
this.$emit("success") }
this.closeSaveForm()
}).catch(() => {
this.saveLoading = false
})
} }
}, },
} }
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
Name: '', //菜单名称 Name: '', //菜单名称
MenuUrl: '', MenuUrl: '',
ParentId: 0, ParentId: 0,
MenuLevel: '', MenuLevel: -1,
ClassName: '', ClassName: '',
Icon: '', Icon: '',
SortNum: '' SortNum: ''
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
this.objOption.Name = ''; this.objOption.Name = '';
this.objOption.MenuUrl = ''; this.objOption.MenuUrl = '';
this.objOption.ParentId = 0; this.objOption.ParentId = 0;
this.objOption.MenuLevel = 0; this.objOption.MenuLevel = -1;
this.objOption.ClassName = ''; this.objOption.ClassName = '';
this.objOption.Icon = ''; this.objOption.Icon = '';
this.objOption.SortNum = 0; this.objOption.SortNum = 0;
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" :data="data" :columns="columns" row-key="name"> separator="none" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">导航信息</div> <div class="col-2 q-table__title">菜单信息</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="新增导航" @click="EditMenu(null)" /> <q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="新增菜单" @click="EditMenu(null)" />
</div> </div>
</template> </template>
<template v-slot:body-cell-Icon="props"> <template v-slot:body-cell-Icon="props">
...@@ -140,9 +140,9 @@ ...@@ -140,9 +140,9 @@
}; };
var tipMsg = ""; var tipMsg = "";
if (delMsg.Status == 0) { if (delMsg.Status == 0) {
tipMsg = "是否启用【" + obj.NavTitle + "】菜单?"; tipMsg = "是否启用【" + obj.Name + "】菜单?";
} else { } else {
tipMsg = "是否禁用【" + obj.NavTitle + "】菜单?"; tipMsg = "是否禁用【" + obj.Name + "】菜单?";
} }
this.$q.dialog({ this.$q.dialog({
title: '提示信息', title: '提示信息',
......
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