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

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

上级 45a87e1e
<template>
<div class='portlet dashboard-viewdashboard-rawitem1 ' :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 IBIZOrderService from '@/service/ibizorder/ibizorder-service';
import DashboardViewdashboard_rawitem1Service from './dashboard-viewdashboard-rawitem1-portlet-service';
import IBIZOrderUIService from '@/uiservice/ibizorder/ibizorder-ui-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class IBIZOrderDashboardViewdashboard_rawitem1Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof DashboardViewdashboard_rawitem1Base
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof DashboardViewdashboard_rawitem1Base
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof DashboardViewdashboard_rawitem1Base
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof DashboardViewdashboard_rawitem1Base
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof DashboardViewdashboard_rawitem1Base
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof DashboardViewdashboard_rawitem1Base
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof DashboardViewdashboard_rawitem1Base
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {DashboardViewdashboard_rawitem1Service}
* @memberof DashboardViewdashboard_rawitem1Base
*/
public service: DashboardViewdashboard_rawitem1Service = new DashboardViewdashboard_rawitem1Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof DashboardViewdashboard_rawitem1Base
*/
public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store });
/**
* 界面UI服务对象
*
* @type {IBIZOrderUIService}
* @memberof DashboardViewdashboard_rawitem1Base
*/
public appUIService:IBIZOrderUIService = new IBIZOrderUIService(this.$store);
/**
* 关闭视图
*
* @param {any} args
* @memberof DashboardViewdashboard_rawitem1Base
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof DashboardViewdashboard_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 DashboardViewdashboard_rawitem1Base
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof DashboardViewdashboard_rawitem1Base
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof DashboardViewdashboard_rawitem1Base
*/
public portletType: string = 'rawitem';
/**
* 视图默认使用
*
* @type {string}
* @memberof DashboardViewdashboard_rawitem1Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof DashboardViewdashboard_rawitem1Base
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof DashboardViewdashboard_rawitem1Base
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof DashboardViewdashboard_rawitem1Base
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof DashboardViewdashboard_rawitem1Base
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof DashboardViewdashboard_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 DashboardViewdashboard_rawitem1Base
*/
public refresh(args?: any) {
}
/**
* vue 生命周期
*
* @memberof DashboardViewdashboard_rawitem1Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof DashboardViewdashboard_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 DashboardViewdashboard_rawitem1Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof DashboardViewdashboard_rawitem1Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof DashboardViewdashboard_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 './dashboard-viewdashboard-rawitem1-portlet.less';
</style>
/**
* DashboardViewdashboard_rawitem1 部件模型
*
* @export
* @class DashboardViewdashboard_rawitem1Model
*/
export default class DashboardViewdashboard_rawitem1Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DashboardViewdashboard_rawitem1Model
*/
public getDataItems(): any[] {
return [
{
name: 'tp',
},
{
name: 'endtime',
},
{
name: 'wfstate',
},
{
name: 'createdate',
},
{
name: 'opinion',
},
{
name: 'updatedate',
},
{
name: 'ordertype',
},
{
name: 'detailnum',
},
{
name: 'wfinstanceid',
},
{
name: 'amount',
},
{
name: 'orderuid',
},
{
name: 'ibizorder',
prop: 'ibizorderid',
},
{
name: 'orderstate',
},
{
name: 'starttime',
},
{
name: 'updateman',
},
{
name: 'wfstep',
},
{
name: 'createman',
},
{
name: 'ibizordername',
},
{
name: 'ordertime',
},
{
name: 'memo',
},
{
name: 'ibizcustomername',
},
{
name: 'ibizcustomerid',
},
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* DashboardViewdashboard_rawitem1 部件服务对象
*
* @export
* @class DashboardViewdashboard_rawitem1Service
*/
export default class DashboardViewdashboard_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;
}
}
}
> .divider {
margin: 0px 0px 11px 0px;
}
> .portlet-with-title{
width:100%;
height:calc(100% - 52px);
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 IBIZOrderDashboardViewdashboard_rawitem1Base from './dashboard-viewdashboard-rawitem1-portlet-base.vue';
@Component({
components: {
}
})
export default class IBIZOrderDashboardViewdashboard_rawitem1 extends IBIZOrderDashboardViewdashboard_rawitem1Base {
}
</script>
<template>
<div class='portlet dashboard-viewdashboard-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 IBIZOrderService from '@/service/ibizorder/ibizorder-service';
import DashboardViewdashboard_rawitem2Service from './dashboard-viewdashboard-rawitem2-portlet-service';
import IBIZOrderUIService from '@/uiservice/ibizorder/ibizorder-ui-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class IBIZOrderDashboardViewdashboard_rawitem2Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof DashboardViewdashboard_rawitem2Base
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof DashboardViewdashboard_rawitem2Base
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof DashboardViewdashboard_rawitem2Base
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof DashboardViewdashboard_rawitem2Base
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof DashboardViewdashboard_rawitem2Base
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof DashboardViewdashboard_rawitem2Base
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof DashboardViewdashboard_rawitem2Base
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {DashboardViewdashboard_rawitem2Service}
* @memberof DashboardViewdashboard_rawitem2Base
*/
public service: DashboardViewdashboard_rawitem2Service = new DashboardViewdashboard_rawitem2Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof DashboardViewdashboard_rawitem2Base
*/
public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store });
/**
* 界面UI服务对象
*
* @type {IBIZOrderUIService}
* @memberof DashboardViewdashboard_rawitem2Base
*/
public appUIService:IBIZOrderUIService = new IBIZOrderUIService(this.$store);
/**
* 关闭视图
*
* @param {any} args
* @memberof DashboardViewdashboard_rawitem2Base
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof DashboardViewdashboard_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 DashboardViewdashboard_rawitem2Base
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof DashboardViewdashboard_rawitem2Base
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof DashboardViewdashboard_rawitem2Base
*/
public portletType: string = 'rawitem';
/**
* 视图默认使用
*
* @type {string}
* @memberof DashboardViewdashboard_rawitem2Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof DashboardViewdashboard_rawitem2Base
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof DashboardViewdashboard_rawitem2Base
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof DashboardViewdashboard_rawitem2Base
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof DashboardViewdashboard_rawitem2Base
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof DashboardViewdashboard_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 DashboardViewdashboard_rawitem2Base
*/
public refresh(args?: any) {
}
/**
* vue 生命周期
*
* @memberof DashboardViewdashboard_rawitem2Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof DashboardViewdashboard_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 DashboardViewdashboard_rawitem2Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof DashboardViewdashboard_rawitem2Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof DashboardViewdashboard_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 './dashboard-viewdashboard-rawitem2-portlet.less';
</style>
/**
* DashboardViewdashboard_rawitem2 部件模型
*
* @export
* @class DashboardViewdashboard_rawitem2Model
*/
export default class DashboardViewdashboard_rawitem2Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DashboardViewdashboard_rawitem2Model
*/
public getDataItems(): any[] {
return [
{
name: 'tp',
},
{
name: 'endtime',
},
{
name: 'wfstate',
},
{
name: 'createdate',
},
{
name: 'opinion',
},
{
name: 'updatedate',
},
{
name: 'ordertype',
},
{
name: 'detailnum',
},
{
name: 'wfinstanceid',
},
{
name: 'amount',
},
{
name: 'orderuid',
},
{
name: 'ibizorder',
prop: 'ibizorderid',
},
{
name: 'orderstate',
},
{
name: 'starttime',
},
{
name: 'updateman',
},
{
name: 'wfstep',
},
{
name: 'createman',
},
{
name: 'ibizordername',
},
{
name: 'ordertime',
},
{
name: 'memo',
},
{
name: 'ibizcustomername',
},
{
name: 'ibizcustomerid',
},
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* DashboardViewdashboard_rawitem2 部件服务对象
*
* @export
* @class DashboardViewdashboard_rawitem2Service
*/
export default class DashboardViewdashboard_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% - 52px);
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 IBIZOrderDashboardViewdashboard_rawitem2Base from './dashboard-viewdashboard-rawitem2-portlet-base.vue';
@Component({
components: {
}
})
export default class IBIZOrderDashboardViewdashboard_rawitem2 extends IBIZOrderDashboardViewdashboard_rawitem2Base {
}
</script>
<template>
<div class='portlet dashboard-viewdashboard-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 IBIZOrderService from '@/service/ibizorder/ibizorder-service';
import DashboardViewdashboard_rawitem3Service from './dashboard-viewdashboard-rawitem3-portlet-service';
import IBIZOrderUIService from '@/uiservice/ibizorder/ibizorder-ui-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class IBIZOrderDashboardViewdashboard_rawitem3Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof DashboardViewdashboard_rawitem3Base
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof DashboardViewdashboard_rawitem3Base
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof DashboardViewdashboard_rawitem3Base
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof DashboardViewdashboard_rawitem3Base
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof DashboardViewdashboard_rawitem3Base
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof DashboardViewdashboard_rawitem3Base
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof DashboardViewdashboard_rawitem3Base
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {DashboardViewdashboard_rawitem3Service}
* @memberof DashboardViewdashboard_rawitem3Base
*/
public service: DashboardViewdashboard_rawitem3Service = new DashboardViewdashboard_rawitem3Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof DashboardViewdashboard_rawitem3Base
*/
public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store });
/**
* 界面UI服务对象
*
* @type {IBIZOrderUIService}
* @memberof DashboardViewdashboard_rawitem3Base
*/
public appUIService:IBIZOrderUIService = new IBIZOrderUIService(this.$store);
/**
* 关闭视图
*
* @param {any} args
* @memberof DashboardViewdashboard_rawitem3Base
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof DashboardViewdashboard_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 DashboardViewdashboard_rawitem3Base
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof DashboardViewdashboard_rawitem3Base
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof DashboardViewdashboard_rawitem3Base
*/
public portletType: string = 'rawitem';
/**
* 视图默认使用
*
* @type {string}
* @memberof DashboardViewdashboard_rawitem3Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof DashboardViewdashboard_rawitem3Base
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof DashboardViewdashboard_rawitem3Base
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof DashboardViewdashboard_rawitem3Base
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof DashboardViewdashboard_rawitem3Base
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof DashboardViewdashboard_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 DashboardViewdashboard_rawitem3Base
*/
public refresh(args?: any) {
}
/**
* vue 生命周期
*
* @memberof DashboardViewdashboard_rawitem3Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof DashboardViewdashboard_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 DashboardViewdashboard_rawitem3Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof DashboardViewdashboard_rawitem3Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof DashboardViewdashboard_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 './dashboard-viewdashboard-rawitem3-portlet.less';
</style>
/**
* DashboardViewdashboard_rawitem3 部件模型
*
* @export
* @class DashboardViewdashboard_rawitem3Model
*/
export default class DashboardViewdashboard_rawitem3Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DashboardViewdashboard_rawitem3Model
*/
public getDataItems(): any[] {
return [
{
name: 'tp',
},
{
name: 'endtime',
},
{
name: 'wfstate',
},
{
name: 'createdate',
},
{
name: 'opinion',
},
{
name: 'updatedate',
},
{
name: 'ordertype',
},
{
name: 'detailnum',
},
{
name: 'wfinstanceid',
},
{
name: 'amount',
},
{
name: 'orderuid',
},
{
name: 'ibizorder',
prop: 'ibizorderid',
},
{
name: 'orderstate',
},
{
name: 'starttime',
},
{
name: 'updateman',
},
{
name: 'wfstep',
},
{
name: 'createman',
},
{
name: 'ibizordername',
},
{
name: 'ordertime',
},
{
name: 'memo',
},
{
name: 'ibizcustomername',
},
{
name: 'ibizcustomerid',
},
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* DashboardViewdashboard_rawitem3 部件服务对象
*
* @export
* @class DashboardViewdashboard_rawitem3Service
*/
export default class DashboardViewdashboard_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% - 52px);
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 IBIZOrderDashboardViewdashboard_rawitem3Base from './dashboard-viewdashboard-rawitem3-portlet-base.vue';
@Component({
components: {
}
})
export default class IBIZOrderDashboardViewdashboard_rawitem3 extends IBIZOrderDashboardViewdashboard_rawitem3Base {
}
</script>
......@@ -319,7 +319,7 @@ export default class IBIZOrderPortalComponentsOperationBase extends Vue implemen
return this.height+'px';
}
}else{
return '200px';
return '100px';
}
}
......
<template>
<div class='portlet portal-components-web portal-components-image' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,'width': isAdaptiveSize ? 'calc(100% - 16px)' : (width ? width+'px' :'650px')}">
<div class='portlet portal-components-web ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,'width': isAdaptiveSize ? 'calc(100% - 16px)' : (width ? width+'px' :'650px')}">
<div class="portlet-without-title">
<iframe src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3440461761,3100272262&fm=26&gp=0.jpg" style="height: 310px;width: 100%;border-width: 1px;"></iframe>
</div>
......
......@@ -9,7 +9,61 @@
<span>
<div class='portlet-container dashboard-viewdashboard-container1 ' :style="{}">
<row>
<i-col :md="{ span: 24, offset: 0 }" :lg="{ span: 24, offset: 0 }">
<i-col :md="{ span: 24, offset: 0 }" :lg="{ span: 6, offset: 0 }">
<div class="portlet-without-title">
<card class="portlet-card custom-card" :bordered="false" dis-hover :padding="10">
<span>
<view_dashboard_rawitem1
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:height="100"
:width="0"
name="dashboard_rawitem1"
ref='dashboard_rawitem1'
@closeview="closeView($event)">
</view_dashboard_rawitem1>
</span>
</card>
</div>
</i-col>
<i-col :md="{ span: 24, offset: 0 }" :lg="{ span: 6, offset: 0 }">
<div class="portlet-without-title">
<card class="portlet-card custom-card" :bordered="false" dis-hover :padding="10">
<span>
<view_dashboard_rawitem2
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:height="100"
:width="0"
name="dashboard_rawitem2"
ref='dashboard_rawitem2'
@closeview="closeView($event)">
</view_dashboard_rawitem2>
</span>
</card>
</div>
</i-col>
<i-col :md="{ span: 24, offset: 0 }" :lg="{ span: 6, offset: 0 }">
<div class="portlet-without-title">
<card class="portlet-card custom-card" :bordered="false" dis-hover :padding="10">
<span>
<view_dashboard_rawitem3
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:height="100"
:width="0"
name="dashboard_rawitem3"
ref='dashboard_rawitem3'
@closeview="closeView($event)">
</view_dashboard_rawitem3>
</span>
</card>
</div>
</i-col>
<i-col :md="{ span: 24, offset: 0 }" :lg="{ span: 6, offset: 0 }">
<div class="portlet-without-title">
<card class="portlet-card custom-card" :bordered="false" dis-hover :padding="10">
<span>
......@@ -17,7 +71,7 @@
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:height="200"
:height="100"
:width="0"
name="dashboard_sysportlet3"
ref='dashboard_sysportlet3'
......
......@@ -25,19 +25,3 @@
}
// this is less
.portal-components-image {
.portal-components-web{
>.portlet-without-title{
iframe{
html{
body{
img{
width: 100%;
height: 100%;
}
}
}
}
}
}
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import UsrBase from './usr-dashboard-base.vue';
import view_dashboard_rawitem3 from '@widgets/ibizorder/dashboard-viewdashboard-rawitem3-portlet/dashboard-viewdashboard-rawitem3-portlet.vue';
import view_dashboard_rawitem2 from '@widgets/ibizorder/dashboard-viewdashboard-rawitem2-portlet/dashboard-viewdashboard-rawitem2-portlet.vue';
import view_dashboard_rawitem1 from '@widgets/ibizorder/dashboard-viewdashboard-rawitem1-portlet/dashboard-viewdashboard-rawitem1-portlet.vue';
import view_dashboard_sysportlet5 from '@widgets/ibizorder/portal-components-web-portlet/portal-components-web-portlet.vue';
import view_dashboard_sysportlet2 from '@widgets/ibizorder-detail/portal-components-list-view-portlet/portal-components-list-view-portlet.vue';
import view_dashboard_sysportlet3 from '@widgets/ibizorder/portal-components-operation-portlet/portal-components-operation-portlet.vue';
......@@ -9,6 +12,9 @@ import view_dashboard_sysportlet1 from '@widgets/ibizorder-detail/portal-compone
@Component({
components: {
view_dashboard_rawitem3,
view_dashboard_rawitem2,
view_dashboard_rawitem1,
view_dashboard_sysportlet5,
view_dashboard_sysportlet2,
view_dashboard_sysportlet3,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册