提交 82bc41d9 编写于 作者: ibizdev's avatar ibizdev

4月16号提交

上级 3a45dfd3
<#-- content --> <#-- content -->
<#assign content> <#assign content>
:isSingleSelect="isSingleSelect" :isSingleSelect="isSingleSelect"
<#if view.getViewType() == 'DEPICKUPGRIDVIEW'>
:selectedData="selectedData"
</#if>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}" :showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
<#if view.getViewType() == "DEGRIDVIEW" || view.getViewType() == "DEGRIDVIEW9"> <#if view.getViewType() == "DEGRIDVIEW" || view.getViewType() == "DEGRIDVIEW9">
:isOpenEdit="${view.isRowEditDefault()?c}" :isOpenEdit="${view.isRowEditDefault()?c}"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave" @save="onSave"
</#if> </#if>
updateAction="<#if ctrl.getUpdatePSControlAction()?? && ctrl.getUpdatePSControlAction().getPSAppDEMethod()??>${ctrl.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>" updateAction="<#if ctrl.getUpdatePSControlAction()?? && ctrl.getUpdatePSControlAction().getPSAppDEMethod()??>${ctrl.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
removeAction="<#if ctrl.getRemovePSControlAction()?? && ctrl.getRemovePSControlAction().getPSAppDEMethod()??>${ctrl.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>" removeAction="<#if ctrl.getRemovePSControlAction()?? && ctrl.getRemovePSControlAction().getPSAppDEMethod()??>${ctrl.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
loaddraftAction="<#if ctrl.getGetDraftPSControlAction()?? && ctrl.getGetDraftPSControlAction().getPSAppDEMethod()??>${ctrl.getGetDraftPSControlAction().getPSAppDEMethod().getCodeName()}</#if>" loaddraftAction="<#if ctrl.getGetDraftPSControlAction()?? && ctrl.getGetDraftPSControlAction().getPSAppDEMethod()??>${ctrl.getGetDraftPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected isActivied: boolean = false; protected isActivied: boolean = true;
/** /**
* vue 生命周期 * vue 生命周期
...@@ -63,11 +63,15 @@ ...@@ -63,11 +63,15 @@
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
return; return;
} }
if (!this.isActivied) { <#if view.getPSAppViewEngines()??>
this.$nextTick(() => { this.$forceUpdate();
this.isActivied = true; <#else>
}); this.isActivied = false;
} this.$nextTick(() => {
this.isActivied = true;
});
</#if>
}); });
} }
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<split class="app-list-exp-bar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" v-model="split" @on-move-end="onSplitChange"> <split id="${ctrl.getCodeName()?lower_case}" class="app-list-exp-bar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" v-model="split" mode="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>" @on-move-end="onSplitChange">
<div slot='left'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='list-exp-bar-header'> <div class='list-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>列表导航栏<#else>${ctrl.getTitle()}</#if></div> <div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>列表导航栏<#else>${ctrl.getTitle()}</#if></div>
...@@ -38,11 +38,10 @@ ...@@ -38,11 +38,10 @@
</#if> </#if>
</div> </div>
</div> </div>
<div slot='right'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>'>
<component <component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')" v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname" :is="selection.view.viewname"
:key="$util.createUUID()"
class="viewcontainer2" class="viewcontainer2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)"> :viewdata="JSON.stringify(selection.data)">
...@@ -61,7 +60,7 @@ ...@@ -61,7 +60,7 @@
* 视图唯一标识 * 视图唯一标识
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected viewUID!:string; @Prop() protected viewUID!:string;
...@@ -70,16 +69,41 @@ ...@@ -70,16 +69,41 @@
* *
* @protected * @protected
* @type {(boolean)} * @type {(boolean)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected isSingleSelect:boolean = true; protected isSingleSelect:boolean = true;
/**
* 呈现模式,可选值:horizontal或者vertical
*
* @protected
* @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected showMode:string ="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>";
/**
* 控件宽度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()}<#else>0</#if>;
/**
* 控件高度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()}<#else>0</#if>;
/** /**
* 搜素值 * 搜素值
* *
* @protected * @protected
* @type {(string)} * @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected searchText:string = ""; protected searchText:string = "";
...@@ -87,7 +111,7 @@ ...@@ -87,7 +111,7 @@
* 分割宽度 * 分割宽度
* *
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected split: number = 0.5; protected split: number = 0.5;
...@@ -98,7 +122,7 @@ ...@@ -98,7 +122,7 @@
* 导航视图名称 * 导航视图名称
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navViewName: string = "<#if xDataControl.getNavPSAppView()??><#assign navPSAppView = xDataControl.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>"; protected navViewName: string = "<#if xDataControl.getNavPSAppView()??><#assign navPSAppView = xDataControl.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>";
...@@ -106,7 +130,7 @@ ...@@ -106,7 +130,7 @@
* 导航视图参数 * 导航视图参数
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navViewParam: string = '<#if xDataControl.getNavViewParamJO()??>${xDataControl.getNavViewParamJO()}</#if>'; protected navViewParam: string = '<#if xDataControl.getNavViewParamJO()??>${xDataControl.getNavViewParamJO()}</#if>';
...@@ -114,7 +138,7 @@ ...@@ -114,7 +138,7 @@
* 导航过滤项 * 导航过滤项
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>"; protected navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>";
</#if> </#if>
...@@ -123,7 +147,7 @@ ...@@ -123,7 +147,7 @@
* 显示处理提示 * 显示处理提示
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop({ default: true }) protected showBusyIndicator!: boolean; @Prop({ default: true }) protected showBusyIndicator!: boolean;
...@@ -141,7 +165,7 @@ ...@@ -141,7 +165,7 @@
* 获取多项数据 * 获取多项数据
* *
* @returns {any[]} * @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getDatas(): any[] { public getDatas(): any[] {
return []; return [];
...@@ -151,7 +175,7 @@ ...@@ -151,7 +175,7 @@
* 获取单项树 * 获取单项树
* *
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getData(): any { public getData(): any {
return null; return null;
...@@ -161,14 +185,14 @@ ...@@ -161,14 +185,14 @@
* 选中数据 * 选中数据
* *
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected selection: any = {}; protected selection: any = {};
/** /**
* split值变化事件 * split值变化事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public onSplitChange() { public onSplitChange() {
if(this.split){ if(this.split){
...@@ -179,7 +203,7 @@ ...@@ -179,7 +203,7 @@
/** /**
* Vue声明周期(组件初始化完毕) * Vue声明周期(组件初始化完毕)
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public created() { public created() {
this.afterCreated(); this.afterCreated();
...@@ -188,7 +212,7 @@ ...@@ -188,7 +212,7 @@
/** /**
* 执行created后的逻辑 * 执行created后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterCreated(){ public afterCreated(){
if (this.viewState) { if (this.viewState) {
...@@ -201,16 +225,46 @@ ...@@ -201,16 +225,46 @@
this.viewState.next({ tag: '${xDataControl.getName()}', action: action, data: data }); this.viewState.next({ tag: '${xDataControl.getName()}', action: action, data: data });
</#if> </#if>
}); });
} }
}
/**
* 执行mounted后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterMounted(){
if(this.$store.getters.getViewSplit(this.viewUID)){ if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID); this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetWidth;
let containerHeight:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetHeight;
if(Object.is(this.showMode,'horizontal')){
if(this.ctrlWidth){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
} }
} }
/**
* Vue声明周期(组件渲染完毕)
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public mounted() {
this.afterMounted();
}
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected destroyed() { protected destroyed() {
this.afterDestroy(); this.afterDestroy();
...@@ -219,7 +273,7 @@ ...@@ -219,7 +273,7 @@
/** /**
* 执行destroyed后的逻辑 * 执行destroyed后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected afterDestroy() { protected afterDestroy() {
if (this.viewStateEvent) { if (this.viewStateEvent) {
...@@ -233,7 +287,7 @@ ...@@ -233,7 +287,7 @@
/** /**
* ${ctrl.name}的选中数据事件 * ${ctrl.name}的选中数据事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void { protected ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {}; let data:any = {};
...@@ -246,6 +300,7 @@ ...@@ -246,6 +300,7 @@
<#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(data,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']});
</#if> </#if>
</#if> </#if>
if(this.context){ if(this.context){
...@@ -254,12 +309,13 @@ ...@@ -254,12 +309,13 @@
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data }); Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data });
this.$emit('selectionchange',args); this.$emit('selectionchange',args);
this.$forceUpdate();
} }
/** /**
* ${ctrl.name}的load完成事件 * ${ctrl.name}的load完成事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected ${ctrl.name}_load(args:any, tag?: string, $event2?: any){ protected ${ctrl.name}_load(args:any, tag?: string, $event2?: any){
this.$emit('load',args); this.$emit('load',args);
...@@ -268,7 +324,7 @@ ...@@ -268,7 +324,7 @@
/** /**
* 执行搜索 * 执行搜索
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onSearch($event:any) { protected onSearch($event:any) {
<#if ctrl.getPSDEList()??> <#if ctrl.getPSDEList()??>
......
...@@ -67,6 +67,69 @@ ...@@ -67,6 +67,69 @@
padding-right: 10px; padding-right: 10px;
} }
} }
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
.list-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
>div {
font-size: 18px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: space-between;
align-items: center;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
}
}
.list-exp-bar-content {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
margin-bottom: 10px;
}
.list-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
}
}
} }
<#ibizinclude> <#ibizinclude>
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<split class="app-dataview-exp-bar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" v-model="split" @on-move-end="onSplitChange"> <split id="${ctrl.getCodeName()?lower_case}" class="app-dataview-exp-bar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" v-model="split" mode="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>" @on-move-end="onSplitChange">
<div slot='left'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='dataview-exp-bar-header'> <div class='dataview-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>卡片视图导航栏<#else>${ctrl.getTitle()}</#if></div> <div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>卡片视图导航栏<#else>${ctrl.getTitle()}</#if></div>
...@@ -38,11 +38,10 @@ ...@@ -38,11 +38,10 @@
</#if> </#if>
</div> </div>
</div> </div>
<div slot='right'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>'>
<component <component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')" v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname" :is="selection.view.viewname"
:key="$util.createUUID()"
class="viewcontainer2" class="viewcontainer2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)"> :viewdata="JSON.stringify(selection.data)">
...@@ -61,7 +60,7 @@ ...@@ -61,7 +60,7 @@
* 视图唯一标识 * 视图唯一标识
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected viewUID!:string; @Prop() protected viewUID!:string;
...@@ -70,16 +69,41 @@ ...@@ -70,16 +69,41 @@
* *
* @protected * @protected
* @type {(boolean)} * @type {(boolean)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected isSingleSelect:boolean = true; protected isSingleSelect:boolean = true;
/**
* 呈现模式,可选值:horizontal或者vertical
*
* @protected
* @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected showMode:string ="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>";
/**
* 控件宽度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()}<#else>0</#if>;
/**
* 控件高度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()}<#else>0</#if>;
/** /**
* 搜素值 * 搜素值
* *
* @protected * @protected
* @type {(string)} * @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected searchText:string = ""; protected searchText:string = "";
...@@ -87,7 +111,7 @@ ...@@ -87,7 +111,7 @@
* 分割宽度 * 分割宽度
* *
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected split: number = 0.5; protected split: number = 0.5;
...@@ -98,7 +122,7 @@ ...@@ -98,7 +122,7 @@
* 导航视图名称 * 导航视图名称
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navViewName: string = "<#if xDataControl.getNavPSAppView()??><#assign navPSAppView = xDataControl.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>"; protected navViewName: string = "<#if xDataControl.getNavPSAppView()??><#assign navPSAppView = xDataControl.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>";
...@@ -106,7 +130,7 @@ ...@@ -106,7 +130,7 @@
* 导航视图参数 * 导航视图参数
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navViewParam: string = '<#if xDataControl.getNavViewParamJO()??>${xDataControl.getNavViewParamJO()}</#if>'; protected navViewParam: string = '<#if xDataControl.getNavViewParamJO()??>${xDataControl.getNavViewParamJO()}</#if>';
...@@ -114,7 +138,7 @@ ...@@ -114,7 +138,7 @@
* 导航过滤项 * 导航过滤项
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>"; protected navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>";
</#if> </#if>
...@@ -123,7 +147,7 @@ ...@@ -123,7 +147,7 @@
* 显示处理提示 * 显示处理提示
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop({ default: true }) protected showBusyIndicator!: boolean; @Prop({ default: true }) protected showBusyIndicator!: boolean;
...@@ -141,7 +165,7 @@ ...@@ -141,7 +165,7 @@
* 获取多项数据 * 获取多项数据
* *
* @returns {any[]} * @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getDatas(): any[] { public getDatas(): any[] {
return []; return [];
...@@ -151,7 +175,7 @@ ...@@ -151,7 +175,7 @@
* 获取单项树 * 获取单项树
* *
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getData(): any { public getData(): any {
return null; return null;
...@@ -161,14 +185,14 @@ ...@@ -161,14 +185,14 @@
* 选中数据 * 选中数据
* *
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected selection: any = {}; protected selection: any = {};
/** /**
* split值变化事件 * split值变化事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public onSplitChange() { public onSplitChange() {
if(this.split){ if(this.split){
...@@ -179,7 +203,7 @@ ...@@ -179,7 +203,7 @@
/** /**
* Vue声明周期(组件初始化完毕) * Vue声明周期(组件初始化完毕)
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public created() { public created() {
this.afterCreated(); this.afterCreated();
...@@ -188,7 +212,7 @@ ...@@ -188,7 +212,7 @@
/** /**
* 执行created后的逻辑 * 执行created后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterCreated(){ public afterCreated(){
if (this.viewState) { if (this.viewState) {
...@@ -201,16 +225,46 @@ ...@@ -201,16 +225,46 @@
this.viewState.next({ tag: '${dataview.name}', action: action, data: data }); this.viewState.next({ tag: '${dataview.name}', action: action, data: data });
</#if> </#if>
}); });
} }
}
/**
* Vue声明周期(组件渲染完毕)
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterMounted(){
if(this.$store.getters.getViewSplit(this.viewUID)){ if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID); this.split = this.$store.getters.getViewSplit(this.viewUID);
} }else{
let containerWidth:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetWidth;
let containerHeight:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetHeight;
if(Object.is(this.showMode,'horizontal')){
if(this.ctrlWidth){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
} }
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected destroyed() { protected destroyed() {
this.afterDestroy(); this.afterDestroy();
...@@ -219,7 +273,7 @@ ...@@ -219,7 +273,7 @@
/** /**
* 执行destroyed后的逻辑 * 执行destroyed后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected afterDestroy() { protected afterDestroy() {
if (this.viewStateEvent) { if (this.viewStateEvent) {
...@@ -237,7 +291,7 @@ ...@@ -237,7 +291,7 @@
* @param {string} [tag] * @param {string} [tag]
* @param {*} [$event2] * @param {*} [$event2]
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void { protected ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {}; let data:any = {};
...@@ -250,6 +304,7 @@ ...@@ -250,6 +304,7 @@
<#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(data,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']});
</#if> </#if>
</#if> </#if>
if(this.context){ if(this.context){
...@@ -258,6 +313,7 @@ ...@@ -258,6 +313,7 @@
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data }); Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data });
this.$emit('selectionchange',args); this.$emit('selectionchange',args);
this.$forceUpdate();
} }
/** /**
...@@ -267,7 +323,7 @@ ...@@ -267,7 +323,7 @@
* @param {string} [tag] * @param {string} [tag]
* @param {*} [$event2] * @param {*} [$event2]
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected ${ctrl.name}_load(args: any[], tag?: string, $event2?: any): void { protected ${ctrl.name}_load(args: any[], tag?: string, $event2?: any): void {
this.$emit('load',args); this.$emit('load',args);
...@@ -276,7 +332,7 @@ ...@@ -276,7 +332,7 @@
/** /**
* 执行搜索 * 执行搜索
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onSearch() { protected onSearch() {
<#if ctrl.getPSDEDataView()??> <#if ctrl.getPSDEDataView()??>
......
...@@ -67,6 +67,66 @@ ...@@ -67,6 +67,66 @@
padding-right: 10px; padding-right: 10px;
} }
} }
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
.dataview-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
>div {
font-size: 18px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: space-between;
align-items: center;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
}
}
.dataview-exp-bar-content {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
margin-bottom: 10px;
}
.dataview-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
}
}
} }
<#ibizinclude> <#ibizinclude>
......
<template> <template>
<layout class="app-wizard"> <layout class="app-wizard">
<#if ctrl.getPSDEWizard?? && ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardSteps?? && ctrl.getPSDEWizard().getPSDEWizardSteps()??>
<el-steps class="wizard-steps" :active="wizardForms.indexOf(activeForm)" finish-status="success">
<#list ctrl.getPSDEWizard().getPSDEWizardSteps() as step>
<el-step title="${step.getTitle()}"></el-step>
</#list>
</el-steps>
</#if>
<i-content class="app-wizard-content"> <i-content class="app-wizard-content">
<#if ctrl.getPSDEEditForms()??> <#if ctrl.getPSDEEditForms()??>
<#list ctrl.getPSDEEditForms() as form> <#list ctrl.getPSDEEditForms() as form>
...@@ -47,7 +54,7 @@ ...@@ -47,7 +54,7 @@
@Prop() protected initAction!: string; @Prop() protected initAction!: string;
/** /**
* 部件行为--remove * 部件行为--finish
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
...@@ -69,7 +76,7 @@ ...@@ -69,7 +76,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public getDatas(): any[] { public getDatas(): any[] {
return []; return [this.formParam];
} }
/** /**
...@@ -79,7 +86,7 @@ ...@@ -79,7 +86,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public getData(): any { public getData(): any {
return null; return this.formParam;
} }
/** /**
...@@ -185,11 +192,11 @@ ...@@ -185,11 +192,11 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public regFormActions() { public regFormActions() {
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardForms()??> <#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardForms()??>
<#list ctrl.getPSDEWizard().getPSDEWizardForms() as form> <#list ctrl.getPSDEWizard().getPSDEWizardForms() as form>
this.regFormAction('${ctrl.name}_form_${form.getFormTag()}', [<#if form.getStepActions()??><#list form.getStepActions() as action><#if action_index gt 0>,</#if>'${action}'</#list></#if>]); this.regFormAction('${ctrl.name}_form_${form.getFormTag()}', [<#if form.getStepActions()??><#list form.getStepActions() as action><#if action_index gt 0>,</#if>'${action}'</#list></#if>]);
</#list> </#list>
</#if> </#if>
} }
/** /**
...@@ -252,7 +259,7 @@ ...@@ -252,7 +259,7 @@
let arg: any = {}; let arg: any = {};
Object.assign(arg, this.formParam); Object.assign(arg, this.formParam);
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.finish(this.initAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.finish(this.finishAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (response && response.status === 200) { if (response && response.status === 200) {
const data = response.data; const data = response.data;
...@@ -291,12 +298,7 @@ ...@@ -291,12 +298,7 @@
Object.assign(this.formParam, args); Object.assign(this.formParam, args);
if(Object.is(this.curState, 'NEXT')) { if(Object.is(this.curState, 'NEXT')) {
this.historyForms.push(name); this.historyForms.push(name);
if(args.srfnextform) { if (this.getNextForm()) {
this.activeForm = '${ctrl.name}_form_' + args.srfnextform;
setTimeout(() => {
this.formLoad();
}, 1);
} else if (this.getNextForm()) {
this.activeForm = this.getNextForm(); this.activeForm = this.getNextForm();
setTimeout(() => { setTimeout(() => {
this.formLoad(); this.formLoad();
...@@ -304,8 +306,7 @@ ...@@ -304,8 +306,7 @@
} else { } else {
this.doFinish(); this.doFinish();
} }
} }else if(Object.is(this.curState, 'FINISH')) {
if(Object.is(this.curState, 'FINISH')) {
this.doFinish(); this.doFinish();
} }
} }
...@@ -382,7 +383,7 @@ ...@@ -382,7 +383,7 @@
} }
/** /**
* 是否 * 是否
* *
* @param {string} type * @param {string} type
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
...@@ -398,4 +399,8 @@ ...@@ -398,4 +399,8 @@
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file
.app-wizard { .app-wizard {
background: #fff; background: #fff;
height: 100%; height: 100%;
.wizard-steps{
padding: 10px 50px;
border-bottom: 1px solid #ddd;
margin-bottom: 10px;
.el-step__head.is-process{
border-color: #7e8187;
color: #7e8187;
}
.el-step__title.is-process{
color: #7e8187;
}
.el-step__head.is-success{
border-color: #1890ff;
color: #1890ff;
}
.el-step__title.is-success{
color: #1890ff;
}
}
.app-wizard-content{ .app-wizard-content{
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<#if item.getTooltip()?? && item.getTooltip() != ''> <#if item.getTooltip()?? && item.getTooltip() != ''>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<#if deuiaction.getUIActionTag() == 'ExportExcel'> <#if deuiaction.getUIActionTag() == 'ExportExcel'>
<app-export-excel :item="toolBarModels.${item.name}" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel> <app-export-excel :item="toolBarModels.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel>
<#else> <#else>
<@badge item> <@badge item>
<i-button v-show="toolBarModels.${item.name}.visabled" :disabled="toolBarModels.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)"> <i-button v-show="toolBarModels.${item.name}.visabled" :disabled="toolBarModels.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</tooltip> </tooltip>
<#else> <#else>
<#if deuiaction.getUIActionTag() == 'ExportExcel'> <#if deuiaction.getUIActionTag() == 'ExportExcel'>
<app-export-excel :item="toolBarModels.${item.name}" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel> <app-export-excel :item="toolBarModels.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel>
<#else> <#else>
<@badge item> <@badge item>
<i-button v-show="toolBarModels.${item.name}.visabled" :disabled="toolBarModels.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)"> <i-button v-show="toolBarModels.${item.name}.visabled" :disabled="toolBarModels.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<template v-else> <template v-else>
<template v-if="item1.type =='MENUITEM'"> <template v-if="item1.type =='MENUITEM'">
<el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id"> <el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id">
<template v-if="item1.icon && item.icon != ''"> <template v-if="item1.icon && item1.icon != ''">
<img :src="item1.icon" class='app-menu-icon' /> <img :src="item1.icon" class='app-menu-icon' />
</template> </template>
<template v-else-if="item1.iconcls && item1.iconcls != ''"> <template v-else-if="item1.iconcls && item1.iconcls != ''">
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<template v-else> <template v-else>
<template v-if="item0.type =='MENUITEM'"> <template v-if="item0.type =='MENUITEM'">
<el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id"> <el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id">
<template v-if="item0.icon && item.icon != ''"> <template v-if="item0.icon && item0.icon != ''">
<img :src="item0.icon" class='app-menu-icon' /> <img :src="item0.icon" class='app-menu-icon' />
</template> </template>
<template v-else-if="item0.iconcls && item0.iconcls != ''"> <template v-else-if="item0.iconcls && item0.iconcls != ''">
...@@ -512,7 +512,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code} ...@@ -512,7 +512,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
private dataProcess(items: any[]): void { private dataProcess(items: any[]): void {
items.forEach((_item: any) => { items.forEach((_item: any) => {
if (_item.expanded) { if (_item.expanded) {
this.defaultOpeneds.push(_item.id); this.defaultOpeneds.push(_item.name);
} }
if (_item.items && _item.items.length > 0) { if (_item.items && _item.items.length > 0) {
this.dataProcess(_item.items) this.dataProcess(_item.items)
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
height: calc(100% - 58px); height: calc(100% - 58px);
.ivu-divider{
background-color: #b3b3b3;
height: 2px;
}
> .el-menu { > .el-menu {
border-right: 0; border-right: 0;
.el-menu-item { .el-menu-item {
......
...@@ -2,24 +2,22 @@ ...@@ -2,24 +2,22 @@
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude> </#ibizinclude>
/*** BEGIN:potal菜单 ***/ /*** BEGIN:potal菜单 ***/
.porlet{ .app-app-menu{
>.app-app-menu{ >.ivu-row{
>.ivu-row{ .ivu-card{
.ivu-card{ .ivu-card-body{
.ivu-card-body{ >p{
>p{ >.app-menus{
>.app-menus{ display: flex;
display: flex; flex-wrap: wrap;
flex-wrap: wrap; >div{
>div{ width: 100%;
width: 100%; margin-right: 10px;
margin-right: 10px; .ivu-card-body{
.ivu-card-body{ >div{
>div{ display: flex;
display: flex; >span{
>span{ margin-right: 12px;
margin-right: 12px;
}
} }
} }
} }
...@@ -29,4 +27,4 @@ ...@@ -29,4 +27,4 @@
} }
} }
} }
} }
\ No newline at end of file
<#ibizinclude>
../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<template> <template>
${P.getPartCode(item,'FORM').code} ${P.getPartCode(item,'FORM').code}
</template> </template>
...@@ -483,7 +486,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -483,7 +486,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
<#-- END:是否应用实体视图 --> <#-- END:是否应用实体视图 -->
const view: any = { const view: any = {
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
title: '${dataview.getTitle()}', title: this.<@getViewLanguageTitle dataview />,
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
<#if formdetail.getParamViewParamJO()??> <#if formdetail.getParamViewParamJO()??>
......
<#-- 绘图X轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()??>'${item.getType()}'<#else>'category'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
\ No newline at end of file
<#-- 绘图Y轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()?? && item.getType() == 'numeric'>'value'<#else>'${item.getType()}'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
\ No newline at end of file
<#-- 绘图网格start -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 绘图网格end -->
\ No newline at end of file
<#-- 柱状图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'bar',
xAxisIndex:${item.getIndex()},
yAxisIndex:${item.getIndex()},
datasetIndex:${item.getIndex()},
encode: {
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
x: [<#if chartSeriesEncode.getX()??><#list chartSeriesEncode.getX() as xValue>'${xValue?lower_case}'<#if xValue_has_next>,</#if></#list></#if>],
y: [<#if chartSeriesEncode.getY()??><#list chartSeriesEncode.getY() as yValue>'${yValue?lower_case}'<#if yValue_has_next>,</#if></#list></#if>]
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 柱状图序列end -->
\ No newline at end of file
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'funnel',
datasetIndex:${item.getIndex()},
<#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if>
<#if item.getTop()?? && item.getTop() != 0>top:"${item.getTop()}",</#if>
<#if item.getBottom()?? && item.getBottom() != 0>bottom:"${item.getBottom()}",</#if>
<#if item.getRight()?? && item.getRight() != "">right:"${item.getRight()}",</#if>
<#if item.getWidth()?? && item.getWidth() != "">width:"${item.getWidth()}",</#if>
<#if item.getHeight()?? && item.getHeight() != "">height:"${item.getHeight()}",</#if>
<#if item.getMinValue()?? && item.getMinValue() != 0 >min:"${item.getMinValue()}",</#if>
<#if item.getMaxValue()?? && item.getMaxValue() != 0 >max:"${item.getMaxSize()}",</#if>
<#if item.getMinSize()?? && item.getMinSize() != "">minSize:"${item.getMinSize()}",</#if>
<#if item.getMaxSize()?? && item.getMaxSize() != "">maxSize: "${item.getMaxSize()}",</#if>
<#if item.getFunnelAlign()?? && item.getFunnelAlign() != "">funnelAlign:"${item.getFunnelAlign()}",</#if></#compress>
seriesLayoutBy:"${item.getSeriesLayoutBy()}",
encode:{
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
itemName:"<#if chartSeriesEncode.getCategory()??>${chartSeriesEncode.getCategory()?lower_case}<#else>${item.getCatalogField()?lower_case}</#if>",
value:"<#if chartSeriesEncode.getValue()??>${chartSeriesEncode.getValue()?lower_case}<#else>${item.getValueField()?lower_case}</#if>"
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'line',
xAxisIndex:${item.getIndex()},
yAxisIndex:${item.getIndex()},
datasetIndex:${item.getIndex()},
encode: {
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
x: [<#if chartSeriesEncode.getX()??><#list chartSeriesEncode.getX() as xValue>'${xValue?lower_case}'<#if xValue_has_next>,</#if></#list></#if>],
y: [<#if chartSeriesEncode.getY()??><#list chartSeriesEncode.getY() as yValue>'${yValue?lower_case}'<#if yValue_has_next>,</#if></#list></#if>]
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
<#-- 序列模型start -->
<#if item.getEChartsType()??>
<#if item.getEChartsType() == "line">
new ChartLineSeries({
name:'${item.name?lower_case}',
<#if item.getIdField()??>seriesIdField:"${item.getIdField()?lower_case}",</#if>
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
data:[],
seriesMap:{},
<#if item.getPSChartDataSet()??>
<#assign chartDataSet = item.getPSChartDataSet()/>
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}"}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
</#if>
ecxObject:{
<#-- 序列label start -->
<#if item.containsUserParam("ECX.label")>
label:${item.getUserParam("ECX.label")},
<#else>
label:{
show: true,
position: 'inside'
},
</#if>
<#-- 序列label end -->
<#-- 序列labelLine start -->
<#if item.containsUserParam("ECX.labelLine")>
labelLine:${item.getUserParam("ECX.labelLine")},
<#else>
labelLine:{
length: 10,
lineStyle: {
width: 1,
type: 'solid'
}
},
</#if>
<#-- 序列labelLine end -->
<#-- 序列itemStyle start -->
<#if item.containsUserParam("ECX.itemStyle")>
itemStyle:${item.getUserParam("ECX.itemStyle")},
<#else>
itemStyle:{
borderColor: '#fff',
borderWidth: 1
},
</#if>
<#-- 序列itemStyle end -->
<#-- 序列emphasis start -->
<#if item.containsUserParam("ECX.emphasis")>
emphasis:${item.getUserParam("ECX.emphasis")},
<#else>
emphasis:{
label: {
fontSize: 20
}
}
</#if>
<#-- 序列emphasis end -->
},
ecObject:{
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)},
</#if>
</#list>
</#if>
},
seriesTemp:{
type:'line',
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
seriesLayoutBy:"${item.getSeriesLayoutBy()}",
baseOption:{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
})
<#elseif item.getEChartsType() == "funnel">
new ChartFunnelSeries({
name:'${item.name?lower_case}',
<#if item.getIdField()??>seriesIdField:"${item.getIdField()?lower_case}",</#if>
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
data:[],
seriesMap:{},
<#if item.getPSChartDataSet()??>
<#assign chartDataSet = item.getPSChartDataSet()/>
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}"}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
</#if>
ecxObject:{
<#-- 序列label start -->
<#if item.containsUserParam("ECX.label")>
label:${item.getUserParam("ECX.label")},
<#else>
label:{
show: true,
position: 'inside'
},
</#if>
<#-- 序列label end -->
<#-- 序列labelLine start -->
<#if item.containsUserParam("ECX.labelLine")>
labelLine:${item.getUserParam("ECX.labelLine")},
<#else>
labelLine:{
length: 10,
lineStyle: {
width: 1,
type: 'solid'
}
},
</#if>
<#-- 序列labelLine end -->
<#-- 序列itemStyle start -->
<#if item.containsUserParam("ECX.itemStyle")>
itemStyle:${item.getUserParam("ECX.itemStyle")},
<#else>
itemStyle:{
borderColor: '#fff',
borderWidth: 1
},
</#if>
<#-- 序列itemStyle end -->
<#-- 序列emphasis start -->
<#if item.containsUserParam("ECX.emphasis")>
emphasis:${item.getUserParam("ECX.emphasis")},
<#else>
emphasis:{
label: {
fontSize: 20
}
}
</#if>
<#-- 序列emphasis end -->
},
ecObject:{
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)},
</#if>
</#list>
</#if>
},
seriesTemp:{
type:'funnel',
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
baseOption:{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
seriesLayoutBy:"${item.getSeriesLayoutBy()}"
})
<#elseif item.getEChartsType() == "pie">
new ChartPieSeries({
name:'${item.name?lower_case}',
<#if item.getIdField()??>seriesIdField:"${item.getIdField()?lower_case}",</#if>
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
data:[],
seriesMap:{},
<#if item.getPSChartDataSet()??>
<#assign chartDataSet = item.getPSChartDataSet()/>
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}"}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
</#if>
ecxObject:{
<#-- 序列label start -->
<#if item.containsUserParam("ECX.label")>
label:${item.getUserParam("ECX.label")},
<#else>
label:{
show: true,
position: 'inside'
},
</#if>
<#-- 序列label end -->
<#-- 序列labelLine start -->
<#if item.containsUserParam("ECX.labelLine")>
labelLine:${item.getUserParam("ECX.labelLine")},
<#else>
labelLine:{
length: 10,
lineStyle: {
width: 1,
type: 'solid'
}
},
</#if>
<#-- 序列labelLine end -->
<#-- 序列itemStyle start -->
<#if item.containsUserParam("ECX.itemStyle")>
itemStyle:${item.getUserParam("ECX.itemStyle")},
<#else>
itemStyle:{
borderColor: '#fff',
borderWidth: 1
},
</#if>
<#-- 序列itemStyle end -->
<#-- 序列emphasis start -->
<#if item.containsUserParam("ECX.emphasis")>
emphasis:${item.getUserParam("ECX.emphasis")},
<#else>
emphasis:{
label: {
fontSize: 20
}
}
</#if>
<#-- 序列emphasis end -->
},
ecObject:{
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)},
</#if>
</#list>
</#if>
},
seriesTemp:{
type:'pie',
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
baseOption:{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
seriesLayoutBy:"${item.getSeriesLayoutBy()}"
})
<#elseif item.getEChartsType() == "bar">
new ChartBarSeries({
name:'${item.name?lower_case}',
<#if item.getIdField()??>seriesIdField:"${item.getIdField()?lower_case}",</#if>
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
data:[],
seriesMap:{},
<#if item.getPSChartDataSet()??>
<#assign chartDataSet = item.getPSChartDataSet()/>
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}"}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
</#if>
ecxObject:{
<#-- 序列label start -->
<#if item.containsUserParam("ECX.label")>
label:${item.getUserParam("ECX.label")},
<#else>
label:{
show: true,
position: 'inside'
},
</#if>
<#-- 序列label end -->
<#-- 序列labelLine start -->
<#if item.containsUserParam("ECX.labelLine")>
labelLine:${item.getUserParam("ECX.labelLine")},
<#else>
labelLine:{
length: 10,
lineStyle: {
width: 1,
type: 'solid'
}
},
</#if>
<#-- 序列labelLine end -->
<#-- 序列itemStyle start -->
<#if item.containsUserParam("ECX.itemStyle")>
itemStyle:${item.getUserParam("ECX.itemStyle")},
<#else>
itemStyle:{
borderColor: '#fff',
borderWidth: 1
},
</#if>
<#-- 序列itemStyle end -->
<#-- 序列emphasis start -->
<#if item.containsUserParam("ECX.emphasis")>
emphasis:${item.getUserParam("ECX.emphasis")},
<#else>
emphasis:{
label: {
fontSize: 20
}
}
</#if>
<#-- 序列emphasis end -->
},
ecObject:{
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)},
</#if>
</#list>
</#if>
},
seriesTemp:{
type:'funnel',
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
baseOption:{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
seriesLayoutBy:"${item.getSeriesLayoutBy()}"
})
<#else>
new ChartLineSeries({name:'${item.name?lower_case}',categorField:'${item.getCatalogField()?lower_case}',<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}'},</#if>valueField:'${item.getValueField()?lower_case}',data:[]}),
</#if>
</#if>
<#-- 序列模型end -->
\ No newline at end of file
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'pie',
datasetIndex:${item.getIndex()},
<#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if>
<#if item.getTop()?? && item.getTop() != 0>top:"${item.getTop()}",</#if>
<#if item.getBottom()?? && item.getBottom() != 0>bottom:"${item.getBottom()}",</#if>
<#if item.getRight()?? && item.getRight() != "">right:"${item.getRight()}",</#if>
<#if item.getWidth()?? && item.getWidth() != "">width:"${item.getWidth()}",</#if>
<#if item.getHeight()?? && item.getHeight() != "">height:"${item.getHeight()}",</#if></#compress>
seriesLayoutBy:"${item.getSeriesLayoutBy()}",
encode:{
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
itemName:"<#if chartSeriesEncode.getCategory()??>${chartSeriesEncode.getCategory()?lower_case}<#else>${item.getCatalogField()?lower_case}</#if>",
value:"<#if chartSeriesEncode.getValue()??>${chartSeriesEncode.getValue()?lower_case}<#else>${item.getValueField()?lower_case}</#if>"
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
<template>
<div class="app-data-chart <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??><#t>
${ctrl.render.code}
<#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>
</#if>
</div>
</template>
<#assign import_block>
import echarts from 'echarts';
import CodeListService from "@service/app/codelist-service";
import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,ChartBarSeries} from '@/model/chart-detail';
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getData(): any {
return null;
}
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: true }) protected showBusyIndicator!: boolean;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() protected fetchAction!: string;
/**
* 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(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.load(data);
}
});
}
}
/**
* vue 生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
<#if destroyed_block??>
${destroyed_block}
</#if>
}
/**
* 图表div绑定的id
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public chartId:string = this.$util.createUUID();
/**
* echarts图表对象
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public myChart:any;
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 序列模型
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public seriesModel:any = {
<#if ctrl.getPSDEChartSerieses()??>
<#list ctrl.getPSDEChartSerieses() as chartSeries>
${chartSeries.getName()?lower_case}:${P.getPartCode(chartSeries, 'SERIES_MODEL').code}<#if chartSeries_has_next>,</#if>
</#list>
</#if>
};
/**
* 图表自定义参数集合
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public chartUserParams:any ={
<#if ctrl.getUserParamNames()??>
<#list ctrl.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${ctrl.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
};
/**
* 图表基础动态模型
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public chartBaseOPtion:any = {<#if ctrl.getBaseOptionJOString()??>${ctrl.getBaseOptionJOString()}</#if>};
/**
* 初始化图表所需参数
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public chartOption:any = {
<#-- 标题start -->
<#if ctrl.getPSDEChartTitle()??>
<#assign title= ctrl.getPSDEChartTitle() />
title:{
show:<#if title.isShowTitle()>true<#else>false</#if> ,
text:'<#if title.getTitle()??>${title.getTitle()}</#if>',
subtext:'<#if title.getSubTitle()??>${title.getSubTitle()}</#if>'
},
</#if>
<#-- 标题end -->
<#-- 图例start -->
<#if ctrl.getPSDEChartLegend()??>
<#assign legend= ctrl.getPSDEChartLegend() />
legend:{
show:<#if legend.isShowLegend()>true<#else>false</#if>
},
</#if>
<#-- 图例end -->
<#-- 绘图网格start -->
<#if ctrl.getPSChartGrids()??>
grid:[
<@ibizindent blank=8>
<#list ctrl.getPSChartGrids() as chartGrid>
${P.getPartCode(chartGrid).code}<#if chartGrid_has_next>,</#if>
</#list>
</@ibizindent>
],
</#if>
<#-- 绘图网格end -->
<#-- X轴start -->
<#if ctrl.getPSChartXAxises()??>
xAxis: [
<@ibizindent blank=8>
<#list ctrl.getPSChartXAxises() as chartXAxise>
${P.getPartCode(chartXAxise).code}<#if chartXAxise_has_next>,</#if>
</#list>
</@ibizindent>
],
</#if>
<#-- X轴end -->
<#-- Y轴start -->
<#if ctrl.getPSChartYAxises()??>
yAxis:[
<@ibizindent blank=8>
<#list ctrl.getPSChartYAxises() as chartYAxise>
${P.getPartCode(chartYAxise).code}<#if chartYAxise_has_next>,</#if>
</#list>
</@ibizindent>
],
</#if>
<#-- Y轴end -->
<#-- 提示框组件start -->
tooltip:{
show:true
},
<#-- 提示框组件end -->
<#-- 数据集start -->
dataset:[],
<#-- 数据集end -->
<#-- 序列start -->
series:[
<@ibizindent blank=8>
<#list ctrl.getPSDEChartSerieses() as chartSeriese>
${P.getPartCode(chartSeriese).code}<#if chartSeriese_has_next>,</#if>
</#list>
</@ibizindent>
]
<#-- 序列end -->
};
/**
* 刷新
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
protected refresh(opt: any = {}) {
this.load(opt);
}
/**
* 获取图表数据
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public load(opt?:any) {
let _this = this;
const arg: any = { ...opt };
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams});
this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg,this.showBusyIndicator).then((res) => {
if (res) {
this.transformToBasicChartSetData(res.data,() =>{_this.drawCharts()});
}
}).catch((error) => {
console.error(error);
});
}
/**
* 绘制图表
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public drawCharts(){
if(!this.myChart){
let element:any = document.getElementById(this.chartId);
this.myChart = echarts.init(element);
}
this.handleChartOPtion();
console.log(this.chartOption);
this.myChart.setOption(this.chartOption);
this.myChart.resize();
}
/**
* 处理图表参数
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public handleChartOPtion(){
if(Object.keys(this.seriesModel).length > 0){
let tempDataSourceMap:Map<string,any> = new Map();
for(let i=0;i<Object.keys(this.seriesModel).length;i++){
Object.values(this.seriesModel).forEach((seriesvalue:any) =>{
if(seriesvalue.seriesIndex === i){
tempDataSourceMap.set(seriesvalue.name,seriesvalue.data);
}
})
}
if(tempDataSourceMap.size > 0){
tempDataSourceMap.forEach((item:any) =>{
this.chartOption.dataset.push({'source':item});
})
}
Object.keys(this.seriesModel).forEach((seriesName:string) =>{
if(this.chartOption && this.chartOption.series.length > 0){
this.chartOption.series.forEach((item:any) =>{
if(this.seriesModel[seriesName].ecxObject){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecxObject);
}
if(this.seriesModel[seriesName].baseOption && Object.keys(this.seriesModel[seriesName].baseOption).length > 0){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].baseOption);
}
if(this.seriesModel[seriesName].ecObject){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecObject);
}
})
}
//设置多序列
let tempSeries:any = this.seriesModel[seriesName];
if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0){
const returnIndex:number = this.chartOption.series.findIndex((item:any) =>{
return Object.is(item.id,seriesName);
})
this.chartOption.series.splice(returnIndex,1);
let tempSeriesArray:Array<any> = [];
tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{
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>
this.chartOption.series.push(tempSeriesTemp);
})
}
})
}
if(Object.keys(this.chartBaseOPtion).length > 0){
Object.assign(this.chartOption,this.chartBaseOPtion);
}
if(Object.keys(this.chartUserParams).length >0){
Object.assign(this.chartOption,this.chartUserParams);
}
}
/**
* 实体数据集转化为图表数据集
*
* @param {*} data 实体数据集
* @param {Function} callback 回调
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public async transformToBasicChartSetData(data:any,callback:Function){
if(!data || !Array.isArray(data) || data.length === 0){
return;
}
//获取代码表值
let allCodeList:any = await this.getChartAllCodeList();
if(Object.values(this.seriesModel).length > 0){
Object.values(this.seriesModel).forEach((singleSeries:any,index:number) =>{
let tempChartSetData:Array<any> = [];
let tempSeriesValues:Map<string,any> = new Map();
data.forEach((item:any) =>{
let tempChartSetDataItem:any = {};
// 序列属性不存在
if(!singleSeries.seriesIdField){
Object.assign(tempChartSetDataItem,{name:singleSeries.name});
if(singleSeries.dataSetFields && singleSeries.dataSetFields.length >0){
singleSeries.dataSetFields.forEach((singleDataSetField:any) =>{
this.handleSingleDataSetField(item,singleDataSetField,allCodeList,tempChartSetDataItem);
})
}
}else{
// 序列属性存在时
let tempSeriesValueItem = tempSeriesValues.get(item[singleSeries.seriesIdField]);
if(!tempSeriesValueItem){
tempSeriesValues.set(item[singleSeries.seriesIdField],item[singleSeries.seriesNameField]);
}
Object.assign(tempChartSetDataItem,{name:item[singleSeries.seriesIdField]});
if(singleSeries.dataSetFields && singleSeries.dataSetFields.length >0){
singleSeries.dataSetFields.forEach((singleDataSetField:any) =>{
this.handleSingleDataSetField(item,singleDataSetField,allCodeList,tempChartSetDataItem);
})
}
}
tempChartSetData.push(tempChartSetDataItem);
})
// 补全代码表
this.completeCodeList(tempChartSetData,singleSeries,allCodeList);
singleSeries.seriesValues = [...tempSeriesValues.keys()];
let tempSeriesMapObj:any = {};
tempSeriesValues.forEach((value:any,key:any) =>{
tempSeriesMapObj[key] = value;
})
singleSeries.seriesMap = tempSeriesMapObj;
let callbackFunction:any = (index === (Object.values(this.seriesModel).length - 1))?callback:null;
this.transformToChartSeriesDataSet(tempChartSetData,singleSeries,callbackFunction);
})
}
}
/**
* 构建图表序列数据集合
*
* @param {Array<any>} data 传入数据
* @param {Array<any>} item 单个序列
* @param {Array<any>} callback 回调
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public transformToChartSeriesDataSet(data:any,item:any,callback:Function):any{
if(item.seriesIdField){
// 多序列
let groupField = item.dataSetFields.filter((datasetField:any) =>{
return datasetField.name === item.categorField;
});
let tempGroupField:Array<any> = groupField.map((item:any) =>{
return item.name;
});
let seriesField = item.dataSetFields.filter((datasetField:any) =>{
return datasetField.name === item.seriesIdField;
});
let tempSeriesField:Array<any> = seriesField.map((item:any) =>{
return item.name;
});
let valueField = item.dataSetFields.filter((datasetField:any) =>{
return datasetField.name === item.valueField;
});
let tempValueField:Array<any> = valueField.map((item:any) =>{
return item.name;
});
item.data = this.groupAndAdd(tempGroupField,tempSeriesField,tempValueField,data,item);
}else{
//单序列
let groupField = item.dataSetFields.filter((datasetField:any) =>{
return datasetField.name === item.categorField;
});
let tempGroupField:Array<any> = groupField.map((item:any) =>{
return item.name;
})
let valueField = item.dataSetFields.filter((datasetField:any) =>{
return datasetField.name === item.valueField;
});
let tempValueField:Array<any> = valueField.map((item:any) =>{
return item.name;
})
item.data = this.groupAndAdd(tempGroupField,[],tempValueField,data,item);
}
if(callback && callback instanceof Function){
callback();
}
}
/**
* 分组和求和
* @param {Array<any>} groupField 分组属性
* @param {Array<any>} groupField 值属性
* @param {Array<any>} data 传入数据
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public groupAndAdd(groupField:Array<any>,seriesField:Array<any>,valueField:Array<any>,data:any,item:any){
let tempMap:Map<string,any> = new Map();
data.forEach((item:any) =>{
let tempGroupField:string = groupField[0];
let tempMapItem:any = tempMap.get(item[tempGroupField]);
if(tempMapItem){
tempMapItem.push(item);
tempMap.set(item[tempGroupField],tempMapItem);
}else{
tempMap.set(item[tempGroupField],[item]);
}
})
// 处理多序列
if(seriesField.length > 0 && tempMap.size > 0){
let tempSeriesField:string = seriesField[0];
tempMap.forEach((item:any,key:string) =>{
let tempItemMap:Map<string,any> = new Map();
item.forEach((singleItem:any)=>{
let seriesValueArray:any = tempItemMap.get(singleItem[tempSeriesField]);
if(seriesValueArray){
seriesValueArray.push(singleItem);
tempItemMap.set(singleItem[tempSeriesField],seriesValueArray);
}else{
tempItemMap.set(singleItem[tempSeriesField],[singleItem]);
}
})
tempMap.set(key,tempItemMap);
});
}
let returnArray:Array<any> = [];
if(seriesField.length == 0){
//单序列
tempMap.forEach((tempItem:any) =>{
if(tempItem.length >0){
let curObject:any = {};
let valueResult:number = 0;
let categorResult:any;
tempItem.forEach((singleItem:any) =>{
categorResult = singleItem[groupField[0]];
valueResult += singleItem[valueField[0]];
})
Object.defineProperty(curObject, groupField[0], {
value: categorResult,
writable : true,
enumerable : true,
configurable : true
});
Object.defineProperty(curObject, valueField[0], {
value: valueResult,
writable : true,
enumerable : true,
configurable : true
});
returnArray.push(curObject);
}
})
}else{
// 多序列
let seriesValuesArray:Array<any> = item.seriesValues;
tempMap.forEach((groupItem:any,groupKey:string) =>{
//求和
let curObject:any = {};
Object.defineProperty(curObject, groupField[0], {
value: groupKey,
writable : true,
enumerable : true,
configurable : true
});
// valueField.forEach((item:any) =>{
// Object.defineProperty(curObject, item, {
// value: 0,
// writable : true,
// enumerable : true,
// configurable : true
// });
// });
seriesValuesArray.forEach((seriesValueItem:any) =>{
Object.defineProperty(curObject, seriesValueItem, {
value: 0,
writable : true,
enumerable : true,
configurable : true
});
});
groupItem.forEach((seriesItem:any,seriesKey:string) =>{
let seriesNum:number = 0;
seriesItem.forEach((dataItem:any) =>{
// valueField.forEach((item:any) =>{
// curObject[item] += dataItem[item];
// });
seriesNum += dataItem[valueField[0]];
})
curObject[seriesKey] = seriesNum;
})
returnArray.push(curObject);
})
}
console.log(JSON.stringify(returnArray));
return returnArray;
}
/**
* 补全代码表
*
* @param {Array<any>} data 传入数据
* @param {Array<any>} item 单个序列
* @param {Array<any>} allCodeList 所有的代码表
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public completeCodeList(data:any,item:any,allCodeList:any){
let groupField = item.dataSetFields.find((datasetField:any) =>{
return datasetField.name === item.categorField;
});
let valueField = item.dataSetFields.find((datasetField:any) =>{
return datasetField.name === item.valueField;
});
if(!groupField.codelist){
return;
}
let curCodeList:Map<number,any> = allCodeList.get(groupField.codelist.tag);
// 对分类实现分组
let tempGrounpData:Map<string,any> = new Map();
data.forEach((item:any) =>{
if(Object.is(groupField.groupMode,'CODELIST')){
let tempGrounpItem:any = tempGrounpData.get(item[groupField.name+'_srfvalue']);
if(!tempGrounpItem){
tempGrounpData.set(item[groupField.name+'_srfvalue'],item);
}
}else{
let tempGrounpItem:any = tempGrounpData.get(item[groupField.name]);
if(!tempGrounpItem){
tempGrounpData.set(item[groupField.name],item);
}
}
})
if(curCodeList.size !== tempGrounpData.size){
let copyTemp:any = JSON.parse(JSON.stringify(data[0]));
curCodeList.forEach((text:any,value:any) =>{
if(!tempGrounpData.get(value)){
let curObj:any = {};
if(Object.is(groupField.groupMode,'CODELIST')){
Object.defineProperty(curObj, groupField.name+'_srfvalue', {
value: value,
writable : true,
enumerable : true,
configurable : true
});
Object.defineProperty(curObj, groupField.name, {
value: text,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(curObj, groupField.name, {
value: value,
writable : true,
enumerable : true,
configurable : true
});
}
Object.defineProperty(curObj, valueField.name, {
value: 0,
writable : true,
enumerable : true,
configurable : true
});
Object.assign(copyTemp,curObj);
data.push(copyTemp);
}
})
}
}
/**
* 处理单个属性
*
* @param {*} input 输入值
* @param {*} field 属性值
* @param {*} allCodeList 所有代码表
* @param {*} result 结果值
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public handleSingleDataSetField(input:any,field:any,allCodeList:any,result:any){
let tempFieldObj:any = {};
//存在代码表的情况
if(field.codelist && Object.is(field.groupMode,"CODELIST")){
//获取代码表
let curCodeList:Map<number,any> = allCodeList.get(field.codelist.tag);
Object.defineProperty(tempFieldObj, field.name, {
value: curCodeList.get(input[field.name]),
writable : true,
enumerable : true,
configurable : true
});
Object.defineProperty(tempFieldObj, field.name+'_srfvalue', {
value: input[field.name],
writable : true,
enumerable : true,
configurable : true
});
}else{
// 不存在代码表的情况
Object.defineProperty(tempFieldObj, field.name, {
value: input[field.name],
writable : true,
enumerable : true,
configurable : true
});
}
Object.assign(result,tempFieldObj);
}
/**
* 获取图表所需代码表
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public async getChartAllCodeList(){
let codeListMap:Map<string,any> = new Map();
if(Object.values(this.seriesModel).length >0){
await Object.values(this.seriesModel).forEach(async (singleSeries:any) =>{
if(singleSeries.dataSetFields && singleSeries.dataSetFields.length >0){
await singleSeries.dataSetFields.forEach(async (singleDataSetField:any) =>{
if(singleDataSetField.codelist){
if(!codeListMap.get(singleDataSetField.codelist.tag)){
let tempCodeListMap:Map<number,any> = new Map();
let res:any = await this.getCodeList(singleDataSetField.codelist);
if(res && res.length >0){
res.forEach((codeListItem:any) =>{
tempCodeListMap.set(Number(codeListItem.value),codeListItem.text);
})
}
codeListMap.set(singleDataSetField.codelist.tag,tempCodeListMap);
}
}
})
}
})
}
return codeListMap;
}
/**
* 获取代码表
*
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public getCodeList(codeListObject:any):Promise<any>{
return new Promise((resolve:any,reject:any) =>{
if(codeListObject.tag && Object.is(codeListObject.type,"STATIC")){
const codelist = this.$store.getters.getCodeList(codeListObject.tag);
if (codelist) {
resolve([...JSON.parse(JSON.stringify(codelist.items))]);
} else {
console.log(`<#noparse>----${codeListObject.tag}----代码表不存在</#noparse>`);
}
}else if(codeListObject.tag && Object.is(codeListObject.type,"DYNAMIC")){
this.codeListService.getItems(codeListObject.tag).then((res:any) => {
resolve(res);
}).catch((error:any) => {
console.log(`<#noparse>----${codeListObject.tag}----代码表不存在</#noparse>`);
});
}
})
}
<#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>
fetchAction="<#if ctrl.getFetchPSControlAction()?? && ctrl.getFetchPSControlAction().getPSAppDEMethod()??>${ctrl.getFetchPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
.app-data-chart {
width: 100%;
height: 100%;
}
\ 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 [
{
name:'query',
prop:'query'
},
]
}
<#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) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=CHART#NEW
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<#else><#t> <#else><#t>
<row v-if="items.length > 0" :gutter="20" type="flex" justify="start"> <row v-if="items.length > 0" :gutter="20" type="flex" justify="start">
<a v-for="(item,index) in items" :key="index" :href = "item.starturl"> <a v-for="(item,index) in items" :key="index" :href = "item.starturl">
<i-col <#if ctrl.getCardColLG() gt 0> lg={${ctrl.getCardColLG()?c}}</#if><#if ctrl.getCardColMD() gt 0> md={${ctrl.getCardColMD()?c}}</#if><#if ctrl.getCardColSM() gt 0> sm={${ctrl.getCardColSM()?c}}</#if><#if ctrl.getCardColXS() gt 0> xs={${ctrl.getCardColXS()?c}}</#if> style="<#if ctrl.getCardHeight() gt 0>height: ${ctrl.getCardHeight()?c}<#else>min-height: 170</#if>px;<#if ctrl.getCardWidth() gt 0> width: ${ctrl.getCardWidth()?c}px;</#if>margin-bottom: 10px;"> <i-col <#if ctrl.getCardColLG() gt 0> :lg="${ctrl.getCardColLG()?c}"</#if><#if ctrl.getCardColMD() gt 0> :md="${ctrl.getCardColMD()?c}"</#if><#if ctrl.getCardColSM() gt 0> :sm="${ctrl.getCardColSM()?c}"</#if><#if ctrl.getCardColXS() gt 0> :xs="${ctrl.getCardColXS()?c}"</#if> style="<#if ctrl.getCardHeight() gt 0>height: ${ctrl.getCardHeight()?c}<#else>min-height: 170</#if>px;<#if ctrl.getCardWidth() gt 0> width: ${ctrl.getCardWidth()?c}px;</#if>margin-bottom: 10px;">
<div :class="[ item.isselected === true ? 'isselected' : false, 'single-card-data' ]" @click="handleClick(item)" @dblclick="handleDblClick(item)"> <div :class="[ item.isselected === true ? 'isselected' : false, 'single-card-data' ]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??> <#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()> <#assign panel = ctrl.getItemPSLayoutPanel()>
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<split class="app-calendar-exp-bar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" v-model="split" @on-move-end="onSplitChange"> <split id="${ctrl.getCodeName()?lower_case}" class="app-calendar-exp-bar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" v-model="split" mode="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>" @on-move-end="onSplitChange">
<div slot='left'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='calendar-exp-bar-header'> <div class='calendar-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>列表导航栏<#else>${ctrl.getTitle()}</#if></div> <div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>列表导航栏<#else>${ctrl.getTitle()}</#if></div>
...@@ -38,11 +38,10 @@ ...@@ -38,11 +38,10 @@
</#if> </#if>
</div> </div>
</div> </div>
<div slot='right'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>'>
<component <component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')" v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname" :is="selection.view.viewname"
:key="$util.createUUID()"
class="viewcontainer2" class="viewcontainer2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)"> :viewdata="JSON.stringify(selection.data)">
...@@ -61,7 +60,7 @@ ...@@ -61,7 +60,7 @@
* 视图唯一标识 * 视图唯一标识
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected viewUID!:string; @Prop() protected viewUID!:string;
...@@ -70,16 +69,41 @@ ...@@ -70,16 +69,41 @@
* *
* @protected * @protected
* @type {(boolean)} * @type {(boolean)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected isSingleSelect:boolean = true; protected isSingleSelect:boolean = true;
/**
* 呈现模式,可选值:horizontal或者vertical
*
* @protected
* @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected showMode:string ="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>";
/**
* 控件宽度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()}<#else>0</#if>;
/**
* 控件高度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()}<#else>0</#if>;
/** /**
* 搜素值 * 搜素值
* *
* @protected * @protected
* @type {(string)} * @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected searchText:string = ""; protected searchText:string = "";
...@@ -87,7 +111,7 @@ ...@@ -87,7 +111,7 @@
* 分割宽度 * 分割宽度
* *
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected split: number = 0.5; protected split: number = 0.5;
...@@ -98,7 +122,7 @@ ...@@ -98,7 +122,7 @@
* 导航视图名称 * 导航视图名称
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navViewName: any = { protected navViewName: any = {
<#if xDataControl.getPSSysCalendarItems()??> <#if xDataControl.getPSSysCalendarItems()??>
...@@ -112,7 +136,7 @@ ...@@ -112,7 +136,7 @@
* 导航视图参数 * 导航视图参数
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navViewParam: any = { protected navViewParam: any = {
<#if xDataControl.getPSSysCalendarItems()??> <#if xDataControl.getPSSysCalendarItems()??>
...@@ -126,7 +150,7 @@ ...@@ -126,7 +150,7 @@
* 导航过滤项 * 导航过滤项
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
</#if> </#if>
protected navFilter: any = { protected navFilter: any = {
...@@ -141,7 +165,7 @@ ...@@ -141,7 +165,7 @@
* 显示处理提示 * 显示处理提示
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop({ default: true }) protected showBusyIndicator!: boolean; @Prop({ default: true }) protected showBusyIndicator!: boolean;
...@@ -159,7 +183,7 @@ ...@@ -159,7 +183,7 @@
* 获取多项数据 * 获取多项数据
* *
* @returns {any[]} * @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getDatas(): any[] { public getDatas(): any[] {
return []; return [];
...@@ -169,7 +193,7 @@ ...@@ -169,7 +193,7 @@
* 获取单项树 * 获取单项树
* *
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getData(): any { public getData(): any {
return null; return null;
...@@ -179,16 +203,27 @@ ...@@ -179,16 +203,27 @@
* 选中数据 * 选中数据
* *
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected selection: any = {}; protected selection: any = {};
/** /**
* split值变化事件 * split值变化事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public onSplitChange() { public onSplitChange() {
<#if ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl() />
if(this.$refs.${xDataControl.getName()}){
const calendarContainer:any = this.$refs.${xDataControl.getName()};
if(calendarContainer.$refs.calendar){
const appCalendar: any = calendarContainer.$refs.calendar;
const api = appCalendar.getApi();
api.updateSize();
}
}
</#if>
if(this.split){ if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split}); this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
} }
...@@ -197,7 +232,7 @@ ...@@ -197,7 +232,7 @@
/** /**
* Vue声明周期(组件初始化完毕) * Vue声明周期(组件初始化完毕)
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public created() { public created() {
this.afterCreated(); this.afterCreated();
...@@ -206,7 +241,7 @@ ...@@ -206,7 +241,7 @@
/** /**
* 执行created后的逻辑 * 执行created后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterCreated(){ public afterCreated(){
if (this.viewState) { if (this.viewState) {
...@@ -220,15 +255,45 @@ ...@@ -220,15 +255,45 @@
</#if> </#if>
}); });
} }
}
/**
* Vue声明周期(组件渲染完毕)
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterMounted(){
if(this.$store.getters.getViewSplit(this.viewUID)){ if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID); this.split = this.$store.getters.getViewSplit(this.viewUID);
} }else{
let containerWidth:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetWidth;
let containerHeight:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetHeight;
if(Object.is(this.showMode,'horizontal')){
if(this.ctrlWidth){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
} }
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected destroyed() { protected destroyed() {
this.afterDestroy(); this.afterDestroy();
...@@ -237,7 +302,7 @@ ...@@ -237,7 +302,7 @@
/** /**
* 执行destroyed后的逻辑 * 执行destroyed后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected afterDestroy() { protected afterDestroy() {
if (this.viewStateEvent) { if (this.viewStateEvent) {
...@@ -251,7 +316,7 @@ ...@@ -251,7 +316,7 @@
/** /**
* ${ctrl.name}的选中数据事件 * ${ctrl.name}的选中数据事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void { protected ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {}; let data:any = {};
...@@ -266,6 +331,7 @@ ...@@ -266,6 +331,7 @@
<#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(data,{ ${_appde.getCodeName()?lower_case} : arg.${_appde.getCodeName()?lower_case}});
Object.assign(data,{srfparentdename:'${_appde.getCodeName()}',srfparentkey:arg['${_appde.getCodeName()?lower_case}']});
break; break;
</#if> </#if>
</#list> </#list>
...@@ -277,12 +343,13 @@ ...@@ -277,12 +343,13 @@
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] }, data:data });
this.$emit('selectionchange',args); this.$emit('selectionchange',args);
this.$forceUpdate();
} }
/** /**
* ${ctrl.name}的load完成事件 * ${ctrl.name}的load完成事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected ${ctrl.name}_load(args:any, tag?: string, $event2?: any){ protected ${ctrl.name}_load(args:any, tag?: string, $event2?: any){
this.$emit('load',args); this.$emit('load',args);
...@@ -291,7 +358,7 @@ ...@@ -291,7 +358,7 @@
/** /**
* 执行搜索 * 执行搜索
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onSearch($event:any) { protected onSearch($event:any) {
<#if ctrl.getXDataPSControl()??> <#if ctrl.getXDataPSControl()??>
......
...@@ -67,6 +67,69 @@ ...@@ -67,6 +67,69 @@
padding-right: 10px; padding-right: 10px;
} }
} }
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
.calendar-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
>div {
font-size: 18px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: space-between;
align-items: center;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
}
}
.calendar-exp-bar-content {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
margin-bottom: 10px;
}
.calendar-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
}
}
} }
<#ibizinclude> <#ibizinclude>
......
<#ibizinclude>
../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<template> <template>
<div class='calendar'> <div :class='calendarClass'>
<#if ctrl.getCalendarStyle?? && ctrl.getCalendarStyle() == 'TIMELINE'> <#if ctrl.getCalendarStyle?? && ctrl.getCalendarStyle() == 'TIMELINE'>
<el-timeline> <el-timeline>
<el-timeline-item <el-timeline-item
...@@ -17,7 +20,7 @@ ...@@ -17,7 +20,7 @@
<#else> <#else>
<FullCalendar <FullCalendar
ref="calendar" ref="calendar"
locale="zh-cn" :locale="$i18n.locale"
height="parent" height="parent"
:firstDay="1" :firstDay="1"
:eventLimit="true" :eventLimit="true"
...@@ -73,6 +76,24 @@ FullCalendar, ...@@ -73,6 +76,24 @@ FullCalendar,
*/ */
@Prop() protected loadAction!: string; @Prop() protected loadAction!: string;
/**
* 日历部件样式名
*
* @protected
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected calendarClass: string = "calendar";
/**
* 选中事件element元素
*
* @protected
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected selectedEventElement:any;
/** /**
* 引用插件集合 * 引用插件集合
* *
...@@ -123,7 +144,7 @@ FullCalendar, ...@@ -123,7 +144,7 @@ FullCalendar,
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected events: any[] = []; protected events: any[] = [];
<#--
/** /**
* 日历样式类型 * 日历样式类型
* *
...@@ -131,7 +152,7 @@ FullCalendar, ...@@ -131,7 +152,7 @@ FullCalendar,
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected calendarType: string = "${ctrl.getCalendarStyle()}"; --> protected calendarType: string = "${ctrl.getCalendarStyle()}";
/** /**
* 搜索获取日程事件 * 搜索获取日程事件
...@@ -155,19 +176,25 @@ FullCalendar, ...@@ -155,19 +176,25 @@ FullCalendar,
} }
return; return;
} }
// 默认选中第一项
this.events = response.data; this.events = response.data;
if(successCallback){
successCallback(this.events);
}
let appCalendar: any = this.$refs.calendar;
let api = appCalendar.getApi();
api.updateSize();
if(this.isSelectFirstDefault){ if(this.isSelectFirstDefault){
// 模拟$event数据 // 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(this.events[0])); let tempEvent = JSON.parse(JSON.stringify(this.events[0]));
tempEvent._def = {}; tempEvent._def = {};
tempEvent._def.extendedProps = JSON.parse(JSON.stringify(this.events[0])); tempEvent._def.extendedProps = JSON.parse(JSON.stringify(this.events[0]));
this.onEventClick({event:tempEvent}) this.onEventClick({event:tempEvent});
this.events[0].className = "select-first-event";
this.calendarClass = "calendar select-first-calendar";
}
if(successCallback){
successCallback(this.events);
}
// 刷新日历的大小(仅fullcalendar组件使用)
if(!Object.is(this.calendarType,"TIMELINE")){
let appCalendar: any = this.$refs.calendar;
let api = appCalendar.getApi();
api.updateSize();
} }
}, (response: any) => { }, (response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
...@@ -203,8 +230,8 @@ FullCalendar, ...@@ -203,8 +230,8 @@ FullCalendar,
view = { view = {
viewname: '${srffilepath2(editview.getCodeName())}', viewname: '${srffilepath2(editview.getCodeName())}',
height: ${editview.getHeight()?c}, height: ${editview.getHeight()?c},
width: ${editview.getWidth()?c}, width: ${editview.getWidth()?c},
title: '${editview.title}', title: this.<@getViewLanguageTitle editview />,
placement: '${editview.getOpenMode()}', placement: '${editview.getOpenMode()}',
deResParameters: <#rt> deResParameters: <#rt>
<#if editview.isPSDEView()> <#if editview.isPSDEView()>
...@@ -244,6 +271,14 @@ FullCalendar, ...@@ -244,6 +271,14 @@ FullCalendar,
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected onEventClick($event: any) { protected onEventClick($event: any) {
if($event.el){
this.calendarClass = "calendar";
if(this.selectedEventElement){
this.selectedEventElement.classList.remove("selected-event");
}
this.selectedEventElement = $event.el;
this.selectedEventElement.classList.add("selected-event");
}
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);
...@@ -261,6 +296,7 @@ FullCalendar, ...@@ -261,6 +296,7 @@ FullCalendar,
</#list> </#list>
</#if> </#if>
} }
// 导航栏中不需要打开视图,只要抛出选中数据
if(this.isSelectFirstDefault){ if(this.isSelectFirstDefault){
_context.itemType = itemType; _context.itemType = itemType;
this.selections = [_context]; this.selections = [_context];
...@@ -295,8 +331,12 @@ FullCalendar, ...@@ -295,8 +331,12 @@ FullCalendar,
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected refresh() { protected refresh() {
let calendarApi = (this.$refs.calendar as any).getApi(); if(Object.is(this.calendarType,"TIMELINE")){
calendarApi.refetchEvents(); this.searchEvents();
} else {
let calendarApi = (this.$refs.calendar as any).getApi();
calendarApi.refetchEvents();
}
} }
/** /**
......
...@@ -11,4 +11,64 @@ ...@@ -11,4 +11,64 @@
.timeline{ .timeline{
padding-left: 2px; padding-left: 2px;
} }
// 选中样式
.selected-event{
border: 2px solid #ff8711 !important;
}
.selected-event:before {
content: '';
display: block;
position: absolute;
right: 0;
bottom: 0;
border: 9px solid #ff8711;
border-top-color: transparent;
border-left-color: transparent;
color: #fff;
}
.selected-event:after {
content: '';
display: block;
width: 4px;
height: 11px;
position: absolute;
right: 1px;
bottom: 0px;
border: 2px solid #fff;
border-top-color: transparent;
border-left-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
}
// 默认第一项选中样式
.select-first-calendar{
.select-first-event{
border: 2px solid #ff8711 !important;
}
.select-first-event:before {
content: '';
display: block;
position: absolute;
right: 0;
bottom: 0;
border: 9px solid #ff8711;
border-top-color: transparent;
border-left-color: transparent;
color: #fff;
}
.select-first-event:after {
content: '';
display: block;
width: 4px;
height: 11px;
position: absolute;
right: 1px;
bottom: 0px;
border: 2px solid #fff;
border-top-color: transparent;
border-left-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
} }
\ No newline at end of file
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
class="design-tree" class="design-tree"
node-key="id" node-key="id"
lazy lazy
:show-checkbox="!isSingleSelect"
:check-on-click-node="!isSingleSelect"
:default-expanded-keys="expandedKeys" :default-expanded-keys="expandedKeys"
:props="{ :props="{
label: 'text', label: 'text',
...@@ -15,6 +17,7 @@ ...@@ -15,6 +17,7 @@
:load="load" :load="load"
:highlight-current="true" :highlight-current="true"
:expand-on-click-node="false" :expand-on-click-node="false"
@check="onCheck"
@current-change="selectionChange" @current-change="selectionChange"
:filter-node-method="filterNode" :filter-node-method="filterNode"
> >
...@@ -29,12 +32,12 @@ ...@@ -29,12 +32,12 @@
</span> </span>
<span class="text"> <span class="text">
<span v-if="data.html" v-html="data.html"></span> <span v-if="data.html" v-html="data.html"></span>
<span v-else>{{data.text}}</span> <span v-else>{{ data.isUseLangRes ? $t(data.text) : data.text }}</span>
</span> </span>
</div> </div>
<template slot="content"> <template slot="content">
<span v-if="data.html" v-html="data.html"></span> <span v-if="data.html" v-html="data.html"></span>
<span v-else>{{ data.text }}</span> <span v-else>{{ data.isUseLangRes ? $t(data.text) : data.text }}</span>
</template> </template>
</tooltip> </tooltip>
<!-- </context-menu> --> <!-- </context-menu> -->
...@@ -54,7 +57,7 @@ ...@@ -54,7 +57,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public getDatas(): any[] { public getDatas(): any[] {
return [this.selectData]; return [this.selectedNodes];
} }
/** /**
...@@ -64,9 +67,17 @@ ...@@ -64,9 +67,17 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public getData(): any { public getData(): any {
return this.selectData; return this.selectedNodes;
} }
/**
* 是否单选
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: true }) protected isSingleSelect!: boolean;
/** /**
* 是否默认选中第一条数据 * 是否默认选中第一条数据
* *
...@@ -75,6 +86,14 @@ ...@@ -75,6 +86,14 @@
*/ */
@Prop({ default: false }) protected isSelectFirstDefault!: boolean; @Prop({ default: false }) protected isSelectFirstDefault!: boolean;
/**
* 枝干节点是否可用(具有数据能力,可抛出)
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({default:false}) protected isBranchAvailable!: boolean;
/** /**
* 显示处理提示 * 显示处理提示
* *
...@@ -92,12 +111,59 @@ ...@@ -92,12 +111,59 @@
protected inited: boolean = false; protected inited: boolean = false;
/** /**
* 选中数据 * 已选中数据集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected selectedNodes: any = [];
/**
* 当前选中数据项
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected currentselectedNode: any = {};
/**
* 选中数据字符串
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() protected selectedData?: string;
/**
* 选中值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Watch('selectedData')
public onValueChange(newVal: any, oldVal: any) {
this.echoselectedNodes = newVal ? this.isSingleSelect ? JSON.parse(newVal)[0] : JSON.parse(newVal) : [];
this.selectedNodes = [];
if(this.echoselectedNodes.length > 0){
let AllnodesObj = (this.$refs.treeexpbar_tree as any).store.nodesMap;
let AllnodesArray : any[] = [];
for (const key in AllnodesObj) {
if (AllnodesObj.hasOwnProperty(key)) {
AllnodesArray.push(AllnodesObj[key].data);
}
}
this.setDefaultSelection(AllnodesArray);
}
}
/**
* 回显选中数据集合
* *
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected selectData: any = {}; protected echoselectedNodes:any[] = this.selectedData ? ( this.isSingleSelect ? [JSON.parse(this.selectedData)[0]] : JSON.parse(this.selectedData)) : [];
/** /**
* 部件行为--update * 部件行为--update
...@@ -163,14 +229,14 @@ ...@@ -163,14 +229,14 @@
*/ */
protected isOutputIconDefault: boolean = ${ctrl.isOutputIconDefault()?c}; protected isOutputIconDefault: boolean = ${ctrl.isOutputIconDefault()?c};
/** <#-- /**
* 树数据 * 树数据
* *
* @type {any[]} * @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
@Provide() @Provide()
protected nodes: any[] = []; protected nodes: any[] = []; -->
/** /**
* 数据展开主键 * 数据展开主键
...@@ -186,17 +252,43 @@ ...@@ -186,17 +252,43 @@
* *
* @private * @private
* @param {*} data * @param {*} data
* @param {*} data 当前节点对应传入对象
* @param {*} checkedState 树目前选中状态对象
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private onCheck(data: any, checkedState: any) {
// 处理多选数据
if(!this.isSingleSelect){
let leafNodes = checkedState.checkedNodes.filter((item:any) => item.leaf);
this.selectedNodes = JSON.parse(JSON.stringify(leafNodes));
this.$emit('selectionchange', this.selectedNodes);
}
}
/**
* 选中数据变更事件
*
* @private
* @param {*} data 节点对应传入对象
* @param {*} node 节点对应node对象
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
private selectionChange(data: any, node: any) { private selectionChange(data: any, node: any) {
this.selectData = {}; // 禁用项处理
if (data.disableselect) { if (data.disabled){
node.isCurrent = false; node.isCurrent = false;
this.$emit('selectionchange', []);
return; return;
} }
Object.assign(this.selectData, data); // 只处理最底层子节点
this.$emit('selectionchange', [this.selectData]); if(this.isBranchAvailable || data.leaf){
this.currentselectedNode = JSON.parse(JSON.stringify(data));
// 单选直接替换
if(this.isSingleSelect){
this.selectedNodes = [this.currentselectedNode];
this.$emit('selectionchange', this.selectedNodes);
}
// 多选用check方法
}
} }
/** /**
...@@ -290,11 +382,11 @@ ...@@ -290,11 +382,11 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected refresh_parent(): void { protected refresh_parent(): void {
if (Object.keys(this.selectData).length === 0) { if (Object.keys(this.currentselectedNode).length === 0) {
return; return;
} }
const tree: any = this.$refs.${ctrl.name}; const tree: any = this.$refs.${ctrl.name};
const node: any = tree.getNode(this.selectData.id); const node: any = tree.getNode(this.currentselectedNode.id);
if (!node || !node.parent) { if (!node || !node.parent) {
return; return;
} }
...@@ -330,14 +422,14 @@ ...@@ -330,14 +422,14 @@
} }
const _items = response.data; const _items = response.data;
this.formatExpanded(_items); this.formatExpanded(_items);
if (!node.level || node.level === 0) { <#-- if (!node.level || node.level === 0) {
this.nodes = [..._items]; this.nodes = [..._items];
} }
this.nodes = response.data; this.nodes = response.data; -->
resolve([..._items]); resolve([..._items]);
if(this.isSelectFirstDefault){ let isRoot = Object.is(node.level,0);
this.setDefaultSelection(_items, true); let isSelectedAll = node.checked;
} this.setDefaultSelection(_items, isRoot, isSelectedAll);
this.$emit("load", _items); this.$emit("load", _items);
}).catch((response: any) => { }).catch((response: any) => {
resolve([]); resolve([]);
...@@ -355,10 +447,10 @@ ...@@ -355,10 +447,10 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected refresh(args: any[]): void { protected refresh(args: any[]): void {
if (Object.keys(this.selectData).length === 0) { if (Object.keys(this.currentselectedNode).length === 0) {
return; return;
} }
const id: string = this.selectData.id; const id: string = this.currentselectedNode.id;
const param: any = { srfnodeid: id }; const param: any = { srfnodeid: id };
Object.assign(param, this.parentData); Object.assign(param, this.parentData);
this.refresh_node(param, false); this.refresh_node(param, false);
...@@ -369,7 +461,7 @@ ...@@ -369,7 +461,7 @@
* *
* @private * @private
* @param {*} [arg={}] * @param {*} [arg={}]
* @param {boolean} parentnode * @param {boolean} parentnode 是否是刷新父节点
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
private refresh_node(arg: any = {}, parentnode: boolean): void { private refresh_node(arg: any = {}, parentnode: boolean): void {
...@@ -386,11 +478,9 @@ ...@@ -386,11 +478,9 @@
const tree: any = this.$refs.${ctrl.name}; const tree: any = this.$refs.${ctrl.name};
tree.updateKeyChildren(id, _items); tree.updateKeyChildren(id, _items);
if (parentnode) { if (parentnode) {
this.selectData = {}; this.currentselectedNode = {};
}
if(this.isSelectFirstDefault){
this.setDefaultSelection(_items);
} }
this.setDefaultSelection(_items);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
...@@ -400,7 +490,7 @@ ...@@ -400,7 +490,7 @@
} }
/** /**
* 格式化数据 * 默认展开节点
* *
* @private * @private
* @param {any[]} items * @param {any[]} items
...@@ -418,35 +508,79 @@ ...@@ -418,35 +508,79 @@
} }
/** /**
* 设置默认选中 * 设置默认选中,回显数项,选中所有子节点
* *
* @param {any[]} items * @param {any[]} items 当前节点所有子节点集合
* @param {any[]} isRoot 是否是加载根节点 * @param {boolean} isRoot 是否是加载根节点
* @memberof ${srfclassname('${ctrl.codeName}')} * @param {boolean} isSelectedAll 是否选中所有子节点
* @memberof MainTree
*/ */
protected setDefaultSelection(items: any[], isRoot:boolean = false): void { protected setDefaultSelection(items: any[], isRoot: boolean = false, isSelectedAll: boolean = false): void {
let index = items.findIndex((item: any) => item.selected); if(items.length == 0){
if(index === -1) { return;
if(isRoot){ }
index = 0; let defaultData: any;
}else{ // 导航中选中第一条配置的默认选中,没有选中第一条
return; if(this.isSelectFirstDefault){
if(this.isSingleSelect){
let index = items.findIndex((item: any) => item.selected);
if(index === -1) {
if(isRoot){
index = 0;
}else{
return;
}
}
defaultData = items[index];
this.setTreeNodeHighLight(defaultData);
this.currentselectedNode = JSON.parse(JSON.stringify(defaultData));
if(this.isBranchAvailable || defaultData.leaf){
this.selectedNodes = [this.currentselectedNode];
this.$emit('selectionchange', this.selectedNodes);
}
}
}
// 已选数据的回显
if(this.echoselectedNodes && this.echoselectedNodes.length > 0){
let checkedNodes = items.filter((item:any)=>{
return this.echoselectedNodes.some((val:any)=> {
if(Object.is(item.srfkey,val.srfkey) && Object.is(item.srfmajortext,val.srfmajortext)){
val.used = true;
return true;
}
});
});
if(checkedNodes.length > 0){
this.echoselectedNodes = this.echoselectedNodes.filter((item:any)=> !item.used);
// 父节点选中时,不需要执行这段,会选中所有子节点
if(!isSelectedAll){
if(this.isSingleSelect){
this.setTreeNodeHighLight(checkedNodes[0]);
this.currentselectedNode = JSON.parse(JSON.stringify(checkedNodes[0]));
this.selectedNodes = [this.currentselectedNode];
}else{
this.selectedNodes = this.selectedNodes.concat(checkedNodes);
const tree: any = this.$refs.treeexpbar_tree;
tree.setCheckedNodes(this.selectedNodes);
}
}
} }
} }
const data = items[index]; // 父节点选中时,选中所有子节点
this.setTreeNodeHighLight(data); if(isSelectedAll){
this.$emit('selectionchange', [this.selectData]); let leafNodes = items.filter((item:any) => item.leaf);
this.selectedNodes = this.selectedNodes.concat(leafNodes);
this.$emit('selectionchange', this.selectedNodes);
}
} }
/** /**
* 设置选中 * 设置选中高亮
* *
* @param {*} data * @param {*} data
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected setTreeNodeHighLight(data: any): void { protected setTreeNodeHighLight(data: any): void {
this.selectData = {};
Object.assign(this.selectData, data);
const tree: any = this.$refs.${ctrl.name}; const tree: any = this.$refs.${ctrl.name};
tree.setCurrentKey(data.id); tree.setCurrentKey(data.id);
} }
...@@ -462,7 +596,7 @@ ...@@ -462,7 +596,7 @@
let content; let content;
if (node && node.data) { if (node && node.data) {
const data: any = node.data; const data: any = node.data;
this.selectData = { ...data }; this.currentselectedNode = { ...data };
const tags: string[] = data.id.split(';'); const tags: string[] = data.id.split(';');
<#-- <#if ctrl.getPSControls()??> <#-- <#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl> <#list ctrl.getPSControls() as childCtrl>
......
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
</#if> </#if>
<#if view.getViewType() == 'DETREEEXPVIEW'> <#if view.getViewType() == 'DETREEEXPVIEW'>
:isSelectFirstDefault="true" :isSelectFirstDefault="true"
:isBranchAvailable="true"
</#if>
<#if view.getViewType() == 'DEPICKUPTREEVIEW'>
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
</#if> </#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
......
...@@ -176,8 +176,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -176,8 +176,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
return new Promise((resolve:any,reject:any) =>{ return new Promise((resolve:any,reject:any) =>{
<#if node.getTreeNodeType() == 'STATIC'> <#if node.getTreeNodeType() == 'STATIC'>
let treeNode: any = {}; let treeNode: any = {};
Object.assign(treeNode, { text: '${node.getText()?j_string}' }); Object.assign(treeNode, { text: '${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 node.isEnableQuickSearch()>
if (treeNode.srfnodefilter) { if (treeNode.srfnodefilter) {
if (treeNode.text().toUpperCase().indexOf(filter.srfnodefilter.toUpperCase()) === -1) { if (treeNode.text().toUpperCase().indexOf(filter.srfnodefilter.toUpperCase()) === -1) {
...@@ -189,7 +189,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -189,7 +189,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
Object.assign(treeNode, { srfmajortext: treeNode.text }); Object.assign(treeNode, { srfmajortext: treeNode.text });
let strNodeId: string = '${node.getNodeType()?j_string}'; let strNodeId: string = '${node.getNodeType()?j_string}';
<#if node.getNodeValue()?? && node.getNodeValue()?length gt 0> <#if node.getNodeValue()?? && node.getNodeValue()?length gt 0>
Object.assign(treeNode, { srfkey: '${node.getNodeValue()?j_string}' }); Object.assign(treeNode, { srfkey: '${node.getNodeValue()?j_string}' });
strNodeId += this.TREENODE_SEPARATOR; strNodeId += this.TREENODE_SEPARATOR;
strNodeId += '${node.getNodeValue()?j_string}'; strNodeId += '${node.getNodeValue()?j_string}';
...@@ -199,13 +199,13 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -199,13 +199,13 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
strNodeId += filter.realnodeid; strNodeId += filter.realnodeid;
</#if> </#if>
<#else> <#else>
// 没有指定节点值,直接使用父节点值 // 没有指定节点值,直接使用父节点值
Object.assign(treeNode, { srfkey: filter.realnodeid }); Object.assign(treeNode, { srfkey: filter.realnodeid });
strNodeId += this.TREENODE_SEPARATOR; strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.realnodeid; strNodeId += filter.realnodeid;
</#if> </#if>
Object.assign(treeNode, { id: strNodeId }); Object.assign(treeNode, { id: strNodeId });
<#if node.getPSSysImage()??> <#if node.getPSSysImage()??>
...@@ -222,7 +222,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -222,7 +222,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
</#if> </#if>
<#if node.isDisableSelect()> <#if node.isDisableSelect()>
Object.assign(treeNode, { disableselect: true }); Object.assign(treeNode, { disabled: true });
</#if> </#if>
<#if node.isExpanded()> <#if node.isExpanded()>
...@@ -238,6 +238,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -238,6 +238,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.isSelected()> <#if node.isSelected()>
Object.assign(treeNode, { selected: true }); Object.assign(treeNode, { selected: true });
</#if> </#if>
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
list.push(treeNode); list.push(treeNode);
resolve(list); resolve(list);
}); });
...@@ -257,7 +260,12 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -257,7 +260,12 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
let bFirst:boolean = true; let bFirst:boolean = true;
codeListIems.forEach((item:any) => { codeListIems.forEach((item:any) => {
let treeNode: any = {}; let treeNode: any = {};
<#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 }); Object.assign(treeNode, { text: item.text });
</#if>
<#if node.isEnableQuickSearch()> <#if node.isEnableQuickSearch()>
if(filter.srfnodefilter){ if(filter.srfnodefilter){
if(treeNode.getText().toUpperCase().indexOf(filter.getSrfnodefilter().toUpperCase())==-1) if(treeNode.getText().toUpperCase().indexOf(filter.getSrfnodefilter().toUpperCase())==-1)
...@@ -285,7 +293,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -285,7 +293,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
Object.assign(treeNode, { enablecheck: true }); Object.assign(treeNode, { enablecheck: true });
</#if> </#if>
<#if node.isDisableSelect()> <#if node.isDisableSelect()>
Object.assign(treeNode, { disableselect: true }); Object.assign(treeNode, { disabled: true });
</#if> </#if>
<#if node.isExpanded()> <#if node.isExpanded()>
<#if node.isExpandFirstOnly()> <#if node.isExpandFirstOnly()>
...@@ -304,6 +312,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -304,6 +312,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.isSelected()> <#if node.isSelected()>
Object.assign(treeNode, { selected: true }); Object.assign(treeNode, { selected: true });
</#if> </#if>
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
list.push(treeNode); list.push(treeNode);
bFirst = false; bFirst = false;
resolve(list); resolve(list);
...@@ -326,13 +337,13 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -326,13 +337,13 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if noders.getParentFilter()?? && noders.getParentFilter()?length gt 0> <#if noders.getParentFilter()?? && noders.getParentFilter()?length gt 0>
<#assign pickupfield=noders.getParentFilter()> <#assign pickupfield=noders.getParentFilter()>
if (Object.is(filter.nodetype, this.TREENODE_${noders.getParentPSDETreeNode().getNodeType()?upper_case})) { 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> }); Object.assign(searchFilter, { n_${pickupfield?lower_case}_eq: filter.nodeid<#if noders.getParentValueLevel() gt 1>${noders.getParentValueLevel()?c}</#if> });
} }
<#elseif noders.getParentPSDER1N()??> <#elseif noders.getParentPSDER1N()??>
<#assign pickupfield=noders.getParentPSDER1N().getPSPickupDEField()> <#assign pickupfield=noders.getParentPSDER1N().getPSPickupDEField()>
if (Object.is(filter.nodetype, this.TREENODE_${noders.getParentPSDETreeNode().getNodeType()?upper_case})) { 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> }); Object.assign(searchFilter, { n_${pickupfield.getName()?lower_case}_eq: filter.nodeid<#if noders.getParentValueLevel() gt 1>${noders.getParentValueLevel()?c}</#if> });
} }
...@@ -340,7 +351,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -340,7 +351,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
</#if> </#if>
</#list> </#list>
Object.assign(searchFilter, { total: false }); Object.assign(searchFilter, { total: false });
Object.assign(searchFilter, {nodeid: filter.nodeid}); <#-- nodeid 是前台专用的 -->
<#-- Object.assign(searchFilter, {nodeid: filter.nodeid}); -->
<#if node.isEnableQuickSearch()> <#if node.isEnableQuickSearch()>
Object.assign(searchFilter, { query: filter.srfnodefilter }); Object.assign(searchFilter, { query: filter.srfnodefilter });
<#else> <#else>
...@@ -352,7 +364,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -352,7 +364,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
this.search${srfclassname(node.getNodeType()?lower_case)}(context, searchFilter, filter).then((records:any) =>{ this.search${srfclassname(node.getNodeType()?lower_case)}(context, searchFilter, filter).then((records:any) =>{
if(records && records.length >0){ if(records && records.length >0){
records.forEach((entity: any) => { records.forEach((entity: any) => {
let treeNode: any = {} let treeNode: any = {};
Object.assign(treeNode,{srfparentdename:'${node.getPSAppDataEntity().getCodeName()}',srfparentkey:entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}});
let strId: string = entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}; let strId: string = entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case};
<#if node.getTextPSDEField()??> <#if node.getTextPSDEField()??>
let strText: string = entity.${node.getTextPSDEField().codeName?lower_case}; let strText: string = entity.${node.getTextPSDEField().codeName?lower_case};
...@@ -384,7 +397,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -384,7 +397,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
Object.assign(treeNode, { enablecheck: true }); Object.assign(treeNode, { enablecheck: true });
</#if> </#if>
<#if node.isDisableSelect()> <#if node.isDisableSelect()>
Object.assign(treeNode, { disableselect: true }); Object.assign(treeNode, { disabled: true });
</#if> </#if>
<#if node.isExpanded()> <#if node.isExpanded()>
<#if node.isExpandFirstOnly()> <#if node.isExpandFirstOnly()>
...@@ -419,6 +432,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -419,6 +432,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.isSelected()> <#if node.isSelected()>
Object.assign(treeNode, { selected: true }); Object.assign(treeNode, { selected: true });
</#if> </#if>
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
list.push(treeNode); list.push(treeNode);
resolve(list); resolve(list);
bFirst = false; bFirst = false;
...@@ -453,8 +469,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -453,8 +469,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
Object.assign(searchFilter,{page:0}); Object.assign(searchFilter,{page:0});
} }
if(!searchFilter.size){ if(!searchFilter.size){
Object.assign(searchFilter,{size:9999}); Object.assign(searchFilter,{size:1000});
} }
<#if node.getSortField?? && node.getSortField()?? && node.getSortDir?? && node.getSortDir()??>
Object.assign(searchFilter,{sort: '${node.getSortField()?lower_case},${node.getSortDir()?lower_case}'})
</#if>
<#if appde?? && appde.getId() != node.getPSAppDataEntity().getId()> <#if appde?? && appde.getId() != node.getPSAppDataEntity().getId()>
const _appEntityService: any = this.${node.getPSAppDataEntity().codeName?lower_case}Service; const _appEntityService: any = this.${node.getPSAppDataEntity().codeName?lower_case}Service;
<#else> <#else>
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<split class='app-tree-exp-bar' v-model="split" @on-move-end="onSplitChange"> <split id="${ctrl.getCodeName()?lower_case}" class='app-tree-exp-bar' v-model="split" mode="horizontal" @on-move-end="onSplitChange">
<div slot='left'> <div slot='left'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='tree-exp-bar-header'> <div class='tree-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>树视图导航栏<#else>${ctrl.getTitle()}</#if></div> <div><#if ctrl.getTitle() == ''>树视图导航栏<#else>${ctrl.getTitle()}</#if></div>
</div> </div>
</#if> </#if>
<#if ctrl.isEnableSearch()> <#if ctrl.isEnableSearch()>
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
<component <component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')" v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname" :is="selection.view.viewname"
:key="$util.createUUID()"
class="viewcontainer2" class="viewcontainer2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)" :viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)"
@viewdataschange="onViewDatasChange" @viewdataschange="onViewDatasChange"
@viewdatasactivated="viewDatasActivated" @viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad"> @viewload="onViewLoad">
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
* 视图唯一标识 * 视图唯一标识
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected viewUID!:string; @Prop() protected viewUID!:string;
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
* 获取多项数据 * 获取多项数据
* *
* @returns {any[]} * @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getDatas(): any[] { public getDatas(): any[] {
return []; return [];
...@@ -68,27 +68,33 @@ ...@@ -68,27 +68,33 @@
* 获取单项树 * 获取单项树
* *
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getData(): any { public getData(): any {
return {}; return {};
} }
/** /**
* 选中数据 * 选中数据
* *
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected selection: any = {}; protected selection: any = {};
/**
* 控件宽度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()}<#else>0</#if>;
/** /**
* 过滤值 * 过滤值
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected srfnodefilter: string = ''; protected srfnodefilter: string = '';
...@@ -97,7 +103,7 @@ ...@@ -97,7 +103,7 @@
* *
* @private * @private
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
private istLoadDefaultRefView: boolean = false; private istLoadDefaultRefView: boolean = false;
...@@ -105,14 +111,14 @@ ...@@ -105,14 +111,14 @@
* 分割宽度 * 分割宽度
* *
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected split: number = 0.2; protected split: number = 0.2;
/** /**
* split值变化事件 * split值变化事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public onSplitChange() { public onSplitChange() {
if(this.split){ if(this.split){
...@@ -125,7 +131,7 @@ ...@@ -125,7 +131,7 @@
* *
* @param {*} [arg={}] * @param {*} [arg={}]
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected getExpItemView(arg: any = {}): any { protected getExpItemView(arg: any = {}): any {
let expmode = arg.nodetype.toUpperCase(); let expmode = arg.nodetype.toUpperCase();
...@@ -156,7 +162,7 @@ ...@@ -156,7 +162,7 @@
* @param {string} [tag] * @param {string} [tag]
* @param {*} [$event2] * @param {*} [$event2]
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void { protected ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
if (args.length === 0) { if (args.length === 0) {
...@@ -171,19 +177,34 @@ ...@@ -171,19 +177,34 @@
if (!refview) { if (!refview) {
return; return;
} }
const deKeyField = refview.deKeyField; let tempViewparam:any = {};
const parentdata: any = { [deKeyField]: arg.srfkey }; if(arg && arg.navfilter){
<#-- // 多选数据处理 Object.defineProperty(tempViewparam, arg.navfilter, {
arg.id.split(';').forEach((value: string, index: number) => { value : arg.srfkey,
if (index > 0) { writable : true,
const key = index + 1 === 1 ? 'srfparentkey' : 'srfparentkey' + (index + 1); enumerable : true,
Object.assign(parentdata, { [key]: value }) configurable : true
} })
}); --> }
Object.assign(parentdata, refview.parentdata); let tempContext:any ={};
if(arg.srfparentdename){
Object.assign(tempContext,{srfparentdename:arg.srfparentdename});
}
if(arg.srfparentkey){
Object.assign(tempContext,{srfparentkey:arg.srfparentkey});
}
Object.assign(tempContext,this.context);
Object.defineProperty(tempContext, refview.deKeyField, {
value : arg.srfkey,
writable : true,
enumerable : true,
configurable : true
});
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: refview.viewname }, data: parentdata }); Object.assign(this.selection, { view: { viewname: refview.viewname } });
Object.assign(this.selection,{'viewparam':tempViewparam,'context':tempContext});
this.$emit('selectionchange',args); this.$emit('selectionchange',args);
this.$forceUpdate();
} }
/** /**
...@@ -193,7 +214,7 @@ ...@@ -193,7 +214,7 @@
* @param {string} [tag] * @param {string} [tag]
* @param {*} [$event2] * @param {*} [$event2]
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected ${ctrl.name}_load(args: any[], tag?: string, $event2?: any): void { protected ${ctrl.name}_load(args: any[], tag?: string, $event2?: any): void {
this.$emit('load',args); this.$emit('load',args);
...@@ -202,7 +223,7 @@ ...@@ -202,7 +223,7 @@
/** /**
* 执行搜索 * 执行搜索
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onSearch(): void { protected onSearch(): void {
<#if ctrl.getPSDETree()??> <#if ctrl.getPSDETree()??>
...@@ -215,7 +236,7 @@ ...@@ -215,7 +236,7 @@
/** /**
* vue 声明周期 * vue 声明周期
* *
* @memberof @memberof ${srfclassname('${ctrl.codeName}')} * @memberof @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected created() { protected created() {
this.afterCreated(); this.afterCreated();
...@@ -224,7 +245,7 @@ ...@@ -224,7 +245,7 @@
/** /**
* 执行created后的逻辑 * 执行created后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected afterCreated(){ protected afterCreated(){
if (this.viewState) { if (this.viewState) {
...@@ -239,15 +260,39 @@ ...@@ -239,15 +260,39 @@
</#if> </#if>
}); });
} }
}
/**
* Vue声明周期(组件渲染完毕)
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterMounted(){
if(this.$store.getters.getViewSplit(this.viewUID)){ if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID); this.split = this.$store.getters.getViewSplit(this.viewUID);
} }else{
let containerWidth:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetWidth;
if(this.ctrlWidth){
this.split = this.ctrlWidth/containerWidth;
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
} }
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected destroyed() { protected destroyed() {
this.afterDestroy(); this.afterDestroy();
...@@ -256,7 +301,7 @@ ...@@ -256,7 +301,7 @@
/** /**
* 执行destroyed后的逻辑 * 执行destroyed后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected afterDestroy() { protected afterDestroy() {
if (this.viewStateEvent) { if (this.viewStateEvent) {
...@@ -271,7 +316,7 @@ ...@@ -271,7 +316,7 @@
* 视图数据变化 * 视图数据变化
* *
* @param {*} $event * @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onViewDatasChange($event: any): void { protected onViewDatasChange($event: any): void {
this.$emit('selectionchange', $event); this.$emit('selectionchange', $event);
...@@ -281,7 +326,7 @@ ...@@ -281,7 +326,7 @@
* 视图数据被激活 * 视图数据被激活
* *
* @param {*} $event * @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected viewDatasActivated($event: any): void { protected viewDatasActivated($event: any): void {
this.$emit('activated', $event); this.$emit('activated', $event);
...@@ -291,7 +336,7 @@ ...@@ -291,7 +336,7 @@
* 视图数据加载完成 * 视图数据加载完成
* *
* @param {*} $event * @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onViewLoad($event: any): void { protected onViewLoad($event: any): void {
this.$emit('load', $event); this.$emit('load', $event);
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
>div { >div {
font-size: 18px; font-size: 18px;
padding-left: 8px;
i { i {
font-size: 20px; font-size: 20px;
margin-top: -2px; margin-top: -2px;
...@@ -22,8 +23,11 @@ ...@@ -22,8 +23,11 @@
} }
} }
.search-content { .search-content {
width: 30%;
height: 48px; height: 48px;
padding: 10px 10px 10px 0; padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
} }
.tree-exp-content { .tree-exp-content {
<#-- 计算高度 --> <#-- 计算高度 -->
...@@ -52,6 +56,9 @@ ...@@ -52,6 +56,9 @@
padding-left: 10px; padding-left: 10px;
} }
} }
> .left-pane.ivu-split-pane {
padding-right: 10px;
}
} }
} }
......
<div :style="{height:${item.getContentHeight()}px;}"><iframe src='${item.getIFrameUrl()}'></iframe></div> <div style="height:${item.getContentHeight()}px"><iframe src='${item.getIFrameUrl()}'></iframe></div>
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<div class="<#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>" :style="{<#if item.getRawContentHeight() gt 0>height: ${item.getRawContentHeight()?c}px;</#if><#if item.getRawContentWidth() gt 0>width: ${item.getRawContentWidth()?c}px;</#if>}"> <div class="<#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>" style="<#if item.getRawContentHeight() gt 0>height: ${item.getRawContentHeight()?c}px;</#if><#if item.getRawContentWidth() gt 0>width: ${item.getRawContentWidth()?c}px;</#if>">
${item.getRawContent()} ${item.getRawContent()}
</div> </div>
</#if> </#if>
\ No newline at end of file
<#ibizinclude>
../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<template> <template>
${P.getPartCode(item,'FORM').code} ${P.getPartCode(item,'FORM').code}
</template> </template>
...@@ -371,6 +374,13 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -371,6 +374,13 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
private onFormLoad(data: any = {},action:string): void { private onFormLoad(data: any = {},action:string): void {
<#if de??>
if(Object.is(action,"save") || Object.is(action,"autoSave"))
// 更新context的实体主键
if(data.${appde.getCodeName()?lower_case}){
Object.assign(this.context,{${appde.getCodeName()?lower_case}:data.${appde.getCodeName()?lower_case}})
}
</#if>
this.setFormEnableCond(data); this.setFormEnableCond(data);
this.fillForm(data,action); this.fillForm(data,action);
<#if ctrl.getControlType() == 'FORM'> <#if ctrl.getControlType() == 'FORM'>
...@@ -583,7 +593,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -583,7 +593,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
<#-- END:是否应用实体视图 --> <#-- END:是否应用实体视图 -->
const view: any = { const view: any = {
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
title: '${dataview.getTitle()}', title: this.<@getViewLanguageTitle dataview />,
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
<#if formdetail.getParamViewParamJO()??> <#if formdetail.getParamViewParamJO()??>
......
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl ../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#ibizinclude>
../../@MACRO/LANG_FUN.ftl
</#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:分组列 --> <#-- BEGIN:分组列 -->
...@@ -38,7 +41,7 @@ ...@@ -38,7 +41,7 @@
<span>${item.render.code}</span> <span>${item.render.code}</span>
<#-- END:列绘制 --> <#-- END:列绘制 -->
<#else> <#else>
<template v-if="isOpenEdit"> <template v-if="actualIsOpenEdit">
<i-form style="height:100%;" :model="row"> <i-form style="height:100%;" :model="row">
<app-form-item :name="column.property" :itemRules="rules[column.property]"> <app-form-item :name="column.property" :itemRules="rules[column.property]">
${P.getEditorCode(item, "GRIDEIDTOR.vue").code} ${P.getEditorCode(item, "GRIDEIDTOR.vue").code}
...@@ -48,7 +51,7 @@ ...@@ -48,7 +51,7 @@
</#if> </#if>
<#-- END:行编辑 --> <#-- END:行编辑 -->
</#if> </#if>
<template <#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())>v-if="!isOpenEdit"</#if>> <template <#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())>v-if="!actualIsOpenEdit"</#if>>
<#if (item.render??)> <#if (item.render??)>
<#-- BEGIN:列绘制 --> <#-- BEGIN:列绘制 -->
<span>${item.render.code}</span> <span>${item.render.code}</span>
...@@ -68,14 +71,49 @@ ...@@ -68,14 +71,49 @@
<#-- END:前端绘制代码表 --> <#-- END:前端绘制代码表 -->
<#else> <#else>
<#-- BEGIN:常规显示 --> <#-- BEGIN:常规显示 -->
<#if item.isEnableLinkView()>
<#-- 支持链接视图-->
<#if item.getLinkPSAppView()??>
<#assign dataview = item.getLinkPSAppView() />
<#assign appLinkView>
viewname: '${srffilepath2(dataview.getCodeName())}', height: ${dataview.getHeight()?c},width: ${dataview.getWidth()?c},title: <@getViewLanguageTitle dataview />
</#assign>
</#if>
<app-column-link :data="row" :linkview="{<#if appLinkView??>${appLinkView}</#if>}" valueitem="<#if item.getLinkValueItem()??>${item.getLinkValueItem()}</#if>">
<#if item.getPSDEGridEditItem()?? && item.getPSDEGridEditItem().getPSEditorType?? && item.getPSDEGridEditItem().getPSEditorType()??>
<app-span editorType="${item.getPSDEGridEditItem().getPSEditorType().getStandardPSEditorType()}" :data="row.${item.getName()?lower_case}"></app-span>
<#else>
<span>{{row.${item.getName()?lower_case}}}</span> <span>{{row.${item.getName()?lower_case}}}</span>
</#if>
</app-column-link>
<#else>
<#-- 不支持链接视图 -->
<#if item.getPSDEGridEditItem()?? && item.getPSDEGridEditItem().getPSEditorType?? && item.getPSDEGridEditItem().getPSEditorType()??>
<app-span editorType="${item.getPSDEGridEditItem().getPSEditorType().getStandardPSEditorType()}" :data="row.${item.getName()?lower_case}"></app-span>
<#else>
<span>{{row.${item.getName()?lower_case}}}</span>
</#if>
</#if>
<#-- END:常规显示 --> <#-- END:常规显示 -->
</#if> </#if>
</template> </template>
<#-- END:列绘制、前端绘制代码表、行编辑 --> <#-- END:列绘制、前端绘制代码表、行编辑 -->
<#else> <#else>
<#-- BEGIN:常规显示 --> <#-- BEGIN:常规显示 -->
<#if item.isEnableLinkView()>
<#-- 支持链接视图-->
<#if item.getLinkPSAppView()??>
<#assign dataview = item.getLinkPSAppView() />
<#assign appLinkView>
viewname: '${srffilepath2(dataview.getCodeName())}', height: ${dataview.getHeight()?c},width: ${dataview.getWidth()?c},title: <@getViewLanguageTitle dataview />
</#assign>
</#if>
<app-column-link :data="row" :linkview="{<#if appLinkView??>${appLinkView}</#if>}" valueitem="<#if item.getLinkValueItem()??>${item.getLinkValueItem()}</#if>">
<span>{{row.${item.getName()?lower_case}}}</span>
</app-column-link>
<#else>
<span>{{row.${item.getName()?lower_case}}}</span> <span>{{row.${item.getName()?lower_case}}}</span>
</#if>
<#-- END:常规显示 --> <#-- END:常规显示 -->
</#if> </#if>
</template> </template>
......
...@@ -17,8 +17,9 @@ ...@@ -17,8 +17,9 @@
:summary-method="getSummaries" :summary-method="getSummaries"
</#if> </#if>
<#-- 表格聚合end --> <#-- 表格聚合end -->
stripe :height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'" :height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
:highlight-current-row ="isSingleSelect" :highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
@row-click="rowClick($event)" @row-click="rowClick($event)"
@select-all="selectAll($event)" @select-all="selectAll($event)"
@select="select($event)" @select="select($event)"
...@@ -270,6 +271,51 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -270,6 +271,51 @@ import CodeListService from "@service/app/codelist-service";
*/ */
@Prop() protected isSingleSelect?: boolean; @Prop() protected isSingleSelect?: boolean;
/**
* 选中数据字符串
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() protected selectedData?: string;
/**
* 选中值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainTree
*/
@Watch('selectedData')
public onValueChange(newVal: any, oldVal: any) {
this.selections = [];
if(this.selectedData){
const refs: any = this.$refs;
if (refs.multipleTable) {
refs.multipleTable.clearSelection();
JSON.parse(this.selectedData).forEach((selection:any)=>{
let selectedItem = this.items.find((item:any)=>{
return Object.is(item.srfkey, selection.srfkey);
});
if(selectedItem){
this.rowClick(selectedItem);
}
});
}
}
}
/**
* 表格行数据默认激活模式
* 0 不激活
* 1 单击激活
* 2 双击激活
*
* @type {(number | 0 | 1 | 2)}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({default: 2}) protected gridRowActiveMode!: number;
/** /**
* 是否开启行编辑 * 是否开启行编辑
* *
...@@ -278,6 +324,14 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -278,6 +324,14 @@ import CodeListService from "@service/app/codelist-service";
*/ */
@Prop({default: false}) protected isOpenEdit!: boolean; @Prop({default: false}) protected isOpenEdit!: boolean;
/**
* 实际是否开启行编辑
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected actualIsOpenEdit: boolean = this.isOpenEdit;
/** /**
* 总条数 * 总条数
* *
...@@ -441,10 +495,8 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -441,10 +495,8 @@ import CodeListService from "@service/app/codelist-service";
return; return;
} }
const data: any = response.data; const data: any = response.data;
if (Object.keys(data).length > 0) { this.totalrow = response.total;
this.totalrow = response.total; this.items = JSON.parse(JSON.stringify(data));
this.items = JSON.parse(JSON.stringify(data));
}
// 清空selections // 清空selections
this.selections = []; this.selections = [];
this.$emit('load', this.items); this.$emit('load', this.items);
...@@ -454,11 +506,11 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -454,11 +506,11 @@ import CodeListService from "@service/app/codelist-service";
if(_this.isSelectFirstDefault){ if(_this.isSelectFirstDefault){
_this.rowClick(_this.items[0]); _this.rowClick(_this.items[0]);
} }
if(_this.context.selectedData){ if(_this.selectedData){
const refs: any = _this.$refs; const refs: any = _this.$refs;
if (refs.multipleTable) { if (refs.multipleTable) {
refs.multipleTable.clearSelection(); refs.multipleTable.clearSelection();
_this.context.selectedData.forEach((selection:any)=>{ JSON.parse(_this.selectedData).forEach((selection:any)=>{
let selectedItem = _this.items.find((item:any)=>{ let selectedItem = _this.items.find((item:any)=>{
return Object.is(item.srfkey, selection.srfkey); return Object.is(item.srfkey, selection.srfkey);
}); });
...@@ -542,7 +594,17 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -542,7 +594,17 @@ import CodeListService from "@service/app/codelist-service";
} else { } else {
this.$Notice.success({ title: '', desc: '删除成功!' }); this.$Notice.success({ title: '', desc: '删除成功!' });
} }
this.load({}); //删除items中已删除的项
console.log(this.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.totalrow -= _datas.length;
this.$emit('remove', null); this.$emit('remove', null);
this.selections = []; this.selections = [];
resolve(response); resolve(response);
...@@ -635,7 +697,11 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -635,7 +697,11 @@ import CodeListService from "@service/app/codelist-service";
if (Object.is(data.type, 'maxRowCount')) { if (Object.is(data.type, 'maxRowCount')) {
Object.assign(page, { page: 0, size: data.maxRowCount }); Object.assign(page, { page: 0, size: data.maxRowCount });
} else if (Object.is(data.type, 'activatedPage')) { } else if (Object.is(data.type, 'activatedPage')) {
doExport(JSON.parse(JSON.stringify(this.items))); try {
doExport(JSON.parse(JSON.stringify(this.items)));
} catch (error) {
console.error(error);
}
return; return;
} }
// 设置排序 // 设置排序
...@@ -655,7 +721,11 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -655,7 +721,11 @@ import CodeListService from "@service/app/codelist-service";
this.$Notice.error({ title: '', desc: '数据导出失败,' + response.info }); this.$Notice.error({ title: '', desc: '数据导出失败,' + response.info });
return; return;
} }
doExport(JSON.parse(JSON.stringify(response.data))); try {
doExport(JSON.parse(JSON.stringify(response.data)));
} catch (error) {
console.error(error);
}
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
...@@ -691,7 +761,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -691,7 +761,7 @@ import CodeListService from "@service/app/codelist-service";
valueSeparator: "${codelist.valueSeparator}", valueSeparator: "${codelist.valueSeparator}",
<#elseif codelist.getOrMode() == 'NUM'> <#elseif codelist.getOrMode() == 'NUM'>
renderMode: 'number', renderMode: 'number',
textSeparator: ''${codelist.textSeparator}'', textSeparator: '${codelist.textSeparator}',
valueSeparator: ';', valueSeparator: ';',
<#else> <#else>
renderMode: 'other', renderMode: 'other',
...@@ -710,13 +780,13 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -710,13 +780,13 @@ import CodeListService from "@service/app/codelist-service";
if (Object.is(codelist.codelistType, "DYNAMIC")) { if (Object.is(codelist.codelistType, "DYNAMIC")) {
let items = await _this.codeListService.getItems(codelist.srfkey); let items = await _this.codeListService.getItems(codelist.srfkey);
jsonData.forEach((row:any)=>{ jsonData.forEach((row:any)=>{
row[codelist.name] = _this.getCodelistValue(items, row[codelist.name], codelist.renderMode, codelist.emptytext,codelist.valueSeparator); row[codelist.name] = _this.getCodelistValue(items, row[codelist.name], codelist);
}); });
// 静态处理 // 静态处理
} else if(Object.is(codelist.codelistType, "STATIC")){ } else if(Object.is(codelist.codelistType, "STATIC")){
let items = await _this.$store.getters.getCodeListItems(codelist.srfkey); let items = await _this.$store.getters.getCodeListItems(codelist.srfkey);
jsonData.forEach((row:any)=>{ jsonData.forEach((row:any)=>{
row[codelist.name] = _this.getCodelistValue(items, row[codelist.name], codelist.renderMode, codelist.emptytext,codelist.valueSeparator); row[codelist.name] = _this.getCodelistValue(items, row[codelist.name], codelist);
}); });
} }
} }
...@@ -733,13 +803,13 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -733,13 +803,13 @@ import CodeListService from "@service/app/codelist-service";
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
private getCodelistValue(items: any[], value: any, renderMode: string, emtpytext:string, valueSeparator: string = ";" ){ private getCodelistValue(items: any[], value: any, codelist: any,){
if(!value){ if(!value){
return emtpytext; return this.$t('codelist.'+codelist.srfkey+'.empty');
} }
if (items) { if (items) {
let result:any = []; let result:any = [];
if(Object.is(renderMode,"number")){ if(Object.is(codelist.renderMode,"number")){
items.map((_item: any, index: number)=>{ items.map((_item: any, index: number)=>{
const nValue = parseInt((value as any), 10); const nValue = parseInt((value as any), 10);
const codevalue = _item.value; const codevalue = _item.value;
...@@ -747,22 +817,22 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -747,22 +817,22 @@ import CodeListService from "@service/app/codelist-service";
result.push(_item); result.push(_item);
} }
}); });
} else if(Object.is(renderMode,"string")){ } else if(Object.is(codelist.renderMode,"string")){
const arrayValue: Array<any> = (value as any).split(valueSeparator); const arrayValue: Array<any> = (value as any).split(codelist.valueSeparator);
arrayValue.map((value: any, index: number) => { arrayValue.map((value: any, index: number) => {
result.push([]); result.push([]);
let values: any[] = Object.is(this.$util.typeOf(value), 'number') ? [value] : [...(value as any).split(valueSeparator)]; let values: any[] = Object.is(this.$util.typeOf(value), 'number') ? [value] : [...(value as any).split(codelist.valueSeparator)];
values.map((val:any ,num: number)=>{ values.map((val:any ,num: number)=>{
const item = this.getItem(items, val); const item = this.getItem(items, val, codelist);
if(item){ if(item){
result[index].push(item); result[index].push(item);
} }
}); });
}); });
} else { } else {
let values: any[] = Object.is(this.$util.typeOf(value), 'number') ? [value] : [...(value as any).split(valueSeparator)]; let values: any[] = Object.is(this.$util.typeOf(value), 'number') ? [value] : [...(value as any).split(codelist.valueSeparator)];
values.map((value:any ,index: number)=>{ values.map((value:any ,index: number)=>{
const item = this.getItem(items, value); const item = this.getItem(items, value, codelist);
if(item){ if(item){
result.push(item); result.push(item);
} }
...@@ -770,9 +840,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -770,9 +840,9 @@ import CodeListService from "@service/app/codelist-service";
} }
// 设置items // 设置items
if(result.length != 0){ if(result.length != 0){
return result.join(valueSeparator); return result.join(codelist.valueSeparator);
}else{ }else{
return "不匹配"; return value;
} }
} }
} }
...@@ -786,13 +856,16 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -786,13 +856,16 @@ import CodeListService from "@service/app/codelist-service";
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
private getItem(items: any[], value: any): any { private getItem(items: any[], value: any, codelist: any): any {
let result: any = {};
const arr: Array<any> = items.filter(item => {return item.value == value}); const arr: Array<any> = items.filter(item => {return item.value == value});
if (arr.length !== 1) { if (arr.length !== 1) {
return undefined; return undefined;
} }
return arr[0].text; if(Object.is(codelist.codelistType,'STATIC')){
return this.$t('codelist.'+codelist.srfkey+'.'+arr[0].value);
}else{
return arr[0].text;
}
} }
/** /**
...@@ -870,7 +943,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -870,7 +943,7 @@ import CodeListService from "@service/app/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected rowDBLClick($event: any): void { protected rowDBLClick($event: any): void {
if (!$event || this.isOpenEdit) { if (!$event || this.actualIsOpenEdit || Object.is(this.gridRowActiveMode,0)) {
return; return;
} }
this.selections = []; this.selections = [];
...@@ -926,7 +999,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -926,7 +999,7 @@ import CodeListService from "@service/app/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected rowClick($event: any, ifAlways: boolean = false): void { protected rowClick($event: any, ifAlways: boolean = false): void {
if (!ifAlways && (!$event || this.isOpenEdit)) { if (!ifAlways && (!$event || this.actualIsOpenEdit)) {
return; return;
} }
if(this.stopRowClick) { if(this.stopRowClick) {
...@@ -950,8 +1023,10 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -950,8 +1023,10 @@ import CodeListService from "@service/app/codelist-service";
if (refs.multipleTable) { if (refs.multipleTable) {
if(this.isSingleSelect){ if(this.isSingleSelect){
refs.multipleTable.clearSelection(); refs.multipleTable.clearSelection();
refs.multipleTable.setCurrentRow($event);
}else{
refs.multipleTable.toggleRowSelection($event);
} }
refs.multipleTable.toggleRowSelection($event);
} }
this.$emit('selectionchange', this.selections); this.$emit('selectionchange', this.selections);
...@@ -1427,6 +1502,19 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1427,6 +1502,19 @@ import CodeListService from "@service/app/codelist-service";
} }
</#if> </#if>
/**
* 获取对应行class
*
* @param {*} $args row 行数据,rowIndex 行索引
* @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected getRowClassName(args:{row: any,rowIndex: number}){
let isSelected = this.selections.some((item:any)=>{
return Object.is(item.${appde.getCodeName()?lower_case},args.row.${appde.getCodeName()?lower_case});
});
return isSelected ? "grid-selected-row" : "";
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -2,6 +2,22 @@ ...@@ -2,6 +2,22 @@
flex-grow: 1; flex-grow: 1;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
.el-table__body-wrapper::-webkit-scrollbar {
/*滚动条整体样式*/
width : 10px !important; /*高宽分别对应横竖滚动条的尺寸*/
height: 10px !important;
}
.el-table__body-wrapper::-webkit-scrollbar-thumb {
/*滚动条颜色*/
border-radius : 10px !important;
background-color: #cecece !important;
}
.el-table__body-wrapper::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
background : #ededed !important;
border-radius: 10px !important;
}
.el-table { .el-table {
.el-tooltip{ .el-tooltip{
.ivu-form-item{ .ivu-form-item{
...@@ -27,7 +43,7 @@ ...@@ -27,7 +43,7 @@
} }
} }
.el-table__body-wrapper{ .el-table__body-wrapper{
height: 100% !important; height: calc(100% - 83px) !important;
} }
.el-table__empty-block{ .el-table__empty-block{
height: auto !important; height: auto !important;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<split class="app-grid-exp-bar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" v-model="split" @on-move-end="onSplitChange"> <split id="${ctrl.getCodeName()?lower_case}" class="app-grid-exp-bar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" v-model="split" mode="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>" @on-move-end="onSplitChange">
<div slot='left'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='grid-exp-bar-header'> <div class='grid-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>表格导航栏<#else>${ctrl.getTitle()}</#if></div> <div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>表格导航栏<#else>${ctrl.getTitle()}</#if></div>
...@@ -38,11 +38,10 @@ ...@@ -38,11 +38,10 @@
</#if> </#if>
</div> </div>
</div> </div>
<div slot='right'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>'>
<component <component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')" v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname" :is="selection.view.viewname"
:key="$util.createUUID()"
class="viewcontainer2" class="viewcontainer2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)"> :viewdata="JSON.stringify(selection.data)">
...@@ -64,7 +63,7 @@ ...@@ -64,7 +63,7 @@
* 打开新建数据视图 * 打开新建数据视图
* *
* @type {any} * @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected newdata: any; @Prop() protected newdata: any;
</#if> </#if>
...@@ -73,7 +72,7 @@ ...@@ -73,7 +72,7 @@
* 打开编辑数据视图 * 打开编辑数据视图
* *
* @type {any} * @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected opendata: any; @Prop() protected opendata: any;
</#if> </#if>
...@@ -83,8 +82,8 @@ ...@@ -83,8 +82,8 @@
/** /**
* 视图唯一标识 * 视图唯一标识
* *
* @type {boolean} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected viewUID!:string; @Prop() protected viewUID!:string;
...@@ -93,15 +92,40 @@ ...@@ -93,15 +92,40 @@
* *
* @protected * @protected
* @type {(boolean)} * @type {(boolean)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected isSingleSelect:boolean = true; protected isSingleSelect:boolean = true;
/**
* 呈现模式,可选值:horizontal或者vertical
*
* @protected
* @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected showMode:string ="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>";
/**
* 控件宽度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()}<#else>0</#if>;
/**
* 控件高度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()}<#else>0</#if>;
/** /**
* 选中数据 * 选中数据
* *
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected selection: any = {}; protected selection: any = {};
...@@ -110,7 +134,7 @@ ...@@ -110,7 +134,7 @@
* *
* @protected * @protected
* @type {(string)} * @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected searchText:string = ""; protected searchText:string = "";
...@@ -118,7 +142,7 @@ ...@@ -118,7 +142,7 @@
* 分割宽度 * 分割宽度
* *
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected split: number = 0.5; protected split: number = 0.5;
<#if ctrl.getXDataPSControl()??> <#if ctrl.getXDataPSControl()??>
...@@ -128,7 +152,7 @@ ...@@ -128,7 +152,7 @@
* 导航视图名称 * 导航视图名称
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navViewName: string = "<#if xDataControl.getNavPSAppView()??><#assign navPSAppView = xDataControl.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>"; protected navViewName: string = "<#if xDataControl.getNavPSAppView()??><#assign navPSAppView = xDataControl.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>";
...@@ -136,7 +160,7 @@ ...@@ -136,7 +160,7 @@
* 导航视图参数 * 导航视图参数
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navViewParam: string = '<#if xDataControl.getNavViewParamJO()??>${xDataControl.getNavViewParamJO()}</#if>'; protected navViewParam: string = '<#if xDataControl.getNavViewParamJO()??>${xDataControl.getNavViewParamJO()}</#if>';
...@@ -144,7 +168,7 @@ ...@@ -144,7 +168,7 @@
* 导航过滤项 * 导航过滤项
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>"; protected navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>";
</#if> </#if>
...@@ -170,7 +194,7 @@ ...@@ -170,7 +194,7 @@
/** /**
* split值变化事件 * split值变化事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public onSplitChange() { public onSplitChange() {
if(this.split){ if(this.split){
...@@ -182,7 +206,7 @@ ...@@ -182,7 +206,7 @@
* 获取多项数据 * 获取多项数据
* *
* @returns {any[]} * @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getDatas(): any[] { public getDatas(): any[] {
return []; return [];
...@@ -192,7 +216,7 @@ ...@@ -192,7 +216,7 @@
* 获取单项树 * 获取单项树
* *
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getData(): any { public getData(): any {
return null; return null;
...@@ -201,7 +225,7 @@ ...@@ -201,7 +225,7 @@
/** /**
* Vue声明周期(组件初始化完毕) * Vue声明周期(组件初始化完毕)
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public created() { public created() {
this.afterCreated(); this.afterCreated();
...@@ -210,7 +234,7 @@ ...@@ -210,7 +234,7 @@
/** /**
* 执行created后的逻辑 * 执行created后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterCreated(){ public afterCreated(){
if (this.viewState) { if (this.viewState) {
...@@ -224,15 +248,45 @@ ...@@ -224,15 +248,45 @@
</#if> </#if>
}); });
} }
}
/**
* Vue声明周期(组件渲染完毕)
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterMounted(){
if(this.$store.getters.getViewSplit(this.viewUID)){ if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID); this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetWidth;
let containerHeight:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetHeight;
if(Object.is(this.showMode,'horizontal')){
if(this.ctrlWidth){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
} }
} }
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected destroyed() { protected destroyed() {
this.afterDestroy(); this.afterDestroy();
...@@ -241,7 +295,7 @@ ...@@ -241,7 +295,7 @@
/** /**
* 执行destroyed后的逻辑 * 执行destroyed后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected afterDestroy() { protected afterDestroy() {
if (this.viewStateEvent) { if (this.viewStateEvent) {
...@@ -255,7 +309,7 @@ ...@@ -255,7 +309,7 @@
/** /**
* 执行搜索 * 执行搜索
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onSearch($event:any) { protected onSearch($event:any) {
<#if ctrl.getXDataPSControl()??> <#if ctrl.getXDataPSControl()??>
...@@ -269,7 +323,7 @@ ...@@ -269,7 +323,7 @@
/** /**
* ${ctrl.name}的选中数据事件 * ${ctrl.name}的选中数据事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void { protected ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {}; let data:any = {};
...@@ -282,6 +336,7 @@ ...@@ -282,6 +336,7 @@
<#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(data,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']});
</#if> </#if>
</#if> </#if>
if(this.context){ if(this.context){
...@@ -290,12 +345,13 @@ ...@@ -290,12 +345,13 @@
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data }); Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data });
this.$emit('selectionchange',args); this.$emit('selectionchange',args);
this.$forceUpdate();
} }
/** /**
* ${ctrl.name}的load完成事件 * ${ctrl.name}的load完成事件
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected ${ctrl.name}_load(args:any, tag?: string, $event2?: any){ protected ${ctrl.name}_load(args:any, tag?: string, $event2?: any){
this.$emit('load',args); this.$emit('load',args);
......
...@@ -52,7 +52,16 @@ ...@@ -52,7 +52,16 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
.grid-exp-bar-content2 { .grid-exp-bar-content2 {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%; height: 100%;
</#if>
overflow: auto; overflow: auto;
flex-grow: 1; flex-grow: 1;
} }
...@@ -67,6 +76,75 @@ ...@@ -67,6 +76,75 @@
padding-right: 10px; padding-right: 10px;
} }
} }
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
.grid-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
>div {
font-size: 18px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: space-between;
align-items: center;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
}
}
.grid-exp-bar-content {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
margin-bottom: 10px;
}
.grid-exp-bar-content2 {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
flex-grow: 1;
}
}
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
}
}
} }
<#ibizinclude> <#ibizinclude>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false">
<#if view.isShowCaptionBar()>
<p slot="title"> <#ibizinclude>
${view.getCaption()} ./VIEW_CAPTION.vue.ftl
</p> </#ibizinclude>
</#if>
<#if view.hasPSControl('toolbar')> <#if view.hasPSControl('toolbar')>
<#assign toolbarCtrl = view.getPSControl('toolbar')> <#assign toolbarCtrl = view.getPSControl('toolbar')>
<@ibizindent blank=8> <@ibizindent blank=8>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false">
<#if view.isShowCaptionBar()>
<p slot="title"> <#ibizinclude>
${view.getCaption()} ./VIEW_CAPTION.vue.ftl
</p> </#ibizinclude>
</#if>
<#if view.hasPSControl('toolbar')> <#if view.hasPSControl('toolbar')>
<#assign toolbarCtrl = view.getPSControl('toolbar')> <#assign toolbarCtrl = view.getPSControl('toolbar')>
<@ibizindent blank=8> <@ibizindent blank=8>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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>' :disHover="true" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :disHover="true" :bordered="false">
<#ibizinclude> <#ibizinclude>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card' :dis-hover="true" :bordered="false"> <card class='view-card' :dis-hover="true" :bordered="false">
<#ibizinclude> <#ibizinclude>
./VIEW_CAPTION_DATAINFO.vue.ftl ./VIEW_CAPTION_DATAINFO.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if view.hasPSControl('toolbar')> <#if view.hasPSControl('toolbar')>
<@ibizindent blank=8> <@ibizindent blank=8>
<p slot="extra" v-show="Object.is(this.selection.id, 'form')"> <p slot="extra" v-show="Object.is(this.selection.id, 'form')">
......
...@@ -33,7 +33,7 @@ ${P.getCtrlCode('grid', 'CONTROL.html').code} ...@@ -33,7 +33,7 @@ ${P.getCtrlCode('grid', 'CONTROL.html').code}
</#if> </#if>
</#assign> </#assign>
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
......
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
<span class='caption-image'><img src='${viewimg.getImagePath()}'/></span> <span class='caption-image'><img src='${viewimg.getImagePath()}'/></span>
</#if> </#if>
</#if> </#if>
<span class='caption-info'>{{$t(model.srfCaption)}}</span> <span class='caption-info'>{{$t(model.srfTitle)}}</span>
</p> </p>
</#if> </#if>
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<span class='caption-image'><img src='${viewimg.getImagePath()}'/></span> <span class='caption-image'><img src='${viewimg.getImagePath()}'/></span>
</#if> </#if>
</#if> </#if>
<span class='caption-info'>{{$t(model.srfCaption)}}</span> <span class='caption-info'>{{$t(model.srfTitle)}}</span>
</#if> </#if>
</p> </p>
</#if> </#if>
\ No newline at end of file
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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' :padding='0' :bordered='false'> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover='true' :padding='0' :bordered='false'>
<#if view.isShowCaptionBar()>
<p slot="title"> <#ibizinclude>
${view.getCaption()} ./VIEW_CAPTION_DATAINFO.vue.ftl
</p> </#ibizinclude>
</#if>
<div class="content-container"> <div class="content-container">
<@ibizindent blank=12> <@ibizindent blank=12>
<#if view.hasPSControl('wizardpanel')> <#if view.hasPSControl('wizardpanel')>
......
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEHTMLVIEW
\ No newline at end of file
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
</div> </div>
\ No newline at end of file
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl ../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card' :dis-hover="true" :bordered="false"> <card class='view-card' :dis-hover="true" :bordered="false">
<#ibizinclude> <#ibizinclude>
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :bordered="false" :dis-hover="true" > <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :bordered="false" :dis-hover="true" >
<#ibizinclude> <#ibizinclude>
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card view-no-caption' :bordered="false" :dis-hover="true" > <card class='view-card view-no-caption' :bordered="false" :dis-hover="true" >
<div class='content-container'> <div class='content-container'>
<#assign MDContent> <#assign MDContent>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card' :dis-hover="true" :bordered="false"> <card class='view-card' :dis-hover="true" :bordered="false">
<#ibizinclude> <#ibizinclude>
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :bordered="false" :dis-hover="true" > <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :bordered="false" :dis-hover="true" >
<#ibizinclude> <#ibizinclude>
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :bordered="false" :dis-hover="true" > <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :bordered="false" :dis-hover="true" >
<#ibizinclude> <#ibizinclude>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false">
<div class="content-container"> <div class="content-container">
<iframe :src="iframeUrl" height="100%" width="100%" seamless="seamless" frameborder="0" scrolling="auto"></iframe> <iframe :src="iframeUrl" height="100%" width="100%" seamless="seamless" frameborder="0" scrolling="auto"></iframe>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false">
<div class="content-container"> <div class="content-container">
<iframe :src="iframeUrl" height="100%" width="100%" seamless="seamless" frameborder="0" scrolling="auto"></iframe> <iframe :src="iframeUrl" height="100%" width="100%" seamless="seamless" frameborder="0" scrolling="auto"></iframe>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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 :padding="0" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' dis-hover :padding="0" :bordered="false">
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
......
.view-card {
>.ivu-card-extra {
top: 5px;
right: 0px;
}
}
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/EDIT.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEWFEDITVIEW9
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
>.translate-contant { >.translate-contant {
flex-grow: 1; flex-grow: 1;
display: flex; display: flex;
justify-content: end; justify-content: flex-end;
height: calc(100% - 64px); height: calc(100% - 64px);
.translate-buttons { .translate-buttons {
width: 80px; width: 80px;
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card' :dis-hover="true" :padding="0" :bordered="false"> <card class='view-card' :dis-hover="true" :padding="0" :bordered="false">
<div class="content-container pickup-view"> <div class="content-container pickup-view">
<div class="translate-contant"> <div class="translate-contant">
<div class="center"> <div class="center" :style="{width : !isShowButton ? '100%' : ''}">
<#if view.hasPSControl('pickupviewpanel')> <#if view.hasPSControl('pickupviewpanel')>
<@ibizindent blank=20> <@ibizindent blank=20>
${P.getCtrlCode('pickupviewpanel', 'CONTROL.html').code}<#t> ${P.getCtrlCode('pickupviewpanel', 'CONTROL.html').code}<#t>
</@ibizindent> </@ibizindent>
</#if> </#if>
</div> </div>
<div class="translate-buttons"> <div v-if="isShowButton" class="translate-buttons">
<div class="buttons"> <div class="buttons">
<i-button type="primary" :title="this.containerModel.view_rightbtn.text" <i-button type="primary" :title="this.containerModel.view_rightbtn.text"
:disabled="this.containerModel.view_rightbtn.disabled" :disabled="this.containerModel.view_rightbtn.disabled"
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</i-button> </i-button>
</div> </div>
</div> </div>
<div class="right"> <div v-if="isShowButton" class="right">
<div class="mpicker-select"> <div class="mpicker-select">
<div v-for="(item, index) in viewSelections" :key="index" :class="item._select ? 'select' : ''" @click="selectionsClick(item)" @dblclick="selectionsDBLClick(item)"> <div v-for="(item, index) in viewSelections" :key="index" :class="item._select ? 'select' : ''" @click="selectionsClick(item)" @dblclick="selectionsDBLClick(item)">
<span>{{item.srfmajortext}}</span> <span>{{item.srfmajortext}}</span>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</div> </div>
</div> </div>
</div> </div>
<card :dis-hover="true" :bordered="false" class="footer"> <card v-if="isShowButton" :dis-hover="true" :bordered="false" class="footer">
<row :style="{ textAlign: 'right' }"> <row :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk">{{this.containerModel.view_okbtn.text}}</i-button> <i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp; &nbsp;&nbsp;
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card view-no-caption' :dis-hover="true" :bordered="false"> <card class='view-card view-no-caption' :dis-hover="true" :bordered="false">
<div class='content-container'> <div class='content-container'>
<#assign MDContent> <#assign MDContent>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
>.pickupviewpanel { >.pickupviewpanel {
flex-grow: 1; flex-grow: 1;
display: flex; display: flex;
justify-content: end; justify-content: flex-end;
height: calc(100% - 64px); height: calc(100% - 64px);
} }
>.footer { >.footer {
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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" :padding="0" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :padding="0" :bordered="false">
<div class="content-container pickup-view"> <div class="content-container pickup-view">
<#if view.hasPSControl('pickupviewpanel')> <#if view.hasPSControl('pickupviewpanel')>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
${P.getCtrlCode('pickupviewpanel', 'CONTROL.html').code}<#t> ${P.getCtrlCode('pickupviewpanel', 'CONTROL.html').code}<#t>
</@ibizindent> </@ibizindent>
</#if> </#if>
<card v-if="ifShowButtons" :dis-hover="true" :bordered="false" class="footer"> <card v-if="isShowButton" :dis-hover="true" :bordered="false" class="footer">
<row :style="{ textAlign: 'right' }"> <row :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk">{{this.containerModel.view_okbtn.text}}</i-button> <i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp; &nbsp;&nbsp;
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
</div> </div>
\ No newline at end of file
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card' :dis-hover="true" :bordered="false"> <card class='view-card' :dis-hover="true" :bordered="false">
<#ibizinclude> <#ibizinclude>
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<#if view.isShowCaptionBar() || view.hasPSControl('toolbar')> <#ibizinclude>
<p slot='title'> ../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl
<#if view.getPSSysImage()??> </#ibizinclude>
<#assign viewimg = view.getPSSysImage()/>
<#if viewimg.getImagePath() != "">
<span class='caption-image'><i class='${viewimg.getCssClass()}'></i></span>
<#else>
<span class='caption-image'><img src='${viewimg.getImagePath()}'/></span>
</#if>
</#if>
<span class='caption-info'>{{$t(model.srfCaption)}}</span>
</p>
</#if>
<#if view.hasPSControl('toolbar')> <#if view.hasPSControl('toolbar')>
<@ibizindent blank=8> <@ibizindent blank=8>
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<div class='content-container'> <div class='content-container'>
<div class='view-top-messages'> <div class='view-top-messages'>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false">
<#if view.isShowCaptionBar()>
<p slot="title"> <#ibizinclude>
${view.getCaption()} ../@MACRO/VIEW_CAPTION.vue.ftl
</p> </#ibizinclude>
</#if>
<#if view.hasPSControl('toolbar')> <#if view.hasPSControl('toolbar')>
<#assign toolbarCtrl = view.getPSControl('toolbar')> <#assign toolbarCtrl = view.getPSControl('toolbar')>
<@ibizindent blank=8> <@ibizindent blank=8>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card' :dis-hover="true" :bordered="false"> <card class='view-card' :dis-hover="true" :bordered="false">
<#ibizinclude> <#ibizinclude>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card' :dis-hover="true" :bordered="false"> <card class='view-card' :dis-hover="true" :bordered="false">
<#ibizinclude> <#ibizinclude>
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<#-- 不带数据信息标题 --> <#-- 不带数据信息标题 -->
<#if view.isShowCaptionBar()> <#if view.isShowCaptionBar()>
<p v-if="ifShowButtons" slot='title'> <p v-if="isShowButton" slot='title'>
<#if view.getPSSysImage()??> <#if view.getPSSysImage()??>
<#assign viewimg = view.getPSSysImage()/> <#assign viewimg = view.getPSSysImage()/>
<#if viewimg.getImagePath() != ""> <#if viewimg.getImagePath() != "">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<span class='caption-image'><img src='${viewimg.getImagePath()}'/></span> <span class='caption-image'><img src='${viewimg.getImagePath()}'/></span>
</#if> </#if>
</#if> </#if>
<span class='caption-info'>{{$t(model.srfCaption)}}</span> <span class='caption-info'>{{$t(model.srfTitle)}}</span>
</p> </p>
</#if> </#if>
<div class='content-container'> <div class='content-container'>
...@@ -30,13 +30,6 @@ ...@@ -30,13 +30,6 @@
</div> </div>
</#if> </#if>
</@ibizindent> </@ibizindent>
<card v-if="ifShowButtons" :dis-hover="true" :bordered="false" class="footer">
<row :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk">确定</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel">取消</i-button>
</row>
</card>
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card view-no-caption' :dis-hover="true" :bordered="false"> <card class='view-card view-no-caption' :dis-hover="true" :bordered="false">
<div class='content-container pickup-grid-view'> <div class='content-container pickup-grid-view'>
<@ibizindent blank=12> <@ibizindent blank=12>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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 :padding="0" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' dis-hover :padding="0" :bordered="false">
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
......
<div class="app-redirect-view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="app-redirect-view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
</div> </div>
\ No newline at end of file
<div class="app-wfredirect-view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="app-wfredirect-view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
</div> </div>
\ No newline at end of file
<div class="${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
</div> </div>
\ No newline at end of file
<div class="${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
</div> </div>
\ No newline at end of file
<div class="app-logout-view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="app-logout-view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<img class="logout-bg" src="/assets/img/logout_bg.png"/> <img class="logout-bg" src="/assets/img/logout_bg.png"/>
<div class="logout-container"> <div class="logout-container">
尊敬的客户您好,您已成功退出系统,将在 <a>{{this.countdown}}</a> 秒后跳转至<a @click="gotoLoginView">登录页</a>! 尊敬的客户您好,您已成功退出系统,将在 <a>{{this.countdown}}</a> 秒后跳转至<a @click="gotoLoginView">登录页</a>!
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card' dis-hover :bordered="false"> <card class='view-card' dis-hover :bordered="false">
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl ../@MACRO/VIEW_CAPTION.vue.ftl
......
<div class="app-login-view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="app-login-view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<img class="login-bg" src="/assets/img/login_bg.png"/> <img class="login-bg" src="/assets/img/login_bg.png"/>
<div class="login-container"> <div class="login-container">
<div class="login-title">登 录</div> <div class="login-title">{{$t(model.srfTitle)}}</div>
<i-form class="login-form"> <i-form class="login-form">
<form-item> <form-item>
<i-input type="text" v-model="formData.loginname" placeholder="用户名" clearable> <i-input type="text" v-model="formData.loginname" placeholder="用户名" clearable>
......
<div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'> <div class='view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card' dis-hover :bordered="false"> <card class='view-card' dis-hover :bordered="false">
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl ../@MACRO/VIEW_CAPTION.vue.ftl
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.page-logo{
display: flex;
align-items: center;
}
.header-left{ .header-left{
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -7,24 +7,21 @@ ...@@ -7,24 +7,21 @@
<#else> <#else>
<#if view.getMainMenuAlign()=="LEFT" || view.getMainMenuAlign()==""> <#if view.getMainMenuAlign()=="LEFT" || view.getMainMenuAlign()=="">
<div class="index_view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="index_view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction viewTitle="${view.getTitle()}" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<layout :class="themeClasses" :style="themeStyle"> <layout :class="themeClasses" :style="themeStyle">
<header class="index_header"> <header class="index_header">
<div class="page-logo"> <div class="header-left" >
<#if view.getAppIconPath() != ""> <div class="page-logo">
<img src="${view.getAppIconPath()}" height="22"> <#if view.getAppIconPath() != "">
<#else> <img src="${view.getAppIconPath()}" height="32">
<img src="../../../assets/img/logo2.png" height="22" /> <#else>
</#if> <img src="../../../assets/img/logo.png" height="32" />
<span style="display: inline-block;margin-left: 10px;font-size: 22px;">${view.getCaption()}</span> </#if>
<span style="display: inline-block;margin-left: 10px;font-size: 22px;">{{$t(model.srfTitle)}}</span>
</div>
</div> </div>
<div class="header-right" style="display: flex;align-items: center;justify-content: space-between;"> <div class="header-right" style="display: flex;align-items: center;justify-content: space-between;">
<div> <app-header-menus />
<icon type="md-notifications-outline" style="font-size: 25px;margin: 0 10px;" />
</div>
<div>
<icon type="ios-mail-open-outline" style="font-size: 25px;margin: 0 10px;" />
</div>
<app-lang style='font-size: 15px;padding: 0 10px;'></app-lang> <app-lang style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-orgsector></app-orgsector> <app-orgsector></app-orgsector>
<app-user></app-user> <app-user></app-user>
...@@ -62,20 +59,15 @@ ...@@ -62,20 +59,15 @@
<header class="index_header" > <header class="index_header" >
<div class="header-left"> <div class="header-left">
<div class="page-logo"> <div class="page-logo">
<img src="../../../assets/img/logo2.png" height="22" /> <img src="../../../assets/img/logo.png" height="32" />
<span style="display: inline-block;margin-left: 10px;font-size: 22px;">首页</span> <span style="display: inline-block;margin-left: 10px;font-size: 22px;">{{$t(model.srfTitle)}}</span>
</div> </div>
<div style="margin-left: 50px;"> <div style="margin-left: 50px;">
${P.getCtrlCode('appmenu', 'CONTROL.html').code} ${P.getCtrlCode('appmenu', 'CONTROL.html').code}
</div> </div>
</div> </div>
<div class="header-right" style="display: flex;align-items: center;justify-content: space-between;"> <div class="header-right" style="display: flex;align-items: center;justify-content: space-between;">
<div> <app-header-menus />
<icon type="md-notifications-outline" style="font-size: 25px;margin: 0 10px;" />
</div>
<div>
<icon type="ios-mail-open-outline" style="font-size: 25px;margin: 0 10px;" />
</div>
<app-lang style='font-size: 15px;padding: 0 10px;'></app-lang> <app-lang style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-orgsector></app-orgsector> <app-orgsector></app-orgsector>
<app-user></app-user> <app-user></app-user>
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
:viewparam="viewparam" :viewparam="viewparam"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:isSingleSelect="isSingleSelect" :isSingleSelect="isSingleSelect"
:ifShowButtons="ifShowButtons" :selectedData="selectedData"
:isShowButton="isShowButton"
@viewdataschange="onViewDatasChange" @viewdataschange="onViewDatasChange"
@viewdatasactivated="viewDatasActivated" @viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad" @viewload="onViewLoad">
:key="this.$util.createUUID()">
</component> </component>
</div> </div>
</template> </template>
...@@ -23,7 +23,14 @@ import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.code ...@@ -23,7 +23,14 @@ import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.code
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
/**
* 选中数据字符串
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() protected selectedData?: string;
/** /**
* 获取多项数据 * 获取多项数据
* *
...@@ -77,7 +84,7 @@ import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.code ...@@ -77,7 +84,7 @@ import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.code
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
@Prop({default: true}) protected ifShowButtons!: boolean; @Prop({default: true}) protected isShowButton!: boolean;
/** /**
* 是否单选 * 是否单选
......
<#-- content --> <#-- content -->
<#assign content> <#assign content>
:isSingleSelect="isSingleSelect" :isSingleSelect="isSingleSelect"
:ifShowButtons="ifShowButtons" :selectedData="selectedData"
:isShowButton="isShowButton"
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl ../@MACRO/HTML/DEFAULT.html.ftl
......
...@@ -35,7 +35,11 @@ ...@@ -35,7 +35,11 @@
<#assign pickupview=currentItem.getPickupPSAppView()> <#assign pickupview=currentItem.getPickupPSAppView()>
"{ <#t> "{ <#t>
viewname: '${srffilepath2(pickupview.codeName)}'<#t> viewname: '${srffilepath2(pickupview.codeName)}'<#t>
, title: '${pickupview.title}'<#t> <#if pickupview.isPSDEView()>
, title: $t('${pickupview.getPSDataEntity().getCodeName()?lower_case}.views.${pickupview.getPSDEViewCodeName()?lower_case}.title')<#t>
<#else>
, title: $t('views.${pickupview.getCodeName()?lower_case}.title')<#t>
</#if>
, deResParameters: <@getDeResParameters pickupview /><#t> , deResParameters: <@getDeResParameters pickupview /><#t>
, parameters: <@getParameters pickupview /><#t> , parameters: <@getParameters pickupview /><#t>
<#if (pickupview.getWidth() gt 0)> <#if (pickupview.getWidth() gt 0)>
...@@ -60,7 +64,11 @@ ...@@ -60,7 +64,11 @@
<#assign linkview=currentItem.getLinkPSAppView()> <#assign linkview=currentItem.getLinkPSAppView()>
"{ <#t> "{ <#t>
viewname: '${linkview.codeName}'<#t> viewname: '${linkview.codeName}'<#t>
, title: '${linkview.title}'<#t> <#if pickupview.isPSDEView()>
, title: $t('${linkview.getPSDataEntity().getCodeName()?lower_case}.views.${linkview.getPSDEViewCodeName()?lower_case}.title')<#t>
<#else>
, title: $t('views.${linkview.getCodeName()?lower_case}.title')<#t>
</#if>
, deResParameters: <@getDeResParameters linkview /><#t> , deResParameters: <@getDeResParameters linkview /><#t>
, parameters: <@getParameters linkview /><#t> , parameters: <@getParameters linkview /><#t>
, width: ${linkview.getWidth()?c}<#t> , width: ${linkview.getWidth()?c}<#t>
......
...@@ -8,6 +8,6 @@ tag='${codelist.codeName}' ...@@ -8,6 +8,6 @@ tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}' codelistType='${codelist.getCodeListType()}'
</#if> </#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event)} @change="($event)=>{gridEditItemChange(row, column.property, $event)}"
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</dropdown-list-mpicker> </dropdown-list-mpicker>
\ No newline at end of file
<app-image-upload :multiple="true" :formState="formState" :ignorefieldvaluechange="ignorefieldvaluechange" @formitemvaluechange="onFormItemValueChange" :data="JSON.stringify(this.data)" name='${editor.name}' :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" uploadparams='${editor.getEditorParam('uploadparams','')}' exportparams='${editor.getEditorParam('exportparams','')}' customparams="<#if editor.getEditorParam('customparams','') != ''>${editor.getEditorParam('customparams','')}<#else>{}</#if>" style="${editor.getEditorCssStyle()}overflow: auto;"></app-image-upload> <app-image-upload :multiple="true" :formState="formState" :ignorefieldvaluechange="ignorefieldvaluechange" @formitemvaluechange="onFormItemValueChange" :data="JSON.stringify(this.data)" name='${editor.name}' :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" uploadparams='${editor.getEditorParam('uploadparams','')}' exportparams='${editor.getEditorParam('exportparams','')}' :customparams="<#if editor.getEditorParam('customparams','') != ''>${editor.getEditorParam('customparams','')}<#else>{}</#if>" style="${editor.getEditorCssStyle()}overflow: auto;"></app-image-upload>
\ No newline at end of file \ No newline at end of file
<app-image-upload <app-file-upload
:multiple="true"
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}"
...@@ -7,7 +6,9 @@ ...@@ -7,7 +6,9 @@
:name='column.property' :name='column.property'
:value="row[column.property]" :value="row[column.property]"
: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"
:rowPreview="true"
:imageOnly="true"
uploadparams='${editor.getEditorParam('uploadparams','')}' uploadparams='${editor.getEditorParam('uploadparams','')}'
exportparams='${editor.getEditorParam('exportparams','')}' exportparams='${editor.getEditorParam('exportparams','')}'
customparams="<#if editor.getEditorParam('customparams','') != ''>${editor.getEditorParam('customparams','')}<#else>{}</#if>" style="${editor.getEditorCssStyle()}overflow: auto;"> :customparams="<#if editor.getEditorParam('customparams','') != ''>${editor.getEditorParam('customparams','')}<#else>{}</#if>" style="${editor.getEditorCssStyle()}overflow: auto;">
</app-image-upload> </app-file-upload>
\ No newline at end of file \ No newline at end of file
<app-image-upload <app-file-upload
:multiple="false"
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}"
...@@ -7,7 +6,9 @@ ...@@ -7,7 +6,9 @@
:name='column.property' :name='column.property'
:value="row[column.property]" :value="row[column.property]"
: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"
:rowPreview="true"
:imageOnly="true"
uploadparams='${editor.getEditorParam('uploadparams','')}' uploadparams='${editor.getEditorParam('uploadparams','')}'
exportparams='${editor.getEditorParam('exportparams','')}' exportparams='${editor.getEditorParam('exportparams','')}'
customparams="<#if editor.getEditorParam('customparams','') != ''>${editor.getEditorParam('customparams','')}<#else>{}</#if>" style="${editor.getEditorCssStyle()}overflow: auto;"> :customparams="<#if editor.getEditorParam('customparams','') != ''>${editor.getEditorParam('customparams','')}<#else>{}</#if>" style="${editor.getEditorCssStyle()}overflow: auto;">
</app-image-upload> </app-file-upload>
\ No newline at end of file \ No newline at end of file
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :itemParam=<@getItemParams editor />
<#if editor.getPickupPSAppView().getViewType() == 'DEMPICKUPVIEW'>
:isSingleSelect="false"
</#if>
: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()??>
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:itemParam=<@getItemParams editor /> :itemParam=<@getItemParams editor />
<#if editor.getPickupPSAppView().getViewType() == 'DEMPICKUPVIEW'>
:isSingleSelect="false"
</#if>
: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,6 +6,7 @@ ...@@ -6,6 +6,7 @@
:name='column.property' :name='column.property'
:value="row[column.property]" :value="row[column.property]"
: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"
:rowPreview="true"
uploadparams='${editor.getEditorParam('uploadparams','')}' uploadparams='${editor.getEditorParam('uploadparams','')}'
exportparams='${editor.getEditorParam('exportparams','')}' exportparams='${editor.getEditorParam('exportparams','')}'
:customparams="<#if editor.getEditorParam('customparams','') != ''>${editor.getEditorParam('customparams','')}<#else>{}</#if>" style="${editor.getEditorCssStyle()}overflow: auto;"> :customparams="<#if editor.getEditorParam('customparams','') != ''>${editor.getEditorParam('customparams','')}<#else>{}</#if>" style="${editor.getEditorCssStyle()}overflow: auto;">
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:name='column.property' :name='column.property'
:value="row[column.property]" :value="row[column.property]"
: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"
:rowPreview="true"
uploadparams='${editor.getEditorParam('uploadparams','')}' uploadparams='${editor.getEditorParam('uploadparams','')}'
exportparams='${editor.getEditorParam('exportparams','')}' exportparams='${editor.getEditorParam('exportparams','')}'
:customparams="<#if editor.getEditorParam('customparams','') != ''>${editor.getEditorParam('customparams','')}<#else>{}</#if>" style="${editor.getEditorCssStyle()}overflow: auto;"> :customparams="<#if editor.getEditorParam('customparams','') != ''>${editor.getEditorParam('customparams','')}<#else>{}</#if>" style="${editor.getEditorCssStyle()}overflow: auto;">
......
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="min-width: 150px; ${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1)}"></date-picker> <date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1)}"></date-picker>
\ No newline at end of file \ No newline at end of file
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="min-width: 150px; ${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1)}"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1)}"></date-picker>
\ No newline at end of file \ No newline at end of file
<time-picker :value="row[column.property]" :transfer="true" format="mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="min-width: 150px; ${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker>
\ No newline at end of file \ No newline at end of file
<time-picker :value="row[column.property]" :transfer="true" format="HH" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="min-width: 150px; ${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker>
\ No newline at end of file \ No newline at end of file
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="min-width: 150px; ${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1)}"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1)}"></date-picker>
\ No newline at end of file \ No newline at end of file
<time-picker :value="row[column.property]" :transfer="true" format="HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="min-width: 150px; ${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker>
\ No newline at end of file \ No newline at end of file
<time-picker :value="row[column.property]" :transfer="true" format="HH:mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="min-width: 150px; ${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH:mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker>
\ No newline at end of file \ No newline at end of file
<time-picker :value="row[column.property]" :transfer="true" format="ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="min-width: 150px; ${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker>
\ No newline at end of file \ No newline at end of file
<#ibizinclude>
../../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<#if item.getPSAppView()??> <#if item.getPSAppView()??>
/** /**
...@@ -54,7 +57,7 @@ protected click${item.codeName}(item: any = {}) { ...@@ -54,7 +57,7 @@ protected click${item.codeName}(item: any = {}) {
<#if dataview.getOpenMode() == 'POPUPMODAL'> <#if dataview.getOpenMode() == 'POPUPMODAL'>
const view = { const view = {
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
title: '${dataview.title}', title: (this.<@getViewLanguageTitle dataview /> as any),
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
}; };
...@@ -64,12 +67,15 @@ protected click${item.codeName}(item: any = {}) { ...@@ -64,12 +67,15 @@ protected click${item.codeName}(item: any = {}) {
}); });
</#if> </#if>
<#if dataview.getOpenMode() == 'POPUPAPP'> <#if dataview.getOpenMode() == 'POPUPAPP'>
console.log('-----POPUPAPP-----独立程序弹出,暂时不实现'); <#-- 打开独立程序弹出 -->
const _this: any = this;
const routePath = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
window.open('./#'+routePath, '_blank');
</#if> </#if>
<#if dataview.getOpenMode()?index_of('DRAWER') == 0> <#if dataview.getOpenMode()?index_of('DRAWER') == 0>
const view: any = { const view: any = {
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
title: '${dataview.title}', title: (this.<@getViewLanguageTitle dataview /> as any),
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
placement: '${dataview.getOpenMode()}' placement: '${dataview.getOpenMode()}'
...@@ -82,7 +88,7 @@ protected click${item.codeName}(item: any = {}) { ...@@ -82,7 +88,7 @@ protected click${item.codeName}(item: any = {}) {
<#if dataview.getOpenMode() == 'POPOVER'> <#if dataview.getOpenMode() == 'POPOVER'>
const view: any = { const view: any = {
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
title: '${dataview.title}', title: (this.<@getViewLanguageTitle dataview /> as any),
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
placement: '${dataview.getOpenMode()}' placement: '${dataview.getOpenMode()}'
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected click${item.codeName}(item: any = {}){ protected click${item.codeName}(item: any = {}){
this.$Notice.error({ title: '错误', desc: '暂不支持此项操作' });
} }
\ No newline at end of file
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected click${item.codeName}(item: any = {}){ protected click${item.codeName}(item: any = {}){
this.$Notice.error({ title: '错误', desc: '暂不支持此项操作' });
} }
\ No newline at end of file
<#ibizinclude>
../../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<#-- 前台界面行为 --> <#-- 前台界面行为 -->
<#if front_block??> <#if front_block??>
${front_block} ${front_block}
...@@ -428,7 +431,7 @@ ${front_block} ...@@ -428,7 +431,7 @@ ${front_block}
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: actionContext.<@getViewLanguageTitle dataview />,
}; };
openPopupModal(view, data); openPopupModal(view, data);
<#-- END: 打开模态 --> <#-- END: 打开模态 -->
...@@ -471,7 +474,7 @@ ${front_block} ...@@ -471,7 +474,7 @@ ${front_block}
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: actionContext.<@getViewLanguageTitle dataview />,
placement: '${dataview.getOpenMode()}', placement: '${dataview.getOpenMode()}',
}; };
openDrawer(view, data); openDrawer(view, data);
...@@ -515,14 +518,14 @@ ${front_block} ...@@ -515,14 +518,14 @@ ${front_block}
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: actionContext.<@getViewLanguageTitle dataview />,
placement: '${dataview.getOpenMode()}', placement: '${dataview.getOpenMode()}',
}; };
openPopOver(view, data); openPopOver(view, data);
<#-- END: 打开气泡卡片 --> <#-- END: 打开气泡卡片 -->
<#-- BEGIN: 其他打开模式 --> <#-- BEGIN: 其他打开模式 -->
<#else> <#else>
actionContext.$Notice.warning({ title: '错误', desc: '${dataview.title} 不支持该模式打开' }); actionContext.$Notice.warning({ title: '错误', desc: actionContext.<@getViewLanguageTitle dataview />+'不支持该模式打开' });
</#if> </#if>
<#-- END: 其他打开模式 --> <#-- END: 其他打开模式 -->
<#-- END: 前台处理模式:打开顶级视图,打开顶级视图或向导(模态) --> <#-- END: 前台处理模式:打开顶级视图,打开顶级视图或向导(模态) -->
......
<#ibizinclude>
../../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<#-- 后台界面行为 --> <#-- 后台界面行为 -->
<#if backend_block??> <#if backend_block??>
${backend_block} ${backend_block}
...@@ -143,7 +146,7 @@ ${backend_block} ...@@ -143,7 +146,7 @@ ${backend_block}
<#if frontview.getOpenMode()?index_of('DRAWER') == 0> <#if frontview.getOpenMode()?index_of('DRAWER') == 0>
const view: any = { const view: any = {
viewname: '${srffilepath2(frontview.getCodeName())}', viewname: '${srffilepath2(frontview.getCodeName())}',
title: '${frontview.title}', title: actionContext.<@getViewLanguageTitle frontview />,
height: ${frontview.getHeight()?c}, height: ${frontview.getHeight()?c},
width: ${frontview.getWidth()?c}, width: ${frontview.getWidth()?c},
placement: '${frontview.getOpenMode()}' placement: '${frontview.getOpenMode()}'
...@@ -159,7 +162,7 @@ ${backend_block} ...@@ -159,7 +162,7 @@ ${backend_block}
<#else> <#else>
const view = { const view = {
viewname: '${srffilepath2(frontview.getCodeName())}', viewname: '${srffilepath2(frontview.getCodeName())}',
title: '${frontview.title}', title: actionContext.<@getViewLanguageTitle frontview />,
height: ${frontview.getHeight()?c}, height: ${frontview.getHeight()?c},
width: ${frontview.getWidth()?c}, width: ${frontview.getWidth()?c},
}; };
......
<#ibizinclude>
../../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
/** /**
* ${item.getCaption()} * ${item.getCaption()}
* *
...@@ -134,7 +137,7 @@ ...@@ -134,7 +137,7 @@
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: actionContext.<@getViewLanguageTitle dataview />,
}; };
openPopupModal(view, data); openPopupModal(view, data);
<#elseif dataview.getOpenMode()?index_of('DRAWER') == 0> <#elseif dataview.getOpenMode()?index_of('DRAWER') == 0>
...@@ -156,7 +159,7 @@ ...@@ -156,7 +159,7 @@
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: actionContext.<@getViewLanguageTitle dataview />,
placement: '${dataview.getOpenMode()}', placement: '${dataview.getOpenMode()}',
}; };
openDrawer(view, data); openDrawer(view, data);
...@@ -179,12 +182,12 @@ ...@@ -179,12 +182,12 @@
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: actionContext.<@getViewLanguageTitle dataview />,
placement: '${dataview.getOpenMode()}', placement: '${dataview.getOpenMode()}',
}; };
openPopOver(view, data); openPopOver(view, data);
<#else> <#else>
actionContext.$Notice.warning({ title: '错误', desc: '${dataview.title} 不支持该模式打开' }); actionContext.$Notice.warning({ title: '错误', desc: actionContext.<@getViewLanguageTitle dataview />+'不支持该模式打开' });
</#if> </#if>
</#if> </#if>
</#if> </#if>
......
<#ibizinclude>
../../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
/** /**
* ${item.getCaption()} * ${item.getCaption()}
* *
...@@ -99,7 +102,7 @@ ...@@ -99,7 +102,7 @@
<#if frontview.getOpenMode()?index_of('DRAWER') == 0> <#if frontview.getOpenMode()?index_of('DRAWER') == 0>
const view: any = { const view: any = {
viewname: '${srffilepath2(frontview.getCodeName())}', viewname: '${srffilepath2(frontview.getCodeName())}',
title: '${frontview.title}', title: actionContext.<@getViewLanguageTitle frontview />,
height: ${frontview.getHeight()?c}, height: ${frontview.getHeight()?c},
width: ${frontview.getWidth()?c}, width: ${frontview.getWidth()?c},
placement: '${frontview.getOpenMode()}' placement: '${frontview.getOpenMode()}'
...@@ -114,7 +117,7 @@ ...@@ -114,7 +117,7 @@
<#else> <#else>
const view = { const view = {
viewname: '${srffilepath2(frontview.getCodeName())}', viewname: '${srffilepath2(frontview.getCodeName())}',
title: '${frontview.title}', title: actionContext.<@getViewLanguageTitle frontview />,
height: ${frontview.getHeight()?c}, height: ${frontview.getHeight()?c},
width: ${frontview.getWidth()?c}, width: ${frontview.getWidth()?c},
}; };
......
...@@ -13,12 +13,7 @@ ...@@ -13,12 +13,7 @@
// 界面行为容器对象 _this // 界面行为容器对象 _this
const _this: any = this; const _this: any = this;
if (xData && xData.save instanceof Function) { if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => { xData.save();
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) { } else if (_this.save && _this.save instanceof Function) {
_this.save(); _this.save();
} }
......
...@@ -10,12 +10,7 @@ ...@@ -10,12 +10,7 @@
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
protected ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) { protected ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _view: any = this; this.closeView(args);
if (_view.viewdata) {
_view.$emit('close');
} else if (_view.$tabPageExp) {
_view.$tabPageExp.onClose(_view.$route.fullPath);
}
if(window.parent){ if(window.parent){
window.parent.postMessage([{ ...args }],'*'); window.parent.postMessage([{ ...args }],'*');
} }
......
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
} else if(xData.newRow && xData.newRow instanceof Function) { } else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData); xData.newRow([{ ...data }], params, $event, xData);
}else{ }else{
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
} }
} }
\ No newline at end of file
...@@ -10,5 +10,5 @@ ...@@ -10,5 +10,5 @@
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
protected ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) { protected ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '暂不支持此项操作' });
} }
\ No newline at end of file
...@@ -10,5 +10,5 @@ ...@@ -10,5 +10,5 @@
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
protected ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) { protected ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.isOpenEdit = !xData.isOpenEdit; xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
} }
\ No newline at end of file
<#ibizinclude>
../../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<#if item.getPSViewLogic?? && item.getPSViewLogic()??> <#if item.getPSViewLogic?? && item.getPSViewLogic()??>
<#assign viewlogic = item.getPSViewLogic()/> <#assign viewlogic = item.getPSViewLogic()/>
/** /**
...@@ -103,6 +106,11 @@ ...@@ -103,6 +106,11 @@
this.$router.push(routePath); this.$router.push(routePath);
} }
openIndexViewTab(data); openIndexViewTab(data);
<#elseif dataview.getOpenMode() == 'POPUPAPP'>
<#-- 打开独立程序弹出 -->
const _this: any = this;
const routePath = this.$viewTool.buildUpRoutePath(this.$route, curViewParam, deResParameters, parameters, args, data);
window.open('./#'+routePath, '_blank');
<#elseif dataview.getOpenMode() = 'POPUPMODAL'> <#elseif dataview.getOpenMode() = 'POPUPMODAL'>
<#-- 打开模态 --> <#-- 打开模态 -->
const _this: any = this; const _this: any = this;
...@@ -122,7 +130,7 @@ ...@@ -122,7 +130,7 @@
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: this.<@getViewLanguageTitle dataview />,
}; };
openPopupModal(view, data); openPopupModal(view, data);
<#elseif dataview.getOpenMode()?index_of('DRAWER') == 0> <#elseif dataview.getOpenMode()?index_of('DRAWER') == 0>
...@@ -144,7 +152,7 @@ ...@@ -144,7 +152,7 @@
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: this.<@getViewLanguageTitle dataview />,
placement: '${dataview.getOpenMode()}', placement: '${dataview.getOpenMode()}',
}; };
openDrawer(view, data); openDrawer(view, data);
...@@ -167,12 +175,12 @@ ...@@ -167,12 +175,12 @@
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: this.<@getViewLanguageTitle dataview />,
placement: '${dataview.getOpenMode()}', placement: '${dataview.getOpenMode()}',
}; };
openPopOver(view, data); openPopOver(view, data);
<#else> <#else>
this.$Notice.warning({ title: '错误', desc: '${dataview.title} 不支持该模式打开' }); this.$Notice.warning({ title: '错误', desc: this.<@getViewLanguageTitle dataview />+'不支持该模式打开' });
</#if> </#if>
<#else> <#else>
this.$Notice.warning({ title: '错误', desc: '未指定关系视图' }); this.$Notice.warning({ title: '错误', desc: '未指定关系视图' });
......
<#ibizinclude>
../../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<#if item.getPSViewLogic?? && item.getPSViewLogic()??> <#if item.getPSViewLogic?? && item.getPSViewLogic()??>
<#assign viewlogic = item.getPSViewLogic()/> <#assign viewlogic = item.getPSViewLogic()/>
/** /**
...@@ -93,7 +96,7 @@ ...@@ -93,7 +96,7 @@
</#if> </#if>
<#-- END:准备参数 --> <#-- END:准备参数 -->
<#if dataview.isRedirectView()> <#if dataview.isRedirectView()>
<#if dataview.getViewType() == "DEWFDATAREDIRECTVIEW" && dataview.getViewType() == "APPWFREDIRECTVIEW"> <#if dataview.getViewType() == "DEWFDATAREDIRECTVIEW" || dataview.getViewType() == "APPWFREDIRECTVIEW">
<#-- 应用全局流程工作重定向视图and实体全局流程数据重定向视图start --> <#-- 应用全局流程工作重定向视图and实体全局流程数据重定向视图start -->
if(fullargs && fullargs.length >0){ if(fullargs && fullargs.length >0){
<#noparse>window.open(`${fullargs[0].viewurl}srfworklist=${fullargs[0].wfworklistid}`);</#noparse> <#noparse>window.open(`${fullargs[0].viewurl}srfworklist=${fullargs[0].wfworklistid}`);</#noparse>
...@@ -128,6 +131,11 @@ ...@@ -128,6 +131,11 @@
this.$router.push(routePath); this.$router.push(routePath);
} }
openIndexViewTab(data); openIndexViewTab(data);
<#elseif dataview.getOpenMode() == 'POPUPAPP'>
<#-- 打开独立程序弹出 -->
const _this: any = this;
const routePath = this.$viewTool.buildUpRoutePath(this.$route, curViewParam, deResParameters, parameters, args, data);
window.open('./#'+routePath, '_blank');
<#elseif dataview.getOpenMode() = 'POPUPMODAL'> <#elseif dataview.getOpenMode() = 'POPUPMODAL'>
<#-- 打开模态 --> <#-- 打开模态 -->
const _this: any = this; const _this: any = this;
...@@ -147,7 +155,7 @@ ...@@ -147,7 +155,7 @@
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: this.<@getViewLanguageTitle dataview />,
}; };
openPopupModal(view, data); openPopupModal(view, data);
<#elseif dataview.getOpenMode()?index_of('DRAWER') == 0> <#elseif dataview.getOpenMode()?index_of('DRAWER') == 0>
...@@ -169,7 +177,7 @@ ...@@ -169,7 +177,7 @@
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: this.<@getViewLanguageTitle dataview />,
placement: '${dataview.getOpenMode()}', placement: '${dataview.getOpenMode()}',
}; };
openDrawer(view, data); openDrawer(view, data);
...@@ -192,12 +200,12 @@ ...@@ -192,12 +200,12 @@
viewname: '${srffilepath2(dataview.getCodeName())}', viewname: '${srffilepath2(dataview.getCodeName())}',
height: ${dataview.getHeight()?c}, height: ${dataview.getHeight()?c},
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
title: '${dataview.title}', title: this.<@getViewLanguageTitle dataview />,
placement: '${dataview.getOpenMode()}', placement: '${dataview.getOpenMode()}',
}; };
openPopOver(view, data); openPopOver(view, data);
<#else> <#else>
this.$Notice.warning({ title: '错误', desc: '${dataview.title} 不支持该模式打开' }); this.$Notice.warning({ title: '错误', desc: this.<@getViewLanguageTitle dataview />+'不支持该模式打开' });
</#if> </#if>
<#else> <#else>
this.$Notice.warning({ title: '错误', desc: '未指定关系视图' }); this.$Notice.warning({ title: '错误', desc: '未指定关系视图' });
......
<#macro getViewLanguageTitle tempView>
<#if tempView.isPSDEView()>
$t('${tempView.getPSDataEntity().getCodeName()?lower_case}.views.${tempView.getPSDEViewCodeName()?lower_case}.title')<#t>
<#else>
$t('views.${tempView.getCodeName()?lower_case}.title')<#t>
</#if>
</#macro>
\ No newline at end of file
...@@ -9,8 +9,15 @@ ...@@ -9,8 +9,15 @@
<#ibizinclude> <#ibizinclude>
./VIEW_CONTENT-BASE.vue.ftl ./VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
/**
* 选中数据字符串
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() protected selectedData?: string;
/** /**
* 是否单选 * 是否单选
* *
* @type {boolean} * @type {boolean}
......
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
<#if self_viewparam??> <#if self_viewparam??>
${self_viewparam} ${self_viewparam}
</#if> </#if>
this.handleCustomViewData();
return; return;
} }
const path = (this.$route.matched[this.$route.matched.length - 1]).path; const path = (this.$route.matched[this.$route.matched.length - 1]).path;
...@@ -108,8 +109,96 @@ ...@@ -108,8 +109,96 @@
//初始化视图唯一标识 //初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()}); Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
</#if> </#if>
this.handleCustomViewData();
} }
/**
* 处理自定义视图数据
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public handleCustomViewData(){
<#if view.getPSDER1N?? && view.getPSDER1N()??>
this.handleviewRes();
</#if>
if(Object.keys(this.customViewNavContexts).length > 0){
Object.keys(this.customViewNavContexts).forEach((item:any) =>{
let tempContext:any = {};
let curNavContext:any = this.customViewNavContexts[item];
this.handleCustomDataLogic(curNavContext,tempContext,item);
Object.assign(this.context,tempContext);
})
}
if(Object.keys(this.customViewParams).length > 0){
Object.keys(this.customViewParams).forEach((item:any) =>{
let tempParam:any = {};
let curNavParam:any = this.customViewParams[item];
this.handleCustomDataLogic(curNavParam,tempParam,item);
Object.assign(this.viewparams,tempParam);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public handleCustomDataLogic(curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
Object.defineProperty(tempData, item, {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[curNavData.value]){
Object.defineProperty(tempData, item, {
value: this.context[curNavData.value],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(this.viewparams[curNavData.value]){
Object.defineProperty(tempData, item, {
value: this.viewparams[curNavData.value],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item, {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
<#if view.getPSDER1N?? && view.getPSDER1N()??>
/**
* 处理指定视图控制关系将父键转为父实体上下文
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public handleviewRes(){
<#assign viewRes = view.getPSDER1N()/>
<#if viewRes.getMajorPSDataEntity()??>
<#assign majorAppDataEntity = viewRes.getMajorPSDataEntity() />
if(this.context.srfparentkey){
Object.assign(this.context,{'${majorAppDataEntity.getCodeName()?lower_case}':this.context.srfparentkey});
}
</#if>
}
</#if>
/** /**
* Vue声明周期 * Vue声明周期
* *
...@@ -212,13 +301,18 @@ ${P.getLogicCode(logic, "LOGIC.vue").code} ...@@ -212,13 +301,18 @@ ${P.getLogicCode(logic, "LOGIC.vue").code}
</#list> </#list>
</#if> </#if>
<#if view.getPSUIActions()??> <#if view.getPSAppViewUIActions()??>
<#list view.getPSUIActions() as uiAction> <#list view.getPSAppViewUIActions() as viewUIAction>
<#if viewUIAction.getPSUIAction()?? >
<#assign uiAction = viewUIAction.getPSUIAction()/>
<#if !P.exists("importService", uiAction.getFullCodeName(), "")>
<#-- 系统预置界面行为输入start --> <#-- 系统预置界面行为输入start -->
<#if !(uiAction.getPSAppDataEntity?? && uiAction.getPSAppDataEntity()??)> <#if !(uiAction.getPSAppDataEntity?? && uiAction.getPSAppDataEntity()??)>
${P.getLogicCode(uiAction, "LOGIC.vue").code} ${P.getLogicCode(uiAction, "LOGIC.vue").code}
</#if> </#if>
<#-- 系统预置界面行为输入end --> <#-- 系统预置界面行为输入end -->
</#if>
</#if>
</#list> </#list>
</#if> </#if>
......
...@@ -131,6 +131,34 @@ export default class ${srfclassname('${view.name}')}Base extends Vue { ...@@ -131,6 +131,34 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
*/ */
protected viewtag: string = '${view.getId()}'; protected viewtag: string = '${view.getId()}';
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof ${srfclassname('${view.name}')}Base
*/
protected customViewNavContexts:any ={
<#if view.getPSAppViewNavContexts()??>
<#list view.getPSAppViewNavContexts() as viewNavContext>
"${viewNavContext.getKey()?lower_case}":{"isRawValue":${viewNavContext.isRawValue()?c},"value":"${viewNavContext.getValue()?lower_case}"}<#if viewNavContext_has_next>,</#if>
</#list>
</#if>
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof ${srfclassname('${view.name}')}Base
*/
protected customViewParams:any ={
<#if view.getPSAppViewNavParams()??>
<#list view.getPSAppViewNavParams() as viewNavParam>
"${viewNavParam.getKey()?lower_case}":{"isRawValue":${viewNavParam.isRawValue()?c},"value":"${viewNavParam.getValue()?lower_case}"}<#if viewNavParam_has_next>,</#if>
</#list>
</#if>
};
/** /**
* 视图模型数据 * 视图模型数据
* *
...@@ -138,9 +166,9 @@ export default class ${srfclassname('${view.name}')}Base extends Vue { ...@@ -138,9 +166,9 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
protected model: any = { protected model: any = {
srfTitle: '<#if view.getTitle()??>${view.getTitle()}</#if>',
srfCaption: '<#if view.getPSAppDataEntity()??>${view.getPSAppDataEntity().getCodeName()?lower_case}.views.${view.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${view.getCodeName()?lower_case}.caption</#if>', srfCaption: '<#if view.getPSAppDataEntity()??>${view.getPSAppDataEntity().getCodeName()?lower_case}.views.${view.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${view.getCodeName()?lower_case}.caption</#if>',
srfSubCaption: '<#if view.getSubCaption()??>${view.getSubCaption()}</#if>', srfTitle: '<#if view.getPSAppDataEntity()??>${view.getPSAppDataEntity().getCodeName()?lower_case}.views.${view.getPSDEViewCodeName()?lower_case}.title<#else>app.views.${view.getCodeName()?lower_case}.title</#if>',
srfSubTitle: '<#if view.getPSAppDataEntity()??>${view.getPSAppDataEntity().getCodeName()?lower_case}.views.${view.getPSDEViewCodeName()?lower_case}.subtitle<#else>app.views.${view.getCodeName()?lower_case}.subtitle</#if>',
dataInfo: '' dataInfo: ''
} }
...@@ -155,6 +183,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue { ...@@ -155,6 +183,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
onParamData(newVal: any, oldVal: any) { onParamData(newVal: any, oldVal: any) {
if(newVal){ if(newVal){
Object.assign(this.viewparams, JSON.parse(this.viewparam)); Object.assign(this.viewparams, JSON.parse(this.viewparam));
<#if watch_viewparam_block??>${watch_viewparam_block}</#if>
} }
} }
......
<#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=APPDEHTMLVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW-BASE.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=APPDEWFEDITVIEW9
\ No newline at end of file
...@@ -2,10 +2,23 @@ ...@@ -2,10 +2,23 @@
../@MACRO/LAYOUTPANEL_VIEW.template.ftl ../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude> </#ibizinclude>
<#assign watch_viewparam_block>
if(this.viewparams.selectedData){
this.selectedData = JSON.stringify(this.viewparams.selectedData);
}
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl ../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#assign mounted_block>
if(this.viewparams.selectedData){
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', this.viewparams.selectedData);
this.onCLickRight();
}
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl ../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
...@@ -15,7 +28,23 @@ ...@@ -15,7 +28,23 @@
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${view.name}')} * @memberof ${srfclassname('${view.name}')}
*/ */
@Prop({default: true}) public ifShowButtons!: boolean; @Prop({default: true}) public isShowButton!: boolean;
/**
* 选中数据的字符串
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
protected selectedData: string = "";
/**
* 是否初始化已选中项
*
* @type {any[]}
* @memberof ${srfclassname('${view.name}')}
*/
isInitSelected:boolean = false;
/** /**
* 视图选中数据 * 视图选中数据
......
...@@ -2,13 +2,32 @@ ...@@ -2,13 +2,32 @@
../@MACRO/LAYOUTPANEL_VIEW.template.ftl ../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude> </#ibizinclude>
<#assign watch_viewparam_block>
if(this.viewparams.selectedData){
this.selectedData = JSON.stringify(this.viewparams.selectedData);
}
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl ../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#assign mounted_block>
if(this.viewparams.selectedData){
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', this.viewparams.selectedData);
}
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl ../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
/**
* 选中数据的字符串
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
protected selectedData: string = "";
/** /**
* 视图选中数据 * 视图选中数据
...@@ -24,7 +43,7 @@ ...@@ -24,7 +43,7 @@
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
@Prop({default: true}) public ifShowButtons!: boolean; @Prop({default: true}) public isShowButton!: boolean;
/** /**
* 是否单选 * 是否单选
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${view.name}')} * @memberof ${srfclassname('${view.name}')}
*/ */
@Prop({default: true}) public ifShowButtons!: boolean; @Prop({default: true}) public isShowButton!: boolean;
/** /**
* 是否单选 * 是否单选
......
...@@ -9,20 +9,35 @@ ...@@ -9,20 +9,35 @@
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl ../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
/**
* 选中数据字符串
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() protected selectedData?: string;
/** /**
* 是否显示按钮 * 是否单选
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${view.name}')} * @memberof ${srfclassname('${view.name}')}
*/ */
@Prop({default: true}) public ifShowButtons!: boolean; @Prop() protected isSingleSelect?: boolean;
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Prop({default: true}) public isShowButton!: boolean;
/** /**
* 节点过滤值 * 节点过滤值
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${view.name}')} * @memberof ${srfclassname('${view.name}')}Base
*/ */
public srfnodefilter: string = ''; public srfnodefilter: string = '';
...@@ -30,7 +45,7 @@ ...@@ -30,7 +45,7 @@
* 快速搜索 * 快速搜索
* *
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${view.name}')} * @memberof ${srfclassname('${view.name}')}Base
*/ */
public onSearch(): void { public onSearch(): void {
if (!this.viewState) { if (!this.viewState) {
...@@ -41,33 +56,6 @@ ...@@ -41,33 +56,6 @@
</#if> </#if>
} }
/**
* 视图选中数据
*
* @type {any[]}
* @memberof ENTITYTEST1PickupView
*/
public viewSelections:any[] = [];
/**
* 确定
*
* @memberof ENTITYTEST1PickupView
*/
public onClickOk(): void {
this.$emit('viewdataschange', this.viewSelections);
this.$emit('close', null);
}
/**
* 取消
*
* @memberof ENTITYTEST1PickupView
*/
public onClickCancel(): void {
this.$emit('close', null);
}
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl ../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -64,10 +64,11 @@ export default class ${srfclassname('${item.getCodeName()}')} { ...@@ -64,10 +64,11 @@ export default class ${srfclassname('${item.getCodeName()}')} {
const data = response.data; const data = response.data;
resolve(this.doItems(data)); resolve(this.doItems(data));
} else { } else {
reject([]) resolve([]);
} }
}).catch((response: any) => { }).catch((response: any) => {
reject([]) console.error(response);
reject(response);
}); });
}); });
} }
...@@ -108,10 +109,11 @@ export default class ${srfclassname('${item.getCodeName()}')} { ...@@ -108,10 +109,11 @@ export default class ${srfclassname('${item.getCodeName()}')} {
const data = response.data; const data = response.data;
resolve(this.doItems(data)); resolve(this.doItems(data));
} else { } else {
reject([]) resolve([]);
} }
}).catch((response: any) => { }).catch((response: any) => {
reject([]) console.error(response);
reject(response);
}); });
}); });
} }
......
...@@ -33,5 +33,11 @@ export const Environment = { ...@@ -33,5 +33,11 @@ export const Environment = {
// 系统标识 // 系统标识
SysId: "B428B5BE-EA90-4101-A493-BA7085D89F0A", SysId: "B428B5BE-EA90-4101-A493-BA7085D89F0A",
// 前端应用标识 // 前端应用标识
AppId: "6e0b7357169ef4eba84e1347ed94bd84" AppId: "6e0b7357169ef4eba84e1347ed94bd84",
// 项目发布文件地址
PublishProjectUrl: '${app.getPSSystem().getReadOnlyPSSVNInstRepo().getGitPath()}',
// ibiz开放平台地址
ibizlabtUrl: 'https://www.ibizlab.cn',
// ibiz论坛地址
ibizbbstUrl: 'https://bbs.ibizlab.cn',
}; };
\ No newline at end of file
<#if obj.getCapPSLanguageRes()?? && obj.getCapPSLanguageRes().getContent(langrestype, false)?? && obj.getCapPSLanguageRes().getContent(langrestype, false) != ''>${obj.getCapPSLanguageRes().getContent(langrestype, false)}<#elseif obj.getCaption()??>${obj.getCaption()}</#if>
\ No newline at end of file
<#-- BEGIN:获取标题语言资源 -->
<#macro getTitleLanguage obj langrestype>
<#if obj.getTitlePSLanguageRes()?? && obj.getTitlePSLanguageRes().getContent(langrestype, false)?? && obj.getTitlePSLanguageRes().getContent(langrestype, false) != ''>
${obj.getTitlePSLanguageRes().getContent(langrestype, false)}<#t>
<#elseif obj.getCaption()??>
${obj.getCaption()}<#t>
</#if>
</#macro>
<#-- END:获取标题语言资源 -->
<#-- BEGIN:获取文本语言资源 -->
<#macro getTextLanguage obj langrestype>
<#if obj.getTextPSLanguageRes()?? && obj.getTextPSLanguageRes().getContent(langrestype, false)?? && obj.getTextPSLanguageRes().getContent(langrestype, false) != ''>
${obj.getTextPSLanguageRes().getContent(langrestype, false)}<#t>
<#elseif obj.getText()??>
${obj.getText()}<#t>
</#if>
</#macro>
<#-- END:获取文本语言资源 -->
<#-- BEGIN:获取树节点名称语言资源 -->
<#macro getNameLanguage obj langrestype>
<#if obj.getNamePSLanguageRes()?? && obj.getNamePSLanguageRes().getContent(langrestype, false)?? && obj.getNamePSLanguageRes().getContent(langrestype, false) != ''>
${obj.getNamePSLanguageRes().getContent(langrestype, false)}<#t>
<#elseif obj.getText()??>
${obj.getText()?j_string}<#t>
</#if>
</#macro>
<#-- END:获取树节点名称语言资源 -->
<#-- BEGIN:获取空值语言资源 -->
<#macro getEmptyTextLanguage obj langrestype emptyValue>
<#if obj.getEmptyTextPSLanguageRes()?? && obj.getEmptyTextPSLanguageRes().getContent(langrestype, false)?? && obj.getEmptyTextPSLanguageRes().getContent(langrestype, false) != ''>
${obj.getEmptyTextPSLanguageRes().getContent(langrestype, false)}<#t>
<#elseif obj.getEmptyText() != '未定义'>
${obj.getEmptyText()}<#t>
<#else>
${emptyValue}<#t>
</#if>
</#macro>
<#-- END:获取空值语言资源 -->
\ No newline at end of file
<#if obj.getTooltipPSLanguageRes()?? && obj.getTooltipPSLanguageRes().getContent(langrestype, false)?? && obj.getTooltipPSLanguageRes().getContent(langrestype, false) != ''>${obj.getCapPSLanguageRes().getContent(langrestype, false)}<#elseif obj.getTooltip()??>${obj.getTooltip()}</#if>
\ No newline at end of file
<#ibiztemplate> <#ibiztemplate>
TARGET=PSSYSAPP TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
<#ibizinclude>../@MACRO/FUNC.ts</#ibizinclude>
<#list app.getAllPSAppDataEntities() as dataEntitey> <#list app.getAllPSAppDataEntities() as dataEntitey>
import ${dataEntitey.getCodeName()?lower_case}_en_US from '@locale/lanres/${srffilepath2(dataEntitey.getCodeName())}/${srffilepath2(dataEntitey.getCodeName())}_en_US'; import ${dataEntitey.getCodeName()?lower_case}_en_US from '@locale/lanres/${srffilepath2(dataEntitey.getCodeName())}/${srffilepath2(dataEntitey.getCodeName())}_en_US';
</#list> </#list>
import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
<#assign langrestype = 'EN'/> <#assign langrestype = 'EN'/>
export default { export default {
...@@ -38,7 +41,8 @@ export default { ...@@ -38,7 +41,8 @@ export default {
<#list allAppViews as obj> <#list allAppViews as obj>
<#if !obj.isPSDEView()> <#if !obj.isPSDEView()>
${obj.getCodeName()?lower_case}: { ${obj.getCodeName()?lower_case}: {
caption: '<#ibizinclude>../@MACRO/CAPTIONLANG.tsx</#ibizinclude>', caption: '<#ibizinclude>../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
title: '<@getTitleLanguage obj langrestype />',
}, },
</#if> </#if>
</#list> </#list>
...@@ -48,13 +52,15 @@ export default { ...@@ -48,13 +52,15 @@ export default {
<#list app.getAllPSAppMenuModels() as menu> <#list app.getAllPSAppMenuModels() as menu>
${menu.getCodeName()?lower_case}: { ${menu.getCodeName()?lower_case}: {
<#list menu.getAllPSAppMenuItems() as obj> <#list menu.getAllPSAppMenuItems() as obj>
${obj.getName()?lower_case}: '<#ibizinclude>../@MACRO/CAPTIONLANG.tsx</#ibizinclude>', ${obj.getName()?lower_case}: '<#ibizinclude>../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
</#list> </#list>
}, },
</#list> </#list>
}, },
}, },
codelist: codelist_en_US,
<#list app.getAllPSAppDataEntities() as dataEntitey> <#list app.getAllPSAppDataEntities() as dataEntitey>
${dataEntitey.getCodeName()?lower_case}: ${dataEntitey.getCodeName()?lower_case}_en_US, ${dataEntitey.getCodeName()?lower_case}: ${dataEntitey.getCodeName()?lower_case}_en_US,
</#list> </#list>
userCustom: userCustom_en_US,
}; };
\ No newline at end of file
<#ibiztemplate> <#ibiztemplate>
TARGET=PSSYSAPP TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
<#ibizinclude>../@MACRO/FUNC.ts</#ibizinclude>
<#list app.getAllPSAppDataEntities() as dataEntitey> <#list app.getAllPSAppDataEntities() as dataEntitey>
import ${dataEntitey.getCodeName()?lower_case}_zh_CN from '@locale/lanres/${srffilepath2(dataEntitey.getCodeName())}/${srffilepath2(dataEntitey.getCodeName())}_zh_CN'; import ${dataEntitey.getCodeName()?lower_case}_zh_CN from '@locale/lanres/${srffilepath2(dataEntitey.getCodeName())}/${srffilepath2(dataEntitey.getCodeName())}_zh_CN';
</#list> </#list>
import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
<#assign langrestype = 'ZH_CN'/> <#assign langrestype = 'ZH_CN'/>
export default { export default {
...@@ -38,7 +41,8 @@ export default { ...@@ -38,7 +41,8 @@ export default {
<#list allAppViews as obj> <#list allAppViews as obj>
<#if !obj.isPSDEView()> <#if !obj.isPSDEView()>
${obj.getCodeName()?lower_case}: { ${obj.getCodeName()?lower_case}: {
caption: '<#ibizinclude>../@MACRO/CAPTIONLANG.tsx</#ibizinclude>', caption: '<#ibizinclude>../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
title: '<@getTitleLanguage obj langrestype />',
}, },
</#if> </#if>
</#list> </#list>
...@@ -48,13 +52,15 @@ export default { ...@@ -48,13 +52,15 @@ export default {
<#list app.getAllPSAppMenuModels() as menu> <#list app.getAllPSAppMenuModels() as menu>
${menu.getCodeName()?lower_case}: { ${menu.getCodeName()?lower_case}: {
<#list menu.getAllPSAppMenuItems() as obj> <#list menu.getAllPSAppMenuItems() as obj>
${obj.getName()?lower_case}: '<#ibizinclude>../@MACRO/CAPTIONLANG.tsx</#ibizinclude>', ${obj.getName()?lower_case}: '<#ibizinclude>../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
</#list> </#list>
}, },
</#list> </#list>
}, },
}, },
codelist: codelist_zh_CN,
<#list app.getAllPSAppDataEntities() as dataEntitey> <#list app.getAllPSAppDataEntities() as dataEntitey>
${dataEntitey.getCodeName()?lower_case}: ${dataEntitey.getCodeName()?lower_case}_zh_CN, ${dataEntitey.getCodeName()?lower_case}: ${dataEntitey.getCodeName()?lower_case}_zh_CN,
</#list> </#list>
userCustom: userCustom_zh_CN,
}; };
\ No newline at end of file
<#ibiztemplate> <#ibiztemplate>
TARGET=PSAPPDATAENTITY TARGET=PSAPPDATAENTITY
</#ibiztemplate> </#ibiztemplate>
<#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude>
<#assign langrestype = 'EN'/> <#assign langrestype = 'EN'/>
export default { export default {
...@@ -9,14 +10,15 @@ export default { ...@@ -9,14 +10,15 @@ export default {
views: { views: {
<#list item.getAllPSAppViews() as obj> <#list item.getAllPSAppViews() as obj>
${obj.getPSDEViewCodeName()?lower_case}: { ${obj.getPSDEViewCodeName()?lower_case}: {
caption: "<#ibizinclude>../../@MACRO/CAPTIONLANG.tsx</#ibizinclude>", caption: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
title: '<@getTitleLanguage obj langrestype />',
}, },
</#list> </#list>
}, },
</#if> </#if>
<#-- 实体部件输出 --> <#-- 实体部件输出 -->
<#if item.getPSControls()??> <#if item.getPSControls()??>
<#assign ctrltypes = ['FORM', 'GRID', 'SEARCHFORM', 'TOOLBAR']> <#assign ctrltypes = ['FORM', 'GRID', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW']>
<#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>
...@@ -25,7 +27,7 @@ export default { ...@@ -25,7 +27,7 @@ export default {
<#if ctrl.getControlType() == 'FORM' || ctrl.getControlType() == 'SEARCHFORM'> <#if ctrl.getControlType() == 'FORM' || ctrl.getControlType() == 'SEARCHFORM'>
details: { details: {
<#list ctrl.getAllPSDEFormDetails() as obj> <#list ctrl.getAllPSDEFormDetails() as obj>
${obj.name?lower_case}: "<#ibizinclude>../../@MACRO/CAPTIONLANG.tsx</#ibizinclude>", ${obj.name?lower_case}: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
</#list> </#list>
}, },
</#if> </#if>
...@@ -33,17 +35,28 @@ export default { ...@@ -33,17 +35,28 @@ export default {
columns: { columns: {
<#if ctrl.getAllPSDEGridColumns()??> <#if ctrl.getAllPSDEGridColumns()??>
<#list ctrl.getAllPSDEGridColumns() as obj> <#list ctrl.getAllPSDEGridColumns() as obj>
${obj.getName()?lower_case}: "<#ibizinclude>../../@MACRO/CAPTIONLANG.tsx</#ibizinclude>", ${obj.getName()?lower_case}: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
</#list> </#list>
</#if> </#if>
}, },
</#if> </#if>
<#if ctrl.getControlType() == 'TREEVIEW'>
nodes: {
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as obj>
<#if obj.getTreeNodeType() == 'STATIC'>
${obj.getNodeType()?lower_case}: '<@getNameLanguage obj langrestype />',
</#if>
</#list>
</#if>
},
</#if>
<#if ctrl.getControlType() == 'TOOLBAR'> <#if ctrl.getControlType() == 'TOOLBAR'>
<#if ctrl.getAllPSDEToolbarItems()??> <#if ctrl.getAllPSDEToolbarItems()??>
<#list ctrl.getAllPSDEToolbarItems() as obj> <#list ctrl.getAllPSDEToolbarItems() as obj>
${obj.getName()?lower_case}: { ${obj.getName()?lower_case}: {
caption: "<#ibizinclude>../../@MACRO/CAPTIONLANG.tsx</#ibizinclude>", caption: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
tip: "${obj.getName()?lower_case}", tip: "<#ibizinclude>../../@MACRO/TIPLANG.ts</#ibizinclude>",
}, },
</#list> </#list>
</#if> </#if>
...@@ -52,7 +65,7 @@ export default { ...@@ -52,7 +65,7 @@ export default {
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??> <#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
uiactions: { uiactions: {
<#list ctrl.getPSUIActions() as obj> <#list ctrl.getPSUIActions() as obj>
${obj.getUIActionTag()?lower_case}: "<#ibizinclude>../../@MACRO/CAPTIONLANG.tsx</#ibizinclude>", ${obj.getUIActionTag()?lower_case}: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
</#list> </#list>
}, },
</#if> </#if>
......
<#ibiztemplate> <#ibiztemplate>
TARGET=PSAPPDATAENTITY TARGET=PSAPPDATAENTITY
</#ibiztemplate> </#ibiztemplate>
<#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude>
<#assign langrestype = 'ZH_CN'/> <#assign langrestype = 'ZH_CN'/>
export default { export default {
<#-- 实体视图输出 --> <#-- 实体视图输出 -->
...@@ -8,14 +9,15 @@ export default { ...@@ -8,14 +9,15 @@ export default {
views: { views: {
<#list item.getAllPSAppViews() as obj> <#list item.getAllPSAppViews() as obj>
${obj.getPSDEViewCodeName()?lower_case}: { ${obj.getPSDEViewCodeName()?lower_case}: {
caption: '<#ibizinclude>../../@MACRO/CAPTIONLANG.tsx</#ibizinclude>', caption: '<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
title: '<@getTitleLanguage obj langrestype />',
}, },
</#list> </#list>
}, },
</#if> </#if>
<#-- 实体部件输出 --> <#-- 实体部件输出 -->
<#if item.getPSControls()??> <#if item.getPSControls()??>
<#assign ctrltypes = ['FORM', 'GRID', 'SEARCHFORM', 'TOOLBAR']> <#assign ctrltypes = ['FORM', 'GRID', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW']>
<#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>
...@@ -24,7 +26,7 @@ export default { ...@@ -24,7 +26,7 @@ export default {
<#if ctrl.getControlType() == 'FORM' || ctrl.getControlType() == 'SEARCHFORM'> <#if ctrl.getControlType() == 'FORM' || ctrl.getControlType() == 'SEARCHFORM'>
details: { details: {
<#list ctrl.getAllPSDEFormDetails() as obj> <#list ctrl.getAllPSDEFormDetails() as obj>
${obj.name?lower_case}: '<#ibizinclude>../../@MACRO/CAPTIONLANG.tsx</#ibizinclude>', ${obj.name?lower_case}: '<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
</#list> </#list>
}, },
</#if> </#if>
...@@ -32,26 +34,37 @@ export default { ...@@ -32,26 +34,37 @@ export default {
columns: { columns: {
<#if ctrl.getAllPSDEGridColumns()??> <#if ctrl.getAllPSDEGridColumns()??>
<#list ctrl.getAllPSDEGridColumns() as obj> <#list ctrl.getAllPSDEGridColumns() as obj>
${obj.getName()?lower_case}: '<#ibizinclude>../../@MACRO/CAPTIONLANG.tsx</#ibizinclude>', ${obj.getName()?lower_case}: '<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
</#list>
</#if>
},
</#if>
<#if ctrl.getControlType() == 'TREEVIEW'>
nodes: {
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as obj>
<#if obj.getTreeNodeType() == 'STATIC'>
${obj.getNodeType()?lower_case}: '<@getNameLanguage obj langrestype />',
</#if>
</#list> </#list>
</#if> </#if>
}, },
</#if> </#if>
<#if ctrl.getControlType() == 'TOOLBAR'> <#if ctrl.getControlType() == 'TOOLBAR'>
<#if ctrl.getAllPSDEToolbarItems()??> <#if ctrl.getAllPSDEToolbarItems()??>
<#list ctrl.getAllPSDEToolbarItems() as obj> <#list ctrl.getAllPSDEToolbarItems() as obj>
${obj.getName()?lower_case}: { ${obj.getName()?lower_case}: {
caption: '<#ibizinclude>../../@MACRO/CAPTIONLANG.tsx</#ibizinclude>', caption: '<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
tip: '<#ibizinclude>../../@MACRO/TIPLANG.tsx</#ibizinclude>', tip: '<#ibizinclude>../../@MACRO/TIPLANG.ts</#ibizinclude>',
}, },
</#list> </#list>
</#if> </#if>
</#if> </#if>
<#-- 部件界面行为 --> <#-- 部件界面行为 -->
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??> <#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
uiactions: { uiactions: {
<#list ctrl.getPSUIActions() as obj> <#list ctrl.getPSUIActions() as obj>
${obj.getUIActionTag()?lower_case}: '<#ibizinclude>../../@MACRO/CAPTIONLANG.tsx</#ibizinclude>', ${obj.getUIActionTag()?lower_case}: '<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
</#list> </#list>
}, },
</#if> </#if>
......
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude>
<#assign langrestype = 'EN'/>
export default {
<#if app.getAllPSAppCodeLists()??>
<#list app.getAllPSAppCodeLists() as codelist>
<#if codelist.getCodeListType() == "STATIC" && codelist.getAllPSCodeItems()??>
${codelist.codeName}: {
<#list codelist.getAllPSCodeItems() as codeitem>
${codeitem.getValue()?j_string}: '<@getTextLanguage codeitem langrestype />',
</#list>
empty: '<@getEmptyTextLanguage codelist langrestype '' />',
},
<#elseif codelist.getCodeListType() == "DYNAMIC">
${codelist.codeName}: {
empty: '<@getEmptyTextLanguage codelist langrestype '' />',
},
</#if>
</#list>
</#if>
};
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude>
<#assign langrestype = 'ZH_CN'/>
export default {
<#if app.getAllPSAppCodeLists()??>
<#list app.getAllPSAppCodeLists() as codelist>
<#if codelist.getCodeListType() == "STATIC" && codelist.getAllPSCodeItems()??>
${codelist.codeName}: {
<#list codelist.getAllPSCodeItems() as codeitem>
${codeitem.getValue()?j_string}: '<@getTextLanguage codeitem langrestype />',
</#list>
empty: '<@getEmptyTextLanguage codelist langrestype '' />',
},
<#elseif codelist.getCodeListType() == "DYNAMIC">
${codelist.codeName}: {
empty: '<@getEmptyTextLanguage codelist langrestype '' />',
},
</#if>
</#list>
</#if>
};
\ No newline at end of file
...@@ -17,6 +17,63 @@ const mock = MockAdapter.getInstance(); ...@@ -17,6 +17,63 @@ const mock = MockAdapter.getInstance();
</#macro> </#macro>
<#-- 日志方法: END --> <#-- 日志方法: END -->
<#-- 输出排序方法: BEGIN -->
<#-- 排序宏 -->
<#macro outputSort priority position>
<#assign outputSort_nested><#nested></#assign>
<#if !outputSort_maxPriority?has_content>
<#assign outputSort_maxPriority = priority>
<#else>
<#if priority gt outputSort_maxPriority >
<#assign outputSort_maxPriority = priority>
</#if>
</#if>
<#assign outputSort_template>${
"<#if position == 'before'>
<#assign outputSort_param"+priority+">
"+r"${outputSort_nested}<#t>"+"
<#if outputSort_param"+priority+"?has_content>"+r"${outputSort_param"+priority+"}</#if><#t>
</#assign>
</#if>
<#if position== 'after'>
<#assign outputSort_param"+priority+">
<#if outputSort_param"+priority+"?has_content>"+r"${outputSort_param"+priority+"}</#if><#t>
"+r"${outputSort_nested}<#t>"+"
</#assign>
</#if>"
}</#assign>
<@outputSort_template?interpret />
</#macro>
<#-- 输出宏 -->
<#macro outputSort_print>
<#if outputSort_maxPriority?has_content && outputSort_maxPriority?is_number>
<#list 0..outputSort_maxPriority as i >
<#assign outputSort_template>${
"<#if outputSort_param"+i+"?has_content>"
+r"${outputSort_param"+i+"}<#t>"
+"</#if>"
}</#assign>
<@outputSort_template?interpret />
</#list>
</#if>
</#macro>
<#-- 重置变量 -->
<#macro outputSort_clear>
<#if outputSort_maxPriority?has_content && outputSort_maxPriority?is_number>
<#list 0..outputSort_maxPriority as i >
<#assign outputSort_template>${
"<#if outputSort_param"+i+"?has_content>"
+r"<#assign outputSort_param"+i+r"=''/>"
+"</#if>"
}</#assign>
<@outputSort_template?interpret />
</#list>
<#assign outputSort_maxPriority='' />
</#if>
</#macro>
<#-- 输出排序方法: END -->
<@outputSort_clear />
// 模拟数据 // 模拟数据
const mockDatas: Array<any> = [ const mockDatas: Array<any> = [
<#if de.getAllPSDESampleDatas?? && de.getAllPSDESampleDatas()??> <#if de.getAllPSDESampleDatas?? && de.getAllPSDESampleDatas()??>
...@@ -165,14 +222,15 @@ mock.onPost(new RegExp(/wf\/${workflow.getCodeName()?lower_case}\/v${wfversion.g ...@@ -165,14 +222,15 @@ mock.onPost(new RegExp(/wf\/${workflow.getCodeName()?lower_case}\/v${wfversion.g
</#list> --> </#list> -->
</#if> </#if>
<#-- 实体接口mock数据start --> <#-- 实体接口mock数据:BEGIN -->
<#if item.getAllPSAppDEMethods?? && item.getAllPSAppDEMethods()??> <#if item.getAllPSAppDEMethods?? && item.getAllPSAppDEMethods()??>
<#list item.getAllPSAppDEMethods() as singleAppMethod> <#list item.getAllPSAppDEMethods() as singleAppMethod>
<#if singleAppMethod.getPSDEServiceAPIMethod?? && singleAppMethod.getPSDEServiceAPIMethod()??> <#if singleAppMethod.getPSDEServiceAPIMethod?? && singleAppMethod.getPSDEServiceAPIMethod()??>
<#assign singleServiceApi = singleAppMethod.getPSDEServiceAPIMethod()/> <#assign singleServiceApi = singleAppMethod.getPSDEServiceAPIMethod()/>
</#if> </#if>
<#-- 应用实体关系路径数大于0 && 拥有实体服务接口方法: BEGIN -->
<#if item.getPSAppDERSPathCount() gt 0 && singleServiceApi??> <#if item.getPSAppDERSPathCount() gt 0 && singleServiceApi??>
<#list 1..item.getPSAppDERSPathCount() as count> <#list 1..item.getPSAppDERSPathCount() as count>
<#assign path = ''/> <#assign path = ''/>
<#assign param = ''/> <#assign param = ''/>
<#list item.getPSAppDERSPath(count_index) as deRSPath> <#list item.getPSAppDERSPath(count_index) as deRSPath>
...@@ -183,7 +241,7 @@ mock.onPost(new RegExp(/wf\/${workflow.getCodeName()?lower_case}\/v${wfversion.g ...@@ -183,7 +241,7 @@ mock.onPost(new RegExp(/wf\/${workflow.getCodeName()?lower_case}\/v${wfversion.g
</#if> </#if>
</#list> </#list>
<#-- 方法类型为SELECT --> <#-- 方法类型为SELECT: BEGIN -->
<#if singleAppMethod.getMethodType() == "SELECT"> <#if singleAppMethod.getMethodType() == "SELECT">
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
...@@ -209,7 +267,8 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new ...@@ -209,7 +267,8 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new
<@endLog appMethod=singleAppMethod dataName="_items"/> <@endLog appMethod=singleAppMethod dataName="_items"/>
return [status, _items]; return [status, _items];
}); });
<#-- 方法类型为FETCH --> <#-- 方法类型为SELECT: END -->
<#-- 方法类型为FETCH: BEGIN -->
<#elseif singleAppMethod.getMethodType() == "FETCH"> <#elseif singleAppMethod.getMethodType() == "FETCH">
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
...@@ -251,10 +310,11 @@ mock.onGet(new RegExp(/^\/${path}${srfpluralize(item.codeName)?lower_case}<#if s ...@@ -251,10 +310,11 @@ mock.onGet(new RegExp(/^\/${path}${srfpluralize(item.codeName)?lower_case}<#if s
<@endLog appMethod=singleAppMethod dataName="items"/> <@endLog appMethod=singleAppMethod dataName="items"/>
return [status, items]; return [status, items];
}); });
<#-- 方法类型为FETCH: END -->
<#-- 方法类型为DEACTION: BEGIN -->
<#else> <#else>
<#-- 方法类型为DEACTION start --> <#-- 方法请求不需要参数情况: BEGIN -->
<#if singleServiceApi.getRequestParamType() == "NONE"> <#if singleServiceApi.getRequestParamType() == "NONE">
<#-- 无参数情况start,如GetDraft -->
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => { mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => {
...@@ -267,9 +327,10 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new ...@@ -267,9 +327,10 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new
<@endLog appMethod=singleAppMethod dataName="{}"/> <@endLog appMethod=singleAppMethod dataName="{}"/>
return [status, {}]; return [status, {}];
}); });
<#-- 无参数情况end --> <#-- 方法请求不需要参数情况: END -->
<#-- 方法请求参数为指定字段属性值: BEGIN -->
<#elseif singleServiceApi.getRequestParamType() == "FIELD"> <#elseif singleServiceApi.getRequestParamType() == "FIELD">
<#-- 指定属性情况start --> <@outputSort 1 'after'>
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${path}${srfpluralize(item.codeName)?lower_case}\/([a-zA-Z0-9\-\;]{1,35})<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => { mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${path}${srfpluralize(item.codeName)?lower_case}\/([a-zA-Z0-9\-\;]{1,35})<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => {
...@@ -294,9 +355,10 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new ...@@ -294,9 +355,10 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new
<@endLog appMethod=singleAppMethod dataName="_items?_items:{}"/> <@endLog appMethod=singleAppMethod dataName="_items?_items:{}"/>
return [status, _items?_items:{}]; return [status, _items?_items:{}];
}); });
<#-- 指定属性情况start --> </@outputSort>
<#-- 方法请求参数为指定字段属性值: END -->
<#-- 方法请求参数为实体对象数据: BEGIN -->
<#elseif singleServiceApi.getRequestParamType() == "ENTITY"> <#elseif singleServiceApi.getRequestParamType() == "ENTITY">
<#-- 提交对象数据情况start -->
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${path}${srfpluralize(item.codeName)?lower_case}\/([a-zA-Z0-9\-\;]{1,35})<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => { mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${path}${srfpluralize(item.codeName)?lower_case}\/([a-zA-Z0-9\-\;]{1,35})<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => {
...@@ -319,19 +381,20 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new ...@@ -319,19 +381,20 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new
<@endLog appMethod=singleAppMethod dataName="{}"/> <@endLog appMethod=singleAppMethod dataName="{}"/>
return [status, {}]; return [status, {}];
}); });
<#-- 提交对象数据情况start --> <#-- 方法请求参数为实体对象数据: END -->
<#-- 方法请求参数为URI参数数据: BEGIN -->
<#else> <#else>
<#-- URI参数传递情况start -->
// URI参数传递情况未实现 // URI参数传递情况未实现
<#-- URI参数传递情况start -->
</#if> </#if>
<#-- 方法类型为DEACTION end --> <#-- 方法请求参数为URI参数数据: END -->
</#if> </#if>
</#list> <#-- 方法类型为DEACTION: END -->
</#list>
</#if> </#if>
<#-- 应用实体关系路径数大于0 && 拥有实体服务接口方法: END -->
<#-- 主实体方法: BEGIN -->
<#if item.isMajor()> <#if item.isMajor()>
<#-- 方法类型为SELECT: BEGIN -->
<#-- 方法类型为SELECT -->
<#if singleAppMethod.getMethodType() == "SELECT"> <#if singleAppMethod.getMethodType() == "SELECT">
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
...@@ -357,7 +420,8 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new ...@@ -357,7 +420,8 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new
<@endLog appMethod=singleAppMethod dataName="_items"/> <@endLog appMethod=singleAppMethod dataName="_items"/>
return [status, _items]; return [status, _items];
}); });
<#-- 方法类型为FETCH --> <#-- 方法类型为SELECT: EWND -->
<#-- 方法类型为FETCH: BEGIN -->
<#elseif singleAppMethod.getMethodType() == "FETCH"> <#elseif singleAppMethod.getMethodType() == "FETCH">
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
...@@ -371,9 +435,8 @@ mock.onGet(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}<#if singleSe ...@@ -371,9 +435,8 @@ mock.onGet(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}<#if singleSe
return [status, mockDatas ? mockDatas : []]; return [status, mockDatas ? mockDatas : []];
}); });
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
mock.onGet(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>(\?[\w-./?%&=]*)*$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
<@startLog singleAppMethod /> <@startLog singleAppMethod />
if(config.url.includes('page')){ if(config.url.includes('page')){
let url = config.url.split('?')[1]; let url = config.url.split('?')[1];
...@@ -401,12 +464,11 @@ mock.onGet(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}<#if singleSe ...@@ -401,12 +464,11 @@ mock.onGet(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}<#if singleSe
<@endLog appMethod=singleAppMethod dataName="records ? records : []"/> <@endLog appMethod=singleAppMethod dataName="records ? records : []"/>
return [status, records ? records : []]; return [status, records ? records : []];
}); });
<#-- 方法类型为FETCH: END -->
<#-- 方法类型为DEACTION: BEGIN -->
<#else> <#else>
<#-- 方法类型为DEACTION start --> <#-- 方法请求不需要参数情况: BEGIN -->
<#if singleServiceApi.getRequestParamType() == "NONE"> <#if singleServiceApi.getRequestParamType() == "NONE">
<#-- 无参数情况start -->
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => { mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => {
...@@ -419,9 +481,11 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new ...@@ -419,9 +481,11 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new
<@endLog appMethod=singleAppMethod dataName="{}"/> <@endLog appMethod=singleAppMethod dataName="{}"/>
return [status, {}]; return [status, {}];
}); });
<#-- 无参数情况end --> <#-- 方法请求不需要参数情况: END -->
<#-- 方法请求参数为指定字段属性值: BEGIN -->
<#elseif singleServiceApi.getRequestParamType() == "FIELD"> <#elseif singleServiceApi.getRequestParamType() == "FIELD">
<#-- 指定属性情况start --> <@outputSort 1 'after'>
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}\/([a-zA-Z0-9\-\;]{1,35})<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => { mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}\/([a-zA-Z0-9\-\;]{1,35})<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => {
<@startLog singleAppMethod /> <@startLog singleAppMethod />
...@@ -445,9 +509,10 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new ...@@ -445,9 +509,10 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new
<@endLog appMethod=singleAppMethod dataName="_items?_items:{}"/> <@endLog appMethod=singleAppMethod dataName="_items?_items:{}"/>
return [status, _items?_items:{}]; return [status, _items?_items:{}];
}); });
<#-- 指定属性情况start --> </@outputSort>
<#-- 方法请求参数为指定字段属性值: END -->
<#-- 方法请求参数为实体对象数据: BEGIN -->
<#elseif singleServiceApi.getRequestParamType() == "ENTITY"> <#elseif singleServiceApi.getRequestParamType() == "ENTITY">
<#-- 提交对象数据情况start -->
// ${singleAppMethod.getCodeName()} // ${singleAppMethod.getCodeName()}
mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}\/?([a-zA-Z0-9\-\;]{0,35})<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => { mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}\/?([a-zA-Z0-9\-\;]{0,35})<#if singleServiceApi.getRequestPath()??>\${singleServiceApi.getRequestPath()}</#if>$/)).reply((config: any) => {
...@@ -487,15 +552,18 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new ...@@ -487,15 +552,18 @@ mock.on${srfclassname('${singleServiceApi.getRequestMethod()?lower_case}')}(new
return [status, data]; return [status, data];
</#if> </#if>
}); });
<#-- 提交对象数据情况start --> <#-- 方法请求参数为实体对象数据: END -->
<#-- 方法请求参数为URI参数数据: BEGIN -->
<#else> <#else>
<#-- URI参数传递情况start -->
// URI参数传递情况未实现 // URI参数传递情况未实现
<#-- URI参数传递情况start -->
</#if> </#if>
<#-- 方法类型为DEACTION end --> <#-- 方法请求参数为URI参数数据: END -->
</#if> </#if>
<#-- 方法类型为DEACTION: END -->
</#if> </#if>
</#list> <#-- 主实体方法: END -->
</#list>
</#if> </#if>
<#-- 实体接口mock数据end --> <#-- 实体接口mock数据end -->
\ No newline at end of file
<@outputSort_print />
\ No newline at end of file
...@@ -20,7 +20,7 @@ import { Verify } from '@/utils/verify/verify'; ...@@ -20,7 +20,7 @@ import { Verify } from '@/utils/verify/verify';
<#if logicNode.getPSDELogicNodeParams()??> <#if logicNode.getPSDELogicNodeParams()??>
<#list logicNode.getPSDELogicNodeParams() as logicparam> <#list logicNode.getPSDELogicNodeParams() as logicparam>
<#if logicparam.getSrcFieldName()?? && logicparam.getDstFieldName()??> <#if logicparam.getSrcFieldName()?? && logicparam.getDstFieldName()??>
Object.assign(params,{${logicparam.getDstFieldName()?lower_case}:params.${logicparam.getSrcFieldName()?lower_case}}); Object.assign(params,{${logicparam.getDstFieldName()?lower_case}:<#if logicparam.getSrcFieldName()?? && logicparam.getSrcFieldName() != "">params.${logicparam.getSrcFieldName()?lower_case}<#else>params.${logicparam.getDstFieldName()?lower_case}</#if>});
<#if logicparam.getDstPSDELogicParam?? && logicparam.getDstPSDELogicParam()?? && logicparam.getDstPSDELogicParam().getParamPSAppDataEntity()??> <#if logicparam.getDstPSDELogicParam?? && logicparam.getDstPSDELogicParam()?? && logicparam.getDstPSDELogicParam().getParamPSAppDataEntity()??>
<#if logicparam.getSrcFieldName()?lower_case?contains("id") > <#if logicparam.getSrcFieldName()?lower_case?contains("id") >
Object.assign(context,{${logicparam.getDstPSDELogicParam().getParamPSAppDataEntity().getCodeName()?lower_case}:params.${logicparam.getSrcFieldName()?lower_case}}); Object.assign(context,{${logicparam.getDstPSDELogicParam().getParamPSAppDataEntity().getCodeName()?lower_case}:params.${logicparam.getSrcFieldName()?lower_case}});
......
...@@ -66,9 +66,25 @@ export default class CodeListService { ...@@ -66,9 +66,25 @@ export default class CodeListService {
*/ */
public getItems(tag: string,context:any = {}, data?: any, isloading?: boolean,): Promise<any[]> { public getItems(tag: string,context:any = {}, data?: any, isloading?: boolean,): Promise<any[]> {
let _this: any = this; let _this: any = this;
if (_this[tag]) { return new Promise((resolve:any,reject:any) =>{
return _this[tag].getItems(context,data,isloading); if(this.$store && _this.$store.getters){
} let items:any = _this.$store.getters.getCodeListItems(tag);
return Promise.reject([]); if(items.length >0){
return resolve(items);
}
}
if (_this[tag]) {
_this[tag].getItems(context,data,isloading).then((result:any) =>{
if(result.length > 0){
_this.$store.commit('updateCodeList',{srfkey:tag,items:result});
return resolve(result);
}else{
return resolve([]);
}
}).catch((result:any) =>{
return reject(result);
})
}
})
} }
} }
\ No newline at end of file
...@@ -2,3 +2,20 @@ ...@@ -2,3 +2,20 @@
初始化 初始化
#### bug修复
- 支持表格激活模式配置,可以禁止双击
- 模板:表格视图、表格部件视图给表格部件传递参数,表格内部双击功能加判断([#841270c8](http://172.16.180.229/wangxiang1/VUE_R7_FTL/commit/841270c8b7781ad4b8541873654ce7778fa5a2e5) by @lxm)
- 行编辑日期类编辑器宽度过宽调整
- 模板:去除行编辑日期类最小宽度的样式([#80100810](http://172.16.180.229/wangxiang1/VUE_R7_FTL/commit/80100810d7fcb1f8bfa3081386dd10209820e292) by @lxm)
- 行编辑文件上传修改,更改预览方式
- 模板:修改行编辑下文件上传和图片上传编辑器的绘制([#d21fe738](http://172.16.180.229/wangxiang1/VUE_R7_FTL/commit/d21fe73810a58fe6ef1fc5527dbbdf43e7197798) [#e0879bfa](http://172.16.180.229/wangxiang1/VUE_R7_FTL/commit/e0879bfa81eff2ce75a4c1bfcfbba7095f094116) by @lxm)
- 基础文件:修改app-file-upload组件([#5b2b8f8](https://gitee.com/dev_ibizsys/VUE_R7/commit/5b2b8f8f3181bcd74b3d86daac53b3215924b698) by @lxm)
- 基础样式修改
- 模板:表格选中样式调整([#b8380914](http://172.16.180.229/wangxiang1/VUE_R7_FTL/commit/d21fe73810a58fe6ef1fc5527dbbdf43e7197798) [#e0879bfa](http://172.16.180.229/wangxiang1/VUE_R7_FTL/commit/b83809147cd35960743c937f7ed644ac3b9fd199) by @lxm)
- 基础文件:修改app-file-upload组件([#ee3b397](https://gitee.com/dev_ibizsys/VUE_R7/commit/ee3b397277fc625f8291655f32c28e927acc1007 [5756196](https://gitee.com/dev_ibizsys/VUE_R7/commit/5756196f21b2ab4be5243dedea8bca1b8c9aed45) ) by @lxm)
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册