Browse Source

文书、职务

zhouna 3 năm trước cách đây
mục cha
commit
7c2a2b888c

+ 2 - 1
craco.config.js

@@ -18,7 +18,8 @@ module.exports = {
     devServer: (devServerConfig, { env, paths, proxy, allowedHost }) => {
         devServerConfig.proxy={
             '/security-center':'http://192.168.2.237:8871',
-            pathRewrite: {'/security-center' : ''},
+		    '/daqe-center':'http://192.168.2.237:8871',
+            pathRewrite: {'/center' : ''},
             changeOrigin: true
         };
         return devServerConfig;

+ 6 - 0
src/api/request.js

@@ -77,6 +77,12 @@ const request = {
     getNotNoticeCount:'/security-center/noticeManage/getNotNoticeCount',        //获取未读信息数量
     listManagePage:'/security-center/noticeManage/listManagePage',        //通知管理列表
 
+    //渠道管理
+    getOfficialCapacityPage:"/daqe-center/officialCapacityManage/getOfficialCapacityPage",    //职务变更记录列表
+    delOfficialCapacityPage:"/daqe-center/officialCapacityManage/delOfficialCapacityPage",      //删除职务变更
+    getRecordTemplateManage:"/daqe-center/recordTemplateManage/getRecordTemplateManage",        //查看文书模板
+    getRecordTemplatePage:"/daqe-center/recordTemplateManage/getRecordTemplatePage",        //文书模板列表
+
 }
 
 export default request;

+ 6 - 0
src/components/AMenu/index.js

@@ -14,6 +14,9 @@ import LoginLog from "../LoginLog";
 import ExceptionLog from "../ExceptionLog";
 import MyMessage from "../MyMessage";
 import MsgManage from "../MsgManage";
+import DocTemplate from "../DocTemplate";
+import DutyRecord from "../DutyRecord";
+import MedicalTeam from "../MedicalTeam";
 import apiObj from '@api/index';
 
 const { post, api } = apiObj;
@@ -33,6 +36,9 @@ const pageMap = {
     'RZGL-YCRZ': <ExceptionLog />,
     'ZNTZ-WDTZ': <MyMessage />,
     'ZNTZ-TZGL': <MsgManage />,
+  	'JCSJ-WSMBWH': <DocTemplate />,
+    'JCSJ-ZWZCBGJL': <DutyRecord />,
+    'QXGL-YLZGL': <MedicalTeam />,
 }
 
 let firstMenuPage = {};         //第一个菜单,自动激活时用

+ 198 - 0
src/components/DocTemplate/index.js

@@ -0,0 +1,198 @@
+import React, { useState, useEffect } from 'react';
+import { Form, Input, Button, Table, Modal, Row, Col } from 'antd';
+import '@common/common.less';
+import apiObj from '@api/index';
+import "moment/locale/zh-cn"
+const { post, api } = apiObj;
+function DocTemplate() {
+  useEffect(() => {
+	getDocTemplate();
+  }, []);
+  const [logList, setLogList] = useState([]);
+  const [total, setTotal] = useState(0);
+  const [size, setSize] = useState(15);
+  const [visible,setVisible] = useState(false);
+  const [current, setCurrent] = useState(1);
+  const [tmplInfo,setTmplInfo] = useState({});
+  const [params, setParams] = useState({
+	pages: 1,
+	current: 1,
+	size: 15
+  });
+  const [form] = Form.useForm();
+
+  let data = {
+	pages: 1,
+	current: 1,
+	size: size
+  }
+  //表格数据
+  function getDocTemplate(param) {
+	post(api.getRecordTemplatePage, param || params).then((res) => {
+	  if (res.data.code === 200) {
+		const data = res.data.data;
+		setLogList(data.records);
+		setTotal(data.total)
+	  }
+	})
+  }
+  //模板详情
+  function getTmplInfo(id) {
+	post(api.getRecordTemplateManage, {id}).then((res) => {
+	  if (res.data.code === 200) {
+		const data = res.data.data;
+		setTmplInfo(data);
+	  }
+	})
+  }
+  function onSizeChange(current, pageSize) {
+	params.current = current
+	params.size = pageSize
+	setSize(pageSize)
+	setCurrent(current)
+	setParams(params)
+	getDocTemplate()
+  }
+  function changePage(page, pageSize) {
+	params.current = page
+	params.size = pageSize
+	setParams(params)
+	setCurrent(page)
+	getDocTemplate()
+  }
+  //查看模板
+  function showModal(flag,id){
+	setVisible(flag);
+	if(flag){
+	  getTmplInfo(id);
+	}
+  }
+  const onFinish = (value) => {
+	const param = {
+	  ...data,
+	  ...value,
+	}
+	setCurrent(1)
+	setParams(param)
+	getDocTemplate(param);
+  };
+  const onReset = () => {
+	setCurrent(1)
+	setParams(data)
+	form.resetFields();
+	getDocTemplate(data);
+  };
+  const columns = [
+	{ title: '医院模板ID', dataIndex: 'code', key: 'code' },
+	{ title: '医院模板名称', dataIndex: 'name', key: 'name' },
+	{ title: '医院父类模板ID', dataIndex: 'parentCode', key: 'parentCode' },
+	{ title: '医院父类模板名称', dataIndex: 'parentName', key: 'parentName' },
+	{
+	  title: '操作', dataIndex: 'operation', key: 'operation', render: (text, record) =>{
+		console.log(22,text,record)
+		return <a className="showDetail" onClick={()=>showModal(true,record.id)}>查看</a>
+	  }
+	},
+  ]
+  return (
+	  <div className="wrapper">
+		<div className="filter-box">
+		  <Form
+			  form={form}
+			  name="normal_login"
+			  onFinish={onFinish}
+		  >
+			<Row gutter={24}>
+			  <Col span={5} key={0}>
+				<Form.Item label="医院模板ID" name="code">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={1}>
+				<Form.Item label="医院模板名称" name="name">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={2}>
+				<Form.Item label="医院父类模板ID" name="parentCode">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={4}>
+				<Form.Item label="医院父类模板名称" name="parentName">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={6} key={5}>
+				<Form.Item>
+				  <Button type="primary" htmlType="submit">
+					查询
+				  </Button>
+				  <Button onClick={onReset}>
+					重置
+				  </Button>
+				</Form.Item>
+			  </Col>
+			</Row>
+		  </Form>
+		</div>
+
+		<div className="table">
+		  <div className="table-header">
+			<h2 className="table-title">文书模板维护</h2>
+		  </div>
+
+		  <Table
+			  columns={columns}
+			  scroll={{ y: 'calc(100vh - 360px)' }}
+			  dataSource={logList}
+			  rowKey={record => record.id}
+			  pagination={{
+				pageSize: size,
+				size: 'small',
+				current: current,
+				showSizeChanger: true,
+				pageSizeOptions: ['15', '30', '60', '120'],
+				showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
+				onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
+				onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
+				total: total
+			  }} />
+		</div>
+		<Modal
+			destroyOnClose={true}
+			title="查看文书模板"
+			footer={[<Button key={1} type="primary" onClick={()=>showModal(false)}>
+			  关闭
+			</Button>]}
+			width={510}
+			visible={visible}
+			onCancel={()=>showModal(false)}
+			/*confirmLoading={confirmLoading}*/
+		>
+		  <div>
+			<table width='480' height="80">
+			  <tbody>
+				<tr>
+				  <td>医院模板ID:{tmplInfo.code}</td>
+				  <td>医院模板名称:{tmplInfo.name}</td>
+				</tr>
+				<tr>
+				  <td>医院父类模板ID:{tmplInfo.parentCode}</td>
+				  <td>医院父类模板名称:{tmplInfo.parentName}</td>
+				</tr>
+				<tr>
+				  <td colSpan={2}>模板内容:<span style={{'wordBreak': 'break-all',
+					'display': 'inline-block',
+					'width': '405px',
+					'verticalAlign': 'text-top'}}>{tmplInfo.content}</span></td>
+				</tr>
+			  </tbody>
+			</table>
+		  </div>
+		</Modal>
+	  </div >
+  )
+}
+
+export default DocTemplate;

+ 223 - 0
src/components/DutyRecord/index.js

@@ -0,0 +1,223 @@
+import React, { useState, useEffect, useRef } from 'react';
+import { Form, Input, Button, Table, Pagination, Row, Col, Select, Modal,DatePicker } from 'antd';
+import '@common/common.less';
+import apiObj from '@api/index';
+import moment from "moment";
+import "moment/locale/zh-cn"
+import {message} from "antd/lib/index";
+const { post, api, xPost } = apiObj;
+const { RangePicker } = DatePicker;
+const { Option } = Select;
+function DutyRecord() {
+  useEffect(() => {
+	getDutyRecord();
+  }, []);
+  const [logList, setLogList] = useState([]);
+  const [total, setTotal] = useState(0);
+  const [visible, setVisible] = useState(false);
+  const [size, setSize] = useState(15);
+  const [current, setCurrent] = useState(1);
+  const [selectedRowKeys, setSelectedRowKeys] = useState([]);
+  const [params, setParams] = useState({
+	pages: 1,
+	current: 1,
+	size: 15
+  });
+  const [form] = Form.useForm();
+  const typeMap = {
+    '1':'职务变更',
+	'2':'职称变更'
+  };
+  let data = {
+	pages: 1,
+	current: 1,
+	size: size
+  }
+  //表格数据
+  function getDutyRecord(param) {
+	post(api.getOfficialCapacityPage, param || params).then((res) => {
+	  if (res.data.code === 200) {
+		const data = res.data.data;
+		setLogList(data.records);
+		setTotal(data.total)
+	  }
+	})
+  }
+  //删除记录
+  function delRecord(){
+	post(api.delOfficialCapacityPage, {id:selectedRowKeys}).then((res) => {
+	  if (res.data.code === 200) {
+		const data = res.data.data;
+		setLogList(data.records);
+		setTotal(data.total)
+	  }
+	})
+	showDelModal(false);
+  }
+  //删除弹窗确认
+  function showDelModal(flag){
+    if(flag&&!selectedRowKeys.length){
+	  message.warning("请先选择要删除的记录~",1);
+	  return;
+	}
+	setVisible(flag)
+  }
+
+  function onSizeChange(current, pageSize) {
+	params.current = current
+	params.size = pageSize
+	setSize(pageSize)
+	setCurrent(current)
+	setParams(params)
+	getDutyRecord()
+  }
+  function changePage(page, pageSize) {
+	params.current = page
+	params.size = pageSize
+	setParams(params)
+	setCurrent(page)
+	getDutyRecord()
+  }
+	function onTypeChange(){
+
+	}
+  function onSelectChange(selectedRowKeys){
+	setSelectedRowKeys(selectedRowKeys);
+  };
+  const onFinish = (value) => {
+	if (value.changeTime){
+	  value.changeTimeStart = moment(value.changeTime[0]).format('YYYY-MM-DD 00:00:00')
+	  value.changeTimeEnd = moment(value.changeTime[1]).format('YYYY-MM-DD 23:23:59')
+	}
+	const param = {
+	  ...data,
+	  ...value,
+	}
+	setCurrent(1)
+	setParams(param)
+	getDutyRecord(param);
+  };
+  const onReset = () => {
+	setCurrent(1)
+	setParams(data)
+	form.resetFields();
+	getDutyRecord(data);
+  };
+  const columns = [
+	{ title: '医生姓名', dataIndex: 'doctorName', key: 'doctorName' },
+	{ title: '科室', dataIndex: 'deptName', key: 'deptName' },
+	{ title: '工号', dataIndex: 'doctorCode', key: 'doctorCode' },
+	{ title: '变更时间', dataIndex: 'changeTime', key: 'changeTime' },
+	{ title: '职务/职称名称', dataIndex: 'name', key: 'name' },
+	{ title: '变更类型', dataIndex: 'type', key: 'type',render:(text,record)=>{
+	  return typeMap[record.type];
+  } },
+  ];
+  const rowSelection = {
+	selectedRowKeys,
+	onChange: onSelectChange,
+  };
+  return (
+	  <div className="wrapper">
+		<div className="filter-box">
+		  <Form
+			  form={form}
+			  name="normal_login"
+			  onFinish={onFinish}
+		  >
+			<Row gutter={24}>
+			  <Col span={5} key={0}>
+				<Form.Item label="医生姓名" name="doctorName">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={1}>
+				<Form.Item label="科室" name="deptName">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={2}>
+				<Form.Item label="工号" name="doctorCode">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={3}>
+				<Form.Item label="职务/职称名称" name="name">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={4}>
+				<Form.Item label="变更类型" name="type">
+				  <Select
+					  placeholder="请选择"
+					  onChange={onTypeChange}
+					  allowClear
+				  >
+					<Option value="0" key={0}>全部</Option>
+					<Option value="1" key={1}>{typeMap['1']}</Option>
+					<Option value="2" key={2}>{typeMap['2']}</Option>
+				  </Select>
+				</Form.Item>
+			  </Col>
+			  <Col span={7} key={5}>
+				<Form.Item label="变更时间" name="changeTime">
+				  <RangePicker
+					  placeholder={['开始时间', '结束时间']}
+				  />
+				</Form.Item>
+			  </Col>
+			  <Col span={6} key={6}>
+				<Form.Item>
+				  <Button type="primary" htmlType="submit">
+					查询
+				  </Button>
+				  <Button onClick={onReset}>
+					重置
+				  </Button>
+				</Form.Item>
+			  </Col>
+			</Row>
+		  </Form>
+		</div>
+
+		<div className="table">
+		  <div className="table-header">
+			<h2 className="table-title">职务职称变更记录</h2>
+			<Button type="primary" onClick={()=>showDelModal(true)}>删除</Button>
+		  </div>
+
+		  <Table
+			  columns={columns}
+			  rowSelection={rowSelection}
+			  scroll={{ y: 'calc(100vh - 360px)' }}
+			  dataSource={logList}
+			  rowKey={(record,i) => i}
+			  pagination={{
+				pageSize: size,
+				size: 'small',
+				current: current,
+				showSizeChanger: true,
+				pageSizeOptions: ['15', '30', '60', '120'],
+				showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
+				onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
+				onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
+				total: total
+			  }} />
+		</div>
+		<Modal
+			title="删除职务职称变更记录"
+			okText='确定'
+			cancelText='取消'
+			width={400}
+			visible={visible}
+			onOk={delRecord}
+			/*confirmLoading={confirmLoading}*/
+			onCancel={()=>showDelModal(false)}
+		>
+		  <p>职务职称变更记录删除后将无法恢复,确认删除这{selectedRowKeys.length}条变更记录?</p>
+		</Modal>
+	  </div >
+  )
+}
+
+export default DutyRecord;

+ 194 - 0
src/components/MedicalTeam/index.js

@@ -0,0 +1,194 @@
+import React, { useState, useEffect, useRef } from 'react';
+import { Form, Input, Button, Table, Pagination, Row, Col, Tooltip, DatePicker } from 'antd';
+import '@common/common.less';
+import apiObj from '@api/index';
+import moment from "moment";
+import "moment/locale/zh-cn"
+const { post, api, xPost } = apiObj;
+const { RangePicker } = DatePicker;
+function MedicalTeam() {
+  useEffect(() => {
+	getOperationLog();
+  }, []);
+  const [logList, setLogList] = useState([]);
+  const [total, setTotal] = useState(0);
+  const [size, setSize] = useState(15);
+  const [current, setCurrent] = useState(1);
+  const [selectedRowKeys, setSelectedRowKeys] = useState([]);
+  const [params, setParams] = useState({
+	pages: 1,
+	current: 1,
+	size: 15
+  });
+  const [form] = Form.useForm();
+
+  let list = []
+  let data = {
+	pages: 1,
+	current: 1,
+	size: size
+  }
+  //表格数据
+  function getOperationLog(param) {
+	post(api.getOperationLog, param || params).then((res) => {
+	  if (res.data.code === 200) {
+		const data = res.data.data;
+		setLogList(data.records);
+		setTotal(data.total)
+	  }
+	})
+  }
+  function onSizeChange(current, pageSize) {
+	params.current = current
+	params.size = pageSize
+	setSize(pageSize)
+	setCurrent(current)
+	setParams(params)
+	getOperationLog()
+  }
+  function changePage(page, pageSize) {
+	params.current = page
+	params.size = pageSize
+	setParams(params)
+	setCurrent(page)
+	getOperationLog()
+  }
+
+  function onSelectChange(selectedRowKeys){
+	console.log('selectedRowKeys changed: ', selectedRowKeys);
+	setSelectedRowKeys(selectedRowKeys);
+  };
+
+  function onEdit(){
+
+  }
+  function onForbidden(){
+
+  }
+  function onDelete(){
+
+  }
+
+  const onFinish = (value) => {
+	if (value.time){
+	  value.startDate = moment(value.time[0]).format('YYYY-MM-DD')
+	  value.endDate = moment(value.time[1]).format('YYYY-MM-DD')
+	}
+	const param = {
+	  ...data,
+	  ...value,
+	}
+	setCurrent(1)
+	setParams(param)
+	getOperationLog(param);
+  };
+  const onReset = () => {
+	setCurrent(1)
+	setParams(data)
+	form.resetFields();
+	getOperationLog(data);
+  };
+  const columns = [
+	{ title: '医疗组ID', dataIndex: 'operationId', key: 'index' },
+	{ title: '医疗组名称', dataIndex: 'operationName', key: 'index' },
+	{ title: '上级科室', dataIndex: 'operationDate', key: 'index' },
+	{ title: '上级病区', dataIndex: 'operationIp', key: 'index' },
+	{ title: '关联医生', dataIndex: 'operationDate', key: 'index' },
+	{ title: '状态', dataIndex: 'operationIp', key: 'index' },
+	{title: '操作', dataIndex: 'operation', key: 'operation', render: (text, record) =>{
+		console.log(22,text,record)
+		return <div className='operation'>
+		  			<a className="showDetail" onClick={onEdit}>修改</a>
+				  <a className="showDetail" onClick={onForbidden}>禁用</a>
+				  <a className="showDetail" onClick={onDelete}>删除</a>
+				</div>
+	  }},
+  ];
+  const rowSelection = {
+	selectedRowKeys,
+	onChange: onSelectChange,
+  };
+  return (
+	  <div className="wrapper">
+		<div className="filter-box">
+		  <Form
+			  form={form}
+			  name="normal_login"
+			  onFinish={onFinish}
+			  initialValues={{ status: '' }}
+		  >
+			<Row gutter={24}>
+			  <Col span={5} key={0}>
+				<Form.Item label="医疗组ID" name="operationName">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={1}>
+				<Form.Item label="医疗组名称" name="operationName">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={2}>
+				<Form.Item label="上级科室" name="operationName">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={3}>
+				<Form.Item label="上级病区" name="operationName">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={5} key={4}>
+				<Form.Item label="关联医生" name="operationName">
+				  <Input placeholder="请输入" autoComplete='off'/>
+				</Form.Item>
+			  </Col>
+			  <Col span={7} key={5}>
+				<Form.Item label="状态" name="operationName">
+				  <RangePicker
+					  placeholder={['开始时间', '结束时间']}
+				  />
+				</Form.Item>
+			  </Col>
+			  <Col span={6} key={6}>
+				<Form.Item>
+				  <Button type="primary" htmlType="submit">
+					查询
+				  </Button>
+				  <Button onClick={onReset}>
+					重置
+				  </Button>
+				</Form.Item>
+			  </Col>
+			</Row>
+		  </Form>
+		</div>
+
+		<div className="table">
+		  <div className="table-header">
+			<h2 className="table-title">医疗组管理</h2>
+		  </div>
+
+		  <Table
+			  columns={columns}
+			  rowSelection={rowSelection}
+			  scroll={{ y: 'calc(100vh - 360px)' }}
+			  dataSource={logList}
+			  rowKey={record => record.id}
+			  pagination={{
+				pageSize: size,
+				size: 'small',
+				current: current,
+				showSizeChanger: true,
+				pageSizeOptions: ['15', '30', '60', '120'],
+				showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
+				onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
+				onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
+				total: total
+			  }} />
+		</div>
+	  </div >
+  )
+}
+
+export default MedicalTeam;