index.jsx 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  1. import React, { Component } from 'react';
  2. import style from './index.less';
  3. import { Tab, ConfirmModal, Notify } from '@commonComp';
  4. import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow,allCheckedAdmin,allCheckedShowAdmin,whichTemp,floderSlide,floderAction,folderModal,clearSearchTemplateNorms,folderOrder,getDptLis } from '@store/actions/tabTemplate';
  5. import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin,getFloderList,delFloder,addTemplateQuote,newFloder,findTemplateNorms,getFloderListAll,getDepartments } from '@store/async-actions/tabTemplate';
  6. import { connect } from "react-redux";
  7. import store from '@store';
  8. import { billing } from '@store/async-actions/pushMessage';
  9. import TemplateContainer from '@components/TemplateContainer';
  10. import EmergencyProcedure from '@components/EmergencyProcedure';
  11. import TemplateItems from '@components/TemplateItems';
  12. import { pushAllDataList, getWindowInnerHeight, didPushParamChange,windowEventHandler } from '@utils/tools';
  13. import CopyRightContainer from "@containers/CopyRightContainer";
  14. import MedicalInfoContainer from '@containers/MedicalInfoContainer';
  15. import Search from './Search';
  16. import slideDown from '@common/images/slideDown.png';
  17. import CaseQuailty from "../CaseQuailty";
  18. import check_circle from './img/check-circle.png';
  19. import check_right from './img/check-right.png';
  20. import pinyin from '@utils/Convert_Pinyin.js';
  21. import $ from "jquery";
  22. import PushEmbed from "../PushEmbed";
  23. class PushContainer extends Component {
  24. constructor(props) {
  25. super(props);
  26. this.state = {
  27. data: null,
  28. tabs: [{
  29. title: '辅助信息',
  30. disabled: true
  31. },
  32. {
  33. title: '病历质控',
  34. }, {
  35. title: '模板',
  36. },
  37. {
  38. title: '医学知识',
  39. }
  40. ],
  41. visible: false,
  42. message: '', //提示的内容
  43. type: '', //1:删除模板 2:批量删除 3.修改标题 4.引用
  44. id: '', //单个删除
  45. obj: {}, //修改模板标题
  46. title: '', //修改后的标题
  47. okText: '确定', //确认按钮
  48. okBorderColor: 'red',
  49. oKBg: '',
  50. okColor: 'red',
  51. num: 0, //计数
  52. deptId:'', //科室id
  53. value:'',//科室name
  54. sex:'3',
  55. floderName:'', //文件夹名称
  56. folderListShow:false,
  57. folderNameVal:'',
  58. folderId:'',
  59. spell:'',
  60. fstName:'',
  61. tmpFolder:'',
  62. hasCalcIndex: false,
  63. hospitalDeptName:'',
  64. reset: false
  65. }
  66. this.$cont = React.createRef();
  67. this.itemList = null;
  68. this.handleActiveClick = this.handleActiveClick.bind(this)
  69. this.handleContentClick = this.handleContentClick.bind(this)
  70. this.handleTemplateDel = this.handleTemplateDel.bind(this)
  71. this.handleTitleChange = this.handleTitleChange.bind(this)
  72. this.handleAllCheckbox = this.handleAllCheckbox.bind(this)
  73. this.handleAllCheckboxAdmin = this.handleAllCheckboxAdmin.bind(this)
  74. this.handleMangerTemplate = this.handleMangerTemplate.bind(this)
  75. this.handleMangerTemplateAdmin = this.handleMangerTemplateAdmin.bind(this)
  76. this.handleDelList = this.handleDelList.bind(this)
  77. this.makeSure = this.makeSure.bind(this)
  78. this.handleClose = this.handleClose.bind(this);
  79. this.templateSearch = this.templateSearch.bind(this);
  80. this.clearTemplateSearch = this.clearTemplateSearch.bind(this)
  81. this.whichTemp = this.whichTemp.bind(this);
  82. this.floderSlideToggle = this.floderSlideToggle.bind(this);
  83. this.floderRename = this.floderRename.bind(this);
  84. this.handleInputFloder = this.handleInputFloder.bind(this);
  85. this.setFolderId = this.setFolderId.bind(this);
  86. this.floderDelete = this.floderDelete.bind(this);
  87. this.folderManage = this.folderManage.bind(this);
  88. this.changeRadio = this.changeRadio.bind(this);
  89. this.handleChangeIpt = this.handleChangeIpt.bind(this);
  90. this.setDeptId = this.setDeptId.bind(this);
  91. this.handleClearValue = this.handleClearValue.bind(this);
  92. this.clearReset = this.clearReset.bind(this);
  93. this.hideFolderList = this.hideFolderList.bind(this);
  94. }
  95. componentDidMount() {
  96. const height = getWindowInnerHeight()-60;
  97. this.$cont.current.style.height = height+"px";
  98. windowEventHandler('resize', ()=>{
  99. const height = getWindowInnerHeight() - 60;
  100. this.$cont.current.style.height = height+"px";
  101. });
  102. }
  103. templateSearch(name,selectTemp){
  104. store.dispatch(initItemList(1,name,selectTemp));
  105. }
  106. clearTemplateSearch(){
  107. store.dispatch(clearSearchTemplateNorms());
  108. }
  109. /**
  110. *
  111. * @param {tab组件切换id} id
  112. */
  113. handleActiveClick(id) {
  114. store.dispatch(allCheckedShowAdmin(false))
  115. if (id == '2') {
  116. document.getElementById("searchTmp").value = ""
  117. // let searchVal = document.getElementById("searchTmp").value
  118. store.dispatch(initItemList(1,0));
  119. store.dispatch(getFloderListAll())
  120. this.setState({
  121. reset: true
  122. })
  123. $(".floderSlideLis").eq(0).next().slideDown()
  124. store.dispatch(whichTemp(1))
  125. }
  126. store.dispatch(tabChange(id))
  127. }
  128. clearReset() {
  129. this.setState({
  130. reset: false
  131. })
  132. }
  133. /**
  134. * 引用模板id
  135. * @param {模板id} id
  136. */
  137. handleContentClick(id, sex,hasCalcIndex) {
  138. let baseSex = store.getState().patInfo.message.sex
  139. this.setState({
  140. message: this.content(sex, baseSex),
  141. type: 4,
  142. id: id,
  143. okText: '引用',
  144. okBorderColor: '#3B9ED0',
  145. okColor: '#fff',
  146. oKBg: '#3B9ED0',
  147. }, () => {
  148. store.dispatch(changeVisible(true))
  149. })
  150. this.setState({
  151. hasCalcIndex: hasCalcIndex
  152. })
  153. }
  154. content(sex, baseSex) {
  155. if (sex != 3 && sex != baseSex) {
  156. return <p className={style['center']}>确认引用该模板?<p style={{ fontSize: '12px', color: '#6b6969', marginTop: '10px' }}>引用该模版可能显示有误</p></p>
  157. } else {
  158. return <p className={style['center']}>确认引用该模板?</p>
  159. }
  160. }
  161. /**
  162. * 删除模板
  163. * @param {模板id} id
  164. */
  165. handleTemplateDel(id,folderId) {
  166. this.setState({
  167. message: this.delDiv(),
  168. type: 1,
  169. folderId:folderId,
  170. id: id,
  171. okText: '删除',
  172. okBorderColor: 'red',
  173. okColor: 'red',
  174. oKBg: '#fff'
  175. }, () => {
  176. store.dispatch(changeVisible(true))
  177. })
  178. }
  179. delDiv() {
  180. return <p className={style['center']}>确认删除模板?</p>
  181. }
  182. onchange(value,deptId) {
  183. this.setState({
  184. title: value
  185. }, () => {
  186. this.setState({
  187. message: this.changeTitle(),
  188. })
  189. })
  190. }
  191. keypress(event) {
  192. let e = event ? event : window.event;
  193. if (e.keyCode == 13) {
  194. this.makeSure()
  195. }
  196. }
  197. handleInput(e) {
  198. let val = (e.target.value).substring(0, 20)
  199. this.onchange(val)
  200. }
  201. handleInputFloder(e){
  202. let val = (e.target.value).substring(0,20)
  203. this.setState({
  204. floderName: val
  205. },()=>{
  206. this.setState({
  207. message:this.changeFloderTitle()
  208. })
  209. })
  210. }
  211. handleInputFst(e){
  212. let val = (e.target.value).substring(0,20).replace(/[^a-zA-Z]/g,'')
  213. // console.log(val)
  214. $(e.target).val(val)
  215. this.setState({
  216. fstName: val
  217. }, () => {
  218. this.setState({
  219. message: this.changeTitle(),
  220. })
  221. })
  222. }
  223. spellFst(){
  224. let tmpFst = pinyin.getCamelChars(this.state.title);
  225. // console.log(tmpFst.substr(0,1).toUpperCase())
  226. this.setState({fstName:tmpFst.toUpperCase()})
  227. // this.$inp.current.vaule = tmpFst
  228. document.getElementById ('FstInp').value=tmpFst.toUpperCase()
  229. }
  230. changeTitle() {//模板名称修改
  231. return <div className={style['box']} onClick={()=>{this.handleClearValue();this.hideFolderList()}}>
  232. <div className={style['iptWrap']}>
  233. <div className={style.name}>
  234. <span className={style.leftName}>模板名称:</span>
  235. <input className={style['ipt']}
  236. autocomplete="off"
  237. placeholder="请输入模板名称"
  238. type="text"
  239. maxLength='20'
  240. value={this.state.title}
  241. onInput={(e) => {
  242. this.handleInput(e)
  243. }}
  244. onPropertyChange={(e) => { // 兼容ie
  245. this.handleInput(e)
  246. }}
  247. onKeyPress={e => this.keypress(e)}
  248. />
  249. </div>
  250. <div className={`${style.name} ${style.firstname}`}>
  251. <span className={style.leftName}>模板名首拼:</span>
  252. <input className={style['ipt']}
  253. autocomplete="off"
  254. placeholder=""
  255. type="text"
  256. maxLength='20'
  257. id="FstInp"
  258. value={this.state.fstName}
  259. onFocus={() =>this.spellFst()}
  260. onInput={(e) => {
  261. this.handleInputFst(e)
  262. }}
  263. onPropertyChange={(e) => { // 兼容ie
  264. this.handleInputFst(e)
  265. }}
  266. onKeyPress={e => this.keypress(e)}
  267. />
  268. </div>
  269. </div>
  270. </div>
  271. }
  272. /**
  273. * 改变模板标题
  274. * @param {模板id和模板title} obj
  275. */
  276. handleTitleChange(id, text,deptId,folderId,spell,folderName,sex,hospitalDeptName) {
  277. store.dispatch(changeVisible(true))
  278. this.props.admin&&store.dispatch(getFloderList())
  279. this.setState({
  280. type: 3,
  281. currId: id,
  282. title: text,
  283. text: text,
  284. deptId: deptId,
  285. fstName:spell,
  286. okText: '保存',
  287. okBorderColor: '#3B9ED0',
  288. okColor: '#fff',
  289. oKBg: '#3B9ED0',
  290. folderId:folderId,
  291. sex: sex,
  292. spell:spell,
  293. folderNameVal:folderName,
  294. tmpFolder:folderName,
  295. value:hospitalDeptName
  296. }, () => {
  297. this.setState({
  298. message: this.changeTitle(),
  299. })
  300. })
  301. }
  302. handleAllCheckboxAdmin() { //全.反选
  303. let tmpFlg = this.props.allCheckedAdmin;
  304. if (this.props.checkItemsAdmin.length < this.props.folderListContentArr.length && this.props.allCheckedAdmin) {
  305. tmpFlg = false;
  306. } else if (this.props.checkItemsAdmin.length == this.props.folderListContentArr.length && !this.props.allCheckedAdmin) {
  307. tmpFlg = true;
  308. } //两种特殊情况处理
  309. store.dispatch(allCheckedAdmin(!tmpFlg))
  310. }
  311. handleMangerTemplateAdmin() { //管理
  312. let tmpFlg = this.props.allCheckShowAdmin;
  313. store.dispatch(allCheckedAdmin(false))
  314. store.dispatch(allCheckedShowAdmin(!tmpFlg))
  315. }
  316. handleAllCheckbox() { //全.反选
  317. let tmpFlg = this.props.allChecked;
  318. if (this.props.checkItems.length < this.props.items.length && this.props.allChecked) {
  319. tmpFlg = false;
  320. } else if (this.props.checkItems.length == this.props.items.length && !this.props.allChecked) {
  321. tmpFlg = true;
  322. } //两种特殊情况处理
  323. store.dispatch(allChecked(!tmpFlg))
  324. }
  325. handleMangerTemplate() { //管理
  326. let tmpFlg = this.props.allCheckShow;
  327. store.dispatch(allChecked(false))
  328. store.dispatch(allCheckedShow(!tmpFlg))
  329. }
  330. handleDelList() { //批量删除
  331. this.setState({
  332. type: 2,
  333. message: this.delDiv(),
  334. okText: '删除',
  335. okBorderColor: 'red',
  336. okColor: 'red',
  337. oKBg: '#fff'
  338. })
  339. store.dispatch(changeVisible(true))
  340. }
  341. handleClickGetMore(page){
  342. let tmpPage = ++page
  343. store.dispatch(initItemList(tmpPage,true))
  344. }
  345. floderRename(name,id){//文件夹重命名
  346. this.setState({
  347. type: 5,
  348. title: '重命名文件夹',
  349. okText: '保存',
  350. floderName:name,
  351. folderId:id,
  352. okBorderColor: '#3B9ED0',
  353. okColor: '#fff',
  354. oKBg: '#3B9ED0',
  355. },()=>{
  356. this.setState({
  357. message:this.changeFloderTitle()
  358. })
  359. })
  360. store.dispatch(changeVisible(true))
  361. }
  362. changeFloderTitle() {
  363. return <div className={style['box']}>
  364. <div className={style['iptWrap']}>
  365. <div className={style.name}>
  366. <span className={style.leftName}>名称:</span>
  367. <input
  368. autocomplete="off"
  369. placeholder="请输入文件夹名称"
  370. type="text"
  371. maxLength='20'
  372. value={this.state.floderName}
  373. onInput={(e) => {
  374. this.handleInputFloder(e)
  375. }}
  376. onPropertyChange={(e) => { // 兼容ie
  377. this.handleInputFloder(e)
  378. }}
  379. onKeyPress={e => this.keypress(e)}
  380. />
  381. </div>
  382. </div>
  383. </div>
  384. }
  385. floderDelete(folderId){//文件夹删除
  386. this.setState({
  387. message: <p className={style['center']}>确认删除文件夹?</p>,
  388. type: 6,
  389. folderId:folderId,
  390. okText: '删除',
  391. okBorderColor: 'red',
  392. okColor: 'red',
  393. oKBg: '#fff'
  394. }, () => {
  395. store.dispatch(changeVisible(true))
  396. })
  397. // store.dispatch(delFloder(id))
  398. }
  399. changeRadio(sex){
  400. if(sex == 1){
  401. $('#commonSex img').attr('src',check_right)
  402. $('#maleSex img').attr('src',check_circle)
  403. $('#femaleSex img').attr('src',check_circle)
  404. $('#commonSex i').css('color','#000')
  405. $('#maleSex i').css('color','#6b6969')
  406. $('#femaleSex i').css('color','#6b6969')
  407. this.setState({sex:'3'})
  408. }else if(sex == 2){
  409. $('#commonSex img').attr('src',check_circle)
  410. $('#maleSex img').attr('src',check_right)
  411. $('#femaleSex img').attr('src',check_circle)
  412. $('#commonSex i').css('color','#6b6969')
  413. $('#maleSex i').css('color','#000')
  414. $('#femaleSex i').css('color','#6b6969')
  415. this.setState({sex:'1'})
  416. }else if(sex == 3){
  417. $('#commonSex img').attr('src',check_circle)
  418. $('#maleSex img').attr('src',check_circle)
  419. $('#femaleSex img').attr('src',check_right)
  420. $('#commonSex i').css('color','#6b6969')
  421. $('#maleSex i').css('color','#6b6969')
  422. $('#femaleSex i').css('color','#000')
  423. this.setState({sex:'2'})
  424. }
  425. }
  426. makeSure() {
  427. const {type,id,title,tmpFolder,folderNameVal,text,fstName,spell,currId,deptId,folderId,floderName,sex,hospitalDeptName} = this.state
  428. if (type == 1) {
  429. if(this.props.admin){
  430. store.dispatch(delItemAdmin(id,folderId))
  431. }else{
  432. store.dispatch(delItem(id))
  433. }
  434. store.dispatch(changeVisible(false))
  435. } else if (type == 2) {
  436. if(this.props.admin){
  437. store.dispatch(delBatchItemAdmin(this.props.checkItemsAdmin))
  438. }else{
  439. store.dispatch(delBatchItem(this.props.checkItems))
  440. }
  441. store.dispatch(changeVisible(false))
  442. } else if (type == 3) {
  443. // if (title == text &&tmpFolder==folderNameVal&&fstName==spell&&deptId) {
  444. // store.dispatch(changeVisible(false))
  445. // Notify.success('标题修改成功');
  446. // return;
  447. // }
  448. if (title.trim() == '') {
  449. Notify.info('请输入模板名称');
  450. return;
  451. }else if(fstName.trim() == ''){
  452. Notify.error('请输入模板名首拼')
  453. return;
  454. }else if(this.props.admin&&deptId == ''){
  455. Notify.error('请选择科室')
  456. return;
  457. }
  458. let tempObj = {
  459. id: currId,
  460. title: title,
  461. deptId:deptId,
  462. folderId:folderId,
  463. folderName:folderNameVal,
  464. spell:fstName,
  465. sex: sex,
  466. hospitalDeptName:hospitalDeptName
  467. }
  468. if(this.props.admin){
  469. store.dispatch(changeTitleAsyncAdmin(tempObj))
  470. }else{
  471. store.dispatch(changeTitleAsync(tempObj))
  472. }
  473. } else if (type == 4) { //模板引入
  474. if(this.props.admin){
  475. store.dispatch(setPageViewAdmin(id))
  476. }else{
  477. store.dispatch(setPageView(id))
  478. const hasCalcIndex = this.state.hasCalcIndex
  479. if(hasCalcIndex) {
  480. store.dispatch(addTemplateQuote(id))
  481. }
  482. this.setState({
  483. hasCalcIndex: false
  484. })
  485. }
  486. store.dispatch(changeVisible(false))
  487. } else if(type == 6) { //删除文件夹
  488. if(this.props.admin){
  489. store.dispatch(delFloder(folderId))
  490. store.dispatch(changeVisible(false))
  491. }else{
  492. // store.dispatch(delFloder(folderId))
  493. // store.dispatch(delBatchItem(this.props.checkItems))
  494. }
  495. } else if(type == 5) {
  496. if(this.props.admin){
  497. store.dispatch(newFloder(floderName,folderId,'modify'))
  498. // store.dispatch(changeVisible(false))
  499. }else{
  500. }
  501. }
  502. }
  503. handleClose() {
  504. store.dispatch(changeVisible(false));
  505. this.setState({
  506. hasCalcIndex: false,
  507. folderListShow: false
  508. })
  509. }
  510. whichTemp(tab,name,hasSearch){
  511. if(tab!=2||!name){
  512. if(tab == 1 && name&&hasSearch) {
  513. this.templateSearch(name,1)
  514. } else {
  515. store.dispatch(initAdminItemList(1,true))
  516. }
  517. }else{
  518. this.templateSearch(name,2)
  519. }
  520. store.dispatch(whichTemp(tab))
  521. }
  522. floderSlideToggle(id){
  523. store.dispatch(floderSlide(id))
  524. }
  525. floderActionDo(id){
  526. store.dispatch(floderAction(id))
  527. }
  528. handleFolderShow(){
  529. const {folderListShow} = this.state
  530. this.setState({
  531. folderListShow:!folderListShow
  532. })
  533. }
  534. setFolderId(id,name){//文件夹
  535. this.setState({
  536. folderId :id,
  537. folderNameVal:name,
  538. folderListShow:false
  539. })
  540. }
  541. newFolder(flg){
  542. store.dispatch(folderModal(flg))
  543. }
  544. folderManage(flg) {
  545. store.dispatch(folderOrder(flg))
  546. }
  547. handleChangeValue(val) {
  548. val && store.dispatch(getDepartments(val))
  549. }
  550. handleChangeIpt(val){//搜索科室
  551. if(val == ''){
  552. this.setState({
  553. deptId:'',
  554. })
  555. return
  556. }
  557. this.setState({
  558. value:val
  559. })
  560. }
  561. setDeptId(id,name){
  562. this.handleClearValue()
  563. this.setState({
  564. deptId :id,
  565. value:name
  566. })
  567. }
  568. hideFolderList(){
  569. this.setState({
  570. folderListShow:false
  571. })
  572. }
  573. handleClearValue () {
  574. store.dispatch(getDptLis([]))
  575. }
  576. render() {
  577. const { activeId, checkItems,selectTemp,folderListContentArr, visible, showMsg,hasMore,current,floderListAdmin, items,
  578. allCheckShow,allCheckShowAdmin,adminItems,admin,checkItemsAdmin,clearSearch, templateNormsSearchList, departLis,mode} = this.props;
  579. const { type,okBorderColor,okColor,oKBg,okText,message,folderListShow,value,reset } = this.state
  580. const { handleChangeValue, handleChangeIpt} = this;
  581. return <div className={style["container"]} ref={this.$cont} style={+activeId!==0?"":{paddingBottom:0}}>
  582. <Tab tabs={this.state.tabs}
  583. activeId={activeId}
  584. handleActiveClick={this.handleActiveClick}
  585. >
  586. <TemplateContainer activeId={activeId}>
  587. {/*<PushItemsContainer></PushItemsContainer>*/}
  588. <PushEmbed></PushEmbed>
  589. <CaseQuailty></CaseQuailty>
  590. <TemplateItems
  591. mode={mode}
  592. items={items}
  593. clearSearch={clearSearch}
  594. adminItems={adminItems}
  595. admin={admin}
  596. handleAllCheckboxAdmin={this.handleAllCheckboxAdmin}
  597. handleMangerTemplateAdmin={this.handleMangerTemplateAdmin}
  598. current={current}
  599. hasMore={hasMore}
  600. checkItems={checkItems}
  601. checkItemsAdmin={checkItemsAdmin}
  602. allCheckShow={allCheckShow}
  603. allCheckShowAdmin={allCheckShowAdmin}
  604. handleContentClick={this.handleContentClick}
  605. handleTemplateDel={this.handleTemplateDel}
  606. handleTitleChange={this.handleTitleChange}
  607. handleDelList={this.handleDelList}
  608. handleMangerTemplate={this.handleMangerTemplate}
  609. handleAllCheckbox={this.handleAllCheckbox}
  610. handleClickGetMore={this.handleClickGetMore}
  611. templateSearch={this.templateSearch}
  612. whichTemp={this.whichTemp}
  613. selectTemp={selectTemp}
  614. floderSlide={this.floderSlideToggle}
  615. floderAction={this.floderActionDo}
  616. floderDelete={this.floderDelete}
  617. floderRename={this.floderRename}
  618. folderListContentArr={folderListContentArr}
  619. templateNormsSearchList={templateNormsSearchList}
  620. clearTemplateSearch={this.clearTemplateSearch}
  621. reset = {reset}
  622. clearReset = {this.clearReset}
  623. ></TemplateItems>
  624. <MedicalInfoContainer></MedicalInfoContainer>
  625. </TemplateContainer>
  626. </Tab>
  627. <ConfirmModal
  628. visible={visible}
  629. confirm={this.makeSure}
  630. close={this.handleClose}
  631. title={type==5?'重命名文件夹':type==3?'修改模板':null}
  632. cancel={this.handleClose}
  633. okText={okText}
  634. width={type==5 ? 500: type==3?580:300}
  635. height={type==3&&admin?280:200}
  636. okBorderColor={okBorderColor}
  637. okColor={okColor}
  638. oKBg={oKBg}
  639. borderBtm={type==5||type==3?'1px solid #ccc':null}
  640. >
  641. {message}
  642. {
  643. admin&&type==3?<div onClick={()=>{this.handleClearValue()}}>
  644. <div className={style.iptWrap} onClick={()=>{this.hideFolderList()}}>
  645. <div className={style.male}>
  646. <span className={style.leftName}>性别归属:</span>
  647. <span className={style['commonSex']} id="commonSex" onClick={this.changeRadio.bind(this,1)}><img src={this.state.sex == 3 ? check_right:check_circle } alt=""/><i style={{color:'#000'}}>通用</i></span>
  648. <span id="maleSex" onClick={this.changeRadio.bind(this,2)}><img src={this.state.sex == 1 ? check_right:check_circle } alt=""/><i>男</i></span>
  649. <span id="femaleSex" onClick={this.changeRadio.bind(this,3)}><img src={this.state.sex == 2 ? check_right:check_circle } alt=""/><i>女</i></span>
  650. <span style={{paddingRight:0,color:'#777777'}}>(注:错误引用,显示可能有误)</span>
  651. </div>
  652. </div>
  653. <div className={style.department} onClick={()=>{this.hideFolderList()}}>
  654. <span className={style.leftName}>科室归属:</span>
  655. <Search handleChangeValue={handleChangeValue} handleChangeIpt={handleChangeIpt} value={value} visible={true} zIndex={11}>
  656. {
  657. departLis.length>0&&value&&<ul className={style.departLis}>
  658. {
  659. departLis.map((item,idx)=>{
  660. return <li onClick={()=>this.setDeptId(item.id,item.conceptDeptName)}>
  661. {item.conceptDeptName}
  662. </li>
  663. })
  664. }
  665. </ul>
  666. }
  667. </Search>
  668. <span style={{paddingRight:0,color:'#777777'}}>(支持汉字关键字搜索)</span>
  669. </div>
  670. <div className={style.department}>
  671. <span className={style.leftName}>存储为:</span>
  672. <div className={style.selectFolder} onClick={(e) => {
  673. this.handleFolderShow(e)
  674. }}>
  675. <input className={style.selectFolderIpt}
  676. autocomplete="off"
  677. type="text"
  678. maxLength='20'
  679. readOnly
  680. value={this.state.folderNameVal}
  681. />
  682. <img src={slideDown} alt=""/>
  683. {
  684. floderListAdmin.length>0&&folderListShow&&<ul className={`${style.departLis} ${style.departLisFolder}`}>
  685. {
  686. floderListAdmin.map((item,idx)=>{
  687. return <li onClick={()=>this.setFolderId(item.id,item.name)}>
  688. {item.name}
  689. </li>
  690. })
  691. }
  692. </ul>
  693. }
  694. </div>
  695. <span className={style.newFolder} onClick={()=>this.newFolder(true)}>新建文件夹</span>
  696. <span className={style.mangerFolder} onClick={()=>this.folderManage(true)}>管理文件夹</span>
  697. </div>
  698. </div>:null
  699. }
  700. </ConfirmModal>
  701. {+activeId!==0?<CopyRightContainer />:''}
  702. {/* <EmergencyProcedure emergencyname={'气胸'} ></EmergencyProcedure> */}
  703. </div>
  704. }
  705. }
  706. const mapStateToProps = (state) => {//console.log(state)
  707. return {
  708. items: state.tabTemplate.items,
  709. adminItems: state.tabTemplate.adminItems,
  710. admin: state.homePage.admin,
  711. current: state.tabTemplate.current,
  712. hasMore: state.tabTemplate.hasMore,
  713. activeId: state.tabTemplate.activeId,
  714. checkItems: state.tabTemplate.checkItems,
  715. allChecked: state.tabTemplate.allChecked,
  716. visible: state.tabTemplate.visible,
  717. showMsg: state.tabTemplate.showMsg,
  718. allCheckShow: state.tabTemplate.allCheckShow,
  719. mode:state.typeConfig.typeConfig[0],
  720. allCheckedAdmin: state.tabTemplate.allCheckedAdmin,
  721. allCheckShowAdmin: state.tabTemplate.allCheckShowAdmin,
  722. checkItemsAdmin: state.tabTemplate.checkItemsAdmin,
  723. clearSearch:state.print.clearSearch,
  724. departLis: state.tabTemplate.departLis,
  725. selectTemp:state.tabTemplate.selectTemp,
  726. floderListAdmin:state.tabTemplate.floderListAdmin,
  727. folderListContentArr:state.tabTemplate.folderListContentArr,
  728. templateNormsSearchList: state.tabTemplate.templateNormsSearchList
  729. }
  730. }
  731. export default connect(mapStateToProps, null)(PushContainer);