Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
2236426b
提交
2236426b
编写于
11月 04, 2022
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
4ce89950
变更
4
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
97 行增加
和
4 行删除
+97
-4
DATA_CREATEOBJECT.ftl
...PANEL/VIEW_LAYOUTPANEL_UIACTION/SYS/DATA_CREATEOBJECT.ftl
+23
-1
DATA_REMOVEOBJECT.ftl
...PANEL/VIEW_LAYOUTPANEL_UIACTION/SYS/DATA_REMOVEOBJECT.ftl
+28
-1
DATA_SAVECHANGES.ftl
...TPANEL/VIEW_LAYOUTPANEL_UIACTION/SYS/DATA_SAVECHANGES.ftl
+37
-1
DATA_SYNCHRONIZE.ftl
...TPANEL/VIEW_LAYOUTPANEL_UIACTION/SYS/DATA_SYNCHRONIZE.ftl
+9
-1
未找到文件。
@VIEW/@MACRO/VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_UIACTION/SYS/DATA_CREATEOBJECT.ftl
浏览文件 @
2236426b
...
...
@@ -12,6 +12,28 @@
* @param {*} [srfParentDeName] 父实体名称
*/
public ${item.getFullCodeName()}(args: any[], context: any = {}, params: any = {}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?: string) {
// TODO 建立数据
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??>
// 准备上下文参数
const tempContext = {...context};
if (xData && xData.context) {
Object.assign(tempContext, xData.context);
}
const data = args[0];
const appEntityService: ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service = new ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service();
if (data.hasOwnProperty(appEntityService.APPDEKEY.toLowerCase())) {
delete data[appEntityService.APPDEKEY.toLowerCase()];
}
try {
appEntityService.Create(tempContext, Data).then((response: any) => {
if (!response.status || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '当前环境无法执行建立数据逻辑[执行行为异常]' });
}
})
} catch (error: any) {
this.$Notice.error({ title: '错误', desc: '当前环境无法执行建立数据逻辑[执行行为异常]' });
}
<#else>
this.$Notice.error({ title: '错误', desc: '建立数据行未配置实体' });
</#if>
}
</#macro>
\ No newline at end of file
@VIEW/@MACRO/VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_UIACTION/SYS/DATA_REMOVEOBJECT.ftl
浏览文件 @
2236426b
...
...
@@ -12,6 +12,33 @@
* @param {*} [srfParentDeName] 父实体名称
*/
public ${item.getFullCodeName()}(args: any[], context: any = {}, params: any = {}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?: string) {
// TODO 删除数据
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??>
// 准备上下文参数
const tempContext = {...context};
if (xData && xData.context) {
Object.assign(tempContext, xData.context);
}
const data = args[0];
const appEntityService: ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service = new ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service();
const key = appEntityService.APPDEKEY.toLowerCase();
const name = appEntityService.APPDENAME.toLowerCase();
if (data.hasOwnProperty(name)) {
Object.assign(tempContext, { [name]: data[name] });
}
if (data.hasOwnProperty(key)) {
Object.assign(tempContext, { [name]: data[key] });
}
try {
appEntityService.Remove(tempContext, Data).then((response: any) => {
if (!response.status || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '当前环境无法执行删除数据逻辑[执行行为异常]' });
}
})
} catch (error: any) {
this.$Notice.error({ title: '错误', desc: '当前环境无法执行删除数据逻辑[执行行为异常]' });
}
<#else>
this.$Notice.error({ title: '错误', desc: '删除数据行未配置实体' });
</#if>
}
</#macro>
\ No newline at end of file
@VIEW/@MACRO/VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_UIACTION/SYS/DATA_SAVECHANGES.ftl
浏览文件 @
2236426b
...
...
@@ -12,6 +12,42 @@
* @param {*} [srfParentDeName] 父实体名称
*/
public ${item.getFullCodeName()}(args: any[], context: any = {}, params: any = {}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?: string) {
// TODO 保存变更
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??>
// 准备上下文参数
const tempContext = {...context};
if (xData && xData.context) {
Object.assign(tempContext, xData.context);
}
const data = args[0];
let action: string | undefined = undefined;
const appEntityService: ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service = new ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service();
const key = appEntityService.APPDEKEY.toLowerCase();
const name = appEntityService.APPDENAME.toLowerCase();
if (data.hasOwnProperty(key) || data.hasOwnProperty(name)) {
if (data.hasOwnProperty(key)) {
Object.assign(context, { [name]: data[key] });
} else {
Object.assign(context, { [name]: data[name] });
}
action = 'Update';
} else {
action = 'Create';
}
try {
if (action) {
appEntityService[action](tempContext, Data).then((response: any) => {
if (!response.status || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '当前环境无法执行保存变更逻辑[执行行为异常]' });
}
})
} else {
this.$Notice.error({ title: '错误', desc: '当前环境无法执行保存变更逻辑[执行行为异常]' });
}
} catch (error: any) {
this.$Notice.error({ title: '错误', desc: '当前环境无法执行保存变更逻辑[执行行为异常]' });
}
<#else>
this.$Notice.error({ title: '错误', desc: '建立数据行为配置实体' });
</#if>
}
</#macro>
\ No newline at end of file
@VIEW/@MACRO/VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_UIACTION/SYS/DATA_SYNCHRONIZE.ftl
浏览文件 @
2236426b
...
...
@@ -12,6 +12,14 @@
* @param {*} [srfParentDeName] 父实体名称
*/
public ${item.getFullCodeName()}(args: any[], context: any = {}, params: any = {}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?: string) {
// TODO 同步数据
if (xData) {
if (xData.refresh && (xData.refresh instanceof Function)) {
xData.refresh();
} else if (xData.refreshDataArea && (xData.refreshDataArea instanceof Function)) {
xData.refreshDataArea();
} else {
this.$Notice.error({ title: '错误', desc: '同步数据行为未实现' });
}
}
}
</#macro>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录