|
@@ -7,9 +7,11 @@ import cancelTag from '@common/images/icon_back.png';
|
|
|
import PrintPreviewContainer from '@containers/PrintPreviewContainer';
|
|
|
import PreviewContainer from '@containers/PreviewContainer';
|
|
|
import { ConfirmModal, Notify } from '@commonComp';
|
|
|
+import Search from './Search';
|
|
|
import check_circle from './img/check-circle.png';
|
|
|
import check_right from './img/check-right.png';
|
|
|
import {getAllDataList,getAllDataStringList,isAllPartClear,isAllClear,filterDataArr,readyKeepHistory} from '@utils/tools';
|
|
|
+
|
|
|
import {dragBox} from '@utils/drag';
|
|
|
import store from '@store';
|
|
|
import $ from 'jquery';
|
|
@@ -28,6 +30,8 @@ class Operation extends Component {
|
|
|
zIndex:40,
|
|
|
sex:'3',
|
|
|
le:'',
|
|
|
+ deptId:'',//科室id
|
|
|
+ value:''
|
|
|
}
|
|
|
this.showPrint = this.showPrint.bind(this);
|
|
|
this.closePrint = this.closePrint.bind(this);
|
|
@@ -37,6 +41,7 @@ class Operation extends Component {
|
|
|
this.clearAll = this.clearAll.bind(this);
|
|
|
this.saveHis = this.saveHis.bind(this);
|
|
|
this.keypress = this.keypress.bind(this);
|
|
|
+ this.setDeptId = this.setDeptId.bind(this);
|
|
|
}
|
|
|
|
|
|
showPrint() {
|
|
@@ -87,7 +92,6 @@ class Operation extends Component {
|
|
|
oKBg: '#3B9ED0',
|
|
|
msg: <p className={style['msg']}>是否保存该病历?</p>
|
|
|
})
|
|
|
-
|
|
|
this.props.diagShowTmp(true)
|
|
|
}
|
|
|
}
|
|
@@ -177,25 +181,33 @@ class Operation extends Component {
|
|
|
return true;
|
|
|
}
|
|
|
changeTitle() {
|
|
|
+ const {handleChangeValue} = this.props;
|
|
|
return <div className={style['box']}>
|
|
|
- <input className={style['ipt']}
|
|
|
- placeholder="请输入模板名称"
|
|
|
- type="text"
|
|
|
- maxLength='30'
|
|
|
- onInput={(e) => {
|
|
|
- this.handleInput(e)
|
|
|
- }}
|
|
|
- onPropertyChange={(e) => { // 兼容ie
|
|
|
- this.handleInput(e)
|
|
|
- }}
|
|
|
- onKeyPress={e => this.keypress(e)}
|
|
|
- />
|
|
|
- <div className={style['line']}></div>
|
|
|
+ {/* <div className={style.titleTip}></div> */}
|
|
|
<div className={style['iptWrap']}>
|
|
|
- <p>请选择模板性别归属(错误引用,显示可能有误)</p>
|
|
|
- <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>
|
|
|
+ <div className={style.name}>
|
|
|
+ <span>模版名称:</span>
|
|
|
+ <input className={style['ipt']}
|
|
|
+ placeholder="请输入模板名称"
|
|
|
+ type="text"
|
|
|
+ maxLength='30'
|
|
|
+ onInput={(e) => {
|
|
|
+ this.handleInput(e)
|
|
|
+ }}
|
|
|
+ onPropertyChange={(e) => { // 兼容ie
|
|
|
+ this.handleInput(e)
|
|
|
+ }}
|
|
|
+ onKeyPress={e => this.keypress(e)}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div className={style.male}>
|
|
|
+ <span>性别归属:</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>
|
|
|
+ {/* <p>请选择模板性别归属(错误引用,显示可能有误)</p> */}
|
|
|
</div>
|
|
|
</div>
|
|
|
}
|
|
@@ -227,8 +239,8 @@ class Operation extends Component {
|
|
|
}
|
|
|
}
|
|
|
makeSure() {
|
|
|
- const { save, clear, saveDataAll,diagShowTmp ,chronicMagItem,chronicDesease} = this.props;
|
|
|
- const { type } = this.state;
|
|
|
+ const { save, clear, saveDataAll,diagShowTmp ,chronicMagItem,chronicDesease,admin} = this.props;
|
|
|
+ const { type,deptId,sex,title } = this.state;
|
|
|
if (type == 1) {
|
|
|
diagShowTmp(false)
|
|
|
this.setState({ title: '' })
|
|
@@ -248,8 +260,15 @@ class Operation extends Component {
|
|
|
if (this.state.title.trim() == '') {
|
|
|
Notify.error('请输入模板名称')
|
|
|
return;
|
|
|
+ }else if(admin&&deptId == ''){
|
|
|
+ Notify.error('请选择科室')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(admin){
|
|
|
+ saveDataAlls(title,sex,deptId);
|
|
|
+ }else{
|
|
|
+ saveDataAll(title,sex);
|
|
|
}
|
|
|
- saveDataAll(this.state.title,this.state.sex);
|
|
|
}
|
|
|
}
|
|
|
closeDiagBox(){
|
|
@@ -263,6 +282,13 @@ class Operation extends Component {
|
|
|
this.setState({ title: '' })
|
|
|
}
|
|
|
}
|
|
|
+ setDeptId(id,name){
|
|
|
+ this.props.handleClearValue()
|
|
|
+ this.setState({
|
|
|
+ deptId :id,
|
|
|
+ value:name
|
|
|
+ })
|
|
|
+ }
|
|
|
componentWillReceiveProps(next){//监听滚动事件
|
|
|
const that = this;
|
|
|
if(next.winWidth <= 1024){
|
|
@@ -285,8 +311,8 @@ class Operation extends Component {
|
|
|
render() {
|
|
|
const { showPrint, closePrint, showPreview, closePreview } = this;
|
|
|
const { visible, preVisible,diagShow } = this.props.print;
|
|
|
- const {winWidth,cancelDelTag} = this.props;
|
|
|
- const {zIndex,type,le} = this.state;
|
|
|
+ const {winWidth,cancelDelTag,departLis,handleChangeValue,admin} = this.props;
|
|
|
+ const {zIndex,type,le,value} = this.state;
|
|
|
return <div className={style['container']} style={{left:le}}>
|
|
|
<span className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</span>
|
|
|
<span className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</span>
|
|
@@ -304,12 +330,31 @@ class Operation extends Component {
|
|
|
cancel={() => {this.closeDiagBox()}}
|
|
|
okText={this.state.okText}
|
|
|
height={type==3?228:200}
|
|
|
- width={type==3?400:300}
|
|
|
+ width={type==3?545:300}
|
|
|
okBorderColor={this.state.borderColor}
|
|
|
okColor={this.state.okColor}
|
|
|
oKBg={this.state.oKBg}
|
|
|
+ borderBtm={type==3?'1px solid #f5f5f5':null}
|
|
|
+ title={type==3?'保存病历模板':null}
|
|
|
>
|
|
|
{this.state.msg}
|
|
|
+ {
|
|
|
+ admin&&type==3?<div className={style.department}>
|
|
|
+ <span>科室归属:</span>
|
|
|
+ <Search handleChangeValue={handleChangeValue} value={value} visible={true}>
|
|
|
+ <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>:null
|
|
|
+ }
|
|
|
</ConfirmModal>
|
|
|
</div>;
|
|
|
}
|