Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz4jVue
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
iBiz4jVue
提交
5cbe7ba3
提交
5cbe7ba3
编写于
5月 06, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zpc --- 调整提交流程逻辑
上级
20a4d263
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
20 行增加
和
26 行删除
+20
-26
FORM.ts.ftl
@CONTROL/@MACRO/SERVICE/FORM.ts.ftl
+4
-3
CONTROL-BASE.vue.ftl
@CONTROL/表单/CONTROL-BASE.vue.ftl
+3
-2
VIEW-BASE.vue.ftl
@VIEW/实体工作流动态编辑视图/VIEW-BASE.vue.ftl
+13
-21
未找到文件。
@CONTROL/@MACRO/SERVICE/FORM.ts.ftl
浏览文件 @
5cbe7ba3
...
@@ -129,20 +129,21 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
...
@@ -129,20 +129,21 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
*/
@Errorlog
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean
,localdata?:any
): Promise<any> {
data = this.handleWFData(data,true);
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context;
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading);
result = _appEntityService[action](context,data, isloading
,localdata
);
} else {
} else {
result = this.appEntityService.
Create(context,data, isloading
);
result = this.appEntityService.
WFSubmit(context,data, isloading,localdata
);
}
}
result.then((response) => {
result.then((response) => {
this.handleResponse(action, response);
this.handleResponse(action, response);
...
...
@CONTROL/表单/CONTROL-BASE.vue.ftl
浏览文件 @
5cbe7ba3
...
@@ -1146,10 +1146,11 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
...
@@ -1146,10 +1146,11 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* 工作流提交
* 工作流提交
*
*
* @param {*} [data={}]
* @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
*/
protected async wfsubmit(data: any): Promise<any> {
protected async wfsubmit(data: any
,localdata?:any
): Promise<any> {
return new Promise((resolve: any, reject: any) => {
return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){
if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表单WFSubmitAction参数未配置' });
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表单WFSubmitAction参数未配置' });
...
@@ -1161,7 +1162,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
...
@@ -1161,7 +1162,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (!arg.${ctrl.getPSAppDataEntity().getCodeName()?lower_case} || Object.is(arg.${ctrl.getPSAppDataEntity().getCodeName()?lower_case}, '')) {
if (!arg.${ctrl.getPSAppDataEntity().getCodeName()?lower_case} || Object.is(arg.${ctrl.getPSAppDataEntity().getCodeName()?lower_case}, '')) {
return;
return;
}
}
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator
,localdata
);
post.then((response:any) =>{
post.then((response:any) =>{
const arg:any = response.data;
const arg:any = response.data;
if(this.viewparams){
if(this.viewparams){
...
...
@VIEW/实体工作流动态编辑视图/VIEW-BASE.vue.ftl
浏览文件 @
5cbe7ba3
...
@@ -45,30 +45,22 @@
...
@@ -45,30 +45,22 @@
* @memberof ${srfclassname('${view.codeName}')}Base
* @memberof ${srfclassname('${view.codeName}')}Base
*/
*/
public dynamic_toolbar_click(linkItem:any, $event:any){
public dynamic_toolbar_click(linkItem:any, $event:any){
(this.$refs.form as any).save().then((response:any) =>{
let datas: any[] = [];
let requestData:any = Object.assign(linkItem,{activedata:response.data});
let xData: any = this.$refs.form;
this.appEntityService.WFSubmit(JSON.parse(JSON.stringify(this.context)),JSON.parse(JSON.stringify(requestData)),true,true).then((res:any) =>{
if (xData.getDatas && xData.getDatas instanceof Function) {
if (response && response.status === 200) {
datas = [...xData.getDatas()];
this.$Notice.success({ title: '成功', desc: linkItem.sequenceFlowName+'操作成功' });
}
}).catch((res: any) => {
if (res && res.status) {
this.$Notice.error({ title: '错误', desc: res.message });
return;
}
if (!res || !res.status || !res.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
return;
}
}
});
xData.wfsubmit(datas,linkItem).then((response: any) => {
}).catch((response: any) => {
if (!response || response.status !== 200) {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
return;
return;
}
}
if (!response || !response.status || !response.data) {
const { data: _data } = response;
this.$Notice.error({ title: '错误', desc: '系统异常' });
return;
if (this.viewdata) {
this.$emit('viewdataschange', [{ ..._data }]);
this.$emit('close');
} else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
}
});
});
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录