|
@@ -8,7 +8,7 @@ import PreviewContainer from '@containers/PreviewContainer';
|
|
|
import { ConfirmModal, Notify } from '@commonComp';
|
|
|
import check_circle from './img/check-circle.png';
|
|
|
import check_right from './img/check-right.png';
|
|
|
-import {getAllDataList,getAllDataStringList,isAllClear,filterDataArr} from '@utils/tools';
|
|
|
+import {getAllDataList,getAllDataStringList,isAllClear,filterDataArr,readyKeepHistory} from '@utils/tools';
|
|
|
import store from '@store';
|
|
|
import $ from 'jquery';
|
|
|
|
|
@@ -67,8 +67,14 @@ class Operation extends Component {
|
|
|
}
|
|
|
|
|
|
saveAll(type) {
|
|
|
- let flg = this.keepHistory();
|
|
|
- if(flg){
|
|
|
+ let keepState = readyKeepHistory();
|
|
|
+ if(keepState == 1){
|
|
|
+ Notify.info('主诉不能为空');
|
|
|
+ return;
|
|
|
+ }else if(keepState == 2){
|
|
|
+ Notify.info('诊断不能为空');
|
|
|
+ return;
|
|
|
+ }else{
|
|
|
this.setState({
|
|
|
type: type,
|
|
|
okText: '保存',
|
|
@@ -81,20 +87,6 @@ class Operation extends Component {
|
|
|
this.props.diagShowTmp(true)
|
|
|
}
|
|
|
}
|
|
|
- keepHistory(){
|
|
|
- let baseList = store.getState();
|
|
|
- let jsonStr = getAllDataStringList(baseList);
|
|
|
- // console.log(jsonStr)
|
|
|
- if(filterDataArr(JSON.parse(jsonStr.chief)) == ''){
|
|
|
- Notify.info('主诉不能为空');
|
|
|
- return false;
|
|
|
- }else if(!jsonStr.diag || jsonStr.diag.trim().length < 1){
|
|
|
- Notify.info('诊断不能为空');
|
|
|
- return false;
|
|
|
- }else{
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
clearAll(type) {
|
|
|
let baseList = store.getState();
|
|
|
let jsonData = getAllDataList(baseList);
|