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