提交 bb32a019 编写于 作者: ibizdev's avatar ibizdev

RedPig97 发布系统代码 [后台服务,演示应用]

上级 b21e2695
...@@ -184,8 +184,11 @@ function getAppLocale(){ ...@@ -184,8 +184,11 @@ function getAppLocale(){
menus: { menus: {
iconmenu: { iconmenu: {
menuitem1: commonLogic.appcommonhandle("菜单1",null), menuitem1: commonLogic.appcommonhandle("菜单1",null),
menuitem6: commonLogic.appcommonhandle("菜单项",null),
menuitem2: commonLogic.appcommonhandle("菜单2",null), menuitem2: commonLogic.appcommonhandle("菜单2",null),
menuitem7: commonLogic.appcommonhandle("菜单项",null),
menuitem3: commonLogic.appcommonhandle("菜单3",null), menuitem3: commonLogic.appcommonhandle("菜单3",null),
menuitem8: commonLogic.appcommonhandle("菜单项",null),
menuitem4: commonLogic.appcommonhandle("菜单4",null), menuitem4: commonLogic.appcommonhandle("菜单4",null),
menuitem5: commonLogic.appcommonhandle("菜单5",null), menuitem5: commonLogic.appcommonhandle("菜单5",null),
}, },
......
...@@ -184,8 +184,11 @@ function getAppLocale(){ ...@@ -184,8 +184,11 @@ function getAppLocale(){
menus: { menus: {
iconmenu: { iconmenu: {
menuitem1: commonLogic.appcommonhandle("菜单1",null), menuitem1: commonLogic.appcommonhandle("菜单1",null),
menuitem6: commonLogic.appcommonhandle("菜单项",null),
menuitem2: commonLogic.appcommonhandle("菜单2",null), menuitem2: commonLogic.appcommonhandle("菜单2",null),
menuitem7: commonLogic.appcommonhandle("菜单项",null),
menuitem3: commonLogic.appcommonhandle("菜单3",null), menuitem3: commonLogic.appcommonhandle("菜单3",null),
menuitem8: commonLogic.appcommonhandle("菜单项",null),
menuitem4: commonLogic.appcommonhandle("菜单4",null), menuitem4: commonLogic.appcommonhandle("菜单4",null),
menuitem5: commonLogic.appcommonhandle("菜单5",null), menuitem5: commonLogic.appcommonhandle("菜单5",null),
}, },
......
...@@ -27,6 +27,26 @@ mock.onGet('v7/icon-menuappmenu').reply((config: any) => { ...@@ -27,6 +27,26 @@ mock.onGet('v7/icon-menuappmenu').reply((config: any) => {
textcls: '', textcls: '',
appfunctag: '', appfunctag: '',
resourcetag: '', resourcetag: '',
items: [
{
id: '046CE0A0-B7D6-494F-B05C-2E6A7CB6ABEB',
name: 'menuitem6',
text: '菜单项',
type: 'MENUITEM',
counterid: '',
tooltip: '菜单项',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
},
],
}, },
{ {
id: '2A01B442-ACB2-4175-BC52-0C5743A72DB2', id: '2A01B442-ACB2-4175-BC52-0C5743A72DB2',
...@@ -45,6 +65,26 @@ mock.onGet('v7/icon-menuappmenu').reply((config: any) => { ...@@ -45,6 +65,26 @@ mock.onGet('v7/icon-menuappmenu').reply((config: any) => {
textcls: '', textcls: '',
appfunctag: '', appfunctag: '',
resourcetag: '', resourcetag: '',
items: [
{
id: '59B91A6F-9217-481E-B3DB-58CBA9E19F60',
name: 'menuitem7',
text: '菜单项',
type: 'MENUITEM',
counterid: '',
tooltip: '菜单项',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
},
],
}, },
{ {
id: 'AD755E05-FA6C-4FA4-90E9-AD0234566866', id: 'AD755E05-FA6C-4FA4-90E9-AD0234566866',
...@@ -63,6 +103,26 @@ mock.onGet('v7/icon-menuappmenu').reply((config: any) => { ...@@ -63,6 +103,26 @@ mock.onGet('v7/icon-menuappmenu').reply((config: any) => {
textcls: '', textcls: '',
appfunctag: '', appfunctag: '',
resourcetag: '', resourcetag: '',
items: [
{
id: 'DDEEB631-7B6F-46A3-B06D-BD8DB76C27C4',
name: 'menuitem8',
text: '菜单项',
type: 'MENUITEM',
counterid: '',
tooltip: '菜单项',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
},
],
}, },
{ {
id: 'C19A946A-FEB4-4A7F-B858-05CBB788B066', id: 'C19A946A-FEB4-4A7F-B858-05CBB788B066',
......
<template> <template>
<div class="app-quick-menus"> <div class="app-app-menu">
<row> <el-menu
<template v-for="(item,index) in menus" > class="app-menu"
<card :bordered="false" dis-hover :key = "index"> :default-openeds="defaultOpeneds"
<p slot='title' @click="select(item.name, [item.name])"> :mode="mode"
<span style="margin-right:12px"> :menu-trigger="trigger"
<img :src="item.icon" v-if="!Object.is(item.icon, '')"/> :collapse="isCollapse"
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')"/> @select="select"
<i class='fa fa-cogs' v-else></i> :default-active="defaultActive">
</span> <template v-if="Object.is(mode,'horizontal')">
<span>{{$t('app.menus.iconmenu.' + item.name)}}</span> <template v-for="item0 in menus">
<span class="line"></span> <template v-if="item0.items && Array.isArray(item0.items) && item0.items.length > 0">
</p> <el-submenu v-show="!item0.hidden" :index="item0.name" :popper-class="popperClass" :key="item0.id" :class="item0.textcls">
<p style=" display: 'flex' "> <template slot='title'>
<app-quick-menus :menus = "item.items" :ctrlName = "'iconmenu'" v-if="item.items" @menuClick="select(item.name, [item.name])"></app-quick-menus> <template v-if="item0.icon && item0.icon != ''">
</p> <img :src="item0.icon" class='app-menu-icon' />
</card> </template>
</template> <template v-else-if="item0.iconcls && item0.iconcls != ''">
</row> <i :class="[item0.iconcls, 'app-menu-icon']"></i>
</div> </template>
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
</template>
<span class='text' :title="$t('app.menus.iconmenu.' + item0.name)">{{$t('app.menus.iconmenu.' + item0.name)}}</span>
</template>
<template v-for="item1 in item0.items">
<template v-if="item1.items && Array.isArray(item1.items) && item1.items.length > 0">
<el-submenu v-show="!item1.hidden" :index="item1.name" :popper-class="popperClass" :key="item1.id" :class="item1.textcls">
<template slot='title'>
<template v-if="item1.icon && item1.icon != ''">
<img :src="item1.icon" class='app-menu-icon' />
</template>
<template v-else-if="item1.iconcls && item1.iconcls != ''">
<i :class="[item1.iconcls, 'app-menu-icon']"></i>
</template>
<span class='text' :title="$t('app.menus.iconmenu.' + item1.name)">{{$t('app.menus.iconmenu.' + item1.name)}}</span>
</template>
<template v-for="item2 in item1.items">
<template v-if="item2.type =='MENUITEM'">
<el-menu-item v-show="!item2.hidden" :index="item2.name" :key="item2.id" :class="item2.textcls">
<template v-if="item2.icon && item2.icon != ''">
<img :src="item2.icon" class='app-menu-icon' />
</template>
<template v-else-if="item2.iconcls && item2.iconcls != ''">
<i :class="[item2.iconcls, 'app-menu-icon']"></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.iconmenu.' + item2.name)">{{$t('app.menus.iconmenu.' + item2.name)}}</span>
<template v-if="counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item2.counterid]" :overflow-count="9999"></badge>
</span>
</template>
</template>
</el-menu-item>
</template>
</template>
</el-submenu>
</template>
<template v-else>
<template v-if="item1.type =='MENUITEM'">
<el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id" :class="item1.textcls">
<template v-if="item1.icon && item1.icon != ''">
<img :src="item1.icon" class='app-menu-icon' />
</template>
<template v-else-if="item1.iconcls && item1.iconcls != ''">
<i :class="[item1.iconcls, 'app-menu-icon']"></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.iconmenu.' + item1.name)">{{$t('app.menus.iconmenu.' + item1.name)}} </span>
<template v-if="counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item1.counterid]" :overflow-count="9999"></badge>
</span>
</template>
</template>
</el-menu-item>
</template>
</template>
</template>
</el-submenu>
</template>
<template v-else>
<template v-if="item0.type =='MENUITEM'">
<el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id" :class="item0.textcls">
<template v-if="item0.icon && item0.icon != ''">
<img :src="item0.icon" class='app-menu-icon' />
</template>
<template v-else-if="item0.iconcls && item0.iconcls != ''">
<i :class="[item0.iconcls, 'app-menu-icon']"></i>
</template>
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.iconmenu.' + item0.name)">{{$t('app.menus.iconmenu.' + item0.name)}}</span>
<template v-if="counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item0.counterid]" :overflow-count="9999"></badge>
</span>
</template>
</template>
</el-menu-item>
</template>
</template>
</template>
</template>
<app-menu-item v-else :isCollapse="isCollapse" :menus="menus" :ctrlName="'iconmenu'" :isFirst="true" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item>
</el-menu>
</div>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
......
...@@ -32,6 +32,27 @@ export default class IconMenuModel { ...@@ -32,6 +32,27 @@ export default class IconMenuModel {
appfunctag: '', appfunctag: '',
resourcetag: '', resourcetag: '',
authtag:'Web-iconMenu-menuitem1', authtag:'Web-iconMenu-menuitem1',
items: [
{
id: '046CE0A0-B7D6-494F-B05C-2E6A7CB6ABEB',
name: 'menuitem6',
text: '菜单项',
type: 'MENUITEM',
counterid: '',
tooltip: '菜单项',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
authtag:'Web-iconMenu-menuitem6',
},
],
}, },
{ {
id: '2A01B442-ACB2-4175-BC52-0C5743A72DB2', id: '2A01B442-ACB2-4175-BC52-0C5743A72DB2',
...@@ -51,6 +72,27 @@ export default class IconMenuModel { ...@@ -51,6 +72,27 @@ export default class IconMenuModel {
appfunctag: '', appfunctag: '',
resourcetag: '', resourcetag: '',
authtag:'Web-iconMenu-menuitem2', authtag:'Web-iconMenu-menuitem2',
items: [
{
id: '59B91A6F-9217-481E-B3DB-58CBA9E19F60',
name: 'menuitem7',
text: '菜单项',
type: 'MENUITEM',
counterid: '',
tooltip: '菜单项',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
authtag:'Web-iconMenu-menuitem7',
},
],
}, },
{ {
id: 'AD755E05-FA6C-4FA4-90E9-AD0234566866', id: 'AD755E05-FA6C-4FA4-90E9-AD0234566866',
...@@ -70,6 +112,27 @@ export default class IconMenuModel { ...@@ -70,6 +112,27 @@ export default class IconMenuModel {
appfunctag: '', appfunctag: '',
resourcetag: '', resourcetag: '',
authtag:'Web-iconMenu-menuitem3', authtag:'Web-iconMenu-menuitem3',
items: [
{
id: 'DDEEB631-7B6F-46A3-B06D-BD8DB76C27C4',
name: 'menuitem8',
text: '菜单项',
type: 'MENUITEM',
counterid: '',
tooltip: '菜单项',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
authtag:'Web-iconMenu-menuitem8',
},
],
}, },
{ {
id: 'C19A946A-FEB4-4A7F-B858-05CBB788B066', id: 'C19A946A-FEB4-4A7F-B858-05CBB788B066',
......
// this is less /*** BRGIN:菜单样式 ***/
/*** BEGIN:potal菜单 ***/ .app-app-menu {
.app-quick-menus{ overflow-y: auto;
>.ivu-row{ overflow-x: hidden;
.ivu-card{ height: calc(100% - 58px);
.ivu-card-body{ .ivu-divider{
>p{ background-color: #b3b3b3;
>.app-menus{ height: 2px;
display: flex; }
flex-wrap: wrap; > .el-menu {
>div{ border-right: 0;
width: 100%; .el-menu-item {
margin-right: 10px; white-space: nowrap;
.ivu-card-body{ text-overflow: ellipsis;
>div{ overflow: hidden;
display: flex; word-break: break-all;
>span{ .ivu-badge {
margin-right: 12px; .ivu-badge-count {
} box-shadow: 0 0 0 0px #fff;
}
}
}
.el-submenu__title i, .el-menu-item i {
font-size: 12px;
width: 18px;
}
.el-submenu__title .app-menu-icon,.el-menu-item .app-menu-icon{
width:20px;
font-size: 14px;
}
.el-submenu__title .text {
font-size: 16px;
}
.el-submenu__title .app-menu-circle,.el-menu-item .app-menu-circle {
display: inline-block;
border-radius: 50%;
width: 20px;
height: 20px;
line-height: 36px;
vertical-align:middle;
background: rgb(var(--app-footer-background-color-rgb));
border: 1px solid #fff;
border-color: rgb(var(--app-header-color-rgb));
color: rgb(var(--app-header-color-rgb));;
text-align: center;
font: 12px Arial, sans-serif;
}
.el-submenu__title, .el-menu-item {
height: 50px;
font-size: 14px;
line-height: 50px;
border-left: 4px !important;
}
.el-menu-item .el-tooltip {
padding-left: 12px !important;
}
.isCollpase .el-submenu__title{
padding-left: 12px !important;
}
.isFirst > .text {
font-size: 16px !important;
}
.el-menu-item, .el-submenu, .el-menu {
border-top: 1px solid #fff;
}
> .el-menu-item, > .el-submenu > .el-submenu__title {
height: 56px;
line-height: 56px;
padding-left: 16px !important;
}
.app-menu-icon {
margin: 4px;
text-align: center;
}
> .el-submenu {
> .el-menu {
> .el-menu-item, > .el-submenu > .el-submenu__title {
padding-left: 44px !important;
}
> .el-submenu {
> .el-menu {
> .el-menu-item, > .el-submenu > .el-submenu__title {
padding-left: 68px !important;
}
}
} }
}
} }
}
} }
} .active-icon {
font-size: 40px !important;
position: absolute;
right: 0;
line-height: 42px;
color: #fff !important;
display: none;
width: 24px !important;
overflow: hidden;
}
}
.el-menu--horizontal{
display: flex;
width: calc(100vw - 1100px);
height: 65px;
flex-wrap: nowrap;
overflow-x:scroll;
padding-top: 3px;
.el-menu-item{
overflow: visible;
}
.el-submenu{
.el-submenu__title{
padding-right: 0px !important;
padding-left: 0px !important;
}
}
}
.ivu-divider-horizontal {
width: 100%;
min-width: 100%;
margin: 4px auto;
margin-bottom: 1px;
} }
}
} }
.app-popper-menu {
.el-menu-item, .el-submenu__title {
height: 36px;
font-size: 16px;
line-height: 36px;
}
> .el-menu-item, > .el-submenu > .el-submenu__title {
height: 40px;
line-height: 40px;
}
.el-menu-item {
.ivu-badge {
.ivu-badge-count {
box-shadow: 0 0 0 0px #fff;
}
}
> span{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.ivu-divider-horizontal {
width: 100%;
min-width: 100%;
margin: 4px auto;
margin-bottom: 1px;
}
}
// this is less
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
:context="context" :context="context"
:showBusyIndicator="true" :showBusyIndicator="true"
name="db_appmenu1_appmenu" name="db_appmenu1_appmenu"
ref='db_appmenu1_appmenu' ref='db_appmenu1_appmenu'
@closeview="closeView($event)"> @closeview="closeView($event)">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册