|
@@ -115,20 +115,25 @@ class Inspect extends React.Component {
|
|
|
complete: function (err, xhr) {
|
|
|
if (!err) {
|
|
|
let res = JSON.parse(xhr.response);
|
|
|
- let message = res.data.messages;
|
|
|
- store.dispatch(getExcelList(res.data));
|
|
|
- fetchPushInfos && fetchPushInfos();
|
|
|
- if (message && message.length != 0) {
|
|
|
- that.setState({
|
|
|
- visible: true,
|
|
|
- dom: message,
|
|
|
- height: message.length
|
|
|
- })
|
|
|
+ if(res.code == 0){
|
|
|
+ let message = res.data.messages;
|
|
|
+ store.dispatch(getExcelList(res.data));
|
|
|
+ fetchPushInfos && fetchPushInfos();
|
|
|
+ if (message && message.length != 0) {
|
|
|
+ that.setState({
|
|
|
+ visible: true,
|
|
|
+ dom: message,
|
|
|
+ height: message.length
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ Notify.error(res.msg)
|
|
|
}
|
|
|
$("#choose").val("");
|
|
|
} else {
|
|
|
let res = JSON.parse(xhr.response);
|
|
|
Notify.error(res.msg)
|
|
|
+ $("#choose").val("");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -200,29 +205,29 @@ class Inspect extends React.Component {
|
|
|
<div className={styles.top}>
|
|
|
<span id="inspectResultData">化验结果数据</span>
|
|
|
{/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
|
|
|
- <div className={this.getStyle()} style={{ display: hospitalMsg.importWayLis == 0 ? 'none' : 'block' }}>
|
|
|
- {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button> */}
|
|
|
- {/* <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
|
|
|
+ <div className={this.getStyle()} style={{ display: hospitalMsg.value == 0 ? 'none' : 'block' }}>
|
|
|
+ {/* <button disabled={ieVersion&&ieVersion>9?true:false}onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>导入化验结果</button>
|
|
|
+ <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
|
|
|
|
|
|
{/* {0没有,1本地,2医院,3本地和医院} */}
|
|
|
{
|
|
|
- hospitalMsg.importWayLis == 3 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
|
|
|
+ hospitalMsg.value == 1 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
|
|
|
<p className={styles.importInspectBtn}>导入化验结果</p>
|
|
|
- <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
|
|
|
- </div> : hospitalMsg.importWayLis == 22 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
|
|
|
+ <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
|
|
|
+ </div> : hospitalMsg.value == 2 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
|
|
|
<p className={styles.importInspectBtn}>导入化验结果</p>
|
|
|
- </div> : hospitalMsg.importWayLis == 2 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
|
|
|
+ </div> : hospitalMsg.value == 3 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
|
|
|
<p id="importInspectBtn" className={styles.importInspectBtn}>导入化验结果</p>
|
|
|
{
|
|
|
- importLis?<ul className={styles.importSelect} id="importList">
|
|
|
+ <ul className={styles.importSelect} style={{display:importLis?'block':'none'}} id="importList">
|
|
|
<li className={styles.excelIpt}>
|
|
|
<div onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>本地导入</div>
|
|
|
- <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
|
|
|
+ <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
|
|
|
</li>
|
|
|
<li className={`${styles.excelIpt} ${styles.systemIpt}`} onClick={checkSystemIpt}>检查系统导入</li>
|
|
|
- </ul>:null
|
|
|
+ </ul>
|
|
|
}
|
|
|
- </div> : null
|
|
|
+ </div> : null
|
|
|
}
|
|
|
|
|
|
{
|