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

2020.6.11 更新

上级 97ce98d2
...@@ -22,3 +22,25 @@ ...@@ -22,3 +22,25 @@
</#list> </#list>
</#if> </#if>
</#macro> </#macro>
<#-- 获取导航上下文 -->
<#macro getNavigateContext currentItem>
{<#t>
<#if currentItem.getPSNavigateContexts?? && currentItem.getPSNavigateContexts()??>
<#list currentItem.getPSNavigateContexts() as navContext>
${navContext.getKey()}:<#if navContext.isRawValue()?? && navContext.isRawValue() == true>"${navContext.getValue()}"<#else>"%${navContext.getValue()}%"</#if><#if navContext_has_next>,</#if><#t>
</#list>
</#if>
}<#t>
</#macro>
<#-- 获取导航参数 -->
<#macro getNavigateParams currentItem>
{<#t>
<#if currentItem.getPSNavigateParams?? && currentItem.getPSNavigateParams()??>
<#list currentItem.getPSNavigateParams() as navParam >
${navParam.getKey()}:<#if navParam.isRawValue()?? && navParam.isRawValue() == true>"${navParam.getValue()}"<#else>"%${navParam.getValue()}%"</#if><#if navParam_has_next>,</#if><#t>
</#list>
</#if>
}<#t>
</#macro>
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
ref='${ctrl.name}' ref='${ctrl.name}'
:viewparams="viewparams" :viewparams="viewparams"
:context="context" :context="context"
:formData="formData"
<#if ctrl.getPSAppDataEntity()??>parentName = "${ctrl.getPSAppDataEntity().getCodeName()}"</#if> <#if ctrl.getPSAppDataEntity()??>parentName = "${ctrl.getPSAppDataEntity().getCodeName()}"</#if>
<#if view.getViewType() == 'DEEDITVIEW4'> <#if view.getViewType() == 'DEEDITVIEW4'>
:isShowSlot="false" :isShowSlot="false"
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<#if ctrl.getEmbeddedPSAppDEView()??><#assign embedddevedview = ctrl.getEmbeddedPSAppDEView()> <#if ctrl.getEmbeddedPSAppDEView()??><#assign embedddevedview = ctrl.getEmbeddedPSAppDEView()>
<${srffilepath2(embedddevedview.getCodeName())} <${srffilepath2(embedddevedview.getCodeName())}
class='viewcontainer2' class='viewcontainer2'
:viewdata="JSON.stringify(context)" :viewdata="viewdata"
:viewparam="JSON.stringify(getNavViewParams())" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false" >
</${srffilepath2(embedddevedview.getCodeName())}></#if> </${srffilepath2(embedddevedview.getCodeName())}></#if>
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
</template> </template>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude> </#ibizinclude>
/** /**
...@@ -42,6 +46,38 @@ ...@@ -42,6 +46,38 @@
*/ */
public isActivied: boolean = true; public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public localContext: any = <#if ctrl.getPSNavigateContexts?? && ctrl.getPSNavigateContexts()??><@getNavigateContext ctrl /><#else>null</#if>;
/**
* 局部视图参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public localViewParam: any = <#if ctrl.getPSNavigateParams?? && ctrl.getPSNavigateParams()??><@getNavigateParams ctrl /><#else>null</#if>;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/** /**
* 视图面板过滤项 * 视图面板过滤项
* *
...@@ -66,6 +102,7 @@ ...@@ -66,6 +102,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public afterCreated(){ public afterCreated(){
this.initNavParam();
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
...@@ -85,18 +122,24 @@ ...@@ -85,18 +122,24 @@
} }
/** /**
* 传入导航视图参数 * 初始化导航参数
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public getNavViewParams(){ public initNavParam(){
if(Object.is(this.navfilter,"")){ if(!Object.is(this.navfilter,"")){
return this.viewparams; Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}else{ }
let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams)); if(this.localContext && Object.keys(this.localContext).length >0){
Object.assign(tempViewParams,{[this.navfilter]:this.context['${ctrl.getPSAppDataEntity().getCodeName()?lower_case}']}); let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
return tempViewParams; Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
} }
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
} }
/** /**
......
<#assign content> <view_${ctrl.getName()}
v-if="isInit.${ctrl.name}" :viewState="viewState"
@viewpanelDatasChange = "tabViewPanelDatasChange" :viewparams="JSON.parse(JSON.stringify(viewparams))"
</#assign> :context="JSON.parse(JSON.stringify(context))"
<#ibizinclude> v-if="isInit.${ctrl.name}"
../@MACRO/HTML/DEFAULT.html.ftl name="${ctrl.name}"
</#ibizinclude> ref='${ctrl.name}'
\ No newline at end of file @viewpanelDatasChange = "tabViewPanelDatasChange"
<#if ctrl.getHookEventNames()??>
<#list ctrl.getHookEventNames() as eventName>
@${eventName?lower_case}="${ctrl.name}_${eventName?lower_case}($event)"
</#list>
</#if>
@closeview="closeView($event)">
</view_${ctrl.getName()}>
\ No newline at end of file
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
:is="selection.view.viewname" :is="selection.view.viewname"
class="viewcontainer2" class="viewcontainer2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)"> :viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component> </component>
</div> </div>
</split> </split>
...@@ -56,6 +57,33 @@ ...@@ -56,6 +57,33 @@
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public newdata: any;
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public opendata: any;
</#if>
</#list>
</#if>
/** /**
* 视图唯一标识 * 视图唯一标识
* *
...@@ -141,6 +169,30 @@ ...@@ -141,6 +169,30 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>"; public navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>";
/**
* 导航关系
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navPSDer: string = "<#if xDataControl.getNavPSDER()??>n_${xDataControl.getNavPSDER().getPSPickupDEField().getCodeName()?lower_case}_eq</#if>";
/**
* 导航上下文参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateContext:any = <#if xDataControl.getPSNavigateContexts?? && xDataControl.getPSNavigateContexts()??><@getNavigateContext xDataControl /><#else>null</#if>;
/**
* 导航视图参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#if>;
</#if> </#if>
/** /**
...@@ -290,24 +342,39 @@ ...@@ -290,24 +342,39 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void { public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {}; let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) { if (args.length === 0) {
return ; return ;
} }
const arg:any = args[0]; const arg:any = args[0];
if(this.context){ if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.context))); Object.assign(tempContext,JSON.parse(JSON.stringify(this.context)));
} }
<#if ctrl.getXDataPSControl()??> <#if ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl()/> <#assign xDataControl = ctrl.getXDataPSControl()/>
<#if xDataControl.getPSAppDataEntity()??> <#if xDataControl.getPSAppDataEntity()??>
<#assign curDataEntity = xDataControl.getPSAppDataEntity()/> <#assign curDataEntity = xDataControl.getPSAppDataEntity()/>
Object.assign(data,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']}); Object.assign(tempContext,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']}); Object.assign(tempContext,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']});
if(this.navFilter && !Object.is(this.navFilter,"")){
Object.assign(tempViewParam,{[this.navFilter]:arg['${curDataEntity.getCodeName()?lower_case}']});
}
if(this.navPSDer && !Object.is(this.navPSDer,"")){
Object.assign(tempViewParam,{[this.navPSDer]:arg['${curDataEntity.getCodeName()?lower_case}']});
}
</#if> </#if>
</#if> </#if>
if(this.navigateContext && Object.keys(this.navigateContext).length >0){
let _context:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateContext);
Object.assign(tempContext,_context);
}
if(this.navigateParams && Object.keys(this.navigateParams).length >0){
let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateParams);
Object.assign(tempViewParam,_params);
}
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data }); Object.assign(this.selection, { view: { viewname: this.navViewName },context:tempContext,viewparam:tempViewParam});
this.$emit('selectionchange',args); this.$emit('selectionchange',args);
this.$forceUpdate(); this.$forceUpdate();
} }
......
...@@ -3,6 +3,16 @@ ...@@ -3,6 +3,16 @@
<#if view.getViewType() == 'DELISTEXPVIEW'> <#if view.getViewType() == 'DELISTEXPVIEW'>
:viewUID="viewUID" :viewUID="viewUID"
</#if> </#if>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
:newdata="newdata"
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
:opendata="opendata"
</#if>
</#list>
</#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl ../@MACRO/HTML/DEFAULT.html.ftl
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
:is="selection.view.viewname" :is="selection.view.viewname"
class="viewcontainer2" class="viewcontainer2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)"> :viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component> </component>
</div> </div>
</split> </split>
...@@ -54,6 +55,10 @@ ...@@ -54,6 +55,10 @@
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude> </#ibizinclude>
/** /**
...@@ -141,6 +146,30 @@ ...@@ -141,6 +146,30 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>"; public navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>";
/**
* 导航关系
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navPSDer: string = "<#if xDataControl.getNavPSDER()??>n_${xDataControl.getNavPSDER().getPSPickupDEField().getCodeName()?lower_case}_eq</#if>";
/**
* 导航上下文参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateContext:any = <#if xDataControl.getPSNavigateContexts?? && xDataControl.getPSNavigateContexts()??><@getNavigateContext xDataControl /><#else>null</#if>;
/**
* 导航视图参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#if>;
</#if> </#if>
/** /**
...@@ -294,24 +323,39 @@ ...@@ -294,24 +323,39 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void { public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {}; let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) { if (args.length === 0) {
return ; return ;
} }
const arg:any = args[0]; const arg:any = args[0];
if(this.context){
Object.assign(tempContext,JSON.parse(JSON.stringify(this.context)));
}
<#if ctrl.getXDataPSControl()??> <#if ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl()/> <#assign xDataControl = ctrl.getXDataPSControl()/>
<#if xDataControl.getPSAppDataEntity()??> <#if xDataControl.getPSAppDataEntity()??>
<#assign curDataEntity = xDataControl.getPSAppDataEntity()/> <#assign curDataEntity = xDataControl.getPSAppDataEntity()/>
Object.assign(data,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']}); Object.assign(tempContext,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']}); Object.assign(tempContext,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']});
if(this.navFilter && !Object.is(this.navFilter,"")){
Object.assign(tempViewParam,{[this.navFilter]:arg['${curDataEntity.getCodeName()?lower_case}']});
}
if(this.navPSDer && !Object.is(this.navPSDer,"")){
Object.assign(tempViewParam,{[this.navPSDer]:arg['${curDataEntity.getCodeName()?lower_case}']});
}
</#if> </#if>
</#if> </#if>
if(this.context){ if(this.navigateContext && Object.keys(this.navigateContext).length >0){
Object.assign(data,JSON.parse(JSON.stringify(this.context))); let _context:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateContext);
Object.assign(tempContext,_context);
}
if(this.navigateParams && Object.keys(this.navigateParams).length >0){
let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateParams);
Object.assign(tempViewParam,_params);
} }
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data }); Object.assign(this.selection, { view: { viewname: this.navViewName },context:tempContext,viewparam:tempViewParam});
this.$emit('selectionchange',args); this.$emit('selectionchange',args);
this.$forceUpdate(); this.$forceUpdate();
} }
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
/** /**
* 部件行为--init * 部件行为--init
* *
......
...@@ -23,11 +23,16 @@ ...@@ -23,11 +23,16 @@
</#list> </#list>
</tabs> </tabs>
</div> </div>
</template> </template>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude>
/** /**
* 是否显示插槽 * 是否显示插槽
* *
...@@ -44,6 +49,14 @@ ...@@ -44,6 +49,14 @@
*/ */
@Prop() public parentName!: string; @Prop() public parentName!: string;
/**
* 表单数据
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop({default:{}}) public formData?:any;
/** /**
* 获取多项数据 * 获取多项数据
* *
...@@ -99,6 +112,24 @@ ...@@ -99,6 +112,24 @@
</#list> </#list>
]; ];
/**
* 关系栏数据项导航参数集合
*
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navParamsArray:Array<any> = [
<#if ctrl.getPSDEDRCtrlItems?? && ctrl.getPSDEDRCtrlItems()??>
<#list ctrl.getPSDEDRCtrlItems() as appdeDrCtrlItem>
{
id:'${appdeDrCtrlItem.getName()?lower_case}',
localContext:<#if appdeDrCtrlItem.getPSNavigateContexts?? && appdeDrCtrlItem.getPSNavigateContexts()??><@getNavigateContext appdeDrCtrlItem /><#else>null</#if>,
localViewParam:<#if appdeDrCtrlItem.getPSNavigateParams?? && appdeDrCtrlItem.getPSNavigateParams()??><@getNavigateParams appdeDrCtrlItem /><#else>null</#if>
}<#if appdeDrCtrlItem_has_next>,</#if>
</#list>
</#if>
];
/** /**
* 生命周期 * 生命周期
* *
...@@ -212,6 +243,36 @@ ...@@ -212,6 +243,36 @@
return null; return null;
} }
/**
* 初始化导航参数
*
* @param {*} drItem
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public initNavParam(drItem:any){
let returnNavParam:any = {};
if(drItem && drItem.id){
let curDRItem:any = this.navParamsArray.find((item:any) =>{
return Object.is(item.id,drItem.id);
})
if(curDRItem){
let localContext:any = curDRItem.localContext;
let localViewParam:any = curDRItem.localViewParam;
if(localContext && Object.keys(localContext).length >0){
let _context:any = this.$util.computedNavData(this.formData,this.context,this.viewparams,localContext);
returnNavParam.localContext = _context;
}
if(localViewParam && Object.keys(localViewParam).length >0){
let _params:any = this.$util.computedNavData(this.formData,this.context,this.viewparams,localViewParam);
returnNavParam.localViewParam = _params;
}
return returnNavParam;
}else{
return null;
}
}
}
/** /**
* 选中节点 * 选中节点
* *
...@@ -224,12 +285,18 @@ ...@@ -224,12 +285,18 @@
return; return;
} }
this.$emit('selectionchange', [item]); this.$emit('selectionchange', [item]);
let localNavParam:any = this.initNavParam(item);
const refview = this.getDRTabItem({ nodetype: item.id }); const refview = this.getDRTabItem({ nodetype: item.id });
this.selection = {}; this.selection = {};
const _context: any = { ...JSON.parse(JSON.stringify(this.context)) }; const _context: any = { ...JSON.parse(JSON.stringify(this.context)) };
if(localNavParam && localNavParam.localContext){
Object.assign(_context,localNavParam.localContext);
}
Object.assign(_context,{srfparentdename:this.parentName,srfparentkey:_context[this.parentName.toLowerCase()]}); Object.assign(_context,{srfparentdename:this.parentName,srfparentkey:_context[this.parentName.toLowerCase()]});
const _params: any = { ...JSON.parse(JSON.stringify(this.viewparams)) }; const _params: any = {};
if(localNavParam && localNavParam.localViewParam){
Object.assign(_params,localNavParam.localViewParam);
}
if (refview && refview.parentdatajo) { if (refview && refview.parentdatajo) {
Object.assign(_context, refview.parentdatajo); Object.assign(_context, refview.parentdatajo);
Object.assign(this.selection, { view: { viewname: refview.viewname }, data: _context, param: _params }); Object.assign(this.selection, { view: { viewname: refview.viewname }, data: _context, param: _params });
......
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
</template> </template>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude> </#ibizinclude>
/** /**
...@@ -58,6 +62,14 @@ ...@@ -58,6 +62,14 @@
*/ */
@Prop() public loadAction?: string; @Prop() public loadAction?: string;
/**
* 表单数据
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop({default:{}}) public formData?:any;
/** /**
* 数据选中项 * 数据选中项
* *
...@@ -93,6 +105,24 @@ ...@@ -93,6 +105,24 @@
</#list> </#list>
]; ];
/**
* 关系栏数据项导航参数集合
*
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navParamsArray:Array<any> = [
<#if ctrl.getPSDEDRCtrlItems?? && ctrl.getPSDEDRCtrlItems()??>
<#list ctrl.getPSDEDRCtrlItems() as appdeDrCtrlItem>
{
id:'${appdeDrCtrlItem.getName()?lower_case}',
localContext:<#if appdeDrCtrlItem.getPSNavigateContexts?? && appdeDrCtrlItem.getPSNavigateContexts()??><@getNavigateContext appdeDrCtrlItem /><#else>null</#if>,
localViewParam:<#if appdeDrCtrlItem.getPSNavigateParams?? && appdeDrCtrlItem.getPSNavigateParams()??><@getNavigateParams appdeDrCtrlItem /><#else>null</#if>
}<#if appdeDrCtrlItem_has_next>,</#if>
</#list>
</#if>
];
/** /**
* 默认打开项 * 默认打开项
* *
...@@ -229,6 +259,36 @@ ...@@ -229,6 +259,36 @@
return item; return item;
} }
/**
* 初始化导航参数
*
* @param {*} drItem
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public initNavParam(drItem:any){
let returnNavParam:any = {};
if(drItem && drItem.id){
let curDRItem:any = this.navParamsArray.find((item:any) =>{
return Object.is(item.id,drItem.id);
})
if(curDRItem){
let localContext:any = curDRItem.localContext;
let localViewParam:any = curDRItem.localViewParam;
if(localContext && Object.keys(localContext).length >0){
let _context:any = this.$util.computedNavData(this.formData,this.context,this.viewparams,localContext);
returnNavParam.localContext = _context;
}
if(localViewParam && Object.keys(localViewParam).length >0){
let _params:any = this.$util.computedNavData(this.formData,this.context,this.viewparams,localViewParam);
returnNavParam.localViewParam = _params;
}
return returnNavParam;
}else{
return null;
}
}
}
/** /**
* 节点选中 * 节点选中
* *
...@@ -240,13 +300,18 @@ ...@@ -240,13 +300,18 @@
if (Object.is(item.id, this.selection.id)) { if (Object.is(item.id, this.selection.id)) {
return; return;
} }
this.$emit('selectionchange', [item]); this.$emit('selectionchange', [item]);
let localNavParam:any = this.initNavParam(item);
const refview = this.getDRBarItem({ nodetype: item.id }); const refview = this.getDRBarItem({ nodetype: item.id });
this.selection = {}; this.selection = {};
const _context: any = { ...JSON.parse(JSON.stringify(this.context)) }; const _context: any = { ...JSON.parse(JSON.stringify(this.context)) };
const _params: any = { ...JSON.parse(JSON.stringify(this.viewparams)) }; if(localNavParam && localNavParam.localContext){
Object.assign(_context,localNavParam.localContext);
}
const _params: any = {};
if(localNavParam && localNavParam.localViewParam){
Object.assign(_params,localNavParam.localViewParam);
}
if (refview && refview.parentdatajo) { if (refview && refview.parentdatajo) {
Object.assign(_context, refview.parentdatajo); Object.assign(_context, refview.parentdatajo);
Object.assign(this.selection, { view: { viewname: refview.viewname }, data: _context, param: _params }); Object.assign(this.selection, { view: { viewname: refview.viewname }, data: _context, param: _params });
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
ref='${ctrl.name}' ref='${ctrl.name}'
:viewparams="viewparams" :viewparams="viewparams"
:context="context" :context="context"
:formData="formData"
<#if ctrl.getHookEventNames()??> <#if ctrl.getHookEventNames()??>
<#list ctrl.getHookEventNames() as eventName> <#list ctrl.getHookEventNames() as eventName>
@${eventName?lower_case}="${ctrl.name}_${eventName?lower_case}($event)" @${eventName?lower_case}="${ctrl.name}_${eventName?lower_case}($event)"
......
...@@ -7,17 +7,17 @@ ${item.render.code} ...@@ -7,17 +7,17 @@ ${item.render.code}
name:'<#if item.getCaption()??>${item.getCaption()}</#if>', name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'funnel', type:'funnel',
datasetIndex:${item.getIndex()}, datasetIndex:${item.getIndex()},
<#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if> <#compress><#if item.getLeft()??>left:"${item.getLeft()}",</#if>
<#if item.getTop()?? && item.getTop() != 0>top:"${item.getTop()}",</#if> <#if item.getTop()??>top:"${item.getTop()}",</#if>
<#if item.getBottom()?? && item.getBottom() != 0>bottom:"${item.getBottom()}",</#if> <#if item.getBottom()??>bottom:"${item.getBottom()}",</#if>
<#if item.getRight()?? && item.getRight() != "">right:"${item.getRight()}",</#if> <#if item.getRight()??>right:"${item.getRight()}",</#if>
<#if item.getWidth()?? && item.getWidth() != "">width:"${item.getWidth()}",</#if> <#if item.getWidth()??>width:"${item.getWidth()}",</#if>
<#if item.getHeight()?? && item.getHeight() != "">height:"${item.getHeight()}",</#if> <#if item.getHeight()??>height:"${item.getHeight()}",</#if>
<#if item.getMinValue()?? && item.getMinValue() != 0 >min:"${item.getMinValue()}",</#if> <#if item.getMinValue()??>min:"${item.getMinValue()}",</#if>
<#if item.getMaxValue()?? && item.getMaxValue() != 0 >max:"${item.getMaxSize()}",</#if> <#if item.getMaxValue()??>max:"${item.getMaxSize()}",</#if>
<#if item.getMinSize()?? && item.getMinSize() != "">minSize:"${item.getMinSize()}",</#if> <#if item.getMinSize()??>minSize:"${item.getMinSize()}",</#if>
<#if item.getMaxSize()?? && item.getMaxSize() != "">maxSize: "${item.getMaxSize()}",</#if> <#if item.getMaxSize()??>maxSize: "${item.getMaxSize()}",</#if>
<#if item.getFunnelAlign()?? && item.getFunnelAlign() != "">funnelAlign:"${item.getFunnelAlign()}",</#if></#compress> <#if item.getFunnelAlign()??>funnelAlign:"${item.getFunnelAlign()}",</#if></#compress>
seriesLayoutBy:"${item.getSeriesLayoutBy()}", seriesLayoutBy:"${item.getSeriesLayoutBy()}",
encode:{ encode:{
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if> <#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
......
...@@ -8,11 +8,11 @@ ${item.render.code} ...@@ -8,11 +8,11 @@ ${item.render.code}
type:'pie', type:'pie',
datasetIndex:${item.getIndex()}, datasetIndex:${item.getIndex()},
<#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if> <#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if>
<#if item.getTop()?? && item.getTop() != 0>top:"${item.getTop()}",</#if> <#if item.getTop()??>top:"${item.getTop()}",</#if>
<#if item.getBottom()?? && item.getBottom() != 0>bottom:"${item.getBottom()}",</#if> <#if item.getBottom()??>bottom:"${item.getBottom()}",</#if>
<#if item.getRight()?? && item.getRight() != "">right:"${item.getRight()}",</#if> <#if item.getRight()??>right:"${item.getRight()}",</#if>
<#if item.getWidth()?? && item.getWidth() != "">width:"${item.getWidth()}",</#if> <#if item.getWidth()??>width:"${item.getWidth()}",</#if>
<#if item.getHeight()?? && item.getHeight() != "">height:"${item.getHeight()}",</#if></#compress> <#if item.getHeight()??>height:"${item.getHeight()}",</#if></#compress>
seriesLayoutBy:"${item.getSeriesLayoutBy()}", seriesLayoutBy:"${item.getSeriesLayoutBy()}",
encode:{ encode:{
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if> <#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<#if ctrl.render??><#t> <#if ctrl.render??><#t>
${ctrl.render.code} ${ctrl.render.code}
<#else><#t> <#else><#t>
<div class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div> <div v-if="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>暂无数据</div>
<div v-else class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div>
</#if> </#if>
</div> </div>
</template> </template>
...@@ -105,6 +106,15 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -105,6 +106,15 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
</#if> </#if>
} }
/**
* 是否无数据
*
* @public
* @type {boolean}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public isNoData: boolean = false;
/** /**
* 图表div绑定的id * 图表div绑定的id
* *
...@@ -307,9 +317,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -307,9 +317,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
let element:any = document.getElementById(this.chartId); let element:any = document.getElementById(this.chartId);
this.myChart = echarts.init(element); this.myChart = echarts.init(element);
} }
this.handleChartOPtion(codelist); let _chartOption = this.handleChartOPtion(codelist);
console.log(this.chartOption); console.log(_chartOption);
this.myChart.setOption(this.chartOption); this.myChart.setOption(_chartOption);
this.myChart.resize(); this.myChart.resize();
} }
...@@ -319,6 +329,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -319,6 +329,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
* @memberof ${srfclassname('${ctrl.name}')}Base * @memberof ${srfclassname('${ctrl.name}')}Base
*/ */
public handleChartOPtion(allcodelist:any){ public handleChartOPtion(allcodelist:any){
let _chartOption:any = JSON.parse(JSON.stringify(this.chartOption));
if(Object.keys(this.seriesModel).length > 0){ if(Object.keys(this.seriesModel).length > 0){
let tempDataSourceMap:Map<string,any> = new Map(); let tempDataSourceMap:Map<string,any> = new Map();
for(let i=0;i<Object.keys(this.seriesModel).length;i++){ for(let i=0;i<Object.keys(this.seriesModel).length;i++){
...@@ -330,12 +341,12 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -330,12 +341,12 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
} }
if(tempDataSourceMap.size > 0){ if(tempDataSourceMap.size > 0){
tempDataSourceMap.forEach((item:any) =>{ tempDataSourceMap.forEach((item:any) =>{
this.chartOption.dataset.push({'source':item}); _chartOption.dataset.push({'source':item});
}) })
} }
Object.keys(this.seriesModel).forEach((seriesName:string) =>{ Object.keys(this.seriesModel).forEach((seriesName:string) =>{
if(this.chartOption && this.chartOption.series.length > 0){ if(_chartOption && _chartOption.series.length > 0){
this.chartOption.series.forEach((item:any) =>{ _chartOption.series.forEach((item:any) =>{
if(this.seriesModel[seriesName].ecxObject){ if(this.seriesModel[seriesName].ecxObject){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecxObject); item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecxObject);
} }
...@@ -351,25 +362,26 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -351,25 +362,26 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
let tempSeries:any = this.seriesModel[seriesName]; let tempSeries:any = this.seriesModel[seriesName];
// 非雷达图 // 非雷达图
if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0 && !Object.is(tempSeries.type,'radar')){ if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0 && !Object.is(tempSeries.type,'radar')){
const returnIndex:number = this.chartOption.series.findIndex((item:any) =>{ const returnIndex:number = _chartOption.series.findIndex((item:any) =>{
return Object.is(item.id,seriesName); return Object.is(item.id,seriesName);
}) })
this.chartOption.series.splice(returnIndex,1); _chartOption.series.splice(returnIndex,1);
let tempSeriesArray:Array<any> = []; let tempSeriesArray:Array<any> = [];
tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{ tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{
let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp)); let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp));
<#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse> <#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse>
this.chartOption.series.push(tempSeriesTemp); _chartOption.series.push(tempSeriesTemp);
}) })
} }
}) })
} }
if(Object.keys(this.chartBaseOPtion).length > 0){ if(Object.keys(this.chartBaseOPtion).length > 0){
Object.assign(this.chartOption,this.chartBaseOPtion); Object.assign(_chartOption,this.chartBaseOPtion);
} }
if(Object.keys(this.chartUserParams).length >0){ if(Object.keys(this.chartUserParams).length >0){
Object.assign(this.chartOption,this.chartUserParams); Object.assign(_chartOption,this.chartUserParams);
} }
return _chartOption;
} }
/** /**
...@@ -387,8 +399,10 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -387,8 +399,10 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
*/ */
public async transformToBasicChartSetData(data:any,callback:Function){ public async transformToBasicChartSetData(data:any,callback:Function){
if(!data || !Array.isArray(data) || data.length === 0){ if(!data || !Array.isArray(data) || data.length === 0){
this.isNoData = true;
return; return;
} }
this.isNoData = false;
//获取代码表值 //获取代码表值
let allCodeList:any = await this.getChartAllCodeList(); let allCodeList:any = await this.getChartAllCodeList();
if(Object.values(this.seriesModel).length > 0){ if(Object.values(this.seriesModel).length > 0){
...@@ -635,10 +649,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -635,10 +649,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
let seriesValues:Array<any> = item.seriesValues; let seriesValues:Array<any> = item.seriesValues;
if(seriesValues && seriesValues.length >0){ if(seriesValues && seriesValues.length >0){
seriesValues.forEach((singleSeriesName:any) =>{ seriesValues.forEach((singleSeriesName:any) =>{
let singleSeriesObj:any = {type:singleSeriesName}; let singleSeriesObj:any = {};
returnArray.forEach((item:any) =>{ returnArray.forEach((item:any) =>{
Object.assign(singleSeriesObj,{[item[groupField[0]]]:item[singleSeriesName]}); Object.assign(singleSeriesObj,{[item[groupField[0]]]:item[singleSeriesName]});
}) })
Object.assign(singleSeriesObj,{type:singleSeriesName});
tempReturnArray.push(singleSeriesObj); tempReturnArray.push(singleSeriesObj);
}) })
} }
......
...@@ -4,4 +4,14 @@ ...@@ -4,4 +4,14 @@
.app-data-chart { .app-data-chart {
width: 100%; width: 100%;
height: 100%; height: 100%;
.chart-no-data{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
i{
margin-right: 5px;
}
}
} }
\ No newline at end of file
...@@ -7,17 +7,17 @@ ${item.render.code} ...@@ -7,17 +7,17 @@ ${item.render.code}
name:'<#if item.getCaption()??>${item.getCaption()}</#if>', name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'funnel', type:'funnel',
datasetIndex:${item.getIndex()}, datasetIndex:${item.getIndex()},
<#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if> <#compress><#if item.getLeft()??>left:"${item.getLeft()}",</#if>
<#if item.getTop()?? && item.getTop() != 0>top:"${item.getTop()}",</#if> <#if item.getTop()??>top:"${item.getTop()}",</#if>
<#if item.getBottom()?? && item.getBottom() != 0>bottom:"${item.getBottom()}",</#if> <#if item.getBottom()??>bottom:"${item.getBottom()}",</#if>
<#if item.getRight()?? && item.getRight() != "">right:"${item.getRight()}",</#if> <#if item.getRight()??>right:"${item.getRight()}",</#if>
<#if item.getWidth()?? && item.getWidth() != "">width:"${item.getWidth()}",</#if> <#if item.getWidth()??>width:"${item.getWidth()}",</#if>
<#if item.getHeight()?? && item.getHeight() != "">height:"${item.getHeight()}",</#if> <#if item.getHeight()??>height:"${item.getHeight()}",</#if>
<#if item.getMinValue()?? && item.getMinValue() != 0 >min:"${item.getMinValue()}",</#if> <#if item.getMinValue()??>min:"${item.getMinValue()}",</#if>
<#if item.getMaxValue()?? && item.getMaxValue() != 0 >max:"${item.getMaxSize()}",</#if> <#if item.getMaxValue()??>max:"${item.getMaxSize()}",</#if>
<#if item.getMinSize()?? && item.getMinSize() != "">minSize:"${item.getMinSize()}",</#if> <#if item.getMinSize()??>minSize:"${item.getMinSize()}",</#if>
<#if item.getMaxSize()?? && item.getMaxSize() != "">maxSize: "${item.getMaxSize()}",</#if> <#if item.getMaxSize()??>maxSize: "${item.getMaxSize()}",</#if>
<#if item.getFunnelAlign()?? && item.getFunnelAlign() != "">funnelAlign:"${item.getFunnelAlign()}",</#if></#compress> <#if item.getFunnelAlign()??>funnelAlign:"${item.getFunnelAlign()}",</#if></#compress>
seriesLayoutBy:"${item.getSeriesLayoutBy()}", seriesLayoutBy:"${item.getSeriesLayoutBy()}",
encode:{ encode:{
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if> <#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
......
...@@ -7,12 +7,12 @@ ${item.render.code} ...@@ -7,12 +7,12 @@ ${item.render.code}
name:'<#if item.getCaption()??>${item.getCaption()}</#if>', name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'pie', type:'pie',
datasetIndex:${item.getIndex()}, datasetIndex:${item.getIndex()},
<#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if> <#compress><#if item.getLeft()??>left:"${item.getLeft()}",</#if>
<#if item.getTop()?? && item.getTop() != 0>top:"${item.getTop()}",</#if> <#if item.getTop()??>top:"${item.getTop()}",</#if>
<#if item.getBottom()?? && item.getBottom() != 0>bottom:"${item.getBottom()}",</#if> <#if item.getBottom()??>bottom:"${item.getBottom()}",</#if>
<#if item.getRight()?? && item.getRight() != "">right:"${item.getRight()}",</#if> <#if item.getRight()??>right:"${item.getRight()}",</#if>
<#if item.getWidth()?? && item.getWidth() != "">width:"${item.getWidth()}",</#if> <#if item.getWidth()??>width:"${item.getWidth()}",</#if>
<#if item.getHeight()?? && item.getHeight() != "">height:"${item.getHeight()}",</#if></#compress> <#if item.getHeight()??>height:"${item.getHeight()}",</#if></#compress>
seriesLayoutBy:"${item.getSeriesLayoutBy()}", seriesLayoutBy:"${item.getSeriesLayoutBy()}",
encode:{ encode:{
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if> <#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<#if ctrl.render??><#t> <#if ctrl.render??><#t>
${ctrl.render.code} ${ctrl.render.code}
<#else><#t> <#else><#t>
<div class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div> <div v-if="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>暂无数据</div>
<div v-else class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div>
</#if> </#if>
</div> </div>
</template> </template>
...@@ -105,6 +106,15 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -105,6 +106,15 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
</#if> </#if>
} }
/**
* 是否无数据
*
* @public
* @type {boolean}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public isNoData: boolean = false;
/** /**
* 图表div绑定的id * 图表div绑定的id
* *
...@@ -307,9 +317,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -307,9 +317,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
let element:any = document.getElementById(this.chartId); let element:any = document.getElementById(this.chartId);
this.myChart = echarts.init(element); this.myChart = echarts.init(element);
} }
this.handleChartOPtion(codelist); let _chartOption = this.handleChartOPtion(codelist);
console.log(this.chartOption); console.log(_chartOption);
this.myChart.setOption(this.chartOption); this.myChart.setOption(_chartOption);
this.myChart.resize(); this.myChart.resize();
} }
...@@ -319,6 +329,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -319,6 +329,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
* @memberof ${srfclassname('${ctrl.name}')}Base * @memberof ${srfclassname('${ctrl.name}')}Base
*/ */
public handleChartOPtion(allcodelist:any){ public handleChartOPtion(allcodelist:any){
let _chartOption:any = JSON.parse(JSON.stringify(this.chartOption));
if(Object.keys(this.seriesModel).length > 0){ if(Object.keys(this.seriesModel).length > 0){
let tempDataSourceMap:Map<string,any> = new Map(); let tempDataSourceMap:Map<string,any> = new Map();
for(let i=0;i<Object.keys(this.seriesModel).length;i++){ for(let i=0;i<Object.keys(this.seriesModel).length;i++){
...@@ -330,12 +341,12 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -330,12 +341,12 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
} }
if(tempDataSourceMap.size > 0){ if(tempDataSourceMap.size > 0){
tempDataSourceMap.forEach((item:any) =>{ tempDataSourceMap.forEach((item:any) =>{
this.chartOption.dataset.push({'source':item}); _chartOption.dataset.push({'source':item});
}) })
} }
Object.keys(this.seriesModel).forEach((seriesName:string) =>{ Object.keys(this.seriesModel).forEach((seriesName:string) =>{
if(this.chartOption && this.chartOption.series.length > 0){ if(_chartOption && _chartOption.series.length > 0){
this.chartOption.series.forEach((item:any) =>{ _chartOption.series.forEach((item:any) =>{
if(this.seriesModel[seriesName].ecxObject){ if(this.seriesModel[seriesName].ecxObject){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecxObject); item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecxObject);
} }
...@@ -351,25 +362,26 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -351,25 +362,26 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
let tempSeries:any = this.seriesModel[seriesName]; let tempSeries:any = this.seriesModel[seriesName];
// 非雷达图 // 非雷达图
if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0 && !Object.is(tempSeries.type,'radar')){ if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0 && !Object.is(tempSeries.type,'radar')){
const returnIndex:number = this.chartOption.series.findIndex((item:any) =>{ const returnIndex:number = _chartOption.series.findIndex((item:any) =>{
return Object.is(item.id,seriesName); return Object.is(item.id,seriesName);
}) })
this.chartOption.series.splice(returnIndex,1); _chartOption.series.splice(returnIndex,1);
let tempSeriesArray:Array<any> = []; let tempSeriesArray:Array<any> = [];
tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{ tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{
let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp)); let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp));
<#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse> <#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse>
this.chartOption.series.push(tempSeriesTemp); _chartOption.series.push(tempSeriesTemp);
}) })
} }
}) })
} }
if(Object.keys(this.chartBaseOPtion).length > 0){ if(Object.keys(this.chartBaseOPtion).length > 0){
Object.assign(this.chartOption,this.chartBaseOPtion); Object.assign(_chartOption,this.chartBaseOPtion);
} }
if(Object.keys(this.chartUserParams).length >0){ if(Object.keys(this.chartUserParams).length >0){
Object.assign(this.chartOption,this.chartUserParams); Object.assign(_chartOption,this.chartUserParams);
} }
return _chartOption;
} }
/** /**
...@@ -387,8 +399,10 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -387,8 +399,10 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
*/ */
public async transformToBasicChartSetData(data:any,callback:Function){ public async transformToBasicChartSetData(data:any,callback:Function){
if(!data || !Array.isArray(data) || data.length === 0){ if(!data || !Array.isArray(data) || data.length === 0){
this.isNoData = true;
return; return;
} }
this.isNoData = false;
//获取代码表值 //获取代码表值
let allCodeList:any = await this.getChartAllCodeList(); let allCodeList:any = await this.getChartAllCodeList();
if(Object.values(this.seriesModel).length > 0){ if(Object.values(this.seriesModel).length > 0){
...@@ -635,10 +649,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -635,10 +649,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
let seriesValues:Array<any> = item.seriesValues; let seriesValues:Array<any> = item.seriesValues;
if(seriesValues && seriesValues.length >0){ if(seriesValues && seriesValues.length >0){
seriesValues.forEach((singleSeriesName:any) =>{ seriesValues.forEach((singleSeriesName:any) =>{
let singleSeriesObj:any = {type:singleSeriesName}; let singleSeriesObj:any = {};
returnArray.forEach((item:any) =>{ returnArray.forEach((item:any) =>{
Object.assign(singleSeriesObj,{[item[groupField[0]]]:item[singleSeriesName]}); Object.assign(singleSeriesObj,{[item[groupField[0]]]:item[singleSeriesName]});
}) })
Object.assign(singleSeriesObj,{type:singleSeriesName});
tempReturnArray.push(singleSeriesObj); tempReturnArray.push(singleSeriesObj);
}) })
} }
......
...@@ -4,4 +4,14 @@ ...@@ -4,4 +4,14 @@
.app-data-chart { .app-data-chart {
width: 100%; width: 100%;
height: 100%; height: 100%;
.chart-no-data{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
i{
margin-right: 5px;
}
}
} }
\ No newline at end of file
...@@ -4,32 +4,36 @@ ...@@ -4,32 +4,36 @@
<app-build @handleClick="handleClick"></app-build> <app-build @handleClick="handleClick"></app-build>
</row> </row>
<row v-if="!isHasCustomized"> <row v-if="!isHasCustomized">
<#-- BEGIN:看板Flex布局-前 -->
<#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
<div style = 'display : flex; <#if ctrl.getFlexAlign()??> justify-content :${ctrl.getFlexAlign()};</#if> <#if ctrl.getFlexDir()??> flex-direction:${ctrl.getFlexDir()};</#if> <#if ctrl.getFlexVAlign()??>align-items:${ctrl.getFlexVAlign()};</#if> '>
</#if>
<#-- END:看板Flex布局-前 -->
<#list ctrl.getPSPortlets() as portlet><#t> <#list ctrl.getPSPortlets() as portlet><#t>
<#if portlet.getPortletType?? && portlet.getPortletType()??><#t> <#if portlet.getPortletType?? && portlet.getPortletType()??><#t>
<#-- BEGIN:处理参数layout,LayoutPos --> <#-- BEGIN:获取父的layout,自己的LayoutPos -->
<#assign layout='TABLE_24COL'> <#assign layout=ctrl.getLayoutMode()>
<#if portlet.getPSLayoutPos()??> <#assign LayoutPos = portlet.getPSLayoutPos()>
<#if portlet.getPSLayoutPos().getParentPSLayout()??> <#-- END:获取父的layout,自己的LayoutPos -->
<#assign layout='${portlet.getPSLayoutPos().getParentPSLayout().getLayout()}'> <#-- BEGIN:门户部件绘制,栅格布局 -->
</#if> <#if layout == 'TABLE_12COL'>
</#if> <#assign multiple = 2/>
<#assign LayoutPos = portlet.getPSLayoutPos()><#t> <#else>
<#-- END:处理参数layout,LayoutPos --> <#assign multiple = 1/>
<#-- BEGIN:第一个门户部件前 -->
<#if portlet_index == 0 >
<#list ctrl.getPSPortlets() as container><#t>
<#if container.getPortletType() == 'CONTAINER' && layout == 'FLEX'>
<#assign flexLayout = container.getPSLayout()><#t>
</#if> </#if>
</#list> <#macro format_numer num>
<div style = '<#if layout == 'FLEX' > display : flex; justify-content : ${flexLayout.getAlign()}; flex-direction:${flexLayout.getDir()} ;align-items:${flexLayout.getVAlign()};flex-wrap: wrap;</#if>'> <#if num lt 0 >
0<#t>
<#elseif num gt 24>
24<#t>
<#else>
${num}<#t>
</#if> </#if>
<#-- END:第一个门户部件前 --> </#macro>
<#-- BEGIN:门户部件绘制,栅格布局 --> <#if (layout == 'TABLE_24COL' || layout == 'TABLE_12COL') && LayoutPos??><#t>
<#if layout == 'TABLE_24COL' && LayoutPos??><#t> <i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: <@format_numer LayoutPos.getColXS()*multiple/>, offset: <#if LayoutPos.getColXSOffset() != -1><@format_numer LayoutPos.getColXSOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: <@format_numer LayoutPos.getColSM()*multiple />, offset: <#if LayoutPos.getColSMOffset() != -1><@format_numer LayoutPos.getColSMOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: <@format_numer LayoutPos.getColMD()*multiple />, offset: <#if LayoutPos.getColMDOffset() != -1><@format_numer LayoutPos.getColMDOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: <@format_numer LayoutPos.getColLG()*multiple />, offset: <#if LayoutPos.getColLGOffset() != -1><@format_numer LayoutPos.getColLGOffset()*multiple /><#else>0</#if> }"</#if>>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>>
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.isShowTitleBar() && portlet.getTitle()?has_content> <#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<p slot='title'> <p slot='title'>
${portlet.getTitle()} ${portlet.getTitle()}
<span class="line"></span> <span class="line"></span>
...@@ -43,12 +47,13 @@ ...@@ -43,12 +47,13 @@
</span> </span>
</card> </card>
</i-col> </i-col>
<#-- ELSE:门户部件布局,Flex --> <#-- ELSE:门户部件绘制,Flex -->
<#else> <#else>
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.isShowTitleBar() && portlet.getTitle()?has_content><#t> <#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<p slot='title'> <p slot='title'>
${portlet.getTitle()} ${portlet.getTitle()}
<span class="line"></span>
</p> </p>
<a slot='extra'></a> <a slot='extra'></a>
</#if> </#if>
...@@ -59,14 +64,14 @@ ...@@ -59,14 +64,14 @@
</span> </span>
</card> </card>
</#if> </#if>
<#-- END:门户部件布局 --> <#-- END:门户部件绘制 -->
<#-- BEGIN:最后一个门户部件后 -->
<#if !portlet_has_next>
</div>
</#if>
<#-- END:最后一个门户部件后 -->
</#if> </#if>
</#list> </#list>
<#-- BEGIN:看板Flex布局-后 -->
<#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
</div>
</#if>
<#-- END:看板Flex布局-后 -->
</row> </row>
<row v-if="isHasCustomized" style="width: 100%;min-height: calc(100% - 40px);"> <row v-if="isHasCustomized" style="width: 100%;min-height: calc(100% - 40px);">
<div class="portlet-container" style="position: relative;width:100%;"> <div class="portlet-container" style="position: relative;width:100%;">
...@@ -253,7 +258,12 @@ import UtilService from '@/utilservice/util-service'; ...@@ -253,7 +258,12 @@ import UtilService from '@/utilservice/util-service';
this.isHasCustomized = false; this.isHasCustomized = false;
this.notifyState(); this.notifyState();
} }
}) }).catch((error:any)=>{
console.error("加载面板模型异常");
console.error(error);
this.isHasCustomized = false;
this.notifyState();
});
}) })
}else{ }else{
this.notifyState(); this.notifyState();
......
<#ibizinclude> <script lang='tsx'>
../@MACRO/CONTROL/CONTROL.vue.ftl import { Component } from 'vue-property-decorator';
</#ibizinclude> import ${srfclassname('${ctrl.codeName}')}Base from './${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}-base.vue';
\ No newline at end of file <#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU' && (subctrl.getControlType() != 'PORTLET' || subctrl.getPortletType() != 'CONTAINER') >
<#if subctrl.getPSAppDataEntity?? && subctrl.getPSAppDataEntity()??>
import view_${subctrl.getName()} from '@widgets/${srffilepath2(subctrl.getPSAppDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@widgets/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
<#if ctrl.getPSLayoutPanels?? && ctrl.getPSLayoutPanels()??>
<#list ctrl.getPSLayoutPanels() as panel>
import layout_${panel.getName()} from '@widgets/${srffilepath2(panel.getPSAppDataEntity().getCodeName())}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}.vue';
</#list>
</#if>
<#if import_block??>${import_block}</#if>
@Component({
components: {
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU' && (subctrl.getControlType() != 'PORTLET' || subctrl.getPortletType() != 'CONTAINER') >
view_${subctrl.getName()},
</#if>
</#list>
</#if>
<#if ctrl.getPSLayoutPanels?? && ctrl.getPSLayoutPanels()??>
<#list ctrl.getPSLayoutPanels() as panel>
layout_${panel.getName()},
</#list>
</#if>
<#if components??>${components}</#if>
}
})
export default class ${srfclassname('${ctrl.codeName}')} extends ${srfclassname('${ctrl.codeName}')}Base {
}
</script>
\ No newline at end of file
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<el-card shadow="always" :class="[ item.isselected === true ? 'isselected' : false, 'single-card-data' ]" @click.native="handleClick(item)" @dblclick.native="handleDblClick(item)"> <el-card shadow="always" :class="[ item.isselected === true ? 'isselected' : false, 'single-card-data' ]" @click.native="handleClick(item)" @dblclick.native="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??> <#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()> <#assign panel = ctrl.getItemPSLayoutPanel()>
<layout_${panel.getName()} name='${panel.name}' :data="item"></layout_${panel.getName()}> <layout_${panel.getName()} name='${panel.name}' :inputData="item"></layout_${panel.getName()}>
<#elseif ctrl.itemRender??> <#elseif ctrl.itemRender??>
${ctrl.itemRender.code} ${ctrl.itemRender.code}
<#else> <#else>
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
:is="selection.view.viewname" :is="selection.view.viewname"
class="viewcontainer2" class="viewcontainer2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)"> :viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component> </component>
</div> </div>
</split> </split>
...@@ -54,6 +55,10 @@ ...@@ -54,6 +55,10 @@
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude> </#ibizinclude>
/** /**
...@@ -64,6 +69,29 @@ ...@@ -64,6 +69,29 @@
*/ */
@Prop() public viewUID!:string; @Prop() public viewUID!:string;
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public newdata: any;
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public opendata: any;
</#if>
</#list>
</#if>
/** /**
* 是否单选 * 是否单选
* *
...@@ -127,21 +155,24 @@ ...@@ -127,21 +155,24 @@
public navViewName: any = { public navViewName: any = {
<#if xDataControl.getPSSysCalendarItems()??> <#if xDataControl.getPSSysCalendarItems()??>
<#list xDataControl.getPSSysCalendarItems() as calendarItem> <#list xDataControl.getPSSysCalendarItems() as calendarItem>
${calendarItem.getItemType()}: "<#if calendarItem.getNavPSAppView?? && calendarItem.getNavPSAppView()??><#assign navPSAppView = calendarItem.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>", ${calendarItem.getItemType()}: "<#if calendarItem.getNavPSAppView?? && calendarItem.getNavPSAppView()??><#assign navPSAppView = calendarItem.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>"<#if calendarItem_has_next>,</#if>
</#list> </#list>
</#if> </#if>
}; };
/** /**
* 导航视图参数 * 导航参数
* *
* @type {string} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public navViewParam: any = { public navParam: any = {
<#if xDataControl.getPSSysCalendarItems()??> <#if xDataControl.getPSSysCalendarItems()??>
<#list xDataControl.getPSSysCalendarItems() as calendarItem> <#list xDataControl.getPSSysCalendarItems() as calendarItem>
${calendarItem.getItemType()}: '<#if calendarItem.getNavViewParamJO?? && calendarItem.getNavViewParamJO()??>${calendarItem.getNavViewParamJO()}</#if>', ${calendarItem.getItemType()}: {
navigateContext:<#if calendarItem.getPSNavigateContexts?? && calendarItem.getPSNavigateContexts()??><@getNavigateContext calendarItem /><#else>null</#if>,
navigateParams:<#if calendarItem.getPSNavigateParams?? && calendarItem.getPSNavigateParams()??><@getNavigateParams calendarItem /><#else>null</#if>
}<#if calendarItem_has_next>,</#if>
</#list> </#list>
</#if> </#if>
}; };
...@@ -149,18 +180,32 @@ ...@@ -149,18 +180,32 @@
/** /**
* 导航过滤项 * 导航过滤项
* *
* @type {string} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
</#if>
public navFilter: any = { public navFilter: any = {
<#if xDataControl.getPSSysCalendarItems()??> <#if xDataControl.getPSSysCalendarItems()??>
<#list xDataControl.getPSSysCalendarItems() as calendarItem> <#list xDataControl.getPSSysCalendarItems() as calendarItem>
${calendarItem.getItemType()}: "<#if calendarItem.getNavFilter?? && calendarItem.getNavFilter()??>${calendarItem.getNavFilter()}</#if>", ${calendarItem.getItemType()}: "<#if calendarItem.getNavFilter?? && calendarItem.getNavFilter()??>${calendarItem.getNavFilter()}</#if>"<#if calendarItem_has_next>,</#if>
</#list> </#list>
</#if> </#if>
}; };
/**
* 导航关系
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navPSDer: any = {
<#if xDataControl.getPSSysCalendarItems()??>
<#list xDataControl.getPSSysCalendarItems() as calendarItem>
${calendarItem.getItemType()}: "<#if calendarItem.getNavPSDER?? && calendarItem.getNavPSDER()??>n_${calendarItem.getNavPSDER().getPSPickupDEField().getCodeName()?lower_case}_eq</#if>"<#if calendarItem_has_next>,</#if>
</#list>
</#if>
};
</#if>
/** /**
* 显示处理提示 * 显示处理提示
* *
...@@ -319,13 +364,14 @@ ...@@ -319,13 +364,14 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void { public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {}; let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) { if (args.length === 0) {
return ; return ;
} }
const arg:any = args[0]; const arg:any = args[0];
if(this.context){ if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.context))); Object.assign(tempContext,JSON.parse(JSON.stringify(this.context)));
} }
switch(arg.itemType) { switch(arg.itemType) {
<#if xDataControl?? && xDataControl.getPSSysCalendarItems()??> <#if xDataControl?? && xDataControl.getPSSysCalendarItems()??>
...@@ -333,15 +379,29 @@ ...@@ -333,15 +379,29 @@
<#if calendarItem.getPSAppDataEntity()??> <#if calendarItem.getPSAppDataEntity()??>
<#assign _appde = calendarItem.getPSAppDataEntity() /> <#assign _appde = calendarItem.getPSAppDataEntity() />
case "${calendarItem.getItemType()}": case "${calendarItem.getItemType()}":
Object.assign(data,{ ${_appde.getCodeName()?lower_case} : arg.${_appde.getCodeName()?lower_case}}); Object.assign(tempContext,{ ${_appde.getCodeName()?lower_case} : arg.${_appde.getCodeName()?lower_case}});
Object.assign(data,{srfparentdename:'${_appde.getCodeName()}',srfparentkey:arg['${_appde.getCodeName()?lower_case}']}); Object.assign(tempContext,{srfparentdename:'${_appde.getCodeName()}',srfparentkey:arg['${_appde.getCodeName()?lower_case}']});
if(this.navFilter && this.navFilter['${calendarItem.getItemType()}'] && !Object.is(this.navFilter['${calendarItem.getItemType()}'],"")){
Object.assign(tempViewParam,{[this.navFilter['${calendarItem.getItemType()}']]:arg['${_appde.getCodeName()?lower_case}']});
}
if(this.navPSDer && this.navFilter['${calendarItem.getItemType()}'] && !Object.is(this.navPSDer['${calendarItem.getItemType()}'],"")){
Object.assign(tempViewParam,{[this.navPSDer['${calendarItem.getItemType()}']]:arg['${_appde.getCodeName()?lower_case}']});
}
if(this.navParam && this.navParam['${calendarItem.getItemType()}'] && this.navParam['${calendarItem.getItemType()}'].navigateContext && Object.keys(this.navParam['${calendarItem.getItemType()}'].navigateContext).length >0){
let _context:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navParam['${calendarItem.getItemType()}'].navigateContext);
Object.assign(tempContext,_context);
}
if(this.navParam && this.navParam['${calendarItem.getItemType()}'] && this.navParam['${calendarItem.getItemType()}'].navigateParams && Object.keys(this.navParam['${calendarItem.getItemType()}'].navigateParams).length >0){
let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navParam['${calendarItem.getItemType()}'].navigateParams);
Object.assign(tempViewParam,_params);
}
break; break;
</#if> </#if>
</#list> </#list>
</#if> </#if>
} }
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName[arg.itemType] }, data:data }); Object.assign(this.selection, { view: { viewname: this.navViewName[arg.itemType] }, context:tempContext,viewparam:tempViewParam });
this.$emit('selectionchange',args); this.$emit('selectionchange',args);
this.$forceUpdate(); this.$forceUpdate();
} }
......
...@@ -3,6 +3,16 @@ ...@@ -3,6 +3,16 @@
<#if view.getViewType() == 'DECALENDAREXPVIEW'> <#if view.getViewType() == 'DECALENDAREXPVIEW'>
:viewUID="viewUID" :viewUID="viewUID"
</#if> </#if>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
:newdata="newdata"
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
:opendata="opendata"
</#if>
</#list>
</#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl ../@MACRO/HTML/DEFAULT.html.ftl
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
</@ibizindent> </@ibizindent>
</span> </span>
</#if> </#if>
<context-menu-container>
<#if ctrl.getCalendarStyle?? && ctrl.getCalendarStyle() == 'TIMELINE'> <#if ctrl.getCalendarStyle?? && ctrl.getCalendarStyle() == 'TIMELINE'>
<el-timeline> <el-timeline>
<el-timeline-item <el-timeline-item
...@@ -27,10 +28,12 @@ ...@@ -27,10 +28,12 @@
:color="item.color" :color="item.color"
:timestamp="item.start" :timestamp="item.start"
placement="top"> placement="top">
<context-menu :contextMenuStyle="{width: '100%'}" :data="item" :renderContent="renderContextMenu">
<el-card @click.native="onEventClick(item,true,$event)" :class="item.className"> <el-card @click.native="onEventClick(item,true,$event)" :class="item.className">
<h4>{{item.title}}</h4> <h4>{{item.title}}</h4>
<p>从 {{item.start}} 至 {{item.end}}</p> <p>从 {{item.start}} 至 {{item.end}}</p>
</el-card> </el-card>
</context-menu>
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
<#else> <#else>
...@@ -58,6 +61,7 @@ ...@@ -58,6 +61,7 @@
:customButtons="customButtons" :customButtons="customButtons"
:validRange="validRange" :validRange="validRange"
:defaultDate="defaultDate" :defaultDate="defaultDate"
:eventRender="eventRender"
@dateClick="onDateClick" @dateClick="onDateClick"
@eventClick="onEventClick" @eventClick="onEventClick"
@eventDrop="onEventDrop" @eventDrop="onEventDrop"
...@@ -66,6 +70,7 @@ ...@@ -66,6 +70,7 @@
<el-date-picker style="width: 200px;" v-model="selectedGotoDate" type="date"></el-date-picker> <el-date-picker style="width: 200px;" v-model="selectedGotoDate" type="date"></el-date-picker>
</modal> </modal>
</#if> </#if>
</context-menu-container>
</div> </div>
</template> </template>
<#assign import_block> <#assign import_block>
...@@ -74,6 +79,7 @@ import dayGridPlugin from '@fullcalendar/daygrid' ...@@ -74,6 +79,7 @@ import dayGridPlugin from '@fullcalendar/daygrid'
import timeGridPlugin from '@fullcalendar/timegrid'; import timeGridPlugin from '@fullcalendar/timegrid';
import listPlugin from '@fullcalendar/list'; import listPlugin from '@fullcalendar/list';
import interactionPlugin from '@fullcalendar/interaction' import interactionPlugin from '@fullcalendar/interaction'
import ContextMenu from '@components/context-menu/context-menu'
</#assign> </#assign>
<#assign component_block> <#assign component_block>
...@@ -108,6 +114,29 @@ FullCalendar, ...@@ -108,6 +114,29 @@ FullCalendar,
*/ */
@Prop() public loadAction!: string; @Prop() public loadAction!: string;
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public newdata: any;
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public opendata: any;
</#if>
</#list>
</#if>
/** /**
* 日历部件样式名 * 日历部件样式名
* *
...@@ -484,8 +513,7 @@ FullCalendar, ...@@ -484,8 +513,7 @@ FullCalendar,
let _this = this; let _this = this;
let view: any = {}; let view: any = {};
let _context: any = Object.assign({},this.context); let _context: any = Object.assign({},this.context);
let itemType = event.itemType; switch(event.itemType) {
switch(itemType) {
<#if ctrl.getPSSysCalendarItems()??> <#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem> <#list ctrl.getPSSysCalendarItems() as calendarItem>
<#if calendarItem.getPSAppDataEntity()??> <#if calendarItem.getPSAppDataEntity()??>
...@@ -498,11 +526,10 @@ FullCalendar, ...@@ -498,11 +526,10 @@ FullCalendar,
</#list> </#list>
</#if> </#if>
} }
_context.itemType = itemType; this.selections = [event];
this.selections = [_context];
// 导航栏中不需要打开视图,只要抛出选中数据 // 导航栏中不需要打开视图,只要抛出选中数据
if(this.isSelectFirstDefault){ if(this.isSelectFirstDefault){
this.$emit("selectionchange",[_context]); this.$emit("selectionchange",this.selections);
return; return;
} }
// 根据打开模式打开视图 // 根据打开模式打开视图
...@@ -608,7 +635,7 @@ FullCalendar, ...@@ -608,7 +635,7 @@ FullCalendar,
} }
/** /**
* 获取单项 * 获取单项数据
* *
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
...@@ -680,6 +707,76 @@ FullCalendar, ...@@ -680,6 +707,76 @@ FullCalendar,
${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code} ${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code}
</#if> </#if>
/**
* 事件绘制回调
*
* @param {*} info 信息
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public eventRender(info?:any,) {
let data = Object.assign({title: info.event.title, start: info.event.start, end: info.event.end}, info.event.extendedProps);
info.el.addEventListener('contextmenu', (event: MouseEvent) => {
event.preventDefault();
let props = { data: data, renderContent: this.renderContextMenu };
let component = ContextMenu;
const vm:any = new Vue({
render(h) {
return h(component, { props });
}
}).$mount();
document.body.appendChild(vm.$el);
const comp: any = vm.$children[0];
comp.showContextMenu(event.clientX, event.clientY);
});
}
/**
* 绘制右键菜单
*
* @param {*} event
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public renderContextMenu(event: any) {
let content;
if (event && event.itemType) {
const data: any = JSON.parse(JSON.stringify(event));
this.selections = [event];
switch(event.itemType){
<#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType() == "CONTEXTMENU">
case "${childCtrl.getOwner().getItemType()}":
content = this.renderContextMenu${srfclassname(childCtrl.getOwner().getItemType()?lower_case)}();
break;
</#if>
</#list>
</#if>
}
}
return content;
}
<#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType() == "CONTEXTMENU">
/**
* 绘制${childCtrl.getOwner().getItemType()}类型右键菜单
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public renderContextMenu${srfclassname(childCtrl.getOwner().getItemType()?lower_case)}() {
return (
<@ibizindent blank=12>
${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
</@ibizindent>
);
}
</#if>
</#list>
</#if>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -6,6 +6,16 @@ ...@@ -6,6 +6,16 @@
<#if view.getViewType() == 'DECALENDARVIEW' || view.getViewType() == 'DECALENDARVIEW9'> <#if view.getViewType() == 'DECALENDARVIEW' || view.getViewType() == 'DECALENDARVIEW9'>
@beforeload="onBeforeLoad($event)" @beforeload="onBeforeLoad($event)"
</#if> </#if>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
:newdata="newdata"
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
:opendata="opendata"
</#if>
</#list>
</#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl ../@MACRO/HTML/DEFAULT.html.ftl
......
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<template>
<el-table ref="${ctrl.name}"
:data="items"
row-key="id"
border
lazy
height="100%"
:row-class-name="setRowClass"
:load="loadTreeNode"
:tree-props="{ children: 'children', hasChildren: 'leaf' }"
:select-on-indeterminate="isSingleSelect"
@current-change="select"
>
<#if ctrl.getPSDETreeColumns()??>
<#list ctrl.getPSDETreeColumns() as column>
<el-table-column show-overflow-tooltip prop="${column.getName()?lower_case}" label="${column.getCaption()}"<#if column.getWidthUnit()!='STAR'> :width="${column.getWidth()?c}" <#else> :min-width="${column.getWidth()?c}" </#if> :align="'${column.getAlign()?lower_case}'">
<template v-slot="{ row }">
<#if column.render??>
${column.render.code}
<#else>
<span>{{ getColumnValue(row, '${column.getName()?lower_case}') }}</span>
</#if>
</template>
</el-table-column>
</#list>
</#if>
</el-table>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--load
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public loadAction!: string;
/**
* 是否单选
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: true }) public isSingleSelect!: boolean;
/**
* 部件样式名
*
* @public
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public controlClass: string = "${ctrl.name}";
/**
* 数据集合
*
* @public
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public items: any[] = [];
/**
* 默认展开节点集合
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public defExpands: any = [];
/**
* 行节点下标
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public itemNum: any = {};
/**
* 计数下标
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public num: number = 0;
/**
* 获取列属性值
*
* @public
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getColumnValue(task: any, field: string) {
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
if(Object.is(task.id.split(';')[0], '${srfjavastring(node.getNodeType())}')) {
<#if node.getPSDETreeNodeDataItems()??>
<#list node.getPSDETreeNodeDataItems() as dataItem>
<#if dataItem.getFrontPSCodeList()??>
<#assign codelist = dataItem.getFrontPSCodeList()/>
if (Object.is(field, '${dataItem.name}')) {
let codelist: any[] = this.$store.getters.getCodeList('${codelist.getCodeName()}');
if(codelist) {
return this.getCodeListItem(codelist, task[field]);
}
}
</#if>
</#list>
</#if>
return task[field];
}
</#list>
</#if>
}
/**
* 获取代码项
*
* @public
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getCodeListItem(codelist: any, val: any) {
for(let i = 0; i < codelist.items.length; i++) {
if(Object.is(codelist.items[i].value, val)) {
return codelist.items[i].text;
}
}
return codelist.emptytext;
}
/**
* 搜索获取日程事件
*
* @param {*} $event 日期信息
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load(task: any = {}, resolve?: any) {
const params: any = {
srfnodeid: task && task.id ? task.id : "#",
srfnodefilter: ''
};
let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams));
let curNode:any = {};
Util.deepObjectMerge(curNode, task);
let tempContext:any = this.computecurNodeContext(curNode);
if(curNode && curNode.srfparentdename) {
Object.assign(tempContext,{ srfparentdename: curNode.srfparentdename });
Object.assign(tempViewParams,{ srfparentdename: curNode.srfparentdename });
}
if(curNode && curNode.srfparentkey) {
Object.assign(tempContext,{ srfparentkey: curNode.srfparentkey });
Object.assign(tempViewParams,{ srfparentkey: curNode.srfparentkey });
}
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: "错误", desc: response.info });
return;
}
response.data.forEach((item: any) => {
this.itemNum[item.id] = this.num++;
if(!item.collapsed) {
this.defExpands.push(item);
}
})
if(resolve && resolve instanceof Function) {
resolve(response.data);
} else {
this.items = [...response.data];
}
this.$nextTick(() => {
this.expandDefNode();
})
this.$emit("load", this.items);
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: "错误", desc: response.info });
});
}
/**
* 加载节点
*
* @memberof TreeTable
*/
public loadTreeNode(tree: any, treeNode: any, resolve: any) {
this.load(tree, resolve);
}
/**
* 计算当前节点的上下文
*
* @param {*} curNode 当前节点
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public computecurNodeContext(curNode:any){
let tempContext:any = {};
if(curNode && curNode.data && curNode.data.srfappctx){
tempContext = JSON.parse(JSON.stringify(curNode.data.srfappctx));
}else{
tempContext = JSON.parse(JSON.stringify(this.context));
}
return tempContext;
}
/**
* 节点展开
*
* @param {*} item 当前节点
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public itemExpand(item: any) {
}
/**
* 刷新
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public refresh() {
this.load();
}
/**
* 选中的数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public selections: any[] = [];
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getDatas(): any[] {
return this.selections;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getData(): any {
return null;
}
/**
* vue 生命周期
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created() {
this.load();
}
/**
* 设置行Class
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public setRowClass({row, rowIndex}: {row: any, rowIndex: number}) {
return 'treegrid' + this.itemNum[row.id];
}
/**
* 展开默认节点
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public expandDefNode() {
if(this.defExpands.length > 0) {
let item: any = this.defExpands[0];
this.defExpands.splice(0, 1);
let trs: any = this.$el.getElementsByClassName('treegrid' + this.itemNum[item.id]);
if(trs) {
let icons: any = trs[0].getElementsByClassName('el-table__expand-icon');
icons[0].click();
}
}
}
/**
* 选中变化
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public select($event: any) {
if (!$event) {
return;
}
this.selections = [JSON.parse(JSON.stringify($event))];
this.$emit('selectionchange', this.selections);
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
.gantt {
height: 100%;
.gantt-elastic__main-view-container {
flex-grow: 1;
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 日历项类型
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public itemType: string = "";
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public getDataItems(): any[] {
let dataItems: any = [
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}'
},
</#if>
</#list>
</#if>
</#if>
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'style',
},
{
name: 'textColor',
},
{
name: 'itemType',
},
{
name: 'parentId'
},
{
name: 'query',
prop: 'query',
},
];
switch(this.itemType){
<#-- 甘特项实体映射 -->
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as ganttItem>
<#if ganttItem.getTreeNodeType() == "DE">
case "${ganttItem.getNodeType()}":
dataItems = [...dataItems,
<#if ganttItem.getIdPSAppDEField()??>
{
name: 'id',
prop: '${ganttItem.getIdPSAppDEField().getCodeName()?lower_case}'
},
</#if>
<#if ganttItem.getPSDETreeNodeDataItems()??>
<#list ganttItem.getPSDETreeNodeDataItems() as dataItem>
{
name: '<#if dataItem.getName() == 'begin'>start<#else>${dataItem.getName()?lower_case}</#if>',
prop: '<#if dataItem.getPSDEField()??>${dataItem.getPSDEField().getCodeName()?lower_case}</#if>'
},
</#list>
</#if>
];
break;
</#if>
</#list>
</#if>
}
return dataItems;
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign import_block>
import CodeListService from '@service/app/codelist-service';
import i18n from '@/locale';
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
<#if node.getTreeNodeType() == 'DE' && node.getPSAppDataEntity()??>
<#if appde?? && appde.getId() != node.getPSAppDataEntity().getId()>
<#if !P.exists("importService", node.getPSAppDataEntity().getId(), "")>
import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@service/${srffilepath2(node.getPSAppDataEntity().codeName)}/${srffilepath2(node.getPSAppDataEntity().codeName)}-service';
</#if>
</#if>
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#-- 获取树节点关系导航上下文 -->
<#macro getNavContext nodeRs>
<#compress>
<#if nodeRs.getPSDETreeNodeRSNavContexts()??>
<#list nodeRs.getPSDETreeNodeRSNavContexts() as rsNavContext>
"${rsNavContext.getKey()}":{"isRawValue":${rsNavContext.isRawValue()?c},"value":"${rsNavContext.getValue()}"}<#if rsNavContext_has_next>,</#if>
</#list>
</#if>
</#compress>
</#macro>
<#-- 获取树节点关系导航参数 -->
<#macro getNavParams nodeRs>
<#compress>
<#if nodeRs.getPSDETreeNodeRSNavParams()??>
<#list nodeRs.getPSDETreeNodeRSNavParams() as rsNavParam>
"${rsNavParam.getKey()}":{"isRawValue":${rsNavParam.isRawValue()?c},"value":"${rsNavParam.getValue()}"}<#if rsNavParam_has_next>,</#if>
</#list>
</#if>
</#compress>
</#macro>
<#-- 获取树节点关系参数 -->
<#macro getParams nodeRs>
<#compress>
<#if nodeRs.getPSDETreeNodeRSParams()??>
<#list nodeRs.getPSDETreeNodeRSParams() as rsParam>
"${rsParam.getKey()}":{"value":"${rsParam.getValue()}"}<#if rsParam_has_next>,</#if>
</#list>
</#if>
</#compress>
</#macro>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public codeListService:CodeListService = new CodeListService({ $store: this.getStore() });
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
<#if node.getTreeNodeType() == 'DE' && node.getPSAppDataEntity()??>
<#if appde?? && appde.getId() != node.getPSAppDataEntity().getId()>
<#if !P.exists("importService2", node.getPSAppDataEntity().getId(), "")>
/**
* ${node.getPSAppDataEntity().getLogicName()}服务对象
*
* @type {${srfclassname('${node.getPSAppDataEntity().codeName}')}Service}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public ${node.getPSAppDataEntity().codeName?lower_case}Service: ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service = new ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service({ $store: this.getStore() });
</#if>
</#if>
</#if>
</#list>
</#if>
/**
* 节点分隔符号
*
* @public
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public TREENODE_SEPARATOR: string = ';';
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
/**
* ${node.getName()}节点分隔符号
*
* @public
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public TREENODE_${node.getNodeType()?upper_case}: string = '${node.getNodeType()?j_string}';
</#list>
</#if>
/**
* 商品类别节点分隔符号
*
* @public
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public dataModel: any = {
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
${node.getNodeType()}: {
<#if node.getPSDETreeNodeDataItems()??>
<#list node.getPSDETreeNodeDataItems() as dataItem>
<#if dataItem.name == "barstyle">
style: {
prop: '<#if dataItem.getPSAppDEField()??>${dataItem.getPSAppDEField().getCodeName()?lower_case}</#if>',
default: <#if dataItem.getDefaultValue()?length gt 0>${dataItem.getDefaultValue()}<#else>null</#if>
},
<#else>
<#if dataItem.name == "begin">start<#else>${dataItem.name}</#if>: {
prop: '<#if dataItem.getPSAppDEField()??>${dataItem.getPSAppDEField().getCodeName()?lower_case}</#if>',
default: <#if dataItem.getDefaultValue()?length gt 0>'${dataItem.getDefaultValue()}'<#else>null</#if>
},
</#if>
</#list>
</#if>
},
</#list>
</#if>
}
/**
* 获取节点数据
*
* @param {string} action
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public async getNodes(context:any = {},data: any = {}, isloading?: boolean): Promise<any> {
let { srfparentkey, srfcat, srfnodeid, srfnodefilter, query }: { srfparentkey: string, srfcat: string, srfnodeid: string, srfnodefilter: string, query:string } = data;
srfnodefilter = query ? query : srfnodefilter;
let list: any[] = [];
let filter: any = {};
let srfotherkey: string = '';
<#-- BEGIN:逻辑代码 -->
if (!srfnodeid || Object.is(srfnodeid, '#')) {
<#if ctrl.isRootVisible()>
await this.fill${srfclassname(ctrl.getRootPSDETreeNode().getNodeType()?lower_case)}Nodes(context, filter, list);
return Promise.resolve({ status: 200, data: list });
<#else>
srfnodeid = this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case};
</#if>
} else {
srfotherkey = srfnodeid;
srfnodeid = srfnodeid.split('_#_')[0];
}
let strTreeNodeId: string = srfnodeid;
let strRealNodeId: string = '';
let bRootSelect: boolean = false;
let strNodeType: string | null = null;
let strRootSelectNode: string = '';
if (Object.is(strTreeNodeId, this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case})) {
strNodeType = this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case};
if (srfparentkey) {
strRealNodeId = srfparentkey;
}
} else {
let nPos = strTreeNodeId.indexOf(this.TREENODE_SEPARATOR);
if (nPos === -1) {
return Promise.reject({ status: 500, data: { title: '失败', message: `树节点${r'${strTreeNodeId}'}标识无效` } });
}
strNodeType = strTreeNodeId.substring(0, nPos);
strRealNodeId = strTreeNodeId.substring(nPos + 1);
}
Object.assign(filter,
{
srfparentkey: srfparentkey,
srfcat: srfcat,
srfnodefilter: srfnodefilter,
strRealNodeId: strRealNodeId,
srfnodeid: srfnodeid,
srfotherkey: srfotherkey,
strNodeType: strNodeType,
viewparams: JSON.parse(JSON.stringify(data)).viewparams
}
);
// 分解节点标识
let nodeid: string[] = strRealNodeId.split(this.TREENODE_SEPARATOR);
for (let i = 0; i < nodeid.length; i++) {
switch (i) {
case 0:
Object.assign(filter, { nodeid: nodeid[0] });
break;
case 1:
Object.assign(filter, { nodeid2: nodeid[1] });
break;
case 2:
Object.assign(filter, { nodeid3: nodeid[2] });
break;
case 3:
Object.assign(filter, { nodeid4: nodeid[3] });
break;
default:
break;
}
}
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
if (Object.is(strNodeType, this.TREENODE_${node.getNodeType()?upper_case})) {
await this.fill${srfclassname(node.getNodeType()?lower_case)}NodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
</#list>
</#if>
<#-- END:逻辑代码 -->
return Promise.resolve({ status: 500, data: { title: '失败', message: `树节点${r'${strTreeNodeId}'}标识无效` } });
}
<#-- BEGIN:填充代码 -->
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
<#assign filtername="">
<#assign entityname="">
/**
* 填充 树视图节点[${node.getName()}]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public fill${srfclassname(node.getNodeType()?lower_case)}Nodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
<#if node.getTreeNodeType() == 'STATIC'>
let treeNode: any = {};
Object.assign(treeNode, { text: 'entities.${appde.getCodeName()?lower_case}.${ctrl.getCodeName()?lower_case}_${ctrl.getControlType()?lower_case}.nodes.${node.getNodeType()?lower_case}' });
Object.assign(treeNode, { isUseLangRes: true });
<#if node.isEnableQuickSearch()>
if(filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")){
if((i18n.t(treeNode.text) as string).toUpperCase().indexOf(filter.getSrfnodefilter().toUpperCase())==-1)
return Promise.reject();
}
</#if>
Object.assign(treeNode,{srfappctx:context});
Object.assign(treeNode, { srfmajortext: treeNode.text });
let strNodeId: string = '${node.getNodeType()?j_string}';
<#if node.getNodeValue()?? && node.getNodeValue()?length gt 0>
Object.assign(treeNode, { srfkey: '${node.getNodeValue()?j_string}' });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += '${node.getNodeValue()?j_string}';
<#if node.isAppendPNodeId()>
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.strRealNodeId;
</#if>
<#else>
// 没有指定节点值,直接使用父节点值
Object.assign(treeNode, { srfkey: filter.strRealNodeId });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.strRealNodeId;
</#if>
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
<#if node.getPSSysImage()??>
<#if node.getPSSysImage().getCssClass()?? && node.getPSSysImage().getCssClass()?length gt 0>
Object.assign(treeNode, { iconcls: '${node.getPSSysImage().getCssClass()}' });
<#else>
Object.assign(treeNode, { icon: '${node.getPSSysImage().getImagePath()}' });
</#if>
</#if>
<#if node.isEnableCheck()>
Object.assign(treeNode, { enablecheck: true });
</#if>
<#if node.isDisableSelect()>
Object.assign(treeNode, { disabled: true });
</#if>
<#if node.isExpanded()>
Object.assign(treeNode, { collapsed: false });
<#else>
Object.assign(treeNode, { collapsed: true });
</#if>
<#if node.hasPSDETreeNodeRSs()>
Object.assign(treeNode, { leaf: false });
<#else>
Object.assign(treeNode, { leaf: true });
</#if>
<#if node.isSelected()>
Object.assign(treeNode, { selected: true });
</#if>
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() != "">
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' });
</#if>
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
if(!Object.is(filter.srfnodeid, this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(treeNode, { parentId: filter.srfotherkey });
}
list.push(treeNode);
resolve(list);
});
</#if>
<#if node.getTreeNodeType() == 'CODELIST' && node.getPSCodeList()??>
<#if node.getPSCodeList().getCodeListType()?? && node.getPSCodeList().getCodeListType() == 'STATIC'>
let codeListIems:Array<any> = [];
if (this.getStore()) {
codeListIems = (this.getStore() as any).getters.getCodeListItems('${node.getPSCodeList().codeName}');
}
<#elseif node.getPSCodeList().getCodeListType()?? && node.getPSCodeList().getCodeListType() == 'DYNAMIC'>
this.codeListService.getItems('${node.getPSCodeList().codeName}',context).then((codeListIems:any)=>{
</#if>
if(codeListIems && codeListIems.length >0){
const handleChildData = (context:any,item:any,) =>{
Object.assign(item,{srfappctx:context});
<#if node.getPSCodeList().getCodeListType() == 'STATIC'>
Object.assign(item, { text: 'codelist.${node.getPSCodeList().codeName}.'+item.value });
Object.assign(item, { isUseLangRes: true });
<#else>
Object.assign(item, { text: item.text });
</#if>
Object.assign(item, { srfmajortext: item.text });
let strNodeId: string = "${srfjavastring(node.getNodeType())}";
Object.assign(item, { srfkey: item.value });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += item.value;
<#if node.isAppendPNodeId()>
strNodeId += TREENODE_SEPARATOR;
strNodeId += filter.getRealnodeid();
</#if>
Object.assign(item, { id: strNodeId + '_#_' + filter.srfnodeid });
<#if node.getPSSysImage()??>
<#if node.getPSSysImage().getCssClass()?? && node.getPSSysImage().getCssClass()?length gt 0>
Object.assign(item, { iconcls: '${node.getPSSysImage().getCssClass()}' });
<#else>
Object.assign(item, { icon: '${node.getPSSysImage().getImagePath()}' });
</#if>
</#if>
<#if node.isEnableCheck()>
Object.assign(item, { enablecheck: true });
</#if>
<#if node.isDisableSelect()>
Object.assign(item, { disabled: true });
</#if>
<#if node.isExpanded()>
Object.assign(item, { collapsed: false });
<#else>
Object.assign(item, { collapsed: true });
</#if>
<#if node.isSelected()>
Object.assign(item, { selected: true });
</#if>
<#if node.getNavFilter()??>
Object.assign(item, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() !="">
Object.assign(item, { navparams: '${node.getNavViewParam()}' });
</#if>
<#-- 补充nodeid和nodeid2 -->
Object.assign(item, { nodeid: item.srfkey });
Object.assign(item, { nodeid2: item.pvalue });
}
codeListIems = this.handleDataSet(JSON.parse(JSON.stringify(codeListIems)),context,handleChildData);
codeListIems.forEach((item:any) => {
let treeNode: any = {};
Object.assign(treeNode,{srfappctx:context});
<#if node.getPSCodeList().getCodeListType() == 'STATIC'>
Object.assign(treeNode, { text: 'codelist.${node.getPSCodeList().codeName}.'+item.value });
Object.assign(treeNode, { isUseLangRes: true });
<#else>
Object.assign(treeNode, { text: item.text });
</#if>
<#if node.isEnableQuickSearch()>
if(filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")){
if((i18n.t(treeNode.text) as string).toUpperCase().indexOf(filter.getSrfnodefilter().toUpperCase())==-1)
return;
}
</#if>
Object.assign(treeNode, { srfmajortext: treeNode.text });
let strNodeId: string = "${srfjavastring(node.getNodeType())}";
Object.assign(treeNode, { srfkey: item.value });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += item.value;
<#if node.isAppendPNodeId()>
strNodeId += TREENODE_SEPARATOR;
strNodeId += filter.getRealnodeid();
</#if>
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
<#if node.getPSSysImage()??>
<#if node.getPSSysImage().getCssClass()?? && node.getPSSysImage().getCssClass()?length gt 0>
Object.assign(treeNode, { iconcls: '${node.getPSSysImage().getCssClass()}' });
<#else>
Object.assign(treeNode, { icon: '${node.getPSSysImage().getImagePath()}' });
</#if>
</#if>
<#if node.isEnableCheck()>
Object.assign(treeNode, { enablecheck: true });
</#if>
<#if node.isDisableSelect()>
Object.assign(treeNode, { disabled: true });
</#if>
<#if node.isExpanded()>
Object.assign(treeNode, { collapsed: false });
<#else>
Object.assign(treeNode, { collapsed: true });
</#if>
<#if node.hasPSDETreeNodeRSs()>
Object.assign(treeNode, { leaf: false });
<#else>
Object.assign(treeNode, { leaf: true });
</#if>
<#if node.isSelected()>
Object.assign(treeNode, { selected: true });
</#if>
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() !="">
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' });
</#if>
if(item.children && item.children.length >0){
Object.assign(treeNode, { children: item.children });
}
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
if(!Object.is(filter.srfnodeid, this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(treeNode, { parentId: filter.srfotherkey });
}
list.push(treeNode);
resolve(list);
})
}else{
resolve(list);
}
<#if node.getPSCodeList().getCodeListType()?? && node.getPSCodeList().getCodeListType() == 'DYNAMIC'>
});
</#if>
});
</#if>
<#if node.getTreeNodeType() == 'DE' && node.getPSAppDataEntity()??>
<#assign filtername>${node.getPSAppDataEntity().codeName}SearchFilter</#assign>
<#assign entityname>${node.getPSAppDataEntity().codeName}</#assign>
let searchFilter: any = {};
<#list ctrl.getPSDETreeNodeRSs() as noders>
<#if noders.getChildPSDETreeNode().id == node.id>
<#if noders.getParentFilter()?? && noders.getParentFilter()?length gt 0>
<#assign pickupfield=noders.getParentFilter()>
if (Object.is(filter.strNodeType, this.TREENODE_${noders.getParentPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(searchFilter, { n_${pickupfield?lower_case}_eq: filter.nodeid<#if noders.getParentValueLevel() gt 1>${noders.getParentValueLevel()?c}</#if> });
}
<#elseif noders.getParentPSDER1N()??>
<#assign pickupfield=noders.getParentPSDER1N().getPSPickupDEField()>
if (Object.is(filter.strNodeType, this.TREENODE_${noders.getParentPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(searchFilter, { n_${pickupfield.getName()?lower_case}_eq: filter.nodeid<#if noders.getParentValueLevel() gt 1>${noders.getParentValueLevel()?c}</#if> });
}
</#if>
</#if>
</#list>
Object.assign(searchFilter, { total: false });
<#if node.isEnableQuickSearch()>
Object.assign(searchFilter, { query: filter.srfnodefilter });
</#if>
let bFirst: boolean = true;
let records: any[] = [];
try {
this.search${srfclassname(node.getNodeType()?lower_case)}(context, searchFilter, filter).then((records:any) =>{
if(records && records.length >0){
records.forEach((entity: any) => {
let treeNode: any = {};
// 整理context
<#if node.getIdPSDEField()??>
let strId: string = entity.${node.getIdPSDEField().codeName?lower_case};
<#else>
let strId: string = entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case};
</#if>
<#if node.getTextPSDEField()??>
let strText: string = entity.${node.getTextPSDEField().codeName?lower_case};
<#else>
let strText: string = entity.${node.getPSAppDataEntity().getMajorPSAppDEField().codeName?lower_case};
</#if>
Object.assign(treeNode,{srfparentdename:'${node.getPSAppDataEntity().getCodeName()}',srfparentkey:<#if node.getIdPSDEField()??>entity.${node.getIdPSDEField().codeName?lower_case}<#else>entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}</#if>});
let tempContext:any = JSON.parse(JSON.stringify(context));
Object.assign(tempContext,{srfparentdename:'${node.getPSAppDataEntity().getCodeName()}',srfparentkey:<#if node.getIdPSDEField()??>entity.${node.getIdPSDEField().codeName?lower_case}<#else>entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}</#if>,${node.getPSAppDataEntity().getCodeName()?lower_case}:strId})
Object.assign(treeNode,{srfappctx:tempContext});
Object.assign(treeNode,{'${node.getPSAppDataEntity().getCodeName()?lower_case}':strId});
Object.assign(treeNode, { srfkey: strId });
Object.assign(treeNode, { text: strText, srfmajortext: strText });
let strNodeId: string = '${node.getNodeType()?j_string}';
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += strId;
<#if node.isAppendPNodeId()>
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.realnodeid;
</#if>
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
<#if node.getPSSysImage()??>
<#if node.getPSSysImage().getCssClass()?? && node.getPSSysImage().getCssClass()?length gt 0>
Object.assign(treeNode, { iconcls: '${node.getPSSysImage().getCssClass()}' });
<#else>
Object.assign(treeNode, { icon: '${node.getPSSysImage().getImagePath()}' });
</#if>
</#if>
<#if node.isEnableCheck()>
Object.assign(treeNode, { enablecheck: true });
</#if>
<#if node.isDisableSelect()>
Object.assign(treeNode, { disabled: true });
</#if>
<#if node.isExpanded()>
Object.assign(treeNode, { collapsed: false });
<#else>
Object.assign(treeNode, { collapsed: true });
</#if>
<#if node.hasPSDETreeNodeRSs()>
Object.assign(treeNode, { leaf: true });
<#else>
Object.assign(treeNode, { leaf: false });
</#if>
<#if node.getLeafFlagPSDEField()??>
let objLeafFlag = entity.${node.getLeafFlagPSDEField().codeName?lower_case};
if (objLeafFlag != null ) {
let strLeafFlag: string = objLeafFlag.toString().toLowerCase();
if (Object.is(strLeafFlag, '1') || Object.is(strLeafFlag, 'true')){
Object.assign(treeNode, { leaf: true });
}
}
</#if>
<#if node.isSelected()>
Object.assign(treeNode, { selected: true });
</#if>
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() != "">
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' });
</#if>
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
if(!Object.is(filter.srfnodeid, this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(treeNode, { parentId: filter.srfotherkey });
}
for(let key in this.dataModel.${node.getNodeType()}) {
let item = this.dataModel.${node.getNodeType()}[key];
let propVal: any = entity[item.prop];
try {
let def: any = JSON.parse(item.default);
propVal = propVal != null ? propVal : def.value;
if (def.hasOwnProperty('bkcolor')) {
Object.assign(treeNode.style, { base: { fill: def.bkcolor, stroke: def.bkcolor }});
}
if (def.hasOwnProperty('color')) {
Object.assign(treeNode.style, { text: { color: def.color }});
}
} catch(e) {
propVal = propVal != null ? propVal : item.default
}
treeNode[key] = propVal
}
list.push(treeNode);
resolve(list);
bFirst = false;
});
}else{
resolve(list);
}
});
} catch (error) {
console.error(error);
}
});
</#if>
}
<#if (filtername?length gt 0) && (entityname?length gt 0)>
/**
* 获取查询集合
*
* @public
* @param {any{}} context
* @param {*} searchFilter
* @param {*} filter
* @returns {any[]}
* @memberof TestEnetityDatasService
*/
@Errorlog
public search${srfclassname(node.getNodeType()?lower_case)}(context:any={}, searchFilter: any, filter: any): Promise<any> {
return new Promise((resolve:any,reject:any) =>{
if(filter.viewparams){
Object.assign(searchFilter,filter.viewparams);
}
if(!searchFilter.page){
Object.assign(searchFilter,{page:0});
}
if(!searchFilter.size){
Object.assign(searchFilter,{size:1000});
}
if(context && context.srfparentdename){
Object.assign(searchFilter,{srfparentdename:JSON.parse(JSON.stringify(context)).srfparentdename});
}
if(context && context.srfparentkey){
Object.assign(searchFilter,{srfparentkey:JSON.parse(JSON.stringify(context)).srfparentkey});
}
<#if node.getSortField?? && node.getSortField()?? && node.getSortField() != "" && node.getSortDir?? && node.getSortDir()?? && node.getSortDir() != "">
Object.assign(searchFilter,{sort: '${node.getSortField()?lower_case},${node.getSortDir()?lower_case}'})
</#if>
<#if appde?? && appde.getId() != node.getPSAppDataEntity().getId()>
const _appEntityService: any = this.${node.getPSAppDataEntity().codeName?lower_case}Service;
<#else>
const _appEntityService: any = this.appEntityService;
</#if>
let list: any[] = [];
if (_appEntityService['${node.getPSAppDEDataSet().getCodeName()}'] && _appEntityService['${node.getPSAppDEDataSet().getCodeName()}'] instanceof Function) {
const response: Promise<any> = _appEntityService['${node.getPSAppDEDataSet().getCodeName()}'](context, searchFilter, false);
response.then((response: any) => {
if (!response.status || response.status !== 200) {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询${node.getPSAppDEDataSet().getCodeName()}数据集异常!');
}
const data: any = response.data;
if (Object.keys(data).length > 0) {
list = JSON.parse(JSON.stringify(data));
resolve(list);
} else {
resolve([]);
}
}).catch((response: any) => {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询${node.getPSAppDEDataSet().getCodeName()}数据集异常!');
});
}
})
}
</#if>
/**
* 填充 树视图节点[${node.getName()}]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public async fill${srfclassname(node.getNodeType()?lower_case)}NodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
<#if ctrl.getPSDETreeNodeRSs()??>
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
<#list ctrl.getPSDETreeNodeRSs() as noders>
<#if noders.getParentPSDETreeNode().id == node.id>
<#if noders.getSearchMode() == 1 || noders.getSearchMode() == 3>
// 填充${noders.getChildPSDETreeNode().getName()}
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavContext:any = {<@getNavContext nodeRs=noders />};
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavParams:any = {<@getNavParams nodeRs=noders />};
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsParams:any = {<@getParams nodeRs=noders />};
await this.fill${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}Nodes(context, filter, list ,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavContext,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavParams,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsParams);
</#if>
</#if>
</#list>
} else {
<#list ctrl.getPSDETreeNodeRSs() as noders>
<#if noders.getParentPSDETreeNode().id == node.id>
<#if noders.getSearchMode() == 2 || noders.getSearchMode() == 3>
// 填充${noders.getChildPSDETreeNode().getName()}
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavContext:any = {<@getNavContext nodeRs=noders />};
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavParams:any = {<@getNavParams nodeRs=noders />};
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsParams:any = {<@getParams nodeRs=noders />};
await this.fill${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}Nodes(context, filter, list ,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavContext,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavParams,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsParams);
</#if>
</#if>
</#list>
}
</#if>
}
</#list>
</#if>
/**
* 处理代码表返回数据(树状结构)
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleDataSet(result:Array<any>,context:any,callBack:any){
let list:Array<any> = [];
if(result.length === 0){
return list;
}
result.forEach((codeItem:any) =>{
if(!codeItem.pvalue){
let valueField:string = codeItem.value;
this.setChildCodeItems(valueField,result,codeItem);
list.push(codeItem);
}
})
this.setNodeData(list,context,callBack);
return list;
}
/**
* 处理非根节点数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public setChildCodeItems(pValue:string,result:Array<any>,codeItem:any){
result.forEach((item:any) =>{
if(item.pvalue == pValue){
let valueField:string = item.value;
this.setChildCodeItems(valueField,result,item);
if(!codeItem.children){
codeItem.children = [];
}
codeItem.children.push(item);
}
})
}
/**
* 设置节点UI数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public setNodeData(result:Array<any>,context:any,callBack:any){
result.forEach((item:any) =>{
if(item.children){
item.leaf = false;
this.setNodeData(item.children,context,callBack);
}else{
item.leaf = true;
}
callBack(context,item);
})
}
/**
* 处理节点关系导航上下文
*
* @param context 应用上下文
* @param filter 参数
* @param resNavContext 节点关系导航上下文
*
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleResNavContext(context:any,filter:any,resNavContext:any){
if(resNavContext && Object.keys(resNavContext).length > 0){
let tempContextData:any = JSON.parse(JSON.stringify(context));
let tempViewParams:any = {};
if(filter && filter.viewparams){
tempViewParams = filter.viewparams;
}
Object.keys(resNavContext).forEach((item:any) =>{
let curDataObj:any = resNavContext[item];
this.handleCustomDataLogic(context,tempViewParams,curDataObj,tempContextData,item);
})
return tempContextData;
}else{
return context;
}
}
/**
* 处理关系导航参数
*
* @param context 应用上下文
* @param filter 参数
* @param resNavParams 节点关系导航参数
* @param resParams 节点关系参数
*
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleResNavParams(context:any,filter:any,resNavParams:any,resParams:any){
if((resNavParams && Object.keys(resNavParams).length >0) || (resParams && Object.keys(resParams).length >0)){
let tempViewParamData:any = {};
let tempViewParams:any = {};
if(filter && filter.viewparams){
tempViewParams = filter.viewparams;
tempViewParamData = JSON.parse(JSON.stringify(filter.viewparams));
}
if( Object.keys(resNavParams).length > 0){
Object.keys(resNavParams).forEach((item:any) =>{
let curDataObj:any = resNavParams[item];
this.handleCustomDataLogic(context,tempViewParams,curDataObj,tempViewParamData,item);
})
}
if( Object.keys(resParams).length > 0){
Object.keys(resParams).forEach((item:any) =>{
let curDataObj:any = resParams[item];
tempViewParamData[item.toLowerCase()] = curDataObj.value;
})
}
Object.assign(filter,{viewparams:tempViewParamData});
return filter;
}else{
return filter;
}
}
/**
* 处理自定义节点关系导航数据
*
* @param context 应用上下文
* @param viewparams 参数
* @param curNavData 节点关系导航参数对象
* @param tempData 返回数据
* @param item 节点关系导航参数键值
*
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleCustomDataLogic(context:any,viewparams:any,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(context[(curNavData.value).toLowerCase()]){
Object.defineProperty(tempData, item.toLowerCase(), {
value: context[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(viewparams[(curNavData.value).toLowerCase()]){
Object.defineProperty(tempData, item.toLowerCase(), {
value: viewparams[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=TREEGRIDEX
\ No newline at end of file
...@@ -471,7 +471,8 @@ ...@@ -471,7 +471,8 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public refresh(args: any[]): void { public refresh(args: any[]): void {
if (Object.keys(this.currentselectedNode).length === 0) { this.refresh_all();
<#-- if (Object.keys(this.currentselectedNode).length === 0) {
return; return;
} }
const id: string = this.currentselectedNode.id; const id: string = this.currentselectedNode.id;
...@@ -483,13 +484,13 @@ ...@@ -483,13 +484,13 @@
} }
let curNode:any = {}; let curNode:any = {};
curNode = Util.deepObjectMerge(curNode,node); curNode = Util.deepObjectMerge(curNode,node);
let tempContext:any; let tempContext:any = {};
if(curNode.data && curNode.data.srfappctx){ if(curNode.data && curNode.data.srfappctx){
Object.assign(tempContext,curNode.data.srfappctx); Object.assign(tempContext,curNode.data.srfappctx);
}else{ }else{
Object.assign(tempContext,this.context); Object.assign(tempContext,this.context);
} }
this.refresh_node(tempContext,param, false); this.refresh_node(tempContext,param, false); -->
} }
/** /**
......
...@@ -17,6 +17,10 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -17,6 +17,10 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl ../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude> </#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude>
<#-- 获取树节点关系导航上下文 --> <#-- 获取树节点关系导航上下文 -->
<#macro getNavContext nodeRs> <#macro getNavContext nodeRs>
<#compress> <#compress>
...@@ -280,8 +284,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -280,8 +284,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.getNavFilter()??> <#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" }); Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if> </#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() != ""> <#if node.getPSNavigateContexts?? && node.getPSNavigateContexts()??>
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' }); Object.assign(treeNode, {navigateContext: <@getNavigateContext node /> });
</#if>
<#if node.getPSNavigateParams?? && node.getPSNavigateParams()??>
Object.assign(treeNode, {navigateParams: <@getNavigateParams node /> });
</#if> </#if>
<#-- 补充nodeid和nodeid2 --> <#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey }); Object.assign(treeNode, { nodeid: treeNode.srfkey });
...@@ -346,8 +353,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -346,8 +353,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.getNavFilter()??> <#if node.getNavFilter()??>
Object.assign(item, { navfilter: "${node.getNavFilter()}" }); Object.assign(item, { navfilter: "${node.getNavFilter()}" });
</#if> </#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() !=""> <#if node.getPSNavigateContexts?? && node.getPSNavigateContexts()??>
Object.assign(item, { navparams: '${node.getNavViewParam()}' }); Object.assign(item, {navigateContext: <@getNavigateContext node /> });
</#if>
<#if node.getPSNavigateParams?? && node.getPSNavigateParams()??>
Object.assign(item, {navigateParams: <@getNavigateParams node /> });
</#if> </#if>
<#-- 补充nodeid和nodeid2 --> <#-- 补充nodeid和nodeid2 -->
Object.assign(item, { nodeid: item.srfkey }); Object.assign(item, { nodeid: item.srfkey });
...@@ -412,8 +422,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -412,8 +422,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.getNavFilter()??> <#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" }); Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if> </#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() !=""> <#if node.getPSNavigateContexts?? && node.getPSNavigateContexts()??>
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' }); Object.assign(treeNode, {navigateContext: <@getNavigateContext node /> });
</#if>
<#if node.getPSNavigateParams?? && node.getPSNavigateParams()??>
Object.assign(treeNode, {navigateParams: <@getNavigateParams node /> });
</#if> </#if>
if(item.children && item.children.length >0){ if(item.children && item.children.length >0){
Object.assign(treeNode, { children: item.children }); Object.assign(treeNode, { children: item.children });
...@@ -540,8 +553,12 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -540,8 +553,12 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.getNavFilter()??> <#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" }); Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if> </#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() != ""> Object.assign(treeNode, { curData: entity });
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' }); <#if node.getPSNavigateContexts?? && node.getPSNavigateContexts()??>
Object.assign(treeNode, {navigateContext: <@getNavigateContext node /> });
</#if>
<#if node.getPSNavigateParams?? && node.getPSNavigateParams()??>
Object.assign(treeNode, {navigateParams: <@getNavigateParams node /> });
</#if> </#if>
<#-- 补充nodeid和nodeid2 --> <#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey }); Object.assign(treeNode, { nodeid: treeNode.srfkey });
......
...@@ -198,38 +198,32 @@ ...@@ -198,38 +198,32 @@
}) })
Object.assign(tempContext,{srfcounter:this.counter}); Object.assign(tempContext,{srfcounter:this.counter});
} }
if(arg && arg.navparams){
let curNavParams:any = JSON.parse(arg.navparams);
if(Object.keys(curNavParams).length >0){
Object.keys(curNavParams).forEach((name:any) =>{
if (!name) {
return;
}
let value: string | null = curNavParams[name];
if (value && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1);
if (arg && arg.hasOwnProperty(key)) {
value = (arg[key] !== null && arg[key] !== undefined) ? arg[key] : null;
} else {
value = null;
}
}
Object.assign(tempViewparam, { [name]: value });
})
this.counter += 1;
Object.assign(tempContext,{srfcounter:this.counter});
}
}
Object.assign(tempContext,JSON.parse(JSON.stringify(this.context))); Object.assign(tempContext,JSON.parse(JSON.stringify(this.context)));
if(arg.srfappctx){ if(arg.srfappctx){
Object.assign(tempContext,JSON.parse(JSON.stringify(arg.srfappctx))); Object.assign(tempContext,JSON.parse(JSON.stringify(arg.srfappctx)));
} }
// 计算导航上下文
if(arg && arg.navigateContext && Object.keys(arg.navigateContext).length >0){
let tempData:any = arg.curData?JSON.parse(JSON.stringify(arg.curData)):{};
Object.assign(tempData,arg);
let _context = this.$util.computedNavData(tempData,tempContext,tempViewparam,arg.navigateContext);
Object.assign(tempContext,_context);
}
if(arg.srfparentdename){ if(arg.srfparentdename){
Object.assign(tempContext,{srfparentdename:arg.srfparentdename}); Object.assign(tempContext,{srfparentdename:arg.srfparentdename});
} }
if(arg.srfparentkey){ if(arg.srfparentkey){
Object.assign(tempContext,{srfparentkey:arg.srfparentkey}); Object.assign(tempContext,{srfparentkey:arg.srfparentkey});
} }
// 计算导航参数
if(arg && arg.navigateParams && Object.keys(arg.navigateParams).length >0){
let tempData:any = arg.curData?JSON.parse(JSON.stringify(arg.curData)):{};
Object.assign(tempData,arg);
let _params = this.$util.computedNavData(tempData,tempContext,tempViewparam,arg.navigateParams);
Object.assign(tempViewparam,_params);
this.counter += 1;
Object.assign(tempContext,{srfcounter:this.counter});
}
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: refview.viewname } }); Object.assign(this.selection, { view: { viewname: refview.viewname } });
Object.assign(this.selection,{'viewparam':tempViewparam,'context':tempContext}); Object.assign(this.selection,{'viewparam':tempViewparam,'context':tempContext});
......
...@@ -108,7 +108,8 @@ GanttElastic, ...@@ -108,7 +108,8 @@ GanttElastic,
<#list ctrl.getPSDETreeColumns() as column> <#list ctrl.getPSDETreeColumns() as column>
{ {
label: '${column.getCaption()}', label: '${column.getCaption()}',
value: (task: any) => { value: '<#if column.getName() == "begin">start<#else>${column.getName()}</#if>',
render: (task: any) => {
<#if column.render??> <#if column.render??>
${column.render.code} ${column.render.code}
<#else> <#else>
......
<template>
<div class="app-data-view-group">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<template v-for="(group, index) of groups">
<#if ctrl.groupRender??>
${ctrl.groupRender.code}
<#else>
<div :key="group + index" class="dataview-group-content" style="width: 280px;">
<div class="dataview-group-header<#if ctrl.getGroupPSSysCss()??> ${ctrl.getGroupPSSysCss().getCssName()}</#if>" style="<#if ctrl.getGroupWidth() gt 0>width: ${ctrl.getGroupWidth()?c}px;<#else>flex-grow: 1;</#if>">
{{ getGroupText(group.name) }}
<#if ctrl.getGroupPSUIActionGroup()??>
<Poptip trigger="hover" content="content" placement="bottom-end" style="float: right;">
<Icon type="md-more" />
<div slot="content" class="group-action">
<#if ctrl.getGroupPSUIActionGroup().getPSUIActions()??>
<#list ctrl.getGroupPSUIActionGroup().getPSUIActions() as action>
<div class="group-action-item">
<i-button long @click="uiAction('${action.getCodeName()}', $event)">
<#if action.getPSSysImage()??>
<#if action.getPSSysImage().getImagePath()?length gt 0>
<img src="${action.getPSSysImage().getImagePath()}"/>
<#else>
<i class="${action.getPSSysImage().getCssClass()}"></i>
</#if>
</#if>
${action.getCaption()}
</i-button>
</div>
</#list>
</#if>
</div>
</Poptip>
</#if>
</div>
<draggable :list="group.items" group="${ctrl.name}" class="dataview-group-items" @change="onDragChange($event, group.name)">
<div v-for="(item, i) in group.items" :key="i" :class="{'dataview-group-item': true, 'is-select': item.isselected}" @click="handleClick(item)">
<#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()>
<layout_${panel.getName()} name='${panel.name}' :inputData="item"></layout_${panel.getName()}>
<#elseif ctrl.itemRender??>
${ctrl.itemRender.code}
<#else>
{{ item.srfmajortext }}
</#if>
</div>
</draggable>
</div>
</#if>
</template>
</#if>
</div>
</template>
<#assign import_block>
import draggable from "vuedraggable";
</#assign>
<#assign component_block>
draggable,
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getDatas(): any[] {
return this.selections;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getData(): any {
return null;
}
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: false }) public isSelectFirstDefault!: boolean;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--create
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public createAction!: string;
/**
* 部件行为--remove
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public removeAction!: string;
/**
* 部件行为--update
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public updateAction!: string;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public fetchAction!: string;
/**
* 部件行为--updateGroup
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public updateGroupAction!: string;
/**
* 是否单选
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public isSingleSelect?: boolean;
/**
* 数据
*
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public items: any[] = [];
/**
* 是否支持分页
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isEnablePagingBar: boolean = ${ctrl.isEnablePagingBar()?c};;
/**
* 总条数
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public totalRecord: number = 0;
/**
* 加载的数据是否附加在items之后
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isAddBehind:boolean = false;
/**
* 选中数组
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public selections: Array<any> = [];
/**
* 当前页
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public curPage: number = 1;
/**
* 分页条数
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public limit: number = ${ctrl.getPagingSize()?c};
/**
* 排序方向
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public sortDir:string = '<#if ctrl.getMinorSortDir()??>${ctrl.getMinorSortDir()?lower_case}</#if>';
/**
* 排序字段
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public sortField: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>';
/**
* 是否分组
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isGroup: boolean = true;
/**
* 分组集合
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public groups: any[] = [];
/**
* 分组属性名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public groupField: string = '<#if ctrl.getGroupPSDEField()??>${ctrl.getGroupPSDEField().getCodeName()?lower_case}</#if>';
/**
* 分组模式
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public groupMode: string = '${ctrl.getGroupMode()}'
/**
* 分组模式
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public groupCodelist: string = '<#if ctrl.getGroupPSCodeList()??>${ctrl.getGroupPSCodeList().getCodeName()}</#if>'
/**
* Vue声明周期,组件挂载完毕
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public mounted () {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public afterMounted(){
<#if !ctrl.isEnablePagingBar()>
this.$el.addEventListener('scroll', ()=> {
if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) {
this.loadMore();
}
})
</#if>
}
/**
* Vue声明周期,组件创建完毕
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
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.refresh(data)
}
if (Object.is(action,'filter')) {
this.refresh(data)
}
});
}
}
/**
* 加载更多
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public loadMore(){
if(this.totalRecord>this.items.length)
{
this.curPage = ++this.curPage;
this.isAddBehind = true;
this.load({});
}
}
/**
* 刷新
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public refresh(opt: any = {}) {
this.curPage = 1;
this.load(opt, true);
}
/**
* vue 生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
<#if destroyed_block??>
${destroyed_block}
</#if>
}
/**
* 表格数据加载
*
* @public
* @param {*} [arg={}]
* @param {boolean} [isReset=false] 是否重置items
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load(opt: any = {}, isReset: boolean = false): void {
if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表fetchAction参数未配置' });
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:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
}
return;
}
const data: any = response.data;
if(!this.isAddBehind){
this.items = [];
}
if (Object.keys(data).length > 0) {
let datas = JSON.parse(JSON.stringify(data));
datas.map((item: any) => {
Object.assign(item, { isselected: false });
});
this.totalRecord = response.total;
if(isReset){
this.items = datas;
}else{
this.items.push(...datas);
}
}
this.isAddBehind = false;
this.setGroups();
this.$emit('load', this.items);
if(this.isSelectFirstDefault){
this.handleClick(this.items[0]);
}
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.errorMessage });
});
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' });
return;
}
let _datas:any[] = [];
datas.forEach((record: any, index: number) => {
if (Object.is(record.srfuf, '0')) {
this.items.some((val: any, num: number) =>{
if(JSON.stringify(val) == JSON.stringify(record)){
this.items.splice(num,1);
return true;
}
});
}else{
_datas.push(datas[index]);
}
});
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 = () => {
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));
const post: Promise<any> = this.service.delete(_removeAction,Object.assign(context,{ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') }),Object.assign({ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator);
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info });
return;
} else {
this.$Notice.success({ title: '', desc: '删除成功!' });
}
//删除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 = [];
resolve(response);
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
reject(response);
return;
}
reject(response);
});
});
}
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({
title: '警告',
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?',
onOk: () => {
removeData();
},
onCancel: () => { }
});
return removeData;
}
/**
* 设置分组集合
*
* @param {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public updateData(opt: any) {
const arg: any = { ...opt };
Object.assign(arg, { viewparams: this.viewparams });
let _context = JSON.parse(JSON.stringify(this.context));
<#if ctrl.getPSAppDataEntity()??>
Object.assign(_context, { ${ctrl.getPSAppDataEntity().getCodeName()?lower_case}: opt.task });
</#if>
const post: Promise<any> = this.service.update(this.updateGroupAction, _context, arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
}
this.setGroups();
return;
}
let item = this.items.find((item: any) => Object.is(item.srfkey, response.data.srfkey));
Object.assign(item, response.data);
this.setGroups();
this.$emit('update', this.items);
}).catch((response: any) => {
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
return;
}
});
}
/**
* 设置分组集合
*
* @param {}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public setGroups() {
if(!this.isGroup || !this.groupField || Object.is(this.groupMode, 'NONE')) {
return;
}
if(Object.is(this.groupMode, 'AUTO')) {
this.groups = [];
this.items.forEach(item => {
let group: any = this.groups.find((group: any) => Object.is(group.name, item[this.groupField]));
if(!group) {
this.groups.push({
name: item[this.groupField],
items: this.getGroupItems(item[this.groupField])
})
}
});
}
if(Object.is(this.groupMode, 'CODELIST') && this.groupCodelist) {
this.groups = [];
let codelist: any = this.$store.getters.getCodeList(this.groupCodelist);
if(codelist) {
codelist.items.forEach((item: any) => {
this.groups.push({
name: item.value,
items: this.getGroupItems(item.value)
})
})
}
}
}
/**
* 设置分组集合
*
* @param {string} name
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getGroupItems(name: string) {
let datas: any = [];
this.items.forEach(item => {
if(Object.is(item[this.groupField], name)) {
datas.push(item);
}
})
return datas;
}
/**
* 设置分组集合
*
* @param {string} name
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getGroupText(name: string) {
if(Object.is(this.groupMode, 'CODELIST') && this.groupCodelist) {
let codelist: any = this.$store.getters.getCodeList(this.groupCodelist);
if(codelist) {
if(!name) {
return codelist.emptytext;
}
let item = codelist.items.find((item: any) => Object.is(item.value, name));
if(item) {
return item.text;
}
}
}
return name;
}
/**
* 选择数据
* @memberof ${srfclassname('${ctrl.codeName}')}
*
*/
public handleClick(args: any) {
args.isselected = !args.isselected;
this.items.forEach((item:any) =>{
if(item.srfkey !== args.srfkey){
item.isselected =false;
}
})
this.selectchange();
}
/**
* 双击数据
* @memberof ${srfclassname('${ctrl.codeName}')}
*
*/
public handleDblClick(args: any) {
this.$emit('rowdblclick', args);
}
/**
* 触发事件
* @memberof ${srfclassname('${ctrl.codeName}')}
*
*/
public selectchange() {
this.selections = [];
this.items.map((item: any) => {
if (item.isselected) {
this.selections.push(item);
}
});
this.$emit('selectionchange', this.selections);
}
/**
* 界面行为
*
* @param {*} tag
* @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public uiAction(tag: any, $event: any) {
let row = this.selections.length > 0 ? this.selections[0] : {};
<#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??>
<#assign action = logic.getPSAppViewUIAction().getPSUIAction()>
if(Object.is('${action.getUIActionTag()}', tag)) {
this.${logic.getName()}(row, tag, $event);
}
</#if>
</#list>
</#if>
}
/**
* 拖拽变化
*
* @param {*} evt
* @param {*} name
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public onDragChange(evt: any, name: string) {
if(evt && evt.added && evt.added.element) {
let item: any = JSON.parse(JSON.stringify(evt.added.element))
item[this.groupField] = name;
this.updateData(item)
}
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
<#-- content -->
<#assign content>
createAction="<#if ctrl.getCreatePSControlAction()?? && ctrl.getCreatePSControlAction().getPSAppDEMethod()??>${ctrl.getCreatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
removeAction="<#if ctrl.getRemovePSControlAction()?? && ctrl.getRemovePSControlAction().getPSAppDEMethod()??>${ctrl.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
updateAction="<#if ctrl.getUpdatePSControlAction()?? && ctrl.getUpdatePSControlAction().getPSAppDEMethod()??>${ctrl.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
fetchAction="<#if ctrl.getFetchPSControlAction()?? && ctrl.getFetchPSControlAction().getPSAppDEMethod()??>${ctrl.getFetchPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
updateGroupAction="<#if ctrl.getUpdateGroupPSControlAction()?? && ctrl.getUpdateGroupPSControlAction().getPSAppDEMethod()??>${ctrl.getUpdateGroupPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
<#if view.getViewType() == 'DEDATAVIEWEXPVIEW'>
:isSelectFirstDefault="true"
</#if>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
.app-data-view-group {
height: 100%;
display: flex;
overflow: auto;
.dataview-group-content {
border: 1px solid #ddd;
border-left: 0;
flex-shrink: 0;
height: 100%;
display: flex;
flex-direction: column;
.dataview-group-header {
height: 36px;
line-height: 36px;
border-bottom: 1px solid #ddd;
padding: 0 8px;
.group-action {
.group-action-item:nth-child(1) + .group-action-item {
margin-top: 5px;
}
}
}
.dataview-group-items {
flex-grow: 1;
overflow: auto;
.dataview-group-item {
margin: 8px 8px 0 8px;
border: 1px solid #ddd;
padding: 8px;
overflow: hidden;
}
.dataview-group-item.is-select {
border-color: #108cee;
}
}
}
.dataview-group-content:nth-child(1) {
border-left: 1px solid #ddd;
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public getDataItems(): any[] {
return [
<#-- 数据视图数据项 -->
<#if ctrl.getPSDEDataViewDataItems()??>
<#list ctrl.getPSDEDataViewDataItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}'
},
</#if>
</#list>
</#if>
</#if>
<#if ctrl.getPSDEDataViewDataItems()??>
<#list ctrl.getPSDEDataViewDataItems() as dataitem>
<#-- 界面主键标识 -->
<#if dataitem.getPSDEField?? && dataitem.getPSDEField()?? && dataitem.getPSDEField().isKeyDEField() == true>
<#if !P.exists("importService", dataitem.getPSDEField().getId(), "")>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#list>
</#if>
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
</#if>
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'sort',
prop:'sort'
},
{
name:'page',
prop:'page'
},
{
name:'srfparentdata',
prop:'srfparentdata'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@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((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 ${srfclassname('${ctrl.codeName}')}Service
*/
@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 ${srfclassname('${ctrl.codeName}')}Service
*/
@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);
});
});
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=KANBAN
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/MACRO.ftl</#ibizinclude>
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
...@@ -20,6 +21,8 @@ ${item.render.code} ...@@ -20,6 +21,8 @@ ${item.render.code}
]" ]"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:localContext ='<@getNavigateContext item />'
:localParam ='<@getNavigateParams item />'
parameterName='${appde.getCodeName()?lower_case}' parameterName='${appde.getCodeName()?lower_case}'
parentName="${appde.getCodeName()}" parentName="${appde.getCodeName()}"
refviewtype='<#if refView.getPSViewType()??>${refView.getPSViewType().getId()}</#if>' refviewtype='<#if refView.getPSViewType()??>${refView.getPSViewType().getId()}</#if>'
......
...@@ -59,16 +59,16 @@ ...@@ -59,16 +59,16 @@
</#ibizinclude> </#ibizinclude>
<template v-if="getColumnState('${item.getName()?lower_case}')"> <template v-if="getColumnState('${item.getName()?lower_case}')">
<#if item.getColumnType() == 'GROUPGRIDCOLUMN' && item.getPSDEGridColumns()??> <#if item.getColumnType() == 'GROUPGRIDCOLUMN' && item.getPSDEGridColumns()??>
<#-- BEGIN:分组列 --> <#-- [1]BEGIN:分组列 -->
<el-table-column show-overflow-tooltip :align="'${item.getAlign()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"> <el-table-column show-overflow-tooltip :align="'${item.getAlign()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>">
<@getColumnHeader item 4 /> <@getColumnHeader item 4 />
<#list item.getPSDEGridColumns() as column> <#list item.getPSDEGridColumns() as column>
${P.getPartCode(column,'COLUMN').code} ${P.getPartCode(column,'COLUMN').code}
</#list> </#list>
</el-table-column> </el-table-column>
<#-- END:分组列 --> <#-- [1]END:分组列 -->
<#elseif item.getColumnType() == 'UAGRIDCOLUMN'> <#elseif item.getColumnType() == 'UAGRIDCOLUMN'>
<#-- BEGIN:操作列 --> <#-- [2]BEGIN:操作列 -->
<el-table-column :column-key="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}" <#else> :min-width="${item.width?c}" </#if> :align="'${item.getAlign()?lower_case}'"> <el-table-column :column-key="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}" <#else> :min-width="${item.width?c}" </#if> :align="'${item.getAlign()?lower_case}'">
<@getColumnHeader item 8 /> <@getColumnHeader item 8 />
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -85,9 +85,9 @@ ...@@ -85,9 +85,9 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<#-- END:操作列 --> <#-- [2]END:操作列 -->
<#elseif item.getColumnType() == 'DEFGRIDCOLUMN'> <#elseif item.getColumnType() == 'DEFGRIDCOLUMN'>
<#-- BEGIN:数据列 --> <#-- [3]BEGIN:数据列 -->
<el-table-column show-overflow-tooltip :prop="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}" <#else> :min-width="${item.width?c}" </#if> :align="'${item.getAlign()?lower_case}'"<#if (!ctrl.isNoSort()) && item.isEnableSort()> :sortable="'custom'"</#if>> <el-table-column show-overflow-tooltip :prop="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}" <#else> :min-width="${item.width?c}" </#if> :align="'${item.getAlign()?lower_case}'"<#if (!ctrl.isNoSort()) && item.isEnableSort()> :sortable="'custom'"</#if>>
<@getColumnHeader item 8 /> <@getColumnHeader item 8 />
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
...@@ -109,6 +109,9 @@ ...@@ -109,6 +109,9 @@
<#-- END:行编辑 --> <#-- END:行编辑 -->
</#if> </#if>
<template <#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())>v-if="!actualIsOpenEdit"</#if>> <template <#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())>v-if="!actualIsOpenEdit"</#if>>
<#if item.getPSDEUIAction?? && item.getPSDEUIAction()??>
<a @click="uiAction(row, '${item.getPSDEUIAction().getUIActionTag()}', $event)">
</#if>
<#if (item.render??)> <#if (item.render??)>
<#-- BEGIN:列绘制 --> <#-- BEGIN:列绘制 -->
<span>${item.render.code}</span> <span>${item.render.code}</span>
...@@ -166,6 +169,9 @@ ...@@ -166,6 +169,9 @@
</#if> </#if>
<#-- END:常规显示 --> <#-- END:常规显示 -->
</#if> </#if>
<#if item.getPSDEUIAction?? && item.getPSDEUIAction()??>
</a>
</#if>
</template> </template>
<#-- END:列绘制、前端绘制代码表、行编辑 --> <#-- END:列绘制、前端绘制代码表、行编辑 -->
<#else> <#else>
...@@ -181,6 +187,9 @@ ...@@ -181,6 +187,9 @@
<span>{{row.${item.getName()?lower_case}}}</span> <span>{{row.${item.getName()?lower_case}}}</span>
</app-column-link > </app-column-link >
<#else> <#else>
<#if item.getPSDEUIAction?? && item.getPSDEUIAction()??>
<a @click="uiAction(row, '${item.getPSDEUIAction().getUIActionTag()}', $event)">
</#if>
<#if item.getValueFormat()?? && item.getValueFormat() != "%1$s"> <#if item.getValueFormat()?? && item.getValueFormat() != "%1$s">
<app-format-data format="${item.getValueFormat()}" :data="row.${item.getName()?lower_case}"></app-format-data> <app-format-data format="${item.getValueFormat()}" :data="row.${item.getName()?lower_case}"></app-format-data>
<#elseif item.getPSDEField?? && item.getPSDEField()?? && (item.getPSDEField().getDataType() == "DECIMAL" || item.getPSDEField().getDataType() == "FLOAT" || item.getPSDEField().getDataType() == "CURRENCY")> <#elseif item.getPSDEField?? && item.getPSDEField()?? && (item.getPSDEField().getDataType() == "DECIMAL" || item.getPSDEField().getDataType() == "FLOAT" || item.getPSDEField().getDataType() == "CURRENCY")>
...@@ -188,11 +197,14 @@ ...@@ -188,11 +197,14 @@
<#else> <#else>
<span>{{row.${item.getName()?lower_case}}}</span> <span>{{row.${item.getName()?lower_case}}}</span>
</#if> </#if>
<#if item.getPSDEUIAction?? && item.getPSDEUIAction()??>
</a>
</#if>
</#if> </#if>
</#if> </#if>
</template> </template>
</el-table-column> </el-table-column>
<#-- END:数据列 --> <#-- [3]END:数据列 -->
</#if> </#if>
</template> </template>
...@@ -1463,6 +1463,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1463,6 +1463,7 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public uiAction(row: any, tag: any, $event: any) { public uiAction(row: any, tag: any, $event: any) {
// this.rowClick(row, true); // this.rowClick(row, true);
$event.stopPropagation();
<#if ctrl.getPSAppViewLogics()??> <#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic> <#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??> <#if logic.getPSAppViewUIAction().getPSUIAction()??>
...@@ -1609,6 +1610,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1609,6 +1610,7 @@ import { FormItemModel } from '@/model/form-detail';
return; return;
} }
const data = response.data; const data = response.data;
this.createDefault(data);
data.rowDataState = "create"; data.rowDataState = "create";
_this.items.push(data); _this.items.push(data);
_this.gridItemsModel.push(_this.getGridRowModel()); _this.gridItemsModel.push(_this.getGridRowModel());
...@@ -1725,6 +1727,42 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1725,6 +1727,42 @@ import { FormItemModel } from '@/model/form-detail';
}); });
return isSelected ? "grid-selected-row" : ""; return isSelected ? "grid-selected-row" : "";
} }
/**
* 新建默认值
* @param {*} row 行数据
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public createDefault(row: any){
<#list ctrl.getPSDEGridEditItems() as editItem><#t>
<#if editItem.getCreateDV?? && editItem.getCreateDV()??><#t>
<#if !(editItem.getCreateDV() == '')><#t>
if (row.hasOwnProperty('${editItem.getCodeName()?lower_case}')) {
<#-- 网页请求 -->
<#if editItem.getCreateDVT() == 'CONTEXT'>
row['${editItem.getCodeName()?lower_case}'] = this.viewparams['${editItem.getCreateDV()}'];
<#-- 用户全局对象 -->
<#elseif editItem.getCreateDVT() == 'SESSION'>
row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getCreateDV()}'];
<#-- 当前应用数据 -->
<#elseif editItem.getCreateDVT() == 'APPDATA'>
row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getCreateDV()}'];
<#-- 当前操作用户(名称) -->
<#elseif editItem.getCreateDVT() == 'OPERATORNAME'>
row['${editItem.getCodeName()?lower_case}'] = this.context['srfusername'];
<#-- 当前操作用户(编号) -->
<#elseif editItem.getCreateDVT() == 'OPERATOR'>
row['${editItem.getCodeName()?lower_case}'] = this.context['srfuserid'];
<#else>
<#-- 默认值 -->
<#assign datatype=srfjavatype(editItem.getPSAppDEField().getStdDataType())>
row['${editItem.getCodeName()?lower_case}'] = <#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>${editItem.getCreateDV()}<#else>'${editItem.getCreateDV()}'</#if>;
</#if>
}
</#if>
</#if>
</#list>
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
:is="selection.view.viewname" :is="selection.view.viewname"
class="viewcontainer2" class="viewcontainer2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)"> :viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component> </component>
</div> </div>
</split> </split>
...@@ -56,6 +57,10 @@ ...@@ -56,6 +57,10 @@
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??> <#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic> <#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'> <#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
...@@ -157,20 +162,36 @@ ...@@ -157,20 +162,36 @@
public navViewName: string = "<#if xDataControl.getNavPSAppView()??><#assign navPSAppView = xDataControl.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>"; public navViewName: string = "<#if xDataControl.getNavPSAppView()??><#assign navPSAppView = xDataControl.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>";
/** /**
* 导航视图参数 * 导航过滤项
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public navViewParam: string = '<#if xDataControl.getNavViewParamJO()??>${xDataControl.getNavViewParamJO()}</#if>'; public navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>";
/** /**
* 导航过滤项 * 导航关系
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>"; public navPSDer: string = "<#if xDataControl.getNavPSDER()??>n_${xDataControl.getNavPSDER().getPSPickupDEField().getCodeName()?lower_case}_eq</#if>";
/**
* 导航上下文参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateContext:any =<#if xDataControl.getPSNavigateContexts?? && xDataControl.getPSNavigateContexts()??><@getNavigateContext xDataControl /><#else>null</#if>;
/**
* 导航视图参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#if>;
</#if> </#if>
/** /**
...@@ -326,24 +347,39 @@ ...@@ -326,24 +347,39 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void { public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {}; let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) { if (args.length === 0) {
return ; return ;
} }
const arg:any = args[0]; const arg:any = args[0];
if(this.context){ if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.context))); Object.assign(tempContext,JSON.parse(JSON.stringify(this.context)));
} }
<#if ctrl.getXDataPSControl()??> <#if ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl()/> <#assign xDataControl = ctrl.getXDataPSControl()/>
<#if xDataControl.getPSAppDataEntity()??> <#if xDataControl.getPSAppDataEntity()??>
<#assign curDataEntity = xDataControl.getPSAppDataEntity()/> <#assign curDataEntity = xDataControl.getPSAppDataEntity()/>
Object.assign(data,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']}); Object.assign(tempContext,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']}); Object.assign(tempContext,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']});
if(this.navFilter && !Object.is(this.navFilter,"")){
Object.assign(tempViewParam,{[this.navFilter]:arg['${curDataEntity.getCodeName()?lower_case}']});
}
if(this.navPSDer && !Object.is(this.navPSDer,"")){
Object.assign(tempViewParam,{[this.navPSDer]:arg['${curDataEntity.getCodeName()?lower_case}']});
}
</#if> </#if>
</#if> </#if>
if(this.navigateContext && Object.keys(this.navigateContext).length >0){
let _context:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateContext);
Object.assign(tempContext,_context);
}
if(this.navigateParams && Object.keys(this.navigateParams).length >0){
let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateParams);
Object.assign(tempViewParam,_params);
}
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data }); Object.assign(this.selection, { view: { viewname: this.navViewName }, context:tempContext,viewparam:tempViewParam });
this.$emit('selectionchange',args); this.$emit('selectionchange',args);
this.$forceUpdate(); this.$forceUpdate();
} }
......
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../../@MACRO/FUNC/MACRO.ftl</#ibizinclude>
<#assign MDContent><#t>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar'))>
<div style='margin-bottom: 6px;'>
<#if view.isEnableQuickSearch()>
<i-input<#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show="!isExpandSearchForm"</#if></#if> v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' placeholder="<@getQuickSearchPlaceholder view />" />
</#if>
<div class='pull-right'>
<#if view.hasPSControl('toolbar')>
<@ibizindent blank=8>
${P.getCtrlCode('toolbar', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</div>
</div>
</#if>
<#-- END:快速搜索或工具栏存在 -->
<#if view.hasPSControl('treegridex')>
${P.getCtrlCode('treegridex', 'CONTROL.html').code}
</#if>
</#assign>
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
</@ibizindent>
<div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#-- BEGIN:视图内容 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图内容 -->
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDETREEGRIDEXVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
display: block;
}
\ No newline at end of file
<#ibizinclude>../../@MACRO/FUNC/MACRO.ftl</#ibizinclude>
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :dis-hover="true" :bordered="false">
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
</@ibizindent>
<div class='content-container'>
<#assign MDContent>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
<div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="qucikGroupValueChange"></app-quick-group>
</div>
</#if>
<#if view.getQuickPSDESearchForm()??>
<div class="quick-search-container">
<#assign quickSearchForm = view.getQuickPSDESearchForm() />
${P.getCtrlCode(quickSearchForm, 'CONTROL.html').code}
</div>
</#if>
<#if view.isEnableQuickSearch()>
<i-input <#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show='!this.isExpandSearchForm '</#if></#if> v-model='query' search @on-search='onSearch' placeholder="<@getQuickSearchPlaceholder view />" class='pull-left' style='max-width: 400px;margin-top:6px;' />
</#if>
<div class='pull-right'>
<#if view.hasPSControl('toolbar')>
<@ibizindent blank=20>
${P.getCtrlCode('toolbar', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</div>
</div>
</#if>
<#-- END:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if view.hasPSControl('searchform')>
<@ibizindent blank=12>
${P.getCtrlCode('searchform', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
<#if view.hasPSControl('kanban')>
<@ibizindent blank=12>
${P.getCtrlCode('kanban', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
</div>
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEKANBANVIEW
\ No newline at end of file
<#if ctrl.getPortletType() == 'CONTAINER'> <#if ctrl.getPortletType() != 'CONTAINER'>
<#assign portletClass = "portlet-container">
<#assign portletHeight = "100%">
<#assign portletWidth = "100%">
<#else>
<#assign portletHeight = "calc(100% - 16px)">
<#assign portletWidth = "calc(100% - 16px)">
<#assign portletClass = "portlet">
</#if>
<template> <template>
<div class='${portletClass} ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? '${portletHeight}' : <#if ctrl.getHeight() == 0>'auto'<#else>'${ctrl.getHeight()?c}px'</#if>,</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '${portletWidth}' : '${ctrl.getWidth()?c}px '</#if>}"> <div class='portlet ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? 'calc(100% - 16px)' : (height > 0 ? height+'px' :'${ctrl.getHeight()?c}px'),</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? 'calc(100% - 16px)' : (width ? width+'px' :'${ctrl.getWidth()?c}px')</#if>}">
<#if ctrl.getPortletType?? && ctrl.getPortletType()??><#t> <#if ctrl.getPortletType?? && ctrl.getPortletType()??><#t>
<#-- 视图 --> <#-- 视图 -->
<#if ctrl.getPortletType() == 'VIEW' && ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??><#t> <#if ctrl.getPortletType() == 'VIEW' && ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i> <span>
<#if ctrl.getPSSysImage()??><i class='<#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if>'></i></#if>
${ctrl.getTitle()} ${ctrl.getTitle()}
</span>
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
<span class="portlet-action">
<#list UIActionDetails as uiactiondetail>
<a @click="uiAction('${uiactiondetail.getName()?lower_case}', $event)"><#if uiactiondetail.getPSUIAction()??>${uiactiondetail.getPSUIAction().getCaption()}</#if></a>
</#list>
</span>
</#if>
</p> </p>
</#if> </#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>"> <div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
...@@ -26,8 +28,18 @@ ...@@ -26,8 +28,18 @@
<#elseif ctrl.getPortletType() == 'APPMENU'><#t> <#elseif ctrl.getPortletType() == 'APPMENU'><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i> <span>
<#if ctrl.getPSSysImage()??><i class='<#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if>'></i></#if>
${ctrl.getTitle()} ${ctrl.getTitle()}
</span>
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
<span class="portlet-action">
<#list UIActionDetails as uiactiondetail>
<a @click="uiAction('${uiactiondetail.getName()?lower_case}', $event)"><#if uiactiondetail.getPSUIAction()??>${uiactiondetail.getPSUIAction().getCaption()}</#if></a>
</#list>
</span>
</#if>
</p> </p>
</#if> </#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>"> <div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
...@@ -40,8 +52,18 @@ ...@@ -40,8 +52,18 @@
<#elseif ctrl.getPortletType() == 'CUSTOM'> <#elseif ctrl.getPortletType() == 'CUSTOM'>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i> <span>
<#if ctrl.getPSSysImage()??><i class='<#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if>'></i></#if>
${ctrl.getTitle()} ${ctrl.getTitle()}
</span>
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
<span class="portlet-action">
<#list UIActionDetails as uiactiondetail>
<a @click="uiAction('${uiactiondetail.getName()?lower_case}', $event)"><#if uiactiondetail.getPSUIAction()??>${uiactiondetail.getPSUIAction().getCaption()}</#if></a>
</#list>
</span>
</#if>
</p> </p>
</#if> </#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>"> <div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
...@@ -55,8 +77,10 @@ ...@@ -55,8 +77,10 @@
<#elseif ctrl.getPortletType() == 'ACTIONBAR'> <#elseif ctrl.getPortletType() == 'ACTIONBAR'>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i> <span>
<#if ctrl.getPSSysImage()??><i class='<#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if>'></i></#if>
${ctrl.getTitle()} ${ctrl.getTitle()}
</span>
</p> </p>
</#if> </#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>"> <div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
...@@ -70,48 +94,39 @@ ...@@ -70,48 +94,39 @@
<#elseif ctrl.getPortletType() == 'HTML'> <#elseif ctrl.getPortletType() == 'HTML'>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i> <span>
<#if ctrl.getPSSysImage()??><i class='<#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if>'></i></#if>
${ctrl.getTitle()} ${ctrl.getTitle()}
</span>
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
<span class="portlet-action">
<#list UIActionDetails as uiactiondetail>
<a @click="uiAction('${uiactiondetail.getName()?lower_case}', $event)"><#if uiactiondetail.getPSUIAction()??>${uiactiondetail.getPSUIAction().getCaption()}</#if></a>
</#list>
</span>
</#if>
</p> </p>
</#if> </#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>"> <div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
<iframe src="<#if ctrl.getPageUrl()??>${ctrl.getPageUrl()}</#if>" style="height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}<#else>400</#if>px;width: 100%;border-width: 1px;"></iframe> <iframe src="<#if ctrl.getPageUrl()??>${ctrl.getPageUrl()}</#if>" style="height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}<#else>400</#if>px;width: 100%;border-width: 1px;"></iframe>
</div> </div>
<#-- 容器 -->
<#elseif ctrl.getPortletType() == 'CONTAINER'><#t>
<#list ctrl.getPSPortlets() as portlet><#t>
<#if portlet.getPortletType?? && portlet.getPortletType()??><#t>
<#assign layout='TABLE_24COL'><#if portlet.getPSLayoutPos()??><#if portlet.getPSLayoutPos().getParentPSLayout()??><#assign layout='${portlet.getPSLayoutPos().getParentPSLayout().getLayout()}'></#if></#if><#t>
<#assign LayoutPos = portlet.getPSLayoutPos()><#t>
<#if layout == 'FLEX' >
<div style = '<#if layout == 'FLEX' > display : flex; <#if ctrl.getFlexAlign()??> justify-content :${ctrl.getFlexAlign()};</#if> <#if ctrl.getFlexDir()??> flex-direction:${ctrl.getFlexDir()};</#if> <#if ctrl.getFlexVAlign()??>align-items:${ctrl.getFlexVAlign()};</#if></#if> '>
</#if>
<#if layout == 'TABLE_24COL' && LayoutPos??><#t>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>>
<div class="portlet-without-title">
<@ibizindent blank=18>
${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent>
</div>
</i-col>
<#else>
<div class="portlet-without-title">
<@ibizindent blank=18>
${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent>
</div>
</#if>
<#if layout == 'FLEX' >
</div>
</#if>
</#if>
</#list>
<#-- 其他部件 --> <#-- 其他部件 -->
<#elseif ctrl.getContentPSControl()??><#t> <#elseif ctrl.getContentPSControl()??><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i> <span>
<#if ctrl.getPSSysImage()??><i class='<#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if>'></i></#if>
${ctrl.getTitle()} ${ctrl.getTitle()}
</span>
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
<span class="portlet-action">
<#list UIActionDetails as uiactiondetail>
<a @click="uiAction('${uiactiondetail.getName()?lower_case}', $event)"><#if uiactiondetail.getPSUIAction()??>${uiactiondetail.getPSUIAction().getCaption()}</#if></a>
</#list>
</span>
</#if>
</p> </p>
</#if> </#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>"> <div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
...@@ -125,10 +140,29 @@ ...@@ -125,10 +140,29 @@
</#if> </#if>
</div> </div>
</template> </template>
<#assign import_block>
import { Environment } from '@/environments/environment';
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_PORTLET-HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_PORTLET-HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
/**
* 长度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public width?: number;
<#if ctrl.getPortletType() == 'ACTIONBAR'> <#if ctrl.getPortletType() == 'ACTIONBAR'>
/** /**
* 操作栏模型数据 * 操作栏模型数据
...@@ -257,6 +291,24 @@ ...@@ -257,6 +291,24 @@
</#if> </#if>
} }
<#if ctrl.getPortletType() != 'ACTIONBAR'>
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
/**
* 执行界面行为
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public uiAction(tag:string,event:any){
<#list UIActionDetails as uiactiondetail>
if(Object.is(tag,'${uiactiondetail.getName()?lower_case}')){
this.${ctrl.getName()?lower_case}_${uiactiondetail.getName()?lower_case}_click(null,tag,event);
}
</#list>
}
</#if>
</#if>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
...@@ -264,3 +316,5 @@ ...@@ -264,3 +316,5 @@
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl ../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude> </#ibizinclude>
</#if>
\ No newline at end of file
<#-- -->
<#if ctrl.getPortletType() != 'CONTAINER'>
<#assign content>
<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>
:height="${ctrl.getHeight()?c}"
</#if>
<#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>
:width="${ctrl.getWidth()?c}"
</#if>
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl ../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude> </#ibizinclude>
<#else>
<div class='portlet-container ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': '${ctrl.getHeight()?c}px',</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': '${ctrl.getWidth()?c}px '</#if>}">
<#-- BEGIN:容器Flex布局-前 -->
<#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
<div style = 'display : flex; <#if ctrl.getFlexAlign()??> justify-content :${ctrl.getFlexAlign()};</#if> <#if ctrl.getFlexDir()??> flex-direction:${ctrl.getFlexDir()};</#if> <#if ctrl.getFlexVAlign()??>align-items:${ctrl.getFlexVAlign()};</#if>'>
<#else>
<row>
</#if>
<#-- END:容器Flex布局-前 -->
<#list ctrl.getPSPortlets() as portlet><#t>
<#if portlet.getPortletType?? && portlet.getPortletType()??><#t>
<#-- BEGIN:获取父的layout,自己的LayoutPos -->
<#assign layout=ctrl.getLayoutMode()>
<#assign LayoutPos = portlet.getPSLayoutPos()>
<#-- END:获取父的layout,自己的LayoutPos -->
<#-- BEGIN:子门户部件绘制,栅格绘制 -->
<#if layout == 'TABLE_12COL'>
<#assign multiple = 2/>
<#else>
<#assign multiple = 1/>
</#if>
<#macro format_numer num>
<#if num lt 0 >
0<#t>
<#elseif num gt 24>
24<#t>
<#else>
${num}<#t>
</#if>
</#macro>
<#if (layout == 'TABLE_24COL' || layout == 'TABLE_12COL') && LayoutPos??><#t>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: <@format_numer LayoutPos.getColXS()*multiple/>, offset: <#if LayoutPos.getColXSOffset() != -1><@format_numer LayoutPos.getColXSOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: <@format_numer LayoutPos.getColSM()*multiple />, offset: <#if LayoutPos.getColSMOffset() != -1><@format_numer LayoutPos.getColSMOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: <@format_numer LayoutPos.getColMD()*multiple />, offset: <#if LayoutPos.getColMDOffset() != -1><@format_numer LayoutPos.getColMDOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: <@format_numer LayoutPos.getColLG()*multiple />, offset: <#if LayoutPos.getColLGOffset() != -1><@format_numer LayoutPos.getColLGOffset()*multiple /><#else>0</#if> }"</#if>>
<div class="portlet-without-title">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<p slot='title'>
${portlet.getTitle()}
<span class="line"></span>
</p>
<a slot='extra'></a>
</#if>
<span>
<@ibizindent blank=14><#t>
${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent>
</span>
</card>
</div>
</i-col>
<#-- BEGIN:子门户部件绘制,Flex -->
<#else>
<div class="portlet-without-title">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<p slot='title'>
${portlet.getTitle()}
<span class="line"></span>
</p>
<a slot='extra'></a>
</#if>
<span>
<@ibizindent blank=14><#t>
${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent>
</span>
</card>
</div>
</#if>
<#-- END:子门户部件绘制 -->
</#if>
</#list>
<#-- BEGIN:容器Flex布局-后 -->
<#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
</div>
<#else>
</row>
</#if>
<#-- END:容器Flex布局-后 -->
</div>
</#if>
\ No newline at end of file
<#if ctrl.getPortletType() != 'CONTAINER'>
<#ibizinclude> <#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude> </#ibizinclude>
...@@ -13,6 +14,7 @@ ...@@ -13,6 +14,7 @@
-webkit-box-align: center; -webkit-box-align: center;
-ms-flex-align: center; -ms-flex-align: center;
align-items: center; align-items: center;
justify-content: space-between;
width:100%; width:100%;
line-height: 22px; line-height: 22px;
font-size: 16px; font-size: 16px;
...@@ -25,6 +27,13 @@ ...@@ -25,6 +27,13 @@
i{ i{
margin-right: 5px; margin-right: 5px;
} }
>.portlet-action{
margin-left: 12px;
font-size: 14px;
>a{
padding: 6px;
}
}
} }
> .portlet-with-title{ > .portlet-with-title{
width:100%; width:100%;
...@@ -52,3 +61,4 @@ ...@@ -52,3 +61,4 @@
} }
} }
} }
</#if>
<#if ctrl.getPortletType() != 'CONTAINER'>
<#assign import_block> <#assign import_block>
<#if ctrl.getPSPortlets?? && ctrl.getPSPortlets()??> <#if ctrl.getPSPortlets?? && ctrl.getPSPortlets()??>
<#list ctrl.getPSPortlets() as subctrl> <#list ctrl.getPSPortlets() as subctrl>
...@@ -63,3 +64,4 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get ...@@ -63,3 +64,4 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
} }
</script> </script>
</#if>
\ No newline at end of file
<#if ctrl.getPortletType() != 'CONTAINER'>
<#ibizinclude> <#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl ../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude> </#ibizinclude>
</#if>
\ No newline at end of file
<#if ctrl.getPortletType() != 'CONTAINER'>
<#ibizinclude> <#ibizinclude>
../@MACRO/SERVICE/DEFAULT.ts.ftl ../@MACRO/SERVICE/DEFAULT.ts.ftl
</#ibizinclude> </#ibizinclude>
</#if>
\ No newline at end of file
<div class='panel-container'> <#if ctrl.getLayoutMode()=='FLEX'>
<row class="app-layoutpanel"> <div class='panel-container' style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px;</#if><#if ctrl.getHeight() gt 0>height: ${ctrl.getHeight()?c}px;</#if>">
<div class="app-layoutpanel" style="height:100%;display: flex;">
<@ibizindent blank=8>
<#if ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as item>
${P.getPartCode(item).code}
</#list>
</#if>
</@ibizindent>
</div>
<#else>
<row class="app-layoutpanel" style="height:100%;">
<@ibizindent blank=8> <@ibizindent blank=8>
<#if ctrl.getRootPSPanelItems()??> <#if ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as item> <#list ctrl.getRootPSPanelItems() as item>
...@@ -8,4 +19,5 @@ ${P.getPartCode(item).code} ...@@ -8,4 +19,5 @@ ${P.getPartCode(item).code}
</#if> </#if>
</@ibizindent> </@ibizindent>
</row> </row>
</#if>
</div> </div>
\ No newline at end of file
...@@ -45,6 +45,28 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -45,6 +45,28 @@ import CodeListService from "@service/app/codelist-service";
* 面板数据对象 * 面板数据对象
* *
* @type {*} * @type {*}
* @memberof Mob
*/
public panelData:any = null;
/**
* 监听数据对象
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Watch('inputData',{immediate:true})
async onInputDataChange(newVal: any, oldVal: any){
if(newVal){
await this.computedUIData(newVal);
this.panelLogic({ name: '', newVal: null, oldVal: null });
this.$forceUpdate();
}
}
/**
* 计算UI展示数据
*
* @param codelistArray 代码表模型数组
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
@Prop() public inputData?: any; @Prop() public inputData?: any;
...@@ -170,14 +192,14 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -170,14 +192,14 @@ import CodeListService from "@service/app/codelist-service";
let res:any = await this.getAllCodeList(codelistArray,true); let res:any = await this.getAllCodeList(codelistArray,true);
this.dataModel.getDataItems().forEach((item:any) =>{ this.dataModel.getDataItems().forEach((item:any) =>{
if(item.codelist){ if(item.codelist){
panelData[item.prop] = res.get(item.codelist.tag).get(this.data[item.name]); panelData[item.prop] = res.get(item.codelist.tag).get(this.inputData[item.name]);
}else{ }else{
panelData[item.prop] = this.data[item.name]; panelData[item.prop] = this.inputData[item.name];
} }
}) })
}else{ }else{
this.dataModel.getDataItems().forEach((item:any) =>{ this.dataModel.getDataItems().forEach((item:any) =>{
panelData[item.prop] = this.data[item.name]; panelData[item.prop] = this.inputData[item.name];
}) })
} }
} }
......
...@@ -126,3 +126,27 @@ ...@@ -126,3 +126,27 @@
}' <#t> }' <#t>
</#macro> </#macro>
<#-- END:获取AC参数 --> <#-- END:获取AC参数 -->
<#-- BEGIN:获取导航上下文 -->
<#macro getNavigateContext currentItem>
'{ <#t>
<#if currentItem.getPSNavigateContexts?? && currentItem.getPSNavigateContexts()??>
<#list currentItem.getPSNavigateContexts() as navContext>
${navContext.getKey()}:<#if navContext.isRawValue()?? && navContext.isRawValue() == true>"${navContext.getValue()}"<#else>"%${navContext.getValue()}%"</#if><#if navContext_has_next>,</#if> <#t>
</#list>
</#if>
}' <#t>
</#macro>
<#-- END:获取导航上下文 -->
<#-- BEGIN:获取导航参数 -->
<#macro getNavigateParams currentItem>
'{ <#t>
<#if currentItem.getPSNavigateParams?? && currentItem.getPSNavigateParams()??>
<#list currentItem.getPSNavigateParams() as navParam >
${navParam.getKey()}:<#if navParam.isRawValue()?? && navParam.isRawValue() == true>"${navParam.getValue()}"<#else>"%${navParam.getValue()}%"</#if><#if navParam_has_next>,</#if> <#t>
</#list>
</#if>
}' <#t>
</#macro>
<#-- END:获取导航参数 -->
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<dropdown-list-dynamic <dropdown-list-dynamic
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>" :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if editor.getPSCodeList()??> <#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()> <#assign codelist=editor.getPSCodeList()>
......
<dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></dropdown-list> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
\ No newline at end of file <dropdown-list
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
:data="row"
:context="context"
:viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
<#if item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>
style="${item.getEditorCssStyle()}"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</dropdown-list>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<dropdown-list <dropdown-list
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>" :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if editor.getPSCodeList()??> <#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()> <#assign codelist=editor.getPSCodeList()>
......
<dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></dropdown-list> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
\ No newline at end of file <dropdown-list
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
:data="row"
:context="context"
:viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
<#if item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>
style="${item.getEditorCssStyle()}"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</dropdown-list>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<dropdown-list <dropdown-list
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>" :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
style="${editor.getEditorCssStyle()}width: 100px;" style="${editor.getEditorCssStyle()}width: 100px;"
<#if editor.getPSCodeList()??> <#if editor.getPSCodeList()??>
......
<dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}width: 100px;" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></dropdown-list> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
\ No newline at end of file <dropdown-list
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
style="${item.getEditorCssStyle()}width: 100px;"
:data="row"
:context="context"
:viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
<#if item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</dropdown-list>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<app-transfer
v-model="data.${editor.name}"
:context="context"
:viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled"
<#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
<#if codelist.valueSeparator?has_content>
valueSeparator="${codelist.valueSeparator}"
</#if>
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}" />
\ No newline at end of file
<dropdown-list-mpicker
v-model="row[column.property]"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
<#if item.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
<#if codelist.valueSeparator?has_content>valueSeparator="${codelist.valueSeparator}"</#if>
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"
style="${item.getEditorCssStyle()}">
</dropdown-list-mpicker>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
EDITORTYPE=MDROPDOWNLIST#TRANSFER
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<dropdown-list-mpicker <dropdown-list-mpicker
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>" :disabled="detailsModel.${editor.name}.disabled" :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
<#if editor.getPSCodeList()??> <#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()> <#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}' tag='${codelist.codeName}'
......
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<dropdown-list-mpicker <dropdown-list-mpicker
v-model="row[column.property]" v-model="row[column.property]"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>" :data="row"
:context="context"
:viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
<#if item.getPSCodeList()??> <#if item.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()> <#assign codelist=editor.getPSCodeList()>
......
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<app-radio-group <app-radio-group
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
...@@ -5,7 +6,8 @@ ...@@ -5,7 +6,8 @@
:viewparams="viewparams" :viewparams="viewparams"
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name="${editor.name}" name="${editor.name}"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>" :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
<#if editor.getPSCodeList()??> <#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()> <#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}' tag='${codelist.codeName}'
......
<app-radio-group v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" name="${item.name}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}" <#if item.isNeedCodeListConfig()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' </#if> style="${item.getEditorCssStyle()}"></app-radio-group> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
\ No newline at end of file <app-radio-group
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name="${item.name}"
:data="row"
:context="context"
:viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"
<#if item.isNeedCodeListConfig()??>
<#assign codelist=item.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
</#if>
style="${item.getEditorCssStyle()}">
</app-radio-group>
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
name="${editor.name}" name="${editor.name}"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:service="service" :service="service"
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
:name="column.property" :name="column.property"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:service="service" :service="service"
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
name="${editor.name}" name="${editor.name}"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:service="service" :service="service"
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
:name="column.property" :name="column.property"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:service="service" :service="service"
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="row" :data="row"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="row" :data="row"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
<#if editor.getPickupPSAppView().getViewType() == 'DEMPICKUPVIEW'> <#if editor.getPickupPSAppView().getViewType() == 'DEMPICKUPVIEW'>
:isSingleSelect="false" :isSingleSelect="false"
</#if> </#if>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="row" :data="row"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
<#if editor.getPickupPSAppView().getViewType() == 'DEMPICKUPVIEW'> <#if editor.getPickupPSAppView().getViewType() == 'DEMPICKUPVIEW'>
:isSingleSelect="false" :isSingleSelect="false"
</#if> </#if>
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
:data="row" :data="row"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
emptyText="${srfjsstring('${item.getPlaceHolder()}')}" emptyText="${srfjsstring('${item.getPlaceHolder()}')}"
</#if> </#if>
name="${editor.name}" name="${editor.name}"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
valueItem='${item.getValueItemName()}' valueItem='${item.getValueItemName()}'
refviewname="${srffilepath2(pickupview.getCodeName())}" refviewname="${srffilepath2(pickupview.getCodeName())}"
<#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)> <#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)>
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
emptyText="${srfjsstring('${item.getPlaceHolder()}')}" emptyText="${srfjsstring('${item.getPlaceHolder()}')}"
</#if> </#if>
name="${editor.name}" name="${editor.name}"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
valueItem='${item.getValueItemName()}' valueItem='${item.getValueItemName()}'
refviewname="${srffilepath2(pickupview.getCodeName())}" refviewname="${srffilepath2(pickupview.getCodeName())}"
<#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)> <#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="row" :data="row"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="row" :data="row"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:data="row" :data="row"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
placeholder='${item.getPlaceHolder()}' placeholder='${item.getPlaceHolder()}'
</#if> </#if>
name="${editor.name}" name="${editor.name}"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
valueItem='${item.getValueItemName()}' valueItem='${item.getValueItemName()}'
refviewname="${srffilepath2(pickupview.getCodeName())}" refviewname="${srffilepath2(pickupview.getCodeName())}"
<#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)> <#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)>
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
placeholder='${item.getPlaceHolder()}' placeholder='${item.getPlaceHolder()}'
</#if> </#if>
name="${editor.name}" name="${editor.name}"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
valueItem='${item.getValueItemName()}' valueItem='${item.getValueItemName()}'
refviewname="${srffilepath2(pickupview.getCodeName())}" refviewname="${srffilepath2(pickupview.getCodeName())}"
<#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)> <#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)>
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
:data="row" :data="row"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
......
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<app-span <#t> <app-span <#t>
name='${editor.name}' name='${editor.name}' <#t>
:value="data.${editor.name}" <#t> :value="data.${editor.name}" <#t>
<#if item.getPSCodeList?? && item.getPSCodeList()??> <#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList() /> <#assign codelist=item.getPSCodeList() />
...@@ -15,9 +16,10 @@ ...@@ -15,9 +16,10 @@
textSeparator="${codelist.textSeparator}" <#t> textSeparator="${codelist.textSeparator}" <#t>
</#if> </#if>
</#if> </#if>
:data="data" :data="data" <#t>
:context="context" :context="context" <#t>
:viewparams="viewparams" :viewparams="viewparams" <#t>
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>" :localContext =<@getNavigateContext editor /> <#t>
:localParam =<@getNavigateParams editor /> <#t>
style="${editor.getEditorCssStyle()}"><#t> style="${editor.getEditorCssStyle()}"><#t>
</app-span><#lt> </app-span><#lt>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
\ No newline at end of file <app-span <#t>
name='${editor.name}' <#t>
:value="row[column.property]" <#t>
<#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList() />
tag='${codelist.codeName}' <#t>
codelistType='${codelist.getCodeListType()}' <#t>
<#if codelist.getOrMode?? && codelist.getOrMode()?has_content>
renderMode="${codelist.getOrMode()}" <#t>
</#if>
<#if codelist.valueSeparator?has_content>
valueSeparator="${codelist.valueSeparator}" <#t>
</#if>
<#if codelist.textSeparator?has_content>
textSeparator="${codelist.textSeparator}" <#t>
</#if>
</#if>
:data="row" <#t>
:context="context" <#t>
:viewparams="viewparams" <#t>
:localContext =<@getNavigateContext editor /> <#t>
:localParam =<@getNavigateParams editor /> <#t>
style="${editor.getEditorCssStyle()}"><#t>
</app-span><#lt>
\ No newline at end of file
<app-span <#t> <app-span <#t>
name='${editor.name}' name='${editor.name}' <#t>
:value="data.${editor.name}" <#t> :value="data.${editor.name}" <#t>
<#if item.getPSCodeList?? && item.getPSCodeList()??> <#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList() /> <#assign codelist=item.getPSCodeList() />
...@@ -15,9 +15,10 @@ ...@@ -15,9 +15,10 @@
textSeparator="${codelist.textSeparator}" <#t> textSeparator="${codelist.textSeparator}" <#t>
</#if> </#if>
</#if> </#if>
:data="data" :data="data" <#t>
:context="context" :context="context" <#t>
:viewparams="viewparams" :viewparams="viewparams" <#t>
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>" :localContext =<@getNavigateContext editor /> <#t>
:localParam =<@getNavigateParams editor /> <#t>
style="${editor.getEditorCssStyle()}"><#t> style="${editor.getEditorCssStyle()}"><#t>
</app-span><#lt> </app-span><#lt>
\ No newline at end of file
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
:itemParam=<@getItemParams editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:service="service" :service="service"
:acParams=<@getAcParams editor /> :acParams=<@getAcParams editor />
valueitem='${item.getValueItemName()}' valueitem='${item.getValueItemName()}'
......
<#ibizinclude>../@MACRO/GRID/DEFAULT.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
\ No newline at end of file <app-autocomplete
:data="row"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}'
:context="context"
:viewparams="viewparams"
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:service="service"
:acParams=<@getAcParams editor />
valueitem='${item.getValueItemName()}'
:value="row[column.property]"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}">
</app-autocomplete>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<app-checkbox-list <app-checkbox-list
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>" :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
<#if editor.getPSCodeList()??> <#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()> <#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}' tag='${codelist.codeName}'
......
<app-checkbox-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' <#if codelist.valueSeparator?has_content>valueSeparator="${codelist.valueSeparator}"</#if> mode="${codelist.getOrMode()?lower_case}"</#if> name="${item.name}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></app-checkbox-list> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
\ No newline at end of file <app-checkbox-list
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
:data="row"
:context="context"
:viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
<#if item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
<#if codelist.valueSeparator?has_content>
valueSeparator="${codelist.valueSeparator}"
</#if>
mode="${codelist.getOrMode()?lower_case}"
</#if>
name="${item.name}"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</app-checkbox-list>
...@@ -20,7 +20,8 @@ ${front_block} ...@@ -20,7 +20,8 @@ ${front_block}
* @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService * @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService
</#if> </#if>
*/ */
public async ${item.getFullCodeName()}(args: any[], context:any = {} ,params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) { public async ${item.getFullCodeName()}(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
...@@ -36,6 +37,15 @@ ${front_block} ...@@ -36,6 +37,15 @@ ${front_block}
<#else> <#else>
<#-- BEGIN: 数据处理逻辑 --> <#-- BEGIN: 数据处理逻辑 -->
let data: any = {}; let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
<#if item.getPSNavigateContexts?? && item.getPSNavigateContexts()??>
Object.assign(context,<@getNavigateContext item />);
</#if>
<#if item.getPSNavigateParams?? && item.getPSNavigateParams()??>
Object.assign(params,<@getNavigateParams item />);
</#if>
<#-- 是否先保存目标数据start --> <#-- 是否先保存目标数据start -->
<#if item.isSaveTargetFirst()> <#if item.isSaveTargetFirst()>
const result:any = await xData.save(args,false); const result:any = await xData.save(args,false);
...@@ -43,7 +53,6 @@ ${front_block} ...@@ -43,7 +53,6 @@ ${front_block}
</#if> </#if>
<#-- 是否先保存目标数据end --> <#-- 是否先保存目标数据end -->
const _args: any[] = Util.deepCopy(args); const _args: any[] = Util.deepCopy(args);
const _this: any = actionContext;
const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>; const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>;
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??> <#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??>
<#assign appDataEntity = item.getPSAppDataEntity() /> <#assign appDataEntity = item.getPSAppDataEntity() />
...@@ -56,8 +65,14 @@ ${front_block} ...@@ -56,8 +65,14 @@ ${front_block}
Object.assign(params, { ${textItem}: '%${textItem}%' }); Object.assign(params, { ${textItem}: '%${textItem}%' });
</#if> </#if>
</#if> </#if>
context = UIActionTool.handleContextParam(actionTarget,_args,context); if(_this.context){
data = UIActionTool.handleActionParam(actionTarget,_args,params); 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); context = Object.assign({},actionContext.context,context);
<#-- 构建srfparentdename和srfparentkey start --> <#-- 构建srfparentdename和srfparentkey start -->
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null}; let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
......
...@@ -20,7 +20,7 @@ ${backend_block} ...@@ -20,7 +20,7 @@ ${backend_block}
* @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService * @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService
</#if> </#if>
*/ */
public async ${item.getFullCodeName()}(args: any[],context:any = {}, params?: any, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){ public async ${item.getFullCodeName()}(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
...@@ -45,6 +45,15 @@ ${backend_block} ...@@ -45,6 +45,15 @@ ${backend_block}
actionContext.$Notice.error({ title: '错误', desc: '不支持多项数据' }); actionContext.$Notice.error({ title: '错误', desc: '不支持多项数据' });
<#else> <#else>
let data: any = {}; let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
<#if item.getPSNavigateContexts?? && item.getPSNavigateContexts()??>
Object.assign(context,<@getNavigateContext item />);
</#if>
<#if item.getPSNavigateParams?? && item.getPSNavigateParams()??>
Object.assign(params,<@getNavigateParams item />);
</#if>
<#-- 是否先保存目标数据start --> <#-- 是否先保存目标数据start -->
<#if item.isSaveTargetFirst()> <#if item.isSaveTargetFirst()>
const result:any = await xData.save(args,false); const result:any = await xData.save(args,false);
...@@ -52,7 +61,6 @@ ${backend_block} ...@@ -52,7 +61,6 @@ ${backend_block}
</#if> </#if>
<#-- 是否先保存目标数据end --> <#-- 是否先保存目标数据end -->
const _args: any[] = Util.deepCopy(args); const _args: any[] = Util.deepCopy(args);
const _this: any = actionContext;
const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>; const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>;
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??> <#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??>
<#assign appDataEntity = item.getPSAppDataEntity() /> <#assign appDataEntity = item.getPSAppDataEntity() />
...@@ -65,8 +73,14 @@ ${backend_block} ...@@ -65,8 +73,14 @@ ${backend_block}
Object.assign(params, { ${textItem}: '%${textItem}%' }); Object.assign(params, { ${textItem}: '%${textItem}%' });
</#if> </#if>
</#if> </#if>
context = UIActionTool.handleContextParam(actionTarget,_args,context); if(_this.context){
data = UIActionTool.handleActionParam(actionTarget,_args,params); 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); context = Object.assign({},actionContext.context,context);
<#-- 构建srfparentdename和srfparentkey start --> <#-- 构建srfparentdename和srfparentkey start -->
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null}; let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService<#t> * @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService<#t>
</#if> </#if>
*/ */
public async ${item.getFullCodeName()}(args: any[],context: any ={}, params?: any, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){ public async ${item.getFullCodeName()}(args: any[],context: any ={}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
...@@ -26,17 +26,31 @@ ...@@ -26,17 +26,31 @@
<#if item.getFrontPSAppView()??> <#if item.getFrontPSAppView()??>
<#assign dataview = item.getFrontPSAppView()> <#assign dataview = item.getFrontPSAppView()>
let data: any = {}; let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
<#if item.getPSNavigateContexts?? && item.getPSNavigateContexts()??>
Object.assign(context,<@getNavigateContext item />);
</#if>
<#if item.getPSNavigateParams?? && item.getPSNavigateParams()??>
Object.assign(params,<@getNavigateParams item />);
</#if>
<#-- 是否先保存目标数据start --> <#-- 是否先保存目标数据start -->
<#if item.isSaveTargetFirst()> <#if item.isSaveTargetFirst()>
const result:any = await xData.save(args,false); const result:any = await xData.save(args,false);
args = [result.data]; args = [result.data];
</#if> </#if>
<#-- 是否先保存目标数据end --> <#-- 是否先保存目标数据end -->
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args); const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>; const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>;
context = UIActionTool.handleContextParam(actionTarget,_args,context); if(_this.context){
data = UIActionTool.handleActionParam(actionTarget,_args,params); 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);
//转化表单界面数据 //转化表单界面数据
const resultData:any = xData.service.handleRequestData('',actionContext.context,_args[0]); const resultData:any = xData.service.handleRequestData('',actionContext.context,_args[0]);
Object.assign(context,resultData.context,context); Object.assign(context,resultData.context,context);
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService<#t> * @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService<#t>
</#if> </#if>
*/ */
public async ${item.getFullCodeName()}(args: any[],context: any = {}, params?: any, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string) { public async ${item.getFullCodeName()}(args: any[],context: any = {},params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string) {
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
actionContext.$Notice.error({ title: '错误', desc: '不支持多项数据' }); actionContext.$Notice.error({ title: '错误', desc: '不支持多项数据' });
<#else> <#else>
let data: any = {}; let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
if(!args || args.length <1){ if(!args || args.length <1){
console.error("错误,无数据传入"); console.error("错误,无数据传入");
} }
...@@ -40,7 +43,6 @@ ...@@ -40,7 +43,6 @@
</#if> </#if>
<#-- 是否先保存目标数据end --> <#-- 是否先保存目标数据end -->
const _args: any[] = Util.deepCopy(args); const _args: any[] = Util.deepCopy(args);
const _this: any = actionContext;
const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>; const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>;
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??> <#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??>
<#assign appDataEntity = item.getPSAppDataEntity() /> <#assign appDataEntity = item.getPSAppDataEntity() />
...@@ -59,8 +61,14 @@ ...@@ -59,8 +61,14 @@
</#if> </#if>
</#if> </#if>
</#if> </#if>
context = UIActionTool.handleContextParam(actionTarget,_args,context); if(_this.context){
data = UIActionTool.handleActionParam(actionTarget,_args,params); 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);
//转化表单界面数据 //转化表单界面数据
const resultData:any = xData.service.handleRequestData('',actionContext.context,_args[0]); const resultData:any = xData.service.handleRequestData('',actionContext.context,_args[0]);
Object.assign(context,resultData.context,context); Object.assign(context,resultData.context,context);
......
...@@ -35,6 +35,13 @@ ...@@ -35,6 +35,13 @@
* @memberof ${srfclassname('${view.name}')} * @memberof ${srfclassname('${view.name}')}
*/ */
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { 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 curNewLogicRefView = appUILogicRefView /></#if>
</#list>
</#if>
let localContext:any = <#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateContexts?? && curNewLogicRefView.getPSNavigateContexts()??><@getNavigateContext curNewLogicRefView /><#else>null</#if>;
let localViewParam:any =<#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateParams?? && curNewLogicRefView.getPSNavigateParams()??><@getNavigateParams curNewLogicRefView /><#else>null</#if>;
<#if viewlogic.isEnableWizardAdd()> <#if viewlogic.isEnableWizardAdd()>
this.$Notice.warning({ title: '错误', desc: '向导添加未实现' }); this.$Notice.warning({ title: '错误', desc: '向导添加未实现' });
<#elseif viewlogic.isEnableBatchAdd()> <#elseif viewlogic.isEnableBatchAdd()>
...@@ -93,14 +100,28 @@ ...@@ -93,14 +100,28 @@
if(args[0].srfsourcekey){ if(args[0].srfsourcekey){
data.srfsourcekey = 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()> <#if dataview.isPSDEView()>
<#assign appDataEntity = dataview.getPSAppDataEntity()/> <#assign appDataEntity = dataview.getPSAppDataEntity()/>
delete curViewParam.${appDataEntity.getCodeName()?lower_case}; delete tempContext.${appDataEntity.getCodeName()?lower_case};
</#if> </#if>
if(args.length >0){ if(args.length >0){
Object.assign(curViewParam,args[0]); Object.assign(tempContext,args[0]);
}
<#-- BEGIN:导航参数 -->
<#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateContexts?? && curNewLogicRefView.getPSNavigateContexts()??>
if(localContext && Object.keys(localContext).length >0){
let _context:any = this.$util.computedNavData(args[0],this.context,this.viewparams,localContext);
Object.assign(tempContext,_context);
} }
</#if>
<#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateParams?? && curNewLogicRefView.getPSNavigateParams()??>
if(localViewParam && Object.keys(localViewParam).length >0){
let _param:any = this.$util.computedNavData(args[0],this.context,this.viewparams,localViewParam);
Object.assign(data,_param);
}
</#if>
<#-- END:导航参数 -->
<#-- BEGIN:准备参数 --> <#-- BEGIN:准备参数 -->
<#-- BEGIN:是否应用实体视图 --> <#-- BEGIN:是否应用实体视图 -->
<#if dataview.isPSDEView()> <#if dataview.isPSDEView()>
...@@ -111,7 +132,7 @@ ...@@ -111,7 +132,7 @@
<#list dataview.getPSAppDERSPath(count_index) as deRSPath> <#list dataview.getPSAppDERSPath(count_index) as deRSPath>
<#if deRSPath.getMajorPSAppDataEntity?? && deRSPath.getMajorPSAppDataEntity()??> <#if deRSPath.getMajorPSAppDataEntity?? && deRSPath.getMajorPSAppDataEntity()??>
<#assign _dataEntity = 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> </#if>
</#list> </#list>
</#list> </#list>
...@@ -176,20 +197,20 @@ ...@@ -176,20 +197,20 @@
const openIndexViewTab = (data: any) => { const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) }; const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data); 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); this.$router.push(routePath);
} }
openIndexViewTab(data); openIndexViewTab(data);
<#elseif dataview.getOpenMode() == 'POPUPAPP'> <#elseif dataview.getOpenMode() == 'POPUPAPP'>
<#-- 打开独立程序弹出 --> <#-- 打开独立程序弹出 -->
const _this: any = this; 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'); window.open('./#'+routePath, '_blank');
<#elseif dataview.getOpenMode() = 'POPUPMODAL'> <#elseif dataview.getOpenMode() = 'POPUPMODAL'>
<#-- 打开模态 --> <#-- 打开模态 -->
const _this: any = this; const _this: any = this;
const openPopupModal = (view: any, data: any) => { 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) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
...@@ -211,7 +232,7 @@ ...@@ -211,7 +232,7 @@
<#-- 打开抽屉 --> <#-- 打开抽屉 -->
const _this: any = this; const _this: any = this;
const openDrawer = (view: any, data: any) => { 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) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
...@@ -234,7 +255,7 @@ ...@@ -234,7 +255,7 @@
<#-- 打开气泡卡片 --> <#-- 打开气泡卡片 -->
const _this: any = this; const _this: any = this;
const openPopOver = (view: any, data: any) => { 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) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
......
...@@ -14,13 +14,34 @@ ...@@ -14,13 +14,34 @@
* @memberof ${srfclassname('${view.name}')} * @memberof ${srfclassname('${view.name}')}
*/ */
public ${item.name}(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) { 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 curOPenLogicRefView = appUILogicRefView /></#if>
</#list>
</#if>
let localContext:any = <#if curOPenLogicRefView?? && curOPenLogicRefView.getPSNavigateContexts?? && curOPenLogicRefView.getPSNavigateContexts()??><@getNavigateContext curOPenLogicRefView /><#else>null</#if>;
let localViewParam:any =<#if curOPenLogicRefView?? && curOPenLogicRefView.getPSNavigateParams?? && curOPenLogicRefView.getPSNavigateParams()??><@getNavigateParams curOPenLogicRefView /><#else>null</#if>;
<#if viewlogic.getOpenDataPSAppView()??> <#if viewlogic.getOpenDataPSAppView()??>
<#assign dataview = viewlogic.getOpenDataPSAppView()/> <#assign dataview = viewlogic.getOpenDataPSAppView()/>
const data: any = {}; const data: any = {};
let curViewParam = JSON.parse(JSON.stringify(this.context)); let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){ if(args.length >0){
Object.assign(curViewParam,args[0]); Object.assign(tempContext,args[0]);
}
<#-- BEGIN:导航参数 -->
<#if curOPenLogicRefView?? && curOPenLogicRefView.getPSNavigateContexts?? && curOPenLogicRefView.getPSNavigateContexts()??>
if(localContext && Object.keys(localContext).length >0){
let _context:any = this.$util.computedNavData(args[0],this.context,this.viewparams,localContext);
Object.assign(tempContext,_context);
} }
</#if>
<#if curOPenLogicRefView?? && curOPenLogicRefView.getPSNavigateParams?? && curOPenLogicRefView.getPSNavigateParams()??>
if(localViewParam && Object.keys(localViewParam).length >0){
let _param:any = this.$util.computedNavData(args[0],this.context,this.viewparams,localViewParam);
Object.assign(data,_param);
}
</#if>
<#-- END:导航参数 -->
<#-- BEGIN:准备参数 --> <#-- BEGIN:准备参数 -->
<#if dataview.isRedirectView()> <#if dataview.isRedirectView()>
const deResParameters: any[] = []; const deResParameters: any[] = [];
...@@ -35,7 +56,7 @@ ...@@ -35,7 +56,7 @@
<#list dataview.getPSAppDERSPath(count_index) as deRSPath> <#list dataview.getPSAppDERSPath(count_index) as deRSPath>
<#if deRSPath.getMajorPSAppDataEntity?? && deRSPath.getMajorPSAppDataEntity()??> <#if deRSPath.getMajorPSAppDataEntity?? && deRSPath.getMajorPSAppDataEntity()??>
<#assign _dataEntity = 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> </#if>
</#list> </#list>
</#list> </#list>
...@@ -127,7 +148,7 @@ ...@@ -127,7 +148,7 @@
<#-- 打开顶级分页视图 --> <#-- 打开顶级分页视图 -->
const _this: any = this; const _this: any = this;
const openIndexViewTab = (data: any) => { const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, curViewParam, deResParameters, parameters, args, data); const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
<#if dataview.getViewType() == "DEWFDYNAEDITVIEW" > <#if dataview.getViewType() == "DEWFDYNAEDITVIEW" >
this.$router.push(routePath+'?userTaskId='+this.viewparams.userTaskId); this.$router.push(routePath+'?userTaskId='+this.viewparams.userTaskId);
<#else> <#else>
...@@ -138,13 +159,13 @@ ...@@ -138,13 +159,13 @@
<#elseif dataview.getOpenMode() == 'POPUPAPP'> <#elseif dataview.getOpenMode() == 'POPUPAPP'>
<#-- 打开独立程序弹出 --> <#-- 打开独立程序弹出 -->
const _this: any = this; 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'); window.open('./#'+routePath, '_blank');
<#elseif dataview.getOpenMode() = 'POPUPMODAL'> <#elseif dataview.getOpenMode() = 'POPUPMODAL'>
<#-- 打开模态 --> <#-- 打开模态 -->
const _this: any = this; const _this: any = this;
const openPopupModal = (view: any, data: any) => { 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) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
...@@ -166,7 +187,7 @@ ...@@ -166,7 +187,7 @@
<#-- 打开抽屉 --> <#-- 打开抽屉 -->
const _this: any = this; const _this: any = this;
const openDrawer = (view: any, data: any) => { 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) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
...@@ -189,7 +210,7 @@ ...@@ -189,7 +210,7 @@
<#-- 打开气泡卡片 --> <#-- 打开气泡卡片 -->
const _this: any = this; const _this: any = this;
const openPopOver = (view: any, data: any) => { 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) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
......
...@@ -20,9 +20,8 @@ ...@@ -20,9 +20,8 @@
let xData: any = null; let xData: any = null;
// _this 指向容器对象 // _this 指向容器对象
const _this: any = this; const _this: any = this;
let paramJO:any = <#if uiAction.getUIActionParamJO()??>${uiAction.getUIActionParamJO().toString()}<#else>{}</#if>; let paramJO:any = {};
<#if uiAction.getParamJOString?? && uiAction.getParamJOString()??>Object.assign(paramJO,${uiAction.getParamJOString()});</#if> let contextJO:any = {};
let contextJO:any = <#if uiAction.getContextJOString?? && uiAction.getContextJOString()??>${uiAction.getContextJOString()}<#else>{}</#if>;
<#-- 是否存在界面行为数据部件 --> <#-- 是否存在界面行为数据部件 -->
<#if item.getPSAppViewUIAction().getXDataPSControl?? && item.getPSAppViewUIAction().getXDataPSControl()??> <#if item.getPSAppViewUIAction().getXDataPSControl?? && item.getPSAppViewUIAction().getXDataPSControl()??>
<#assign xData = item.getPSAppViewUIAction().getXDataPSControl()/> <#assign xData = item.getPSAppViewUIAction().getXDataPSControl()/>
......
...@@ -5,3 +5,25 @@ ...@@ -5,3 +5,25 @@
$t('app.views.${tempView.getCodeName()?lower_case}.title')<#t> $t('app.views.${tempView.getCodeName()?lower_case}.title')<#t>
</#if> </#if>
</#macro> </#macro>
<#-- 获取导航上下文 -->
<#macro getNavigateContext currentItem>
{<#t>
<#if currentItem.getPSNavigateContexts?? && currentItem.getPSNavigateContexts()??>
<#list currentItem.getPSNavigateContexts() as navContext>
${navContext.getKey()}:<#if navContext.isRawValue()?? && navContext.isRawValue() == true>"${navContext.getValue()}"<#else>"%${navContext.getValue()}%"</#if><#if navContext_has_next>,</#if><#t>
</#list>
</#if>
}<#t>
</#macro>
<#-- 获取导航参数 -->
<#macro getNavigateParams currentItem>
{<#t>
<#if currentItem.getPSNavigateParams?? && currentItem.getPSNavigateParams()??>
<#list currentItem.getPSNavigateParams() as navParam >
${navParam.getKey()}:<#if navParam.isRawValue()?? && navParam.isRawValue() == true>"${navParam.getValue()}"<#else>"%${navParam.getValue()}%"</#if><#if navParam_has_next>,</#if><#t>
</#list>
</#if>
}<#t>
</#macro>
\ No newline at end of file
...@@ -18,6 +18,14 @@ ...@@ -18,6 +18,14 @@
*/ */
public selection: any = {}; public selection: any = {};
/**
* 表单数据
*
* @type {*}
* @memberof ${srfclassname('${view.name}')}Base
*/
public formData:any = {};
<#ibizinclude> <#ibizinclude>
./VIEW_BOTTOM-BASE.vue.ftl ./VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -150,6 +150,7 @@ ...@@ -150,6 +150,7 @@
}); });
this.viewSelections = newSelections; this.viewSelections = newSelections;
}); });
this.selectedData = JSON.stringify(this.viewSelections);
} }
/** /**
...@@ -160,6 +161,7 @@ ...@@ -160,6 +161,7 @@
public onCLickAllLeft():void { public onCLickAllLeft():void {
this.viewSelections = []; this.viewSelections = [];
this.containerModel.view_leftbtn.disabled = true; this.containerModel.view_leftbtn.disabled = true;
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', []);
this.selectedData = JSON.stringify(this.viewSelections); this.selectedData = JSON.stringify(this.viewSelections);
} }
...@@ -187,6 +189,7 @@ ...@@ -187,6 +189,7 @@
} }
}); });
}); });
this.selectedData = JSON.stringify(this.viewSelections);
} }
/** /**
......
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDETREEGRIDEXVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DATAVIEW_VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEKANBANVIEW
\ No newline at end of file
<#assign view_base_name>EditView4Base</#assign> <#assign view_base_name>EditView4Base</#assign>
<#assign self_content>
/**
* 表单数据
*
* @type {*}
* @memberof ${srfclassname('${view.name}')}Base
*/
public formData:any = {};
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW-BASE.vue.ftl ../@MACRO/VIEW-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file
...@@ -19,6 +19,14 @@ ...@@ -19,6 +19,14 @@
*/ */
public selection: any = {}; public selection: any = {};
/**
* 表单数据
*
* @type {*}
* @memberof ${srfclassname('${view.name}')}Base
*/
public formData:any = {};
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl ../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -12,7 +12,8 @@ Vue.use(Router); ...@@ -12,7 +12,8 @@ Vue.use(Router);
{ {
path: '<#if !isIncludeIndex>/</#if>appdataredirectview/:appdataredirectview?', path: '<#if !isIncludeIndex>/</#if>appdataredirectview/:appdataredirectview?',
meta: { meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>', caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${subView.getCodeName()?lower_case}.title</#if>',
info:'',
<#if subView.getPSSysImage()??> <#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}', imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}', iconCls: '${subView.getPSSysImage().getCssClass()}',
...@@ -30,7 +31,8 @@ Vue.use(Router); ...@@ -30,7 +31,8 @@ Vue.use(Router);
{ {
path: '<#if !isIncludeIndex>/</#if>appwfdataredirectview/:appwfdataredirectview?', path: '<#if !isIncludeIndex>/</#if>appwfdataredirectview/:appwfdataredirectview?',
meta: { meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>', caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${subView.getCodeName()?lower_case}.title</#if>',
info:'',
<#if subView.getPSSysImage()??> <#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}', imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}', iconCls: '${subView.getPSSysImage().getCssClass()}',
...@@ -48,7 +50,8 @@ Vue.use(Router); ...@@ -48,7 +50,8 @@ Vue.use(Router);
{ {
path: '<#if !isIncludeIndex>/</#if>${subView.getViewType()?lower_case}/:${subView.getViewType()?lower_case}?', path: '<#if !isIncludeIndex>/</#if>${subView.getViewType()?lower_case}/:${subView.getViewType()?lower_case}?',
meta: { meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>', caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${subView.getCodeName()?lower_case}.title</#if>',
info:'',
<#if subView.getPSSysImage()??> <#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}', imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}', iconCls: '${subView.getPSSysImage().getCssClass()}',
...@@ -66,7 +69,8 @@ Vue.use(Router); ...@@ -66,7 +69,8 @@ Vue.use(Router);
{ {
path: '<#if !isIncludeIndex>/</#if>${subView.getCodeName()?lower_case}/:${subView.getCodeName()?lower_case}?', path: '<#if !isIncludeIndex>/</#if>${subView.getCodeName()?lower_case}/:${subView.getCodeName()?lower_case}?',
meta: { meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>', caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${subView.getCodeName()?lower_case}.title</#if>',
info:'',
<#if subView.getPSSysImage()??> <#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}', imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}', iconCls: '${subView.getPSSysImage().getCssClass()}',
...@@ -102,7 +106,8 @@ Vue.use(Router); ...@@ -102,7 +106,8 @@ Vue.use(Router);
path: '/${path}${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?', path: '/${path}${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?',
<#-- 嵌入关系路由未设置name属性 --> <#-- 嵌入关系路由未设置name属性 -->
meta: { meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>', caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${subView.getCodeName()?lower_case}.title</#if>',
info:'',
<#if subView.getPSSysImage()??> <#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}', imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}', iconCls: '${subView.getPSSysImage().getCssClass()}',
...@@ -125,7 +130,8 @@ Vue.use(Router); ...@@ -125,7 +130,8 @@ Vue.use(Router);
{ {
path: '/${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?', path: '/${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?',
meta: { meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>', caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${subView.getCodeName()?lower_case}.title</#if>',
info:'',
<#if subView.getPSSysImage()??> <#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}', imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}', iconCls: '${subView.getPSSysImage().getCssClass()}',
...@@ -142,7 +148,8 @@ Vue.use(Router); ...@@ -142,7 +148,8 @@ Vue.use(Router);
{ {
path: '/${subView.getCodeName()?lower_case}/:${subView.getCodeName()?lower_case}?', path: '/${subView.getCodeName()?lower_case}/:${subView.getCodeName()?lower_case}?',
meta: { meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>', caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${subView.getCodeName()?lower_case}.title</#if>',
info:'',
<#if subView.getPSSysImage()??> <#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}', imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}', iconCls: '${subView.getPSSysImage().getCssClass()}',
...@@ -182,7 +189,8 @@ const router = new Router({ ...@@ -182,7 +189,8 @@ const router = new Router({
}); });
}, },
meta: { meta: {
caption: '<#if view.isPSDEView()>entities.${view.getPSAppDataEntity().getCodeName()?lower_case}.views.${view.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${view.getCodeName()?lower_case}.caption</#if>', caption: '<#if view.isPSDEView()>entities.${view.getPSAppDataEntity().getCodeName()?lower_case}.views.${view.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${view.getCodeName()?lower_case}.title</#if>',
info:'',
viewType: 'APPINDEX', viewType: 'APPINDEX',
<#if view.getPSSysImage()??> <#if view.getPSSysImage()??>
imgPath: '${view.getPSSysImage().getImagePath()}', imgPath: '${view.getPSSysImage().getImagePath()}',
...@@ -212,7 +220,8 @@ const router = new Router({ ...@@ -212,7 +220,8 @@ const router = new Router({
{ {
path: '${path}${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?', path: '${path}${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?',
meta: { meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>', caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${subView.getCodeName()?lower_case}.title</#if>',
info:'',
<#if subView.getPSSysImage()??> <#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}', imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}', iconCls: '${subView.getPSSysImage().getCssClass()}',
...@@ -236,7 +245,8 @@ const router = new Router({ ...@@ -236,7 +245,8 @@ const router = new Router({
{ {
path: '${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?', path: '${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?',
meta: { meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>', caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${subView.getCodeName()?lower_case}.title</#if>',
info:'',
<#if subView.getPSSysImage()??> <#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}', imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}', iconCls: '${subView.getPSSysImage().getCssClass()}',
...@@ -254,7 +264,8 @@ const router = new Router({ ...@@ -254,7 +264,8 @@ const router = new Router({
{ {
path: '${subView.getCodeName()?lower_case}/:${subView.getCodeName()?lower_case}?', path: '${subView.getCodeName()?lower_case}/:${subView.getCodeName()?lower_case}?',
meta: { meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>', caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${subView.getCodeName()?lower_case}.title</#if>',
info:'',
<#if subView.getPSSysImage()??> <#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}', imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}', iconCls: '${subView.getPSSysImage().getCssClass()}',
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<#macro getTitleLanguage obj langrestype> <#macro getTitleLanguage obj langrestype>
<#if obj.getTitlePSLanguageRes()?? && obj.getTitlePSLanguageRes().getContent(langrestype, false)?? && obj.getTitlePSLanguageRes().getContent(langrestype, false) != ''> <#if obj.getTitlePSLanguageRes()?? && obj.getTitlePSLanguageRes().getContent(langrestype, false)?? && obj.getTitlePSLanguageRes().getContent(langrestype, false) != ''>
${obj.getTitlePSLanguageRes().getContent(langrestype, false)}<#t> ${obj.getTitlePSLanguageRes().getContent(langrestype, false)}<#t>
<#elseif obj.getCaption()??> <#elseif obj.getTitle()??>
${obj.getCaption()}<#t> ${obj.getTitle()}<#t>
</#if> </#if>
</#macro> </#macro>
<#-- END:获取标题语言资源 --> <#-- END:获取标题语言资源 -->
......
...@@ -42,7 +42,8 @@ vueApp.locale = () => { }; ...@@ -42,7 +42,8 @@ vueApp.locale = () => { };
const i18n = new VueI18n({ const i18n = new VueI18n({
locale: lang, locale: lang,
messages messages,
silentTranslationWarn:true
}); });
export default i18n; export default i18n;
...@@ -19,6 +19,9 @@ export default { ...@@ -19,6 +19,9 @@ export default {
ok: 'OK', ok: 'OK',
cancel: 'Cancel', cancel: 'Cancel',
}, },
local:{
new: 'New'
},
gridpage: { gridpage: {
choicecolumns: 'Choice columns', choicecolumns: 'Choice columns',
refresh: 'refresh', refresh: 'refresh',
......
...@@ -19,6 +19,9 @@ export default { ...@@ -19,6 +19,9 @@ export default {
ok: '确认', ok: '确认',
cancel: '取消', cancel: '取消',
}, },
local:{
new: '新建'
},
gridpage: { gridpage: {
choicecolumns: '选择列', choicecolumns: '选择列',
refresh: '刷新', refresh: '刷新',
......
...@@ -9,16 +9,10 @@ export default { ...@@ -9,16 +9,10 @@ export default {
<#if codelist.getCodeListType() == "STATIC"> <#if codelist.getCodeListType() == "STATIC">
${codelist.codeName}: { ${codelist.codeName}: {
<#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??> <#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??>
<#if codelist.isCodeItemValueNumber()>
<#list codelist.getAllPSCodeItems() as codeitem>
${codeitem.getValue()?j_string}: '<@getTextLanguage codeitem langrestype />',
</#list>
<#else>
<#list codelist.getAllPSCodeItems() as codeitem> <#list codelist.getAllPSCodeItems() as codeitem>
'${codeitem.getValue()?j_string}': '<@getTextLanguage codeitem langrestype />', '${codeitem.getValue()?j_string}': '<@getTextLanguage codeitem langrestype />',
</#list> </#list>
</#if> </#if>
</#if>
empty: '<@getEmptyTextLanguage codelist langrestype '' />', empty: '<@getEmptyTextLanguage codelist langrestype '' />',
}, },
<#elseif codelist.getCodeListType() == "DYNAMIC"> <#elseif codelist.getCodeListType() == "DYNAMIC">
......
...@@ -9,16 +9,10 @@ export default { ...@@ -9,16 +9,10 @@ export default {
<#if codelist.getCodeListType() == "STATIC"> <#if codelist.getCodeListType() == "STATIC">
${codelist.codeName}: { ${codelist.codeName}: {
<#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??> <#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??>
<#if codelist.isCodeItemValueNumber()>
<#list codelist.getAllPSCodeItems() as codeitem>
${codeitem.getValue()?j_string}: '<@getTextLanguage codeitem langrestype />',
</#list>
<#else>
<#list codelist.getAllPSCodeItems() as codeitem> <#list codelist.getAllPSCodeItems() as codeitem>
'${codeitem.getValue()?j_string}': '<@getTextLanguage codeitem langrestype />', '${codeitem.getValue()?j_string}': '<@getTextLanguage codeitem langrestype />',
</#list> </#list>
</#if> </#if>
</#if>
empty: '<@getEmptyTextLanguage codelist langrestype '' />', empty: '<@getEmptyTextLanguage codelist langrestype '' />',
}, },
<#elseif codelist.getCodeListType() == "DYNAMIC"> <#elseif codelist.getCodeListType() == "DYNAMIC">
......
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
</#if> </#if>
<#-- 实体部件输出 --> <#-- 实体部件输出 -->
<#if item.getPSControls()??> <#if item.getPSControls()??>
<#assign ctrltypes = ['FORM', 'GRID', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW']> <#assign ctrltypes = ['FORM', 'GRID', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW', 'TREEGRIDEX']>
<#list ctrltypes as ctrltype> <#list ctrltypes as ctrltype>
<#list item.getPSControls() as ctrl> <#list item.getPSControls() as ctrl>
<#if ctrl.getControlType() == ctrltype> <#if ctrl.getControlType() == ctrltype>
......
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_KANBAN
</#ibiztemplate>
${P.getCtrlCode('CONTROL-BASE.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_KANBAN
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_KANBAN
</#ibiztemplate>
${P.getCtrlCode('SERVICE.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_KANBAN
</#ibiztemplate>
${P.getCtrlCode('CONTROL.less').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_KANBAN
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TREEGRIDEX
</#ibiztemplate>
${P.getCtrlCode('CONTROL-BASE.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TREEGRIDEX
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TREEGRIDEX
</#ibiztemplate>
${P.getCtrlCode('SERVICE.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TREEGRIDEX
</#ibiztemplate>
${P.getCtrlCode('CONTROL.less').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TREEGRIDEX
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
## v7.0.0-alpha.7 [2020-6-11]
### Bug修复
数值代码表多语言
树右键菜单滚动条样式bug
列表面板界面行为bug
多选视图界面逻辑修复
图表刷新bug修复
日历部件选中抛出数据逻辑调整
编辑视图,app-span显示0时不显示
树视图右键界面行为刷新bug
快捷菜单控制台报错bug
门户加载自定义模型错误时,正常显示默认看板
修复雷达图显示异常问题
修复编辑类、分页导航视图带数据标题问题
修复饼图、漏斗图 获取序列参数错误问题
多选视图高度异常bug
### 功能新增及优化
#### 模板
看板和门户布局模板调整,支持门户部件标题栏界面行为组
支持数据选择、地址框、自动完成、下拉列表、标签、选项框列表、单选列表等编辑器导航参数调整
支持树导航栏、表格导航栏、列表导航栏、卡片导航栏、日历导航栏、表单关系界面、数据选择面板、分页导航面板、数据关系栏、界面行为、新建逻辑、编辑逻辑导航参数调整
支持图表无数据时显示暂无数据
支持表格新建默认值
支持日历部件右键菜单
支持表格列触发界面行为
面板布局调整
添加头部菜单
#### 基础文件
门户部件视图的样式
数据选择,地址框,自动完成,下拉列表,标签,选项框列表,单选列表等编辑器导航参数调整
表单项label位置
调整登录页面
穿梭框编辑器支持
添加头部菜单
## v7.0.0-alpha.6 [2020-6-5] ## v7.0.0-alpha.6 [2020-6-5]
### Bug修复 ### Bug修复
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册