index.jsx 24 KB

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