|
@@ -172,14 +172,15 @@ class Operation extends Component {
|
|
|
let jsonStr = getAllDataStringList(baseList);
|
|
|
let whichSign = baseList.typeConfig.typeConfig;
|
|
|
let tmpLis = baseList.tabTemplate.items;
|
|
|
- if (whichSign == 0) {
|
|
|
- for(let i = 0;i <tmpLis.length;i++){
|
|
|
- let dataStr = tmpLis[i].dataJson;
|
|
|
- if(dataStr == JSON.stringify(jsonData)){
|
|
|
- Notify.info('该模板已保存');
|
|
|
- return false;
|
|
|
- }
|
|
|
+ for(let i = 0;i <tmpLis.length;i++){
|
|
|
+ let dataStr = tmpLis[i].preview;
|
|
|
+ let jsStr = tmpLis[i].dataJson;
|
|
|
+ if(JSON.stringify(JSON.parse(dataStr)) == JSON.stringify(jsonStr) && jsStr == JSON.stringify(jsonData)){
|
|
|
+ Notify.info('该模板已保存');
|
|
|
+ return false;
|
|
|
}
|
|
|
+ }
|
|
|
+ if (whichSign == 0) {
|
|
|
if (
|
|
|
JSON.stringify(jsonData.advice) == '{}' &&
|
|
|
(jsonData.chief.length < 1 && jsonStr.chief == '[]') &&
|
|
@@ -197,15 +198,6 @@ class Operation extends Component {
|
|
|
return true;
|
|
|
}
|
|
|
} else if(whichSign == 1) {
|
|
|
- for(let i = 0;i <tmpLis.length;i++){
|
|
|
- let dataStr = tmpLis[i].preview;
|
|
|
- let jsStr = tmpLis[i].dataJson;
|
|
|
- console.log(dataStr == JSON.stringify(jsonStr))
|
|
|
- if(JSON.stringify(JSON.parse(dataStr)) == JSON.stringify(jsonStr) && jsStr == JSON.stringify(jsonData)){
|
|
|
- Notify.info('该模板已保存');
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
if (JSON.stringify(jsonData.advice) == '{}' &&
|
|
|
jsonStr.chief == '[]' &&
|
|
|
jsonStr.present == '[]' &&
|
|
@@ -281,11 +273,11 @@ class Operation extends Component {
|
|
|
const { visible, preVisible,diagShow } = this.props.print;
|
|
|
const {zIndex} = this.state;
|
|
|
return <div className={style['container']} style={{zIndex:zIndex}}>
|
|
|
- <button className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</button>
|
|
|
- <button className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</button>
|
|
|
- <button className={style['preButton']} onClick={() => { this.saveHis(3) }}><img src={saveHistory} /> 保存病历模板</button>
|
|
|
- <button className={style['saveButton']} onClick={() => { this.saveAll(1) }}>保存</button>
|
|
|
- <button className={`${style['clearButton']} ${style['saveButton']}`} onClick={() => { this.clearAll(2) }}>清除</button>
|
|
|
+ <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={() => { this.saveHis(3) }}><img src={saveHistory} /> 保存病历模板</span>
|
|
|
+ <span className={style['saveButton']} onClick={() => { this.saveAll(1) }}>保存</span>
|
|
|
+ <span className={`${style['clearButton']} ${style['saveButton']}`} onClick={() => { this.clearAll(2) }}>清除</span>
|
|
|
<PrintPreviewContainer visible={visible} onClose={closePrint} />
|
|
|
<PreviewContainer visible={preVisible} onClose={closePreview} />
|
|
|
<ConfirmModal
|