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

lab_gzf 发布系统代码

上级 76a59a27
...@@ -201,9 +201,13 @@ export default { ...@@ -201,9 +201,13 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: { tbitem1_openquickcreateview: {
caption: "New", caption: "新建",
tip: "New", tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
}, },
tbitem4: { tbitem4: {
caption: "Edit", caption: "Edit",
......
...@@ -200,10 +200,14 @@ export default { ...@@ -200,10 +200,14 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: { tbitem1_openquickcreateview: {
caption: "新建", caption: "新建",
tip: "新建", tip: "新建",
}, },
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: { tbitem4: {
caption: "编辑", caption: "编辑",
tip: "编辑", tip: "编辑",
......
...@@ -3,6 +3,7 @@ import { Subject } from 'rxjs'; ...@@ -3,6 +3,7 @@ import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core'; import { GridViewBase } from '@/studio-core';
import IBizListService from '@/service/ibiz-list/ibiz-list-service'; import IBizListService from '@/service/ibiz-list/ibiz-list-service';
import GridViewEngine from '@engine/view/grid-view-engine'; import GridViewEngine from '@engine/view/grid-view-engine';
import IBizListUIService from '@/uiservice/ibiz-list/ibiz-list-ui-service';
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@service/app/codelist-service";
...@@ -67,8 +68,9 @@ export class IBizListGridViewBase extends GridViewBase { ...@@ -67,8 +68,9 @@ export class IBizListGridViewBase extends GridViewBase {
* @memberof IBizListGridView * @memberof IBizListGridView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem3: { name: 'tbitem3', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' }, class: '' }, tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-user-plus', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem4: { name: 'tbitem4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' }, tbitem4: { name: 'tbitem4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
tbitem6: { name: 'tbitem6', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' }, tbitem6: { name: 'tbitem6', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
...@@ -136,8 +138,8 @@ export class IBizListGridViewBase extends GridViewBase { ...@@ -136,8 +138,8 @@ export class IBizListGridViewBase extends GridViewBase {
* @memberof IBizListGridViewBase * @memberof IBizListGridViewBase
*/ */
public toolbar_click($event: any, $event2?: any): void { public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) { if (Object.is($event.tag, 'tbitem1_openquickcreateview')) {
this.toolbar_tbitem3_click(null, '', $event2); this.toolbar_tbitem1_openquickcreateview_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem4')) { if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2); this.toolbar_tbitem4_click(null, '', $event2);
...@@ -145,12 +147,6 @@ export class IBizListGridViewBase extends GridViewBase { ...@@ -145,12 +147,6 @@ export class IBizListGridViewBase extends GridViewBase {
if (Object.is($event.tag, 'tbitem6')) { if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2); this.toolbar_tbitem6_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) { if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2); this.toolbar_tbitem8_click(null, '', $event2);
} }
...@@ -261,7 +257,7 @@ export class IBizListGridViewBase extends GridViewBase { ...@@ -261,7 +257,7 @@ export class IBizListGridViewBase extends GridViewBase {
* @param {*} [$event] * @param {*} [$event]
* @memberof * @memberof
*/ */
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) { public toolbar_tbitem1_openquickcreateview_click(params: any = {}, tag?: any, $event?: any) {
// 参数 // 参数
// 取数 // 取数
let datas: any[] = []; let datas: any[] = [];
...@@ -278,7 +274,8 @@ export class IBizListGridViewBase extends GridViewBase { ...@@ -278,7 +274,8 @@ export class IBizListGridViewBase extends GridViewBase {
datas = [params]; datas = [params];
} }
// 界面行为 // 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBizList"); const curUIService:IBizListUIService = new IBizListUIService();
curUIService.IBizList_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"IBizList");
} }
/** /**
...@@ -337,62 +334,6 @@ export class IBizListGridViewBase extends GridViewBase { ...@@ -337,62 +334,6 @@ export class IBizListGridViewBase extends GridViewBase {
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBizList"); this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBizList");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"IBizList");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"IBizList");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -587,26 +528,6 @@ export class IBizListGridViewBase extends GridViewBase { ...@@ -587,26 +528,6 @@ export class IBizListGridViewBase extends GridViewBase {
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBizListGridViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 编辑 * 编辑
* *
...@@ -665,42 +586,6 @@ export class IBizListGridViewBase extends GridViewBase { ...@@ -665,42 +586,6 @@ export class IBizListGridViewBase extends GridViewBase {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
} }
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBizListGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBizListGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.newRow && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 删除 * 删除
* *
......
...@@ -159,6 +159,66 @@ export default class IBizListUIServiceBase extends UIService { ...@@ -159,6 +159,66 @@ export default class IBizListUIServiceBase extends UIService {
openDrawer(view, data); openDrawer(view, data);
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async IBizList_OpenQuickCreateView(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizlists', parameterName: 'ibizlist' },
];
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, context,data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
const _this: any = actionContext;
if(window.opener){
window.opener.postMessage({status:'OK',identification:'WF'},Environment.uniteAddress);
window.close();
}
return result.datas;
});
}
const view: any = {
viewname: 'ibiz-list-quick-create',
height: 0,
width: 0,
title: actionContext.$t('entities.ibizlist.views.quickcreate.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/** /**
* 获取指定数据的重定向页面 * 获取指定数据的重定向页面
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册