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

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

上级 9ce1e12a
......@@ -1399,6 +1399,14 @@
"viewname": "IBIZOrderDetailListView",
"viewtag": "8f04b48c970ed3c24154be374d6a023f"
},
"ibizbookusr6listview": {
"title": "图书列表视图",
"caption": "图书",
"viewtype": "DELISTVIEW",
"viewmodule": "Sample",
"viewname": "IBIZBOOKUsr6ListView",
"viewtag": "8f0dfc041422a40f4038eaf24f34a2a0"
},
"ibizsample0018gridview": {
"title": "示例实体04表格视图",
"caption": "示例实体18",
......
......@@ -377,6 +377,7 @@ function getAppLocale(){
menuitem130: commonLogic.appcommonhandle("布局面板组件测试",null),
menuitem205: commonLogic.appcommonhandle("项布局面板布局",null),
menuitem142: commonLogic.appcommonhandle("视图布局面板测试",null),
menuitem189: commonLogic.appcommonhandle("项布局面板测试",null),
menuitem213: commonLogic.appcommonhandle("按钮测试",null),
menuitem190: commonLogic.appcommonhandle("视图",null),
menuitem191: commonLogic.appcommonhandle("单数据视图",null),
......
......@@ -377,6 +377,7 @@ function getAppLocale(){
menuitem130: commonLogic.appcommonhandle("布局面板组件测试",null),
menuitem205: commonLogic.appcommonhandle("项布局面板布局",null),
menuitem142: commonLogic.appcommonhandle("视图布局面板测试",null),
menuitem189: commonLogic.appcommonhandle("项布局面板测试",null),
menuitem213: commonLogic.appcommonhandle("按钮测试",null),
menuitem190: commonLogic.appcommonhandle("视图",null),
menuitem191: commonLogic.appcommonhandle("单数据视图",null),
......
......@@ -377,6 +377,7 @@ function getAppLocale(){
menuitem130: commonLogic.appcommonhandle("布局面板组件测试",null),
menuitem205: commonLogic.appcommonhandle("项布局面板布局",null),
menuitem142: commonLogic.appcommonhandle("视图布局面板测试",null),
menuitem189: commonLogic.appcommonhandle("项布局面板测试",null),
menuitem213: commonLogic.appcommonhandle("按钮测试",null),
menuitem190: commonLogic.appcommonhandle("视图",null),
menuitem191: commonLogic.appcommonhandle("单数据视图",null),
......
......@@ -194,6 +194,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle("图书",null),
title: commonLogic.appcommonhandle("图书看板视图(代码表分组)",null),
},
usr6listview: {
caption: commonLogic.appcommonhandle("图书",null),
title: commonLogic.appcommonhandle("图书列表视图",null),
},
exportandimportgridview: {
caption: commonLogic.appcommonhandle("数据导入导出",null),
title: commonLogic.appcommonhandle("图书表格视图(数据导入导出)",null),
......@@ -874,6 +878,11 @@ function getLocaleResourceBase(){
remove: commonLogic.appcommonhandle("删除",null),
},
},
testlist_list: {
nodata:commonLogic.appcommonhandle("",null),
uiactions: {
},
},
listpanel_list: {
nodata:commonLogic.appcommonhandle("",null),
uiactions: {
......@@ -1969,6 +1978,8 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("数据导入",null),
},
},
usr6listviewtoolbar_toolbar: {
},
listviewtoolbar_toolbar: {
deuiaction1: {
caption: commonLogic.appcommonhandle("新建",null),
......
......@@ -194,6 +194,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle("Code Table Grouping",null),
title: commonLogic.appcommonhandle("图书看板视图(代码表分组)",null),
},
usr6listview: {
caption: commonLogic.appcommonhandle("图书",null),
title: commonLogic.appcommonhandle("图书列表视图",null),
},
exportandimportgridview: {
caption: commonLogic.appcommonhandle("Data Import And Export",null),
title: commonLogic.appcommonhandle("图书表格视图(数据导入导出)",null),
......@@ -874,6 +878,11 @@ function getLocaleResourceBase(){
remove: commonLogic.appcommonhandle("Remove",null),
},
},
testlist_list: {
nodata:commonLogic.appcommonhandle("",null),
uiactions: {
},
},
listpanel_list: {
nodata:commonLogic.appcommonhandle("",null),
uiactions: {
......@@ -1969,6 +1978,8 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("数据导入",null),
},
},
usr6listviewtoolbar_toolbar: {
},
listviewtoolbar_toolbar: {
deuiaction1: {
caption: commonLogic.appcommonhandle("New",null),
......
......@@ -194,6 +194,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle("图书",null),
title: commonLogic.appcommonhandle("图书看板视图(代码表分组)",null),
},
usr6listview: {
caption: commonLogic.appcommonhandle("图书",null),
title: commonLogic.appcommonhandle("图书列表视图",null),
},
exportandimportgridview: {
caption: commonLogic.appcommonhandle("数据导入导出",null),
title: commonLogic.appcommonhandle("图书表格视图(数据导入导出)",null),
......@@ -874,6 +878,11 @@ function getLocaleResourceBase(){
remove: commonLogic.appcommonhandle("删除",null),
},
},
testlist_list: {
nodata:commonLogic.appcommonhandle("",null),
uiactions: {
},
},
listpanel_list: {
nodata:commonLogic.appcommonhandle("",null),
uiactions: {
......@@ -1969,6 +1978,8 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("数据导入",null),
},
},
usr6listviewtoolbar_toolbar: {
},
listviewtoolbar_toolbar: {
deuiaction1: {
caption: commonLogic.appcommonhandle("新建",null),
......
......@@ -3097,6 +3097,24 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
textcls: '',
appfunctag: 'AppFunc128',
resourcetag: '',
},
{
id: '1168A4C6-9BD9-448C-945B-F164EC3F6763',
name: 'menuitem189',
text: '项布局面板测试',
type: 'MENUITEM',
counterid: '',
tooltip: '项布局面板测试',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc129',
resourcetag: '',
},
{
id: '9ED30E38-7D9C-47FC-B35E-71C822AAEC3E',
......
......@@ -1407,6 +1407,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "IBIZOrderDetailListView",
"viewtag": "8f04b48c970ed3c24154be374d6a023f"
},
"ibizbookusr6listview": {
"title": "图书列表视图",
"caption": "图书",
"viewtype": "DELISTVIEW",
"viewmodule": "Sample",
"viewname": "IBIZBOOKUsr6ListView",
"viewtag": "8f0dfc041422a40f4038eaf24f34a2a0"
},
"ibizsample0018gridview": {
"title": "示例实体04表格视图",
"caption": "示例实体18",
......
<template>
<div class='view-container delistview ibizbookusr6-list-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizbookusr6listview"></app-studioaction>
<card class='view-card ' :bordered="false" :dis-hover="true" >
<div slot='title' class="header-container">
<span class='caption-info' :title="$t(model.srfCaption)">{{$t(model.srfCaption)}}</span>
</div>
<div class='content-container'>
<div style="margin-bottom:6px;">
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='pull-left' placeholder="图书名称" style='max-width: 400px;margin-top:6px;padding-left: 24px' />
<div class='pull-right'>
<div class='toolbar-container'>
</div>
</div>
</div>
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:pViewCtx="viewCtx"
:showBusyIndicator="true"
v-show="true"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
@valuechange="quickFormValueChange"
name="searchform"
ref='searchform'
@search="searchform_search($event)"
@load="searchform_load($event)"
@save="searchform_save($event)"
@closeview="closeView($event)">
</view_searchform>
<view_list
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:pViewCtx="viewCtx"
createAction="Create"
removeAction="Remove"
updateAction="Update"
fetchAction="FetchDefault"
:showBusyIndicator="true"
:parentType="controlType"
:newdata="newdata"
:opendata="opendata"
name="list"
ref='list'
@rowdblclick="list_rowdblclick($event)"
@selectionchange="list_selectionchange($event)"
@remove="list_remove($event)"
@load="list_load($event)"
@beforeload="list_beforeload($event)"
@closeview="closeView($event)">
</view_list>
</div>
</card>
</div>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool, Util } from '@/utils';
import { AppMessageBox } from '@/utils/app-message-box/app-message-box';
import NavDataService from '@/service/app/navdata-service';
import { Subject,Subscription } from 'rxjs';
import IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import IBIZBOOKAuthService from '@/authservice/ibizbook/ibizbook-auth-service';
import ListViewEngine from '@engine/view/list-view-engine';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service';
import CodeListService from "@/codelist/codelist-service";
@Component({
components: {
},
})
export default class IBIZBOOKUsr6ListViewBase extends Vue {
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService();
/**
* 实体UI服务对象
*
* @type IBIZBOOKUIService
* @memberof IBIZBOOKUsr6ListViewBase
*/
public appUIService: IBIZBOOKUIService = new IBIZBOOKUIService();
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof IBIZBOOKUsr6ListViewBase
*/
@Emit()
public viewDatasChange(val: any):any {
return val;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof IBIZBOOKUsr6ListViewBase
*/
@Prop() public viewdata!: string;
/**
* 传入视图参数
*
* @type {string}
* @memberof IBIZBOOKUsr6ListViewBase
*/
@Prop() public viewparam!: string;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof IBIZBOOKUsr6ListViewBase
*/
@Prop({ default: true }) public viewDefaultUsage!: boolean;
/**
* 视图默认使用
*
* @type {string}
* @memberof IBIZBOOKUsr6ListViewBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 视图标识
*
* @type {string}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public viewtag: string = '8f0dfc041422a40f4038eaf24f34a2a0';
/**
* 视图类型
*
* @type {string}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public viewType: string = 'DELISTVIEW';
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public customViewNavContexts:any ={
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public customViewParams:any ={
};
/**
* 视图模型数据
*
* @type {*}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public model: any = {
srfCaption: 'entities.ibizbook.views.usr6listview.caption',
srfTitle: 'entities.ibizbook.views.usr6listview.title',
srfSubTitle: 'entities.ibizbook.views.usr6listview.subtitle',
dataInfo: ''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZBOOKUsr6ListViewBase
*/
@Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) {
if(newVal){
this.viewparams = {};
if(typeof newVal == 'string') {
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}else{
this.viewparams = Util.deepCopy(this.viewparam);
}
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZBOOKUsr6ListViewBase
*/
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public containerModel: any = {
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_list: { name: 'list', type: 'LIST' },
};
/**
* 视图操作参数
*
* @type {*}
* @readonly
* @memberof IBIZBOOKUsr6ListViewBase
*/
public viewCtx: any = {};
/**
* 视图刷新
*
* @param {*} args
* @memberof IBIZBOOKUsr6ListViewBase
*/
public refresh(args?: any): void {
const refs: any = this.$refs;
if (refs && refs.list) {
refs.list.refresh();
}
}
/**
* 计数器刷新
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
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();
}
})
}
}
/**
* 视图状态订阅对象
*
* @public
* @type {Subject<{action: string, data: any}>}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZBOOKUsr6ListView
*/
public toolBarModels: any = {
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public engine: ListViewEngine = new ListViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof IBIZBOOKUsr6ListViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
list: this.$refs.list,
opendata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.opendata(args,fullargs, params, $event, xData);
},
newdata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.newdata(args,fullargs, params, $event, xData);
},
searchform: this.$refs.searchform,
keyPSDEField: 'ibizbook',
majorPSDEField: 'ibizbookname',
isLoadDefault: true,
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public navDataService = NavDataService.getInstance();
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public serviceStateEvent: Subscription | undefined;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof IBIZBOOKUsr6ListViewBase
*/
@Prop() public portletState?: any;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public portletStateEvent: Subscription | undefined;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public formDruipartEvent: Subscription | undefined;
/**
* 应用上下文
*
* @type {*}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public context:any = {};
/**
* 视图参数
*
* @type {*}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public viewparams:any = {};
/**
* 视图缓存数据
*
* @type {*}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof IBIZBOOKUsr6ListViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
* @public
* @memberof IBIZBOOKUsr6ListViewBase
*/
public parseViewParam(inputvalue:any = null): void {
for(let key in this.context){
delete this.context[key];
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
if(typeof this.viewdata == 'string') {
Object.assign(this.context, JSON.parse(this.viewdata));
}
if(this.context && this.context.srfparentdename){
Object.assign(this.viewparams,{srfparentdename:this.context.srfparentdename});
}
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
this.handleCustomViewData();
return;
}
const path = (this.$route.matched[this.$route.matched.length - 1]).path;
const keys: Array<any> = [];
const curReg = this.$pathToRegExp.pathToRegexp(path, keys);
const matchArray = curReg.exec(this.$route.path);
let tempValue: Object = {};
keys.forEach((item: any, index: number) => {
if(matchArray[index + 1]){
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: decodeURIComponent(matchArray[index + 1])
});
}
});
this.$viewTool.formatRouteParams(tempValue,this.$route,this.context,this.viewparams);
if(inputvalue){
Object.assign(this.context,{'ibizbook':inputvalue});
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
//初始化导航数据
this.initNavDataWithRoute();
}
/**
* 处理自定义视图数据
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public handleCustomViewData(){
if(Object.keys(this.customViewNavContexts).length > 0){
Object.keys(this.customViewNavContexts).forEach((item:any) =>{
let tempContext:any = {};
let curNavContext:any = this.customViewNavContexts[item];
this.handleCustomDataLogic(curNavContext,tempContext,item);
Object.assign(this.context,tempContext);
})
}
if(Object.keys(this.customViewParams).length > 0){
Object.keys(this.customViewParams).forEach((item:any) =>{
let tempParam:any = {};
let curNavParam:any = this.customViewParams[item];
this.handleCustomDataLogic(curNavParam,tempParam,item);
Object.assign(this.viewparams,tempParam);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public handleCustomDataLogic(curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
/**
* 初始化导航数据(路由模式)
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public initNavDataWithRoute(data:any = null, isNew:boolean = false, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && Object.is(this.navModel,"route")) ){
this.navDataService.addNavData({id:'ibizbookusr6-list-view',tag:this.viewtag,srfkey:isNew ? null : this.context.ibizbook,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && !Object.is(this.navModel,"route")) ){
this.navDataService.addNavDataByOnly({id:'ibizbookusr6-list-view',tag:this.viewtag,srfkey:this.context.ibizbook,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd);
}
}
/**
* Vue声明周期
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public afterCreated(){
let _this:any = this;
const secondtag = _this.$util.createUUID();
_this.$store.commit('viewaction/createdView', { viewtag: _this.viewtag, secondtag: secondtag });
_this.viewtag = secondtag;
_this.parseViewParam();
_this.serviceStateEvent = _this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
if(!Object.is(name,'ibizbookusr6-list-view')){
return;
}
if (Object.is(action, 'viewrefresh')) {
_this.$nextTick(()=>{
_this.parseViewParam(data);
if(_this.engine){
_this.engine.load();
}
});
}
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'IBIZBOOKUsr6ListView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
_this.refresh();
}
})
}
_this.initViewCtx();
}
/**
* 初始化视图操作参数
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
initViewCtx() {
Object.assign(this.viewCtx, {
app: this.$root,
view: this,
viewGlobal: {},
viewNavData: {},
viewNavContext: this.context,
viewNavParam: this.viewparams,
messagebox: AppMessageBox.getInstance(),
});
Object.assign(this.viewCtx, { appGlobal: this.$store.getters.getAppGlobal() });
if (this.$store.getters.getRouteViewGlobal(this.context.srfsessionid)) {
Object.assign(this.viewCtx, { routeViewGlobal: this.$store.getters.getRouteViewGlobal(this.context.srfsessionid) });
} else {
this.$store.commit('addRouteViewGlobal', { tag: this.context.srfsessionid, param: {} });
Object.assign(this.viewCtx, { routeViewGlobal: this.$store.getters.getRouteViewGlobal(this.context.srfsessionid) });
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
// 嵌入视图
Object.assign(this.viewCtx, {
topview: this.$store.getters.getView(this.context.srfsessionid)
});
} else {
// 顶层视图
this.$store.commit('addView', { tag: this.context.srfsessionid, param: this });
Object.assign(this.viewCtx, { topview: this });
}
}
/**
* 销毁之前
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public beforeDestroy() {
this.$store.commit('viewaction/removeView', this.viewtag);
let _this: any = this
if (_this.serviceStateEvent) {
_this.serviceStateEvent.unsubscribe();
}
if (_this.portletStateEvent) {
_this.portletStateEvent.unsubscribe();
}
if (_this.engine) {
_this.engine.destroy();
}
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public afterMounted(){
const _this: any = this;
_this.engineInit();
if (_this.loadModel && _this.loadModel instanceof Function) {
_this.loadModel();
}
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKUsr6ListViewBase
*/
public searchform_search($event: any, $event2?: any) {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKUsr6ListViewBase
*/
public searchform_load($event: any, $event2?: any) {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKUsr6ListViewBase
*/
public searchform_save($event: any, $event2?: any) {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* list 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKUsr6ListViewBase
*/
public list_rowdblclick($event: any, $event2?: any) {
this.engine.onCtrlEvent('list', 'rowdblclick', $event);
}
/**
* list 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKUsr6ListViewBase
*/
public list_selectionchange($event: any, $event2?: any) {
this.engine.onCtrlEvent('list', 'selectionchange', $event);
}
/**
* list 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKUsr6ListViewBase
*/
public list_remove($event: any, $event2?: any) {
this.engine.onCtrlEvent('list', 'remove', $event);
}
/**
* list 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKUsr6ListViewBase
*/
public list_load($event: any, $event2?: any) {
this.engine.onCtrlEvent('list', 'load', $event);
}
/**
* list 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKUsr6ListViewBase
*/
public list_beforeload($event: any, $event2?: any) {
this.engine.onCtrlEvent('list', 'beforeload', $event);
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof IBIZBOOKUsr6ListView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.ibizbook;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof IBIZBOOKUsr6ListView
*/
public opendata(args: any[],fullargs?:any,params?: any, $event?: any, xData?: any) {
if(!this.viewDefaultUsage){
if(Object.is(this.navModel,"route")){
this.initNavDataWithRoute(this.viewCacheData, false, true);
}else{
this.initNavDataWithTab(this.viewCacheData, false, true);
}
}
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
if (fullargs && fullargs.length > 0) {
const _args = fullargs[0];
if (_args['srfprocessdefinitionkey'] && _args['srftaskdefinitionkey']) {
Object.assign(data, {
processDefinitionKey: _args['srfprocessdefinitionkey'],
taskDefinitionKey: _args['srftaskdefinitionkey']
});
if (_args['srftaskid']) {
Object.assign(data, { 'srftaskid': _args['srftaskid'] });
}
}
}
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof IBIZBOOKUsr6ListViewBase
*/
public closeView(args: any[]): void {
let _view: any = this;
if (_view.viewdata) {
_view.$emit('viewdataschange', Array.isArray(args)?args:[args]);
_view.$emit('close', Array.isArray(args)?args:[args]);
} else if (_view.$tabPageExp) {
_view.$tabPageExp.onClose(_view.$route.fullPath);
}
}
/**
* 销毁视图回调
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBIZBOOKUsr6ListViewBase
*/
public afterDestroyed(){
if (this.viewDefaultUsage) {
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
if(item.startsWith(this.context.srfsessionid)){
localStorage.removeItem(item);
}
})
}
if(Object.is(this.navModel,"tab")){
this.navDataService.removeNavDataByTag(this.viewtag);
}
}
if (this.serviceStateEvent) {
this.serviceStateEvent.unsubscribe();
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
this.counterServiceArray.forEach((item:any) =>{
if(item.destroyCounter && item.destroyCounter instanceof Function){
item.destroyCounter();
}
})
}
if(this.portletStateEvent){
this.portletStateEvent.unsubscribe();
}
if (this.formDruipartEvent) {
this.formDruipartEvent.unsubscribe();
}
this.viewState.complete();
}
/**
* 搜索值
*
* @type {string}
* @memberof IBIZBOOKUsr6ListView
*/
public query: string = '';
/**
* 视图类型
*
* @type {string}
* @memberof IBIZBOOKUsr6ListView
*/
public controlType: string = "view";
/**
* 是否展开搜索表单
*
* @type {boolean}
* @memberof IBIZBOOKUsr6ListView
*/
public isExpandSearchForm: boolean = false;
/**
* 快速搜索
*
* @param {*} $event
* @memberof IBIZBOOKUsr6ListView
*/
public onSearch($event: any): void {
const refs: any = this.$refs;
if (refs.list) {
refs.list.load({});
}
}
}
</script>
<style lang='less'>
@import './ibizbookusr6-list-view.less';
</style>
\ No newline at end of file
.ibizbookusr6-list-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZBOOKUsr6ListViewBase from './ibizbookusr6-list-view-base.vue';
import view_searchform from '@widgets/ibizbook/quicksearchform-searchform/quicksearchform-searchform.vue';
import view_list from '@widgets/ibizbook/test-list-list/test-list-list.vue';
@Component({
components: {
view_searchform,
view_list,
},
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 IBIZBOOKUsr6ListView extends IBIZBOOKUsr6ListViewBase {
}
</script>
\ No newline at end of file
......@@ -113,6 +113,7 @@ export const PageComponents = {
Vue.component('ibizorder-test-custom-layout-panel-grid-exp-view', () => import('@pages/sample/ibizorder-test-custom-layout-panel-grid-exp-view/ibizorder-test-custom-layout-panel-grid-exp-view.vue'));
Vue.component('ibizbookusr5-list-view', () => import('@pages/sample/ibizbookusr5-list-view/ibizbookusr5-list-view.vue'));
Vue.component('ibizbookusr2-custom-view', () => import('@pages/sample/ibizbookusr2-custom-view/ibizbookusr2-custom-view.vue'));
Vue.component('ibizbookusr6-list-view', () => import('@pages/sample/ibizbookusr6-list-view/ibizbookusr6-list-view.vue'));
Vue.component('ibizcustomer-usr3-edit-view', () => import('@pages/sample/ibizcustomer-usr3-edit-view/ibizcustomer-usr3-edit-view.vue'));
Vue.component('ibizbookwizard-view-layout', () => import('@pages/sample/ibizbookwizard-view-layout/ibizbookwizard-view-layout.vue'));
Vue.component('ibizbookinter-func-edit-view-layout', () => import('@pages/sample/ibizbookinter-func-edit-view-layout/ibizbookinter-func-edit-view-layout.vue'));
......
......@@ -1748,6 +1748,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizbookusr2-custom-view/ibizbookusr2-custom-view.vue'),
},
{
path: 'ibizbooks/:ibizbook?/usr6listview/:usr6listview?',
meta: {
caption: 'entities.ibizbook.views.usr6listview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr6listview', parameterName: 'usr6listview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr6-list-view/ibizbookusr6-list-view.vue'),
},
{
path: 'ibizcustomers/:ibizcustomer?/usr3editview/:usr3editview?',
meta: {
......@@ -5218,6 +5232,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-detail-list-view/ibizorder-detail-list-view.vue'),
},
{
path: '/ibizbooks/:ibizbook?/usr6listview/:usr6listview?',
meta: {
caption: 'entities.ibizbook.views.usr6listview.caption',
info:'',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr6listview', parameterName: 'usr6listview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr6-list-view/ibizbookusr6-list-view.vue'),
},
{
path: '/ibizsample0018s/:ibizsample0018?/gridview/:gridview?',
meta: {
......
......@@ -1858,6 +1858,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-detail-list-view/ibizorder-detail-list-view.vue'),
},
{
path: '/ibizbooks/:ibizbook?/usr6listview/:usr6listview?',
meta: {
caption: 'entities.ibizbook.views.usr6listview.caption',
info:'',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr6listview', parameterName: 'usr6listview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr6-list-view/ibizbookusr6-list-view.vue'),
},
{
path: '/ibizsample0018s/:ibizsample0018?/gridview/:gridview?',
meta: {
......
......@@ -933,6 +933,7 @@ export const viewstate: any = {
'2D42F3B7-3267-4276-9120-10F2D81E35AF',
'c680bdc2306ff1ea39102917225bdade',
'cd8668cf71ef2c2a33882869195d41df',
'8f0dfc041422a40f4038eaf24f34a2a0',
'89f50fe0180852e47ffbb486cdfaf305',
'ca90f2d89734ba48161642abc9d2cbbd',
'6c9e2f980d5916949d3b16944f887a4b',
......@@ -1486,6 +1487,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '8f0dfc041422a40f4038eaf24f34a2a0',
viewmodule: 'Sample',
viewname: 'IBIZBOOKUsr6ListView',
viewaction: '',
viewdatachange: false,
refviews: [
'58e37ccddda10feedac7c809d5cee02a',
],
},
{
viewtag: '8f5b91d3cdee485d7b826249fed986da',
viewmodule: 'Sample',
......
......@@ -144,6 +144,7 @@ export default class IBIZBOOKUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'usr2meditview9_layout',srfappde:'ibizbooks',component:'ibizbookusr2-medit-view9-layout'});
this.allViewMap.set(':',{viewname:'usr3editview',srfappde:'ibizbooks',component:'ibizbookusr3-edit-view'});
this.allViewMap.set(':',{viewname:'groupbycodelistkanbanview',srfappde:'ibizbooks',component:'ibizbookgroup-by-codelist-kan-ban-view'});
this.allViewMap.set(':',{viewname:'usr6listview',srfappde:'ibizbooks',component:'ibizbookusr6-list-view'});
this.allViewMap.set(':',{viewname:'exportandimportgridview',srfappde:'ibizbooks',component:'ibizbookexport-and-import-grid-view'});
this.allViewMap.set(':',{viewname:'autogrouplistview',srfappde:'ibizbooks',component:'ibizbookauto-group-list-view'});
this.allViewMap.set(':',{viewname:'usr3listview',srfappde:'ibizbooks',component:'ibizbookusr3-list-view'});
......
......@@ -991,6 +991,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case 'AppFunc128':
this.clickAppFunc128(item);
return;
case 'AppFunc129':
this.clickAppFunc129(item);
return;
case 'AppFunc126':
this.clickAppFunc126(item);
return;
......@@ -3726,6 +3729,29 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 项布局面板测试
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public clickAppFunc129(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr6listview', parameterName: 'usr6listview' },
];
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);
})
}
/**
* 按钮测试
*
......
......@@ -3269,6 +3269,25 @@ export default class MainMenuModel {
appfunctag: 'AppFunc128',
resourcetag: '',
authtag:'Web-MainMenu-menuitem142',
},
{
id: '1168A4C6-9BD9-448C-945B-F164EC3F6763',
name: 'menuitem189',
text: '项布局面板测试',
type: 'MENUITEM',
counterid: '',
tooltip: '项布局面板测试',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc129',
resourcetag: '',
authtag:'Web-MainMenu-menuitem189',
},
{
id: '9ED30E38-7D9C-47FC-B35E-71C822AAEC3E',
......@@ -5372,6 +5391,18 @@ export default class MainMenuModel {
{ pathName: 'usr2customview', parameterName: 'usr2customview' },
],
},
{
appfunctag: 'AppFunc129',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'ibizbookusr6listview',
deResParameters: [],
routepath: '/index/:index?/ibizbooks/:ibizbook?/usr6listview/:usr6listview?',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr6listview', parameterName: 'usr6listview' },
],
},
{
appfunctag: 'AppFunc126',
appfuncyype: 'APPVIEW',
......
......@@ -638,7 +638,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -674,7 +674,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
......@@ -711,7 +711,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr5GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -747,7 +747,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr5GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
......@@ -840,15 +840,6 @@ export default class MajorStateDataBase extends Vue implements ControlInterface
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}
const post: Promise<any> =
post.then((response: any) => {
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
/**
......
<template>
<div :class="['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]">
<div v-if="items.length > 0">
<div v-for = "item in items" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<layout_list_itempanel
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:parentRef="thisRef"
:inputData="item"
:actionModel="actionModel ? actionModel : null"
@uiAction="(item, action, event) => { uiAction(item, action, event); }"
@panelDataChange="($event)=>{onPanelDataChange(item,$event)}"
name="list_itempanel"
ref='list_itempanel'>
</layout_list_itempanel>
</div>
<template v-if="isScrollBar">
<div v-if="totalRecord>items.length" class="loadmore">{{ this.$t('app.commonWords.loadmore') }}</div>
<div v-else class="loadmore">{{ this.$t('app.commonWords.nomore') }}</div>
</template>
</div>
<div v-else>
{{ $t('entities.ibizbook.testlist_list.nodata') }}
</div>
<el-backtop target=".content-container .app-list"></el-backtop>
</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 AppCenterService from "@service/app/app-center-service";
import IBIZBOOKEntityService from '@/service/ibizbook/ibizbook-service';
import TestListService from './test-list-list-service';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service';
import CodeListService from "@/codelist/codelist-service";
@Component({
components: {
}
})
export default class TestListBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof TestListBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof TestListBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof TestListBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof TestListBase
*/
@Prop() public viewparams!: any;
/**
* 视图操作参数(父级)
*
* @type {*}
* @memberof TestListBase
*/
@Prop() public pViewCtx!: any;
/**
* 视图操作参数
*
* @type {*}
* @memberof TestListBase
*/
public viewCtx: any = {};
/**
* 监听视图操作参数变化
*
* @type {*}
* @memberof TestListBase
*/
@Watch('pViewCtx', { immediate: true, deep: true })
public onViewCtxChange(newVal: any, oldVal: any) {
Object.assign(this.viewCtx, newVal, { xData: this, ctrl: this });
}
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof TestListBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof TestListBase
*/
public getControlType(): string {
return 'LIST'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof TestListBase
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {TestListService}
* @memberof TestListBase
*/
public service: TestListService = new TestListService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof TestListBase
*/
public appEntityService: IBIZBOOKEntityService = new IBIZBOOKEntityService({ $store: this.$store });
/**
* 转化数据
*
* @param {any} args
* @memberof TestListBase
*/
public transformData(args: any) {
let _this: any = this;
if(_this.service && _this.service.handleRequestData instanceof Function && _this.service.handleRequestData('transform',_this.context,args)){
return _this.service.handleRequestData('transform',_this.context,args)['data'];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof TestListBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof TestListBase
*/
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();
}
})
}
}
/**
* 处理部件事件
*
* @memberof TestListBase
*/
public async handleCtrlEvents(eventName: string, args: any = {}): Promise<boolean> {
const actionData = {
data: this.getData() || {},
context: Util.deepCopy(this.context),
viewparams: Util.deepCopy(this.viewparams),
xData: this
}
let result: boolean = true;
Object.assign(actionData, args);
if (!result) {
return false;
}
this.$emit(eventName, actionData);
return true;
}
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof TestListBase
*/
public codeListService:CodeListService = new CodeListService();
/**
* 界面UI服务对象
*
* @type {IBIZBOOKUIService}
* @memberof TestListBase
*/
public appUIService:IBIZBOOKUIService = new IBIZBOOKUIService();
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof TestListBase
*/
public getDatas(): any[] {
return this.selections;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof TestListBase
*/
public getData(): any {
return null;
}
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof TestListBase
*/
@Prop({ default: false }) public isSelectFirstDefault!: boolean;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof TestListBase
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--create
*
* @type {string}
* @memberof TestListBase
*/
@Prop() public createAction!: string;
/**
* 部件行为--remove
*
* @type {string}
* @memberof TestListBase
*/
@Prop() public removeAction!: string;
/**
* 部件行为--update
*
* @type {string}
* @memberof TestListBase
*/
@Prop() public updateAction!: string;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof TestListBase
*/
@Prop() public fetchAction!: string;
/**
* 父引用类型
*
* @type {boolean}
* @memberof TestListBase
*/
@Prop({default:true}) public parentType: any;;
/**
* 打开新建数据视图
*
* @type {any}
* @memberof TestListBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof TestListBase
*/
@Prop() public opendata: any;
/**
* this引用
*
* @type {number}
* @memberof TestListBase
*/
public thisRef: any = this;
/**
* 当前页
*
* @type {number}
* @memberof TestListBase
*/
public curPage: number = 1;
/**
* 数据
*
* @type {any[]}
* @memberof TestListBase
*/
public items: any[] = [];
/**
* 是否支持分页
*
* @type {boolean}
* @memberof TestListBase
*/
public isEnablePagingBar: boolean = true;
/**
* 分页条数
*
* @type {number}
* @memberof TestListBase
*/
public limit: number = 1000;
/**
* 总条数
*
* @type {number}
* @memberof TestListBase
*/
public totalRecord: number = 0;
/**
* 加载的数据是否附加在items之后
*
* @type {boolean}
* @memberof TestListBase
*/
public isAddBehind:boolean = false;
/**
* 是否有滚动条
*
* @type {boolean}
* @memberof TestListBase
*/
public isScrollBar: boolean = false;
/**
* 排序方向
*
* @type {string}
* @memberof TestListBase
*/
public sortDir:string = '';
/**
* 排序字段
*
* @type {string}
* @memberof TestListBase
*/
public sortField: string = '';
/**
* 选中数组
* @type {Array<any>}
* @memberof TestListBase
*/
public selections: Array<any> = [];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof TestListBase
*/
public appStateEvent: Subscription | undefined;
/**
* Vue声明周期,组件挂载完毕
*
* @memberof TestListBase
*/
public mounted () {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof TestListBase
*/
public afterMounted () {
const loadMoreCallBack:any = this.throttle(this.loadMore,3000);
this.$el.addEventListener('scroll', ()=> {
if(this.$el.scrollHeight > this.$el.clientHeight) {
this.isScrollBar = true;
} else {
this.isScrollBar = false;
}
if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) {
loadMoreCallBack();
}
})
}
/**
* Vue声明周期,组件创建完毕
*
* @memberof TestListBase
*/
public created() {
this.afterCreated()
}
/**
* 执行created后的逻辑
*
* @memberof TestListBase
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(this.name, tag)) {
return;
}
if (Object.is(action,'load')) {
this.curPage = 1;
this.items = [];
this.load(data);
}
if (Object.is(action,'refresh')) {
this.refresh(data);
}
});
}
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"IBIZBOOK")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh([data]);
}
})
}
}
/**
* vue 生命周期
*
* @memberof TestListBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof TestListBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
}
/**
* 加载更多
*
* @memberof TestListBase
*/
public loadMore(){
if(this.totalRecord>this.items.length){
this.curPage = ++this.curPage;
this.isAddBehind = true;
this.load({});
}
}
/**
* 刷新
*
* @param {*} [args={}]
* @memberof Main
*/
public refresh(args?: any) {
this.isAddBehind = true;
this.load(args);
}
/**
* 列表数据加载
*
* @public
* @param {*} [arg={}]
* @memberof TestListBase
*/
public async load(opt: any = {}): Promise<any> {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr6ListView' + (this.$t('app.list.notConfig.fetchAction') as string) });
return;
}
const arg: any = {...opt};
const page: any = {};
if (this.isEnablePagingBar) {
Object.assign(page, { page: this.curPage-1, size: this.limit });
}
// 设置排序
if (!Object.is(this.sortDir, '') && !Object.is(this.sortField, '')) {
const sort: string = this.sortField+","+this.sortDir;
Object.assign(page, { sort: sort });
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
let tempViewParams:any = parentdata.viewparams ? parentdata.viewparams : {};
if(this.viewparams){
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
}
Object.assign(arg, { viewparams: tempViewParams });
const tempContext: any = Util.deepCopy(this.context);
if (!(await this.handleCtrlEvents('onbeforeload', { data: arg }))) {
return false;
}
try {
const response: any = await this.service.search(this.fetchAction, tempContext, arg, this.showBusyIndicator);
if (!response || response.status !== 200) {
if (!(await this.handleCtrlEvents('onloaderror', { data: response && response.data ? response.data : arg }))) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return response;
}
if (!(await this.handleCtrlEvents('onloadsuccess', { data: response.data }))) {
return;
}
const data: any = response.data;
if(!this.isAddBehind){
this.items = [];
}
if (data && data.length > 0) {
let datas = JSON.parse(JSON.stringify(data));
datas.map((item: any) => {
Object.assign(item, { isselected: false });
});
this.totalRecord = response.total;
this.items.push(...datas);
this.items = this.arrayNonRepeatfy(this.items);
}
this.isAddBehind = false;
this.items.forEach((item: any) => {
Object.assign(item,this.getActionState(item));
})
this.$emit('load', this.items);
//在导航视图中,如已有选中数据,则右侧展开已选中数据的视图,如无选中数据则默认选中第一条
if(this.isSelectFirstDefault){
if(this.selections && this.selections.length > 0){
this.selections.forEach((select: any)=>{
const index = this.items.findIndex((item:any) => Object.is(item.srfkey,select.srfkey));
if(index != -1){
this.handleClick(this.items[index]);
}
})
}else{
this.handleClick(this.items[0]);
}
}
return response;
} catch (response: any) {
if (!(await this.handleCtrlEvents('onloaderror', { data: response && response.data ? response.data : arg }))) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}
}
/**
* 列表数据去重
*
* @param {Array<any>} [arr]
* @returns {void}
* @memberof TestListBase
*/
public arrayNonRepeatfy(arr:Array<any>) {
let map = new Map();
let array = new Array();
for (let i = 0; i < arr.length; i++) {
map .set(arr[i].srfkey, arr[i]);
}
map.forEach((value:any, key:string, map:any) => {
array.push(value);
});
return array ;
}
/**
* 节流
*
* @param {Array<any>} [arr]
* @returns {void}
* @memberof TestListBase
*/
public throttle(fn:any, wait:number){
let time = 0;
return () =>{
let now = Date.now()
let args = arguments;
if(now - time > wait){
fn.apply(this, args)
time = now;
}
}
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof TestListBase
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr6ListView' + (this.$t('app.list.notConfig.removeAction') as string) });
return;
}
if (datas.length === 0) {
return;
}
let dataInfo = '';
datas.forEach((record: any, index: number) => {
let srfmajortext = record.srfmajortext;
if (index < 5) {
if (!Object.is(dataInfo, '')) {
dataInfo += '、';
}
dataInfo += srfmajortext;
} else {
return false;
}
});
if (datas.length < 5) {
dataInfo = dataInfo + ' 共' + datas.length + '条数据';
} else {
dataInfo = dataInfo + '...' + ' 共' + datas.length + '条数据';
}
const removeData = async () => {
let keys: any[] = [];
datas.forEach((data: any) => {
keys.push(data.srfkey);
});
let _removeAction = keys.length > 1 ? 'removeBatch' : this.removeAction ;
const context:any = JSON.parse(JSON.stringify(this.context));
if (!(await this.handleCtrlEvents('onbeforeremove', { data: this.items }))) {
return;
}
try {
const response: any = await this.service.delete(_removeAction,Object.assign(context,{ ibizbook: keys.join(';') }),Object.assign({ ibizbook: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator);
if (!response || response.status !== 200) {
if (!(await this.handleCtrlEvents('onremoveerror', { data: response && response.data ? response.data : datas }))) {
return;
}
this.$Notice.error({ title: '', desc: (this.$t('app.commonWords.delDataFail') as string) + ',' + response.info });
return;
}
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
if (!(await this.handleCtrlEvents('onremovesuccess', { data: response.data }))) {
return;
}
//删除items中已删除的项
datas.forEach((data: any) => {
this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1);
return true;
}
});
});
this.$emit('remove', null);
this.selections = [];
return response;
} catch (response: any) {
if (!(await this.handleCtrlEvents('onremoveerror', { data: response && response.data ? response.data : datas }))) {
return;
}
if (response && response.status === 401) {
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
}
return response;
}
}
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({
title: (this.$t('app.commonWords.warning') as string),
content: (this.$t('app.list.confirmDel') as string) + ' ' + dataInfo + ',' + (this.$t('app.list.notRecoverable') as string) ,
onOk: () => {
removeData();
},
onCancel: () => { }
});
return removeData;
}
/**
* 保存
*
* @param {*} $event
* @returns {Promise<any>}
* @memberof TestListBase
*/
public async save(args: any[], params?: any, $event?: any, xData?: any){
let _this = this;
let successItems:any = [];
let errorItems:any = [];
let errorMessage:any = [];
if (!(await this.handleCtrlEvents('onbeforesave'))) {
return;
}
for (const item of _this.items) {
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr6ListView' + (this.$t('app.list.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
successItems.push(JSON.parse(JSON.stringify(response.data)));
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.warning') as string), desc: 'IBIZBOOKUsr6ListView' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
if(item.ibizbook){
Object.assign(this.context,{ibizbook:item.ibizbook});
}
let response = await this.service.add(this.updateAction,JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
successItems.push(JSON.parse(JSON.stringify(response.data)));
}
}
} catch (error) {
errorItems.push(JSON.parse(JSON.stringify(item)));
errorMessage.push(error);
}
}
this.$emit('save', successItems);
this.refresh();
if(errorItems.length === 0){
if (!(await this.handleCtrlEvents('onsavesuccess', { data: successItems }))) {
return;
}
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
} else {
if (!(await this.handleCtrlEvents('onsaveerror', { data: successItems }))) {
return;
}
errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: (this.$t('app.commonWords.saveFailed') as string), desc: item.majorentityname+ (this.$t('app.commonWords.saveFailed') as string) + '!' });
console.error(errorMessage[index]);
});
}
return successItems;
}
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof TestListBase
*/
public onPanelDataChange(item:any,$event:any) {
Object.assign(item, $event, {rowDataState:'update'});
}
/**
* 选择数据
* @memberof TestListBase
*
*/
public handleClick(args: any) {
if(this.parentType && this.parentType === "listExpBar") {
const flag = args.isselected;
this.clearSelection();
if(!flag) {
args.isselected = !args.isselected;
} else {
args.isselected = flag;
}
} else {
args.isselected = !args.isselected;
}
this.selectchange();
}
/**
* 双击数据
* @memberof TestListBase
*
*/
public handleDblClick(args: any) {
this.$emit('rowdblclick', args);
}
/**
* 触发事件
* @memberof TestListBase
*
*/
public selectchange() {
this.handleCtrlEvents('onselectionchange').then((res: boolean) => {
if (!res) {
return;
}
this.selections = [];
this.items.map((item: any) => {
if (item.isselected) {
this.selections.push(item);
}
});
this.$emit('selectionchange', this.selections);
})
}
/**
* 清除当前所有选中状态
*
* @memberof TestListBase
*/
public clearSelection(){
this.items.map((item: any) => {
Object.assign(item, { isselected: false });
});
}
/**
* 操作栏模型数据
*
* @type {*}
* @memberof TestListBase
*/
public actionModel:any ={
};
/**
* 操作列界面行为
*
* @param {*} data
* @param {*} tag
* @param {*} $event
* @memberof TestListBase
*/
public uiAction(data: any, tag: any, $event: any) {
$event.stopPropagation();
}
/**
* 获取界面行为权限状态
*
* @param {*} data 当前列表行数据
* @memberof TestListBase
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.actionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
}
}
</script>
<style lang='less'>
@import './test-list-list.less';
</style>
\ No newline at end of file
/**
* TestList 部件模型
*
* @export
* @class TestListModel
*/
export default class TestListModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof TestListListMode
*/
public getDataItems(): any[] {
return [
{
name: 'type',
prop: 'type',
dataType: 'TEXT',
codelist:{tag:'BookType',codelistType:'STATIC'},
},
{
name: 'srfkey',
prop: 'ibizbookid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'ibizbookname',
dataType: 'TEXT',
},
{
name: 'srfmstag',
},
{
name: 'ibizbook',
prop: 'ibizbookid',
dataType: 'FONTKEY',
},
{
name: 'n_ibizbookname_like',
prop: 'n_ibizbookname_like',
dataType: 'QUERYPARAM'
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'sort',
prop:'sort'
},
{
name:'page',
prop:'page'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import TestListModel from './test-list-list-model';
/**
* TestList 部件服务对象
*
* @export
* @class TestListService
*/
export default class TestListService extends ControlService {
/**
* 图书服务对象
*
* @type {IBIZBOOKService}
* @memberof TestListService
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService();
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof TestListService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of TestListService.
*
* @param {*} [opts={}]
* @memberof TestListService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new TestListModel();
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof TestListService
*/
@Errorlog
public search(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then(async (response) => {
await this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof TestListService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.remove(Context,Data , isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof TestListService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof TestListService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_appEntityService.Update(Context,Data,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
}
\ No newline at end of file
// this is less
.app-list {
height:100%;
flex-grow: 1;
overflow-y: auto;
.el-collapse-item__header.is-active{
color: #409eff;
background-color: #ecf5ff;
}
.el-collapse{
.el-collapse-item{
.el-collapse-item__wrap{
.el-collapse-item__content{
padding: 10px 0 10px 0;
}
}
}
}
.app-list-item {
line-height: 34px;
padding: 12px 6px;
min-height: 24px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f0f0f0;
.app-list-item-content {
width: 70%;
display: flex;
align-items: center;
.item-icon {
width: 40px;
height: 40px;
margin-right: 14px;
img {
width: 40px;
height: 40px;
border-radius: 50%;
}
}
.item-content-text {
display: flex;
flex-direction: column;
width: 80%;
.item-title {
font-size: 18px;
font-weight: bold;
}
.item-description{
height: 34px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.item-subtext {
color: #8c8c8c;
}
}
}
.app-list-item-date {
position: relative;
color: #8c8c8c;
}
}
.app-list-item.isSelect {
background: #ecf5ff;
border-radius: 2px;
border-color: rgb(197, 197, 197);
}
.app-list-item:hover {
background: #ecf5ff;
}
.loadmore {
text-align: center;
padding: 10px;
text-decoration: underline;
color: #82bff7;
cursor: default;
}
}
.app-list-empty {
height:100%;
color: #909399;
display: flex;
justify-content: center;
align-items: center;
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import TestListBase from './test-list-list-base.vue';
import layout_list_itempanel from '@widgets/ibizbook/test-list-panel/test-list-panel.vue';
@Component({
components: {
layout_list_itempanel,
}
})
export default class TestList extends TestListBase {
}
</script>
\ No newline at end of file
<template>
<div class="app-layoutpanel TestList" v-loading="isLayoutLoadding" :style="{width: '100%', height: '100%', overflow: 'auto'}">
<template v-if="!isLayoutLoadding">
</template>
</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 AppCenterService from "@service/app/app-center-service";
import IBIZBOOKEntityService from '@/service/ibizbook/ibizbook-service';
import TestListService from './test-list-panel-service';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service';
import { PanelDetailModel,PanelRawitemModel,PanelTabPanelModel,PanelTabPageModel,PanelFieldModel,PanelContainerModel,PanelControlModel,PanelUserControlModel,PanelButtonModel } from '@/model/panel-detail';
import TestListModel from './test-list-panel-model';
import CodeListService from "@/codelist/codelist-service";
import UIService from '@/uiservice/ui-service';
@Component({
components: {
}
})
export default class TestListBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof TestListBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof TestListBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof TestListBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof TestListBase
*/
@Prop() public viewparams!: any;
/**
* 视图操作参数(父级)
*
* @type {*}
* @memberof TestListBase
*/
@Prop() public pViewCtx!: any;
/**
* 视图操作参数
*
* @type {*}
* @memberof TestListBase
*/
public viewCtx: any = {};
/**
* 监听视图操作参数变化
*
* @type {*}
* @memberof TestListBase
*/
@Watch('pViewCtx', { immediate: true, deep: true })
public onViewCtxChange(newVal: any, oldVal: any) {
Object.assign(this.viewCtx, newVal, { xData: this, ctrl: this });
}
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof TestListBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof TestListBase
*/
public getControlType(): string {
return 'PANEL'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof TestListBase
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {TestListService}
* @memberof TestListBase
*/
public service: TestListService = new TestListService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof TestListBase
*/
public appEntityService: IBIZBOOKEntityService = new IBIZBOOKEntityService({ $store: this.$store });
/**
* 转化数据
*
* @param {any} args
* @memberof TestListBase
*/
public transformData(args: any) {
let _this: any = this;
if(_this.service && _this.service.handleRequestData instanceof Function && _this.service.handleRequestData('transform',_this.context,args)){
return _this.service.handleRequestData('transform',_this.context,args)['data'];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof TestListBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof TestListBase
*/
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();
}
})
}
}
/**
* 处理部件事件
*
* @memberof TestListBase
*/
public async handleCtrlEvents(eventName: string, args: any = {}): Promise<boolean> {
const actionData = {
data: this.getData() || {},
context: Util.deepCopy(this.context),
viewparams: Util.deepCopy(this.viewparams),
xData: this
}
let result: boolean = true;
Object.assign(actionData, args);
if (!result) {
return false;
}
this.$emit(eventName, actionData);
return true;
}
/**
* 接口实现
*
* @returns {any[]}
* @memberof TestListBase
*/
getDatas(): any[] {
if (!this.layoutData) {
return [];
}
return [this.layoutData];
}
/**
* 接口实现
*
* @returns {*}
* @memberof TestListBase
*/
getData() {
return this.layoutData;
}
/**
* 父级部件引用
*
* @type {*}
* @memberof TestListBase
*/
@Prop() public parentRef?: any;
/**
* 面板数据对象
*
* @type {*}
* @memberof TestListBase
*/
@Prop() public inputData?: any;
/**
* 操作栏模型数据
*
* @type {*}
* @memberof TestListBase
*/
@Prop() public actionModel?: any;
/**
* UI数据对象
*
* @type {*}
* @memberof TestListBase
*/
public data:any = {};
/**
* 数据模型对象
*
* @type {TestListModel}
* @memberof TestListBase
*/
public dataModel:TestListModel = new TestListModel();
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof TestListBase
*/
public codeListService:CodeListService = new CodeListService();
/**
* 界面UI服务对象
*
* @type {IBIZBOOKUIService}
* @memberof TestListBase
*/
public appUIService:IBIZBOOKUIService = new IBIZBOOKUIService();
/**
* 视图布局顶级成员名称
*
* @public
* @memberof List_itempanelBase
*/
public rootLayoutDetailNames: string[] = [ ];
/**
* 视图布局面板项模型对象
*
* @public
* @memberof List_itempanelBase
*/
public layoutItems:any = {
}
/**
* 布局面板是否加载
*
* @public
* @memberof List_itempanelBase
*/
public isLayoutLoadding: boolean = false;
/**
* 布局面板数据
*
* @public
* @memberof List_itempanelBase
*/
public layoutData:any = {};
/**
* 布局面板模型对象
*
* @public
* @memberof List_itempanelBase
*/
public layoutModelDetails:any = {};
/**
* 初始化布局
*
* @public
* @memberof List_itempanelBase
*/
public async initLayout() {
if (this.rootLayoutDetailNames.length > 0) {
for (let i = 0; i < this.rootLayoutDetailNames.length; i++) {
const name = this.rootLayoutDetailNames[i];
const rootItem = this.layoutItems[name];
if (!rootItem) {
return;
}
await this.initLayoutItem(rootItem);
}
}
return true;
}
/**
* 初始化布局项
*
* @public
* @memberof List_itempanelBase
*/
public async initLayoutItem(layoutModelItem: any, index: number = 0) {
const { name } = layoutModelItem;
const layoutModelDetail = Util.getLayoutItemInstance(layoutModelItem);
if (!index) {
await layoutModelDetail.load(this.context, this.viewparams);
this.$set(this.layoutModelDetails, name, layoutModelDetail);
this.$set(this.layoutData, name, layoutModelDetail.getData());
} else {
layoutModelDetail.setIndex(index);
await layoutModelDetail.load(this.context, this.viewparams);
this.$set(this.layoutModelDetails, `${name}_${index}`, layoutModelDetail);
this.$set(this.layoutData, `${name}_${index}`, layoutModelDetail.getData());
}
if (layoutModelDetail && layoutModelDetail.details) {
if (layoutModelDetail.dataRegionType === 'MULTIDATA') {
const multiData = layoutModelDetail.getData();
if (multiData && multiData.length > 0) {
for (let i = 0; i < multiData.length; i++) {
for (let j = 0; j < layoutModelDetail.details.length; j++) {
const key = layoutModelDetail.details[j];
if (this.layoutItems[key]) {
await this.initLayoutItem(this.layoutItems[key], i);
}
}
}
}
} else {
for (let i = 0; i < layoutModelDetail.details.length; i++) {
const key = layoutModelDetail.details[i];
if (this.layoutItems[key]) {
await this.initLayoutItem(this.layoutItems[key],index);
}
}
}
}
}
/**
* 计算面板按钮权限状态
*
* @public
* @memberof List_itempanelBase
*/
public computeButtonAuthState() {
Object.values(this.layoutModelDetails).forEach((layoutModel: any) => {
if (layoutModel.itemType == 'BUTTON') {
layoutModel.computeActionAuthState();
}
})
}
/**
* 监听数据对象
*
* @memberof TestListBase
*/
@Watch('inputData', { deep: true, immediate: true } )
public onInputDataChange(newVal: any, oldVal: any){
if(newVal){
this.computedUIData(newVal);
}
}
/**
* 生命周期
*
* @memberof TestListBase
*/
public mounted () {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof TestListBase
*/
public afterMounted () {
const _this: any = this;
_this.initLayout().then((result: any) => {
_this.isLayoutLoadding = false;
});
}
/**
* 计算UI展示数据
*
* @param codelistArray 代码表模型数组
* @memberof TestListBase
*/
public computedUIData(newVal:any){
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){
this.dataModel.getDataItems().forEach((item:any) =>{
this.data[item.prop] = newVal[item.prop];
})
}
}
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof TestListBase
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any){
if (this.parentRef.opendata && this.parentRef.opendata instanceof Function) {
this.parentRef.opendata(args,fullargs,params, $event, xData);
}
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof TestListBase
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
if (this.parentRef.newdata && this.parentRef.newdata instanceof Function) {
this.parentRef.newdata(args,fullargs,params, $event, xData);
}
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof TestListBase
*/
public async remove(datas: any[]): Promise<any> {
if (this.parentRef.remove && this.parentRef.remove instanceof Function) {
return this.parentRef.remove(datas);
}
}
/**
* 刷新
*
* @param {*} [args={}]
* @memberof TestListBase
*/
public refresh(args: any = {}) {
if (this.parentRef.refresh && this.parentRef.refresh instanceof Function) {
this.parentRef.refresh(args);
}
}
/**
* 处理值改变
*
* @public
* @params args 改变数据
* @params index 多数据容器下标
* @memberof List_itempanelBase
*/
public handleValueChange(args: { name: string, value: any }, index?: number) {
if (!args || !args.name || Object.is(args.name, '') || !this.layoutData.hasOwnProperty(args.name)) {
return;
}
const { name, value } = args;
this.layoutData[name] = value;
this.layoutModelDetails[name].setData(value);
this.panelLogic(name, index);
this.computeButtonAuthState();
this.panelEditItemChange(name, value);
}
/**
* 面板编辑项值变化后续操作
*
* @public
* @param property 编辑项名
* @param value 编辑项值
* @returns {void}
* @memberof TestListBase
*/
public panelEditItemChange(property: string, value: any){
// 面板数据变化事件
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){
let modelitem =this.dataModel.getDataItems().find((item:any) =>{
return item.name === property;
})
if(modelitem){
this.$emit('panelDataChange',{[modelitem.prop]: value});
}
}
}
/**
* 面板逻辑
*
* @public
* @params name 改变项名称
* @params index 多数据容器下标
* @memberof TestListBase
*/
public panelLogic(name: string, index?: number): void {
if (name && (index || index === 0)) {
name = name.replace(`_${index}`,"");
}
}
/**
* 处理按钮点击
*
* @public
* @memberof List_itempanelBase
*/
public handleButtonClick(name: string, $event?: any) {
let datas: any[] = [];
const data: any = this.layoutModelDetails[name].getData();
if (data) {
if (data instanceof Array) {
datas = [...data];
} else {
datas = [data];
}
}
const xData: any = this.layoutModelDetails[name].getDataArea();
const paramJO: any = {};
const contextJO: any = {};
const _this: any = this;
}
}
</script>
<style lang='less'>
@import './test-list-panel.less';
</style>
/**
* TestList 部件模型
*
* @export
* @class TestListModel
*/
export default class TestListModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof TestListModel
*/
public getDataItems(): any[] {
return [
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* TestList 部件服务对象
*
* @export
* @class TestListService
*/
export default class TestListService extends ControlService {
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import TestListBase from './test-list-panel-base.vue';
@Component({
components: {
}
})
export default class TestList extends TestListBase {
}
</script>
\ No newline at end of file
......@@ -1081,15 +1081,6 @@ export default class UsrBase extends Vue implements ControlInterface {
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}
const post: Promise<any> =
post.then((response: any) => {
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
/**
......
......@@ -1118,15 +1118,6 @@ export default class Usr2Base extends Vue implements ControlInterface {
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}
const post: Promise<any> =
post.then((response: any) => {
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
/**
......
......@@ -904,15 +904,6 @@ export default class Usr3Base extends Vue implements ControlInterface {
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}
const post: Promise<any> =
post.then((response: any) => {
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
/**
......
......@@ -780,15 +780,6 @@ export default class Usr4Base extends Vue implements ControlInterface {
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}
const post: Promise<any> =
post.then((response: any) => {
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
/**
......
......@@ -879,15 +879,6 @@ export default class Usr5Base extends Vue implements ControlInterface {
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}
const post: Promise<any> =
post.then((response: any) => {
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
/**
......
......@@ -764,15 +764,6 @@ export default class IndexTypeBase extends Vue implements ControlInterface {
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}
const post: Promise<any> =
post.then((response: any) => {
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
/**
......
......@@ -818,15 +818,6 @@ export default class CardNavigationBase extends Vue implements ControlInterface
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}
const post: Promise<any> =
post.then((response: any) => {
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
/**
......
......@@ -318,7 +318,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderSF1GridViewBase
* @memberof IBIZOrderPickupGridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
......@@ -461,20 +461,6 @@ export default class MainBase extends Vue implements ControlInterface {
return this.selections[0];
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public opendata: any;
/**
* 是否嵌入关系界面
......@@ -1009,7 +995,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (!this.fetchAction) {
this.$Notice.error({
title: this.$t("app.commonWords.wrong") as string,
desc: "IBIZOrderSF1GridView" + (this.$t("app.gridpage.notConfig.fetchAction") as string),
desc: "IBIZOrderPickupGridView" + (this.$t("app.gridpage.notConfig.fetchAction") as string),
});
return;
}
......@@ -1138,7 +1124,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (!this.removeAction) {
this.$Notice.error({
title: (this.$t('app.commonWords.wrong') as string),
desc: 'IBIZOrderSF1GridView' + (this.$t('app.gridpage.notConfig.removeAction') as string)
desc: 'IBIZOrderPickupGridView' + (this.$t('app.gridpage.notConfig.removeAction') as string)
});
return;
}
......@@ -1252,7 +1238,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public addBatch(arg: any = {}): void {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
}
if(!arg){
......@@ -2183,7 +2169,7 @@ export default class MainBase extends Vue implements ControlInterface {
try {
if (Object.is(item.rowDataState, 'create')) {
if (!this.createAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
} else {
Object.assign(item, { viewparams: this.viewparams });
const tempContext = Util.deepCopy(this.context);
......@@ -2192,7 +2178,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}else if (Object.is(item.rowDataState, 'update')){
if (!this.updateAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
} else {
Object.assign(item, { viewparams: this.viewparams });
const tempContext = Util.deepCopy(this.context);
......@@ -2268,7 +2254,7 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.loaddraftAction){
this.$Notice.error({
title: (this.$t('app.commonWords.wrong') as string),
desc: 'IBIZOrderSF1GridView' + (this.$t('app.gridpage.notConfig.loaddraftAction') as string)
desc: 'IBIZOrderPickupGridView' + (this.$t('app.gridpage.notConfig.loaddraftAction') as string)
});
return;
}
......
......@@ -104,21 +104,6 @@ export default class MainModel {
prop: 'n_ibizordername_like',
dataType: 'QUERYPARAM'
},
{
name: 'n_orderstate_eq',
prop: 'n_orderstate_eq',
dataType: 'QUERYPARAM'
},
{
name: 'n_ordertime_gt',
prop: 'n_ordertime_gt',
dataType: 'QUERYPARAM'
},
{
name: 'n_ordertime_lt',
prop: 'n_ordertime_lt',
dataType: 'QUERYPARAM'
},
{
name:'size',
......
......@@ -764,15 +764,6 @@ export default class IndexTypeBase extends Vue implements ControlInterface {
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}
const post: Promise<any> =
post.then((response: any) => {
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
/**
......
......@@ -4299,6 +4299,12 @@
"name" : "图书实体树视图(树表格)",
"realModelSubType" : "DETREEVIEW",
"realModelType" : "PSDEVIEWBASE"
}, {
"codeName" : "Usr6ListView",
"logicName" : "图书实体列表视图(项布局面板)",
"name" : "图书实体列表视图(项布局面板)",
"realModelSubType" : "DELISTVIEW",
"realModelType" : "PSDEVIEWBASE"
}, {
"codeName" : "Usr2CalendarView",
"logicName" : "图书实体日历视图(时间轴)",
......
{
"codeName" : "TestList",
"controlType" : "LIST",
"getCreatePSControlAction" : {
"modelref" : true,
"id" : "create"
},
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK/PSLISTS/TestList.json",
"getFetchPSControlAction" : {
"modelref" : true,
"id" : "fetch"
},
"getGetPSControlAction" : {
"modelref" : true,
"id" : "load"
},
"groupMode" : "NONE",
"hookEventNames" : [ "ROWDBLCLICK", "SELECTIONCHANGE", "REMOVE", "LOAD", "BEFORELOAD" ],
"getItemPSLayoutPanel" : {
"codeName" : "TestList",
"controlType" : "PANEL",
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK/PSPANELS/TestList.json",
"layoutMode" : "TABLE_24COL",
"logicName" : "项布局面板项布局面板",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSControlParam" : { },
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"name" : "list_itempanel",
"modelid" : "657FB036-73B2-4485-B8C6-DF54910B43E4",
"modeltype" : "PSSYSVIEWPANEL"
},
"logicName" : "testList",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSControlLogics" : [ {
"eventNames" : "ROWDBLCLICK;SELECTIONCHANGE;REMOVE;LOAD;BEFORELOAD",
"logicTag" : "list",
"logicType" : "APPVIEWENGINE",
"name" : "engine_list",
"getPSAppViewEngine" : {
"modelref" : true,
"id" : "engine"
}
} ],
"getPSDEDataImport" : {
"modelref" : true,
"id" : "DataImport"
},
"getPSDEListDataItems" : [ {
"dataType" : 25,
"getFrontPSCodeList" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPCODELISTS/BookType.json"
},
"name" : "type",
"getPSAppDEField" : {
"name" : "TYPE",
"codeName" : "Type"
}
}, {
"dataType" : 25,
"name" : "srfkey",
"getPSAppDEField" : {
"name" : "IBIZBOOKID",
"codeName" : "IBIZBOOKId"
}
}, {
"dataType" : 25,
"name" : "srfmajortext",
"getPSAppDEField" : {
"name" : "IBIZBOOKNAME",
"codeName" : "IBIZBOOKName"
}
}, {
"dataType" : 25,
"name" : "srfmstag"
} ],
"pagingSize" : 1000,
"getRemovePSControlAction" : {
"modelref" : true,
"id" : "remove"
},
"getUpdatePSControlAction" : {
"modelref" : true,
"id" : "update"
},
"hasWFDataItems" : false,
"enableGroup" : false,
"enableRowEdit" : false,
"enableRowEditGroup" : false,
"enableRowEditOrder" : false,
"enableRowNew" : false,
"noSort" : false,
"showHeader" : true,
"modelid" : "62CC847C-E448-43B1-A273-FDC75C1E6222",
"modeltype" : "PSDELIST"
}
\ No newline at end of file
{
"codeName" : "TestList",
"controlType" : "PANEL",
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK/PSPANELS/TestList.json",
"layoutMode" : "TABLE_24COL",
"logicName" : "项布局面板项布局面板",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"modelid" : "657FB036-73B2-4485-B8C6-DF54910B43E4",
"modeltype" : "PSSYSVIEWPANEL"
}
\ No newline at end of file
{
"accUserMode" : 2,
"getCapPSLanguageRes" : {
"lanResTag" : "DE.LNAME.IBIZBOOK"
},
"caption" : "图书",
"codeName" : "IBIZBOOKUsr6ListView",
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKUsr6ListView.json",
"mDCtrlActiveMode" : 2,
"name" : "IBIZBOOKUsr6ListView",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSAppViewEngines" : [ {
"engineCat" : "VIEW",
"engineType" : "ListView",
"name" : "engine",
"getPSUIEngineParams" : [ {
"ctrlName" : "list",
"name" : "LIST",
"paramType" : "CTRL"
}, {
"appViewLogicName" : "opendata",
"name" : "OPENDATA",
"paramType" : "LOGIC"
}, {
"appViewLogicName" : "newdata",
"name" : "NEWDATA",
"paramType" : "LOGIC"
}, {
"ctrlName" : "searchform",
"name" : "SEARCHFORM",
"paramType" : "CTRL"
} ]
} ],
"getPSAppViewLogics" : [ {
"logicTrigger" : "CUSTOM",
"logicType" : "SYSUILOGIC",
"name" : "newdata",
"getPSAppUILogic" : {
"actionAfterWizard" : "DEFAULT",
"logicType" : "PREDEFINED",
"name" : "新建数据",
"getNewDataPSAppView" : {
"getRefPSAppView" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView.json",
"viewType" : "DEEDITVIEW"
}
},
"getPSAppUILogicRefViews" : [ {
"getRefPSAppView" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView.json",
"viewType" : "DEEDITVIEW"
}
} ],
"viewLogicType" : "APP_NEWDATA",
"batchAddOnly" : false,
"enableBatchAdd" : false,
"enableWizardAdd" : false
}
}, {
"logicTrigger" : "CUSTOM",
"logicType" : "SYSUILOGIC",
"name" : "opendata",
"getPSAppUILogic" : {
"logicType" : "PREDEFINED",
"name" : "打开数据",
"getOpenDataPSAppView" : {
"getRefPSAppView" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView.json",
"viewType" : "DEEDITVIEW"
}
},
"getPSAppUILogicRefViews" : [ {
"getRefPSAppView" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView.json",
"viewType" : "DEEDITVIEW"
}
} ],
"viewLogicType" : "APP_OPENDATA",
"editMode" : true
}
} ],
"getPSAppViewRefs" : [ {
"name" : "NEWDATA",
"realTitle" : "图书编辑视图",
"getRealTitlePSLanguageRes" : {
"lanResTag" : "PAGE.TITLE.IBIZBOOK.EDITVIEW"
},
"getRefPSAppView" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView.json",
"viewType" : "DEEDITVIEW"
}
}, {
"name" : "EDITDATA",
"realTitle" : "图书编辑视图",
"getRealTitlePSLanguageRes" : {
"lanResTag" : "PAGE.TITLE.IBIZBOOK.EDITVIEW"
},
"getRefPSAppView" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView.json",
"viewType" : "DEEDITVIEW"
}
} ],
"getPSControls" : [ {
"codeName" : "QUICKSEARCHFORM",
"controlType" : "SEARCHFORM",
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK/PSSEARCHFORMS/QUICKSEARCHFORM.json",
"formStyle" : "SEARCHBAR",
"hookEventNames" : [ "SEARCH", "LOAD", "SAVE" ],
"logicName" : "快速搜索表单",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSControlHandler" : {
"getPSHandlerActions" : [ {
"actionType" : "FILTERACTION",
"name" : "load",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "FilterGet"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionType" : "FILTERACTION",
"name" : "loaddraft",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "FilterGetDraft"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionType" : "FILTERACTION",
"name" : "search",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "FilterSearch"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
} ],
"enableDEFieldPrivilege" : false,
"id" : "搜索表单处理器"
},
"getPSControlLogics" : [ {
"eventNames" : "SEARCH;LOAD;SAVE",
"logicTag" : "searchform",
"logicType" : "APPVIEWENGINE",
"name" : "engine_searchform",
"getPSAppViewEngine" : {
"modelref" : true,
"id" : "engine"
}
} ],
"getPSControlParam" : {
"autoLoad" : true,
"showBusyIndicator" : true,
"id" : "SEARCHFORM"
},
"getPSDEFormItems" : [ {
"id" : "n_ibizbookname_like",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZBOOKNAME",
"codeName" : "IBIZBOOKName"
}
} ],
"getPSDEFormPages" : [ {
"getCapPSLanguageRes" : {
"lanResTag" : "CONTROL.DEFORM.IBIZBOOK.QUICKSEARCHFORM.FORMPAGE.FORMPAGE1"
},
"caption" : "表单分页",
"codeName" : "formpage1",
"detailStyle" : "DEFAULT",
"detailType" : "FORMPAGE",
"name" : "formpage1",
"getPSDEFormDetails" : [ {
"getCapPSLanguageRes" : {
"lanResTag" : "CONTROL.DEFSFITEM.IBIZBOOK.N_IBIZBOOKNAME_LIKE"
},
"caption" : "图书名称(%)",
"codeName" : "n_ibizbookname_like",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "n_ibizbookname_like",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "IBIZBOOKNAME",
"codeName" : "IBIZBOOKName"
},
"getPSEditor" : {
"editorType" : "TEXTBOX",
"editorWidth" : 100.0,
"name" : "n_ibizbookname_like"
},
"getPSLayoutPos" : {
"colLG" : 12,
"colMD" : 12,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"showCaption" : true
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"infoGroupMode" : false
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"searchButtonStyle" : "DEFAULT",
"tabHeaderPos" : "TOP",
"enableAdvanceSearch" : false,
"enableAutoSearch" : false,
"enableFilterSave" : false,
"noTabHeader" : true,
"name" : "searchform",
"modelid" : "0d02cac81d96729eccac654df3a1950a",
"modeltype" : "PSDEFORM_SEARCHFORM"
}, {
"codeName" : "Usr6ListViewtoolbar",
"controlType" : "TOOLBAR",
"name" : "toolbar",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSControlParam" : {
"id" : "TOOLBAR"
},
"modelid" : "8f0dfc041422a40f4038eaf24f34a2a0_toolbar",
"modeltype" : "PSDETOOLBAR"
}, {
"codeName" : "TestList",
"controlType" : "LIST",
"getCreatePSControlAction" : {
"modelref" : true,
"id" : "create"
},
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK/PSLISTS/TestList.json",
"getFetchPSControlAction" : {
"modelref" : true,
"id" : "fetch"
},
"getGetPSControlAction" : {
"modelref" : true,
"id" : "load"
},
"groupMode" : "NONE",
"hookEventNames" : [ "ROWDBLCLICK", "SELECTIONCHANGE", "REMOVE", "LOAD", "BEFORELOAD" ],
"getItemPSLayoutPanel" : {
"codeName" : "TestList",
"controlType" : "PANEL",
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK/PSPANELS/TestList.json",
"layoutMode" : "TABLE_24COL",
"logicName" : "项布局面板项布局面板",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSControlParam" : { },
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"name" : "list_itempanel",
"modelid" : "657FB036-73B2-4485-B8C6-DF54910B43E4",
"modeltype" : "PSSYSVIEWPANEL"
},
"logicName" : "testList",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSControlHandler" : {
"getPSHandlerActions" : [ {
"actionName" : "Get",
"actionType" : "DEACTION",
"dataAccessAction" : "READ",
"name" : "load",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Get"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionName" : "Create",
"actionType" : "DEACTION",
"dataAccessAction" : "CREATE",
"name" : "create",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Create"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionName" : "Update",
"actionType" : "DEACTION",
"dataAccessAction" : "UPDATE",
"name" : "update",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Update"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionName" : "Remove",
"actionType" : "DEACTION",
"dataAccessAction" : "DELETE",
"name" : "remove",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Remove"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionType" : "DEDATASET",
"name" : "fetch",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "FetchDefault"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
} ],
"userDRAction" : "READ",
"enableDEFieldPrivilege" : false,
"id" : "列表控件处理器"
},
"getPSControlLogics" : [ {
"eventNames" : "ROWDBLCLICK;SELECTIONCHANGE;REMOVE;LOAD;BEFORELOAD",
"logicTag" : "list",
"logicType" : "APPVIEWENGINE",
"name" : "engine_list",
"getPSAppViewEngine" : {
"modelref" : true,
"id" : "engine"
}
} ],
"getPSControlParam" : {
"autoLoad" : true,
"showBusyIndicator" : true,
"id" : "LIST"
},
"getPSDEDataImport" : {
"modelref" : true,
"id" : "DataImport"
},
"getPSDEListDataItems" : [ {
"dataType" : 25,
"getFrontPSCodeList" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPCODELISTS/BookType.json"
},
"name" : "type",
"getPSAppDEField" : {
"name" : "TYPE",
"codeName" : "Type"
}
}, {
"dataType" : 25,
"name" : "srfkey",
"getPSAppDEField" : {
"name" : "IBIZBOOKID",
"codeName" : "IBIZBOOKId"
}
}, {
"dataType" : 25,
"name" : "srfmajortext",
"getPSAppDEField" : {
"name" : "IBIZBOOKNAME",
"codeName" : "IBIZBOOKName"
}
}, {
"dataType" : 25,
"name" : "srfmstag"
} ],
"pagingSize" : 1000,
"getRemovePSControlAction" : {
"modelref" : true,
"id" : "remove"
},
"getUpdatePSControlAction" : {
"modelref" : true,
"id" : "update"
},
"hasWFDataItems" : false,
"enableGroup" : false,
"enableRowEdit" : false,
"enableRowEditGroup" : false,
"enableRowEditOrder" : false,
"enableRowNew" : false,
"noSort" : false,
"showHeader" : true,
"name" : "list",
"modelid" : "62CC847C-E448-43B1-A273-FDC75C1E6222",
"modeltype" : "PSDELIST"
} ],
"getPSDEViewCodeName" : "Usr6ListView",
"getPSDEViewId" : "E3EF20CA-3B7B-4D43-A358-DC9CC6F0EBB9",
"getPSViewLayoutPanel" : {
"codeName" : "Layoutpanel",
"controlStyle" : "APPDELISTVIEW",
"controlType" : "VIEWLAYOUTPANEL",
"name" : "layoutpanel",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSControlParam" : { },
"layoutBodyOnly" : true,
"layoutPanel" : true,
"useDefaultLayout" : true
},
"title" : "图书列表视图",
"viewStyle" : "DEFAULT",
"viewType" : "DELISTVIEW",
"xDataControlName" : "list",
"enableDP" : true,
"enableFilter" : true,
"enableQuickSearch" : true,
"enableSearch" : true,
"modelid" : "8f0dfc041422a40f4038eaf24f34a2a0",
"modeltype" : "PSAPPDEVIEW"
}
\ No newline at end of file
......@@ -3725,6 +3725,24 @@
"layout" : "TABLE_24COL"
},
"tooltip" : "视图布局面板测试"
}, {
"accUserMode" : 2,
"caption" : "项布局面板测试",
"itemType" : "MENUITEM",
"name" : "menuitem189",
"getPSAppFunc" : {
"modelref" : true,
"id" : "AppFunc129"
},
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"tooltip" : "项布局面板测试"
}, {
"accUserMode" : 2,
"caption" : "按钮测试",
......
......@@ -2083,6 +2083,16 @@
"id" : "AppFunc128"
},
"tooltip" : "视图布局面板测试"
}, {
"accUserMode" : 2,
"caption" : "项布局面板测试",
"itemType" : "MENUITEM",
"name" : "menuitem189",
"getPSAppFunc" : {
"modelref" : true,
"id" : "AppFunc129"
},
"tooltip" : "项布局面板测试"
}, {
"accUserMode" : 2,
"caption" : "按钮测试",
......
......@@ -3199,6 +3199,16 @@
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZOrderUsr2GridView.json",
"viewType" : "DEGRIDVIEW"
}
}, {
"appFuncType" : "APPVIEW",
"codeName" : "AppFunc129",
"name" : "项布局面板测试",
"openMode" : "INDEXVIEWTAB",
"getPSAppView" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKUsr6ListView.json",
"viewType" : "DELISTVIEW"
}
}, {
"appFuncType" : "APPVIEW",
"codeName" : "AppFunc111",
......@@ -14268,6 +14278,12 @@
"viewType" : "DELISTVIEW",
"resource" : "IBIZOrderDetail",
"view" : "ListView"
}, {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKUsr6ListView.json",
"viewType" : "DELISTVIEW",
"resource" : "IBIZBOOK",
"view" : "Usr6ListView"
}, {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZSample0018GridView.json",
......@@ -18843,6 +18859,24 @@
"layout" : "TABLE_24COL"
},
"tooltip" : "视图布局面板测试"
}, {
"accUserMode" : 2,
"caption" : "项布局面板测试",
"itemType" : "MENUITEM",
"name" : "menuitem189",
"getPSAppFunc" : {
"modelref" : true,
"id" : "AppFunc129"
},
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"tooltip" : "项布局面板测试"
}, {
"accUserMode" : 2,
"caption" : "按钮测试",
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册