Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-Mob-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-Mob-R7
提交
aea08d5c
提交
aea08d5c
编写于
9月 03, 2021
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:补充工作流开始流程
上级
983e1f86
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
151 行增加
和
14 行删除
+151
-14
CONTROL-BASE.vue.ftl
@CONTROL/表单/CONTROL-BASE.vue.ftl
+42
-9
LOGIC.vue.ftl
@LOGIC/@UIACTION/系统预置/sys/开始流程/LOGIC.vue.ftl
+93
-5
VIEW-BASE.vue.ftl
@VIEW/实体移动端编辑视图/VIEW-BASE.vue.ftl
+16
-0
未找到文件。
@CONTROL/表单/CONTROL-BASE.vue.ftl
浏览文件 @
aea08d5c
...
...
@@ -1324,21 +1324,54 @@ import { Util } from '@/ibiz-core/utils';
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected async wfsubmit(data: any, linkItem: any, datas: any): Promise<any> {
const arg: any = { ...data };
Object.assign(arg, this.viewparams, linkItem);
if (!(await this.validAll())) {
this.$notice.error('值规则校验错误');
}
return new Promise((resolve: any, reject: any) => {
const arg: any = data[0];
Object.assign(arg, linkItem);
const copyData: any = Util.deepCopy(arg);
Object.assign(copyData, this.viewparams);
Object.assign(arg, { viewparams: copyData });
if (!arg['${ctrl.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()?lower_case}']) {
return;
}
const submitData: Function = (arg: any, responseData: any) => {
// 准备工作流数据,填充未存库数据
let tempWFData: any = {};
if (copyData && Object.keys(copyData).length > 0) {
Object.keys(copyData).forEach((key: string) => {
if ((!arg.hasOwnProperty(key)) || (!arg[key] && copyData[key])) {
tempWFData[key] = copyData[key];
}
})
}
// 准备提交参数
if (this.viewparams) {
Object.assign(responseData, this.viewparams);
}
if (tempWFData && Object.keys(tempWFData).length > 0) {
Object.assign(responseData, tempWFData);
}
Object.assign(arg, { viewparams: responseData });
// 强制补充srfwfmemo
if (this
.srfwfmemo) {
Object.assign(datas, { srfwfmemo: this
.srfwfmemo });
if (copyData
.srfwfmemo) {
Object.assign(arg, { srfwfmemo: copyData
.srfwfmemo });
}
const response: any = await this.service.wfsubmit(this.currentAction, { ...this.context }, datas, this.showBusyIndicator, arg);
this.service.wfsubmit(this.WFSubmitAction, { ...this.context }, datas, this.showBusyIndicator, arg).then((response: any) => {
if (response && response.status === 200) {
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
return response
resolve(response);
} else if (response && response.status !== 401) {
return response;
resolve(response)
}
}).catch((response: any) => {
reject(response);
})
}
const formData: any = this.getData();
submitData(arg, formData);
})
}
</#if>
...
...
@LOGIC/@UIACTION/系统预置/sys/开始流程/LOGIC.vue.ftl
浏览文件 @
aea08d5c
...
...
@@ -12,10 +12,97 @@
* @memberof <#if item.getPSControlContainer?? && item.getPSControlContainer()??>${srfclassname('${item.getPSControlContainer().name}')}Base</#if>
*/
public async ${item.getFullCodeName()}(args: any[], contextJO: any = {}, paramJO: any = {}, $event?: any, xData?: any, container?: any, srfParentDeName?: string): Promise<any> {
let response: any;
if (xData && xData.wfstart instanceof Function) {
const _data = {};
response = await xData.wfstart(args);
const that: any = container;
if (!xData || !(xData.wfstart instanceof Function) || !(that.appEntityService)) {
return;
}
return response;
let validateStatus: boolean = true;
if (xData.validAll instanceof Function) {
validateStatus = await xData.validAll();
}
if (!validateStatus) {
return;
}
const startWorkFlow: Function = (param: any, localdata: any) => {
xData.wfstart(param, localdata).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
that.closeView(_data);
});
}
const openStartView: Function = async (item: any, localdata: any) => {
if (item['wfversion']) {
<#noparase>const targetView: any = that.viewRefData ? that.viewRefData[`WFSTART@${item['wfversion']}`] : null;</#noparse>
if (targetView) {
const tempContext = Util.deepCopy(that.context);
<#noparase>const tempViewParams = { actionView: `WFSTART@${item['wfversion']}`, actionForm: item['process-form'] };</#noparse>
ViewOpenService.getInstance().openModal(targetView, tempContext, tempViewParams).then((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
const tempSubmitData: any = Util.deepCopy(args[0]);
if (result.datas && result.datas[0]) {
const resultData: any = result.datas[0];
if (Object.keys(resultData).length > 0) {
let tempData: any = {};
Object.keys(resultData).forEach((key: any) => {
if (resultData[key] || (resultData[key] === 0) || (resultData[key] === false)) {
tempData[key] = resultData[key];
}
})
Object.assign(tempSubmitData, tempData);
}
}
startWorkFlow([tempSubmitData], localdata);
})
} else {
startWorkFlow(args, localdata);
}
} else {
startWorkFlow(args, localdata);
}
}
let localData: any;
const localContext = Util.deepCopy(that.context);
const requestResult: Promise<any> = that.appEntityService.getStandWorkflow(localContext);
requestResult.then((response: any) => {
const { data: targetData, status } = response;
if (status !== 200 || targetData.length === 0) {
return;
}
if (targetData && targetData.length > 1) {
const h = that.$createElement;
const msgBoxContent = h('app-wfversion-select', {
props: {
versionItems: targetData,
majorKey: 'definitionkey',
versionTitle: 'definitionname'
},
on: {
valueChange: (value: any) => {
localData = { processDefinitionKey: value };
}
}
});
ViewOpenService.getInstance().openMsgBox({
type: 'info',
title: '请选择流程版本',
showCancelButton: true,
content: msgBoxContent
}).then((result: boolean) => {
if (result === true) {
const targetItem = targetData.find((item: any) => {
return item.definitionkey === localData.processDefinitionKey;
})
openStartView(targetItem, localData);
}
})
} else {
localData = { processDefinitionKey: targetData[0]['definitionkey'] }
targetData[0]['process-view'] = "WFSTART@1";
openStartView(targetData[0], localData);
}
})
}
\ No newline at end of file
@VIEW/实体移动端编辑视图/VIEW-BASE.vue.ftl
浏览文件 @
aea08d5c
...
...
@@ -32,6 +32,22 @@
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 视图引用数据
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public viewRefData: any[] = {
<#if view.getPSAppViewRefs?? && view.getPSAppViewRefs()??>
<#list view.getPSAppViewRefs() as viewRef>
<#if viewRef.getName?? && viewRef.getName()?? && viewRef.getRefPSAppView?? && viewRef.getRefPSAppView()??>
<#assign refAppView = viewRef.getRefPSAppView() />
"${viewRef.getName()}":{viewname:"${srffilepath2(refAppView.getCodeName())}",title:"<#if refAppView.getPSAppDataEntity()??>entities.${refAppView.getPSAppDataEntity().getCodeName()?lower_case}.views.${refAppView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${refAppView.getCodeName()?lower_case}.caption</#if>", width: <#if refAppView.getWidth?? && refAppView.getWidth() gt 0>${refAppView.getWidth()?c}<#else>800</#if>, height: <#if refAppView.getHeight?? && refAppView.getHeight() gt 0>${refAppView.getHeight()?c}<#else>500</#if>}<#if viewRef_has_next>,</#if>
</#if>
</#list>
</#if>
};
/**
* 保存
*
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录