|
@@ -16,7 +16,7 @@ import check_right from './img/check-right.png';
|
|
|
import { getAllDataList, getAllDataStringList, isAllPartClear, isAllClear, filterDataArr, readyKeepHistory, checkDeptContent } from '@utils/tools';
|
|
|
import { embedPush } from '../../store/async-actions/pushMessage'
|
|
|
import pinyin from '@utils/Convert_Pinyin.js';
|
|
|
-import { saveMessage } from '@store/async-actions/print'
|
|
|
+import { saveMessage, clearMessages } from '@store/async-actions/print'
|
|
|
import {dragBox} from '@utils/drag';
|
|
|
import store from '@store';
|
|
|
import $ from 'jquery';
|
|
@@ -45,7 +45,8 @@ class Operation extends Component {
|
|
|
folderListShow:false, //文件夹列表展示
|
|
|
medicalName: '', //保存病历名称
|
|
|
showValit: false, // 显示校验的文字
|
|
|
- saveVisible: false //保存病历模态框
|
|
|
+ saveVisible: false, //保存病历模态框
|
|
|
+ clearVisible:false
|
|
|
}
|
|
|
this.showPrint = this.showPrint.bind(this);
|
|
|
this.closePrint = this.closePrint.bind(this);
|
|
@@ -67,9 +68,12 @@ class Operation extends Component {
|
|
|
this.hideFolderList = this.hideFolderList.bind(this)
|
|
|
this.handleMedicalChange = this.handleMedicalChange.bind(this)
|
|
|
|
|
|
-
|
|
|
+ this.makeSureClear = this.makeSureClear.bind(this);
|
|
|
this.makeSureSave = this.makeSureSave.bind(this);
|
|
|
+
|
|
|
this.closeSave = this.closeSave.bind(this);
|
|
|
+ this.closeClear = this.closeClear.bind(this);
|
|
|
+
|
|
|
this.$inp = React.createRef()
|
|
|
}
|
|
|
|
|
@@ -118,7 +122,11 @@ class Operation extends Component {
|
|
|
// templateName: ''
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+ closeClear(){
|
|
|
+ this.setState({
|
|
|
+ clearVisible: false,
|
|
|
+ })
|
|
|
+ }
|
|
|
showPrint() {
|
|
|
this.setState({
|
|
|
zIndex:240
|
|
@@ -224,18 +232,21 @@ class Operation extends Component {
|
|
|
const mdVal = $("#medicalInfoSearch").val(); //知识是否有搜索条件未清空
|
|
|
if(flg||tpVal||mdVal){
|
|
|
this.setState({
|
|
|
- type: type,
|
|
|
- okText: '清除',
|
|
|
- borderColor: 'red',
|
|
|
- okColor: 'red',
|
|
|
- oKBg: '#fff',
|
|
|
- msg: <p className={style['msg']}>是否清空所有内容?</p>
|
|
|
+ clearVisible: true,
|
|
|
})
|
|
|
|
|
|
- this.props.diagShowTmp(true)
|
|
|
+ // this.props.diagShowTmp(true)
|
|
|
+
|
|
|
}else{
|
|
|
Notify.info('当前页面数据已清空');
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
+ makeSureClear(){
|
|
|
+ this.setState({
|
|
|
+ clearVisible: false,
|
|
|
+ })
|
|
|
+ clearMessages()
|
|
|
}
|
|
|
handleInput(e){
|
|
|
let val = (e.target.value).substring(0,20)
|
|
@@ -571,7 +582,22 @@ class Operation extends Component {
|
|
|
<span className={winWidth<=1082?`${style['saveButton']} ${style['minstyle']}`: style['saveButton']} onClick={() => { this.saveAll(1) }}>保存</span>
|
|
|
{visible?<PrintPreviewContainer visible={visible} onClose={closePrint} />:null}
|
|
|
{preVisible?<PreviewContainer visible={preVisible} onClose={closePreview} />:null}
|
|
|
-
|
|
|
+ {<ConfirmModal
|
|
|
+ visible={this.state.clearVisible}
|
|
|
+ confirm={this.makeSureClear}
|
|
|
+ close={this.closeClear}
|
|
|
+ cancel={this.closeClear}
|
|
|
+ okText={"清除"}
|
|
|
+ okBorderColor={'red'}
|
|
|
+ okColor={'red'}
|
|
|
+ oKBg={'#fff'}
|
|
|
+ >
|
|
|
+ <div className={style.outBox}>
|
|
|
+ <span>是否清空所有内容</span>
|
|
|
+ </div>
|
|
|
+ </ConfirmModal>}
|
|
|
+
|
|
|
+
|
|
|
{<ConfirmModal
|
|
|
visible={this.state.saveVisible}
|
|
|
confirm={this.makeSureSave}
|