Commit 5612eca7 authored by zhengke's avatar zhengke

修改

parent 32559472
...@@ -60,6 +60,21 @@ export function GetWebNav(data) { ...@@ -60,6 +60,21 @@ export function GetWebNav(data) {
}) })
} }
/**
* 获取网站菜单下拉
*
*/
export function GetWebMenuList(data) {
return request({
url: '/WebManager/GetWebMenuList',
method: 'post',
data
})
}
/** /**
* 获取网站菜单分页 * 获取网站菜单分页
* *
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Name" ref="Name" <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Name" ref="Name"
class="col-6 q-pr-lg q-pb-lg" label="菜单名称" :rules="[val => !!val || '请填写菜单名称']" /> class="col-6 q-pr-lg q-pb-lg" label="菜单名称" :rules="[val => !!val || '请填写菜单名称']" />
<q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.MenuUrl" ref="MenuUrl" <q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.MenuUrl" ref="MenuUrl"
class="col-6 q-pb-lg" label="菜单地址"/> class="col-6 q-pb-lg" label="菜单地址" />
<q-select class="col-6 q-pr-lg q-pb-lg" v-model="objOption.MenuLevel" :options="MenuLevelOpts" emit-value <q-select class="col-6 q-pr-lg q-pb-lg" v-model="objOption.MenuLevel" :options="MenuLevelOpts" emit-value
map-options label="菜单等级" /> map-options label="菜单等级" @input="getFatherData(objOption.MenuLevel)" />
<q-input stack-label maxlength="200" :dense="false" v-model="objOption.ParentId" class="col-6 q-pb-lg" <q-select class="col-6 q-pb-lg" v-model="objOption.ParentId" option-value="Id" option-label="Name"
label="父级Id" /> :options="FatherLevelOpts" emit-value map-options label="父级Id" />
<q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.ClassName" ref="ClassName" <q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.ClassName" ref="ClassName"
class="col-6 q-pb-lg q-pr-lg" label="样式" /> class="col-6 q-pb-lg q-pr-lg" label="样式" />
<q-input filled stack-label maxlength="100" :dense="false" @keyup.native="checkInteger(objOption,'SortNum')" <q-input filled stack-label maxlength="100" :dense="false" @keyup.native="checkInteger(objOption,'SortNum')"
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
<script> <script>
import { import {
SetWebMenu, SetWebMenu,
GetWebMenu GetWebMenu,
GetWebMenuList
} from '../../api/system/webkit' } from '../../api/system/webkit'
import { import {
UploadSelfFile UploadSelfFile
...@@ -85,6 +86,7 @@ ...@@ -85,6 +86,7 @@
optionTitle: "", optionTitle: "",
//菜单列表 //菜单列表
MenuList: [], MenuList: [],
FatherLevelOpts: [],
saveLoading: false, saveLoading: false,
} }
}, },
...@@ -92,6 +94,19 @@ ...@@ -92,6 +94,19 @@
this.initObj() this.initObj()
}, },
methods: { methods: {
//下拉切换父级数据
getFatherData() {
this.objOption.ParentId = 0;
this.FatherLevelOpts=[];
let msg = {
MenuLevel: Number(this.objOption.MenuLevel-1)
}
GetWebMenuList(msg).then(res => {
if (res.Code == 1) {
this.FatherLevelOpts = res.Data;
}
})
},
uploadFile(files) { uploadFile(files) {
UploadSelfFile("course", files[0], res => { UploadSelfFile("course", files[0], res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -105,7 +120,6 @@ ...@@ -105,7 +120,6 @@
GetWebMenu({ GetWebMenu({
Id: this.saveObj.Id Id: this.saveObj.Id
}).then(res => { }).then(res => {
console.log(res, '数据');
this.objOption.Id = res.Data.Id; this.objOption.Id = res.Data.Id;
this.objOption.Name = res.Data.Name; this.objOption.Name = res.Data.Name;
this.objOption.MenuUrl = res.Data.MenuUrl; this.objOption.MenuUrl = res.Data.MenuUrl;
...@@ -114,6 +128,7 @@ ...@@ -114,6 +128,7 @@
this.objOption.ClassName = res.Data.ClassName; this.objOption.ClassName = res.Data.ClassName;
this.objOption.Icon = res.Data.Icon; this.objOption.Icon = res.Data.Icon;
this.objOption.SortNum = res.Data.SortNum; this.objOption.SortNum = res.Data.SortNum;
this.getFatherData();
}) })
this.optionTitle = "修改网站菜单信息" this.optionTitle = "修改网站菜单信息"
} else { } else {
......
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