提交 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
此差异已折叠。
<#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
此差异已折叠。
<#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
<#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
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册