fmui-base 2.1.7 → 2.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.1.9:弹出选择组件双击后返回报错
7
+ - 2.1.8:流程表单支持自动保存设置
6
8
  - 2.1.7:移动选人bug
7
9
  - 2.1.6:增加二开自定义按钮的扩展方法
8
10
  - 2.1.5:退回流程提交到退回活动,默认勾选
@@ -47,81 +47,81 @@ exports.default = {
47
47
  read2: urlPrefix + 'queryProcessPage?type=3&module=' + '&token=' + getLoginUserInfo().token,
48
48
  myself2: urlPrefix + 'queryProcessPage?type=4&module=' + '&token=' + getLoginUserInfo().token
49
49
  },
50
- queryProcessInfo: urlPrefix + 'queryProcessInfo' + '?token=' + getLoginUserInfo().token, //获取流程详情
51
- getFlowRecord: urlPrefix + 'getFlowRecord' + '?token=' + getLoginUserInfo().token, //获取流程详情
52
- operateProcess: urlPrefix + 'operateProcess' + '?token=' + getLoginUserInfo().token, //操作流程(审批/驳回/已阅/转交)
53
- getProcessClassifyTree: urlPrefix + 'getProcessClassifyTree' + '?token=' + getLoginUserInfo().token, //获取当前用户可发起流程的分类信息树接口
54
- getFavoriteProcessList: urlPrefix + 'getFavoriteProcessList' + '?token=' + getLoginUserInfo().token, //获取当前用户可发起流程的分类信息树接口
55
- getCommonUseProcess: urlPrefix + 'getCommonUseProcess' + '?token=' + getLoginUserInfo().token, //获取常用流程的接口
56
- operateCommonUseProcess: urlPrefix + 'operateCommonUseProcess' + '?token=' + getLoginUserInfo().token, //添加删除常用流程的接口
57
- batchFavoriteProcess: urlPrefix + 'batchFavoriteProcess' + '?token=' + getLoginUserInfo().token, //批量添加常用流程的接口
58
- getRemindBadgeCount: urlPrefix + 'getRemindBadgeCount' + '?token=' + getLoginUserInfo().token, //分类统计小红点
59
- queryProcessForm: urlPrefix + 'getMobileForm' + '?token=' + getLoginUserInfo().token, //获取流程表单
60
- getRelaFieldsMap: formUrlPrefix + 'relafield/getRelaFieldsMap' + '?token=' + getLoginUserInfo().token, //获取关联表单字段
50
+ queryProcessInfo: urlPrefix + 'queryProcessInfo' + '?', //获取流程详情
51
+ getFlowRecord: urlPrefix + 'getFlowRecord' + '?', //获取流程详情
52
+ operateProcess: urlPrefix + 'operateProcess' + '?', //操作流程(审批/驳回/已阅/转交)
53
+ getProcessClassifyTree: urlPrefix + 'getProcessClassifyTree' + '?', //获取当前用户可发起流程的分类信息树接口
54
+ getFavoriteProcessList: urlPrefix + 'getFavoriteProcessList' + '?', //获取当前用户可发起流程的分类信息树接口
55
+ getCommonUseProcess: urlPrefix + 'getCommonUseProcess' + '?', //获取常用流程的接口
56
+ operateCommonUseProcess: urlPrefix + 'operateCommonUseProcess' + '?', //添加删除常用流程的接口
57
+ batchFavoriteProcess: urlPrefix + 'batchFavoriteProcess' + '?', //批量添加常用流程的接口
58
+ getRemindBadgeCount: urlPrefix + 'getRemindBadgeCount' + '?', //分类统计小红点
59
+ queryProcessForm: urlPrefix + 'getMobileForm' + '?', //获取流程表单
60
+ getRelaFieldsMap: formUrlPrefix + 'relafield/getRelaFieldsMap' + '?', //获取关联表单字段
61
61
 
62
- getComponentInfoList: urlBasicPrefix + 'mobilehall/mobileoffice/getComponentInfoList' + '?token=' + getLoginUserInfo().token, //获取关联表单字段
62
+ getComponentInfoList: urlBasicPrefix + 'mobilehall/mobileoffice/getComponentInfoList' + '?', //获取关联表单字段
63
63
 
64
64
 
65
- startProcess: approveUrlPrefix + 'startProcess' + '?token=' + getLoginUserInfo().token, // 启动流程的接口
66
- claimTask: approveUrlPrefix + 'claimTask' + '?token=' + getLoginUserInfo().token, //校验流程
67
- saveForm: approveUrlPrefix + 'saveForm' + '?token=' + getLoginUserInfo().token, //保存到草稿箱
68
- sendFlow: approveUrlPrefix + "sendFlow" + '?token=' + getLoginUserInfo().token, //办理发送流程
69
- getCanBackActivity: approveUrlPrefix + "getCanBackActivity" + '?token=' + getLoginUserInfo().token, //获得驳回节点
70
- back: approveUrlPrefix + "back" + '?token=' + getLoginUserInfo().token, //驳回
71
- transferFlow: approveUrlPrefix + "transferFlow" + '?token=' + getLoginUserInfo().token, //转交
72
- createReadTask: approveUrlPrefix + "createReadTask" + '?token=' + getLoginUserInfo().token, //传阅
73
- forwardReadTask: approveUrlPrefix + "forwardReadTask" + '?token=' + getLoginUserInfo().token, //转发
74
- sendMail: approveUrlPrefix + "sendMail" + '?token=' + getLoginUserInfo().token, //邮件转发
75
- readCompleteTask: approveUrlPrefix + "readCompleteTask" + '?token=' + getLoginUserInfo().token, //已阅
76
- suspendProcess: approveUrlPrefix + "suspendProcess" + '?token=' + getLoginUserInfo().token, //取消流程
65
+ startProcess: approveUrlPrefix + 'startProcess' + '?', // 启动流程的接口
66
+ claimTask: approveUrlPrefix + 'claimTask' + '?', //校验流程
67
+ saveForm: approveUrlPrefix + 'saveForm' + '?', //保存到草稿箱
68
+ sendFlow: approveUrlPrefix + "sendFlow" + '?', //办理发送流程
69
+ getCanBackActivity: approveUrlPrefix + "getCanBackActivity" + '?', //获得驳回节点
70
+ back: approveUrlPrefix + "back" + '?', //驳回
71
+ transferFlow: approveUrlPrefix + "transferFlow" + '?', //转交
72
+ createReadTask: approveUrlPrefix + "createReadTask" + '?', //传阅
73
+ forwardReadTask: approveUrlPrefix + "forwardReadTask" + '?', //转发
74
+ sendMail: approveUrlPrefix + "sendMail" + '?', //邮件转发
75
+ readCompleteTask: approveUrlPrefix + "readCompleteTask" + '?', //已阅
76
+ suspendProcess: approveUrlPrefix + "suspendProcess" + '?', //取消流程
77
77
  recall: approveUrlPrefix + "recall", //撤销流程
78
- getNextActivity: approveUrlPrefix + "getNextActivity" + '?token=' + getLoginUserInfo().token, //获取提交的下一个节点
79
- queryFlowChart: approveUrlPrefix + "queryFlowChart" + '?token=' + getLoginUserInfo().token, //查找流程记录
78
+ getNextActivity: approveUrlPrefix + "getNextActivity" + '?', //获取提交的下一个节点
79
+ queryFlowChart: approveUrlPrefix + "queryFlowChart" + '?', //查找流程记录
80
80
  getFlowImage: approveUrlPrefix + "getFlowImage" + '?token=' + getLoginUserInfo().token + "&processInstanceId=", //查找流程图片
81
- addSign: approveUrlPrefix + "addSign" + '?token=' + getLoginUserInfo().token, //加签
82
- getCanJumpActivity: approveUrlPrefix + "getCanJumpActivity" + '?token=' + getLoginUserInfo().token, //跳转流程
83
- jump: approveUrlPrefix + "jump" + '?token=' + getLoginUserInfo().token, //跳转
84
- getDoneTaskListByProcessId: approveUrlPrefix + "getDoneTaskListByProcessId" + '?token=' + getLoginUserInfo().token, //根据流程实例id查询已办
85
- cancelProcess: approveUrlPrefix + 'cancelProcess' + '?token=' + getLoginUserInfo().token, //作废流程
86
- forceEnd: approveUrlPrefix + 'forceEnd' + '?token=' + getLoginUserInfo().token, //结束流程
87
- getUndoTaskInfo: approveUrlPrefix + "getUndoTaskInfo" + '?token=' + getLoginUserInfo().token, //获取待办详情
88
- batchValidateForm: approveUrlPrefix + "batchValidateForm" + '?token=' + getLoginUserInfo().token, //批量校验表单必填
89
- completeTaskBatch: approveUrlPrefix + "completeTaskBatch" + '?token=' + getLoginUserInfo().token, //批量办理
90
- readCompleteTaskBatch: approveUrlPrefix + "readCompleteTaskBatch" + '?token=' + getLoginUserInfo().token, //批量已阅
91
- getPersonalPhrase: approveUrlPrefix + "getPersonalPhrase" + '?token=' + getLoginUserInfo().token, //获取常用语
92
- savePersonalPhrase: approveUrlPrefix + "savePersonalPhrase" + '?token=' + getLoginUserInfo().token, //保存常用语
93
- deletePhrase: approveUrlPrefix + "delPersonalPhrase" + '?token=' + getLoginUserInfo().token, //删除常用语
94
- getAllModuleList: approveUrlPrefix + "getAllModuleList" + '?token=' + getLoginUserInfo().token, //获取模块
95
- urgeFlow: approveUrlPrefix + "urgeFlow" + '?token=' + getLoginUserInfo().token, //催办流程
96
- getListButtonsByCodes: approveUrlPrefix + "getListButtonsByCodes" + '?token=' + getLoginUserInfo().token, //获取按钮
97
- getProcessTitleByProId: approveUrlPrefix + "getProcessTitleByProId" + '?token=' + getLoginUserInfo().token,
98
- getDocumentFileMap: approveUrlPrefix + "getDocumentFileMap" + '?token=' + getLoginUserInfo().token, //根据金格id获取附件id
99
- rollback: approveUrlPrefix + "rollback" + '?token=' + getLoginUserInfo().token, //收回
100
- getRelationProcess: approveUrlPrefix + "getRelationProcess" + '?token=' + getLoginUserInfo().token, //获取关联流程
101
- getLinkFieldValueMap: approveUrlPrefix + "getLinkFieldValueMap" + '?token=' + getLoginUserInfo().token, //获取联动
102
- canRollback: approveUrlPrefix + "canRollback" + '?token=' + getLoginUserInfo().token, //是否可以收回
103
- getDelegateList: approveUrlPrefix + "getDelegateList" + '?token=' + getLoginUserInfo().token, //委托列表
104
- getDelegateViewInfo: approveUrlPrefix + "getDelegateViewInfo" + '?token=' + getLoginUserInfo().token, //委托详情
105
- deleteDelegate: approveUrlPrefix + "deleteDelegate" + '?token=' + getLoginUserInfo().token, //委托删除
106
- getAllProcessList: approveUrlPrefix + "getAllProcessList" + '?token=' + getLoginUserInfo().token, //获取全部流程
107
- editSaveDelegate: approveUrlPrefix + "editSaveDelegate" + '?token=' + getLoginUserInfo().token, //保存委托
108
- signCA: approveUrlPrefix + "signCA" + '?token=' + getLoginUserInfo().token, //CA加签
109
- verifySign: approveUrlPrefix + "verifySign" + '?token=' + getLoginUserInfo().token, //CA验签
110
- getPreTaskInfo: approveUrlPrefix + "getPreTaskInfo" + '?token=' + getLoginUserInfo().token, //获取上一环节CA配置
111
- getApproveCount: approveUrlPrefix + 'getApproveCount?token=' + getLoginUserInfo().token, //获取审批数量
81
+ addSign: approveUrlPrefix + "addSign" + '?', //加签
82
+ getCanJumpActivity: approveUrlPrefix + "getCanJumpActivity" + '?', //跳转流程
83
+ jump: approveUrlPrefix + "jump" + '?', //跳转
84
+ getDoneTaskListByProcessId: approveUrlPrefix + "getDoneTaskListByProcessId" + '?', //根据流程实例id查询已办
85
+ cancelProcess: approveUrlPrefix + 'cancelProcess' + '?', //作废流程
86
+ forceEnd: approveUrlPrefix + 'forceEnd' + '?', //结束流程
87
+ getUndoTaskInfo: approveUrlPrefix + "getUndoTaskInfo" + '?', //获取待办详情
88
+ batchValidateForm: approveUrlPrefix + "batchValidateForm" + '?', //批量校验表单必填
89
+ completeTaskBatch: approveUrlPrefix + "completeTaskBatch" + '?', //批量办理
90
+ readCompleteTaskBatch: approveUrlPrefix + "readCompleteTaskBatch" + '?', //批量已阅
91
+ getPersonalPhrase: approveUrlPrefix + "getPersonalPhrase" + '?', //获取常用语
92
+ savePersonalPhrase: approveUrlPrefix + "savePersonalPhrase" + '?', //保存常用语
93
+ deletePhrase: approveUrlPrefix + "delPersonalPhrase" + '?', //删除常用语
94
+ getAllModuleList: approveUrlPrefix + "getAllModuleList" + '?', //获取模块
95
+ urgeFlow: approveUrlPrefix + "urgeFlow" + '?', //催办流程
96
+ getListButtonsByCodes: approveUrlPrefix + "getListButtonsByCodes" + '?', //获取按钮
97
+ getProcessTitleByProId: approveUrlPrefix + "getProcessTitleByProId" + '?',
98
+ getDocumentFileMap: approveUrlPrefix + "getDocumentFileMap" + '?', //根据金格id获取附件id
99
+ rollback: approveUrlPrefix + "rollback" + '?', //收回
100
+ getRelationProcess: approveUrlPrefix + "getRelationProcess" + '?', //获取关联流程
101
+ getLinkFieldValueMap: approveUrlPrefix + "getLinkFieldValueMap" + '?', //获取联动
102
+ canRollback: approveUrlPrefix + "canRollback" + '?', //是否可以收回
103
+ getDelegateList: approveUrlPrefix + "getDelegateList" + '?', //委托列表
104
+ getDelegateViewInfo: approveUrlPrefix + "getDelegateViewInfo" + '?', //委托详情
105
+ deleteDelegate: approveUrlPrefix + "deleteDelegate" + '?', //委托删除
106
+ getAllProcessList: approveUrlPrefix + "getAllProcessList" + '?', //获取全部流程
107
+ editSaveDelegate: approveUrlPrefix + "editSaveDelegate" + '?', //保存委托
108
+ signCA: approveUrlPrefix + "signCA" + '?', //CA加签
109
+ verifySign: approveUrlPrefix + "verifySign" + '?', //CA验签
110
+ getPreTaskInfo: approveUrlPrefix + "getPreTaskInfo" + '?', //获取上一环节CA配置
111
+ getApproveCount: approveUrlPrefix + 'getApproveCount?', //获取审批数量
112
112
 
113
- getPortalPage: portalUrlPrefix + "getPortalPage" + '?token=' + getLoginUserInfo().token, //移动门户部件详情
114
- getComponentInfoListAll: portalAllUrlPrefix + "getComponentInfoList" + '?token=' + getLoginUserInfo().token, //获取首页部件信息
115
- getNewComAppInfo: portalAllUrlPrefix + "getNewComAppInfo" + '?token=' + getLoginUserInfo().token, //首页部件常用应用
116
- getNewHomePageTodoData: portalAllUrlPrefix + "getNewHomePageTodoData" + '?token=' + getLoginUserInfo().token,
117
- getNewHomePageCollectAppInfoList: portalAllUrlPrefix + "getNewHomePageCollectAppInfoList" + '?token=' + getLoginUserInfo().token,
118
- getNewHomePageRemindCount: portalAllUrlPrefix + "getNewHomePageRemindCount" + '?token=' + getLoginUserInfo().token,
119
- getComAppInfo: portalAllUrlPrefix + 'getComAppInfo?token=' + getLoginUserInfo().token, //获取首页常用应用
120
- saveAppCount: portalAllUrlPrefix + "saveAppCount" + '?token=' + getLoginUserInfo().token, //移动应用保存更新点击次数接口
121
- getAllActivity: approveUrlPrefix + "getAllActivity" + '?token=' + getLoginUserInfo().token, //获取所有节点
122
- getCategoryListByModule: approveUrlPrefix + "getCategoryListByModule" + '?token=' + getLoginUserInfo().token, //获取所有节点
123
- cancelLimit: approveUrlPrefix + "cancelLimit" + '?token=' + getLoginUserInfo().token, //取消超时
124
- getCanCancelLimit: approveUrlPrefix + "getCanCancelLimit" + '?token=' + getLoginUserInfo().token //是否可以取消超时
113
+ getPortalPage: portalUrlPrefix + "getPortalPage" + '?', //移动门户部件详情
114
+ getComponentInfoListAll: portalAllUrlPrefix + "getComponentInfoList" + '?', //获取首页部件信息
115
+ getNewComAppInfo: portalAllUrlPrefix + "getNewComAppInfo" + '?', //首页部件常用应用
116
+ getNewHomePageTodoData: portalAllUrlPrefix + "getNewHomePageTodoData" + '?',
117
+ getNewHomePageCollectAppInfoList: portalAllUrlPrefix + "getNewHomePageCollectAppInfoList" + '?',
118
+ getNewHomePageRemindCount: portalAllUrlPrefix + "getNewHomePageRemindCount" + '?',
119
+ getComAppInfo: portalAllUrlPrefix + 'getComAppInfo?', //获取首页常用应用
120
+ saveAppCount: portalAllUrlPrefix + "saveAppCount" + '?', //移动应用保存更新点击次数接口
121
+ getAllActivity: approveUrlPrefix + "getAllActivity" + '?', //获取所有节点
122
+ getCategoryListByModule: approveUrlPrefix + "getCategoryListByModule" + '?', //获取所有节点
123
+ cancelLimit: approveUrlPrefix + "cancelLimit" + '?', //取消超时
124
+ getCanCancelLimit: approveUrlPrefix + "getCanCancelLimit" + '?' //是否可以取消超时
125
125
  },
126
126
  nodataIcon: context + "/mobile/fmui/images/noData.png",
127
127
  loadingIcon: context + "/mobile/fmui/images/loading.gif",
@@ -360,10 +360,14 @@ var PageHome = function (_React$Component) {
360
360
  t.refs.table.initState();
361
361
  }
362
362
 
363
- window.history.pushState({
364
- Poppage: t.state.historyStamp
365
- }, '', _utils2.default.addUrlParam('POPPAGE', Date.now()));
366
- window.addEventListener('popstate', t.listener, false);
363
+ if (!location.hash.includes('POPPAGE')) {
364
+ window.history.pushState({
365
+ Poppage: t.state.historyStamp
366
+ }, '', _utils2.default.addUrlParam('POPPAGE', Date.now()));
367
+ window.addEventListener('popstate', t.listener, false);
368
+ } else {
369
+ return;
370
+ }
367
371
  });
368
372
  }).catch(function (error) {
369
373
  alert("错误:" + error);
@@ -385,10 +389,14 @@ var PageHome = function (_React$Component) {
385
389
  }, function () {
386
390
  t.refs.table.initState();
387
391
 
388
- window.history.pushState({
389
- Poppage: t.state.historyStamp
390
- }, '', _utils2.default.addUrlParam('POPPAGE', Date.now()));
391
- window.addEventListener('popstate', t.listener, false);
392
+ if (!location.hash.includes('POPPAGE')) {
393
+ window.history.pushState({
394
+ Poppage: t.state.historyStamp
395
+ }, '', _utils2.default.addUrlParam('POPPAGE', Date.now()));
396
+ window.addEventListener('popstate', t.listener, false);
397
+ } else {
398
+ return;
399
+ }
392
400
  });
393
401
  }
394
402
  }
@@ -308,6 +308,8 @@ var PageHome = function (_React$Component) {
308
308
  }).catch(function (error) {
309
309
  console.error(error);
310
310
  });
311
+ //自动保存
312
+ var autoSaveApprove = getSystemInfo().autoSaveApprove;
311
313
 
312
314
  var param = {
313
315
  bottom: bottom,
@@ -481,6 +483,15 @@ var PageHome = function (_React$Component) {
481
483
  // }
482
484
  // });
483
485
 
486
+ //自动保存表单
487
+ if (getSystemInfo().autoSaveApprove == '1') {
488
+ var approveSaveTime = getSystemInfo().approveSaveTime;
489
+ if (approveSaveTime) {
490
+ if (listType == '0') {
491
+ t.autoSaveApproveFunc(approveSaveTime);
492
+ }
493
+ }
494
+ }
484
495
 
485
496
  // this.addBackListener();
486
497
  return _this;
@@ -3949,7 +3960,7 @@ var PageHome = function (_React$Component) {
3949
3960
 
3950
3961
  }, {
3951
3962
  key: 'saveForm',
3952
- value: function saveForm() {
3963
+ value: function saveForm(isAuto) {
3953
3964
  var t = this;
3954
3965
  //表单提交前
3955
3966
 
@@ -3966,7 +3977,7 @@ var PageHome = function (_React$Component) {
3966
3977
  }
3967
3978
  if (typeof mobileExt !== 'undefined' && mobileExt["saveDraftBefore"] === "function") {
3968
3979
  mobileExt["saveDraftBefore"](t.state, function () {
3969
- t.saveFormFuc();
3980
+ t.saveFormFuc(isAuto);
3970
3981
  }, function (error) {
3971
3982
  _Toast2.default.show({
3972
3983
  type: 'error',
@@ -3974,7 +3985,7 @@ var PageHome = function (_React$Component) {
3974
3985
  });
3975
3986
  });
3976
3987
  } else {
3977
- t.saveFormFuc();
3988
+ t.saveFormFuc(isAuto);
3978
3989
  }
3979
3990
  }, function (error) {
3980
3991
  _Toast2.default.show({
@@ -3994,7 +4005,7 @@ var PageHome = function (_React$Component) {
3994
4005
  }
3995
4006
  if (typeof mobileExt !== 'undefined' && typeof mobileExt["saveDraftBefore"] === "function") {
3996
4007
  mobileExt["saveDraftBefore"](t.state, function () {
3997
- t.saveFormFuc();
4008
+ t.saveFormFuc(isAuto);
3998
4009
  }, function (error) {
3999
4010
  _Toast2.default.show({
4000
4011
  type: 'error',
@@ -4002,7 +4013,7 @@ var PageHome = function (_React$Component) {
4002
4013
  });
4003
4014
  });
4004
4015
  } else {
4005
- t.saveFormFuc();
4016
+ t.saveFormFuc(isAuto);
4006
4017
  }
4007
4018
  }
4008
4019
  }
@@ -4011,7 +4022,7 @@ var PageHome = function (_React$Component) {
4011
4022
 
4012
4023
  }, {
4013
4024
  key: 'saveFormFuc',
4014
- value: function saveFormFuc() {
4025
+ value: function saveFormFuc(isAuto) {
4015
4026
  var _param;
4016
4027
 
4017
4028
  var t = this;
@@ -4095,14 +4106,19 @@ var PageHome = function (_React$Component) {
4095
4106
  // mobileExt["fieldSignCA"]({type:type,dataId:dataId,isBatch:0},t.state);
4096
4107
  // }
4097
4108
  // }
4098
-
4099
- if (isPush == '1') {
4100
- closePage();
4109
+ if (isAuto && isAuto == 1) {
4110
+ t.setState({
4111
+ dataId: dataId
4112
+ });
4101
4113
  } else {
4102
- setTimeout(function () {
4103
- // window.ReactNativeWebView.postMessage('final');
4104
- backPage();
4105
- }, 1500);
4114
+ if (isPush == '1') {
4115
+ closePage();
4116
+ } else {
4117
+ setTimeout(function () {
4118
+ // window.ReactNativeWebView.postMessage('final');
4119
+ backPage();
4120
+ }, 1500);
4121
+ }
4106
4122
  }
4107
4123
  }).catch(function (error) {
4108
4124
  if (typeof error.errorMsg == 'undefined') {
@@ -4126,95 +4142,162 @@ var PageHome = function (_React$Component) {
4126
4142
  }
4127
4143
  });
4128
4144
  } else {
4129
- _Dialog2.default.confirm({
4130
- locale: 'zh_CN',
4131
- title: '提示',
4132
- content: '是否保存到草稿箱',
4133
- onConfirm: function onConfirm() {
4134
- db.FlowModuleAPI.saveForm(param).then(function (content) {
4135
- _Toast2.default.show({
4136
- type: 'success',
4137
- content: '保存成功'
4138
- });
4145
+ if (isAuto && isAuto == 1) {
4146
+ db.FlowModuleAPI.saveForm(param).then(function (content) {
4147
+ _Toast2.default.show({
4148
+ type: 'success',
4149
+ content: '保存成功'
4150
+ });
4139
4151
 
4140
- var dataId = content.dataId;
4141
- //操作回调
4142
- if (typeof FlowCommon.operateCallBack === "function") {
4143
- FlowCommon.operateCallBack({ type: 5, dataId: dataId, isBatch: 0 }, t.state);
4144
- }
4145
- //项目开发扩展
4146
- var mobileExt;
4147
- try {
4148
- if (t.state.formKey) {
4149
- mobileExt = typeof eval(t.state.module + "_" + t.state.formKey + "_mobileExt") !== 'undefined' ? eval(t.state.module + "_" + t.state.formKey + "_mobileExt") : null;
4150
- }
4151
- } catch (e) {
4152
- // alert("exception: "+e.message);
4153
- }
4154
- if (typeof mobileExt !== 'undefined' && typeof mobileExt["operateCallBack"] === "function") {
4155
- mobileExt["operateCallBack"]({ type: 5, dataId: dataId, isBatch: 0 }, t.state);
4152
+ var dataId = content.dataId;
4153
+ //操作回调
4154
+ if (typeof FlowCommon.operateCallBack === "function") {
4155
+ FlowCommon.operateCallBack({ type: 5, dataId: dataId, isBatch: 0 }, t.state);
4156
+ }
4157
+ //项目开发扩展
4158
+ var mobileExt;
4159
+ try {
4160
+ if (t.state.formKey) {
4161
+ mobileExt = typeof eval(t.state.module + "_" + t.state.formKey + "_mobileExt") !== 'undefined' ? eval(t.state.module + "_" + t.state.formKey + "_mobileExt") : null;
4156
4162
  }
4163
+ } catch (e) {
4164
+ // alert("exception: "+e.message);
4165
+ }
4166
+ if (typeof mobileExt !== 'undefined' && typeof mobileExt["operateCallBack"] === "function") {
4167
+ mobileExt["operateCallBack"]({ type: 5, dataId: dataId, isBatch: 0 }, t.state);
4168
+ }
4157
4169
 
4158
- if (isPush == '1') {
4159
- closePage();
4160
- //alert("_thirdMenuType:"+_thirdMenuType);
4161
- //不得已的办法
4162
- // if(_thirdMenuType == 'WX'){
4163
- // wx.ready(function(){
4164
- // wx.closeWindow();
4165
- // });
4166
- // }else if(_thirdMenuType =='MH' && typeof(emp)!="undefined"){
4167
- // emp.window.close({
4168
- // id:'this', //指定被关闭窗口标识,如果id=‘this‘,则关闭当前窗口
4169
- // })
4170
- // }else{
4171
- // setTimeout(
4172
- // function () {
4173
-
4174
- // backPage();
4175
-
4176
- // }, 1500);
4177
- // }
4178
- } else {
4179
- setTimeout(function () {
4180
- // window.ReactNativeWebView.postMessage('final');
4181
- backPage();
4182
- }, 1500);
4170
+ t.setState({
4171
+ dataId: dataId
4172
+ });
4173
+
4174
+ // setTimeout(
4175
+ // function () {
4176
+ // backPage();
4177
+ // }, 1500);
4178
+ }).catch(function (error) {
4179
+ if (typeof error.errorMsg == 'undefined') {
4180
+ setTimeout(function () {
4181
+ _Toast2.default.show({
4182
+ type: 'error',
4183
+ content: '保存出错'
4184
+ });
4185
+ }, 800);
4186
+ } else {
4187
+ var message = error.errorMsg;
4188
+ if (message.indexOf('exclusive gateway') != -1) {
4189
+ message = "请检查判断条件字段是否正确填写!";
4183
4190
  }
4191
+ setTimeout(function () {
4192
+ _Toast2.default.show({
4193
+ type: 'error',
4194
+ content: message
4195
+ });
4196
+ }, 800);
4197
+ }
4198
+ });
4199
+ } else {
4200
+ _Dialog2.default.confirm({
4201
+ locale: 'zh_CN',
4202
+ title: '提示',
4203
+ content: '是否保存到草稿箱',
4204
+ onConfirm: function onConfirm() {
4205
+ db.FlowModuleAPI.saveForm(param).then(function (content) {
4206
+ _Toast2.default.show({
4207
+ type: 'success',
4208
+ content: '保存成功'
4209
+ });
4184
4210
 
4185
- // setTimeout(
4186
- // function () {
4187
- // backPage();
4188
- // }, 1500);
4189
- }).catch(function (error) {
4190
- if (typeof error.errorMsg == 'undefined') {
4191
- setTimeout(function () {
4192
- _Toast2.default.show({
4193
- type: 'error',
4194
- content: '保存出错'
4195
- });
4196
- }, 800);
4197
- } else {
4198
- var message = error.errorMsg;
4199
- if (message.indexOf('exclusive gateway') != -1) {
4200
- message = "请检查判断条件字段是否正确填写!";
4211
+ var dataId = content.dataId;
4212
+ //操作回调
4213
+ if (typeof FlowCommon.operateCallBack === "function") {
4214
+ FlowCommon.operateCallBack({ type: 5, dataId: dataId, isBatch: 0 }, t.state);
4201
4215
  }
4202
- setTimeout(function () {
4203
- _Toast2.default.show({
4204
- type: 'error',
4205
- content: message
4206
- });
4207
- }, 800);
4208
- }
4209
- });
4210
- },
4211
- onCancel: function onCancel() {
4212
- console.log('confirm cancel');
4213
- }
4214
- });
4216
+ //项目开发扩展
4217
+ var mobileExt;
4218
+ try {
4219
+ if (t.state.formKey) {
4220
+ mobileExt = typeof eval(t.state.module + "_" + t.state.formKey + "_mobileExt") !== 'undefined' ? eval(t.state.module + "_" + t.state.formKey + "_mobileExt") : null;
4221
+ }
4222
+ } catch (e) {
4223
+ // alert("exception: "+e.message);
4224
+ }
4225
+ if (typeof mobileExt !== 'undefined' && typeof mobileExt["operateCallBack"] === "function") {
4226
+ mobileExt["operateCallBack"]({ type: 5, dataId: dataId, isBatch: 0 }, t.state);
4227
+ }
4228
+
4229
+ if (isPush == '1') {
4230
+ closePage();
4231
+ //alert("_thirdMenuType:"+_thirdMenuType);
4232
+ //不得已的办法
4233
+ // if(_thirdMenuType == 'WX'){
4234
+ // wx.ready(function(){
4235
+ // wx.closeWindow();
4236
+ // });
4237
+ // }else if(_thirdMenuType =='MH' && typeof(emp)!="undefined"){
4238
+ // emp.window.close({
4239
+ // id:'this', //指定被关闭窗口标识,如果id=‘this‘,则关闭当前窗口
4240
+ // })
4241
+ // }else{
4242
+ // setTimeout(
4243
+ // function () {
4244
+
4245
+ // backPage();
4246
+
4247
+ // }, 1500);
4248
+ // }
4249
+ } else {
4250
+ setTimeout(function () {
4251
+ // window.ReactNativeWebView.postMessage('final');
4252
+ backPage();
4253
+ }, 1500);
4254
+ }
4255
+
4256
+ // setTimeout(
4257
+ // function () {
4258
+ // backPage();
4259
+ // }, 1500);
4260
+ }).catch(function (error) {
4261
+ if (typeof error.errorMsg == 'undefined') {
4262
+ setTimeout(function () {
4263
+ _Toast2.default.show({
4264
+ type: 'error',
4265
+ content: '保存出错'
4266
+ });
4267
+ }, 800);
4268
+ } else {
4269
+ var message = error.errorMsg;
4270
+ if (message.indexOf('exclusive gateway') != -1) {
4271
+ message = "请检查判断条件字段是否正确填写!";
4272
+ }
4273
+ setTimeout(function () {
4274
+ _Toast2.default.show({
4275
+ type: 'error',
4276
+ content: message
4277
+ });
4278
+ }, 800);
4279
+ }
4280
+ });
4281
+ },
4282
+ onCancel: function onCancel() {
4283
+ console.log('confirm cancel');
4284
+ }
4285
+ });
4286
+ }
4215
4287
  }
4216
4288
  }
4289
+ //自动保存表单
4217
4290
 
4291
+ }, {
4292
+ key: 'autoSaveApproveFunc',
4293
+ value: function autoSaveApproveFunc(saveTime) {
4294
+ var t = this;
4295
+ console.log("autoSaveApproveFunc");
4296
+ setTimeout(function () {
4297
+ console.log("自动保存表单");
4298
+ t.saveForm(1);
4299
+ }, saveTime * 60 * 1000);
4300
+ }
4218
4301
  //提交发送流程
4219
4302
 
4220
4303
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",