提交 853bf2e0 编写于 作者: yanshaowei's avatar yanshaowei

init

上级
流水线 #220 已失败 ,包含阶段
<script lang="ts">
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
<#if self_header??>
${self_header}
<#elseif default_header??>
${default_header}
</#if>
@Component({
components: {
<@ibizindent blank=8>
<#if components??>
${components}
</#if>
</@ibizindent>
}
})
export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue {
<@ibizindent blank=0>
<#if default_content??>
${default_content}
</#if>
<#if self_content??>
${self_content}
</#if>
</@ibizindent>
}
</script>
\ No newline at end of file
<!-- <template>
this is html
</template> -->
<#assign default_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
</#assign>
<#assign components>
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
view_${subctrl.getName()},
</#if>
</#list>
</#if>
<#if self_components??>${self_components}</#if>
</#assign>
<script lang="ts">
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import ${srfclassname('${ctrl.codeName}')}Base from './${srffilepath2('${ctrl.getCodeName()}')}-${ctrl.getControlType()?lower_case}-base.vue';
<#if self_header??>
${self_header}
<#elseif default_header??>
${default_header}
</#if>
@Component({
components: {
<@ibizindent blank=8>
<#if components??>
${components}
</#if>
</@ibizindent>
}
})
export default class ${srfclassname('${ctrl.codeName}')} extends ${srfclassname('${ctrl.codeName}')}Base {
}
</script>
<style lang="less">
//this is less
</style>
\ No newline at end of file
<#assign default_header>
import { Subject,Subscription } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
</#assign>
<#assign components>
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
view_${subctrl.getName()},
</#if>
</#list>
</#if>
<#if self_components??>${self_components}</#if>
</#assign>
<#assign default_content>
/**
* 名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 是否为内敛试图
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public isembeddedView?: boolean;
/**
* 是否为模态模式
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public isModalMode?: string;
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType()??>
<#if childCtrl.getHookEventNames()??>
<#list childCtrl.getHookEventNames() as eventName>
/**
* ${childCtrl.name} 部件 ${eventName?lower_case} 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public ${childCtrl.name}_${eventName?lower_case}($event: any, $event2?: any) {
<#if childCtrl.getPSControlLogics(eventName)??>
<#list childCtrl.getPSControlLogics(eventName) as ctrlLogic>
<#if ctrlLogic.getLogicType?? && ctrlLogic.getLogicType() == "APPVIEWENGINE" && ctrlLogic.getPSAppViewEngine()??>
this.${ctrlLogic.getPSAppViewEngine().getName()}.onCtrlEvent('${childCtrl.name}', '${eventName?lower_case}', $event);
<#else>
<#if ctrlLogic.getEventArg()?? && ctrlLogic.getEventArg()?length gt 0>
if (Object.is($event.tag, '${ctrlLogic.getEventArg()}')) {
this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
}
<#else>
this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
</#if>
</#if>
</#list>
</#if>
}
</#list>
</#if>
</#if>
</#list>
</#if>
<#if ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getLogicTrigger() == "CUSTOM" || logic.getLogicTrigger() == "CTRLEVENT">
${P.getLogicCode(logic, "LOGIC.vue").code}
</#if>
</#list>
</#if>
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
<@ibizindent blank=4>
<#list ctrl.getPSUIActions() as uiAction>
${P.getLogicCode(uiAction, "LOGIC.vue").code}
</#list>
</@ibizindent>
</#if>
</#assign>
\ No newline at end of file
<#assign layout='TABLE_24COL'><#if formmenber.getPSLayoutPos()??><#if formmenber.getPSLayoutPos().getParentPSLayout()??><#assign layout='${formmenber.getPSLayoutPos().getParentPSLayout().getLayout()}'></#if></#if>
<#assign LayoutPos = formmenber.getPSLayoutPos()>
<#if layout == 'TABLE_24COL' && LayoutPos??>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>>
${P.getPartCode(formmenber).code}
</i-col>
<#elseif layout == 'FLEX'>
<#assign pageLayout = LayoutPos.getPSLayout()>
<div style="height: 100%;display: flex;<#if pageLayout.getDir()!="">flex-direction: ${pageLayout.getDir()};</#if><#if pageLayout.getAlign()!="">justify-content: ${pageLayout.getAlign()};</#if><#if pageLayout.getVAlign()!="">align-items: ${pageLayout.getVAlign()};</#if>">
${P.getPartCode(formmenber).code}
</div>
<#else>
${P.getPartCode(formmenber).code}
</#if>
\ No newline at end of file
${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/
<#ibizinclude>
./DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
<view_${ctrl.getName()} :viewState="viewState"<#if content??> ${content}</#if> ctrlName="${ctrl.name}" ref="${ctrl.name}" <#if ctrl.getHookEventNames()??><#list ctrl.getHookEventNames() as eventName>@${eventName?lower_case}="${ctrl.name}_${eventName?lower_case}" </#list></#if>></view_${ctrl.getName()}>
\ No newline at end of file
<#ibizinclude>
./DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
//this is less
<#if ctrl.getPSSysCsses?? && ctrl.getPSSysCsses()??>
<#list ctrl.getPSSysCsses() as singleCss>
<#if singleCss.getDesignCssStyle?? && singleCss.getDesignCssStyle()?? && singleCss.getDesignCssStyle().length gt 0>
.${singleCss.getCssName()}{
${singleCss.getDesignCssStyle()}
}
</#if>
<#if singleCss.getCssStyle()??>
${singleCss.getCssStyle()}
</#if>
</#list>
</#if>
\ No newline at end of file
<div class="tabexppanel-container">
<#if view.hasPSControl('tabexppanel')>
<#assign tabexppanel = view.getPSControl('tabexppanel')>
<#if tabexppanel.getAllRelatedPSAppViews()??>
<#list tabexppanel.getAllRelatedPSAppViews() as singleview>
<div class="app-view-header" v-if="selectedView == '${singleview.name?lower_case}'">
<#if singleview.isShowCaptionBar()>
<#-- <#if singleview.getPSTitleBar()??>
<#assign titleBar=singleview.getPSTitleBar()>
<view_${titleBar.getName()} :viewState="viewState" name="${titleBar.name}"></view_${titleBar.getName()}>
<#else> -->
<mt-header title="${singleview.getCaption()}" >
<template slot="left">
<div class="app-view-lefttoolbar">
<mt-button icon="back" @click="close">返回</mt-button>
<#if singleview.hasPSControl('lefttoolbar')>
<#assign lefttoolbar = singleview.getPSControl('lefttoolbar')>
<@ibizindent blank=8>
<div class="app-toolbar-container <#if lefttoolbar.getPSSysCss()??><#assign singleCss = lefttoolbar.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if lefttoolbar.render??>
${lefttoolbar.render.code}
<#else>
<#if lefttoolbar.getPSDEToolbarItems()??>
<#list lefttoolbar.getPSDEToolbarItems() as item>
<#if item.getPSUIAction?? && item.getPSUIAction()??>
<#assign deuiaction=item.getPSUIAction()>
<#if lefttoolbar.getToolbarStyle() == 'MOBBOTTOMMENU'>
<mt-button @click="getComponent('${singleview.name?lower_case}').clickButton('${deuiaction.getUIActionTag()}')" style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>"> <#if item.getPSSysImage().getImagePath() != ""><img src="${item.getPSSysImage().getImagePath()}" /></#if></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
<#elseif lefttoolbar.getToolbarStyle() == 'MOBWFACTIONMENU'>
<mt-button class="app-quick-toolbar-item" @click="getComponent('${singleview.name?lower_case}').${lefttoolbar.name}_click({ tag: '${item.name}' }, $event)" style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>"> <#if item.getPSSysImage().getImagePath() != ""><img src="${item.getPSSysImage().getImagePath()}" /></#if></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
<#else>
<mt-button class="app-view-toolbar-button" @click="getComponent('${singleview.name?lower_case}').${lefttoolbar.name}_click({ tag: '${item.name}' }, $event)" style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>"> <#if item.getPSSysImage().getImagePath() != ""><img src="${item.getPSSysImage().getImagePath()}" /></#if></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
</#if>
<#else>
<mt-button class="app-view-toolbar-button" @click="getComponent('${singleview.name?lower_case}').${lefttoolbar.name}_openActionSheet()" style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>" <#if item.getPSSysImage().getImagePath() != ""><img src="${item.getPSSysImage().getImagePath()}" /></#if>></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
</#if>
</#list>
</#if>
</#if>
</div>
</@ibizindent>
</#if>
</div>
</template>
<template slot="right">
<div class="app-view-righttoolbar">
<#if singleview.hasPSControl('righttoolbar')>
<#assign righttoolbar = singleview.getPSControl('righttoolbar')>
<@ibizindent blank=8>
<div class="app-toolbar-container <#if righttoolbar.getPSSysCss()??><#assign singleCss = righttoolbar.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if righttoolbar.render??>
${righttoolbar.render.code}
<#else>
<#if righttoolbar.getPSDEToolbarItems()??>
<#list righttoolbar.getPSDEToolbarItems() as item>
<#if item.getPSUIAction?? && item.getPSUIAction()??>
<#assign deuiaction=item.getPSUIAction()>
<#if righttoolbar.getToolbarStyle() == 'MOBBOTTOMMENU'>
<mt-button <#compress>@click="getComponent('${singleview.name?lower_case}').clickButton('${deuiaction.getUIActionTag()}')"</#compress> style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>"> <#if item.getPSSysImage().getImagePath() != ""><img src="${item.getPSSysImage().getImagePath()}" /></#if></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
<#elseif righttoolbar.getToolbarStyle() == 'MOBWFACTIONMENU'>
<mt-button class="app-quick-toolbar-item" <#compress>@click="getComponent('${singleview.name?lower_case}').${righttoolbar.name}_click({ tag: '${item.name}' }, $event)"</#compress> style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>"> <#if item.getPSSysImage().getImagePath() != ""><img src="${item.getPSSysImage().getImagePath()}" /></#if></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
<#else>
<mt-button class="app-view-toolbar-button" <#compress>@click="getComponent('${singleview.name?lower_case}').${righttoolbar.name}_click({ tag: '${item.name}' }, $event)"</#compress> style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>"> <#if item.getPSSysImage().getImagePath() != ""><img src="${item.getPSSysImage().getImagePath()}" /></#if></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
</#if>
<#else>
<mt-button class="app-view-toolbar-button" <#compress>@click="getComponent('${singleview.name?lower_case}').${righttoolbar.name}_openActionSheet()"</#compress> style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>" <#if item.getPSSysImage().getImagePath() != ""><img src="${item.getPSSysImage().getImagePath()}" /></#if>></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
</#if>
</#list>
</#if>
</#if>
</div>
</@ibizindent>
</#if>
</div>
</template>
</mt-header>
<#-- </#if> -->
</#if>
</div>
</#list>
</#if>
</#if>
<#if ctrl.getAllRelatedPSAppViews()??>
<div class="view-content">
<nut-tab positionNav="<#if view.getTabLayout() == "RIGHT">right<#elseif view.getTabLayout() == "TOP">top<#elseif view.getTabLayout() == "BOTTOM">bottom<#else>left</#if>" @tab-switch="tabSwitch">
<#list ctrl.getAllRelatedPSAppViews() as singleview>
<nut-tab-panel tabTitle="${singleview.getCaption()}">
<view-${srfclassname('${singleview.getCodeName()}')?lower_case} :isTabExp="true" ref="<#compress>${singleview.name?lower_case}</#compress>"></view-${srfclassname('${singleview.getCodeName()}')?lower_case}>
</nut-tab-panel>
</#list>
</nut-tab>
</div>
</#if>
</div>
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
<#if view.getTabLayout() == "BOTTOM">
.van-cell{
.van-cell__title{
color: #26A2FF
}
}
.view-container {
.view-content{
.nut-tab{
padding: 0px;
.nut-tab-item{
border: 0px;
padding: 0px;
height: auto;
.nav-bar-bottom{
display: none
}
}
.nut-tab-title-bottomnav{
position: fixed;
bottom: 0px;
.nut-tab-link{
color: #26A2FF
}
}
}
}
}
<#elseif view.getTabLayout() == "TOP">
.van-cell{
.van-cell__title{
color: #26A2FF
}
}
.view-container {
.view-content{
.nut-tab{
.nav-bar {
display:none
}
padding: 0px;
.nut-tab-item{
border: 0px;
padding: 0px;
height: auto;
}
.nut-tab-title{
.nut-tab-link{
color: #26A2FF
}
}
}
}
}
<#elseif view.getTabLayout() == "RIGHT">
.van-cell{
.van-cell__title{
color: #26A2FF
}
}
.view-container {
.view-content{
.nut-tab{
padding: 0px;
.nut-tab-title-rightnav{
.nut-title-nav-rightnav{
.nut-tab-link{
color: #26A2FF
}
}
}
}
.nav-bar-right {
background:white;
display:none;
}
.nut-tab-item{
border: 0px;
padding: 0px;
height: auto;
}
}
}
<#else>
.van-cell{
.van-cell__title{
color: #26A2FF
}
}
.view-container {
.view-content{
.nut-tab{
padding: 0px;
.nut-tab-title-leftnav{
.nav-bar-left{
background:white;
display: none
}
}
.nut-title-nav-leftnav{
.nut-tab-link{
color: #26A2FF
}
}
}
}
.nut-tab-item{
border: 0px;
padding: 0px;
height: auto;
}
}
</#if>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* 选中视图
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public selectedView:string ='<#if ctrl.getAllRelatedPSAppViews()??><#list ctrl.getAllRelatedPSAppViews() as singleview><#if singleview_index == 0>${singleview.name?lower_case}</#if></#list></#if>';
/**
* 视图集合
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public viewArray:Array<any> =[<#if ctrl.getAllRelatedPSAppViews()??><#list ctrl.getAllRelatedPSAppViews() as singleview>'${singleview.name?lower_case}'<#if singleview_has_next>,</#if></#list></#if>];
/**
* tab切换
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public tabSwitch(index:any,event:any){
this.selectedView = this.viewArray[index];
}
/**
* 获取组件
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getComponent(value:any) {
return this.$refs[value];
}
/**
* 返回上一级
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=TABEXPPANEL
\ No newline at end of file
<div class="app-mob-tabviewpanel <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<#if ctrl.getEmbeddedPSAppDEView()??>
<#assign refview=ctrl.getEmbeddedPSAppDEView() />
<view_${refview.getName()}></view_${refview.getName()}>
</#if>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
<#if ctrl.getEmbeddedPSAppDEView()??>
<#assign refview=ctrl.getEmbeddedPSAppDEView() />
import view_${refview.getName()} from '@/pages/${refview.getPSAppModule().getCodeName()?lower_case}/${srffilepath2('${refview.getCodeName()}')}/${srffilepath2('${refview.getCodeName()}')}.vue';
</#if>
</#assign>
<#assign components>
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
view_${subctrl.getName()},
</#if>
</#list>
</#if>
<#if ctrl.getEmbeddedPSAppDEView()??>
<#assign refview=ctrl.getEmbeddedPSAppDEView() />
view_${refview.getName()}
</#if>
</#assign>
<#assign self_content>
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=TABVIEWPANEL
\ No newline at end of file
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="app-mob-mdctrl app-mob-mdctrl-${ctrl.name}<#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<van-panel :title="title" style="text-align: left;"></van-panel>
<mt-loadmore
:top-method="loadTop"
:bottom-method="loadBottom"
:bottom-all-loaded="allLoaded"
ref="loadmore"
:bottom-distance=10
:auto-fill="false">
<ul>
<li v-for="item in items" :key="item.srfkey" class="app-mob-mdctrl-item">
<van-cell :title="item.srfmajortext" :value="item.time?item.time.slice(0,10):''" />
</li>
</ul>
</mt-loadmore>
<#if ctrl.getItemPSLayoutPanel()??>
<#assign layoutpanel=ctrl.getItemPSLayoutPanel()>
<div style="width:100%;">
${P.getCtrlCode(layoutpanel, 'CONTROL.html').code}
<#-- <view_${layoutpanel.getName()} :name="'${layoutpanel.name?lower_case}'" :viewState="viewState"></view_${layoutpanel.getName()}> -->
</div>
</#if>
</div>
</#if>
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
<#if ctrl.getItemPSLayoutPanel()??>
<#assign layoutpanel=ctrl.getItemPSLayoutPanel()>
${P.getCtrlCode(layoutpanel, 'CONTROL.less').code}
</#if>
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* 标题
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public title?: string;
/**
* 搜索行为
*
* @param {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public searchAction?:string;
/**
* searchKey 搜索关键字
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public searchKey:string | undefined;
/**
* 分页大小
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public pageSize:number = ${ctrl.getPagingSize()?c};
/**
* 总页数
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public pageTotal:number = 0;
/**
* 当前页数
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public pageNumber:any = 1;
/**
* 判断底部数据是否全部加载完成,若为真,则 bottomMethod 不会被再次触发
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public allLoaded: boolean = false;
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
/**
* 列表数组
*
* @param {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public items:Array<any> =[];
/**
* 下拉刷新
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public loadTop() {
this.pageNumber=1;
this.load(Object.assign({query:this.searchKey},{page: { current: this.pageNumber, size: this.pageSize }}),'top');
}
/**
* 上拉加载更多数据
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public loadBottom() {
this.pageNumber++;
this.load(Object.assign({query:this.searchKey},{page: { current: this.pageNumber, size: this.pageSize }}),'bottom');
}
/**
* 多项数据加载
*
* @private
* @param {*} [arg={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private load(data:any,type:any):void {
const post: Promise<any> = this.$http.post(this.url + this.searchAction, data);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$notify({ type: 'danger', message: '错误,' + response.info });
}
this.pageTotal = response.data.total;
this.allLoaded = this.pageNumber>=this.pageTotal/this.pageSize?true:false;
if(type=='top'){
this.items=[];
this.items = response.data.records;
let loadmore:any = this.$refs.loadmore;
loadmore.onTopLoaded();
}
else if(type=='bottom'){
setTimeout(()=>{
for(let i=0;i<response.data.records.length;i++){
this.items.push(response.data.records[i]);
}
let loadmore:any = this.$refs.loadmore;
loadmore.onBottomLoaded();
},2000)
}else{
this.items=[];
this.items = response.data.records;
}
})
.catch((response: any) => {
if (response && response.status === 401) {
return;
}
if (!response || !response.status || !response.data) {
this.$notify({ type: 'danger', message: '错误,系统异常!' });
return;
}
const { data: _data } = response;
console.error(_data.title + _data.message);
});
}
/**
* vue生命周期created
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
created() {
this.handleCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
if (this.viewState) {
this.viewState.subscribe(
({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is(action, "load")) {
this.pageNumber = 1;
this.load(Object.assign(data, {page: { current: this.pageNumber, size: this.pageSize }}),"init");
}
if (Object.is(action, "search")) {
this.load(Object.assign(data, {page: { current: this.pageNumber, size: this.pageSize }}),"" );
}
if (Object.is(action, "quicksearch")) {
this.searchKey = data;
this.load( Object.assign( { query: data }, { page: { current: 1, size: this.pageSize*this.pageNumber }}),"init");
}
}
);
}
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=LIST
\ No newline at end of file
<div class="app-mob-wizardpanel <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="app-view-content app-${view.getViewType()?lower_case}">
<#-- <#if view.isEnablePullDownRefresh()>-->
<#-- <ion-refresher slot="fixed" (ionRefresh)="pullRefresh($event)">-->
<#-- <ion-refresher-content></ion-refresher-content>-->
<#-- </ion-refresher>-->
<#-- </#if>-->
<#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as form>
<#assign handler = form.getPSAjaxControlHandler()>
<div v-if="activeForm == '${form.name}'">
<view_${form.getName()} :viewState="wizardState"<#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> :${action.name?lower_case}Action="'${action.getPSDEAction().getCodeName()?lower_case}'"</#if></#list></#if> :name="'${form.name}'" <#if form.getHookEventNames()??><#list form.getHookEventNames() as eventName> @${eventName?lower_case}="${form.name}_${eventName?lower_case}($event)" </#list></#if>></view_${form.getName()}>
<#if form.getPSDEWizardForm().getConfirmMsg()?? && form.getPSDEWizardForm().getConfirmMsg() !="">
<van-checkbox v-model="isAgreeObj['${ctrl.name}_form_${form.getPSDEWizardForm().getFormTag()}_msg']"> ${form.getPSDEWizardForm().getConfirmMsg()}</van-checkbox>
</#if>
<#if form.getPSDEWizardForm().getConfirmMsg2()?? && form.getPSDEWizardForm().getConfirmMsg2() !="">
<van-checkbox v-model="isAgreeObj['${ctrl.name}_form_${form.getPSDEWizardForm().getFormTag()}_msg2']"> ${form.getPSDEWizardForm().getConfirmMsg2()}</van-checkbox>
</#if>
</div>
</#list>
</#if>
<div class="actionBtns">
<van-button type="info" v-if="isHidden('PREV')" @click="onClickPrev"><#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPrevCaption()??>${ctrl.getPSDEWizard().getPrevCaption()}<#else>上一步</#if></van-button>
<van-button type="info" v-if="isHidden('NEXT')" @click="onClickNext"><#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPrevCaption()??>${ctrl.getPSDEWizard().getNextCaption()}<#else>下一步</#if></van-button>
<van-button type="info" v-if="isHidden('FINISH')" @click="onClickFinish"><#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPrevCaption()??>${ctrl.getPSDEWizard().getFinishCaption()}<#else>完成</#if></van-button>
</div>
</div>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public getData(): any {
return null;
}
/**
* 视图状态订阅对象
*
* @private
* @type {Subject<{action: string, data: any}>}
* @memberof ${srfclassname('${ctrl.name}')}
*/
private wizardState: Subject<ViewState> = new Subject();
/**
* 当前激活表单
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getFirstPSDEWizardForm()??>
<#assign firstForm = ctrl.getPSDEWizard().getFirstPSDEWizardForm()>
public activeForm: string = '${ctrl.name}_form_${firstForm.getFormTag()}';
<#else>
public activeForm: string = '';
</#if>
/**
* 向导表单参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public formParam: any = {};
/**
* 执行过的表单
*
* @private
* @type {Array<string>}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public historyForms: Array<string> = [];
/**
* 步骤行为集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public stepActions: any = {};
/**
* 向导表单集合
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public wizardForms: Array<any> = [];
/**
* 当前状态
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public curState = '';
/**
* 是否选中Obj
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public isAgreeObj:any ={
<#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as form>
<#if form.getPSDEWizardForm().getConfirmMsg()?? && form.getPSDEWizardForm().getConfirmMsg() !="">
'${ctrl.name}_form_${form.getPSDEWizardForm().getFormTag()}_msg':false,
</#if>
<#if form.getPSDEWizardForm().getConfirmMsg2()?? && form.getPSDEWizardForm().getConfirmMsg2() !="">
'${ctrl.name}_form_${form.getPSDEWizardForm().getFormTag()}_msg2':false,
</#if>
</#list>
</#if>
};
public created(){
this.handleCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public handleCreated(){
this.regFormActions();
if(this.activeForm) {
this.historyForms.push(this.activeForm);
}
if (this.viewState) {
this.viewState.subscribe(({ tag, action, data }) => {
if (Object.is(tag, this.name)) {
if (Object.is('load', action)) {
this.initAction(data);
}
}
});
}
}
/**
* 注册表单步骤行为
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public regFormActions() {
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardForms()??>
<#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>]);
</#list>
</#if>
}
/**
* 注册表单步骤行为
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public regFormAction(name: string, actions: Array<string>) {
this.stepActions[name] = actions;
this.wizardForms.push(name);
}
/**
* 初始化行为
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public initAction(opt: any = {}) {
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getInitPSDEAction()??>
<#assign action = ctrl.getPSDEWizard().getInitPSDEAction()>
const arg: any = { ...opt };
this.$http.post(this.url + 'init', arg).then((response: any) => {
if (response) {
const data = response.data;
this.formParam = { srfkey: data.srfkey };
this.$emit('init',data);
this.formLoad();
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误'+error.info });
});
</#if>
}
/**
* 表单加载
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public formLoad() {
if(this.activeForm) {
this.wizardState.next({ tag: this.activeForm, action: 'load', data: this.formParam });
}
}
/**
* 完成行为
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public finishAction() {
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getFinishPSDEAction()??>
<#assign action = ctrl.getPSDEWizard().getFinishPSDEAction()>
let arg: any = {};
Object.assign(arg, this.formParam);
this.$http.post(this.url + 'finish', arg).then((response: any) => {
if (response) {
const data = response;
this.$emit('finish',data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误'+error.info });
});
</#if>
}
/**
* 向导表单加载完成
*
* @param {*} args
* @param {string} name
* @memberof ${srfclassname('${ctrl.name}')}
*/
public ${ctrl.name}_formload(args: any, name: string, $event2?: any) {
if(args) {
Object.assign(this.formParam, args);
}
}
/**
* 向导表单保存完成
*
* @param {*} args
* @param {string} name
* @memberof ${srfclassname('${ctrl.name}')}
*/
public ${ctrl.name}_formsave(args: any, name: string, $event2?: any) {
Object.assign(this.formParam, args);
if(Object.is(this.curState, 'NEXT')) {
this.historyForms.push(name);
if(args.srfnextform) {
this.activeForm = '${ctrl.name}_form_' + args.srfnextform;
setTimeout(() => {
this.formLoad();
}, 1);
} else if (this.getNextForm()) {
this.activeForm = this.getNextForm();
setTimeout(() => {
this.formLoad();
}, 1);
} else {
this.finishAction();
}
}
if(Object.is(this.curState, 'FINISH')) {
this.finishAction();
}
}
/**
* 获取下一步向导表单
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public getNextForm() {
let index = this.wizardForms.indexOf(this.activeForm);
if(index >= 0) {
if(this.wizardForms[index + 1]) {
return this.wizardForms[index + 1];
}
}
return undefined;
}
/**
* 上一步
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public onClickPrev() {
const length = this.historyForms.length;
if(length > 1) {
this.curState = 'PREV';
this.activeForm = this.historyForms[length - 1];
setTimeout(() => {
this.formLoad();
}, 1);
this.historyForms.splice(length - 1, 1);
}
}
/**
* 下一步
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public onClickNext() {
if(this.activeForm) {
let currentCheckBox =[];
if(Object.keys(this.isAgreeObj).length >0){
currentCheckBox =Object.keys(this.isAgreeObj).filter((item:any) =>{
return item.startsWith(this.activeForm) && this.isAgreeObj[item] == false;
})
}
if(currentCheckBox.length >0){
this.$notify({ type: 'primary', message: '需先同意确认信息!'});
}else{
this.curState = 'NEXT';
this.wizardState.next({ tag: this.activeForm, action: 'save', data: Object.assign(this.formParam,{iscancelnotice:true}) });
}
}
}
/**
* 完成
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public onClickFinish() {
if(this.activeForm) {
let currentCheckBox =[];
if(Object.keys(this.isAgreeObj).length >0){
currentCheckBox =Object.keys(this.isAgreeObj).filter((item:any) =>{
return item.startsWith(this.activeForm) && this.isAgreeObj[item] == false;
})
}
if(currentCheckBox.length >0){
this.$notify({ type: 'primary', message: '提示:需先同意确认信息!'});
}else{
this.curState = 'FINISH';
this.wizardState.next({ tag: this.activeForm, action: 'save', data: Object.assign(this.formParam,{iscancelnotice:true}) });
}
}
}
/**
* 是否显示
*
* @param {string} type
* @memberof ${srfclassname('${ctrl.name}')}
*/
public isHidden(type: string) {
const actions: Array<string> = this.stepActions[this.activeForm]
if(actions && actions.indexOf(type) != -1) {
return true;
}
return false;
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=WIZARDPANEL
\ No newline at end of file
<div class="app-mob-meditviewpanel <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="app-medit-view-panel">
<div v-for="(item,index) in items" :key="index" class="app-medit-view-panel-card">
<van-row>
<van-cell :title="'${ctrl.getPSAppDEView().getCaption()}('+(index+1)+')'" >
<van-icon slot="right-icon" name="cross" @click="deleteItem(item,index)"/>
</van-cell>
</van-row>
<van-row>
<div class="app-medit-view-panel-view">
<view-${srfclassname('${ctrl.getPSAppDEView().getName()}')?lower_case} name="panelitem" ref="panelitem" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewdata="JSON.stringify(item)" :panelState="panelState" @viewdataschange="viewDataChange"></view-${srfclassname('${ctrl.getPSAppDEView().getName()}')?lower_case}>
</div>
</van-row>
</div>
<van-button type="info" size="large" @click="addItem">添加${ctrl.getPSAppDEView().getCaption()}</van-button>
</div>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* 数据视图
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public viewdata!: string;
/**
* 查询集合
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public searchAction?: string;
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
/**
* 面板状态订阅对象
*
* @private
* @type {Subject<{action: string, data: any}>}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public panelState: Subject<ViewState> = new Subject();
/**
* 数据数组
*
* @type []
* @memberof ${srfclassname('${ctrl.name}')}
*/
public items?: any = [];
/**
* 计数器
*
* @type number
* @memberof ${srfclassname('${ctrl.name}')}
*/
public count: number = 0;
/**
* 生命周期created
* @memberof ${srfclassname('${ctrl.name}')}
*/
public created(){
if (this.viewState) {
this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is(action, 'load')) {
this.load(data);
}
if (Object.is(action, 'save')) {
this.saveData(data);
}
});
}
}
/**
* 加载方法
* @memberof ${srfclassname('${ctrl.name}')}
*/
public load(arg: any = {}, ): Promise<any> {
return new Promise((resolve, reject) => {
this.$http.post(this.url + this.searchAction, arg).then((response: any) => {
if (!response) {
return;
}
if (response) {
let data = JSON.parse(JSON.stringify(response.data.records));
if (data.length > 0) {
data.forEach((element: any) => {
Object.assign(element,this.viewdata)
});
this.items = data;
}
this.$emit("load",data);
resolve(response);
}
});
});
}
/**
* 保存数据
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public saveData(data?: any) {
this.count = 0;
if(this.items.length >0){
this.panelState.next({ tag: 'meditviewpanel', action: 'save', data: data });
}else{
this.$emit("savecompleted",{action:'savecompleted'});
}
}
/**
* 新建
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public addItem(): void {
this.items.push({
isSaved: 0
});
this.$emit('editformchange',{action:'add',args:{}});
}
/**
* 删除方法
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public deleteItem(item: any, index: number) {
this.$prompt().show(
{"message":"确认删除?",
"confirm":() =>{
if (item.srfkey && !Object.is(item.srfkey, '')) {
this.panelState.next({ tag: 'meditviewpanel', action: 'remove', data: {srfkey:item.srfkey} });
} else {
this.items.splice(index, 1);
}
this.$emit('editformchange',{action:'remove', args:item});
}}
);
}
/**
* 部件抛出事件
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public viewDataChange($event:any){
if($event){
if(Object.is($event.action,'load')){
console.log('加载----');
}
if(Object.is($event.action,'save')){
this.count++;
if (this.items.length === this.count) {
this.$emit('savecompleted',{action:'savecompleted'});
}
}
if(Object.is($event.action,'remove')){
if ($event.data) {
let resultIndex = this.items.findIndex((value:any, index:any, arr:any) => {
return value.srfkey === $event.data.srfkey;
});
if (resultIndex !== -1) {
this.items.splice(resultIndex, 1);
}
}
}
}
}
</#assign>
<#assign self_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
import {Dialog} from 'vant'
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=MULTIEDITVIEWPANEL
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#assign deuiaction=item.getPSUIAction()>
<#if ctrl.getToolbarStyle() == 'MOBBOTTOMMENU'>
<mt-button @click="clickButton('${deuiaction.getUIActionTag()}')" style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>"> <#-- <#if item.getPSSysImage().getImagePath() != ""><img src="${item.getPSSysImage().getImagePath()}" /></#if> --></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
<#elseif ctrl.getToolbarStyle() == 'MOBWFACTIONMENU'>
<mt-button class="app-quick-toolbar-item" @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)" style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>"> <#-- <#if item.getPSSysImage().getImagePath() != ""> <img src="${item.getPSSysImage().getImagePath()}" /></#if>--></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
<#else>
<mt-button class="app-view-toolbar-button" @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)" style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>"> <#--<#if item.getPSSysImage().getImagePath() != ""> <img src="${item.getPSSysImage().getImagePath()}" /></#if>--></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
</#if>
\ No newline at end of file
<mt-button class="app-view-toolbar-button" @click="${ctrl.name}_openActionSheet()" style="margin-right:5px;">
<#if item.isShowIcon()>
<#if item.getPSSysImage()??>
<i class="<#if item.getPSSysImage().getCssClass() != "">${item.getPSSysImage().getCssClass()}<#else>fa fa-ellipsis-h</#if>" <#-- <#if item.getPSSysImage().getImagePath() != ""><img src="${item.getPSSysImage().getImagePath()}" /></#if> -->></i>
</#if>
</#if>
<#if item.isShowCaption()> ${item.caption!''}</#if>
</mt-button>
\ No newline at end of file
<div class="app-toolbar-container <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<#if ctrl.getToolbarStyle() == 'MOBWFACTIONMENU'>
<div class="app-view-footer">
<div class="app-quick-toolbar">
<#list ctrl.getPSDEToolbarItems() as item>
${P.getPartCode(item).code}
</#list>
</div>
</div>
<#elseif ctrl.getToolbarStyle() == 'MOBBOTTOMMENU'>
<div<#if ctrl.getPSSysCss()??> class="${ctrl.getPSSysCss().getCssName()}"</#if>>
<#list ctrl.getPSDEToolbarItems() as item>
${P.getPartCode(item).code}
</#list>
</div>
<#elseif ctrl.getToolbarStyle() == 'MOBNAVLEFTMENU'>
<div class="app-quick-toolbar">
<#list ctrl.getPSDEToolbarItems() as item>
${P.getPartCode(item).code}
</#list>
</div>
<#elseif ctrl.getToolbarStyle() == 'MOBNAVRIGHTMENU'>
<div class="app-quick-toolbar">
<#list ctrl.getPSDEToolbarItems() as item>
${P.getPartCode(item).code}
</#list>
</div>
<#else>
<div class="app-quick-toolbar">
<#list ctrl.getPSDEToolbarItems() as item>
${P.getPartCode(item).code}
</#list>
</div>
</#if>
</#if>
</div>
\ No newline at end of file
CTRLTYPE=TOOLBAR
\ No newline at end of file
<div class="app-menus-container<#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<#if view.getViewType() == "APPPORTALVIEW">
<!-- 快速菜单-->
<div class="app-quick-menus">
<app-app-menu :title="title" :menus="menus" @menuClick="menuClick($event)" v-if="!menuStyle"></app-app-menu>
<app-list-menu :title="title" :menus="menus" @menuClick="menuClick($event)" v-if="menuStyle=='listview'"></app-list-menu>
<app-slider-menu :title="title" :menus="menus" @menuClick="menuClick($event)" v-if="menuStyle=='swiperview'" ></app-slider-menu>
<app-icon-menu :title="title" :menus="menus" @menuClick="menuClick($event)" v-if="menuStyle=='iconview'"></app-icon-menu>
</div>
<#else>
<!-- 首页菜单-->
<van-tabbar @change="menuClick($event)" v-model="currentSelected">
<van-tabbar-item v-for="item in menus" v-bind:key="item.id" :name="item.name">
<span>{{item.text}}</span>
<img slot="icon" :src="item.icon?item.icon:'https://img.yzcdn.cn/public_files/2017/10/13/793c77793db8641c4c325b7f25bf130d.png'">
</van-tabbar-item>
</van-tabbar>
</#if>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* 快捷菜单标题
*
* @type {string}
* @memberof Menutwo
*/
@Prop() public title?:string;
/**
* 快捷菜单样式
*
* @type {string}
* @memberof Menutwo
*/
@Prop() public menuStyle?:string;
/**
* api地址
*
* @private
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private url: string = '${app.getPKGCodeName()?lower_case}/ctrl/${ctrl.codeName?lower_case}appmenu';
/**
* 菜单数据
*
* @protected
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public menus:Array<any> =[];
/**
* 当前视图类型
*
* @protected
* @type string
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public curViewType:string = "${view.getViewType()}";
/**
* 当前选中
*
* @protected
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public currentSelected:string ="";
/**
* 视图状态事件
*
* @protected
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected viewStateEvent: Subscription | undefined;
/**
* 应用功能集合
*
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public appFuncs: any[] = [
<#list ctrl.getPSAppFuncs() as appFuncs>
{
appfunctag: '${appFuncs.getCodeName()}',
appfuncyype: '${appFuncs.getAppFuncType()}',
<#if appFuncs.getAppFuncType() == 'APPVIEW'>
<#assign appview = appFuncs.getPSAppView()/>
pathname: '${appview.getPSAppModule().getCodeName()?lower_case}_${appview.getCodeName()?lower_case}',
</#if>
},
</#list>
];
created() {
this.handleCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(
({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.load(data);
}
);
}
}
/**
* 数据加载
*
* @param {*} data
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load(data: any) {
const get: Promise<any> = this.$http.get(this.url + "/get", {});
get.then((response: any) => {
if (!response || response.status !== 200) {
console.error("错误" + response.info);
}
this.menus = response.data.items;
if(this.menus.length >0){
if(this.$route.meta.routetag){
this.currentSelected = this.$route.meta.routetag;
this.$store.commit('setIndexSelected', this.currentSelected);
}
}
})
.catch((response: any) => {
if (response && response.status === 401) {
return;
}
if (!response || !response.status || !response.data) {
console.error("错误,系统异常!");
return;
}
});
}
/**
* 菜单点击事件
*
* @param {*} data
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public menuClick($event:any){
if(this.menus.length >0){
let curSelectObj=this.menus.filter((item:any) =>{
return item.name == $event;
})
if(curSelectObj && curSelectObj.length >0 && curSelectObj[0].appfunctag){
this.$store.commit('setIndexSelected', $event);
this.openAppFuncPickupView(curSelectObj[0].appfunctag);
}
}
}
/**
* 打开功能页
*
* @param {*} data
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public openAppFuncPickupView(value:any){
if(this.appFuncs.length >0){
let curSelectObj=this.appFuncs.filter((func:any) =>{
return func.appfunctag === value;
})
if(curSelectObj && curSelectObj.length >0){
this.click(curSelectObj[0]);
}
}
}
/**
* 菜单点击
*
* @private
* @param {*} item 菜单数据
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private click(item: any) {
if (item) {
switch (item.appfunctag) {
<#if ctrl.getPSAppFuncs()??>
<#assign appFuncs = ctrl.getPSAppFuncs()>
<#list appFuncs as singFuncs>
case '${singFuncs.getCodeName()}':
this.click${singFuncs.codeName}(item);
return;
</#list>
</#if>
default:
console.warn('未指定应用功能');
}
}
}
<#if ctrl.getPSAppFuncs()??>
<@ibizindent blank=4>
<#list ctrl.getPSAppFuncs() as singleFuncs>
${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
</#list>
</@ibizindent>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=APPMENU
\ No newline at end of file
<div class="app-mob-searchform <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="search-form-header" @click="toggleDisplay()">
<span>筛选</span>
<div class="search-form-header-icon" :style="{'transform':isDisplayContent == true?'rotate(180deg)':''}">
<i class="van-icon van-icon-arrow-down"></i>
</div>
</div>
<div class="search-form-content" v-show="isDisplayContent">
<#list ctrl.getPSDEFormPages() as formpage>
${P.getPartCode(formpage).code}
</#list>
<div class="app-search-form-footer">
<div class="app-search-form-footer-buttons">
<van-button type="default" size="small" @click="onReset">重置</van-button>
<van-button type="info" size="small" @click="onSearch">搜索</van-button>
</div>
</div>
</div>
</div>
</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<div class="app-form-item-button">
<nut-button v-if="detailsModel.${item.name}.visible" class="app-form-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style='<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()};</#if><#if item.getHeight() gt 0>height: ${item.getHeight()}px;</#if>'>${item.caption}</nut-button>
</div>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<div class="app-form-item-druipart"><#if item.getPSAppView()??><div>${item.getPSAppView().getCaption()}</div><#else><div>关系界面视图</div></#if></div>
</#if>
\ No newline at end of file
<div v-if="detailsModel.${item.name}.visible" class="app-form-item ${item.getLabelPos()?lower_case}<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style='<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()};</#if><#if item.getItemHeight() gt 0>height: ${item.getItemHeight()?c};</#if><#if item.getItemWidth() gt 0>width: ${item.getItemWidth()?c};</#if>'>
<#if item.render??>
${item.render.code}
<#else>
<#if item.getEditorType() != "MOBMPICKER" && item.getEditorType() != "MOBPICTURELIST" && item.getEditorType() != "MOBMULTIFILEUPLOAD" && item.getEditorType() != "MOBPICTURE">
<#if item.getEditorType() == "MOBTEXTAREA" && item.getLabelPos() == "TOP">
<#else>
<#if item.isShowCaption()>
<label style="width: ${item.getLabelWidth()}px;<#if item.getLabelPos() == "TOP">flex-direction:column;</#if><#if item.getLabelPos() == "LEFT"> flex-direction:row;<#elseif item.getLabelPos() == "RIGHT">flex-direction:row-reverse;<#else>flex-direction:column-reverse;</#if>" class="app-form-item-label ${item.getLabelPos()?lower_case}">
<#if item.isEmptyCaption() == false>
<#if item.getPSSysImage()??>
<#assign image = item.getPSSysImage()>
<#if image.getCssClass()?? && image.getCssClass() != ""><i class="fa fa-${image.getCssClass()}" aria-hidden="true" style="font-size: 18px;"></i></#if>
<#if image.getImagePath()?? && image.getImagePath() != ""><image src="${image.getImagePath()}"/></#if>
</#if> ${item.caption}:
</label>
</#if>
</#if>
</#if>
</#if>
<div class="app-form-item-editor" style="width:100%;">
${P.getEditorCode(item, "EDITOR.html").code}<#if item.isEnableUnitName()>${item.getUnitName()}</#if>
</div>
</#if>
</div>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<#if item.isShowCaption()>
<div style="<#if item.getPSSysCss()??>style='${item.getPSSysCss().getRawCssStyle()};'</#if>" class="app-form-group<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" >
<div class="app-form-group-header" v-on:click="toggleDisplay('${item.name}')">
<div>${item.getCaption()}</div>
<div class="app-form-group-header-icon" :style="{'transform':isDisplayContent_${item.name} == true?'rotate(180deg)':''}">
<i class="fa fa-angle-down" aria-hidden="true"></i>
</div>
</div>
<div class="app-form-group-content" v-show="isDisplayContent_${item.name}">
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</div>
</div>
<#else>
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</#if>
</#if>
\ No newline at end of file
<#assign detail>caption: '${item.getCaption()}', detailType: '${item.getDetailType()}', name: '${item.getName()}', visible: true, isShowCaption: ${item.isShowCaption()?c}</#assign>
<#if item.getDetailType() == 'BUTTON'>
new FormButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>, uiaction: { type: '${uiaction.getUIActionType()}',
tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if> }</#if> })
<#elseif item.getDetailType() == 'DRUIPART'>
new FromDRUIPartModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMITEM'>
new FormItemModel({ ${detail}, disabled: false, isAllowEmpty: ${item.isAllowEmpty()?c} })
<#elseif item.getDetailType() == 'FORMPAGE'>
new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'>
new FormPartModel({ ${detail} })
<#elseif item.getDetailType() == 'GROUPPANEL'>
new FormGroupPanelModel({ ${detail} })
<#elseif item.getDetailType() == 'RAWITEM'>
new FormRowItemModel({ ${detail} })
<#elseif item.getDetailType() == 'TABPAGE'>
new FormTabPageModel({ ${detail} })
<#elseif item.getDetailType() == 'TABPANEL'>
new FormTabPanelModel({ ${detail} })
<#elseif item.getDetailType() == 'USERCONTROL'>
new FormUserControlModel({ ${detail} })
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<div class="app-form-item">
${item.getRawContent()}
</div>
</#if>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_header>
import { FormButtonModel, FormPageModel, FormItemModel, FromDRUIPartModel, FormPartModel, FormGroupPanelModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/assets/form-detail';
import { Subject,Subscription } from 'rxjs';
import '@/assets/interface/viewState';
</#assign>
<#assign self_content>
/**
* 详情模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public detailsModel: any = {};
/**
* 是否展示表单内容
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isDisplayContent: boolean = false;
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
/**
* 初始化表单详情模型集合
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public initFormDetailsModel(): void {
<#list ctrl.getAllPSDEFormDetails() as formdetail>
Object.assign(this.detailsModel, {
${formdetail.name}: ${P.getPartCode(formdetail, 'DETAIL_MODEL').code}
});
</#list>
}
/**
* 修改行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public updateAction?: string;
/**
* 加载草稿表单行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public loaddraftformAction?: string;
/**
* 删除行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public removeAction?: string;
/**
* 加载草稿行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public loaddraftAction?: string;
/**
* 加载行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public loadAction?: string;
/**
* 新建行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public createAction?: string;
/**
* 表单数据对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public data: any = {
<#list ctrl.getPSDEFormItems() as item>
${item.getName()}: null,
</#list>
};
/**
* 初始化表单详情模型集合
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created(){
this.handleCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
this.initFormDetailsModel();
if (this.viewState) {
this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('autoload', action)) {
this.autoLoad(data);
}
if (Object.is('load', action)) {
this.load(data);
}
if (Object.is('loaddraft', action)) {
this.loadDraft(data);
}
});
}
}
/**
* 自动加载
*
* @param {*} [arg={}]
* @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public autoLoad(arg: any = {}): void {
if (arg.srfkey && !Object.is(arg.srfkey, '')) {
this.load(arg);
return;
}
if (arg.srfkeys && !Object.is(arg.srfkeys, '')) {
Object.assign(arg, { srfkey: arg.srfkeys });
this.load(arg);
return;
}
this.loadDraft(arg);
}
/**
* 加载
*
* @private
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private load(opt: any = {}): void {
const arg: any = { ...opt };
this.$http.get(this.url + this.loadAction, arg).then((response: any) => {
if (response) {
const data = response;
this.fillForm(data);
this.$emit('load',data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.info });
});
}
/**
* 加载草稿
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public loadDraft(opt: any = {}): void {
const arg: any = { ...opt };
let post: Promise<any>;
if (!arg.srfsourcekey || Object.is(arg.srfsourcekey, '')) {
post = this.$http.post(this.url + this.loaddraftAction, arg);
} else {
post = this.$http.post(this.url + this.loaddraftformAction, arg);
}
post.then((response: any) => {
if (response) {
const data = response;
this.fillForm(data);
this.$emit('load',data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.info });
});
}
/**
* 值填充
*
* @param {*} [_datas={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
public fillForm(_datas: any = {}): void {
Object.keys(_datas).forEach((name: string) => {
if (this.data.hasOwnProperty(name)) {
this.data[name] = _datas[name];
}
});
}
/**
* 重置
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public onReset(){
if(Object.keys(this.data).length >0){
Object.keys(this.data).forEach((item:any) =>{
this.data[item]=null;
})
}
}
/**
* 搜索
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public onSearch(){
this.$emit('search',this.data);
}
/**
* 切换样式
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public toggleDisplay() {
this.isDisplayContent = !this.isDisplayContent;
}
/**
* 表单项值改变
*
* @memberof Mobeditform
*/
public valueChange(name:string,value:any){
let oldValue = JSON.parse(JSON.stringify(this.data[name]));
this.data[name] = value;
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=SEARCHFORM
\ No newline at end of file
<div class="app-mob-drtab <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<#if ctrl.getPSDEDRTabPages?? && ctrl.getPSDEDRTabPages()??>
<#list ctrl.getPSDEDRTabPages() as tabpage>
<#assign dritem = tabpage.getPSDEDRDetail() />
<#assign tabview = tabpage.getPSAppView() />
<#if dritem.getDetailType?? && dritem.getDetailType() == 'PDTVIEW'>
<view-${srfclassname('${tabview.getCodeName()}')?lower_case} v-show="activeName == '${tabpage_index}'" name="${dritem.name}" ref="${dritem.name}" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState"></view-${srfclassname('${tabview.getCodeName()}')?lower_case}>
<#else>
<view-${srfclassname('${tabview.getCodeName()}')?lower_case} v-show="activeName == '${tabpage_index}'" name="${dritem.name}" ref="${dritem.name}" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewdata="getViewdata('${dritem.getName()}')" :viewState="viewState"></view-${srfclassname('${tabview.getCodeName()}')?lower_case}>
</#if>
</#list>
</#if>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#assign self_components>
<#if view.hasPSControl('form')>
<#assign form = view.getPSControl('form')>
view_${form.getName()},
</#if>
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
<#if view.hasPSControl('form')>
<#assign form = view.getPSControl('form')>
<#if form.getPSDataEntity?? && form.getPSDataEntity()??>
import view_${form.getName()} from '@/widget/${srffilepath2(form.getPSDataEntity().getCodeName())}/${srffilepath2(form.getCodeName())}-${form.getControlType()?lower_case}/${srffilepath2(form.getCodeName())}-${form.getControlType()?lower_case}.vue';
<#else>
import view_${form.getName()} from '@/widget/app/${srffilepath2(form.getCodeName())}-${form.getControlType()?lower_case}/${srffilepath2(form.getCodeName())}-${form.getControlType()?lower_case}.vue';
</#if>
</#if>
</#assign>
<#assign self_content>
/**
* 父页面传递来得srfkey
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public parentSrfkey?: string;
/**
* 当前显示分页
*
* @type String
* @memberof ${srfclassname('${view.name}')}
*/
@Prop({ default: 'default' })public activeName?:String;
/**
* 关系界面所需的关联数据
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public parentData:any = {
<#if ctrl.getPSDEDRTabPages?? && ctrl.getPSDEDRTabPages()??>
<#list ctrl.getPSDEDRTabPages() as tabpage>
<#assign dritem = tabpage.getPSDEDRDetail() />
<#assign tabview = tabpage.getPSAppView() />
<#if dritem.getDetailType?? && dritem.getDetailType() == 'DRITEM'>
'${dritem.getName()}':${dritem.getPSDEDRItem().getParentDataJO()},
</#if>
</#list>
</#if>
};
/**
* 获取对应的ViewData
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getViewdata(dritemName:string) {
return JSON.stringify({srfparentdata:Object.assign({srfparentkey:this.parentSrfkey},this.parentData[dritemName])});
}
/**
* vue生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created(){
this.handleCreated();
}
/**
* created之后执行逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
this.viewState.subscribe(( {tag,action,data })=>{
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.parentSrfkey = data.srfkey;
}
if (Object.is('save', action)) {
<#if ctrl.getPSDEDRTabPages?? && ctrl.getPSDEDRTabPages()??>
<#list ctrl.getPSDEDRTabPages() as tabpage>
<#assign dritem = tabpage.getPSDEDRDetail() />
this.viewState.next({tag: '${dritem.name}', action: 'save', data: {}});
</#list>
</#if>
}
})
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=DRTAB
\ No newline at end of file
<div class="app-mob-chart <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="app-charts" id="myChart" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}<#else>200</#if>px;padding: 6px 0;" <#if ctrl.getWidth() gt 0> width="${ctrl.getWidth()}px"</#if> height="<#if ctrl.getHeight() gt 0>${ctrl.getHeight()}<#else>200</#if>px"></div>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
import echarts from 'echarts';
</#assign>
<#assign self_content>
/**
* 当前图表类型
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public chartType:String = "<#if ctrl.getPSDEChartSerieses()??><#assign dechartSertieses = ctrl.getPSDEChartSerieses()><#list dechartSertieses as singleSertieses><#if singleSertieses_index = 0>${singleSertieses.getSeriesType()}</#if></#list></#if>";
/**
* 初始化图表所需参数
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public $chartOption:any = {};
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created() {
this.handleCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
if (this.viewState) {
this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.load(data);
}
if(Object.is('quicksearch', action)){
this.load({query:data});
}
if(Object.is('search', action)){
this.load(data);
}
});
}
}
/**
* 获取图表基础配置数据
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.name}')}Service
*/
public getChartConfig(): any {
<#assign title=ctrl.getPSDEChartTitle()>
<#assign xaxislist=ctrl.getPSDEChartAxesesByPos('x')>
<#assign yaxislist=ctrl.getPSDEChartAxesesByPos('y')>
<#assign customCode=''>
<#if ctrl.getPSSysPFPlugin()??>
<#assign customCode= ctrl.getPSSysPFPlugin().getCode("CODE2",pf.getId(),pfstyle.getId(),view,ctrl,null)>
</#if>
const opts = {
title: { show: <#if title.isShowTitle()>true<#else>false</#if><#if title.getTitle()??>, text: '${title.getTitle()}'</#if><#if title.getSubTitle()??>, subtext: '${title.getSubTitle()}'</#if> },
legend: {}<#if ctrl.getCoordinateSystem()??><#if ctrl.getCoordinateSystem()='XY'>, tooltip: { trigger: 'axis' },
xAxis: [
<#assign first = 1>
<#list ctrl.getPSDEChartAxeses() as axes>
<#if axes.getAxesType() == 'category'>
<#if first==0>, </#if><#assign first = 0>{ aixstag: '${axes.getName()}', type: 'category', position: '${axes.getAxesPos()}'<#if axes.getCaption()??>, name: '${axes.getCaption()}'</#if><#if axes.getMaxValue()??>, max: ${axes.getMaxValue()?c}</#if><#if axes.getMinValue()??>, min: ${axes.getMinValue()?c}</#if> }
</#if>
</#list>
],
yAxis: [
<#assign first = 1>
<#list ctrl.getPSDEChartAxeses() as axes>
<#if axes.getAxesType() == 'numeric'>
<#if first==0>, </#if><#assign first = 0>{ aixstag: '${axes.getName()}', type: 'value', position: '${axes.getAxesPos()}'<#if axes.getCaption()??>, name: '${axes.getCaption()}'</#if><#if axes.getMaxValue()??>, max: ${axes.getMaxValue()?c}</#if><#if axes.getMinValue()??>, min: ${axes.getMinValue()?c}</#if> }
</#if>
</#list>
],
<#elseif ctrl.getCoordinateSystem()='NONE'>, tooltip: { trigger: 'item' }<#else>, tooltip: {}</#if></#if>,
seriesMap: {
<#assign first = 1>
<#list srflist(ctrl.getPSDEChartSerieses()) as series>
<#if first==0>, </#if><#assign first = 0> ${series.getName()}: {type: '${series.getSeriesType()}'<#if series.getCaption()??>, caption: '${series.getCaption()}'</#if><#if series.getXPSChartAxes()??>, xaixstag: '${series.getXPSChartAxes().getName()}'</#if><#if series.getYPSChartAxes()??>, yaixstag: '${series.getYPSChartAxes().getName()}'</#if> }
</#list>
},
toolbox: { show: true, feature: { dataView: { show: true, readOnly: true, title: '数据视图' }, saveAsImage: { show: true, title: '保存为图片' }}}
};
return opts;
}
/**
* 获取图表数据
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public load(opt?:any) {
const arg: any = { ...opt };
this.$http.post(this.url + 'search', arg).then((res) => {
if (res) {
let data = JSON.parse(JSON.stringify(res.data.records[0]));
this.$chartOption = { ...this.getChartConfig(), ...data };
if(Object.is(this.chartType,'pie')){
delete this.$chartOption.xAxis;
delete this.$chartOption.yAxis;
this.$chartOption.legend.bottom = '0';
}
this.drawCharts();
}
}).catch((error) => {
console.error(error);
});
}
/**
* 绘制图表
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public drawCharts(){
let myChart = echarts.init(document.getElementById('myChart'));
myChart.setOption(this.$chartOption);
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=CHART
\ No newline at end of file
<div class="app-mob-dashboard <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.getPSPortlets()??>
<#list ctrl.getPSPortlets() as item>
<view_${item.getName()} :name="'${item.name?lower_case}'" :viewState="viewState"></view_${item.getName()}>
</#list>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* 视图状态事件
*
* @protected
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected viewStateEvent: Subscription | undefined;
created() {
this.handleCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(
({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
<#if ctrl.getPSPortlets()??>
<#list ctrl.getPSPortlets() as item>
this.viewState.next({tag:'${item.name?lower_case}', action: 'load', data: {}})
</#list>
</#if>
}
);
}
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=DASHBOARD
\ No newline at end of file
<div class="app-mob-calendar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<vue-event-calendar
:events="evenItems"
@day-changed="clickDay"
>
<div v-for="(item,index) in evenItems" :key="index" class="wrapper">
<div class="line-even" v-if="item.title.length>0">
<h3 class="title">{{item.title}}<span class = "desc">{{"["+item.desc+"]"}}</span></h3>
<span class = "date-span"> {{item.date}}</span>
</div>
</div>
</vue-event-calendar>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
//this is less
.__vev_calendar-wrapper .events-wrapper .event-item .title {
text-align: left;
}
.selectDay{
background-color: #26a2ff;
border-radius: 50%;
color: white !important;
}
h2.date {
display: none;
}
.events-wrapper {
background-color: rgb(255, 255, 255) !important;;
padding: 0;
margin: 0;
}
.date-span{
color: #9b9b9b;
font-size: 14px;
position: relative;
top: 0.3em;
}
.line-even{
display: flex;
justify-content: space-between;
}
.title{
height: 40px;
color: #323232cc;
font-size: 16px;
}
.__vev_calendar-wrapper .events-wrapper .cal-events {
overflow-y: inherit !important;
}
.hidden{
display: none;
}
span.desc {
color: #2c2c2c;
font-size: 14px;
padding-left: 0.6em;
font-weight: 500;
}
.view-content-ctrl , .app-mob-calendar , .__vev_calendar-wrapper.__vev_calendar-wrapper {
height: 100%;
}
.__vev_calendar-wrapper .cal-wrapper {
height: 60%;
}
.__vev_calendar-wrapper .events-wrapper {
height: 39%;
}
.__vev_calendar-wrapper .events-wrapper .cal-events {
height: 95%;
overflow-y: auto !important;
padding: 0 5px;
margin: 15px 0;
}
.cal-events::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
background: rgba(0, 176, 255, 0);
}
.cal-events::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(201, 58, 58, 0.2);
border-radius: 0;
background:rgba(147, 207, 255, 0.21);
}
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#assign self_components>
Calendar
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
import Calendar from 'vue-event-calendar';
import * as moment from 'moment';
</#assign>
<#assign self_content>
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
/**
* 当前年份
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public year:number = 0;
/**
* 当前月份(0~11)
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public month:number = 0;
/**
* 当前天
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public day:number = 0;
/**
* 标记数组
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public markDate:Array<any> = [];
/**
* 事件数组
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public evenItems :Array<any> =[];
/**
* 查询到事件数组
*
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public evenselectItems:Array<any> =[];
/**
* 选中日期数据
*
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public activeDateItems:Array<any> =[];
/**
* 初始化当前时间
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public initcurrentTime(){
let tempTime=new Date();
this.year =tempTime.getFullYear();
this.month =tempTime.getMonth();
this.day =tempTime.getDate();
}
/**
* 日历部件数据加载
*
* @param any opt
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load(opt: any = {}): void {
const arg: any = {...opt};
const parentdata: any = {};
Object.assign(arg, parentdata);
const post: any = this.$http.post(this.url + 'search', arg);
post.then((response: any) => {
if (!response) {
if (response.errorMessage) {
this.$notify({ type: 'danger', message: '错误,系统异常!' });
}
return;
}
const data: any = response.data;
let tempItems:any;
if (Object.keys(data).length > 0) {
tempItems = JSON.parse(JSON.stringify(data.records));
}
this.dataFormat(tempItems);
if(response.data.records.length>0 && arg.date){
this.evenselectItems.push(arg.date);
}
this.itemsFormat(response.data);
}).catch((response: any) => {
this.$notify({ type: 'danger', message: '错误,' + response.message });
});
}
/**
* 数据格式化,选择符合当天的数据
*
* @param {any[]} items
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public dataFormat(items: any[] = []): void {
// this.$items = items;
this.activeDateItems = [];
items.forEach((item: any) => {
const date: Date = (moment as any)(item.begintime).toDate();
if (this.year === date.getFullYear() && this.month === date.getMonth() && this.day === date.getDate()) {
this.activeDateItems.push(item);
}
});
if(this.activeDateItems.length > 0){
let markSet = new Set(this.markDate);
markSet.add(this.year+"-"+(this.month+1)+"-"+this.day);
this.markDate = [...markSet];
}
this.dataGrounps();
}
/**
* 数据分组
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public dataGrounps(): void {
if (this.activeDateItems.length > 0) {
let dest = [];
for (let i = 0; i < this.activeDateItems.length; i++) {
let tempObj = this.activeDateItems[i];
if (dest.length === 0) {
dest.push({ name: tempObj['type'], items: [tempObj] });
} else {
let tempFlag = true;
dest.forEach((ele) => {
if (Object.is(ele.name, tempObj['type'])) {
ele.items.push(tempObj);
tempFlag = false;
}
});
if (tempFlag) {
dest.push({ name: tempObj['type'], items: [tempObj] });
}
}
}
this.activeDateItems = JSON.parse(JSON.stringify(dest));
this.$emit('valuechange',this.activeDateItems);
}
}
/**
* 日历部件数据选择日期回调
*
* @param any
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public clickDay(data:any) {
let thisEl = document.querySelectorAll(".date-num");
thisEl.forEach((value,index)=>{
value.className = "date-num";
})
let el = (event as any).currentTarget;
el.className="selectDay date-num";
if (data.date) {
let temptime = new Date(data.date);
this.year = temptime.getFullYear();
this.month = temptime.getMonth();
this.day = temptime.getDate();
let start =(moment as any)(temptime).startOf('day').format('YYYY-MM-DD HH:mm:ss');
let end =(moment as any)(temptime).endOf('day').format('YYYY-MM-DD HH:mm:ss');
this.clickInnit(data.date);
this.load({"srfbegintime":start,"srfendtime":end,"date":data.date});
}
}
/**
* 格式化事件数组
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public itemsFormat(data: any){
if(data && data.records && data.records.length >0){
data.records.forEach((item:any) =>{
this.evenItems.push({
date:item.begintime.substr(0,10),
title: item.content,
desc: item.type
});
})
}
}
/**
* 点击初始化
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public clickInnit(date:any){
this.evenItems=[];
this.evenItems.push(
{
date:date,
title:"",
desc:""
}
);
if(this.evenselectItems && this.evenselectItems.length >0){
this.evenselectItems.forEach((item:any) =>{
this.evenItems.push({
date:item,
title:"",
desc:""
});
})
}
}
/**
* vue生命周期created
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
created() {
this.handleCreated();
}
/**
* 处理created之后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
this.initcurrentTime();
if (this.viewState) {
this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(this.name, tag)) {
return;
}
if (Object.is(action, "load")) {
let curtime=new Date()
this.year =curtime.getFullYear();
this.month =curtime.getMonth();
this.day =curtime.getDate();
let start =(moment as any)(curtime).startOf('day').format('YYYY-MM-DD HH:mm:ss');
let end =(moment as any)(curtime).endOf('day').format('YYYY-MM-DD HH:mm:ss');
this.load({"srfbegintime":start,"srfendtime":end});
}
});
}
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=CALENDAR#EVENTDATE
\ No newline at end of file
<div class="app-mob-calendar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<Calendar
v-on:choseDay="clickDay"
:markDate=markDate >
</Calendar>
<van-panel v-for="(item,index) in activeDateItems" :title="item.name" :key="index">
<ul>
<li v-for="message in item.items" :key="message.id">
<van-cell :title="message.content" />
</li>
</ul>
</van-panel>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#assign self_components>
Calendar
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
import Calendar from 'vue-calendar-component';
import * as moment from 'moment';
</#assign>
<#assign self_content>
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
/**
* 当前年份
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public year:number = 0;
/**
* 当前月份(0~11)
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public month:number = 0;
/**
* 当前天
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public day:number = 0;
/**
* 标记数组
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public markDate:Array<any> = [];
/**
* 选中日期数据
*
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public activeDateItems:Array<any> =[];
/**
* 初始化当前时间
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public initcurrentTime(){
let tempTime=new Date();
this.year =tempTime.getFullYear();
this.month =tempTime.getMonth();
this.day =tempTime.getDate();
}
/**
* 日历部件数据加载
*
* @param any opt
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load(opt: any = {}): void {
const arg: any = {...opt};
const parentdata: any = {};
Object.assign(arg, parentdata);
const post: any = this.$http.post(this.url + 'search', arg);
post.then((response: any) => {
if (!response) {
if (response.errorMessage) {
this.$notify({ type: 'danger', message: '错误,系统异常!' });
}
return;
}
const data: any = response.data;
let tempItems:any;
if (Object.keys(data).length > 0) {
tempItems = JSON.parse(JSON.stringify(data.records));
}
this.dataFormat(tempItems);
}).catch((response: any) => {
this.$notify({ type: 'danger', message: '错误,' + response.message });
});
}
/**
* 数据格式化,选择符合当天的数据
*
* @param {any[]} items
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public dataFormat(items: any[] = []): void {
// this.$items = items;
this.activeDateItems = [];
items.forEach((item: any) => {
const date: Date = (moment as any)(item.begintime).toDate();
if (this.year === date.getFullYear() && this.month === date.getMonth() && this.day === date.getDate()) {
this.activeDateItems.push(item);
}
});
if(this.activeDateItems.length > 0){
let markSet = new Set(this.markDate);
markSet.add(this.year+"-"+(this.month+1)+"-"+this.day);
this.markDate = [...markSet];
}
this.dataGrounps();
}
/**
* 数据分组
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public dataGrounps(): void {
if (this.activeDateItems.length > 0) {
let dest = [];
for (let i = 0; i < this.activeDateItems.length; i++) {
let tempObj = this.activeDateItems[i];
if (dest.length === 0) {
dest.push({ name: tempObj['type'], items: [tempObj] });
} else {
let tempFlag = true;
dest.forEach((ele) => {
if (Object.is(ele.name, tempObj['type'])) {
ele.items.push(tempObj);
tempFlag = false;
}
});
if (tempFlag) {
dest.push({ name: tempObj['type'], items: [tempObj] });
}
}
}
this.activeDateItems = JSON.parse(JSON.stringify(dest));
this.$emit('valuechange',this.activeDateItems);
}
}
/**
* 日历部件数据选择日期回调
*
* @param any
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public clickDay(data:any) {
if (data) {
let temptime = new Date(data);
this.year = temptime.getFullYear();
this.month = temptime.getMonth();
this.day = temptime.getDate();
let start =(moment as any)(temptime).startOf('day').format('YYYY-MM-DD HH:mm:ss');
let end =(moment as any)(temptime).endOf('day').format('YYYY-MM-DD HH:mm:ss');
this.load({"srfbegintime":start,"srfendtime":end});
}
}
/**
* vue生命周期created
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
created() {
this.handleCreated();
}
/**
* 处理created之后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
this.initcurrentTime();
if (this.viewState) {
this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(this.name, tag)) {
return;
}
if (Object.is(action, "load")) {
let curtime=new Date()
this.year =curtime.getFullYear();
this.month =curtime.getMonth();
this.day =curtime.getDate();
let start =(moment as any)(curtime).startOf('day').format('YYYY-MM-DD HH:mm:ss');
let end =(moment as any)(curtime).endOf('day').format('YYYY-MM-DD HH:mm:ss');
this.load({"srfbegintime":start,"srfendtime":end});
}
});
}
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=CALENDAR
\ No newline at end of file
<div class="app-mob-calendar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<Calendar
lunar
ref="calendar"
:markDate="markDate"
@select="clickDay"
:tileContent="tileContent"
/>
<van-panel v-for="(item,index) in activeDateItems" :title="item.name" :key="index">
<ul>
<li v-for="message in item.items" :key="message.id">
<van-cell :title="message.content" />
</li>
</ul>
</van-panel>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
.incident {
background-color: #fff0f0;
};
.incident span {
color: #587dff;
};
.selected {
background-color: transparent!important;
}
.view-content-ctrl,.app-mob-calendar {
height: 100%;
}
.van-cell-group.van-hairline--top-bottom.van-panel {
height: 29%;
}
.van-panel__content {
height: 90%;
overflow-y: auto;
}
[class*=van-hairline]::after {
border-bottom: none !important;
}
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#assign self_components>
Calendar
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
import Calendar from "mpvue-calendar";
import "mpvue-calendar/src/browser-style.css";
import * as moment from 'moment';
</#assign>
<#assign self_content>
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
/**
* 当前年份
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public year:number = 0;
/**
* 当前月份(0~11)
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public month:number = 0;
/**
* 当前天
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public day:number = 0;
/**
* 标记数组
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public markDate:Array<any> = [];
/**
* 选中日期数据
*
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public activeDateItems:Array<any> =[];
/**
* 选中日期
*
* @type {Array<any>}
* @memberof MEETINGRL
*/
public tileContent: Array<any> = [];
/**
* 初始化当前时间
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public initcurrentTime(){
let tempTime=new Date();
this.year =tempTime.getFullYear();
this.month =tempTime.getMonth();
this.day =tempTime.getDate();
}
/**
* 日历部件数据加载
*
* @param any opt
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load(opt: any = {}): void {
const arg: any = {...opt};
const parentdata: any = {};
Object.assign(arg, parentdata);
const post: any = this.$http.post(this.url + 'search', arg);
post.then((response: any) => {
if (!response) {
if (response.errorMessage) {
this.$notify({ type: 'danger', message: '错误,系统异常!' });
}
return;
}
const data: any = response.data;
let tempItems:any;
if (Object.keys(data).length > 0) {
tempItems = JSON.parse(JSON.stringify(data.records));
}
this.dataFormat(tempItems);
}).catch((response: any) => {
this.$notify({ type: 'danger', message: '错误,' + response.message });
});
}
/**
* 数据格式化,选择符合当天的数据
*
* @param {any[]} items
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public dataFormat(items: any[] = []): void {
// this.$items = items;
this.activeDateItems = [];
items.forEach((item: any) => {
const date: Date = (moment as any)(item.begintime).toDate();
if (this.year === date.getFullYear() && this.month === date.getMonth() && this.day === date.getDate()) {
this.activeDateItems.push(item);
}
});
if(this.activeDateItems.length > 0){
this.tileContent.push({
date: this.year + "-" + (this.month + 1) + "-" + this.day,
className: "incident"
});
}
this.dataGrounps();
}
/**
* 数据分组
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public dataGrounps(): void {
if (this.activeDateItems.length > 0) {
let dest = [];
for (let i = 0; i < this.activeDateItems.length; i++) {
let tempObj = this.activeDateItems[i];
if (dest.length === 0) {
dest.push({ name: tempObj['type'], items: [tempObj] });
} else {
let tempFlag = true;
dest.forEach((ele) => {
if (Object.is(ele.name, tempObj['type'])) {
ele.items.push(tempObj);
tempFlag = false;
}
});
if (tempFlag) {
dest.push({ name: tempObj['type'], items: [tempObj] });
}
}
}
this.activeDateItems = JSON.parse(JSON.stringify(dest));
this.$emit('valuechange',this.activeDateItems);
}
}
/**
* 日历部件数据选择日期回调
*
* @param any
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public clickDay(data:any) {
if (data) {
let temptime = new Date(data);
this.year = temptime.getFullYear();
this.month = temptime.getMonth();
this.day = temptime.getDate();
let start =(moment as any)(temptime).startOf('day').format('YYYY-MM-DD HH:mm:ss');
let end =(moment as any)(temptime).endOf('day').format('YYYY-MM-DD HH:mm:ss');
this.load({"srfbegintime":start,"srfendtime":end});
}
}
/**
* vue生命周期created
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
created() {
this.handleCreated();
}
/**
* 处理created之后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
this.initcurrentTime();
if (this.viewState) {
this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(this.name, tag)) {
return;
}
if (Object.is(action, "load")) {
let curtime=new Date()
this.year =curtime.getFullYear();
this.month =curtime.getMonth();
this.day =curtime.getDate();
let start =(moment as any)(curtime).startOf('day').format('YYYY-MM-DD HH:mm:ss');
let end =(moment as any)(curtime).endOf('day').format('YYYY-MM-DD HH:mm:ss');
this.load({"srfbegintime":start,"srfendtime":end});
}
});
}
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=CALENDAR#lUNAR
\ No newline at end of file
<#if view.isShowCaptionBar()>
<mt-header title="${view.getCaption()}">
<#if ctrl.getLeftPSAppMenu()??>
<template slot="left">
<#assign leftAppMenu = ctrl.getLeftPSAppMenu()>
<#list leftAppMenu.getPSAppMenuItems() as menuItem>
<mt-button type="primary" size="small" style="margin-right:5px;" @click="<#if menuItem.getPSAppMenuItems()??>openActionSheet('leftAppMenu','${menuItem.name}')<#else>menuClick('<#if menuItem.getPSAppFunc()??>${menuItem.getPSAppFunc().codeName}</#if>')</#if>">
<#if menuItem.getPSSysImage()??>
<template slot="icon">
<#if menuItem.getPSSysImage().getImagePath() != "">
<image src="${menuItem.getPSSysImage().getImagePath()}"/>
<#else>
<#if menuItem.getPSSysImage().getCssClass() != "">
<i class="fa fa-${item.getPSSysImage().getCssClass()}" aria-hidden="true" style="font-size: 18px;"></i>
<#else>
<i class="fa fa-ellipsis-h" aria-hidden="true" style="font-size: 18px;"></i>
</#if>
</#if>
</template>
</#if>
<span>${menuItem.getCaption()}</span>
</mt-button>
</#list>
</template>
</#if>
<#if ctrl.getRightPSAppMenu()??>
<template slot="right">
<#assign rightAppMenu = ctrl.getRightPSAppMenu()>
<#list rightAppMenu.getPSAppMenuItems() as menuItem>
<mt-button type="primary" size="small" style="margin-right:5px;" @click="<#if menuItem.getPSAppMenuItems()??>openActionSheet('rightAppMenu','${menuItem.name}')<#else>menuClick('<#if menuItem.getPSAppFunc()??>${menuItem.getPSAppFunc().codeName}</#if>')</#if>">
<#if menuItem.getPSSysImage()??>
<template slot="icon">
<#if menuItem.getPSSysImage().getImagePath() != "">
<image src="${menuItem.getPSSysImage().getImagePath()}"/>
<#else>
<#if menuItem.getPSSysImage().getCssClass() != "">
<i class="fa fa-${item.getPSSysImage().getCssClass()}" aria-hidden="true" style="font-size: 18px;"></i>
<#else>
<i class="fa fa-ellipsis-h" aria-hidden="true" style="font-size: 18px;"></i>
</#if>
</#if>
</template>
</#if>
<span>${menuItem.getCaption()}</span>
</mt-button>
</#list>
</template>
</#if>
</mt-header>
</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* 应用菜单功能集合
*
* @typr {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public appFuncs:any= {<#if ctrl.getLeftPSAppMenu()??>
<#assign leftAppMenu = ctrl.getLeftPSAppMenu()>
'leftAppMenu':{
<#if leftAppMenu.getPSAppMenuItems()??>
<#list leftAppMenu.getPSAppMenuItems() as menuItem>
'${menuItem.name}':<#if menuItem.getPSAppMenuItems()??>[<#list menuItem.getPSAppMenuItems() as singleItem>{value:'${singleItem.name}',name:'${singleItem.getCaption()}'<#if singleItem.getPSAppFunc()??>,func:'${singleItem.getPSAppFunc().getCodeName()}'</#if>}<#if singleItem_has_next>,</#if></#list>]<#else>''</#if><#if menuItem_has_next>,</#if></#list><#else>''</#if>}</#if><#if ctrl.getRightPSAppMenu()??><#assign rightAppMenu = ctrl.getRightPSAppMenu()>,
'rightAppMenu':{
<#if rightAppMenu.getPSAppMenuItems()??>
<#list rightAppMenu.getPSAppMenuItems() as menuItem>
'${menuItem.name}':<#if menuItem.getPSAppMenuItems()??>[<#list menuItem.getPSAppMenuItems() as singleItem>{value:'${singleItem.name}',name:'${singleItem.getCaption()}'<#if singleItem.getPSAppFunc()??>,func:'${singleItem.getPSAppFunc().getCodeName()}'</#if>}<#if singleItem_has_next>,</#if></#list>]<#else>''</#if><#if menuItem_has_next>,</#if></#list><#else>''</#if>}</#if>
}
/**
* 菜单点击
*
* @params {$event:any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public menuClick($event:any){
if($event){
this.$emit('titleBarClick',$event);
}
}
/**
* 打开ActionSheet
*
* @params {menuDirection:string,value:string}
* @memberof Titlebar
*/
public openActionSheet(menuDirection:string,value:string){
if(this.appFuncs[menuDirection] && this.appFuncs[menuDirection][value] && this.appFuncs[menuDirection][value].length >0){
let subject = this.$actionSheet({actions:this.appFuncs[menuDirection][value]}).show();
subject.subscribe((res:any) =>{
if(res.func){
this.$emit('titleBarClick',res.func);
}
})
}
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=TITLEBAR
\ No newline at end of file
<div class="app-mob-treeexpbar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="treeexpbar-container">
<nav>
<div class="van-sidebar">
<a :class="item.id==selectedItem.id?'van-sidebar-item van-sidebar-item--select':'van-sidebar-item'" v-for="(item,index) in nodeArray" :key="index" @click="treeexpbar_selectionchange(item)">
<div class="van-sidebar-item__text">{{ item.text }}</div>
</a>
</div>
</nav>
<div class="treeexpbar-container-content">
<#if ctrl.getAllRelatedPSAppViews()??>
<#assign allRefViews = ctrl.getAllRelatedPSAppViews()>
<#list allRefViews as refview>
<div class="treeexpbar-container-content-item" v-if="appViewRefs[selectedItem.id] === '${refview.getName()}'">
<view-${srfclassname('${refview.getCodeName()}')?lower_case} @viewdataschange="viewDatsChange($event)"></view-${srfclassname('${refview.getCodeName()}')?lower_case}>
</div>
</#list>
</#if>
</div>
</div>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
<#list ctrl.getPSControls() as treeviewctrl>
public url: string = '${app.getPKGCodeName()?lower_case}/ctrl/${treeviewctrl.codeName?lower_case}${srfclassname(treeviewctrl.getControlType())?lower_case}view/';
</#list>
/**
* 节点数组
*
* @type Array<any>
* @memberof IBZSAM01TreeView
*/
public nodeArray: Array<any> = [];
/**
* 树视图导航当前选中项
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public selectedItem = "";
/**
* 树视图导航所有关联视图
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public appViewRefs = {
<#if ctrl.getPSAppViewRefs()??>
<#assign viewRefs = ctrl.getPSAppViewRefs()>
<#list viewRefs as singleView>
'${singleView.getName()?split(":")[1]}':<#if singleView.getRefPSAppView()??>'${singleView.getRefPSAppView().getName()}'<#else>''</#if><#if singleView_has_next>,</#if>
</#list>
</#if>
};
/**
* 树视图导航选中
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public treeexpbar_selectionchange(item:any,name:string,event:any){
if(item){
this.selectedItem = item;
}
}
/**
* 树视图导航数据加载成功
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public treeexpbar_load(item:any,name:string,event:any){
console.log("树视图导航数据加载成功");
}
/**
* 树节点加载
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public load(data: any) {
const param: any = {
srfnodeid: data && data.id ? data.id : encodeURI('#'),
};
this.$http.get(this.url+"getnodes",param).then((res:any) => {
if(res.status && res.status == 200){
this.nodeArray = res.data;
this.selectedItem = this.nodeArray[0];
}
}).catch((error:any)=>{
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
});
<#if ctrl.getPSControls()??>
<#assign allCtrls = ctrl.getPSControls()>
<#list allCtrls as curctrl>
this.viewState.next({ tag: '${curctrl.name}', action: 'load', data:data })
</#list>
</#if>
}
/**
* 视图数据变化事件
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public viewDatsChange(data:any){
console.log('视图数据变化事件触发');
}
/**
* vue生命周期created
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public created(){
this.handleCreated();
}
/**
* created之后的逻辑
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public handleCreated(){
this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.load(data);
}
});
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=TREEEXPBAR
\ No newline at end of file
<div class="app-mob-treeview <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<mt-tab-container v-if="!isOptional" v-model="active" @input="deleteNode" swipeable>
<mt-tab-container-item :id="index" v-for="(nodelist,index) in nodeArray" :key="index">
<mt-cell v-for="(node,index2) in nodelist" :key="'cell'+index2" :title="node.text" @click.native="show(node)">
<van-icon v-if="!node.leaf" name="wap-nav" />
</mt-cell>
</mt-tab-container-item>
</mt-tab-container>
<van-checkbox-group v-if="isOptional" v-model="checkedList">
<mt-tab-container v-model="active" @input="deleteNode" swipeable>
<mt-tab-container-item :id="index" v-for="(nodelist,index) in nodeArray" :key="index">
<template v-for="(node,index2) in nodelist" >
<mt-cell v-if="!node.leaf" :title="node.text" :key="'cell'+index2" @click.native="show(node)">
<van-icon name="wap-nav" />
</mt-cell>
<mt-cell v-if="node.leaf" :title="node.text" :key="'cell'+index2" @click.native="toggle(node)">
<van-checkbox :name="node.srfkey"></van-checkbox>
</mt-cell>
</template>
</mt-tab-container-item>
</mt-tab-container>
</van-checkbox-group>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* 数据选择视图选中项
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public selectedData?:any;
/**
* 跳转变量
*
* @type number
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public active: number = 0;
/**
* 节点数组
*
* @type Array<any>
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public nodeArray: Array<any> = [];
/**
* 选中数组
*
* @type Array<any>
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public checkedList: Array<any> = [];
/**
* 选中数据
*
* @type Array<any>
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public checkedData: Array<any> = [];
/**
* 是否可以选择
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({default:false}) public isOptional?: boolean;
/**
* 节点导航视图映射
*
* @type any
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public nodeView: any = {
<#list ctrl.getPSDETreeNodes() as node>
<#if node.getNavPSAppView?? && node.getNavPSAppView()??>
'${node.getNodeType()}':{hasView: true, viewName: 'view-${node.getNavPSAppView().getName()?lower_case}'},
<#else>
'${node.getNodeType()}':{hasView: false},
</#if>
</#list>
};
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/ctrl/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}view/';
/**
* 初始化方法
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created() {
this.handleCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
if (this.viewState) {
this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is(action, 'load')) {
this.load(data);
}
if (Object.is(action, 'save')) {
this.$emit("change",this.checkedData);
}
});
}
if(this.selectedData){
this.selectedData.forEach((val:any, idx:any, array:any) => {
this.checkedList.push(val.srfkey);
});
}
}
/**
* 数据加载
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load(data:any) {
const param: any = {
srfnodeid: data && data.id ? data.id : encodeURI('#'),
};
this.$http.get(this.url+"getnodes",param).then((res) => {
this.nodeArray.push(res.data);
this.active = this.nodeArray.length-1;
});
}
/**
* 跳转方法
*
* @param haschild 是否有子节点
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public show(node:any){
if(!node.leaf){
this.load(node);
}else{
this.openModal(node);
}
}
/**
* 删除节点
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public deleteNode(){
if(this.active == (this.nodeArray.length-2)){
this.nodeArray.splice(this.nodeArray.length-1, 1);
}
}
/**
* 选中切换方法
*
* @param node 节点数据
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public toggle(node:any){
let index = this.checkedList.indexOf(node.srfkey);
if(Object.is(index,-1)){
this.checkedList.push(node.srfkey);
this.checkedData.push(node);
}else{
this.checkedList.splice(index,1);
this.checkedData.splice(index,1);
}
}
/**
* 打开编辑视图
*
* @param any 节点对象
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public openModal(node: any = {}) {
let nodeType = this.nodeView[node.id.split(";")[0]];
if(nodeType.hasView){
let modalSubject = this.$modal({
componentName: nodeType.viewName,
viewdata:JSON.stringify({ srfkey: node.srfkey })
}).show();
modalSubject.subscribe((res: any) => {
if (res) {
return Promise.resolve(res);
}
});
}else{
console.log("编辑视图未配置");
}
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=TREEVIEW
\ No newline at end of file
<div class="app-mob-mdctrl <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="app-mob-mdctrl-${ctrl.name}">
<mt-loadmore
:top-method="loadTop"
@top-status-change="handleTopChange"
:bottom-method="loadBottom"
@bottom-status-change="handleBottomChange"
:bottom-all-loaded="allLoaded"
:bottomDistance="10"
v-if="items.length>0"
:auto-fill="false"
ref="loadmore" >
<ul class="items">
<#--多数据视图||多数据视图(部件视图)-->
<#if view.getViewType()?? && (view.getViewType()=='DEMOBMDVIEW' || view.getViewType()=='DEMOBMDVIEW9')>
<li v-for="item in items" @click="goPage(item)" :key="item.srfkey" class="app-mob-mdctrl-item">
<#if ctrl.getItemPSLayoutPanel()??>
<#assign layoutpanel=ctrl.getItemPSLayoutPanel()>
<div style="width:100%;">
<view_${layoutpanel.getName()} :item="item"></view_${layoutpanel.getName()}>
</div>
<#else>
<van-swipe-cell>
<#if ctrl.getPSDEUIActionGroup()?? && ctrl.getPSDEUIActionGroup().getPSUIActionGroupDetails()??>
<#assign details = ctrl.getPSDEUIActionGroup().getPSUIActionGroupDetails()>
<template slot="left">
<#list details as detail>
<#if detail.getPSUIAction()??>
<#assign uiaction = detail.getPSUIAction()>
<van-button square <#if uiaction.getUIActionTag() == "Remove">type="danger"<#else>type="primary"</#if> @click="mdctrl_click('${detail.getName()}',item)" text="${uiaction.getCaption()}"/>
</#if>
</#list>
</template>
</#if>
<#-- 实体列表项集合-->
<#if ctrl.getPSDEListItems()??>
<#if ctrl.getControlStyle()=='ICONVIEW'>
<app-round-list :item="item"></app-round-list>
<#elseif ctrl.getControlStyle()=='LISTVIEW'>
<app-icon-list :item="item"></app-icon-list>
<#elseif ctrl.getControlStyle()=='SWIPERVIEW'>
<app-card-list :item="item"></app-card-list>
<#else>
<van-panel :title="item.srfmajortext ">
<div class="van-cell van-panel__header" v-if="listMap.get('subtitle')||listMap.get('content')||listMap.get('time')">
<div class="van-cell__title time" v-if=" listMap.get('time')">
<div class="van-cell__label">
{{ item.time?item.time.substr(0,10):'' }}
</div>
</div>
<div class="van-cell__title subtitle" v-if=" listMap.get('subtitle')">
<span>{{ listMap.get('subtitle') }}</span>
<div class="van-cell__label">
{{ item.subtitle }}
</div>
</div>
<div class="van-cell__title content" v-if=" listMap.get('content')">
<span>{{ listMap.get('content') }}</span>
<div class="van-cell__label">
{{ item.content }}
</div>
</div>
</div>
</van-panel>
</#if>
<#else>
<div>暂无数据</div>
</#if>
<#if ctrl.getPSDEUIActionGroup2()?? && ctrl.getPSDEUIActionGroup2().getPSUIActionGroupDetails()??>
<#assign details = ctrl.getPSDEUIActionGroup2().getPSUIActionGroupDetails()>
<template slot="right">
<#list details as detail>
<#if detail.getPSUIAction()??>
<#assign uiaction = detail.getPSUIAction()>
<van-button square <#if uiaction.getUIActionTag() == "Remove">type="danger"<#else>type="primary"</#if> @click="mdctrl_click('${detail.getName()}',item)" text="${uiaction.getCaption()}"/>
</#if>
</#list>
</template>
</#if>
</van-swipe-cell>
</#if>
</li>
<#--工作流多数据视图-->
<#elseif view.getViewType()?? && view.getViewType()=='DEMOBWFMDVIEW'>
<li v-for="item in items" @click="goPage(item)" :key="item.srfkey" class="app-mob-mdctrl-item">
<van-panel :title="item.srfmajortext ">
<div class="van-cell van-panel__header" >
<div class="van-cell__title time">
<div class="van-cell__label">
{{ item.starttime.substr(0,10) }}
</div>
</div>
<div class="van-cell__title subtitle">
<span>步骤</span>
<div class="van-cell__label">
{{ item.step }}
</div>
</div>
<div class="van-cell__title content" >
<span>{{item.startusername}}</span>
<div class="van-cell__label">
{{ item.workflowname }}
</div>
</div>
</div>
</van-panel>
</li>
<#else>
<#--多数据选择视图(部件视图)-->
<#-- 多选-->
<van-checkbox-group v-model="checkboxList" @change="change" v-if="isMutli">
<van-cell-group>
<li v-for="item in items" :key="item.srfkey" class="app-mob-mdctrl-item">
<#if ctrl.getItemPSLayoutPanel()??>
<#assign layoutpanel=ctrl.getItemPSLayoutPanel()>
<div style="width:100%;">
<view_${layoutpanel.getName()} :item="item.srfkey"></view_${layoutpanel.getName()}>
</div>
<#else>
<div role="button" tabindex="0" class="van-cell van-cell--clickable">
<van-checkbox :name="item.srfkey" v-if="isMutli">
<div class="van-cell__title">
<span>{{item.srfmajortext}}</span>
</div>
</van-checkbox>
</div>
</#if>
</li>
</van-cell-group>
</van-checkbox-group>
<#-- 单选-->
<van-radio-group v-model="radio" @change="change" v-if="!isMutli">
<van-cell-group>
<li v-for="item in items" :key="item.srfkey" class="app-mob-mdctrl-item">
<#if ctrl.getItemPSLayoutPanel()??>
<#assign layoutpanel=ctrl.getItemPSLayoutPanel()>
<div style="width:100%;">
<view_${layoutpanel.getName()} :item="item"></view_${layoutpanel.getName()}>
</div>
<#else>
<div role="button" tabindex="0" class="van-cell van-cell--clickable">
<van-radio slot="right-icon" :name="item.srfkey">
<div class="van-cell__title">
<span>{{item.srfmajortext}}</span>
</div>
</van-radio>
</div>
</#if>
</li>
</van-cell-group>
</van-radio-group>
</#if>
</ul>
</mt-loadmore>
</div>
</#if>
</div>
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
<#if ctrl.getItemPSLayoutPanel()??>
<#assign layoutpanel=ctrl.getItemPSLayoutPanel()>
${P.getCtrlCode(layoutpanel, 'CONTROL.less').code}
</#if>
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
<#if ctrl.getItemPSLayoutPanel()??>
<#assign layoutpanel=ctrl.getItemPSLayoutPanel()>
<#if layoutpanel.getPSDataEntity?? && layoutpanel.getPSDataEntity()??>
import view_${layoutpanel.getName()} from '@/widget/${srffilepath2(layoutpanel.getPSDataEntity().getCodeName())}/${srffilepath2(layoutpanel.getCodeName())}-${layoutpanel.getControlType()?lower_case}/${srffilepath2(layoutpanel.getCodeName())}-${layoutpanel.getControlType()?lower_case}.vue';
<#else>
import view_${layoutpanel.getName()} from '@/widget/app/${srffilepath2(layoutpanel.getCodeName())}-${layoutpanel.getControlType()?lower_case}/${srffilepath2(layoutpanel.getCodeName())}-${layoutpanel.getControlType()?lower_case}.vue';
</#if>
</#if>
</#assign>
<#assign components>
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
view_${subctrl.getName()},
</#if>
</#list>
</#if>
<#if ctrl.getItemPSLayoutPanel()??>
<#assign layoutpanel=ctrl.getItemPSLayoutPanel()>
view_${layoutpanel.getName()}
</#if>
</#assign>
<#assign self_content>
/**
*上级传递的选中项
*@type {Array}
*@memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public selectedData?:Array<any>;
/**
* 新建打开视图
*
* @type {Function}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public newdata?: Function;
/**
* 打开视图
*
* @type {Function}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public opendata?: Function;
/**
* 关闭行为
*
* @type {Function}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public close?:Function;
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
<#if view.getViewType()?? && view.getViewType()=='DEMOBWFMDVIEW'>
public url: string = '${app.getPKGCodeName()?lower_case}/ibizutil/worklist/maingrid/searchmy';
<#else>
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
</#if>
<#if view.getViewType()?? && view.getViewType()=='DEMOBPICKUPMDVIEW'>
/**
* 存放多数据选择数组(多选)
*
* @type {array}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public checkboxList:Array<string> = [];
/**
* 存放数据选择数组(单选)
*
* @type {object}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public radio:any = '';
/**
* 点击多选按钮触发
*
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public change(){
if(this.isMutli){
let checkboxLists= this.items.filter((item,index)=>{
if(this.checkboxList.indexOf(item.srfkey)!=-1){
return true;
}else{
return false;
}
})
this.$emit('selectchange',checkboxLists);
}else{
let radioItem = this.items.filter((item,index)=>{return item.srfkey==this.radio});
this.$emit('selectchange',radioItem);
}
}
</#if>
/**
* 列表键值对
*
* @type {Map}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public listMap:any = new Map();
/**
* 分页大小
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public pageSize:number = ${ctrl.getPagingSize()?c};
/**
* 总页数
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public pageTotal:number = 0;
/**
* 当前页数
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public pageNumber:any = 1;
/**
* 判断底部数据是否全部加载完成,若为真,则 bottomMethod 不会被再次触发
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public allLoaded: boolean = false;
/**
* 底部状态
*
* @type {String}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public bottomStatus: String = "";
/**
* 顶部状态
*
* @type {String}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public topStatus: String = "";
/**
*
*
* @type {Number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public moveTranslate: Number = 0;
/**
* searchKey 搜索关键字
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public searchKey:string = '';
/**
* 列表数组
*
* @param {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public items:Array<any> =[];
/**
* 选中数组
*
* @param {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public selectedArray:Array<any> = [];
/**
* 多选计数
*
* @param {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public selectednumber:number =0;
/**
* 搜索行为
*
* @param {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public searchAction?:string;
/**
* 是否为选择视图
*
* @param {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public isSelected?:boolean;
/**
* 是否多选
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({default:false}) public isMutli?: boolean;
/**
* 单选选择值
*
* @param {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public selectedValue:string = "";
/**
* 底部改变状态
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleBottomChange(status: String) {
this.bottomStatus = status;
}
/**
* 顶部改变状态
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleTopChange(status: String) {
this.moveTranslate = 1;
this.topStatus = status;
}
/**
* 上拉加载更多数据
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public loadBottom() {
this.pageNumber++;
this.load(Object.assign({query:this.searchKey},{page: { current: this.pageNumber, size: this.pageSize }}),'bottom');
}
/**
* 多项数据删除行数据
*
* @private
* @param {*} [arg={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
private remove(opt: any = {}):Promise<any>{
return new Promise((resolve, reject) =>{
const arg: any = { ...opt };
const parentdata: any = {};
Object.assign(arg, parentdata);
const post: any = this.$http.post(this.url + 'remove', {srfkeys:arg.srfkey});
post.then((response:any) =>{
if(response){
this.$notify({ type: 'success', message: '删除成功'});
this.load();
resolve(response);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error });
reject(error);
});
})
}
/**
* 刷新数据
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public refresh():void{
this.load()
}
/**
* 多项数据加载
*
* @private
* @param {*} [arg={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private load(data:any={},type:any=""):void {
<#if view.getViewType()?? && view.getViewType()=='DEMOBWFMDVIEW'>
const post: Promise<any> = this.$http.post(this.url, data);
<#else>
const post: Promise<any> = this.$http.post(this.url + this.searchAction, data);
</#if>
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$notify({ type: 'danger', message: '错误,' + response.info });
}
this.$emit('load',response.data);
this.pageTotal = response.data.total;
this.allLoaded = this.pageNumber>=this.pageTotal/this.pageSize?true:false;
if(type=='top'){
this.items=[];
this.items = response.data.records;
let loadmore:any = this.$refs.loadmore;
loadmore.onTopLoaded();
}
else if(type=='bottom'){
setTimeout(()=>{
for(let i=0;i<response.data.records.length;i++){
this.items.push(response.data.records[i]);
}
let loadmore:any = this.$refs.loadmore;
loadmore.onBottomLoaded();
},2000)
}else{
this.items=[];
this.items = response.data.records;
}
})
.catch((response: any) => {
if (response && response.status === 401) {
return;
}
if (!response || !response.status || !response.data) {
this.$notify({ type: 'danger', message: '错误,系统异常!' });
return;
}
const { data: _data } = response;
console.error(_data.title + _data.message);
});
}
/**
* 全选
*
* @private
* @param {*} [arg={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private handleClick() {
this.items.forEach((item: any) => {
item.value = true;
});
this.selectednumber = this.items.length;
}
/**
* checkbox 选中回调
*
* @private
* @param {*} [arg={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public checkboxChange(data:any){
this.selectednumber =0;
this.items.forEach((item: any) => {
if(item.value){
this.selectednumber ++;
}
});
}
/**
* 下拉刷新
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public loadTop() {
this.pageNumber=1;
this.load(Object.assign({query:this.searchKey},{page: { current: this.pageNumber, size: this.pageSize }}),'top');
}
/**
* 点击列表数据跳转
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public goPage(item: String) {
this.selectedArray.push(item);
this.$emit('click',item);
}
/**
* 获取多项数据
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getDatas(): any[] {
return this.selectedArray;
}
/**
* 获取单项数据
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getData(): any {
return this.selectedArray[0];
}
/**
* vue生命周期created
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created() {
this.handleCreated();
}
/**
* created后的执行逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
if (this.viewState) {
this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(this.name, tag)) {
return;
}
if (Object.is(action, "load")) {
this.pageNumber = 1;
this.load(Object.assign(data, {page: { current: this.pageNumber, size: this.pageSize }}),"init");
}
if (Object.is(action, "search")) {
this.load(Object.assign(data, {page: { current: this.pageNumber, size: this.pageSize }}),"init" );
}
if (Object.is(action, "quicksearch")) {
this.searchKey = data;
this.load( Object.assign( { query: data }, { page: { current: 1, size: this.pageSize*this.pageNumber }}),"init");
}
if (Object.is(action, "refresh")) {
this.refresh();
}
});
}
this.initMap();
<#if view.getViewType()?? && view.getViewType()=='DEMOBPICKUPMDVIEW'>
if(!this.isMutli){
if(this.selectedData){
this.radio = this.selectedData[0].srfkey;
}
}else{
if(this.selectedData){
this.checkboxList =[];
this.selectedData.forEach((item:any)=>{
this.checkboxList.push(item.srfkey);
})
}
}
</#if>
}
/**
* 初始化Map
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public initMap(){
<#if ctrl.getPSDEListItems?? && ctrl.getPSDEListItems()??>
<#list ctrl.getPSDEListItems() as lists>
this.listMap.set('${lists.getName()}','${lists.getCaption()}');
</#list>
</#if>
}
/**
* 列表项左滑右滑触发行为
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public mdctrl_click(tag:any,item:any){
this.selectedArray = [];
this.selectedArray.push(item);
<#if ctrl.getPSDEUIActionGroup()?? && ctrl.getPSDEUIActionGroup().getPSUIActionGroupDetails()??>
<#assign details = ctrl.getPSDEUIActionGroup().getPSUIActionGroupDetails()>
<#list details as detail>
if(Object.is(tag,'${detail.getName()}')){
this.mdctrl_${detail.getName()}_click();
}
</#list>
</#if>
<#if ctrl.getPSDEUIActionGroup2()?? && ctrl.getPSDEUIActionGroup2().getPSUIActionGroupDetails()??>
<#assign details = ctrl.getPSDEUIActionGroup2().getPSUIActionGroupDetails()>
<#list details as detail>
if(Object.is(tag,'${detail.getName()}')){
this.mdctrl_${detail.getName()}_click();
}
</#list>
</#if>
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=MOBMDCTRL
\ No newline at end of file
<div class="app-form <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<#-- isNoTabHeader是否隐藏分页头部-->
<#if ctrl.isNoTabHeader()>
<#list ctrl.getPSDEFormPages() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
<#else>
<van-tabs type="card" animated color="#26A2FF" @change="tabSwitch" >
<van-tab v-for="(item, index) in tabList" :key="index" :title="item.tabTitle" :name="item.value">
</van-tab>
</van-tabs>
<#list ctrl.getPSDEFormPages() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</#if>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<div class="app-form-item-button">
<nut-button v-if="detailsModel.${item.name}.visible" class="app-form-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style='<#if item.getHeight() gt 0>height: ${item.getHeight()}px;</#if>'>${item.caption}</nut-button>
</div>
</#if>
\ No newline at end of file
<#assign dritem = item.getPSDEDRItem()>
<app-form-druipart :formState="this.formState" paramitem='<#if item.getParamItem()??>${item.getParamItem()}<#else>srfkey</#if>'
:parentdata='<#if dritem.getParentDataJO?? && dritem.getParentDataJO()??>${dritem.getParentDataJO()}<#else>{}</#if>'
refviewtype='<#if item.getPSAppView()?? && item.getPSAppView().getPSViewType()??>${item.getPSAppView().getPSViewType().getId()}</#if>'
refreshitems='<#if item.getRefreshItems()??>${item.getRefreshItems()}</#if>'
:ignorefieldvaluechange="this.ignorefieldvaluechange" @drdatasaved="drdatasaved($event)"
viewname='view-${srfclassname('${item.getPSAppView().getCodeName()}')?lower_case}' :data="JSON.stringify(this.data)" style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%</#if><#if item.getContentHeight() == 0><#if item.getPSAppView().getHeight() gt 0>height:${item.getPSAppView().getHeight()?c}px;</#if><#else>height:${item.getContentHeight()?c}px;</#if>overflow: auto;">
</app-form-druipart>
\ No newline at end of file
<#if !item.isHidden()>
<#--<#if item.render??>-->
<#--${item.render.code}-->
<#--<#else>-->
<div v-if="detailsModel.${item.name}.visible" class="app-form-item ${item.getLabelPos()?lower_case}<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style='<#if item.getItemHeight() gt 0>height: ${item.getItemHeight()?c};</#if><#if item.getItemWidth() gt 0>width: ${item.getItemWidth()?c};</#if>'>
<#if item.getEditorType() != "MOBMPICKER" && item.getEditorType() != "MOBPICTURELIST" && item.getEditorType() != "MOBMULTIFILEUPLOAD" && item.getEditorType() != "MOBPICTURE">
<#if item.getEditorType() == "MOBTEXTAREA" && item.getLabelPos() == "TOP">
<#else>
<#if item.isShowCaption()>
<label style="width: ${item.getLabelWidth()}px;<#if item.getLabelPos() == "TOP">flex-direction:column;</#if><#if item.getLabelPos() == "LEFT"> flex-direction:row;<#elseif item.getLabelPos() == "RIGHT">flex-direction:row-reverse;<#else>flex-direction:column-reverse;</#if>" class="app-form-item-label ${item.getLabelPos()?lower_case}">
<#if item.isEmptyCaption() == false>
<#if item.getPSSysImage()??>
<#assign image = item.getPSSysImage()>
<#if image.getCssClass()?? && image.getCssClass() != ""><i class="fa fa-${image.getCssClass()}" aria-hidden="true" style="font-size: 18px;"></i></#if>
<#-- <#if image.getImagePath()?? && image.getImagePath() != ""><image src="${image.getImagePath()}"/></#if> -->
</#if>
<span class="stars" style="color:red" v-if="!detailsModel.${item.name}.isAllowEmpty">*</span>
${item.caption}
</#if>
</label>
</#if>
</#if>
</#if>
<div class="app-form-item-editor" style="width:100%;">
${P.getEditorCode(item, "EDITOR.html").code}<#if item.isEnableUnitName()>${item.getUnitName()}</#if>
</div>
</div>
</#if>
<#--</#if>-->
\ No newline at end of file
<#--<#if item.render??>-->
<#--${item.render.code}-->
<#--<#else>-->
<#if ctrl.getPSDEFormPageCount?? && ctrl.getPSDEFormPageCount()==1>
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
<#else>
<div v-if="activeFormPage === '${item.name}'" class="app-form-page <#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</div>
</#if>
<#--</#if>-->
\ No newline at end of file
<#--<#if item.render??>-->
<#--${item.render.code}-->
<#--<#else>-->
<#if item.isShowCaption()>
<div style="<#if item.getPSSysCss()??>style='${item.getPSSysCss().getRawCssStyle()};'</#if>" class="app-form-group<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" >
<div class="app-form-group-content" v-show="isDisplayContent_${item.name}">
<van-collapse v-model="activeNames">
<van-collapse-item title="${item.getCaption()}" name="${item.getName()}" v-on:click="toggleDisplay('${item.name}')">
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</van-collapse-item>
</van-collapse>
</div>
</div>
<#else>
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</#if>
<#--</#if>-->
\ No newline at end of file
<#if item.getLogicType() == 'GROUP'><#if item.isNotMode()>!(</#if><#if item.getPSDEFDLogics()??><#list item.getPSDEFDLogics() as subLogic><#if subLogic_index gt 0><#if item.getGroupOP() == 'AND'> && </#if><#if item.getGroupOP() == 'OR'> || </#if></#if>${P.getPartCode(subLogic, 'DETAIL_LOGIC').code}</#list></#if><#if item.isNotMode()>)</#if><#elseif item.getLogicType() == 'SINGLE'>(this.$util as any).testCond(_${item.getDEFDName()?lower_case}, '${item.getPSDBValueOPId()}', '${item.getValue()}')</#if>
\ No newline at end of file
<#assign detail>caption: '${item.getCaption()}', detailType: '${item.getDetailType()}', name: '${item.getName()}', visible: true, isShowCaption: ${item.isShowCaption()?c}</#assign>
<#if item.getDetailType() == 'BUTTON'>
new FormButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>, uiaction: { type: '${uiaction.getUIActionType()}',
tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if> }</#if> })
<#elseif item.getDetailType() == 'DRUIPART'>
new FromDRUIPartModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMITEM'>
new FormItemModel({ ${detail}, disabled: false, isAllowEmpty: ${item.isAllowEmpty()?c} })
<#elseif item.getDetailType() == 'FORMPAGE'>
new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'>
new FormPartModel({ ${detail} })
<#elseif item.getDetailType() == 'GROUPPANEL'>
new FormGroupPanelModel({ ${detail} })
<#elseif item.getDetailType() == 'RAWITEM'>
new FormRowItemModel({ ${detail} })
<#elseif item.getDetailType() == 'TABPAGE'>
new FormTabPageModel({ ${detail} })
<#elseif item.getDetailType() == 'TABPANEL'>
new FormTabPanelModel({ ${detail} })
<#elseif item.getDetailType() == 'USERCONTROL'>
new FormUserControlModel({ ${detail} })
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<ion-item class="app-form-item">
${item.getRawContent()}
</ion-item>
</#if>
\ No newline at end of file
<#list ctrl.getAllPSDEFormDetails() as formdetail>
<#if formdetail.getPSDEFDGroupLogic('ITEMBLANK')??>
<#assign ITEMBLANK = formdetail.getPSDEFDGroupLogic('ITEMBLANK')/>
if (Object.is(name, '')<#if ITEMBLANK.getRelatedDetailNames()??><#list ITEMBLANK.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = true;
<#if ITEMBLANK.getRelatedDetailNames()??>
<#list ITEMBLANK.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(ITEMBLANK, 'DETAIL_LOGIC').code}) {
ret = false;
}
this.rules.${formdetail.name}[0].required = ret;
this.detailsModel.${formdetail.name}.isAllowEmpty = !ret;
}
</#if>
<#if formdetail.getPSDEFDGroupLogic('ITEMENABLE')??>
<#assign ITEMENABLE = formdetail.getPSDEFDGroupLogic('ITEMENABLE')/>
if (Object.is(name, '')<#if ITEMENABLE.getRelatedDetailNames()??><#list ITEMENABLE.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if ITEMENABLE.getRelatedDetailNames()??>
<#list ITEMENABLE.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(ITEMENABLE, 'DETAIL_LOGIC').code}) {
ret = true;
}
this.detailsModel.${formdetail.name}.setDisabled(!ret);
}
</#if>
<#if formdetail.getPSDEFDGroupLogic('PANELVISIBLE')??>
<#assign PANELVISIBLE = formdetail.getPSDEFDGroupLogic('PANELVISIBLE')/>
if (Object.is(name, '')<#if PANELVISIBLE.getRelatedDetailNames()??><#list PANELVISIBLE.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if PANELVISIBLE.getRelatedDetailNames()??>
<#list PANELVISIBLE.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(PANELVISIBLE, 'DETAIL_LOGIC').code}) {
ret = true;
}
this.detailsModel.${formdetail.name}.setVisible(ret);
}
</#if>
</#list>
\ No newline at end of file
<template>
<div>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</div>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_header>
import { FormButtonModel, FormPageModel, FormItemModel, FromDRUIPartModel, FormPartModel, FormGroupPanelModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/assets/form-detail';
import { Subject } from 'rxjs';
</#assign>
<#assign self_content>
/**
* 加载行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public loadAction?:string;
/**
* 加载草稿行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public loaddraftAction?:string;
/**
* 更新行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public updateAction?:string;
/**
* 创建行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public createAction?:string;
/**
* 关闭行为
*
* @type {Function}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public close?:Function;
/**
* 删除行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public removeAction?:string;
/**
* 加载表单草稿行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public loaddraftformAction?:string;
/**
* 工作流程开始行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public wfstartAction?:string;
/**
* 工作流程提交行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public wfsubmitAction?:string;
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public formState: Subject<any> = new Subject();
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
/**
* 当前执行的行为逻辑
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public currentAction: string = "";
/**
* 详情模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public detailsModel: any = {};
/**
* 忽略表单项值变化
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public ignorefieldvaluechange: boolean = false;
/**
* 表单数据对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public data: any = {
<#list ctrl.getPSDEFormItems() as item>
${item.getName()}: null,
</#list>
ismodify:false
};
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getDatas(): any[] {
return [this.data];
}
/**
* 获取单项数据
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getData(): any {
return this.data;
}
<#if ctrl.getAllPSDEFormDetails()??>
<#list ctrl.getAllPSDEFormDetails() as detail>
<#if detail.getDetailType() == "GROUPPANEL">
/**
* 是否展示表单分组${detail.getCaption()}内容
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isDisplayContent_${detail.name}: boolean = true;
</#if>
</#list>
</#if>
/**
* 控制展示表单分组
*
* @type { Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public activeNames: Array<any> = [<#if ctrl.getAllPSDEFormDetails()??><#list ctrl.getAllPSDEFormDetails() as detail><#if detail.getDetailType() == "GROUPPANEL">'${detail.name}',</#if></#list></#if>];
/**
* 初始化表单详情模型集合
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public initFormDetailsModel(): void {
<#list ctrl.getAllPSDEFormDetails() as formdetail>
Object.assign(this.detailsModel, {
${formdetail.name}: ${P.getPartCode(formdetail, 'DETAIL_MODEL').code}
});
</#list>
}
/**
* 属性值规则
*
* @type {*}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public rules: any = {
<#list ctrl.getAllPSDEFormDetails() as formdetail>
<#if formdetail.getDetailType?? && formdetail.getDetailType() == 'FORMITEM'>
${formdetail.getName()}: [
{ required: <#if formdetail.isAllowEmpty()>false<#else>true</#if>, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double'>number<#else>string</#if>', message: '${formdetail.getCaption()}值不能为空!', trigger: 'change' }
],
</#if>
</#list>
}
/**
* 表单逻辑
*
* @private
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ${srfclassname('${ctrl.name}')}
*/
private formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
<#if P.getPartCode(item,'FORM_LOGIC').code?length gt 0>
${P.getPartCode(item,'FORM_LOGIC').code}
</#if>
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as formitem>
<#if formitem.getPSDEFormItemUpdate()??>
if(Object.is(name, '${formitem.name}')){
this.updateFormItems('${formitem.getPSDEFormItemUpdate().codeName}', this.data,false);
}
</#if>
</#list>
</#if>
}
/**
* 检验规则
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public validateRules():boolean{
let result =true;
Object.keys(this.rules).forEach((item:any) =>{
//必填校验
if(this.rules[item][0].required){
if(!this.data[item]){
this.$notify({ type: 'danger', message: this.rules[item][0].message});
result = false;
return result;
}
}
});
return result;
}
/**
* 值填充
*
* @param {*} [_datas={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public fillForm(_datas: any = {}): void {
this.ignorefieldvaluechange = true;
Object.keys(_datas).forEach((name: string) => {
if (this.data.hasOwnProperty(name)) {
this.data[name] = _datas[name];
}
});
this.$nextTick(function () {
this.ignorefieldvaluechange = false;
})
}
/**
* 当前分页
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
<#if ctrl.getPSDEFormPages()??>
<#list ctrl.getPSDEFormPages() as formPage>
<#if formPage_index = 0>
public activeFormPage:string = '${formPage.name}';
</#if>
</#list>
</#if>
<#if ctrl.getPSDEFormPages()??>
/**
* 分页信息
*
* @type {[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public tabList = [
<#list ctrl.getPSDEFormPages() as formPage>
{ tabTitle: "${formPage.caption}", value: "${formPage.name}"<#if formPage_index = 0>,'curr':true</#if>}<#if formPage_has_next>,</#if>
</#list>
];
</#if>
/**
* 表单分页变化
*
* @param {name:标签标识符,title:标题}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public tabSwitch(name:any, title:any) {
this.activeFormPage = name;
}
/**
* vue生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created(){
this.handleCreated();
}
/**
* 执行created后面的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
this.initFormDetailsModel();
this.viewState.subscribe(( {tag,action,data })=>{
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('autoload', action)) {
this.autoLoad(data);
}
if (Object.is('load', action)) {
this.load(data);
}
if (Object.is('loaddraft', action)) {
this.loadDraft(data);
}
if (Object.is('save', action)) {
this.save(data,data.action);
}
if (Object.is('remove', action)) {
this.remove(data);
}
if (Object.is('saveandexit', action)) {
this.saveAndExit(data);
}
if (Object.is('saveandnew', action)) {
this.saveAndNew(data);
}
if (Object.is('removeandexit', action)) {
this.removeAndExit(data);
}
if (Object.is('refresh', action)) {
this.refresh(data);
}
if (Object.is('submit', action)) {
this.submitWorkFlow(data,'wfsubmit');
}
if(Object.is('saveandstart',action)){
this.saveAndStart(data);
}
})
}
/**
* 自动加载
*
* @param {*} [arg={}]
* @returns {void}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public autoLoad(arg: any = {}): void {
if (arg.srfkey && !Object.is(arg.srfkey, '')) {
this.load(arg);
return;
}
if (arg.srfkeys && !Object.is(arg.srfkeys, '')) {
Object.assign(arg, { srfkey: arg.srfkeys });
this.load(arg);
return;
}
this.loadDraft(arg);
}
/**
* 加载
*
* @private
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
private load(opt: any = {}): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const arg: any = { ...opt };
this.$http.get(this.url + this.loadAction, {srfkey:arg.srfkey}).then((response: any) => {
if (response) {
const data = response.data;
this.$emit('load',data);
this.formState.next({ type: 'load', data: data });
this.fillForm(data);
this.formLogic({ name: '', newVal: null, oldVal: null });
this.data.ismodify = false;
resolve(data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
reject(error);
});
})
}
/**
* 删除
*
* @private
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
private remove(opt: any = {}): Promise<any> {
if(!Object.is(opt.srfkey,this.data.srfkey)){
return Promise.resolve(null);
}
return new Promise((resolve: any, reject: any) => {
const arg: any = { ...opt };
this.$http.get(this.url + this.removeAction, {srfkey:arg.srfkey}).then((response: any) => {
if (response) {
const data = response.data;
this.$emit('remove',data);
this.formState.next({ type: 'remove', data: data });
this.data.ismodify = false;
this.$notify({ type: 'success', message: '成功,删除数据成功!'});
resolve(data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
reject(error);
});
});
}
/**
* 开始工作流
*
* @param {} data
* @memberof ${srfclassname('${ctrl.name}')}
*/
public startWorkFlow(data: any = {}): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const arg: any = { ...data };
this.$http.post(this.url + this.wfstartAction, arg).then((response: any) => {
if (!response) {
this.$notify({ type: 'danger', message: '开始流程失败'});
}
if (response) {
resolve(response);
this.$notify({ type: 'success', message: '开始流程成功'});
if (this.close && this.close instanceof Function) {
this.close(arg);
}
}
}).catch((error:any) =>{
this.$notify({ type: 'danger', message: error.data.message});
});
});
}
/**
* 提交工作流
*
* @param {} data
* @memberof ${srfclassname('${ctrl.name}')}
*/
public submitWorkFlow(data: any = {},actionUrl?:string): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const arg: any = { ...data };
Object.assign(arg,{srfkey:this.$data.srfkey});
let rquestUrl = actionUrl?this.url+actionUrl:this.url+this.wfsubmitAction;
this.$http.post(rquestUrl, arg).then((response: any) => {
if (!response) {
reject({});
}
if (response) {
this.$emit('wfsubmit',response);
resolve(response);
}
});
});
}
/**
* 保存并开始工作流
* @param {} data
* @memberof ${srfclassname('${ctrl.name}')}
*/
public saveAndStart(data:any ={}):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
Object.assign(arg,data);
_this.currentAction = "saveAndStart";
_this.save(arg).then((res) =>{
if(_this.startWorkFlow){
_this.startWorkFlow(res);
}
resolve(res);
}).catch((error) =>{
reject(error);
})
})
}
/**
* 加载草稿
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
public loadDraft(opt: any = {}): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const arg: any = { ...opt };
let post: any;
if (!arg.srfsourcekey || Object.is(arg.srfsourcekey, '')) {
post = this.$http.post(this.url + this.loaddraftAction, arg);
} else {
post = this.$http.post(this.url + this.loaddraftformAction, arg);
}
post.then((response: any) => {
if (response) {
const data = response.data;
this.$emit('load',data);
this.formState.next({ type: 'load', data: data });
this.fillForm(data);
this.formLogic({ name: '', newVal: null, oldVal: null });
this.data.ismodify = false;
resolve(data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
reject(error);
});
})
}
/**
* 自动保存
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
public autoSave(opt: any = {}, action?: string): Promise<any> {
return new Promise((resolve: any, reject: any) => {
let result = this.validateRules();
if(!result){
return;
}
const arg: any = { ...opt };
const data = this.getData();
Object.assign(arg, data);
if (!action) {
this.formState.next({ type: 'beforesave', data: arg });//editview9保存之前事件
}
if (arg.end) {
return;
}
let post: any;
if (Object.is(data.srfuf, '1')) {
post = this.$http.post(this.url + this.updateAction, arg);
} else {
post = this.$http.post(this.url + this.createAction, arg);
}
post.then((response: any) => {
if (response) {
const data = response.data;
this.$emit('save',data);
this.formState.next({ type: 'save', data: data });
this.fillForm(data);
this.formLogic({ name: '', newVal: null, oldVal: null });
this.data.ismodify = false;
this.$notify({ type: 'success', message: '成功,保存数据成功!'});
resolve(data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
reject(error);
});
})
}
/**
* 保存
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
public save(opt: any = {},action?: string): Promise<any> {
return new Promise((resolve: any, reject: any) => {
let result = this.validateRules();
if(!result){
return;
}
const arg: any = { ...opt };
const data = this.getData();
Object.assign(arg, data);
if (!action) {
this.formState.next({ type: 'beforesave', data: arg });//editview9保存之前事件
}
if (arg.end) {
return;
}
let post: any;
if (Object.is(data.srfuf, '1')) {
post = this.$http.post(this.url + this.updateAction, arg);
} else {
post = this.$http.post(this.url + this.createAction, arg);
}
post.then((response: any) => {
if (response) {
const data = response.data;
this.$emit('save',data);
this.formState.next({ type: 'save', data: data });
this.fillForm(data);
this.formLogic({ name: '', newVal: null, oldVal: null });
this.data.ismodify = false;
if(action == 'savecompleted' || !action){
this.$notify({ type: 'success', message: (data.srfmajortext ? data.srfmajortext : '') + '保存成功!' });
}
resolve(data);
}
}).catch((error: any) => {
if(!arg.iscancelnotice){
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
reject(error);
}
})
})
}
/**
* 表单项更新
*
* @param {string} mode
* @memberof ${srfclassname('${ctrl.name}')}
*/
public updateFormItems(mode: string, data: any = {}, showloading?: boolean): void {
if (!mode || (mode && Object.is(mode, ''))) {
return;
}
const action = mode.toLowerCase();
const arg: any = { ...data };
this.$http.post(this.url + 'updateformitem/' + action, arg,showloading).then((response: any) => {
if (!response) {
this.$notify({ type: 'danger', message: '失败,加载数据失败' });
}
if (response) {
const data = response.data;
this.formState.next({ type: 'updateformitem', ufimode: arg.srfufimode, data: data });
this.fillForm(data);
this.formLogic({ name: '', newVal: null, oldVal: null });
}
});
}
/**
* 部件刷新
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.name}')}
*/
public refresh(args: any[]): Promise<any> {
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
if (this.data.srfkey && !Object.is(this.data.srfkey, '')) {
Object.assign(arg, { srfkey: this.data.srfkey });
this.load(arg);
return;
}
if (this.data.srfkeys && !Object.is(this.data.srfkeys, '')) {
Object.assign(arg, { srfkey: this.data.srfkeys });
this.load(arg);
return;
}
})
}
/**
* 保存并退出
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.name}')}
*/
public saveAndExit(data:any):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
Object.assign(arg,data);
_this.currentAction = "saveAndExit";
_this.save(arg).then((res) =>{
if(res){
if(_this.close){
_this.close(res.data);
}
}
resolve(res);
}).catch((error) =>{
reject(error);
})
})
}
/**
* 保存并新建
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.name}')}
*/
public saveAndNew(data:any):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
Object.assign(arg,data);
_this.currentAction = "saveAndNew";
_this.save(arg).then((res) =>{
_this.ResetData(res);
_this.loadDraft({});
resolve(res);
}).catch((error) =>{
reject(error);
})
})
}
/**
* 删除并退出
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.name}')}
*/
public removeAndExit(data:any):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
Object.assign(arg,data);
_this.remove(arg).then((res) =>{
if(res){
if(_this.close){
_this.close(res.data);
}
}
resolve(res);
}).catch((error) =>{
reject(error);
})
})
}
/**
* 置空对象
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.name}')}
*/
public ResetData(_datas:any){
if(Object.keys(_datas).length >0){
Object.keys(_datas).forEach((name: string) => {
if (this.data.hasOwnProperty(name)) {
this.data[name] = null;
}
});
}
}
/**
* 切换样式
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public toggleDisplay(groupname:string) {
<#if ctrl.getAllPSDEFormDetails()??>
<#list ctrl.getAllPSDEFormDetails() as detail>
<#if detail.getDetailType() == "GROUPPANEL">
if(Object.is('${detail.name}',groupname)){
this.isDisplayContent_${detail.name} = !this.isDisplayContent_${detail.name};
}
</#if>
</#list>
</#if>
}
/**
* 表单项值改变
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public valueChange(name:string,value:any){
if (this.ignorefieldvaluechange) {
return;
}
let oldValue = JSON.parse(JSON.stringify(this.data[name]));
this.data[name] = value;
this.formLogic({name:name,newVal:this.data[name],oldVal:oldValue});
this.data.ismodify = true;
this.$forceUpdate();
}
/**
* DEMEDITVIEW9 关系数据保存完成
*
* @param {any} $event
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public drdatasaved($event:any){
let _this = this;
this.save({},$event.action).then((res) =>{
if(Object.is(_this.currentAction, "saveAndNew")){
_this.ResetData(res);
_this.loadDraft({});
}else if(Object.is(_this.currentAction, "saveAndExit")){
if(res){
if(_this.close){
_this.close(res);
}
}
}else if(Object.is(_this.currentAction, "saveAndStart")){
if(_this.startWorkFlow){
_this.startWorkFlow(res);
}
}
});
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=FORM
\ No newline at end of file
<div class="app-form app-form-card <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<#-- isNoTabHeader是否隐藏分页头部-->
<#if ctrl.isNoTabHeader()>
<#list ctrl.getPSDEFormPages() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
<#else>
<van-tabs type="card" animated color="#26A2FF" @change="tabSwitch" >
<van-tab v-for="(item, index) in tabList" :key="index" :title="item.tabTitle" :name="item.value">
<#list ctrl.getPSDEFormPages() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</van-tab>
</van-tabs>
</#if>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<div class="app-form-item-button">
<nut-button v-if="detailsModel.${item.name}.visible" class="app-form-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style='<#if item.getHeight() gt 0>height: ${item.getHeight()}px;</#if>'>${item.caption}</nut-button>
</div>
</#if>
\ No newline at end of file
<#assign dritem = item.getPSDEDRItem()>
<app-form-druipart :formState="this.formState" paramitem='<#if item.getParamItem()??>${item.getParamItem()}<#else>srfkey</#if>'
:parentdata='<#if dritem.getParentDataJO?? && dritem.getParentDataJO()??>${dritem.getParentDataJO()}<#else>{}</#if>'
refviewtype='<#if item.getPSAppView()?? && item.getPSAppView().getPSViewType()??>${item.getPSAppView().getPSViewType().getId()}</#if>'
refreshitems='<#if item.getRefreshItems()??>${item.getRefreshItems()}</#if>'
:ignorefieldvaluechange="this.ignorefieldvaluechange" @drdatasaved="drdatasaved($event)"
viewname='view-${srfclassname('${item.getPSAppView().getCodeName()}')?lower_case}' :data="JSON.stringify(this.data)" style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%</#if><#if item.getContentHeight() == 0><#if item.getPSAppView().getHeight() gt 0>height:${item.getPSAppView().getHeight()?c}px;</#if><#else>height:${item.getContentHeight()?c}px;</#if>overflow: auto;">
</app-form-druipart>
\ No newline at end of file
<#if !item.isHidden()>
<#--<#if item.render??>-->
<#--${item.render.code}-->
<#--<#else>-->
<div v-if="detailsModel.${item.name}.visible" class="app-form-item ${item.getLabelPos()?lower_case}<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style='<#if item.getItemHeight() gt 0>height: ${item.getItemHeight()?c};</#if><#if item.getItemWidth() gt 0>width: ${item.getItemWidth()?c};</#if>'>
<#if item.getEditorType() != "MOBMPICKER" && item.getEditorType() != "MOBPICTURELIST" && item.getEditorType() != "MOBMULTIFILEUPLOAD" && item.getEditorType() != "MOBPICTURE">
<#if item.getEditorType() == "MOBTEXTAREA" && item.getLabelPos() == "TOP">
<#else>
<#if item.isShowCaption()>
<label style="width: ${item.getLabelWidth()}px;<#if item.getLabelPos() == "TOP">flex-direction:column;</#if><#if item.getLabelPos() == "LEFT"> flex-direction:row;<#elseif item.getLabelPos() == "RIGHT">flex-direction:row-reverse;<#else>flex-direction:column-reverse;</#if>" class="app-form-item-label ${item.getLabelPos()?lower_case}">
<#if item.isEmptyCaption() == false>
<#if item.getPSSysImage()??>
<#assign image = item.getPSSysImage()>
<#if image.getCssClass()?? && image.getCssClass() != ""><i class="fa fa-${image.getCssClass()}" aria-hidden="true" style="font-size: 18px;"></i></#if>
<#-- <#if image.getImagePath()?? && image.getImagePath() != ""><image src="${image.getImagePath()}"/></#if> -->
</#if>
<span class="stars" style="color:red" v-if="!detailsModel.${item.name}.isAllowEmpty">*</span>
${item.caption}
</#if>
</label>
</#if>
</#if>
</#if>
<div class="app-form-item-editor" style="width:100%;">
${P.getEditorCode(item, "EDITOR.html").code}<#if item.isEnableUnitName()>${item.getUnitName()}</#if>
</div>
</div>
</#if>
<#--</#if>-->
\ No newline at end of file
<#--<#if item.render??>-->
<#--${item.render.code}-->
<#--<#else>-->
<#if ctrl.getPSDEFormPageCount?? && ctrl.getPSDEFormPageCount()==1>
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
<#else>
<div v-show="activeFormPage === '${item.name}'" class="app-form-page <#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</div>
</#if>
<#--</#if>-->
\ No newline at end of file
<#--<#if item.render??>-->
<#--${item.render.code}-->
<#--<#else>-->
<#if item.isShowCaption()>
<div style="<#if item.getPSSysCss()??>style='${item.getPSSysCss().getRawCssStyle()};'</#if>" class="app-form-group<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" >
<div class="app-form-group-content" v-show="isDisplayContent_${item.name}">
<h4 style="color:#383838;text-align: left; padding: 1em 0em 0em 1em;">${item.getCaption()}</h4>
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</div>
</div>
<#else>
<#list item.getPSDEFormDetails() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
</#if>
<#--</#if>-->
\ No newline at end of file
<#if item.getLogicType() == 'GROUP'><#if item.isNotMode()>!(</#if><#if item.getPSDEFDLogics()??><#list item.getPSDEFDLogics() as subLogic><#if subLogic_index gt 0><#if item.getGroupOP() == 'AND'> && </#if><#if item.getGroupOP() == 'OR'> || </#if></#if>${P.getPartCode(subLogic, 'DETAIL_LOGIC').code}</#list></#if><#if item.isNotMode()>)</#if><#elseif item.getLogicType() == 'SINGLE'>(this.$util as any).testCond(_${item.getDEFDName()?lower_case}, '${item.getPSDBValueOPId()}', '${item.getValue()}')</#if>
\ No newline at end of file
<#assign detail>caption: '${item.getCaption()}', detailType: '${item.getDetailType()}', name: '${item.getName()}', visible: true, isShowCaption: ${item.isShowCaption()?c}</#assign>
<#if item.getDetailType() == 'BUTTON'>
new FormButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>, uiaction: { type: '${uiaction.getUIActionType()}',
tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if> }</#if> })
<#elseif item.getDetailType() == 'DRUIPART'>
new FromDRUIPartModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMITEM'>
new FormItemModel({ ${detail}, disabled: false, isAllowEmpty: ${item.isAllowEmpty()?c} })
<#elseif item.getDetailType() == 'FORMPAGE'>
new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'>
new FormPartModel({ ${detail} })
<#elseif item.getDetailType() == 'GROUPPANEL'>
new FormGroupPanelModel({ ${detail} })
<#elseif item.getDetailType() == 'RAWITEM'>
new FormRowItemModel({ ${detail} })
<#elseif item.getDetailType() == 'TABPAGE'>
new FormTabPageModel({ ${detail} })
<#elseif item.getDetailType() == 'TABPANEL'>
new FormTabPanelModel({ ${detail} })
<#elseif item.getDetailType() == 'USERCONTROL'>
new FormUserControlModel({ ${detail} })
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<ion-item class="app-form-item">
${item.getRawContent()}
</ion-item>
</#if>
\ No newline at end of file
<#list ctrl.getAllPSDEFormDetails() as formdetail>
<#if formdetail.getPSDEFDGroupLogic('ITEMBLANK')??>
<#assign ITEMBLANK = formdetail.getPSDEFDGroupLogic('ITEMBLANK')/>
if (Object.is(name, '')<#if ITEMBLANK.getRelatedDetailNames()??><#list ITEMBLANK.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = true;
<#if ITEMBLANK.getRelatedDetailNames()??>
<#list ITEMBLANK.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(ITEMBLANK, 'DETAIL_LOGIC').code}) {
ret = false;
}
this.rules.${formdetail.name}[0].required = ret;
this.detailsModel.${formdetail.name}.isAllowEmpty = !ret;
}
</#if>
<#if formdetail.getPSDEFDGroupLogic('ITEMENABLE')??>
<#assign ITEMENABLE = formdetail.getPSDEFDGroupLogic('ITEMENABLE')/>
if (Object.is(name, '')<#if ITEMENABLE.getRelatedDetailNames()??><#list ITEMENABLE.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if ITEMENABLE.getRelatedDetailNames()??>
<#list ITEMENABLE.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(ITEMENABLE, 'DETAIL_LOGIC').code}) {
ret = true;
}
this.detailsModel.${formdetail.name}.setDisabled(!ret);
}
</#if>
<#if formdetail.getPSDEFDGroupLogic('PANELVISIBLE')??>
<#assign PANELVISIBLE = formdetail.getPSDEFDGroupLogic('PANELVISIBLE')/>
if (Object.is(name, '')<#if PANELVISIBLE.getRelatedDetailNames()??><#list PANELVISIBLE.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if PANELVISIBLE.getRelatedDetailNames()??>
<#list PANELVISIBLE.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(PANELVISIBLE, 'DETAIL_LOGIC').code}) {
ret = true;
}
this.detailsModel.${formdetail.name}.setVisible(ret);
}
</#if>
</#list>
\ No newline at end of file
<template>
<div>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</div>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_header>
import { FormButtonModel, FormPageModel, FormItemModel, FromDRUIPartModel, FormPartModel, FormGroupPanelModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/assets/form-detail';
import { Subject } from 'rxjs';
</#assign>
<#assign self_content>
/**
* 加载行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public loadAction?:string;
/**
* 加载草稿行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public loaddraftAction?:string;
/**
* 更新行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public updateAction?:string;
/**
* 创建行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public createAction?:string;
/**
* 关闭行为
*
* @type {Function}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public close?:Function;
/**
* 删除行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public removeAction?:string;
/**
* 加载表单草稿行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public loaddraftformAction?:string;
/**
* 工作流程开始行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public wfstartAction?:string;
/**
* 工作流程提交行为
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop() public wfsubmitAction?:string;
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public formState: Subject<any> = new Subject();
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/';
/**
* 当前执行的行为逻辑
*
* @type {string}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public currentAction: string = "";
/**
* 详情模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public detailsModel: any = {};
/**
* 忽略表单项值变化
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public ignorefieldvaluechange: boolean = false;
/**
* 表单数据对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public data: any = {
<#list ctrl.getPSDEFormItems() as item>
${item.getName()}: null,
</#list>
ismodify:false
};
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getDatas(): any[] {
return [this.data];
}
/**
* 获取单项数据
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getData(): any {
return this.data;
}
<#if ctrl.getAllPSDEFormDetails()??>
<#list ctrl.getAllPSDEFormDetails() as detail>
<#if detail.getDetailType() == "GROUPPANEL">
/**
* 是否展示表单分组${detail.getCaption()}内容
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isDisplayContent_${detail.name}: boolean = true;
</#if>
</#list>
</#if>
/**
* 控制展示表单分组
*
* @type { Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public activeNames: Array<any> = [<#if ctrl.getAllPSDEFormDetails()??><#list ctrl.getAllPSDEFormDetails() as detail><#if detail.getDetailType() == "GROUPPANEL">'${detail.name}',</#if></#list></#if>];
/**
* 初始化表单详情模型集合
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public initFormDetailsModel(): void {
<#list ctrl.getAllPSDEFormDetails() as formdetail>
Object.assign(this.detailsModel, {
${formdetail.name}: ${P.getPartCode(formdetail, 'DETAIL_MODEL').code}
});
</#list>
}
/**
* 属性值规则
*
* @type {*}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public rules: any = {
<#list ctrl.getAllPSDEFormDetails() as formdetail>
<#if formdetail.getDetailType?? && formdetail.getDetailType() == 'FORMITEM'>
${formdetail.getName()}: [
{ required: <#if formdetail.isAllowEmpty()>false<#else>true</#if>, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double'>number<#else>string</#if>', message: '${formdetail.getCaption()}值不能为空!', trigger: 'change' }
],
</#if>
</#list>
}
/**
* 表单逻辑
*
* @private
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ${srfclassname('${ctrl.name}')}
*/
private formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
<#if P.getPartCode(item,'FORM_LOGIC').code?length gt 0>
${P.getPartCode(item,'FORM_LOGIC').code}
</#if>
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as formitem>
<#if formitem.getPSDEFormItemUpdate()??>
if(Object.is(name, '${formitem.name}')){
this.updateFormItems('${formitem.getPSDEFormItemUpdate().codeName}', this.data,false);
}
</#if>
</#list>
</#if>
}
/**
* 检验规则
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public validateRules():boolean{
let result =true;
Object.keys(this.rules).forEach((item:any) =>{
//必填校验
if(this.rules[item][0].required){
if(!this.data[item]){
this.$notify({ type: 'danger', message: this.rules[item][0].message});
result = false;
return result;
}
}
});
return result;
}
/**
* 值填充
*
* @param {*} [_datas={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public fillForm(_datas: any = {}): void {
this.ignorefieldvaluechange = true;
Object.keys(_datas).forEach((name: string) => {
if (this.data.hasOwnProperty(name)) {
this.data[name] = _datas[name];
}
});
this.$nextTick(function () {
this.ignorefieldvaluechange = false;
})
}
/**
* 当前分页
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
<#if ctrl.getPSDEFormPages()??>
<#list ctrl.getPSDEFormPages() as formPage>
<#if formPage_index = 0>
public activeFormPage:string = '${formPage.name}';
</#if>
</#list>
</#if>
<#if ctrl.getPSDEFormPages()??>
/**
* 分页信息
*
* @type {[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public tabList = [
<#list ctrl.getPSDEFormPages() as formPage>
{ tabTitle: "${formPage.caption}", value: "${formPage.name}"<#if formPage_index = 0>,'curr':true</#if>}<#if formPage_has_next>,</#if>
</#list>
];
</#if>
/**
* 表单分页变化
*
* @param {name:标签标识符,title:标题}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public tabSwitch(name:any, title:any) {
this.activeFormPage = name;
}
/**
* vue生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created(){
this.handleCreated();
}
/**
* 执行created后面的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleCreated(){
this.initFormDetailsModel();
this.viewState.subscribe(( {tag,action,data })=>{
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('autoload', action)) {
this.autoLoad(data);
}
if (Object.is('load', action)) {
this.load(data);
}
if (Object.is('loaddraft', action)) {
this.loadDraft(data);
}
if (Object.is('save', action)) {
this.save(data);
}
if (Object.is('remove', action)) {
this.remove(data);
}
if (Object.is('saveandexit', action)) {
this.saveAndExit(data);
}
if (Object.is('saveandnew', action)) {
this.saveAndNew(data);
}
if (Object.is('removeandexit', action)) {
this.removeAndExit(data);
}
if (Object.is('refresh', action)) {
this.refresh(data);
}
if (Object.is('submit', action)) {
this.submitWorkFlow(data,'wfsubmit');
}
if(Object.is('saveandstart',action)){
this.saveAndStart(data);
}
})
}
/**
* 自动加载
*
* @param {*} [arg={}]
* @returns {void}
* @memberof ${srfclassname('${ctrl.name}')}
*/
public autoLoad(arg: any = {}): void {
if (arg.srfkey && !Object.is(arg.srfkey, '')) {
this.load(arg);
return;
}
if (arg.srfkeys && !Object.is(arg.srfkeys, '')) {
Object.assign(arg, { srfkey: arg.srfkeys });
this.load(arg);
return;
}
this.loadDraft(arg);
}
/**
* 加载
*
* @private
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
private load(opt: any = {}): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const arg: any = { ...opt };
this.$http.get(this.url + this.loadAction, {srfkey:arg.srfkey}).then((response: any) => {
if (response) {
const data = response.data;
this.$emit('load',data);
this.formState.next({ type: 'load', data: data });
this.fillForm(data);
this.formLogic({ name: '', newVal: null, oldVal: null });
this.data.ismodify = false;
resolve(data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
reject(error);
});
})
}
/**
* 删除
*
* @private
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
private remove(opt: any = {}): Promise<any> {
if(!Object.is(opt.srfkey,this.data.srfkey)){
return Promise.resolve(null);
}
return new Promise((resolve: any, reject: any) => {
const arg: any = { ...opt };
this.$http.get(this.url + this.removeAction, {srfkey:arg.srfkey}).then((response: any) => {
if (response) {
const data = response.data;
this.$emit('remove',data);
this.formState.next({ type: 'remove', data: data });
this.data.ismodify = false;
this.$notify({ type: 'success', message: '成功,删除数据成功!'});
resolve(data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
reject(error);
});
});
}
/**
* 开始工作流
*
* @param {} data
* @memberof ${srfclassname('${ctrl.name}')}
*/
public startWorkFlow(data: any = {}): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const arg: any = { ...data };
this.$http.post(this.url + this.wfstartAction, arg).then((response: any) => {
if (!response) {
this.$notify({ type: 'danger', message: '开始流程失败'});
}
if (response) {
resolve(response);
this.$notify({ type: 'success', message: '开始流程成功'});
if (this.close && this.close instanceof Function) {
this.close(arg);
}
}
}).catch((error:any) =>{
this.$notify({ type: 'danger', message: error.data.message});
});
});
}
/**
* 提交工作流
*
* @param {} data
* @memberof ${srfclassname('${ctrl.name}')}
*/
public submitWorkFlow(data: any = {},actionUrl?:string): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const arg: any = { ...data };
Object.assign(arg,{srfkey:this.$data.srfkey});
let rquestUrl = actionUrl?this.url+actionUrl:this.url+this.wfsubmitAction;
this.$http.post(rquestUrl, arg).then((response: any) => {
if (!response) {
reject({});
}
if (response) {
this.$emit('wfsubmit',response);
resolve(response);
}
});
});
}
/**
* 保存并开始工作流
* @param {} data
* @memberof ${srfclassname('${ctrl.name}')}
*/
public saveAndStart(data:any ={}):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
Object.assign(arg,data);
_this.currentAction = "saveAndStart";
_this.save(arg).then((res) =>{
if(_this.startWorkFlow){
_this.startWorkFlow(res);
}
resolve(res);
}).catch((error) =>{
reject(error);
})
})
}
/**
* 加载草稿
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
public loadDraft(opt: any = {}): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const arg: any = { ...opt };
let post: any;
if (!arg.srfsourcekey || Object.is(arg.srfsourcekey, '')) {
post = this.$http.post(this.url + this.loaddraftAction, arg);
} else {
post = this.$http.post(this.url + this.loaddraftformAction, arg);
}
post.then((response: any) => {
if (response) {
const data = response.data;
this.$emit('load',data);
this.formState.next({ type: 'load', data: data });
this.fillForm(data);
this.formLogic({ name: '', newVal: null, oldVal: null });
this.data.ismodify = false;
resolve(data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
reject(error);
});
})
}
/**
* 自动保存
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
public autoSave(opt: any = {}, action?: string): Promise<any> {
return new Promise((resolve: any, reject: any) => {
let result = this.validateRules();
if(!result){
return;
}
const arg: any = { ...opt };
const data = this.getData();
Object.assign(arg, data);
if (!action) {
this.formState.next({ type: 'beforesave', data: arg });//editview9保存之前事件
}
if (arg.end) {
return;
}
let post: any;
if (Object.is(data.srfuf, '1')) {
post = this.$http.post(this.url + this.updateAction, arg);
} else {
post = this.$http.post(this.url + this.createAction, arg);
}
post.then((response: any) => {
if (response) {
const data = response.data;
this.$emit('save',data);
this.formState.next({ type: 'save', data: data });
this.fillForm(data);
this.formLogic({ name: '', newVal: null, oldVal: null });
this.data.ismodify = false;
this.$notify({ type: 'success', message: '成功,保存数据成功!'});
resolve(data);
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
reject(error);
});
})
}
/**
* 保存
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}
*/
public save(opt: any = {},action?: string): Promise<any> {
return new Promise((resolve: any, reject: any) => {
let result = this.validateRules();
if(!result){
return;
}
const arg: any = { ...opt };
const data = this.getData();
Object.assign(arg, data);
if (!action) {
this.formState.next({ type: 'beforesave', data: arg });//editview9保存之前事件
}
if (arg.end) {
return;
}
let post: any;
if (Object.is(data.srfuf, '1')) {
post = this.$http.post(this.url + this.updateAction, arg);
} else {
post = this.$http.post(this.url + this.createAction, arg);
}
post.then((response: any) => {
if (response) {
const data = response.data;
this.$emit('save',data);
this.formState.next({ type: 'save', data: data });
this.fillForm(data);
this.formLogic({ name: '', newVal: null, oldVal: null });
this.data.ismodify = false;
if(action){
this.$notify({ type: 'success', message: (data.srfmajortext ? data.srfmajortext : '') + '保存成功!' });
}
resolve(data);
}
}).catch((error: any) => {
if(!arg.iscancelnotice){
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
reject(error);
}
})
})
}
/**
* 表单项更新
*
* @param {string} mode
* @memberof ${srfclassname('${ctrl.name}')}
*/
public updateFormItems(mode: string, data: any = {}, showloading?: boolean): void {
if (!mode || (mode && Object.is(mode, ''))) {
return;
}
const action = mode.toLowerCase();
const arg: any = { ...data };
this.$http.post(this.url + 'updateformitem/' + action, arg,showloading).then((response: any) => {
if (!response) {
this.$notify({ type: 'danger', message: '失败,加载数据失败' });
}
if (response) {
const data = response.data;
this.formState.next({ type: 'updateformitem', ufimode: arg.srfufimode, data: data });
this.fillForm(data);
this.formLogic({ name: '', newVal: null, oldVal: null });
}
});
}
/**
* 部件刷新
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.name}')}
*/
public refresh(args: any[]): Promise<any> {
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
if (this.data.srfkey && !Object.is(this.data.srfkey, '')) {
Object.assign(arg, { srfkey: this.data.srfkey });
this.load(arg);
return;
}
if (this.data.srfkeys && !Object.is(this.data.srfkeys, '')) {
Object.assign(arg, { srfkey: this.data.srfkeys });
this.load(arg);
return;
}
})
}
/**
* 保存并退出
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.name}')}
*/
public saveAndExit(data:any):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
Object.assign(arg,data);
_this.currentAction = "saveAndExit";
_this.save(arg).then((res) =>{
if(res){
if(_this.close){
_this.close(res.data);
}
}
resolve(res);
}).catch((error) =>{
reject(error);
})
})
}
/**
* 保存并新建
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.name}')}
*/
public saveAndNew(data:any):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
Object.assign(arg,data);
_this.currentAction = "saveAndNew";
_this.save(arg).then((res) =>{
_this.ResetData(res);
_this.loadDraft({});
resolve(res);
}).catch((error) =>{
reject(error);
})
})
}
/**
* 删除并退出
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.name}')}
*/
public removeAndExit(data:any):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
Object.assign(arg,data);
_this.remove(arg).then((res) =>{
if(res){
if(_this.close){
_this.close(res.data);
}
}
resolve(res);
}).catch((error) =>{
reject(error);
})
})
}
/**
* 置空对象
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.name}')}
*/
public ResetData(_datas:any){
if(Object.keys(_datas).length >0){
Object.keys(_datas).forEach((name: string) => {
if (this.data.hasOwnProperty(name)) {
this.data[name] = null;
}
});
}
}
/**
* 切换样式
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public toggleDisplay(groupname:string) {
<#if ctrl.getAllPSDEFormDetails()??>
<#list ctrl.getAllPSDEFormDetails() as detail>
<#if detail.getDetailType() == "GROUPPANEL">
if(Object.is('${detail.name}',groupname)){
this.isDisplayContent_${detail.name} = !this.isDisplayContent_${detail.name};
}
</#if>
</#list>
</#if>
}
/**
* 表单项值改变
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public valueChange(name:string,value:any){
if (this.ignorefieldvaluechange) {
return;
}
let oldValue = JSON.parse(JSON.stringify(this.data[name]));
this.data[name] = value;
this.formLogic({name:name,newVal:this.data[name],oldVal:oldValue});
this.data.ismodify = true;
this.$forceUpdate();
}
/**
* DEMEDITVIEW9 关系数据保存完成
*
* @param {any} $event
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public drdatasaved($event:any){
let _this = this;
this.save({},$event.action).then((res) =>{
if(Object.is(_this.currentAction, "saveAndNew")){
_this.ResetData(res);
_this.loadDraft({});
}else if(Object.is(_this.currentAction, "saveAndExit")){
if(res){
if(_this.close){
_this.close(res);
}
}
}else if(Object.is(_this.currentAction, "saveAndStart")){
if(_this.startWorkFlow){
_this.startWorkFlow(res);
}
}
});
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=FORM#CARDFORM
\ No newline at end of file
// this is less
<#if view.hasPSControl('toolbar')>
<@ibizindent blank=8>
${P.getCtrlCode('toolbar', 'CONTROL.less').code}
</@ibizindent>
</#if>
<#assign viewCssName = '' />
<#if view.getPSSysCss()??>
<#assign viewCssName = view.getPSSysCss().getCssName()>
</#if>
<#list view.getPSSysCsses() as syscss>
<#if syscss.getCssStyle()??>
<#if syscss.getCssName() != viewCssName>
<#if syscss.getDesignCssStyle()?? && syscss.getDesignCssStyle()?length gt 0>
.${syscss.getCssName() } {
${syscss.getDesignCssStyle()}
}
</#if>
<#if syscss.getCssStyle()??>
${syscss.getCssStyle()}
</#if>
</#if>
</#if>
</#list>
<#if view.getPSSysCss()??>
<#assign css=view.getPSSysCss()/>
<#if css.getDesignCssStyle()?? && css.getDesignCssStyle()?length gt 0>
.${css.getCssName()} {
${css.getDesignCssStyle()}
}
</#if>
<#if css.getCssStyle()??>
${css.getCssStyle()}
</#if>
</#if>
//无内容
\ No newline at end of file
<div class="app-view-header" v-if="!isTabExp">
<#if view.isShowCaptionBar()>
<#if view.getPSTitleBar()??>
<#assign titleBar=view.getPSTitleBar()>
<view_${titleBar.getName()} :viewState="viewState" name="${titleBar.name}"></view_${titleBar.getName()}>
<#else>
<mt-header title="${view.getCaption()}" >
<template slot="left">
<div class="app-view-lefttoolbar">
<mt-button icon="back" @click="close">返回</mt-button>
<#if view.hasPSControl('lefttoolbar')>
<#assign lefttoolbar = view.getPSControl('lefttoolbar')>
<@ibizindent blank=8>
${P.getCtrlCode(lefttoolbar,'CONTROL.vue').code}
</@ibizindent>
</#if>
</div>
</template>
<template slot="right">
<div class="app-view-righttoolbar">
<#if view.hasPSControl('righttoolbar')>
<#assign righttoolbar = view.getPSControl('righttoolbar')>
<@ibizindent blank=8>
${P.getCtrlCode(righttoolbar,'CONTROL.vue').code}
</@ibizindent>
</#if>
</div>
</template>
</mt-header>
</#if>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobtabexpview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if view.hasPSControl('tabexppanel')>
<#assign tabexppanel = view.getPSControl('tabexppanel')>
<view_${tabexppanel.name} :viewState="viewState" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :name="'${tabexppanel.name}'" <#if tabexppanel.getHookEventNames()??><#list tabexppanel.getHookEventNames() as eventName> @${eventName?lower_case}emit="${tabviewpanel.name}_${eventName?lower_case}($event)" </#list></#if>></view_${tabexppanel.name}>
</#if>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBTABEXPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-moblistview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div>列表视图已废弃,请选择多数据视图</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBLISTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div v-if="!isembeddedView">
<#assign quicksearch_block>
<div class="app-view-title">${view.getCaption()}</div>
</#assign>
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<#if view.hasPSControl('wizardpanel')??>
<#assign wp = view.getPSControl('wizardpanel')>
<#if wp.getPSAjaxControlHandler()??>
<#assign handler =wp.getPSAjaxControlHandler() >
<div class="app-view app-view-mobwizardview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div class="app-view-body">
<view_${wp.getName()} ref="wizardpanel" :isembeddedView="isembeddedView" :isModalMode="isModalMode"
<#if handler.getPSAjaxHandlerActions()??>
<#list handler.getPSAjaxHandlerActions() as action>
${action.name?lower_case}Action="${action.getName()?lower_case}"
@${action.name?lower_case}="${action.name?lower_case}($event)"
</#list>
</#if> :viewState="viewState" :name="'${wp.name}'">
</view_${wp.getName()}>
</div>
</div>
</#if>
</#if>
</div>
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBWIZARDVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobchartview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>" <#if view.getWidth()!=0 && view.getHeight()==0>style="width:${view.getWidth()}px;" <#elseif view.getWidth()==0 && view.getHeight()!=0> style="height:${view.getHeight()}px;" <#elseif view.getWidth()!=0 && view.getHeight()!=0> style="height:${view.getHeight()}px;width:${view.getWidth()}px"</#if>>
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<div class="view-content">
<#if view.isEnableQuickSearch?? && view.isEnableQuickSearch()>
<div class="mint-searchbar">
<div class="mint-searchbar-inner">
<input type="search" placeholder="快速搜索" class="mint-searchbar-core" v-model="query" @input="search"/>
<i class="mintui mintui-search" @click="search"></i>
</div>
</div>
</#if>
<#if view.hasPSControl('searchform')>
<#assign searchform = view.getPSControl('searchform')>
<#assign handler = searchform.getPSAjaxControlHandler() />
<div class="view-content-searchform">
<view_${searchform.getName()} ref="searchform" :viewState="viewState" :isembeddedView="isembeddedView" :isModalMode="isModalMode" name="${searchform.name}" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action> ${action.name?lower_case}Action="${action.getName()?lower_case}"</#list></#if> <#if searchform.getHookEventNames()??><#list searchform.getHookEventNames() as eventName> @${eventName?lower_case}="${searchform.name}_${eventName?lower_case}($event)" </#list></#if>></view_${searchform.getName()}>
</div>
</#if>
<#if view.hasPSControl('chart')>
<#assign chart = view.getPSControl('chart')>
<div class="view-content-chart" style="width:100%;">
<view_${chart.getName()} ref="chart" :close="close" :viewState="viewState" :isembeddedView="isembeddedView" :isModalMode="isModalMode" name="${chart.name}" <#if chart.getHookEventNames()??><#list chart.getHookEventNames() as eventName> @${eventName?lower_case}="${chart.name}_${eventName?lower_case}($event)" </#list></#if>></view_${chart.getName()}>
</div>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBCHARTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobchartview9 ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>" <#if view.getWidth()!=0 && view.getHeight()==0>style="width:${view.getWidth()}px;" <#elseif view.getWidth()==0 && view.getHeight()!=0> style="height:${view.getHeight()}px;" <#elseif view.getWidth()!=0 && view.getHeight()!=0> style="height:${view.getHeight()}px;width:${view.getWidth()}px"</#if>>
<#-- <#if view.isShowCaptionBar()>
<div class="app-ctrl-view-header">
<van-icon name="ellipsis" @click="openActionSheet()"/>
</div>
</#if> -->
<div class="view-content">
<#if view.hasPSControl('chart')>
<#assign chart = view.getPSControl('chart')>
<div class="view-content-chart" style="width:100%;">
<view_${chart.getName()} ref="chart" :close="close" :viewState="viewState" :isembeddedView="isembeddedView" :isModalMode="isModalMode" name="${chart.name}" <#if chart.getHookEventNames()??><#list chart.getHookEventNames() as eventName> @${eventName?lower_case}="${chart.name}_${eventName?lower_case}($event)" </#list></#if>></view_${chart.getName()}>
</div>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBCHARTVIEW9
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobmdview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>" <#if view.getWidth()!=0 && view.getHeight()==0>style="width:${view.getWidth()}px;" <#elseif view.getWidth()==0 && view.getHeight()!=0> style="height:${view.getHeight()}px;" <#elseif view.getWidth()!=0 && view.getHeight()!=0> style="height:${view.getHeight()}px;width:${view.getWidth()}px"</#if>>
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<div class="view-content">
<#if view.isEnableQuickSearch?? && view.isEnableQuickSearch()>
<div class="mint-searchbar">
<div class="mint-searchbar-inner">
<input type="search" placeholder="快速搜索" class="mint-searchbar-core" v-model="query" @input="search"/>
<i class="mintui mintui-search" @click="search"></i>
</div>
</div>
</#if>
<#if view.hasPSControl('searchform')>
<#assign searchform = view.getPSControl('searchform')>
<#assign handler = searchform.getPSAjaxControlHandler() />
<div class="view-content-searchform">
<view_${searchform.getName()} ref="searchform" :viewState="viewState" :isembeddedView="isembeddedView" :isModalMode="isModalMode" name="${searchform.name}" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action> ${action.name?lower_case}Action="${action.getName()?lower_case}"</#list></#if> <#if searchform.getHookEventNames()??><#list searchform.getHookEventNames() as eventName> @${eventName?lower_case}="${searchform.name}_${eventName?lower_case}($event)" </#list></#if>></view_${searchform.getName()}>
</div>
</#if>
<#if view.hasPSControl('mdctrl')>
<#assign mdctrl = view.getPSControl('mdctrl')>
<div class="view-content-mdctrl" style="width:100%;">
<view_${mdctrl.getName()} ref="mdctrl" :close="close" :newdata="newdata" :opendata="opendata" :viewState="viewState" :isembeddedView="isembeddedView" :isModalMode="isModalMode" name="${mdctrl.name}" <#if mdctrl.getPSDEDataSet()??><#assign dataset = mdctrl.getPSDEDataSet() /> searchAction="search${dataset.getName()?lower_case}"</#if> <#if mdctrl.getHookEventNames()??><#list mdctrl.getHookEventNames() as eventName> @${eventName?lower_case}="${mdctrl.name}_${eventName?lower_case}($event)" </#list></#if>></view_${mdctrl.getName()}>
</div>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBMDVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobmdview9 ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#-- <#if view.isShowCaptionBar()>
<div class="app-ctrl-view-header">
<van-icon name="ellipsis" @click="openActionSheet()"/>
</div>
</#if> -->
<div class="view-content-ctrl">
<#if view.hasPSControl('mdctrl')>
<#assign mdctrl = view.getPSControl('mdctrl')>
<div>
<view_${mdctrl.getName()} ref="mdctrl" :viewState="viewState" :isembeddedView="isembeddedView" :isModalMode="isModalMode" name="${mdctrl.name}" <#if mdctrl.getPSDEDataSet()??><#assign dataset = mdctrl.getPSDEDataSet() /> searchAction="search${dataset.getName()?lower_case}"</#if> <#if mdctrl.getHookEventNames()??><#list mdctrl.getHookEventNames() as eventName> @${eventName?lower_case}="${mdctrl.name}_${eventName?lower_case}($event)" </#list></#if>></view_${mdctrl.getName()}>
</div>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBMDVIEW9
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobmpickupview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if view.isShowCaptionBar()>
<div class="view-header" v-if="!isTabExp">
<mt-header title="${view.getCaption()}" >
<template slot="left">
<div class="app-view-lefttoolbar">
<mt-button icon="back" @click="close">返回</mt-button>
</div>
</template>
<template slot="right">
<div class="app-view-righttoolbar">
<mt-button @click="confirm">确定</mt-button>
</div>
</template>
</mt-header>
</div>
</#if>
<div class="view-content">
<#if view.hasPSControl('pickupviewpanel')>
<#assign pickupviewpanel = view.getPSControl('pickupviewpanel')>
<div style="height:100%;width:100%;">
<view_${pickupviewpanel.getName()} ref="${pickupviewpanel.name}" :selectedData="selectedData" :isSelected="true" :isMutli="true" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" name="${pickupviewpanel.name}" <#if pickupviewpanel.getHookEventNames()??><#list pickupviewpanel.getHookEventNames() as eventName> @${eventName?lower_case}="${pickupviewpanel.name}_${eventName?lower_case}($event)" </#list></#if>></view_${pickupviewpanel.getName()}>
</div>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBMPICKUPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobmpickupviewmd ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div class="view-content">
<#if view.isEnableQuickSearch??>
<div class="mint-searchbar">
<div class="mint-searchbar-inner">
<input type="search" placeholder="快速搜索" class="mint-searchbar-core" v-model="query" @input="search"/>
<i class="mintui mintui-search" @click="search"></i>
</div>
<div class="more" @click="isExpandSearchForm=!isExpandSearchForm" v-show="false">
<i class="van-icon van-icon-arrow-down"></i>
</div>
</div>
</#if>
<#if view.hasPSControl('searchform')>
<#assign searchform = view.getPSControl('searchform')>
<#assign handler = searchform.getPSAjaxControlHandler() />
<div class="view-content-searchform">
<view_${searchform.getName()} ref="searchform" :viewState="viewState" :isembeddedView="isembeddedView" :isModalMode="isModalMode" name="${searchform.name}" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action> ${action.name?lower_case}Action="${action.getName()?lower_case}"</#list></#if> <#if searchform.getHookEventNames()??><#list searchform.getHookEventNames() as eventName> @${eventName?lower_case}="${searchform.name}_${eventName?lower_case}($event)" </#list></#if>></view_${searchform.getName()}>
</div>
</#if>
<div class="view-content-ctrl">
<#if view.hasPSControl('mdctrl')>
<#assign mdctrl = view.getPSControl('mdctrl')>
<div style="width:100%;height:100%;">
<view_${mdctrl.getName()} ref="${mdctrl.name}" :selectedData="selectedData" :isSelected="true" :isMutli="isMutli" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" name="${mdctrl.name}" <#if mdctrl.getPSDEDataSet()??><#assign dataset = mdctrl.getPSDEDataSet() /> searchAction="search${dataset.getName()?lower_case}"</#if> <#if mdctrl.getHookEventNames()??><#list mdctrl.getHookEventNames() as eventName> @${eventName?lower_case}="${mdctrl.name}_${eventName?lower_case}($event)" </#list></#if>></view_${mdctrl.getName()}>
</div>
</#if>
</div>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBPICKUPMDVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobmeditview9 ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div class="view-content-ctrl">
<#if view.hasPSControl('meditviewpanel')>
<#assign mdctrl = view.getPSControl('meditviewpanel')>
<div>
<view_${mdctrl.getName()} ref="meditviewpanel" :viewState="viewState" :viewdata="viewdata" :isembeddedView="isembeddedView" :isModalMode="isModalMode" name="${mdctrl.name}" <#if mdctrl.getPSAjaxControlHandler()??><#assign handler=mdctrl.getPSAjaxControlHandler()><#if handler.getPSDEDataSet()??> searchAction="search${handler.getPSDEDataSet().getCodeName()?lower_case}"</#if></#if> <#if mdctrl.getHookEventNames()??><#list mdctrl.getHookEventNames() as eventName> @${eventName?lower_case}="${mdctrl.name}_${eventName?lower_case}($event)" </#list></#if>></view_${mdctrl.getName()}>
</div>
</#if>
</div>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobwfstartview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div class="app-view-header" v-if="!isTabExp">
<#if view.isShowCaptionBar()>
<#if view.getPSTitleBar()??>
<#assign titleBar=view.getPSTitleBar()>
<view_${titleBar.getName()} :viewState="viewState" name="${titleBar.name}"></view_${titleBar.getName()}>
<#else>
<mt-header title="${view.getCaption()}" >
<template slot="left">
<div class="app-view-lefttoolbar">
<mt-button icon="back" @click="close">返回</mt-button>
</div>
</template>
<template slot="right">
<div class="app-view-righttoolbar">
<mt-button @click="onOk">确认</mt-button>
</div>
</template>
</mt-header>
</#if>
</#if>
</div>
<div class="view-content">
<#if view.hasPSControl('form')>
<#assign form = view.getPSControl('form')>
<#assign handler = form.getPSAjaxControlHandler() />
<view_${form.getName()} ref="form" :close="close" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'"</#if></#list></#if> name="${form.name}"<#if form.getHookEventNames()??><#list form.getHookEventNames() as eventName> @${eventName?lower_case}="${form.name}_${eventName?lower_case}($event)" </#list></#if>></view_${form.getName()}>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBWFSTARTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobwfmdview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>" <#if view.getWidth()!=0 && view.getHeight()==0>style="width:${view.getWidth()}px;" <#elseif view.getWidth()==0 && view.getHeight()!=0> style="height:${view.getHeight()}px;" <#elseif view.getWidth()!=0 && view.getHeight()!=0> style="height:${view.getHeight()}px;width:${view.getWidth()}px"</#if>>
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<div class="view-content">
<#if view.isEnableQuickSearch?? && view.isEnableQuickSearch()>
<div class="mint-searchbar">
<div class="mint-searchbar-inner">
<input type="search" placeholder="快速搜索" class="mint-searchbar-core" v-model="query" @input="search"/>
<i class="mintui mintui-search" @click="search"></i>
</div>
</div>
</#if>
<#if view.hasPSControl('searchform')>
<#assign searchform = view.getPSControl('searchform')>
<#assign handler = searchform.getPSAjaxControlHandler() />
<div class="view-content-searchform">
<view_${searchform.getName()} ref="searchform" :viewState="viewState" :isembeddedView="isembeddedView" :isModalMode="isModalMode" name="${searchform.name}" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action> ${action.name?lower_case}Action="${action.getName()?lower_case}"</#list></#if> <#if searchform.getHookEventNames()??><#list searchform.getHookEventNames() as eventName> @${eventName?lower_case}="${searchform.name}_${eventName?lower_case}($event)" </#list></#if>></view_${searchform.getName()}>
</div>
</#if>
<#if view.hasPSControl('mdctrl')>
<#assign mdctrl = view.getPSControl('mdctrl')>
<div class="view-content-mdctrl" style="width:100%;">
<view_${mdctrl.getName()} ref="mdctrl" :close="close" :newdata="newdata" :opendata="opendata" :viewState="viewState" :isembeddedView="isembeddedView" :isModalMode="isModalMode" name="${mdctrl.name}" <#if mdctrl.getHookEventNames()??><#list mdctrl.getHookEventNames() as eventName> @${eventName?lower_case}="${mdctrl.name}_${eventName?lower_case}($event)" </#list></#if>></view_${mdctrl.getName()}>
</div>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBWFMDVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobwfactionview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div class="app-view-header" v-if="!isTabExp">
<#if view.isShowCaptionBar()>
<#if view.getPSTitleBar()??>
<#assign titleBar=view.getPSTitleBar()>
<view_${titleBar.getName()} :viewState="viewState" name="${titleBar.name}"></view_${titleBar.getName()}>
<#else>
<mt-header title="${view.getCaption()}" >
<template slot="left">
<div class="app-view-lefttoolbar">
<mt-button icon="back" @click="close">返回</mt-button>
</div>
</template>
<template slot="right">
<div class="app-view-righttoolbar">
<mt-button @click="(event) =>{onOk(event)}">确认</mt-button>
</div>
</template>
</mt-header>
</#if>
</#if>
</div>
<div class="view-content">
<#if view.hasPSControl('form')>
<#assign form = view.getPSControl('form')>
<#assign handler = form.getPSAjaxControlHandler() />
<view_${form.getName()} ref="form" :close="close" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'"</#if></#list></#if> name="${form.name}"<#if form.getHookEventNames()??><#list form.getHookEventNames() as eventName> @${eventName?lower_case}="${form.name}_${eventName?lower_case}($event)" </#list></#if>></view_${form.getName()}>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBWFACTIONVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobwfeditview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<div class="view-content">
<#if view.hasPSControl('form')>
<#assign form = view.getPSControl('form')>
<#assign handler = form.getPSAjaxControlHandler() />
<view_${form.getName()} ref="form" :close="close" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'" </#if> </#list></#if> name="${form.name}" <#if form.getHookEventNames()??><#list form.getHookEventNames() as eventName> @${eventName?lower_case}="${form.name}_${eventName?lower_case}($event)" </#list></#if>></view_${form.getName()}>
<div class="wflinksBtns">
<van-button type="info" v-for="(item,index) in containerModel.wflinks" :key="index" @click="wf_step(item)">{{ item.name }}</van-button>
</div>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBWFEDITVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobwfeditview3 ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<div class="view-content">
<#if view.hasPSControl('form')>
<#assign form = view.getPSControl('form')>
<#assign handler = form.getPSAjaxControlHandler() />
<view_${form.getName()} ref="form" :close="close" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'"</#if></#list></#if> name="${form.name}"<#if form.getHookEventNames()??><#list form.getHookEventNames() as eventName> @${eventName?lower_case}="${form.name}_${eventName?lower_case}($event)" </#list></#if>></view_${form.getName()}>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBWFEDITVIEW3
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobpickupview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if view.isShowCaptionBar()>
<div class="view-header" v-if="!isTabExp">
<mt-header title="${view.getCaption()}" >
<template slot="left">
<div class="app-view-lefttoolbar">
<mt-button icon="back" @click="close">返回</mt-button>
</div>
</template>
<template slot="right">
<div class="app-view-righttoolbar">
<mt-button @click="confirm">确定</mt-button>
</div>
</template>
</mt-header>
</div>
</#if>
<div class="view-content">
<#if view.hasPSControl('pickupviewpanel')>
<#assign pickupviewpanel = view.getPSControl('pickupviewpanel')>
<div>
<view_${pickupviewpanel.getName()} :isSelected="true" :isMutli="false" :selectedData="selectedData" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" ref="${pickupviewpanel.name}" name="${pickupviewpanel.name}" <#if pickupviewpanel.getHookEventNames()??><#list pickupviewpanel.getHookEventNames() as eventName> @${eventName?lower_case}="${pickupviewpanel.name}_${eventName?lower_case}($event)" </#list></#if>></view_${pickupviewpanel.getName()}>
</div>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBPICKUPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobredirectview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div>实体移动端数据重定向视图无任何内容</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBREDIRECTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobcalendarctrlview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#-- <#if view.isShowCaptionBar()>
<div class="app-ctrl-view-header">
<van-icon name="ellipsis" @click="openActionSheet()"/>
</div>
</#if> -->
<div class="view-content-ctrl">
<#if view.hasPSControl('calendar')>
<#assign calendar = view.getPSControl('calendar')>
<view_${calendar.getName()} :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" name="${calendar.name}" @valuechange="valuechange" ></view_${calendar.getName()}>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBCALENDARVIEW9
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobcalendarview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<div class="view-content">
<#if view.hasPSControl('calendar')>
<#assign calendar = view.getPSControl('calendar')>
<view_${calendar.getName()} :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" name="${calendar.name}" ></view_${calendar.getName()}>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBCALENDARVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class=" view-container app-view app-view-mobtreeexpview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<div class="app-view-body view-content">
<#if view.hasPSControl('treeexpbar')>
<#assign treeexpbar = view.getPSControl('treeexpbar')>
<view_${treeexpbar.getName()?lower_case} :viewdata="viewdata" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" :name="'${treeexpbar.name}'" <#if treeexpbar.getHookEventNames()??><#list treeexpbar.getHookEventNames() as eventName> @${eventName?lower_case}="${treeexpbar.name}_${eventName?lower_case}($event)" </#list></#if>></view_${treeexpbar.getName()?lower_case}>
</#if>
</div>
</div>
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBTREEEXPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
<div class="view-container app-view-mobtreeview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div class="app-view-header" >
<#if view.isShowCaptionBar()>
<#if view.getPSTitleBar()??>
<#assign titleBar=view.getPSTitleBar()>
<view_${titleBar.getName()} :viewState="viewState" name="${titleBar.name}"></view_${titleBar.getName()}>
<#else>
<mt-header title="${view.getCaption()}" >
<template slot="left">
<div class="app-view-lefttoolbar">
<mt-button icon="back" @click="close">返回</mt-button>
</div>
</template>
</mt-header>
</#if>
</#if>
</div>
<div class="view-content">
<#if view.hasPSControl('tree')>
<#assign tree = view.getPSControl('tree')>
<#assign handler = tree.getPSAjaxControlHandler() />
<view_${tree.getName()} ref="tree" :isOptional="false" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'"</#if></#list></#if> name="${tree.name}"<#if tree.getHookEventNames()??><#list tree.getHookEventNames() as eventName> @${eventName?lower_case}="${tree.name}_${eventName?lower_case}($event)" </#list></#if>></view_${tree.getName()}>
</#if>
</div>
</div>
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBTREEVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobeditview9 ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#-- <#if view.isShowCaptionBar()>
<div class="app-ctrl-view-header">
<van-icon name="ellipsis" @click="openActionSheet()"/>
</div>
</#if> -->
<div class="view-content-ctrl">
<#if view.hasPSControl('form')>
<#assign form = view.getPSControl('form')>
<#assign handler = form.getPSAjaxControlHandler() />
<div>
<view_${form.getName()} ref="form" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" name="${form.name}" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'"</#if></#list></#if> <#if form.getHookEventNames()??><#list form.getHookEventNames() as eventName> @${eventName?lower_case}="${form.name}_${eventName?lower_case}($event)" </#list></#if>></view_${form.getName()}>
</div>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBEDITVIEW9
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobeditview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<div class="view-content">
<#if view.hasPSControl('form')>
<#assign form = view.getPSControl('form')>
<#assign handler = form.getPSAjaxControlHandler() />
<view_${form.getName()} ref="form" :close="close" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'"</#if></#list></#if> name="${form.name}"<#if form.getHookEventNames()??><#list form.getHookEventNames() as eventName> @${eventName?lower_case}="${form.name}_${eventName?lower_case}($event)" </#list></#if>></view_${form.getName()}>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBEDITVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobeditview3 ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<div class="view-content">
<mt-navbar v-model="activeName">
<#if view.hasPSControl('form')>
<#assign form = view.getPSControl('form')>
<mt-tab-item id="default">主编辑页</mt-tab-item>
</#if>
<#if view.hasPSControl('drtab')>
<#assign drtab = view.getPSControl('drtab')>
<#if drtab.getPSDEDRTabPages?? && drtab.getPSDEDRTabPages()??>
<#list drtab.getPSDEDRTabPages() as tabpage>
<#assign dritem = tabpage.getPSDEDRDetail() />
<mt-tab-item id="${tabpage_index}">${dritem.getCaption()}</mt-tab-item>
</#list>
</#if>
</#if>
</mt-navbar>
<#if form??>
<#assign handler = form.getPSAjaxControlHandler() />
<view_${form.getName()} v-show="activeName == 'default'" ref="form" :close="close" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'"</#if></#list></#if> name="${form.name}"<#if form.getHookEventNames()??><#list form.getHookEventNames() as eventName> @${eventName?lower_case}="${form.name}_${eventName?lower_case}($event)" </#list></#if>></view_${form.getName()}>
</#if>
<#if drtab??>
<#assign handler = drtab.getPSAjaxControlHandler() />
<view_${drtab.getName()} v-show="activeName != 'default'" :activeName="activeName" ref="drtab" :close="close" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'"</#if></#list></#if> name="${drtab.name}"<#if drtab.getHookEventNames()??><#list drtab.getHookEventNames() as eventName> @${eventName?lower_case}="${drtab.name}_${eventName?lower_case}($event)" </#list></#if>></view_${drtab.getName()}>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBEDITVIEW3
\ No newline at end of file
<div class="view-container app-view-mobpickuptreeview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div class="app-view-header" >
<#if view.isShowCaptionBar()>
<#if view.getPSTitleBar()??>
<#assign titleBar=view.getPSTitleBar()>
<view_${titleBar.getName()} :viewState="viewState" name="${titleBar.name}"></view_${titleBar.getName()}>
<#else>
<mt-header title="${view.getCaption()}" >
<template slot="left">
<div class="app-view-lefttoolbar">
<mt-button icon="back" @click="close">返回</mt-button>
</div>
</template>
<template slot="right">
<div class="app-view-righttoolbar">
<mt-button @click="confirm">确认</mt-button>
</div>
</template>
</mt-header>
</#if>
</#if>
</div>
<div class="view-content">
<#if view.hasPSControl('tree')>
<#assign tree = view.getPSControl('tree')>
<#assign handler = tree.getPSAjaxControlHandler() />
<view_${tree.getName()} :selectedData="selectedData" ref="tree" @change="change" :isOptional="true" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'"</#if></#list></#if> name="${tree.name}"<#if tree.getHookEventNames()??><#list tree.getHookEventNames() as eventName> @${eventName?lower_case}="${tree.name}_${eventName?lower_case}($event)" </#list></#if>></view_${tree.getName()}>
</#if>
</div>
</div>
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBPICKUPTREEVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.app-mob-option-title{
text-align: center;
background-color: #26a2ff;
color: aliceblue;
padding: 5px;
}
.app-mob-option-button{
padding-top: 10px;
padding-bottom: 10px;
}
.app-mob-option-form .app-form{
height:100%;
}
\ No newline at end of file
<div class="view-container app-view-moboptionview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div class="app-view-header" >
<#if view.isShowCaptionBar()>
<#if view.getPSTitleBar()??>
<#assign titleBar=view.getPSTitleBar()>
<view_${titleBar.getName()} :viewState="viewState" name="${titleBar.name}"></view_${titleBar.getName()}>
<#else>
<mt-header title="${view.getCaption()}" >
<template slot="left">
<div class="app-view-lefttoolbar">
<mt-button icon="back" @click="close">返回</mt-button>
</div>
</template>
<template slot="right">
<div class="app-view-righttoolbar">
<mt-button @click="save">确认</mt-button>
</div>
</template>
</mt-header>
</#if>
</#if>
</div>
<div class="view-content">
<#if view.hasPSControl('form')>
<#assign form = view.getPSControl('form')>
<#assign handler = form.getPSAjaxControlHandler() />
<view_${form.getName()} ref="form" :isembeddedView="isembeddedView" :isModalMode="isModalMode" :viewState="viewState" <#if handler.getPSAjaxHandlerActions()??><#list handler.getPSAjaxHandlerActions() as action><#if action.getPSDEAction()??> ${action.name?lower_case}Action="${action.getPSDEAction().getCodeName()?lower_case}"</#if><#if action.getWFActionName()??> :${action.name?lower_case}Action="'${action.getActionName()?lower_case}'"</#if></#list></#if> name="${form.name}"<#if form.getHookEventNames()??><#list form.getHookEventNames() as eventName> @${eventName?lower_case}="${form.name}_${eventName?lower_case}($event)" </#list></#if>></view_${form.getName()}>
</#if>
</div>
</div>
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBOPTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobeditview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#ibizinclude>
../@MACRO/HEADER.vue.ftl
</#ibizinclude>
<div class="view-content">
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMOBCUSTOMVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.skip_button{
position: fixed !important;
right: 5%;
top: 82%;
}
.launch-container{
background-color: #b8bece;
height: 100vh;
}
.launch-message{
display: inline-block;
width: 50px;
margin: 0px auto;
line-height: 54px;
font-size: 50px;
position: fixed;
top: 24%;
right: 44%;
}
\ No newline at end of file
<div class='view-container launch-container'>
<van-row class="app-layoutpanel">
<span class="launch-message">广告位招租</span>
<mt-button class="skip_button" type="default" @click="toPage">跳过({{seconds}})</mt-button>
</van-row>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPSTARTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-wfstep-race-view">
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPWFSTEPTRACEVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.app-login-view{
.app-login-view-back{
height: 100%;
width: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.app-login-view-title{
color: aliceblue;
text-align: left;
padding-left:10%;
margin-top: 100px ;
}
.app-login-view-input{
background-color: aliceblue;
}
.login-content>.van-cell{
width: 80%;
margin: 10% auto;
}
.van-button--large {
width: 80%;
height: 50px;
line-height: 48px;
}
.van-button--primary {
background-color: deepskyblue;
border: 1px solid deepskyblue;
}
.login-sign-in{
background-color: deepskyblue;
}
}
\ No newline at end of file
<div class="app-view-body app-login-view">
<!--登陆页面背景图片-->
<img src="@/assets/images/login_background.jpg" class="app-login-view-back" />
<div style="position: relative">
<!--登录页面logo图片-->
<div style="text-align: end; position:fixed;top:30px;right:30px; ">
<img src="@/assets/images/logo.png"/>
</div>
<div padding class="app-login-view-title" style="font-size: 16px;">
欢迎使用
</div>
<div class="login-content">
<van-field v-model="username" clearable placeholder="请输入用户名" class="app-login-view-input" />
<van-field v-model="password" clearable placeholder="请输入密码" type="password" class="app-login-view-input" />
<van-button type="primary" size="large" @click="login" class="login-sign-in" >登录</van-button>
</div>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPLOGINVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-mobportalview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if view.isShowCaptionBar()>
<div class="view-header">
<#if view.getPSTitleBar()??>
<#assign titleBar=view.getPSTitleBar()>
<view_${titleBar.getName()} :name="'${titleBar.name?lower_case}'" :viewState="viewState" @titleBarClick="titleBarClick($event)"></view_${titleBar.getName()}>
<#else>
<mt-header title="${view.getCaption()}">
<template slot="left">
<#if view.hasPSControl('lefttoolbar')>
<#assign lefttoolbar = view.getPSControl('lefttoolbar')>
<@ibizindent blank=8>
${P.getCtrlCode(lefttoolbar, 'CONTROL.vue').code}
</@ibizindent>
</#if>
</template>
<template slot="right">
<#if view.hasPSControl('righttoolbar')>
<#assign righttoolbar = view.getPSControl('righttoolbar')>
<@ibizindent blank=8>
${P.getCtrlCode(righttoolbar, 'CONTROL.vue').code}
</@ibizindent>
</#if>
</template>
</mt-header>
</#if>
</div>
</#if>
<div class="view-content">
<#if view.getPSControls()??>
<#assign allctrl = view.getPSControls()>
<#list allctrl as dashboard>
<#if dashboard.getControlType() == "DASHBOARD">
<view_${dashboard.getName()} :isembeddedView="isembeddedView" :isModalMode="isModalMode" :name="'${dashboard.name?lower_case}'" :viewState="viewState"></view_${dashboard.getName()} >
</#if>
</#list>
</#if>
</div>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPPORTALVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container app-view-appindexview ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss()??><#assign singleCss=view.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<router-view></router-view>
<div>我是首页</div>
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != 'TOOLBAR' && ctrl.getControlType() != 'CONTEXTMENU'>
<view_${ctrl.getName()} ref="appmenu" :viewState="viewState" name="${ctrl.getName()?lower_case}"></view_${ctrl.getName()}>
</#if>
</#list>
</#if>
</div>
CTRLTYPE=VIEWLAYOUTPANEL#APPINDEXVIEW
\ No newline at end of file
<#assign flexAttr>
<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"><#assign layoutPos = item.getPSLayoutPos()/><#if layoutPos.getGrow() gt -1>flex-grow: ${layoutPos.getGrow()};</#if></#if></#assign>
<#assign tableAttr>
<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() != "FLEX"><#assign layoutPos = item.getPSLayoutPos()/><#if layoutPos.getColLG() gt -1> lg={${layoutPos.getColLG()?c}}</#if><#if layoutPos.getColMD() gt -1> md={${layoutPos.getColMD()?c}}</#if><#if layoutPos.getColSM() gt -1> sm={${layoutPos.getColSM()?c}}</#if><#if layoutPos.getColXS() gt -1> xs={${layoutPos.getColXS()?c}}</#if></#if></#assign>
<#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'>
<div style="<#if item.getColWidth() != -1>width: ${item.getColWidth()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<van-button type="primary" long<#if item.getHeight() gt 0> style="height: ${item.getHeight()?c}px;"</#if>>
<#if item.getPSSysImage()??>
<#assign image = item.getPSSysImage()>
<i class="${image.getCssClass()}"></i>
</#if>
<#if item.isShowCaption()>
<span<#if item.getLabelPSSysCss()??> class="${item.getLabelPSSysCss().getCssName()}"</#if><#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span>
</#if>
</van-button>
</div>
<#else>
<van-col span="24"${tableAttr} style="<#if item.getColWidth() != -1>width: ${item.getColWidth()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<van-button type="primary" long<#if item.getHeight() gt 0> style="height: ${item.getHeight()?c}px;"</#if>>
<#if item.getPSSysImage()??>
<#assign image = item.getPSSysImage()>
<i class="${image.getCssClass()}"></i>
</#if>
<#if item.isShowCaption()>
<span<#if item.getLabelPSSysCss()??> class="${item.getLabelPSSysCss().getCssName()}"</#if><#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span>
</#if>
</van-button>
</van-col>
</#if>
\ No newline at end of file
<#assign layout = item.getPSLayout()/>
<#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#if layout.getLayout()=='FLEX'>
<div class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style="${flexAttr}<#if item.getColWidth() != -1>width: ${item.getColWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>">
<#if item.isShowCaption()>
<#if item.getLabelPSSysCss()??>
<div class="${item.getLabelPSSysCss().getCssName()}" style="height: 50px;${item.getLabelPSSysCss().getRawCssStyle()}">${item.getCaption()}</div>
<#else>
<div style="height: 50px;">${item.getCaption()}</div>
</#if>
</#if>
<div style="height: <#if item.isShowCaption()>calc(100% - 50px)<#else>100%</#if>;display: flex;<#if layout.getDir()!="">flex-direction: ${layout.getDir()};</#if><#if layout.getAlign()!="">justify-content: ${layout.getAlign()};</#if><#if layout.getVAlign()!="">align-items: ${layout.getVAlign()};</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>">
<@ibizindent blank=8>
<#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem>
${P.getPartCode(panelItem).code}
</#list>
</#if>
</@ibizindent>
</div>
</div>
<#else>
<van-col span="24"${tableAttr} style="${flexAttr}<#if item.getColWidth() != -1>width: ${item.getColWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>" class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#if item.isShowCaption()>
<#if item.getLabelPSSysCss()??>
<div class="${item.getLabelPSSysCss().getCssName()}" style="height: 50px;${item.getLabelPSSysCss().getRawCssStyle()}">${item.getCaption()}</div>
<#else>
<div style="height: 50px;">${item.getCaption()}</div>
</#if>
</#if>
<van-row style="height: <#if item.isShowCaption()>calc(100% - 50px)<#else>100%</#if>;<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>">
<@ibizindent blank=8>
<#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem>
${P.getPartCode(panelItem).code}
</#list>
</#if>
</@ibizindent>
</van-row>
</van-col>
</#if>
\ No newline at end of file
<#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getColWidth() != -1>width: ${item.getColWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<@ibizindent blank=4>
${P.getCtrlCode('${item.name}', 'CONTROL.html').code}
</@ibizindent>
</div>
<#else>
<van-col span="24"${tableAttr} style="<#if item.getColWidth() != -1>width: ${item.getColWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<@ibizindent blank=4>
${P.getCtrlCode('${item.name}', 'CONTROL.html').code}
</@ibizindent>
</van-col>
</#if>
\ No newline at end of file
<#if item.getParentLayoutMode()=='FLEX'>
<#else>
<van-col span="24"<#if item.getColLG() != -1> lg={${item.getColLG()?c}}</#if><#if item.getColMD() != -1> md={${item.getColMD()?c}}</#if><#if item.getColSM() != -1> sm={${item.getColSM()?c}}</#if><#if item.getColXS() != -1> xs={${item.getColXS()?c}}</#if> style="<#if item.getColWidth() != -1>width: ${item.getColWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-field<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<div>${item.name}</div>
</van-col>
</#if>
\ No newline at end of file
<#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'>
<div style="<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-rowitem<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<@ibizindent blank=4>
${item.getHtmlContent()}
</@ibizindent>
</div>
<#else>
<van-col span="24" ${tableAttr} style="<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-rowitem<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<@ibizindent blank=4>
${item.getHtmlContent()}
</@ibizindent>
</van-col>
</#if>
<#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'>
<div style="<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<@ibizindent blank=4>
<#if item.getPSSysPFPlugin()??>
${item.getPSSysPFPlugin().getCode("CODE",pf.getId(),pfstyle.getId(),view,ctrl,item)}
</#if>
</@ibizindent>
</div>
<#else>
<van-col span="24" ${tableAttr} style="<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<@ibizindent blank=4>
<#if item.getPSSysPFPlugin()??>
${item.getPSSysPFPlugin().getCode("CODE",pf.getId(),pfstyle.getId(),view,ctrl,item)}
</#if>
</@ibizindent>
</van-col>
</#if>
\ No newline at end of file
<div class='view-container'>
<van-row class="app-layoutpanel">
<@ibizindent blank=8>
<#if ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as item>
${P.getPartCode(item).code}
</#list>
</#if>
</@ibizindent>
</van-row>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL
\ No newline at end of file
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="app-mob-wizardpanel <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.getEmbeddedPSAppDEView()??>
<#assign refview =ctrl.getEmbeddedPSAppDEView()>
<view-${srfclassname('${refview.getCodeName()}')?lower_case} :selectedData="selectedData" :viewState="viewState" :isMutli="isMutli" <#if ctrl.getHookEventNames()??><#list ctrl.getHookEventNames() as eventName> @${eventName?lower_case}="${ctrl.name}_${eventName?lower_case}($event)" </#list></#if>></view-${srfclassname('${refview.getCodeName()}')?lower_case}>
</#if>
</div>
</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* 是否多选
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({default:false}) public isMutli?: boolean;
/**
* 数据选择视图选中项
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public selectedData?:any;
/**
* 接收多数据选择部件所选的值并且抛出
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public pickupviewpanel_dataschange(newValue:any){
this.$emit('dataschange',newValue);
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=PICKUPVIEWPANEL
\ No newline at end of file
<div class="app-mob-portlet <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#-- 是否门户菜单 -->
<#if ctrl.getPortletType() == "APPMENU">
<#-- 门户菜单样式是否配置 -->
<#-- <#if ctrl.getAMListStyle()??>
<#if ctrl.getAMListStyle() == "ICONVIEW">
<app-palace-menu :items="items" <#if ctrl.isShowTitleBar()><#if ctrl.getTitle()??>title="${ctrl.getTitle()}"</#if></#if>></app-palace-menu>
<#elseif ctrl.getAMListStyle() == "LISTVIEW">
<app-list-menu :items="items" <#if ctrl.isShowTitleBar()><#if ctrl.getTitle()??>title="${ctrl.getTitle()}"</#if></#if>></app-list-menu>
<#elseif ctrl.getAMListStyle() == "SWIPERVIEW">
<app-slide-menu :items="items" <#if ctrl.isShowTitleBar()><#if ctrl.getTitle()??>title="${ctrl.getTitle()}"</#if></#if>></app-slide-menu>
<#else>
<app-app-menu :items="items" <#if ctrl.isShowTitleBar()><#if ctrl.getTitle()??>title="${ctrl.getTitle()}"</#if></#if>></app-app-menu>
</#if> -->
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<view_${subctrl.getName()} name="${subctrl.name}" <#if ctrl.isShowTitleBar()><#if ctrl.getTitle()??>title="${ctrl.getTitle()}"</#if></#if><#if ctrl.getAMListStyle()??> menuStyle="${ctrl.getAMListStyle()?lower_case}"</#if> :viewState="viewState" ></view_${subctrl.getName()}>
</#list>
</#if>
<#-- 是否自定义门户部件 -->
<#elseif ctrl.getPortletType() == "CUSTOM">
<#if ctrl.render??>
${ctrl.render.code}
</#if>
<#elseif ctrl.getPortletType() == "LIST">
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<view_${subctrl.getName()} name="${subctrl.name}" <#if ctrl.isShowTitleBar()><#if ctrl.getTitle()??>title="${ctrl.getTitle()}"</#if></#if><#if ctrl.getAMListStyle?? && ctrl.getAMListStyle()??> menuStyle="${ctrl.getAMListStyle()?lower_case}"</#if> :viewState="viewState" <#if subctrl.getPSDEDataSet()??><#assign dataset = subctrl.getPSDEDataSet() /> searchAction="search${dataset.getName()?lower_case}"</#if>></view_${subctrl.getName()}>
</#list>
</#if>
<#else>
<#if ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??>
<#assign refview = ctrl.getPortletPSAppView()>
<view-${srfclassname('${refview.getCodeName()}')?lower_case} :viewState="viewState"></view-${srfclassname('${refview.getCodeName()}')?lower_case}>
</#if>
</#if>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#assign default_header>
import { Subject,Subscription } from 'rxjs';
import '@/assets/interface/viewState';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
<#if ctrl.getPSPortlets?? && ctrl.getPSPortlets()??>
<#list ctrl.getPSPortlets() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@/widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@/widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
</#assign>
<#assign components>
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
view_${subctrl.getName()},
</#if>
</#list>
</#if>
<#if ctrl.getPSPortlets?? && ctrl.getPSPortlets()??>
<#list ctrl.getPSPortlets() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
view_${subctrl.getName()},
</#if>
</#list>
</#if>
<#if components??>${components}</#if>
</#assign>
<#assign default_content>
/**
* 名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 是否为内敛试图
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public isembeddedView?: string;
/**
* 视图状态事件
*
* @protected
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected viewStateEvent: Subscription | undefined;
/**
* 是否为模态模式
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public isModalMode?: string;
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType()??>
<#if childCtrl.getHookEventNames()??>
<#list childCtrl.getHookEventNames() as eventName>
/**
* ${childCtrl.name} 部件 ${eventName?lower_case} 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof TestEntityEditView
*/
public ${childCtrl.name}_${eventName?lower_case}($event: any, $event2?: any) {
<#if childCtrl.getPSControlLogics(eventName)??>
<#list childCtrl.getPSControlLogics(eventName) as ctrlLogic>
<#if ctrlLogic.getLogicType?? && ctrlLogic.getLogicType() == "APPVIEWENGINE" && ctrlLogic.getPSAppViewEngine()??>
this.${ctrlLogic.getPSAppViewEngine().getName()}.onCtrlEvent('${childCtrl.name}', '${eventName?lower_case}', $event);
<#else>
<#if ctrlLogic.getEventArg()?? && ctrlLogic.getEventArg()?length gt 0>
if (Object.is($event.tag, '${ctrlLogic.getEventArg()}')) {
this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
}
<#else>
this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
</#if>
</#if>
</#list>
</#if>
}
</#list>
</#if>
</#if>
</#list>
</#if>
<#if ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getLogicTrigger() == "CUSTOM" || logic.getLogicTrigger() == "CTRLEVENT">
${P.getLogicCode(logic, "LOGIC.vue").code}
</#if>
</#list>
</#if>
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
<@ibizindent blank=4>
<#list ctrl.getPSUIActions() as uiAction>
${P.getLogicCode(uiAction, "LOGIC.vue").code}
</#list>
</@ibizindent>
</#if>
created() {
this.handleCreated();
}
public handleCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(
({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
this.viewState.next({tag:'${subctrl.name}', action: 'load', data: {}});
</#list>
</#if>
}
);
}
}
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=PORTLET
\ No newline at end of file
<#assign flexAttr>
<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"><#assign layoutPos = item.getPSLayoutPos()/><#if layoutPos.getGrow() gt -1>flex-grow: ${layoutPos.getGrow()};</#if></#if></#assign>
<#assign tableAttr>
<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() != "FLEX"><#assign layoutPos = item.getPSLayoutPos()/><#if layoutPos.getPSLayout?? && layoutPos.getPSLayout()??><#if layoutPos.getPSLayout().getLayout() == "TABLE_12COL"><#if layoutPos.getColSM() gt -1> :span="${layoutPos.getColSM()?c}*2" <#if layoutPos.getColSMOffset() != -1> :offset="${layoutPos.getColSMOffset()}*2"</#if></#if><#else><#if layoutPos.getColSM() gt -1> :span="${layoutPos.getColSM()?c}" <#if layoutPos.getColSMOffset() != -1> :offset="${layoutPos.getColSMOffset()}"</#if></#if></#if></#if></#if></#assign>
\ No newline at end of file
<#if ctrl.getRender()??>
${ctrl.render.code}
<#else>
${P.getPartCode(item,'PANEL').code}
</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LESS/DEFAULT.less.ftl
</#ibizinclude>
//面板插件样式
<#if ctrl.render??>
${ctrl.render.code3}
</#if>
<#if ctrl.getAllPSPanelItems()??>
<#list ctrl.getAllPSPanelItems() as formdetail>
<#if formdetail.getRender()??>
${formdetail.render.code3}
</#if>
</#list>
</#if>
\ No newline at end of file
<#ibizinclude>
./@MACRO/PLAYOUT.html.ftl
</#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#if item.render??>
${item.render.code}
<#else>
<nut-button class="app-layout-panel-button" <#if item.getHeight() gt 0> style="height: ${item.getHeight()?c}px;"</#if>>
<#if item.getPSSysImage()??>
<#assign image = item.getPSSysImage()>
<i class="${image.getCssClass()}"></i>
</#if>
<#if item.isShowCaption()>
<span<#if item.getLabelPSSysCss()??> class="${item.getLabelPSSysCss().getCssName()}"</#if>>${item.getCaption()}</span>
</#if>
</nut-button>
</#if>
</div>
<#else>
<nut-col ${tableAttr} style="text-align:center;padding:0px;" class="<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#if item.render??>
${item.render.code}
<#else>
<nut-button class="app-layout-panel-button" <#if item.getHeight() gt 0> style="height: ${item.getHeight()?c}px;"</#if>>
<#if item.getPSSysImage()??>
<#assign image = item.getPSSysImage()>
<i class="${image.getCssClass()}"></i>
</#if>
<#if item.isShowCaption()>
<span<#if item.getLabelPSSysCss()??> class="${item.getLabelPSSysCss().getCssName()}"</#if>>${item.getCaption()}</span>
</#if>
</nut-button>
</#if>
</nut-col>
</#if>
\ No newline at end of file
<#assign layout = item.getPSLayout()/>
<#ibizinclude>
./@MACRO/PLAYOUT.html.ftl
</#ibizinclude>
<#if layout.getLayout()=='FLEX'>
<div class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>">
<div style="display: flex;<#if layout.getDir()!="">flex-direction: ${layout.getDir()};</#if><#if layout.getAlign()!="">justify-content: ${layout.getAlign()};</#if><#if layout.getVAlign()!="">align-items: ${layout.getVAlign()};</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>">
<#if item.render??>
${item.render.code}
<#else>
<#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem>
${P.getPartCode(panelItem).code}
</#list>
</#if>
</#if>
</div>
</div>
<#else>
<#if tableAttr??>
<nut-col ${tableAttr} style="text-align:center;padding:0px;" class="<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#else>
<nut-row>
</#if>
<div style="padding:0px;margin:0px;" class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" >
<#if item.render??>
${item.render.code}
<#else>
<nut-row>
<#if item.getPSPanelItemCount()?? && item.getPSPanelItemCount() gt 0>
<#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as item>
${P.getPartCode(item).code}
</#list>
</#if>
<#else>
&nbsp;
</#if>
</nut-row>
</#if>
</div>
<#if tableAttr??>
</nut-col>
<#else>
</nut-row>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>
./@MACRO/PLAYOUT.html.ftl
</#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#if item.render??>
${item.render.code}
<#else>
<#assign refControl=item.getPSControl()>
<view_${srffilepath2(refControl.codeName)} :name="'${refControl.name}'"></view_${srffilepath2(refControl.codeName)}>
</#if>
</div>
<#else>
<nut-col ${tableAttr} style="text-align:center;padding:0px;" <#if item.getPSSysCss()??> class="${item.getPSSysCss().getCssName()}"</#if>>
<#if item.render??>
${item.render.code}
<#else>
<#assign refControl=item.getPSControl()>
<view_${srffilepath2(refControl.codeName)} :name="'${refControl.name}'"></view_${srffilepath2(refControl.codeName)}>
</#if>
</nut-col>
</#if>
\ No newline at end of file
<#ibizinclude>
./@MACRO/PLAYOUT.html.ftl
</#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getWidth() != -1>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<@ibizindent blank=4>
<#if item.render??>
${item.render.code}
<#else>
<#if view.hasPSControl('${item.name}')>
${P.getCtrlCode('${item.name}', 'CONTROL.html').code}
<#else>
<div>当前视图不存在${item.name}部件</div>
</#if>
</#if>
</@ibizindent>
</div>
<#else>
<nut-col ${tableAttr} style="text-align:center;padding:0px;" <#if item.getPSSysCss()??> class="${item.getPSSysCss().getCssName()}"</#if>>
<@ibizindent blank=4>
<#if item.render??>
${item.render.code}
<#else>
<#if view.hasPSControl('${item.name}')>
${P.getCtrlCode('${item.name}', 'CONTROL.html').code}
<#else>
<div>当前视图不存在${item.name}部件</div>
</#if>
</#if>
</@ibizindent>
</nut-col>
</#if>
\ No newline at end of file
<#ibizinclude>
./@MACRO/PLAYOUT.html.ftl
</#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>" class="app-layoutpanel-field<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<@ibizindent blank=4>
<#if item.render??>
${item.render.code}
<#else>
<#-- ${P.getEditorCode(item, "PANELEDITOR.html").code} --><span>暂未支持面板编辑器</span>
</#if>
</@ibizindent>
</div>
<#else>
<nut-col ${tableAttr} style="text-align:center;padding:0px;" <#if item.getPSSysCss()??>class="${item.getPSSysCss().getCssName()}"</#if>>
<@ibizindent blank=4>
<#if item.render??>
${item.render.code}
<#else>
<#-- ${P.getEditorCode(item, "PANELEDITOR.html").code} --><span>暂未支持面板编辑器</span>
</#if>
</@ibizindent>
</nut-col>
</#if>
\ No newline at end of file
<#assign detail>caption: '${item.getCaption()}', itemType: '${item.getItemType()}', name: '${item.getName()}', panel: this</#assign>
<#if item.getItemType() == 'CONTAINER'>
new PanelContainerModel({ ${detail} })
<#elseif item.getItemType() == 'RAWITEM'>
new PanelRawitemModel({ ${detail} })
<#elseif item.getItemType() == 'FIELD'>
new PanelFieldModel({ ${detail} })
<#elseif item.getItemType() == 'CONTROL'>
new PanelControlModel({ ${detail} })
<#elseif item.getItemType() == 'BUTTON'>
new PanelButtonModel({ ${detail} })
<#elseif item.getItemType() == 'USERCONTROL'>
new PanelUserControlModel({ ${detail} })
</#if>
\ No newline at end of file
<#ibizinclude>
./@MACRO/PLAYOUT.html.ftl
</#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}" class="app-layoutpanel-rowitem<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<@ibizindent blank=4>
<#if item.render??>
${item.render.code}
<#else>
${item.getHtmlContent()}
</#if>
</@ibizindent>
</div>
<#else>
<nut-col ${tableAttr} style="text-align:center;padding:0px;" <#if item.getPSSysCss()??> class="${item.getPSSysCss().getCssName()}"</#if>>
<@ibizindent blank=4>
<#if item.render??>
${item.render.code}
<#else>
${item.getHtmlContent()}
</#if>
</@ibizindent>
</nut-col>
</#if>
<#ibizinclude>
./@MACRO/PLAYOUT.html.ftl
</#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#if item.render??>
${item.render.code}
</#if>
</div>
<#else>
<nut-col ${tableAttr} style="text-align:center;padding:0px;" <#if item.getPSSysCss()??> class="${item.getPSSysCss().getCssName()}"</#if>>
<#if item.render??>
${item.render.code}
</#if>
</nut-col>
</#if>
\ No newline at end of file
<div class="app-mob-panel <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<@ibizindent blank=8>
<#if ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as item>
${P.getPartCode(item).code}
</#list>
</#if>
</@ibizindent>
</div>
\ No newline at end of file
<template>
<#ibizinclude>
./CONTROL.html.ftl
</#ibizinclude>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_DEFAULT.vue.ftl
</#ibizinclude>
<#assign self_content>
/**
* 传入表单项值
*
* @type {any}
* @memberof Mob
*/
@Prop() public item?: any;
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CONTAINER.vue.ftl
</#ibizinclude>
<style lang="less">
<#ibizinclude>
./CONTROL.less.ftl
</#ibizinclude>
</style>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=PANEL
\ No newline at end of file
<app-radio style="width: 100%;" :disabled="detailsModel.${item.name}.disabled" :value="data.${item.name}" @valuechange="valueChange('${item.name}',$event)" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()> :options="this.$store.getters.getCodeListItems('${codelist.getSystemTag()}_${codelist.codeName}')"</#if>></app-radio>
\ No newline at end of file
EDITORTYPE=MOBRADIOLIST#PLUGIN
\ No newline at end of file
<span class="app-form-label">{{data.${item.name}}}</span>
\ No newline at end of file
EDITORTYPE=SPAN
\ No newline at end of file
<app-select :disabled="detailsModel.${item.name}.disabled" :value="data.${item.name}" @valuechange="valueChange('${item.name}',$event)" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()> :codetag="'${codelist.getSystemTag()}_${codelist.codeName}'"</#if><#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if>></app-select>
\ No newline at end of file
EDITORTYPE=MOBDROPDOWNLIST
\ No newline at end of file
<app-multiple-select :disabled="detailsModel.${item.name}.disabled"<#if item.getCodeList()??><#if item.getCodeList().getOrMode() != ""> orMode="${item.getCodeList().getOrMode()?lower_case}"</#if><#if item.getCodeList().getValueSeparator() != ""> valueSeparator="${item.getCodeList().getValueSeparator()}"</#if><#if item.getCodeList().getTextSeparator() != ""> textSeparator="${item.getCodeList().getTextSeparator()}"</#if></#if> :value="data.${item.name}" @valuechange="valueChange('${item.name}',$event)" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()> :options="this.$store.getters.getCodeListItems('${codelist.getSystemTag()}_${codelist.codeName}')"</#if><#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if>></app-multiple-select>
\ No newline at end of file
EDITORTYPE=MOBCHECKLIST
\ No newline at end of file
<app-radio style="width: 100%;" :disabled="detailsModel.${item.name}.disabled" :value="data.${item.name}" @valuechange="valueChange('${item.name}',$event)" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()> :options="this.$store.getters.getCodeListItems('${codelist.getSystemTag()}_${codelist.codeName}')"</#if>></app-radio>
\ No newline at end of file
EDITORTYPE=MOBRADIOLIST
\ No newline at end of file
<app-image-upload class="app-form-item-image" :allowEmpty="detailsModel.${item.name}.isAllowEmpty" labelText="${item.getCaption()}" @valuechange="valueChange('${item.name}',$event)" :value="data.${item.name}" :disabled="detailsModel.${item.name}.disabled" ></app-image-upload>
\ No newline at end of file
EDITORTYPE=MOBPICTURE
\ No newline at end of file
<app-multiple-image-upload class="app-form-item-multipleimage" :allowEmpty="detailsModel.${item.name}.isAllowEmpty" labelText="${item.getCaption()}" @valuechange="valueChange('${item.name}',$event)" :value="data.${item.name}" :disabled="detailsModel.${item.name}.disabled" ></app-multiple-image-upload>
\ No newline at end of file
EDITORTYPE=MOBPICTURELIST
\ No newline at end of file
<#if item.getRefLinkPSAppView()??><#assign pickupview = item.getRefLinkPSAppView()></#if>
<app-mpicker class="app-form-item-picker" @valuechange="valueChange('${item.name}',$event)" <#if item.isShowCaption()> labelText="${item.getCaption()}"</#if> :allowEmpty="detailsModel.${item.name}.isAllowEmpty" :value="data.${item.name}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> :disabled="detailsModel.${item.name}.disabled" <#if item.getValueItemName()?? && item.getValueItemName() != "">valueItem="${item.getValueItemName()}"</#if> <#if pickupview??> :viewname="<#if pickupview??>'view-${srfclassname('${pickupview.getCodeName()}')?lower_case}'<#else>''</#if>"</#if> style="width: 100%;"></app-mpicker>
\ No newline at end of file
EDITORTYPE=MOBMPICKER
\ No newline at end of file
<app-input class="app-form-item-textarea" @valuechange="valueChange('${item.name}',$event)" :type="'textarea'" :value="data.${item.name}" :disabled="detailsModel.${item.name}.disabled" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if>></app-input>
\ No newline at end of file
EDITORTYPE=MOBTEXTAREA
\ No newline at end of file
<app-input class="app-form-item-password" @valuechange="valueChange('${item.name}',$event)" :type="'password'" :value="data.${item.name}" :disabled="detailsModel.${item.name}.disabled" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if>></app-input>
\ No newline at end of file
EDITORTYPE=MOBPASSWORD
\ No newline at end of file
<app-switch class="app-form-item-switch" @valuechange="valueChange('${item.name}',$event)" :value="data.${item.name}" :disabled="detailsModel.${item.name}.disabled"></app-switch>
\ No newline at end of file
EDITORTYPE=MOBSWITCH
\ No newline at end of file
<#if item.getRefLinkPSAppView()??><#assign pickupview = item.getRefLinkPSAppView()></#if>
<app-picker class="app-form-item-picker" @valuechange="valueChange('${item.name}',$event)" :value="data.${item.name}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> :disabled="detailsModel.${item.name}.disabled" <#if item.getValueItemName()?? && item.getValueItemName() != "">valueItem="${item.getValueItemName()}" :valueItemData="data.${item.getValueItemName()}" @valueItemchange="valueChange('${item.getValueItemName()}',$event)" </#if> <#if pickupview??> :viewname="<#if pickupview??>'view-${srfclassname('${pickupview.getCodeName()}')?lower_case}'<#else>''</#if>"</#if> style="width: 100%;"></app-picker>
\ No newline at end of file
EDITORTYPE=MOBPICKER
\ No newline at end of file
<app-file-upload class="app-form-item-image" @valuechange="valueChange('${item.name}',$event)" :value="data.${item.name}" :disabled="detailsModel.${item.name}.disabled" ></app-file-upload>
\ No newline at end of file
EDITORTYPE=MOBSINGLEFILEUPLOAD
\ No newline at end of file
<app-multiple-file-upload class="app-form-item-multipleimage" :allowEmpty="detailsModel.${item.name}.isAllowEmpty" labelText="${item.getCaption()}" @valuechange="valueChange('${item.name}',$event)" :value="data.${item.name}" :disabled="detailsModel.${item.name}.disabled" ></app-multiple-file-upload>
\ No newline at end of file
EDITORTYPE=MOBMULTIFILEUPLOAD
\ No newline at end of file
<app-input class="app-form-item-input" @valuechange="valueChange('${item.name}',$event)" :type="'text'" :value="data.${item.name}" :disabled="detailsModel.${item.name}.disabled" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if>></app-input>
EDITORTYPE=MOBTEXT
\ No newline at end of file
<app-datetime-picker class="app-form-item-datetime" @valuechange="valueChange('${item.name}',$event)" :value="data.${item.name}" :disabled="detailsModel.${item.name}.disabled"></app-datetime-picker>
\ No newline at end of file
EDITORTYPE=MOBDATE
\ No newline at end of file
<app-stepper class="app-form-item-stepper" :value="data.${item.name}" :disabled="detailsModel.${item.name}.disabled" @valuechange="valueChange('${item.name}',$event)"></app-stepper>
EDITORTYPE=MOBSTEPPER
\ No newline at end of file
<span class="app-form-hidden" style="display: none;">{{data.${item.name}}}</span>
\ No newline at end of file
EDITORTYPE=HIDDEN
\ No newline at end of file
/**
* ${item.getName()}
*
* @param {*} [item={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public click${item.codeName}(item: any = {}){
window.open('${item.getHtmlPageUrl()}','_blank');
}
\ No newline at end of file
LOGICTYPE=OPENHTMLPAGE
\ No newline at end of file
<#if item.getPSAppView()??>
/**
* ${item.getName()}
*
* @param {*} [item={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
<#assign dataview = item.getPSAppView()/>
public click${item.codeName}(item: any = {}) {
const viewparam: any = <#if item.getOpenViewParam?? && item.getOpenViewParam()??>${item.getOpenViewParam()}<#else>{}</#if>;
<#if dataview.getOpenMode() == 'INDEXVIEWTAB' || dataview.getOpenMode() == ''>
// 打开应用视图
<#if view.getViewType() == "APPINDEXVIEW">
if(item.srfkey){
this.$router.push({ name: '${view.getCodeName()}_${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}', query:{srfkey:item.srfkey}});
}else{
this.$router.push({ name: '${view.getCodeName()}_${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}'});
}
<#else>
this.$router.push({ name: '${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}' });
</#if>
</#if>
<#if dataview.getOpenMode() == 'POPUP'>
console.log('-----POPUP-----非模式弹出,暂时不实现');
</#if>
<#if dataview.getOpenMode() == 'POPUPMODAL'>
//模式弹出
const view = {
viewname: 'view-${dataview.getCodeName()?lower_case}',
title: '${dataview.title}',
};
const data = { srfparentdata: viewparam ,srfkey: item.srfkey?item.srfkey:''};
const appmodal = this.$modal({componentName:view.viewname,viewdata:data}).show();
appmodal.subscribe((result: any) => {
console.log(result);
});
</#if>
<#if dataview.getOpenMode() == 'POPUPAPP'>
console.log('-----POPUPAPP-----独立程序弹出,暂时不实现');
</#if>
<#if dataview.getOpenMode()?index_of('USER') == 0>
console.log('-----${dataview.getOpenMode()}-----用户自定义');
</#if>
}
</#if>
\ No newline at end of file
LOGICTYPE=APPVIEW
\ No newline at end of file
/**
* ${item.getName()}
*
* @param {*} [item={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public click${item.codeName}(item: any = {}){
${item.getJSCode()}
}
\ No newline at end of file
LOGICTYPE=JAVASCRIPT
\ No newline at end of file
/**
* ${item.getName()}
*
* @param {*} [item={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public clickAppFunc${item.name}(){
}
\ No newline at end of file
LOGICTYPE=CUSTOM
\ No newline at end of file
/**
* ${item.getName()}
*
* @param {*} [item={}]
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
<#if item.getPSPDTAppFuncId() == "LOGOUT">
<#-- 登出 -->
public click${item.codeName}(item:any){
this.$dialog({
title:'退出',
message:'确认退出当前用户',
confirm:()=>{
window.localStorage.removeItem('srfloginkey');
window.localStorage.removeItem('userInfo');
this.$router.push({name:'login'});
}
})
}
</#if>
\ No newline at end of file
LOGICTYPE=PDTAPPFUNC
\ No newline at end of file
<#if front_block??>
${front_block}
<#else>
/**
* 界面行为
*
* @param {any[]} arg
* @param {*} [params]
* @returns {Promise<any>}
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any[], params?: any, $event?: any): any {
return new Promise((resolve, reject) => {
<#if item.getFrontProcessType() == 'OPENHTMLPAGE'>
const data: any = arg[0];
const url = `${item.getHtmlPageUrl()}`;
window.open(url, '_blank');
resolve();
</#if>
<#if item.getFrontProcessType() == 'TOP'>
let refview = {
<#if item.getFrontPSAppView(view)??>
<#assign frontview = item.getFrontPSAppView(view)>
path: '${frontview.getPSAppModule().codeName?lower_case}_${frontview.codeName?lower_case}'<#if frontview.isRedirectView()>, redirectview: true, backendurl: '${frontview.getPSAppModule().codeName}/${frontview.codeName}.do'</#if>
</#if>
};
const data: any = {};
if (arg.length > 0) {
Object.assign(data, {srfkey: arg[0].srfkey})
}
this.$router.push({ name: refview.path,query: {srfkey:data.srfkey}});
resolve();
</#if>
<#if item.getFrontProcessType() == 'WIZARD'>
let refviews = {
<#if item.getFrontPSAppView(view)??>
<#assign frontview = item.getFrontPSAppView(view)>
viewname: 'view-${srfclassname('${frontview.getCodeName()}')?lower_case}'<#if frontview.isRedirectView()>, redirectview: true, backendurl: '${frontview.getPSAppModule().codeName}/${frontview.codeName}.do'</#if>
</#if>
};
const data: any = {};
if (arg.length > 0) {
Object.assign(data, { srfkey: arg[0].srfkey })
}
const view = { componentName: refviews.viewname,viewdata:JSON.stringify(data)};
let modalContainer: Subject<any>;
modalContainer=this.$modal(view).show();
modalContainer.subscribe((result:any) => {
console.log(result)
resolve(result);
});
</#if>
});
}
</#if>
\ No newline at end of file
LOGICTYPE=FRONT
\ No newline at end of file
<#-- 后台界面行为 -->
<#if backend_block??>
${backend_block}
<#else>
/**
* ${item.getCaption()}
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [$event]
* @param {*} [xData]
* @returns {Promise<any>}
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(args: any[], params?: any, $event?: any, xData?: any): Promise<any> {
<#if item.getActionTarget() == 'SINGLEDATA'>
return new Promise((resolve: any, reject: any) => {
this.$notify({ type: 'danger', message: '不支持单项数据' });
});
<#elseif item.getActionTarget() == 'MULTIDATA'>
return new Promise((resolve: any, reject: any) => {
this.$notify({ type: 'danger', message: '不支持多项数据' });
});
<#else>
// BACKEND
//自定义标识
const url: string = '${app.getPKGCodeName()?lower_case}/${item.getPSDataEntity().getPSSystemModule().codeName?lower_case}/${item.getPSDataEntity().codeName?lower_case}/uiaction/${item.getCodeName()?lower_case}';
const data: any = { srfparentdata: {} };
const _this: any = this;
if (_this.srfparentdata) {
Object.assign(data.srfparentdata, _this.srfparentdata);
}
<#if item.getActionTarget() == 'SINGLEKEY'>
<#-- 单项数据主键 -->
if (args.length > 0) {
Object.assign(data, { srfkey: args[0].srfkey });
}
// 值项名称 - 单项数据主键,默认为srfkey
const valueItem: string = '<#if item.getValueItem?? && item.getValueItem() != ''>${item.getValueItem()}<#else>srfkey</#if>';
// 数据项名称 - 单项数据主键,默认为srfkey
const paramItem: string = '<#if item.getParamItem?? && item.getParamItem() != ''>${item.getParamItem()}<#else>srfkey</#if>';
if (args.length > 0 && args[0].hasOwnProperty(valueItem)) {
const _params2: any = {};
Object.assign(_params2, { [paramItem]: args[0][valueItem] });
// 参数层级处理
if (Object.is(paramItem, 'srfkey')) {
Object.assign(data, _params2);
} else {
Object.assign(data.srfparentdata, _params2);
}
// 非默认值转换 删除原始值
if (Object.is(valueItem, 'srfkey') && !Object.is(paramItem, 'srfkey')) {
delete data.srfkey;
}
}
</#if>
<#if item.getActionTarget() == 'MULTIKEY'>
<#-- 多项数据主键 -->
let keys: string[] = [];
args.forEach((arg: any) => {
if (arg.srfkey) {
keys.push(arg.srfkey);
}
});
if (keys.length > 0) {
Object.assign(data, { srfkeys: keys.join(';') });
}
// 值项名称 - 多项数据主键,默认为srfkey
const valueItem: string = '<#if item.getValueItem?? && item.getValueItem() != ''>${item.getValueItem()}<#else>srfkey</#if>';
// 数据项名称 - 多项数据主键,默认为srfkeys
const paramItem: string = '<#if item.getParamItem?? && item.getParamItem() != ''>${item.getParamItem()}<#else>srfkeys</#if>';
const _params2: any = {};
let _keys: string[] = [];
args.forEach((arg: any) => {
if (arg.hasOwnProperty(valueItem)) {
_keys.push(arg[valueItem]);
}
});
Object.assign(_params2, { [paramItem]: _keys.join(';') });
// 参数层级处理
if (Object.is(paramItem, 'srfkeys')) {
Object.assign(data, _params2);
} else {
Object.assign(data.srfparentdata, _params2);
}
</#if>
if (params && Object.keys(params).length > 0) {
const _params: any = {};
const arg: any = args[0];
Object.keys(params).forEach((name: string) => {
if (!name) {
return;
}
let value: string | null = params[name];
if (value && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1);
if (arg && arg.hasOwnProperty(key)) {
value = (arg[key] !== null && arg[key] !== undefined) ? arg[key] : null;
} else {
value = null;
}
}
Object.assign(_params, { [name]: value });
});
Object.assign(data.srfparentdata, _params);
}
return new Promise((resolve: any, reject: any) => {
const backend = () => {
this.$http.post(url, data, ${item.isShowBusyIndicator()?c}).then((response: any) => {
if (!response || response.status !== 200) {
this.$notify({ type: 'danger', message: response.message });
return;
}
<#if item.getSuccessMsg?? && item.getSuccessMsg()??>
this.$notify({ type: 'success', message: '${item.getSuccessMsg()}' });
</#if>
const _this: any = this;
<#-- 是否重新加载数据 -->
<#if item.isReloadData?? && item.isReloadData()>
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
} else if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(args);
}
</#if>
<#-- 后续界面行为 -->
<#if item.getNextPSUIAction?? && item.getNextPSUIAction()??>
<#assign nextPSUIAction = item.getNextPSUIAction()/>
const { data: result } = response;
let _args: any[] = [];
if (Object.is(this.$util.typeOf(result), 'array')) {
_args = [...result];
} else if (Object.is(this.$util.typeOf(result), 'object')) {
_args = [{...result}];
} else {
_args = [...args];
}
if (_this.${nextPSUIAction.getFullCodeName()} && _this.${nextPSUIAction.getFullCodeName()} instanceof Function) {
_this.${nextPSUIAction.getFullCodeName()}(_args, params, $event, xData);
}
</#if>
resolve(response);
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
this.$notify({ type: 'danger', message: '系统异常!' });
return;
}
if (response.status === 401) {
return;
}
const { data: _data } = response;
this.$notify({ type:'danger', message: _data.message });
reject(response);
});
};
<#if item.getFrontPSAppView(view)??>
<#assign frontview = item.getFrontPSAppView(view)>
let modalSubject = this.$modal({
componentName: 'view-${srfclassname('${frontview.getCodeName()}')?lower_case}',
viewdata: JSON.stringify(data)
}).show();
modalSubject.subscribe((res: any) => {
if (res) {
Object.assign(data,res);
backend();
}
});
<#elseif item.getConfirmMsg?? && item.getConfirmMsg()??>
this.$prompt().show(
{"message":"${item.getConfirmMsg()}",
"confirm":() =>{
backend();
},
"cancel":() =>{}
}
);
<#else>
backend();
</#if>
});
</#if>
}
</#if>
\ No newline at end of file
LOGICTYPE=BACKEND
\ No newline at end of file
<#if wffront_block??>
${wffront_block}
<#else>
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
// WFFRONT
}
</#if>
\ No newline at end of file
LOGICTYPE=WFFRONT
\ No newline at end of file
<#if wfbackend_block??>
${wfbackend_block}
<#else>
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
// WFBACKEND
}
</#if>
\ No newline at end of file
LOGICTYPE=WFBACKEND
\ No newline at end of file
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
// SYS
}
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#PrevRecord
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#NextRecord
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.save && _this.save instanceof Function) {
_this.save(arg);
}
if (_this.engine) {
_this.engine.doSysUIAction('Save');
}
}
\ No newline at end of file
LOGICTYPE=SYS#Save
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit(arg);
}
if (_this.engine) {
_this.engine.doSysUIAction('${item.getFullCodeName()}');
}
}
\ No newline at end of file
LOGICTYPE=SYS#SaveAndExit
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.saveAndNew && _this.saveAndNew instanceof Function) {
_this.saveAndNew(arg);
}
if (_this.engine) {
_this.engine.doSysUIAction('${item.getFullCodeName()}');
}
}
\ No newline at end of file
LOGICTYPE=SYS#SaveAndNew
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#SaveRow
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.close && _this.close instanceof Function) {
_this.close(arg);
}
}
\ No newline at end of file
LOGICTYPE=SYS#Exit
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.remove && _this.remove instanceof Function) {
_this.remove(arg[0]);
}
if (_this.engine) {
_this.engine.doSysUIAction('Remove');
}
}
\ No newline at end of file
LOGICTYPE=SYS#Remove
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit(arg);
}
if (_this.engine) {
_this.engine.doSysUIAction('${item.getFullCodeName()}');
}
}
\ No newline at end of file
LOGICTYPE=SYS#RemoveAndExit
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(arg);
}
if (_this.engine) {
_this.engine.doSysUIAction('${item.getFullCodeName()}');
}
}
\ No newline at end of file
LOGICTYPE=SYS#Refresh
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
<#-- const _this: any = this;
if (_this.exportExcel && _this.exportExcel instanceof Function) {
_this.exportExcel(arg);
} -->
}
\ No newline at end of file
LOGICTYPE=SYS#ExportExcel
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
<#-- const _this: any = this;
if (_this.exportModel && _this.exportModel instanceof Function) {
_this.exportModel(arg);
} -->
}
\ No newline at end of file
LOGICTYPE=SYS#ExportModel
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#HELP
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.save && _this.save instanceof Function) {
_this.save(arg).then((data:any)=>{
_this.startWorkFlow(data);
})
}
if (_this.engine) {
_this.engine.doSysUIAction('SaveAndStart');
}
}
\ No newline at end of file
LOGICTYPE=SYS#SAVEANDSTART
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
<#-- const _this: any = this;
if (_this.save && _this.save instanceof Function) {
_this.save(arg);
} -->
}
\ No newline at end of file
LOGICTYPE=SYS#ViewWFStep
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#PRINT
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#COPY
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
<#-- const _this: any = this;
if (_this.import && _this.import instanceof Function) {
_this.import(arg);
} -->
}
\ No newline at end of file
LOGICTYPE=SYS#Import
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
_this.newdata({ srfkey: arg.srfkey });
} else {
_this.$notify({ type: "danger", message: "newdata 视图处理逻辑不存在,请添加!" });
}
}
\ No newline at end of file
LOGICTYPE=SYS#New
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#NewRow
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#LastRecord
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
_this.opendata({ srfkey: arg.srfkey });
} else {
_this.$notify({ type: "danger", message: "opendata 视图处理逻辑不存在,请添加!" });
}
}
\ No newline at end of file
LOGICTYPE=SYS#View
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#RollbackWF
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(args: any[], params?: any, $event?: any, xData?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#USERACTION1
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(args: any[], params?: any, $event?: any, xData?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#USERACTION2
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#FirstRecord
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
_this.opendata({ srfkey: arg[0].srfkey });
} else {
_this.$notify({ type: "danger", message: "opendata 视图处理逻辑不存在,请添加!" });
}
}
\ No newline at end of file
LOGICTYPE=SYS#Edit
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
}
\ No newline at end of file
LOGICTYPE=SYS#ToggleRowEdit
\ No newline at end of file
/**
* ${item.getCaption()}
*
* @param {*} [arg={}]
* @param {*} [params]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.getFullCodeName()}(arg: any = {}, params?: any, $event?: any) {
<#-- const _this: any = this;
if (_this.toggleFilter && _this.toggleFilter instanceof Function) {
_this.toggleFilter({ srfkey: arg.srfkey });
}
if (_this.hasOwnProperty('isExpandSearchForm')) {
_this.isExpandSearchForm = !_this.isExpandSearchForm;
} -->
}
\ No newline at end of file
LOGICTYPE=SYS#ToggleFilter
\ No newline at end of file
LOGICTYPE=SYS
\ No newline at end of file
<#if item.getPSViewLogic?? && item.getPSViewLogic()??>
<#assign viewlogic = item.getPSViewLogic()/>
/**
* 打开新建数据视图
*
* @param {*} [params={}]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.name}(params: any = {}) {
<#if viewlogic.isEnableWizardAdd()>
// 支持向导添加
</#if>
<#if viewlogic.isEnableBatchAdd()>
// 支持批添加
</#if>
<#if viewlogic.isBatchAddOnly()>
// 只支持批添加
</#if>
<#if viewlogic.getNewDataPSAppView()??>
<#assign dataview = viewlogic.getNewDataPSAppView()/>
<#if dataview.getOpenMode() == 'INDEXVIEWTAB' || dataview.getOpenMode() == ''>
this.$router.push({ name: '${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}'});
</#if>
<#if dataview.getOpenMode() == 'POPUP'>
console.log('POPUP模式弹出,暂时不实现,移动端暂时只支持路由跳转和模态方式弹出');
</#if>
<#if dataview.getOpenMode() == 'POPUPMODAL'>
let modalSubject = this.$modal({
componentName: 'view-${dataview.getCodeName()?lower_case}',
viewdata:JSON.stringify({ srfkey: params.srfkey })
}).show();
modalSubject.subscribe((res: any) => {
if (res) {
const _this: any = this;
if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(res);
}
if (_this.engine) {
_this.engine.doSysUIAction('Refresh');
}
return Promise.resolve(res);
}
});
</#if>
<#if dataview.getOpenMode() == 'POPUPAPP'>
console.log('POPUPAPP弹出,暂时不实现,移动端暂时只支持路由跳转和模态方式弹出');
</#if>
<#if dataview.getOpenMode()?index_of('DRAWER') == 0>
console.log('DRAWER弹出,暂时不实现,移动端暂时只支持路由跳转和模态方式弹出');
</#if>
<#if dataview.getOpenMode() == 'POPOVER'>
console.log('POPOVER模式弹出,暂时不实现,移动端暂时只支持路由跳转和模态方式弹出');
</#if>
<#if dataview.getOpenMode()?index_of('USER') == 0>
console.log('${dataview.getOpenMode()}用户自定义');
</#if>
</#if>
}
</#if>
\ No newline at end of file
LOGICTYPE=APP_NEWDATA
\ No newline at end of file
<#if item.getPSViewLogic?? && item.getPSViewLogic()??>
<#assign viewlogic = item.getPSViewLogic()/>
/**
* 打开编辑数据视图
*
* @param {*} [params={}]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.name}(params: any = {}) {
<#if viewlogic.getOpenDataPSAppView()??>
<#assign dataview = viewlogic.getOpenDataPSAppView()/>
<#if dataview.isRedirectView()>
<#if dataview.getViewType()?? && dataview.getViewType()=='DEMOBREDIRECTVIEW'>
const url: string = '${app.getPKGCodeName()?lower_case}/ibizutil/worklist/redirectview/getmodel';
const get: Promise<any> = this.$http.get(url, { srfkey: params.taskid });
<#else>
const url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${dataview.getPSDEViewCodeName()?lower_case}/getmodel';
const get: Promise<any> = this.$http.get(url, { srfkey: params.srfkey });
</#if>
get.then((response: any) => {
if (!response || response.status !== 200) {
this.$notify({ type: 'danger', message: '错误,' + response.data.info });
}
const data = response.data;
if (Object.keys(data).length === 0) {
return;
}
if (Object.is(data.openmode, 'POPUPMODAL')) {
if (data.viewname) {
const viewname = 'view-'+data.viewname.toLowerCase();
let modalSubject = this.$modal({
componentName: viewname,
viewdata:JSON.stringify({ srfkey: params.srfkey })
}).show();
modalSubject.subscribe((res: any) => {
if (res) {
return Promise.resolve(res);
}
});
} else {
console.log("选择视图未配置");
}
} else {
const tatget = data.viewmodule.toLowerCase() + '_' + data.viewname.toLowerCase();
<#if dataview.getViewType()?? && dataview.getViewType()=='DEMOBREDIRECTVIEW'>
this.$router.push({ name: tatget, query: {srfkey:params.srfkey,taskid:params.taskid} });
<#else>
this.$router.push({ name: tatget, query: {srfkey:params.srfkey} });
</#if>
}
}).catch((error: any) => {
this.$notify({ type: 'danger', message: '错误,' + error.info });
});
<#elseif dataview.getOpenMode() =='INDEXVIEWTAB' || dataview.getOpenMode() == ''>
this.$router.push({ name: '${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}', query: {srfkey:params.srfkey}});
<#elseif dataview.getOpenMode() =='POPUP'>
console.log('POPUP非模式弹出,暂时不实现');
<#elseif dataview.getOpenMode() =='POPUPMODAL'>
let modalSubject = this.$modal({
componentName: 'view-${dataview.getCodeName()?lower_case}',
viewdata:JSON.stringify({ srfkey: params.srfkey })
}).show();
modalSubject.subscribe((res: any) => {
if (res) {
const _this: any = this;
if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(res);
}
if (_this.engine) {
_this.engine.doSysUIAction('Refresh');
}
return Promise.resolve(res);
}
});
<#elseif dataview.getOpenMode() =='POPUPAPP'>
console.log('POPUPAPP弹出,暂时不实现');
<#elseif dataview.getOpenMode()?index_of('DRAWER') == 0>
console.log('DRAWER模式弹出,暂时不实现');
<#elseif dataview.getOpenMode() == 'POPOVER'>
console.log('DRAWER模式弹出,暂时不实现');
<#elseif dataview.getOpenMode()?index_of('USER') == 0>
console.log('${dataview.getOpenMode()}用户自定义');
</#if>
</#if>
}
</#if>
\ No newline at end of file
LOGICTYPE=APP_OPENDATA
\ No newline at end of file
/**
* 部件逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.name}(params: any = {}, tag?: any, $event?: any) {
<#if item.getEventArg()?? && item.getEventArg()?length gt 0>
// 参数
</#if>
<#if item.getLogicType() == 'APPVIEWUIACTION' && item.getPSAppViewUIAction()??>
<#assign uiAction = item.getPSAppViewUIAction().getPSUIAction() />
// 取数
let datas: any[] = [];
const paramJO = <#if uiAction.getUIActionParamJO()??>${uiAction.getUIActionParamJO().toString()}<#else>{}</#if>;
<#if item.getPSAppViewUIAction().getXDataPSControl?? && item.getPSAppViewUIAction().getXDataPSControl()??>
<#assign xData = item.getPSAppViewUIAction().getXDataPSControl()/>
<#if xData != item.getPSAppViewUIAction().getPSControlContainer()>
const component: any = this.$refs.${xData.name?lower_case};
datas = [...component.getDatas()];
<#else>
datas = [...this.getDatas()];
</#if>
</#if>
// 界面行为
<#if item.getPSAppViewUIAction().getPSUIAction()??>
<#assign uiaction = item.getPSAppViewUIAction().getPSUIAction()/>
this.${uiaction.getFullCodeName()}(datas, paramJO, $event);
</#if>
</#if>
}
\ No newline at end of file
LOGICTYPE=APPVIEWUIACTION
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_TEMPLATE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_DEFAULT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTAINER.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_STYLE.vue.ftl
</#ibizinclude>
\ No newline at end of file
<script lang="ts">
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
<#if self_header??>
${self_header}
<#else>
${default_header}
</#if>
@Component({
components: {
<@ibizindent blank=8>
<#if self_components??>
${self_components}
<#else>
${components}
</#if>
</@ibizindent>
},
<@ibizindent blank=8>
<#if other_config??>
${other_config}
</#if>
</@ibizindent>
})
export default class ${srfclassname('${view.name}')}Base extends Vue {
<@ibizindent blank=0>
<#if default_content??>
${default_content}
</#if>
<#if self_content??>
${self_content}
</#if>
</@ibizindent>
}
</script>
\ No newline at end of file
<!-- <template>
//this is html
</template> -->
<#assign default_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
import { Environment } from '@/environments/environment';
import ${srfclassname('${view.name}')}Base from './${srffilepath2('${view.getCodeName()}')}-base.vue';
<#if view.getPSAppViewEngines()??>
<#list view.getPSAppViewEngines() as engine>
import ${engine.getEngineType()}Engine from '@/assets/${engine.getEngineCat()?lower_case}/${srffilepath2(engine.getEngineType())}-engine';
</#list>
</#if>
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != 'TOOLBAR' && ctrl.getControlType() != 'CONTEXTMENU'>
<#if ctrl.getPSDataEntity?? && ctrl.getPSDataEntity()??>
import view_${ctrl.getName()} from '@/widget/${srffilepath2(ctrl.getPSDataEntity().getCodeName())}/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}.vue';
<#else>
import view_${ctrl.getName()} from '@/widget/app/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
</#assign>
<#-- 关联组件start -->
<#assign components>
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != "TOOLBAR" && ctrl.getControlType() != 'CONTEXTMENU'>
view_${ctrl.getName()},
</#if>
</#list>
</#if>
</#assign>
<script lang="ts">
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
<#if self_header??>
${self_header}
<#else>
${default_header}
</#if>
@Component({
components: {
<@ibizindent blank=8>
<#if self_components??>
${self_components}
<#else>
${components}
</#if>
</@ibizindent>
}
})
export default class ${srfclassname('${view.name}')} extends ${srfclassname('${view.name}')}Base {
}
</script>
<style lang="less">
// this is less
</style>
\ No newline at end of file
<#assign default_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
import { Environment } from '@/environments/environment';
<#if view.getPSAppViewEngines()??>
<#list view.getPSAppViewEngines() as engine>
import ${engine.getEngineType()}Engine from '@/assets/${engine.getEngineCat()?lower_case}/${srffilepath2(engine.getEngineType())}-engine';
</#list>
</#if>
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != 'TOOLBAR' && ctrl.getControlType() != 'CONTEXTMENU'>
<#if ctrl.getPSDataEntity?? && ctrl.getPSDataEntity()??>
import view_${ctrl.getName()} from '@/widget/${srffilepath2(ctrl.getPSDataEntity().getCodeName())}/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}.vue';
<#else>
import view_${ctrl.getName()} from '@/widget/app/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
</#assign>
<#-- 关联组件start -->
<#assign components>
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != "TOOLBAR" && ctrl.getControlType() != 'CONTEXTMENU'>
view_${ctrl.getName()},
</#if>
</#list>
</#if>
</#assign>
<#-- 关联组件end -->
<#-- 默认内容start -->
<#assign default_content>
/**
* 数据视图
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() public viewdata!: string;
/**
* 是否是嵌入分页导航视图,默认为false
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop({default:false}) public isTabExp?:boolean;
/**
* 是否为内敛试图
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() public isembeddedView?: boolean;
/**
* 是否为模态模式
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() public isModalMode?: string;
/**
* 处理值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof ${srfclassname('${view.name}')}
*/
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
_this.engine.setViewData(newVal);
_this.engine.load();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof ${srfclassname('${view.name}')}
*/
public containerModel: any = {
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
view_${ctrl.name}: { name: '${ctrl.name}', type: '${ctrl.getControlType()}' },
</#list>
</#if>
<#if view.isPickupView()>
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
</#if>
};
/**
* 视图状态订阅对象
*
* @private
* @type {Subject<{action: string, data: any}>}
* @memberof ${srfclassname('${view.name}')}
*/
public viewState: Subject<ViewState> = new Subject();
<#if view.getPSAppViewEngines()??>
<#list view.getPSAppViewEngines() as engine>
/**
* 视图引擎
*
* @private
* @type {Engine}
* @memberof ${srfclassname('${view.name}')}
*/
private ${engine.getName()?lower_case}: ${engine.getEngineType()}Engine = new ${engine.getEngineType()}Engine();
</#list>
</#if>
/**
* 引擎初始化
*
* @private
* @memberof ${srfclassname('${view.name}')}
*/
private engineInit(): void {
<#if view.getPSAppViewEngines()??>
<#list view.getPSAppViewEngines() as engine>
this.${engine.getName()?lower_case}.init({
view: this,
<#if engine.getPSAppViewEngineParams()??>
<#list engine.getPSAppViewEngineParams() as param>
<#if param.getParamType() == "LOGIC" && param.getPSAppViewLogic()??>
${param.getName()?lower_case}: (params: any) => {
this.${param.getPSAppViewLogic().getName()}(params);
},
</#if>
<#if param.getParamType() == "CTRL" && param.getPSControl()??>
${param.getName()?lower_case}: this.$refs.${param.getPSControl().getName()},
</#if>
<#if param.getParamType() == "VALUE" && param.getValue()??>
${param.getName()?lower_case}: '${param.getValue()?c}',
</#if>
</#list>
</#if>
});
</#list>
</#if>
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof ${srfclassname('${view.name}')}
*/
public mounted() {
this.handleMounted();
}
/**
* 组件初始化完毕后处理逻辑
*
* @memberof ${srfclassname('${view.name}')}
*/
public handleMounted(){
<#if view.getPSAppViewEngines()??>
this.engineInit();
</#if>
<#if mounted_block??>${mounted_block}</#if>
}
<#if view.getPSUIActions()??>
<#list view.getPSUIActions() as uiAction>
${P.getLogicCode(uiAction, "LOGIC.vue").code}
</#list>
</#if>
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType()??>
<#if ctrl.getHookEventNames()??>
<#list ctrl.getHookEventNames() as eventName>
/**
* ${ctrl.name} 部件 ${eventName?lower_case} 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof TestEntityEditView
*/
public ${ctrl.name}_${eventName?lower_case}($event: any, $event2?: any) {
<#if ctrl.getPSControlLogics(eventName)??>
<#list ctrl.getPSControlLogics(eventName) as ctrlLogic>
<#if ctrlLogic.getLogicType() == "APPVIEWENGINE" && ctrlLogic.getPSAppViewEngine()??>
this.${ctrlLogic.getPSAppViewEngine().getName()}.onCtrlEvent('${ctrl.name}', '${eventName?lower_case}', $event);
<#else>
<#if ctrlLogic.getEventArg()?? && ctrlLogic.getEventArg()?length gt 0>
if (Object.is($event.tag, '${ctrlLogic.getEventArg()}')) {
this.${ctrlLogic.name}($event, '', $event2);
}
<#else>
this.${ctrlLogic.name}($event, '', $event2);
</#if>
</#if>
</#list>
</#if>
}
</#list>
</#if>
</#if>
</#list>
</#if>
<#if view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getLogicTrigger() == "CUSTOM" || logic.getLogicTrigger() == "CTRLEVENT">
${P.getLogicCode(logic, "LOGIC.vue").code}
</#if>
</#list>
</#if>
<#if view.hasPSControl('lefttoolbar')>
<#assign lefttoolbar = view.getPSControl('lefttoolbar')>
<#if lefttoolbar.getPSDEToolbarItems()??>
<#list lefttoolbar.getPSDEToolbarItems() as toolbarItem>
<#if toolbarItem.getItemType() == "ITEMS">
<#if toolbarItem.getPSDEToolbarItems()??>
/**
* 打开${lefttoolbar.getName()}的ActionSheet
*
* @memberof ${srfclassname('${view.name}')}
*/
public ${lefttoolbar.getName()}_openActionSheet(){
let toolBarArray:Array<any> =[];
<#list toolbarItem.getPSDEToolbarItems() as deuiactionItem>
toolBarArray.push({'name':'${deuiactionItem.getCaption()}','tag':'${deuiactionItem.getName()}'})
</#list>
let subject = this.$actionSheet({actions:toolBarArray}).show();
subject.subscribe((res:any) =>{
if(res.tag){
this.${lefttoolbar.getName()}_click(res);
}
})
}
</#if>
</#if>
</#list>
</#if>
</#if>
<#if view.hasPSControl('righttoolbar')>
<#assign righttoolbar = view.getPSControl('righttoolbar')>
<#if righttoolbar.getPSDEToolbarItems()??>
<#list righttoolbar.getPSDEToolbarItems() as toolbarItem>
<#if toolbarItem.getItemType() == "ITEMS">
<#if toolbarItem.getPSDEToolbarItems()??>
/**
* 打开${righttoolbar.getName()}的ActionSheet
*
* @memberof ${srfclassname('${view.name}')}
*/
public ${righttoolbar.getName()}_openActionSheet(){
let toolBarArray:Array<any> =[];
<#list toolbarItem.getPSDEToolbarItems() as deuiactionItem>
toolBarArray.push({'name':'${deuiactionItem.getCaption()}','tag':'${deuiactionItem.getName()}'})
</#list>
let subject = this.$actionSheet({actions:toolBarArray}).show();
subject.subscribe((res:any) =>{
if(res.tag){
this.${righttoolbar.getName()}_click(res);
}
})
}
</#if>
</#if>
</#list>
</#if>
</#if>
</#assign>
\ No newline at end of file
<style lang="less">
${P.getLayoutCode('VIEW.less').code}
</style>
\ No newline at end of file
<template>
<@ibizindent blank=4>
${P.getLayoutCode('VIEW.vue').code}
</@ibizindent>
</template>
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBTABEXPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBLISTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign mounted_block>
<#if view.hasPSControl('wizardpanel')>
<#assign wizardpanel = view.getPSControl('wizardpanel')>
if(this.viewdata){
Object.assign(this.viewdata,{srforikey:this.$route.query.srfkey});
}
this.viewState.next({tag:'wizardpanel', action:'load', data:this.viewdata?JSON.parse(this.viewdata):{}});
</#if>
</#assign>
<#assign self_content>
/**
* 向导结束
*
* @memberof ${srfclassname('${view.name}')}
*/
public finish($event:any){
if(this.isModalMode){
}else{
this.close();
}
}
/**
* 向导开始
*
* @memberof ${srfclassname('${view.name}')}
*/
public init($event:any){
console.log('向导开始');
}
/**
* 返回
*/
public close(){
this.$router.go(-1);
}
</#assign>
VIEWTYPE=APPDEMOBWIZARDVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 搜索值
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
public query: string = '';
/**
* 快速搜索加载列表
*
* @memberof ${srfclassname('${view.name}')}
*/
public search() {
this.viewState.next({
tag: "mdctrl",
action: "quicksearch",
data: this.query
});
}
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBCHARTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
/**
* 打开ActionSheet
*
* @memberof ${srfclassname('${view.name}')}
*/
public openActionSheet(){
let toolBarArray:Array<any> = [];
<#if view.hasPSControl('righttoolbar')>
<#assign righttoolbar = view.getPSControl('righttoolbar')>
<#list righttoolbar.getPSDEToolbarItems() as deuiactionItem>
<#if deuiactionItem.getItemType() == 'DEUIACTION'>
toolBarArray.push({ 'name': '${deuiactionItem.getCaption()}',tag:'${deuiactionItem.getName()}'});
<#elseif deuiactionItem.getItemType() == 'ITEMS'>
<#list deuiactionItem.getPSDEToolbarItems() as moreItem>
toolBarArray.push({ 'name': '${moreItem.getCaption()}',tag:'${moreItem.getName()}'});
</#list>
</#if>
</#list>
</#if>
toolBarArray.push({ 'name': '返回',tag:'close'});
let subject = this.$actionSheet({actions:toolBarArray}).show();
subject.subscribe((res:any) =>{
<#if view.hasPSControl('righttoolbar')>
if(res.tag!='close'){
this.righttoolbar_click(res);
}
</#if>
if(res.tag=='close'){
this.close();
}
})
}
</#assign>
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 搜索值
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
public query: string = '';
/**
* 快速搜索加载列表
*
* @memberof ${srfclassname('${view.name}')}
*/
public search() {
this.viewState.next({
tag: "mdctrl",
action: "quicksearch",
data: this.query
});
}
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBMDVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 搜索值
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
public query: string = '';
/**
* 是否展开搜索表单
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}
*/
public isExpandSearchForm: boolean = ${view.isExpandSearchForm()?c};
/**
* 快速搜索
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}
*/
public onQuickSearchValueChange($event:any){
}
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
/**
* 打开ActionSheet
*
* @memberof ${srfclassname('${view.name}')}
*/
public openActionSheet(){
let toolBarArray:Array<any> = [];
<#if view.hasPSControl('righttoolbar')>
<#assign righttoolbar = view.getPSControl('righttoolbar')>
<#list righttoolbar.getPSDEToolbarItems() as deuiactionItem>
<#if deuiactionItem.getItemType() == 'DEUIACTION'>
toolBarArray.push({ 'name': '${deuiactionItem.getCaption()}',tag:'${deuiactionItem.getName()}'});
<#elseif deuiactionItem.getItemType() == 'ITEMS'>
<#list deuiactionItem.getPSDEToolbarItems() as moreItem>
toolBarArray.push({ 'name': '${moreItem.getCaption()}',tag:'${moreItem.getName()}'});
</#list>
</#if>
</#list>
</#if>
toolBarArray.push({ 'name': '返回',tag:'close'});
let subject = this.$actionSheet({actions:toolBarArray}).show();
subject.subscribe((res:any) =>{
<#if view.hasPSControl('righttoolbar')>
if(res.tag!='close'){
this.righttoolbar_click(res);
}
</#if>
if(res.tag=='close'){
this.close();
}
})
}
</#assign>
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 数据选择视图选中项
*
* @type {any}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() public selectedData?:any;
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
/**
* 确认按钮
*
* @memberof ${srfclassname('${view.name}')}
*/
public confirm(){
this.$emit('viewdataschange',{action:'selectionChange',data:this.containerModel.view_pickupviewpanel.selections});
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBMPICKUPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 是否多选
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() public isMutli!:boolean;
/**
* 数据选择视图选中项
*
* @type {any}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() public selectedData?:any;
/**
* 搜索值
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
public query: string = '';
/**
* 快速搜索加载列表
*
* @memberof ${srfclassname('${view.name}')}
*/
public search() {
this.viewState.next({
tag: "mdctrl",
action: "quicksearch",
data: this.query
});
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBPICKUPMDVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 界面关系通讯对象
*
* @type {Subject<ViewState>}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() public formDruipart!: Subject<ViewState>;
/**
* 生命周期created
* @memberof ${srfclassname('${view.name}')}
*/
public created(){
if(this.formDruipart){
this.formDruipart.subscribe((res) =>{
if(Object.is(res.action,'save')){
let opt ={data:res.data};
Object.assign(opt,JSON.parse(this.viewdata));
this.viewState.next({ tag:'meditviewpanel', action: 'save', data: opt })
}
});
}
}
</#assign>
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 提交工作流
*
* @memberof ${srfclassname('${view.name}')}
*/
public onOk(){
const form:any = this.$refs.form;
if(!form){
return;
}
if(!form || !(form.save instanceof Function)){
return;
}
const _this: any = this;
const _data = { srfparentdata: _this.srfparentdata };
form.save(_data).then((response:any)=>{
if(!response){
return;
}
form.startWorkFlow(response).then((response:any)=>{
if(!response){
return;
}
this.close();
}).catch((response:any)=>{
this.$notify({type:'danger',message:"开始流程异常!!!"});
})
})
}
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBWFSTARTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 搜索值
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
public query: string = '';
/**
* 快速搜索加载列表
*
* @memberof ${srfclassname('${view.name}')}
*/
public search() {
this.viewState.next({
tag: "mdctrl",
action: "quicksearch",
data: this.query
});
}
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBWFMDVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
/**
* 视图抛出值变化事件
*
* @public
* @memberof WorkFlowMobWFActionView
*/
public viewDataChanges($event:any){
this.$emit('viewdataschange',$event);
}
/**
* 确定
*
* @public
* @memberof ${srfclassname('${view.name}')}
*/
public onOk($event:any){
this.viewState.next({ tag:'form', action: 'save', data:this.viewdata });
// let _this:any = this;
// let stepPromise = this.wf_Step(_this.engine.viewdata.item,$event,(this.$refs.form as any).data);
// if(stepPromise){
// stepPromise.then((res:any) =>{
// if(!res){
// this.$notify({ type: 'danger', message: _this.engine.viewdata.item.name+'失败'});
// return;
// }
// this.$notify({ type: 'success', message: _this.engine.viewdata.item.name+'成功'});
// this.close();
// }).catch((error:any) =>{
// this.$notify({ type: 'danger', message: _this.engine.viewdata.item.name+'失败'});
// })
// }else{
// this.$notify({ type: 'danger', message: '请求失败了'});
// }
}
/**
* 工作流步骤
*
* @private
* @param {*} item
* @param {*} $event
* @param {*} [data]
* @returns {Promise<any>}
* @memberof ${srfclassname('${view.name}')}
*/
private async wf_Step(item: any, $event: any, data?: any): Promise<any> {
let _this:any = this;
const arg: any = { args: {} };
if (data) {
Object.assign(arg, data);
}
if (_this.engine && _this.engine.viewdata && _this.engine.viewdata.srfkey) {
Object.assign(arg, { srfkey: _this.engine.viewdata.srfkey });
}
if (!arg.srfkey || Object.is(arg.srfkey, '')) {
return;
}
Object.assign(arg, { link: item.id });
if (!arg.link || Object.is(arg.link, '')) {
return;
}
const url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/wflink';
const post: Promise<any> = this.$http.post(url, arg);
return post;
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBWFACTIONVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* Api地址
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
public url: string = '${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/';
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
/**
* 加载审批按钮
*
* @memberof ${srfclassname('${view.name}')}
*/
public loadActionBtns(){
const arg:any = {};
if(this.engine.viewdata && this.engine.viewdata.srfkey){
Object.assign(arg,{srfkey:this.engine.viewdata.srfkey});
}
if(this.engine.viewdata && this.engine.viewdata.taskid){
Object.assign(arg,{taskid:this.engine.viewdata.taskid});
}
this.$http.post(this.url+'wflinks',arg).then((response:any)=>{
if(!response.status || response.status!=200){
return;
}
this.$set(this.containerModel,'wflinks',response.data);
}).catch((response:any)=>{
this.$notify({ type: 'danger', message: response.data.message});
})
}
/**
* 工作流步骤
*
* @memberof ${srfclassname('${view.name}')}
*/
public wf_step(item:any){
const arg:any = {};
if(this.$refs.form){
Object.assign(arg,{args:(this.$refs.form as any).data});
}
if(this.engine.viewdata && this.engine.viewdata.srfkey){
Object.assign(arg,{srfkey:this.engine.viewdata.srfkey});
}
if(this.engine.viewdata && this.engine.viewdata.taskid){
Object.assign(arg,{taskid:this.engine.viewdata.taskid});
}
Object.assign(arg,{link:item.id});
const form = this.$refs.form;
(form as any).save().then((res:any)=>{
this.$http.post(this.url+'wflink',arg).then((response:any)=>{
if(response.data.ret == 0){
this.$notify({ type: 'primary', message: item.name+'操作成功'});
this.close();
}
}).catch((error:any)=>{
this.$notify({ type: 'primary', message: item.name+'操作失败'});
})
}).catch((error:any)=>{
this.$notify({ type: 'danger', message: '错误,' + error.data.message });
})
}
</#assign>
<#assign mounted_block>
this.loadActionBtns();
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBWFEDITVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 数据选择视图选中项
*
* @type {any}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() public selectedData?:any;
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
/**
* 确认按钮
*
* @memberof ${srfclassname('${view.name}')}
*/
public confirm(){
this.$emit('viewdataschange',{action:'selectionChange',data:this.containerModel.view_pickupviewpanel.selections});
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBPICKUPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBREDIRECTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 是否多选
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop() public isMutli!:boolean;
/**
* 值改变事件
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}
*/
public valuechange($event:any) {
this.$emit('viewdataschange',$event);
}
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
this.$router.go(-1);
}
/**
* 打开ActionSheet
*
* @memberof ${srfclassname('${view.name}')}
*/
public openActionSheet(){
let toolBarArray:Array<any> = [];
<#if view.hasPSControl('righttoolbar')>
<#assign righttoolbar = view.getPSControl('righttoolbar')>
<#list righttoolbar.getPSDEToolbarItems() as deuiactionItem>
<#if deuiactionItem.getItemType() == 'DEUIACTION'>
toolBarArray.push({ 'name': '${deuiactionItem.getCaption()}',tag:'${deuiactionItem.getName()}'});
<#elseif deuiactionItem.getItemType() == 'ITEMS'>
<#list deuiactionItem.getPSDEToolbarItems() as moreItem>
toolBarArray.push({ 'name': '${moreItem.getCaption()}',tag:'${moreItem.getName()}'});
</#list>
</#if>
</#list>
</#if>
toolBarArray.push({ 'name': '返回',tag:'close'});
let subject = this.$actionSheet({actions:toolBarArray}).show();
subject.subscribe((res:any) =>{
<#if view.hasPSControl('righttoolbar')>
if(res.tag!='close'){
this.righttoolbar_click(res);
}
</#if>
if(res.tag=='close'){
this.close();
}
})
}
</#assign>
<#assign mounted_block>
<#if view.getPSControls()??>
<#assign allctrl = view.getPSControls()>
<#list allctrl as ctrl>
this.viewState.next({tag: '${ctrl.name?lower_case}', action: 'load', data: {}});
</#list>
</#if>
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBCALENDARVIEW9
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
<#assign mounted_block>
<#if view.getPSControls()??>
<#assign allctrl = view.getPSControls()>
<#list allctrl as ctrl>
this.viewState.next({tag: '${ctrl.name?lower_case}', action: 'load', data: {}});
</#list>
</#if>
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBCALENDARVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
<#assign mounted_block>
this.viewState.next({tag:'treeexpbar',action:'load'});
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBTREEEXPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBTREEVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* meditview9状态下发变量
*
* @memberof IBZSAM02MobEditView
*/
@Prop() public panelState ?:Subject<ViewState>;
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close(args?:any) {
if(this.isModalMode){
this.$emit('close',{action:'close',data:args});
}else{
this.$router.go(-1);
}
}
/**
* 打开ActionSheet
*
* @memberof ${srfclassname('${view.name}')}
*/
public openActionSheet(){
let toolBarArray:Array<any> = [];
<#if view.hasPSControl('righttoolbar')>
<#assign righttoolbar = view.getPSControl('righttoolbar')>
<#list righttoolbar.getPSDEToolbarItems() as deuiactionItem>
<#if deuiactionItem.getItemType() == 'DEUIACTION'>
toolBarArray.push({ 'name': '${deuiactionItem.getCaption()}',tag:'${deuiactionItem.getName()}'});
<#elseif deuiactionItem.getItemType() == 'ITEMS'>
<#list deuiactionItem.getPSDEToolbarItems() as moreItem>
toolBarArray.push({ 'name': '${moreItem.getCaption()}',tag:'${moreItem.getName()}'});
</#list>
</#if>
</#list>
</#if>
toolBarArray.push({ 'name': '返回',tag:'close'});
let subject = this.$actionSheet({actions:toolBarArray}).show();
subject.subscribe((res:any) =>{
<#if view.hasPSControl('righttoolbar')>
if(res.tag!='close'){
this.righttoolbar_click(res);
}
</#if>
if(res.tag=='close'){
this.close();
}
})
}
</#assign>
<#assign mounted_block>
if(this.panelState){
this.panelState.subscribe((res:any) =>{
if(Object.is(res.tag,'meditviewpanel')){
if(Object.is(res.action,'save')){
this.viewState.next({ tag:'form', action: 'save', data:res.data});
}
if(Object.is(res.action,'remove')){
this.viewState.next({ tag:'form', action: 'remove', data:res.data });
}
}
});
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBEDITVIEW9
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* meditview9状态下发变量
*
* @memberof IBZSAM02MobEditView
*/
@Prop() public panelState ?:Subject<ViewState>;
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close(args?:any) {
if(this.isModalMode){
this.$emit('close',{action:'close',data:args});
}else{
this.$router.go(-1);
}
}
</#assign>
<#assign mounted_block>
if(this.panelState){
this.panelState.subscribe((res:any) =>{
if(Object.is(res.tag,'meditviewpanel')){
if(Object.is(res.action,'save')){
this.viewState.next({ tag:'form', action: 'save', data:res.data});
}
if(Object.is(res.action,'remove')){
this.viewState.next({ tag:'form', action: 'remove', data:res.data });
}
}
});
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBEDITVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 当前显示分页
*
* @type String
* @memberof ${srfclassname('${view.name}')}
*/
public activeName:String = "default";
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBEDITVIEW3
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBCUSTOMVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 数据选择视图选中项
*
* @type {any}
* @memberof ${srfclassname('${view.codeName}')}
*/
@Prop() public selectedData?:any;
/**
* 确认点击保存事件
*
* @memberof ${srfclassname('${view.name}')}
*/
public confirm() {
this.viewState.next({ tag: "tree", action: "save", data: this.viewdata });
}
/**
* 树部件回传信息
*
* @memberof ${srfclassname('${view.name}')}
*/
public change(data:any) {
this.$emit('viewdataschange',{data:data});
this.close();
}
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBPICKUPTREEVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 确认点击保存事件
*
* @memberof ${srfclassname('${view.name}')}
*/
public save() {
this.viewState.next({ tag: "form", action: "save", data: this.viewdata });
this.close();
}
/**
* 返回上一级
*
* @memberof ${srfclassname('${view.name}')}
*/
public close() {
if(this.isModalMode){
this.$emit('close',{});
}else{
this.$router.go(-1);
}
}
</#assign>
VIEWTYPE=APPDEMOBOPTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBPANELVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
</#assign>
\ No newline at end of file
VIEWTYPE=APPDEMOBPANELVIEW9
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
</#assign>
\ No newline at end of file
VIEWTYPE=APPFUNCPICKUPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 倒数秒数
*
* @type number
* @memberof ${srfclassname('${view.name}')}
*/
public seconds:number = 5;
/**
* 倒数计时
*
* @memberof ${srfclassname('${view.name}')}
*/
public countdown() {
let time = window.setInterval( () => {
if (this.seconds === 0) {
this.toPage();
window.clearInterval(time)
} else {
this.seconds -= 1;
}
}, 1000);
}
/**
* 页面跳转
*
* @memberof ${srfclassname('${view.name}')}
*/
public toPage() {
if (window.localStorage.getItem('srfloginkey') && window.localStorage.getItem('userInfo') ){
this.$router.push('/');
} else {
this.$router.push({ name: 'login'});
}
}
</#assign>
<#assign mounted_block>
this.countdown();
</#assign>
\ No newline at end of file
VIEWTYPE=APPSTARTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
</#assign>
\ No newline at end of file
VIEWTYPE=APPWFSTEPDATAVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
</#assign>
\ No newline at end of file
VIEWTYPE=APPWFSTEPTRACEVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_content>
/**
* 用户名
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
public username: string = "";
/**
* 密码
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
public password: string = "";
/**
* 登录
*
* @memberof ${srfclassname('${view.name}')}
*/
public login(){
let loginUrl;
if(Object.is(Environment.LoginModel,'default')){
loginUrl = Environment.RemoteLogin;
}else{
loginUrl = Environment.AppLogin;
}
this.$http.post(loginUrl, { loginname: this.username, password: this.password }).then((response:any) =>{
if (response) {
if(window.localStorage.getItem('srfloginkey')){
window.localStorage.removeItem('srfloginkey');
}
if(window.localStorage.getItem('userInfo')){
window.localStorage.removeItem('userInfo');
}
//默认登陆方式
if(Object.is(Environment.LoginModel,'default')){
//远程登录
window.localStorage.setItem('srfloginkey', response.loginkey);
}else{
//session登录方式
window.localStorage.setItem('srfloginkey', response.data.token);
}
window.localStorage.setItem('userInfo', JSON.stringify(response.data.user));
if(window.location.hash.indexOf('redirect=') !== -1){
let urlIndex= window.location.hash.indexOf('redirect=') + 9;
this.$router.push(''+decodeURIComponent(window.location.hash.substring(urlIndex)));
}else{
this.$router.push('/');
}
} else {
this.$notify({ type: 'danger', message: '登录失败' });
}
}).catch((error:any) =>{
this.$notify({ type: 'danger', message: '登录失败' });
});
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPLOGINVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign self_header>
import { Subject } from 'rxjs';
import '@/assets/interface/viewState';
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != 'TOOLBAR' && ctrl.getControlType() != 'CONTEXTMENU'>
<#if ctrl.getPSDataEntity?? && ctrl.getPSDataEntity()??>
import view_${ctrl.getName()} from '@/widget/${srffilepath2(ctrl.getPSDataEntity().getCodeName())}/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}.vue';
<#else>
import view_${ctrl.getName()} from '@/widget/app/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
</#assign>
<#-- 关联组件start -->
<#assign self_components>
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != "TOOLBAR" && ctrl.getControlType() != 'CONTEXTMENU'>
view_${ctrl.getName()},
</#if>
</#list>
</#if>
</#assign>
<#assign mounted_block>
<#if view.getPSControls()??>
<#assign allctrl = view.getPSControls()>
<#list allctrl as dashboard>
<#if dashboard.getControlType() == "DASHBOARD">
this.viewState.next({tag: '${dashboard.name?lower_case}', action: 'load', data: {}});
</#if>
</#list>
</#if>
</#assign>
<#assign self_content>
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() == 'TITLEBAR'>
/**
* 应用功能集合
*
* @type {any[]}
* @memberof ${srfclassname('${view.codeName}')}
*/
public appFuncs: any[] = [
<#if ctrl.getLeftPSAppMenu()??>
<#assign leftMenu=ctrl.getLeftPSAppMenu()/>
<#list leftMenu.getPSAppFuncs() as appFuncs>
{
appfunctag: '${appFuncs.getCodeName()}',
appfuncyype: '${appFuncs.getAppFuncType()}',
<#if appFuncs.getAppFuncType() == 'APPVIEW'>
<#assign appview = appFuncs.getPSAppView()/>
pathname: '${appview.getPSAppModule().getCodeName()?lower_case}_${appview.getCodeName()?lower_case}',
</#if>
},
</#list>
</#if>
<#if ctrl.getRightPSAppMenu()??>
<#assign rightMenu=ctrl.getRightPSAppMenu()/>
<#list rightMenu.getPSAppFuncs() as appFuncs>
{
appfunctag: '${appFuncs.getCodeName()}',
appfuncyype: '${appFuncs.getAppFuncType()}',
<#if appFuncs.getAppFuncType() == 'APPVIEW'>
<#assign appview = appFuncs.getPSAppView()/>
pathname: '${appview.getPSAppModule().getCodeName()?lower_case}_${appview.getCodeName()?lower_case}',
</#if>
},
</#list>
</#if>
];
/**
* 应用功能集合
*
* @memberof ${srfclassname('${view.codeName}')}
*/
public titleBarClick(value:any){
if(value){
if(this.appFuncs.length >0){
let curSelectObj=this.appFuncs.filter((func:any) =>{
return func.appfunctag === value;
})
if(curSelectObj && curSelectObj.length >0 && curSelectObj[0].pathname){
this.$router.push({name:curSelectObj[0].pathname});
}
}
}
}
</#if>
</#list>
</#if>
</#assign>
\ No newline at end of file
VIEWTYPE=APPPORTALVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW_CUSTOM.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./VIEW_CONTENT.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#assign mounted_block>
this.viewState.next({tag: 'appmenu', action: 'load', data: {}});
</#assign>
<#assign other_config>
beforeRouteUpdate(to, from, next) {
this.$store.commit('setIndexSelected', to.meta.routetag);
(this.$refs.appmenu as any).currentSelected = to.meta.routetag;
next();
}
</#assign>
\ No newline at end of file
VIEWTYPE=APPINDEXVIEW
\ No newline at end of file
<#ibiztemplate>
PUBOBJ=Vue2.PSVue2AppCreateAppBat
TARGET=PSSYSAPP
</#ibiztemplate>
#!/bin/bash
cd app_${app.getPKGCodeName()}
yarn
yarn build
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
export const Environment = {
// 原型示例数模式
SampleMode: false,
// 应用名称
AppName: '${app.getPKGCodeName()}',
// 应用 title
AppTitle: '${app.getName()}',
// 应用基础路径
BaseUrl: '../',
// 系统名称
SysName: '${sys.getCodeName()}',
// 远程登录地址
RemoteLogin: 'api/login',
// session登录地址
AppLogin: 'ibizutil/login',
// 文件导出
ExportFile: 'ibizutil/download',
// 文件上传
UploadFile: 'ibizutil/upload',
//登录模式(默认远程登录/session/uac)
LoginModel: 'session'
};
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
export const PageComponents = {
install(v: any, opt: any) {
<#if app.getAllPSAppViews()??>
<#assign allPsAppViews = app.getAllPSAppViews()>
<#list allPsAppViews as refview>
v.component('view-${srfclassname('${refview.getCodeName()}')?lower_case}', () => import ('@/pages/${refview.getPSAppModule().getCodeName()?lower_case}/${srffilepath2('${refview.getCodeName()}')}/${srffilepath2('${refview.getCodeName()}')}.vue'));
</#list>
</#if>
}
};
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEW
TEMPLFILE=VIEWBASE.vue
</#ibiztemplate>
<#ibiztemplate>
TARGET=PSAPPVIEW
TEMPLFILE=VIEW.vue
</#ibiztemplate>
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
import Vue from 'vue';
import Router from 'vue-router';
import { Util } from '@/utils/util/util';
import { AuthGuard } from '@/utils/auth-guard/auth-guard';
<#if app.getAllPSAppViews()??>
<#assign allPsAppViews = app.getAllPSAppViews()>
<#list allPsAppViews as refview>
import ${srfclassname('${refview.getCodeName()}')} from '@/pages/${refview.getPSAppModule().getCodeName()?lower_case}/${srffilepath2('${refview.getCodeName()}')}/${srffilepath2('${refview.getCodeName()}')}.vue';
</#list>
</#if>
Vue.use(Router)
const router = new Router({
routes: [
{
path: '',
<#if app.getAllPSAppViews()??>
<#assign allPsAppViews = app.getAllPSAppViews()>
<#list allPsAppViews as refview>
<#if refview.getViewType() == "APPINDEXVIEW">
redirect: { name: '${refview.getPSAppModule().getCodeName()?lower_case}_${refview.getCodeName()}' }
</#if>
</#list>
</#if>
},
<#if app.getAllPSAppViews()??>
<#assign allPsAppViews = app.getAllPSAppViews()>
<#list allPsAppViews as refview>
{
path: '/${refview.getPSAppModule().getCodeName()?lower_case}_${refview.getCodeName()?lower_case}',
<#if refview.getViewType() != "APPINDEXVIEW">name: <#if refview.getViewType() == "APPLOGINVIEW">'login'<#else>'${refview.getPSAppModule().getCodeName()?lower_case}_${refview.getCodeName()?lower_case}'</#if>,</#if>
component: ${srfclassname('${refview.getCodeName()}')}<#if refview.getViewType() == "APPINDEXVIEW">,
beforeEnter: (to: any, from: any, next: any) => {
const routerParamsName = '${refview.getPSAppModule().getCodeName()?lower_case}_${refview.getCodeName()?lower_case}';
const params: any = {};
if (to.params && to.params[routerParamsName]) {
Object.assign(params, Util.formatMatrixParse(to.params[routerParamsName]));
}
const url: string = '${app.getPKGCodeName()?lower_case}/app/${app.getPKGCodeName()?lower_case}/getappdata';
const auth: Promise<any> = AuthGuard.getInstance().authGuard(url, params, router);
auth.then(() => {
next();
}).catch(() => {
next();
});
},
children: [
{
path:'',
name: '${refview.getPSAppModule().getCodeName()?lower_case}_${refview.getCodeName()?lower_case}',
<#list refview.getPSAppMenu().getPSAppMenuItems() as item>
<#if item.getPSAppFunc()?? && item.getPSAppFunc().getAppFuncType() == 'APPVIEW' && item.getPSAppFunc().getPSAppView()??>
<#assign funcview= item.getPSAppFunc().getPSAppView()>
<#if item_index == 0>
component:${srfclassname('${funcview.getCodeName()}')},
meta:{
routetag:'${item.getName()}'
}
},
</#if>
{
path:'${funcview.getPSAppModule().getCodeName()?lower_case}_${funcview.getCodeName()?lower_case}',
name:'index_${funcview.getPSAppModule().getCodeName()?lower_case}_${funcview.getCodeName()?lower_case}',
component:${srfclassname('${funcview.getCodeName()}')},
meta:{
routetag:'${item.getName()}'
}
}<#if item_has_next>,</#if>
</#if>
</#list>
]
</#if>
}<#if refview_has_next>,</#if>
</#list>
</#if>
]
})
export default router;
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_CALENDAR
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_CALENDAR
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_CHART
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_CHART
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_DRTAB
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_DRTAB
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_FORM
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_FORM
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_LIST
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_LIST
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MOBMDCTRL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MOBMDCTRL
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MULTIEDITVIEWPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MULTIEDITVIEWPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_PANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_PANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_PICKUPVIEWPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_PICKUPVIEWPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_SEARCHFORM
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_SEARCHFORM
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TABEXPPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TABEXPPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TABVIEWPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TABVIEWPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TREEEXPBAR
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TREEEXPBAR
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TREEVIEW
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TREEVIEW
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_WIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_WIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_APPMENU
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_APPMENU
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_DASHBOARD
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_DASHBOARD
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_PORTLET
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_PORTLET
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TITLEBAR
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TITLEBAR
</#ibiztemplate>
${P.getCtrlCode('CONTROL_CUSTOM.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
const path = require('path');
const os = require('os');
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: './',
// 去除 map 文件
productionSourceMap: false,
outputDir:"../${pub.getCodeName()?lower_case}-srv/target/classes/META-INF/resources",
devServer: {
host: '0.0.0.0',
port: 8111,
compress: true,
disableHostCheck: true,
proxy: "http://localhost:8081",
historyApiFallback: {
rewrites: [
// { from: /^\/appindex$/, to: '/appindex.html' },
]
}
}
}
\ No newline at end of file
Vue_Mobile_R6 模板
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#comment>脚本执行日志路径。</#comment>
<#assign outputlog= " > " + codefolder+"\\"+sys.getPSDevCenterDomain()+"\\"+sys.getPubSystemId()+"\\"+sys.getVCName()+"\\"+"app_"+app.getPKGCodeName()+"\\run.log">
<#assign outputlog2= " > " + codefolder+"\\"+sys.getPSDevCenterDomain()+"\\"+sys.getPubSystemId()+"\\"+sys.getVCName()+"\\"+"app_"+app.getPKGCodeName()+"\\">
<#assign workshop="workshop">
<#if sys.getPSSVNInstRepo()?? && sys.getPSSVNInstRepo().getSVNType() =="GIT">
<#assign workshop="gitshop">
</#if>
<#assign ibizsys_base_file = '${app.getPFType()}'>
<#if pfstyle.getVersionString()?? && (pfstyle.getVersionString() != '')>
<#assign ibizsys_base_file += '-${pfstyle.getVersionString()}'>
</#if>
<#comment>关闭回显并开启变量延迟。</#comment>
@echo off&setlocal ENABLEDELAYEDEXPANSION
rem ---------------------------------------------------------------------------
rem publisher 前端应用发布器PSJQAppCreateAppBatPublisherImpl
rem app 前端应用
rem sys 后台服务系统
rem pf 前端应用技术体系
rem pfstyle 前端应用样式
rem apptempl 应用模板
rem toolfolder 发布工具目录路径
rem codefolder 发布代码根目录路径
rem ---------------------------------------------------------------------------
<#if !pub.isUseWorkshopServer() >
rem 建立前端应用相关工作空间目录。
mkdir ${codefolder}\${sys.getPSDevCenterDomain()}
mkdir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}
mkdir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}
mkdir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}
mkdir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\build
mkdir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\src
mkdir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub
mkdir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub\src
mkdir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_usr
mkdir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_usr\src
rem 为发布代码添加归档标记,便于后续文件的判别处理,如增量更新、文件增量修改的版本库提交等。
attrib +A ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\WEB\*.* /S
attrib +A ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\APP\*.* /S
attrib +A ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\USERCODE\APP_PUB\*.* /S
rem 拷贝自动发布代码到合成项目。
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\WEB\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\src /I/E/Y/D ${outputlog}
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\APP\src\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\src /I/E/Y/D ${outputlog}
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\USERCODE\APP_PUB\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\src /I/E/Y ${outputlog}
<#comment>
rem 实现合成项目中文件(大小写差异)改名功能。实现原理:需要该名称的文件会追加.rename后缀,第一个for查询改名的文件并删除,第二个for查处对应的文件去掉.rename后缀。
for /f "delims=" %%i in ('dir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\*.rename /b /s') do set info=%%i&del !info:~0,-7! /F/Q
for /f "delims=" %%i in ('dir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\*.rename /b /s') do set info=%%i&move /Y !info! !info:~0,-7!
</#comment>
<#if publisher.getContext().isRebuildMode()>
rem 重构模式
rem pub项目取消归档标记
attrib -A ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub\src\*.* /S
rem 完全拷贝前端初始化代码相关文件。
xcopy ${toolfolder}\APP\${ibizsys_base_file}\APP\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\src /E/Y ${outputlog}
<#if sys.getPSSVNInstRepo()??>
xcopy ${toolfolder}\APP\${ibizsys_base_file}\APP\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub /E/Y ${outputlog}
</#if>
rem 拷贝自动发布代码到pub项目
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\WEB\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub\src /E/Y/D ${outputlog}
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\APP\src\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub\src /E/Y/D ${outputlog}
rem 拷贝用户自定义文件到pub项目
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\USERCODE\APP_PUB\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub /I/E/Y ${outputlog}
rem 实现pub项目文件改名功能。实现原理同上。
for /f "delims=" %%i in ('dir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub\*.rename /b /s') do set info=%%i&del !info:~0,-7! /F/Q
for /f "delims=" %%i in ('dir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub\*.rename /b /s') do set info=%%i&move /Y !info! !info:~0,-7!
<#if publisher.context.isEnableVC() && (sys.getPSSVNInstRepo().getSVNType()=="GIT")>
rem 指定了版本库,将pub和usr代码与版本库同步。
"${toolfolder}\jdk1.8\bin\java.exe" -cp ${toolfolder}\js\saibz5.jar net.ibizsys.paas.builder.GitHelper ${sys.getPSSVNInstRepo().getPSGitUser().getResCfgFilePath()} ${sys.getPSSVNInstRepo().getGitPath()} ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub APP_PUB
"${toolfolder}\jdk1.8\bin\java.exe" -cp ${toolfolder}\js\saibz5.jar net.ibizsys.paas.builder.GitHelper ${sys.getPSSVNInstRepo().getPSGitUser().getResCfgFilePath()} ${sys.getPSSVNInstRepo().getGitPath()} ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_usr APP_USR
<#elseif publisher.context.isEnableVC() && (sys.getPSSVNInstRepo().getSVNType()=="SVN")>
"${toolfolder}\java\bin\java.exe" -cp ${toolfolder}\js\saibz5.jar net.ibizsys.paas.builder.SvnCmd3 ${sys.getReadOnlyPSSVNInstRepo().getConnStr()}/${sys.getPSDevSlnCodeName()}/${sys.getTrunkSysName()}/${sys.getVCName()} ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub APP_PUB <#if publisher.context.getRebuildModeEx()!=2>REBUILD</#if>
"${toolfolder}\java\bin\java.exe" -cp ${toolfolder}\js\saibz5.jar net.ibizsys.paas.builder.SvnCmd3 ${sys.getPSSVNInstRepo().getConnStr()}/${sys.getPSDevSlnCodeName()}/${sys.getTrunkSysName()}/${sys.getVCName()} ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_usr APP_USR
</#if>
rem 拷贝usr代码到合成项目
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_usr\src\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\src /I/E/Y ${outputlog}
<#else>
rem 标准发布
rem 增量拷贝初始文件
xcopy ${toolfolder}\APP\${ibizsys_base_file}\APP\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\src /E/Y/D ${outputlog}
<#if sys.getPSSVNInstRepo()??>
xcopy ${toolfolder}\APP\${ibizsys_base_file}\APP\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub /E/Y/D ${outputlog}
</#if>
rem 拷贝自动发布代码到pub项目
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\WEB\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub\src /E/Y/D ${outputlog}
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\APP\src\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub\src /E/Y/D ${outputlog}
rem 拷贝用户自定义文件到pub项目
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\USERCODE\APP_PUB\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub /I/E/Y ${outputlog}
rem 实现pub项目文件改名功能。实现原理同上。
for /f "delims=" %%i in ('dir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub\*.rename /b /s') do set info=%%i&del !info:~0,-7! /F/Q
for /f "delims=" %%i in ('dir ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub\*.rename /b /s') do set info=%%i&move /Y !info! !info:~0,-7!
rem 如果指定了版本库,将pub和usr代码与版本库同步。
<#if publisher.context.isEnableVC() && (sys.getPSSVNInstRepo().getSVNType()=="GIT")>
"${toolfolder}\jdk1.8\bin\java.exe" -cp ${toolfolder}\js\saibz5.jar net.ibizsys.paas.builder.GitHelper ${sys.getPSSVNInstRepo().getPSGitUser().getResCfgFilePath()} ${sys.getPSSVNInstRepo().getGitPath()} ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub APP_PUB
"${toolfolder}\jdk1.8\bin\java.exe" -cp ${toolfolder}\js\saibz5.jar net.ibizsys.paas.builder.GitHelper ${sys.getPSSVNInstRepo().getPSGitUser().getResCfgFilePath()} ${sys.getPSSVNInstRepo().getGitPath()} ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_usr APP_USR
<#elseif publisher.context.isEnableVC() && (sys.getPSSVNInstRepo().getSVNType()=="SVN")>
"${toolfolder}\java\bin\java.exe" -cp ${toolfolder}\js\saibz5.jar net.ibizsys.paas.builder.SvnCmd3 ${sys.getReadOnlyPSSVNInstRepo().getConnStr()}/${sys.getPSDevSlnCodeName()}/${sys.getTrunkSysName()}/${sys.getVCName()} ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_pub APP_PUB
"${toolfolder}\java\bin\java.exe" -cp ${toolfolder}\js\saibz5.jar net.ibizsys.paas.builder.SvnCmd3 ${sys.getPSSVNInstRepo().getConnStr()}/${sys.getPSDevSlnCodeName()}/${sys.getTrunkSysName()}/${sys.getVCName()} ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_usr APP_USR
</#if>
rem 拷贝usr代码到合成项目
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}_usr\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\src /E/Y ${outputlog}
</#if>
rem 删除合成项目中.rename后缀的文件
del ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\*.rename /S/Q/F ${outputlog}
<#if !syspub.isPubCodeOnly()>
rem 判断是否远程打包
<#if !sys.getPSDeployServer()??>
rem 不存在远程打包服务器
rem 编译合成项目
chdir /D ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\src\
call ${toolfolder}\node\npm i
call ${toolfolder}\node\npm rebuild node-sass
call ${toolfolder}\node\npm run build
ping -n 3 127.0.0.1>nul
rem 拷贝合成项目编译结果到构建目录
xcopy ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\src\dist\*.* ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${workshop}\app_${app.getPKGCodeName()}\build /E/Y ${outputlog2}run_dist.log
</#if>
<#else>
echo Build complete
</#if>
<#else>
echo Build complete
</#if>
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#if pub.isUseWorkshopServer() >
<#comment>脚本执行日志路径。</#comment>
<#assign codefolder="/code">
<#assign toolfolder="/toolfolder">
<#assign outputlog= " > " + codefolder+"/"+sys.getPSDevCenterDomain()+"/"+sys.getPubSystemId()+"/remoteshop/"+sys.getVCName()+"/"+"app_"+app.getPKGCodeName()+"/run.log">
<#assign outputlog2= " > " + codefolder+"/"+sys.getPSDevCenterDomain()+"/"+sys.getPubSystemId()+"/remoteshop/"+sys.getVCName()+"/"+"app_"+app.getPKGCodeName()+"/">
<#assign workshop="workshop/"+pub.codeName>
<#if sys.getPSSVNInstRepo()?? && sys.getPSSVNInstRepo().getSVNType() =="GIT">
<#assign workshop="gitshop/"+pub.codeName>
</#if>
<#comment>关闭回显并开启变量延迟。</#comment>
<#comment>
# ---------------------------------------------------------------------------
# publisher 前端应用发布器PSJQAppCreateAppBatPublisherImpl
# app 前端应用
# sys 后台服务系统
# pf 前端应用技术体系
# pfstyle 前端应用样式
# apptempl 应用模板
# toolfolder 发布工具目录路径
# codefolder 发布代码根目录路径
# ---------------------------------------------------------------------------
</#comment>
<#comment> 建立前端应用相关工作空间目录。</#comment>
mkdir -p ${codefolder}/${sys.getPSDevCenterDomain()}
mkdir -p ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}
mkdir -p ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}
mkdir -p ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()}
mkdir -p ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()}/src
<#comment>更新版本库文件</#comment>
<#if sys.getPSSVNInstRepo().getSVNType()=="GIT">
${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/srv_${pub.codeName}/BIN/ibizgitinit.sh ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}
<#elseif sys.getPSSVNInstRepo().getSVNType()=="SVN">
${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/srv_${pub.codeName}/BIN/ibizsvninit.sh usr ${pub.codeName}
</#if>
# version:${pfstyle.getVersionString()}
<#assign ibizsys_base_file = '${app.getPFType()}'>
<#if pfstyle.getVersionString()?? && (pfstyle.getVersionString()!='')>
<#assign ibizsys_base_file += '-${pfstyle.getVersionString()}'>
</#if>
<#comment> 删除合成项目中.rename后缀的文件</#comment>
rm -f ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/*.rename ${outputlog}
<#if publisher.getContext().isRebuildMode()>
<#comment> 重构模式</#comment>
<#if sys.getPSSVNInstRepo()??>
<#comment> 完全拷贝前端初始化代码相关文件。</#comment>
\cp -p -rf ${toolfolder}/APP/${ibizsys_base_file}/APP/. ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()} ${outputlog}
</#if>
<#comment> 拷贝自动发布代码到pub项目</#comment>
\cp -p -rf ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/WEB/. ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()}/src ${outputlog}
\cp -p -rf ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/APP/. ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()} ${outputlog}
<#comment> 拷贝用户自定义文件到pub项目</#comment>
if [ -d ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/USERCODE/APP_PUB/ ]
then
\cp -p -rf ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/USERCODE/APP_PUB/. ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()}/src ${outputlog}
fi
\cp -p -rf ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/PRJ/ibizbuildapp.sh ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()}
<#comment> 实现pub项目文件改名功能。实现原理同上。</#comment>
find ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()}/ -name *.rename | xargs --no-run-if-empty rm -f ${outputlog}
<#else>
<#comment> 标准发布</#comment>
<#comment> 增量拷贝初始文件</#comment>
<#if sys.getPSSVNInstRepo()??>
\cp -p -r -u ${toolfolder}/APP/${ibizsys_base_file}/APP/. ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()} ${outputlog}
</#if>
<#comment> 拷贝自动发布代码到pub项目</#comment>
\cp -p -r -u ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/WEB/. ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()}/src ${outputlog}
\cp -p -r -u ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/APP/. ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()} ${outputlog}
<#comment> 拷贝用户自定义文件到pub项目</#comment>
if [ -d ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/USERCODE/APP_PUB/ ]
then
\cp -p -rf ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/USERCODE/APP_PUB/. ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()}/src ${outputlog}
fi
\cp -p -rf ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/app_${app.getPKGCodeName()}/PRJ/ibizbuildapp.sh ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()}
<#comment> 实现pub项目文件改名功能。实现原理同上。</#comment>
find ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/app_${app.getPKGCodeName()}/ -name *.rename | xargs --no-run-if-empty rm -f ${outputlog}
</#if>
<#if sys.getPSSVNInstRepo().getSVNType()=="GIT">
<#comment> 指定了版本库,将代码与版本库同步。</#comment>
${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/srv_${pub.codeName}/BIN/ibizgit.sh ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop} app_${app.getPKGCodeName()}
<#elseif sys.getPSSVNInstRepo().getSVNType()=="SVN">
${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/srv_${pub.codeName}/BIN/ibizsvn.sh ${pub.codeName} app_${app.getPKGCodeName()}
</#if>
</#if>
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#if !pub.isUseWorkshopServer() >
<#comment>脚本执行日志路径。</#comment>
<#assign outputlog= " > " + codefolder+"\\"+sys.getPSDevCenterDomain()+"\\"+sys.getPubSystemId()+"\\"+sys.getVCName()+"\\"+"app_"+app.getPKGCodeName()+"\\run.log">
<#if publisher.getContext().isRebuildMode()>
rem 清理发布的jsp文件
del ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\WEB\*.* /S/F/Q ${outputlog}
rd ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\WEB /S/Q ${outputlog}
rem 清理发布的js文件
del ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\JS\*.* /S/F/Q ${outputlog}
rd ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\JS /S/Q ${outputlog}
rem 清理发布的扩展js文件
del ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\JS2\*.* /S/F/Q ${outputlog}
rd ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\JS2 /S/Q ${outputlog}
rem 清理发布的资源文件
del ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\APP\*.* /S/F/Q ${outputlog}
rd ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\APP /S/Q ${outputlog}
rem 清理用户自定义发布文件
del ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\USERCODE\APP_PUB\*.* /S/F/Q ${outputlog}
rd ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\${sys.getVCName()}\app_${app.getPKGCodeName()}\USERCODE\APP_PUB /S/Q ${outputlog}
rem 清理合成项目文件
del ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\workshop\app_${app.getPKGCodeName()}\src\src\*.* /S/F/Q ${outputlog}
rd ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\workshop\app_${app.getPKGCodeName()}\src\src /S/Q ${outputlog}
<#if publisher.getContext().getRebuildModeEx()==2>
rem 完整重构
<#if publisher.getContext().isEnableVC()>
rem 删除pub的版本库项目
"${toolfolder}\java\bin\java.exe" -cp ${toolfolder}\js\saibz5.jar net.ibizsys.paas.builder.SvnCmd3 ${sys.getReadOnlyPSSVNInstRepo().getConnStr()}/${sys.getPSDevSlnCodeName()}/${sys.getTrunkSysName()}/${sys.getVCName()} ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\workshop\app_${app.getPKGCodeName()}_pub REMOVE
</#if>
rem 清理pub项目文件
move /Y ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\workshop\app_${app.getPKGCodeName()}_pub ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\workshop\app_${sys.getPubSystemId()}
del ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\workshop\app_${sys.getPubSystemId()}\*.* /S/F/Q ${outputlog}
rd ${codefolder}\${sys.getPSDevCenterDomain()}\${sys.getPubSystemId()}\workshop\app_${sys.getPubSystemId()} /S/Q ${outputlog}
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
#!/bin/bash
<#comment>脚本执行日志路径。</#comment>
<#assign codefolder="/code">
<#assign outputlog= " >" + codefolder+"/"+sys.getPSDevCenterDomain()+"/"+sys.getPubSystemId()+"/remoteshop/"+sys.getVCName()+"/"+"app_"+app.getPKGCodeName()+"/run.log">
<#comment>
<#assign workshop="workshop">
<#if sys.getPSSVNInstRepo()?? && sys.getPSSVNInstRepo().getSVNType() =="GIT">
<#assign workshop="gitshop">
</#if>
<#if publisher.getContext().isRebuildMode()>
<#if sys.getPSSVNInstRepo().getSVNType()=="GIT">
/opt/tool/js/gitreset.sh ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/${pub.codeName} ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/srv_${pub.codeName}/CFG/repo.properties
<#elseif sys.getPSSVNInstRepo().getSVNType()=="SVN">
/opt/tool/js/svninit.sh ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/srv_${pub.codeName}/CFG/repo.properties ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop} usr ${pub.codeName} ${sys.getPubSystemId()}
/opt/tool/js/svnreset.sh ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/${workshop}/${pub.codeName}/app_${app.getPKGCodeName()} ${codefolder}/${sys.getPSDevCenterDomain()}/${sys.getPubSystemId()}/remoteshop/${sys.getVCName()}/srv_${pub.codeName}/CFG/repo.properties ${sys.getPubSystemId()}
</#if>
</#if>
</#comment>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册