imeik-bizui 1.7.4 → 1.7.5

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.
@@ -212,7 +212,7 @@ export default {
212
212
  }
213
213
  if (!this.selectName && this.value) {
214
214
  params.employeeNos = Array.isArray(this.value) ? this.value : [this.value]
215
- params.selectStatus = !this.value || !this.value.length ? '0' : '1'
215
+ params.selectStatus = '0'
216
216
  }
217
217
  this.loading = true
218
218
  employeeSelectOption(params).then((res) => {
@@ -172,8 +172,22 @@ export default {
172
172
  */
173
173
  onUpdate(val, data) {
174
174
  if (this.isObjectValue) {
175
- this.$emit('input', data, data)
176
- this.$emit('change', data, data)
175
+ let newValue
176
+ if (this.isMultiple) {
177
+ newValue = data.map((item) => {
178
+ return {
179
+ [this.attrs.prop + 'DicName']: item.dicName,
180
+ [this.attrs.prop + 'DicValue']: item.dicValue
181
+ }
182
+ })
183
+ } else {
184
+ newValue = {
185
+ [this.attrs.prop + 'DicName']: data.dicName,
186
+ [this.attrs.prop + 'DicValue']: data.dicValue
187
+ }
188
+ }
189
+ this.$emit('input', newValue, data)
190
+ this.$emit('change', newValue, data)
177
191
  } else {
178
192
  this.$emit('input', this.myValue, data)
179
193
  this.$emit('change', this.myValue, data)
@@ -184,9 +198,9 @@ export default {
184
198
  */
185
199
  getObjectValue(val) {
186
200
  if (this.isMultiple) {
187
- return val?.map((item) => item.dicValue) || []
201
+ return val?.map((item) => item[this.attrs.prop + 'DicValue']) || []
188
202
  } else {
189
- return val?.dicValue || ''
203
+ return val[this.attrs.prop + 'DicValue'] || ''
190
204
  }
191
205
  }
192
206
  }