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

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

上级 50adefb5
......@@ -245,6 +245,8 @@ export default {
menuitem116: "编辑视图(左右关系)",
menuitem117: "编辑视图(上下关系)",
menuitem118: "编辑视图(分页关系)",
menuitem125: "数据看板",
menuitem126: "实体数据看板",
menuitem5: "视图",
menuitem9: "列表视图",
menuitem19: "常规表格视图",
......
......@@ -245,6 +245,8 @@ export default {
menuitem116: "编辑视图(左右关系)",
menuitem117: "编辑视图(上下关系)",
menuitem118: "编辑视图(分页关系)",
menuitem125: "数据看板",
menuitem126: "实体数据看板",
menuitem5: "视图",
menuitem9: "列表视图",
menuitem19: "常规表格视图",
......
......@@ -914,33 +914,13 @@ export default {
tip: "Save And Close Window",
},
},
editview4toolbar_toolbar: {
},
listviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
deuiaction3: {
caption: "Edit",
tip: "Edit {0}",
},
deuiaction2: {
caption: "Remove",
tip: "Remove {0}",
},
deuiaction4: {
caption: "Filter",
tip: "Filter",
},
},
listviewlist_quicktoolbar_toolbar: {
dashboardviewdashboard_sysportlet2_list_quicktoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
},
listviewlist_batchtoolbar_toolbar: {
dashboardviewdashboard_sysportlet2_list_batchtoolbar_toolbar: {
deuiaction1: {
caption: "Edit",
tip: "Edit {0}",
......@@ -1008,6 +988,42 @@ export default {
tip: "数据导入",
},
},
editview4toolbar_toolbar: {
},
listviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
deuiaction3: {
caption: "Edit",
tip: "Edit {0}",
},
deuiaction2: {
caption: "Remove",
tip: "Remove {0}",
},
deuiaction4: {
caption: "Filter",
tip: "Filter",
},
},
listviewlist_quicktoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
},
listviewlist_batchtoolbar_toolbar: {
deuiaction1: {
caption: "Edit",
tip: "Edit {0}",
},
deuiaction2: {
caption: "Remove",
tip: "Remove {0}",
},
},
usr5gridviewtoolbar_toolbar: {
},
valuerulesgridviewtoolbar_toolbar: {
......@@ -1150,22 +1166,6 @@ export default {
},
haspanellistviewtoolbar_toolbar: {
},
dashboardviewdashboard_sysportlet2_list_quicktoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
},
dashboardviewdashboard_sysportlet2_list_batchtoolbar_toolbar: {
deuiaction1: {
caption: "Edit",
tip: "Edit {0}",
},
deuiaction2: {
caption: "Remove",
tip: "Remove {0}",
},
},
tree_treeview: {
nodata:"",
nodes: {
......
......@@ -913,33 +913,13 @@ export default {
tip: "保存并关闭",
},
},
editview4toolbar_toolbar: {
},
listviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
deuiaction3: {
caption: "编辑",
tip: "编辑",
},
deuiaction2: {
caption: "删除",
tip: "删除",
},
deuiaction4: {
caption: "过滤",
tip: "过滤",
},
},
listviewlist_quicktoolbar_toolbar: {
dashboardviewdashboard_sysportlet2_list_quicktoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
},
listviewlist_batchtoolbar_toolbar: {
dashboardviewdashboard_sysportlet2_list_batchtoolbar_toolbar: {
deuiaction1: {
caption: "编辑",
tip: "编辑",
......@@ -1007,6 +987,42 @@ export default {
tip: "数据导入",
},
},
editview4toolbar_toolbar: {
},
listviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
deuiaction3: {
caption: "编辑",
tip: "编辑",
},
deuiaction2: {
caption: "删除",
tip: "删除",
},
deuiaction4: {
caption: "过滤",
tip: "过滤",
},
},
listviewlist_quicktoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
},
listviewlist_batchtoolbar_toolbar: {
deuiaction1: {
caption: "编辑",
tip: "编辑",
},
deuiaction2: {
caption: "删除",
tip: "删除",
},
},
usr5gridviewtoolbar_toolbar: {
},
valuerulesgridviewtoolbar_toolbar: {
......@@ -1149,22 +1165,6 @@ export default {
},
haspanellistviewtoolbar_toolbar: {
},
dashboardviewdashboard_sysportlet2_list_quicktoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
},
dashboardviewdashboard_sysportlet2_list_batchtoolbar_toolbar: {
deuiaction1: {
caption: "编辑",
tip: "编辑",
},
deuiaction2: {
caption: "删除",
tip: "删除",
},
},
tree_treeview: {
nodata:"",
nodes: {
......
......@@ -464,6 +464,62 @@ export default {
},
},
usr3gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
deuiaction2: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
deuiaction3: {
caption: "Filter",
tip: "Filter",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
deuiaction1: {
caption: "导入",
tip: "导入",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
},
usr2editviewtoolbar_toolbar: {
tbitem3: {
......
......@@ -463,6 +463,62 @@ export default {
},
},
usr3gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
deuiaction2: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
deuiaction3: {
caption: "过滤",
tip: "过滤",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
deuiaction1: {
caption: "导入",
tip: "导入",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
},
usr2editviewtoolbar_toolbar: {
tbitem3: {
......
......@@ -1513,6 +1513,44 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
resourcetag: '',
},
],
},
{
id: 'AAFF4FF3-7C14-451F-B6D7-4980DF4FA146',
name: 'menuitem125',
text: '数据看板',
type: 'MENUITEM',
counterid: '',
tooltip: '数据看板',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
items: [
{
id: 'E9E999AF-66D4-4328-A847-03428F2652DA',
name: 'menuitem126',
text: '实体数据看板',
type: 'MENUITEM',
counterid: '',
tooltip: '实体数据看板',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc45',
resourcetag: '',
},
],
},
],
},
......
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZBOOKDashboardViewBase from './ibizbookdashboard-view-base.vue';
import view_dashboard from '@widgets/ibizbook/usr2-dashboard/usr2-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 IBIZBOOKDashboardView extends IBIZBOOKDashboardViewBase {
}
</script>
\ No newline at end of file
......@@ -16,4 +16,5 @@
// this is less
.deepskyblueToolBar {color:white !important;background-color:#108cee !important;}
......@@ -138,6 +138,7 @@ export const PageComponents = {
Vue.component('ibizsample0002-mpickup-view', () => import('@pages/sample/ibizsample0002-mpickup-view/ibizsample0002-mpickup-view.vue'));
Vue.component('ibizorder-sf7-edit-view', () => import('@pages/sample/ibizorder-sf7-edit-view/ibizorder-sf7-edit-view.vue'));
Vue.component('ibizbookedit-view', () => import('@pages/sample/ibizbookedit-view/ibizbookedit-view.vue'));
Vue.component('ibizbookdashboard-view', () => import('@pages/sample/ibizbookdashboard-view/ibizbookdashboard-view.vue'));
Vue.component('ibizsample0001-sf5-edit-view', () => import('@pages/sample/ibizsample0001-sf5-edit-view/ibizsample0001-sf5-edit-view.vue'));
Vue.component('ibizbookgroup-by-codelist-list-view', () => import('@pages/sample/ibizbookgroup-by-codelist-list-view/ibizbookgroup-by-codelist-list-view.vue'));
Vue.component('ibizbookhas-panel-kan-ban-view', () => import('@pages/sample/ibizbookhas-panel-kan-ban-view/ibizbookhas-panel-kan-ban-view.vue'));
......
......@@ -2072,6 +2072,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizbookedit-view/ibizbookedit-view.vue'),
},
{
path: 'ibizbooks/:ibizbook?/dashboardview/:dashboardview?',
meta: {
caption: 'entities.ibizbook.views.dashboardview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'dashboardview', parameterName: 'dashboardview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookdashboard-view/ibizbookdashboard-view.vue'),
},
{
path: 'ibizsample0002s/:ibizsample0002?/ibizsample0001s/:ibizsample0001?/sf5editview/:sf5editview?',
meta: {
......@@ -2822,6 +2836,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-line-chart-view/ibizorder-line-chart-view.vue'),
},
{
path: '/ibizbooks/:ibizbook?/dashboardview/:dashboardview?',
meta: {
caption: 'entities.ibizbook.views.dashboardview.caption',
info:'',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'dashboardview', parameterName: 'dashboardview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookdashboard-view/ibizbookdashboard-view.vue'),
},
{
path: '/ibizcustomers/:ibizcustomer?/pickupgridview/:pickupgridview?',
meta: {
......
......@@ -250,6 +250,7 @@ export const viewstate: any = {
'84904c93ceea3ab6551555ee20c41e27',
'6b3607e849c8517fd7ae1cab583f7393',
'41d3da0d37fb0135ace813f1ba06bd39',
'427821f1e67ee5b79dde237e66a7b9c9',
'b1256beac1e95915b675893c61559b59',
'b8ae19200ec9d4e8e588bc31e3f9bcb4',
'09663b7a4e3dce70524d1b64e02b5e2d',
......@@ -487,6 +488,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '427821f1e67ee5b79dde237e66a7b9c9',
viewmodule: 'Sample',
viewname: 'IBIZBOOKDashboardView',
viewaction: '',
viewdatachange: false,
refviews: [
'f73da4cb47a88d3fe5b92716e0137741',
],
},
{
viewtag: '460fc1d5b6f2e2012b281df34d929f3b',
viewmodule: 'Sample',
......
......@@ -764,6 +764,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case 'AppFunc24':
this.clickAppFunc24(item);
return;
case 'AppFunc45':
this.clickAppFunc45(item);
return;
case 'AppFunc17':
this.clickAppFunc17(item);
return;
......@@ -2704,6 +2707,29 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 功能名称
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public clickAppFunc45(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'dashboardview', parameterName: 'dashboardview' },
];
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);
})
}
/**
* 图书列表(嵌入面板)
*
......
......@@ -1599,6 +1599,46 @@ export default class MainMenuModel {
authtag:'Web-MainMenu-menuitem118',
},
],
},
{
id: 'AAFF4FF3-7C14-451F-B6D7-4980DF4FA146',
name: 'menuitem125',
text: '数据看板',
type: 'MENUITEM',
counterid: '',
tooltip: '数据看板',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
authtag:'Web-MainMenu-menuitem125',
items: [
{
id: 'E9E999AF-66D4-4328-A847-03428F2652DA',
name: 'menuitem126',
text: '实体数据看板',
type: 'MENUITEM',
counterid: '',
tooltip: '实体数据看板',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc45',
resourcetag: '',
authtag:'Web-MainMenu-menuitem126',
},
],
},
],
},
......
<template>
<div class='portlet portal-components-list ' :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">
<!-- 测试 -->
<view_dashboard_sysportlet2_list
:viewState="viewState"
:viewparams="viewparams"
:context="context"
createAction="Create"
removeAction="Remove"
updateAction="Update"
fetchAction="FetchDefault"
:showBusyIndicator="true"
name="dashboard_sysportlet2_list"
ref='dashboard_sysportlet2_list'
@closeview="closeView($event)">
</view_dashboard_sysportlet2_list>
</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 IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import PortalComponentsListService from './portal-components-list-portlet-service';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class IBIZBOOKPortalComponentsListBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof PortalComponentsListBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof PortalComponentsListBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof PortalComponentsListBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof PortalComponentsListBase
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof PortalComponentsListBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof PortalComponentsListBase
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PortalComponentsListBase
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {PortalComponentsListService}
* @memberof PortalComponentsListBase
*/
public service: PortalComponentsListService = new PortalComponentsListService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof PortalComponentsListBase
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.$store });
/**
* 界面UI服务对象
*
* @type {IBIZBOOKUIService}
* @memberof PortalComponentsListBase
*/
public appUIService:IBIZBOOKUIService = new IBIZBOOKUIService(this.$store);
/**
* 关闭视图
*
* @param {any} args
* @memberof PortalComponentsListBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof PortalComponentsListBase
*/
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 PortalComponentsListBase
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof PortalComponentsListBase
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof PortalComponentsListBase
*/
public portletType: string = 'list';
/**
* 视图默认使用
*
* @type {string}
* @memberof PortalComponentsListBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof PortalComponentsListBase
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof PortalComponentsListBase
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PortalComponentsListBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PortalComponentsListBase
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof PortalComponentsListBase
*/
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 '300px';
}
}
/**
* 刷新
*
* @memberof PortalComponentsListBase
*/
public refresh(args?: any) {
this.viewState.next({ tag: 'dashboard_sysportlet2_list', action: 'refresh', data: args });
}
/**
* vue 生命周期
*
* @memberof PortalComponentsListBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PortalComponentsListBase
*/
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 PortalComponentsListBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PortalComponentsListBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof PortalComponentsListBase
*/
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 './portal-components-list-portlet.less';
</style>
/**
* PortalComponentsList 部件模型
*
* @export
* @class PortalComponentsListModel
*/
export default class PortalComponentsListModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PortalComponentsListModel
*/
public getDataItems(): any[] {
return [
{
name: 'createman',
},
{
name: 'ibizbookname',
},
{
name: 'ibizbook',
prop: 'ibizbookid',
},
{
name: 'createdate',
},
{
name: 'updateman',
},
{
name: 'updatedate',
},
{
name: 'author',
},
{
name: 'price',
},
{
name: 'press',
},
{
name: 'type',
},
{
name: 'booknumber',
},
{
name: 'subtext',
},
{
name: 'lendouttime',
},
{
name: 'returntime',
},
{
name: 'icon',
},
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PortalComponentsList 部件服务对象
*
* @export
* @class PortalComponentsListService
*/
export default class PortalComponentsListService 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 IBIZBOOKPortalComponentsListBase from './portal-components-list-portlet-base.vue';
import view_dashboard_sysportlet2_list from '@widgets/ibizbook/lnternal-func-list-list/lnternal-func-list-list.vue';
@Component({
components: {
view_dashboard_sysportlet2_list,
}
})
export default class IBIZBOOKPortalComponentsList extends IBIZBOOKPortalComponentsListBase {
}
</script>
<template>
<div class='portlet portal-components-view ' :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">
<ibizbookinternal-func-grid-view :portletState="viewState" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></ibizbookinternal-func-grid-view>
</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 IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import PortalComponentsViewService from './portal-components-view-portlet-service';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service';
import UIService from '@/uiservice/ui-service';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class IBIZBOOKPortalComponentsViewBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof PortalComponentsViewBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof PortalComponentsViewBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof PortalComponentsViewBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof PortalComponentsViewBase
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof PortalComponentsViewBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof PortalComponentsViewBase
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PortalComponentsViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {PortalComponentsViewService}
* @memberof PortalComponentsViewBase
*/
public service: PortalComponentsViewService = new PortalComponentsViewService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof PortalComponentsViewBase
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.$store });
/**
* 界面UI服务对象
*
* @type {IBIZBOOKUIService}
* @memberof PortalComponentsViewBase
*/
public appUIService:IBIZBOOKUIService = new IBIZBOOKUIService(this.$store);
/**
* 关闭视图
*
* @param {any} args
* @memberof PortalComponentsViewBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof PortalComponentsViewBase
*/
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 PortalComponentsViewBase
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof PortalComponentsViewBase
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof PortalComponentsViewBase
*/
public portletType: string = 'view';
/**
* 视图默认使用
*
* @type {string}
* @memberof PortalComponentsViewBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof PortalComponentsViewBase
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof PortalComponentsViewBase
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PortalComponentsViewBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PortalComponentsViewBase
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof PortalComponentsViewBase
*/
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 '300px';
}
}
/**
* 刷新
*
* @memberof PortalComponentsViewBase
*/
public refresh(args?: any) {
this.viewState.next({ tag: 'IBIZBOOKInternalFuncGridView', action: 'refresh', data: args });
}
/**
* vue 生命周期
*
* @memberof PortalComponentsViewBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PortalComponentsViewBase
*/
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 PortalComponentsViewBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PortalComponentsViewBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof PortalComponentsViewBase
*/
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 './portal-components-view-portlet.less';
</style>
/**
* PortalComponentsView 部件模型
*
* @export
* @class PortalComponentsViewModel
*/
export default class PortalComponentsViewModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PortalComponentsViewModel
*/
public getDataItems(): any[] {
return [
{
name: 'createman',
},
{
name: 'ibizbookname',
},
{
name: 'ibizbook',
prop: 'ibizbookid',
},
{
name: 'createdate',
},
{
name: 'updateman',
},
{
name: 'updatedate',
},
{
name: 'author',
},
{
name: 'price',
},
{
name: 'press',
},
{
name: 'type',
},
{
name: 'booknumber',
},
{
name: 'subtext',
},
{
name: 'lendouttime',
},
{
name: 'returntime',
},
{
name: 'icon',
},
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PortalComponentsView 部件服务对象
*
* @export
* @class PortalComponentsViewService
*/
export default class PortalComponentsViewService 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 IBIZBOOKPortalComponentsViewBase from './portal-components-view-portlet-base.vue';
@Component({
components: {
}
})
export default class IBIZBOOKPortalComponentsView extends IBIZBOOKPortalComponentsViewBase {
}
</script>
/**
* Usr2 部件模型
*
* @export
* @class Usr2Model
*/
export default class Usr2Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr2Model
*/
public getDataItems(): any[] {
return [
{
name: 'createman',
},
{
name: 'ibizbookname',
},
{
name: 'ibizbook',
prop: 'ibizbookid',
},
{
name: 'createdate',
},
{
name: 'updateman',
},
{
name: 'updatedate',
},
{
name: 'author',
},
{
name: 'price',
},
{
name: 'press',
},
{
name: 'type',
},
{
name: 'booknumber',
},
{
name: 'subtext',
},
{
name: 'lendouttime',
},
{
name: 'returntime',
},
{
name: 'icon',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Usr2 部件服务对象
*
* @export
* @class Usr2Service
*/
export default class Usr2Service 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 Usr2Base from './usr2-dashboard-base.vue';
import view_dashboard_sysportlet2 from '@widgets/ibizbook/portal-components-list-portlet/portal-components-list-portlet.vue';
import view_dashboard_sysportlet3 from '@widgets/ibizbook/portal-components-view-portlet/portal-components-view-portlet.vue';
import view_dashboard_sysportlet1 from '@widgets/ibizorder/portal-components-chart-portlet/portal-components-chart-portlet.vue';
@Component({
components: {
view_dashboard_sysportlet2,
view_dashboard_sysportlet3,
view_dashboard_sysportlet1,
}
})
export default class Usr2 extends Usr2Base {
}
</script>
\ No newline at end of file
<template>
<div class='portlet portal-components-chart ' :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">
<!-- 测试 -->
<view_dashboard_sysportlet1_chart
:viewState="viewState"
:viewparams="viewparams"
:context="context"
fetchAction="FetchDefault"
:showBusyIndicator="true"
name="dashboard_sysportlet1_chart"
ref='dashboard_sysportlet1_chart'
@closeview="closeView($event)">
</view_dashboard_sysportlet1_chart>
</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 PortalComponentsChartService from './portal-components-chart-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 IBIZOrderPortalComponentsChartBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof PortalComponentsChartBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof PortalComponentsChartBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof PortalComponentsChartBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof PortalComponentsChartBase
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof PortalComponentsChartBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof PortalComponentsChartBase
*/
public getControlType(): string {
return 'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PortalComponentsChartBase
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {PortalComponentsChartService}
* @memberof PortalComponentsChartBase
*/
public service: PortalComponentsChartService = new PortalComponentsChartService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof PortalComponentsChartBase
*/
public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store });
/**
* 界面UI服务对象
*
* @type {IBIZOrderUIService}
* @memberof PortalComponentsChartBase
*/
public appUIService:IBIZOrderUIService = new IBIZOrderUIService(this.$store);
/**
* 关闭视图
*
* @param {any} args
* @memberof PortalComponentsChartBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof PortalComponentsChartBase
*/
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 PortalComponentsChartBase
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof PortalComponentsChartBase
*/
@Prop() public width?: number;
/**
* 门户部件类型
*
* @type {number}
* @memberof PortalComponentsChartBase
*/
public portletType: string = 'chart';
/**
* 视图默认使用
*
* @type {string}
* @memberof PortalComponentsChartBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 界面行为模型数据
*
* @memberof PortalComponentsChartBase
*/
public uiactionModel: any = {
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof PortalComponentsChartBase
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PortalComponentsChartBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PortalComponentsChartBase
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof PortalComponentsChartBase
*/
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 '300px';
}
}
/**
* 刷新
*
* @memberof PortalComponentsChartBase
*/
public refresh(args?: any) {
this.viewState.next({ tag: 'dashboard_sysportlet1_chart', action: 'refresh', data: args });
}
/**
* vue 生命周期
*
* @memberof PortalComponentsChartBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PortalComponentsChartBase
*/
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 PortalComponentsChartBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PortalComponentsChartBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 计算界面行为权限
*
* @memberof PortalComponentsChartBase
*/
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 './portal-components-chart-portlet.less';
</style>
/**
* PortalComponentsChart 部件模型
*
* @export
* @class PortalComponentsChartModel
*/
export default class PortalComponentsChartModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PortalComponentsChartModel
*/
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';
/**
* PortalComponentsChart 部件服务对象
*
* @export
* @class PortalComponentsChartService
*/
export default class PortalComponentsChartService 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 IBIZOrderPortalComponentsChartBase from './portal-components-chart-portlet-base.vue';
import view_dashboard_sysportlet1_chart from '@widgets/ibizorder/area-chart/area-chart.vue';
@Component({
components: {
view_dashboard_sysportlet1_chart,
}
})
export default class IBIZOrderPortalComponentsChart extends IBIZOrderPortalComponentsChartBase {
}
</script>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册