Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
# Conflicts: # openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java
This commit is contained in:
@@ -22,7 +22,7 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理(科室)controller
|
* 机构管理controller
|
||||||
*
|
*
|
||||||
* @author
|
* @author
|
||||||
* @date 2025-02-21
|
* @date 2025-02-21
|
||||||
@@ -39,9 +39,9 @@ public class OrganizationController {
|
|||||||
private AssignSeqUtil assignSeqUtil;
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加科室信息
|
* 添加机构信息
|
||||||
*
|
*
|
||||||
* @param organization 科室信息
|
* @param organization 机构信息
|
||||||
*/
|
*/
|
||||||
@PostMapping("/organization")
|
@PostMapping("/organization")
|
||||||
public R<?> addOrganization(@Validated @RequestBody Organization organization) {
|
public R<?> addOrganization(@Validated @RequestBody Organization organization) {
|
||||||
@@ -54,17 +54,17 @@ public class OrganizationController {
|
|||||||
String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix());
|
String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix());
|
||||||
organization.setBusNo(code);
|
organization.setBusNo(code);
|
||||||
|
|
||||||
boolean saveOrganizationSuccess = organizationService.save(organization);
|
boolean saveOrgSuccess = organizationService.save(organization);
|
||||||
|
|
||||||
return saveOrganizationSuccess
|
return saveOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"科室信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"机构信息"}))
|
||||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑科室信息
|
* 编辑机构信息
|
||||||
*
|
*
|
||||||
* @param organization 科室信息
|
* @param organization 机构信息
|
||||||
*/
|
*/
|
||||||
@PutMapping("/organization")
|
@PutMapping("/organization")
|
||||||
public R<?> editOrganization(@Validated @RequestBody Organization organization) {
|
public R<?> editOrganization(@Validated @RequestBody Organization organization) {
|
||||||
@@ -72,14 +72,14 @@ public class OrganizationController {
|
|||||||
// Organization organization = new Organization();
|
// Organization organization = new Organization();
|
||||||
// BeanUtils.copyProperties(organizationdto, organization);
|
// BeanUtils.copyProperties(organizationdto, organization);
|
||||||
|
|
||||||
boolean updateSuccess = organizationService.updateById(organization);
|
boolean updateOrgSuccess = organizationService.updateById(organization);
|
||||||
return updateSuccess
|
return updateOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"科室信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"机构信息"}))
|
||||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除科室信息
|
* 删除机构信息
|
||||||
*
|
*
|
||||||
* @param orgId 主表id
|
* @param orgId 主表id
|
||||||
*/
|
*/
|
||||||
@@ -87,32 +87,33 @@ public class OrganizationController {
|
|||||||
public R<?> deleteSupplyRequest(@RequestParam Long orgId) {
|
public R<?> deleteSupplyRequest(@RequestParam Long orgId) {
|
||||||
|
|
||||||
// 在service层做业务校验
|
// 在service层做业务校验
|
||||||
boolean deleteSuccess = organizationService.removeById(orgId);
|
boolean deleteOrgSuccess = organizationService.removeById(orgId);
|
||||||
|
|
||||||
return deleteSuccess
|
return deleteOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"科室信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"机构信息"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"科室信息删除失败"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构信息删除失败"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 科室分页列表
|
* 机构分页列表
|
||||||
*
|
*
|
||||||
* @param classEnum 机构分类枚举
|
* @param classEnum 机构分类枚举
|
||||||
* @param activeFlag 活动标识
|
* @param activeFlag 活动标识
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当前页码
|
||||||
* @param pageSize 查询条数
|
* @param pageSize 查询条数
|
||||||
* @param request 请求数据
|
* @param request 请求数据
|
||||||
* @return 科室分页列表
|
* @return 机构分页列表
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/organization")
|
@GetMapping(value = "/organization")
|
||||||
public R<?> getOrganizationPage(Integer classEnum, Integer activeFlag,
|
public R<?> getOrganizationPage(Integer classEnum, Integer activeFlag,
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
|
||||||
// 查询【科室】分页列表
|
// 查询【机构】分页列表
|
||||||
Page<Organization> organizationPage =
|
Page<Organization> organizationPage =
|
||||||
organizationService.getOrganizationPage(classEnum, activeFlag, pageNo, pageSize);
|
organizationService.getOrganizationPage(classEnum, activeFlag, pageNo, pageSize);
|
||||||
return R.ok(organizationPage);
|
return R.ok(organizationPage,
|
||||||
|
MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.common.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APL消息ID常量类
|
||||||
|
*
|
||||||
|
* @author zwh
|
||||||
|
* @date 2025-02-25
|
||||||
|
*/
|
||||||
|
public class PromptMsgConstant {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 共用
|
||||||
|
*/
|
||||||
|
public interface Common {
|
||||||
|
/**
|
||||||
|
* {0}添加成功
|
||||||
|
*/
|
||||||
|
String M00001 = "apl.common.M00001";
|
||||||
|
/**
|
||||||
|
* {0}保存成功
|
||||||
|
*/
|
||||||
|
String M00002 = "apl.common.M00002";
|
||||||
|
/**
|
||||||
|
* {0}已经存在
|
||||||
|
*/
|
||||||
|
String M00003 = "apl.common.M00003";
|
||||||
|
/**
|
||||||
|
* {0}操作成功
|
||||||
|
*/
|
||||||
|
String M00004 = "apl.common.M00004";
|
||||||
|
/**
|
||||||
|
* {0}删除成功
|
||||||
|
*/
|
||||||
|
String M00005 = "apl.common.M00005";
|
||||||
|
/**
|
||||||
|
* 操作失败,该数据已被他人删除,请刷新后重试
|
||||||
|
*/
|
||||||
|
String M00006 = "apl.common.M00006";
|
||||||
|
/**
|
||||||
|
* 操作失败,该数据已被他人更改,请刷新后重试
|
||||||
|
*/
|
||||||
|
String M00007 = "apl.common.M00007";
|
||||||
|
/**
|
||||||
|
* 请勿重复提交
|
||||||
|
*/
|
||||||
|
String M00008 = "apl.common.M00008";
|
||||||
|
/**
|
||||||
|
* 查询成功
|
||||||
|
*/
|
||||||
|
String M00009 = "apl.common.M00009";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,7 +28,7 @@ public class Organization extends HisBaseEntity {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 编码 */
|
/** 编码 */
|
||||||
private String bus_no;
|
private String busNo;
|
||||||
|
|
||||||
/** 名称 */
|
/** 名称 */
|
||||||
private String name;
|
private String name;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.openhis.administration.domain.Organization;
|
import com.openhis.administration.domain.Organization;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理(科室)Service接口
|
* 机构管理Service接口
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
* @date 2025-02-21
|
* @date 2025-02-21
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import com.openhis.administration.mapper.OrganizationMapper;
|
|||||||
import com.openhis.administration.service.IOrganizationService;
|
import com.openhis.administration.service.IOrganizationService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理(科室)Service业务层处理
|
* 机构管理Service业务层处理
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
* @date 2025-02-21
|
* @date 2025-02-21
|
||||||
@@ -25,11 +25,11 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
|||||||
private OrganizationMapper organizationMapper;
|
private OrganizationMapper organizationMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询科室列表
|
* 查询机构列表
|
||||||
*
|
*
|
||||||
* @param classEnum 机构分类枚举
|
* @param classEnum 机构分类枚举
|
||||||
* @param activeFlag 活动标识
|
* @param activeFlag 活动标识
|
||||||
* @return 科室列表
|
* @return 机构列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Page<Organization> getOrganizationPage(Integer classEnum, Integer activeFlag, Integer pageNo,
|
public Page<Organization> getOrganizationPage(Integer classEnum, Integer activeFlag, Integer pageNo,
|
||||||
@@ -42,12 +42,12 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (activeFlag != null) {
|
if (activeFlag != null) {
|
||||||
queryWrapper.eq(Organization::getTypeEnum, activeFlag);
|
queryWrapper.eq(Organization::getActiveFlag, activeFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
Page<Organization> organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
Page<Organization> organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
|
|
||||||
// 返回科室信息列表
|
// 返回机构信息列表
|
||||||
return organizationPage;
|
return organizationPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
import { parseStrEmpty } from "@/utils/openhis";
|
||||||
|
|
||||||
|
// 查询病种目录列表
|
||||||
|
export function getDiseaseList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/datadictionary/disease/information-page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询病种目录详细
|
||||||
|
export function getDiseaseOne(id) {
|
||||||
|
return request({
|
||||||
|
url: '/datadictionary/disease/information-one',
|
||||||
|
method: 'get',
|
||||||
|
params: id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增病种目录
|
||||||
|
export function addDisease(data) {
|
||||||
|
return request({
|
||||||
|
url: '/datadictionary/disease/information',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改病种目录
|
||||||
|
export function editDisease(data) {
|
||||||
|
return request({
|
||||||
|
url: '/datadictionary/disease/information',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除病种目录
|
||||||
|
export function delUser(userId) {
|
||||||
|
return request({
|
||||||
|
url: '/system/user/' + userId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 病种目录分类查询
|
||||||
|
export function getDiseaseCategory() {
|
||||||
|
return request({
|
||||||
|
url: '/datadictionary/disease/information-category',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改用户个人信息
|
||||||
|
export function updateUserProfile(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/user/profile',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询部门下拉树结构
|
||||||
|
export function deptTreeSelect() {
|
||||||
|
return request({
|
||||||
|
url: '/system/user/deptTree',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
555
openhis-ui-vue3/src/views/catalog/disease/index.vue
Normal file
555
openhis-ui-vue3/src/views/catalog/disease/index.vue
Normal file
@@ -0,0 +1,555 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<!--疾病目录数据-->
|
||||||
|
<el-col :span="4" :xs="24">
|
||||||
|
<!-- <div class="head-container">
|
||||||
|
<el-input
|
||||||
|
v-model="deptName"
|
||||||
|
placeholder="请输入部门名称"
|
||||||
|
clearable
|
||||||
|
prefix-icon="Search"
|
||||||
|
style="margin-bottom: 20px"
|
||||||
|
/>
|
||||||
|
</div> -->
|
||||||
|
<!-- <div class="head-container">
|
||||||
|
<el-tree
|
||||||
|
:data="conditionDefinitionOptions"
|
||||||
|
:props="{ label: 'label', children: 'children' }"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
:filter-node-method="filterNode"
|
||||||
|
ref="deptTreeRef"
|
||||||
|
node-key="id"
|
||||||
|
highlight-current
|
||||||
|
default-expand-all
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
/>
|
||||||
|
</div> -->
|
||||||
|
</el-col>
|
||||||
|
<!--用户数据-->
|
||||||
|
<el-col :span="20" :xs="24">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="疾病:" prop="diseaseName ">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.diseaseName"
|
||||||
|
placeholder="名称/ICD10编码/拼音助记码"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否停用" prop="status">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.status"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="是否系统预置:" prop="status" label-width="120">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.status"
|
||||||
|
placeholder="用户状态"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item> -->
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:user:add']"
|
||||||
|
>添加新项目</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:user:add']"
|
||||||
|
>添加为本机构项目</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="Remove"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleClose"
|
||||||
|
v-hasPermi="['system:user:edit']"
|
||||||
|
>停用</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="CirclePlus"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleStart"
|
||||||
|
v-hasPermi="['system:user:remove']"
|
||||||
|
>启用</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Search"
|
||||||
|
@click="getList"
|
||||||
|
v-hasPermi="['system:user:import']"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="Download"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:user:export']"
|
||||||
|
>导出Excel</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="diseaseList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<el-table-column
|
||||||
|
label="编码"
|
||||||
|
align="center"
|
||||||
|
key="conditionCode"
|
||||||
|
prop="conditionCode"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="名称"
|
||||||
|
align="center"
|
||||||
|
key="name"
|
||||||
|
prop="name"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="拼音助记码"
|
||||||
|
align="center"
|
||||||
|
key="pyStr"
|
||||||
|
prop="pyStr"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="医保编码 "
|
||||||
|
align="center"
|
||||||
|
key="ybNo"
|
||||||
|
prop="ybNo"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="医保名称"
|
||||||
|
align="center"
|
||||||
|
key="ybName"
|
||||||
|
prop="ybName"
|
||||||
|
width="120"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="医保对码标志"
|
||||||
|
align="center"
|
||||||
|
key="ybMatchflag"
|
||||||
|
prop="ybMatchflag"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="停用"
|
||||||
|
align="center"
|
||||||
|
key="statusEnum"
|
||||||
|
rop="statusEnum"
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:user:edit']"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="View"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['system:user:remove']"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 添加或修改用户配置对话框 -->
|
||||||
|
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||||
|
<el-form :model="form" :rules="rules" ref="diseaseRef" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="form.name"
|
||||||
|
placeholder="请输入名称"
|
||||||
|
maxlength="30"
|
||||||
|
:disabled="form.id != undefined"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="编码" prop="conditionCode">
|
||||||
|
<el-input
|
||||||
|
v-model="form.conditionCode"
|
||||||
|
placeholder="请输入编码"
|
||||||
|
maxlength="30"
|
||||||
|
:disabled="form.id != undefined"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="拼音" prop="pyStr">
|
||||||
|
<el-input v-model="form.pyStr" maxlength="11" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="停用" prop="status">
|
||||||
|
<el-checkbox v-model="form.status"></el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="Disease">
|
||||||
|
import {
|
||||||
|
getDiseaseList,
|
||||||
|
editDisease,
|
||||||
|
addDisease,
|
||||||
|
getDiseaseCategory,
|
||||||
|
getDiseaseOne,
|
||||||
|
} from "./components/disease";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const { sys_normal_disable, sys_user_sex } = proxy.useDict( "sys_normal_disable","sys_user_sex");
|
||||||
|
|
||||||
|
const diseaseList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref([]);
|
||||||
|
const selectedData = ref([]); // 存储选择的行数据
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
const dateRange = ref([]);
|
||||||
|
const deptName = ref("");
|
||||||
|
const conditionDefinitionOptions = ref(undefined);
|
||||||
|
// const initPassword = ref(undefined);
|
||||||
|
// const postOptions = ref([]);
|
||||||
|
// const roleOptions = ref([]);
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 50,
|
||||||
|
diseaseName: undefined, // 疾病名称
|
||||||
|
status: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
userName: [
|
||||||
|
{ required: true, message: "用户名称不能为空", trigger: "blur" },
|
||||||
|
{
|
||||||
|
min: 2,
|
||||||
|
max: 20,
|
||||||
|
message: "用户名称长度必须介于 2 和 20 之间",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
nickName: [
|
||||||
|
{ required: true, message: "用户昵称不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
password: [
|
||||||
|
{ required: true, message: "用户密码不能为空", trigger: "blur" },
|
||||||
|
{
|
||||||
|
min: 5,
|
||||||
|
max: 20,
|
||||||
|
message: "用户密码长度必须介于 5 和 20 之间",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: /^[^<>"'|\\]+$/,
|
||||||
|
message: "不能包含非法字符:< > \" ' \\ |",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
email: [
|
||||||
|
{
|
||||||
|
type: "email",
|
||||||
|
message: "请输入正确的邮箱地址",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
phonenumber: [
|
||||||
|
{
|
||||||
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||||
|
message: "请输入正确的手机号码",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 通过条件过滤节点 */
|
||||||
|
const filterNode = (value, data) => {
|
||||||
|
if (!value) return true;
|
||||||
|
return data.label.indexOf(value) !== -1;
|
||||||
|
};
|
||||||
|
// /** 根据名称筛选部门树 */
|
||||||
|
// watch(deptName, val => {
|
||||||
|
// proxy.$refs["deptTreeRef"].filter(val);
|
||||||
|
// });
|
||||||
|
/** 病种目录分类查询下拉树结构 */
|
||||||
|
function getDiseaseCategoryList() {
|
||||||
|
getDiseaseCategory().then((response) => {
|
||||||
|
console.log(response, "response病种目录分类查询下拉树结构");
|
||||||
|
conditionDefinitionOptions.value = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 查询病种目录列表 */
|
||||||
|
function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
getDiseaseList(queryParams.value).then((res) => {
|
||||||
|
loading.value = false;
|
||||||
|
console.log(res, "res");
|
||||||
|
diseaseList.value = res.data.records;
|
||||||
|
total.value = res.total;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 节点单击事件 */
|
||||||
|
function handleNodeClick(data) {
|
||||||
|
queryParams.value.deptId = data.id;
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
// /** 重置按钮操作 */
|
||||||
|
// function resetQuery() {
|
||||||
|
// dateRange.value = [];
|
||||||
|
// proxy.resetForm("queryRef");
|
||||||
|
// queryParams.value.deptId = undefined;
|
||||||
|
// proxy.$refs.deptTreeRef.setCurrentKey(null);
|
||||||
|
// handleQuery();
|
||||||
|
// };
|
||||||
|
/** 启用按钮操作 */
|
||||||
|
function handleStart() {
|
||||||
|
selectedData.value.forEach((item) => {
|
||||||
|
item.statusEnum = "2";
|
||||||
|
});
|
||||||
|
const data = selectedData.value;
|
||||||
|
// selectedData
|
||||||
|
console.log(data, "data");
|
||||||
|
proxy.$modal
|
||||||
|
.confirm("是否确定启用数据!")
|
||||||
|
.then(function () {
|
||||||
|
return editDisease(data);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess("启用成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
/** 停用按钮操作 */
|
||||||
|
function handleClose() {
|
||||||
|
selectedData.value.forEach((item) => {
|
||||||
|
item.statusEnum = "3";
|
||||||
|
});
|
||||||
|
const data = selectedData.value;
|
||||||
|
console.log(data, "data");
|
||||||
|
proxy.$modal
|
||||||
|
.confirm("是否确认停用数据!")
|
||||||
|
.then(function () {
|
||||||
|
return editDisease(data);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess("停用成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
function handleExport() {
|
||||||
|
proxy.download(
|
||||||
|
"system/user/export",
|
||||||
|
{
|
||||||
|
...queryParams.value,
|
||||||
|
},
|
||||||
|
`user_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// /** 用户状态修改 */
|
||||||
|
// function handleStatusChange(row) {
|
||||||
|
// let text = row.status === "0" ? "启用" : "停用";
|
||||||
|
// proxy.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function () {
|
||||||
|
// return changeUserStatus(row.userId, row.status);
|
||||||
|
// }).then(() => {
|
||||||
|
// proxy.$modal.msgSuccess(text + "成功");
|
||||||
|
// }).catch(function () {
|
||||||
|
// row.status = row.status === "0" ? "1" : "0";
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
|
/** 选择条数 */
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
console.log(selection, "selection");
|
||||||
|
selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载模板操作 */
|
||||||
|
function importTemplate() {
|
||||||
|
proxy.download(
|
||||||
|
"system/user/importTemplate",
|
||||||
|
{},
|
||||||
|
`user_template_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/** 重置操作表单 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
id: undefined,
|
||||||
|
conditionCode: undefined,
|
||||||
|
pyStr: undefined,
|
||||||
|
status: undefined,
|
||||||
|
statusEnum: undefined,
|
||||||
|
};
|
||||||
|
proxy.resetForm("diseaseRef");
|
||||||
|
}
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
title.value = "新增";
|
||||||
|
}
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
function handleUpdate(row) {
|
||||||
|
reset();
|
||||||
|
console.log(row, "row");
|
||||||
|
form.value = row;
|
||||||
|
open.value = true;
|
||||||
|
title.value = "病种编辑";
|
||||||
|
}
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
proxy.$refs["diseaseRef"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (form.value.id != undefined) {
|
||||||
|
form.value.status
|
||||||
|
? (form.value.statusEnum = "3")
|
||||||
|
: (form.value.statusEnum = "2");
|
||||||
|
console.log(form.value, "editDisease", form.value.statusEnum);
|
||||||
|
let param = [];
|
||||||
|
param.push(form.value);
|
||||||
|
editDisease(param).then((response) => {
|
||||||
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addDisease(form.value).then((response) => {
|
||||||
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 详细按钮操作 */
|
||||||
|
function handleView(row) {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
getDiseaseOne(row.id).then((response) => {
|
||||||
|
console.log(response, "responsebbbb", row.id);
|
||||||
|
form.value = response.data;
|
||||||
|
// getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getDiseaseCategoryList();
|
||||||
|
getList();
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user