Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄媛媛
ElectricitySheep
Commits
e3b04df6
Commit
e3b04df6
authored
Apr 23, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huangyuanyuan/electricitysheep
parents
0b9cea8b
721a1426
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
14 deletions
+46
-14
App.vue
src/App.vue
+1
-1
mall.vue
src/components/mall.vue
+9
-3
menu.vue
src/components/system/menu.vue
+36
-10
No files found.
src/App.vue
View file @
e3b04df6
...
...
@@ -11,7 +11,7 @@ export default {
</
script
>
<
style
>
@import
"//at.alicdn.com/t/font_1769104_
25q16n3sqko
.css"
;
@import
"//at.alicdn.com/t/font_1769104_
sg5novwcbz
.css"
;
@import
"./assets/css/common.css"
;
@import
"./assets/css/zkcss.css"
;
html
,
...
...
src/components/mall.vue
View file @
e3b04df6
...
...
@@ -197,7 +197,7 @@
.el-submenu
.el-menu-item
{
padding-left
:
0
!important
;
min-width
:
1
30
px
!important
;
min-width
:
1
29
px
!important
;
padding
:
0
!important
;
text-align
:
center
;
}
...
...
@@ -269,7 +269,7 @@
.mainContainer
.main_routerPage
{
padding
:
20px
;
/* height:100%; */
overflow-y
:
scroll
;
}
</
style
>
...
...
@@ -380,7 +380,7 @@
</ul>
</div>
</div>
<div
class=
"main_routerPage"
>
<div
class=
"main_routerPage"
:style=
"{height: Height+'px'}"
>
<router-view
/>
</div>
</div>
...
...
@@ -395,6 +395,7 @@
showTwo
:
false
,
defaultActive
:
'1-1'
,
currentUser
:
{},
Height
:
0
,
MenuList
:
[],
//菜单列表
};
},
...
...
@@ -432,6 +433,11 @@
},
mounted
()
{
this
.
getMenuList
();
this
.
Height
=
document
.
documentElement
.
clientHeight
-
60
;
//监听浏览器窗口变化
window
.
onresize
=
()
=>
{
this
.
Height
=
document
.
documentElement
.
clientHeight
-
60
}
}
};
...
...
src/components/system/menu.vue
View file @
e3b04df6
...
...
@@ -79,22 +79,26 @@
<el-option
label=
"三级"
:key=
"3"
:value=
"3"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"父级菜单编号"
prop=
"ParentId"
>
<el-form-item
label=
"父级菜单编号"
v-if=
"addMsg.MenuLevel!=1"
prop=
"ParentId"
>
<el-select
style=
"width:234px;"
size=
"small"
v-model=
"addMsg.ParentId"
>
<el-option
label=
"编号1"
:key=
"0"
:value=
"0"
></el-option>
<el-option
label=
"编号2"
:key=
"1"
:value=
"1"
></el-option>
<el-option
v-for=
"item in parentList"
:key=
"item.MenuId"
:label=
"item.MenuName"
:value=
"item.MenuId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"图标"
prop=
"IconClass"
>
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"25"
v-model=
"addMsg.IconClass"
></el-input>
</el-form-item>
<el-form-item
label=
"排序"
>
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"25"
v-model=
"addMsg.SortNum"
></el-input>
<el-input
type=
"text"
style=
"width:234px"
@
keyup
.
native=
"checkInteger(addMsg,'SortNum')"
size=
"small"
maxlength=
"25"
v-model=
"addMsg.SortNum"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"menuDialog = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"
addMenu(
)"
>
确 定
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"
submitForm('addMsg'
)"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -121,8 +125,18 @@
Status
:
0
,
SortNum
:
0
,
},
parentList
:[],
menurules
:
{
MenuName
:
[{
required
:
true
,
message
:
'请填写菜单名称。'
,
trigger
:
'blur'
}],
// MenuUrl: [{
// required: true,
// message: '请填写菜单链接。',
// trigger: 'blur'
// }]
}
};
},
...
...
@@ -134,6 +148,16 @@
this
.
msg
.
pageIndex
=
val
;
this
.
getPageList
();
},
submitForm
(
addMsg
)
{
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
addMenu
();
}
else
{
return
false
;
}
});
},
//重置菜单
resetMsg
(){
let
msg
=
{
...
...
@@ -177,6 +201,7 @@
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
res
.
data
.
data
;
this
.
menuDialog
=
true
;
this
.
getChildMenuList
(
this
.
addMsg
.
MenuLevel
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
...
...
@@ -213,14 +238,14 @@
}
})
},
//
恢复菜单
//
获取父级菜单编号
getChildMenuList
(
MenuLevel
)
{
this
.
parentList
=
[];
this
.
apipost
(
"/api/Tenant/GetMenuChildList"
,
{
MenuLevel
:
MenuLevel
,
MenuLevel
:
MenuLevel
-
1
,
},
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
parentList
=
res
.
data
.
data
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
...
...
@@ -229,6 +254,7 @@
},
mounted
()
{
this
.
getPageList
();
this
.
getChildMenuList
(
1
);
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment