personnel.vue
621 Bytes
<template>
<view class="container">
<tui-list-cell :marginTop="10" :hover="false" :arrow="false" unlined v-for="(item, index) in dataList">
<view>{{item.nickName}}<block v-if="item.deptName">({{item.deptName}})</block></view>
</tui-list-cell>
</view>
</template>
<script>
import { apiAlStaffListByDeptId } from '@/api/work'
export default {
data() {
return {
dataList: []
}
},
onLoad() {
this.queryList()
},
methods: {
// 获取员工列表
queryList() {
apiAlStaffListByDeptId().then(res => {
this.dataList = res.data
})
}
}
}
</script>
<style lang="scss" scoped>
</style>