imeik-bizui 2.2.2 → 2.2.4
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/bizui/src/FieldCostBearDepartmentSelect/index.vue +9 -8
- package/dist/imeik-bizui.common.js +88 -87
- package/dist/imeik-bizui.common.js.gz +0 -0
- package/dist/imeik-bizui.css +1 -1
- package/dist/imeik-bizui.css.gz +0 -0
- package/dist/imeik-bizui.umd.js +88 -87
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +4 -4
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
|
@@ -29,6 +29,11 @@
|
|
|
29
29
|
import { queryBudgetDepartManage } from '../../api/applycenter.js'
|
|
30
30
|
export default {
|
|
31
31
|
name: 'FieldCostBearDepartmentSelect',
|
|
32
|
+
inject: {
|
|
33
|
+
isConfig: {
|
|
34
|
+
default: false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
32
37
|
props: {
|
|
33
38
|
value: {
|
|
34
39
|
type: String,
|
|
@@ -171,20 +176,16 @@ export default {
|
|
|
171
176
|
* 检查默认选中模式
|
|
172
177
|
*/
|
|
173
178
|
checkDefault() {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
return
|
|
177
|
-
}
|
|
178
|
-
let defaultType = this.attrs.default
|
|
179
|
-
let tempValue = undefined
|
|
179
|
+
const defaultType = this.attrs.default
|
|
180
|
+
let tempValue
|
|
180
181
|
// 如果默认选中“我的部门”,且无初始值,则设为默认部门
|
|
181
182
|
if (defaultType === '2') {
|
|
182
183
|
tempValue = this.defaultDepartment
|
|
183
184
|
} else if (defaultType === '3') {
|
|
184
185
|
tempValue = this.attrs.defaultValue
|
|
185
186
|
}
|
|
186
|
-
//
|
|
187
|
-
if (tempValue && !this.value) {
|
|
187
|
+
// 当tempValue有值且没有初始值时,或者是在配置模式下,则设置默认值并触发change事件
|
|
188
|
+
if ((tempValue && !this.value) || this.isConfig) {
|
|
188
189
|
this.myValue = tempValue
|
|
189
190
|
this.onChange()
|
|
190
191
|
}
|