resolver-egretimp-plus 0.1.133 → 0.1.135
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/h5/index.js +1 -1
- package/dist/web/index.js +2 -2
- package/package.json +1 -1
- package/src/analysisComponent.jsx +11 -2
- package/src/components/childDialog/src/index.vue +79 -24
- package/src/components/packages-web/CustomComponentSelectEmployees.vue +2 -2
- package/src/components/packages-web/ElSelect.jsx +1 -1
- package/src/rules/ruleUtils.js +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, defineAsyncComponent, getCurrentInstance, inject, onBeforeMount, provide, ref, watch } from 'vue'
|
|
1
|
+
import { computed, defineAsyncComponent, getCurrentInstance, inject, onBeforeMount, provide, ref, Teleport, watch } from 'vue'
|
|
2
2
|
import { COFNGI_KEY_EVENT_FLAG, commonPropsType, definePrivatelyProp, EXECTE_CLICK_EVENT_COMPONENTS, findComponent, getComponentPropsKeys, getComponentSolt, hasOwn, isFunction, isPlainObject } from './utils/index.js'
|
|
3
3
|
import { useVmodels } from './hooks/index.js'
|
|
4
4
|
import { getRenderComponentProps, generateFormItemPolyfill } from './utils/index.js'
|
|
@@ -81,6 +81,7 @@ export default {
|
|
|
81
81
|
const lang = inject('lang')
|
|
82
82
|
const OPEN_DATA_RULES = inject('OPEN_DATA_RULES')
|
|
83
83
|
|
|
84
|
+
const _dialogFooterTeleport = inject('_dialogFooterTeleport')
|
|
84
85
|
const selects = inject('selects')
|
|
85
86
|
const _parentRootValue = inject('_parentRootValue')
|
|
86
87
|
const _parentDynamicMapComp = inject('_parentDynamicMapComp')
|
|
@@ -378,7 +379,7 @@ export default {
|
|
|
378
379
|
messageInstance: messageInstance?.value,
|
|
379
380
|
OPEN_DATA_RULES,
|
|
380
381
|
}) // 生成formItem()的辅助函数
|
|
381
|
-
|
|
382
|
+
const retVnode = formItemPolyfill(
|
|
382
383
|
<currentComponent.value
|
|
383
384
|
key={props.config.metaCode}
|
|
384
385
|
ref={refFn}
|
|
@@ -395,6 +396,14 @@ export default {
|
|
|
395
396
|
}
|
|
396
397
|
</currentComponent.value>
|
|
397
398
|
)
|
|
399
|
+
if (props.config?.dialogFooterSlot == '1' && _dialogFooterTeleport.value) {
|
|
400
|
+
return <Teleport to={_dialogFooterTeleport.value}>
|
|
401
|
+
{
|
|
402
|
+
retVnode
|
|
403
|
+
}
|
|
404
|
+
</Teleport>
|
|
405
|
+
}
|
|
406
|
+
return retVnode
|
|
398
407
|
}
|
|
399
408
|
}
|
|
400
409
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, defineAsyncComponent, ref } from 'vue';
|
|
2
|
+
import { computed, defineAsyncComponent, onMounted, onUnmounted, provide, ref, watchEffect } from 'vue';
|
|
3
3
|
import { ElDialog } from 'element-plus';
|
|
4
4
|
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
|
5
5
|
import en from 'element-plus/es/locale/lang/en'
|
|
@@ -107,10 +107,60 @@ function rootStoreChange(rootStore) {
|
|
|
107
107
|
props.rootStoreChange && props.rootStoreChange(rootStore)
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
const footerHeight = ref(0)
|
|
111
|
+
const contentHeight = computed(() => {
|
|
112
|
+
let reduceNum = footerHeight.value
|
|
113
|
+
reduceNum += 100 // 这是弹框遮罩层的上下边距
|
|
114
|
+
reduceNum += 36 // 弹框内边距
|
|
115
|
+
if (!!dialogProps.value?.title) {
|
|
116
|
+
reduceNum += 40 //
|
|
117
|
+
}
|
|
118
|
+
return `calc(100vh - ${reduceNum}px)`
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
// 监听 footer 的高度======start=====
|
|
122
|
+
const _dialogFooterTeleport = ref(null)
|
|
123
|
+
let unWatchFooter = null
|
|
124
|
+
onMounted(() => {
|
|
125
|
+
watchEffect((cleanup) => {
|
|
126
|
+
cleanup(() => {
|
|
127
|
+
unWatchFooter?.()
|
|
128
|
+
})
|
|
129
|
+
if (!_dialogFooterTeleport.value) {
|
|
130
|
+
return
|
|
131
|
+
}
|
|
132
|
+
unWatchFooter = watchFooterHeight(_dialogFooterTeleport.value, (height) => {
|
|
133
|
+
footerHeight.value = height
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
onUnmounted(() => {
|
|
138
|
+
unWatchFooter?.()
|
|
139
|
+
})
|
|
140
|
+
// 监听 footer 的高度======end=====
|
|
141
|
+
|
|
142
|
+
function watchFooterHeight(dom, cb) {
|
|
143
|
+
if (!dom) return
|
|
144
|
+
const config = { attributes: true, childList: true, subtree: true, characterData: true };
|
|
145
|
+
|
|
146
|
+
const callback = function() {
|
|
147
|
+
// 检查高度变化
|
|
148
|
+
cb && cb(dom.offsetHeight)
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const observer = new MutationObserver(callback);
|
|
152
|
+
observer.observe(dom, config);
|
|
153
|
+
return () => {
|
|
154
|
+
observer.disconnect()
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
110
158
|
|
|
111
159
|
watch(formData, (val) => {
|
|
112
160
|
props.rootDataChange && props.rootDataChange(val)
|
|
113
161
|
})
|
|
162
|
+
|
|
163
|
+
provide('_dialogFooterTeleport', _dialogFooterTeleport)
|
|
114
164
|
defineExpose({
|
|
115
165
|
dialogVisible,
|
|
116
166
|
clearData: () => {
|
|
@@ -136,23 +186,26 @@ defineExpose({
|
|
|
136
186
|
>
|
|
137
187
|
<div>
|
|
138
188
|
</div>
|
|
139
|
-
<
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
189
|
+
<el-scrollbar class="content" :max-height="contentHeight">
|
|
190
|
+
<Resolver v-if="dialogVisible" ref="resolverRef"
|
|
191
|
+
@loadedConfigCompeted="loadedConfigCompeted"
|
|
192
|
+
@rootStoreChange="rootStoreChange"
|
|
193
|
+
v-model="formData"
|
|
194
|
+
:parentRootValue="props.parentRootValue"
|
|
195
|
+
:parentDynamicMapComp="props.parentDynamicMapComp"
|
|
196
|
+
:selectionsObj="props.selectionsObj"
|
|
197
|
+
:busiIdentityId="busiIdentityId"
|
|
198
|
+
:lang="props.lang"
|
|
199
|
+
:selects="parentSelects"
|
|
200
|
+
:buttonActions="props.buttonActions"
|
|
201
|
+
:dialogReq="props.loadEvnetsReq"
|
|
202
|
+
:polyfillConfigs="props.polyfillConfigs"
|
|
203
|
+
:axiosInstance="props.axiosInstance"
|
|
204
|
+
:axiosConfig="props.axiosConfig"
|
|
205
|
+
:components="props.components"
|
|
206
|
+
></Resolver>
|
|
207
|
+
</el-scrollbar>
|
|
208
|
+
<div ref="_dialogFooterTeleport" id="open-dialog-footer"></div>
|
|
156
209
|
</ElDialog>
|
|
157
210
|
</ElConfigProvider>
|
|
158
211
|
</template>
|
|
@@ -160,14 +213,11 @@ defineExpose({
|
|
|
160
213
|
<style lang="scss">
|
|
161
214
|
.open-child-frame {
|
|
162
215
|
padding: 16px 20px 20px 20px;
|
|
163
|
-
overflow-y:
|
|
164
|
-
overflow-x: hidden;
|
|
216
|
+
overflow-y: hidden;
|
|
165
217
|
|
|
166
|
-
max-height: calc(100vh - 200px);
|
|
167
|
-
|
|
168
218
|
&.el-dialog {
|
|
169
|
-
margin-top:
|
|
170
|
-
margin-bottom:
|
|
219
|
+
margin-top: 50px !important;
|
|
220
|
+
margin-bottom: 50px;
|
|
171
221
|
}
|
|
172
222
|
.el-dialog__header {
|
|
173
223
|
--el-dialog-title-font-size: 16px;
|
|
@@ -175,11 +225,16 @@ defineExpose({
|
|
|
175
225
|
font-weight: 600;
|
|
176
226
|
}
|
|
177
227
|
.el-dialog__body {
|
|
228
|
+
// max-height: calc(100% - 40px);
|
|
178
229
|
}
|
|
179
230
|
&.hidden-head {
|
|
180
231
|
& > .el-dialog__header {
|
|
181
232
|
display: none;
|
|
182
233
|
}
|
|
234
|
+
|
|
235
|
+
.el-dialog__body {
|
|
236
|
+
// max-height: 100%;
|
|
237
|
+
}
|
|
183
238
|
}
|
|
184
239
|
}
|
|
185
240
|
</style>
|
|
@@ -22,12 +22,12 @@ const emit = defineEmits(['change'])
|
|
|
22
22
|
const props = defineProps({
|
|
23
23
|
...commonPropsType,
|
|
24
24
|
multiple: {
|
|
25
|
-
type: [String, Boolean],
|
|
25
|
+
type: [String, Boolean, Number],
|
|
26
26
|
default: false
|
|
27
27
|
},
|
|
28
28
|
// ====start==== 按部门查找人员,type为user时有效,结构为{deptIds:'xxx,yyy', cascade: true, excludeDeptIds:'xxx,yyy'}, deptIds为部门ID(如有多个用英文逗号分隔),cascade为是否包含下级部门人员, excludeDeptIds为除外部门ID(如有多个用英文逗号分隔)
|
|
29
29
|
cascade: {
|
|
30
|
-
type: [Boolean, String],
|
|
30
|
+
type: [Boolean, String, Number],
|
|
31
31
|
default: true
|
|
32
32
|
},
|
|
33
33
|
deptIds: {
|
package/src/rules/ruleUtils.js
CHANGED
|
@@ -95,8 +95,8 @@ function getRelateConfigs(codesStr, config, type) {
|
|
|
95
95
|
})
|
|
96
96
|
// 组装成此数据结果,用于后续的获取对应字段=====end====
|
|
97
97
|
|
|
98
|
-
let diffIdx = -1 // 次标识表示,是从那个所以开始,code不一样了
|
|
99
98
|
const codes = codesStr.split('->')
|
|
99
|
+
let diffIdx = codes.length - 1 // 次标识表示,是从那个所以开始,code不一样了
|
|
100
100
|
|
|
101
101
|
for (let i = 0; i < codes.length; i ++) {
|
|
102
102
|
const code = codes[i]
|