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

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

上级 cfce44f8
......@@ -152,6 +152,10 @@ export default {
caption: "R7 Vue示例",
title: "",
},
appportalview: {
caption: "",
title: "应用门户视图",
},
apppanelview: {
caption: "",
title: "应用面板视图",
......
......@@ -152,6 +152,10 @@ export default {
caption: "R7 Vue示例",
title: "",
},
appportalview: {
caption: "",
title: "应用门户视图",
},
apppanelview: {
caption: "",
title: "应用面板视图",
......
......@@ -1881,7 +1881,7 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
appfunctag: 'AppFunc66',
resourcetag: '',
},
],
......
......@@ -136,6 +136,7 @@ export const PageComponents = {
Vue.component('ibizorder-detail-f6-edit-view', () => import('@pages/sample/ibizorder-detail-f6-edit-view/ibizorder-detail-f6-edit-view.vue'));
Vue.component('ibizbookusr4-grid-view', () => import('@pages/sample/ibizbookusr4-grid-view/ibizbookusr4-grid-view.vue'));
Vue.component('ibizbookusr2-medit-view9', () => import('@pages/sample/ibizbookusr2-medit-view9/ibizbookusr2-medit-view9.vue'));
Vue.component('app-portal-view', () => import('@pages/ungroup/app-portal-view/app-portal-view.vue'));
Vue.component('ibizorder-sedit-view3', () => import('@pages/sample/ibizorder-sedit-view3/ibizorder-sedit-view3.vue'));
Vue.component('ibizorder-odsp-d10-wfgrid-view', () => import('@pages/sample/ibizorder-odsp-d10-wfgrid-view/ibizorder-odsp-d10-wfgrid-view.vue'));
Vue.component('ibizbookinternal-func-grid-view', () => import('@pages/sample/ibizbookinternal-func-grid-view/ibizbookinternal-func-grid-view.vue'));
......
......@@ -2179,6 +2179,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizbookusr2-medit-view9/ibizbookusr2-medit-view9.vue'),
},
{
path: 'appportalview/:appportalview?',
meta: {
caption: 'app.views.appportalview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'appportalview', parameterName: 'appportalview' },
],
requireAuth: true,
},
component: () => import('@pages/ungroup/app-portal-view/app-portal-view.vue'),
},
{
path: 'ibizorders/:ibizorder?/seditview3/:seditview3?',
meta: {
......@@ -5283,6 +5296,18 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-sf15-grid-view/ibizorder-sf15-grid-view.vue'),
},
{
path: '/appportalview/:appportalview?',
meta: {
caption: 'app.views.appportalview.caption',
info:'',
parameters: [
{ pathName: 'appportalview', parameterName: 'appportalview' },
],
requireAuth: true,
},
component: () => import('@pages/ungroup/app-portal-view/app-portal-view.vue'),
},
{
path: '/apppanelview/:apppanelview?',
meta: {
......
.app-portal-view{
position: relative;
}
.app-portal-view{
display: block;
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import AppPortalViewBase from './app-portal-view-base.vue';
import view_dashboard from '@widgets/app/app-portal-view-db-dashboard/app-portal-view-db-dashboard.vue';
@Component({
components: {
view_dashboard,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class AppPortalView extends AppPortalViewBase {
}
</script>
\ No newline at end of file
......@@ -236,8 +236,8 @@ export const viewstate: any = {
'd3321077dfab8bc6b92c649e5b69daf3',
'e54ae8e27a53b3425ac78a229a163bd5',
'836bdb4063978b55fedd6a180d60c323',
'794fbfb192285c60dc9ce640270d79c0',
'369a14f21cbff0d0fe23831aecfca7ba',
'794fbfb192285c60dc9ce640270d79c0',
'a894de140705ecab2f39797d2922a3ce',
'ea604a66caf499c70c9002a917dd1694',
'4981c4ae8facb75582f8dcbc51850318',
......@@ -274,6 +274,7 @@ export const viewstate: any = {
'9f80ed66360fbbb9bc57c575fdd8814f',
'94e6694a65d9cacb171b6e0b581216ba',
'5686558064d641b7ff599746970461cd',
'06E447F9-1AF8-464F-8F47-39CFC64B9A21',
'3bbf72a3e5b59fed0dee362a9b1384a8',
'f73da4cb47a88d3fe5b92716e0137741',
'fdb8ed39fbfea00f65416b9aaebd64e7',
......@@ -1900,6 +1901,15 @@ export const viewstate: any = {
'2cd3a77cbd2aad4551b7a6a009419d52',
],
},
{
viewtag: '06E447F9-1AF8-464F-8F47-39CFC64B9A21',
viewmodule: 'Ungroup',
viewname: 'AppPortalView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '694422a6002b5b601257dbc5340c01bd',
viewmodule: 'Ungroup',
......
/**
* AppPortalView_db 部件模型
*
* @export
* @class AppPortalView_dbModel
*/
export default class AppPortalView_dbModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof AppPortalView_dbModel
*/
public getDataItems(): any[] {
return [
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* AppPortalView_db 部件服务对象
*
* @export
* @class AppPortalView_dbService
*/
export default class AppPortalView_dbService extends ControlService {
}
\ No newline at end of file
.dashboard {
flex-grow: 1;
height: 100%;
overflow: auto;
.portlet-without-title{
width: 100%;
}
.ivu-row{
.ivu-card{
.ivu-card-head{
border-bottom:0;
p{
display: flex;
height: 24px;
align-items: center;
.line{
width:100%;
border-bottom: 1px solid #e8eaec;
margin-left: 14px;
}
}
}
}
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import AppPortalView_dbBase from './app-portal-view-db-dashboard-base.vue';
import view_db_rawitem1 from '@widgets/app/db-rawitem1-portlet/db-rawitem1-portlet.vue';
import view_db_rawitem6 from '@widgets/app/db-rawitem6-portlet/db-rawitem6-portlet.vue';
import view_db_rawitem4 from '@widgets/app/db-rawitem4-portlet/db-rawitem4-portlet.vue';
import view_db_rawitem5 from '@widgets/app/db-rawitem5-portlet/db-rawitem5-portlet.vue';
import view_db_rawitem2 from '@widgets/app/db-rawitem2-portlet/db-rawitem2-portlet.vue';
import view_db_rawitem3 from '@widgets/app/db-rawitem3-portlet/db-rawitem3-portlet.vue';
@Component({
components: {
view_db_rawitem1,
view_db_rawitem6,
view_db_rawitem4,
view_db_rawitem5,
view_db_rawitem2,
view_db_rawitem3,
}
})
export default class AppPortalView_db extends AppPortalView_dbBase {
}
</script>
\ No newline at end of file
<template>
<div class='portlet db-rawitem1 ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<div class="portlet-without-title">
<app-rawitem
:viewparams="viewparams"
:context="context"
contentStyle=""
sizeStyle="height: 100px;"
contentType="RAW"
:htmlContent='``'
>
</app-rawitem>
</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 Db_rawitem1Service from './db-rawitem1-portlet-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class Db_rawitem1Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Db_rawitem1Base
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Db_rawitem1Base
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Db_rawitem1Base
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof Db_rawitem1Base
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Db_rawitem1Base
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Db_rawitem1Base
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Db_rawitem1Base
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {Db_rawitem1Service}
* @memberof Db_rawitem1Base
*/
public service: Db_rawitem1Service = new Db_rawitem1Service({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof Db_rawitem1Base
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Db_rawitem1Base
*/
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 Db_rawitem1Base
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof Db_rawitem1Base
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof Db_rawitem1Base
*/
public portletType: string = 'rawitem';
/**
* 视图默认使用
*
* @type {string}
* @memberof Db_rawitem1Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof Db_rawitem1Base
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof Db_rawitem1Base
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Db_rawitem1Base
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Db_rawitem1Base
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof Db_rawitem1Base
*/
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 '100px';
}
}
/**
* 刷新
*
* @memberof Db_rawitem1Base
*/
public refresh(args?: any) {
}
/**
* vue 生命周期
*
* @memberof Db_rawitem1Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Db_rawitem1Base
*/
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 Db_rawitem1Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Db_rawitem1Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof Db_rawitem1Base
*/
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 './db-rawitem1-portlet.less';
</style>
/**
* Db_rawitem1 部件模型
*
* @export
* @class Db_rawitem1Model
*/
export default class Db_rawitem1Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Db_rawitem1Model
*/
public getDataItems(): any[] {
return [
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Db_rawitem1 部件服务对象
*
* @export
* @class Db_rawitem1Service
*/
export default class Db_rawitem1Service 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;
}
}
}
> .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 Db_rawitem1Base from './db-rawitem1-portlet-base.vue';
@Component({
components: {
}
})
export default class Db_rawitem1 extends Db_rawitem1Base {
}
</script>
<template>
<div class='portlet db-rawitem2 ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<p class='portlet-title'>
<span>
</span>
</p>
<el-divider class="divider"></el-divider>
<div class="portlet-with-title">
<app-rawitem
:viewparams="viewparams"
:context="context"
contentStyle=""
sizeStyle="height: 100px;"
contentType="RAW"
:htmlContent='``'
>
</app-rawitem>
</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 Db_rawitem2Service from './db-rawitem2-portlet-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class Db_rawitem2Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Db_rawitem2Base
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Db_rawitem2Base
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Db_rawitem2Base
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof Db_rawitem2Base
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Db_rawitem2Base
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Db_rawitem2Base
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Db_rawitem2Base
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {Db_rawitem2Service}
* @memberof Db_rawitem2Base
*/
public service: Db_rawitem2Service = new Db_rawitem2Service({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof Db_rawitem2Base
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Db_rawitem2Base
*/
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 Db_rawitem2Base
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof Db_rawitem2Base
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof Db_rawitem2Base
*/
public portletType: string = 'rawitem';
/**
* 视图默认使用
*
* @type {string}
* @memberof Db_rawitem2Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof Db_rawitem2Base
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof Db_rawitem2Base
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Db_rawitem2Base
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Db_rawitem2Base
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof Db_rawitem2Base
*/
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 '100px';
}
}
/**
* 刷新
*
* @memberof Db_rawitem2Base
*/
public refresh(args?: any) {
}
/**
* vue 生命周期
*
* @memberof Db_rawitem2Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Db_rawitem2Base
*/
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 Db_rawitem2Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Db_rawitem2Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof Db_rawitem2Base
*/
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 './db-rawitem2-portlet.less';
</style>
/**
* Db_rawitem2 部件模型
*
* @export
* @class Db_rawitem2Model
*/
export default class Db_rawitem2Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Db_rawitem2Model
*/
public getDataItems(): any[] {
return [
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Db_rawitem2 部件服务对象
*
* @export
* @class Db_rawitem2Service
*/
export default class Db_rawitem2Service 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 Db_rawitem2Base from './db-rawitem2-portlet-base.vue';
@Component({
components: {
}
})
export default class Db_rawitem2 extends Db_rawitem2Base {
}
</script>
<template>
<div class='portlet db-rawitem3 ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<p class='portlet-title'>
<span>
</span>
</p>
<el-divider class="divider"></el-divider>
<div class="portlet-with-title">
<app-rawitem
:viewparams="viewparams"
:context="context"
contentStyle=""
sizeStyle="height: 100px;"
contentType="RAW"
:htmlContent='``'
>
</app-rawitem>
</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 Db_rawitem3Service from './db-rawitem3-portlet-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class Db_rawitem3Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Db_rawitem3Base
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Db_rawitem3Base
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Db_rawitem3Base
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof Db_rawitem3Base
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Db_rawitem3Base
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Db_rawitem3Base
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Db_rawitem3Base
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {Db_rawitem3Service}
* @memberof Db_rawitem3Base
*/
public service: Db_rawitem3Service = new Db_rawitem3Service({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof Db_rawitem3Base
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Db_rawitem3Base
*/
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 Db_rawitem3Base
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof Db_rawitem3Base
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof Db_rawitem3Base
*/
public portletType: string = 'rawitem';
/**
* 视图默认使用
*
* @type {string}
* @memberof Db_rawitem3Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof Db_rawitem3Base
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof Db_rawitem3Base
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Db_rawitem3Base
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Db_rawitem3Base
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof Db_rawitem3Base
*/
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 '100px';
}
}
/**
* 刷新
*
* @memberof Db_rawitem3Base
*/
public refresh(args?: any) {
}
/**
* vue 生命周期
*
* @memberof Db_rawitem3Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Db_rawitem3Base
*/
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 Db_rawitem3Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Db_rawitem3Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof Db_rawitem3Base
*/
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 './db-rawitem3-portlet.less';
</style>
/**
* Db_rawitem3 部件模型
*
* @export
* @class Db_rawitem3Model
*/
export default class Db_rawitem3Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Db_rawitem3Model
*/
public getDataItems(): any[] {
return [
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Db_rawitem3 部件服务对象
*
* @export
* @class Db_rawitem3Service
*/
export default class Db_rawitem3Service 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 Db_rawitem3Base from './db-rawitem3-portlet-base.vue';
@Component({
components: {
}
})
export default class Db_rawitem3 extends Db_rawitem3Base {
}
</script>
<template>
<div class='portlet db-rawitem4 ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<p class='portlet-title'>
<span>
</span>
</p>
<el-divider class="divider"></el-divider>
<div class="portlet-with-title">
<app-rawitem
:viewparams="viewparams"
:context="context"
contentStyle=""
sizeStyle="height: 100px;"
contentType="RAW"
:htmlContent='``'
>
</app-rawitem>
</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 Db_rawitem4Service from './db-rawitem4-portlet-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class Db_rawitem4Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Db_rawitem4Base
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Db_rawitem4Base
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Db_rawitem4Base
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof Db_rawitem4Base
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Db_rawitem4Base
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Db_rawitem4Base
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Db_rawitem4Base
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {Db_rawitem4Service}
* @memberof Db_rawitem4Base
*/
public service: Db_rawitem4Service = new Db_rawitem4Service({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof Db_rawitem4Base
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Db_rawitem4Base
*/
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 Db_rawitem4Base
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof Db_rawitem4Base
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof Db_rawitem4Base
*/
public portletType: string = 'rawitem';
/**
* 视图默认使用
*
* @type {string}
* @memberof Db_rawitem4Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof Db_rawitem4Base
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof Db_rawitem4Base
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Db_rawitem4Base
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Db_rawitem4Base
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof Db_rawitem4Base
*/
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 '100px';
}
}
/**
* 刷新
*
* @memberof Db_rawitem4Base
*/
public refresh(args?: any) {
}
/**
* vue 生命周期
*
* @memberof Db_rawitem4Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Db_rawitem4Base
*/
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 Db_rawitem4Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Db_rawitem4Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof Db_rawitem4Base
*/
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 './db-rawitem4-portlet.less';
</style>
/**
* Db_rawitem4 部件模型
*
* @export
* @class Db_rawitem4Model
*/
export default class Db_rawitem4Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Db_rawitem4Model
*/
public getDataItems(): any[] {
return [
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Db_rawitem4 部件服务对象
*
* @export
* @class Db_rawitem4Service
*/
export default class Db_rawitem4Service 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 Db_rawitem4Base from './db-rawitem4-portlet-base.vue';
@Component({
components: {
}
})
export default class Db_rawitem4 extends Db_rawitem4Base {
}
</script>
<template>
<div class='portlet db-rawitem5 ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<div class="portlet-without-title">
<app-rawitem
:viewparams="viewparams"
:context="context"
contentStyle=""
sizeStyle="height: 400px;"
contentType="RAW"
:htmlContent='``'
>
</app-rawitem>
</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 Db_rawitem5Service from './db-rawitem5-portlet-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class Db_rawitem5Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Db_rawitem5Base
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Db_rawitem5Base
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Db_rawitem5Base
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof Db_rawitem5Base
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Db_rawitem5Base
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Db_rawitem5Base
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Db_rawitem5Base
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {Db_rawitem5Service}
* @memberof Db_rawitem5Base
*/
public service: Db_rawitem5Service = new Db_rawitem5Service({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof Db_rawitem5Base
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Db_rawitem5Base
*/
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 Db_rawitem5Base
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof Db_rawitem5Base
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof Db_rawitem5Base
*/
public portletType: string = 'rawitem';
/**
* 视图默认使用
*
* @type {string}
* @memberof Db_rawitem5Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof Db_rawitem5Base
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof Db_rawitem5Base
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Db_rawitem5Base
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Db_rawitem5Base
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof Db_rawitem5Base
*/
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 '400px';
}
}
/**
* 刷新
*
* @memberof Db_rawitem5Base
*/
public refresh(args?: any) {
}
/**
* vue 生命周期
*
* @memberof Db_rawitem5Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Db_rawitem5Base
*/
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 Db_rawitem5Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Db_rawitem5Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof Db_rawitem5Base
*/
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 './db-rawitem5-portlet.less';
</style>
/**
* Db_rawitem5 部件模型
*
* @export
* @class Db_rawitem5Model
*/
export default class Db_rawitem5Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Db_rawitem5Model
*/
public getDataItems(): any[] {
return [
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Db_rawitem5 部件服务对象
*
* @export
* @class Db_rawitem5Service
*/
export default class Db_rawitem5Service 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;
}
}
}
> .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 Db_rawitem5Base from './db-rawitem5-portlet-base.vue';
@Component({
components: {
}
})
export default class Db_rawitem5 extends Db_rawitem5Base {
}
</script>
<template>
<div class='portlet db-rawitem6 ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<p class='portlet-title'>
<span>
</span>
</p>
<el-divider class="divider"></el-divider>
<div class="portlet-with-title">
<app-rawitem
:viewparams="viewparams"
:context="context"
contentStyle=""
sizeStyle="height: 400px;"
contentType="RAW"
:htmlContent='``'
>
</app-rawitem>
</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 Db_rawitem6Service from './db-rawitem6-portlet-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class Db_rawitem6Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Db_rawitem6Base
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Db_rawitem6Base
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Db_rawitem6Base
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof Db_rawitem6Base
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Db_rawitem6Base
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Db_rawitem6Base
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Db_rawitem6Base
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {Db_rawitem6Service}
* @memberof Db_rawitem6Base
*/
public service: Db_rawitem6Service = new Db_rawitem6Service({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof Db_rawitem6Base
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Db_rawitem6Base
*/
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 Db_rawitem6Base
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof Db_rawitem6Base
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof Db_rawitem6Base
*/
public portletType: string = 'rawitem';
/**
* 视图默认使用
*
* @type {string}
* @memberof Db_rawitem6Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof Db_rawitem6Base
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof Db_rawitem6Base
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Db_rawitem6Base
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Db_rawitem6Base
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof Db_rawitem6Base
*/
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 '400px';
}
}
/**
* 刷新
*
* @memberof Db_rawitem6Base
*/
public refresh(args?: any) {
}
/**
* vue 生命周期
*
* @memberof Db_rawitem6Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Db_rawitem6Base
*/
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 Db_rawitem6Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Db_rawitem6Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof Db_rawitem6Base
*/
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 './db-rawitem6-portlet.less';
</style>
/**
* Db_rawitem6 部件模型
*
* @export
* @class Db_rawitem6Model
*/
export default class Db_rawitem6Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Db_rawitem6Model
*/
public getDataItems(): any[] {
return [
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Db_rawitem6 部件服务对象
*
* @export
* @class Db_rawitem6Service
*/
export default class Db_rawitem6Service 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 Db_rawitem6Base from './db-rawitem6-portlet-base.vue';
@Component({
components: {
}
})
export default class Db_rawitem6 extends Db_rawitem6Base {
}
</script>
......@@ -755,6 +755,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case 'AppFunc30':
this.clickAppFunc30(item);
return;
case 'AppFunc66':
this.clickAppFunc66(item);
return;
case 'AppFunc5':
this.clickAppFunc5(item);
return;
......@@ -2683,6 +2686,28 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 应用门户视图
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public clickAppFunc66(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'appportalview', parameterName: 'appportalview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/**
* 图书表格视图-更新默认值
*
......
......@@ -1986,7 +1986,7 @@ export default class MainMenuModel {
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
appfunctag: 'AppFunc66',
resourcetag: '',
authtag:'Web-MainMenu-menuitem148',
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册