|
@@ -20,7 +20,7 @@
|
|
|
<van-checkbox :name="item.id" v-for="item, index in personnelList" :key="index">
|
|
|
<div class="chooseSomeone_group_item">
|
|
|
<div>{{ item.name }}</div>
|
|
|
- <div class="textBeyondHiding">{{ item.workStation }}</div>
|
|
|
+ <div class="textBeyondHiding">{{ item.jobNumber }}</div>
|
|
|
</div>
|
|
|
</van-checkbox>
|
|
|
</van-checkbox-group>
|
|
@@ -53,7 +53,11 @@ export default {
|
|
|
groupViewBack: {
|
|
|
type: Boolean,
|
|
|
default: () => false // 是否显示从其他工位选择员工
|
|
|
- }
|
|
|
+ },
|
|
|
+ peopleList: {
|
|
|
+ type: Array,
|
|
|
+ default: () => []
|
|
|
+ }
|
|
|
},
|
|
|
components: {},
|
|
|
data() {
|
|
@@ -63,22 +67,7 @@ export default {
|
|
|
groupVal: [],
|
|
|
treeVal: [],
|
|
|
// 人员数组
|
|
|
- personnelList: [
|
|
|
- { id: 1, name: '张山', workNumber: '123', workStation: '工位1' },
|
|
|
- { id: 2, name: '李四', workNumber: '123', workStation: '工位2' },
|
|
|
- { id: 3, name: '王五', workNumber: '123', workStation: '工位3' },
|
|
|
- { id: 4, name: '赵六', workNumber: '123', workStation: '工位4' },
|
|
|
- { id: 5, name: '张山', workNumber: '123', workStation: '工位5' },
|
|
|
- { id: 6, name: '李四', workNumber: '123', workStation: '工位6' },
|
|
|
- { id: 7, name: '王五', workNumber: '123', workStation: '工位7' },
|
|
|
- { id: 8, name: '赵六', workNumber: '123', workStation: '工位8' },
|
|
|
- { id: 9, name: '张山', workNumber: '123', workStation: '工位9' },
|
|
|
- { id: 10, name: '李四', workNumber: '123', workStation: '工位10' },
|
|
|
- { id: 11, name: '王五', workNumber: '123', workStation: '工位11' },
|
|
|
- { id: 12, name: '赵六', workNumber: '123', workStation: '工位12' },
|
|
|
- { id: 13, name: '张山', workNumber: '123', workStation: '工位13' },
|
|
|
- { id: 14, name: '李四', workNumber: '123', workStation: '工位14' },
|
|
|
- ],
|
|
|
+ personnelList: [],
|
|
|
personnelTree: [{
|
|
|
label: '一级 1',
|
|
|
children: [{
|
|
@@ -129,6 +118,7 @@ export default {
|
|
|
mounted() {
|
|
|
this.newGroupView = JSON.parse(JSON.stringify(this.groupView))
|
|
|
this.newGroupViewBack = JSON.parse(JSON.stringify(this.groupViewBack))
|
|
|
+ this.personnelList = JSON.parse(JSON.stringify(this.peopleList))
|
|
|
},
|
|
|
methods: {
|
|
|
onSearch() {
|
|
@@ -137,6 +127,27 @@ export default {
|
|
|
newGroupViewBackCli(flg, i) {
|
|
|
this.newGroupViewBack = flg
|
|
|
this.newGroupView = i
|
|
|
+ },
|
|
|
+ // 获取所有人员
|
|
|
+ getPeople() {
|
|
|
+ this.$axios.post('/user/getSimpleActiveUserList', {})
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ if(!this.peopleList) {
|
|
|
+ this.peopleList = res.data.map(item => {
|
|
|
+ return {
|
|
|
+ name: item.name,
|
|
|
+ id: item.id,
|
|
|
+ phone: item.phone,
|
|
|
+ jobNumber: item.jobNumber
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$toast.clear();
|
|
|
+ this.$toast.fail(res.msg);
|
|
|
+ }
|
|
|
+ }).catch(err => { this.$toast.clear(); });
|
|
|
}
|
|
|
},
|
|
|
};
|