|
@@ -42,6 +42,7 @@ class Operation extends Component {
|
|
folderNameVal:'',//选中文件夹名称
|
|
folderNameVal:'',//选中文件夹名称
|
|
folderId:'',//选中文件夹名称
|
|
folderId:'',//选中文件夹名称
|
|
folderListShow:false, //文件夹列表展示
|
|
folderListShow:false, //文件夹列表展示
|
|
|
|
+ showSaveModule:false, //保存病例模板
|
|
}
|
|
}
|
|
this.showPrint = this.showPrint.bind(this);
|
|
this.showPrint = this.showPrint.bind(this);
|
|
this.closePrint = this.closePrint.bind(this);
|
|
this.closePrint = this.closePrint.bind(this);
|
|
@@ -56,7 +57,11 @@ class Operation extends Component {
|
|
this.handleChangeIpt = this.handleChangeIpt.bind(this);
|
|
this.handleChangeIpt = this.handleChangeIpt.bind(this);
|
|
this.newFolder = this.newFolder.bind(this);
|
|
this.newFolder = this.newFolder.bind(this);
|
|
this.saveNewFolder = this.saveNewFolder.bind(this);
|
|
this.saveNewFolder = this.saveNewFolder.bind(this);
|
|
- this.folderManage = this.folderManage.bind(this)
|
|
|
|
|
|
+ this.folderManage = this.folderManage.bind(this);
|
|
|
|
+ this.changeTitle = this.changeTitle.bind(this);
|
|
|
|
+ this.closeDiagBox = this.closeDiagBox.bind(this);
|
|
|
|
+ this.spellFst = this.spellFst.bind(this);
|
|
|
|
+ this.$inp = React.createRef()
|
|
}
|
|
}
|
|
|
|
|
|
showPrint() {
|
|
showPrint() {
|
|
@@ -184,6 +189,9 @@ class Operation extends Component {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ this.setState({
|
|
|
|
+ showSaveModule: true
|
|
|
|
+ })
|
|
this.setState({
|
|
this.setState({
|
|
title: '',
|
|
title: '',
|
|
sex:'3',
|
|
sex:'3',
|
|
@@ -192,19 +200,39 @@ class Operation extends Component {
|
|
borderColor: '#3B9ED0',
|
|
borderColor: '#3B9ED0',
|
|
okColor: '#fff',
|
|
okColor: '#fff',
|
|
oKBg: '#3B9ED0',
|
|
oKBg: '#3B9ED0',
|
|
- msg: this.changeTitle()
|
|
|
|
|
|
+ // msg: this.changeTitle()
|
|
})
|
|
})
|
|
admin&&getFloderList()//获取文件夹列表
|
|
admin&&getFloderList()//获取文件夹列表
|
|
- diagShowTmp(true)
|
|
|
|
|
|
+ // diagShowTmp(true)
|
|
}
|
|
}
|
|
spellFst(){
|
|
spellFst(){
|
|
console.log(this.state.title)
|
|
console.log(this.state.title)
|
|
|
|
+ const {diagShowTmp} = this.props
|
|
let tmpFst = pinyin.getCamelChars(this.state.title);
|
|
let tmpFst = pinyin.getCamelChars(this.state.title);
|
|
console.log(tmpFst)
|
|
console.log(tmpFst)
|
|
console.log(tmpFst.substr(0,1).toUpperCase())
|
|
console.log(tmpFst.substr(0,1).toUpperCase())
|
|
this.setState({fstName:tmpFst})
|
|
this.setState({fstName:tmpFst})
|
|
|
|
+ console.log(this.$inp)
|
|
|
|
+ // this.$inp.current.vaule = tmpFst
|
|
|
|
+ document.getElementById ('FstInp').value=tmpFst
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ closeSaveModule() {
|
|
|
|
+ const {diagShowTmp} = this.props
|
|
|
|
+ const { type } = this.state;
|
|
|
|
+ if (type == 3){
|
|
|
|
+ this.setState({
|
|
|
|
+ showSaveModule: false
|
|
|
|
+ })
|
|
|
|
+ diagShowTmp(false)
|
|
|
|
+ this.setState({ title: '',deptId:"",value:"",folderListShow:false })
|
|
|
|
+ this.setState({fstName:''})
|
|
|
|
+ }
|
|
}
|
|
}
|
|
changeTitle() {
|
|
changeTitle() {
|
|
|
|
+ console.log('testChangeTitle', this.state.fstName)
|
|
|
|
+ const {isRead,typeConfig} = this.props
|
|
|
|
+ const value = this.state.fstName
|
|
return <div className={style['box']}>
|
|
return <div className={style['box']}>
|
|
<div className={style['iptWrap']}>
|
|
<div className={style['iptWrap']}>
|
|
<div className={style.name}>
|
|
<div className={style.name}>
|
|
@@ -225,11 +253,13 @@ class Operation extends Component {
|
|
<div className={`${style.name} ${style.firstname}`}>
|
|
<div className={`${style.name} ${style.firstname}`}>
|
|
<span className={style.leftName}>模板名首拼:</span>
|
|
<span className={style.leftName}>模板名首拼:</span>
|
|
<input className={style['ipt']}
|
|
<input className={style['ipt']}
|
|
- placeholder=""
|
|
|
|
|
|
+ ref = {this.$inp}
|
|
|
|
+ value={value}
|
|
|
|
+ id='FstInp'
|
|
|
|
+ placeholder=''
|
|
type="text"
|
|
type="text"
|
|
maxLength='30'
|
|
maxLength='30'
|
|
- value={this.state.fstName}
|
|
|
|
- onFocus={()=>this.spellFst()}
|
|
|
|
|
|
+ onFocus={() =>this.spellFst()}
|
|
onInput={(e) => {
|
|
onInput={(e) => {
|
|
this.handleInputFst(e)
|
|
this.handleInputFst(e)
|
|
}}
|
|
}}
|
|
@@ -396,7 +426,7 @@ class Operation extends Component {
|
|
const { showPrint, closePrint, showPreview, closePreview,handleChangeIpt,newFolder,folderManage } = this;
|
|
const { showPrint, closePrint, showPreview, closePreview,handleChangeIpt,newFolder,folderManage } = this;
|
|
const { visible, preVisible,diagShow } = this.props.print;
|
|
const { visible, preVisible,diagShow } = this.props.print;
|
|
const {winWidth,cancelDelTag,departLis,handleChangeValue,admin,floderListAdmin,folderModalShow,floderModal,folderOrderShow,folderOrder,adminItems,patInfo,saveOrderFolder} = this.props;
|
|
const {winWidth,cancelDelTag,departLis,handleChangeValue,admin,floderListAdmin,folderModalShow,floderModal,folderOrderShow,folderOrder,adminItems,patInfo,saveOrderFolder} = this.props;
|
|
- const {zIndex,type,le,value,folder,folderListShow} = this.state;
|
|
|
|
|
|
+ const {zIndex,type,le,value,folder,folderListShow,showSaveModule} = this.state;
|
|
return <div className={style['container']} style={{left:le}}>
|
|
return <div className={style['container']} style={{left:le}}>
|
|
<span className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</span>
|
|
<span className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</span>
|
|
<span className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</span>
|
|
<span className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</span>
|
|
@@ -406,7 +436,72 @@ class Operation extends Component {
|
|
<span className={winWidth<=1082?`${style['clearButton']} ${style['saveButton']} ${style['minstyle']}`:`${style['clearButton']} ${style['saveButton']}`} onClick={() => { this.clearAll(2) }}>清除</span>
|
|
<span className={winWidth<=1082?`${style['clearButton']} ${style['saveButton']} ${style['minstyle']}`:`${style['clearButton']} ${style['saveButton']}`} onClick={() => { this.clearAll(2) }}>清除</span>
|
|
{visible?<PrintPreviewContainer visible={visible} onClose={closePrint} />:null}
|
|
{visible?<PrintPreviewContainer visible={visible} onClose={closePrint} />:null}
|
|
{preVisible?<PreviewContainer visible={preVisible} onClose={closePreview} />:null}
|
|
{preVisible?<PreviewContainer visible={preVisible} onClose={closePreview} />:null}
|
|
- <ConfirmModal
|
|
|
|
|
|
+ {showSaveModule&&<ConfirmModal
|
|
|
|
+ visible={showSaveModule} //改为全局控制
|
|
|
|
+ confirm={() => { this.makeSure() }}
|
|
|
|
+ close={() => { this.closeSaveModule()}}
|
|
|
|
+ cancel={() => {this.closeSaveModule()}}
|
|
|
|
+ okText={this.state.okText}
|
|
|
|
+ height={type==3&admin?365:type==3&!admin?275:200}
|
|
|
|
+ width={585}
|
|
|
|
+ okBorderColor={this.state.borderColor}
|
|
|
|
+ okColor={this.state.okColor}
|
|
|
|
+ oKBg={this.state.oKBg}
|
|
|
|
+ borderBtm='1px solid #ccc'
|
|
|
|
+ title='保存病历模板'
|
|
|
|
+ >
|
|
|
|
+ {this.changeTitle()}
|
|
|
|
+ {
|
|
|
|
+ admin&&type==3?<div className={style.addList}>
|
|
|
|
+ <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}>
|
|
|
|
+ <input className={style.selectFolderIpt}
|
|
|
|
+ type="text"
|
|
|
|
+ maxLength='30'
|
|
|
|
+ readOnly
|
|
|
|
+ value={this.state.folderNameVal}
|
|
|
|
+ onClick={(e) => {
|
|
|
|
+ this.handleFolderShow(e)
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ <img src={slideDown} alt=""/>
|
|
|
|
+ </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={()=>newFolder(true)}>新建文件夹</span>
|
|
|
|
+ <span className={style.mangerFolder} onClick={()=>folderManage(true)}>管理文件夹</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>:null
|
|
|
|
+ }
|
|
|
|
+ </ConfirmModal>}
|
|
|
|
+ {<ConfirmModal
|
|
visible={diagShow} //改为全局控制
|
|
visible={diagShow} //改为全局控制
|
|
confirm={() => { this.makeSure() }}
|
|
confirm={() => { this.makeSure() }}
|
|
close={() => { this.closeDiagBox()}}
|
|
close={() => { this.closeDiagBox()}}
|
|
@@ -470,7 +565,7 @@ class Operation extends Component {
|
|
</div>
|
|
</div>
|
|
</div>:null
|
|
</div>:null
|
|
}
|
|
}
|
|
- </ConfirmModal>
|
|
|
|
|
|
+ </ConfirmModal>}
|
|
<FolderName
|
|
<FolderName
|
|
folderModalShow={folderModalShow}
|
|
folderModalShow={folderModalShow}
|
|
floderModal={floderModal}
|
|
floderModal={floderModal}
|