|
@@ -8,32 +8,9 @@ import { isIE, getUrlArgObject } from '@utils/tools.js';
|
|
|
import { dragBox } from '@utils/drag';
|
|
|
import WrapModalBodyPac from '@containers/WrapModalBodyPac';
|
|
|
import { getExcelList } from '@store/actions/inspect';
|
|
|
-import store from '@store';
|
|
|
import { host, prefix } from '@utils/config.js';
|
|
|
|
|
|
|
|
|
-// (function ($) {
|
|
|
-// var FileAPI = {
|
|
|
-// // @default: "./dist/"
|
|
|
-// staticPath: './dists/',
|
|
|
-
|
|
|
-// // @default: FileAPI.staticPath + "FileAPI.flash.swf"
|
|
|
-// flashUrl: './dists/FileAPI.flash.swf',
|
|
|
-
|
|
|
-// // @default: FileAPI.staticPath + "FileAPI.flash.image.swf"
|
|
|
-// flashImageUrl: './dists/FileAPI.flash.image.swf'
|
|
|
-// };
|
|
|
-// return FileAPI
|
|
|
-// })($)
|
|
|
-
|
|
|
-// import "./dists/FileAPI.js";
|
|
|
-
|
|
|
-// const isLocal = window.location.hostname.indexOf('localhost') != -1;
|
|
|
-// const qhost = isLocal ? host + prefix : prefix;
|
|
|
-// const api = {
|
|
|
-// upload: qhost + '/lisExcelRes/lisExcelAnalysis'
|
|
|
-// };
|
|
|
-// let numFlg = 0;
|
|
|
class AssistCheck extends React.Component {
|
|
|
constructor(props){
|
|
|
super(props);
|
|
@@ -53,18 +30,8 @@ class AssistCheck extends React.Component {
|
|
|
this.closeInIcss=this.closeInIcss.bind(this)
|
|
|
this.onClose=this.onClose.bind(this)
|
|
|
this.handleImportExcel=this.handleImportExcel.bind(this)
|
|
|
- }
|
|
|
- // componentDidMount() {
|
|
|
- // $(document).click((event) => {
|
|
|
- // let searchWrap = $('#importExcelBtns')[0]; // 导入按钮按钮
|
|
|
- // let searchOption = $('#importExcelLists')[0]; // 下拉列表
|
|
|
- // if (searchOption) {
|
|
|
- // if(searchWrap != event.target){
|
|
|
- // this.setState({ importLis: false });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
+ this.refreshScroller = this.refreshScroller.bind(this);
|
|
|
+ }
|
|
|
handleImportExcel() {
|
|
|
this.inputRef.click();
|
|
|
}
|
|
@@ -75,75 +42,6 @@ class AssistCheck extends React.Component {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- // handleBindFileApi(){
|
|
|
- // const {message} = this.props;
|
|
|
- // var ua = navigator.userAgent;
|
|
|
- // var _isIE = ua.indexOf("MSIE") > -1;
|
|
|
- // if (_isIE) {
|
|
|
- // let version = ua.match(/MSIE ([\d.]+)/)[1];
|
|
|
- // this.setState({
|
|
|
- // ieVersion: version
|
|
|
- // })
|
|
|
- // }
|
|
|
- // $('iframe').bind('load', function () { })
|
|
|
- // const { fetchPushInfos } = this.props;
|
|
|
- // // FileAPI.debug = true
|
|
|
- // $.support.cors = true;
|
|
|
- // const that = this;
|
|
|
- // var choose = document.getElementById('choose');
|
|
|
- // FileAPI.event.on(choose, 'change', function (evt) {
|
|
|
- // var files = FileAPI.getFiles(evt);
|
|
|
- // FileAPI.filterFiles(files, function (file, info) {
|
|
|
- // let name = file.name;
|
|
|
- // // if( name.split('.')[1] == 'xlsx' || name.split('.')[1] == 'xls' ){
|
|
|
- // // Notify.error('请选择正确的excel表格')
|
|
|
- // // return false;
|
|
|
- // // }else{
|
|
|
- // // return true;
|
|
|
- // // }
|
|
|
- // return true;
|
|
|
- // },
|
|
|
- // function (files, rejected) {
|
|
|
- // if (files.length) {
|
|
|
- // //console.log(files[0])
|
|
|
- // const securityCode = getUrlArgObject("code");
|
|
|
- // const appKeyId = getUrlArgObject("appI");
|
|
|
- // const appKeySecret = getUrlArgObject("appS");
|
|
|
- // FileAPI.upload({
|
|
|
- // // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
|
|
|
- // url: api.upload,
|
|
|
- // data: { hospitalCode: message == '{}' ? '' : message.hospitalCode },
|
|
|
- // files: { uploadfile: files[0] },
|
|
|
- // headers: {
|
|
|
- // appKeyId: appKeyId,
|
|
|
- // appKeySecret: appKeySecret,
|
|
|
- // securityCode: securityCode
|
|
|
- // },
|
|
|
- // 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
|
|
|
- // // })
|
|
|
- // // }
|
|
|
- // // $("#choose").val("");
|
|
|
- // } else {
|
|
|
- // let res = JSON.parse(xhr.response);
|
|
|
- // Notify.error(res.msg)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // });
|
|
|
- // });
|
|
|
- // }
|
|
|
-
|
|
|
onClose() {
|
|
|
this.setState({
|
|
|
hide: false
|
|
@@ -160,6 +58,12 @@ class AssistCheck extends React.Component {
|
|
|
hide: false
|
|
|
})
|
|
|
}
|
|
|
+ refreshScroller(){
|
|
|
+ //更新滚动条状态,解决容器变大滚动条不更新bug
|
|
|
+ return this.context.scrollArea;
|
|
|
+ //this.context.scrollArea.scrollBottom();
|
|
|
+
|
|
|
+ }
|
|
|
render(){
|
|
|
const {checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
|
|
|
const {showSlideImport,checkSystemIpt,onClose,closeInIcss} = this;
|
|
@@ -213,6 +117,7 @@ class AssistCheck extends React.Component {
|
|
|
<div style={{padding:'10px',boxSizing:'border-box'}} >
|
|
|
<AddAssistCheck
|
|
|
handleChangeValue={handleChangeValue}
|
|
|
+ refreshScroller={this.refreshScroller}
|
|
|
list={list}
|
|
|
handleSign={handleSign}
|
|
|
assistLabel={assistLabel}
|
|
@@ -236,4 +141,7 @@ class AssistCheck extends React.Component {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+AssistCheck.contextTypes = {
|
|
|
+ scrollArea: React.PropTypes.object
|
|
|
+};
|
|
|
export default AssistCheck;
|