mirror of https://github.com/veops/cmdb.git
Merge pull request #615 from veops/dev_ui_240913
feat(ui): add employeeTreeSelect otherOptions prop
This commit is contained in:
commit
12c7b564cd
|
@ -21,8 +21,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import _ from 'lodash'
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
import { formatOption } from '@/utils/util'
|
import { formatOption } from '@/utils/util'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EmployeeTreeSelect',
|
name: 'EmployeeTreeSelect',
|
||||||
components: {
|
components: {
|
||||||
|
@ -69,6 +71,11 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
|
otherOptions: {
|
||||||
|
type: Array,
|
||||||
|
defualt: () => [],
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {}
|
||||||
|
@ -96,7 +103,16 @@ export default {
|
||||||
return this.provide_allTreeDepAndEmp()
|
return this.provide_allTreeDepAndEmp()
|
||||||
},
|
},
|
||||||
employeeTreeSelectOption() {
|
employeeTreeSelectOption() {
|
||||||
return formatOption(this.allTreeDepAndEmp, this.idType, false, this.departmentKey, this.employeeKey)
|
return formatOption(
|
||||||
|
[
|
||||||
|
..._.cloneDeep(this.allTreeDepAndEmp),
|
||||||
|
..._.cloneDeep(this.otherOptions)
|
||||||
|
],
|
||||||
|
this.idType,
|
||||||
|
false,
|
||||||
|
this.departmentKey,
|
||||||
|
this.employeeKey
|
||||||
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {},
|
methods: {},
|
||||||
|
|
Loading…
Reference in New Issue