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

update:模板迁移

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