resolver-egretimp-plus 0.0.302 → 0.1.1
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/dist/const/index.js +1 -1
- package/dist/h5/index.js +18 -18
- package/dist/theme/element/index.css +1 -1
- package/dist/theme/element/src/components/collapse.scss +1 -0
- package/dist/theme/element/src/components/table.scss +3 -0
- package/dist/web/index.js +28 -28
- package/package.json +1 -1
- package/src/bpm/bpmInstance.js +231 -0
- package/src/bpm/udc-sdk-esm/cjs/impl/application.js +8 -0
- package/src/bpm/udc-sdk-esm/cjs/impl/component.js +97 -0
- package/src/bpm/udc-sdk-esm/cjs/impl/datasource.js +88 -0
- package/src/bpm/udc-sdk-esm/cjs/impl/iframe/index.js +3 -0
- package/src/bpm/udc-sdk-esm/cjs/impl/iframe/udcSdkForIframe/UdcComponent.js +76 -0
- package/src/bpm/udc-sdk-esm/cjs/impl/iframe/udcSdkForIframe/index.js +201 -0
- package/src/bpm/udc-sdk-esm/cjs/impl/index.js +69 -0
- package/src/bpm/udc-sdk-esm/cjs/impl/page.js +56 -0
- package/src/bpm/udc-sdk-esm/cjs/impl/utils.js +76 -0
- package/src/bpm/udc-sdk-esm/cjs/index.js +46 -0
- package/src/bpm/udc-sdk-esm/cjs/utils.js +21 -0
- package/src/components/cmiFormItem/src/index.vue +1 -1
- package/src/components/helper/calcTooltip.jsx +1 -1
- package/src/components/helper/eventOrchestration.js +2 -2
- package/src/components/helper/resolver.js +2 -2
- package/src/components/packages-H5/CmiCheckbox.vue +1 -1
- package/src/components/packages-H5/CmiPicker.vue +3 -3
- package/src/components/packages-H5/CmiSelect.vue +2 -2
- package/src/components/packages-H5/CustomComponentTableH5.vue +1 -0
- package/src/components/packages-web/CustomComponentCollapse.vue +3 -3
- package/src/components/packages-web/CustomComponentRow.vue +1 -1
- package/src/components/packages-web/CustomComponentSelectEmployees.vue +1 -1
- package/src/components/packages-web/CustomComponentTable.jsx +3 -3
- package/src/components/packages-web/CustomComponentTabs.vue +1 -1
- package/src/components/packages-web/ElPagination.vue +3 -3
- package/src/components/styles/CustomComponenTable.scss +1 -1
- package/src/index.jsx +75 -3
- package/src/theme/element/components/collapse.scss +1 -0
- package/src/theme/element/components/table.scss +3 -0
- package/src/utils/const.js +5 -5
- package/src/utils/render.jsx +3 -3
|
@@ -19,9 +19,9 @@ const calcProps = computed(() => {
|
|
|
19
19
|
if (!ret.layout || typeof ret.layout !== 'string') {
|
|
20
20
|
ret.layout = 'total'
|
|
21
21
|
}
|
|
22
|
-
if (props.config?.showSizer
|
|
22
|
+
if (props.config?.showSizer == '1' || props.config?.showJumper == '1') {
|
|
23
23
|
const layoutArr = ret.layout ? ret.layout.split(',') : []
|
|
24
|
-
if (props.config?.showSizer
|
|
24
|
+
if (props.config?.showSizer == '1') {
|
|
25
25
|
if (!layoutArr.some(item => item.trim() === 'sizes')) {
|
|
26
26
|
layoutArr.splice(1, 0, 'sizes')
|
|
27
27
|
}
|
|
@@ -35,7 +35,7 @@ const calcProps = computed(() => {
|
|
|
35
35
|
if (!layoutArr.some(item => item.trim() === 'next')) {
|
|
36
36
|
layoutArr.splice(4, 0, 'next')
|
|
37
37
|
}
|
|
38
|
-
if (props.config?.showJumper
|
|
38
|
+
if (props.config?.showJumper == '1') {
|
|
39
39
|
if (!layoutArr.some(item => item.trim() === 'jumper')) {
|
|
40
40
|
layoutArr.push('jumper')
|
|
41
41
|
}
|
package/src/index.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { provide, toRef, watch, computed, ref, defineExpose, reactive, getCurrentInstance, toRaw } from "vue"
|
|
1
|
+
import { provide, toRef, watch, computed, ref, defineExpose, reactive, getCurrentInstance, toRaw, onMounted } from "vue"
|
|
2
2
|
import Renderer from './renderer.jsx'
|
|
3
3
|
// import './style/index.scss'
|
|
4
4
|
import { usePageConfig } from './hooks/pageConfig'
|
|
@@ -7,7 +7,7 @@ import { MODE } from "./utils/const.js"
|
|
|
7
7
|
import { generateRequester } from "./utils/request.js"
|
|
8
8
|
import { executeLoadServices, resetConfigEventInit } from "./components/helper/resolver.js"
|
|
9
9
|
import { createEmptyCopy, deepMerge } from "./utils/index.js"
|
|
10
|
-
import {
|
|
10
|
+
import { initBpm, SUBMIT_TYPE } from "./bpm/bpmInstance.js"
|
|
11
11
|
// import { RuleExecuter } from "./rulesImp/index.js"
|
|
12
12
|
export default {
|
|
13
13
|
name: 'Resolver',
|
|
@@ -151,6 +151,23 @@ export default {
|
|
|
151
151
|
type: Object,
|
|
152
152
|
default: () => ({})
|
|
153
153
|
},
|
|
154
|
+
// 是否开启致远功能
|
|
155
|
+
openBpm: {
|
|
156
|
+
type: Boolean,
|
|
157
|
+
default: false
|
|
158
|
+
},
|
|
159
|
+
bpmMessage: {
|
|
160
|
+
type: [Object, Function],
|
|
161
|
+
default: {}
|
|
162
|
+
},
|
|
163
|
+
bpmSubmitBtn: {
|
|
164
|
+
type: [String],
|
|
165
|
+
default: ''
|
|
166
|
+
},
|
|
167
|
+
bpmActions: {
|
|
168
|
+
type: [Object],
|
|
169
|
+
default: {}
|
|
170
|
+
}
|
|
154
171
|
},
|
|
155
172
|
emits: ['update:modelValue', 'rootStoreChange'],
|
|
156
173
|
setup(props, { emit, attrs, expose }) {
|
|
@@ -184,7 +201,7 @@ export default {
|
|
|
184
201
|
return props.dataLoad || nativeDataLoad.value
|
|
185
202
|
})
|
|
186
203
|
const { initPageConfig, pageConfigRef, mapCompRef, hireRelatMapRulesRef } = usePageConfig()
|
|
187
|
-
function toExecuteLoadServices(clearFlag, alongLoad) {
|
|
204
|
+
function toExecuteLoadServices(clearFlag, alongLoad = true) {
|
|
188
205
|
// 触发加载事件执行
|
|
189
206
|
const oldNativeDataload = nativeDataLoad.value
|
|
190
207
|
nativeDataLoad.value = false
|
|
@@ -344,6 +361,61 @@ export default {
|
|
|
344
361
|
emit('update:modelValue', val)
|
|
345
362
|
}
|
|
346
363
|
})
|
|
364
|
+
onMounted(() => {
|
|
365
|
+
if (props.openBpm) {
|
|
366
|
+
function toSave() {
|
|
367
|
+
return new Promise((resolve) => {
|
|
368
|
+
const saveButton = dynamicMapComp[props.bpmSubmitBtn]
|
|
369
|
+
if (saveButton) {
|
|
370
|
+
// 保存服务绑定在配置的按钮上面,这边直接调用按钮的服务
|
|
371
|
+
saveButton?.vm?.click({
|
|
372
|
+
// 保存成功的回调
|
|
373
|
+
afterRequestService(ret) {
|
|
374
|
+
if (ret?.data?.success) {
|
|
375
|
+
toExecuteLoadServices(true, true)
|
|
376
|
+
resolve(true)
|
|
377
|
+
} else {
|
|
378
|
+
resolve(false)
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
})
|
|
382
|
+
}
|
|
383
|
+
})
|
|
384
|
+
}
|
|
385
|
+
function toSubmit() {
|
|
386
|
+
return new Promise((resolve) => {
|
|
387
|
+
validate((valid) => {
|
|
388
|
+
if (valid) {
|
|
389
|
+
resolve(toSave())
|
|
390
|
+
} else {
|
|
391
|
+
resolve(false)
|
|
392
|
+
}
|
|
393
|
+
})
|
|
394
|
+
})
|
|
395
|
+
}
|
|
396
|
+
const commonSaveObj = {
|
|
397
|
+
getForm({ eventData }) {
|
|
398
|
+
return toSave()
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
const commonSubmitObj = {
|
|
402
|
+
getForm({ eventData }) {
|
|
403
|
+
const actionType = eventData?.bpmInfo?.actionType
|
|
404
|
+
if (!actionType) {
|
|
405
|
+
return toSubmit()
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
const bpmInstance = initBpm(bpmMessage, props.bpmActions)
|
|
410
|
+
bpmInstance.setDefaultactions({
|
|
411
|
+
[SUBMIT_TYPE.SEND]: commonSubmitObj,
|
|
412
|
+
[SUBMIT_TYPE.SUBMIT]: commonSubmitObj,
|
|
413
|
+
[SUBMIT_TYPE.GIVE]: commonSaveObj,
|
|
414
|
+
[SUBMIT_TYPE.AGREE]: commonSaveObj,
|
|
415
|
+
[SUBMIT_TYPE.DRAFT_HANDLE]: commonSaveObj,
|
|
416
|
+
})
|
|
417
|
+
}
|
|
418
|
+
})
|
|
347
419
|
return () => {
|
|
348
420
|
if (!pageConfigRef.value) {
|
|
349
421
|
return null
|
package/src/utils/const.js
CHANGED
|
@@ -93,7 +93,7 @@ export const commonPropsType = {
|
|
|
93
93
|
type: Boolean,
|
|
94
94
|
default: false,
|
|
95
95
|
getValue(config, props, modelValue) {
|
|
96
|
-
return config.clearableFlag
|
|
96
|
+
return config.clearableFlag == '1'
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
// 组件是否必填
|
|
@@ -101,7 +101,7 @@ export const commonPropsType = {
|
|
|
101
101
|
type: Boolean,
|
|
102
102
|
default: false,
|
|
103
103
|
getValue(config, props, modelValue) {
|
|
104
|
-
return config.requiredFlag
|
|
104
|
+
return config.requiredFlag == '1'
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
// 组件是否展示必填标识
|
|
@@ -175,15 +175,15 @@ export function calcDisable(config, mode) {
|
|
|
175
175
|
mode === MODE.LOG ?
|
|
176
176
|
(
|
|
177
177
|
config.logAlong || isPatchComponent([FORM_META_TYPE, ...NOT_LOG_EFFECT_TYPE], config) ?
|
|
178
|
-
config.editFlag
|
|
178
|
+
config.editFlag == '0' :
|
|
179
179
|
true
|
|
180
180
|
) :
|
|
181
181
|
mode === MODE.DETAIL ?
|
|
182
182
|
(config.detailAlong || isPatchComponent([FORM_META_TYPE, ...NOT_LOG_EFFECT_TYPE], config) ?
|
|
183
|
-
config.editFlag
|
|
183
|
+
config.editFlag == '0' :
|
|
184
184
|
true
|
|
185
185
|
) :
|
|
186
|
-
config.editFlag
|
|
186
|
+
config.editFlag == '0'
|
|
187
187
|
return flag
|
|
188
188
|
}
|
|
189
189
|
|
package/src/utils/render.jsx
CHANGED
|
@@ -332,7 +332,7 @@ export function normalConfig({
|
|
|
332
332
|
|
|
333
333
|
// 从按钮的服务编排中,获取到按钮中配置的表格中的config,并且绑定表格的分页
|
|
334
334
|
function getTableServices(lcpPageServiceMapVOList = [], { dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat }) {
|
|
335
|
-
const mixinServiceConfig = lcpPageServiceMapVOList.find(service => service.serviceType
|
|
335
|
+
const mixinServiceConfig = lcpPageServiceMapVOList.find(service => service.serviceType == '1')
|
|
336
336
|
const searchServices = lcpPageServiceMapVOList.filter(service => service.transactionType == '1')
|
|
337
337
|
if (searchServices.length) {
|
|
338
338
|
return searchServices.map(service => {
|
|
@@ -795,7 +795,7 @@ function getFormItemExtendProps(config, lang, params, compProps) {
|
|
|
795
795
|
}
|
|
796
796
|
|
|
797
797
|
function getFormItemRule(config, lang, params, compProps) {
|
|
798
|
-
const required = config.requiredFlag
|
|
798
|
+
const required = config.requiredFlag == '1'
|
|
799
799
|
const onlyRequiredFlag = config.onlyRequiredFlag
|
|
800
800
|
let trigger = ['blur', 'change']
|
|
801
801
|
// 如果是input框并且开启了金额显示
|
|
@@ -959,7 +959,7 @@ function normalLabelTipContent(content = '') {
|
|
|
959
959
|
function createFormLable(config, lang = 'zh') {
|
|
960
960
|
const ElTooltip = resolveComponent('el-tooltip')
|
|
961
961
|
const elIcon = resolveComponent('el-icon')
|
|
962
|
-
const required = config.requiredFlag
|
|
962
|
+
const required = config.requiredFlag == '1' && config.hiddenRequiredFlag != '1'
|
|
963
963
|
const slots = {}
|
|
964
964
|
slots.default = () => {
|
|
965
965
|
return <span class="label-tip"><elIcon size="17">
|