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

Revert "行为执行之后逻辑格式调整 --- fix1"

This reverts commit 08b4251e.
上级 08b4251e
......@@ -97,7 +97,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#else>
let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
</#if>
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
}
<#-- 方法类型为FETCH -->
......@@ -105,14 +105,14 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
if(${condition}true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,tempData,isloading);
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
}
<#-- 方法类型为FETCHTEMP -->
<#elseif singleAppMethod.getMethodType() == "FETCHTEMP">
if(${condition}true){
let res:any = Http.getInstance().get(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
}
<#else>
......@@ -123,7 +123,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
res.data.${item.getCodeName()?lower_case} = data.${item.getCodeName()?lower_case};
<@setStore appEntity=item />
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
}
<#-- 无参数情况end -->
......@@ -135,15 +135,15 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#if singleServiceApi.getRequestMethod() == "GET">
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
<@setStore appEntity=item />
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#elseif singleServiceApi.getRequestMethod() == "POST">
let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#else>
let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
</#if>
<#-- 指定属性情况end -->
......@@ -173,7 +173,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
this.tempStorage.setItem(tempContext.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}',JSON.stringify(res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}));
</#list>
</#if>
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
}
<#else>
......@@ -183,7 +183,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
Object.assign(data,masterData);
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<@setStore appEntity=item />
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
}
</#if>
......@@ -206,19 +206,19 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#else>
let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
</#if>
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#-- } -->
<#-- 方法类型为FETCH -->
<#elseif singleAppMethod.getMethodType() == "FETCH">
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,tempData,isloading);
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#-- 方法类型为FETCHTEMP -->
<#elseif singleAppMethod.getMethodType() == "FETCHTEMP">
let res:any = Http.getInstance().get(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#else>
<#-- 方法类型为DEACTION start -->
......@@ -227,7 +227,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
res.data.${item.getCodeName()?lower_case} = data.${item.getCodeName()?lower_case};
<@setStore appEntity=item />
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#-- 无参数情况end -->
<#elseif singleServiceApi.getRequestParamType() == "FIELD">
......@@ -237,20 +237,20 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#-- if(context.${item.getCodeName()?lower_case}){ -->
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
<@setStore appEntity=item />
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#-- } -->
<#elseif singleServiceApi.getRequestMethod() == "POST">
<#-- REMOVE -->
<#-- if(context.${item.getCodeName()?lower_case}){ -->
let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#-- } -->
<#else>
<#-- if(context.${item.getCodeName()?lower_case}){ -->
let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#-- } -->
</#if>
......@@ -264,7 +264,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#-- if(context.${item.getCodeName()?lower_case}){ -->
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<@setStore appEntity=item />
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#-- } -->
<#elseif singleAppMethod.getCodeName() == 'Save'>
......@@ -274,7 +274,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#-- if(context.${item.getCodeName()?lower_case}){ -->
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<@setStore appEntity=item />
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#-- } -->
<#elseif singleAppMethod.getCodeName() == 'Create'>
......@@ -298,12 +298,12 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
this.tempStorage.setItem(tempContext.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}',JSON.stringify(res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}));
</#list>
</#if>
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#else>
<#-- if(context.${item.getCodeName()?lower_case}){ -->
let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<#if afterActionStr??><#compress>${afterActionStr}</#compress></#if>
<#if afterActionStr?? && afterActionStr !="">${afterActionStr}</#if>
return res;
<#-- } -->
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册