resolver-egretimp-plus 0.1.14 → 0.1.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -150,8 +150,8 @@ export class Bpm {
150
150
  }
151
151
  this.postMessage(postMessageData)
152
152
  } else if (MESSAGE_TYPE.PROCESS_ACTION_SUCCESS === messageType) {
153
- let closeFlag = false
154
- closeFlag = [SUBMIT_TYPE.PROCESS_SHOW, SUBMIT_TYPE.BACK, SUBMIT_TYPE.DRAFT_HANDLE].includes(submitType)
153
+ let closeFlag = true
154
+ closeFlag = ![SUBMIT_TYPE.PROCESS_SHOW, SUBMIT_TYPE.BACK, SUBMIT_TYPE.DRAFT_HANDLE].includes(submitType)
155
155
 
156
156
  let action = this.actions?.[submitType]?.successAction
157
157
  if (!action) {
@@ -212,14 +212,39 @@ export class Bpm {
212
212
  }
213
213
  getDefaultAction(eventData) {
214
214
  const { messageType, submitType } = eventData
215
- switch (submitType) {
216
- case SUBMIT_TYPE.SEND:
217
- case SUBMIT_TYPE.SUBMIT:
218
- return (eventData) => {
219
- const { validate, toSave, getDetail } = this.nativeMethods
220
- return new Promise((resolve) => {
221
- validate((valid) => {
222
- if (valid) {
215
+ if (MESSAGE_TYPE.GET_FORM_DATA === messageType) {
216
+ switch (submitType) {
217
+ case SUBMIT_TYPE.SEND:
218
+ case SUBMIT_TYPE.SUBMIT:
219
+ case SUBMIT_TYPE.AGREE:
220
+ return (eventData) => {
221
+ const { validate, toSave, getDetail } = this.nativeMethods
222
+ return new Promise((resolve) => {
223
+ validate((valid) => {
224
+ if (valid) {
225
+ toSave((ret) => {
226
+ if (ret?.data?.success) {
227
+ getDetail()
228
+ resolve(true)
229
+ } else {
230
+ resolve(false)
231
+ }
232
+ }, eventData)
233
+ } else {
234
+ resolve(false)
235
+ }
236
+ })
237
+ })
238
+ }
239
+ case SUBMIT_TYPE.NOTICE:
240
+ case SUBMIT_TYPE.GIVE:
241
+ case SUBMIT_TYPE.DRAFT_HANDLE:
242
+ case SUBMIT_TYPE.MULTI_COOPERATE:
243
+ return (eventData) => {
244
+ const actionType = eventData?.bpmInfo?.actionType
245
+ const { toSave, getDetail } = this.nativeMethods
246
+ return new Promise((resolve) => {
247
+ if (!actionType) {
223
248
  toSave((ret) => {
224
249
  if (ret?.data?.success) {
225
250
  getDetail()
@@ -229,33 +254,11 @@ export class Bpm {
229
254
  }
230
255
  }, eventData)
231
256
  } else {
232
- resolve(false)
257
+ resolve(true)
233
258
  }
234
259
  })
235
- })
236
- }
237
- case SUBMIT_TYPE.NOTICE:
238
- case SUBMIT_TYPE.GIVE:
239
- case SUBMIT_TYPE.DELETE_DRAFT:
240
- case SUBMIT_TYPE.MULTI_COOPERATE:
241
- return (eventData) => {
242
- const actionType = eventData?.bpmInfo?.actionType
243
- const { toSave, getDetail } = this.nativeMethods
244
- return new Promise((resolve) => {
245
- if (!actionType) {
246
- toSave((ret) => {
247
- if (ret?.data?.success) {
248
- getDetail()
249
- resolve(true)
250
- } else {
251
- resolve(false)
252
- }
253
- }, eventData)
254
- } else {
255
- resolve(true)
256
- }
257
- })
258
- }
260
+ }
261
+ }
259
262
  }
260
263
  }
261
264
  // 暂时没用到=======start======
@@ -4,6 +4,7 @@ import { getRelateConfigKeys } from "../../rules/ruleUtils"
4
4
  import { RESULT_CODE, resultToast } from "../../utils/respone"
5
5
  import { assignmentPathVal, getPathVal, isPromise, modelValueDeepMerge, parseExtendAttr, unionWith } from "../../utils/index"
6
6
  import { buildInRequest } from "../../utils/request"
7
+ import { bpmInstance } from "../../bpm/bpmInstance"
7
8
 
8
9
  export async function dispatchClickEvents ({serviceList = [], requestTraceId, axiosInstance, dialogReq, dynamicMapComp, rootValue, dynamicHireRelat, messageCb, compConfig, messageInstance, lang, beforeRequestService, afterRequestService}) {
9
10
  const dynamicMapCompKeys = Object.keys(dynamicMapComp)
@@ -405,6 +406,7 @@ export function openDailg({
405
406
  const paramsBeforeOpenDialog = beforeOpenDialog
406
407
  if (configBeforeOpenDialog || paramsBeforeOpenDialog) {
407
408
  beforeOpenDialog = async (...arg) => {
409
+ bpmInstance?.changeSlide?.(false)
408
410
  let beforeOpenDialogRet = true
409
411
  if (paramsBeforeOpenDialog) {
410
412
  beforeOpenDialogRet = paramsBeforeOpenDialog?.(...arg)
@@ -454,13 +456,14 @@ export function openDailg({
454
456
  const paramsAfterOpenDialog = afterOpenDialog
455
457
  if (configAfterOpenDialog || paramsAfterOpenDialog) {
456
458
  afterOpenDialog = async (...arg) => {
459
+ bpmInstance?.changeSlide?.(true)
457
460
  paramsAfterOpenDialog?.(...arg)
458
461
  configAfterOpenDialog?.(...arg)
459
462
  }
460
463
  }
461
464
  afterOpenDialog && afterOpenDialog({
462
465
  dynamicMapComp,
463
- rootValue,
466
+ rootValue,
464
467
  dynamicHireRelat,
465
468
  compConfig,
466
469
  pagePopupMap,