index.jsx 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  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. }else if(fstName.trim() == ''){
  443. Notify.error('请输入模板名首拼')
  444. return;
  445. }else if(this.props.admin&&deptId == ''){
  446. Notify.error('请选择科室')
  447. return;
  448. }
  449. let tempObj = {
  450. id: currId,
  451. title: title,
  452. deptId:deptId,
  453. folderId:folderId,
  454. folderName:folderNameVal,
  455. spell:fstName,
  456. sex: sex,
  457. hospitalDeptName:hospitalDeptName
  458. }
  459. if(this.props.admin){
  460. store.dispatch(changeTitleAsyncAdmin(tempObj))
  461. }else{
  462. store.dispatch(changeTitleAsync(tempObj))
  463. }
  464. } else if (type == 4) { //模板引入
  465. if(this.props.admin){
  466. store.dispatch(setPageViewAdmin(id))
  467. }else{
  468. store.dispatch(setPageView(id))
  469. const hasCalcIndex = this.state.hasCalcIndex
  470. if(hasCalcIndex) {
  471. store.dispatch(addTemplateQuote(id))
  472. }
  473. this.setState({
  474. hasCalcIndex: false
  475. })
  476. }
  477. store.dispatch(changeVisible(false))
  478. } else if(type == 6) { //删除文件夹
  479. if(this.props.admin){
  480. store.dispatch(delFloder(folderId))
  481. store.dispatch(changeVisible(false))
  482. }else{
  483. // store.dispatch(delFloder(folderId))
  484. // store.dispatch(delBatchItem(this.props.checkItems))
  485. }
  486. } else if(type == 5) {
  487. if(this.props.admin){
  488. store.dispatch(newFloder(floderName,folderId,'modify'))
  489. // store.dispatch(changeVisible(false))
  490. }else{
  491. }
  492. }
  493. }
  494. handleClose() {
  495. store.dispatch(changeVisible(false));
  496. this.setState({
  497. hasCalcIndex: false,
  498. folderListShow: false
  499. })
  500. }
  501. whichTemp(tab,name,hasSearch){
  502. if(tab!=2||!name){
  503. if(tab == 1 && name&&hasSearch) {
  504. this.templateSearch(name,1)
  505. } else {
  506. store.dispatch(initAdminItemList(1,true))
  507. }
  508. }else{
  509. this.templateSearch(name,2)
  510. }
  511. store.dispatch(whichTemp(tab))
  512. }
  513. floderSlideToggle(id){
  514. store.dispatch(floderSlide(id))
  515. }
  516. floderActionDo(id){
  517. store.dispatch(floderAction(id))
  518. }
  519. handleFolderShow(){
  520. const {folderListShow} = this.state
  521. this.setState({
  522. folderListShow:!folderListShow
  523. })
  524. }
  525. setFolderId(id,name){//文件夹
  526. this.setState({
  527. folderId :id,
  528. folderNameVal:name,
  529. folderListShow:false
  530. })
  531. }
  532. newFolder(flg){
  533. store.dispatch(folderModal(flg))
  534. }
  535. folderManage(flg) {
  536. store.dispatch(folderOrder(flg))
  537. }
  538. handleChangeValue(val) {
  539. val && store.dispatch(getDepartments(val))
  540. }
  541. handleChangeIpt(val){//搜索科室
  542. if(val == ''){
  543. this.setState({
  544. deptId:'',
  545. })
  546. return
  547. }
  548. this.setState({
  549. value:val
  550. })
  551. }
  552. setDeptId(id,name){
  553. this.handleClearValue()
  554. this.setState({
  555. deptId :id,
  556. value:name
  557. })
  558. }
  559. handleClearValue () {
  560. store.dispatch(getDptLis([]))
  561. }
  562. render() {
  563. const { activeId, checkItems,selectTemp,folderListContentArr, visible, showMsg,hasMore,current,floderListAdmin, items, allCheckShow,allCheckShowAdmin,adminItems,admin,checkItemsAdmin,clearSearch, templateNormsSearchList, departLis} = this.props;
  564. const { type,okBorderColor,okColor,oKBg,okText,message,folderListShow,value,reset } = this.state
  565. const { handleChangeValue, handleChangeIpt} = this
  566. return <div className={style["container"]} ref={this.$cont} >
  567. <Tab tabs={this.state.tabs}
  568. activeId={activeId}
  569. handleActiveClick={this.handleActiveClick}
  570. >
  571. <TemplateContainer activeId={activeId}>
  572. <PushItemsContainer></PushItemsContainer>
  573. <CaseQuailty></CaseQuailty>
  574. <TemplateItems
  575. items={items}
  576. clearSearch={clearSearch}
  577. adminItems={adminItems}
  578. admin={admin}
  579. handleAllCheckboxAdmin={this.handleAllCheckboxAdmin}
  580. handleMangerTemplateAdmin={this.handleMangerTemplateAdmin}
  581. current={current}
  582. hasMore={hasMore}
  583. checkItems={checkItems}
  584. checkItemsAdmin={checkItemsAdmin}
  585. allCheckShow={allCheckShow}
  586. allCheckShowAdmin={allCheckShowAdmin}
  587. handleContentClick={this.handleContentClick}
  588. handleTemplateDel={this.handleTemplateDel}
  589. handleTitleChange={this.handleTitleChange}
  590. handleDelList={this.handleDelList}
  591. handleMangerTemplate={this.handleMangerTemplate}
  592. handleAllCheckbox={this.handleAllCheckbox}
  593. handleClickGetMore={this.handleClickGetMore}
  594. templateSearch={this.templateSearch}
  595. whichTemp={this.whichTemp}
  596. selectTemp={selectTemp}
  597. floderSlide={this.floderSlideToggle}
  598. floderAction={this.floderActionDo}
  599. floderDelete={this.floderDelete}
  600. floderRename={this.floderRename}
  601. folderListContentArr={folderListContentArr}
  602. templateNormsSearchList={templateNormsSearchList}
  603. clearTemplateSearch={this.clearTemplateSearch}
  604. reset = {reset}
  605. clearReset = {this.clearReset}
  606. ></TemplateItems>
  607. <MedicalInfoContainer></MedicalInfoContainer>
  608. </TemplateContainer>
  609. </Tab>
  610. <ConfirmModal
  611. visible={visible}
  612. confirm={this.makeSure}
  613. close={this.handleClose}
  614. title={type==5?'重命名文件夹':type==3?'修改模板':null}
  615. cancel={this.handleClose}
  616. okText={okText}
  617. width={type==5 ? 500: type==3?580:300}
  618. height={type==3&&admin?280:200}
  619. okBorderColor={okBorderColor}
  620. okColor={okColor}
  621. oKBg={oKBg}
  622. borderBtm={type==5||type==3?'1px solid #ccc':null}
  623. >
  624. {message}
  625. {
  626. admin&&type==3?<div>
  627. <div className={style.iptWrap}>
  628. <div className={style.male}>
  629. <span className={style.leftName}>性别归属:</span>
  630. <span className={style['commonSex']} id="commonSex" onClick={this.changeRadio.bind(this,1)}><img src={check_right} alt=""/><i style={{color:'#000'}}>通用</i></span>
  631. <span id="maleSex" onClick={this.changeRadio.bind(this,2)}><img src={check_circle} alt=""/><i>男</i></span>
  632. <span id="femaleSex" onClick={this.changeRadio.bind(this,3)}><img src={check_circle} alt=""/><i>女</i></span>
  633. <span style={{paddingRight:0,color:'#777777'}}>(注:错误引用,显示可能有误)</span>
  634. </div>
  635. </div>
  636. <div className={style.department}>
  637. <span className={style.leftName}>科室归属:</span>
  638. <Search handleChangeValue={handleChangeValue} handleChangeIpt={handleChangeIpt} value={value} visible={true} zIndex={11}>
  639. {
  640. departLis.length>0&&value&&<ul className={style.departLis}>
  641. {
  642. departLis.map((item,idx)=>{
  643. return <li onClick={()=>this.setDeptId(item.id,item.conceptDeptName)}>
  644. {item.conceptDeptName}
  645. </li>
  646. })
  647. }
  648. </ul>
  649. }
  650. </Search>
  651. <span style={{paddingRight:0,color:'#777777'}}>(支持汉字关键字搜索)</span>
  652. </div>
  653. <div className={style.department}>
  654. <span className={style.leftName}>存储为:</span>
  655. <div className={style.selectFolder} onClick={(e) => {
  656. this.handleFolderShow(e)
  657. }}>
  658. <input className={style.selectFolderIpt}
  659. type="text"
  660. maxLength='20'
  661. readOnly
  662. value={this.state.folderNameVal}
  663. />
  664. <img src={slideDown} alt=""/>
  665. {
  666. floderListAdmin.length>0&&folderListShow&&<ul className={`${style.departLis} ${style.departLisFolder}`}>
  667. {
  668. floderListAdmin.map((item,idx)=>{
  669. return <li onClick={()=>this.setFolderId(item.id,item.name)}>
  670. {item.name}
  671. </li>
  672. })
  673. }
  674. </ul>
  675. }
  676. </div>
  677. <span className={style.newFolder} onClick={()=>this.newFolder(true)}>新建文件夹</span>
  678. <span className={style.mangerFolder} onClick={()=>this.folderManage(true)}>管理文件夹</span>
  679. </div>
  680. </div>:null
  681. }
  682. </ConfirmModal>
  683. <CopyRightContainer />
  684. </div>
  685. }
  686. }
  687. const mapStateToProps = (state) => {//console.log(state)
  688. return {
  689. items: state.tabTemplate.items,
  690. adminItems: state.tabTemplate.adminItems,
  691. admin: state.homePage.admin,
  692. current: state.tabTemplate.current,
  693. hasMore: state.tabTemplate.hasMore,
  694. activeId: state.tabTemplate.activeId,
  695. checkItems: state.tabTemplate.checkItems,
  696. allChecked: state.tabTemplate.allChecked,
  697. visible: state.tabTemplate.visible,
  698. showMsg: state.tabTemplate.showMsg,
  699. allCheckShow: state.tabTemplate.allCheckShow,
  700. allCheckedAdmin: state.tabTemplate.allCheckedAdmin,
  701. allCheckShowAdmin: state.tabTemplate.allCheckShowAdmin,
  702. checkItemsAdmin: state.tabTemplate.checkItemsAdmin,
  703. clearSearch:state.print.clearSearch,
  704. departLis: state.tabTemplate.departLis,
  705. selectTemp:state.tabTemplate.selectTemp,
  706. floderListAdmin:state.tabTemplate.floderListAdmin,
  707. folderListContentArr:state.tabTemplate.folderListContentArr,
  708. templateNormsSearchList: state.tabTemplate.templateNormsSearchList
  709. }
  710. }
  711. export default connect(mapStateToProps, null)(PushContainer);