提交 2647c3d0 编写于 作者: JunZai's avatar JunZai

update

上级 a912e25e
......@@ -296,65 +296,6 @@ GanttElastic,
}
}
/**
* 获取编辑视图信息
*
* @param {*} $event 事件信息
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getEditView(type: string) {
let view: any = {};
switch(type){
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as ganttItem>
<#if ganttItem.getPSAppDataEntity()??>
<#assign _appde = ganttItem.getPSAppDataEntity() />
case "${ganttItem.getNodeType()}":
<#if ganttItem.getPSAppViewRefs()??>
<#list ganttItem.getPSAppViewRefs() as viewref>
<#if viewref.getName() == "EDITDATA" && viewref.getRefPSAppView()??>
<#assign editview = viewref.getRefPSAppView()/>
view = {
viewname: '${srffilepath2(editview.getCodeName())}',
height: ${editview.getHeight()?c},
width: ${editview.getWidth()?c},
title: this.<@getViewLanguageTitle editview />,
placement: '${editview.getOpenMode()}',
deResParameters: <#rt>
<#if editview.isPSDEView()>
[<#t>
<#if editview.getPSAppDERSPathCount() gt 0>
<#list editview.getPSAppDERSPath(editview.getPSAppDERSPathCount() - 1) as deRSPath>
<#assign majorPSAppDataEntity = deRSPath.getMajorPSAppDataEntity()/><#t>
{ pathName: '${srfpluralize(majorPSAppDataEntity.codeName)?lower_case}', parameterName: '${majorPSAppDataEntity.getCodeName()?lower_case}' }, <#t>
</#list>
</#if>
],<#lt>
<#else>
[],<#lt>
</#if>
parameters: <#rt>
[<#t>
<#if editview.isPSDEView()>
<#assign appDataEntity = editview.getPSAppDataEntity()/>
{ pathName: '${srfpluralize(appDataEntity.codeName)?lower_case}', parameterName: '${appDataEntity.getCodeName()?lower_case}' }, <#t>
{ pathName: '${editview.getPSDEViewCodeName()?lower_case}', parameterName: '${editview.getPSDEViewCodeName()?lower_case}' } <#t>
<#else>
{ pathName: '${editview.getCodeName()?lower_case}', parameterName: '${editview.getCodeName()?lower_case}' } <#t>
</#if>
],<#lt>
};
</#if>
</#list>
</#if>
break;
</#if>
</#list>
</#if>
}
return view;
}
/**
* 刷新
*
......@@ -412,44 +353,10 @@ GanttElastic,
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public taskClick({event, data}: {event: any, data: any}) {
let view: any = {};
let _context: any = Object.assign({},this.context);
const _this: any = this;
let key: string = data.id.split(';')[0];
switch(key) {
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as ganttItem>
<#if ganttItem.getPSAppDataEntity()??>
<#assign _appde = ganttItem.getPSAppDataEntity() />
case "${ganttItem.getNodeType()}":
_context.${_appde.getCodeName()?lower_case} = data.${_appde.getCodeName()?lower_case};
view = this.getEditView("${ganttItem.getNodeType()}");
break;
</#if>
</#list>
</#if>
}
if (!view.viewname) {
return;
}
// 根据打开模式打开视图
if (Object.is(view.placement, 'INDEXVIEWTAB') || Object.is(view.placement, '')) {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, this.context, view.deResParameters, view.parameters, [JSON.parse(JSON.stringify(_context))] , JSON.parse(JSON.stringify(this.viewparams)));
this.$router.push(routePath);
} else {
let container: Subject<any> = new Subject();
if (Object.is(view.placement, 'POPOVER')) {
container = this.$apppopover.openPop(data, view,JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
} else if (Object.is(view.placement, 'POPUPMODAL')) {
container = this.$appmodal.openModal(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
} else if (view.placement.startsWith('DRAWER')) {
container = this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
}
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
this.refresh();
});
if(_this[key + '_opendata'] instanceof Function) {
_this[key + '_opendata']([data]);
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册