From be04ce66ecbfa9190336db0182def6a15b0caeaf Mon Sep 17 00:00:00 2001 From: zhanglipeng <chinazhanglipeng@qq.com> Date: Mon, 19 Apr 2021 17:19:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=85=B3=E7=B3=BB=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/system/user.js | 9 +++++ ruoyi-ui/src/views/benyi/customer/index.vue | 36 ++++++++++++++++--- .../system/controller/SysUserController.java | 17 +++++++++ 3 files changed, 57 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js index b01c499d8..5ab7b12b9 100644 --- a/ruoyi-ui/src/api/system/user.js +++ b/ruoyi-ui/src/api/system/user.js @@ -10,6 +10,15 @@ export function listUser(query) { }) } +// 查询用户列表 +export function listlrrUser(query) { + return request({ + url: '/system/user/lrrlist', + method: 'get', + params: query + }) +} + // 查询用户详细 export function getUser(userId) { return request({ diff --git a/ruoyi-ui/src/views/benyi/customer/index.vue b/ruoyi-ui/src/views/benyi/customer/index.vue index d08d23699..53da2dc6f 100644 --- a/ruoyi-ui/src/views/benyi/customer/index.vue +++ b/ruoyi-ui/src/views/benyi/customer/index.vue @@ -70,6 +70,21 @@ </el-select> </el-form-item> </el-col> + <el-col :xs="24" :ms="12" :md="5"> + <el-form-item label="录入人" prop="createUserid"> + <el-select + v-model="queryParams.createUserid" + placeholder="请选择录入人" + > + <el-option + v-for="dict in lrrOptions" + :key="dict.userId" + :label="dict.nickName" + :value="dict.userId" + ></el-option> + </el-select> + </el-form-item> + </el-col> <el-col :xs="24" :ms="12" :md="4"> <el-form-item class="no-margin"> <el-button @@ -579,10 +594,14 @@ import { updateCustomer, exportCustomer, } from "@/api/benyi/customer"; -import { listUser, getUserOnlyByRoleId } from "@/api/system/user"; +import { + listUser, + listlrrUser, + getUserOnlyByRoleId, + getUserProfile, +} from "@/api/system/user"; //导入省市区三级联动库 import VDistpicker from "v-distpicker"; -import { getUserProfile } from "@/api/system/user"; export default { name: "Customer", data() { @@ -626,7 +645,7 @@ export default { customerUserOptions: [], // 用户选项 userOptions: [], - + lrrOptions: [], // 查询参数 queryParams: { // 当前页 @@ -695,6 +714,7 @@ export default { this.getUserList(); this.getUsersByRole(); this.getUser(); + this.getLrrList(); }, components: { //省市区三级联动全局组件 @@ -720,6 +740,12 @@ export default { this.userOptions = response.rows; }); }, + /** 查询用户列表 */ + getLrrList() { + listlrrUser(null).then((response) => { + this.lrrOptions = response.rows; + }); + }, /** 根据roleid查询用户列表 */ getUsersByRole() { getUserOnlyByRoleId(this.roleId).then((response) => { @@ -880,7 +906,7 @@ export default { const id = row.id || this.ids; getCustomer(id).then((response) => { this.form = response.data; - if (response.data.sheng == null) { + if (response.data.sheng == null) { this.diglogForm.province = ""; } else { this.diglogForm.province = response.data.sheng; @@ -908,7 +934,7 @@ export default { // this.diglogForm.province = response.data.sheng; // this.diglogForm.city = response.data.shi; // this.diglogForm.area = response.data.quxian; - if (response.data.sheng == null) { + if (response.data.sheng == null) { this.diglogForm.province = ""; } else { this.diglogForm.province = response.data.sheng; diff --git a/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysUserController.java b/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysUserController.java index af7dcd623..d4fa69b35 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysUserController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysUserController.java @@ -74,6 +74,23 @@ public class SysUserController extends BaseController { return getDataTable(list); } + @GetMapping("/lrrlist") + public TableDataInfo lrrlist(SysUser user) { + int l1=103; + user.setDeptId(Long.valueOf(l1)); + List<SysUser> list = userService.selectUserList(user); + + int l2=105; + user.setDeptId(Long.valueOf(l2)); + list.addAll(userService.selectUserList(user)); + + int l3=107; + user.setDeptId(Long.valueOf(l3)); + list.addAll(userService.selectUserList(user)); + + return getDataTable(list); + } + @Log(title = "用户管理", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:user:export')") @GetMapping("/export")