提交 21e6af37 编写于 作者: KK's avatar KK

update:模板迁移

上级 b5920cb3
<template>
<div class="app-wizard <#if appde??>${appde.getCodeName()?lower_case}-${ctrl.name}</#if>">
<div class="app-wizard <#if appde??>${appde.getCodeName()?lower_case}-${ctrl.name}</#if> <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.getPSDEWizard?? && ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardSteps?? && ctrl.getPSDEWizard().getPSDEWizardSteps()?? && ctrl.getWizardStyle?? && ctrl.getWizardStyle()=="DEFAULT">
<van-steps class="wizard-steps" :active="wizardForms.indexOf(activeForm)" finish-status="success">
<#list ctrl.getPSDEWizard().getPSDEWizardSteps() as step>
......@@ -32,9 +32,9 @@
</#if>
</template>
<ion-footer class="app-wizard-footer">
<app-mob-button v-show="!isHidden('PREV')" type="primary" :text="$t('app.button.previousStep')" @click="onClickPrev()" />
<app-mob-button v-show="!isHidden('NEXT')" type="primary" :text="$t('app.button.nextStep')" @click="onClickNext()" />
<app-mob-button v-show="!isHidden('FINISH')" type="primary" :text="$t('app.button.finish')" @click="onClickFinish()" />
<app-mob-button buttontype="PREV" v-show="!isHidden('PREV')" type="primary" :text="$t('app.button.previousStep')" @click="onClickPrev()" />
<app-mob-button buttontype="NEXT" v-show="!isHidden('NEXT')" type="primary" :text="$t('app.button.nextStep')" @click="onClickNext()" />
<app-mob-button buttontype="FINISH" v-show="!isHidden('FINISH')" type="primary" :text="$t('app.button.finish')" @click="onClickFinish()" />
</ion-footer>
</div>
</template>
......@@ -259,6 +259,7 @@
if (response && response.status === 200) {
const data = response.data;
this.$emit("finish", data);
this.$emit("closeview", data);
}
}).catch((response: any) => {
if (response && response.status === 401) {
......@@ -378,7 +379,7 @@
}
/**
* 是否禁用
* 是否隐藏
*
* @param {string} type
* @memberof ${srfclassname('${ctrl.codeName}')}
......
......@@ -8,7 +8,7 @@
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div ref='${ctrl.name}' class="app-form <#if appde??>${appde.getCodeName()?lower_case}-${ctrl.name}</#if> <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div ref='${ctrl.name}' class="app-form <#if ctrl.getFormFuncMode?? && ctrl.getFormFuncMode()?? && ctrl.getFormFuncMode() == "WIZARDFORM">app-wizardform</#if> <#if appde??>${appde.getCodeName()?lower_case}-${ctrl.name}</#if> <#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>">
<#-- isNoTabHeader是否隐藏分页头部-->
<#if ctrl.isNoTabHeader()>
<#list ctrl.getPSDEFormPages() as formmenber>
......
......@@ -7,7 +7,7 @@
<div class="app-form-item-button" v-show="detailsModel.${item.name}.visible">
<app-mob-button
v-if="detailsModel.${item.name}.visible"
:class="app-form-button <#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>"
class="app-form-button <#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>"
text="${item.caption}"
style='<#if item.getHeight() gt 0>height: ${item.getHeight()}px;</#if>'
<#if item.getPSSysImage()??>
......
<#if item.render??>
${item.render.code}
<#else>
<ion-item v-show="detailsModel.${item.name}.visible" class="app-form-item">
<ion-item v-show="detailsModel.${item.name}.visible" class="app-form-rawitem app-form-item <#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>">
${item.getRawContent()}
</ion-item>
</#if>
\ No newline at end of file
......@@ -3,12 +3,6 @@
</#ibizinclude>
.app-form {
<#if ctrl.getFormFuncMode?? && ctrl.getFormFuncMode()?? && ctrl.getFormFuncMode() == "WIZARDFORM">
height: calc(100vh - 105px - 52px);
overflow: auto;
<#else>
height: 100%;
</#if>
>.app-form-tabs {
height: 100%;
>.app-form-tab {
......@@ -20,7 +14,12 @@
border: 0;
}
}
<#if ctrl.getFormFuncMode?? && ctrl.getFormFuncMode()?? && ctrl.getFormFuncMode() == "WIZARDFORM">
.app-wizardform {
height: calc(100vh - 157px);
overflow: auto;
}
</#if>
<#if appde??>
.${appde.getCodeName()?lower_case}-${ctrl.name}{}
</#if>
\ No newline at end of file
......@@ -3,7 +3,7 @@
./@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.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>">
<div v-show="detailsModel.${item.name}.visible" class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;<#else>width:100%;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>">
<#if item.render??>
${item.render.code}
<#else>
......
......@@ -191,24 +191,6 @@ import { PanelUserControlModel, PanelButtonModel, PanelControlModel, PanelFieldM
}
}
/**
* 面板项值变更
*
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected onPanelItemValueChange($event: { name: string, value: any }): void {
if (!$event) {
return;
}
if (!$event.name || Object.is($event.name, '') || !this.data.hasOwnProperty($event.name)) {
return;
}
this.data[$event.name] = $event.value;
this.panelLogic({ name: $event.name, newVal: $event.value, oldVal: null });
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -65,7 +65,15 @@ ${front_block}
Object.assign(params, parentObj);
let panelNavParam= <@getNavigateParams item />;
let panelNavContext= <@getNavigateContext item />;
const { context: _context, param: _params } = this.viewTool.formatNavigateParam( panelNavContext, panelNavParam, context, params, _args);
<#if item.getActionTarget() == 'MULTIKEY'>
_args.forEach((arg: any) => {
const NavData = this.viewTool.formatNavigateParam( panelNavContext, panelNavParam, context, params, arg);
Util.Objectjoint(_context,NavData.context);
Util.Objectjoint(_params,NavData.param);
});
<#else>
const { context: _context, param: _params } = this.viewTool.formatNavigateParam( panelNavContext, panelNavParam, context, params, _args[0]);
</#if>
<#-- BEGIN:界面行为结果 -->
<#if item.getFrontProcessType() != 'OTHER'>
let response: any = null;
......@@ -139,6 +147,7 @@ ${front_block}
<#if item.isReloadData?? && item.isReloadData()>
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
AppCenterService.notifyMessage({name:"${item.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:args});
}
</#if>
<#-- END:刷新数据 -->
......
......@@ -76,10 +76,6 @@ ${backend_block}
_args = _args[0];
}
const { context: _context, param: _params } = this.viewTool.formatNavigateParam( panelNavContext, panelNavParam, context, params,_args);
<#-- 关闭编辑视图 -->
<#if item.isCloseEditView()>
container.closeView(null);
</#if>
const backend = async () => {
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEMethod?? && item.getPSAppDEMethod()??>
const curUIService: any = await this.globaluiservice.getAppEntityService('${item.getPSAppDataEntity().getCodeName()?lower_case}');
......@@ -94,11 +90,15 @@ ${backend_block}
</#if>
<#-- 是否重新加载数据 -->
<#if item.isReloadData?? && item.isReloadData()>
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
if (container && container.refresh && container.refresh instanceof Function) {
container.refresh(args);
AppCenterService.notifyMessage({name:"${item.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:args});
}
</#if>
<#-- 关闭编辑视图 -->
<#if item.isCloseEditView()>
container.closeView(null);
</#if>
<#-- 后续界面行为 -->
<#if item.getNextPSUIAction?? && item.getNextPSUIAction()??>
<#assign nextPSUIAction = item.getNextPSUIAction()/>
......@@ -116,15 +116,15 @@ ${backend_block}
<#assign nextPSUIAction = item.getNextPSUIAction()/>
<#if !(nextPSUIAction.getPSAppDataEntity?? && nextPSUIAction.getPSAppDataEntity()??)>
if (this.globaluiservice.${nextPSUIAction.getFullCodeName()} && this.globaluiservice.${nextPSUIAction.getFullCodeName()} instanceof Function) {
this.globaluiservice.${nextPSUIAction.getFullCodeName()}(response.data, contextJO, paramJO, $event, xData, container);
this.globaluiservice.${nextPSUIAction.getFullCodeName()}(_args, contextJO, paramJO, $event, xData, container);
}
<#elseif nextPSUIAction.getPSAppDataEntity().getId() != item.getId()>
const nextPSUIActionUIService: any = await this.globaluiservice.getService('${nextPSUIAction.getPSAppDataEntity().getCodeName()?lower_case}_ui_action');
if (nextPSUIActionUIService) {
nextPSUIActionUIService.${nextPSUIAction.getFullCodeName()}(response.data, contextJO, paramJO, $event, xData, container);
nextPSUIActionUIService.${nextPSUIAction.getFullCodeName()}(_args, contextJO, paramJO, $event, xData, container);
}
<#else>
this.${nextPSUIAction.getFullCodeName()}(response.data, contextJO, paramJO, $event, xData, container);
this.${nextPSUIAction.getFullCodeName()}(_args, contextJO, paramJO, $event, xData, container);
</#if>
</#if>
<#-- END:后续界面行为 -->
......
......@@ -47,7 +47,9 @@
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
this.viewState.next({ tag: 'form', action: 'saveandexit', data: datas });
if(xData.saveAndExit && xData.saveAndExit instanceof Function){
xData.saveAndExit(datas);
}
}
/**
......
......@@ -6,5 +6,15 @@ export const PageComponents = {
Vue.component('${srffilepath2(appview.getCodeName())}', () => import('@pages/${srffilepath2(appview.getPSAppModule().getCodeName())}/${srffilepath2(appview.getCodeName())}/${srffilepath2(appview.getCodeName())}.vue'));
</#list>
</#if>
<#-- 应用下所有用户引用为true的视图注册start -->
<#if app.getAllPSAppViews?? && app.getAllPSAppViews()??>
<#list app.getAllPSAppViews() as appview>
<#if appview.isUserRefMode() && appview.getViewType() != "APPINDEXVIEW">
Vue.component('${srffilepath2(appview.getCodeName())}', () => import('@pages/${srffilepath2(appview.getPSAppModule().getCodeName())}/${srffilepath2(appview.getCodeName())}/${srffilepath2(appview.getCodeName())}.vue'));
</#if>
</#list>
</#if>
<#-- 应用下所有用户引用为true的视图注册end -->
}
};
\ No newline at end of file
......@@ -18,7 +18,7 @@ const router = new Router({
if (to.params && to.params[routerParamsName]) {
Object.assign(params, qs.parse(to.params[routerParamsName], { delimiter: ';' }));
}
const url: string = 'appdata';
const url: string = '/appdata';
const auth: Promise<any> = AuthGuard.getInstance().authGuard(url, params, store);
auth.then(() => {
next();
......@@ -49,7 +49,7 @@ const router = new Router({
if (to.params && to.params[routerParamsName]) {
Object.assign(params, qs.parse(to.params[routerParamsName], { delimiter: ';' }));
}
const url: string = 'appdata';
const url: string = '/appdata';
const auth: Promise<any> = AuthGuard.getInstance().authGuard(url, params, store);
auth.then(() => {
next();
......@@ -64,7 +64,7 @@ const router = new Router({
},
component: () => import('@/components/view-shell/view-shell.vue'),
children: [
<#list view.getAllRelatedPSAppViewsEx() as subView>
<#list app.getAllRefPSAppViews() as subView>
<#if !subView.isRedirectView()>
<#if subView.isPSDEView() && subView.getPSAppDataEntity()??>
<#assign appDataEntity = subView.getPSAppDataEntity()/>
......
......@@ -26,7 +26,6 @@ export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.initCounterData();
this.timer = setInterval(() => {
this.fetchCounterData(this.context,this.viewparams);
}, <#if item.getTimer()??>${item.getTimer()?c}<#else>6000</#if>);
......@@ -38,8 +37,9 @@ export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase
* @param {*} [opts={}]
* @memberof ${srfclassname('${item.getCodeName()}')}CounterServiceBase
*/
public initCounterData(){
this.fetchCounterData(this.context,this.viewparams);
public async initCounterData(){
await this.fetchCounterData(this.context,this.viewparams);
return this.counterData;
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册