提交 9d29e378 编写于 作者: zhangpingchuan's avatar zhangpingchuan

zpc

上级 be3909ec
流水线 #194 已取消 ,包含阶段
# General
.DS_Store .DS_Store
.AppleDouble node_modules
.LSOverride /dist
# Icon must end with two \r # local env files
Icon .env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Thumbnails # Editor directories and files
._* .idea
.vscode
# Files that might appear in the root of a volume *.suo
.DocumentRevisions-V100 *.ntvs*
.fseventsd *.njsproj
.Spotlight-V100 *.sln
.TemporaryItems *.sw?
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UICounter } from '@/utils';
import './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}.less';
<#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}';
<#else>
import view_${subctrl.getName()} from '@widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}';
</#if>
</#if>
</#list>
</#if>
<#-- 语言资源入口 -->
<#ibizinclude>
./LANGBASE.tsx.ftl
</#ibizinclude>
<#if ctrl.getPSLayoutPanels?? && ctrl.getPSLayoutPanels()??>
<#list ctrl.getPSLayoutPanels() as panel>
import layout_${panel.getName()} from '@widget/${srffilepath2(panel.getPSDataEntity().getCodeName())}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}';
</#list>
</#if>
<#if import_block??>${import_block}</#if>
@Component({
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.getPSLayoutPanels?? && ctrl.getPSLayoutPanels()??>
<#list ctrl.getPSLayoutPanels() as panel>
layout_${panel.getName()},
</#list>
</#if>
<#if components??>${components}</#if>
}
})
export default class ${srfclassname('${ctrl.codeName}')} extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 视图状态事件
*
* @protected
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected viewStateEvent: Subscription | undefined;
<#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.tsx").code}
</#if>
</#list>
</#if>
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
<#list ctrl.getPSUIActions() as uiAction>
${P.getLogicCode(uiAction, "LOGIC.tsx").code}
</#list>
</#if>
/**
* 序列号
*
* @private
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private serialNumber: number = this.$util.createSerialNumber();
/**
* 请求行为序列号数组
*
* @private
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private serialsNumber: any[] = [];
/**
* 添加序列号
*
* @private
* @param {*} action
* @param {number} serialnumber
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private addSerialNumber(action: any, serialnumber: number): void {
const index = this.serialsNumber.findIndex((serial: any) => Object.is(serial.action, action));
if (index === -1) {
this.serialsNumber.push({ action: action, serialnumber: serialnumber })
} else {
this.serialsNumber[index].serialnumber = serialnumber;
}
}
/**
* 删除序列号
*
* @private
* @param {*} action
* @returns {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private getSerialNumber(action: any): number {
const index = this.serialsNumber.findIndex((serial: any) => Object.is(serial.action, action));
return this.serialsNumber[index].serialnumber;
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public closeView(args: any[]): void {
let _this: any = this;
_this.$emit('closeview', args);
}
<#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??>
<Col>
${P.getPartCode(formmenber).code}
</Col>
<#elseif layout == 'FLEX'>
<div>
${P.getPartCode(formmenber).code}
</div>
<#else>
<div>
${P.getPartCode(formmenber).code}
</div>
</#if>
\ No newline at end of file
<#assign langbase><#if de??>${de.getCodeName()?lower_case}.${ctrl.getCodeName()?lower_case}_${ctrl.getControlType()?lower_case}</#if></#assign>
\ 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}/
\ No newline at end of file
<#-- ctrl document -->
<view_${ctrl.getName()}
viewState={this.viewState}
<#if content??>
${content}
</#if>
name='${ctrl.name}'
ref='${ctrl.name}'
<#if ctrl.getHookEventNames()??>
<#list ctrl.getHookEventNames() as eventName>
on-${eventName?lower_case}={($event: any) => this.${ctrl.name}_${eventName?lower_case}($event)}
</#list>
</#if>
on-closeview={($event: any) => this.closeView($event)}>
</view_${ctrl.getName()}>
\ No newline at end of file
<#-- ctrl document -->
<view_${ctrl.getName()}
viewState={this.viewState}
name='${ctrl.name}'
ref='${ctrl.name}'
<#if ctrl.getHookEventNames()??>
<#list ctrl.getHookEventNames() as eventName>
on-${eventName?lower_case}={($event: any) => this.${ctrl.name}_${eventName?lower_case}($event)}
</#list>
</#if>
on-closeview={($event: any) => this.closeView($event)}>
<#if view.hasPSControl('form')>
${P.getCtrlCode('form', 'CONTROL.html').code}
</#if>
</view_${ctrl.getName()}>
\ No newline at end of file
<#assign handler = ctrl.getPSAjaxControlHandler() />
<#-- content -->
<#assign content>
autosave={${ctrl.isEnableAutoSave()?c}}
viewtag={this.viewtag}
showBusyIndicator={${ctrl.isShowBusyIndicator()?c}}
<#if handler.getPSAjaxHandlerActions()??>
<#list handler.getPSAjaxHandlerActions() as action>
<#if action.getPSDEAction()??>
${action.name?lower_case}Action='${action.getPSDEAction().getCodeName()?lower_case}'
</#if>
</#list>
</#if>
style='<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px</#if><#if ctrl.getHeight() gt 0>height: ${ctrl.getHeight()?c}px</#if>'
</#assign>
<#ibizinclude>
./DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
<#assign handler = ctrl.getPSAjaxControlHandler() />
<#-- content -->
<#assign content>
isSingleSelect={this.isSingleSelect}
showBusyIndicator={${ctrl.isShowBusyIndicator()?c}}
searchAction='search<#if handler.getTempMode() gt 0>temp</#if>${handler.getPSDEDataSet().getCodeName()?lower_case}'
<#if handler.getPSAjaxHandlerActions()??>
<#list handler.getPSAjaxHandlerActions() as action>
<#if action.getPSDEAction()??>
${action.name?lower_case}Action='${action.getPSDEAction().getCodeName()?lower_case}'
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
./DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
// this is less
<#if ctrl.getPSSysCsses?? && ctrl.getPSSysCsses()??>
<#list ctrl.getPSSysCsses() as css>
<#if css.getRawCssStyle()?? && css.getRawCssStyle()?length gt 0>
.${css.getCssName()} {
${css.getRawCssStyle()}
}
</#if>
<#if css.getCssStyle()??>
${css.getCssStyle()}
</#if>
</#list>
</#if>
\ No newline at end of file
import React, { PureComponent } from 'react';
// eslint-disable-next-line
import { Form, Input, Row, Col, Tabs, Icon, Collapse } from 'antd';
import './${srffilepath2(ctrl.codeName)}.less';
const { TabPane } = Tabs;
const { Panel } = Collapse;
/**
* ${srfclassname(ctrl.codeName)}
*
* @export
* @class ${srfclassname(ctrl.codeName)}
* @extends {PureComponent}
*/
export default class ${srfclassname(ctrl.codeName)} extends PureComponent {
/**
* 表单数据
*
* @type {*}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public data: any = {};
/**
* 表单分页切换
*
* @param {string} key 分页标识
* @memberof ${srfclassname(ctrl.codeName)}
*/
public tabChange(key: string): void {
}
/**
* 绘制内容
*
* @returns
* @memberof ${srfclassname(ctrl.codeName)}
*/
public render(): any {
return <>
${P.getPartCode(item,'FORM').code}
</>;
}
}
\ No newline at end of file
<template>
<div style="width:800px;margin:0 auto;">
<a-form :form="form" @submit="handleSubmit" :layout="formLayout">
<a-tabs defaultActiveKey="1" @change="callback">
<a-tab-pane tab="Tab 1" key="1">
<a-form-item
:label="formdata.note.labelName"
:label-col="formdata.note.labelCol"
:wrapper-col="formdata.note.wrapperCol"
:help="$t('title.home')"
:required="formdata.note.required"
:validate-status="formdata.note.validateStatus"
:has-feedback="formdata.note.hasFeedback"
>
<a-input
v-decorator="['note',{rules: [{ required: true, message: 'Please input your note!' }]}]"
/>
</a-form-item>
<a-form-item label="Gender" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
<a-select
v-decorator="['gender',{rules: [{ required: true, message: 'Please select your gender!' }]}]"
@change="handleSelectChange"
>
<a-select-option value="male">male</a-select-option>
<a-select-option value="female">female</a-select-option>
</a-select>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="Nickname"
>
<a-input
v-decorator="[
'nickname',
{rules: [{ required: checkNick, message: 'Please input your nickname' }]}
]"
placeholder="Please input your nickname"
/>
</a-form-item>
<a-form-item :label-col="{span:4}" :wrapper-col="{ span: 8, offset: 4 }">
<a-checkbox :checked="checkNick" @change="handleChange">Nickname is required</a-checkbox>
</a-form-item>
<a-form-item :wrapper-col="{ span: 12, offset: 5 }">
<a-button type="primary" html-type="submit">提交</a-button>
</a-form-item>
</a-tab-pane>
<a-tab-pane tab="Tab 2" key="2" forceRender>Content of Tab Pane 2</a-tab-pane>
</a-tabs>
</a-form>
</div>
</template>
<script>
export default {
name: "Demo",
data() {
return {
formLayout: "Inline",
form: this.$form.createForm(this),
formItemLayout: {
labelCol: { span: 5 },
wrapperCol: { span: 12 }
},
checkNick: false,
formdata: {
note: {
labelName: "Note",
labelCol: { span: 5 },
wrapperCol: { span: 12 },
help: "",
required: "true",
validateStatus: "warning",
hasFeedback: true
}
}
};
},
methods: {
callback(key) {
console.log(key);
},
handleSubmit(e) {
e.preventDefault();
this.form.validateFields((err, values) => {
if (!err) {
console.log("Received values of form: ", values);
}
});
},
handleSelectChange(value) {
console.log(value);
this.form.setFieldsValue({
note: `Hi, ${value === "male" ? "man" : "lady"}!`
});
console.log(ComUtil.createUUID());
},
handleChange(e) {
this.checkNick = e.target.checked;
this.$nextTick(() => {
this.form.validateFields(["nickname"], { force: true });
});
}
}
};
</script>
<style scoped>
</style>
...@@ -4,5 +4,4 @@ ...@@ -4,5 +4,4 @@
${P.getCtrlCode('form', 'CONTROL.html').code} ${P.getCtrlCode('form', 'CONTROL.html').code}
</@ibizindent> </@ibizindent>
</#if> </#if>
</div> </div>
\ No newline at end of file
<el-input size="small" v-model={row[column.property]} on-change={($event: any) => this.onColDataChange($index, row, $event, column.property)}></el-input>
\ No newline at end of file
<el-input size="small" v-model={this.data.${item.getViewFieldName()?lower_case}} style="width: 100%;"></el-input>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#if item.getRefPickupPSAppView()??> <#if item.getRefPickupPSAppView()??>
<#assign pickupview=item.getRefPickupPSAppView()> <#assign pickupview=item.getRefPickupPSAppView()>
<app-mpicker url={this.url} activeData={this.data} disabled={this.detailsModel.${item.name}.disabled} curvalue={this.data.${item.name}} name={'${item.name}'} pickupView={{viewname:'${srffilepath2(pickupview.codeName)}'<#if (pickupview.getWidth() gt 0)>, width: ${pickupview.getWidth()?c}</#if><#if (pickupview.getHeight() gt 0)>, height: ${pickupview.getHeight()?c}</#if>, title: '${pickupview.title}' }} on-formitemvaluechange={this.onFormItemValueChange} style="${item.getEditorCssStyle()}"></app-mpicker> <app-mpicker url={this.url} activeData={this.data} disabled={this.detailsModel.${item.name}.disabled} curvalue={this.data.${item.name}} name={'${item.name}'} pickupView={{viewname:'${srffilepath2(pickupview.codeName)}'<#if (pickupview.getWidth() gt 0)>, width: ${pickupview.getWidth()?c}</#if><#if (pickupview.getHeight() gt 0)>, height: ${pickupview.getHeight()?c}</#if>, title: '${pickupview.title}' }} on-formitemvaluechange={this.onFormItemValueChange} style="${item.getEditorCssStyle()}"></app-mpicker>
</#if> </#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#if item.getEditorParam("PICKUPVIEW",true)??> <#if item.getEditorParam("PICKUPVIEW",true)??>
<#if item.getRefPickupPSAppView()??> <#if item.getRefPickupPSAppView()??>
<#assign pickupview = item.getRefPickupPSAppView()> <#assign pickupview = item.getRefPickupPSAppView()>
<app-picker formState={this.formState} data={this.data} itemParam={<#if item.getItemParam()??>${item.getItemParam()}<#else>{}</#if>} disabled={this.detailsModel.${item.name}.disabled} name='${item.name}' valueitem='${item.getValueItemName()}' value={this.data.${item.name}} refviewname='${srffilepath2(pickupview.getCodeName())}' url={this.url} editortype="pickup-no-ac" <#if item.getRefPickupPSAppView()??><#assign pickupview=item.getRefPickupPSAppView()>pickupView={{ viewname: '${srffilepath2(pickupview.codeName)}'<#if (pickupview.getWidth() gt 0)>, width: ${pickupview.getWidth()?c}</#if><#if (pickupview.getHeight() gt 0)>, height: ${pickupview.getHeight()?c}</#if>, title: '${pickupview.title}' }}</#if> style="${item.getEditorCssStyle()}" on-formitemvaluechange={this.onFormItemValueChange}></app-picker> <app-picker formState={this.formState} data={this.data} itemParam={<#if item.getItemParam()??>${item.getItemParam()}<#else>{}</#if>} disabled={this.detailsModel.${item.name}.disabled} name='${item.name}' valueitem='${item.getValueItemName()}' value={this.data.${item.name}} refviewname='${srffilepath2(pickupview.getCodeName())}' url={this.url} editortype="pickup-no-ac" <#if item.getRefPickupPSAppView()??><#assign pickupview=item.getRefPickupPSAppView()>pickupView={{ viewname: '${srffilepath2(pickupview.codeName)}'<#if (pickupview.getWidth() gt 0)>, width: ${pickupview.getWidth()?c}</#if><#if (pickupview.getHeight() gt 0)>, height: ${pickupview.getHeight()?c}</#if>, title: '${pickupview.title}' }}</#if> style="${item.getEditorCssStyle()}" on-formitemvaluechange={this.onFormItemValueChange}></app-picker>
</#if> </#if>
</#if> </#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<span>{this.data.${item.getViewFieldName()?lower_case}}</span>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.tsx.ftl</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
// this is less
${P.getLayoutCode().code}
\ No newline at end of file
import React, { PureComponent } from 'react';
import './${srffilepath2(view.getCodeName())}.less';
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() == 'FORM'>
<#if ctrl.getPSDataEntity?? && ctrl.getPSDataEntity()??>
import ${ctrl.getCodeName()}${ctrl.getName()} from '../../../forms/${srffilepath2(ctrl.getPSDataEntity().getCodeName())}/${srffilepath2(ctrl.getCodeName())}/${srffilepath2(ctrl.getCodeName())}';
</#if>
</#if>
</#list>
</#if>
/**
* ${srfclassname(view.name)}
*
* @export
* @class ${srfclassname(view.name)}
* @extends {PureComponent}
*/
export default class ${srfclassname(view.name)} extends PureComponent {
/**
* 绘制内容
*
* @returns
* @memberof ${srfclassname(view.name)}
*/
public render() {
return <>
<@ibizindent blank=12>
${P.getLayoutCode().code}
</@ibizindent>
</>;
}
}
\ No newline at end of file
<template>
<#ibizinclude>
../@MACRO/HTML/LAYOUTPANEL_VIEW.html.ftl
</#ibizinclude>
</template>
<script>
export default {
name: "Demo",
data() {
return {
formLayout: "Inline",
form: this.$form.createForm(this),
formItemLayout: {
labelCol: { span: 5 },
wrapperCol: { span: 12 }
},
checkNick: false,
formdata: {
note: {
labelName: "Note",
labelCol: { span: 5 },
wrapperCol: { span: 12 },
help: "",
required: "true",
validateStatus: "warning",
hasFeedback: true
}
}
};
},
methods: {
callback(key) {
console.log(key);
},
handleSubmit(e) {
e.preventDefault();
this.form.validateFields((err, values) => {
if (!err) {
console.log("Received values of form: ", values);
}
});
},
handleSelectChange(value) {
console.log(value);
this.form.setFieldsValue({
note: `Hi, ${value === "male" ? "man" : "lady"}!`
});
console.log(ComUtil.createUUID());
},
handleChange(e) {
this.checkNick = e.target.checked;
this.$nextTick(() => {
this.form.validateFields(["nickname"], { force: true });
});
}
}
};
</script>
<style scoped>
<#ibizinclude>
../@MACRO/CSS/LAYOUTPANEL_VIEW.css.ftl
</#ibizinclude>
</style>
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
// App.less
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
import React, { PureComponent } from 'react';
<#if app.getAllPSAppViews()??>
<#list app.getAllPSAppViews() as view>
<#if view.getViewType() == "DEEDITVIEW">
import ${srfclassname(view.getCodeName())} from './pages/${srffilepath2(view.getPSAppModule().getCodeName())}/${srffilepath2(view.getCodeName())}/${srffilepath2(view.getCodeName())}';
</#if>
</#list>
</#if>
import './App.less';
import { Tabs } from 'antd';
const { TabPane } = Tabs;
/**
* App
*
* @export
* @class App
* @extends {PureComponent}
*/
export default class App extends PureComponent {
/**
*
*
* @returns
* @memberof App
*/
public render() {
return <div className="App">
<#if app.getAllPSAppViews()??>
<Tabs defaultActiveKey="1">
<#list app.getAllPSAppViews() as view>
<#if view.getViewType() == "DEEDITVIEW">
<TabPane tab="<#if view.getCaption()??>${view.getCaption()}<#else>未知</#if>" key="${view_index}">
<${srfclassname(view.getCodeName())}/>
</TabPane>
</#if>
</#list>
</Tabs>
</#if>
</div>;
}
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<template>
<div id="app">
<Demo />
</div>
</template>
<script>
import Demo from "@pages/Demo.vue";
export default {
name: "app",
components: {
Demo
}
};
</script>
<style>
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_FORM
</#ibiztemplate>
${P.getCtrlCode('CONTROL.less').code}
\ No newline at end of file
<#ibiztemplate> <#ibiztemplate>
TARGET=PSAPPVIEWCTRL_FORM TARGET=PSAPPVIEWCTRL_FORM
</#ibiztemplate> </#ibiztemplate>
${P.getCtrlCode('CONTROL.tsx').code} ${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file \ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
import Vue from 'vue'
import App from './App.vue'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import ComUtil from '@utils/ComUtil'
Vue.config.productionTip = false
Vue.use(Antd)
new Vue({
render: h => h(App),
}).$mount('#app')
<#ibiztemplate>
TARGET=PSAPPVIEW
TEMPLFILE=VIEW.less
</#ibiztemplate>
\ No newline at end of file
<#ibiztemplate> <#ibiztemplate>
TARGET=PSAPPVIEW TARGET=PSAPPVIEW
TEMPLFILE=VIEW.tsx TEMPLFILE=VIEW.vue
</#ibiztemplate> </#ibiztemplate>
\ No newline at end of file
MIT License
Copyright (c) 2019 inori
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# super-form-two
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn run serve
```
### Compiles and minifies for production
```
yarn run build
```
### Run your tests
```
yarn run test
```
### Lints and fixes files
```
yarn run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/app'
]
}
const path = require('path');
const os = require('os');
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: './',
// 输出文件目录
outputDir: 'dist',
// 去除 map 文件
productionSourceMap: false,
devServer: {
host: '0.0.0.0',
port: 8111,
compress: true,
disableHostCheck: true,
},
pages: {
index: {
// page 的入口
entry: 'src/main.js',
// 模板来源
template: 'public/index.html',
// 在 dist/index.html 的输出
filename: 'index.html',
// 当使用 title 选项时,
// template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
title: '超级表单首页',
}
},
chainWebpack: (config) => {
const pages = ['index'];
pages.forEach((str) => {
// 删除自动计算预加载资源
config.plugins.delete('preload-' + str);
// 删除预加载资源
config.plugins.delete('prefetch-' + str);
});
config.resolve.alias
.set('@components', resolve('src/components'))
.set('@utils', resolve('src/common/utils'))
.set('@pages', resolve('src/pages'))
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册