提交 1b65af00 编写于 作者: tony001's avatar tony001

新建、编辑预置逻辑

上级 bbd5d28d
......@@ -35,6 +35,12 @@
* @memberof ${srfclassname('${view.name}')}
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
<#if viewlogic.getPSAppUILogicRefViews?? && viewlogic.getPSAppUILogicRefViews()??>
<#list viewlogic.getPSAppUILogicRefViews() as appUILogicRefView>
<#if appUILogicRefView_index == 0><#assign curUILogicRefView = appUILogicRefView /></#if>
</#list>
</#if>
${curUILogicRefView.getCodeName()}
<#if viewlogic.isEnableWizardAdd()>
this.$Notice.warning({ title: '错误', desc: '向导添加未实现' });
<#elseif viewlogic.isEnableBatchAdd()>
......@@ -93,14 +99,17 @@
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
let tempContext = JSON.parse(JSON.stringify(this.context));
<#if dataview.isPSDEView()>
<#assign appDataEntity = dataview.getPSAppDataEntity()/>
delete curViewParam.${appDataEntity.getCodeName()?lower_case};
delete tempContext.${appDataEntity.getCodeName()?lower_case};
</#if>
if(args.length >0){
Object.assign(curViewParam,args[0]);
Object.assign(tempContext,args[0]);
}
<#-- BEGIN:导航参数 -->
<#-- END:导航参数 -->
<#-- BEGIN:准备参数 -->
<#-- BEGIN:是否应用实体视图 -->
<#if dataview.isPSDEView()>
......@@ -111,7 +120,7 @@
<#list dataview.getPSAppDERSPath(count_index) as deRSPath>
<#if deRSPath.getMajorPSAppDataEntity?? && deRSPath.getMajorPSAppDataEntity()??>
<#assign _dataEntity = deRSPath.getMajorPSAppDataEntity()/>
<#assign condition>${condition}curViewParam.${_dataEntity.getCodeName()?lower_case} && </#assign>
<#assign condition>${condition}tempContext.${_dataEntity.getCodeName()?lower_case} && </#assign>
</#if>
</#list>
</#list>
......@@ -176,20 +185,20 @@
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, curViewParam, deResParameters, parameters, args, _data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
<#elseif dataview.getOpenMode() == 'POPUPAPP'>
<#-- 打开独立程序弹出 -->
const _this: any = this;
const routePath = this.$viewTool.buildUpRoutePath(this.$route, curViewParam, deResParameters, parameters, args, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
window.open('./#'+routePath, '_blank');
<#elseif dataview.getOpenMode() = 'POPUPMODAL'>
<#-- 打开模态 -->
const _this: any = this;
const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = this.$appmodal.openModal(view, curViewParam, data);
let container: Subject<any> = this.$appmodal.openModal(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
......@@ -211,7 +220,7 @@
<#-- 打开抽屉 -->
const _this: any = this;
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, curViewParam, data);
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
......@@ -234,7 +243,7 @@
<#-- 打开气泡卡片 -->
const _this: any = this;
const openPopOver = (view: any, data: any) => {
let container: Subject<any> = this.$apppopover.openPop($event, view, curViewParam,data);
let container: Subject<any> = this.$apppopover.openPop($event, view, tempContext,data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
......
......@@ -14,6 +14,12 @@
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.name}(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
<#if viewlogic.getPSAppUILogicRefViews?? && viewlogic.getPSAppUILogicRefViews()??>
<#list viewlogic.getPSAppUILogicRefViews() as appUILogicRefView>
<#if appUILogicRefView_index == 0><#assign curUILogicRefView = appUILogicRefView /></#if>
</#list>
</#if>
${curUILogicRefView.getCodeName()}
<#if viewlogic.getOpenDataPSAppView()??>
<#assign dataview = viewlogic.getOpenDataPSAppView()/>
const data: any = {};
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册