|
@@ -1,7 +1,13 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div>
|
|
|
- <select-user v-for=""/>
|
|
|
+ <select-user
|
|
|
+ v-for="(item, key) in list"
|
|
|
+ :key="key"
|
|
|
+ :name="key"
|
|
|
+ :item="item"
|
|
|
+ :subjectsById="subjectsById"
|
|
|
+ />
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="$listeners.close">取 消</el-button>
|
|
@@ -10,6 +16,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { array2object } from '@/helpers/utils'
|
|
|
import { employeeLevelDetail } from '../api'
|
|
|
import selectUser from './select-user'
|
|
|
export default {
|
|
@@ -22,15 +29,22 @@ export default {
|
|
|
list: []
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ subjectsById() {
|
|
|
+ return array2object(this.selects.subjects, 'id')
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
+ this.$store.dispatch('setSubjects')
|
|
|
this.FetchDetail()
|
|
|
},
|
|
|
methods: {
|
|
|
async FetchDetail() {
|
|
|
try {
|
|
|
- await employeeLevelDetail({
|
|
|
+ const res = await employeeLevelDetail({
|
|
|
userId: this.detail.id
|
|
|
})
|
|
|
+ this.list = res.data
|
|
|
} catch (error) {}
|
|
|
}
|
|
|
}
|