|
@@ -90,7 +90,16 @@
|
|
|
<!-- />-->
|
|
|
<!-- </el-select>-->
|
|
|
<!-- </el-form-item>-->
|
|
|
-
|
|
|
+ <el-form-item label="项目" prop="projectId">
|
|
|
+ <el-select v-model="queryParams.projectId" placeholder="请选择项目" clearable size="small" >
|
|
|
+ <el-option
|
|
|
+ v-for="item in projectOptions"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
@@ -123,6 +132,11 @@
|
|
|
<el-table height="500" border v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="ID" align="center" prop="userId" />
|
|
|
+ <el-table-column label="项目" align="center" prop="projectId">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.projectId">{{ getProjectLabel(scope.row.projectId) }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="会员昵称" align="center" prop="nickname" />
|
|
|
<el-table-column label="会员头像" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
@@ -435,7 +449,9 @@ export default {
|
|
|
},
|
|
|
// 销售选项
|
|
|
companyUserOptions: [],
|
|
|
- companyOptions: []
|
|
|
+ companyOptions: [],
|
|
|
+ projectOptions: [],
|
|
|
+ selectedUser: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -452,6 +468,9 @@ export default {
|
|
|
this.getDicts("user_is_promoter").then((response) => {
|
|
|
this.userIsPromoterOptions = response.data;
|
|
|
});
|
|
|
+ this.getDicts("sys_course_project").then(response => {
|
|
|
+ this.projectOptions = response.data;
|
|
|
+ });
|
|
|
|
|
|
this.getList();
|
|
|
},
|
|
@@ -531,6 +550,7 @@ export default {
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.userId)
|
|
|
+ this.selectedUser = selection.map(item => {return {userId: item.userId, projectId: item.projectId}})
|
|
|
this.single = selection.length!==1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
@@ -683,7 +703,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- changeCompanyUser(this.ids, {
|
|
|
+ changeCompanyUser(this.selectedUser, {
|
|
|
companyUserId: this.changeCompanyUserForm.companyUserId,
|
|
|
companyId: this.changeCompanyUserForm.companyId
|
|
|
}).then(response => {
|
|
@@ -699,7 +719,11 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ /** 获取项目对应名称 */
|
|
|
+ getProjectLabel(projectId) {
|
|
|
+ return this.projectOptions.find(item => parseInt(item.dictValue) === projectId)?.dictLabel;
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|