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

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

上级 27758b6e
......@@ -312,6 +312,14 @@
"groupName":"(未分类)",
"portletTYpe":"HTML","componentName":"app-ibizorder-portal-components-web-portlet"},
{"type":"app",
"appCodeName":"Web",
"appName":"演示应用",
"portletCodeName": "appMenu",
"portletName": "快捷菜单",
"groupCodeName":"Ungroup",
"groupName":"(未分类)",
},
{"type":"app",
"appCodeName":"IBIZAPPVIEW",
"appName":"应用视图",
"portletCodeName": "appViewAmount",
......
......@@ -195,7 +195,7 @@ function getAppLocale(){
menuitem112: commonLogic.appcommonhandle("Application Class",null),
menuitem186: commonLogic.appcommonhandle("Data Kanban",null),
menuitem129: commonLogic.appcommonhandle("Portal Components",null),
menuitem156: commonLogic.appcommonhandle("SingleDataClass",null),
menuitem156: commonLogic.appcommonhandle("Single Data Class",null),
menuitem12: commonLogic.appcommonhandle("Edit Form",null),
menuitem15: commonLogic.appcommonhandle("Basic Form Item",null),
menuitem107: commonLogic.appcommonhandle("BuiltInFeatures",null),
......@@ -221,10 +221,10 @@ function getAppLocale(){
menuitem114: commonLogic.appcommonhandle("List Navigation",null),
menuitem138: commonLogic.appcommonhandle("Calendar Navigation",null),
menuitem20: commonLogic.appcommonhandle("数据关系分页",null),
menuitem117: commonLogic.appcommonhandle("DataRelationBar(up and down)",null),
menuitem117: commonLogic.appcommonhandle("Data Relation Bar(up and down relationship)",null),
menuitem118: commonLogic.appcommonhandle("Data Relation Bar (pagination relation)",null),
menuitem116: commonLogic.appcommonhandle("DataRelationColumn(left right relation)",null),
menuitem158: commonLogic.appcommonhandle("PanelClass",null),
menuitem116: commonLogic.appcommonhandle("Data Relation Column(left right relationship)",null),
menuitem158: commonLogic.appcommonhandle("Panel Class",null),
menuitem145: commonLogic.appcommonhandle("SelectViewPanel",null),
menuitem17: commonLogic.appcommonhandle("WizardPanel",null),
menuitem134: commonLogic.appcommonhandle("BasicUsage",null),
......@@ -232,7 +232,7 @@ function getAppLocale(){
menuitem121: commonLogic.appcommonhandle("MultiEditViewPanel",null),
menuitem115: commonLogic.appcommonhandle("Multiple Forms (row records)",null),
menuitem123: commonLogic.appcommonhandle("Multi Form (top page)",null),
menuitem119: commonLogic.appcommonhandle("MultiDataClass",null),
menuitem119: commonLogic.appcommonhandle("Multi Data Class",null),
menuitem13: commonLogic.appcommonhandle("Grid",null),
menuitem57: commonLogic.appcommonhandle("禁用排序",null),
menuitem59: commonLogic.appcommonhandle("行操作",null),
......@@ -282,17 +282,17 @@ function getAppLocale(){
menuitem40: commonLogic.appcommonhandle("PieChart",null),
menuitem41: commonLogic.appcommonhandle("RegionalChart",null),
menuitem42: commonLogic.appcommonhandle("RadarChart",null),
menuitem159: commonLogic.appcommonhandle("OtherCategories",null),
menuitem159: commonLogic.appcommonhandle("Other Categories",null),
menuitem5: commonLogic.appcommonhandle("View",null),
menuitem140: commonLogic.appcommonhandle("SingleDataView",null),
menuitem161: commonLogic.appcommonhandle("EntityWizardView",null),
menuitem161: commonLogic.appcommonhandle("Entity Wizard View",null),
menuitem8: commonLogic.appcommonhandle("EntityEditView",null),
menuitem162: commonLogic.appcommonhandle("Entity Edit View (pagination relations)",null),
menuitem163: commonLogic.appcommonhandle("Entity Editing View (up-down relationship)",null),
menuitem164: commonLogic.appcommonhandle("EntityEditingView (left-right relationship)",null),
menuitem164: commonLogic.appcommonhandle("Entity Editing View (left-right relationship)",null),
menuitem165: commonLogic.appcommonhandle("Entity Pagination Navigation View",null),
menuitem166: commonLogic.appcommonhandle("Entity Data Kanban View",null),
menuitem167: commonLogic.appcommonhandle("EntityOptionsOperationsView",null),
menuitem167: commonLogic.appcommonhandle("Entity Options Operations View",null),
menuitem141: commonLogic.appcommonhandle("MultiDataView",null),
menuitem79: commonLogic.appcommonhandle("EntityGridView",null),
menuitem168: commonLogic.appcommonhandle("Entity Multi Form Edit View",null),
......
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
import Mock from 'mockjs'
const Random = Mock.Random;
// 获取应用数据
mock.onGet('v7/app-menuappmenu').reply((config: any) => {
let status = MockAdapter.mockStatus(config);
return [status, {
name: 'db_appmenu1_appmenu',
items: [
{
id: '161CE06C-7FEB-4D3A-908A-EA2756104A50',
name: 'menuitem1',
text: '应用菜单',
type: 'MENUITEM',
counterid: '',
tooltip: '应用菜单',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
items: [
{
id: '00926656-BCDE-45AF-B381-3B465E80D8EB',
name: 'menuitem2',
text: '打开文档',
type: 'MENUITEM',
counterid: '',
tooltip: '打开文档',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-twitter',
icon: '',
textcls: '',
appfunctag: 'AppFunc93',
resourcetag: '',
},
],
},
],
}];
});
......@@ -322,6 +322,14 @@ mock.onGet('./assets/json/portlet-data.json').reply((config: any) => {
"groupName":"(未分类)",
"portletTYpe":"HTML","componentName":"app-ibizorder-portal-components-web-portlet"},
{"type":"app",
"appCodeName":"Web",
"appName":"演示应用",
"portletCodeName": "appMenu",
"portletName": "快捷菜单",
"groupCodeName":"Ungroup",
"groupName":"(未分类)",
},
{"type":"app",
"appCodeName":"IBIZAPPVIEW",
"appName":"应用视图",
"portletCodeName": "appViewAmount",
......
/**
* AppMenu 部件模型
*
* @export
* @class AppMenuModel
*/
export default class AppMenuModel {
/**
* 菜单项集合
*
* @public
* @type {any[]}
* @memberof AppMenuModel
*/
public items: any[] = [
{
id: '161CE06C-7FEB-4D3A-908A-EA2756104A50',
name: 'menuitem1',
text: '应用菜单',
type: 'MENUITEM',
counterid: '',
tooltip: '应用菜单',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
authtag:'Web-appMenu-menuitem1',
items: [
{
id: '00926656-BCDE-45AF-B381-3B465E80D8EB',
name: 'menuitem2',
text: '打开文档',
type: 'MENUITEM',
counterid: '',
tooltip: '打开文档',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-twitter',
icon: '',
textcls: '',
appfunctag: 'AppFunc93',
resourcetag: '',
authtag:'Web-appMenu-menuitem2',
},
],
},
];
/**
* 应用功能集合
*
* @public
* @type {any[]}
* @memberof AppMenuModel
*/
public funcs: any[] = [
];
/**
* 获取所有菜单项集合
*
* @returns {any[]}
* @memberof AppMenuModel
*/
public getAppMenuItems(): any[] {
return this.items;
}
/**
* 获取所有应用功能集合
*
* @returns {any[]}
* @memberof AppMenuModel
*/
public getAppFuncs(): any[] {
return this.funcs;
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import AppMenuModel from './app-menu-appmenu-model';
/**
* AppMenu 部件服务对象
*
* @export
* @class AppMenuService
*/
export default class AppMenuService extends ControlService {
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof AppMenuService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of AppMenuService.
*
* @param {*} [opts={}]
* @memberof AppMenuService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new AppMenuModel();
}
/**
* 获取数据
*
* @returns {Promise<any>}
* @memberof AppMenu
*/
@Errorlog
public get(params: any = {}): Promise<any> {
return Http.getInstance().get('v7/app-menuappmenu', params);
}
}
\ No newline at end of file
/*** BRGIN:菜单样式 ***/
.app-app-menu {
overflow-y: auto;
overflow-x: hidden;
height: calc(100% - 58px);
.ivu-divider{
background-color: #b3b3b3;
height: 2px;
}
> .el-menu {
border-right: 0;
.el-menu-item {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
.ivu-badge {
.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
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import AppMenuBase from './app-menu-appmenu-base.vue';
@Component({
components: {
}
})
export default class AppMenu extends AppMenuBase {
}
</script>
\ No newline at end of file
<template>
<div class='portlet app-menu ' :style="{}">
<p class='portlet-title'>
<span>
快捷菜单
</span>
</p>
<el-divider class="divider"></el-divider>
<div class="portlet-with-title">
<view_db_appmenu1_appmenu
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
name="db_appmenu1_appmenu"
ref='db_appmenu1_appmenu'
@closeview="closeView($event)">
</view_db_appmenu1_appmenu>
</div>
</div>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util, ViewTool } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import AppMenuService from './app-menu-portlet-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class AppMenuBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof AppMenuBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof AppMenuBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof AppMenuBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppMenuBase
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof AppMenuBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof AppMenuBase
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof AppMenuBase
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {AppMenuService}
* @memberof AppMenuBase
*/
public service: AppMenuService = new AppMenuService({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof AppMenuBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof AppMenuBase
*/
public counterRefresh(){
const _this:any =this;
if(_this.counterServiceArray && _this.counterServiceArray.length >0){
_this.counterServiceArray.forEach((item:any) =>{
if(item.refreshData && item.refreshData instanceof Function){
item.refreshData();
}
})
}
}
/**
* 长度
*
* @type {number}
* @memberof AppMenuBase
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof AppMenuBase
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof AppMenuBase
*/
public portletType: string = 'appmenu';
/**
* 视图默认使用
*
* @type {string}
* @memberof AppMenuBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof AppMenuBase
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof AppMenuBase
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof AppMenuBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof AppMenuBase
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof AppMenuBase
*/
get getHeight(){
if(!this.$util.isEmpty(this.height) && !this.$util.isNumberNaN(this.height)){
if(this.height == 0){
return 'auto';
}else{
return this.height+'px';
}
}else{
return 'auto';
}
}
/**
* 刷新
*
* @memberof AppMenuBase
*/
public refresh(args?: any) {
}
/**
* vue 生命周期
*
* @memberof AppMenuBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof AppMenuBase
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if(Object.is(tag, "all-portlet") && Object.is(action,'loadmodel')){
this.calcUIActionAuthState(data);
}
if (!Object.is(tag, this.name)) {
return;
}
const refs: any = this.$refs;
Object.keys(refs).forEach((_name: string) => {
this.viewState.next({ tag: _name, action: action, data: data });
});
});
}
}
/**
* vue 生命周期
*
* @memberof AppMenuBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof AppMenuBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof AppMenuBase
*/
public calcUIActionAuthState(data:any = {}) {
// 如果是操作栏,不计算权限
if(this.portletType && Object.is('actionbar', this.portletType)) {
return;
}
let _this: any = this;
let uiservice: any = _this.appUIService ? _this.appUIService : new UIService(_this.$store);
if(_this.uiactionModel){
ViewTool.calcActionItemAuthState(data,_this.uiactionModel,uiservice);
}
}
}
</script>
<style lang='less'>
@import './app-menu-portlet.less';
</style>
/**
* AppMenu 部件模型
*
* @export
* @class AppMenuModel
*/
export default class AppMenuModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof AppMenuModel
*/
public getDataItems(): any[] {
return [
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* AppMenu 部件服务对象
*
* @export
* @class AppMenuService
*/
export default class AppMenuService extends ControlService {
}
// this is less
.portlet{
height: 100%;
width: 100%;
> .portlet-title{
padding: 14px 16px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
height: 52px;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
justify-content: space-between;
width:100%;
line-height: 22px;
font-size: 16px;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #304265;
font-weight: 600;
i{
margin-right: 5px;
}
>.portlet-action{
margin-left: 12px;
font-size: 14px;
>a{
padding: 6px;
}
}
}
> .divider {
margin: 0px 0px 11px 0px;
}
> .portlet-with-title{
width:100%;
height:calc(100% - 58px);
overflow:auto;
padding:0px 12px;
}
> .portlet-without-title{
width:100%;
height:100%;
overflow:auto;
padding:0px 12px;
}
.app-charts{
height: 100%!important;
}
.toolbar-container {
button{
margin: 6px 0px 4px 16px;
}
.ivu-badge{
.ivu-badge-count{
top: 0;
}
}
}
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import AppMenuBase from './app-menu-portlet-base.vue';
import view_db_appmenu1_appmenu from '@widgets/app/app-menu-appmenu/app-menu-appmenu.vue';
@Component({
components: {
view_db_appmenu1_appmenu,
}
})
export default class AppMenu extends AppMenuBase {
}
</script>
......@@ -9,6 +9,24 @@
<span>
<div class='portlet-container db-container1 ' :style="{}">
<row>
<i-col :md="{ span: 24, offset: 0 }">
<div class="portlet-without-title">
<card class="portlet-card custom-card" :bordered="false" dis-hover :padding="10">
<span>
<view_db_appmenu1
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:height="0"
:width="0"
name="db_appmenu1"
ref='db_appmenu1'
@closeview="closeView($event)">
</view_db_appmenu1>
</span>
</card>
</div>
</i-col>
</row>
</div>
</span>
......
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import AppPortalView2_dbBase from './app-portal-view2-db-dashboard-base.vue';
import view_db_appmenu1 from '@widgets/app/app-menu-portlet/app-menu-portlet.vue';
@Component({
components: {
view_db_appmenu1,
}
})
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册