mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 17:38:48 +08:00
人员管理
This commit is contained in:
parent
78f06ed7e2
commit
64bd494733
@ -8,7 +8,7 @@
|
|||||||
<version>3.2.1</version>
|
<version>3.2.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<packaging>jar</packaging>
|
<packaging>war</packaging>
|
||||||
<artifactId>ruoyi-admin</artifactId>
|
<artifactId>ruoyi-admin</artifactId>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
|
|||||||
@ -18,7 +18,7 @@ ruoyi:
|
|||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
port: 8080
|
port: 9000
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
|
|||||||
@ -1,33 +1,41 @@
|
|||||||
package com.ruoyi.system.fantang.controller;
|
package com.ruoyi.system.fantang.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
||||||
import com.ruoyi.system.fantang.service.IFtDepartDaoService;
|
import com.ruoyi.system.fantang.service.IFtDepartDaoService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 科室管理Controller
|
* 科室管理Controller
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/fantang/depart")
|
@RequestMapping("/fantang/depart" )
|
||||||
public class FtDepartDaoController extends BaseController {
|
public class FtDepartDaoController extends BaseController {
|
||||||
|
|
||||||
private final IFtDepartDaoService iFtDepartDaoService;
|
private final IFtDepartDaoService iFtDepartDaoService;
|
||||||
@ -37,11 +45,15 @@ public class FtDepartDaoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:depart:list')")
|
@PreAuthorize("@ss.hasPermi('fantang:depart:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(FtDepartDao ftDepartDao) {
|
public TableDataInfo list(FtDepartDao ftDepartDao)
|
||||||
|
{
|
||||||
startPage();
|
startPage();
|
||||||
LambdaQueryWrapper<FtDepartDao> lqw = Wrappers.lambdaQuery(ftDepartDao);
|
LambdaQueryWrapper<FtDepartDao> lqw = Wrappers.lambdaQuery(ftDepartDao);
|
||||||
if (StringUtils.isNotBlank(ftDepartDao.getDepartName())) {
|
if (StringUtils.isNotBlank(ftDepartDao.getDepartName())){
|
||||||
lqw.like(FtDepartDao::getDepartName, ftDepartDao.getDepartName());
|
lqw.like(FtDepartDao::getDepartName ,ftDepartDao.getDepartName());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(ftDepartDao.getDepartCode())){
|
||||||
|
lqw.eq(FtDepartDao::getDepartCode ,ftDepartDao.getDepartCode());
|
||||||
}
|
}
|
||||||
List<FtDepartDao> list = iFtDepartDaoService.list(lqw);
|
List<FtDepartDao> list = iFtDepartDaoService.list(lqw);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -50,30 +62,30 @@ public class FtDepartDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 导出科室管理列表
|
* 导出科室管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:depart:export')")
|
@PreAuthorize("@ss.hasPermi('fantang:depart:export')" )
|
||||||
@Log(title = "科室管理", businessType = BusinessType.EXPORT)
|
@Log(title = "科室管理" , businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export")
|
@GetMapping("/export" )
|
||||||
public AjaxResult export(FtDepartDao ftDepartDao) {
|
public AjaxResult export(FtDepartDao ftDepartDao) {
|
||||||
LambdaQueryWrapper<FtDepartDao> lqw = new LambdaQueryWrapper<FtDepartDao>(ftDepartDao);
|
LambdaQueryWrapper<FtDepartDao> lqw = new LambdaQueryWrapper<FtDepartDao>(ftDepartDao);
|
||||||
List<FtDepartDao> list = iFtDepartDaoService.list(lqw);
|
List<FtDepartDao> list = iFtDepartDaoService.list(lqw);
|
||||||
ExcelUtil<FtDepartDao> util = new ExcelUtil<FtDepartDao>(FtDepartDao.class);
|
ExcelUtil<FtDepartDao> util = new ExcelUtil<FtDepartDao>(FtDepartDao. class);
|
||||||
return util.exportExcel(list, "depart");
|
return util.exportExcel(list, "depart" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取科室管理详细信息
|
* 获取科室管理详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:depart:query')")
|
@PreAuthorize("@ss.hasPermi('fantang:depart:query')" )
|
||||||
@GetMapping(value = "/{departId}")
|
@GetMapping(value = "/{departId}" )
|
||||||
public AjaxResult getInfo(@PathVariable("departId") Long departId) {
|
public AjaxResult getInfo(@PathVariable("departId" ) Long departId) {
|
||||||
return AjaxResult.success(iFtDepartDaoService.getById(departId));
|
return AjaxResult.success(iFtDepartDaoService.getById(departId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增科室管理
|
* 新增科室管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:depart:add')")
|
@PreAuthorize("@ss.hasPermi('fantang:depart:add')" )
|
||||||
@Log(title = "科室管理", businessType = BusinessType.INSERT)
|
@Log(title = "科室管理" , businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody FtDepartDao ftDepartDao) {
|
public AjaxResult add(@RequestBody FtDepartDao ftDepartDao) {
|
||||||
return toAjax(iFtDepartDaoService.save(ftDepartDao) ? 1 : 0);
|
return toAjax(iFtDepartDaoService.save(ftDepartDao) ? 1 : 0);
|
||||||
@ -82,8 +94,8 @@ public class FtDepartDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改科室管理
|
* 修改科室管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:depart:edit')")
|
@PreAuthorize("@ss.hasPermi('fantang:depart:edit')" )
|
||||||
@Log(title = "科室管理", businessType = BusinessType.UPDATE)
|
@Log(title = "科室管理" , businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody FtDepartDao ftDepartDao) {
|
public AjaxResult edit(@RequestBody FtDepartDao ftDepartDao) {
|
||||||
return toAjax(iFtDepartDaoService.updateById(ftDepartDao) ? 1 : 0);
|
return toAjax(iFtDepartDaoService.updateById(ftDepartDao) ? 1 : 0);
|
||||||
@ -92,9 +104,9 @@ public class FtDepartDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 删除科室管理
|
* 删除科室管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:depart:remove')")
|
@PreAuthorize("@ss.hasPermi('fantang:depart:remove')" )
|
||||||
@Log(title = "科室管理", businessType = BusinessType.DELETE)
|
@Log(title = "科室管理" , businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{departIds}")
|
@DeleteMapping("/{departIds}" )
|
||||||
public AjaxResult remove(@PathVariable Long[] departIds) {
|
public AjaxResult remove(@PathVariable Long[] departIds) {
|
||||||
return toAjax(iFtDepartDaoService.removeByIds(Arrays.asList(departIds)) ? 1 : 0);
|
return toAjax(iFtDepartDaoService.removeByIds(Arrays.asList(departIds)) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,33 +1,41 @@
|
|||||||
package com.ruoyi.system.fantang.controller;
|
package com.ruoyi.system.fantang.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
||||||
import com.ruoyi.system.fantang.service.IFtFoodDaoService;
|
import com.ruoyi.system.fantang.service.IFtFoodDaoService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 食品管理Controller
|
* 食品管理Controller
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/fantang/food")
|
@RequestMapping("/fantang/food" )
|
||||||
public class FtFoodDaoController extends BaseController {
|
public class FtFoodDaoController extends BaseController {
|
||||||
|
|
||||||
private final IFtFoodDaoService iFtFoodDaoService;
|
private final IFtFoodDaoService iFtFoodDaoService;
|
||||||
@ -37,17 +45,18 @@ public class FtFoodDaoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:food:list')")
|
@PreAuthorize("@ss.hasPermi('fantang:food:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(FtFoodDao ftFoodDao) {
|
public TableDataInfo list(FtFoodDao ftFoodDao)
|
||||||
|
{
|
||||||
startPage();
|
startPage();
|
||||||
LambdaQueryWrapper<FtFoodDao> lqw = Wrappers.lambdaQuery(ftFoodDao);
|
LambdaQueryWrapper<FtFoodDao> lqw = Wrappers.lambdaQuery(ftFoodDao);
|
||||||
if (StringUtils.isNotBlank(ftFoodDao.getName())) {
|
if (StringUtils.isNotBlank(ftFoodDao.getName())){
|
||||||
lqw.like(FtFoodDao::getName, ftFoodDao.getName());
|
lqw.like(FtFoodDao::getName ,ftFoodDao.getName());
|
||||||
}
|
}
|
||||||
if (ftFoodDao.getPrice() != null) {
|
if (ftFoodDao.getPrice() != null){
|
||||||
lqw.eq(FtFoodDao::getPrice, ftFoodDao.getPrice());
|
lqw.eq(FtFoodDao::getPrice ,ftFoodDao.getPrice());
|
||||||
}
|
}
|
||||||
if (ftFoodDao.getType() != null) {
|
if (ftFoodDao.getType() != null){
|
||||||
lqw.eq(FtFoodDao::getType, ftFoodDao.getType());
|
lqw.eq(FtFoodDao::getType ,ftFoodDao.getType());
|
||||||
}
|
}
|
||||||
List<FtFoodDao> list = iFtFoodDaoService.list(lqw);
|
List<FtFoodDao> list = iFtFoodDaoService.list(lqw);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -56,30 +65,30 @@ public class FtFoodDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 导出食品管理列表
|
* 导出食品管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:food:export')")
|
@PreAuthorize("@ss.hasPermi('fantang:food:export')" )
|
||||||
@Log(title = "食品管理", businessType = BusinessType.EXPORT)
|
@Log(title = "食品管理" , businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export")
|
@GetMapping("/export" )
|
||||||
public AjaxResult export(FtFoodDao ftFoodDao) {
|
public AjaxResult export(FtFoodDao ftFoodDao) {
|
||||||
LambdaQueryWrapper<FtFoodDao> lqw = new LambdaQueryWrapper<FtFoodDao>(ftFoodDao);
|
LambdaQueryWrapper<FtFoodDao> lqw = new LambdaQueryWrapper<FtFoodDao>(ftFoodDao);
|
||||||
List<FtFoodDao> list = iFtFoodDaoService.list(lqw);
|
List<FtFoodDao> list = iFtFoodDaoService.list(lqw);
|
||||||
ExcelUtil<FtFoodDao> util = new ExcelUtil<FtFoodDao>(FtFoodDao.class);
|
ExcelUtil<FtFoodDao> util = new ExcelUtil<FtFoodDao>(FtFoodDao. class);
|
||||||
return util.exportExcel(list, "food");
|
return util.exportExcel(list, "food" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取食品管理详细信息
|
* 获取食品管理详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:food:query')")
|
@PreAuthorize("@ss.hasPermi('fantang:food:query')" )
|
||||||
@GetMapping(value = "/{foodId}")
|
@GetMapping(value = "/{foodId}" )
|
||||||
public AjaxResult getInfo(@PathVariable("foodId") Long foodId) {
|
public AjaxResult getInfo(@PathVariable("foodId" ) Long foodId) {
|
||||||
return AjaxResult.success(iFtFoodDaoService.getById(foodId));
|
return AjaxResult.success(iFtFoodDaoService.getById(foodId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增食品管理
|
* 新增食品管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:food:add')")
|
@PreAuthorize("@ss.hasPermi('fantang:food:add')" )
|
||||||
@Log(title = "食品管理", businessType = BusinessType.INSERT)
|
@Log(title = "食品管理" , businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody FtFoodDao ftFoodDao) {
|
public AjaxResult add(@RequestBody FtFoodDao ftFoodDao) {
|
||||||
return toAjax(iFtFoodDaoService.save(ftFoodDao) ? 1 : 0);
|
return toAjax(iFtFoodDaoService.save(ftFoodDao) ? 1 : 0);
|
||||||
@ -88,8 +97,8 @@ public class FtFoodDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改食品管理
|
* 修改食品管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:food:edit')")
|
@PreAuthorize("@ss.hasPermi('fantang:food:edit')" )
|
||||||
@Log(title = "食品管理", businessType = BusinessType.UPDATE)
|
@Log(title = "食品管理" , businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody FtFoodDao ftFoodDao) {
|
public AjaxResult edit(@RequestBody FtFoodDao ftFoodDao) {
|
||||||
return toAjax(iFtFoodDaoService.updateById(ftFoodDao) ? 1 : 0);
|
return toAjax(iFtFoodDaoService.updateById(ftFoodDao) ? 1 : 0);
|
||||||
@ -98,9 +107,9 @@ public class FtFoodDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 删除食品管理
|
* 删除食品管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:food:remove')")
|
@PreAuthorize("@ss.hasPermi('fantang:food:remove')" )
|
||||||
@Log(title = "食品管理", businessType = BusinessType.DELETE)
|
@Log(title = "食品管理" , businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{foodIds}")
|
@DeleteMapping("/{foodIds}" )
|
||||||
public AjaxResult remove(@PathVariable Long[] foodIds) {
|
public AjaxResult remove(@PathVariable Long[] foodIds) {
|
||||||
return toAjax(iFtFoodDaoService.removeByIds(Arrays.asList(foodIds)) ? 1 : 0);
|
return toAjax(iFtFoodDaoService.removeByIds(Arrays.asList(foodIds)) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,33 +1,41 @@
|
|||||||
package com.ruoyi.system.fantang.controller;
|
package com.ruoyi.system.fantang.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
||||||
import com.ruoyi.system.fantang.service.IFtPatientDaoService;
|
import com.ruoyi.system.fantang.service.IFtPatientDaoService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 病人管理Controller
|
* 病人管理Controller
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/fantang/patient")
|
@RequestMapping("/fantang/patient" )
|
||||||
public class FtPatientDaoController extends BaseController {
|
public class FtPatientDaoController extends BaseController {
|
||||||
|
|
||||||
private final IFtPatientDaoService iFtPatientDaoService;
|
private final IFtPatientDaoService iFtPatientDaoService;
|
||||||
@ -37,14 +45,18 @@ public class FtPatientDaoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:patient:list')")
|
@PreAuthorize("@ss.hasPermi('fantang:patient:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(FtPatientDao ftPatientDao) {
|
public TableDataInfo list(FtPatientDao ftPatientDao)
|
||||||
|
{
|
||||||
startPage();
|
startPage();
|
||||||
LambdaQueryWrapper<FtPatientDao> lqw = Wrappers.lambdaQuery(ftPatientDao);
|
LambdaQueryWrapper<FtPatientDao> lqw = Wrappers.lambdaQuery(ftPatientDao);
|
||||||
if (StringUtils.isNotBlank(ftPatientDao.getName())) {
|
if (StringUtils.isNotBlank(ftPatientDao.getName())){
|
||||||
lqw.like(FtPatientDao::getName, ftPatientDao.getName());
|
lqw.like(FtPatientDao::getName ,ftPatientDao.getName());
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(ftPatientDao.getBedId())) {
|
if (StringUtils.isNotBlank(ftPatientDao.getBedId())){
|
||||||
lqw.eq(FtPatientDao::getBedId, ftPatientDao.getBedId());
|
lqw.eq(FtPatientDao::getBedId ,ftPatientDao.getBedId());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(ftPatientDao.getHospitalId())){
|
||||||
|
lqw.eq(FtPatientDao::getHospitalId ,ftPatientDao.getHospitalId());
|
||||||
}
|
}
|
||||||
List<FtPatientDao> list = iFtPatientDaoService.list(lqw);
|
List<FtPatientDao> list = iFtPatientDaoService.list(lqw);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -53,30 +65,30 @@ public class FtPatientDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 导出病人管理列表
|
* 导出病人管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:patient:export')")
|
@PreAuthorize("@ss.hasPermi('fantang:patient:export')" )
|
||||||
@Log(title = "病人管理", businessType = BusinessType.EXPORT)
|
@Log(title = "病人管理" , businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export")
|
@GetMapping("/export" )
|
||||||
public AjaxResult export(FtPatientDao ftPatientDao) {
|
public AjaxResult export(FtPatientDao ftPatientDao) {
|
||||||
LambdaQueryWrapper<FtPatientDao> lqw = new LambdaQueryWrapper<FtPatientDao>(ftPatientDao);
|
LambdaQueryWrapper<FtPatientDao> lqw = new LambdaQueryWrapper<FtPatientDao>(ftPatientDao);
|
||||||
List<FtPatientDao> list = iFtPatientDaoService.list(lqw);
|
List<FtPatientDao> list = iFtPatientDaoService.list(lqw);
|
||||||
ExcelUtil<FtPatientDao> util = new ExcelUtil<FtPatientDao>(FtPatientDao.class);
|
ExcelUtil<FtPatientDao> util = new ExcelUtil<FtPatientDao>(FtPatientDao. class);
|
||||||
return util.exportExcel(list, "patient");
|
return util.exportExcel(list, "patient" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取病人管理详细信息
|
* 获取病人管理详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:patient:query')")
|
@PreAuthorize("@ss.hasPermi('fantang:patient:query')" )
|
||||||
@GetMapping(value = "/{patientId}")
|
@GetMapping(value = "/{patientId}" )
|
||||||
public AjaxResult getInfo(@PathVariable("patientId") Long patientId) {
|
public AjaxResult getInfo(@PathVariable("patientId" ) Long patientId) {
|
||||||
return AjaxResult.success(iFtPatientDaoService.getById(patientId));
|
return AjaxResult.success(iFtPatientDaoService.getById(patientId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增病人管理
|
* 新增病人管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:patient:add')")
|
@PreAuthorize("@ss.hasPermi('fantang:patient:add')" )
|
||||||
@Log(title = "病人管理", businessType = BusinessType.INSERT)
|
@Log(title = "病人管理" , businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody FtPatientDao ftPatientDao) {
|
public AjaxResult add(@RequestBody FtPatientDao ftPatientDao) {
|
||||||
return toAjax(iFtPatientDaoService.save(ftPatientDao) ? 1 : 0);
|
return toAjax(iFtPatientDaoService.save(ftPatientDao) ? 1 : 0);
|
||||||
@ -85,8 +97,8 @@ public class FtPatientDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改病人管理
|
* 修改病人管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:patient:edit')")
|
@PreAuthorize("@ss.hasPermi('fantang:patient:edit')" )
|
||||||
@Log(title = "病人管理", businessType = BusinessType.UPDATE)
|
@Log(title = "病人管理" , businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody FtPatientDao ftPatientDao) {
|
public AjaxResult edit(@RequestBody FtPatientDao ftPatientDao) {
|
||||||
return toAjax(iFtPatientDaoService.updateById(ftPatientDao) ? 1 : 0);
|
return toAjax(iFtPatientDaoService.updateById(ftPatientDao) ? 1 : 0);
|
||||||
@ -95,9 +107,9 @@ public class FtPatientDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 删除病人管理
|
* 删除病人管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:patient:remove')")
|
@PreAuthorize("@ss.hasPermi('fantang:patient:remove')" )
|
||||||
@Log(title = "病人管理", businessType = BusinessType.DELETE)
|
@Log(title = "病人管理" , businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{patientIds}")
|
@DeleteMapping("/{patientIds}" )
|
||||||
public AjaxResult remove(@PathVariable Long[] patientIds) {
|
public AjaxResult remove(@PathVariable Long[] patientIds) {
|
||||||
return toAjax(iFtPatientDaoService.removeByIds(Arrays.asList(patientIds)) ? 1 : 0);
|
return toAjax(iFtPatientDaoService.removeByIds(Arrays.asList(patientIds)) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,19 +11,21 @@ import com.ruoyi.common.utils.StringUtils;
|
|||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
|
import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
|
||||||
import com.ruoyi.system.fantang.service.IFtStaffInfoDaoService;
|
import com.ruoyi.system.fantang.service.IFtStaffInfoDaoService;
|
||||||
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工管理Controller
|
* 员工管理Controller
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
@RestController
|
@RestController
|
||||||
@ -32,6 +34,8 @@ public class FtStaffInfoDaoController extends BaseController {
|
|||||||
|
|
||||||
private final IFtStaffInfoDaoService iFtStaffInfoDaoService;
|
private final IFtStaffInfoDaoService iFtStaffInfoDaoService;
|
||||||
|
|
||||||
|
private final ISysUserService userService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询员工管理列表
|
* 查询员工管理列表
|
||||||
*/
|
*/
|
||||||
@ -49,6 +53,9 @@ public class FtStaffInfoDaoController extends BaseController {
|
|||||||
if (StringUtils.isNotBlank(ftStaffInfoDao.getRole())) {
|
if (StringUtils.isNotBlank(ftStaffInfoDao.getRole())) {
|
||||||
lqw.eq(FtStaffInfoDao::getRole, ftStaffInfoDao.getRole());
|
lqw.eq(FtStaffInfoDao::getRole, ftStaffInfoDao.getRole());
|
||||||
}
|
}
|
||||||
|
if (ftStaffInfoDao.getFlag() != null) {
|
||||||
|
lqw.eq(FtStaffInfoDao::getFlag, ftStaffInfoDao.getFlag());
|
||||||
|
}
|
||||||
List<FtStaffInfoDao> list = iFtStaffInfoDaoService.list(lqw);
|
List<FtStaffInfoDao> list = iFtStaffInfoDaoService.list(lqw);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
@ -82,7 +89,31 @@ public class FtStaffInfoDaoController extends BaseController {
|
|||||||
@Log(title = "员工管理", businessType = BusinessType.INSERT)
|
@Log(title = "员工管理", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody FtStaffInfoDao ftStaffInfoDao) {
|
public AjaxResult add(@RequestBody FtStaffInfoDao ftStaffInfoDao) {
|
||||||
return toAjax(iFtStaffInfoDaoService.save(ftStaffInfoDao) ? 1 : 0);
|
|
||||||
|
List<FtStaffInfoDao> list = iFtStaffInfoDaoService.list(null);
|
||||||
|
for (FtStaffInfoDao staffInfoDao : list) {
|
||||||
|
if (ftStaffInfoDao.getTel().equals(staffInfoDao.getTel())) {
|
||||||
|
return AjaxResult.error("该电话号码已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断是否有所属公司
|
||||||
|
if (ftStaffInfoDao.getCorpName() == null) {
|
||||||
|
ftStaffInfoDao.setStaffType(1L);
|
||||||
|
} else {
|
||||||
|
ftStaffInfoDao.setStaffType(2L);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断密码是否为空
|
||||||
|
if (ftStaffInfoDao.getPassword() == null) {
|
||||||
|
ftStaffInfoDao.setPassword("123456");
|
||||||
|
}
|
||||||
|
|
||||||
|
ftStaffInfoDao.setCreateAt(new Date());
|
||||||
|
|
||||||
|
boolean save = iFtStaffInfoDaoService.save(ftStaffInfoDao);
|
||||||
|
|
||||||
|
return AjaxResult.success("添加成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,21 +1,25 @@
|
|||||||
package com.ruoyi.system.fantang.domain;
|
package com.ruoyi.system.fantang.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 科室管理对象 ft_depart
|
* 科室管理对象 ft_depart
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ToString
|
@ToString
|
||||||
@ -25,18 +29,18 @@ import java.io.Serializable;
|
|||||||
@TableName("ft_depart")
|
@TableName("ft_depart")
|
||||||
public class FtDepartDao implements Serializable {
|
public class FtDepartDao implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/** 科室编号 */
|
||||||
* 科室编号
|
|
||||||
*/
|
|
||||||
@TableId(value = "depart_id")
|
@TableId(value = "depart_id")
|
||||||
private Long departId;
|
private Long departId;
|
||||||
|
|
||||||
/**
|
/** 科室名称 */
|
||||||
* 科室名称
|
|
||||||
*/
|
|
||||||
@Excel(name = "科室名称")
|
@Excel(name = "科室名称")
|
||||||
private String departName;
|
private String departName;
|
||||||
|
|
||||||
|
/** 科室编号 */
|
||||||
|
@Excel(name = "科室编号")
|
||||||
|
private String departCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,22 +1,25 @@
|
|||||||
package com.ruoyi.system.fantang.domain;
|
package com.ruoyi.system.fantang.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 食品管理对象 ft_food
|
* 食品管理对象 ft_food
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ToString
|
@ToString
|
||||||
@ -26,41 +29,28 @@ import java.math.BigDecimal;
|
|||||||
@TableName("ft_food")
|
@TableName("ft_food")
|
||||||
public class FtFoodDao implements Serializable {
|
public class FtFoodDao implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/** 食品id */
|
||||||
* 食品id
|
|
||||||
*/
|
|
||||||
@TableId(value = "food_id")
|
@TableId(value = "food_id")
|
||||||
private Long foodId;
|
private Long foodId;
|
||||||
|
|
||||||
/**
|
/** 名称 */
|
||||||
* 名称
|
|
||||||
*/
|
|
||||||
@Excel(name = "名称")
|
@Excel(name = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/** 图片 */
|
||||||
* 图片地址
|
|
||||||
*/
|
|
||||||
@Excel(name = "图片地址")
|
|
||||||
private String pictureUrl;
|
private String pictureUrl;
|
||||||
|
|
||||||
/**
|
/** 售价 */
|
||||||
* 售价
|
|
||||||
*/
|
|
||||||
@Excel(name = "售价")
|
@Excel(name = "售价")
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
|
||||||
/**
|
/** 启用标志 */
|
||||||
* 启用标志
|
|
||||||
*/
|
|
||||||
private Long flag;
|
private Long flag;
|
||||||
|
|
||||||
/**
|
/** 食品分类 */
|
||||||
* 食品分类
|
|
||||||
*/
|
|
||||||
@Excel(name = "食品分类")
|
@Excel(name = "食品分类")
|
||||||
private Long type;
|
private Long type;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +1,25 @@
|
|||||||
package com.ruoyi.system.fantang.domain;
|
package com.ruoyi.system.fantang.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 病人管理对象 ft_patient
|
* 病人管理对象 ft_patient
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ToString
|
@ToString
|
||||||
@ -25,29 +29,34 @@ import java.io.Serializable;
|
|||||||
@TableName("ft_patient")
|
@TableName("ft_patient")
|
||||||
public class FtPatientDao implements Serializable {
|
public class FtPatientDao implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/** 病人id */
|
||||||
* 病人id
|
|
||||||
*/
|
|
||||||
@TableId(value = "patient_id")
|
@TableId(value = "patient_id")
|
||||||
private Long patientId;
|
private Long patientId;
|
||||||
|
|
||||||
/**
|
/** 姓名 */
|
||||||
* 姓名
|
|
||||||
*/
|
|
||||||
@Excel(name = "姓名")
|
@Excel(name = "姓名")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/** 所属部门id */
|
||||||
* 所属部门id
|
|
||||||
*/
|
|
||||||
private Long departId;
|
private Long departId;
|
||||||
|
|
||||||
/**
|
/** 床号 */
|
||||||
* 床号
|
|
||||||
*/
|
|
||||||
@Excel(name = "床号")
|
@Excel(name = "床号")
|
||||||
private String bedId;
|
private String bedId;
|
||||||
|
|
||||||
|
/** 住院号 */
|
||||||
|
@Excel(name = "住院号")
|
||||||
|
private String hospitalId;
|
||||||
|
|
||||||
|
/** 同步标志 */
|
||||||
|
private Integer syncFlag;
|
||||||
|
|
||||||
|
/** 出院标志 */
|
||||||
|
private Integer offFlag;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date createAt;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.ruoyi.system.fantang.domain;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@ -17,7 +18,7 @@ import java.util.Date;
|
|||||||
* 员工管理对象 ft_staff_info
|
* 员工管理对象 ft_staff_info
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ToString
|
@ToString
|
||||||
@ -67,6 +68,8 @@ public class FtStaffInfoDao implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 创建日期
|
* 创建日期
|
||||||
*/
|
*/
|
||||||
|
@Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createAt;
|
private Date createAt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,6 +80,7 @@ public class FtStaffInfoDao implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 启用标志
|
* 启用标志
|
||||||
*/
|
*/
|
||||||
|
@Excel(name = "启用标志")
|
||||||
private Integer flag;
|
private Integer flag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,4 +88,39 @@ public class FtStaffInfoDao implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Excel(name = "补贴余额")
|
@Excel(name = "补贴余额")
|
||||||
private BigDecimal balance;
|
private BigDecimal balance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工类别
|
||||||
|
*/
|
||||||
|
private Long staffType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属公司
|
||||||
|
*/
|
||||||
|
private String corpName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 照片
|
||||||
|
*/
|
||||||
|
private String pictureUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报餐科室列表
|
||||||
|
*/
|
||||||
|
private String deptList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二维码
|
||||||
|
*/
|
||||||
|
private String qrCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号码
|
||||||
|
*/
|
||||||
|
private String tel;
|
||||||
}
|
}
|
||||||
@ -1,13 +1,13 @@
|
|||||||
package com.ruoyi.system.fantang.mapper;
|
package com.ruoyi.system.fantang.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 科室管理Mapper接口
|
* 科室管理Mapper接口
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
public interface FtDepartDaoMapper extends BaseMapper<FtDepartDao> {
|
public interface FtDepartDaoMapper extends BaseMapper<FtDepartDao> {
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
package com.ruoyi.system.fantang.mapper;
|
package com.ruoyi.system.fantang.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 食品管理Mapper接口
|
* 食品管理Mapper接口
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
public interface FtFoodDaoMapper extends BaseMapper<FtFoodDao> {
|
public interface FtFoodDaoMapper extends BaseMapper<FtFoodDao> {
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
package com.ruoyi.system.fantang.mapper;
|
package com.ruoyi.system.fantang.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 病人管理Mapper接口
|
* 病人管理Mapper接口
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
public interface FtPatientDaoMapper extends BaseMapper<FtPatientDao> {
|
public interface FtPatientDaoMapper extends BaseMapper<FtPatientDao> {
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
package com.ruoyi.system.fantang.service;
|
package com.ruoyi.system.fantang.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 科室管理Service接口
|
* 科室管理Service接口
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
public interface IFtDepartDaoService extends IService<FtDepartDao> {
|
public interface IFtDepartDaoService extends IService<FtDepartDao> {
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
package com.ruoyi.system.fantang.service;
|
package com.ruoyi.system.fantang.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 食品管理Service接口
|
* 食品管理Service接口
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
public interface IFtFoodDaoService extends IService<FtFoodDao> {
|
public interface IFtFoodDaoService extends IService<FtFoodDao> {
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
package com.ruoyi.system.fantang.service;
|
package com.ruoyi.system.fantang.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 病人管理Service接口
|
* 病人管理Service接口
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
public interface IFtPatientDaoService extends IService<FtPatientDao> {
|
public interface IFtPatientDaoService extends IService<FtPatientDao> {
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
package com.ruoyi.system.fantang.service.impl;
|
package com.ruoyi.system.fantang.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
|
||||||
import com.ruoyi.system.fantang.mapper.FtDepartDaoMapper;
|
|
||||||
import com.ruoyi.system.fantang.service.IFtDepartDaoService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.system.fantang.mapper.FtDepartDaoMapper;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
||||||
|
import com.ruoyi.system.fantang.service.IFtDepartDaoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 科室管理Service业务层处理
|
* 科室管理Service业务层处理
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class FtDepartDaoServiceImpl extends ServiceImpl<FtDepartDaoMapper, FtDepartDao> implements IFtDepartDaoService {
|
public class FtDepartDaoServiceImpl extends ServiceImpl<FtDepartDaoMapper, FtDepartDao> implements IFtDepartDaoService {
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
package com.ruoyi.system.fantang.service.impl;
|
package com.ruoyi.system.fantang.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
|
||||||
import com.ruoyi.system.fantang.mapper.FtFoodDaoMapper;
|
|
||||||
import com.ruoyi.system.fantang.service.IFtFoodDaoService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.system.fantang.mapper.FtFoodDaoMapper;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
||||||
|
import com.ruoyi.system.fantang.service.IFtFoodDaoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 食品管理Service业务层处理
|
* 食品管理Service业务层处理
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class FtFoodDaoServiceImpl extends ServiceImpl<FtFoodDaoMapper, FtFoodDao> implements IFtFoodDaoService {
|
public class FtFoodDaoServiceImpl extends ServiceImpl<FtFoodDaoMapper, FtFoodDao> implements IFtFoodDaoService {
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
package com.ruoyi.system.fantang.service.impl;
|
package com.ruoyi.system.fantang.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
|
||||||
import com.ruoyi.system.fantang.mapper.FtPatientDaoMapper;
|
|
||||||
import com.ruoyi.system.fantang.service.IFtPatientDaoService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.system.fantang.mapper.FtPatientDaoMapper;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
||||||
|
import com.ruoyi.system.fantang.service.IFtPatientDaoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 病人管理Service业务层处理
|
* 病人管理Service业务层处理
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-24
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class FtPatientDaoServiceImpl extends ServiceImpl<FtPatientDaoMapper, FtPatientDao> implements IFtPatientDaoService {
|
public class FtPatientDaoServiceImpl extends ServiceImpl<FtPatientDaoMapper, FtPatientDao> implements IFtPatientDaoService {
|
||||||
|
|||||||
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<resultMap type="FtDepartDao" id="FtDepartDaoResult">
|
<resultMap type="FtDepartDao" id="FtDepartDaoResult">
|
||||||
<result property="departId" column="depart_id" />
|
<result property="departId" column="depart_id" />
|
||||||
<result property="departName" column="depart_name" />
|
<result property="departName" column="depart_name" />
|
||||||
|
<result property="departCode" column="depart_code" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
<result property="departId" column="depart_id" />
|
<result property="departId" column="depart_id" />
|
||||||
<result property="bedId" column="bed_id" />
|
<result property="bedId" column="bed_id" />
|
||||||
|
<result property="hospitalId" column="hospital_id" />
|
||||||
|
<result property="syncFlag" column="sync_flag" />
|
||||||
|
<result property="offFlag" column="off_flag" />
|
||||||
|
<result property="createAt" column="create_at" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,20 +1,27 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.fantang.mapper.FtStaffInfoDaoMapper">
|
<mapper namespace="com.ruoyi.system.fantang.mapper.FtStaffInfoDaoMapper">
|
||||||
|
|
||||||
<resultMap type="FtStaffInfoDao" id="FtStaffInfoDaoResult">
|
<resultMap type="FtStaffInfoDao" id="FtStaffInfoDaoResult">
|
||||||
<result property="staffId" column="staff_id" />
|
<result property="staffId" column="staff_id"/>
|
||||||
<result property="departId" column="depart_id" />
|
<result property="departId" column="depart_id"/>
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name"/>
|
||||||
<result property="post" column="post" />
|
<result property="post" column="post"/>
|
||||||
<result property="role" column="role" />
|
<result property="role" column="role"/>
|
||||||
<result property="password" column="password" />
|
<result property="password" column="password"/>
|
||||||
<result property="createAt" column="create_at" />
|
<result property="createAt" column="create_at"/>
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="flag" column="flag" />
|
<result property="flag" column="flag"/>
|
||||||
<result property="balance" column="balance" />
|
<result property="balance" column="balance"/>
|
||||||
|
<result property="staffType" column="staff_type"/>
|
||||||
|
<result property="corpName" column="corp_name"/>
|
||||||
|
<result property="pictureUrl" column="picture_url"/>
|
||||||
|
<result property="deptList" column="dept_list"/>
|
||||||
|
<result property="qrCode" column="qr_code"/>
|
||||||
|
<result property="sex" column="sex"/>
|
||||||
|
<result property="tel" column="tel"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -10,23 +10,29 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属公司名称" prop="corpName">
|
<!-- <el-form-item label="员工类别" prop="staffType">-->
|
||||||
|
<!-- <el-select v-model="queryParams.staffType" placeholder="请选择员工类别" clearable size="small">-->
|
||||||
|
<!-- <el-option label="请选择字典生成" value="" />-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="所属公司" prop="corpName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.corpName"
|
v-model="queryParams.corpName"
|
||||||
placeholder="请输入所属公司名称"
|
placeholder="请输入所属公司"
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属科室清单" prop="departList">
|
<el-form-item label="报餐科室" prop="deptList">
|
||||||
<el-input
|
<el-select v-model="queryParams.deptList" placeholder="请选择报餐科室" clearable size="small">
|
||||||
v-model="queryParams.departList"
|
<el-option
|
||||||
placeholder="请输入所属科室清单"
|
v-for="item in deptListOptions"
|
||||||
clearable
|
:key="item.departName"
|
||||||
size="small"
|
:label="item.departName"
|
||||||
@keyup.enter.native="handleQuery"
|
:value="item.departName">
|
||||||
/>
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
@ -41,7 +47,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['fantang:careStaffInfo:add']"
|
v-hasPermi="['fantang:staffInfo:add']"
|
||||||
>新增
|
>新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -52,7 +58,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['fantang:careStaffInfo:edit']"
|
v-hasPermi="['fantang:staffInfo:edit']"
|
||||||
>修改
|
>修改
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -63,7 +69,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['fantang:careStaffInfo:remove']"
|
v-hasPermi="['fantang:staffInfo:remove']"
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -73,20 +79,26 @@
|
|||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['fantang:careStaffInfo:export']"
|
v-hasPermi="['fantang:staffInfo:export']"
|
||||||
>导出
|
>导出
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="careStaffInfoList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="staffInfoList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
<el-table-column label="护工 id" align="center" prop="careStaffId" v-if="false"/>
|
<el-table-column label="员工 id" align="center" prop="staffId" v-if="false"/>
|
||||||
<el-table-column label="姓名" align="center" prop="name"/>
|
<el-table-column label="姓名" align="center" prop="name"/>
|
||||||
<el-table-column label="所属公司名称" align="center" prop="corpName"/>
|
<el-table-column label="所属公司" align="center" prop="corpName"/>
|
||||||
<el-table-column label="所属科室清单" align="center" prop="departList"/>
|
<!-- <el-table-column label="员工类别" align="center" prop="staffType"/>-->
|
||||||
<el-table-column label="照片" align="center" prop="photo"/>
|
<el-table-column label="报餐科室" align="center" prop="deptList"/>
|
||||||
|
<el-table-column label="补贴余额" align="center" prop="balance"/>
|
||||||
|
<el-table-column label="创建日期" align="center" prop="createAt" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createAt, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="二维码" align="center" prop="qrCode"/>
|
<el-table-column label="二维码" align="center" prop="qrCode"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -95,7 +107,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['fantang:careStaffInfo:edit']"
|
v-hasPermi="['fantang:staffInfo:edit']"
|
||||||
>修改
|
>修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@ -103,7 +115,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['fantang:careStaffInfo:remove']"
|
v-hasPermi="['fantang:staffInfo:remove']"
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -118,23 +130,42 @@
|
|||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改护工信息对话框 -->
|
<!-- 添加或修改员工管理对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="姓名" prop="name">
|
<el-form-item label="姓名" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属公司名称" prop="corpName">
|
<el-form-item label="性别" prop="sex">
|
||||||
<el-input v-model="form.corpName" placeholder="请输入所属公司名称"/>
|
<el-select v-model="form.sex" placeholder="请选性别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in sexOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属科室清单" prop="departList">
|
<!-- <el-form-item label="员工类别" prop="staffType">-->
|
||||||
<el-input v-model="form.departList" placeholder="请输入所属科室清单"/>
|
<!-- <el-select v-model="form.staffType" placeholder="请选择员工类别">-->
|
||||||
|
<!-- <el-option label="请选择字典生成" value="" />-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="所属公司" prop="corpName">
|
||||||
|
<el-input v-model="form.corpName" placeholder="请输入所属公司"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="照片" prop="photo">
|
<el-form-item label="照片" prop="pictureUrl">
|
||||||
<el-input v-model="form.photo" placeholder="请输入照片"/>
|
<el-input v-model="form.pictureUrl" placeholder="请输入照片"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="二维码" prop="qrCode">
|
<el-form-item label="报餐科室" prop="deptList">
|
||||||
<el-input v-model="form.qrCode" placeholder="请输入二维码"/>
|
<el-select v-model="form.deptList" placeholder="请选择报餐科室">
|
||||||
|
<el-option
|
||||||
|
v-for="item in deptListOptions"
|
||||||
|
:key="item.departName"
|
||||||
|
:label="item.departName"
|
||||||
|
:value="item.departName">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -147,19 +178,22 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
addCareStaffInfo,
|
addStaffInfo,
|
||||||
delCareStaffInfo,
|
delStaffInfo,
|
||||||
exportCareStaffInfo,
|
exportStaffInfo,
|
||||||
getCareStaffInfo,
|
getStaffInfo,
|
||||||
listCareStaffInfo,
|
listStaffInfo,
|
||||||
updateCareStaffInfo
|
updateStaffInfo
|
||||||
} from "@/api/fantang/careStaffInfo";
|
} from "@/api/fantang/staffInfo";
|
||||||
|
import {listDepart} from "@/api/fantang/depart";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CareStaffInfo",
|
name: "StaffInfo",
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
sexOptions: [],
|
||||||
|
deptListOptions: [],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -172,8 +206,8 @@ export default {
|
|||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 护工信息表格数据
|
// 员工管理表格数据
|
||||||
careStaffInfoList: [],
|
staffInfoList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
@ -183,8 +217,9 @@ export default {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
name: null,
|
name: null,
|
||||||
|
staffType: null,
|
||||||
corpName: null,
|
corpName: null,
|
||||||
departList: null,
|
deptList: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -194,26 +229,36 @@ export default {
|
|||||||
{required: true, message: "姓名不能为空", trigger: "blur"}
|
{required: true, message: "姓名不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
corpName: [
|
corpName: [
|
||||||
{required: true, message: "所属公司名称不能为空", trigger: "blur"}
|
{required: true, message: "所属公司不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
departList: [
|
sex: [
|
||||||
{required: true, message: "所属科室清单不能为空", trigger: "blur"}
|
{required: true, message: "性别不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
|
deptList: [
|
||||||
|
{required: true, message: "报餐科室不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getDicts("sys_user_sex").then(response => {
|
||||||
|
this.sexOptions = response.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询护工信息列表 */
|
/** 查询员工管理列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listCareStaffInfo(this.queryParams).then(response => {
|
listStaffInfo(this.queryParams).then(response => {
|
||||||
this.careStaffInfoList = response.rows;
|
this.staffInfoList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
listDepart(this.queryParams).then(response => {
|
||||||
|
// console.log("depart", response);
|
||||||
|
this.deptListOptions = response.rows;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
@ -223,12 +268,20 @@ export default {
|
|||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
careStaffId: null,
|
staffId: null,
|
||||||
|
departId: null,
|
||||||
name: null,
|
name: null,
|
||||||
corpName: null,
|
post: null,
|
||||||
departList: null,
|
role: null,
|
||||||
|
password: null,
|
||||||
|
createAt: null,
|
||||||
|
createBy: null,
|
||||||
flag: null,
|
flag: null,
|
||||||
photo: null,
|
balance: null,
|
||||||
|
staffType: null,
|
||||||
|
corpName: null,
|
||||||
|
pictureUrl: null,
|
||||||
|
deptList: null,
|
||||||
qrCode: null
|
qrCode: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
@ -245,7 +298,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.careStaffId)
|
this.ids = selection.map(item => item.staffId)
|
||||||
this.single = selection.length !== 1
|
this.single = selection.length !== 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
@ -253,30 +306,30 @@ export default {
|
|||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加护工信息";
|
this.title = "添加员工管理";
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const careStaffId = row.careStaffId || this.ids
|
const staffId = row.staffId || this.ids
|
||||||
getCareStaffInfo(careStaffId).then(response => {
|
getStaffInfo(staffId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改护工信息";
|
this.title = "修改员工管理";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.careStaffId != null) {
|
if (this.form.staffId != null) {
|
||||||
updateCareStaffInfo(this.form).then(response => {
|
updateStaffInfo(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addCareStaffInfo(this.form).then(response => {
|
addStaffInfo(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -287,13 +340,13 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const careStaffIds = row.careStaffId || this.ids;
|
const staffIds = row.staffId || this.ids;
|
||||||
this.$confirm('是否确认删除护工信息编号为"' + careStaffIds + '"的数据项?', "警告", {
|
this.$confirm('是否确认删除员工管理编号为"' + staffIds + '"的数据项?', "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
return delCareStaffInfo(careStaffIds);
|
return delStaffInfo(staffIds);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.msgSuccess("删除成功");
|
||||||
@ -302,12 +355,12 @@ export default {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm('是否确认导出所有护工信息数据项?', "警告", {
|
this.$confirm('是否确认导出所有员工管理数据项?', "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
return exportCareStaffInfo(queryParams);
|
return exportStaffInfo(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
})
|
})
|
||||||
|
|||||||
@ -10,6 +10,15 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="科室编号" prop="departCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.departCode"
|
||||||
|
placeholder="请输入科室编号"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@ -24,8 +33,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['fantang:depart:add']"
|
v-hasPermi="['fantang:depart:add']"
|
||||||
>新增
|
>新增</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -35,8 +43,7 @@
|
|||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['fantang:depart:edit']"
|
v-hasPermi="['fantang:depart:edit']"
|
||||||
>修改
|
>修改</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -46,8 +53,7 @@
|
|||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['fantang:depart:remove']"
|
v-hasPermi="['fantang:depart:remove']"
|
||||||
>删除
|
>删除</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -56,16 +62,16 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['fantang:depart:export']"
|
v-hasPermi="['fantang:depart:export']"
|
||||||
>导出
|
>导出</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="departList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="departList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="科室编号" align="center" prop="departId" v-if="false"/>
|
<el-table-column label="科室编号" align="center" prop="departId" v-if="false"/>
|
||||||
<el-table-column label="科室名称" align="center" prop="departName"/>
|
<el-table-column label="科室名称" align="center" prop="departName" />
|
||||||
|
<el-table-column label="科室编号" align="center" prop="departCode" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -74,16 +80,14 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['fantang:depart:edit']"
|
v-hasPermi="['fantang:depart:edit']"
|
||||||
>修改
|
>修改</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['fantang:depart:remove']"
|
v-hasPermi="['fantang:depart:remove']"
|
||||||
>删除
|
>删除</el-button>
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -100,7 +104,10 @@
|
|||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="科室名称" prop="departName">
|
<el-form-item label="科室名称" prop="departName">
|
||||||
<el-input v-model="form.departName" placeholder="请输入科室名称"/>
|
<el-input v-model="form.departName" placeholder="请输入科室名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="科室编号" prop="departCode">
|
||||||
|
<el-input v-model="form.departCode" placeholder="请输入科室编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -112,11 +119,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {addDepart, delDepart, exportDepart, getDepart, listDepart, updateDepart} from "@/api/fantang/depart";
|
import { listDepart, getDepart, delDepart, addDepart, updateDepart, exportDepart } from "@/api/fantang/depart";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Depart",
|
name: "Depart",
|
||||||
components: {},
|
components: {
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -141,14 +149,18 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
departName: null
|
departName: null,
|
||||||
|
departCode: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
departName: [
|
departName: [
|
||||||
{required: true, message: "科室名称不能为空", trigger: "blur"}
|
{ required: true, message: "科室名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
departCode: [
|
||||||
|
{ required: true, message: "科室编号不能为空", trigger: "blur" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -175,7 +187,8 @@ export default {
|
|||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
departId: null,
|
departId: null,
|
||||||
departName: null
|
departName: null,
|
||||||
|
departCode: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -192,7 +205,7 @@ export default {
|
|||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.departId)
|
this.ids = selection.map(item => item.departId)
|
||||||
this.single = selection.length !== 1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
@ -235,28 +248,28 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const departIds = row.departId || this.ids;
|
const departIds = row.departId || this.ids;
|
||||||
this.$confirm('是否确认删除科室管理编号为"' + departIds + '"的数据项?', "警告", {
|
this.$confirm('是否确认删除科室管理编号为"' + departIds + '"的数据项?', "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(function () {
|
}).then(function() {
|
||||||
return delDepart(departIds);
|
return delDepart(departIds);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm('是否确认导出所有科室管理数据项?', "警告", {
|
this.$confirm('是否确认导出所有科室管理数据项?', "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(function () {
|
}).then(function() {
|
||||||
return exportDepart(queryParams);
|
return exportDepart(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,27 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="食品名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
placeholder="请输入名称"
|
placeholder="请输入食品名称"
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="售价" prop="price">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.price"
|
|
||||||
placeholder="请输入售价"
|
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="售价" prop="price">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.price"-->
|
||||||
|
<!-- placeholder="请输入售价"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="食品分类" prop="type">
|
<el-form-item label="食品分类" prop="type">
|
||||||
<el-select v-model="queryParams.type" placeholder="请选择食品分类" clearable size="small">
|
<el-select v-model="queryParams.type" placeholder="请选择食品分类" clearable size="small">
|
||||||
<el-option label="请选择字典生成" value=""/>
|
<el-option
|
||||||
|
v-for="dict in typeOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -38,8 +43,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['fantang:food:add']"
|
v-hasPermi="['fantang:food:add']"
|
||||||
>新增
|
>新增</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -49,8 +53,7 @@
|
|||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['fantang:food:edit']"
|
v-hasPermi="['fantang:food:edit']"
|
||||||
>修改
|
>修改</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -60,8 +63,7 @@
|
|||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['fantang:food:remove']"
|
v-hasPermi="['fantang:food:remove']"
|
||||||
>删除
|
>删除</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -70,19 +72,17 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['fantang:food:export']"
|
v-hasPermi="['fantang:food:export']"
|
||||||
>导出
|
>导出</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="foodList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="foodList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="食品id" align="center" prop="foodId" v-if="false"/>
|
<el-table-column label="食品id" align="center" prop="foodId" v-if="false"/>
|
||||||
<el-table-column label="名称" align="center" prop="name"/>
|
<el-table-column label="食品名称" align="center" prop="name" />
|
||||||
<el-table-column label="图片地址" align="center" prop="pictureUrl"/>
|
<el-table-column label="售价" align="center" prop="price" />
|
||||||
<el-table-column label="售价" align="center" prop="price"/>
|
<el-table-column label="食品分类" align="center" prop="type" :formatter="typeFormat" />
|
||||||
<el-table-column label="食品分类" align="center" prop="type"/>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -91,16 +91,14 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['fantang:food:edit']"
|
v-hasPermi="['fantang:food:edit']"
|
||||||
>修改
|
>修改</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['fantang:food:remove']"
|
v-hasPermi="['fantang:food:remove']"
|
||||||
>删除
|
>删除</el-button>
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -116,18 +114,23 @@
|
|||||||
<!-- 添加或修改食品管理对话框 -->
|
<!-- 添加或修改食品管理对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="食品名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入名称"/>
|
<el-input v-model="form.name" placeholder="请输入食品名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图片地址" prop="pictureUrl">
|
<el-form-item label="图片">
|
||||||
<el-input v-model="form.pictureUrl" placeholder="请输入图片地址"/>
|
<uploadImage v-model="form.pictureUrl"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="售价" prop="price">
|
<el-form-item label="售价" prop="price">
|
||||||
<el-input v-model="form.price" placeholder="请输入售价"/>
|
<el-input v-model="form.price" placeholder="请输入售价" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="食品分类" prop="type">
|
<el-form-item label="食品分类" prop="type">
|
||||||
<el-select v-model="form.type" placeholder="请选择食品分类">
|
<el-select v-model="form.type" placeholder="请选择食品分类">
|
||||||
<el-option label="请选择字典生成" value=""/>
|
<el-option
|
||||||
|
v-for="dict in typeOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="parseInt(dict.dictValue)"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -140,11 +143,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {addFood, delFood, exportFood, getFood, listFood, updateFood} from "@/api/fantang/food";
|
import { listFood, getFood, delFood, addFood, updateFood, exportFood } from "@/api/fantang/food";
|
||||||
|
import UploadImage from '@/components/UploadImage';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Food",
|
name: "Food",
|
||||||
components: {},
|
components: {
|
||||||
|
UploadImage,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -165,6 +171,8 @@ export default {
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
// 食品分类字典
|
||||||
|
typeOptions: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -178,19 +186,22 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
{required: true, message: "名称不能为空", trigger: "blur"}
|
{ required: true, message: "食品名称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
price: [
|
price: [
|
||||||
{required: true, message: "售价不能为空", trigger: "blur"}
|
{ required: true, message: "售价不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
type: [
|
type: [
|
||||||
{required: true, message: "食品分类不能为空", trigger: "change"}
|
{ required: true, message: "食品分类不能为空", trigger: "change" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getDicts("ft_food_type").then(response => {
|
||||||
|
this.typeOptions = response.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询食品管理列表 */
|
/** 查询食品管理列表 */
|
||||||
@ -202,6 +213,10 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 食品分类字典翻译
|
||||||
|
typeFormat(row, column) {
|
||||||
|
return this.selectDictLabel(this.typeOptions, row.type);
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -232,7 +247,7 @@ export default {
|
|||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.foodId)
|
this.ids = selection.map(item => item.foodId)
|
||||||
this.single = selection.length !== 1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
@ -275,28 +290,28 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const foodIds = row.foodId || this.ids;
|
const foodIds = row.foodId || this.ids;
|
||||||
this.$confirm('是否确认删除食品管理编号为"' + foodIds + '"的数据项?', "警告", {
|
this.$confirm('是否确认删除食品管理编号为"' + foodIds + '"的数据项?', "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(function () {
|
}).then(function() {
|
||||||
return delFood(foodIds);
|
return delFood(foodIds);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm('是否确认导出所有食品管理数据项?', "警告", {
|
this.$confirm('是否确认导出所有食品管理数据项?', "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(function () {
|
}).then(function() {
|
||||||
return exportFood(queryParams);
|
return exportFood(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -19,6 +19,15 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="住院号" prop="hospitalId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.hospitalId"
|
||||||
|
placeholder="请输入住院号"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@ -76,6 +85,7 @@
|
|||||||
<el-table-column label="病人id" align="center" prop="patientId" v-if="false"/>
|
<el-table-column label="病人id" align="center" prop="patientId" v-if="false"/>
|
||||||
<el-table-column label="姓名" align="center" prop="name"/>
|
<el-table-column label="姓名" align="center" prop="name"/>
|
||||||
<el-table-column label="床号" align="center" prop="bedId"/>
|
<el-table-column label="床号" align="center" prop="bedId"/>
|
||||||
|
<el-table-column label="住院号" align="center" prop="hospitalId"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -112,9 +122,22 @@
|
|||||||
<el-form-item label="姓名" prop="name">
|
<el-form-item label="姓名" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="所属部门" prop="departId">
|
||||||
|
<el-select v-model="form.departId" placeholder="请选择科室列表">
|
||||||
|
<el-option
|
||||||
|
v-for="item in deptListOptions"
|
||||||
|
:key="item.departName"
|
||||||
|
:label="item.departName"
|
||||||
|
:value="item.departId">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="床号" prop="bedId">
|
<el-form-item label="床号" prop="bedId">
|
||||||
<el-input v-model="form.bedId" placeholder="请输入床号"/>
|
<el-input v-model="form.bedId" placeholder="请输入床号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="住院号" prop="hospitalId">
|
||||||
|
<el-input v-model="form.hospitalId" placeholder="请输入住院号"/>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<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>
|
||||||
@ -126,12 +149,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {addPatient, delPatient, exportPatient, getPatient, listPatient, updatePatient} from "@/api/fantang/patient";
|
import {addPatient, delPatient, exportPatient, getPatient, listPatient, updatePatient} from "@/api/fantang/patient";
|
||||||
|
import {listDepart} from "@/api/fantang/depart";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Patient",
|
name: "Patient",
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
deptListOptions: [],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -155,7 +180,8 @@ export default {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
name: null,
|
name: null,
|
||||||
bedId: null
|
bedId: null,
|
||||||
|
hospitalId: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -164,9 +190,15 @@ export default {
|
|||||||
name: [
|
name: [
|
||||||
{required: true, message: "姓名不能为空", trigger: "blur"}
|
{required: true, message: "姓名不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
|
departId: [
|
||||||
|
{required: true, message: "所属部门不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
bedId: [
|
bedId: [
|
||||||
{required: true, message: "床号不能为空", trigger: "blur"}
|
{required: true, message: "床号不能为空", trigger: "blur"}
|
||||||
]
|
],
|
||||||
|
hospitalId: [
|
||||||
|
{required: true, message: "住院号不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -182,6 +214,10 @@ export default {
|
|||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
listDepart(this.queryParams).then(response => {
|
||||||
|
console.log("depart", response);
|
||||||
|
this.deptListOptions = response.rows;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
@ -194,7 +230,11 @@ export default {
|
|||||||
patientId: null,
|
patientId: null,
|
||||||
name: null,
|
name: null,
|
||||||
departId: null,
|
departId: null,
|
||||||
bedId: null
|
bedId: null,
|
||||||
|
hospitalId: null,
|
||||||
|
syncFlag: null,
|
||||||
|
offFlag: null,
|
||||||
|
createAt: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
|||||||
@ -11,22 +11,29 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="岗位" prop="post">
|
<el-form-item label="岗位" prop="post">
|
||||||
<el-input
|
<el-select v-model="queryParams.post" placeholder="请选择岗位" clearable size="small">
|
||||||
v-model="queryParams.post"
|
<el-option
|
||||||
placeholder="请输入岗位"
|
v-for="dict in postOptions"
|
||||||
clearable
|
:key="dict.dictValue"
|
||||||
size="small"
|
:label="dict.dictLabel"
|
||||||
@keyup.enter.native="handleQuery"
|
:value="dict.dictValue"
|
||||||
/>
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="角色" prop="role">
|
<!-- <el-form-item label="角色" prop="role">-->
|
||||||
<el-input
|
<!-- <el-select v-model="queryParams.role" placeholder="请选择角色" clearable size="small">-->
|
||||||
v-model="queryParams.role"
|
<!-- <el-option label="请选择字典生成" value=""/>-->
|
||||||
placeholder="请输入角色"
|
<!-- </el-select>-->
|
||||||
clearable
|
<!-- </el-form-item>-->
|
||||||
size="small"
|
<el-form-item label="是否启用" prop="flag">
|
||||||
@keyup.enter.native="handleQuery"
|
<el-select v-model="queryParams.flag" placeholder="请选择是否启用" clearable size="small">
|
||||||
/>
|
<el-option
|
||||||
|
v-for="item in flagOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
@ -84,9 +91,17 @@
|
|||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
<el-table-column label="员工 id" align="center" prop="staffId" v-if="false"/>
|
<el-table-column label="员工 id" align="center" prop="staffId" v-if="false"/>
|
||||||
<el-table-column label="姓名" align="center" prop="name"/>
|
<el-table-column label="姓名" align="center" prop="name"/>
|
||||||
|
<el-table-column label="性别" align="center" prop="sex"/>
|
||||||
|
<el-table-column label="手机号码" align="center" prop="tel"/>
|
||||||
<el-table-column label="岗位" align="center" prop="post"/>
|
<el-table-column label="岗位" align="center" prop="post"/>
|
||||||
<el-table-column label="角色" align="center" prop="role"/>
|
<!-- <el-table-column label="角色" align="center" prop="role"/>-->
|
||||||
<el-table-column label="补贴余额" align="center" prop="balance"/>
|
<el-table-column label="补贴余额" align="center" prop="balance"/>
|
||||||
|
<el-table-column label="创建日期" align="center" prop="createAt" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createAt, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否启用" align="center" prop="flag"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -123,17 +138,55 @@
|
|||||||
<el-form-item label="姓名" prop="name">
|
<el-form-item label="姓名" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="性别" prop="sex">
|
||||||
|
<el-select v-model="form.sex" placeholder="请选性别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in sexOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号码" prop="tel">
|
||||||
|
<el-input v-model="form.tel" placeholder="请输入手机号码"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="岗位" prop="post">
|
<el-form-item label="岗位" prop="post">
|
||||||
<el-input v-model="form.post" placeholder="请输入岗位"/>
|
<el-select v-model="form.post" placeholder="请选择岗位">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in postOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="角色" prop="role">
|
<el-form-item label="科室" prop="deptList">
|
||||||
<el-input v-model="form.role" placeholder="请输入角色"/>
|
<el-select v-model="form.deptList" placeholder="请选择科室">
|
||||||
|
<el-option
|
||||||
|
v-for="item in deptListOptions"
|
||||||
|
:key="item.departName"
|
||||||
|
:label="item.departName"
|
||||||
|
:value="item.departName">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="角色" prop="role">-->
|
||||||
|
<!-- <el-select v-model="form.role" placeholder="请选择角色">-->
|
||||||
|
<!-- <el-option label="请选择字典生成" value=""/>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="密码" prop="password">
|
<el-form-item label="密码" prop="password">
|
||||||
<el-input v-model="form.password" placeholder="请输入密码"/>
|
<el-input v-model="form.password" placeholder="请输入密码"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="补贴余额" prop="balance">
|
<el-form-item label="启用标志" prop="flag">
|
||||||
<el-input v-model="form.balance" placeholder="请输入补贴余额"/>
|
<el-switch
|
||||||
|
v-model="form.flag"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
active-text="启用"
|
||||||
|
inactive-text="禁用">
|
||||||
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -153,12 +206,23 @@ import {
|
|||||||
listStaffInfo,
|
listStaffInfo,
|
||||||
updateStaffInfo
|
updateStaffInfo
|
||||||
} from "@/api/fantang/staffInfo";
|
} from "@/api/fantang/staffInfo";
|
||||||
|
import {listDepart} from "@/api/fantang/depart";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StaffInfo",
|
name: "StaffInfo",
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
deptListOptions: [],
|
||||||
|
sexOptions: [],
|
||||||
|
postOptions: [],
|
||||||
|
flagOptions: [{
|
||||||
|
value: 1,
|
||||||
|
label: '启用'
|
||||||
|
}, {
|
||||||
|
value: 0,
|
||||||
|
label: '禁用'
|
||||||
|
}],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -184,6 +248,7 @@ export default {
|
|||||||
name: null,
|
name: null,
|
||||||
post: null,
|
post: null,
|
||||||
role: null,
|
role: null,
|
||||||
|
flag: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -193,22 +258,34 @@ export default {
|
|||||||
{required: true, message: "姓名不能为空", trigger: "blur"}
|
{required: true, message: "姓名不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
post: [
|
post: [
|
||||||
{required: true, message: "岗位不能为空", trigger: "blur"}
|
{required: true, message: "岗位不能为空", trigger: "change"}
|
||||||
],
|
],
|
||||||
role: [
|
role: [
|
||||||
{required: true, message: "角色不能为空", trigger: "blur"}
|
{required: true, message: "角色不能为空", trigger: "change"}
|
||||||
],
|
],
|
||||||
password: [
|
flag: [
|
||||||
{required: true, message: "密码不能为空", trigger: "blur"}
|
{required: true, message: "启用标志不能为空", trigger: "change"}
|
||||||
],
|
],
|
||||||
balance: [
|
sex: [
|
||||||
{required: true, message: "补贴余额不能为空", trigger: "blur"}
|
{required: true, message: "性别不能为空", trigger: "change"}
|
||||||
|
],
|
||||||
|
deptList: [
|
||||||
|
{required: true, message: "性别不能为空", trigger: "change"}
|
||||||
|
],
|
||||||
|
tel: [
|
||||||
|
{required: true, message: "手机号码不能为空", trigger: "change"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getDicts("sys_user_sex").then(response => {
|
||||||
|
this.sexOptions = response.data;
|
||||||
|
});
|
||||||
|
this.getDicts("ft_post").then(response => {
|
||||||
|
this.postOptions = response.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询员工管理列表 */
|
/** 查询员工管理列表 */
|
||||||
@ -218,7 +295,11 @@ export default {
|
|||||||
this.staffInfoList = response.rows;
|
this.staffInfoList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
console.log("flag-----", response);
|
||||||
});
|
});
|
||||||
|
listDepart(this.queryParams).then(response => {
|
||||||
|
this.deptListOptions = response.rows;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
@ -236,8 +317,15 @@ export default {
|
|||||||
password: null,
|
password: null,
|
||||||
createAt: null,
|
createAt: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
flag: null,
|
flag: true,
|
||||||
balance: null
|
balance: null,
|
||||||
|
staffType: null,
|
||||||
|
corpName: null,
|
||||||
|
pictureUrl: null,
|
||||||
|
deptList: null,
|
||||||
|
qrCode: null,
|
||||||
|
sex: null,
|
||||||
|
tel: null,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -278,12 +366,23 @@ export default {
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.staffId != null) {
|
if (this.form.staffId != null) {
|
||||||
|
if (this.form.flag === true) {
|
||||||
|
this.form.flag = 1;
|
||||||
|
} else {
|
||||||
|
this.form.flag = 0;
|
||||||
|
}
|
||||||
updateStaffInfo(this.form).then(response => {
|
updateStaffInfo(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
console.log(this.form);
|
||||||
|
if (this.form.flag === true) {
|
||||||
|
this.form.flag = 1;
|
||||||
|
} else {
|
||||||
|
this.form.flag = 0;
|
||||||
|
}
|
||||||
addStaffInfo(this.form).then(response => {
|
addStaffInfo(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
|||||||
@ -34,7 +34,7 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://localhost:8080`,
|
target: `http://localhost:9000`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user