Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
inori_templ
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
junzai001
inori_templ
提交
0edcfef8
提交
0edcfef8
编写于
9月 16, 2019
作者:
neko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
71fcc009
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
78 行增加
和
4 行删除
+78
-4
CONTROL.tsx.ftl
@CONTROL/表单/CONTROL.tsx.ftl
+78
-4
未找到文件。
@CONTROL/表单/CONTROL.tsx.ftl
浏览文件 @
0edcfef8
...
@@ -21,7 +21,7 @@ export interface ${srfclassname(ctrl.codeName)}FormData {
...
@@ -21,7 +21,7 @@ export interface ${srfclassname(ctrl.codeName)}FormData {
* @type {*}
* @type {*}
* @memberof ${srfclassname(ctrl.codeName)}FormData
* @memberof ${srfclassname(ctrl.codeName)}FormData
*/
*/
${item.getName()}: any;
${item.getName()}
?
: any;
</#if>
</#if>
</#list>
</#list>
}
}
...
@@ -62,13 +62,33 @@ export default class ${srfclassname(ctrl.codeName)} extends PureComponent<${srfc
...
@@ -62,13 +62,33 @@ export default class ${srfclassname(ctrl.codeName)} extends PureComponent<${srfc
* @type {*}
* @type {*}
* @memberof ${srfclassname(ctrl.codeName)}
* @memberof ${srfclassname(ctrl.codeName)}
*/
*/
public data: any = {};
public data: ${srfclassname(ctrl.codeName)}FormData = {};
/**
* 在组件接收到一个新的 prop (或更新后)时被调用
*
* @memberof IBizViewController
*/
public componentWillReceiveProps(nextProps: Readonly<${srfclassname(ctrl.codeName)}Props>, nextContext: any) {
if (this.data && nextProps.data && !Object.is(JSON.stringify(this.data), JSON.stringify(nextProps.data))) {
Object.assign(this.data, nextProps.data);
}
}
/**
* 在组件从 DOM 中移除的时候立刻被调用
*
* @memberof IBizViewController
*/
public componentWillUnmount() {
}
/**
/**
* 属性值规则
* 属性值规则
*
*
* @type {*}
* @type {*}
* @memberof ${srfclassname(
'${ctrl.codeName}'
)}
* @memberof ${srfclassname(
ctrl.codeName
)}
*/
*/
public rules: any = {
public rules: any = {
<#list ctrl.getAllPSDEFormDetails() as formdetail>
<#list ctrl.getAllPSDEFormDetails() as formdetail>
...
@@ -86,7 +106,7 @@ export default class ${srfclassname(ctrl.codeName)} extends PureComponent<${srfc
...
@@ -86,7 +106,7 @@ export default class ${srfclassname(ctrl.codeName)} extends PureComponent<${srfc
* 详情模型集合
* 详情模型集合
*
*
* @type {*}
* @type {*}
* @memberof ${srfclassname(
'${ctrl.codeName}'
)}
* @memberof ${srfclassname(
ctrl.codeName
)}
*/
*/
public detailsModel: any = {
public detailsModel: any = {
<#list ctrl.getAllPSDEFormDetails() as formdetail>
<#list ctrl.getAllPSDEFormDetails() as formdetail>
...
@@ -97,6 +117,60 @@ export default class ${srfclassname(ctrl.codeName)} extends PureComponent<${srfc
...
@@ -97,6 +117,60 @@ export default class ${srfclassname(ctrl.codeName)} extends PureComponent<${srfc
</#if>
</#if>
};
};
/**
* 表单逻辑
*
* @private
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ${srfclassname(ctrl.codeName)}
*/
private formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
<#if P.getPartCode(item,'FORM_LOGIC').code?length gt 0>
${P.getPartCode(item,'FORM_LOGIC').code}
</#if>
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as formitem>
<#if formitem.getPSDEFormItemUpdate()??>
<#assign itemUpdate=formitem.getPSDEFormItemUpdate()/>
if(Object.is(name, '${formitem.name}')){
const details: string[] = [<#list itemUpdate.getPSDEFIUpdateDetails() as detail><#if detail_index gt 0>, </#if>'${detail.getPSDEFormDetailName()?lower_case}'</#list>];
this.updateFormItems('${itemUpdate.codeName}', this.data, details, ${itemUpdate.isShowBusyIndicator()?c});
}
</#if>
</#list>
</#if>
}
<#list ctrl.getAllPSDEFormDetails() as formdetail>
<#if formdetail.getDetailType?? && formdetail.getDetailType() == 'BUTTON'>
<#if formdetail.getActionType?? && formdetail.getActionType()??>
<#if formdetail.getActionType() == 'UIACTION'>
/**
* 表单 ${formdetail.getCaption()} 事件
*
* @memberof @memberof ${srfclassname('${ctrl.codeName}')}
*/
public ${formdetail.getName()}_click($event: any): void {
alert('需自定义实现');
}
</#if>
<#if formdetail.getActionType() == 'FIUPDATE'>
/**
* 表单 ${formdetail.getCaption()} 事件
*
* @memberof @memberof ${srfclassname('${ctrl.codeName}')}
*/
public ${formdetail.getName()}_click($event: any): void {
alert('需自定义实现');
}
</#if>
</#if>
</#if>
</#list>
/**
/**
* 表单分页切换
* 表单分页切换
*
*
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录