|
|
|
@ -216,7 +216,7 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<!-- <el-divider></el-divider>
|
|
|
|
|
<el-divider></el-divider>
|
|
|
|
|
<el-card>
|
|
|
|
|
<div style="text-align: center">
|
|
|
|
|
<template>
|
|
|
|
@ -224,6 +224,7 @@
|
|
|
|
|
filterable
|
|
|
|
|
filter-placeholder="请输入班组人员名称"
|
|
|
|
|
:titles="['可选班组人员', '当前班组人员']"
|
|
|
|
|
:button-texts="['解除添加', '添加']"
|
|
|
|
|
:data="leftList"
|
|
|
|
|
v-model="rightList"
|
|
|
|
|
style="text-align: left"
|
|
|
|
@ -231,7 +232,7 @@
|
|
|
|
|
</el-transfer>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</el-card> -->
|
|
|
|
|
</el-card>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
@ -241,7 +242,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listTeam, getTeam, delTeam, addTeam, updateTeam ,listTeamMembers} from "@/api/wms/team";
|
|
|
|
|
import { listTeam, getTeam, delTeam, addTeam, updateTeam ,listTeamMembers,getRightList} from "@/api/wms/team";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Team",
|
|
|
|
@ -263,10 +264,10 @@ export default {
|
|
|
|
|
// 班组表格数据
|
|
|
|
|
teamList: [],
|
|
|
|
|
teamMembersList:[],
|
|
|
|
|
// // 可选(左边)
|
|
|
|
|
// leftList: [],
|
|
|
|
|
// // 已选(右边,只需要key)
|
|
|
|
|
// rightList: [],
|
|
|
|
|
// 可选(左边)
|
|
|
|
|
leftList: [],
|
|
|
|
|
// 已选(右边,只需要key)
|
|
|
|
|
rightList: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
@ -330,24 +331,24 @@ export default {
|
|
|
|
|
indexMethod(index) {
|
|
|
|
|
return index + 1;
|
|
|
|
|
},
|
|
|
|
|
// getTeamMembers() {
|
|
|
|
|
// // 调用查询课程列表接口
|
|
|
|
|
// listTeamMembers(this.queryParams).then(response => {
|
|
|
|
|
// for(let i in response.rows){
|
|
|
|
|
// // 将返回的列表赋值于穿梭框左边列表
|
|
|
|
|
// this.leftList.push({
|
|
|
|
|
// key: response.rows[i].userId,
|
|
|
|
|
// label: response.rows[i].userName
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// for(let i in response.selected){
|
|
|
|
|
// // 将返回的列表赋值于穿梭框左边列表
|
|
|
|
|
// this.rightList.push(response.selected[i].key);
|
|
|
|
|
// this.form.rightData = this.rightList;
|
|
|
|
|
// }
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
getTeamMembers() {
|
|
|
|
|
// 调用列表接口
|
|
|
|
|
listTeamMembers(this.queryParams).then(response => {
|
|
|
|
|
console.log(response.rows);
|
|
|
|
|
for(let i in response.rows){
|
|
|
|
|
// 将返回的列表赋值于穿梭框左边列表
|
|
|
|
|
this.leftList.push({
|
|
|
|
|
key: response.rows[i].userId,
|
|
|
|
|
label: response.rows[i].userName
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
for(let i in response.selected){
|
|
|
|
|
this.rightList.push(response.selected[i].key);
|
|
|
|
|
this.form.rightData = this.rightList;
|
|
|
|
|
}
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 查询班组列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -388,7 +389,6 @@ export default {
|
|
|
|
|
teamProperties: null,
|
|
|
|
|
attendanceQuantity: null,
|
|
|
|
|
assignedQuantity: null
|
|
|
|
|
// rightData: null
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
@ -411,18 +411,39 @@ export default {
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.rightList = [];
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加班组";
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.rightList = [];
|
|
|
|
|
this.reset();
|
|
|
|
|
const teamId = row.teamId || this.ids
|
|
|
|
|
// listTeamMembers(this.queryParams).then(response => {
|
|
|
|
|
// console.log(response.rows);
|
|
|
|
|
// for(let i in response.rows){
|
|
|
|
|
// // 将返回的列表赋值于穿梭框左边列表
|
|
|
|
|
// this.leftList.push({
|
|
|
|
|
// id:response.rows[i].userId,
|
|
|
|
|
// key: response.rows[i].userId,
|
|
|
|
|
// label: response.rows[i].userName
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
console.log('this.leftList',this.leftList);
|
|
|
|
|
getTeam(teamId).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改班组";
|
|
|
|
|
});
|
|
|
|
|
for(let i in response.data.selectedData){
|
|
|
|
|
// 将返回的列表赋值于穿梭框右边列表
|
|
|
|
|
this.rightList.push(
|
|
|
|
|
response.data.selectedData[i].userId
|
|
|
|
|
)
|
|
|
|
|
};
|
|
|
|
|
console.log('response.data.selectedData',response.data.selectedData);
|
|
|
|
|
})
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改班组";
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|