import React, { Component } from "react"; import style from "./index.less"; import printImg from '@common/images/icon_print_blue.png'; import slideDown from '@common/images/slideDown.png'; import preview from '@common/images/preview.png'; import saveHistory from '@common/images/saveHistory.png'; import cancelTag from '@common/images/icon_back.png'; import PrintPreviewContainer from '@containers/PrintPreviewContainer'; import PreviewContainer from '@containers/PreviewContainer'; import { ConfirmModal, Notify } from '@commonComp'; import Search from './Search'; import FolderName from '@components/FolderName'; import FolderOrder from '@components/FolderOrder'; import check_circle from './img/check-circle.png'; import check_right from './img/check-right.png'; import {getAllDataList,getAllDataStringList,isAllPartClear,isAllClear,filterDataArr,readyKeepHistory,checkDeptContent} from '@utils/tools'; import pinyin from '@utils/Convert_Pinyin.js'; import {dragBox} from '@utils/drag'; import store from '@store'; import $ from 'jquery'; class Operation extends Component { constructor(props) { super(props) this.state = { title: '', fstName:'',//首拼 okText: '', borderColor: '', okColor: '', oKBg: '', msg: '', type: '', zIndex:40, sex:'3', le:'', deptId:'',//科室id value:'',//科室name folder:'',//文件夹 folderName:'', folderNameVal:'未分类文件夹',//选中文件夹名称 folderId:'11',//选中文件夹名称 folderListShow:false, //文件夹列表展示 showSaveModule:false, //保存病例模板 } this.showPrint = this.showPrint.bind(this); this.closePrint = this.closePrint.bind(this); this.showPreview = this.showPreview.bind(this); this.closePreview = this.closePreview.bind(this); this.saveAll = this.saveAll.bind(this); this.clearAll = this.clearAll.bind(this); this.saveHis = this.saveHis.bind(this); this.keypress = this.keypress.bind(this); this.setDeptId = this.setDeptId.bind(this); this.setFolderId = this.setFolderId.bind(this); this.handleChangeIpt = this.handleChangeIpt.bind(this); this.newFolder = this.newFolder.bind(this); this.saveNewFolder = this.saveNewFolder.bind(this); this.folderManage = this.folderManage.bind(this); this.changeTitle = this.changeTitle.bind(this); this.closeDiagBox = this.closeDiagBox.bind(this); this.spellFst = this.spellFst.bind(this); this.$inp = React.createRef() } showPrint() { this.setState({ zIndex:240 }) this.props.showPrintPreview() } closePrint() { this.setState({ zIndex:40 }) this.props.closePrintPreview() dragBox('previewPrintWrapper','previewPrintStatic','del') } showPreview() { this.setState({ zIndex:240 }) this.props.showPreview() } closePreview() { this.setState({ zIndex:40 }) this.props.closePreview() dragBox('previewWrapper','previewStatic','del') } saveAll(type) { let keepState = readyKeepHistory(); if(keepState == 1){ Notify.info('主诉不能为空'); return; }else if(keepState == 2){ Notify.info('诊断不能为空'); return; }else{ this.setState({ type: type, okText: '保存', borderColor: '#3B9ED0', okColor: '#fff', oKBg: '#3B9ED0', msg:
是否保存该病历?
}) this.props.diagShowTmp(true) } } clearAll(type) { let baseList = store.getState(); let jsonData = getAllDataList(baseList); let jsonStr = getAllDataStringList(baseList); let flg = isAllPartClear(jsonData,jsonStr,baseList); const tpVal = $("#templateSearch").val(); //模板是否有搜索条件未清空 const mdVal = $("#medicalInfoSearch").val(); //知识是否有搜索条件未清空 if(flg||tpVal||mdVal){ this.setState({ type: type, okText: '清除', borderColor: 'red', okColor: 'red', oKBg: '#fff', msg:是否清空所有内容?
}) this.props.diagShowTmp(true) }else{ Notify.info('当前页面数据已清空'); } } handleInput(e){ let val = (e.target.value).substring(0,30) this.setState({ title: val }) } handleInputFst(e){ let val = (e.target.value).substring(0,30) this.setState({ fstName: val }) } keypress(event) { let e = event?event:window.event; if (e.keyCode == 13) { this.makeSure() } } newFolder(flg){ this.props.folderModal(flg) } folderManage(flg) { this.props.folderOrder(flg) } saveHis(type) { const { diagShowTmp,getFloderList,admin } = this.props; let baseList = store.getState(); let jsonStr = getAllDataStringList(baseList); let tmpLis = []; let flg = isAllClear(jsonStr); if(!flg){ Notify.info('模板数据不能为空'); return false; } if(!this.props.admin){ tmpLis = baseList.tabTemplate.items; for(let i = 0;i请选择模板性别归属(错误引用,显示可能有误)
*/}