1
0
Selaa lähdekoodia

fix:小程序科室重新排版和新增搜索

lsw 7 kuukautta sitten
vanhempi
commit
d717b12971

+ 2 - 2
admin-ui/src/views/system/dept/edit.vue

@@ -5,7 +5,7 @@
         <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级科室" />
         <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级科室" />
       </el-form-item>
       </el-form-item>
       <el-form-item label="科室名称" prop="deptName"><el-input v-model="form.deptName" placeholder="请输入科室名称" /></el-form-item>
       <el-form-item label="科室名称" prop="deptName"><el-input v-model="form.deptName" placeholder="请输入科室名称" /></el-form-item>
-      <div v-if="form.parentId != 0">
+      <div v-if="form.parentId != 0 && form.ancestors.length == 3">
         <el-form-item label="科室介绍" prop="brief">
         <el-form-item label="科室介绍" prop="brief">
           <editor v-model="form.brief" placeholder="请输入"></editor>
           <editor v-model="form.brief" placeholder="请输入"></editor>
         </el-form-item>
         </el-form-item>
@@ -44,7 +44,6 @@ export default {
       rules: {
       rules: {
         parentId: [{ required: true, message: '上级部门不能为空', trigger: 'blur' }],
         parentId: [{ required: true, message: '上级部门不能为空', trigger: 'blur' }],
         deptName: [{ required: true, message: '部门名称不能为空', trigger: 'blur' }],
         deptName: [{ required: true, message: '部门名称不能为空', trigger: 'blur' }],
-        brief: [{ required: true, message: '科室介绍不能为空', trigger: 'blur' }],
         orderNum: [{ required: true, message: '显示排序不能为空', trigger: 'blur' }]
         orderNum: [{ required: true, message: '显示排序不能为空', trigger: 'blur' }]
       }
       }
     };
     };
@@ -53,6 +52,7 @@ export default {
     if (this.param.id) {
     if (this.param.id) {
       getDept(this.param.id).then((response) => {
       getDept(this.param.id).then((response) => {
         this.form = response.data;
         this.form = response.data;
+        this.form.brief=this.form.brief||'';
         this.form.ancestors = this.form.ancestors.split(',') || [];
         this.form.ancestors = this.form.ancestors.split(',') || [];
         listDeptExcludeChild(this.param.id).then((response) => {
         listDeptExcludeChild(this.param.id).then((response) => {
           this.deptOptions = this.handleTree(response.data, 'deptId');
           this.deptOptions = this.handleTree(response.data, 'deptId');

+ 1 - 1
admin-ui/src/views/system/dept/index.vue

@@ -26,7 +26,7 @@
       <el-table-column label="操作" align="center" width="220">
       <el-table-column label="操作" align="center" width="220">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:dept:edit']">修改</el-button>
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:dept:edit']">修改</el-button>
-          <el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)" v-hasPermi="['system:dept:add']" v-if="scope.row.parentId==0">新增</el-button>
+          <el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)" v-hasPermi="['system:dept:add']" v-if="scope.row.ancestors.length < 3">新增</el-button>
           <el-button v-if="scope.row.parentId != 0" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dept:remove']">删除</el-button>
           <el-button v-if="scope.row.parentId != 0" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dept:remove']">删除</el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>

+ 68 - 1
app/common/common.scss

@@ -60,6 +60,9 @@
 	padding: 5px 15px 5px 15px;
 	padding: 5px 15px 5px 15px;
 }
 }
 .msilde {
 .msilde {
+	.search {
+		padding: 0px 15px 10px 15px;
+	}
 	.top {
 	.top {
 		padding: 10px;
 		padding: 10px;
 		text-align: center;
 		text-align: center;
@@ -112,6 +115,17 @@
 					border-radius: 5px;
 					border-radius: 5px;
 					float: left;
 					float: left;
 				}
 				}
+				.title {
+					color: $font-c;
+					font-size: 14px;
+					width: 85%;
+				}
+				.icon {
+					float: right;
+					color: $font-c;
+					margin-top: -18px;
+					font-size: 15px;
+				}
 				.con {
 				.con {
 					float: left;
 					float: left;
 					width: 60%;
 					width: 60%;
@@ -465,4 +479,57 @@
 			}
 			}
 		}
 		}
 	}
 	}
-}
+}
+.history {
+	overflow: hidden;
+	padding-top: 10px;
+	padding-bottom: 10px;
+	.title {
+		margin-bottom: 12px;
+		font-weight: bold;
+	}
+	.del {
+		float: right;
+		font-size: 14px;
+		margin-top: -30px;
+		color: #f44336;
+		.icon {
+			padding-right: 3px;
+		}
+	}
+	.tag {
+		float: left;
+		padding: 4px 10px;
+		border-radius: 30px;
+		background-color: #eeeeee;
+		margin-right: 10px;
+		margin-bottom: 5px;
+		font-size: 14px;
+		color: $font-c;
+	}
+}
+.search_list {
+	padding: 0px 10px 0px 10px;
+	background-color: white;
+	border-radius: 10px;
+	margin-top: 15px;
+	.item {
+		padding: 15px 5px 15px 0px;
+		overflow: hidden;
+		border-bottom: 1px solid $line;
+		&:last-child {
+			border: 0px;
+		}
+		.title {
+			color: $font-c;
+			font-size: 14px;
+			width: 85%;
+		}
+		.icon {
+			float: right;
+			color: $font-c;
+			margin-top: -18px;
+			font-size: 15px;
+		}
+	}
+}

+ 21 - 0
app/pages.json

@@ -249,6 +249,27 @@
 			{
 			{
 				"navigationBarTitleText" : "检测报告详情"
 				"navigationBarTitleText" : "检测报告详情"
 			}
 			}
+		},
+		{
+			"path" : "pages/department/detail",
+			"style" : 
+			{
+				"navigationBarTitleText" : "科室详情"
+			}
+		},
+		{
+			"path" : "pages/department/search",
+			"style" : 
+			{
+				"navigationBarTitleText" : "搜索科室"
+			}
+		},
+		{
+			"path" : "pages/doctor/search",
+			"style" : 
+			{
+				"navigationBarTitleText" : "搜索医生"
+			}
 		}
 		}
 	],
 	],
 	"tabBar": {
 	"tabBar": {

+ 37 - 0
app/pages/department/detail.vue

@@ -0,0 +1,37 @@
+<template>
+	<view class="detail">
+		<view class="con">
+			<u-parse :content="item.brief" v-if="item.brief"></u-parse>
+			<u-empty v-else text="整理资料中..."></u-empty>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			item: {}
+		};
+	},
+	onLoad(e) {
+		this.http.request({
+			url: '/app/department/detail/' + e.id,
+			success: (res) => {
+				this.item = res.data.data;
+				uni.setNavigationBarTitle({ title: this.item.deptName });
+				if (res.data.data.brief) {
+					this.item.brief = res.data.data.brief.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
+				}
+			}
+		});
+	},
+	methods: {}
+};
+</script>
+
+<style lang="scss">
+page {
+	background-color: white;
+}
+</style>

+ 13 - 17
app/pages/department/index.vue

@@ -1,13 +1,19 @@
 <template>
 <template>
 	<view class="msilde">
 	<view class="msilde">
+		<view class="search">
+			<u-search placeholder="搜索科室" :disabled="true" bgColor="white" :showAction="false" @click="go('/pages/department/search')"></u-search>
+		</view>
 		<view class="left">
 		<view class="left">
-			<view :class="{ active: index == current }" v-for="(item, index) in list" :key="index" class="item" @click="selected(item, index)">{{ item.deptName }}</view>
+			<view :class="{ active: index == current }" v-for="(item, index) in list" :key="index" class="item" @click="current = index">{{ item.deptName }}</view>
 		</view>
 		</view>
 		<view class="right">
 		<view class="right">
-			<view class="contents">
-				<u-parse :content="item.brief" v-if="item.brief"></u-parse>
-				<u-empty v-else text="整理资料中..."></u-empty>
+			<view class="list" v-if="list.length > 0">
+				<view class="item" v-for="(item, index) in list[current].children" :key="item.deptId" @click="go('/pages/department/detail?id=' + item.deptId)">
+					<view class="title omit">{{ item.deptName }}</view>
+					<view class="icon">&#xe62b;</view>
+				</view>
 			</view>
 			</view>
+			<u-empty v-else text="整理资料中..."></u-empty>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -16,8 +22,8 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
+			title: '',
 			current: 0,
 			current: 0,
-			item: {},
 			list: []
 			list: []
 		};
 		};
 	},
 	},
@@ -30,21 +36,11 @@ export default {
 				url: '/app/department/list',
 				url: '/app/department/list',
 				success: (res) => {
 				success: (res) => {
 					this.list = res.data.data;
 					this.list = res.data.data;
-					this.selected(this.list[0], 0);
 				}
 				}
 			});
 			});
 		},
 		},
-		selected(item, index) {
-			this.current = index;
-			this.http.request({
-				url: '/app/department/detail/' + item.deptId,
-				success: (res) => {
-					this.item = res.data.data;
-					if (res.data.data.brief) {
-						this.item.brief = res.data.data.brief.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
-					}
-				}
-			});
+		go(url) {
+			uni.navigateTo({ url: url });
 		}
 		}
 	}
 	}
 };
 };

+ 75 - 0
app/pages/department/search.vue

@@ -0,0 +1,75 @@
+<template>
+	<view class="main">
+		<view class="search">
+			<u-search placeholder="搜索工作" :focus="true" bgColor="white" v-model="deptName" :showAction="false" @search="search()" @clear="refresh()"></u-search>
+		</view>
+		<view class="search_list">
+			<view class="history" v-if="!focus">
+				<view class="title">搜索历史</view>
+				<view class="del" v-if="history.length > 0" @click="del()">
+					<text class="icon">&#xe8b6;</text>
+					<text>清除</text>
+				</view>
+				<view class="tag" v-for="(item, index) in history" :key="item" @click="(deptName = item), search()">{{ item }}</view>
+			</view>
+			<view class="item" v-for="(item, index) in list" :key="item.deptId" @click="go('/pages/department/detail?id=' + item.deptId)">
+				<view class="title omit">{{ item.deptName }}</view>
+				<view class="icon">&#xe62b;</view>
+			</view>
+			<u-empty v-if="list.length == 0"></u-empty>
+		</view>
+	</view>
+</template>
+<script>
+export default {
+	data() {
+		return {
+			list: [],
+			focus: false,
+			history: uni.getStorageSync('history') || [],
+			deptName: ''
+		};
+	},
+	onLoad(e) {},
+	methods: {
+		getData() {
+			this.http.request({
+				url: '/app/department/selectDeptList',
+				data: { deptName: this.deptName },
+				success: (res) => {
+					this.list = res.data.data;
+				}
+			});
+		},
+		go(url) {
+			uni.navigateTo({ url: url });
+		},
+		search() {
+			if (this.deptName.trim()) {
+				this.focus = true;
+				if (this.history.filter((item) => item == this.deptName.trim()) == 0) {
+					this.history.unshift(this.deptName);
+					uni.setStorageSync('history', this.history);
+				}
+				this.getData();
+			}
+		},
+		refresh() {
+			this.deptName = '';
+			this.list = [];
+			this.search();
+		},
+		del() {
+			uni.removeStorageSync('history');
+			this.history = [];
+		},
+		clear() {
+			this.focus = false;
+			this.deptName = '';
+			this.list = [];
+		}
+	}
+};
+</script>
+
+<style lang="scss"></style>

+ 1 - 1
app/pages/doctor/detail.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view class="detail">
 	<view class="detail">
 		<view class="top">
 		<view class="top">
-			<image :src="ip + item.avatar" mode="widthFix" class="avatar" v-if="item.avatar"></image>
+			<image :src="item.avatar ? ip + item.avatar : '../../static/head.png'" mode="widthFix" class="avatar"></image>
 			<view class="title">{{ item.name }}</view>
 			<view class="title">{{ item.name }}</view>
 		</view>
 		</view>
 		<view class="con">
 		<view class="con">

+ 18 - 6
app/pages/doctor/index.vue

@@ -1,7 +1,14 @@
 <template>
 <template>
 	<view class="msilde">
 	<view class="msilde">
+		<view class="search">
+			<u-search placeholder="搜索医生" :disabled="true" bgColor="white" :showAction="false" @click="go('/pages/doctor/search')"></u-search>
+		</view>
 		<view class="left">
 		<view class="left">
-			<view :class="{ active: index == current }" v-for="(item, index) in list" :key="index" class="item" @click="selected(item, index)">{{ item.deptName }}</view>
+			<u-collapse accordion :value="list[0].deptId">
+				<u-collapse-item :title="d.deptName" :name="d.deptId" v-for="(d, index) in list" :key="d.deptName">
+					<view :class="{ active: index == i.current }" v-for="(i, index) in d.children" :key="i.deptName" class="item" @click="selected(i, index)">{{ i.deptName }}</view>
+				</u-collapse-item>
+			</u-collapse>
 		</view>
 		</view>
 		<view class="right">
 		<view class="right">
 			<view class="list" v-if="doctor_list.length > 0">
 			<view class="list" v-if="doctor_list.length > 0">
@@ -9,7 +16,7 @@
 					<image :src="item.avatar ? ip + item.avatar : '../../static/head.png'" mode="scaleToFill" class="avatar"></image>
 					<image :src="item.avatar ? ip + item.avatar : '../../static/head.png'" mode="scaleToFill" class="avatar"></image>
 					<view class="con">
 					<view class="con">
 						<view class="name">{{ item.name }}</view>
 						<view class="name">{{ item.name }}</view>
-						<view class="brief ellip">{{ item.brief || '暂无介绍资料' }}</view>
+						<view class="brief ellip">{{ item.brief }}</view>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -22,10 +29,9 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
-			current: 0,
 			ip: this.http.ip,
 			ip: this.http.ip,
 			doctor_list: {},
 			doctor_list: {},
-			list: []
+			list: [{ deptId: 0 }]
 		};
 		};
 	},
 	},
 	onLoad(e) {
 	onLoad(e) {
@@ -37,12 +43,18 @@ export default {
 				url: '/app/department/list',
 				url: '/app/department/list',
 				success: (res) => {
 				success: (res) => {
 					this.list = res.data.data;
 					this.list = res.data.data;
-					this.selected(this.list[0], 0);
+					if (this.list.length > 0 && this.list[0].children.length > 0) {
+						this.selected(this.list[0].children[0], 0);
+					}
 				}
 				}
 			});
 			});
 		},
 		},
+		open() {
+			this.current = -1;
+		},
 		selected(item, index) {
 		selected(item, index) {
-			this.current = index;
+			this.list.flatMap((i) => i.children).forEach((j) => (j.current = -1));
+			item.current = index;
 			this.http.request({
 			this.http.request({
 				url: '/app/doctor/list',
 				url: '/app/doctor/list',
 				data: { deptId: item.deptId },
 				data: { deptId: item.deptId },

+ 75 - 0
app/pages/doctor/search.vue

@@ -0,0 +1,75 @@
+<template>
+	<view class="main">
+		<view class="search">
+			<u-search placeholder="搜索工作" :focus="true" bgColor="white" v-model="nickName" :showAction="false" @search="search()" @clear="refresh()"></u-search>
+		</view>
+		<view class="search_list">
+			<view class="history" v-if="!focus">
+				<view class="title">搜索历史</view>
+				<view class="del" v-if="history.length > 0" @click="del()">
+					<text class="icon">&#xe8b6;</text>
+					<text>清除</text>
+				</view>
+				<view class="tag" v-for="(item, index) in history" :key="item" @click="(nickName = item), search()">{{ item }}</view>
+			</view>
+			<view class="item" v-for="(item, index) in list" :key="item.deptId" @click="go('/pages/doctor/detail?id=' + item.id)">
+				<view class="title omit">{{ item.name }}</view>
+				<view class="icon">&#xe62b;</view>
+			</view>
+			<u-empty v-if="list.length == 0"></u-empty>
+		</view>
+	</view>
+</template>
+<script>
+export default {
+	data() {
+		return {
+			list: [],
+			focus: false,
+			history: uni.getStorageSync('history2') || [],
+			nickName: ''
+		};
+	},
+	onLoad(e) {},
+	methods: {
+		getData() {
+			this.http.request({
+				url: '/app/doctor/list',
+				data: { nickName: this.nickName },
+				success: (res) => {
+					this.list = res.data.data;
+				}
+			});
+		},
+		go(url) {
+			uni.navigateTo({ url: url });
+		},
+		search() {
+			if (this.nickName.trim()) {
+				this.focus = true;
+				if (this.history.filter((item) => item == this.nickName.trim()) == 0) {
+					this.history.unshift(this.nickName);
+					uni.setStorageSync('history2', this.history);
+				}
+				this.getData();
+			}
+		},
+		refresh() {
+			this.nickName = '';
+			this.list = [];
+			this.search();
+		},
+		del() {
+			uni.removeStorageSync('history2');
+			this.history = [];
+		},
+		clear() {
+			this.focus = false;
+			this.nickName = '';
+			this.list = [];
+		}
+	}
+};
+</script>
+
+<style lang="scss"></style>

+ 7 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_DepartmentController.java

@@ -1,6 +1,7 @@
 package com.ruoyi.web.work.api;
 package com.ruoyi.web.work.api;
 
 
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.system.service.ISysDeptService;
 import com.ruoyi.system.service.ISysDeptService;
 import com.ruoyi.web.work.api.config.BaseController;
 import com.ruoyi.web.work.api.config.BaseController;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -27,6 +28,12 @@ public class Api_DepartmentController extends BaseController {
         return deptService.treeList();
         return deptService.treeList();
     }
     }
 
 
+    @GetMapping("/selectDeptList")
+    public AjaxResult selectDeptList(SysDept dept) {
+        dept.setStatus("0");
+        return AjaxResult.success(deptService.selectDeptList(dept));
+    }
+
     @GetMapping(value = "/detail/{id}")
     @GetMapping(value = "/detail/{id}")
     public AjaxResult detail(@PathVariable("id") Long id) {
     public AjaxResult detail(@PathVariable("id") Long id) {
         return AjaxResult.success(deptService.getById(id));
         return AjaxResult.success(deptService.getById(id));

+ 3 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_DoctorController.java

@@ -1,6 +1,7 @@
 package com.ruoyi.web.work.api;
 package com.ruoyi.web.work.api;
 
 
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.system.service.ISysUserService;
 import com.ruoyi.system.service.ISysUserService;
 import com.ruoyi.web.work.api.config.BaseController;
 import com.ruoyi.web.work.api.config.BaseController;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,8 +18,8 @@ public class Api_DoctorController extends BaseController {
     private ISysUserService userService;
     private ISysUserService userService;
 
 
     @GetMapping("/list")
     @GetMapping("/list")
-    public AjaxResult list(Long deptId) {
-        return AjaxResult.success(userService.selectDoctor(deptId));
+    public AjaxResult list(SysUser user) {
+        return AjaxResult.success(userService.selectDoctor(user));
     }
     }
 
 
     @GetMapping(value = "/detail/{id}")
     @GetMapping(value = "/detail/{id}")

+ 1 - 2
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java

@@ -129,8 +129,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
     public SysUser checkEmailUnique(String email);
     public SysUser checkEmailUnique(String email);
 
 
 
 
-    @Select("SELECT user_id AS id,nick_name AS name,avatar,brief FROM sys_user WHERE dept_id=#{deptId} AND status='0'  ORDER BY user_id DESC")
-    List<Map<String, Object>> selectDoctor(@Param("deptId") Long deptId);
+    List<Map<String, Object>> selectDoctor(SysUser user);
 
 
     @Select("SELECT nick_name AS name,avatar,introduce FROM sys_user WHERE user_id=#{userId} AND status='0'")
     @Select("SELECT nick_name AS name,avatar,introduce FROM sys_user WHERE user_id=#{userId} AND status='0'")
     Map<String, Object> detail(@Param("userId") Long userId);
     Map<String, Object> detail(@Param("userId") Long userId);

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java

@@ -213,7 +213,7 @@ public interface ISysUserService extends IService<SysUser> {
      * @param deptId
      * @param deptId
      * @return
      * @return
      */
      */
-    List<Map<String, Object>> selectDoctor(Long deptId);
+    List<Map<String, Object>> selectDoctor(SysUser user);
 
 
     /**
     /**
      * 医生详情
      * 医生详情

+ 6 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java

@@ -67,6 +67,12 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
     public AjaxResult treeList() {
     public AjaxResult treeList() {
         List<Map<String, Object>> all = deptMapper.treeList();
         List<Map<String, Object>> all = deptMapper.treeList();
         List<Map<String, Object>> list = all.stream().filter(r -> r.get("parentId").toString().equals("100")).collect(Collectors.toList());
         List<Map<String, Object>> list = all.stream().filter(r -> r.get("parentId").toString().equals("100")).collect(Collectors.toList());
+        for (Map record : list) {
+            List<Map<String, Object>> children = all.stream().filter(r -> r.get("parentId").toString().equals(record.get("deptId").toString())).collect(Collectors.toList());
+            if (children.size() > 0) {
+                record.put("children", children);
+            }
+        }
         return AjaxResult.success(list);
         return AjaxResult.success(list);
     }
     }
 
 

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java

@@ -493,8 +493,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     }
     }
 
 
     @Override
     @Override
-    public List<Map<String, Object>> selectDoctor(Long deptId) {
-        return userMapper.selectDoctor(deptId);
+    public List<Map<String, Object>> selectDoctor(SysUser user) {
+        return userMapper.selectDoctor(user);
     }
     }
 
 
     @Override
     @Override

+ 8 - 0
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -40,6 +40,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="leader"    column="leader"      />
         <result property="leader"    column="leader"      />
         <result property="status"    column="dept_status" />
         <result property="status"    column="dept_status" />
     </resultMap>
     </resultMap>
+
+	<select id="selectDoctor" resultType="java.util.Map">
+		SELECT user_id AS id,nick_name AS name,avatar,brief FROM sys_user
+		WHERE status='0'
+			<if test="deptId != null"> AND dept_id=#{deptId}</if>
+			<if test="nickName != null and nickName != ''">AND nick_name like concat('%', #{nickName}, '%')</if>
+		ORDER BY user_id DESC
+	</select>
 	
 	
     <resultMap id="RoleResult" type="SysRole">
     <resultMap id="RoleResult" type="SysRole">
         <id     property="roleId"       column="role_id"        />
         <id     property="roleId"       column="role_id"        />