resolver-egretimp-plus 0.1.94 → 0.1.95

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.94",
3
+ "version": "0.1.95",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -12,7 +12,7 @@
12
12
  <script setup>
13
13
  import { onMounted, inject, watch, defineProps, computed, defineEmits, nextTick, resolveComponent } from 'vue';
14
14
  import { useSelEmployeeJs } from '../helper/dock.js'
15
- import { commonPropsType, debounce } from '../../utils/index.js'
15
+ import { commonPropsType, debounce, isBoolean, isString } from '../../utils/index.js'
16
16
  import { useFormItem } from 'element-plus'
17
17
 
18
18
  // const SearchIcon = resolveComponent('Search')
@@ -25,6 +25,20 @@ const props = defineProps({
25
25
  type: [String, Boolean],
26
26
  default: false
27
27
  },
28
+ // ====start==== 按部门查找人员,type为user时有效,结构为{deptIds:'xxx,yyy', cascade: true, excludeDeptIds:'xxx,yyy'}, deptIds为部门ID(如有多个用英文逗号分隔),cascade为是否包含下级部门人员, excludeDeptIds为除外部门ID(如有多个用英文逗号分隔)
29
+ cascade: {
30
+ type: Boolean,
31
+ default: true
32
+ },
33
+ deptIds: {
34
+ type: String,
35
+ default: ''
36
+ },
37
+ excludeDeptIds: {
38
+ type: String,
39
+ default: ''
40
+ },
41
+ // ====end==== 按部门查找人员,type为user时有效,结构为{deptIds:'xxx,yyy', cascade: true, excludeDeptIds:'xxx,yyy'}, deptIds为部门ID(如有多个用英文逗号分隔),cascade为是否包含下级部门人员, excludeDeptIds为除外部门ID(如有多个用英文逗号分隔)
28
42
  type: {
29
43
  type: String,
30
44
  default: 'user'
@@ -88,15 +102,18 @@ const initSelEmployee = async () => {
88
102
  await seelp(200)
89
103
  console.log('select-employees modelValue:', modelValue.value)
90
104
  const data = modelValue.value ? modelValue.value.split(separator.value) : []
105
+ let deptForUser = {}
106
+ if (props.deptIds || props.excludeDeptIds) {
107
+ deptForUser.deptIds = isString(deptForUser.deptIds) ? props.deptIds : ''
108
+ deptForUser.excludeDeptIds = isString(deptForUser.excludeDeptIds) ? props.excludeDeptIds : ''
109
+ deptForUser.cascade = isBoolean(deptForUser.cascade) ? deptForUser.cascade : !!(deptForUser.cascade)
110
+ }
91
111
  const initParams = {
92
112
  el: `#${metaCode.value}`,
93
113
  data,
94
114
  token: feiShuTokens,
95
115
  type: props.type,
96
- deptForUser: {
97
- // deptIds: '100178100000000001X8',
98
- // cascade: true
99
- },
116
+ deptForUser,
100
117
  lang: lang.value,
101
118
  multiple: typeof props.multiple === 'boolean' ? props.multiple : props.multiple == '1',
102
119
  placeholder: lang?.value?.indexOf('zh') > -1 ? props.placeholder : props.placeholderEn,