|
@@ -1,8 +1,8 @@
|
|
import React, { Component } from 'react';
|
|
import React, { Component } from 'react';
|
|
import style from './index.less';
|
|
import style from './index.less';
|
|
import { Tab, ConfirmModal, Notify } from '@commonComp';
|
|
import { Tab, ConfirmModal, Notify } from '@commonComp';
|
|
-import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow,allCheckedAdmin,allCheckedShowAdmin,whichTemp,floderSlide,floderAction,folderModal,clearSearchTemplateNorms,folderOrder } from '@store/actions/tabTemplate';
|
|
|
|
-import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin,getFloderList,delFloder,addTemplateQuote,newFloder,findTemplateNorms,getFloderListAll } from '@store/async-actions/tabTemplate';
|
|
|
|
|
|
+import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow,allCheckedAdmin,allCheckedShowAdmin,whichTemp,floderSlide,floderAction,folderModal,clearSearchTemplateNorms,folderOrder,getDptLis } from '@store/actions/tabTemplate';
|
|
|
|
+import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin,getFloderList,delFloder,addTemplateQuote,newFloder,findTemplateNorms,getFloderListAll,getDepartments } from '@store/async-actions/tabTemplate';
|
|
import { connect } from "react-redux";
|
|
import { connect } from "react-redux";
|
|
import store from '@store';
|
|
import store from '@store';
|
|
import { billing } from '@store/async-actions/pushMessage';
|
|
import { billing } from '@store/async-actions/pushMessage';
|
|
@@ -13,8 +13,12 @@ import { pushAllDataList, getWindowInnerHeight, didPushParamChange } from '@util
|
|
import CopyRightContainer from "@containers/CopyRightContainer";
|
|
import CopyRightContainer from "@containers/CopyRightContainer";
|
|
import MedicalInfoContainer from '@containers/MedicalInfoContainer';
|
|
import MedicalInfoContainer from '@containers/MedicalInfoContainer';
|
|
import FolderName from '@components/FolderName';
|
|
import FolderName from '@components/FolderName';
|
|
|
|
+// import Search from './../Operation/Search';
|
|
|
|
+import Search from './Search';
|
|
import slideDown from '@common/images/slideDown.png';
|
|
import slideDown from '@common/images/slideDown.png';
|
|
import CaseQuailty from "../CaseQuailty";
|
|
import CaseQuailty from "../CaseQuailty";
|
|
|
|
+import check_circle from './img/check-circle.png';
|
|
|
|
+import check_right from './img/check-right.png';
|
|
import pinyin from '@utils/Convert_Pinyin.js';
|
|
import pinyin from '@utils/Convert_Pinyin.js';
|
|
import $ from "jquery";
|
|
import $ from "jquery";
|
|
|
|
|
|
@@ -48,7 +52,8 @@ class PushContainer extends Component {
|
|
okColor: 'red',
|
|
okColor: 'red',
|
|
num: 0, //计数
|
|
num: 0, //计数
|
|
deptId:'', //科室id
|
|
deptId:'', //科室id
|
|
-
|
|
|
|
|
|
+ value:'',//科室name
|
|
|
|
+ sex:'3',
|
|
floderName:'', //文件夹名称
|
|
floderName:'', //文件夹名称
|
|
folderListShow:false,
|
|
folderListShow:false,
|
|
folderNameVal:'',
|
|
folderNameVal:'',
|
|
@@ -56,7 +61,9 @@ class PushContainer extends Component {
|
|
spell:'',
|
|
spell:'',
|
|
fstName:'',
|
|
fstName:'',
|
|
tmpFolder:'',
|
|
tmpFolder:'',
|
|
- hasCalcIndex: false
|
|
|
|
|
|
+ hasCalcIndex: false,
|
|
|
|
+ hospitalDeptName:''
|
|
|
|
+
|
|
}
|
|
}
|
|
this.$cont = React.createRef();
|
|
this.$cont = React.createRef();
|
|
this.itemList = null;
|
|
this.itemList = null;
|
|
@@ -80,6 +87,10 @@ class PushContainer extends Component {
|
|
this.setFolderId = this.setFolderId.bind(this);
|
|
this.setFolderId = this.setFolderId.bind(this);
|
|
this.floderDelete = this.floderDelete.bind(this);
|
|
this.floderDelete = this.floderDelete.bind(this);
|
|
this.folderManage = this.folderManage.bind(this);
|
|
this.folderManage = this.folderManage.bind(this);
|
|
|
|
+ this.changeRadio = this.changeRadio.bind(this);
|
|
|
|
+ this.handleChangeIpt = this.handleChangeIpt.bind(this);
|
|
|
|
+ this.setDeptId = this.setDeptId.bind(this);
|
|
|
|
+ this.handleClearValue = this.handleClearValue.bind(this);
|
|
}
|
|
}
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
// const height = getWindowInnerHeight()-160;
|
|
// const height = getWindowInnerHeight()-160;
|
|
@@ -250,7 +261,7 @@ class PushContainer extends Component {
|
|
* 改变模板标题
|
|
* 改变模板标题
|
|
* @param {模板id和模板title} obj
|
|
* @param {模板id和模板title} obj
|
|
*/
|
|
*/
|
|
- handleTitleChange(id, text,deptId,folderId,spell,folderName) {
|
|
|
|
|
|
+ handleTitleChange(id, text,deptId,folderId,spell,folderName,sex,hospitalDeptName) {
|
|
store.dispatch(changeVisible(true))
|
|
store.dispatch(changeVisible(true))
|
|
this.props.admin&&store.dispatch(getFloderList())
|
|
this.props.admin&&store.dispatch(getFloderList())
|
|
this.setState({
|
|
this.setState({
|
|
@@ -265,9 +276,12 @@ class PushContainer extends Component {
|
|
okColor: '#fff',
|
|
okColor: '#fff',
|
|
oKBg: '#3B9ED0',
|
|
oKBg: '#3B9ED0',
|
|
folderId:folderId,
|
|
folderId:folderId,
|
|
|
|
+ sex: sex,
|
|
spell:spell,
|
|
spell:spell,
|
|
folderNameVal:folderName,
|
|
folderNameVal:folderName,
|
|
tmpFolder:folderName,
|
|
tmpFolder:folderName,
|
|
|
|
+ value:hospitalDeptName
|
|
|
|
+
|
|
}, () => {
|
|
}, () => {
|
|
this.setState({
|
|
this.setState({
|
|
message: this.changeTitle(),
|
|
message: this.changeTitle(),
|
|
@@ -375,10 +389,36 @@ class PushContainer extends Component {
|
|
// store.dispatch(delFloder(id))
|
|
// store.dispatch(delFloder(id))
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ changeRadio(sex){
|
|
|
|
+ if(sex == 1){
|
|
|
|
+ $('#commonSex img').attr('src',check_right)
|
|
|
|
+ $('#maleSex img').attr('src',check_circle)
|
|
|
|
+ $('#femaleSex img').attr('src',check_circle)
|
|
|
|
+ $('#commonSex i').css('color','#000')
|
|
|
|
+ $('#maleSex i').css('color','#6b6969')
|
|
|
|
+ $('#femaleSex i').css('color','#6b6969')
|
|
|
|
+ this.setState({sex:'3'})
|
|
|
|
+ }else if(sex == 2){
|
|
|
|
+ $('#commonSex img').attr('src',check_circle)
|
|
|
|
+ $('#maleSex img').attr('src',check_right)
|
|
|
|
+ $('#femaleSex img').attr('src',check_circle)
|
|
|
|
+ $('#commonSex i').css('color','#6b6969')
|
|
|
|
+ $('#maleSex i').css('color','#000')
|
|
|
|
+ $('#femaleSex i').css('color','#6b6969')
|
|
|
|
+ this.setState({sex:'1'})
|
|
|
|
+ }else if(sex == 3){
|
|
|
|
+ $('#commonSex img').attr('src',check_circle)
|
|
|
|
+ $('#maleSex img').attr('src',check_circle)
|
|
|
|
+ $('#femaleSex img').attr('src',check_right)
|
|
|
|
+ $('#commonSex i').css('color','#6b6969')
|
|
|
|
+ $('#maleSex i').css('color','#6b6969')
|
|
|
|
+ $('#femaleSex i').css('color','#000')
|
|
|
|
+ this.setState({sex:'2'})
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
makeSure() {
|
|
makeSure() {
|
|
- const {type,id,title,tmpFolder,folderNameVal,text,fstName,spell,currId,deptId,folderId,floderName} = this.state
|
|
|
|
|
|
+ const {type,id,title,tmpFolder,folderNameVal,text,fstName,spell,currId,deptId,folderId,floderName,sex,hospitalDeptName} = this.state
|
|
if (type == 1) {
|
|
if (type == 1) {
|
|
if(this.props.admin){
|
|
if(this.props.admin){
|
|
store.dispatch(delItemAdmin(id,folderId))
|
|
store.dispatch(delItemAdmin(id,folderId))
|
|
@@ -394,11 +434,11 @@ class PushContainer extends Component {
|
|
}
|
|
}
|
|
store.dispatch(changeVisible(false))
|
|
store.dispatch(changeVisible(false))
|
|
} else if (type == 3) {
|
|
} else if (type == 3) {
|
|
- if (title == text &&tmpFolder==folderNameVal&&fstName==spell) {
|
|
|
|
- store.dispatch(changeVisible(false))
|
|
|
|
- Notify.success('标题修改成功');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
+ // if (title == text &&tmpFolder==folderNameVal&&fstName==spell&&deptId) {
|
|
|
|
+ // store.dispatch(changeVisible(false))
|
|
|
|
+ // Notify.success('标题修改成功');
|
|
|
|
+ // return;
|
|
|
|
+ // }
|
|
if (title.trim() == '') {
|
|
if (title.trim() == '') {
|
|
Notify.info('请输入模板名称');
|
|
Notify.info('请输入模板名称');
|
|
return;
|
|
return;
|
|
@@ -409,7 +449,9 @@ class PushContainer extends Component {
|
|
deptId:deptId,
|
|
deptId:deptId,
|
|
folderId:folderId,
|
|
folderId:folderId,
|
|
folderName:folderNameVal,
|
|
folderName:folderNameVal,
|
|
- spell:fstName
|
|
|
|
|
|
+ spell:fstName,
|
|
|
|
+ sex: sex,
|
|
|
|
+ hospitalDeptName:hospitalDeptName
|
|
}
|
|
}
|
|
if(this.props.admin){
|
|
if(this.props.admin){
|
|
store.dispatch(changeTitleAsyncAdmin(tempObj))
|
|
store.dispatch(changeTitleAsyncAdmin(tempObj))
|
|
@@ -491,9 +533,34 @@ class PushContainer extends Component {
|
|
folderManage(flg) {
|
|
folderManage(flg) {
|
|
store.dispatch(folderOrder(flg))
|
|
store.dispatch(folderOrder(flg))
|
|
}
|
|
}
|
|
|
|
+ handleChangeValue(val) {
|
|
|
|
+ val && store.dispatch(getDepartments(val))
|
|
|
|
+ }
|
|
|
|
+ handleChangeIpt(val){//搜索科室
|
|
|
|
+ if(val == ''){
|
|
|
|
+ this.setState({
|
|
|
|
+ deptId:'',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.setState({
|
|
|
|
+ value:val
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ setDeptId(id,name){
|
|
|
|
+ this.handleClearValue()
|
|
|
|
+ this.setState({
|
|
|
|
+ deptId :id,
|
|
|
|
+ value:name
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ handleClearValue () {
|
|
|
|
+ store.dispatch(getDptLis([]))
|
|
|
|
+ }
|
|
render() {
|
|
render() {
|
|
- const { activeId, checkItems,selectTemp,folderListContentArr, visible, showMsg,hasMore,current,floderListAdmin, items, allCheckShow,allCheckShowAdmin,adminItems,admin,checkItemsAdmin,clearSearch, templateNormsSearchList} = this.props;
|
|
|
|
- const { type,okBorderColor,okColor,oKBg,okText,message,folderListShow } = this.state
|
|
|
|
|
|
+ const { activeId, checkItems,selectTemp,folderListContentArr, visible, showMsg,hasMore,current,floderListAdmin, items, allCheckShow,allCheckShowAdmin,adminItems,admin,checkItemsAdmin,clearSearch, templateNormsSearchList, departLis} = this.props;
|
|
|
|
+ const { type,okBorderColor,okColor,oKBg,okText,message,folderListShow,value } = this.state
|
|
|
|
+ const { handleChangeValue, handleChangeIpt} = this
|
|
return <div className={style["container"]} ref={this.$cont} >
|
|
return <div className={style["container"]} ref={this.$cont} >
|
|
<Tab tabs={this.state.tabs}
|
|
<Tab tabs={this.state.tabs}
|
|
activeId={activeId}
|
|
activeId={activeId}
|
|
@@ -552,33 +619,64 @@ class PushContainer extends Component {
|
|
>
|
|
>
|
|
{message}
|
|
{message}
|
|
{
|
|
{
|
|
- admin&&type==3?<div className={style.department}>
|
|
|
|
- <span className={style.leftName}>存储为:</span>
|
|
|
|
- <div className={style.selectFolder} onClick={(e) => {
|
|
|
|
- this.handleFolderShow(e)
|
|
|
|
- }}>
|
|
|
|
- <input className={style.selectFolderIpt}
|
|
|
|
- type="text"
|
|
|
|
- maxLength='20'
|
|
|
|
- readOnly
|
|
|
|
- value={this.state.folderNameVal}
|
|
|
|
-
|
|
|
|
- />
|
|
|
|
- <img src={slideDown} alt=""/>
|
|
|
|
|
|
+ admin&&type==3?<div>
|
|
|
|
+ <div className={style.iptWrap}>
|
|
|
|
+ <div className={style.male}>
|
|
|
|
+ <span className={style.leftName}>性别归属:</span>
|
|
|
|
+ <span className={style['commonSex']} id="commonSex" onClick={this.changeRadio.bind(this,1)}><img src={check_right} alt=""/><i style={{color:'#000'}}>通用</i></span>
|
|
|
|
+ <span id="maleSex" onClick={this.changeRadio.bind(this,2)}><img src={check_circle} alt=""/><i>男</i></span>
|
|
|
|
+ <span id="femaleSex" onClick={this.changeRadio.bind(this,3)}><img src={check_circle} alt=""/><i>女</i></span>
|
|
|
|
+ <span style={{paddingRight:0,color:'#777777'}}>(注:错误引用,显示可能有误)</span>
|
|
</div>
|
|
</div>
|
|
- {
|
|
|
|
- floderListAdmin.length>0&&folderListShow&&<ul className={`${style.departLis} ${style.departLisFolder}`}>
|
|
|
|
- {
|
|
|
|
- floderListAdmin.map((item,idx)=>{
|
|
|
|
- return <li onClick={()=>this.setFolderId(item.id,item.name)}>
|
|
|
|
- {item.name}
|
|
|
|
- </li>
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- </ul>
|
|
|
|
- }
|
|
|
|
- <span className={style.newFolder} onClick={()=>this.newFolder(true)}>新建文件夹</span>
|
|
|
|
- <span className={style.mangerFolder} onClick={()=>this.folderManage(true)}>管理文件夹</span>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <div className={style.department}>
|
|
|
|
+ <span className={style.leftName}>科室归属:</span>
|
|
|
|
+ <Search handleChangeValue={handleChangeValue} handleChangeIpt={handleChangeIpt} value={value} visible={true} zIndex={11}>
|
|
|
|
+ {
|
|
|
|
+ departLis.length>0&&value&&<ul className={style.departLis}>
|
|
|
|
+ {
|
|
|
|
+ departLis.map((item,idx)=>{
|
|
|
|
+ return <li onClick={()=>this.setDeptId(item.id,item.conceptDeptName)}>
|
|
|
|
+ {item.conceptDeptName}
|
|
|
|
+ </li>
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ </ul>
|
|
|
|
+ }
|
|
|
|
+ </Search>
|
|
|
|
+ <span style={{paddingRight:0,color:'#777777'}}>(支持汉字关键字搜索)</span>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <div className={style.department}>
|
|
|
|
+ <span className={style.leftName}>存储为:</span>
|
|
|
|
+ <div className={style.selectFolder} onClick={(e) => {
|
|
|
|
+ this.handleFolderShow(e)
|
|
|
|
+ }}>
|
|
|
|
+ <input className={style.selectFolderIpt}
|
|
|
|
+ type="text"
|
|
|
|
+ maxLength='20'
|
|
|
|
+ readOnly
|
|
|
|
+ value={this.state.folderNameVal}
|
|
|
|
+
|
|
|
|
+ />
|
|
|
|
+ <img src={slideDown} alt=""/>
|
|
|
|
+ {
|
|
|
|
+ floderListAdmin.length>0&&folderListShow&&<ul className={`${style.departLis} ${style.departLisFolder}`}>
|
|
|
|
+ {
|
|
|
|
+ floderListAdmin.map((item,idx)=>{
|
|
|
|
+ return <li onClick={()=>this.setFolderId(item.id,item.name)}>
|
|
|
|
+ {item.name}
|
|
|
|
+ </li>
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ </ul>
|
|
|
|
+ }
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <span className={style.newFolder} onClick={()=>this.newFolder(true)}>新建文件夹</span>
|
|
|
|
+ <span className={style.mangerFolder} onClick={()=>this.folderManage(true)}>管理文件夹</span>
|
|
|
|
+ </div>
|
|
</div>:null
|
|
</div>:null
|
|
}
|
|
}
|
|
</ConfirmModal>
|
|
</ConfirmModal>
|
|
@@ -605,7 +703,7 @@ const mapStateToProps = (state) => {//console.log(state)
|
|
allCheckShowAdmin: state.tabTemplate.allCheckShowAdmin,
|
|
allCheckShowAdmin: state.tabTemplate.allCheckShowAdmin,
|
|
checkItemsAdmin: state.tabTemplate.checkItemsAdmin,
|
|
checkItemsAdmin: state.tabTemplate.checkItemsAdmin,
|
|
clearSearch:state.print.clearSearch,
|
|
clearSearch:state.print.clearSearch,
|
|
-
|
|
|
|
|
|
+ departLis: state.tabTemplate.departLis,
|
|
selectTemp:state.tabTemplate.selectTemp,
|
|
selectTemp:state.tabTemplate.selectTemp,
|
|
floderListAdmin:state.tabTemplate.floderListAdmin,
|
|
floderListAdmin:state.tabTemplate.floderListAdmin,
|
|
folderListContentArr:state.tabTemplate.folderListContentArr,
|
|
folderListContentArr:state.tabTemplate.folderListContentArr,
|