<template>
	<tui-list-cell :hover="false" arrow :marginTop="10" unlined v-for="(item, index) in dataList" @click="toDetails(item.userId)">
		<view>{{item.nickName}}<block v-if="item.phonenumber">（{{item.phonenumber}}）</block></view>
	</tui-list-cell>
</template>

<script>
import { apiAlStaffListByDeptId } from '@/api/work'
export default {
	data() {
		return {
			dataList: []
		}
	},
	onLoad() {
		this.queryList()
	},
	methods: {
		// 获取员工列表
		queryList() {
			apiAlStaffListByDeptId().then(res => {
				this.dataList = res.data
			})
		},
		// 轨迹详情
		toDetails(id) {
			uni.$tui.href(`/pages/work/data/trajectory?id=${id}`)
		}
	}
}
</script>

<style lang="scss" scoped>

</style>
