提交 57eaba84 编写于 作者: neko's avatar neko

init

上级 34b1d226
<#ibizinclude>
../@MACRO/HTML/FORM.html.ftl
</#ibizinclude>
\ No newline at end of file
.ivu-tabs-no-animation>.ivu-tabs-content{
padding: 0 16px;
}
.ivu-card-head{
padding: 14px 0;
}
.app-form {
flex-grow: 1;
height: 100%;
overflow: auto;
> .ivu-row {
height: 100%;
> .ivu-tabs {
height: 100%;
display: flex;
flex-direction: column;
> .ivu-tabs-content {
flex-grow: 1;
overflow: auto;
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
}
}
.app-tabpanel-flex {
height: 100%;
> .ivu-tabs-content {
height: calc(100% - 52px);
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
.app-form {
>.ivu-row:nth-child(2) {
>.ivu-col:nth-child(1) {
>.ivu-row.app-form-group.app-group-hiddden-caption:nth-child(1) {
margin-top: 12px;
}
}
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.tsx.ftl
</#ibizinclude>
<i-button type="primary" on-click={($event: any) => this.${item.getName()}_click($event)}
style="<#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if>">
<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)><i class="${img.getCssClass()}"></i></#if></#if>
<#if item.isShowCaption()><span >{<#if item.getCaptionItemName()?? && item.getCaptionItemName()?length gt 0>this.data.${item.getCaptionItemName()}<#else><#if langbase??>this.$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if></#if>}</span></#if>
</i-button>
\ No newline at end of file
<#assign dritem = item.getPSDEDRItem()>
<app-form-druipart formState={this.formState} paramitem='<#if item.getParamItem()??>${item.getParamItem()}<#else>srfkey</#if>'
parentdata={<#if dritem.getParentDataJO?? && dritem.getParentDataJO()??>${dritem.getParentDataJO()}<#else>{}</#if>}
refviewtype='<#if item.getPSAppView()?? && item.getPSAppView().getPSViewType()??>${item.getPSAppView().getPSViewType().getId()}</#if>'
refreshitems='<#if item.getRefreshItems()??>${item.getRefreshItems()}</#if>'
ignorefieldvaluechange={this.ignorefieldvaluechange}
viewname='${srffilepath2(item.getPSAppView().codeName)}' data={JSON.stringify(this.data)} style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%</#if><#if item.getContentHeight() == 0><#if item.getPSAppView().getHeight() gt 0>height:${item.getPSAppView().getHeight()?c}px</#if><#else>height:${item.getContentHeight()?c}px</#if>;overflow: auto;">
</app-form-druipart>
<#if !item.isHidden()>
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.tsx.ftl
</#ibizinclude>
<app-form-item name='${item.name}' itemRules={JSON.stringify(this.rules.${item.name})} class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>' caption={<#if langbase??>this.$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>} uiStyle='${item.getDetailStyle()}' labelWidth={${item.getLabelWidth()?c}} isShowCaption={${item.isShowCaption()?c}} error={this.detailsModel.${item.name}.error} isEmptyCaption={${item.isEmptyCaption()?c}} labelPos='${item.getLabelPos()}'>
<#if item.isCompositeItem()>
<#assign formitems=item.getPSDEFormItems()>
<app-range-editor v-model={this.data.${item.name}} activeData={this.data} disabled={this.detailsModel.${item.name}.disabled} name="${item.name}" editorType="${item.getEditorType()}" format="${item.getEditorParam("TIMEFMT","")}" refFormItem={[<#list formitems as formitem><#if formitem_index gt 0>,</#if>'${formitem.name}'</#list>]} on-formitemvaluechange={this.onFormItemValueChange} style="${item.getEditorCssStyle()}"></app-range-editor>
<#else>
${P.getEditorCode(item, "EDITOR.tsx").code}
</#if>
</app-form-item>
</#if>
\ No newline at end of file
<#assign content>
<#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())>
<#ibizinclude>
../@MACRO/CONTROL/FORM_MEMBER_LAYOUT.tsx.ftl
</#ibizinclude>
</#if>
</#list>
</#assign>
<#if item.getPSLayout()?? && item.getPSLayout().getLayout() == "FLEX">
<#assign pageLayout = item.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>">
${content}
</div>
<#else>
${content}
</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.tsx.ftl
</#ibizinclude>
<app-form-group layoutType="<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' uiActionGroup={this.detailsModel.${item.name}.uiActionGroup} on-groupuiactionclick={($event:any) => this.groupUIActionClick($event)} caption={<#if langbase??>this.$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>} isShowCaption={${item.isShowCaption()?c}} uiStyle={'${item.getDetailStyle()}'} titleBarCloseMode={${item.getTitleBarCloseMode()}} isInfoGroupMode={${item.isInfoGroupMode()?c}}>
<#assign content>
<#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())>
<#ibizinclude>
../@MACRO/CONTROL/FORM_MEMBER_LAYOUT.tsx.ftl
</#ibizinclude>
</#if>
</#list>
</#assign>
<#if item.getPSLayout()?? && item.getPSLayout().getLayout() == "FLEX">
<#assign pageLayout = item.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>">
${content}
</div>
<#else>
<row>
${content}
</row>
</#if>
</app-form-group>
\ No newline at end of file
<div style="height:${item.getContentHeight()}px;">${item.getIFrameUrl()}</div>
\ No newline at end of file
<#if item.getLogicType() == 'GROUP'><#if item.isNotMode()>!(</#if><#if item.getPSDEFDLogics()??><#list item.getPSDEFDLogics() as subLogic><#if subLogic_index gt 0><#if item.getGroupOP() == 'AND'> && </#if><#if item.getGroupOP() == 'OR'> || </#if></#if>${P.getPartCode(subLogic, 'DETAIL_LOGIC').code}</#list></#if><#if item.isNotMode()>)</#if><#elseif item.getLogicType() == 'SINGLE'>this.$util.testCond(_${item.getDEFDName()?lower_case}, '${item.getPSDBValueOPId()}', '${item.getValue()}')</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.tsx.ftl
</#ibizinclude>
<#assign detail>caption: '${item.getCaption()}', detailType: '${item.getDetailType()}', name: '${item.getName()}', visible: <#if item.getPSDEFDGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, isShowCaption: ${item.isShowCaption()?c}, form: this</#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 FormDRUIPartModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMITEM'>
new FormItemModel({ ${detail}, disabled: false, enableCond: ${item.getEnableCond()?c} })
<#elseif item.getDetailType() == 'FORMPAGE'>
new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'>
new FormPartModel({ ${detail} })
<#elseif item.getDetailType() == 'GROUPPANEL'>
new FormGroupPanelModel({ ${detail}, uiActionGroup: { caption: '<#if item.getPSUIActionGroup()??>${item.getPSUIActionGroup().getName()}</#if>', langbase: '<#if langbase??>${langbase}</#if>', extractMode: '<#if item.getActionGroupExtractMode?? && item.getActionGroupExtractMode()??>${item.getActionGroupExtractMode()}<#else>ITEM</#if>', details: [<#if item.getPSUIActionGroup()??><#list item.getPSUIActionGroup().getPSUIActionGroupDetails() as uadetails><#if uadetails_index gt 0>, </#if>{ name: '${item.getName()}_${uadetails.getName()}', caption: '${uadetails.getPSUIAction().getCaption()}', uiactiontag: '${uadetails.getPSUIAction().getUIActionTag()?lower_case}'<#if uadetails.getPSUIAction().getPSSysImage()??>, <#assign viewimg=uadetails.getPSUIAction().getPSSysImage()/><#if viewimg.getCssClass() != ''>icon: '${viewimg.getCssClass()}'<#else>img: '${viewimg.getImagePath()}'</#if></#if> }</#list></#if>] } })
<#elseif item.getDetailType() == 'IFRAME'>
new FormIFrameModel({ ${detail} })
<#elseif item.getDetailType() == 'RAWITEM'>
new FormRowItemModel({ ${detail} })
<#elseif item.getDetailType() == 'TABPAGE'>
new FormTabPageModel({ ${detail} })
<#elseif item.getDetailType() == 'TABPANEL'>
new FormTabPanelModel({ ${detail}, tabPages: [<#list item.getPSDEFormTabPages() as formmenber><#if formmenber_index gt 0>, </#if>{ name: '${formmenber.name}', index: ${formmenber_index}, visible: <#if formmenber.getPSDEFDGroupLogic('PANELVISIBLE')??>false<#else>true</#if> }</#list>] })
<#elseif item.getDetailType() == 'USERCONTROL'>
new FormUserControlModel({ ${detail} })
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<div class="<#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>" style="<#if item.getRawContentHeight() gt 0>height: ${item.getRawContentHeight()?c}px;</#if><#if item.getRawContentWidth() gt 0>width: ${item.getRawContentWidth()?c}px;</#if>">
${item.getRawContent()}
</div>
</#if>
\ No newline at end of file
<#assign content>
<#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())>
<#ibizinclude>
../@MACRO/CONTROL/FORM_MEMBER_LAYOUT.tsx.ftl
</#ibizinclude>
</#if>
</#list>
</#assign>
<#if item.getPSLayout()?? && item.getPSLayout().getLayout() == "FLEX">
<#assign pageLayout = item.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>">
${content}
</div>
<#else>
${content}
</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.tsx.ftl
</#ibizinclude>
<tabs animated={false} name='${item.name}' v-show={this.detailsModel.${item.name}.visible} class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if><#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"> app-tabpanel-flex</#if>'
value={this.detailsModel.${item.name}.activiedPage} on-on-click={($event: any) => this.detailsModel.${item.name}.clickPage($event)}>
<#list item.getPSDEFormTabPages() as formmenber>
{
this.detailsModel.${formmenber.name}.visible ?
<tab-pane name='${formmenber.name}' index={${formmenber_index}} tab='${item.name}' class='<#if formmenber.getPSSysCss?? && formmenber.getPSSysCss()??>${formmenber.getPSSysCss().getCssName()}</#if>'
label={
(h: any) => {
return (
<span class='caption<#if formmenber.getLabelPSSysCss?? && formmenber.getLabelPSSysCss()??> ${formmenber.getLabelPSSysCss().getCssName()}</#if>'>
<#if formmenber.getPSSysImage()??>
<span>
<#assign sysimage = formmenber.getPSSysImage()/>
<#if sysimage.getImagePath() == "">
<i class='${sysimage.getCssClass()}'></i>&nbsp;
<#else>
<img src='${sysimage.getImagePath()}'/>&nbsp;
</#if>
</span>
</#if>
{<#if langbase??>this.$t('${langbase}.details.${formmenber.name}')<#else>'${formmenber.getCaption()}'</#if>}
</span>
);
}
}>
${P.getPartCode(formmenber).code}
</tab-pane>
: ''
}
</#list>
</tabs>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
表单自定义部件没有定义插件
</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.tsx.ftl
</#ibizinclude>
<i-form props={{ model: this.data }} class='app-form<#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if><#if ctrl.isInfoFormMode?? && ctrl.isInfoFormMode()> info-form-mode</#if>' ref='${ctrl.name}' style="<#if ctrl.getFormWidth() gt 1>width: ${ctrl.getFormWidth()?c}px;</#if>">
<input style={{ display: 'none' }}></input>
<row >
<#if ctrl.isNoTabHeader()>
<#list ctrl.getPSDEFormPages() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
<#else>
<tabs animated={false} name='${ctrl.name}' value={this.detailsModel.${ctrl.name}.activiedPage}
on-on-click={($event: any) => this.detailsModel.${ctrl.name}.clickPage($event)}>
<#list ctrl.getPSDEFormPages() as formpage>
{
this.detailsModel.${formpage.name}.visible ?
<tab-pane name='${formpage.name}' index={${formpage_index}} tab='${ctrl.name}' class='<#if formpage.getPSSysCss?? && formpage.getPSSysCss()??>${formpage.getPSSysCss().getCssName()}</#if>'
label={
(h: any) => {
return (
<span class='caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>'>
<#if formpage.getPSSysImage()??>
<span>
<#assign sysimage = formpage.getPSSysImage()/>
<#if sysimage.getImagePath() == "">
<i class='${sysimage.getCssClass()}'></i>&nbsp;
<#else>
<img src='${sysimage.getImagePath()}'/>&nbsp;
</#if>
</span>
</#if>
{<#if langbase??>this.$t('${langbase}.details.${formpage.name}')<#else>'${formpage.getCaption()}'</#if>}
</span>
);
}
}>
${P.getPartCode(formpage).code}
</tab-pane>
: ''
}
</#list>
</tabs>
</#if>
</row>
</i-form>
\ No newline at end of file
<#list ctrl.getAllPSDEFormDetails() as formdetail>
<#if formdetail.getPSDEFDGroupLogic('ITEMBLANK')??>
<#assign ITEMBLANK = formdetail.getPSDEFDGroupLogic('ITEMBLANK')/>
if (Object.is(name, '')<#if ITEMBLANK.getRelatedDetailNames()??><#list ITEMBLANK.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = true;
<#if ITEMBLANK.getRelatedDetailNames()??>
<#list ITEMBLANK.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(ITEMBLANK, 'DETAIL_LOGIC').code}) {
ret = false;
}
this.rules.${formdetail.name}.some((rule: any) => {
if (rule.hasOwnProperty('required')) {
rule.required = ret;
}
return false;
});
}
</#if>
<#if formdetail.getPSDEFDGroupLogic('ITEMENABLE')??>
<#assign ITEMENABLE = formdetail.getPSDEFDGroupLogic('ITEMENABLE')/>
if (Object.is(name, '')<#if ITEMENABLE.getRelatedDetailNames()??><#list ITEMENABLE.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if ITEMENABLE.getRelatedDetailNames()??>
<#list ITEMENABLE.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(ITEMENABLE, 'DETAIL_LOGIC').code}) {
ret = true;
}
this.detailsModel.${formdetail.name}.setDisabled(!ret);
}
</#if>
<#if formdetail.getPSDEFDGroupLogic('PANELVISIBLE')??>
<#assign PANELVISIBLE = formdetail.getPSDEFDGroupLogic('PANELVISIBLE')/>
if (Object.is(name, '')<#if PANELVISIBLE.getRelatedDetailNames()??><#list PANELVISIBLE.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if PANELVISIBLE.getRelatedDetailNames()??>
<#list PANELVISIBLE.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(PANELVISIBLE, 'DETAIL_LOGIC').code}) {
ret = true;
}
this.detailsModel.${formdetail.name}.setVisible(ret);
}
</#if>
</#list>
\ No newline at end of file
此差异已折叠。
CTRLTYPE=FORM
\ No newline at end of file
<#ibizinclude>
../@MACRO/EDIT.tsx.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEEDITVIEW
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
import React, { PureComponent } from 'react';
import './App.less';
/**
* ${ctrl.getName()}
*
* @export
* @class ${ctrl.getName()}
* @extends {PureComponent}
*/
export class ${ctrl.getName()} extends PureComponent {
/**
* 绘制内容
*
* @returns
* @memberof ${ctrl.getName()}
*/
public render() {
return <>
<@ibizindent blank=12>
${P.getLayoutCode().code}
</@ibizindent>
</>;
}
}
\ No newline at end of file
VIEWTYPE=APPDEEDITVIEW
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
// App.less
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
import React, { PureComponent } from 'react';
import './App.less';
import { Form } from './forms/main/main';
/**
* App
*
* @export
* @class App
* @extends {PureComponent}
*/
export default class App extends PureComponent {
/**
*
*
* @returns
* @memberof App
*/
public render() {
return <div className="App">
<Form></Form>
</div>;
}
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_FORM
</#ibiztemplate>
${P.getCtrlCode('CONTROL.less').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_FORM
</#ibiztemplate>
${P.getCtrlCode('CONTROL.tsx').code}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册