resolver-egretimp-plus 0.1.94 → 0.1.96

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.96",
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,
@@ -38,6 +38,12 @@
38
38
  align-items: center;
39
39
  height: 16px;
40
40
  word-break: break-word;
41
+ .custom-label-require {
42
+ &::first-letter {
43
+ color: #f5222d;
44
+ margin-right: 3px
45
+ }
46
+ }
41
47
  .custom-label-content {
42
48
  display: -webkit-box;
43
49
  line-height: 16px;
@@ -981,11 +981,12 @@ function createFormLable(config, lang = 'zh') {
981
981
  <span
982
982
  onMouseenter={(e) => labelMouseEnenter(e, config, lang)}
983
983
  onMouseout={() => config._labelShowTip = false}
984
- class="custom-label-content" style={config.labelStyle}
984
+ class={`custom-label-content ${required ? 'custom-label-require' : ''}`} style={config.labelStyle}
985
985
  onClick={() => config.onLabelClick && config.onLabelClick?.(config)}
986
986
  >
987
- {required ? <span style="color: #f5222d; margin-right: 3px">*</span> : null}
988
- <span>{lang.indexOf('zh') > -1 ? (config.labelZh || config.metaNameZh) : (config.labelEn || config.metaNameEn)}</span>
987
+ {/* {required ? <span style="color: #f5222d; margin-right: 3px">*</span> : null} */}
988
+ {required ? '*' : null}
989
+ {lang.indexOf('zh') > -1 ? (config.labelZh || config.metaNameZh) : (config.labelEn || config.metaNameEn)}
989
990
  </span>
990
991
  {
991
992
  config._labelShowTip ?